@roadtrip/components 3.47.0 → 3.48.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/hydrate/index.js CHANGED
@@ -11130,7 +11130,7 @@ class ContentCard {
11130
11130
  }; }
11131
11131
  }
11132
11132
 
11133
- const counterCss = ".sc-road-counter-h{position:relative;z-index:0;display:block}road-input.sc-road-counter{--input-text-align:center;--border-radius:0;--margin-bottom:0}road-button.sc-road-counter{position:relative;width:3rem;font-size:var(--road-font-size-24);line-height:1.4;background:var(--road-surface);border:1px solid var(--road-button-tertiary-outline)}road-button.sc-road-counter:hover,road-button.sc-road-counter:focus{background:var(--road-button-tertiary-variant)}road-button.sc-road-counter road-icon.sc-road-counter{display:flex;fill:var(--road-primary)}.disabled.sc-road-counter{margin-right:-1px;margin-left:-1px;pointer-events:none;cursor:not-allowed;background:var(--road-surface-disabled);border:1px solid var(--road-on-surface-disabled);opacity:inherit}.disabled.sc-road-counter:focus{background:var(--road-disabled)}.disabled.sc-road-counter road-icon.sc-road-counter{fill:var(--road-grey-50)}road-button.btn-md.sc-road-counter{width:2.5rem}road-button.btn-sm.sc-road-counter{width:2rem}.counter-md.sc-road-counter{height:2.5rem}.counter-sm.sc-road-counter{height:2rem}.counter-md.sc-road-counter road-input.sc-road-counter{--height:2.5rem}.counter-md.sc-road-counter road-button.sc-road-counter{min-width:2.5rem}.counter-sm.sc-road-counter road-input.sc-road-counter{--height:2rem}.counter-sm.sc-road-counter road-button.sc-road-counter{min-width:2rem}";
11133
+ const counterCss = ".sc-road-counter-h{position:relative;z-index:0;display:block}road-input.sc-road-counter{--input-text-align:center;--border-radius:0;--margin-bottom:0}road-button.sc-road-counter{position:relative;width:3rem;font-size:var(--road-font-size-24);line-height:1.4;background:var(--road-surface);border:1px solid var(--road-button-tertiary-outline)}road-button.sc-road-counter:hover,road-button.sc-road-counter:focus{background:var(--road-button-tertiary-variant)}road-button.sc-road-counter road-icon.sc-road-counter{display:flex;fill:var(--road-primary)}.disabled.sc-road-counter{margin-right:-1px;margin-left:-1px;pointer-events:none;cursor:not-allowed;background:var(--road-surface-disabled);border:1px solid var(--road-on-surface-disabled);opacity:inherit}.disabled.sc-road-counter:focus{background:var(--road-disabled)}.disabled.sc-road-counter road-icon.sc-road-counter{fill:var(--road-grey-50)}road-button.btn-md.sc-road-counter{width:2.5rem}road-button.btn-sm.sc-road-counter{width:2rem}.counter-lg.sc-road-counter{height:3rem;min-width:8.75rem}.counter-md.sc-road-counter{height:2.5rem;min-width:7.25rem}.counter-sm.sc-road-counter{height:2rem;min-width:6.25rem}.counter-md.sc-road-counter road-input.sc-road-counter{--height:2.5rem}.counter-md.sc-road-counter road-button.sc-road-counter{min-width:2.5rem}.counter-sm.sc-road-counter road-input.sc-road-counter{--height:2rem}.counter-sm.sc-road-counter road-button.sc-road-counter{min-width:2rem}";
11134
11134
  var RoadCounterStyle0 = counterCss;
11135
11135
 
11136
11136
  class Counter {
@@ -13075,6 +13075,10 @@ class Drawer {
13075
13075
  * Footer Content state
13076
13076
  */
13077
13077
  this.hasFooterContent = false;
13078
+ this.onFooterSlotChange = (event) => {
13079
+ const slot = event.target;
13080
+ this.hasFooterContent = slot.assignedElements().length > 0;
13081
+ };
13078
13082
  /**
13079
13083
  * Close the dialog when clicking on the cross or layer
13080
13084
  */
@@ -13114,13 +13118,15 @@ class Drawer {
13114
13118
  * Enable/disable focus trap so it can be overrided by the client in case of something appearing over the drawer like a modal for example
13115
13119
  */
13116
13120
  handleFocusTrapProp(value) {
13117
- var _a, _b;
13118
- if (value) {
13119
- (_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.unpause();
13120
- }
13121
- else {
13122
- (_b = this.focusTrap) === null || _b === void 0 ? void 0 : _b.pause();
13123
- }
13121
+ setTimeout(() => {
13122
+ var _a, _b;
13123
+ if (value) {
13124
+ (_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.unpause();
13125
+ }
13126
+ else {
13127
+ (_b = this.focusTrap) === null || _b === void 0 ? void 0 : _b.pause();
13128
+ }
13129
+ }, 100); // Timeout is used to ensure the drawer has been rendered when client wants to update the property at the same time
13124
13130
  }
13125
13131
  // @Watch('isOpen')
13126
13132
  // handleOpen(openValue: boolean) {
@@ -13138,9 +13144,14 @@ class Drawer {
13138
13144
  this.onOpen.emit();
13139
13145
  // Focus the first button element after the drawer is opened then focus trap
13140
13146
  setTimeout(() => {
13141
- var _a;
13147
+ var _a, _b, _c;
13142
13148
  this.focusFirstElement();
13143
- (_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.activate();
13149
+ if ((_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.active) {
13150
+ (_b = this.focusTrap) === null || _b === void 0 ? void 0 : _b.unpause();
13151
+ }
13152
+ else {
13153
+ (_c = this.focusTrap) === null || _c === void 0 ? void 0 : _c.activate();
13154
+ }
13144
13155
  }, 50); // Add a slight delay to ensure the element is rendered
13145
13156
  }
13146
13157
  else {
@@ -13191,7 +13202,7 @@ class Drawer {
13191
13202
  }
13192
13203
  }
13193
13204
  render() {
13194
- var _a, _b, _c, _d;
13205
+ var _a, _b, _c;
13195
13206
  const drawerIsOpenClass = this.isOpen ? 'drawer-open' : '';
13196
13207
  const removePaddingClass = this.removePadding ? 'remove-padding' : '';
13197
13208
  const inverseHeaderClass = this.hasInverseHeader ? 'drawer-header-inverse' : '';
@@ -13202,9 +13213,7 @@ class Drawer {
13202
13213
  const backIconElement = this.hasBackIcon ? (hAsync("button", { type: "button", class: "drawer-action", "aria-label": ariaLabelBack, onClick: this.onClickBack }, hAsync("road-icon", { icon: navigationChevron, rotate: "180" }), this.backText)) : null;
13203
13214
  const closeIconElement = this.hasCloseIcon ? (hAsync("button", { type: "button", class: "drawer-close", onClick: this.onClick, "aria-label": ariaLabelClose }, hAsync("road-icon", { icon: navigationClose, "aria-hidden": "true" }))) : null;
13204
13215
  const drawerWidthValue = this.position === 'bottom' ? '100%' : `${this.drawerWidth}px`;
13205
- const footerSlotElement = (_d = this.el.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('slot[name="footer"]');
13206
- const hasFooterContent = footerSlotElement instanceof HTMLSlotElement && footerSlotElement.assignedNodes().length > 0;
13207
- return (hAsync(Host, { key: 'f204c79488e3496f2b5de75bdbaf8af4a7912306', class: `${drawerIsOpenClass} drawer-${this.position}`, tabindex: "0", role: "dialog", "aria-label": ariaLabel }, hAsync("div", { key: 'c75f6462bd7f7451d17784b72fb94ec343fe88f9', class: "road-drawer-wrapper" }, hAsync("div", { key: '2e5df3a95fa7344dfbe103e05714c74646f68c3c', class: "drawer-overlay", onClick: this.onClick, tabindex: "-1" }), hAsync("div", { key: 'dfc325bb20bebcc1cb41902d5acbd28b2b662d01', class: "drawer-dialog", style: { maxWidth: drawerWidthValue }, role: "document" }, hAsync("div", { key: 'efdf2daad76553c2b4d0df35353865abd29a170c', class: "drawer-content" }, hAsync("header", { key: '96cefa87d0a69594d2add43cbffa6cbbd6a491d9', 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: 'd5d13d447d46cd6e1df289a217aa8422e100afa7', class: `drawer-body ${removePaddingClass}` }, hAsync("slot", { key: '5d9aefc4ccbff803e332fd55998fb20b141b272d' })), hAsync("footer", { key: '767203a6ffdf081888a7d43f0e840598513832b6', class: `drawer-footer ${removePaddingClass}`, style: { display: hasFooterContent ? 'block' : 'none' } }, hAsync("slot", { key: '7d67cff86df04ba7c0c694e88d982abc2e08da5b', name: "footer" })))))));
13216
+ return (hAsync(Host, { key: '060d4bb015870b3540eb83b2ad932c3d06947c47', class: `${drawerIsOpenClass} drawer-${this.position}`, tabindex: "0", role: "dialog", "aria-label": ariaLabel }, hAsync("div", { key: 'd73080a0b0bcf3caec1eca5cd37da1daff6f827b', class: "road-drawer-wrapper" }, hAsync("div", { key: '01ec8567832bfdd74da79b89cd2d64749d808f4b', class: "drawer-overlay", onClick: this.onClick, tabindex: "-1" }), hAsync("div", { key: 'f5c9999f311cb8840590123e4ac397d380de0098', class: "drawer-dialog", style: { maxWidth: drawerWidthValue }, role: "document" }, hAsync("div", { key: '49b1ab4eeb412cfd97fca92c14a3a0d3fed06ca5', class: "drawer-content" }, hAsync("header", { key: '70942d7f0638042702208a783df6298df4569804', 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: '3bd1a439510a2fdd0e39c7ca3e1c12c224cc119f', class: `drawer-body ${removePaddingClass}` }, hAsync("slot", { key: '9e7931e555265561fb8af8d09bc1a0ddbbfefd81' })), hAsync("footer", { key: '5fb5f98e793fe226f32f17f3d50c493212b6c11a', class: `drawer-footer ${removePaddingClass}`, hidden: !this.hasFooterContent }, hAsync("slot", { key: 'd177f8dacdf71974733c1a911bcd0011856825e1', name: "footer", onSlotchange: this.onFooterSlotChange })))))));
13208
13217
  }
13209
13218
  get el() { return getElement(this); }
13210
13219
  static get watchers() { return {
package/hydrate/index.mjs CHANGED
@@ -11126,7 +11126,7 @@ class ContentCard {
11126
11126
  }; }
11127
11127
  }
11128
11128
 
11129
- const counterCss = ".sc-road-counter-h{position:relative;z-index:0;display:block}road-input.sc-road-counter{--input-text-align:center;--border-radius:0;--margin-bottom:0}road-button.sc-road-counter{position:relative;width:3rem;font-size:var(--road-font-size-24);line-height:1.4;background:var(--road-surface);border:1px solid var(--road-button-tertiary-outline)}road-button.sc-road-counter:hover,road-button.sc-road-counter:focus{background:var(--road-button-tertiary-variant)}road-button.sc-road-counter road-icon.sc-road-counter{display:flex;fill:var(--road-primary)}.disabled.sc-road-counter{margin-right:-1px;margin-left:-1px;pointer-events:none;cursor:not-allowed;background:var(--road-surface-disabled);border:1px solid var(--road-on-surface-disabled);opacity:inherit}.disabled.sc-road-counter:focus{background:var(--road-disabled)}.disabled.sc-road-counter road-icon.sc-road-counter{fill:var(--road-grey-50)}road-button.btn-md.sc-road-counter{width:2.5rem}road-button.btn-sm.sc-road-counter{width:2rem}.counter-md.sc-road-counter{height:2.5rem}.counter-sm.sc-road-counter{height:2rem}.counter-md.sc-road-counter road-input.sc-road-counter{--height:2.5rem}.counter-md.sc-road-counter road-button.sc-road-counter{min-width:2.5rem}.counter-sm.sc-road-counter road-input.sc-road-counter{--height:2rem}.counter-sm.sc-road-counter road-button.sc-road-counter{min-width:2rem}";
11129
+ const counterCss = ".sc-road-counter-h{position:relative;z-index:0;display:block}road-input.sc-road-counter{--input-text-align:center;--border-radius:0;--margin-bottom:0}road-button.sc-road-counter{position:relative;width:3rem;font-size:var(--road-font-size-24);line-height:1.4;background:var(--road-surface);border:1px solid var(--road-button-tertiary-outline)}road-button.sc-road-counter:hover,road-button.sc-road-counter:focus{background:var(--road-button-tertiary-variant)}road-button.sc-road-counter road-icon.sc-road-counter{display:flex;fill:var(--road-primary)}.disabled.sc-road-counter{margin-right:-1px;margin-left:-1px;pointer-events:none;cursor:not-allowed;background:var(--road-surface-disabled);border:1px solid var(--road-on-surface-disabled);opacity:inherit}.disabled.sc-road-counter:focus{background:var(--road-disabled)}.disabled.sc-road-counter road-icon.sc-road-counter{fill:var(--road-grey-50)}road-button.btn-md.sc-road-counter{width:2.5rem}road-button.btn-sm.sc-road-counter{width:2rem}.counter-lg.sc-road-counter{height:3rem;min-width:8.75rem}.counter-md.sc-road-counter{height:2.5rem;min-width:7.25rem}.counter-sm.sc-road-counter{height:2rem;min-width:6.25rem}.counter-md.sc-road-counter road-input.sc-road-counter{--height:2.5rem}.counter-md.sc-road-counter road-button.sc-road-counter{min-width:2.5rem}.counter-sm.sc-road-counter road-input.sc-road-counter{--height:2rem}.counter-sm.sc-road-counter road-button.sc-road-counter{min-width:2rem}";
11130
11130
  var RoadCounterStyle0 = counterCss;
11131
11131
 
11132
11132
  class Counter {
@@ -13071,6 +13071,10 @@ class Drawer {
13071
13071
  * Footer Content state
13072
13072
  */
13073
13073
  this.hasFooterContent = false;
13074
+ this.onFooterSlotChange = (event) => {
13075
+ const slot = event.target;
13076
+ this.hasFooterContent = slot.assignedElements().length > 0;
13077
+ };
13074
13078
  /**
13075
13079
  * Close the dialog when clicking on the cross or layer
13076
13080
  */
@@ -13110,13 +13114,15 @@ class Drawer {
13110
13114
  * Enable/disable focus trap so it can be overrided by the client in case of something appearing over the drawer like a modal for example
13111
13115
  */
13112
13116
  handleFocusTrapProp(value) {
13113
- var _a, _b;
13114
- if (value) {
13115
- (_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.unpause();
13116
- }
13117
- else {
13118
- (_b = this.focusTrap) === null || _b === void 0 ? void 0 : _b.pause();
13119
- }
13117
+ setTimeout(() => {
13118
+ var _a, _b;
13119
+ if (value) {
13120
+ (_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.unpause();
13121
+ }
13122
+ else {
13123
+ (_b = this.focusTrap) === null || _b === void 0 ? void 0 : _b.pause();
13124
+ }
13125
+ }, 100); // Timeout is used to ensure the drawer has been rendered when client wants to update the property at the same time
13120
13126
  }
13121
13127
  // @Watch('isOpen')
13122
13128
  // handleOpen(openValue: boolean) {
@@ -13134,9 +13140,14 @@ class Drawer {
13134
13140
  this.onOpen.emit();
13135
13141
  // Focus the first button element after the drawer is opened then focus trap
13136
13142
  setTimeout(() => {
13137
- var _a;
13143
+ var _a, _b, _c;
13138
13144
  this.focusFirstElement();
13139
- (_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.activate();
13145
+ if ((_a = this.focusTrap) === null || _a === void 0 ? void 0 : _a.active) {
13146
+ (_b = this.focusTrap) === null || _b === void 0 ? void 0 : _b.unpause();
13147
+ }
13148
+ else {
13149
+ (_c = this.focusTrap) === null || _c === void 0 ? void 0 : _c.activate();
13150
+ }
13140
13151
  }, 50); // Add a slight delay to ensure the element is rendered
13141
13152
  }
13142
13153
  else {
@@ -13187,7 +13198,7 @@ class Drawer {
13187
13198
  }
13188
13199
  }
13189
13200
  render() {
13190
- var _a, _b, _c, _d;
13201
+ var _a, _b, _c;
13191
13202
  const drawerIsOpenClass = this.isOpen ? 'drawer-open' : '';
13192
13203
  const removePaddingClass = this.removePadding ? 'remove-padding' : '';
13193
13204
  const inverseHeaderClass = this.hasInverseHeader ? 'drawer-header-inverse' : '';
@@ -13198,9 +13209,7 @@ class Drawer {
13198
13209
  const backIconElement = this.hasBackIcon ? (hAsync("button", { type: "button", class: "drawer-action", "aria-label": ariaLabelBack, onClick: this.onClickBack }, hAsync("road-icon", { icon: navigationChevron, rotate: "180" }), this.backText)) : null;
13199
13210
  const closeIconElement = this.hasCloseIcon ? (hAsync("button", { type: "button", class: "drawer-close", onClick: this.onClick, "aria-label": ariaLabelClose }, hAsync("road-icon", { icon: navigationClose, "aria-hidden": "true" }))) : null;
13200
13211
  const drawerWidthValue = this.position === 'bottom' ? '100%' : `${this.drawerWidth}px`;
13201
- const footerSlotElement = (_d = this.el.shadowRoot) === null || _d === void 0 ? void 0 : _d.querySelector('slot[name="footer"]');
13202
- const hasFooterContent = footerSlotElement instanceof HTMLSlotElement && footerSlotElement.assignedNodes().length > 0;
13203
- return (hAsync(Host, { key: 'f204c79488e3496f2b5de75bdbaf8af4a7912306', class: `${drawerIsOpenClass} drawer-${this.position}`, tabindex: "0", role: "dialog", "aria-label": ariaLabel }, hAsync("div", { key: 'c75f6462bd7f7451d17784b72fb94ec343fe88f9', class: "road-drawer-wrapper" }, hAsync("div", { key: '2e5df3a95fa7344dfbe103e05714c74646f68c3c', class: "drawer-overlay", onClick: this.onClick, tabindex: "-1" }), hAsync("div", { key: 'dfc325bb20bebcc1cb41902d5acbd28b2b662d01', class: "drawer-dialog", style: { maxWidth: drawerWidthValue }, role: "document" }, hAsync("div", { key: 'efdf2daad76553c2b4d0df35353865abd29a170c', class: "drawer-content" }, hAsync("header", { key: '96cefa87d0a69594d2add43cbffa6cbbd6a491d9', 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: 'd5d13d447d46cd6e1df289a217aa8422e100afa7', class: `drawer-body ${removePaddingClass}` }, hAsync("slot", { key: '5d9aefc4ccbff803e332fd55998fb20b141b272d' })), hAsync("footer", { key: '767203a6ffdf081888a7d43f0e840598513832b6', class: `drawer-footer ${removePaddingClass}`, style: { display: hasFooterContent ? 'block' : 'none' } }, hAsync("slot", { key: '7d67cff86df04ba7c0c694e88d982abc2e08da5b', name: "footer" })))))));
13212
+ return (hAsync(Host, { key: '060d4bb015870b3540eb83b2ad932c3d06947c47', class: `${drawerIsOpenClass} drawer-${this.position}`, tabindex: "0", role: "dialog", "aria-label": ariaLabel }, hAsync("div", { key: 'd73080a0b0bcf3caec1eca5cd37da1daff6f827b', class: "road-drawer-wrapper" }, hAsync("div", { key: '01ec8567832bfdd74da79b89cd2d64749d808f4b', class: "drawer-overlay", onClick: this.onClick, tabindex: "-1" }), hAsync("div", { key: 'f5c9999f311cb8840590123e4ac397d380de0098', class: "drawer-dialog", style: { maxWidth: drawerWidthValue }, role: "document" }, hAsync("div", { key: '49b1ab4eeb412cfd97fca92c14a3a0d3fed06ca5', class: "drawer-content" }, hAsync("header", { key: '70942d7f0638042702208a783df6298df4569804', 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: '3bd1a439510a2fdd0e39c7ca3e1c12c224cc119f', class: `drawer-body ${removePaddingClass}` }, hAsync("slot", { key: '9e7931e555265561fb8af8d09bc1a0ddbbfefd81' })), hAsync("footer", { key: '5fb5f98e793fe226f32f17f3d50c493212b6c11a', class: `drawer-footer ${removePaddingClass}`, hidden: !this.hasFooterContent }, hAsync("slot", { key: 'd177f8dacdf71974733c1a911bcd0011856825e1', name: "footer", onSlotchange: this.onFooterSlotChange })))))));
13204
13213
  }
13205
13214
  get el() { return getElement(this); }
13206
13215
  static get watchers() { return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@roadtrip/components",
3
- "version": "3.47.0",
3
+ "version": "3.48.0",
4
4
  "description": "Web Component library for Roadtrip Design System",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://gitlab.com/mobivia/driverservices/experience-platform/roadtrip/components",