@webority/ui-react 0.141.0 → 0.142.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.
@@ -59913,7 +59913,7 @@ function IUe() {
59913
59913
  return typeof document < "u" && document.querySelector("wui-drawer[open], .offcanvas.show") !== null;
59914
59914
  }
59915
59915
  function DG(e) {
59916
- let { marker: r, props: i } = U("AppModal", e), { open: a, eyebrow: o, title: s, subtitle: c, headerIcon: l, tone: u = "neutral", dismissible: d = !0, onClose: f, onBack: m, backLabel: g = "Back", headerActions: _, footer: v, size: y = "md", placement: b = "center", hideHeader: x = !1, staticBackdrop: w = !1, confirmDiscard: T, dirty: E = !1, ariaLabel: D, closeLabel: O = "Close", className: k = "", children: A, ...j } = i;
59916
+ let { marker: r, props: i } = U("AppModal", e), { open: a, eyebrow: o, title: s, subtitle: c, headerIcon: l, tone: u = "neutral", dismissible: d = !0, onClose: f, onBack: m, backLabel: g = "Back", headerActions: _, footer: v, size: y = "md", placement: b = "center", hideHeader: x = !1, staticBackdrop: w = !0, confirmDiscard: T, dirty: E = !1, ariaLabel: D, closeLabel: O = "Close", className: k = "", children: A, ...j } = i;
59917
59917
  G("AppModal", j), W("AppModal", "tone", u, OUe), W("AppModal", "placement", b, kUe), W("AppModal", "size", typeof y == "string" ? y : null, [...Object.keys(EG), "fullscreen"]);
59918
59918
  let { style: M, ref: N, "data-wui": P, "data-wui-props": F, ...I } = j, L = P ? {
59919
59919
  "data-wui": P,
@@ -60371,6 +60371,7 @@ function qUe(e) {
60371
60371
  ...n,
60372
60372
  open: i,
60373
60373
  onClose: a,
60374
+ staticBackdrop: !1,
60374
60375
  hideHeader: !0,
60375
60376
  placement: "top",
60376
60377
  size: KUe,
@@ -62422,7 +62423,7 @@ var eK = (e) => function({ size: n = 72 }) {
62422
62423
  "primary"
62423
62424
  ];
62424
62425
  function nGe(r) {
62425
- let { marker: i, props: a } = U("AppConfirmDialog", r), { open: o, title: s, variant: c = "default", description: l, confirmLabel: u = "Confirm", cancelLabel: d = "Cancel", typePhraseLabel: f = "Type {phrase} to confirm", tone: p, image: m, icon: g, iconSize: _, confirmPhrase: v, onConfirm: y, onClose: b, loading: x = !1, staticBackdrop: S = !1, placement: w = "center", size: T = "md", className: E = "", children: D, ...O } = a;
62426
+ let { marker: i, props: a } = U("AppConfirmDialog", r), { open: o, title: s, variant: c = "default", description: l, confirmLabel: u = "Confirm", cancelLabel: d = "Cancel", typePhraseLabel: f = "Type {phrase} to confirm", tone: p, image: m, icon: g, iconSize: _, confirmPhrase: v, onConfirm: y, onClose: b, loading: x = !1, staticBackdrop: S = !0, placement: w = "center", size: T = "md", className: E = "", children: D, ...O } = a;
62426
62427
  G("AppConfirmDialog", O), W("AppConfirmDialog", "tone", p, tGe), W("AppConfirmDialog", "size", typeof T == "string" ? T : null, $We), W("AppConfirmDialog", "variant", c, eGe);
62427
62428
  let [k, A] = C("");
62428
62429
  if (h(() => {
@@ -68435,7 +68436,7 @@ var DJe = ["end", "start"], OJe = [
68435
68436
  "xl"
68436
68437
  ], kJe = [50, 90], AJe = (e) => Array.isArray(e) && e.length > 0 && e.every((e) => Number.isFinite(e) && e >= 10 && e <= 100);
68437
68438
  function jJe(e) {
68438
- let { marker: r, props: i } = U("AppDrawer", e), { open: a = !1, onClose: o, title: s, titleIcon: c, header: l, subtitle: u, ariaLabel: d, side: f = "end", size: p = "md", width: m, maxWidth: g, snapPoints: _ = kJe, defaultSnap: v = 0, sheet: y = !0, onSnapChange: b, onOpened: x, onClosed: w, dismissible: T = !0, closeLabel: E = "Close", sheetHeightLabel: D = "Sheet height", staticBackdrop: O = !1, confirmDiscard: k, dirty: A = !1, headerClassName: j = "", bodyClassName: M = "", footer: N, className: P = "", style: F, children: I, ...L } = i;
68439
+ let { marker: r, props: i } = U("AppDrawer", e), { open: a = !1, onClose: o, title: s, titleIcon: c, header: l, subtitle: u, ariaLabel: d, side: f = "end", size: p = "md", width: m, maxWidth: g, snapPoints: _ = kJe, defaultSnap: v = 0, sheet: y = !0, onSnapChange: b, onOpened: x, onClosed: w, dismissible: T = !0, closeLabel: E = "Close", sheetHeightLabel: D = "Sheet height", staticBackdrop: O = !0, confirmDiscard: k, dirty: A = !1, headerClassName: j = "", bodyClassName: M = "", footer: N, className: P = "", style: F, children: I, ...L } = i;
68439
68440
  G("AppDrawer", L), W("AppDrawer", "side", f, DJe), W("AppDrawer", "size", p, OJe), W("AppDrawer", "snapPoints", AJe(_) ? void 0 : JSON.stringify(_), ["an array of numbers from 10 to 100"]);
68440
68441
  let R = S(null), z = S(null), B = S(null), [V, ee] = C(!1);
68441
68442
  z.current = {
@@ -134402,7 +134403,7 @@ var tSt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
134402
134403
  kind: "WeborityWeb",
134403
134404
  library: {
134404
134405
  name: "@webority/ui-react",
134405
- version: "0.141.0"
134406
+ version: "0.142.0"
134406
134407
  },
134407
134408
  rendererProtocolVersion: 13,
134408
134409
  platform: "Web",
@@ -140170,8 +140171,8 @@ var tSt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
140170
140171
  name: "staticBackdrop",
140171
140172
  type: "boolean",
140172
140173
  required: !1,
140173
- description: "Passed to AppModal: when true, a backdrop click and Escape no longer close the dialog.",
140174
- default: !1
140174
+ description: "The dialog closes only through its own Cancel or Confirm by default. false lets Escape and an outside click close it.",
140175
+ default: !0
140175
140176
  },
140176
140177
  {
140177
140178
  name: "title",
@@ -140264,7 +140265,7 @@ var tSt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
140264
140265
  }]
140265
140266
  }],
140266
140267
  a11y: [
140267
- "The dialog is built on AppModal, so it traps focus, closes on Escape and restores focus.",
140268
+ "The dialog is built on AppModal, so it traps focus, closes on Escape only when staticBackdrop is false, and restores focus.",
140268
140269
  "The title is an h3 that takes focus when the dialog opens.",
140269
140270
  "A custom image is hidden from assistive technology with an empty alt, so the title and message carry the meaning.",
140270
140271
  "The confirm-phrase field is named \"Type <phrase> to confirm\", and Confirm stays disabled until the phrase matches.",
@@ -142113,8 +142114,8 @@ var tSt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142113
142114
  name: "staticBackdrop",
142114
142115
  type: "boolean",
142115
142116
  required: !1,
142116
- description: "The backdrop, Escape and a drag down no longer close it; only the close button or open can.",
142117
- default: !1
142117
+ description: "The drawer closes only through its own Close or Cancel by default. false lets Escape and an outside click close it.",
142118
+ default: !0
142118
142119
  },
142119
142120
  {
142120
142121
  name: "style",
@@ -142168,7 +142169,7 @@ var tSt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
142168
142169
  a11y: [
142169
142170
  "The panel has role dialog with aria-modal and is named by ariaLabel, else by the title.",
142170
142171
  "The sheet handle is a vertical slider labelled Sheet height, and the close button is labelled Close.",
142171
- "Focus moves in on open, Tab stays inside, Escape closes, and focus returns to what opened it."
142172
+ "Focus moves in on open, Tab stays inside, Escape leaves it open unless staticBackdrop is false, and focus returns to what opened it."
142172
142173
  ]
142173
142174
  }
142174
142175
  },
@@ -146830,7 +146831,7 @@ var tSt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
146830
146831
  example: [{
146831
146832
  component: "AppLink",
146832
146833
  props: {
146833
- href: "#best",
146834
+ href: "#guidance",
146834
146835
  rightIcon: "arrow-right"
146835
146836
  },
146836
146837
  children: "See pricing"
@@ -146842,7 +146843,7 @@ var tSt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
146842
146843
  example: [{
146843
146844
  component: "AppLink",
146844
146845
  props: {
146845
- href: "#best",
146846
+ href: "#guidance",
146846
146847
  animation: "glow"
146847
146848
  },
146848
146849
  children: "Click here"
@@ -147471,8 +147472,8 @@ var tSt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
147471
147472
  name: "staticBackdrop",
147472
147473
  type: "boolean",
147473
147474
  required: !1,
147474
- description: "When true, a backdrop click and the Escape key no longer close the dialog.",
147475
- default: !1
147475
+ description: "The pop-up closes only through its own Close or Cancel by default. false lets Escape and an outside click close it.",
147476
+ default: !0
147476
147477
  },
147477
147478
  {
147478
147479
  name: "subtitle",
@@ -147525,7 +147526,7 @@ var tSt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
147525
147526
  ],
147526
147527
  do: [{
147527
147528
  title: "One trigger, one dialog",
147528
- note: "A clear trigger opens a single-purpose dialog; open/onClose stay controlled so Escape and the backdrop always work.",
147529
+ note: "A clear trigger opens a single-purpose dialog; open and onClose stay controlled so the close control always works.",
147529
147530
  example: [{
147530
147531
  component: "AppButton",
147531
147532
  children: "Edit project"
@@ -147579,7 +147580,7 @@ var tSt = d(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
147579
147580
  a11y: [
147580
147581
  "Focus stays inside the dialog: Tab and Shift+Tab wrap between its first and last control.",
147581
147582
  "The page behind an open dialog is made inert, and the dialog is named by a plain-text title or by ariaLabel; a headerless dialog with neither warns in development.",
147582
- "Escape and a backdrop click close it, unless staticBackdrop is set."
147583
+ "Escape and an outside click leave it open by default; set staticBackdrop to false to let them close it."
147583
147584
  ]
147584
147585
  }
147585
147586
  },
@@ -2,7 +2,7 @@
2
2
  "kind": "WeborityWeb",
3
3
  "library": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.141.0"
5
+ "version": "0.142.0"
6
6
  },
7
7
  "rendererProtocolVersion": 13,
8
8
  "platform": "Web",
@@ -6336,8 +6336,8 @@
6336
6336
  "name": "staticBackdrop",
6337
6337
  "type": "boolean",
6338
6338
  "required": false,
6339
- "description": "Passed to AppModal: when true, a backdrop click and Escape no longer close the dialog.",
6340
- "default": false
6339
+ "description": "The dialog closes only through its own Cancel or Confirm by default. false lets Escape and an outside click close it.",
6340
+ "default": true
6341
6341
  },
6342
6342
  {
6343
6343
  "name": "title",
@@ -6454,7 +6454,7 @@
6454
6454
  }
6455
6455
  ],
6456
6456
  "a11y": [
6457
- "The dialog is built on AppModal, so it traps focus, closes on Escape and restores focus.",
6457
+ "The dialog is built on AppModal, so it traps focus, closes on Escape only when staticBackdrop is false, and restores focus.",
6458
6458
  "The title is an h3 that takes focus when the dialog opens.",
6459
6459
  "A custom image is hidden from assistive technology with an empty alt, so the title and message carry the meaning.",
6460
6460
  "The confirm-phrase field is named \"Type <phrase> to confirm\", and Confirm stays disabled until the phrase matches.",
@@ -8435,8 +8435,8 @@
8435
8435
  "name": "staticBackdrop",
8436
8436
  "type": "boolean",
8437
8437
  "required": false,
8438
- "description": "The backdrop, Escape and a drag down no longer close it; only the close button or open can.",
8439
- "default": false
8438
+ "description": "The drawer closes only through its own Close or Cancel by default. false lets Escape and an outside click close it.",
8439
+ "default": true
8440
8440
  },
8441
8441
  {
8442
8442
  "name": "style",
@@ -8493,7 +8493,7 @@
8493
8493
  "a11y": [
8494
8494
  "The panel has role dialog with aria-modal and is named by ariaLabel, else by the title.",
8495
8495
  "The sheet handle is a vertical slider labelled Sheet height, and the close button is labelled Close.",
8496
- "Focus moves in on open, Tab stays inside, Escape closes, and focus returns to what opened it."
8496
+ "Focus moves in on open, Tab stays inside, Escape leaves it open unless staticBackdrop is false, and focus returns to what opened it."
8497
8497
  ]
8498
8498
  }
8499
8499
  },
@@ -13518,7 +13518,7 @@
13518
13518
  {
13519
13519
  "component": "AppLink",
13520
13520
  "props": {
13521
- "href": "#best",
13521
+ "href": "#guidance",
13522
13522
  "rightIcon": "arrow-right"
13523
13523
  },
13524
13524
  "children": "See pricing"
@@ -13534,7 +13534,7 @@
13534
13534
  {
13535
13535
  "component": "AppLink",
13536
13536
  "props": {
13537
- "href": "#best",
13537
+ "href": "#guidance",
13538
13538
  "animation": "glow"
13539
13539
  },
13540
13540
  "children": "Click here"
@@ -14205,8 +14205,8 @@
14205
14205
  "name": "staticBackdrop",
14206
14206
  "type": "boolean",
14207
14207
  "required": false,
14208
- "description": "When true, a backdrop click and the Escape key no longer close the dialog.",
14209
- "default": false
14208
+ "description": "The pop-up closes only through its own Close or Cancel by default. false lets Escape and an outside click close it.",
14209
+ "default": true
14210
14210
  },
14211
14211
  {
14212
14212
  "name": "subtitle",
@@ -14263,7 +14263,7 @@
14263
14263
  "do": [
14264
14264
  {
14265
14265
  "title": "One trigger, one dialog",
14266
- "note": "A clear trigger opens a single-purpose dialog; open/onClose stay controlled so Escape and the backdrop always work.",
14266
+ "note": "A clear trigger opens a single-purpose dialog; open and onClose stay controlled so the close control always works.",
14267
14267
  "example": [
14268
14268
  {
14269
14269
  "component": "AppButton",
@@ -14341,7 +14341,7 @@
14341
14341
  "a11y": [
14342
14342
  "Focus stays inside the dialog: Tab and Shift+Tab wrap between its first and last control.",
14343
14343
  "The page behind an open dialog is made inert, and the dialog is named by a plain-text title or by ariaLabel; a headerless dialog with neither warns in development.",
14344
- "Escape and a backdrop click close it, unless staticBackdrop is set."
14344
+ "Escape and an outside click leave it open by default; set staticBackdrop to false to let them close it."
14345
14345
  ]
14346
14346
  }
14347
14347
  },
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "webority-web",
3
- "version": "0.141.0",
3
+ "version": "0.142.0",
4
4
  "platform": "Web",
5
5
  "kitModuleVersion": 2,
6
6
  "rendererProtocolVersion": 13,
7
7
  "library": {
8
8
  "name": "@webority/ui-react",
9
- "version": "0.141.0"
9
+ "version": "0.142.0"
10
10
  },
11
11
  "files": {
12
12
  "manifest.json": {
13
- "sha256": "c9ce4e4b0e653a042672a9bf03b6011f817227f2d1121d3dfd4963967640144b",
14
- "bytes": 979840
13
+ "sha256": "8b2f3c83465ad376ed4640af60840333e2b347f70bba33b6fefec9758c8af149",
14
+ "bytes": 980050
15
15
  },
16
16
  "kit.js": {
17
- "sha256": "fd5c98c34713394ef840d78662a18b4beaeecacad04ff983211e0a06a54357a1",
18
- "bytes": 11171914
17
+ "sha256": "6ac81ae68d18df095630fb0e67c74b30ae004f7c2feeea1b91da021083e5e5c3",
18
+ "bytes": 11172149
19
19
  },
20
20
  "kit.css": {
21
21
  "sha256": "13b14f71fb6ea024945f95cba617b4f1d49f44a65ba7c7ed05d2354805539ef6",
@@ -1 +1 @@
1
- import{shortcutAria as e,shortcutChip as t}from"../lib/shortcutChip.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppIcon.js";import i from"./AppModal.js";import a from"./AppSpinner.js";import o from"./renderIconProp.js";import s from"./warnUnknownProps.js";import{matchSegments as c}from"@webority/ui-elements/helpers";import{Fragment as l,useEffect as u,useId as d,useLayoutEffect as f,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import"@webority/ui-elements/elements/command-palette";var _=`lg`;function v(e){let{marker:t,props:r}=n(`AppCommandPalette`,e),{open:a,onClose:o,query:c=``,onQueryChange:l,placeholder:u=`Search…`,groups:f=[],path:p=[],onPathChange:m,rootLabel:g,backLabel:v=`Back`,recentsKey:b,recentsLimit:x,recentsLabel:S,loading:C=!1,emptyText:w=`No results`,footer:T,ariaLabel:E=`Search`,resultsLabel:D=`Results`,highlight:O=!0,groupFilter:k=!1,id:A,className:j=``,...M}=r;s(`AppCommandPalette`,M);let N=d(),P=A||N;return/* @__PURE__ */ h(i,{...t,open:a,onClose:o,hideHeader:!0,placement:`top`,size:_,ariaLabel:E,className:`wui-cmd-card${j?` ${j}`:``}`,children:/* @__PURE__ */ h(y,{baseId:P,query:c,onQueryChange:l,placeholder:u,groups:f,path:p,onPathChange:m,rootLabel:g,backLabel:v,recentsKey:b,recentsLimit:x,recentsLabel:S,loading:C,emptyText:w,footer:T,ariaLabel:E,resultsLabel:D,highlight:O,groupFilter:k,onClose:o,rest:M})})}function y({baseId:n,query:i,onQueryChange:s,placeholder:c,groups:l,path:d,onPathChange:_,rootLabel:v,backLabel:y,recentsKey:C,recentsLimit:w,recentsLabel:T,loading:E,emptyText:D,footer:O,ariaLabel:k,resultsLabel:A,highlight:j,groupFilter:M,onClose:N,rest:P}){let F=p(null),I=`${n}-list`,L=l.filter(e=>e.items?.length),R=!E&&i.trim()!==``&&L.length===0,[z,B]=m({query:i,key:null}),V=z.query===i&&L.some(e=>String(e.key)===z.key)?z.key:null,H=M&&V!=null?L.filter(e=>String(e.key)===V):L,U=M&&L.length>0,W=e=>B({query:i,key:e}),G=e=>{if(!U||e.key!==`Tab`)return;e.preventDefault();let t=[x,...L.map(e=>String(e.key))],n=t[(Math.max(0,t.indexOf(V??x))+(e.shiftKey?-1:1)+t.length)%t.length];W(n===x?null:n)};return f(()=>{F.current?.refresh?.()}),u(()=>{let e=F.current,t=e=>{let t=l.find(t=>String(t.key)===e.detail.groupKey)?.items?.find(t=>String(t.key)===e.detail.key);t&&(e.preventDefault(),t.page?(s?.(``),_?.([...d,{key:t.page.key,label:t.page.label}])):(t.onSelect?.(),N?.()))},n=e=>{e.preventDefault(),s?.(``),_?.(e.detail.path)};return e.addEventListener(`wui-command-palette:select`,t),e.addEventListener(`wui-command-palette:navigate`,n),()=>{e.removeEventListener(`wui-command-palette:select`,t),e.removeEventListener(`wui-command-palette:navigate`,n)}},[l,d,N,s,_]),/* @__PURE__ */ g(`wui-command-palette`,{ref:F,path:JSON.stringify(d),"root-label":v,"recents-key":C,"recents-limit":w,"recents-label":T,...P,children:[/* @__PURE__ */ g(`div`,{className:`wui-cmd-search`,children:[/* @__PURE__ */ h(`span`,{className:`wui-cmd-search-icon`,"aria-hidden":`true`,children:/* @__PURE__ */ h(r,{name:`search`,size:18})}),/* @__PURE__ */ h(`input`,{className:`wui-cmd-input`,type:`text`,role:`combobox`,"aria-expanded":`true`,"aria-controls":I,"aria-autocomplete":`list`,"aria-label":k,placeholder:c,autoComplete:`off`,spellCheck:!1,"data-autofocus":``,value:i,onChange:e=>s?.(e.target.value),onKeyDown:G}),E&&/* @__PURE__ */ h(a,{size:`sm`,className:`wui-cmd-spinner`})]}),U&&/* @__PURE__ */ h(`div`,{className:`wui-cmd-tabs app-tabs app-tabs-pills app-tabs-sm`,role:`tablist`,"aria-label":`Result groups`,children:[{key:``,label:`All (${L.reduce((e,t)=>e+t.items.length,0)})`},...L.map(e=>({key:String(e.key),label:`${e.label} (${e.items.length})`}))].map(e=>{let t=(V??``)===e.key;return/* @__PURE__ */ h(`button`,{type:`button`,className:t?`app-tab active`:`app-tab`,role:`tab`,"aria-selected":t?`true`:`false`,tabIndex:-1,"data-group-tab":e.key,onClick:()=>W(e.key===``?null:e.key),children:/* @__PURE__ */ h(`span`,{className:`wui-tab-label`,children:e.label})},e.key||x)})}),/* @__PURE__ */ g(`div`,{className:`wui-cmd-crumbs`,hidden:!0,children:[/* @__PURE__ */ h(`button`,{type:`button`,className:`wui-cmd-back`,"aria-label":y,children:/* @__PURE__ */ h(r,{name:`chevron-left`,size:16})}),/* @__PURE__ */ h(`ol`,{className:`wui-cmd-trail`})]}),/* @__PURE__ */ g(`div`,{className:`wui-cmd-list`,role:`listbox`,id:I,"aria-label":A,"aria-busy":E?`true`:void 0,hidden:L.length===0,children:[/* @__PURE__ */ h(`div`,{className:`wui-cmd-recents`}),H.map(a=>{let s=`${n}-${S(a.key)}`;return/* @__PURE__ */ g(`div`,{className:`wui-cmd-group`,role:`group`,"aria-labelledby":s,children:[/* @__PURE__ */ h(`div`,{className:`wui-cmd-group-label`,role:`presentation`,id:s,children:a.label}),a.items.map(n=>{let c=`${s}-${S(n.key)}`,l=n.description==null?null:`${c}-desc`,u=n.meta==null?null:`${c}-meta`;return/* @__PURE__ */ g(`div`,{className:`wui-cmd-item`,role:`option`,id:c,"data-group-key":String(a.key),"data-key":String(n.key),"data-opens":n.page?String(n.page.key):void 0,"data-keywords":n.keywords?.length?n.keywords.join(` `):void 0,"aria-label":n.ariaLabel||(typeof n.label==`string`?n.label:``)||void 0,"aria-describedby":[l,u].filter(Boolean).join(` `)||void 0,"aria-disabled":n.disabled?`true`:void 0,"aria-keyshortcuts":e(n.shortcut),children:[n.icon!=null&&/* @__PURE__ */ h(`span`,{className:`wui-cmd-item-icon`,"aria-hidden":`true`,children:o(n.icon,{size:18})}),/* @__PURE__ */ g(`span`,{className:`wui-cmd-item-text`,children:[/* @__PURE__ */ h(`span`,{className:`wui-cmd-item-label`,children:j?b(n.label,i):n.label}),l&&/* @__PURE__ */ h(`span`,{className:`wui-cmd-item-desc`,id:l,children:n.description})]}),u&&/* @__PURE__ */ h(`span`,{className:`wui-cmd-item-meta`,id:u,children:n.meta}),t(n.shortcut),n.page&&/* @__PURE__ */ h(`span`,{className:`wui-cmd-item-chevron`,"aria-hidden":`true`,children:/* @__PURE__ */ h(r,{name:`chevron-right`,size:16})})]},n.key)})]},a.key)})]}),/* @__PURE__ */ h(`div`,{className:`wui-cmd-empty`,role:`status`,children:R?D:null}),O!=null&&/* @__PURE__ */ h(`div`,{className:`wui-cmd-footer`,children:O})]})}function b(e,t){if(typeof e!=`string`)return e;let n=c(e,t);if(n.length===1&&!n[0].match)return e;let r=0;return n.map(e=>{let t=r;return r+=e.text.length,e.match?/* @__PURE__ */ h(`mark`,{className:`wui-cmd-mark`,children:e.text},t):/* @__PURE__ */ h(l,{children:e.text},t)})}var x=`__all__`;function S(e){return String(e).replace(/\s+/g,`_`)}export{v as default};
1
+ import{shortcutAria as e,shortcutChip as t}from"../lib/shortcutChip.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppIcon.js";import i from"./AppModal.js";import a from"./AppSpinner.js";import o from"./renderIconProp.js";import s from"./warnUnknownProps.js";import{matchSegments as c}from"@webority/ui-elements/helpers";import{Fragment as l,useEffect as u,useId as d,useLayoutEffect as f,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import"@webority/ui-elements/elements/command-palette";var _=`lg`;function v(e){let{marker:t,props:r}=n(`AppCommandPalette`,e),{open:a,onClose:o,query:c=``,onQueryChange:l,placeholder:u=`Search…`,groups:f=[],path:p=[],onPathChange:m,rootLabel:g,backLabel:v=`Back`,recentsKey:b,recentsLimit:x,recentsLabel:S,loading:C=!1,emptyText:w=`No results`,footer:T,ariaLabel:E=`Search`,resultsLabel:D=`Results`,highlight:O=!0,groupFilter:k=!1,id:A,className:j=``,...M}=r;s(`AppCommandPalette`,M);let N=d(),P=A||N;return/* @__PURE__ */ h(i,{...t,open:a,onClose:o,staticBackdrop:!1,hideHeader:!0,placement:`top`,size:_,ariaLabel:E,className:`wui-cmd-card${j?` ${j}`:``}`,children:/* @__PURE__ */ h(y,{baseId:P,query:c,onQueryChange:l,placeholder:u,groups:f,path:p,onPathChange:m,rootLabel:g,backLabel:v,recentsKey:b,recentsLimit:x,recentsLabel:S,loading:C,emptyText:w,footer:T,ariaLabel:E,resultsLabel:D,highlight:O,groupFilter:k,onClose:o,rest:M})})}function y({baseId:n,query:i,onQueryChange:s,placeholder:c,groups:l,path:d,onPathChange:_,rootLabel:v,backLabel:y,recentsKey:C,recentsLimit:w,recentsLabel:T,loading:E,emptyText:D,footer:O,ariaLabel:k,resultsLabel:A,highlight:j,groupFilter:M,onClose:N,rest:P}){let F=p(null),I=`${n}-list`,L=l.filter(e=>e.items?.length),R=!E&&i.trim()!==``&&L.length===0,[z,B]=m({query:i,key:null}),V=z.query===i&&L.some(e=>String(e.key)===z.key)?z.key:null,H=M&&V!=null?L.filter(e=>String(e.key)===V):L,U=M&&L.length>0,W=e=>B({query:i,key:e}),G=e=>{if(!U||e.key!==`Tab`)return;e.preventDefault();let t=[x,...L.map(e=>String(e.key))],n=t[(Math.max(0,t.indexOf(V??x))+(e.shiftKey?-1:1)+t.length)%t.length];W(n===x?null:n)};return f(()=>{F.current?.refresh?.()}),u(()=>{let e=F.current,t=e=>{let t=l.find(t=>String(t.key)===e.detail.groupKey)?.items?.find(t=>String(t.key)===e.detail.key);t&&(e.preventDefault(),t.page?(s?.(``),_?.([...d,{key:t.page.key,label:t.page.label}])):(t.onSelect?.(),N?.()))},n=e=>{e.preventDefault(),s?.(``),_?.(e.detail.path)};return e.addEventListener(`wui-command-palette:select`,t),e.addEventListener(`wui-command-palette:navigate`,n),()=>{e.removeEventListener(`wui-command-palette:select`,t),e.removeEventListener(`wui-command-palette:navigate`,n)}},[l,d,N,s,_]),/* @__PURE__ */ g(`wui-command-palette`,{ref:F,path:JSON.stringify(d),"root-label":v,"recents-key":C,"recents-limit":w,"recents-label":T,...P,children:[/* @__PURE__ */ g(`div`,{className:`wui-cmd-search`,children:[/* @__PURE__ */ h(`span`,{className:`wui-cmd-search-icon`,"aria-hidden":`true`,children:/* @__PURE__ */ h(r,{name:`search`,size:18})}),/* @__PURE__ */ h(`input`,{className:`wui-cmd-input`,type:`text`,role:`combobox`,"aria-expanded":`true`,"aria-controls":I,"aria-autocomplete":`list`,"aria-label":k,placeholder:c,autoComplete:`off`,spellCheck:!1,"data-autofocus":``,value:i,onChange:e=>s?.(e.target.value),onKeyDown:G}),E&&/* @__PURE__ */ h(a,{size:`sm`,className:`wui-cmd-spinner`})]}),U&&/* @__PURE__ */ h(`div`,{className:`wui-cmd-tabs app-tabs app-tabs-pills app-tabs-sm`,role:`tablist`,"aria-label":`Result groups`,children:[{key:``,label:`All (${L.reduce((e,t)=>e+t.items.length,0)})`},...L.map(e=>({key:String(e.key),label:`${e.label} (${e.items.length})`}))].map(e=>{let t=(V??``)===e.key;return/* @__PURE__ */ h(`button`,{type:`button`,className:t?`app-tab active`:`app-tab`,role:`tab`,"aria-selected":t?`true`:`false`,tabIndex:-1,"data-group-tab":e.key,onClick:()=>W(e.key===``?null:e.key),children:/* @__PURE__ */ h(`span`,{className:`wui-tab-label`,children:e.label})},e.key||x)})}),/* @__PURE__ */ g(`div`,{className:`wui-cmd-crumbs`,hidden:!0,children:[/* @__PURE__ */ h(`button`,{type:`button`,className:`wui-cmd-back`,"aria-label":y,children:/* @__PURE__ */ h(r,{name:`chevron-left`,size:16})}),/* @__PURE__ */ h(`ol`,{className:`wui-cmd-trail`})]}),/* @__PURE__ */ g(`div`,{className:`wui-cmd-list`,role:`listbox`,id:I,"aria-label":A,"aria-busy":E?`true`:void 0,hidden:L.length===0,children:[/* @__PURE__ */ h(`div`,{className:`wui-cmd-recents`}),H.map(a=>{let s=`${n}-${S(a.key)}`;return/* @__PURE__ */ g(`div`,{className:`wui-cmd-group`,role:`group`,"aria-labelledby":s,children:[/* @__PURE__ */ h(`div`,{className:`wui-cmd-group-label`,role:`presentation`,id:s,children:a.label}),a.items.map(n=>{let c=`${s}-${S(n.key)}`,l=n.description==null?null:`${c}-desc`,u=n.meta==null?null:`${c}-meta`;return/* @__PURE__ */ g(`div`,{className:`wui-cmd-item`,role:`option`,id:c,"data-group-key":String(a.key),"data-key":String(n.key),"data-opens":n.page?String(n.page.key):void 0,"data-keywords":n.keywords?.length?n.keywords.join(` `):void 0,"aria-label":n.ariaLabel||(typeof n.label==`string`?n.label:``)||void 0,"aria-describedby":[l,u].filter(Boolean).join(` `)||void 0,"aria-disabled":n.disabled?`true`:void 0,"aria-keyshortcuts":e(n.shortcut),children:[n.icon!=null&&/* @__PURE__ */ h(`span`,{className:`wui-cmd-item-icon`,"aria-hidden":`true`,children:o(n.icon,{size:18})}),/* @__PURE__ */ g(`span`,{className:`wui-cmd-item-text`,children:[/* @__PURE__ */ h(`span`,{className:`wui-cmd-item-label`,children:j?b(n.label,i):n.label}),l&&/* @__PURE__ */ h(`span`,{className:`wui-cmd-item-desc`,id:l,children:n.description})]}),u&&/* @__PURE__ */ h(`span`,{className:`wui-cmd-item-meta`,id:u,children:n.meta}),t(n.shortcut),n.page&&/* @__PURE__ */ h(`span`,{className:`wui-cmd-item-chevron`,"aria-hidden":`true`,children:/* @__PURE__ */ h(r,{name:`chevron-right`,size:16})})]},n.key)})]},a.key)})]}),/* @__PURE__ */ h(`div`,{className:`wui-cmd-empty`,role:`status`,children:R?D:null}),O!=null&&/* @__PURE__ */ h(`div`,{className:`wui-cmd-footer`,children:O})]})}function b(e,t){if(typeof e!=`string`)return e;let n=c(e,t);if(n.length===1&&!n[0].match)return e;let r=0;return n.map(e=>{let t=r;return r+=e.text.length,e.match?/* @__PURE__ */ h(`mark`,{className:`wui-cmd-mark`,children:e.text},t):/* @__PURE__ */ h(l,{children:e.text},t)})}var x=`__all__`;function S(e){return String(e).replace(/\s+/g,`_`)}export{v as default};
@@ -1 +1 @@
1
- import e from"../lib/fillLabel.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppButton.js";import r from"./AppIcon.js";import i from"./AppInput.js";import a from"./AppModal.js";import{MODAL_ICONS as o}from"./ModalIcons.js";import s from"./warnInvalidValue.js";import c from"./warnUnknownProps.js";import{useEffect as l,useState as u}from"react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`sm`,`md`,`lg`,`xl`],h=[`default`,`plain`],g=[`success`,`danger`,`warning`,`info`,`primary`];function _(_){let{marker:v,props:y}=t(`AppConfirmDialog`,_),{open:b,title:x,variant:S=`default`,description:C,confirmLabel:w=`Confirm`,cancelLabel:T=`Cancel`,typePhraseLabel:E=`Type {phrase} to confirm`,tone:D,image:O,icon:k,iconSize:A,confirmPhrase:j,onConfirm:M,onClose:N,loading:P=!1,staticBackdrop:F=!1,placement:I=`center`,size:L=`md`,className:R=``,children:z,...B}=y;c(`AppConfirmDialog`,B),s(`AppConfirmDialog`,`tone`,D,g),s(`AppConfirmDialog`,`size`,typeof L==`string`?L:null,m),s(`AppConfirmDialog`,`variant`,S,h);let[V,H]=u(``);if(l(()=>{b||H(``)},[b]),!b)return null;let U=!!j&&V.trim()!==j,[W,...G]=E.split(`{phrase}`),K=G.join(j),q=S===`plain`,J=q?`sm`:`md`,Y=q||O||k?null:o[D===`danger`?`delete`:D??`info`],X=A>0?{"--wui-confirm-icon-size":`${A}px`}:void 0,Z=()=>{P||N?.()};return/* @__PURE__ */ f(a,{...v,...B,open:b,hideHeader:!0,title:x,onClose:Z,staticBackdrop:F,placement:I,size:L,className:[`wui-confirm`,q&&`wui-confirm-plain`,R].filter(Boolean).join(` `),footer:/* @__PURE__ */ p(`div`,{className:`wui-confirm-actions`,children:[/* @__PURE__ */ f(n,{...q?{tone:`neutral`}:{variant:`soft`},size:J,disabled:P,onClick:Z,children:T}),/* @__PURE__ */ f(n,{tone:D===`danger`?`danger`:void 0,size:J,disabled:U,loading:P,onClick:M,children:w})]}),children:/* @__PURE__ */ p(`div`,{className:`wui-confirm-content`,children:[!q&&O?/* @__PURE__ */ f(`span`,{className:`wui-confirm-icon`,style:X,children:/* @__PURE__ */ f(`img`,{src:O,alt:``,"aria-hidden":`true`})}):!q&&k?/* @__PURE__ */ f(`span`,{className:`wui-confirm-icon`,style:X,children:typeof k==`string`?/* @__PURE__ */ f(r,{name:k,size:80}):k}):Y&&/* @__PURE__ */ f(`span`,{className:`wui-confirm-icon`,style:X,children:/* @__PURE__ */ f(Y,{size:120})}),/* @__PURE__ */ f(`h3`,{className:`wui-confirm-title`,tabIndex:-1,"data-autofocus":``,children:x}),C&&/* @__PURE__ */ f(`p`,{className:`wui-confirm-msg`,children:C}),z!=null&&z!==!1&&/* @__PURE__ */ f(`div`,{className:`wui-confirm-body`,children:z}),j&&/* @__PURE__ */ f(i,{fieldClassName:`mt-3 mb-0 w-100 text-start`,label:/* @__PURE__ */ p(d,{children:[W,/* @__PURE__ */ f(`strong`,{children:j}),K]}),value:V,onChange:e=>H(e.target.value),"aria-label":e(E,{phrase:j}),disabled:P})]})})}export{_ as default};
1
+ import e from"../lib/fillLabel.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./AppButton.js";import r from"./AppIcon.js";import i from"./AppInput.js";import a from"./AppModal.js";import{MODAL_ICONS as o}from"./ModalIcons.js";import s from"./warnInvalidValue.js";import c from"./warnUnknownProps.js";import{useEffect as l,useState as u}from"react";import{Fragment as d,jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`sm`,`md`,`lg`,`xl`],h=[`default`,`plain`],g=[`success`,`danger`,`warning`,`info`,`primary`];function _(_){let{marker:v,props:y}=t(`AppConfirmDialog`,_),{open:b,title:x,variant:S=`default`,description:C,confirmLabel:w=`Confirm`,cancelLabel:T=`Cancel`,typePhraseLabel:E=`Type {phrase} to confirm`,tone:D,image:O,icon:k,iconSize:A,confirmPhrase:j,onConfirm:M,onClose:N,loading:P=!1,staticBackdrop:F=!0,placement:I=`center`,size:L=`md`,className:R=``,children:z,...B}=y;c(`AppConfirmDialog`,B),s(`AppConfirmDialog`,`tone`,D,g),s(`AppConfirmDialog`,`size`,typeof L==`string`?L:null,m),s(`AppConfirmDialog`,`variant`,S,h);let[V,H]=u(``);if(l(()=>{b||H(``)},[b]),!b)return null;let U=!!j&&V.trim()!==j,[W,...G]=E.split(`{phrase}`),K=G.join(j),q=S===`plain`,J=q?`sm`:`md`,Y=q||O||k?null:o[D===`danger`?`delete`:D??`info`],X=A>0?{"--wui-confirm-icon-size":`${A}px`}:void 0,Z=()=>{P||N?.()};return/* @__PURE__ */ f(a,{...v,...B,open:b,hideHeader:!0,title:x,onClose:Z,staticBackdrop:F,placement:I,size:L,className:[`wui-confirm`,q&&`wui-confirm-plain`,R].filter(Boolean).join(` `),footer:/* @__PURE__ */ p(`div`,{className:`wui-confirm-actions`,children:[/* @__PURE__ */ f(n,{...q?{tone:`neutral`}:{variant:`soft`},size:J,disabled:P,onClick:Z,children:T}),/* @__PURE__ */ f(n,{tone:D===`danger`?`danger`:void 0,size:J,disabled:U,loading:P,onClick:M,children:w})]}),children:/* @__PURE__ */ p(`div`,{className:`wui-confirm-content`,children:[!q&&O?/* @__PURE__ */ f(`span`,{className:`wui-confirm-icon`,style:X,children:/* @__PURE__ */ f(`img`,{src:O,alt:``,"aria-hidden":`true`})}):!q&&k?/* @__PURE__ */ f(`span`,{className:`wui-confirm-icon`,style:X,children:typeof k==`string`?/* @__PURE__ */ f(r,{name:k,size:80}):k}):Y&&/* @__PURE__ */ f(`span`,{className:`wui-confirm-icon`,style:X,children:/* @__PURE__ */ f(Y,{size:120})}),/* @__PURE__ */ f(`h3`,{className:`wui-confirm-title`,tabIndex:-1,"data-autofocus":``,children:x}),C&&/* @__PURE__ */ f(`p`,{className:`wui-confirm-msg`,children:C}),z!=null&&z!==!1&&/* @__PURE__ */ f(`div`,{className:`wui-confirm-body`,children:z}),j&&/* @__PURE__ */ f(i,{fieldClassName:`mt-3 mb-0 w-100 text-start`,label:/* @__PURE__ */ p(d,{children:[W,/* @__PURE__ */ f(`strong`,{children:j}),K]}),value:V,onChange:e=>H(e.target.value),"aria-label":e(E,{phrase:j}),disabled:P})]})})}export{_ as default};
@@ -1 +1 @@
1
- import e from"../lib/DiscardPrompt.js";import{lockPageScroll as t}from"../lib/pageScrollLock.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppIcon.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.js";import{useEffect as o,useRef as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import"@webority/ui-elements/elements/drawer";var d=[`end`,`start`],f=[`sm`,`md`,`lg`,`xl`],p=[50,90],m=e=>Array.isArray(e)&&e.length>0&&e.every(e=>Number.isFinite(e)&&e>=10&&e<=100);function h(h){let{marker:g,props:_}=n(`AppDrawer`,h),{open:v=!1,onClose:y,title:b,titleIcon:x,header:S,subtitle:C,ariaLabel:w,side:T=`end`,size:E=`md`,width:D,maxWidth:O,snapPoints:k=p,defaultSnap:A=0,sheet:j=!0,onSnapChange:M,onOpened:N,onClosed:P,dismissible:F=!0,closeLabel:I=`Close`,sheetHeightLabel:L=`Sheet height`,staticBackdrop:R=!1,confirmDiscard:z,dirty:B=!1,headerClassName:V=``,bodyClassName:H=``,footer:U,className:W=``,style:G,children:K,...q}=_;a(`AppDrawer`,q),i(`AppDrawer`,`side`,T,d),i(`AppDrawer`,`size`,E,f),i(`AppDrawer`,`snapPoints`,m(k)?void 0:JSON.stringify(k),[`an array of numbers from 10 to 100`]);let J=s(null),Y=s(null),X=s(null),[Z,Q]=c(!1);Y.current={onClose:y,onSnapChange:M,onOpened:N,onClosed:P,confirmDiscard:z,dirty:B},o(()=>{v||Q(!1)},[v]),o(()=>{Z&&X.current?.focus()},[Z]),o(()=>{if(v)return t()},[v]),o(()=>{let e=J.current;if(!e)return;let t=t=>{t.target===e&&(t.preventDefault(),Y.current.confirmDiscard&&Y.current.dirty?Q(!0):Y.current.onClose?.())},n=t=>{t.target===e&&Y.current.onSnapChange?.(t.detail.index,t.detail.percent)},r=t=>{t.target===e&&Y.current.onOpened?.()},i=t=>{t.target===e&&Y.current.onClosed?.()},a=n=>{n.target.closest?.(`[data-wui-dismiss]`)&&t({target:e,preventDefault(){}})};return e.addEventListener(`wui-drawer-close`,t),e.addEventListener(`wui-drawer-snap`,n),e.addEventListener(`wui-drawer-opened`,r),e.addEventListener(`wui-drawer-closed`,i),e.addEventListener(`click`,a),()=>{e.removeEventListener(`wui-drawer-close`,t),e.removeEventListener(`wui-drawer-snap`,n),e.removeEventListener(`wui-drawer-opened`,r),e.removeEventListener(`wui-drawer-closed`,i),e.removeEventListener(`click`,a)}},[]);let $=()=>{Q(!1),J.current?.dispatchEvent(new CustomEvent(`wui:drawer:discard`,{bubbles:!0})),Y.current.onClose?.()},ee=m(k)?k:p,te={...D&&{"--wui-drawer-width":D},...O&&{"--wui-drawer-max-width":O},...G};return/* @__PURE__ */ u(`wui-drawer`,{ref:J,...g,...q,class:[`wui-drawer`,W].filter(Boolean).join(` `),side:T,size:E,"snap-points":ee.join(`,`),"default-snap":String(A),static:R?``:void 0,"no-sheet":j?void 0:``,"no-dismiss":F?void 0:``,"confirm-discard":z||void 0,open:v?``:void 0,style:te,children:[/* @__PURE__ */ l(`div`,{className:`wui-drawer-backdrop`,"data-wui-drawer-backdrop":``,"aria-hidden":`true`}),/* @__PURE__ */ u(`div`,{className:`wui-drawer-panel`,role:`dialog`,"aria-modal":`true`,"aria-label":w||b||void 0,tabIndex:-1,children:[j&&/* @__PURE__ */ l(`div`,{className:`wui-drawer-grip`,"data-wui-drawer-grip":``,children:/* @__PURE__ */ l(`div`,{className:`wui-drawer-handle`,role:`slider`,tabIndex:0,"aria-orientation":`vertical`,"aria-label":L})}),S===void 0?/* @__PURE__ */ u(`div`,{className:[`wui-drawer-header`,V].filter(Boolean).join(` `),"data-wui-drawer-grip":j?``:void 0,children:[/* @__PURE__ */ u(`div`,{className:`wui-drawer-headtext`,children:[b&&/* @__PURE__ */ u(`div`,{className:`wui-drawer-title`,children:[x&&/* @__PURE__ */ l(`span`,{className:`wui-drawer-title-ic`,children:/* @__PURE__ */ l(r,{name:x,size:18})}),b]}),C&&/* @__PURE__ */ l(`div`,{className:`wui-drawer-subtitle`,children:C})]}),F&&/* @__PURE__ */ l(`button`,{type:`button`,className:`wui-drawer-close`,"data-wui-drawer-close":``,"aria-label":I,children:/* @__PURE__ */ l(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:/* @__PURE__ */ l(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}):S,/* @__PURE__ */ l(`div`,{className:[`wui-drawer-body`,H].filter(Boolean).join(` `),children:K}),(U||Z)&&/* @__PURE__ */ u(`div`,{className:Z?`wui-drawer-footer wui-drawer-discarding`:`wui-drawer-footer`,children:[Z&&/* @__PURE__ */ l(e,{text:z,confirmRef:X,onDiscard:$,onKeep:()=>Q(!1)}),U]})]})]})}export{h as default};
1
+ import e from"../lib/DiscardPrompt.js";import{lockPageScroll as t}from"../lib/pageScrollLock.js";import{splitMarkerProps as n}from"../lib/wuiMarker.js";import r from"./AppIcon.js";import i from"./warnInvalidValue.js";import a from"./warnUnknownProps.js";import{useEffect as o,useRef as s,useState as c}from"react";import{jsx as l,jsxs as u}from"react/jsx-runtime";import"@webority/ui-elements/elements/drawer";var d=[`end`,`start`],f=[`sm`,`md`,`lg`,`xl`],p=[50,90],m=e=>Array.isArray(e)&&e.length>0&&e.every(e=>Number.isFinite(e)&&e>=10&&e<=100);function h(h){let{marker:g,props:_}=n(`AppDrawer`,h),{open:v=!1,onClose:y,title:b,titleIcon:x,header:S,subtitle:C,ariaLabel:w,side:T=`end`,size:E=`md`,width:D,maxWidth:O,snapPoints:k=p,defaultSnap:A=0,sheet:j=!0,onSnapChange:M,onOpened:N,onClosed:P,dismissible:F=!0,closeLabel:I=`Close`,sheetHeightLabel:L=`Sheet height`,staticBackdrop:R=!0,confirmDiscard:z,dirty:B=!1,headerClassName:V=``,bodyClassName:H=``,footer:U,className:W=``,style:G,children:K,...q}=_;a(`AppDrawer`,q),i(`AppDrawer`,`side`,T,d),i(`AppDrawer`,`size`,E,f),i(`AppDrawer`,`snapPoints`,m(k)?void 0:JSON.stringify(k),[`an array of numbers from 10 to 100`]);let J=s(null),Y=s(null),X=s(null),[Z,Q]=c(!1);Y.current={onClose:y,onSnapChange:M,onOpened:N,onClosed:P,confirmDiscard:z,dirty:B},o(()=>{v||Q(!1)},[v]),o(()=>{Z&&X.current?.focus()},[Z]),o(()=>{if(v)return t()},[v]),o(()=>{let e=J.current;if(!e)return;let t=t=>{t.target===e&&(t.preventDefault(),Y.current.confirmDiscard&&Y.current.dirty?Q(!0):Y.current.onClose?.())},n=t=>{t.target===e&&Y.current.onSnapChange?.(t.detail.index,t.detail.percent)},r=t=>{t.target===e&&Y.current.onOpened?.()},i=t=>{t.target===e&&Y.current.onClosed?.()},a=n=>{n.target.closest?.(`[data-wui-dismiss]`)&&t({target:e,preventDefault(){}})};return e.addEventListener(`wui-drawer-close`,t),e.addEventListener(`wui-drawer-snap`,n),e.addEventListener(`wui-drawer-opened`,r),e.addEventListener(`wui-drawer-closed`,i),e.addEventListener(`click`,a),()=>{e.removeEventListener(`wui-drawer-close`,t),e.removeEventListener(`wui-drawer-snap`,n),e.removeEventListener(`wui-drawer-opened`,r),e.removeEventListener(`wui-drawer-closed`,i),e.removeEventListener(`click`,a)}},[]);let $=()=>{Q(!1),J.current?.dispatchEvent(new CustomEvent(`wui:drawer:discard`,{bubbles:!0})),Y.current.onClose?.()},ee=m(k)?k:p,te={...D&&{"--wui-drawer-width":D},...O&&{"--wui-drawer-max-width":O},...G};return/* @__PURE__ */ u(`wui-drawer`,{ref:J,...g,...q,class:[`wui-drawer`,W].filter(Boolean).join(` `),side:T,size:E,"snap-points":ee.join(`,`),"default-snap":String(A),static:R?``:void 0,"no-sheet":j?void 0:``,"no-dismiss":F?void 0:``,"confirm-discard":z||void 0,open:v?``:void 0,style:te,children:[/* @__PURE__ */ l(`div`,{className:`wui-drawer-backdrop`,"data-wui-drawer-backdrop":``,"aria-hidden":`true`}),/* @__PURE__ */ u(`div`,{className:`wui-drawer-panel`,role:`dialog`,"aria-modal":`true`,"aria-label":w||b||void 0,tabIndex:-1,children:[j&&/* @__PURE__ */ l(`div`,{className:`wui-drawer-grip`,"data-wui-drawer-grip":``,children:/* @__PURE__ */ l(`div`,{className:`wui-drawer-handle`,role:`slider`,tabIndex:0,"aria-orientation":`vertical`,"aria-label":L})}),S===void 0?/* @__PURE__ */ u(`div`,{className:[`wui-drawer-header`,V].filter(Boolean).join(` `),"data-wui-drawer-grip":j?``:void 0,children:[/* @__PURE__ */ u(`div`,{className:`wui-drawer-headtext`,children:[b&&/* @__PURE__ */ u(`div`,{className:`wui-drawer-title`,children:[x&&/* @__PURE__ */ l(`span`,{className:`wui-drawer-title-ic`,children:/* @__PURE__ */ l(r,{name:x,size:18})}),b]}),C&&/* @__PURE__ */ l(`div`,{className:`wui-drawer-subtitle`,children:C})]}),F&&/* @__PURE__ */ l(`button`,{type:`button`,className:`wui-drawer-close`,"data-wui-drawer-close":``,"aria-label":I,children:/* @__PURE__ */ l(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:/* @__PURE__ */ l(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}):S,/* @__PURE__ */ l(`div`,{className:[`wui-drawer-body`,H].filter(Boolean).join(` `),children:K}),(U||Z)&&/* @__PURE__ */ u(`div`,{className:Z?`wui-drawer-footer wui-drawer-discarding`:`wui-drawer-footer`,children:[Z&&/* @__PURE__ */ l(e,{text:z,confirmRef:X,onDiscard:$,onKeep:()=>Q(!1)}),U]})]})]})}export{h as default};
@@ -1 +1 @@
1
- import e from"../lib/DiscardPrompt.js";import{devWarn as t}from"../lib/devWarn.js";import{lockPageScroll as n}from"../lib/pageScrollLock.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./AppIcon.js";import a from"./warnInvalidValue.js";import o from"./warnUnknownProps.js";import{useCallback as s,useEffect as c,useRef as l,useState as u}from"react";import{Modal as ee}from"react-bootstrap";import{jsx as d,jsxs as f}from"react/jsx-runtime";var te=[`neutral`,`danger`,`success`,`warning`],p=[`center`,`top`],m=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,h={sm:380,md:440,lg:640,xl:880},ne=`wui-modal-fullscreen`,g=!1;function _(){let e=!0;try{e=process.env.NODE_ENV!==`production`}catch{e=!0}e&&!g&&(g=!0,t("[@webority/ui-react] <AppModal hideHeader> has no accessible name: pass `ariaLabel` (or a string `title`)."))}function re(e,t){if(e.key!==`Tab`)return;let n=Array.from(t.querySelectorAll(m));if(!n.length){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===r||a===t)?(e.preventDefault(),i.focus()):!e.shiftKey&&a===i&&(e.preventDefault(),r.focus())}function ie(){let e=[];for(let t of document.body.children)t.hasAttribute(`inert`)||t.matches(`.modal, .modal-backdrop`)||(t.setAttribute(`inert`,``),e.push(t));return e}function ae(){return typeof document<`u`&&document.querySelector(`wui-drawer[open], .offcanvas.show`)!==null}function v(t){let{marker:g,props:v}=r(`AppModal`,t),{open:y,eyebrow:b,title:x,subtitle:S,headerIcon:C,tone:w=`neutral`,dismissible:oe=!0,onClose:T,onBack:E,backLabel:D=`Back`,headerActions:O,footer:k,size:A=`md`,placement:j=`center`,hideHeader:M=!1,staticBackdrop:N=!1,confirmDiscard:P,dirty:se=!1,ariaLabel:F,closeLabel:ce=`Close`,className:le=``,children:I,...L}=v;o(`AppModal`,L),a(`AppModal`,`tone`,w,te),a(`AppModal`,`placement`,j,p),a(`AppModal`,`size`,typeof A==`string`?A:null,[...Object.keys(h),`fullscreen`]);let{style:R,ref:z,"data-wui":B,"data-wui-props":V,...H}=L,U=B?{"data-wui":B,"data-wui-props":V}:g,W=U[`data-wui`],G=U[`data-wui-props`];M&&!F&&typeof x!=`string`&&_();let K=l(null),q=l(null),[J,Y]=u(!1);c(()=>{y||Y(!1)},[y]),c(()=>{J&&q.current?.focus()},[J]),c(()=>{if(y)return n()},[y]),c(()=>{let e=K.current?.closest(`.modal`);e&&(P?e.setAttribute(`confirm-discard`,P):e.removeAttribute(`confirm-discard`))},[y,P]);let X=l(null),ue=s(e=>{X.current=e,typeof z==`function`?z(e):z&&(z.current=e)},[z]);c(()=>{let e=X.current?.dialog;e&&(e.setAttribute(`data-wui`,W),G===void 0?e.removeAttribute(`data-wui-props`):e.setAttribute(`data-wui-props`,G))},[y,W,G]),c(()=>{if(!y)return;let e=K.current?.closest(`.modal-content`);if(!e)return;let t=()=>Array.from(e.querySelectorAll(m));(e.querySelector(`[data-autofocus]`)||t().find(e=>!e.classList.contains(`wui-modal-close`)&&!e.classList.contains(`wui-modal-back`))||t()[0]||e).focus?.();let n=e.closest(`.modal`),r=ie(),i=e=>re(e,n);return n?.addEventListener(`keydown`,i),()=>{n?.removeEventListener(`keydown`,i);for(let e of r)e.removeAttribute(`inert`);n&&setTimeout(()=>{n.isConnected&&!n.classList.contains(`show`)&&n.dispatchEvent(new Event(`transitionend`,{bubbles:!0}))},500)}},[y]);let Z=()=>{P&&se?Y(!0):T?.()},de=()=>{Y(!1),T?.()},fe=()=>{Y(!1),(K.current?.querySelector(`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled])`))?.focus()},Q=A===`fullscreen`,pe=typeof A==`number`?A:h[A]??h.md,me=[`wui-modal`,w===`neutral`?``:`tone-${w}`,le].filter(Boolean).join(` `),$=y&&ae(),he=[`wui-modal-shell`,Q&&ne,$&&`wui-modal-stacked`].filter(Boolean).join(` `);return/* @__PURE__ */ f(ee,{...H,ref:ue,show:y,onHide:Z,backdrop:!N||`static`,keyboard:!N,autoFocus:!1,enforceFocus:!0,restoreFocus:!0,centered:j!==`top`,className:he,style:Q?R:{"--wui-modal-max-width":`${pe}px`,...R},dialogClassName:`wui-rb-dialog`,contentClassName:me,backdropClassName:$?`wui-modal-dim wui-modal-backdrop-stacked`:`wui-modal-dim`,"aria-label":F||(typeof x==`string`?x:void 0),children:[!M&&/* @__PURE__ */ f(`div`,{className:`wui-modal-header`,children:[E&&/* @__PURE__ */ d(`button`,{type:`button`,className:`wui-modal-back`,onClick:E,"aria-label":D,children:/* @__PURE__ */ d(i,{name:`arrow-left`,size:18})}),/* @__PURE__ */ f(`div`,{className:`wui-modal-heading`,children:[C&&/* @__PURE__ */ d(`span`,{className:`wui-modal-headicon`,children:/* @__PURE__ */ d(i,{name:C,size:18})}),/* @__PURE__ */ f(`div`,{className:`wui-modal-headtext`,children:[b&&/* @__PURE__ */ d(`div`,{className:`wui-modal-eyebrow`,children:b}),/* @__PURE__ */ d(`div`,{className:`wui-modal-title`,children:x}),S&&/* @__PURE__ */ d(`div`,{className:`wui-modal-subtitle`,children:S})]})]}),O&&/* @__PURE__ */ d(`div`,{className:`wui-modal-header-actions`,children:O}),oe&&/* @__PURE__ */ d(`button`,{type:`button`,className:`wui-modal-close`,onClick:Z,"aria-label":ce,children:/* @__PURE__ */ d(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:/* @__PURE__ */ d(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),/* @__PURE__ */ d(`div`,{className:`wui-modal-body`,ref:K,children:I}),(k||J)&&/* @__PURE__ */ f(`div`,{className:J?`wui-modal-footer wui-drawer-discarding`:`wui-modal-footer`,children:[J&&/* @__PURE__ */ d(e,{text:P,confirmRef:q,onDiscard:de,onKeep:fe}),k]})]})}export{v as default};
1
+ import e from"../lib/DiscardPrompt.js";import{devWarn as t}from"../lib/devWarn.js";import{lockPageScroll as n}from"../lib/pageScrollLock.js";import{splitMarkerProps as r}from"../lib/wuiMarker.js";import i from"./AppIcon.js";import a from"./warnInvalidValue.js";import o from"./warnUnknownProps.js";import{useCallback as s,useEffect as c,useRef as l,useState as u}from"react";import{Modal as ee}from"react-bootstrap";import{jsx as d,jsxs as f}from"react/jsx-runtime";var te=[`neutral`,`danger`,`success`,`warning`],p=[`center`,`top`],m=`a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])`,h={sm:380,md:440,lg:640,xl:880},ne=`wui-modal-fullscreen`,g=!1;function _(){let e=!0;try{e=process.env.NODE_ENV!==`production`}catch{e=!0}e&&!g&&(g=!0,t("[@webority/ui-react] <AppModal hideHeader> has no accessible name: pass `ariaLabel` (or a string `title`)."))}function re(e,t){if(e.key!==`Tab`)return;let n=Array.from(t.querySelectorAll(m));if(!n.length){e.preventDefault(),t.focus();return}let r=n[0],i=n[n.length-1],a=document.activeElement;e.shiftKey&&(a===r||a===t)?(e.preventDefault(),i.focus()):!e.shiftKey&&a===i&&(e.preventDefault(),r.focus())}function ie(){let e=[];for(let t of document.body.children)t.hasAttribute(`inert`)||t.matches(`.modal, .modal-backdrop`)||(t.setAttribute(`inert`,``),e.push(t));return e}function ae(){return typeof document<`u`&&document.querySelector(`wui-drawer[open], .offcanvas.show`)!==null}function v(t){let{marker:g,props:v}=r(`AppModal`,t),{open:y,eyebrow:b,title:x,subtitle:S,headerIcon:C,tone:w=`neutral`,dismissible:oe=!0,onClose:T,onBack:E,backLabel:D=`Back`,headerActions:O,footer:k,size:A=`md`,placement:j=`center`,hideHeader:M=!1,staticBackdrop:N=!0,confirmDiscard:P,dirty:se=!1,ariaLabel:F,closeLabel:ce=`Close`,className:le=``,children:I,...L}=v;o(`AppModal`,L),a(`AppModal`,`tone`,w,te),a(`AppModal`,`placement`,j,p),a(`AppModal`,`size`,typeof A==`string`?A:null,[...Object.keys(h),`fullscreen`]);let{style:R,ref:z,"data-wui":B,"data-wui-props":V,...H}=L,U=B?{"data-wui":B,"data-wui-props":V}:g,W=U[`data-wui`],G=U[`data-wui-props`];M&&!F&&typeof x!=`string`&&_();let K=l(null),q=l(null),[J,Y]=u(!1);c(()=>{y||Y(!1)},[y]),c(()=>{J&&q.current?.focus()},[J]),c(()=>{if(y)return n()},[y]),c(()=>{let e=K.current?.closest(`.modal`);e&&(P?e.setAttribute(`confirm-discard`,P):e.removeAttribute(`confirm-discard`))},[y,P]);let X=l(null),ue=s(e=>{X.current=e,typeof z==`function`?z(e):z&&(z.current=e)},[z]);c(()=>{let e=X.current?.dialog;e&&(e.setAttribute(`data-wui`,W),G===void 0?e.removeAttribute(`data-wui-props`):e.setAttribute(`data-wui-props`,G))},[y,W,G]),c(()=>{if(!y)return;let e=K.current?.closest(`.modal-content`);if(!e)return;let t=()=>Array.from(e.querySelectorAll(m));(e.querySelector(`[data-autofocus]`)||t().find(e=>!e.classList.contains(`wui-modal-close`)&&!e.classList.contains(`wui-modal-back`))||t()[0]||e).focus?.();let n=e.closest(`.modal`),r=ie(),i=e=>re(e,n);return n?.addEventListener(`keydown`,i),()=>{n?.removeEventListener(`keydown`,i);for(let e of r)e.removeAttribute(`inert`);n&&setTimeout(()=>{n.isConnected&&!n.classList.contains(`show`)&&n.dispatchEvent(new Event(`transitionend`,{bubbles:!0}))},500)}},[y]);let Z=()=>{P&&se?Y(!0):T?.()},de=()=>{Y(!1),T?.()},fe=()=>{Y(!1),(K.current?.querySelector(`input:not([type="hidden"]):not([disabled]),select:not([disabled]),textarea:not([disabled])`))?.focus()},Q=A===`fullscreen`,pe=typeof A==`number`?A:h[A]??h.md,me=[`wui-modal`,w===`neutral`?``:`tone-${w}`,le].filter(Boolean).join(` `),$=y&&ae(),he=[`wui-modal-shell`,Q&&ne,$&&`wui-modal-stacked`].filter(Boolean).join(` `);return/* @__PURE__ */ f(ee,{...H,ref:ue,show:y,onHide:Z,backdrop:!N||`static`,keyboard:!N,autoFocus:!1,enforceFocus:!0,restoreFocus:!0,centered:j!==`top`,className:he,style:Q?R:{"--wui-modal-max-width":`${pe}px`,...R},dialogClassName:`wui-rb-dialog`,contentClassName:me,backdropClassName:$?`wui-modal-dim wui-modal-backdrop-stacked`:`wui-modal-dim`,"aria-label":F||(typeof x==`string`?x:void 0),children:[!M&&/* @__PURE__ */ f(`div`,{className:`wui-modal-header`,children:[E&&/* @__PURE__ */ d(`button`,{type:`button`,className:`wui-modal-back`,onClick:E,"aria-label":D,children:/* @__PURE__ */ d(i,{name:`arrow-left`,size:18})}),/* @__PURE__ */ f(`div`,{className:`wui-modal-heading`,children:[C&&/* @__PURE__ */ d(`span`,{className:`wui-modal-headicon`,children:/* @__PURE__ */ d(i,{name:C,size:18})}),/* @__PURE__ */ f(`div`,{className:`wui-modal-headtext`,children:[b&&/* @__PURE__ */ d(`div`,{className:`wui-modal-eyebrow`,children:b}),/* @__PURE__ */ d(`div`,{className:`wui-modal-title`,children:x}),S&&/* @__PURE__ */ d(`div`,{className:`wui-modal-subtitle`,children:S})]})]}),O&&/* @__PURE__ */ d(`div`,{className:`wui-modal-header-actions`,children:O}),oe&&/* @__PURE__ */ d(`button`,{type:`button`,className:`wui-modal-close`,onClick:Z,"aria-label":ce,children:/* @__PURE__ */ d(`svg`,{width:`18`,height:`18`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,"aria-hidden":`true`,children:/* @__PURE__ */ d(`path`,{d:`M18 6 6 18M6 6l12 12`})})})]}),/* @__PURE__ */ d(`div`,{className:`wui-modal-body`,ref:K,children:I}),(k||J)&&/* @__PURE__ */ f(`div`,{className:J?`wui-modal-footer wui-drawer-discarding`:`wui-modal-footer`,children:[J&&/* @__PURE__ */ d(e,{text:P,confirmRef:q,onDiscard:de,onKeep:fe}),k]})]})}export{v as default};
@@ -2,7 +2,7 @@
2
2
  "format": "webority-guidance/1",
3
3
  "package": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.141.0"
5
+ "version": "0.142.0"
6
6
  },
7
7
  "components": [
8
8
  {
@@ -2461,7 +2461,7 @@
2461
2461
  }
2462
2462
  ],
2463
2463
  "a11y": [
2464
- "The dialog is built on AppModal, so it traps focus, closes on Escape and restores focus.",
2464
+ "The dialog is built on AppModal, so it traps focus, closes on Escape only when staticBackdrop is false, and restores focus.",
2465
2465
  "The title is an h3 that takes focus when the dialog opens.",
2466
2466
  "A custom image is hidden from assistive technology with an empty alt, so the title and message carry the meaning.",
2467
2467
  "The confirm-phrase field is named \"Type <phrase> to confirm\", and Confirm stays disabled until the phrase matches.",
@@ -3041,7 +3041,7 @@
3041
3041
  "a11y": [
3042
3042
  "The panel has role dialog with aria-modal and is named by ariaLabel, else by the title.",
3043
3043
  "The sheet handle is a vertical slider labelled Sheet height, and the close button is labelled Close.",
3044
- "Focus moves in on open, Tab stays inside, Escape closes, and focus returns to what opened it."
3044
+ "Focus moves in on open, Tab stays inside, Escape leaves it open unless staticBackdrop is false, and focus returns to what opened it."
3045
3045
  ]
3046
3046
  }
3047
3047
  },
@@ -4666,7 +4666,7 @@
4666
4666
  {
4667
4667
  "component": "AppLink",
4668
4668
  "props": {
4669
- "href": "#best",
4669
+ "href": "#guidance",
4670
4670
  "rightIcon": "arrow-right"
4671
4671
  },
4672
4672
  "children": "See pricing"
@@ -4682,7 +4682,7 @@
4682
4682
  {
4683
4683
  "component": "AppLink",
4684
4684
  "props": {
4685
- "href": "#best",
4685
+ "href": "#guidance",
4686
4686
  "animation": "glow"
4687
4687
  },
4688
4688
  "children": "Click here"
@@ -4874,7 +4874,7 @@
4874
4874
  "do": [
4875
4875
  {
4876
4876
  "title": "One trigger, one dialog",
4877
- "note": "A clear trigger opens a single-purpose dialog; open/onClose stay controlled so Escape and the backdrop always work.",
4877
+ "note": "A clear trigger opens a single-purpose dialog; open and onClose stay controlled so the close control always works.",
4878
4878
  "example": [
4879
4879
  {
4880
4880
  "component": "AppButton",
@@ -4952,7 +4952,7 @@
4952
4952
  "a11y": [
4953
4953
  "Focus stays inside the dialog: Tab and Shift+Tab wrap between its first and last control.",
4954
4954
  "The page behind an open dialog is made inert, and the dialog is named by a plain-text title or by ariaLabel; a headerless dialog with neither warns in development.",
4955
- "Escape and a backdrop click close it, unless staticBackdrop is set."
4955
+ "Escape and an outside click leave it open by default; set staticBackdrop to false to let them close it."
4956
4956
  ]
4957
4957
  }
4958
4958
  },
@@ -18,7 +18,7 @@
18
18
  * @param {() => void} props.onConfirm Runs when Confirm is pressed.
19
19
  * @param {() => void} [props.onClose] Runs when the dialog is dismissed through Cancel, the backdrop or Escape, unless `loading` blocks it.
20
20
  * @param {boolean} [props.loading]
21
- * @param {boolean} [props.staticBackdrop]
21
+ * @param {boolean} [props.staticBackdrop] Defaults to true: Escape and an outside click leave the dialog open. Pass false to let them close it.
22
22
  * @param {'center'|'top'} [props.placement]
23
23
  * @param {'sm'|'md'|'lg'|'xl'|number} [props.size]
24
24
  * @param {string} [props.className]
@@ -69,8 +69,8 @@ export default function AppConfirmDialog(props: {
69
69
  */
70
70
  loading?: boolean;
71
71
  /**
72
- * Passed to AppModal: when true, a backdrop click and Escape no longer close the dialog.
73
- * @default false
72
+ * The dialog closes only through its own Cancel or Confirm by default. false lets Escape and an outside click close it.
73
+ * @default true
74
74
  */
75
75
  staticBackdrop?: boolean;
76
76
  /**
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Mount once near the root. A descendant calls `useConfirm()` and awaits the result:
3
3
  * `const confirm = useConfirm(); if (!(await confirm({ title: "Delete?", tone: "danger" }))) return;`
4
- * The promise resolves true on confirm, and false on Cancel, Escape, the backdrop or unmount.
4
+ * The promise resolves true on confirm, and false on Cancel or unmount; the dialog is static, so Escape and the backdrop leave it open.
5
5
  *
6
6
  * @param {{ children: import('react').ReactNode }} props
7
7
  */
@@ -31,7 +31,7 @@ import "@webority/ui-elements/elements/drawer";
31
31
  * @param {boolean} [props.dismissible] Default true. false hides the close button and also blocks Escape, backdrop and drag dismissal, so only the screen's own actions close it.
32
32
  * @param {string} [props.closeLabel] Default "Close".
33
33
  * @param {string} [props.sheetHeightLabel] Default "Sheet height".
34
- * @param {boolean} [props.staticBackdrop]
34
+ * @param {boolean} [props.staticBackdrop] Defaults to true: Escape and an outside click leave the drawer open. Pass false to let them close it.
35
35
  * @param {string} [props.confirmDiscard]
36
36
  * @param {boolean} [props.dirty]
37
37
  * @param {import('react').ReactNode} [props.footer]
@@ -106,8 +106,8 @@ export default function AppDrawer(props: {
106
106
  */
107
107
  sheetHeightLabel?: string;
108
108
  /**
109
- * The backdrop, Escape and a drag down no longer close it; only the close button or open can.
110
- * @default false
109
+ * The drawer closes only through its own Close or Cancel by default. false lets Escape and an outside click close it.
110
+ * @default true
111
111
  */
112
112
  staticBackdrop?: boolean;
113
113
  /** Ask before closing while dirty: this text, with Discard and Keep editing in the footer. */
@@ -19,7 +19,7 @@
19
19
  * @param {boolean} [props.hideHeader]
20
20
  * @param {string} [props.ariaLabel]
21
21
  * @param {string} [props.closeLabel] Default "Close".
22
- * @param {boolean} [props.staticBackdrop]
22
+ * @param {boolean} [props.staticBackdrop] Defaults to true: Escape and an outside click leave the modal open. Pass false to let them close it.
23
23
  * @param {string} [props.confirmDiscard]
24
24
  * @param {boolean} [props.dirty]
25
25
  * @param {string} [props.className]
@@ -80,8 +80,8 @@ export default function AppModal(props: {
80
80
  */
81
81
  closeLabel?: string;
82
82
  /**
83
- * When true, a backdrop click and the Escape key no longer close the dialog.
84
- * @default false
83
+ * The pop-up closes only through its own Close or Cancel by default. false lets Escape and an outside click close it.
84
+ * @default true
85
85
  */
86
86
  staticBackdrop?: boolean;
87
87
  /** Asks before closing while dirty, with this text and Discard and Keep editing in the footer. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-react",
3
- "version": "0.141.0",
3
+ "version": "0.142.0",
4
4
  "description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -29,10 +29,10 @@
29
29
  },
30
30
  "sideEffects": false,
31
31
  "dependencies": {
32
- "@webority/markdown-core": "0.141.0",
33
- "@webority/theme": "0.141.0",
34
- "@webority/ui-elements": "0.141.0",
35
- "@webority/web-core": "0.141.0"
32
+ "@webority/markdown-core": "0.142.0",
33
+ "@webority/theme": "0.142.0",
34
+ "@webority/ui-elements": "0.142.0",
35
+ "@webority/web-core": "0.142.0"
36
36
  },
37
37
  "peerDependencies": {
38
38
  "@webority/analytics": "^0.35.0",
@@ -50,8 +50,8 @@
50
50
  "@vitejs/plugin-react": "^6.0.1",
51
51
  "@vitest/coverage-v8": "5.0.1",
52
52
  "@webority/analytics": "0.35.1",
53
- "@webority/canvas-kit": "0.141.0",
54
- "@webority/tokens": "0.141.0",
53
+ "@webority/canvas-kit": "0.142.0",
54
+ "@webority/tokens": "0.142.0",
55
55
  "bootstrap": "5.3.3",
56
56
  "jsdom": "30.1.1",
57
57
  "react": "^19.2.6",