@aurodesignsystem-dev/auro-drawer 0.0.0-pr100.0 → 0.0.0-pr100.2

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/demo/api.md CHANGED
@@ -25,13 +25,13 @@
25
25
 
26
26
  ## Slots
27
27
 
28
- | Name | Description |
29
- |-------------------------|--------------------------------------------------|
30
- | | Default slot for the body content in drawer. |
31
- | `ariaLabel.closeButton` | Text to describe the close button for screen readers. Default: "Close". |
32
- | [close](#close) | Used to replace the close button. |
33
- | [footer](#footer) | Used for action options, e.g. buttons. |
34
- | [header](#header) | Text to display as the header of the modal. |
28
+ | Name | Description |
29
+ |--------------------------|--------------------------------------------------|
30
+ | | Default slot for the body content in drawer. |
31
+ | `ariaLabel.drawer.close` | Text to describe the "x" icon close button for screen readers. Default: "Close". |
32
+ | [close](#close) | Used to replace the close button. |
33
+ | [footer](#footer) | Used for action options, e.g. buttons. |
34
+ | [header](#header) | Text to display as the header of the modal. |
35
35
 
36
36
  ## CSS Shadow Parts
37
37
 
@@ -906,7 +906,7 @@ This is a use case where there is a popover and combobox component inside the dr
906
906
 
907
907
  ### Aria Label Slot
908
908
 
909
- To customize the aria-label text for the close button, use the `ariaLabel.closeButton` slot to provide custom text. If no text is provided, the default text `"Close"` will be used.
909
+ To customize the aria-label text for the close button, use the `ariaLabel.drawer.close` slot to provide custom text. If no text is provided, the default text `"Close"` will be used.
910
910
 
911
911
  <div class="exampleWrapper">
912
912
  <!-- AURO-GENERATED-CONTENT:START (FILE:src=./../apiExamples/ariaLabelSlot.html) -->
@@ -915,7 +915,7 @@ To customize the aria-label text for the close button, use the `ariaLabel.closeB
915
915
  <auro-button id="openAriaLabelSlotDrawer">Open drawer</auro-button>
916
916
  </div>
917
917
  <auro-drawer id="ariaLabelSlotDrawer" size="sm" fullscreenBreakpoint="lg">
918
- <span slot="ariaLabel.closeButton">This is the new aria-label for the close button</span>
918
+ <span slot="ariaLabel.drawer.close">This is the new aria-label for the close button</span>
919
919
  <span slot="header">Small Drawer</span>
920
920
  <div slot="content">
921
921
  <p>When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See <auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank">alaskaair.com/bagrules</auro-hyperlink> for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.</p>
@@ -947,7 +947,7 @@ To customize the aria-label text for the close button, use the `ariaLabel.closeB
947
947
  <auro-button id="openAriaLabelSlotDrawer">Open drawer</auro-button>
948
948
  </div>
949
949
  <auro-drawer id="ariaLabelSlotDrawer" size="sm" fullscreenBreakpoint="lg">
950
- <span slot="ariaLabel.closeButton">This is the new aria-label for the close button</span>
950
+ <span slot="ariaLabel.drawer.close">This is the new aria-label for the close button</span>
951
951
  <span slot="header">Small Drawer</span>
952
952
  <div slot="content">
953
953
  <p>When traveling on Alaska Airlines flights, Alaska Airlines checked baggage fees may apply. See <auro-hyperlink href="https://www.alaskaair.com/bagrules" target="_blank">alaskaair.com/bagrules</auro-hyperlink> for our rules. For itineraries that include other airlines, their checked baggage fees may apply, as displayed on their websites.</p>
@@ -2993,7 +2993,7 @@ class AuroDrawerContent extends i$2 {
2993
2993
  render() {
2994
2994
  return u$2`
2995
2995
  <!-- Hidden slot for close button aria-label -->
2996
- <slot name="ariaLabel.closeButton" hidden @slotchange=${this.requestUpdate}></slot>
2996
+ <slot name="ariaLabel.drawer.close" hidden @slotchange=${this.requestUpdate}></slot>
2997
2997
 
2998
2998
  <div class="wrapper" tabindex="-1" part="drawer-wrapper" @transitionend=${this.handleWrapperTransitionEnd}>
2999
2999
  ${
@@ -3015,7 +3015,7 @@ class AuroDrawerContent extends i$2 {
3015
3015
  variant="ghost"
3016
3016
  shape="circle"
3017
3017
  size="sm"
3018
- aria-label="${this.runtimeUtils.getSlotText(this, 'ariaLabel.closeButton') || 'Close'}"
3018
+ aria-label="${this.runtimeUtils.getSlotText(this, 'ariaLabel.drawer.close') || 'Close'}"
3019
3019
  ?onDark=${this.onDark}>
3020
3020
  <${this.iconTag} ?customColor="${this.onDark}" category="interface" name="x-lg"></${this.iconTag}>
3021
3021
  </${this.buttonTag}>
@@ -3089,7 +3089,7 @@ const CONFIG = {
3089
3089
  * @slot header - Text to display as the header of the modal.
3090
3090
  * @slot footer - Used for action options, e.g. buttons.
3091
3091
  * @slot close - Used to replace the close button.
3092
- * @slot ariaLabel.closeButton - Text to describe the close button for screen readers. Default: "Close".
3092
+ * @slot ariaLabel.drawer.close - Text to describe the "x" icon close button for screen readers. Default: "Close".
3093
3093
  *
3094
3094
  * @fires auroDrawer-toggled - Event fired when the drawer is toggled open or closed.
3095
3095
  *
@@ -94,7 +94,7 @@ import{css as e,LitElement as t,html as s}from"lit";import{unsafeStatic as o,lit
94
94
  `,Ct=e`:host{--ds-auro-drawer-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-drawer-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}
95
95
  `;class Tt extends t{constructor(){super(),this.runtimeUtils=new l,this.buttonTag=c.prototype.generateTag("auro-button","12.2.0",pt),this.iconTag=c.prototype.generateTag("auro-icon","9.0.0",zt),this.prevActiveElement=void 0}static get properties(){return{visible:{type:Boolean,reflect:!0},modal:{type:Boolean,reflect:!0},unformatted:{type:Boolean,reflect:!0},onDark:{type:Boolean,reflect:!0}}}static get styles(){return[Bt,Ct,Et]}handleCloseButtonClick(){this.dispatchEvent(new CustomEvent("close-click"))}handleWrapperTransitionEnd(){this.visible&&this.focusTrap&&this.focusTrap.focusFirstElement()}updated(e){e.has("visible")&&(this.visible?(this.focusTrap||(this.focusTrap=new At(this)),this.prevActiveElement=document.activeElement,this.prevActiveElement===document.body&&this.triggerElement&&(this.prevActiveElement=this.triggerElement)):(this.prevActiveElement&&(this.prevActiveElement.focus(),this.prevActiveElement=void 0),this.focusTrap&&(this.focusTrap.disconnect(),this.focusTrap=null)))}firstUpdated(){super.firstUpdated()}render(){return r`
96
96
  <!-- Hidden slot for close button aria-label -->
97
- <slot name="ariaLabel.closeButton" hidden @slotchange=${this.requestUpdate}></slot>
97
+ <slot name="ariaLabel.drawer.close" hidden @slotchange=${this.requestUpdate}></slot>
98
98
 
99
99
  <div class="wrapper" tabindex="-1" part="drawer-wrapper" @transitionend=${this.handleWrapperTransitionEnd}>
100
100
  ${this.unformatted?"":r`
@@ -110,7 +110,7 @@ import{css as e,LitElement as t,html as s}from"lit";import{unsafeStatic as o,lit
110
110
  variant="ghost"
111
111
  shape="circle"
112
112
  size="sm"
113
- aria-label="${this.runtimeUtils.getSlotText(this,"ariaLabel.closeButton")||"Close"}"
113
+ aria-label="${this.runtimeUtils.getSlotText(this,"ariaLabel.drawer.close")||"Close"}"
114
114
  ?onDark=${this.onDark}>
115
115
  <${this.iconTag} ?customColor="${this.onDark}" category="interface" name="x-lg"></${this.iconTag}>
116
116
  </${this.buttonTag}>
package/dist/index.d.ts CHANGED
@@ -99,7 +99,7 @@ class l{registerComponent(e,t){customElements.get(e)||customElements.define(e,cl
99
99
  `,Ct=css`:host{--ds-auro-drawer-container-color: var(--ds-basic-color-surface-default, #ffffff);--ds-auro-drawer-text-color: var(--ds-basic-color-texticon-default, #2a2a2a)}
100
100
  `;class Tt extends LitElement{constructor(){super(),this.runtimeUtils=new l,this.buttonTag=c.prototype.generateTag("auro-button","12.2.0",pt),this.iconTag=c.prototype.generateTag("auro-icon","9.0.0",zt),this.prevActiveElement=void 0;}static get properties(){return {visible:{type:Boolean,reflect:true},modal:{type:Boolean,reflect:true},unformatted:{type:Boolean,reflect:true},onDark:{type:Boolean,reflect:true}}}static get styles(){return [Bt,Ct,Et]}handleCloseButtonClick(){this.dispatchEvent(new CustomEvent("close-click"));}handleWrapperTransitionEnd(){this.visible&&this.focusTrap&&this.focusTrap.focusFirstElement();}updated(e){e.has("visible")&&(this.visible?(this.focusTrap||(this.focusTrap=new At(this)),this.prevActiveElement=document.activeElement,this.prevActiveElement===document.body&&this.triggerElement&&(this.prevActiveElement=this.triggerElement)):(this.prevActiveElement&&(this.prevActiveElement.focus(),this.prevActiveElement=void 0),this.focusTrap&&(this.focusTrap.disconnect(),this.focusTrap=null)));}firstUpdated(){super.firstUpdated();}render(){return html`
101
101
  <!-- Hidden slot for close button aria-label -->
102
- <slot name="ariaLabel.closeButton" hidden @slotchange=${this.requestUpdate}></slot>
102
+ <slot name="ariaLabel.drawer.close" hidden @slotchange=${this.requestUpdate}></slot>
103
103
 
104
104
  <div class="wrapper" tabindex="-1" part="drawer-wrapper" @transitionend=${this.handleWrapperTransitionEnd}>
105
105
  ${this.unformatted?"":html`
@@ -115,7 +115,7 @@ class l{registerComponent(e,t){customElements.get(e)||customElements.define(e,cl
115
115
  variant="ghost"
116
116
  shape="circle"
117
117
  size="sm"
118
- aria-label="${this.runtimeUtils.getSlotText(this,"ariaLabel.closeButton")||"Close"}"
118
+ aria-label="${this.runtimeUtils.getSlotText(this,"ariaLabel.drawer.close")||"Close"}"
119
119
  ?onDark=${this.onDark}>
120
120
  <${this.iconTag} ?customColor="${this.onDark}" category="interface" name="x-lg"></${this.iconTag}>
121
121
  </${this.buttonTag}>
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{A as AuroDrawer}from"./auro-drawer-BJigsnbI.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
1
+ export{A as AuroDrawer}from"./auro-drawer-BK5t6lz-.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
@@ -1 +1 @@
1
- import{A as i}from"./auro-drawer-BJigsnbI.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";i.register();
1
+ import{A as i}from"./auro-drawer-BK5t6lz-.js";import"lit";import"lit/static-html.js";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";i.register();
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "================================================================================"
8
8
  ],
9
9
  "name": "@aurodesignsystem-dev/auro-drawer",
10
- "version": "0.0.0-pr100.0",
10
+ "version": "0.0.0-pr100.2",
11
11
  "description": "auro-drawer HTML custom element",
12
12
  "repository": {
13
13
  "type": "git",
@@ -21,7 +21,6 @@
21
21
  "node": "^20.x || ^22.x"
22
22
  },
23
23
  "dependencies": {
24
- "@aurodesignsystem-dev/auro-button": "^0.0.0-pr362.2",
25
24
  "lit": "^3.3.0"
26
25
  },
27
26
  "devDependencies": {