@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.mjs
CHANGED
|
@@ -3201,7 +3201,7 @@ class Accordion {
|
|
|
3201
3201
|
const accordionLightContent = this.isLight ? 'accordion-content accordion-light-content' : 'accordion-content';
|
|
3202
3202
|
const accordionLightSeparator = this.isLightSeparator ? 'accordion accordion-light accordion-light--border' : 'accordion';
|
|
3203
3203
|
const accordionSmall = this.isSmall ? 'accordion accordion-light accordion-light--small' : 'accordion';
|
|
3204
|
-
return (hAsync("details", { key: '
|
|
3204
|
+
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' }))));
|
|
3205
3205
|
}
|
|
3206
3206
|
static get style() { return RoadAccordionStyle0; }
|
|
3207
3207
|
static get cmpMeta() { return {
|
|
@@ -3219,7 +3219,7 @@ class Accordion {
|
|
|
3219
3219
|
}; }
|
|
3220
3220
|
}
|
|
3221
3221
|
|
|
3222
|
-
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:
|
|
3222
|
+
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)}";
|
|
3223
3223
|
var RoadAlertStyle0 = alertCss;
|
|
3224
3224
|
|
|
3225
3225
|
/**
|
|
@@ -3294,7 +3294,7 @@ class Alert {
|
|
|
3294
3294
|
}
|
|
3295
3295
|
const btnContainerClass = this.hasCloseIcon ? 'btn-container justify-end' : 'btn-container';
|
|
3296
3296
|
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;
|
|
3297
|
-
return (hAsync(Host, { key: '
|
|
3297
|
+
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)));
|
|
3298
3298
|
}
|
|
3299
3299
|
get el() { return getElement(this); }
|
|
3300
3300
|
static get style() { return RoadAlertStyle0; }
|
|
@@ -3399,7 +3399,7 @@ class Asset {
|
|
|
3399
3399
|
}
|
|
3400
3400
|
}
|
|
3401
3401
|
render() {
|
|
3402
|
-
return (hAsync(Host, { key: '
|
|
3402
|
+
return (hAsync(Host, { key: '64331c0cd4f5a805be16cd746dfe78d7eeea118e', "aria-hidden": "true", role: "img" }, ((this.assetSvgContent !== '')
|
|
3403
3403
|
? hAsync("div", { class: "icon-inner", innerHTML: this.assetSvgContent })
|
|
3404
3404
|
: hAsync("div", { class: "icon-inner" }))));
|
|
3405
3405
|
}
|
|
@@ -3469,8 +3469,8 @@ class Autocomplete {
|
|
|
3469
3469
|
}
|
|
3470
3470
|
}
|
|
3471
3471
|
render() {
|
|
3472
|
-
return (hAsync(Host, { key: '
|
|
3473
|
-
hAsync("ul", { key: '
|
|
3472
|
+
return (hAsync(Host, { key: '73780efbf9fbb131958cf95d82e917400b7cc7a7' }, hAsync("slot", { key: 'cb9d4ba58dbee2802504aaaf49223d0905cebeb5' }), this.visible && this.options.length > 0 &&
|
|
3473
|
+
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))))));
|
|
3474
3474
|
}
|
|
3475
3475
|
get el() { return getElement(this); }
|
|
3476
3476
|
static get style() { return RoadAutocompleteStyle0; }
|
|
@@ -3503,7 +3503,7 @@ class Avatar {
|
|
|
3503
3503
|
}
|
|
3504
3504
|
render() {
|
|
3505
3505
|
const sizeClass = this.size !== undefined ? `avatar-${this.size}` : '';
|
|
3506
|
-
return (hAsync(Host, { key: '
|
|
3506
|
+
return (hAsync(Host, { key: 'a36243469cae6cdd1743417f76a261cb7a82d3fd', class: `${sizeClass}` }, hAsync("slot", { key: '656c8a8119209d27897087be9c5a11ed0679dbed' })));
|
|
3507
3507
|
}
|
|
3508
3508
|
static get style() { return RoadAvatarStyle0; }
|
|
3509
3509
|
static get cmpMeta() { return {
|
|
@@ -3544,7 +3544,7 @@ class Badge {
|
|
|
3544
3544
|
const colorClass = this.color !== undefined ? `badge-${this.color}` : '';
|
|
3545
3545
|
const bubbleClass = this.bubble ? 'badge-bubble' : '';
|
|
3546
3546
|
const sizeClass = this.size !== undefined ? `badge-${this.size}` : '';
|
|
3547
|
-
return (hAsync(Host, { key: '
|
|
3547
|
+
return (hAsync(Host, { key: '272af446e438ac2c9df336d12cd0bfbc3485af77', class: `${colorClass} ${bubbleClass} ${sizeClass}` }, hAsync("slot", { key: 'da72ac86b6650797cd4a4e16a5afe85e2090f325' })));
|
|
3548
3548
|
}
|
|
3549
3549
|
static get style() { return RoadBadgeStyle0; }
|
|
3550
3550
|
static get cmpMeta() { return {
|
|
@@ -3594,7 +3594,7 @@ class Banner {
|
|
|
3594
3594
|
}
|
|
3595
3595
|
render() {
|
|
3596
3596
|
const bannerIsOpenClass = this.isOpen ? 'banner-open' : '';
|
|
3597
|
-
return (hAsync(Host, { key: '
|
|
3597
|
+
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" })))));
|
|
3598
3598
|
}
|
|
3599
3599
|
static get style() { return RoadBannerStyle0; }
|
|
3600
3600
|
static get cmpMeta() { return {
|
|
@@ -3613,7 +3613,7 @@ class Banner {
|
|
|
3613
3613
|
}; }
|
|
3614
3614
|
}
|
|
3615
3615
|
|
|
3616
|
-
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-
|
|
3616
|
+
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}";
|
|
3617
3617
|
var RoadButtonStyle0 = buttonCss;
|
|
3618
3618
|
|
|
3619
3619
|
/**
|
|
@@ -3643,6 +3643,10 @@ class Button$1 {
|
|
|
3643
3643
|
* The type of the button.
|
|
3644
3644
|
*/
|
|
3645
3645
|
this.buttonType = 'button';
|
|
3646
|
+
/**
|
|
3647
|
+
* If `true`, the button will use inverse colors (when in headers or dark backgrounds).
|
|
3648
|
+
*/
|
|
3649
|
+
this.inverse = false;
|
|
3646
3650
|
/**
|
|
3647
3651
|
* If `true`, display only an icon in the button.
|
|
3648
3652
|
*/
|
|
@@ -3700,7 +3704,8 @@ class Button$1 {
|
|
|
3700
3704
|
const sizeClass = this.size !== undefined ? `btn-${this.size}` : '';
|
|
3701
3705
|
const expandClass = this.expand ? 'btn-block' : '';
|
|
3702
3706
|
const iconOnlyClass = this.iconOnly ? 'btn-icon' : '';
|
|
3703
|
-
|
|
3707
|
+
const inverseClass = this.inverse ? 'btn-inverse' : '';
|
|
3708
|
+
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" }))));
|
|
3704
3709
|
}
|
|
3705
3710
|
get el() { return getElement(this); }
|
|
3706
3711
|
static get style() { return RoadButtonStyle0; }
|
|
@@ -3711,6 +3716,7 @@ class Button$1 {
|
|
|
3711
3716
|
"color": [1],
|
|
3712
3717
|
"size": [513],
|
|
3713
3718
|
"buttonType": [1, "button-type"],
|
|
3719
|
+
"inverse": [4],
|
|
3714
3720
|
"iconOnly": [516, "icon-only"],
|
|
3715
3721
|
"disabled": [516],
|
|
3716
3722
|
"expand": [516],
|
|
@@ -3785,7 +3791,7 @@ class Button {
|
|
|
3785
3791
|
render() {
|
|
3786
3792
|
const TagType = this.href === undefined ? 'button' : 'a';
|
|
3787
3793
|
const positionClass = this.position !== undefined ? `position-${this.position}` : '';
|
|
3788
|
-
return (hAsync(Host, { key: '
|
|
3794
|
+
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' }))));
|
|
3789
3795
|
}
|
|
3790
3796
|
get el() { return getElement(this); }
|
|
3791
3797
|
static get style() { return RoadButtonFloatingStyle0; }
|
|
@@ -3830,7 +3836,7 @@ class ButtonBar {
|
|
|
3830
3836
|
this.selectedTabChanged();
|
|
3831
3837
|
}
|
|
3832
3838
|
render() {
|
|
3833
|
-
return (hAsync(Host, { key: '
|
|
3839
|
+
return (hAsync(Host, { key: 'a5bf3fc09d2e077e087ae5246ee562aed29472a5', role: "tablist" }, hAsync("slot", { key: '48a1e2e24b79f769bc35e4d048218210be1b0d56' })));
|
|
3834
3840
|
}
|
|
3835
3841
|
get el() { return getElement(this); }
|
|
3836
3842
|
static get watchers() { return {
|
|
@@ -3849,7 +3855,7 @@ class ButtonBar {
|
|
|
3849
3855
|
}; }
|
|
3850
3856
|
}
|
|
3851
3857
|
|
|
3852
|
-
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)}
|
|
3858
|
+
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}";
|
|
3853
3859
|
var RoadCardStyle0 = cardCss;
|
|
3854
3860
|
|
|
3855
3861
|
/**
|
|
@@ -3863,45 +3869,71 @@ class Card {
|
|
|
3863
3869
|
this.roadcardclick = createEvent(this, "roadcardclick", 7);
|
|
3864
3870
|
this.roadCardClick = createEvent(this, "roadCardClick", 7);
|
|
3865
3871
|
/**
|
|
3866
|
-
|
|
3867
|
-
|
|
3868
|
-
this.elevation =
|
|
3872
|
+
* The elevation.
|
|
3873
|
+
*/
|
|
3874
|
+
this.elevation = "none";
|
|
3869
3875
|
/**
|
|
3870
3876
|
* If `true`, a button tag will be rendered and the card will be tappable.
|
|
3871
3877
|
*/
|
|
3872
3878
|
this.button = false;
|
|
3879
|
+
/**
|
|
3880
|
+
* If `true`, the card has the `selected` state and the `selected` class is applied on the host.
|
|
3881
|
+
* Toggled automatically when the card is clicked (when clickable).
|
|
3882
|
+
*/
|
|
3883
|
+
this.selected = false;
|
|
3884
|
+
/**
|
|
3885
|
+
* If `true`, the card is disabled and cannot be clicked.
|
|
3886
|
+
* Only applies when in button mode (button=true and no href).
|
|
3887
|
+
*/
|
|
3888
|
+
this.disabled = false;
|
|
3873
3889
|
/**
|
|
3874
3890
|
* The type of the button. Only used when an `onclick` or `button` property is present.
|
|
3875
3891
|
*/
|
|
3876
|
-
this.type =
|
|
3877
|
-
this.onClick = () => {
|
|
3892
|
+
this.type = "button";
|
|
3893
|
+
this.onClick = (e) => {
|
|
3878
3894
|
var _a, _b;
|
|
3895
|
+
// If disabled in button mode, prevent all interactions
|
|
3896
|
+
const isButtonMode = this.button && this.href === undefined;
|
|
3897
|
+
if (isButtonMode && this.disabled) {
|
|
3898
|
+
e.preventDefault();
|
|
3899
|
+
e.stopPropagation();
|
|
3900
|
+
return;
|
|
3901
|
+
}
|
|
3902
|
+
// Toggle selected state on click for clickable cards
|
|
3903
|
+
this.selected = !this.selected;
|
|
3879
3904
|
if (this.value !== undefined) {
|
|
3880
3905
|
this.roadcardclick.emit({
|
|
3881
3906
|
value: this.value,
|
|
3882
|
-
label: (_a = this.el.querySelector(
|
|
3907
|
+
label: (_a = this.el.querySelector("road-label")) === null || _a === void 0 ? void 0 : _a.textContent,
|
|
3883
3908
|
});
|
|
3884
3909
|
this.roadCardClick.emit({
|
|
3885
3910
|
value: this.value,
|
|
3886
|
-
label: (_b = this.el.querySelector(
|
|
3911
|
+
label: (_b = this.el.querySelector("road-label")) === null || _b === void 0 ? void 0 : _b.textContent,
|
|
3887
3912
|
});
|
|
3888
3913
|
}
|
|
3889
3914
|
};
|
|
3890
3915
|
}
|
|
3891
3916
|
isClickable() {
|
|
3892
|
-
return
|
|
3917
|
+
return this.href !== undefined || this.button;
|
|
3893
3918
|
}
|
|
3894
3919
|
renderCard() {
|
|
3895
3920
|
const clickable = this.isClickable();
|
|
3896
3921
|
if (!clickable) {
|
|
3897
|
-
return [
|
|
3898
|
-
hAsync("slot", null)
|
|
3899
|
-
];
|
|
3922
|
+
return [hAsync("slot", null)];
|
|
3900
3923
|
}
|
|
3901
3924
|
const { href } = this;
|
|
3902
|
-
const TagType = clickable
|
|
3903
|
-
|
|
3904
|
-
|
|
3925
|
+
const TagType = clickable
|
|
3926
|
+
? href === undefined
|
|
3927
|
+
? "button"
|
|
3928
|
+
: "a"
|
|
3929
|
+
: "div";
|
|
3930
|
+
const isButtonMode = this.button && href === undefined;
|
|
3931
|
+
const attrs = TagType === "button"
|
|
3932
|
+
? {
|
|
3933
|
+
type: this.type,
|
|
3934
|
+
disabled: isButtonMode && this.disabled,
|
|
3935
|
+
"aria-disabled": isButtonMode && this.disabled ? "true" : undefined,
|
|
3936
|
+
}
|
|
3905
3937
|
: {
|
|
3906
3938
|
download: this.download,
|
|
3907
3939
|
href: this.href,
|
|
@@ -3912,8 +3944,12 @@ class Card {
|
|
|
3912
3944
|
}
|
|
3913
3945
|
render() {
|
|
3914
3946
|
const { elevation } = this;
|
|
3947
|
+
const isButtonMode = this.button && this.href === undefined;
|
|
3915
3948
|
const elevationClass = this.elevation ? `card-elevation-${elevation}` : ``;
|
|
3916
|
-
|
|
3949
|
+
const selectedClass = this.selected ? "selected" : "";
|
|
3950
|
+
const isButtonClass = isButtonMode ? "is-button" : "";
|
|
3951
|
+
const disabledClass = isButtonMode && this.disabled ? "is-disabled" : "";
|
|
3952
|
+
return (hAsync(Host, { key: '5ef381ca3d9d8028cc1e3a10cc06511602964437', class: `${elevationClass} ${selectedClass} ${isButtonClass} ${disabledClass}` }, this.renderCard()));
|
|
3917
3953
|
}
|
|
3918
3954
|
get el() { return getElement(this); }
|
|
3919
3955
|
static get style() { return RoadCardStyle0; }
|
|
@@ -3924,6 +3960,8 @@ class Card {
|
|
|
3924
3960
|
"elevation": [1],
|
|
3925
3961
|
"button": [4],
|
|
3926
3962
|
"value": [1],
|
|
3963
|
+
"selected": [516],
|
|
3964
|
+
"disabled": [516],
|
|
3927
3965
|
"type": [1],
|
|
3928
3966
|
"download": [1],
|
|
3929
3967
|
"href": [1],
|
|
@@ -3932,7 +3970,7 @@ class Card {
|
|
|
3932
3970
|
},
|
|
3933
3971
|
"$listeners$": undefined,
|
|
3934
3972
|
"$lazyBundleId$": "-",
|
|
3935
|
-
"$attrsToReflect$": []
|
|
3973
|
+
"$attrsToReflect$": [["selected", "selected"], ["disabled", "disabled"]]
|
|
3936
3974
|
}; }
|
|
3937
3975
|
}
|
|
3938
3976
|
|
|
@@ -10660,7 +10698,7 @@ class Carousel {
|
|
|
10660
10698
|
});
|
|
10661
10699
|
}
|
|
10662
10700
|
render() {
|
|
10663
|
-
return (hAsync(Host, { key: '
|
|
10701
|
+
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 })))));
|
|
10664
10702
|
}
|
|
10665
10703
|
get el() { return getElement(this); }
|
|
10666
10704
|
static get watchers() { return {
|
|
@@ -10711,10 +10749,10 @@ class CarouselItem {
|
|
|
10711
10749
|
registerInstance(this, hostRef);
|
|
10712
10750
|
}
|
|
10713
10751
|
render() {
|
|
10714
|
-
return (hAsync(Host, { key: '
|
|
10752
|
+
return (hAsync(Host, { key: '9505d58be5a5b79ca69b82808b1ffd06ba6bf5ae', class: {
|
|
10715
10753
|
'swiper-slide': true,
|
|
10716
10754
|
'swiper-zoom-container': true,
|
|
10717
|
-
} }, hAsync("slot", { key: '
|
|
10755
|
+
} }, hAsync("slot", { key: 'e5c79e5ae3ca8cb8d69cd37a5b55496e04b26652' })));
|
|
10718
10756
|
}
|
|
10719
10757
|
static get style() { return RoadCarouselItemStyle0; }
|
|
10720
10758
|
static get cmpMeta() { return {
|
|
@@ -10805,7 +10843,7 @@ class Checkbox {
|
|
|
10805
10843
|
const labelId = this.checkboxId + '-label';
|
|
10806
10844
|
const inverseClass = this.inverse && 'form-checkbox-inverse';
|
|
10807
10845
|
const isInvalidClass = this.error !== undefined && !this.checked && this.error !== '' ? 'is-invalid' : '';
|
|
10808
|
-
return (hAsync(Host, { key: '
|
|
10846
|
+
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)));
|
|
10809
10847
|
}
|
|
10810
10848
|
static get watchers() { return {
|
|
10811
10849
|
"checked": ["checkedChanged"]
|
|
@@ -10863,7 +10901,7 @@ class Chip$1 {
|
|
|
10863
10901
|
}
|
|
10864
10902
|
render() {
|
|
10865
10903
|
const outlineClass = this.outline ? 'chip-outline' : '';
|
|
10866
|
-
return (hAsync(Host, { key: '
|
|
10904
|
+
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 })));
|
|
10867
10905
|
}
|
|
10868
10906
|
static get style() { return RoadChipStyle0; }
|
|
10869
10907
|
static get cmpMeta() { return {
|
|
@@ -10896,7 +10934,7 @@ class Chip {
|
|
|
10896
10934
|
this.size = 'sm';
|
|
10897
10935
|
}
|
|
10898
10936
|
render() {
|
|
10899
|
-
return (hAsync(Host, { key: '
|
|
10937
|
+
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' }))));
|
|
10900
10938
|
}
|
|
10901
10939
|
static get style() { return RoadStatusChipStyle0; }
|
|
10902
10940
|
static get cmpMeta() { return {
|
|
@@ -10922,7 +10960,7 @@ class Col {
|
|
|
10922
10960
|
registerInstance(this, hostRef);
|
|
10923
10961
|
}
|
|
10924
10962
|
render() {
|
|
10925
|
-
return (hAsync("slot", { key: '
|
|
10963
|
+
return (hAsync("slot", { key: 'a2621927906372b10b73caae4ddb4eca67ca3077' }));
|
|
10926
10964
|
}
|
|
10927
10965
|
static get style() { return RoadColStyle0; }
|
|
10928
10966
|
static get cmpMeta() { return {
|
|
@@ -10972,7 +11010,7 @@ class Collapse {
|
|
|
10972
11010
|
const isOpenClass = this.isOpen ? 'collapse-open' : '';
|
|
10973
11011
|
const buttonText = this.isOpen ? this.showLess : this.showMore;
|
|
10974
11012
|
const centerClass = this.centered ? 'collapse-btn-centered' : '';
|
|
10975
|
-
return (hAsync(Host, { key: '
|
|
11013
|
+
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))));
|
|
10976
11014
|
}
|
|
10977
11015
|
static get style() { return RoadCollapseStyle0; }
|
|
10978
11016
|
static get cmpMeta() { return {
|
|
@@ -11009,7 +11047,7 @@ class ContentCard {
|
|
|
11009
11047
|
}
|
|
11010
11048
|
render() {
|
|
11011
11049
|
const insetImageClass = this.insetImage ? '' : 'content-card-image';
|
|
11012
|
-
return (hAsync(Host, { key: '
|
|
11050
|
+
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' })))));
|
|
11013
11051
|
}
|
|
11014
11052
|
static get style() { return RoadContentCardStyle0; }
|
|
11015
11053
|
static get cmpMeta() { return {
|
|
@@ -11185,7 +11223,7 @@ class Counter {
|
|
|
11185
11223
|
}
|
|
11186
11224
|
render() {
|
|
11187
11225
|
const dataCi = this.isDustbinVisible ? "road-dustbin" : "";
|
|
11188
|
-
return (hAsync("road-input-group", { key: '
|
|
11226
|
+
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" }))));
|
|
11189
11227
|
}
|
|
11190
11228
|
get el() { return getElement(this); }
|
|
11191
11229
|
static get watchers() { return {
|
|
@@ -11305,11 +11343,11 @@ class Dialog {
|
|
|
11305
11343
|
break;
|
|
11306
11344
|
}
|
|
11307
11345
|
}
|
|
11308
|
-
return (hAsync(Host, { key: '
|
|
11346
|
+
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
|
|
11309
11347
|
? hAsync("button", { type: "button", class: "dialog-close", onClick: this.onClick, "aria-label": "Close" }, hAsync("road-icon", { icon: navigationClose, "aria-hidden": "true" }))
|
|
11310
|
-
: ''), hAsync("div", { key: '
|
|
11348
|
+
: ''), hAsync("div", { key: 'fadeb8d0776e92809c1f4fdda9d24fe325640103', class: "dialog-body" }, this.color !== undefined
|
|
11311
11349
|
? hAsync("road-icon", { class: "dialog-icon", part: "dialog-icon", color: this.color, icon: icon, "aria-hidden": "true" })
|
|
11312
|
-
: '', hAsync("h2", { key: '
|
|
11350
|
+
: '', 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' }))))));
|
|
11313
11351
|
}
|
|
11314
11352
|
get el() { return getElement(this); }
|
|
11315
11353
|
static get style() { return RoadDialogStyle0; }
|
|
@@ -11332,7 +11370,1587 @@ class Dialog {
|
|
|
11332
11370
|
}; }
|
|
11333
11371
|
}
|
|
11334
11372
|
|
|
11335
|
-
|
|
11373
|
+
/*!
|
|
11374
|
+
* tabbable 6.3.0
|
|
11375
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
11376
|
+
*/
|
|
11377
|
+
// NOTE: separate `:not()` selectors has broader browser support than the newer
|
|
11378
|
+
// `:not([inert], [inert] *)` (Feb 2023)
|
|
11379
|
+
// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes
|
|
11380
|
+
// the entire query to fail, resulting in no nodes found, which will break a lot
|
|
11381
|
+
// of things... so we have to rely on JS to identify nodes inside an inert container
|
|
11382
|
+
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])'];
|
|
11383
|
+
var candidateSelector = /* #__PURE__ */candidateSelectors.join(',');
|
|
11384
|
+
var NoElement = typeof Element === 'undefined';
|
|
11385
|
+
var matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;
|
|
11386
|
+
var getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {
|
|
11387
|
+
var _element$getRootNode;
|
|
11388
|
+
return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);
|
|
11389
|
+
} : function (element) {
|
|
11390
|
+
return element === null || element === void 0 ? void 0 : element.ownerDocument;
|
|
11391
|
+
};
|
|
11392
|
+
|
|
11393
|
+
/**
|
|
11394
|
+
* Determines if a node is inert or in an inert ancestor.
|
|
11395
|
+
* @param {Element} [node]
|
|
11396
|
+
* @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to
|
|
11397
|
+
* see if any of them are inert. If false, only `node` itself is considered.
|
|
11398
|
+
* @returns {boolean} True if inert itself or by way of being in an inert ancestor.
|
|
11399
|
+
* False if `node` is falsy.
|
|
11400
|
+
*/
|
|
11401
|
+
var _isInert = function isInert(node, lookUp) {
|
|
11402
|
+
var _node$getAttribute;
|
|
11403
|
+
if (lookUp === void 0) {
|
|
11404
|
+
lookUp = true;
|
|
11405
|
+
}
|
|
11406
|
+
// CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`
|
|
11407
|
+
// JS API property; we have to check the attribute, which can either be empty or 'true';
|
|
11408
|
+
// if it's `null` (not specified) or 'false', it's an active element
|
|
11409
|
+
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');
|
|
11410
|
+
var inert = inertAtt === '' || inertAtt === 'true';
|
|
11411
|
+
|
|
11412
|
+
// NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`
|
|
11413
|
+
// if it weren't for `matches()` not being a function on shadow roots; the following
|
|
11414
|
+
// code works for any kind of node
|
|
11415
|
+
// CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`
|
|
11416
|
+
// so it likely would not support `:is([inert] *)` either...
|
|
11417
|
+
var result = inert || lookUp && node && _isInert(node.parentNode); // recursive
|
|
11418
|
+
|
|
11419
|
+
return result;
|
|
11420
|
+
};
|
|
11421
|
+
|
|
11422
|
+
/**
|
|
11423
|
+
* Determines if a node's content is editable.
|
|
11424
|
+
* @param {Element} [node]
|
|
11425
|
+
* @returns True if it's content-editable; false if it's not or `node` is falsy.
|
|
11426
|
+
*/
|
|
11427
|
+
var isContentEditable = function isContentEditable(node) {
|
|
11428
|
+
var _node$getAttribute2;
|
|
11429
|
+
// CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have
|
|
11430
|
+
// to use the attribute directly to check for this, which can either be empty or 'true';
|
|
11431
|
+
// if it's `null` (not specified) or 'false', it's a non-editable element
|
|
11432
|
+
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');
|
|
11433
|
+
return attValue === '' || attValue === 'true';
|
|
11434
|
+
};
|
|
11435
|
+
|
|
11436
|
+
/**
|
|
11437
|
+
* @param {Element} el container to check in
|
|
11438
|
+
* @param {boolean} includeContainer add container to check
|
|
11439
|
+
* @param {(node: Element) => boolean} filter filter candidates
|
|
11440
|
+
* @returns {Element[]}
|
|
11441
|
+
*/
|
|
11442
|
+
var getCandidates = function getCandidates(el, includeContainer, filter) {
|
|
11443
|
+
// even if `includeContainer=false`, we still have to check it for inertness because
|
|
11444
|
+
// if it's inert, all its children are inert
|
|
11445
|
+
if (_isInert(el)) {
|
|
11446
|
+
return [];
|
|
11447
|
+
}
|
|
11448
|
+
var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));
|
|
11449
|
+
if (includeContainer && matches.call(el, candidateSelector)) {
|
|
11450
|
+
candidates.unshift(el);
|
|
11451
|
+
}
|
|
11452
|
+
candidates = candidates.filter(filter);
|
|
11453
|
+
return candidates;
|
|
11454
|
+
};
|
|
11455
|
+
|
|
11456
|
+
/**
|
|
11457
|
+
* @callback GetShadowRoot
|
|
11458
|
+
* @param {Element} element to check for shadow root
|
|
11459
|
+
* @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
|
|
11460
|
+
*/
|
|
11461
|
+
|
|
11462
|
+
/**
|
|
11463
|
+
* @callback ShadowRootFilter
|
|
11464
|
+
* @param {Element} shadowHostNode the element which contains shadow content
|
|
11465
|
+
* @returns {boolean} true if a shadow root could potentially contain valid candidates.
|
|
11466
|
+
*/
|
|
11467
|
+
|
|
11468
|
+
/**
|
|
11469
|
+
* @typedef {Object} CandidateScope
|
|
11470
|
+
* @property {Element} scopeParent contains inner candidates
|
|
11471
|
+
* @property {Element[]} candidates list of candidates found in the scope parent
|
|
11472
|
+
*/
|
|
11473
|
+
|
|
11474
|
+
/**
|
|
11475
|
+
* @typedef {Object} IterativeOptions
|
|
11476
|
+
* @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;
|
|
11477
|
+
* if a function, implies shadow support is enabled and either returns the shadow root of an element
|
|
11478
|
+
* or a boolean stating if it has an undisclosed shadow root
|
|
11479
|
+
* @property {(node: Element) => boolean} filter filter candidates
|
|
11480
|
+
* @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list
|
|
11481
|
+
* @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
|
|
11482
|
+
*/
|
|
11483
|
+
|
|
11484
|
+
/**
|
|
11485
|
+
* @param {Element[]} elements list of element containers to match candidates from
|
|
11486
|
+
* @param {boolean} includeContainer add container list to check
|
|
11487
|
+
* @param {IterativeOptions} options
|
|
11488
|
+
* @returns {Array.<Element|CandidateScope>}
|
|
11489
|
+
*/
|
|
11490
|
+
var _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {
|
|
11491
|
+
var candidates = [];
|
|
11492
|
+
var elementsToCheck = Array.from(elements);
|
|
11493
|
+
while (elementsToCheck.length) {
|
|
11494
|
+
var element = elementsToCheck.shift();
|
|
11495
|
+
if (_isInert(element, false)) {
|
|
11496
|
+
// no need to look up since we're drilling down
|
|
11497
|
+
// anything inside this container will also be inert
|
|
11498
|
+
continue;
|
|
11499
|
+
}
|
|
11500
|
+
if (element.tagName === 'SLOT') {
|
|
11501
|
+
// add shadow dom slot scope (slot itself cannot be focusable)
|
|
11502
|
+
var assigned = element.assignedElements();
|
|
11503
|
+
var content = assigned.length ? assigned : element.children;
|
|
11504
|
+
var nestedCandidates = _getCandidatesIteratively(content, true, options);
|
|
11505
|
+
if (options.flatten) {
|
|
11506
|
+
candidates.push.apply(candidates, nestedCandidates);
|
|
11507
|
+
} else {
|
|
11508
|
+
candidates.push({
|
|
11509
|
+
scopeParent: element,
|
|
11510
|
+
candidates: nestedCandidates
|
|
11511
|
+
});
|
|
11512
|
+
}
|
|
11513
|
+
} else {
|
|
11514
|
+
// check candidate element
|
|
11515
|
+
var validCandidate = matches.call(element, candidateSelector);
|
|
11516
|
+
if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {
|
|
11517
|
+
candidates.push(element);
|
|
11518
|
+
}
|
|
11519
|
+
|
|
11520
|
+
// iterate over shadow content if possible
|
|
11521
|
+
var shadowRoot = element.shadowRoot ||
|
|
11522
|
+
// check for an undisclosed shadow
|
|
11523
|
+
typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
|
|
11524
|
+
|
|
11525
|
+
// no inert look up because we're already drilling down and checking for inertness
|
|
11526
|
+
// on the way down, so all containers to this root node should have already been
|
|
11527
|
+
// vetted as non-inert
|
|
11528
|
+
var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));
|
|
11529
|
+
if (shadowRoot && validShadowRoot) {
|
|
11530
|
+
// add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
|
|
11531
|
+
// shadow exists, so look at light dom children as fallback BUT create a scope for any
|
|
11532
|
+
// child candidates found because they're likely slotted elements (elements that are
|
|
11533
|
+
// children of the web component element (which has the shadow), in the light dom, but
|
|
11534
|
+
// slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,
|
|
11535
|
+
// _after_ we return from this recursive call
|
|
11536
|
+
var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);
|
|
11537
|
+
if (options.flatten) {
|
|
11538
|
+
candidates.push.apply(candidates, _nestedCandidates);
|
|
11539
|
+
} else {
|
|
11540
|
+
candidates.push({
|
|
11541
|
+
scopeParent: element,
|
|
11542
|
+
candidates: _nestedCandidates
|
|
11543
|
+
});
|
|
11544
|
+
}
|
|
11545
|
+
} else {
|
|
11546
|
+
// there's not shadow so just dig into the element's (light dom) children
|
|
11547
|
+
// __without__ giving the element special scope treatment
|
|
11548
|
+
elementsToCheck.unshift.apply(elementsToCheck, element.children);
|
|
11549
|
+
}
|
|
11550
|
+
}
|
|
11551
|
+
}
|
|
11552
|
+
return candidates;
|
|
11553
|
+
};
|
|
11554
|
+
|
|
11555
|
+
/**
|
|
11556
|
+
* @private
|
|
11557
|
+
* Determines if the node has an explicitly specified `tabindex` attribute.
|
|
11558
|
+
* @param {HTMLElement} node
|
|
11559
|
+
* @returns {boolean} True if so; false if not.
|
|
11560
|
+
*/
|
|
11561
|
+
var hasTabIndex = function hasTabIndex(node) {
|
|
11562
|
+
return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
|
|
11563
|
+
};
|
|
11564
|
+
|
|
11565
|
+
/**
|
|
11566
|
+
* Determine the tab index of a given node.
|
|
11567
|
+
* @param {HTMLElement} node
|
|
11568
|
+
* @returns {number} Tab order (negative, 0, or positive number).
|
|
11569
|
+
* @throws {Error} If `node` is falsy.
|
|
11570
|
+
*/
|
|
11571
|
+
var getTabIndex = function getTabIndex(node) {
|
|
11572
|
+
if (!node) {
|
|
11573
|
+
throw new Error('No node provided');
|
|
11574
|
+
}
|
|
11575
|
+
if (node.tabIndex < 0) {
|
|
11576
|
+
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
11577
|
+
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
11578
|
+
// yet they are still part of the regular tab order; in FF, they get a default
|
|
11579
|
+
// `tabIndex` of 0; since Chrome still puts those elements in the regular tab
|
|
11580
|
+
// order, consider their tab index to be 0.
|
|
11581
|
+
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
11582
|
+
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
11583
|
+
if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
|
|
11584
|
+
return 0;
|
|
11585
|
+
}
|
|
11586
|
+
}
|
|
11587
|
+
return node.tabIndex;
|
|
11588
|
+
};
|
|
11589
|
+
|
|
11590
|
+
/**
|
|
11591
|
+
* Determine the tab index of a given node __for sort order purposes__.
|
|
11592
|
+
* @param {HTMLElement} node
|
|
11593
|
+
* @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,
|
|
11594
|
+
* has tabIndex -1, but needs to be sorted by document order in order for its content to be
|
|
11595
|
+
* inserted into the correct sort position.
|
|
11596
|
+
* @returns {number} Tab order (negative, 0, or positive number).
|
|
11597
|
+
*/
|
|
11598
|
+
var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
|
|
11599
|
+
var tabIndex = getTabIndex(node);
|
|
11600
|
+
if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
|
|
11601
|
+
return 0;
|
|
11602
|
+
}
|
|
11603
|
+
return tabIndex;
|
|
11604
|
+
};
|
|
11605
|
+
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
11606
|
+
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
11607
|
+
};
|
|
11608
|
+
var isInput = function isInput(node) {
|
|
11609
|
+
return node.tagName === 'INPUT';
|
|
11610
|
+
};
|
|
11611
|
+
var isHiddenInput = function isHiddenInput(node) {
|
|
11612
|
+
return isInput(node) && node.type === 'hidden';
|
|
11613
|
+
};
|
|
11614
|
+
var isDetailsWithSummary = function isDetailsWithSummary(node) {
|
|
11615
|
+
var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {
|
|
11616
|
+
return child.tagName === 'SUMMARY';
|
|
11617
|
+
});
|
|
11618
|
+
return r;
|
|
11619
|
+
};
|
|
11620
|
+
var getCheckedRadio = function getCheckedRadio(nodes, form) {
|
|
11621
|
+
for (var i = 0; i < nodes.length; i++) {
|
|
11622
|
+
if (nodes[i].checked && nodes[i].form === form) {
|
|
11623
|
+
return nodes[i];
|
|
11624
|
+
}
|
|
11625
|
+
}
|
|
11626
|
+
};
|
|
11627
|
+
var isTabbableRadio = function isTabbableRadio(node) {
|
|
11628
|
+
if (!node.name) {
|
|
11629
|
+
return true;
|
|
11630
|
+
}
|
|
11631
|
+
var radioScope = node.form || getRootNode(node);
|
|
11632
|
+
var queryRadios = function queryRadios(name) {
|
|
11633
|
+
return radioScope.querySelectorAll('input[type="radio"][name="' + name + '"]');
|
|
11634
|
+
};
|
|
11635
|
+
var radioSet;
|
|
11636
|
+
if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {
|
|
11637
|
+
radioSet = queryRadios(window.CSS.escape(node.name));
|
|
11638
|
+
} else {
|
|
11639
|
+
try {
|
|
11640
|
+
radioSet = queryRadios(node.name);
|
|
11641
|
+
} catch (err) {
|
|
11642
|
+
// eslint-disable-next-line no-console
|
|
11643
|
+
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);
|
|
11644
|
+
return false;
|
|
11645
|
+
}
|
|
11646
|
+
}
|
|
11647
|
+
var checked = getCheckedRadio(radioSet, node.form);
|
|
11648
|
+
return !checked || checked === node;
|
|
11649
|
+
};
|
|
11650
|
+
var isRadio = function isRadio(node) {
|
|
11651
|
+
return isInput(node) && node.type === 'radio';
|
|
11652
|
+
};
|
|
11653
|
+
var isNonTabbableRadio = function isNonTabbableRadio(node) {
|
|
11654
|
+
return isRadio(node) && !isTabbableRadio(node);
|
|
11655
|
+
};
|
|
11656
|
+
|
|
11657
|
+
// determines if a node is ultimately attached to the window's document
|
|
11658
|
+
var isNodeAttached = function isNodeAttached(node) {
|
|
11659
|
+
var _nodeRoot;
|
|
11660
|
+
// The root node is the shadow root if the node is in a shadow DOM; some document otherwise
|
|
11661
|
+
// (but NOT _the_ document; see second 'If' comment below for more).
|
|
11662
|
+
// If rootNode is shadow root, it'll have a host, which is the element to which the shadow
|
|
11663
|
+
// is attached, and the one we need to check if it's in the document or not (because the
|
|
11664
|
+
// shadow, and all nodes it contains, is never considered in the document since shadows
|
|
11665
|
+
// behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,
|
|
11666
|
+
// is hidden, or is not in the document itself but is detached, it will affect the shadow's
|
|
11667
|
+
// visibility, including all the nodes it contains). The host could be any normal node,
|
|
11668
|
+
// or a custom element (i.e. web component). Either way, that's the one that is considered
|
|
11669
|
+
// part of the document, not the shadow root, nor any of its children (i.e. the node being
|
|
11670
|
+
// tested).
|
|
11671
|
+
// To further complicate things, we have to look all the way up until we find a shadow HOST
|
|
11672
|
+
// that is attached (or find none) because the node might be in nested shadows...
|
|
11673
|
+
// If rootNode is not a shadow root, it won't have a host, and so rootNode should be the
|
|
11674
|
+
// document (per the docs) and while it's a Document-type object, that document does not
|
|
11675
|
+
// appear to be the same as the node's `ownerDocument` for some reason, so it's safer
|
|
11676
|
+
// to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,
|
|
11677
|
+
// using `rootNode.contains(node)` will _always_ be true we'll get false-positives when
|
|
11678
|
+
// node is actually detached.
|
|
11679
|
+
// NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible
|
|
11680
|
+
// if a tabbable/focusable node was quickly added to the DOM, focused, and then removed
|
|
11681
|
+
// from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then
|
|
11682
|
+
// `ownerDocument` will be `null`, hence the optional chaining on it.
|
|
11683
|
+
var nodeRoot = node && getRootNode(node);
|
|
11684
|
+
var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;
|
|
11685
|
+
|
|
11686
|
+
// in some cases, a detached node will return itself as the root instead of a document or
|
|
11687
|
+
// shadow root object, in which case, we shouldn't try to look further up the host chain
|
|
11688
|
+
var attached = false;
|
|
11689
|
+
if (nodeRoot && nodeRoot !== node) {
|
|
11690
|
+
var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;
|
|
11691
|
+
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));
|
|
11692
|
+
while (!attached && nodeRootHost) {
|
|
11693
|
+
var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;
|
|
11694
|
+
// since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,
|
|
11695
|
+
// which means we need to get the host's host and check if that parent host is contained
|
|
11696
|
+
// in (i.e. attached to) the document
|
|
11697
|
+
nodeRoot = getRootNode(nodeRootHost);
|
|
11698
|
+
nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;
|
|
11699
|
+
attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));
|
|
11700
|
+
}
|
|
11701
|
+
}
|
|
11702
|
+
return attached;
|
|
11703
|
+
};
|
|
11704
|
+
var isZeroArea = function isZeroArea(node) {
|
|
11705
|
+
var _node$getBoundingClie = node.getBoundingClientRect(),
|
|
11706
|
+
width = _node$getBoundingClie.width,
|
|
11707
|
+
height = _node$getBoundingClie.height;
|
|
11708
|
+
return width === 0 && height === 0;
|
|
11709
|
+
};
|
|
11710
|
+
var isHidden = function isHidden(node, _ref) {
|
|
11711
|
+
var displayCheck = _ref.displayCheck,
|
|
11712
|
+
getShadowRoot = _ref.getShadowRoot;
|
|
11713
|
+
if (displayCheck === 'full-native') {
|
|
11714
|
+
if ('checkVisibility' in node) {
|
|
11715
|
+
// Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4
|
|
11716
|
+
// @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility
|
|
11717
|
+
var visible = node.checkVisibility({
|
|
11718
|
+
// Checking opacity might be desirable for some use cases, but natively,
|
|
11719
|
+
// opacity zero elements _are_ focusable and tabbable.
|
|
11720
|
+
checkOpacity: false,
|
|
11721
|
+
opacityProperty: false,
|
|
11722
|
+
contentVisibilityAuto: true,
|
|
11723
|
+
visibilityProperty: true,
|
|
11724
|
+
// This is an alias for `visibilityProperty`. Contemporary browsers
|
|
11725
|
+
// support both. However, this alias has wider browser support (Chrome
|
|
11726
|
+
// >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so
|
|
11727
|
+
// we include it anyway.
|
|
11728
|
+
checkVisibilityCSS: true
|
|
11729
|
+
});
|
|
11730
|
+
return !visible;
|
|
11731
|
+
}
|
|
11732
|
+
// Fall through to manual visibility checks
|
|
11733
|
+
}
|
|
11734
|
+
|
|
11735
|
+
// NOTE: visibility will be `undefined` if node is detached from the document
|
|
11736
|
+
// (see notes about this further down), which means we will consider it visible
|
|
11737
|
+
// (this is legacy behavior from a very long way back)
|
|
11738
|
+
// NOTE: we check this regardless of `displayCheck="none"` because this is a
|
|
11739
|
+
// _visibility_ check, not a _display_ check
|
|
11740
|
+
if (getComputedStyle(node).visibility === 'hidden') {
|
|
11741
|
+
return true;
|
|
11742
|
+
}
|
|
11743
|
+
var isDirectSummary = matches.call(node, 'details>summary:first-of-type');
|
|
11744
|
+
var nodeUnderDetails = isDirectSummary ? node.parentElement : node;
|
|
11745
|
+
if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {
|
|
11746
|
+
return true;
|
|
11747
|
+
}
|
|
11748
|
+
if (!displayCheck || displayCheck === 'full' ||
|
|
11749
|
+
// full-native can run this branch when it falls through in case
|
|
11750
|
+
// Element#checkVisibility is unsupported
|
|
11751
|
+
displayCheck === 'full-native' || displayCheck === 'legacy-full') {
|
|
11752
|
+
if (typeof getShadowRoot === 'function') {
|
|
11753
|
+
// figure out if we should consider the node to be in an undisclosed shadow and use the
|
|
11754
|
+
// 'non-zero-area' fallback
|
|
11755
|
+
var originalNode = node;
|
|
11756
|
+
while (node) {
|
|
11757
|
+
var parentElement = node.parentElement;
|
|
11758
|
+
var rootNode = getRootNode(node);
|
|
11759
|
+
if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow
|
|
11760
|
+
) {
|
|
11761
|
+
// node has an undisclosed shadow which means we can only treat it as a black box, so we
|
|
11762
|
+
// fall back to a non-zero-area test
|
|
11763
|
+
return isZeroArea(node);
|
|
11764
|
+
} else if (node.assignedSlot) {
|
|
11765
|
+
// iterate up slot
|
|
11766
|
+
node = node.assignedSlot;
|
|
11767
|
+
} else if (!parentElement && rootNode !== node.ownerDocument) {
|
|
11768
|
+
// cross shadow boundary
|
|
11769
|
+
node = rootNode.host;
|
|
11770
|
+
} else {
|
|
11771
|
+
// iterate up normal dom
|
|
11772
|
+
node = parentElement;
|
|
11773
|
+
}
|
|
11774
|
+
}
|
|
11775
|
+
node = originalNode;
|
|
11776
|
+
}
|
|
11777
|
+
// else, `getShadowRoot` might be true, but all that does is enable shadow DOM support
|
|
11778
|
+
// (i.e. it does not also presume that all nodes might have undisclosed shadows); or
|
|
11779
|
+
// it might be a falsy value, which means shadow DOM support is disabled
|
|
11780
|
+
|
|
11781
|
+
// Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)
|
|
11782
|
+
// now we can just test to see if it would normally be visible or not, provided it's
|
|
11783
|
+
// attached to the main document.
|
|
11784
|
+
// NOTE: We must consider case where node is inside a shadow DOM and given directly to
|
|
11785
|
+
// `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.
|
|
11786
|
+
|
|
11787
|
+
if (isNodeAttached(node)) {
|
|
11788
|
+
// this works wherever the node is: if there's at least one client rect, it's
|
|
11789
|
+
// somehow displayed; it also covers the CSS 'display: contents' case where the
|
|
11790
|
+
// node itself is hidden in place of its contents; and there's no need to search
|
|
11791
|
+
// up the hierarchy either
|
|
11792
|
+
return !node.getClientRects().length;
|
|
11793
|
+
}
|
|
11794
|
+
|
|
11795
|
+
// Else, the node isn't attached to the document, which means the `getClientRects()`
|
|
11796
|
+
// API will __always__ return zero rects (this can happen, for example, if React
|
|
11797
|
+
// is used to render nodes onto a detached tree, as confirmed in this thread:
|
|
11798
|
+
// https://github.com/facebook/react/issues/9117#issuecomment-284228870)
|
|
11799
|
+
//
|
|
11800
|
+
// It also means that even window.getComputedStyle(node).display will return `undefined`
|
|
11801
|
+
// because styles are only computed for nodes that are in the document.
|
|
11802
|
+
//
|
|
11803
|
+
// NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable
|
|
11804
|
+
// somehow. Though it was never stated officially, anyone who has ever used tabbable
|
|
11805
|
+
// APIs on nodes in detached containers has actually implicitly used tabbable in what
|
|
11806
|
+
// was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck="none"` mode -- essentially
|
|
11807
|
+
// considering __everything__ to be visible because of the innability to determine styles.
|
|
11808
|
+
//
|
|
11809
|
+
// v6.0.0: As of this major release, the default 'full' option __no longer treats detached
|
|
11810
|
+
// nodes as visible with the 'none' fallback.__
|
|
11811
|
+
if (displayCheck !== 'legacy-full') {
|
|
11812
|
+
return true; // hidden
|
|
11813
|
+
}
|
|
11814
|
+
// else, fallback to 'none' mode and consider the node visible
|
|
11815
|
+
} else if (displayCheck === 'non-zero-area') {
|
|
11816
|
+
// NOTE: Even though this tests that the node's client rect is non-zero to determine
|
|
11817
|
+
// whether it's displayed, and that a detached node will __always__ have a zero-area
|
|
11818
|
+
// client rect, we don't special-case for whether the node is attached or not. In
|
|
11819
|
+
// this mode, we do want to consider nodes that have a zero area to be hidden at all
|
|
11820
|
+
// times, and that includes attached or not.
|
|
11821
|
+
return isZeroArea(node);
|
|
11822
|
+
}
|
|
11823
|
+
|
|
11824
|
+
// visible, as far as we can tell, or per current `displayCheck=none` mode, we assume
|
|
11825
|
+
// it's visible
|
|
11826
|
+
return false;
|
|
11827
|
+
};
|
|
11828
|
+
|
|
11829
|
+
// form fields (nested) inside a disabled fieldset are not focusable/tabbable
|
|
11830
|
+
// unless they are in the _first_ <legend> element of the top-most disabled
|
|
11831
|
+
// fieldset
|
|
11832
|
+
var isDisabledFromFieldset = function isDisabledFromFieldset(node) {
|
|
11833
|
+
if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {
|
|
11834
|
+
var parentNode = node.parentElement;
|
|
11835
|
+
// check if `node` is contained in a disabled <fieldset>
|
|
11836
|
+
while (parentNode) {
|
|
11837
|
+
if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {
|
|
11838
|
+
// look for the first <legend> among the children of the disabled <fieldset>
|
|
11839
|
+
for (var i = 0; i < parentNode.children.length; i++) {
|
|
11840
|
+
var child = parentNode.children.item(i);
|
|
11841
|
+
// when the first <legend> (in document order) is found
|
|
11842
|
+
if (child.tagName === 'LEGEND') {
|
|
11843
|
+
// if its parent <fieldset> is not nested in another disabled <fieldset>,
|
|
11844
|
+
// return whether `node` is a descendant of its first <legend>
|
|
11845
|
+
return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);
|
|
11846
|
+
}
|
|
11847
|
+
}
|
|
11848
|
+
// the disabled <fieldset> containing `node` has no <legend>
|
|
11849
|
+
return true;
|
|
11850
|
+
}
|
|
11851
|
+
parentNode = parentNode.parentElement;
|
|
11852
|
+
}
|
|
11853
|
+
}
|
|
11854
|
+
|
|
11855
|
+
// else, node's tabbable/focusable state should not be affected by a fieldset's
|
|
11856
|
+
// enabled/disabled state
|
|
11857
|
+
return false;
|
|
11858
|
+
};
|
|
11859
|
+
var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {
|
|
11860
|
+
if (node.disabled ||
|
|
11861
|
+
// we must do an inert look up to filter out any elements inside an inert ancestor
|
|
11862
|
+
// because we're limited in the type of selectors we can use in JSDom (see related
|
|
11863
|
+
// note related to `candidateSelectors`)
|
|
11864
|
+
_isInert(node) || isHiddenInput(node) || isHidden(node, options) ||
|
|
11865
|
+
// For a details element with a summary, the summary element gets the focus
|
|
11866
|
+
isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {
|
|
11867
|
+
return false;
|
|
11868
|
+
}
|
|
11869
|
+
return true;
|
|
11870
|
+
};
|
|
11871
|
+
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
11872
|
+
if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
11873
|
+
return false;
|
|
11874
|
+
}
|
|
11875
|
+
return true;
|
|
11876
|
+
};
|
|
11877
|
+
var isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {
|
|
11878
|
+
var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
|
|
11879
|
+
if (isNaN(tabIndex) || tabIndex >= 0) {
|
|
11880
|
+
return true;
|
|
11881
|
+
}
|
|
11882
|
+
// If a custom element has an explicit negative tabindex,
|
|
11883
|
+
// browsers will not allow tab targeting said element's children.
|
|
11884
|
+
return false;
|
|
11885
|
+
};
|
|
11886
|
+
|
|
11887
|
+
/**
|
|
11888
|
+
* @param {Array.<Element|CandidateScope>} candidates
|
|
11889
|
+
* @returns Element[]
|
|
11890
|
+
*/
|
|
11891
|
+
var _sortByOrder = function sortByOrder(candidates) {
|
|
11892
|
+
var regularTabbables = [];
|
|
11893
|
+
var orderedTabbables = [];
|
|
11894
|
+
candidates.forEach(function (item, i) {
|
|
11895
|
+
var isScope = !!item.scopeParent;
|
|
11896
|
+
var element = isScope ? item.scopeParent : item;
|
|
11897
|
+
var candidateTabindex = getSortOrderTabIndex(element, isScope);
|
|
11898
|
+
var elements = isScope ? _sortByOrder(item.candidates) : element;
|
|
11899
|
+
if (candidateTabindex === 0) {
|
|
11900
|
+
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
|
11901
|
+
} else {
|
|
11902
|
+
orderedTabbables.push({
|
|
11903
|
+
documentOrder: i,
|
|
11904
|
+
tabIndex: candidateTabindex,
|
|
11905
|
+
item: item,
|
|
11906
|
+
isScope: isScope,
|
|
11907
|
+
content: elements
|
|
11908
|
+
});
|
|
11909
|
+
}
|
|
11910
|
+
});
|
|
11911
|
+
return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {
|
|
11912
|
+
sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);
|
|
11913
|
+
return acc;
|
|
11914
|
+
}, []).concat(regularTabbables);
|
|
11915
|
+
};
|
|
11916
|
+
var tabbable = function tabbable(container, options) {
|
|
11917
|
+
options = options || {};
|
|
11918
|
+
var candidates;
|
|
11919
|
+
if (options.getShadowRoot) {
|
|
11920
|
+
candidates = _getCandidatesIteratively([container], options.includeContainer, {
|
|
11921
|
+
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
11922
|
+
flatten: false,
|
|
11923
|
+
getShadowRoot: options.getShadowRoot,
|
|
11924
|
+
shadowRootFilter: isShadowRootTabbable
|
|
11925
|
+
});
|
|
11926
|
+
} else {
|
|
11927
|
+
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
11928
|
+
}
|
|
11929
|
+
return _sortByOrder(candidates);
|
|
11930
|
+
};
|
|
11931
|
+
var focusable = function focusable(container, options) {
|
|
11932
|
+
options = options || {};
|
|
11933
|
+
var candidates;
|
|
11934
|
+
if (options.getShadowRoot) {
|
|
11935
|
+
candidates = _getCandidatesIteratively([container], options.includeContainer, {
|
|
11936
|
+
filter: isNodeMatchingSelectorFocusable.bind(null, options),
|
|
11937
|
+
flatten: true,
|
|
11938
|
+
getShadowRoot: options.getShadowRoot
|
|
11939
|
+
});
|
|
11940
|
+
} else {
|
|
11941
|
+
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
|
|
11942
|
+
}
|
|
11943
|
+
return candidates;
|
|
11944
|
+
};
|
|
11945
|
+
var isTabbable = function isTabbable(node, options) {
|
|
11946
|
+
options = options || {};
|
|
11947
|
+
if (!node) {
|
|
11948
|
+
throw new Error('No node provided');
|
|
11949
|
+
}
|
|
11950
|
+
if (matches.call(node, candidateSelector) === false) {
|
|
11951
|
+
return false;
|
|
11952
|
+
}
|
|
11953
|
+
return isNodeMatchingSelectorTabbable(options, node);
|
|
11954
|
+
};
|
|
11955
|
+
var focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');
|
|
11956
|
+
var isFocusable = function isFocusable(node, options) {
|
|
11957
|
+
options = options || {};
|
|
11958
|
+
if (!node) {
|
|
11959
|
+
throw new Error('No node provided');
|
|
11960
|
+
}
|
|
11961
|
+
if (matches.call(node, focusableCandidateSelector) === false) {
|
|
11962
|
+
return false;
|
|
11963
|
+
}
|
|
11964
|
+
return isNodeMatchingSelectorFocusable(options, node);
|
|
11965
|
+
};
|
|
11966
|
+
|
|
11967
|
+
/*!
|
|
11968
|
+
* focus-trap 7.6.6
|
|
11969
|
+
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
11970
|
+
*/
|
|
11971
|
+
|
|
11972
|
+
function _arrayLikeToArray(r, a) {
|
|
11973
|
+
(null == a || a > r.length) && (a = r.length);
|
|
11974
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
11975
|
+
return n;
|
|
11976
|
+
}
|
|
11977
|
+
function _arrayWithoutHoles(r) {
|
|
11978
|
+
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
11979
|
+
}
|
|
11980
|
+
function _defineProperty(e, r, t) {
|
|
11981
|
+
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
11982
|
+
value: t,
|
|
11983
|
+
enumerable: true,
|
|
11984
|
+
configurable: true,
|
|
11985
|
+
writable: true
|
|
11986
|
+
}) : e[r] = t, e;
|
|
11987
|
+
}
|
|
11988
|
+
function _iterableToArray(r) {
|
|
11989
|
+
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
11990
|
+
}
|
|
11991
|
+
function _nonIterableSpread() {
|
|
11992
|
+
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
11993
|
+
}
|
|
11994
|
+
function ownKeys(e, r) {
|
|
11995
|
+
var t = Object.keys(e);
|
|
11996
|
+
if (Object.getOwnPropertySymbols) {
|
|
11997
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
11998
|
+
r && (o = o.filter(function (r) {
|
|
11999
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
12000
|
+
})), t.push.apply(t, o);
|
|
12001
|
+
}
|
|
12002
|
+
return t;
|
|
12003
|
+
}
|
|
12004
|
+
function _objectSpread2(e) {
|
|
12005
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
12006
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
12007
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
12008
|
+
_defineProperty(e, r, t[r]);
|
|
12009
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
12010
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
12011
|
+
});
|
|
12012
|
+
}
|
|
12013
|
+
return e;
|
|
12014
|
+
}
|
|
12015
|
+
function _toConsumableArray(r) {
|
|
12016
|
+
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
12017
|
+
}
|
|
12018
|
+
function _toPrimitive(t, r) {
|
|
12019
|
+
if ("object" != typeof t || !t) return t;
|
|
12020
|
+
var e = t[Symbol.toPrimitive];
|
|
12021
|
+
if (void 0 !== e) {
|
|
12022
|
+
var i = e.call(t, r);
|
|
12023
|
+
if ("object" != typeof i) return i;
|
|
12024
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
12025
|
+
}
|
|
12026
|
+
return ("string" === r ? String : Number)(t);
|
|
12027
|
+
}
|
|
12028
|
+
function _toPropertyKey(t) {
|
|
12029
|
+
var i = _toPrimitive(t, "string");
|
|
12030
|
+
return "symbol" == typeof i ? i : i + "";
|
|
12031
|
+
}
|
|
12032
|
+
function _unsupportedIterableToArray(r, a) {
|
|
12033
|
+
if (r) {
|
|
12034
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
12035
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
12036
|
+
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;
|
|
12037
|
+
}
|
|
12038
|
+
}
|
|
12039
|
+
|
|
12040
|
+
var activeFocusTraps = {
|
|
12041
|
+
activateTrap: function activateTrap(trapStack, trap) {
|
|
12042
|
+
if (trapStack.length > 0) {
|
|
12043
|
+
var activeTrap = trapStack[trapStack.length - 1];
|
|
12044
|
+
if (activeTrap !== trap) {
|
|
12045
|
+
activeTrap._setPausedState(true);
|
|
12046
|
+
}
|
|
12047
|
+
}
|
|
12048
|
+
var trapIndex = trapStack.indexOf(trap);
|
|
12049
|
+
if (trapIndex === -1) {
|
|
12050
|
+
trapStack.push(trap);
|
|
12051
|
+
} else {
|
|
12052
|
+
// move this existing trap to the front of the queue
|
|
12053
|
+
trapStack.splice(trapIndex, 1);
|
|
12054
|
+
trapStack.push(trap);
|
|
12055
|
+
}
|
|
12056
|
+
},
|
|
12057
|
+
deactivateTrap: function deactivateTrap(trapStack, trap) {
|
|
12058
|
+
var trapIndex = trapStack.indexOf(trap);
|
|
12059
|
+
if (trapIndex !== -1) {
|
|
12060
|
+
trapStack.splice(trapIndex, 1);
|
|
12061
|
+
}
|
|
12062
|
+
if (trapStack.length > 0 && !trapStack[trapStack.length - 1]._isManuallyPaused()) {
|
|
12063
|
+
trapStack[trapStack.length - 1]._setPausedState(false);
|
|
12064
|
+
}
|
|
12065
|
+
}
|
|
12066
|
+
};
|
|
12067
|
+
var isSelectableInput = function isSelectableInput(node) {
|
|
12068
|
+
return node.tagName && node.tagName.toLowerCase() === 'input' && typeof node.select === 'function';
|
|
12069
|
+
};
|
|
12070
|
+
var isEscapeEvent = function isEscapeEvent(e) {
|
|
12071
|
+
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;
|
|
12072
|
+
};
|
|
12073
|
+
var isTabEvent = function isTabEvent(e) {
|
|
12074
|
+
return (e === null || e === void 0 ? void 0 : e.key) === 'Tab' || (e === null || e === void 0 ? void 0 : e.keyCode) === 9;
|
|
12075
|
+
};
|
|
12076
|
+
|
|
12077
|
+
// checks for TAB by default
|
|
12078
|
+
var isKeyForward = function isKeyForward(e) {
|
|
12079
|
+
return isTabEvent(e) && !e.shiftKey;
|
|
12080
|
+
};
|
|
12081
|
+
|
|
12082
|
+
// checks for SHIFT+TAB by default
|
|
12083
|
+
var isKeyBackward = function isKeyBackward(e) {
|
|
12084
|
+
return isTabEvent(e) && e.shiftKey;
|
|
12085
|
+
};
|
|
12086
|
+
var delay = function delay(fn) {
|
|
12087
|
+
return setTimeout(fn, 0);
|
|
12088
|
+
};
|
|
12089
|
+
|
|
12090
|
+
/**
|
|
12091
|
+
* Get an option's value when it could be a plain value, or a handler that provides
|
|
12092
|
+
* the value.
|
|
12093
|
+
* @param {*} value Option's value to check.
|
|
12094
|
+
* @param {...*} [params] Any parameters to pass to the handler, if `value` is a function.
|
|
12095
|
+
* @returns {*} The `value`, or the handler's returned value.
|
|
12096
|
+
*/
|
|
12097
|
+
var valueOrHandler = function valueOrHandler(value) {
|
|
12098
|
+
for (var _len = arguments.length, params = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
12099
|
+
params[_key - 1] = arguments[_key];
|
|
12100
|
+
}
|
|
12101
|
+
return typeof value === 'function' ? value.apply(void 0, params) : value;
|
|
12102
|
+
};
|
|
12103
|
+
var getActualTarget = function getActualTarget(event) {
|
|
12104
|
+
// NOTE: If the trap is _inside_ a shadow DOM, event.target will always be the
|
|
12105
|
+
// shadow host. However, event.target.composedPath() will be an array of
|
|
12106
|
+
// nodes "clicked" from inner-most (the actual element inside the shadow) to
|
|
12107
|
+
// outer-most (the host HTML document). If we have access to composedPath(),
|
|
12108
|
+
// then use its first element; otherwise, fall back to event.target (and
|
|
12109
|
+
// this only works for an _open_ shadow DOM; otherwise,
|
|
12110
|
+
// composedPath()[0] === event.target always).
|
|
12111
|
+
return event.target.shadowRoot && typeof event.composedPath === 'function' ? event.composedPath()[0] : event.target;
|
|
12112
|
+
};
|
|
12113
|
+
|
|
12114
|
+
// NOTE: this must be _outside_ `createFocusTrap()` to make sure all traps in this
|
|
12115
|
+
// current instance use the same stack if `userOptions.trapStack` isn't specified
|
|
12116
|
+
var internalTrapStack = [];
|
|
12117
|
+
var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
12118
|
+
// SSR: a live trap shouldn't be created in this type of environment so this
|
|
12119
|
+
// should be safe code to execute if the `document` option isn't specified
|
|
12120
|
+
var doc = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.document) || document;
|
|
12121
|
+
var trapStack = (userOptions === null || userOptions === void 0 ? void 0 : userOptions.trapStack) || internalTrapStack;
|
|
12122
|
+
var config = _objectSpread2({
|
|
12123
|
+
returnFocusOnDeactivate: true,
|
|
12124
|
+
escapeDeactivates: true,
|
|
12125
|
+
delayInitialFocus: true,
|
|
12126
|
+
isKeyForward: isKeyForward,
|
|
12127
|
+
isKeyBackward: isKeyBackward
|
|
12128
|
+
}, userOptions);
|
|
12129
|
+
var state = {
|
|
12130
|
+
// containers given to createFocusTrap()
|
|
12131
|
+
// @type {Array<HTMLElement>}
|
|
12132
|
+
containers: [],
|
|
12133
|
+
// list of objects identifying tabbable nodes in `containers` in the trap
|
|
12134
|
+
// NOTE: it's possible that a group has no tabbable nodes if nodes get removed while the trap
|
|
12135
|
+
// is active, but the trap should never get to a state where there isn't at least one group
|
|
12136
|
+
// with at least one tabbable node in it (that would lead to an error condition that would
|
|
12137
|
+
// result in an error being thrown)
|
|
12138
|
+
// @type {Array<{
|
|
12139
|
+
// container: HTMLElement,
|
|
12140
|
+
// tabbableNodes: Array<HTMLElement>, // empty if none
|
|
12141
|
+
// focusableNodes: Array<HTMLElement>, // empty if none
|
|
12142
|
+
// posTabIndexesFound: boolean,
|
|
12143
|
+
// firstTabbableNode: HTMLElement|undefined,
|
|
12144
|
+
// lastTabbableNode: HTMLElement|undefined,
|
|
12145
|
+
// firstDomTabbableNode: HTMLElement|undefined,
|
|
12146
|
+
// lastDomTabbableNode: HTMLElement|undefined,
|
|
12147
|
+
// nextTabbableNode: (node: HTMLElement, forward: boolean) => HTMLElement|undefined
|
|
12148
|
+
// }>}
|
|
12149
|
+
containerGroups: [],
|
|
12150
|
+
// same order/length as `containers` list
|
|
12151
|
+
|
|
12152
|
+
// references to objects in `containerGroups`, but only those that actually have
|
|
12153
|
+
// tabbable nodes in them
|
|
12154
|
+
// NOTE: same order as `containers` and `containerGroups`, but __not necessarily__
|
|
12155
|
+
// the same length
|
|
12156
|
+
tabbableGroups: [],
|
|
12157
|
+
nodeFocusedBeforeActivation: null,
|
|
12158
|
+
mostRecentlyFocusedNode: null,
|
|
12159
|
+
active: false,
|
|
12160
|
+
paused: false,
|
|
12161
|
+
manuallyPaused: false,
|
|
12162
|
+
// timer ID for when delayInitialFocus is true and initial focus in this trap
|
|
12163
|
+
// has been delayed during activation
|
|
12164
|
+
delayInitialFocusTimer: undefined,
|
|
12165
|
+
// the most recent KeyboardEvent for the configured nav key (typically [SHIFT+]TAB), if any
|
|
12166
|
+
recentNavEvent: undefined
|
|
12167
|
+
};
|
|
12168
|
+
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
|
|
12169
|
+
|
|
12170
|
+
/**
|
|
12171
|
+
* Gets a configuration option value.
|
|
12172
|
+
* @param {Object|undefined} configOverrideOptions If true, and option is defined in this set,
|
|
12173
|
+
* value will be taken from this object. Otherwise, value will be taken from base configuration.
|
|
12174
|
+
* @param {string} optionName Name of the option whose value is sought.
|
|
12175
|
+
* @param {string|undefined} [configOptionName] Name of option to use __instead of__ `optionName`
|
|
12176
|
+
* IIF `configOverrideOptions` is not defined. Otherwise, `optionName` is used.
|
|
12177
|
+
*/
|
|
12178
|
+
var getOption = function getOption(configOverrideOptions, optionName, configOptionName) {
|
|
12179
|
+
return configOverrideOptions && configOverrideOptions[optionName] !== undefined ? configOverrideOptions[optionName] : config[configOptionName || optionName];
|
|
12180
|
+
};
|
|
12181
|
+
|
|
12182
|
+
/**
|
|
12183
|
+
* Finds the index of the container that contains the element.
|
|
12184
|
+
* @param {HTMLElement} element
|
|
12185
|
+
* @param {Event} [event] If available, and `element` isn't directly found in any container,
|
|
12186
|
+
* the event's composed path is used to see if includes any known trap containers in the
|
|
12187
|
+
* case where the element is inside a Shadow DOM.
|
|
12188
|
+
* @returns {number} Index of the container in either `state.containers` or
|
|
12189
|
+
* `state.containerGroups` (the order/length of these lists are the same); -1
|
|
12190
|
+
* if the element isn't found.
|
|
12191
|
+
*/
|
|
12192
|
+
var findContainerIndex = function findContainerIndex(element, event) {
|
|
12193
|
+
var composedPath = typeof (event === null || event === void 0 ? void 0 : event.composedPath) === 'function' ? event.composedPath() : undefined;
|
|
12194
|
+
// NOTE: search `containerGroups` because it's possible a group contains no tabbable
|
|
12195
|
+
// nodes, but still contains focusable nodes (e.g. if they all have `tabindex=-1`)
|
|
12196
|
+
// and we still need to find the element in there
|
|
12197
|
+
return state.containerGroups.findIndex(function (_ref) {
|
|
12198
|
+
var container = _ref.container,
|
|
12199
|
+
tabbableNodes = _ref.tabbableNodes;
|
|
12200
|
+
return container.contains(element) || (// fall back to explicit tabbable search which will take into consideration any
|
|
12201
|
+
// web components if the `tabbableOptions.getShadowRoot` option was used for
|
|
12202
|
+
// the trap, enabling shadow DOM support in tabbable (`Node.contains()` doesn't
|
|
12203
|
+
// look inside web components even if open)
|
|
12204
|
+
composedPath === null || composedPath === void 0 ? void 0 : composedPath.includes(container)) || tabbableNodes.find(function (node) {
|
|
12205
|
+
return node === element;
|
|
12206
|
+
});
|
|
12207
|
+
});
|
|
12208
|
+
};
|
|
12209
|
+
|
|
12210
|
+
/**
|
|
12211
|
+
* Gets the node for the given option, which is expected to be an option that
|
|
12212
|
+
* can be either a DOM node, a string that is a selector to get a node, `false`
|
|
12213
|
+
* (if a node is explicitly NOT given), or a function that returns any of these
|
|
12214
|
+
* values.
|
|
12215
|
+
* @param {string} optionName
|
|
12216
|
+
* @param {Object} options
|
|
12217
|
+
* @param {boolean} [options.hasFallback] True if the option could be a selector string
|
|
12218
|
+
* and the option allows for a fallback scenario in the case where the selector is
|
|
12219
|
+
* valid but does not match a node (i.e. the queried node doesn't exist in the DOM).
|
|
12220
|
+
* @param {Array} [options.params] Params to pass to the option if it's a function.
|
|
12221
|
+
* @returns {undefined | null | false | HTMLElement | SVGElement} Returns
|
|
12222
|
+
* `undefined` if the option is not specified; `null` if the option didn't resolve
|
|
12223
|
+
* to a node but `options.hasFallback=true`, `false` if the option resolved to `false`
|
|
12224
|
+
* (node explicitly not given); otherwise, the resolved DOM node.
|
|
12225
|
+
* @throws {Error} If the option is set, not `false`, and is not, or does not
|
|
12226
|
+
* resolve to a node, unless the option is a selector string and `options.hasFallback=true`.
|
|
12227
|
+
*/
|
|
12228
|
+
var getNodeForOption = function getNodeForOption(optionName) {
|
|
12229
|
+
var _ref2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
|
|
12230
|
+
_ref2$hasFallback = _ref2.hasFallback,
|
|
12231
|
+
hasFallback = _ref2$hasFallback === void 0 ? false : _ref2$hasFallback,
|
|
12232
|
+
_ref2$params = _ref2.params,
|
|
12233
|
+
params = _ref2$params === void 0 ? [] : _ref2$params;
|
|
12234
|
+
var optionValue = config[optionName];
|
|
12235
|
+
if (typeof optionValue === 'function') {
|
|
12236
|
+
optionValue = optionValue.apply(void 0, _toConsumableArray(params));
|
|
12237
|
+
}
|
|
12238
|
+
if (optionValue === true) {
|
|
12239
|
+
optionValue = undefined; // use default value
|
|
12240
|
+
}
|
|
12241
|
+
if (!optionValue) {
|
|
12242
|
+
if (optionValue === undefined || optionValue === false) {
|
|
12243
|
+
return optionValue;
|
|
12244
|
+
}
|
|
12245
|
+
// else, empty string (invalid), null (invalid), 0 (invalid)
|
|
12246
|
+
|
|
12247
|
+
throw new Error("`".concat(optionName, "` was specified but was not a node, or did not return a node"));
|
|
12248
|
+
}
|
|
12249
|
+
var node = optionValue; // could be HTMLElement, SVGElement, or non-empty string at this point
|
|
12250
|
+
|
|
12251
|
+
if (typeof optionValue === 'string') {
|
|
12252
|
+
try {
|
|
12253
|
+
node = doc.querySelector(optionValue); // resolve to node, or null if fails
|
|
12254
|
+
} catch (err) {
|
|
12255
|
+
throw new Error("`".concat(optionName, "` appears to be an invalid selector; error=\"").concat(err.message, "\""));
|
|
12256
|
+
}
|
|
12257
|
+
if (!node) {
|
|
12258
|
+
if (!hasFallback) {
|
|
12259
|
+
throw new Error("`".concat(optionName, "` as selector refers to no known node"));
|
|
12260
|
+
}
|
|
12261
|
+
// else, `node` MUST be `null` because that's what `Document.querySelector()` returns
|
|
12262
|
+
// if the selector is valid but doesn't match anything
|
|
12263
|
+
}
|
|
12264
|
+
}
|
|
12265
|
+
return node;
|
|
12266
|
+
};
|
|
12267
|
+
var getInitialFocusNode = function getInitialFocusNode() {
|
|
12268
|
+
var node = getNodeForOption('initialFocus', {
|
|
12269
|
+
hasFallback: true
|
|
12270
|
+
});
|
|
12271
|
+
|
|
12272
|
+
// false explicitly indicates we want no initialFocus at all
|
|
12273
|
+
if (node === false) {
|
|
12274
|
+
return false;
|
|
12275
|
+
}
|
|
12276
|
+
if (node === undefined || node && !isFocusable(node, config.tabbableOptions)) {
|
|
12277
|
+
// option not specified nor focusable: use fallback options
|
|
12278
|
+
if (findContainerIndex(doc.activeElement) >= 0) {
|
|
12279
|
+
node = doc.activeElement;
|
|
12280
|
+
} else {
|
|
12281
|
+
var firstTabbableGroup = state.tabbableGroups[0];
|
|
12282
|
+
var firstTabbableNode = firstTabbableGroup && firstTabbableGroup.firstTabbableNode;
|
|
12283
|
+
|
|
12284
|
+
// NOTE: `fallbackFocus` option function cannot return `false` (not supported)
|
|
12285
|
+
node = firstTabbableNode || getNodeForOption('fallbackFocus');
|
|
12286
|
+
}
|
|
12287
|
+
} else if (node === null) {
|
|
12288
|
+
// option is a VALID selector string that doesn't yield a node: use the `fallbackFocus`
|
|
12289
|
+
// option instead of the default behavior when the option isn't specified at all
|
|
12290
|
+
node = getNodeForOption('fallbackFocus');
|
|
12291
|
+
}
|
|
12292
|
+
if (!node) {
|
|
12293
|
+
throw new Error('Your focus-trap needs to have at least one focusable element');
|
|
12294
|
+
}
|
|
12295
|
+
return node;
|
|
12296
|
+
};
|
|
12297
|
+
var updateTabbableNodes = function updateTabbableNodes() {
|
|
12298
|
+
state.containerGroups = state.containers.map(function (container) {
|
|
12299
|
+
var tabbableNodes = tabbable(container, config.tabbableOptions);
|
|
12300
|
+
|
|
12301
|
+
// NOTE: if we have tabbable nodes, we must have focusable nodes; focusable nodes
|
|
12302
|
+
// are a superset of tabbable nodes since nodes with negative `tabindex` attributes
|
|
12303
|
+
// are focusable but not tabbable
|
|
12304
|
+
var focusableNodes = focusable(container, config.tabbableOptions);
|
|
12305
|
+
var firstTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[0] : undefined;
|
|
12306
|
+
var lastTabbableNode = tabbableNodes.length > 0 ? tabbableNodes[tabbableNodes.length - 1] : undefined;
|
|
12307
|
+
var firstDomTabbableNode = focusableNodes.find(function (node) {
|
|
12308
|
+
return isTabbable(node);
|
|
12309
|
+
});
|
|
12310
|
+
var lastDomTabbableNode = focusableNodes.slice().reverse().find(function (node) {
|
|
12311
|
+
return isTabbable(node);
|
|
12312
|
+
});
|
|
12313
|
+
var posTabIndexesFound = !!tabbableNodes.find(function (node) {
|
|
12314
|
+
return getTabIndex(node) > 0;
|
|
12315
|
+
});
|
|
12316
|
+
return {
|
|
12317
|
+
container: container,
|
|
12318
|
+
tabbableNodes: tabbableNodes,
|
|
12319
|
+
focusableNodes: focusableNodes,
|
|
12320
|
+
/** True if at least one node with positive `tabindex` was found in this container. */
|
|
12321
|
+
posTabIndexesFound: posTabIndexesFound,
|
|
12322
|
+
/** First tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
12323
|
+
firstTabbableNode: firstTabbableNode,
|
|
12324
|
+
/** Last tabbable node in container, __tabindex__ order; `undefined` if none. */
|
|
12325
|
+
lastTabbableNode: lastTabbableNode,
|
|
12326
|
+
// NOTE: DOM order is NOT NECESSARILY "document position" order, but figuring that out
|
|
12327
|
+
// would require more than just https://developer.mozilla.org/en-US/docs/Web/API/Node/compareDocumentPosition
|
|
12328
|
+
// because that API doesn't work with Shadow DOM as well as it should (@see
|
|
12329
|
+
// https://github.com/whatwg/dom/issues/320) and since this first/last is only needed, so far,
|
|
12330
|
+
// to address an edge case related to positive tabindex support, this seems like a much easier,
|
|
12331
|
+
// "close enough most of the time" alternative for positive tabindexes which should generally
|
|
12332
|
+
// be avoided anyway...
|
|
12333
|
+
/** First tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
12334
|
+
firstDomTabbableNode: firstDomTabbableNode,
|
|
12335
|
+
/** Last tabbable node in container, __DOM__ order; `undefined` if none. */
|
|
12336
|
+
lastDomTabbableNode: lastDomTabbableNode,
|
|
12337
|
+
/**
|
|
12338
|
+
* Finds the __tabbable__ node that follows the given node in the specified direction,
|
|
12339
|
+
* in this container, if any.
|
|
12340
|
+
* @param {HTMLElement} node
|
|
12341
|
+
* @param {boolean} [forward] True if going in forward tab order; false if going
|
|
12342
|
+
* in reverse.
|
|
12343
|
+
* @returns {HTMLElement|undefined} The next tabbable node, if any.
|
|
12344
|
+
*/
|
|
12345
|
+
nextTabbableNode: function nextTabbableNode(node) {
|
|
12346
|
+
var forward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
12347
|
+
var nodeIdx = tabbableNodes.indexOf(node);
|
|
12348
|
+
if (nodeIdx < 0) {
|
|
12349
|
+
// either not tabbable nor focusable, or was focused but not tabbable (negative tabindex):
|
|
12350
|
+
// since `node` should at least have been focusable, we assume that's the case and mimic
|
|
12351
|
+
// what browsers do, which is set focus to the next node in __document position order__,
|
|
12352
|
+
// regardless of positive tabindexes, if any -- and for reasons explained in the NOTE
|
|
12353
|
+
// above related to `firstDomTabbable` and `lastDomTabbable` properties, we fall back to
|
|
12354
|
+
// basic DOM order
|
|
12355
|
+
if (forward) {
|
|
12356
|
+
return focusableNodes.slice(focusableNodes.indexOf(node) + 1).find(function (el) {
|
|
12357
|
+
return isTabbable(el);
|
|
12358
|
+
});
|
|
12359
|
+
}
|
|
12360
|
+
return focusableNodes.slice(0, focusableNodes.indexOf(node)).reverse().find(function (el) {
|
|
12361
|
+
return isTabbable(el);
|
|
12362
|
+
});
|
|
12363
|
+
}
|
|
12364
|
+
return tabbableNodes[nodeIdx + (forward ? 1 : -1)];
|
|
12365
|
+
}
|
|
12366
|
+
};
|
|
12367
|
+
});
|
|
12368
|
+
state.tabbableGroups = state.containerGroups.filter(function (group) {
|
|
12369
|
+
return group.tabbableNodes.length > 0;
|
|
12370
|
+
});
|
|
12371
|
+
|
|
12372
|
+
// throw if no groups have tabbable nodes and we don't have a fallback focus node either
|
|
12373
|
+
if (state.tabbableGroups.length <= 0 && !getNodeForOption('fallbackFocus') // returning false not supported for this option
|
|
12374
|
+
) {
|
|
12375
|
+
throw new Error('Your focus-trap must have at least one container with at least one tabbable node in it at all times');
|
|
12376
|
+
}
|
|
12377
|
+
|
|
12378
|
+
// NOTE: Positive tabindexes are only properly supported in single-container traps because
|
|
12379
|
+
// doing it across multiple containers where tabindexes could be all over the place
|
|
12380
|
+
// would require Tabbable to support multiple containers, would require additional
|
|
12381
|
+
// specialized Shadow DOM support, and would require Tabbable's multi-container support
|
|
12382
|
+
// to look at those containers in document position order rather than user-provided
|
|
12383
|
+
// order (as they are treated in Focus-trap, for legacy reasons). See discussion on
|
|
12384
|
+
// https://github.com/focus-trap/focus-trap/issues/375 for more details.
|
|
12385
|
+
if (state.containerGroups.find(function (g) {
|
|
12386
|
+
return g.posTabIndexesFound;
|
|
12387
|
+
}) && state.containerGroups.length > 1) {
|
|
12388
|
+
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.");
|
|
12389
|
+
}
|
|
12390
|
+
};
|
|
12391
|
+
|
|
12392
|
+
/**
|
|
12393
|
+
* Gets the current activeElement. If it's a web-component and has open shadow-root
|
|
12394
|
+
* it will recursively search inside shadow roots for the "true" activeElement.
|
|
12395
|
+
*
|
|
12396
|
+
* @param {Document | ShadowRoot} el
|
|
12397
|
+
*
|
|
12398
|
+
* @returns {HTMLElement} The element that currently has the focus
|
|
12399
|
+
**/
|
|
12400
|
+
var _getActiveElement = function getActiveElement(el) {
|
|
12401
|
+
var activeElement = el.activeElement;
|
|
12402
|
+
if (!activeElement) {
|
|
12403
|
+
return;
|
|
12404
|
+
}
|
|
12405
|
+
if (activeElement.shadowRoot && activeElement.shadowRoot.activeElement !== null) {
|
|
12406
|
+
return _getActiveElement(activeElement.shadowRoot);
|
|
12407
|
+
}
|
|
12408
|
+
return activeElement;
|
|
12409
|
+
};
|
|
12410
|
+
var _tryFocus = function tryFocus(node) {
|
|
12411
|
+
if (node === false) {
|
|
12412
|
+
return;
|
|
12413
|
+
}
|
|
12414
|
+
if (node === _getActiveElement(document)) {
|
|
12415
|
+
return;
|
|
12416
|
+
}
|
|
12417
|
+
if (!node || !node.focus) {
|
|
12418
|
+
_tryFocus(getInitialFocusNode());
|
|
12419
|
+
return;
|
|
12420
|
+
}
|
|
12421
|
+
node.focus({
|
|
12422
|
+
preventScroll: !!config.preventScroll
|
|
12423
|
+
});
|
|
12424
|
+
// NOTE: focus() API does not trigger focusIn event so set MRU node manually
|
|
12425
|
+
state.mostRecentlyFocusedNode = node;
|
|
12426
|
+
if (isSelectableInput(node)) {
|
|
12427
|
+
node.select();
|
|
12428
|
+
}
|
|
12429
|
+
};
|
|
12430
|
+
var getReturnFocusNode = function getReturnFocusNode(previousActiveElement) {
|
|
12431
|
+
var node = getNodeForOption('setReturnFocus', {
|
|
12432
|
+
params: [previousActiveElement]
|
|
12433
|
+
});
|
|
12434
|
+
return node ? node : node === false ? false : previousActiveElement;
|
|
12435
|
+
};
|
|
12436
|
+
|
|
12437
|
+
/**
|
|
12438
|
+
* Finds the next node (in either direction) where focus should move according to a
|
|
12439
|
+
* keyboard focus-in event.
|
|
12440
|
+
* @param {Object} params
|
|
12441
|
+
* @param {Node} [params.target] Known target __from which__ to navigate, if any.
|
|
12442
|
+
* @param {KeyboardEvent|FocusEvent} [params.event] Event to use if `target` isn't known (event
|
|
12443
|
+
* will be used to determine the `target`). Ignored if `target` is specified.
|
|
12444
|
+
* @param {boolean} [params.isBackward] True if focus should move backward.
|
|
12445
|
+
* @returns {Node|undefined} The next node, or `undefined` if a next node couldn't be
|
|
12446
|
+
* determined given the current state of the trap.
|
|
12447
|
+
*/
|
|
12448
|
+
var findNextNavNode = function findNextNavNode(_ref3) {
|
|
12449
|
+
var target = _ref3.target,
|
|
12450
|
+
event = _ref3.event,
|
|
12451
|
+
_ref3$isBackward = _ref3.isBackward,
|
|
12452
|
+
isBackward = _ref3$isBackward === void 0 ? false : _ref3$isBackward;
|
|
12453
|
+
target = target || getActualTarget(event);
|
|
12454
|
+
updateTabbableNodes();
|
|
12455
|
+
var destinationNode = null;
|
|
12456
|
+
if (state.tabbableGroups.length > 0) {
|
|
12457
|
+
// make sure the target is actually contained in a group
|
|
12458
|
+
// NOTE: the target may also be the container itself if it's focusable
|
|
12459
|
+
// with tabIndex='-1' and was given initial focus
|
|
12460
|
+
var containerIndex = findContainerIndex(target, event);
|
|
12461
|
+
var containerGroup = containerIndex >= 0 ? state.containerGroups[containerIndex] : undefined;
|
|
12462
|
+
if (containerIndex < 0) {
|
|
12463
|
+
// target not found in any group: quite possible focus has escaped the trap,
|
|
12464
|
+
// so bring it back into...
|
|
12465
|
+
if (isBackward) {
|
|
12466
|
+
// ...the last node in the last group
|
|
12467
|
+
destinationNode = state.tabbableGroups[state.tabbableGroups.length - 1].lastTabbableNode;
|
|
12468
|
+
} else {
|
|
12469
|
+
// ...the first node in the first group
|
|
12470
|
+
destinationNode = state.tabbableGroups[0].firstTabbableNode;
|
|
12471
|
+
}
|
|
12472
|
+
} else if (isBackward) {
|
|
12473
|
+
// REVERSE
|
|
12474
|
+
|
|
12475
|
+
// is the target the first tabbable node in a group?
|
|
12476
|
+
var startOfGroupIndex = state.tabbableGroups.findIndex(function (_ref4) {
|
|
12477
|
+
var firstTabbableNode = _ref4.firstTabbableNode;
|
|
12478
|
+
return target === firstTabbableNode;
|
|
12479
|
+
});
|
|
12480
|
+
if (startOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target, false))) {
|
|
12481
|
+
// an exception case where the target is either the container itself, or
|
|
12482
|
+
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
12483
|
+
// and user clicked on it or node was programmatically given focus)
|
|
12484
|
+
// and is not followed by any other tabbable node, in which
|
|
12485
|
+
// case, we should handle shift+tab as if focus were on the container's
|
|
12486
|
+
// first tabbable node, and go to the last tabbable node of the LAST group
|
|
12487
|
+
startOfGroupIndex = containerIndex;
|
|
12488
|
+
}
|
|
12489
|
+
if (startOfGroupIndex >= 0) {
|
|
12490
|
+
// YES: then shift+tab should go to the last tabbable node in the
|
|
12491
|
+
// previous group (and wrap around to the last tabbable node of
|
|
12492
|
+
// the LAST group if it's the first tabbable node of the FIRST group)
|
|
12493
|
+
var destinationGroupIndex = startOfGroupIndex === 0 ? state.tabbableGroups.length - 1 : startOfGroupIndex - 1;
|
|
12494
|
+
var destinationGroup = state.tabbableGroups[destinationGroupIndex];
|
|
12495
|
+
destinationNode = getTabIndex(target) >= 0 ? destinationGroup.lastTabbableNode : destinationGroup.lastDomTabbableNode;
|
|
12496
|
+
} else if (!isTabEvent(event)) {
|
|
12497
|
+
// user must have customized the nav keys so we have to move focus manually _within_
|
|
12498
|
+
// the active group: do this based on the order determined by tabbable()
|
|
12499
|
+
destinationNode = containerGroup.nextTabbableNode(target, false);
|
|
12500
|
+
}
|
|
12501
|
+
} else {
|
|
12502
|
+
// FORWARD
|
|
12503
|
+
|
|
12504
|
+
// is the target the last tabbable node in a group?
|
|
12505
|
+
var lastOfGroupIndex = state.tabbableGroups.findIndex(function (_ref5) {
|
|
12506
|
+
var lastTabbableNode = _ref5.lastTabbableNode;
|
|
12507
|
+
return target === lastTabbableNode;
|
|
12508
|
+
});
|
|
12509
|
+
if (lastOfGroupIndex < 0 && (containerGroup.container === target || isFocusable(target, config.tabbableOptions) && !isTabbable(target, config.tabbableOptions) && !containerGroup.nextTabbableNode(target))) {
|
|
12510
|
+
// an exception case where the target is the container itself, or
|
|
12511
|
+
// a non-tabbable node that was given focus (i.e. tabindex is negative
|
|
12512
|
+
// and user clicked on it or node was programmatically given focus)
|
|
12513
|
+
// and is not followed by any other tabbable node, in which
|
|
12514
|
+
// case, we should handle tab as if focus were on the container's
|
|
12515
|
+
// last tabbable node, and go to the first tabbable node of the FIRST group
|
|
12516
|
+
lastOfGroupIndex = containerIndex;
|
|
12517
|
+
}
|
|
12518
|
+
if (lastOfGroupIndex >= 0) {
|
|
12519
|
+
// YES: then tab should go to the first tabbable node in the next
|
|
12520
|
+
// group (and wrap around to the first tabbable node of the FIRST
|
|
12521
|
+
// group if it's the last tabbable node of the LAST group)
|
|
12522
|
+
var _destinationGroupIndex = lastOfGroupIndex === state.tabbableGroups.length - 1 ? 0 : lastOfGroupIndex + 1;
|
|
12523
|
+
var _destinationGroup = state.tabbableGroups[_destinationGroupIndex];
|
|
12524
|
+
destinationNode = getTabIndex(target) >= 0 ? _destinationGroup.firstTabbableNode : _destinationGroup.firstDomTabbableNode;
|
|
12525
|
+
} else if (!isTabEvent(event)) {
|
|
12526
|
+
// user must have customized the nav keys so we have to move focus manually _within_
|
|
12527
|
+
// the active group: do this based on the order determined by tabbable()
|
|
12528
|
+
destinationNode = containerGroup.nextTabbableNode(target);
|
|
12529
|
+
}
|
|
12530
|
+
}
|
|
12531
|
+
} else {
|
|
12532
|
+
// no groups available
|
|
12533
|
+
// NOTE: the fallbackFocus option does not support returning false to opt-out
|
|
12534
|
+
destinationNode = getNodeForOption('fallbackFocus');
|
|
12535
|
+
}
|
|
12536
|
+
return destinationNode;
|
|
12537
|
+
};
|
|
12538
|
+
|
|
12539
|
+
// This needs to be done on mousedown and touchstart instead of click
|
|
12540
|
+
// so that it precedes the focus event.
|
|
12541
|
+
var checkPointerDown = function checkPointerDown(e) {
|
|
12542
|
+
var target = getActualTarget(e);
|
|
12543
|
+
if (findContainerIndex(target, e) >= 0) {
|
|
12544
|
+
// allow the click since it ocurred inside the trap
|
|
12545
|
+
return;
|
|
12546
|
+
}
|
|
12547
|
+
if (valueOrHandler(config.clickOutsideDeactivates, e)) {
|
|
12548
|
+
// immediately deactivate the trap
|
|
12549
|
+
trap.deactivate({
|
|
12550
|
+
// NOTE: by setting `returnFocus: false`, deactivate() will do nothing,
|
|
12551
|
+
// which will result in the outside click setting focus to the node
|
|
12552
|
+
// that was clicked (and if not focusable, to "nothing"); by setting
|
|
12553
|
+
// `returnFocus: true`, we'll attempt to re-focus the node originally-focused
|
|
12554
|
+
// on activation (or the configured `setReturnFocus` node), whether the
|
|
12555
|
+
// outside click was on a focusable node or not
|
|
12556
|
+
returnFocus: config.returnFocusOnDeactivate
|
|
12557
|
+
});
|
|
12558
|
+
return;
|
|
12559
|
+
}
|
|
12560
|
+
|
|
12561
|
+
// This is needed for mobile devices.
|
|
12562
|
+
// (If we'll only let `click` events through,
|
|
12563
|
+
// then on mobile they will be blocked anyways if `touchstart` is blocked.)
|
|
12564
|
+
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
12565
|
+
// allow the click outside the trap to take place
|
|
12566
|
+
return;
|
|
12567
|
+
}
|
|
12568
|
+
|
|
12569
|
+
// otherwise, prevent the click
|
|
12570
|
+
e.preventDefault();
|
|
12571
|
+
};
|
|
12572
|
+
|
|
12573
|
+
// In case focus escapes the trap for some strange reason, pull it back in.
|
|
12574
|
+
// NOTE: the focusIn event is NOT cancelable, so if focus escapes, it may cause unexpected
|
|
12575
|
+
// scrolling if the node that got focused was out of view; there's nothing we can do to
|
|
12576
|
+
// prevent that from happening by the time we discover that focus escaped
|
|
12577
|
+
var checkFocusIn = function checkFocusIn(event) {
|
|
12578
|
+
var target = getActualTarget(event);
|
|
12579
|
+
var targetContained = findContainerIndex(target, event) >= 0;
|
|
12580
|
+
|
|
12581
|
+
// In Firefox when you Tab out of an iframe the Document is briefly focused.
|
|
12582
|
+
if (targetContained || target instanceof Document) {
|
|
12583
|
+
if (targetContained) {
|
|
12584
|
+
state.mostRecentlyFocusedNode = target;
|
|
12585
|
+
}
|
|
12586
|
+
} else {
|
|
12587
|
+
// escaped! pull it back in to where it just left
|
|
12588
|
+
event.stopImmediatePropagation();
|
|
12589
|
+
|
|
12590
|
+
// focus will escape if the MRU node had a positive tab index and user tried to nav forward;
|
|
12591
|
+
// it will also escape if the MRU node had a 0 tab index and user tried to nav backward
|
|
12592
|
+
// toward a node with a positive tab index
|
|
12593
|
+
var nextNode; // next node to focus, if we find one
|
|
12594
|
+
var navAcrossContainers = true;
|
|
12595
|
+
if (state.mostRecentlyFocusedNode) {
|
|
12596
|
+
if (getTabIndex(state.mostRecentlyFocusedNode) > 0) {
|
|
12597
|
+
// MRU container index must be >=0 otherwise we wouldn't have it as an MRU node...
|
|
12598
|
+
var mruContainerIdx = findContainerIndex(state.mostRecentlyFocusedNode);
|
|
12599
|
+
// there MAY not be any tabbable nodes in the container if there are at least 2 containers
|
|
12600
|
+
// and the MRU node is focusable but not tabbable (focus-trap requires at least 1 container
|
|
12601
|
+
// with at least one tabbable node in order to function, so this could be the other container
|
|
12602
|
+
// with nothing tabbable in it)
|
|
12603
|
+
var tabbableNodes = state.containerGroups[mruContainerIdx].tabbableNodes;
|
|
12604
|
+
if (tabbableNodes.length > 0) {
|
|
12605
|
+
// MRU tab index MAY not be found if the MRU node is focusable but not tabbable
|
|
12606
|
+
var mruTabIdx = tabbableNodes.findIndex(function (node) {
|
|
12607
|
+
return node === state.mostRecentlyFocusedNode;
|
|
12608
|
+
});
|
|
12609
|
+
if (mruTabIdx >= 0) {
|
|
12610
|
+
if (config.isKeyForward(state.recentNavEvent)) {
|
|
12611
|
+
if (mruTabIdx + 1 < tabbableNodes.length) {
|
|
12612
|
+
nextNode = tabbableNodes[mruTabIdx + 1];
|
|
12613
|
+
navAcrossContainers = false;
|
|
12614
|
+
}
|
|
12615
|
+
// else, don't wrap within the container as focus should move to next/previous
|
|
12616
|
+
// container
|
|
12617
|
+
} else {
|
|
12618
|
+
if (mruTabIdx - 1 >= 0) {
|
|
12619
|
+
nextNode = tabbableNodes[mruTabIdx - 1];
|
|
12620
|
+
navAcrossContainers = false;
|
|
12621
|
+
}
|
|
12622
|
+
// else, don't wrap within the container as focus should move to next/previous
|
|
12623
|
+
// container
|
|
12624
|
+
}
|
|
12625
|
+
// else, don't find in container order without considering direction too
|
|
12626
|
+
}
|
|
12627
|
+
}
|
|
12628
|
+
// else, no tabbable nodes in that container (which means we must have at least one other
|
|
12629
|
+
// container with at least one tabbable node in it, otherwise focus-trap would've thrown
|
|
12630
|
+
// an error the last time updateTabbableNodes() was run): find next node among all known
|
|
12631
|
+
// containers
|
|
12632
|
+
} else {
|
|
12633
|
+
// check to see if there's at least one tabbable node with a positive tab index inside
|
|
12634
|
+
// the trap because focus seems to escape when navigating backward from a tabbable node
|
|
12635
|
+
// with tabindex=0 when this is the case (instead of wrapping to the tabbable node with
|
|
12636
|
+
// the greatest positive tab index like it should)
|
|
12637
|
+
if (!state.containerGroups.some(function (g) {
|
|
12638
|
+
return g.tabbableNodes.some(function (n) {
|
|
12639
|
+
return getTabIndex(n) > 0;
|
|
12640
|
+
});
|
|
12641
|
+
})) {
|
|
12642
|
+
// no containers with tabbable nodes with positive tab indexes which means the focus
|
|
12643
|
+
// escaped for some other reason and we should just execute the fallback to the
|
|
12644
|
+
// MRU node or initial focus node, if any
|
|
12645
|
+
navAcrossContainers = false;
|
|
12646
|
+
}
|
|
12647
|
+
}
|
|
12648
|
+
} else {
|
|
12649
|
+
// no MRU node means we're likely in some initial condition when the trap has just
|
|
12650
|
+
// been activated and initial focus hasn't been given yet, in which case we should
|
|
12651
|
+
// fall through to trying to focus the initial focus node, which is what should
|
|
12652
|
+
// happen below at this point in the logic
|
|
12653
|
+
navAcrossContainers = false;
|
|
12654
|
+
}
|
|
12655
|
+
if (navAcrossContainers) {
|
|
12656
|
+
nextNode = findNextNavNode({
|
|
12657
|
+
// move FROM the MRU node, not event-related node (which will be the node that is
|
|
12658
|
+
// outside the trap causing the focus escape we're trying to fix)
|
|
12659
|
+
target: state.mostRecentlyFocusedNode,
|
|
12660
|
+
isBackward: config.isKeyBackward(state.recentNavEvent)
|
|
12661
|
+
});
|
|
12662
|
+
}
|
|
12663
|
+
if (nextNode) {
|
|
12664
|
+
_tryFocus(nextNode);
|
|
12665
|
+
} else {
|
|
12666
|
+
_tryFocus(state.mostRecentlyFocusedNode || getInitialFocusNode());
|
|
12667
|
+
}
|
|
12668
|
+
}
|
|
12669
|
+
state.recentNavEvent = undefined; // clear
|
|
12670
|
+
};
|
|
12671
|
+
|
|
12672
|
+
// Hijack key nav events on the first and last focusable nodes of the trap,
|
|
12673
|
+
// in order to prevent focus from escaping. If it escapes for even a
|
|
12674
|
+
// moment it can end up scrolling the page and causing confusion so we
|
|
12675
|
+
// kind of need to capture the action at the keydown phase.
|
|
12676
|
+
var checkKeyNav = function checkKeyNav(event) {
|
|
12677
|
+
var isBackward = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
12678
|
+
state.recentNavEvent = event;
|
|
12679
|
+
var destinationNode = findNextNavNode({
|
|
12680
|
+
event: event,
|
|
12681
|
+
isBackward: isBackward
|
|
12682
|
+
});
|
|
12683
|
+
if (destinationNode) {
|
|
12684
|
+
if (isTabEvent(event)) {
|
|
12685
|
+
// since tab natively moves focus, we wouldn't have a destination node unless we
|
|
12686
|
+
// were on the edge of a container and had to move to the next/previous edge, in
|
|
12687
|
+
// which case we want to prevent default to keep the browser from moving focus
|
|
12688
|
+
// to where it normally would
|
|
12689
|
+
event.preventDefault();
|
|
12690
|
+
}
|
|
12691
|
+
_tryFocus(destinationNode);
|
|
12692
|
+
}
|
|
12693
|
+
// else, let the browser take care of [shift+]tab and move the focus
|
|
12694
|
+
};
|
|
12695
|
+
var checkTabKey = function checkTabKey(event) {
|
|
12696
|
+
if (config.isKeyForward(event) || config.isKeyBackward(event)) {
|
|
12697
|
+
checkKeyNav(event, config.isKeyBackward(event));
|
|
12698
|
+
}
|
|
12699
|
+
};
|
|
12700
|
+
|
|
12701
|
+
// we use a different event phase for the Escape key to allow canceling the event and checking for this in escapeDeactivates
|
|
12702
|
+
var checkEscapeKey = function checkEscapeKey(event) {
|
|
12703
|
+
if (isEscapeEvent(event) && valueOrHandler(config.escapeDeactivates, event) !== false) {
|
|
12704
|
+
event.preventDefault();
|
|
12705
|
+
trap.deactivate();
|
|
12706
|
+
}
|
|
12707
|
+
};
|
|
12708
|
+
var checkClick = function checkClick(e) {
|
|
12709
|
+
var target = getActualTarget(e);
|
|
12710
|
+
if (findContainerIndex(target, e) >= 0) {
|
|
12711
|
+
return;
|
|
12712
|
+
}
|
|
12713
|
+
if (valueOrHandler(config.clickOutsideDeactivates, e)) {
|
|
12714
|
+
return;
|
|
12715
|
+
}
|
|
12716
|
+
if (valueOrHandler(config.allowOutsideClick, e)) {
|
|
12717
|
+
return;
|
|
12718
|
+
}
|
|
12719
|
+
e.preventDefault();
|
|
12720
|
+
e.stopImmediatePropagation();
|
|
12721
|
+
};
|
|
12722
|
+
|
|
12723
|
+
//
|
|
12724
|
+
// EVENT LISTENERS
|
|
12725
|
+
//
|
|
12726
|
+
|
|
12727
|
+
var addListeners = function addListeners() {
|
|
12728
|
+
if (!state.active) {
|
|
12729
|
+
return;
|
|
12730
|
+
}
|
|
12731
|
+
|
|
12732
|
+
// There can be only one listening focus trap at a time
|
|
12733
|
+
activeFocusTraps.activateTrap(trapStack, trap);
|
|
12734
|
+
|
|
12735
|
+
// Delay ensures that the focused element doesn't capture the event
|
|
12736
|
+
// that caused the focus trap activation.
|
|
12737
|
+
state.delayInitialFocusTimer = config.delayInitialFocus ? delay(function () {
|
|
12738
|
+
_tryFocus(getInitialFocusNode());
|
|
12739
|
+
}) : _tryFocus(getInitialFocusNode());
|
|
12740
|
+
doc.addEventListener('focusin', checkFocusIn, true);
|
|
12741
|
+
doc.addEventListener('mousedown', checkPointerDown, {
|
|
12742
|
+
capture: true,
|
|
12743
|
+
passive: false
|
|
12744
|
+
});
|
|
12745
|
+
doc.addEventListener('touchstart', checkPointerDown, {
|
|
12746
|
+
capture: true,
|
|
12747
|
+
passive: false
|
|
12748
|
+
});
|
|
12749
|
+
doc.addEventListener('click', checkClick, {
|
|
12750
|
+
capture: true,
|
|
12751
|
+
passive: false
|
|
12752
|
+
});
|
|
12753
|
+
doc.addEventListener('keydown', checkTabKey, {
|
|
12754
|
+
capture: true,
|
|
12755
|
+
passive: false
|
|
12756
|
+
});
|
|
12757
|
+
doc.addEventListener('keydown', checkEscapeKey);
|
|
12758
|
+
return trap;
|
|
12759
|
+
};
|
|
12760
|
+
var removeListeners = function removeListeners() {
|
|
12761
|
+
if (!state.active) {
|
|
12762
|
+
return;
|
|
12763
|
+
}
|
|
12764
|
+
doc.removeEventListener('focusin', checkFocusIn, true);
|
|
12765
|
+
doc.removeEventListener('mousedown', checkPointerDown, true);
|
|
12766
|
+
doc.removeEventListener('touchstart', checkPointerDown, true);
|
|
12767
|
+
doc.removeEventListener('click', checkClick, true);
|
|
12768
|
+
doc.removeEventListener('keydown', checkTabKey, true);
|
|
12769
|
+
doc.removeEventListener('keydown', checkEscapeKey);
|
|
12770
|
+
return trap;
|
|
12771
|
+
};
|
|
12772
|
+
|
|
12773
|
+
//
|
|
12774
|
+
// MUTATION OBSERVER
|
|
12775
|
+
//
|
|
12776
|
+
|
|
12777
|
+
var checkDomRemoval = function checkDomRemoval(mutations) {
|
|
12778
|
+
var isFocusedNodeRemoved = mutations.some(function (mutation) {
|
|
12779
|
+
var removedNodes = Array.from(mutation.removedNodes);
|
|
12780
|
+
return removedNodes.some(function (node) {
|
|
12781
|
+
return node === state.mostRecentlyFocusedNode;
|
|
12782
|
+
});
|
|
12783
|
+
});
|
|
12784
|
+
|
|
12785
|
+
// If the currently focused is removed then browsers will move focus to the
|
|
12786
|
+
// <body> element. If this happens, try to move focus back into the trap.
|
|
12787
|
+
if (isFocusedNodeRemoved) {
|
|
12788
|
+
_tryFocus(getInitialFocusNode());
|
|
12789
|
+
}
|
|
12790
|
+
};
|
|
12791
|
+
|
|
12792
|
+
// Use MutationObserver - if supported - to detect if focused node is removed
|
|
12793
|
+
// from the DOM.
|
|
12794
|
+
var mutationObserver = typeof window !== 'undefined' && 'MutationObserver' in window ? new MutationObserver(checkDomRemoval) : undefined;
|
|
12795
|
+
var updateObservedNodes = function updateObservedNodes() {
|
|
12796
|
+
if (!mutationObserver) {
|
|
12797
|
+
return;
|
|
12798
|
+
}
|
|
12799
|
+
mutationObserver.disconnect();
|
|
12800
|
+
if (state.active && !state.paused) {
|
|
12801
|
+
state.containers.map(function (container) {
|
|
12802
|
+
mutationObserver.observe(container, {
|
|
12803
|
+
subtree: true,
|
|
12804
|
+
childList: true
|
|
12805
|
+
});
|
|
12806
|
+
});
|
|
12807
|
+
}
|
|
12808
|
+
};
|
|
12809
|
+
|
|
12810
|
+
//
|
|
12811
|
+
// TRAP DEFINITION
|
|
12812
|
+
//
|
|
12813
|
+
|
|
12814
|
+
trap = {
|
|
12815
|
+
get active() {
|
|
12816
|
+
return state.active;
|
|
12817
|
+
},
|
|
12818
|
+
get paused() {
|
|
12819
|
+
return state.paused;
|
|
12820
|
+
},
|
|
12821
|
+
activate: function activate(activateOptions) {
|
|
12822
|
+
if (state.active) {
|
|
12823
|
+
return this;
|
|
12824
|
+
}
|
|
12825
|
+
var onActivate = getOption(activateOptions, 'onActivate');
|
|
12826
|
+
var onPostActivate = getOption(activateOptions, 'onPostActivate');
|
|
12827
|
+
var checkCanFocusTrap = getOption(activateOptions, 'checkCanFocusTrap');
|
|
12828
|
+
if (!checkCanFocusTrap) {
|
|
12829
|
+
updateTabbableNodes();
|
|
12830
|
+
}
|
|
12831
|
+
state.active = true;
|
|
12832
|
+
state.paused = false;
|
|
12833
|
+
state.nodeFocusedBeforeActivation = _getActiveElement(doc);
|
|
12834
|
+
onActivate === null || onActivate === void 0 || onActivate();
|
|
12835
|
+
var finishActivation = function finishActivation() {
|
|
12836
|
+
if (checkCanFocusTrap) {
|
|
12837
|
+
updateTabbableNodes();
|
|
12838
|
+
}
|
|
12839
|
+
addListeners();
|
|
12840
|
+
updateObservedNodes();
|
|
12841
|
+
onPostActivate === null || onPostActivate === void 0 || onPostActivate();
|
|
12842
|
+
};
|
|
12843
|
+
if (checkCanFocusTrap) {
|
|
12844
|
+
checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
|
|
12845
|
+
return this;
|
|
12846
|
+
}
|
|
12847
|
+
finishActivation();
|
|
12848
|
+
return this;
|
|
12849
|
+
},
|
|
12850
|
+
deactivate: function deactivate(deactivateOptions) {
|
|
12851
|
+
if (!state.active) {
|
|
12852
|
+
return this;
|
|
12853
|
+
}
|
|
12854
|
+
var options = _objectSpread2({
|
|
12855
|
+
onDeactivate: config.onDeactivate,
|
|
12856
|
+
onPostDeactivate: config.onPostDeactivate,
|
|
12857
|
+
checkCanReturnFocus: config.checkCanReturnFocus
|
|
12858
|
+
}, deactivateOptions);
|
|
12859
|
+
clearTimeout(state.delayInitialFocusTimer); // noop if undefined
|
|
12860
|
+
state.delayInitialFocusTimer = undefined;
|
|
12861
|
+
removeListeners();
|
|
12862
|
+
state.active = false;
|
|
12863
|
+
state.paused = false;
|
|
12864
|
+
updateObservedNodes();
|
|
12865
|
+
activeFocusTraps.deactivateTrap(trapStack, trap);
|
|
12866
|
+
var onDeactivate = getOption(options, 'onDeactivate');
|
|
12867
|
+
var onPostDeactivate = getOption(options, 'onPostDeactivate');
|
|
12868
|
+
var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');
|
|
12869
|
+
var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');
|
|
12870
|
+
onDeactivate === null || onDeactivate === void 0 || onDeactivate();
|
|
12871
|
+
var finishDeactivation = function finishDeactivation() {
|
|
12872
|
+
delay(function () {
|
|
12873
|
+
if (returnFocus) {
|
|
12874
|
+
_tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
|
|
12875
|
+
}
|
|
12876
|
+
onPostDeactivate === null || onPostDeactivate === void 0 || onPostDeactivate();
|
|
12877
|
+
});
|
|
12878
|
+
};
|
|
12879
|
+
if (returnFocus && checkCanReturnFocus) {
|
|
12880
|
+
checkCanReturnFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation)).then(finishDeactivation, finishDeactivation);
|
|
12881
|
+
return this;
|
|
12882
|
+
}
|
|
12883
|
+
finishDeactivation();
|
|
12884
|
+
return this;
|
|
12885
|
+
},
|
|
12886
|
+
pause: function pause(pauseOptions) {
|
|
12887
|
+
if (!state.active) {
|
|
12888
|
+
return this;
|
|
12889
|
+
}
|
|
12890
|
+
state.manuallyPaused = true;
|
|
12891
|
+
return this._setPausedState(true, pauseOptions);
|
|
12892
|
+
},
|
|
12893
|
+
unpause: function unpause(unpauseOptions) {
|
|
12894
|
+
if (!state.active) {
|
|
12895
|
+
return this;
|
|
12896
|
+
}
|
|
12897
|
+
state.manuallyPaused = false;
|
|
12898
|
+
if (trapStack[trapStack.length - 1] !== this) {
|
|
12899
|
+
return this;
|
|
12900
|
+
}
|
|
12901
|
+
return this._setPausedState(false, unpauseOptions);
|
|
12902
|
+
},
|
|
12903
|
+
updateContainerElements: function updateContainerElements(containerElements) {
|
|
12904
|
+
var elementsAsArray = [].concat(containerElements).filter(Boolean);
|
|
12905
|
+
state.containers = elementsAsArray.map(function (element) {
|
|
12906
|
+
return typeof element === 'string' ? doc.querySelector(element) : element;
|
|
12907
|
+
});
|
|
12908
|
+
if (state.active) {
|
|
12909
|
+
updateTabbableNodes();
|
|
12910
|
+
}
|
|
12911
|
+
updateObservedNodes();
|
|
12912
|
+
return this;
|
|
12913
|
+
}
|
|
12914
|
+
};
|
|
12915
|
+
Object.defineProperties(trap, {
|
|
12916
|
+
_isManuallyPaused: {
|
|
12917
|
+
value: function value() {
|
|
12918
|
+
return state.manuallyPaused;
|
|
12919
|
+
}
|
|
12920
|
+
},
|
|
12921
|
+
_setPausedState: {
|
|
12922
|
+
value: function value(paused, options) {
|
|
12923
|
+
if (state.paused === paused) {
|
|
12924
|
+
return this;
|
|
12925
|
+
}
|
|
12926
|
+
state.paused = paused;
|
|
12927
|
+
if (paused) {
|
|
12928
|
+
var onPause = getOption(options, 'onPause');
|
|
12929
|
+
var onPostPause = getOption(options, 'onPostPause');
|
|
12930
|
+
onPause === null || onPause === void 0 || onPause();
|
|
12931
|
+
removeListeners();
|
|
12932
|
+
updateObservedNodes();
|
|
12933
|
+
onPostPause === null || onPostPause === void 0 || onPostPause();
|
|
12934
|
+
} else {
|
|
12935
|
+
var onUnpause = getOption(options, 'onUnpause');
|
|
12936
|
+
var onPostUnpause = getOption(options, 'onPostUnpause');
|
|
12937
|
+
onUnpause === null || onUnpause === void 0 || onUnpause();
|
|
12938
|
+
updateTabbableNodes();
|
|
12939
|
+
addListeners();
|
|
12940
|
+
updateObservedNodes();
|
|
12941
|
+
onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause();
|
|
12942
|
+
}
|
|
12943
|
+
return this;
|
|
12944
|
+
}
|
|
12945
|
+
}
|
|
12946
|
+
});
|
|
12947
|
+
|
|
12948
|
+
// initialize container elements
|
|
12949
|
+
trap.updateContainerElements(elements);
|
|
12950
|
+
return trap;
|
|
12951
|
+
};
|
|
12952
|
+
|
|
12953
|
+
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}";
|
|
11336
12954
|
var RoadDrawerStyle0 = drawerCss;
|
|
11337
12955
|
|
|
11338
12956
|
/**
|
|
@@ -11355,8 +12973,8 @@ class Drawer {
|
|
|
11355
12973
|
*/
|
|
11356
12974
|
this.isOpen = false;
|
|
11357
12975
|
/**
|
|
11358
|
-
|
|
11359
|
-
|
|
12976
|
+
* Set removePadding property to true to remove padding for drawer body
|
|
12977
|
+
*/
|
|
11360
12978
|
this.removePadding = false;
|
|
11361
12979
|
/**
|
|
11362
12980
|
* position of the drawer. e.g. left, right, bottom
|
|
@@ -11427,24 +13045,30 @@ class Drawer {
|
|
|
11427
13045
|
handleOpen(openValue) {
|
|
11428
13046
|
if (openValue === true) {
|
|
11429
13047
|
this.onOpen.emit();
|
|
11430
|
-
// Focus the first button element after the drawer is opened
|
|
11431
|
-
setTimeout(() =>
|
|
13048
|
+
// Focus the first button element after the drawer is opened then focus trap
|
|
13049
|
+
setTimeout(() => {
|
|
13050
|
+
var _a;
|
|
13051
|
+
this.focusFirstElement();
|
|
13052
|
+
(_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.activate();
|
|
13053
|
+
}, 50); // Add a slight delay to ensure the element is rendered
|
|
11432
13054
|
}
|
|
11433
13055
|
else {
|
|
11434
13056
|
this.el.addEventListener('transitionend', () => {
|
|
13057
|
+
var _a;
|
|
13058
|
+
(_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.deactivate();
|
|
11435
13059
|
this.onClose.emit();
|
|
11436
13060
|
this.el.shadowRoot && (this.el.shadowRoot.querySelector('.drawer-body').scrollTop = 0);
|
|
11437
13061
|
}, { once: true });
|
|
11438
13062
|
}
|
|
11439
13063
|
}
|
|
11440
13064
|
/**
|
|
11441
|
-
* Find and focus the first
|
|
13065
|
+
* Find and focus the first element in the drawer
|
|
11442
13066
|
*/
|
|
11443
|
-
|
|
13067
|
+
focusFirstElement() {
|
|
11444
13068
|
var _a;
|
|
11445
|
-
const
|
|
11446
|
-
if (
|
|
11447
|
-
|
|
13069
|
+
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];
|
|
13070
|
+
if (firstElement) {
|
|
13071
|
+
firstElement.focus();
|
|
11448
13072
|
}
|
|
11449
13073
|
}
|
|
11450
13074
|
/**
|
|
@@ -11459,9 +13083,18 @@ class Drawer {
|
|
|
11459
13083
|
* Call close function when clicking an element with data-dismiss="modal" attribute
|
|
11460
13084
|
*/
|
|
11461
13085
|
componentDidLoad() {
|
|
13086
|
+
var _a;
|
|
11462
13087
|
this.el.querySelectorAll('[data-dismiss="modal"]').forEach(item => {
|
|
11463
13088
|
item.addEventListener('click', () => this.close());
|
|
11464
13089
|
});
|
|
13090
|
+
const drawerContent = (_a = this.el.shadowRoot) === null || _a === void 0 ? void 0 : _a.querySelector(".drawer-dialog");
|
|
13091
|
+
this.focusTrap = createFocusTrap(drawerContent, {
|
|
13092
|
+
onActivate: () => drawerContent === null || drawerContent === void 0 ? void 0 : drawerContent.classList.add("focus-trapped"),
|
|
13093
|
+
onDeactivate: () => drawerContent === null || drawerContent === void 0 ? void 0 : drawerContent.classList.remove("focus-trapped"),
|
|
13094
|
+
tabbableOptions: {
|
|
13095
|
+
getShadowRoot: true,
|
|
13096
|
+
},
|
|
13097
|
+
});
|
|
11465
13098
|
}
|
|
11466
13099
|
render() {
|
|
11467
13100
|
var _a, _b, _c, _d;
|
|
@@ -11477,7 +13110,7 @@ class Drawer {
|
|
|
11477
13110
|
const drawerWidthValue = this.position === 'bottom' ? '100%' : `${this.drawerWidth}px`;
|
|
11478
13111
|
const footerSlotElement = (_d = this.el.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('slot[name="footer"]');
|
|
11479
13112
|
const hasFooterContent = footerSlotElement instanceof HTMLSlotElement && footerSlotElement.assignedNodes().length > 0;
|
|
11480
|
-
return (hAsync(Host, { key: '
|
|
13113
|
+
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" }))))));
|
|
11481
13114
|
}
|
|
11482
13115
|
get el() { return getElement(this); }
|
|
11483
13116
|
static get watchers() { return {
|
|
@@ -11500,6 +13133,7 @@ class Drawer {
|
|
|
11500
13133
|
"ariaLabelBack": [1, "aria-label-back"],
|
|
11501
13134
|
"ariaLabelClose": [1, "aria-label-close"],
|
|
11502
13135
|
"hasCloseIcon": [4, "has-close-icon"],
|
|
13136
|
+
"focusTrap": [32],
|
|
11503
13137
|
"open": [64],
|
|
11504
13138
|
"close": [64],
|
|
11505
13139
|
"back": [64]
|
|
@@ -11538,7 +13172,7 @@ class Dropdown$1 {
|
|
|
11538
13172
|
const positionClass = this.position ? `position-${this.position}` : '';
|
|
11539
13173
|
const dropdownClass = this.position ? `dropdown-${this.position}` : '';
|
|
11540
13174
|
const directionClass = this.direction ? `direction-${this.direction}` : '';
|
|
11541
|
-
return (hAsync("details", { key: '
|
|
13175
|
+
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" }))));
|
|
11542
13176
|
}
|
|
11543
13177
|
get el() { return getElement(this); }
|
|
11544
13178
|
static get style() { return RoadDropdownStyle0; }
|
|
@@ -11594,7 +13228,7 @@ class Dropdown {
|
|
|
11594
13228
|
this.isOpen = false;
|
|
11595
13229
|
}
|
|
11596
13230
|
render() {
|
|
11597
|
-
return (hAsync("details", { key: '
|
|
13231
|
+
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" }))));
|
|
11598
13232
|
}
|
|
11599
13233
|
get el() { return getElement(this); }
|
|
11600
13234
|
static get style() { return RoadProfilDropdownStyle0; }
|
|
@@ -11658,7 +13292,7 @@ class Duration {
|
|
|
11658
13292
|
this.isOpen = false;
|
|
11659
13293
|
}
|
|
11660
13294
|
render() {
|
|
11661
|
-
return (hAsync("road-drawer", { key: '
|
|
13295
|
+
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 })))))))));
|
|
11662
13296
|
}
|
|
11663
13297
|
get el() { return getElement(this); }
|
|
11664
13298
|
static get style() { return RoadDurationStyle0; }
|
|
@@ -11704,7 +13338,7 @@ class Flap {
|
|
|
11704
13338
|
}
|
|
11705
13339
|
render() {
|
|
11706
13340
|
const colorClass = this.filled ? `flap-${this.color}-filled` : `flap-${this.color}`;
|
|
11707
|
-
return (hAsync(Host, { key: '
|
|
13341
|
+
return (hAsync(Host, { key: 'acecc88123e94f737aef8b2d1026e8a9ce196a7d', class: `${colorClass} flap-${this.size}` }, hAsync("slot", { key: '6ce8eccf19a94ca9e7c8b75f9da8b7a8df00376b' })));
|
|
11708
13342
|
}
|
|
11709
13343
|
static get style() { return RoadFlapStyle0; }
|
|
11710
13344
|
static get cmpMeta() { return {
|
|
@@ -11750,7 +13384,7 @@ class GlobalNavigation {
|
|
|
11750
13384
|
this.selectedTabChanged();
|
|
11751
13385
|
}
|
|
11752
13386
|
render() {
|
|
11753
|
-
return (hAsync(Host, { key: '
|
|
13387
|
+
return (hAsync(Host, { key: 'bae96f32bd732721cbf401db21708a3bb601016b', role: "application" }, hAsync("slot", { key: '65e4a67511fd702e3daaa1ba206fbb8ff67df6da' })));
|
|
11754
13388
|
}
|
|
11755
13389
|
static get watchers() { return {
|
|
11756
13390
|
"selectedTab": ["selectedTabChanged"]
|
|
@@ -11898,7 +13532,7 @@ class GlobalNavigationV2 {
|
|
|
11898
13532
|
this.selectedTabChanged();
|
|
11899
13533
|
}
|
|
11900
13534
|
render() {
|
|
11901
|
-
return (hAsync(Host, { key: '
|
|
13535
|
+
return (hAsync(Host, { key: '1a523fcd448db62eb7a676184a22c7ae96e2d39e', role: "application" }, hAsync("slot", { key: '7c46cc17b02a4425161d99b54ef1bca9711f179a' })));
|
|
11902
13536
|
}
|
|
11903
13537
|
get host() { return getElement(this); }
|
|
11904
13538
|
static get watchers() { return {
|
|
@@ -11928,7 +13562,7 @@ class Grid {
|
|
|
11928
13562
|
registerInstance(this, hostRef);
|
|
11929
13563
|
}
|
|
11930
13564
|
render() {
|
|
11931
|
-
return (hAsync("slot", { key: '
|
|
13565
|
+
return (hAsync("slot", { key: '8f4662a444e12323e10cda6ecc7a2fe9b2199ff3' }));
|
|
11932
13566
|
}
|
|
11933
13567
|
static get style() { return RoadGridStyle0; }
|
|
11934
13568
|
static get cmpMeta() { return {
|
|
@@ -12031,7 +13665,7 @@ class Icon {
|
|
|
12031
13665
|
const rotateClass = this.rotate ? `icon-rotate-${this.rotate}` : '';
|
|
12032
13666
|
// Ajouter une classe "default" si aucune des valeurs n'est définie
|
|
12033
13667
|
const classes = [colorClass, sizeClass, rotateClass].filter(Boolean).join(' ');
|
|
12034
|
-
return (hAsync(Host, { key: '
|
|
13668
|
+
return (hAsync(Host, { key: '1da1702db901bcfb80638d9ae30a8c5cc4a2ac26', class: classes, "aria-hidden": "true" }, this.svgContent !== ''
|
|
12035
13669
|
? hAsync("div", { class: "icon-inner", innerHTML: this.svgContent })
|
|
12036
13670
|
: hAsync("div", { class: "icon-inner" })));
|
|
12037
13671
|
}
|
|
@@ -12153,7 +13787,7 @@ class Illustration {
|
|
|
12153
13787
|
render() {
|
|
12154
13788
|
const sizeClass = this.size !== undefined ? `illustration-${this.size}` : '';
|
|
12155
13789
|
const rotateClass = this.rotate !== undefined ? `illustration-rotate-${this.rotate}` : '';
|
|
12156
|
-
return (hAsync(Host, { key: '
|
|
13790
|
+
return (hAsync(Host, { key: '0c1d3f02b235f7f69dbdca9969fd3a637929e0bd', class: `${sizeClass} ${rotateClass}`, "aria-hidden": "true", role: "img" }, ((this.illustrationSvgContent !== '')
|
|
12157
13791
|
? hAsync("div", { class: "icon-inner", innerHTML: this.illustrationSvgContent })
|
|
12158
13792
|
: hAsync("div", { class: "icon-inner" }))));
|
|
12159
13793
|
}
|
|
@@ -12256,7 +13890,7 @@ class Img {
|
|
|
12256
13890
|
}
|
|
12257
13891
|
render() {
|
|
12258
13892
|
const placeholder = this.loadSrc !== undefined ? '' : 'placeholder';
|
|
12259
|
-
return (hAsync(Host, { key: '
|
|
13893
|
+
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" })));
|
|
12260
13894
|
}
|
|
12261
13895
|
get el() { return getElement(this); }
|
|
12262
13896
|
static get watchers() { return {
|
|
@@ -29706,11 +31340,11 @@ class Input {
|
|
|
29706
31340
|
const lessLabelClass = this.label !== '' ? '' : 'less-label';
|
|
29707
31341
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
29708
31342
|
const isValidClass = this.success == true ? 'is-valid' : '';
|
|
29709
|
-
return (hAsync(Host, { key: '
|
|
31343
|
+
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)
|
|
29710
31344
|
? // Si error est un tableau, on itère et génère un <p> pour chaque élément
|
|
29711
31345
|
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(), " ")))
|
|
29712
31346
|
: // Si error est une chaîne, on la divise avec split et génère un <p> pour chaque élément
|
|
29713
|
-
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: '
|
|
31347
|
+
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" })));
|
|
29714
31348
|
}
|
|
29715
31349
|
static get watchers() { return {
|
|
29716
31350
|
"debounce": ["debounceChanged"],
|
|
@@ -29823,7 +31457,7 @@ class InputGroup {
|
|
|
29823
31457
|
? `size-${this.el.querySelector('road-input').sizes}`
|
|
29824
31458
|
: '';
|
|
29825
31459
|
const disabledClass = this.disabled ? 'is-disabled' : '';
|
|
29826
|
-
return (hAsync("div", { key: '
|
|
31460
|
+
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" }))));
|
|
29827
31461
|
}
|
|
29828
31462
|
get el() { return getElement(this); }
|
|
29829
31463
|
static get watchers() { return {
|
|
@@ -29903,13 +31537,13 @@ class Item {
|
|
|
29903
31537
|
target,
|
|
29904
31538
|
};
|
|
29905
31539
|
const showDetail = detail !== undefined && detail;
|
|
29906
|
-
return (hAsync(Host, { key: '
|
|
31540
|
+
return (hAsync(Host, { key: '0aea3486ca34a04bfa7e0690181466e0f563ecdd', "aria-disabled": disabled ? 'true' : null, class: {
|
|
29907
31541
|
[`item-lines-${lines}`]: lines !== undefined,
|
|
29908
|
-
} }, hAsync(TagType, Object.assign({ key: '
|
|
31542
|
+
} }, hAsync(TagType, Object.assign({ key: 'a2b491a400eb88b4af1ac7a26a5a00e32fde08cb' }, attrs, { class: {
|
|
29909
31543
|
'item-native': true,
|
|
29910
31544
|
'item-active': this.active,
|
|
29911
31545
|
[`layout-${layout}`]: layout !== undefined,
|
|
29912
|
-
}, part: "native", disabled: disabled }), hAsync("slot", { key: '
|
|
31546
|
+
}, 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" })))));
|
|
29913
31547
|
}
|
|
29914
31548
|
get el() { return getElement(this); }
|
|
29915
31549
|
static get style() { return RoadItemStyle0; }
|
|
@@ -29950,7 +31584,7 @@ class Label {
|
|
|
29950
31584
|
registerInstance(this, hostRef);
|
|
29951
31585
|
}
|
|
29952
31586
|
render() {
|
|
29953
|
-
return (hAsync("slot", { key: '
|
|
31587
|
+
return (hAsync("slot", { key: 'f59ac081c472add0201c72c48c5146a231bf05fd' }));
|
|
29954
31588
|
}
|
|
29955
31589
|
static get style() { return RoadLabelStyle0; }
|
|
29956
31590
|
static get cmpMeta() { return {
|
|
@@ -29975,9 +31609,9 @@ class List {
|
|
|
29975
31609
|
}
|
|
29976
31610
|
render() {
|
|
29977
31611
|
const { lines } = this;
|
|
29978
|
-
return (hAsync(Host, { key: '
|
|
31612
|
+
return (hAsync(Host, { key: '2c2537547489eb97f46ccb6306d3d697773ab719', class: {
|
|
29979
31613
|
[`list-lines-${lines}`]: lines !== undefined,
|
|
29980
|
-
} }, hAsync("slot", { key: '
|
|
31614
|
+
} }, hAsync("slot", { key: 'f4449d3df668e2d77f83103bb2e87915ef101efc' })));
|
|
29981
31615
|
}
|
|
29982
31616
|
static get style() { return RoadListStyle0; }
|
|
29983
31617
|
static get cmpMeta() { return {
|
|
@@ -30062,7 +31696,7 @@ class Modal {
|
|
|
30062
31696
|
const modalIsOpenClass = this.isOpen ? 'modal-open' : '';
|
|
30063
31697
|
const inverseHeaderClass = this.hasInverseHeader ? 'modal-header-inverse' : '';
|
|
30064
31698
|
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" })) : '';
|
|
30065
|
-
return (hAsync(Host, { key: '
|
|
31699
|
+
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' }))))));
|
|
30066
31700
|
}
|
|
30067
31701
|
get el() { return getElement(this); }
|
|
30068
31702
|
static get style() { return RoadModalStyle0; }
|
|
@@ -30113,7 +31747,7 @@ class Navbar {
|
|
|
30113
31747
|
this.selectedTabChanged();
|
|
30114
31748
|
}
|
|
30115
31749
|
render() {
|
|
30116
|
-
return (hAsync(Host, { key: '
|
|
31750
|
+
return (hAsync(Host, { key: '61786009c0bb1357257674a72b0f3dbf3f5c38a8', role: "menubar" }, hAsync("slot", { key: '2f3cdbc13d1bf0d3535035bd2098ed20d048dee0' })));
|
|
30117
31751
|
}
|
|
30118
31752
|
static get watchers() { return {
|
|
30119
31753
|
"selectedTab": ["selectedTabChanged"]
|
|
@@ -30199,11 +31833,11 @@ class NavbarItem$1 {
|
|
|
30199
31833
|
rel,
|
|
30200
31834
|
target,
|
|
30201
31835
|
};
|
|
30202
|
-
return (hAsync(Host, { key: '
|
|
31836
|
+
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: {
|
|
30203
31837
|
'navbar-item': true,
|
|
30204
31838
|
'tab-selected': selected,
|
|
30205
31839
|
'tab-disabled': disabled,
|
|
30206
|
-
} }, hAsync("a", Object.assign({ key: '
|
|
31840
|
+
} }, 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' })))));
|
|
30207
31841
|
}
|
|
30208
31842
|
get el() { return getElement(this); }
|
|
30209
31843
|
static get watchers() { return {
|
|
@@ -30296,11 +31930,11 @@ class NavbarItem {
|
|
|
30296
31930
|
rel,
|
|
30297
31931
|
target,
|
|
30298
31932
|
};
|
|
30299
|
-
return (hAsync(Host, { key: '
|
|
31933
|
+
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: {
|
|
30300
31934
|
'navbar-item': true,
|
|
30301
31935
|
'tab-selected': selected,
|
|
30302
31936
|
'tab-disabled': disabled,
|
|
30303
|
-
} }, hAsync("a", Object.assign({ key: '
|
|
31937
|
+
} }, 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' })))));
|
|
30304
31938
|
}
|
|
30305
31939
|
get el() { return getElement(this); }
|
|
30306
31940
|
static get watchers() { return {
|
|
@@ -30359,7 +31993,7 @@ class NavbarV2 {
|
|
|
30359
31993
|
}
|
|
30360
31994
|
render() {
|
|
30361
31995
|
const compactClass = this.compact ? 'compact' : '';
|
|
30362
|
-
return (hAsync(Host, { key: '
|
|
31996
|
+
return (hAsync(Host, { key: '43aff9eafd66ec2fb7c45a4707c758b3b182f64b', role: "menubar", class: `${compactClass}` }, hAsync("slot", { key: '66b8748a5d4395bd03edff1b9490bdc0fe63f01a' })));
|
|
30363
31997
|
}
|
|
30364
31998
|
static get watchers() { return {
|
|
30365
31999
|
"selectedTab": ["selectedTabChanged"]
|
|
@@ -30482,10 +32116,10 @@ class PlateNumber {
|
|
|
30482
32116
|
render() {
|
|
30483
32117
|
const value = this.getValue();
|
|
30484
32118
|
const motorbikeClass = this.motorbike ? 'motorbike-plate' : '';
|
|
30485
|
-
return (hAsync("road-input-group", { key: '
|
|
32119
|
+
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
|
|
30486
32120
|
.filter(item => item.country === this.country)[0].letter))), this.motorbike
|
|
30487
32121
|
? (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 }))
|
|
30488
|
-
: (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: '
|
|
32122
|
+
: (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" }))));
|
|
30489
32123
|
}
|
|
30490
32124
|
static get watchers() { return {
|
|
30491
32125
|
"value": ["valueChanged"]
|
|
@@ -30553,7 +32187,7 @@ class ProgressBar {
|
|
|
30553
32187
|
const fullwidth = this.fullwidth ? 'progress-element-info-full-width' : 'progress-element-info';
|
|
30554
32188
|
const light = this.light ? 'progress progress-light' : 'progress';
|
|
30555
32189
|
const animation = this.animation ? 'animation' : '';
|
|
30556
|
-
return (hAsync(Host, { key: '
|
|
32190
|
+
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))));
|
|
30557
32191
|
}
|
|
30558
32192
|
static get style() { return RoadProgressStyle0; }
|
|
30559
32193
|
static get cmpMeta() { return {
|
|
@@ -30594,7 +32228,7 @@ class ProgressIndicatorVertical {
|
|
|
30594
32228
|
registerInstance(this, hostRef);
|
|
30595
32229
|
}
|
|
30596
32230
|
render() {
|
|
30597
|
-
return (hAsync(Host, { key: '
|
|
32231
|
+
return (hAsync(Host, { key: '8df70b09eb63e027b39c4843ae497cef5e39c2ed' }, hAsync("nav", { key: '0d6025a44bd845363096fc6e002a334263dac3c9' }, hAsync("ul", { key: '4d81713de26f798637118ee3af681eb6f668513f' }, hAsync("li", { key: 'bb4bf5dd01f940e3811ab5adf4a90d05ef4fab8c' }, hAsync("slot", { key: '18e8f5f3cddb2a2c6816127596d469a93ca2430c' }))))));
|
|
30598
32232
|
}
|
|
30599
32233
|
static get style() { return RoadProgressIndicatorVerticalStyle0; }
|
|
30600
32234
|
static get cmpMeta() { return {
|
|
@@ -30618,7 +32252,7 @@ class ProgressIndicatorVerticalItem {
|
|
|
30618
32252
|
registerInstance(this, hostRef);
|
|
30619
32253
|
}
|
|
30620
32254
|
render() {
|
|
30621
|
-
return (hAsync(Host, { key: '
|
|
32255
|
+
return (hAsync(Host, { key: '17ae276834ff832dcf77111aeeda48b8ca9dc72e' }, hAsync("slot", { key: '624e68ac134752cb835e1cfdba7aa1db8d1f5152' })));
|
|
30622
32256
|
}
|
|
30623
32257
|
static get style() { return RoadProgressIndicatorVerticalItemStyle0; }
|
|
30624
32258
|
static get cmpMeta() { return {
|
|
@@ -30647,7 +32281,7 @@ class ProgressTracker {
|
|
|
30647
32281
|
registerInstance(this, hostRef);
|
|
30648
32282
|
}
|
|
30649
32283
|
render() {
|
|
30650
|
-
return (hAsync(Host, { key: '
|
|
32284
|
+
return (hAsync(Host, { key: '558bbc6dc32d8f5e29cd9dd0e33ff210bc8e231f' }, hAsync("nav", { key: '386429b7b2670bd9e1cfde6eb895fcdb9fc26a66' }, hAsync("ul", { key: '67357a2d0f7777b39b390a6fc1f2609f7e504f0d' }, hAsync("li", { key: '6bd942a3d6c358f1988b58b16c65bc1f635c690f' }, hAsync("slot", { key: '47ab21f544caa20f3623d7a6b299a84cb17b2927' }))))));
|
|
30651
32285
|
}
|
|
30652
32286
|
static get style() { return RoadProgressTrackerStyle0; }
|
|
30653
32287
|
static get cmpMeta() { return {
|
|
@@ -30679,7 +32313,7 @@ class ProgressTrackerItem {
|
|
|
30679
32313
|
registerInstance(this, hostRef);
|
|
30680
32314
|
}
|
|
30681
32315
|
render() {
|
|
30682
|
-
return (hAsync(Host, { key: '
|
|
32316
|
+
return (hAsync(Host, { key: 'f0323f8e11d15162868f6679d958a7eb3c732c94' }, hAsync("slot", { key: 'f723c3ff78b34c68bbe3f675d93ff61a6eb24a27' })));
|
|
30683
32317
|
}
|
|
30684
32318
|
static get style() { return RoadProgressTrackerItemStyle0; }
|
|
30685
32319
|
static get cmpMeta() { return {
|
|
@@ -30772,7 +32406,7 @@ class Radio {
|
|
|
30772
32406
|
const inverseClass = this.inverse && 'form-radio-inverse';
|
|
30773
32407
|
const isInvalidClass = this.error ? 'is-invalid' : '';
|
|
30774
32408
|
const inlineClass = this.inline ? 'form-radio-inline' : '';
|
|
30775
|
-
return (hAsync(Host, { key: '
|
|
32409
|
+
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))));
|
|
30776
32410
|
}
|
|
30777
32411
|
get el() { return getElement(this); }
|
|
30778
32412
|
static get style() { return RoadRadioStyle0; }
|
|
@@ -30856,7 +32490,7 @@ class RadioCard {
|
|
|
30856
32490
|
const inlineClass = this.inline ? 'form-radio-inline' : '';
|
|
30857
32491
|
const selectedClass = this.isSelected || this.selected ? 'radio-card-selected' : '';
|
|
30858
32492
|
const disabledClass = this.disabled ? 'radio-card-disabled' : '';
|
|
30859
|
-
return (hAsync(Host, { key: '
|
|
32493
|
+
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' }))))));
|
|
30860
32494
|
}
|
|
30861
32495
|
get el() { return getElement(this); }
|
|
30862
32496
|
static get style() { return RoadRadioCardStyle0; }
|
|
@@ -30953,7 +32587,7 @@ class RadioGroup {
|
|
|
30953
32587
|
render() {
|
|
30954
32588
|
const labelId = `${this.radioGroupId}-label`;
|
|
30955
32589
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
30956
|
-
return (hAsync(Host, { key: '
|
|
32590
|
+
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)));
|
|
30957
32591
|
}
|
|
30958
32592
|
get el() { return getElement(this); }
|
|
30959
32593
|
static get watchers() { return {
|
|
@@ -31083,14 +32717,14 @@ class Range {
|
|
|
31083
32717
|
render() {
|
|
31084
32718
|
const value = this.getValue();
|
|
31085
32719
|
const datalist = this.showLabels !== undefined ? `tickmarks` : "";
|
|
31086
|
-
return (hAsync(Host, { key: '
|
|
32720
|
+
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: {
|
|
31087
32721
|
"--min": this.min,
|
|
31088
32722
|
"--max": this.max,
|
|
31089
32723
|
"--value": value,
|
|
31090
32724
|
"--background-color": this.disabled
|
|
31091
32725
|
? "var(--road-surface-disabled)"
|
|
31092
32726
|
: "initial",
|
|
31093
|
-
} }, this.showValue && hAsync("output", { key: '
|
|
32727
|
+
} }, 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" })))));
|
|
31094
32728
|
}
|
|
31095
32729
|
get el() { return getElement(this); }
|
|
31096
32730
|
static get watchers() { return {
|
|
@@ -31159,7 +32793,7 @@ class Rating {
|
|
|
31159
32793
|
const sizeRatingStarsClass = this.size !== undefined ? `rating-stars rating-stars--${this.size}` : 'rating-stars';
|
|
31160
32794
|
const sizeRatingNumberClass = this.size !== undefined ? `rating-number rating-number--${this.size}` : 'rating-number';
|
|
31161
32795
|
const readOnly = this.readonly == true ? `readonly` : '';
|
|
31162
|
-
return (hAsync(Host, { key: '
|
|
32796
|
+
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}`, ")")));
|
|
31163
32797
|
}
|
|
31164
32798
|
static get style() { return RoadRatingStyle0; }
|
|
31165
32799
|
static get cmpMeta() { return {
|
|
@@ -31278,7 +32912,7 @@ class RoadAreaCode {
|
|
|
31278
32912
|
const labelId = this.selectId + '-label';
|
|
31279
32913
|
const valueId = this.selectId + '-value';
|
|
31280
32914
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
31281
|
-
return (hAsync(Host, { key: '
|
|
32915
|
+
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)));
|
|
31282
32916
|
}
|
|
31283
32917
|
static get watchers() { return {
|
|
31284
32918
|
"value": ["valueChanged"]
|
|
@@ -31325,7 +32959,7 @@ class RoadAspectRatio {
|
|
|
31325
32959
|
return `${w} / ${h}`;
|
|
31326
32960
|
}
|
|
31327
32961
|
render() {
|
|
31328
|
-
return (hAsync(Host, { key: '
|
|
32962
|
+
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' })))));
|
|
31329
32963
|
}
|
|
31330
32964
|
static get style() { return RoadAspectRatioStyle0; }
|
|
31331
32965
|
static get cmpMeta() { return {
|
|
@@ -32702,9 +34336,9 @@ class RoadPhoneNumberInput {
|
|
|
32702
34336
|
const isErrorClass = this.errorMessage.length ? 'is-error' : '';
|
|
32703
34337
|
const hasValueClass = this.hasValue() ? 'has-value' : '';
|
|
32704
34338
|
const sizes = 'xl';
|
|
32705
|
-
return (hAsync(Host, { key: '
|
|
34339
|
+
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
|
|
32706
34340
|
&& this.errorMessage !== ''
|
|
32707
|
-
&& hAsync("p", { key: '
|
|
34341
|
+
&& 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)));
|
|
32708
34342
|
}
|
|
32709
34343
|
get el() { return getElement(this); }
|
|
32710
34344
|
static get style() { return RoadPhoneNumberInputStyle0; }
|
|
@@ -32823,7 +34457,7 @@ class RoadTimeRangePicker {
|
|
|
32823
34457
|
return { start: this.start, end: this.end };
|
|
32824
34458
|
}
|
|
32825
34459
|
render() {
|
|
32826
|
-
return (hAsync(Host, { key: '
|
|
34460
|
+
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)));
|
|
32827
34461
|
}
|
|
32828
34462
|
get hostEl() { return getElement(this); }
|
|
32829
34463
|
static get style() { return RoadTimeRangePickerStyle0; }
|
|
@@ -32859,7 +34493,7 @@ class Row {
|
|
|
32859
34493
|
registerInstance(this, hostRef);
|
|
32860
34494
|
}
|
|
32861
34495
|
render() {
|
|
32862
|
-
return (hAsync(Host, { key: '
|
|
34496
|
+
return (hAsync(Host, { key: 'c38bbf8641a80fc8ebb76c25f5cec3070127c569' }, hAsync("slot", { key: 'b8459fd13efb02e5b04fb4558533f89f37cbe858' })));
|
|
32863
34497
|
}
|
|
32864
34498
|
static get style() { return RoadRowStyle0; }
|
|
32865
34499
|
static get cmpMeta() { return {
|
|
@@ -32931,10 +34565,10 @@ class SegmentedButton {
|
|
|
32931
34565
|
render() {
|
|
32932
34566
|
const { tabIndex, selected, tab } = this;
|
|
32933
34567
|
const sizeClass = this.size !== undefined ? `btn-${this.size}` : '';
|
|
32934
|
-
return (hAsync(Host, { key: '
|
|
34568
|
+
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: {
|
|
32935
34569
|
'tab-selected': selected,
|
|
32936
34570
|
[`${sizeClass}`]: true,
|
|
32937
|
-
} }, hAsync("span", { key: '
|
|
34571
|
+
} }, 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' })))));
|
|
32938
34572
|
}
|
|
32939
34573
|
get el() { return getElement(this); }
|
|
32940
34574
|
static get style() { return RoadSegmentedButtonStyle0; }
|
|
@@ -33055,7 +34689,7 @@ class Select {
|
|
|
33055
34689
|
const labelId = this.selectId + '-label';
|
|
33056
34690
|
const hasValueClass = this.value && this.value !== '' ? 'has-value' : '';
|
|
33057
34691
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
33058
|
-
return (hAsync(Host, { key: '
|
|
34692
|
+
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)));
|
|
33059
34693
|
}
|
|
33060
34694
|
static get watchers() { return {
|
|
33061
34695
|
"value": ["valueChanged"]
|
|
@@ -35049,7 +36683,7 @@ class SelectFilter {
|
|
|
35049
36683
|
const options = this.filteredOptions;
|
|
35050
36684
|
const isActive = this.isActive ? 'true' : 'false';
|
|
35051
36685
|
const notActive = this.isActive ? '' : 'not-active';
|
|
35052
|
-
return (hAsync(Host, { key: '
|
|
36686
|
+
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 })))))))));
|
|
35053
36687
|
}
|
|
35054
36688
|
get el() { return getElement(this); }
|
|
35055
36689
|
static get watchers() { return {
|
|
@@ -35085,7 +36719,7 @@ class Skeleton {
|
|
|
35085
36719
|
registerInstance(this, hostRef);
|
|
35086
36720
|
}
|
|
35087
36721
|
render() {
|
|
35088
|
-
return (hAsync("span", { key: '
|
|
36722
|
+
return (hAsync("span", { key: '33cfe20d51c54101ccf43a5027549fa79d707cab' }, "\u00A0"));
|
|
35089
36723
|
}
|
|
35090
36724
|
static get style() { return RoadSkeletonStyle0; }
|
|
35091
36725
|
static get cmpMeta() { return {
|
|
@@ -35116,7 +36750,7 @@ class Spinner {
|
|
|
35116
36750
|
render() {
|
|
35117
36751
|
const sizeClass = this.size !== undefined ? `spinner spinner--${this.size}` : 'spinner';
|
|
35118
36752
|
const colorClass = this.size !== undefined ? `spinner-circle spinner-circle--${this.color}` : 'spinner-circle';
|
|
35119
|
-
return (hAsync("svg", { key: '
|
|
36753
|
+
return (hAsync("svg", { key: '90d3a6eafbf227b79edf5b298b2bd5e212436c7a', class: `${sizeClass}`, viewBox: "25 25 50 50" }, hAsync("circle", { key: '9a90e8724a39005b1a51029b25401fc876149571', class: `${colorClass}`, cx: "50", cy: "50", r: "20" })));
|
|
35120
36754
|
}
|
|
35121
36755
|
static get style() { return RoadSpinnerStyle0; }
|
|
35122
36756
|
static get cmpMeta() { return {
|
|
@@ -35166,7 +36800,7 @@ class Stepper {
|
|
|
35166
36800
|
const urlStep1 = this.urlStep1 !== undefined ? `${this.urlStep1}` : '#';
|
|
35167
36801
|
const urlStep2 = this.urlStep2 !== undefined ? `${this.urlStep2}` : '#';
|
|
35168
36802
|
const urlStep3 = this.urlStep3 !== undefined ? `${this.urlStep3}` : '#';
|
|
35169
|
-
return (hAsync(Host, { key: '
|
|
36803
|
+
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" }))))))));
|
|
35170
36804
|
}
|
|
35171
36805
|
static get style() { return RoadProgressIndicatorHorizontalStyle0; }
|
|
35172
36806
|
static get cmpMeta() { return {
|
|
@@ -35268,11 +36902,11 @@ class Switch {
|
|
|
35268
36902
|
}
|
|
35269
36903
|
render() {
|
|
35270
36904
|
const labelId = this.switchId + '-label';
|
|
35271
|
-
const textLabel = hAsync("label", { key: '
|
|
36905
|
+
const textLabel = hAsync("label", { key: 'ce7aa5f11558ca65be5c3e67fa4bd195befb93fb', class: "form-switch-label", id: labelId, htmlFor: this.switchId }, this.label);
|
|
35272
36906
|
const colorClass = this.color !== undefined ? 'form-switch-' + this.color : '';
|
|
35273
36907
|
const isSpacedClass = this.isSpaced && 'form-switch-spaced';
|
|
35274
36908
|
const rightSwitchClass = this.hasLeftLabel ? 'form-switch-right' : '';
|
|
35275
|
-
return (hAsync(Host, { key: '
|
|
36909
|
+
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)));
|
|
35276
36910
|
}
|
|
35277
36911
|
static get watchers() { return {
|
|
35278
36912
|
"checked": ["checkedChanged"]
|
|
@@ -35327,9 +36961,9 @@ class Tab {
|
|
|
35327
36961
|
}
|
|
35328
36962
|
render() {
|
|
35329
36963
|
const { tab, active } = this;
|
|
35330
|
-
return (hAsync(Host, { key: '
|
|
36964
|
+
return (hAsync(Host, { key: '3027c31c282565b7d5905d3b3031db04ba1bed44', role: "tabpanel", "aria-hidden": !active ? 'true' : null, "aria-labelledby": `tab-button-${tab}`, class: {
|
|
35331
36965
|
'tab-hidden': !active,
|
|
35332
|
-
} }, hAsync("slot", { key: '
|
|
36966
|
+
} }, hAsync("slot", { key: '70ae19f3e889a8c46d062363445185055a6c1133' })));
|
|
35333
36967
|
}
|
|
35334
36968
|
get el() { return getElement(this); }
|
|
35335
36969
|
static get style() { return RoadTabStyle0; }
|
|
@@ -35389,11 +37023,11 @@ class TabBar {
|
|
|
35389
37023
|
}
|
|
35390
37024
|
render() {
|
|
35391
37025
|
const { expand, center, secondary } = this;
|
|
35392
|
-
return (hAsync(Host, { key: '
|
|
37026
|
+
return (hAsync(Host, { key: 'a40a29c3f335bd4b49495203834bb937af77a4bb', role: "tablist", class: {
|
|
35393
37027
|
'tab-expand': expand,
|
|
35394
37028
|
'tab-center': center,
|
|
35395
37029
|
'tab-secondary': secondary,
|
|
35396
|
-
} }, hAsync("slot", { key: '
|
|
37030
|
+
} }, hAsync("slot", { key: 'b7abc10609ae8939e729c735fb942b1b89c604ad' })));
|
|
35397
37031
|
}
|
|
35398
37032
|
get el() { return getElement(this); }
|
|
35399
37033
|
static get watchers() { return {
|
|
@@ -35493,7 +37127,7 @@ class TabButton {
|
|
|
35493
37127
|
rel,
|
|
35494
37128
|
target,
|
|
35495
37129
|
};
|
|
35496
|
-
return (hAsync(Host, { key: '
|
|
37130
|
+
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: {
|
|
35497
37131
|
'tab-selected': selected,
|
|
35498
37132
|
'tab-has-label': hasLabel,
|
|
35499
37133
|
'tab-has-icon': hasIcon,
|
|
@@ -35501,7 +37135,7 @@ class TabButton {
|
|
|
35501
37135
|
'tab-has-icon-only': hasIcon && !hasLabel,
|
|
35502
37136
|
[`tab-layout-${layout}`]: true,
|
|
35503
37137
|
'tab-disabled': disabled, // Classe CSS pour les styles désactivés
|
|
35504
|
-
} }, hAsync("a", Object.assign({ key: '
|
|
37138
|
+
} }, 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' })))));
|
|
35505
37139
|
}
|
|
35506
37140
|
get el() { return getElement(this); }
|
|
35507
37141
|
static get style() { return RoadTabButtonStyle0; }
|
|
@@ -35535,7 +37169,7 @@ class Table {
|
|
|
35535
37169
|
registerInstance(this, hostRef);
|
|
35536
37170
|
}
|
|
35537
37171
|
render() {
|
|
35538
|
-
return (hAsync("slot", { key: '
|
|
37172
|
+
return (hAsync("slot", { key: '4fbbf196c158059cc8c375e9fcd848cd8e2d864f' }));
|
|
35539
37173
|
}
|
|
35540
37174
|
static get style() { return RoadTableStyle0; }
|
|
35541
37175
|
static get cmpMeta() { return {
|
|
@@ -35643,7 +37277,7 @@ class Tabs$1 {
|
|
|
35643
37277
|
return Array.from(this.el.querySelectorAll('road-tab'));
|
|
35644
37278
|
}
|
|
35645
37279
|
render() {
|
|
35646
|
-
return (hAsync(Host, { key: '
|
|
37280
|
+
return (hAsync(Host, { key: 'd1d9e0ab7ed50aa338646a473b2c3e22d4a30f6b', onRoadSegmentedButtonClick: this.onTabClicked }, hAsync("slot", { key: '681bb4fdcf7bc99dd558723c85ea65b6182a7556', name: "top" }), hAsync("slot", { key: '395d680d41e4c831d7e12e2d4b5e83e74d1128cf' })));
|
|
35647
37281
|
}
|
|
35648
37282
|
get el() { return getElement(this); }
|
|
35649
37283
|
static get style() { return RoadSegmentedButtonsStyle0; }
|
|
@@ -35779,7 +37413,7 @@ class Tabs {
|
|
|
35779
37413
|
return Array.from(this.el.querySelectorAll('road-tab'));
|
|
35780
37414
|
}
|
|
35781
37415
|
render() {
|
|
35782
|
-
return (hAsync(Host, { key: '
|
|
37416
|
+
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' }))));
|
|
35783
37417
|
}
|
|
35784
37418
|
get el() { return getElement(this); }
|
|
35785
37419
|
static get style() { return RoadTabsStyle0; }
|
|
@@ -35827,7 +37461,7 @@ class Tag {
|
|
|
35827
37461
|
}
|
|
35828
37462
|
render() {
|
|
35829
37463
|
const contrastClass = this.contrast ? `tag-${this.color} tag-${this.color}-contrast` : `tag-${this.color}`;
|
|
35830
|
-
return (hAsync(Host, { key: '
|
|
37464
|
+
return (hAsync(Host, { key: '2639b90b789a6fde1fae0f3201236a7c9f4e1aad', class: `${contrastClass}` }, hAsync("slot", { key: '8039feeab97b500f0828e1efa751b9771f4f5e65' })));
|
|
35831
37465
|
}
|
|
35832
37466
|
static get style() { return RoadTagStyle0; }
|
|
35833
37467
|
static get cmpMeta() { return {
|
|
@@ -35859,7 +37493,7 @@ class Text {
|
|
|
35859
37493
|
}
|
|
35860
37494
|
render() {
|
|
35861
37495
|
const colorClass = this.color !== undefined ? `text-${this.color}` : '';
|
|
35862
|
-
return (hAsync(Host, { key: '
|
|
37496
|
+
return (hAsync(Host, { key: '2b1df03bfadf4021cf4016c584cdbd0ccf09324c', class: `${colorClass}` }, hAsync("slot", { key: '6966b8ebe4a2eb48b1fd020a707c6a37a519b099' })));
|
|
35863
37497
|
}
|
|
35864
37498
|
static get style() { return RoadTextStyle0; }
|
|
35865
37499
|
static get cmpMeta() { return {
|
|
@@ -35969,7 +37603,7 @@ class Textarea {
|
|
|
35969
37603
|
const hasValueClass = this.value !== '' ? 'has-value' : '';
|
|
35970
37604
|
const noResizeClass = this.resize == false ? 'no-resize' : '';
|
|
35971
37605
|
const isInvalidClass = this.error !== undefined && this.error !== '' ? 'is-invalid' : '';
|
|
35972
|
-
return (hAsync(Host, { key: '
|
|
37606
|
+
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)));
|
|
35973
37607
|
}
|
|
35974
37608
|
static get watchers() { return {
|
|
35975
37609
|
"value": ["valueChanged"]
|
|
@@ -36100,7 +37734,7 @@ class Toast {
|
|
|
36100
37734
|
if (this.color == 'danger') {
|
|
36101
37735
|
this.timeout = 0;
|
|
36102
37736
|
}
|
|
36103
|
-
return (hAsync(Host, { key: '
|
|
37737
|
+
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" }))));
|
|
36104
37738
|
}
|
|
36105
37739
|
static get watchers() { return {
|
|
36106
37740
|
"isOpen": ["isOpenChanged"]
|
|
@@ -36140,7 +37774,7 @@ class Toolbar {
|
|
|
36140
37774
|
}
|
|
36141
37775
|
render() {
|
|
36142
37776
|
const colorClass = this.color !== undefined ? `toolbar-${this.color}` : '';
|
|
36143
|
-
return (hAsync(Host, { key: '
|
|
37777
|
+
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" }))));
|
|
36144
37778
|
}
|
|
36145
37779
|
static get style() { return RoadToolbarStyle0; }
|
|
36146
37780
|
static get cmpMeta() { return {
|
|
@@ -36166,7 +37800,7 @@ class ToolbarAppName {
|
|
|
36166
37800
|
registerInstance(this, hostRef);
|
|
36167
37801
|
}
|
|
36168
37802
|
render() {
|
|
36169
|
-
return (hAsync("div", { key: '
|
|
37803
|
+
return (hAsync("div", { key: 'fa5fa9ad6f5e3a1d562bdc38b312c16cc9483d54', class: "toolbar-title-page" }, hAsync("slot", { key: 'b35389dcc32ff0ba0c163e5916d701c79fbf8ba9' })));
|
|
36170
37804
|
}
|
|
36171
37805
|
static get style() { return RoadToolbarTitlePageStyle0; }
|
|
36172
37806
|
static get cmpMeta() { return {
|
|
@@ -36190,7 +37824,7 @@ class ToolbarTitle {
|
|
|
36190
37824
|
registerInstance(this, hostRef);
|
|
36191
37825
|
}
|
|
36192
37826
|
render() {
|
|
36193
|
-
return (hAsync("div", { key: '
|
|
37827
|
+
return (hAsync("div", { key: 'fe411cfd08be76715a7896bb645a9c5d07479539', class: "toolbar-title" }, hAsync("slot", { key: 'c81416028a3c8aef9676e3c52f6ffb3202994eff' })));
|
|
36194
37828
|
}
|
|
36195
37829
|
static get style() { return RoadToolbarTitleStyle0; }
|
|
36196
37830
|
static get cmpMeta() { return {
|
|
@@ -36219,7 +37853,7 @@ class ToolbarV2 {
|
|
|
36219
37853
|
registerInstance(this, hostRef);
|
|
36220
37854
|
}
|
|
36221
37855
|
render() {
|
|
36222
|
-
return (hAsync(Host, { key: '
|
|
37856
|
+
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" })))));
|
|
36223
37857
|
}
|
|
36224
37858
|
static get style() { return RoadToolbarV2Style0; }
|
|
36225
37859
|
static get cmpMeta() { return {
|
|
@@ -36332,12 +37966,12 @@ class Tooltip {
|
|
|
36332
37966
|
return triggers.includes(triggerType);
|
|
36333
37967
|
}
|
|
36334
37968
|
render() {
|
|
36335
|
-
return (hAsync(Host, { key: '
|
|
37969
|
+
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
|
|
36336
37970
|
,
|
|
36337
|
-
"data-tooltip-position": this.position }, hAsync("slot", { key: '
|
|
37971
|
+
"data-tooltip-position": this.position }, hAsync("slot", { key: '8b5ae95d0076acbad18fb73bf32e9b31085c8365', "aria-describedby": this.tooltipId }), hAsync("div", { key: 'ba8a5ac573fa0b31edb9e26fab1c8ee212789f1d', part: "tooltip", id: this.tooltipId, class: {
|
|
36338
37972
|
tooltip: true,
|
|
36339
37973
|
'tooltip-open': this.isOpen,
|
|
36340
|
-
}, role: "tooltip", "aria-hidden": !this.isOpen ? 'true' : 'false' }, this.content, hAsync("slot", { key: '
|
|
37974
|
+
}, role: "tooltip", "aria-hidden": !this.isOpen ? 'true' : 'false' }, this.content, hAsync("slot", { key: 'cbc2c9bce87ee7b42897c9a8a24ff0f896e0670c', name: "tooltip-content" }))));
|
|
36341
37975
|
}
|
|
36342
37976
|
get el() { return getElement(this); }
|
|
36343
37977
|
static get style() { return RoadTooltipStyle0; }
|
|
@@ -36429,11 +38063,11 @@ class toggle {
|
|
|
36429
38063
|
}
|
|
36430
38064
|
render() {
|
|
36431
38065
|
const labelId = this.toggleId + '-label';
|
|
36432
|
-
const textLabel = hAsync("label", { key: '
|
|
38066
|
+
const textLabel = hAsync("label", { key: '200063a0e964b5a6cc9694a6aae1b45418751867', class: "form-toggle-label", id: labelId, htmlFor: this.toggleId }, this.label);
|
|
36433
38067
|
const isSpacedClass = this.isSpaced && 'form-toggle-spaced';
|
|
36434
38068
|
const righttoggleClass = this.hasLeftLabel ? 'form-toggle-right' : '';
|
|
36435
38069
|
const disabledClass = this.disabled ? 'disabled' : '';
|
|
36436
|
-
return (hAsync(Host, { key: '
|
|
38070
|
+
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)));
|
|
36437
38071
|
}
|
|
36438
38072
|
static get watchers() { return {
|
|
36439
38073
|
"checked": ["checkedChanged"]
|