@fluentui/web-components 3.0.0-beta.104 → 3.0.0-beta.105

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/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @fluentui/web-components
2
2
 
3
- This log was last generated on Fri, 23 May 2025 04:06:32 GMT and should not be manually modified.
3
+ This log was last generated on Mon, 26 May 2025 04:07:24 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## [3.0.0-beta.105](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.105)
8
+
9
+ Mon, 26 May 2025 04:07:24 GMT
10
+ [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.104..@fluentui/web-components_v3.0.0-beta.105)
11
+
12
+ ### Changes
13
+
14
+ - fix: dialog click event prevents default for arbitrary content clicks ([PR #34511](https://github.com/microsoft/fluentui/pull/34511) by 863023+radium-v@users.noreply.github.com)
15
+
7
16
  ## [3.0.0-beta.104](https://github.com/microsoft/fluentui/tree/@fluentui/web-components_v3.0.0-beta.104)
8
17
 
9
- Fri, 23 May 2025 04:06:32 GMT
18
+ Fri, 23 May 2025 04:06:43 GMT
10
19
  [Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/web-components_v3.0.0-beta.103..@fluentui/web-components_v3.0.0-beta.104)
11
20
 
12
21
  ### Changes
@@ -71,7 +71,6 @@ export class Dialog extends FASTElement {
71
71
  * @returns boolean
72
72
  */
73
73
  clickHandler(event) {
74
- event.preventDefault();
75
74
  if (this.dialog.open && this.type !== DialogType.alert && event.target === this.dialog) {
76
75
  this.hide();
77
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../../src/dialog/dialog.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,yBAAyB,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AAM,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,UAAU,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;YACvF,IAAI,CAAC,IAAI,EAAE,CAAC;QACd,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;CACF;AAtFQ;IADN,UAAU;sCACuB;AAO3B;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC;+CACR;AAOzB;IADN,IAAI,CAAC,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;8CACR;AAOxB;IADN,IAAI;oCACsC"}
@@ -6726,7 +6726,6 @@ class Dialog extends FASTElement {
6726
6726
  * @returns boolean
6727
6727
  */
6728
6728
  clickHandler(event) {
6729
- event.preventDefault();
6730
6729
  if (this.dialog.open && this.type !== DialogType.alert && event.target === this.dialog) {
6731
6730
  this.hide();
6732
6731
  }
@@ -406,7 +406,7 @@ const p=Object.freeze({prefix:"fluent",shadowRootMode:"open",registry:customElem
406
406
  ${ra}
407
407
  ${ta}
408
408
 
409
- :host(:is([dot],[dot][appearance][size])){min-width:auto;width:6px;height:6px;padding:0}`;function $u(o={}){return aa({defaultContent:b`${e=>e.setCount()}`})}const yu=$u(),xu=We.compose({name:`${p.prefix}-counter-badge`,template:yu,styles:vu});xu.define(p.registry);const ct={modal:"modal",nonModal:"non-modal",alert:"alert"};function la(o,e="-dialog"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}var ku=Object.defineProperty,wu=Object.getOwnPropertyDescriptor,Ci=(o,e,t,i)=>{for(var r=i>1?void 0:i?wu(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ku(e,t,r),r};class wo extends ${constructor(){super(...arguments),this.type=ct.modal,this.emitBeforeToggle=()=>{this.$emit("beforetoggle",{oldState:this.dialog.open?"open":"closed",newState:this.dialog.open?"closed":"open"})},this.emitToggle=()=>{this.$emit("toggle",{oldState:this.dialog.open?"closed":"open",newState:this.dialog.open?"open":"closed"})}}show(){Q.enqueue(()=>{this.emitBeforeToggle(),this.type===ct.alert||this.type===ct.modal?this.dialog.showModal():this.type===ct.nonModal&&this.dialog.show(),this.emitToggle()})}hide(){this.emitBeforeToggle(),this.dialog.close(),this.emitToggle()}clickHandler(e){return e.preventDefault(),this.dialog.open&&this.type!==ct.alert&&e.target===this.dialog&&this.hide(),!0}}Ci([g],wo.prototype,"dialog",2),Ci([a({attribute:"aria-describedby"})],wo.prototype,"ariaDescribedby",2),Ci([a({attribute:"aria-labelledby"})],wo.prototype,"ariaLabelledby",2),Ci([a],wo.prototype,"type",2);const Cu=b`<dialog role="${o=>o.type===ct.alert?"alertdialog":"dialog"}" type="${o=>o.type}" class="dialog" part="dialog" aria-modal="${o=>o.type===ct.modal||o.type===ct.alert?"true":void 0}" aria-describedby="${o=>o.ariaDescribedby}" aria-labelledby="${o=>o.ariaLabelledby}" aria-label="${o=>o.ariaLabel}" @click="${(o,e)=>o.clickHandler(e.event)}" @cancel="${o=>o.hide()}" ${W("dialog")}><slot></slot></dialog>`,Su=u`
409
+ :host(:is([dot],[dot][appearance][size])){min-width:auto;width:6px;height:6px;padding:0}`;function $u(o={}){return aa({defaultContent:b`${e=>e.setCount()}`})}const yu=$u(),xu=We.compose({name:`${p.prefix}-counter-badge`,template:yu,styles:vu});xu.define(p.registry);const ct={modal:"modal",nonModal:"non-modal",alert:"alert"};function la(o,e="-dialog"){return o?.nodeType!==Node.ELEMENT_NODE?!1:o.tagName.toLowerCase().endsWith(e)}var ku=Object.defineProperty,wu=Object.getOwnPropertyDescriptor,Ci=(o,e,t,i)=>{for(var r=i>1?void 0:i?wu(e,t):e,s=o.length-1,n;s>=0;s--)(n=o[s])&&(r=(i?n(e,t,r):n(r))||r);return i&&r&&ku(e,t,r),r};class wo extends ${constructor(){super(...arguments),this.type=ct.modal,this.emitBeforeToggle=()=>{this.$emit("beforetoggle",{oldState:this.dialog.open?"open":"closed",newState:this.dialog.open?"closed":"open"})},this.emitToggle=()=>{this.$emit("toggle",{oldState:this.dialog.open?"closed":"open",newState:this.dialog.open?"open":"closed"})}}show(){Q.enqueue(()=>{this.emitBeforeToggle(),this.type===ct.alert||this.type===ct.modal?this.dialog.showModal():this.type===ct.nonModal&&this.dialog.show(),this.emitToggle()})}hide(){this.emitBeforeToggle(),this.dialog.close(),this.emitToggle()}clickHandler(e){return this.dialog.open&&this.type!==ct.alert&&e.target===this.dialog&&this.hide(),!0}}Ci([g],wo.prototype,"dialog",2),Ci([a({attribute:"aria-describedby"})],wo.prototype,"ariaDescribedby",2),Ci([a({attribute:"aria-labelledby"})],wo.prototype,"ariaLabelledby",2),Ci([a],wo.prototype,"type",2);const Cu=b`<dialog role="${o=>o.type===ct.alert?"alertdialog":"dialog"}" type="${o=>o.type}" class="dialog" part="dialog" aria-modal="${o=>o.type===ct.modal||o.type===ct.alert?"true":void 0}" aria-describedby="${o=>o.ariaDescribedby}" aria-labelledby="${o=>o.ariaLabelledby}" aria-label="${o=>o.ariaLabel}" @click="${(o,e)=>o.clickHandler(e.event)}" @cancel="${o=>o.hide()}" ${W("dialog")}><slot></slot></dialog>`,Su=u`
410
410
  @layer base{:host{--dialog-backdrop:${pr};--dialog-starting-scale:0.85}::backdrop{background:var(--dialog-backdrop,rgba(0,0,0,0.4))}dialog{background:${I};border-radius:${En};border:none;box-shadow:${qn};color:${P};max-height:calc(-48px + 100vh);padding:0;width:100%;max-width:600px}:host([type='non-modal']) dialog{inset:0;position:fixed;z-index:2;overflow:auto}}@layer animations{@media (prefers-reduced-motion:no-preference){dialog,::backdrop{transition:display allow-discrete,opacity,overlay allow-discrete,scale;transition-duration:${Cr};transition-timing-function:${Ct};opacity:0}::backdrop{transition-timing-function:${Ir}}[open],[open]::backdrop{opacity:1}dialog:not([open]){scale:var(--dialog-starting-scale);transition-timing-function:${wt}}}@starting-style{[open],[open]::backdrop{opacity:0}dialog{scale:var(--dialog-starting-scale)}}}`.withBehaviors(X(u`
411
411
  @layer base{dialog{border:${T} solid ${J}}}`)),Iu=wo.compose({name:`${p.prefix}-dialog`,template:Cu,styles:Su});Iu.define(p.registry);class Pu extends ${clickHandler(e){if(!e.defaultPrevented){const t=this.parentElement;la(t)&&t.hide()}return!0}}const zu=b`<template><div class="title" part="title"><slot name="title"></slot><slot name="title-action"></slot><slot name="close" @click="${(o,e)=>o.clickHandler(e.event)}"></slot></div><div class="content" part="content"><slot></slot></div><div class="actions" part="actions"><slot name="action"></slot></div></template>`,Tu=u`
412
412
  ${k("grid")}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fluentui/web-components",
3
3
  "description": "A library of Fluent Web Components",
4
- "version": "3.0.0-beta.104",
4
+ "version": "3.0.0-beta.105",
5
5
  "author": {
6
6
  "name": "Microsoft",
7
7
  "url": "https://discord.gg/FcSNfg4"