@aurodesignsystem-dev/auro-drawer 0.0.0-pr131.26 → 0.0.0-pr131.27

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
@@ -22,7 +22,7 @@ The `auro-drawer` element provides users a way to implement an expandable drawer
22
22
 
23
23
  | Name | Parameters | Return | Description |
24
24
  | -------- | -------------------------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
25
- | hide | `eventType` (any) | | Closes the native dialog. |
25
+ | hide | None | | Closes the native dialog. |
26
26
  | register | `name` (string) - The name of the element that you want to register. | | This will register this element with the browser. |
27
27
  | show | None | | Opens the native dialog inside the bib.<br><br>- `nested`: `setAttribute("open", "")` to anchor within the parent container.<br>- `!modal && !nested`: `showPopover()` to keep positional CSS intact<br> and allow free keyboard flow to background content (WCAG 2.1.2).<br>- `modal && !nested`: `showModal()` for native focus containment and top-layer rendering. |
28
28
 
package/demo/api.min.js CHANGED
@@ -3317,7 +3317,8 @@ class AuroFloater extends i$1 {
3317
3317
 
3318
3318
  disconnectedCallback() {
3319
3319
  if (this.floater) {
3320
- this.hide("disconnect");
3320
+ this.hide();
3321
+ this.floater.disconnect();
3321
3322
  }
3322
3323
 
3323
3324
  super.disconnectedCallback();
@@ -3393,7 +3394,7 @@ class AuroFloater extends i$1 {
3393
3394
  /**
3394
3395
  * Closes the native dialog.
3395
3396
  */
3396
- hide(eventType = undefined) {
3397
+ hide() {
3397
3398
  // Invalidate any in-flight show() that is awaiting bib.updateComplete so it
3398
3399
  // does not open the dialog after this hide() call completes.
3399
3400
  this._showGeneration++;
@@ -3426,11 +3427,7 @@ class AuroFloater extends i$1 {
3426
3427
  dialog.removeAttribute("popover");
3427
3428
  }, 300);
3428
3429
  }
3429
- this.floater.hideBib(eventType);
3430
-
3431
- if (eventType === "disconnect") {
3432
- this.floater.disconnect();
3433
- }
3430
+ this.floater.hideBib();
3434
3431
  }
3435
3432
 
3436
3433
  render() {
package/demo/index.min.js CHANGED
@@ -3069,7 +3069,8 @@ class AuroFloater extends i$1 {
3069
3069
 
3070
3070
  disconnectedCallback() {
3071
3071
  if (this.floater) {
3072
- this.hide("disconnect");
3072
+ this.hide();
3073
+ this.floater.disconnect();
3073
3074
  }
3074
3075
 
3075
3076
  super.disconnectedCallback();
@@ -3145,7 +3146,7 @@ class AuroFloater extends i$1 {
3145
3146
  /**
3146
3147
  * Closes the native dialog.
3147
3148
  */
3148
- hide(eventType = undefined) {
3149
+ hide() {
3149
3150
  // Invalidate any in-flight show() that is awaiting bib.updateComplete so it
3150
3151
  // does not open the dialog after this hide() call completes.
3151
3152
  this._showGeneration++;
@@ -3178,11 +3179,7 @@ class AuroFloater extends i$1 {
3178
3179
  dialog.removeAttribute("popover");
3179
3180
  }, 300);
3180
3181
  }
3181
- this.floater.hideBib(eventType);
3182
-
3183
- if (eventType === "disconnect") {
3184
- this.floater.disconnect();
3185
- }
3182
+ this.floater.hideBib();
3186
3183
  }
3187
3184
 
3188
3185
  render() {
@@ -7,7 +7,7 @@ import{unsafeStatic as e,literal as t,html as o}from"lit/static-html.js";import{
7
7
  <div class="backdrop" part="backdrop"></div>
8
8
  <slot></slot>
9
9
  </dialog>
10
- `}}class Pe extends a{constructor(e){super(),this.behavior=e,this.floater=void 0,this._showGeneration=0;const t=`${this.floaterConfig.prefix.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}-bib`;this.floaterBibTag=c.prototype.generateTag(t,"0.0.0",Ue)}get floaterConfig(){return{prefix:"auroFloater"}}static get properties(){return{isPopoverVisible:{attribute:"open",type:Boolean,reflect:!0},triggerElement:{attribute:!1}}}firstUpdated(){this.floater=new Me(this,this.behavior),this.floater.configure(this,this.floaterConfig.prefix),this.bib.addEventListener("dialog-cancel",()=>{this.modal||this.hide()}),this.bib.addEventListener("dialog-backdrop-click",()=>{this.modal||Me.topOpeningFloatingUI===this.floater&&this.hide()})}disconnectedCallback(){this.floater&&this.hide("disconnect"),super.disconnectedCallback()}updated(e){this.floater.handleUpdate(e),e.has("triggerElement")&&(this.floater.configure(this,this.floaterConfig.prefix),this.bib.bibLabel=this.triggerElement?.textContent.trim()),e.has("isPopoverVisible")&&(this.isPopoverVisible?this.show():this.hide())}async show(){const e=++this._showGeneration;if(clearTimeout(this._closeTimeout),this.floater.showBib(),this.bib?.dialog||await(this.bib?.updateComplete),!this.bib?.dialog||this._showGeneration!==e)return;const t=this.nested??!1,o=this.modal??!1,s=this.bib.dialog;t?s.setAttribute("open",""):o?(s.removeAttribute("popover"),s.open||s.showModal()):"function"==typeof s.showPopover?(s.setAttribute("popover","manual"),s.matches(":popover-open")||s.showPopover()):(s.removeAttribute("popover"),s.open||s.show())}hide(e=void 0){this._showGeneration++,clearTimeout(this._closeTimeout);const t=this.bib?.dialog;t?.open?this._closeTimeout=setTimeout(()=>{t.open&&t.close()},300):"function"==typeof t?.hidePopover&&t.matches?.(":popover-open")&&(this._closeTimeout=setTimeout(()=>{t.matches?.(":popover-open")&&t.hidePopover(),t.removeAttribute("popover")},300)),this.floater.hideBib(e),"disconnect"===e&&this.floater.disconnect()}render(){return o`
10
+ `}}class Pe extends a{constructor(e){super(),this.behavior=e,this.floater=void 0,this._showGeneration=0;const t=`${this.floaterConfig.prefix.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}-bib`;this.floaterBibTag=c.prototype.generateTag(t,"0.0.0",Ue)}get floaterConfig(){return{prefix:"auroFloater"}}static get properties(){return{isPopoverVisible:{attribute:"open",type:Boolean,reflect:!0},triggerElement:{attribute:!1}}}firstUpdated(){this.floater=new Me(this,this.behavior),this.floater.configure(this,this.floaterConfig.prefix),this.bib.addEventListener("dialog-cancel",()=>{this.modal||this.hide()}),this.bib.addEventListener("dialog-backdrop-click",()=>{this.modal||Me.topOpeningFloatingUI===this.floater&&this.hide()})}disconnectedCallback(){this.floater&&(this.hide(),this.floater.disconnect()),super.disconnectedCallback()}updated(e){this.floater.handleUpdate(e),e.has("triggerElement")&&(this.floater.configure(this,this.floaterConfig.prefix),this.bib.bibLabel=this.triggerElement?.textContent.trim()),e.has("isPopoverVisible")&&(this.isPopoverVisible?this.show():this.hide())}async show(){const e=++this._showGeneration;if(clearTimeout(this._closeTimeout),this.floater.showBib(),this.bib?.dialog||await(this.bib?.updateComplete),!this.bib?.dialog||this._showGeneration!==e)return;const t=this.nested??!1,o=this.modal??!1,s=this.bib.dialog;t?s.setAttribute("open",""):o?(s.removeAttribute("popover"),s.open||s.showModal()):"function"==typeof s.showPopover?(s.setAttribute("popover","manual"),s.matches(":popover-open")||s.showPopover()):(s.removeAttribute("popover"),s.open||s.show())}hide(){this._showGeneration++,clearTimeout(this._closeTimeout);const e=this.bib?.dialog;e?.open?this._closeTimeout=setTimeout(()=>{e.open&&e.close()},300):"function"==typeof e?.hidePopover&&e.matches?.(":popover-open")&&(this._closeTimeout=setTimeout(()=>{e.matches?.(":popover-open")&&e.hidePopover(),e.removeAttribute("popover")},300)),this.floater.hideBib()}render(){return o`
11
11
  <${this.floaterBibTag} id="bib"
12
12
  ?data-show=${this.isPopoverVisible}
13
13
  ?onBackdrop="${this.floaterConfig.backdrop}">
package/dist/index.d.ts CHANGED
@@ -151,7 +151,7 @@ When expanded, the drawer will automatically display in fullscreen mode if the s
151
151
  * Methods that can be called to access component functionality.
152
152
  *
153
153
  * - `_initializeDefaults() => void`: undefined
154
- * - `hide(eventType = undefined) => void`: Closes the native dialog.
154
+ * - `hide() => void`: Closes the native dialog.
155
155
  * - `register(name?: string = "auro-drawer") => void`: This will register this element with the browser.
156
156
  * - `show() => void`: Opens the native dialog inside the bib.
157
157
  *
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- export{A as AuroDrawer}from"./auro-drawer-D5hcFB1h.js";import"lit/static-html.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
1
+ export{A as AuroDrawer}from"./auro-drawer-DXXjIJTE.js";import"lit/static-html.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";
@@ -1 +1 @@
1
- import{A as i}from"./auro-drawer-D5hcFB1h.js";import"lit/static-html.js";import"lit";import"lit/directives/class-map.js";import"lit/directives/if-defined.js";i.register();
1
+ import{A as i}from"./auro-drawer-DXXjIJTE.js";import"lit/static-html.js";import"lit";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-pr131.26",
10
+ "version": "0.0.0-pr131.27",
11
11
  "description": "auro-drawer HTML custom element",
12
12
  "repository": {
13
13
  "type": "git",