@webority/ui-react 0.98.0 → 0.99.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.
@@ -132,7 +132,7 @@ function H(e, t) {
132
132
  }
133
133
  }
134
134
  //#endregion
135
- //#region ../elements/dist/shortcutKeys-BQiDpsTJ.js
135
+ //#region ../elements/dist/shortcutKeys-DdQ_0ops.js
136
136
  var ge = "data-wui-shortcuts", _e = "data-shortcut-scope", ve = "wui:shortcut", ye = {
137
137
  title: "Keyboard shortcuts",
138
138
  close: "Close",
@@ -199,7 +199,7 @@ function Ae(e) {
199
199
  return String(e ?? "").trim().split(/\s+/).filter(Boolean).map((e) => we[e.toLowerCase()] ?? (e.length === 1 ? e.toUpperCase() : e)).join("+");
200
200
  }
201
201
  function je(e) {
202
- return !e || e.nodeType !== 1 ? !1 : e.isContentEditable || e.closest?.("[contenteditable=\"\"], [contenteditable=\"true\"], [contenteditable=\"plaintext-only\"]") || e.tagName === "TEXTAREA" || e.tagName === "SELECT" ? !0 : e.tagName === "INPUT" ? !Te.has(String(e.type || "text").toLowerCase()) : Ee.has(e.getAttribute?.("role"));
202
+ return e?.nodeType === 1 ? e.isContentEditable || e.closest?.("[contenteditable=\"\"], [contenteditable=\"true\"], [contenteditable=\"plaintext-only\"]") || e.tagName === "TEXTAREA" || e.tagName === "SELECT" ? !0 : e.tagName === "INPUT" ? !Te.has(String(e.type || "text").toLowerCase()) : Ee.has(e.getAttribute?.("role")) : !1;
203
203
  }
204
204
  function Me(e = typeof document > "u" ? null : document) {
205
205
  return e?.documentElement?.getAttribute(ge) === "off";
@@ -689,7 +689,7 @@ function aee(e, t = Date.now()) {
689
689
  return [...n.values()];
690
690
  }
691
691
  //#endregion
692
- //#region ../elements/dist/themeTransition-BSTpUIVI.js
692
+ //#region ../elements/dist/themeTransition-BlOe94Bx.js
693
693
  var oee = "image/jpeg,image/png,image/webp,image/heic,image/heif,.heic,.heif", see = "image/webp", cee = [96, 48], wt = {
694
694
  dialogTitle: "Edit photo",
695
695
  dialogSubtitle: "Drag to position the photo, then zoom or rotate it.",
@@ -954,7 +954,7 @@ var Dee = (e, t) => {
954
954
  }, Ht = /* @__PURE__ */ new WeakMap(), Ut = /* @__PURE__ */ new WeakMap();
955
955
  function Oee(e, t, n, r) {
956
956
  let i = e.getAll(t), a = Ut.get(e);
957
- a || Ut.set(e, a = /* @__PURE__ */ new Set());
957
+ a || (a = /* @__PURE__ */ new Set(), Ut.set(e, a));
958
958
  let o = i.findIndex((e, r) => e === n && !a.has(`${t}\u0000${r}`));
959
959
  if (!(o < 0)) {
960
960
  if (a.add(`${t}\u0000${o}`), i[o] = r, i.length === 1) {
@@ -5293,17 +5293,25 @@ function va(e) {
5293
5293
  children: [r, Tn(u, { inTooltip: !0 })]
5294
5294
  }), y = (e) => {
5295
5295
  i.props.onClick?.(e), f.onClick?.(e), g(!1);
5296
+ }, b = x(!1), C = (e) => {
5297
+ i.props.onFocusCapture?.(e), f.onFocusCapture?.(e), b.current = !e.currentTarget.matches?.(":focus-visible"), queueMicrotask(() => {
5298
+ b.current = !1;
5299
+ });
5296
5300
  };
5297
5301
  return t(Rae, {
5298
5302
  trigger: ["hover", "focus"],
5299
5303
  placement: Vae[a] || a,
5300
5304
  popperConfig: Uae,
5301
5305
  show: _ ? l : m,
5302
- onToggle: _ ? void 0 : (e) => g(e),
5306
+ onToggle: _ ? void 0 : (e) => {
5307
+ let t = b.current;
5308
+ b.current = !1, !(e && t) && g(e);
5309
+ },
5303
5310
  overlay: v,
5304
5311
  children: _ ? s(i, f) : s(i, {
5305
5312
  ...f,
5306
- onClick: y
5313
+ onClick: y,
5314
+ onFocusCapture: C
5307
5315
  })
5308
5316
  });
5309
5317
  }
@@ -13305,12 +13313,11 @@ function spe(e, t) {
13305
13313
  if (!i) return null;
13306
13314
  let a = `${e}:${r}`;
13307
13315
  return us[a] ||= i().then((t) => {
13308
- let n = ls[e] || (ls[e] = Object.create(null));
13309
- Object.assign(n, t.FULL_VARIANT_GLYPHS), fs[a] = !1;
13310
- let r = ds[a];
13311
- if (r) {
13312
- for (let e of r) e();
13313
- r.clear();
13316
+ ls[e] || (ls[e] = Object.create(null)), Object.assign(ls[e], t.FULL_VARIANT_GLYPHS), fs[a] = !1;
13317
+ let n = ds[a];
13318
+ if (n) {
13319
+ for (let e of n) e();
13320
+ n.clear();
13314
13321
  }
13315
13322
  }).catch((t) => {
13316
13323
  us[a] = null, $o(`${e} icon catalogue '${r}' shard`, t), fs[a] ? ds[a]?.clear() : (fs[a] = !0, setTimeout(() => {
@@ -13333,9 +13340,9 @@ function U(e) {
13333
13340
  let e = () => b((e) => e + 1);
13334
13341
  p && v && !es && (rs.add(e), ipe());
13335
13342
  let t = y ? Jo(r) : null;
13336
- y && is[r] === void 0 && ((ss[t] ||= /* @__PURE__ */ new Set()).add(e), ope(r));
13343
+ y && is[r] === void 0 && (ss[t] ||= /* @__PURE__ */ new Set(), ss[t].add(e), ope(r));
13337
13344
  let n = p && y ? `${a}:${Jo(r)}` : null;
13338
- return p && y && ls[a]?.[r] === void 0 && ((ds[n] ||= /* @__PURE__ */ new Set()).add(e), spe(a, r)), () => {
13345
+ return p && y && ls[a]?.[r] === void 0 && (ds[n] ||= /* @__PURE__ */ new Set(), ds[n].add(e), spe(a, r)), () => {
13339
13346
  rs.delete(e), t && ss[t]?.delete(e), n && ds[n]?.delete(e);
13340
13347
  };
13341
13348
  }, [
@@ -40175,7 +40182,9 @@ function WD(e, t) {
40175
40182
  }
40176
40183
  function GD(e) {
40177
40184
  let t = e.series[0].key, n = new Map(ND(e).map((e) => [e, 0]));
40178
- return e.data.forEach((r, i) => n.set(jD(e, i), n.get(jD(e, i)) + r[t])), n;
40185
+ return e.data.forEach((r, i) => {
40186
+ n.set(jD(e, i), n.get(jD(e, i)) + r[t]);
40187
+ }), n;
40179
40188
  }
40180
40189
  function KD(e, t, n) {
40181
40190
  let { palette: r, neutral: i, seq: a } = n, o = e.series[0].key;
@@ -62269,7 +62278,7 @@ Us("wui-mention-input", class extends Ws {
62269
62278
  }
62270
62279
  });
62271
62280
  //#endregion
62272
- //#region ../elements/dist/WuiCommentThread-B-Y8Kd36.js
62281
+ //#region ../elements/dist/WuiCommentThread-tk01SHbs.js
62273
62282
  var sWe = Object.freeze([
62274
62283
  "👍",
62275
62284
  "❤️",
@@ -62440,7 +62449,7 @@ Us("wui-comment-thread", class extends Ws {
62440
62449
  }
62441
62450
  _openEditor(e, t) {
62442
62451
  let n = e?.querySelector(":scope > .wui-comment-row [data-wui-editor]");
62443
- if (!n || !n.hidden) return;
62452
+ if (!n?.hidden) return;
62444
62453
  let r = n.parentElement.querySelector(":scope > [data-wui-text]");
62445
62454
  r && (r.hidden = !0), this._fillSlot(n, {
62446
62455
  label: TK.editLabel,
@@ -66253,7 +66262,9 @@ Us("wui-data-table", class extends Ws {
66253
66262
  if (t) {
66254
66263
  this._top = this._spacer(n, this._top), this._bottom = this._spacer(n, this._bottom), n.firstElementChild !== this._top && n.insertBefore(this._top, n.firstChild), n.lastElementChild !== this._bottom && n.append(this._bottom);
66255
66264
  let t = Math.max(1, this._headCells(e).length);
66256
- this._top.cells[0].colSpan = t, this._bottom.cells[0].colSpan = t, this._items = [...n.rows].filter((e) => !e.classList.contains("wui-virtual-spacer") && !e.hidden), this._range = null, e.setAttribute("aria-rowcount", String(this._items.length + 1)), e.tHead?.rows[0]?.setAttribute("aria-rowindex", "1"), this._items.forEach((e, t) => e.setAttribute("aria-rowindex", String(t + 2))), this._rowHeight > 0 || (this._rowHeight = this._measureRow(e));
66265
+ this._top.cells[0].colSpan = t, this._bottom.cells[0].colSpan = t, this._items = [...n.rows].filter((e) => !e.classList.contains("wui-virtual-spacer") && !e.hidden), this._range = null, e.setAttribute("aria-rowcount", String(this._items.length + 1)), e.tHead?.rows[0]?.setAttribute("aria-rowindex", "1"), this._items.forEach((e, t) => {
66266
+ e.setAttribute("aria-rowindex", String(t + 2));
66267
+ }), this._rowHeight > 0 || (this._rowHeight = this._measureRow(e));
66257
66268
  }
66258
66269
  let r = e.tHead?.getBoundingClientRect().height || 0, i = bUe({
66259
66270
  scrollTop: this.scrollTop - r,
@@ -88587,7 +88598,7 @@ function g$e(e) {
88587
88598
  e.removeEventListener("wui:kanban:move", t), e.removeEventListener("wui:kanban:locked", n), e.accept = void 0;
88588
88599
  };
88589
88600
  }, []);
88590
- let le = (e) => !_ || _(e) !== !1, ue = (e, t) => {
88601
+ let le = (e) => _?.(e) !== !1, ue = (e, t) => {
88591
88602
  ne.has(e) && ae((e) => {
88592
88603
  let n = new Set(e);
88593
88604
  for (let e of t) n.delete(String(s(e)));
@@ -125378,7 +125389,9 @@ Us("wui-rolling-number", class extends Ws {
125378
125389
  this.getAttribute("duration") && Number.isFinite(r) && r >= 0 ? this.style.setProperty("--wui-roll-duration", `${r}ms`) : this.style.removeProperty("--wui-roll-duration");
125379
125390
  let i = [...n], a = i.filter((e) => m9.test(e)).map(Number), o = i.map((e) => m9.test(e) ? "#" : e).join("");
125380
125391
  if (e && o === this._signature) {
125381
- this._reels.forEach((e, t) => e.style.setProperty("--wui-roll-digit", String(a[t]))), this._digits = a;
125392
+ this._reels.forEach((e, t) => {
125393
+ e.style.setProperty("--wui-roll-digit", String(a[t]));
125394
+ }), this._digits = a;
125382
125395
  return;
125383
125396
  }
125384
125397
  let s = this._digits, c = [], l = [], u = 0;
@@ -125399,7 +125412,9 @@ Us("wui-rolling-number", class extends Ws {
125399
125412
  let i = a.length - 1 - u, o = e ? s[s.length - 1 - i] ?? 0 : a[u];
125400
125413
  r.style.setProperty("--wui-roll-digit", String(o)), n.append(r), l.push(n), c.push(r), u += 1;
125401
125414
  }
125402
- t.replaceChildren(...l), e && (t.offsetWidth, c.forEach((e, t) => e.style.setProperty("--wui-roll-digit", String(a[t])))), this._signature = o, this._digits = a, this._reels = c, this.setAttribute("data-ready", "");
125415
+ t.replaceChildren(...l), e && (t.offsetWidth, c.forEach((e, t) => {
125416
+ e.style.setProperty("--wui-roll-digit", String(a[t]));
125417
+ })), this._signature = o, this._digits = a, this._reels = c, this.setAttribute("data-ready", "");
125403
125418
  }
125404
125419
  });
125405
125420
  //#endregion
@@ -132547,7 +132562,7 @@ var Bgt = u(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
132547
132562
  kind: "WeborityWeb",
132548
132563
  library: {
132549
132564
  name: "@webority/ui-react",
132550
- version: "0.98.0"
132565
+ version: "0.99.0"
132551
132566
  },
132552
132567
  rendererProtocolVersion: 7,
132553
132568
  platform: "Web",
@@ -155177,7 +155192,7 @@ var Bgt = u(function({ compact: r, tenant: i, "aria-label": a, className: o, ...
155177
155192
  primary: "Primary fill for buttons, selected states and borders.",
155178
155193
  "primary-hover": "Primary fill while a control is hovered or pressed.",
155179
155194
  "primary-soft": "Soft primary tint behind selected and highlighted rows.",
155180
- "primary-text": "Primary as text and small glyphs on a page, passing AA contrast.",
155195
+ "primary-text": "Primary as text and small glyphs on a page.",
155181
155196
  "primary-wash": "Faint translucent primary wash over a surface.",
155182
155197
  "primary-wash-strong": "Stronger translucent primary wash over a surface.",
155183
155198
  "progress-label": "Label text inside a progress bar fill.",
@@ -2,7 +2,7 @@
2
2
  "kind": "WeborityWeb",
3
3
  "library": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.98.0"
5
+ "version": "0.99.0"
6
6
  },
7
7
  "rendererProtocolVersion": 7,
8
8
  "platform": "Web",
@@ -24761,7 +24761,7 @@
24761
24761
  "primary": "Primary fill for buttons, selected states and borders.",
24762
24762
  "primary-hover": "Primary fill while a control is hovered or pressed.",
24763
24763
  "primary-soft": "Soft primary tint behind selected and highlighted rows.",
24764
- "primary-text": "Primary as text and small glyphs on a page, passing AA contrast.",
24764
+ "primary-text": "Primary as text and small glyphs on a page.",
24765
24765
  "primary-wash": "Faint translucent primary wash over a surface.",
24766
24766
  "primary-wash-strong": "Stronger translucent primary wash over a surface.",
24767
24767
  "progress-label": "Label text inside a progress bar fill.",
@@ -1,21 +1,21 @@
1
1
  {
2
2
  "name": "webority-web",
3
- "version": "0.98.0",
3
+ "version": "0.99.0",
4
4
  "platform": "Web",
5
5
  "kitModuleVersion": 2,
6
6
  "rendererProtocolVersion": 7,
7
7
  "library": {
8
8
  "name": "@webority/ui-react",
9
- "version": "0.98.0"
9
+ "version": "0.99.0"
10
10
  },
11
11
  "files": {
12
12
  "manifest.json": {
13
- "sha256": "81dfb6ae016a3b300cdbe191bc9ecf1ccaf850241f3ed4a34692455ecbb88352",
14
- "bytes": 841354
13
+ "sha256": "7180779193cea71a33c29bc0e19db62b99b3d753367063a3882ec4bcaaf34464",
14
+ "bytes": 841333
15
15
  },
16
16
  "kit.js": {
17
- "sha256": "ab0348c98456a2f2a6e520facdc9bf560fbbe423f98a976da56011c29c611ad2",
18
- "bytes": 10859669
17
+ "sha256": "becd4964e26fc1aa0c09323c29372907bbafa6e8b35810ba33db1179e9381e11",
18
+ "bytes": 10859956
19
19
  },
20
20
  "kit.css": {
21
21
  "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import{FULL_LINEAR_LOADERS as n,FULL_VARIANT_LOADERS as r,shardKey as i}from"./iconCatalogLoaders.g.js";import{ICON_NAMES as a}from"./iconCatalogNames.g.js";import{GLYPHS as o}from"./iconGlyphs.g.js";import s from"./warnInvalidValue.js";import c from"./warnUnknownProps.js";import l from"./withTooltip.js";import{useEffect as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],h=new Set;function g(e,n){h.has(e)||(h.add(e),t(`[@webority/ui-react] The ${e} failed to load (${n?.message??n}); icons fall back to the linear default until a later render retries it.`))}var _=null,v=null,y=!1,b=new Set;function x(){return v||=import(`./iconVariants.g.js`).then(e=>{_=e.VARIANT_GLYPHS,y=!1;for(let e of b)e();b.clear()}).catch(e=>{v=null,g(`curated icon variants chunk`,e),y?b.clear():(y=!0,setTimeout(()=>{for(let e of[...b])e()},1e3))}),v}var S=new Set(a),C=Object.create(null),w=Object.create(null),T=Object.create(null),E=Object.create(null);function D(e){let t=i(e),r=n[t];return r?(w[t]||=r().then(e=>{Object.assign(C,e.FULL_GLYPHS),E[t]=!1;let n=T[t];if(n){for(let e of n)e();n.clear()}}).catch(e=>{w[t]=null,g(`full icon catalogue '${t}' shard`,e),E[t]?T[t]?.clear():(E[t]=!0,setTimeout(()=>{for(let e of[...T[t]||[]])e()},1e3))}),w[t]):null}var O=Object.create(null),k=Object.create(null),A=Object.create(null),j=Object.create(null);function M(e,t){let n=r[e];if(!n)return null;let a=i(t),o=n[a];if(!o)return null;let s=`${e}:${a}`;return k[s]||=o().then(t=>{let n=O[e]||(O[e]=Object.create(null));Object.assign(n,t.FULL_VARIANT_GLYPHS),j[s]=!1;let r=A[s];if(r){for(let e of r)e();r.clear()}}).catch(t=>{k[s]=null,g(`${e} icon catalogue '${a}' shard`,t),j[s]?A[s]?.clear():(j[s]=!0,setTimeout(()=>{for(let e of[...A[s]||[]])e()},1e3))}),k[s]}var N=a,P=new Map;function F(e){for(let[t,n]of Object.entries(e))P.set(t,n)}function I(t){let{name:n,size:r=16,variant:a,tooltip:h,tooltipPlacement:g,className:v,color:y,style:w,"data-canvas":E,...k}=t;c(`AppIcon`,k),s(`AppIcon`,`variant`,a,m);let j=!!a&&a!==`linear`,N=h!=null&&h!==``,F=e(`AppIcon`,t),I=(e,t=!0)=>N?l(f(`span`,{className:`wui-icon-tip`,role:`img`,"aria-label":h,...t?F:void 0,children:e}),h,g):e,L=o[n]!==void 0,R=!L&&S.has(n),[,z]=d(0);u(()=>{let e=()=>z(e=>e+1);j&&L&&!_&&(b.add(e),x());let t=R?i(n):null;R&&C[n]===void 0&&((T[t]||=new Set).add(e),D(n));let r=j&&R?`${a}:${i(n)}`:null;return j&&R&&O[a]?.[n]===void 0&&((A[r]||=new Set).add(e),M(a,n)),()=>{b.delete(e),t&&T[t]?.delete(e),r&&A[r]?.delete(e)}},[n,j,L,R,a]);let B=P.get(n);if(B)return I(B({size:r,color:y,className:v,style:w}),!1);if(n===`hard-hat`)return I(f(`svg`,{width:r,height:r,viewBox:`0 0 24 24`,fill:`none`,className:v?`wui-icon ${v}`:`wui-icon`,"data-icon":n,"aria-hidden":`true`,style:{color:y,...w},...N?void 0:F,...k,children:p(`g`,{fill:`currentColor`,children:[f(`circle`,{cx:`12`,cy:`7.5`,r:`4.2`}),f(`path`,{d:`M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z`})]})}));let V=j&&(_?.[a]?.[n]||R&&O?.[a]?.[n])||o[n]||C[n];return V?I(f(`svg`,{width:r,height:r,viewBox:`0 0 24 24`,fill:`none`,className:v?`wui-icon ${v}`:`wui-icon`,"data-icon":n,"aria-hidden":`true`,style:{color:y,...w},dangerouslySetInnerHTML:{__html:V},...N?void 0:F,...k})):null}export{I as default,N as iconNames,F as registerIcons};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import{devWarn as t}from"../lib/devWarn.js";import{FULL_LINEAR_LOADERS as n,FULL_VARIANT_LOADERS as r,shardKey as i}from"./iconCatalogLoaders.g.js";import{ICON_NAMES as a}from"./iconCatalogNames.g.js";import{GLYPHS as o}from"./iconGlyphs.g.js";import s from"./warnInvalidValue.js";import c from"./warnUnknownProps.js";import l from"./withTooltip.js";import{useEffect as u,useState as d}from"react";import{jsx as f,jsxs as p}from"react/jsx-runtime";var m=[`linear`,`outline`,`bold`,`bulk`,`broken`,`twotone`],h=new Set;function g(e,n){h.has(e)||(h.add(e),t(`[@webority/ui-react] The ${e} failed to load (${n?.message??n}); icons fall back to the linear default until a later render retries it.`))}var _=null,v=null,y=!1,b=new Set;function x(){return v||=import(`./iconVariants.g.js`).then(e=>{_=e.VARIANT_GLYPHS,y=!1;for(let e of b)e();b.clear()}).catch(e=>{v=null,g(`curated icon variants chunk`,e),y?b.clear():(y=!0,setTimeout(()=>{for(let e of[...b])e()},1e3))}),v}var S=new Set(a),C=Object.create(null),w=Object.create(null),T=Object.create(null),E=Object.create(null);function D(e){let t=i(e),r=n[t];return r?(w[t]||=r().then(e=>{Object.assign(C,e.FULL_GLYPHS),E[t]=!1;let n=T[t];if(n){for(let e of n)e();n.clear()}}).catch(e=>{w[t]=null,g(`full icon catalogue '${t}' shard`,e),E[t]?T[t]?.clear():(E[t]=!0,setTimeout(()=>{for(let e of[...T[t]||[]])e()},1e3))}),w[t]):null}var O=Object.create(null),k=Object.create(null),A=Object.create(null),j=Object.create(null);function M(e,t){let n=r[e];if(!n)return null;let a=i(t),o=n[a];if(!o)return null;let s=`${e}:${a}`;return k[s]||=o().then(t=>{O[e]||(O[e]=Object.create(null)),Object.assign(O[e],t.FULL_VARIANT_GLYPHS),j[s]=!1;let n=A[s];if(n){for(let e of n)e();n.clear()}}).catch(t=>{k[s]=null,g(`${e} icon catalogue '${a}' shard`,t),j[s]?A[s]?.clear():(j[s]=!0,setTimeout(()=>{for(let e of[...A[s]||[]])e()},1e3))}),k[s]}var N=a,P=new Map;function F(e){for(let[t,n]of Object.entries(e))P.set(t,n)}function I(t){let{name:n,size:r=16,variant:a,tooltip:h,tooltipPlacement:g,className:v,color:y,style:w,"data-canvas":E,...k}=t;c(`AppIcon`,k),s(`AppIcon`,`variant`,a,m);let j=!!a&&a!==`linear`,N=h!=null&&h!==``,F=e(`AppIcon`,t),I=(e,t=!0)=>N?l(f(`span`,{className:`wui-icon-tip`,role:`img`,"aria-label":h,...t?F:void 0,children:e}),h,g):e,L=o[n]!==void 0,R=!L&&S.has(n),[,z]=d(0);u(()=>{let e=()=>z(e=>e+1);j&&L&&!_&&(b.add(e),x());let t=R?i(n):null;R&&C[n]===void 0&&(T[t]||=new Set,T[t].add(e),D(n));let r=j&&R?`${a}:${i(n)}`:null;return j&&R&&O[a]?.[n]===void 0&&(A[r]||=new Set,A[r].add(e),M(a,n)),()=>{b.delete(e),t&&T[t]?.delete(e),r&&A[r]?.delete(e)}},[n,j,L,R,a]);let B=P.get(n);if(B)return I(B({size:r,color:y,className:v,style:w}),!1);if(n===`hard-hat`)return I(f(`svg`,{width:r,height:r,viewBox:`0 0 24 24`,fill:`none`,className:v?`wui-icon ${v}`:`wui-icon`,"data-icon":n,"aria-hidden":`true`,style:{color:y,...w},...N?void 0:F,...k,children:p(`g`,{fill:`currentColor`,children:[f(`circle`,{cx:`12`,cy:`7.5`,r:`4.2`}),f(`path`,{d:`M3.2 22.5C3.2 17.4 7.5 14.9 11 14.7L12 17.4l1-2.7C16.5 14.9 20.8 17.4 20.8 22.5z`})]})}));let V=j&&(_?.[a]?.[n]||R&&O?.[a]?.[n])||o[n]||C[n];return V?I(f(`svg`,{width:r,height:r,viewBox:`0 0 24 24`,fill:`none`,className:v?`wui-icon ${v}`:`wui-icon`,"data-icon":n,"aria-hidden":`true`,style:{color:y,...w},dangerouslySetInnerHTML:{__html:V},...N?void 0:F,...k})):null}export{I as default,N as iconNames,F as registerIcons};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{errorToast as i}from"./toast.js";import{formatValue as a}from"@webority/ui-elements/helpers";import{useEffect as o,useId as s,useMemo as c,useRef as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{KANBAN_SUMMARY_FORMATS as p,KANBAN_TEXT as m,KANBAN_TONES as h,kanbanOverflow as g,kanbanSummaryFormat as _,kanbanVisibleLimit as v,sumKanbanValues as ee}from"@webority/ui-elements/elements/kanban";var te=e=>e.key??e.id,ne=e=>e.column,y=[`rupees`,`paise`],re=[`inline`,`stacked`];function b(b){let{columns:x,cards:S,renderCard:ie,renderColumnActions:ae,getCardKey:C=te,getCardColumn:w=ne,getCardValue:T,cardLabel:E,isCardLocked:D,onLocked:O,onMove:k,accept:A,filter:j,boardId:oe,ariaLabel:se=`Board`,emptyText:ce=m.empty,readOnly:le=!1,swipeHint:ue=!1,fill:M=!1,columnWidth:N,fillOffset:P,activeCardKey:F,headLayout:I=`inline`,summaryFormat:L,summaryUnit:R,className:z=``,id:B,...V}=b;if(!Array.isArray(x))throw Error(`<AppKanban> columns is required: pass the board's stage columns.`);if(!Array.isArray(S))throw Error(`<AppKanban> cards is required: pass the cards, an empty array for an empty board.`);n(`AppKanban`,V),t(`AppKanban`,`summaryFormat`,L,p),t(`AppKanban`,`summaryUnit`,R,y),t(`AppKanban`,`headLayout`,I,re);for(let e of x)t(`AppKanban`,`columns[].tone`,e.tone,h);let H=s(),U=B||`kanban-${H.replace(/[^a-zA-Z0-9_-]/g,``)}`,W=l(null),[G,K]=u(()=>new Map),[q,de]=u(()=>new Set),[fe,J]=u(()=>new Set),pe=c(()=>new Map(S.map(e=>[String(C(e)),e])),[S,C]),Y=l(null);Y.current={accept:A,onMove:k,onLocked:O,byKey:pe,columns:x};let X=L&&p.includes(L)&&(R==null||y.includes(R))?_(L,R):null,Z=c(()=>{let e=new Map(x.map(e=>[e.key,[]])),t=[];for(let n of S){let r=String(C(n)),i=G.get(r);i?t.push([n,i]):e.get(w(n))?.push(n)}for(let[n,r]of t){let t=e.get(r.to);t&&t.splice(Math.min(r.index,t.length),0,n)}return e},[x,S,G,C,w]);o(()=>{let e=W.current;if(!e)return;e.accept=(e,t,n)=>{let r=Y.current.accept;return!r||r(Y.current.byKey.get(e.getAttribute(`data-wui-card`)),t,n)};let t=e=>{let{key:t,from:n,to:r,index:a}=e.detail,o=Y.current.onMove,s=Y.current.byKey.get(t);if(!o||!s)return;let c=Y.current.columns.find(e=>e.key===r)?.visibleLimit!=null;c&&J(e=>new Set(e).add(t)),K(e=>new Map(e).set(t,{to:r,index:a}));let l=()=>K(e=>{let n=new Map(e);return n.delete(t),n}),u;try{u=o({card:s,key:t,from:n,to:r,index:a})}catch(e){u=Promise.reject(e)}Promise.resolve(u).then(l,e=>{l(),c&&J(e=>{let n=new Set(e);return n.delete(t),n}),i(e?.message||m.failed.server)})},n=e=>{let{key:t,reason:n}=e.detail,r=Y.current.byKey.get(t);r&&Y.current.onLocked?.({card:r,key:t,reason:n})};return e.addEventListener(`wui:kanban:move`,t),e.addEventListener(`wui:kanban:locked`,n),()=>{e.removeEventListener(`wui:kanban:move`,t),e.removeEventListener(`wui:kanban:locked`,n),e.accept=void 0}},[]);let Q=e=>!j||j(e)!==!1,me=(e,t)=>{q.has(e)&&J(e=>{let n=new Set(e);for(let e of t)n.delete(String(C(e)));return n}),de(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})},$={};return N!=null&&($[`--wui-kanban-column-width`]=`${N}px`),P!=null&&($[`--wui-kanban-fill-offset`]=`${P}px`),f(`wui-kanban`,{ref:W,id:U,class:z?`wui-kanban ${z}`:`wui-kanban`,role:`region`,"aria-label":se,"board-id":oe||void 0,"summary-format":X?L:void 0,"summary-unit":X&&R?R:void 0,readonly:le?``:void 0,fill:M?``:void 0,"data-head-layout":I===`stacked`?`stacked`:void 0,style:$,controlled:``,...e(`AppKanban`,b),...V,children:[d(`nav`,{className:`wui-kanban-switcher`,"aria-label":`Board columns`,children:x.map((e,t)=>f(`button`,{type:`button`,className:`wui-kanban-switch`,"data-wui-switch":e.key,"aria-controls":`${U}-${e.key}`,"aria-current":t===0?`true`:void 0,children:[d(`span`,{className:`wui-kanban-switch-title`,children:e.title}),d(`span`,{className:`wui-kanban-count`,"data-wui-count":``,children:(Z.get(e.key)||[]).filter(Q).length})]},e.key))}),ue&&f(`p`,{className:`wui-kanban-hint`,"aria-hidden":`true`,children:[d(r,{name:`arrow-swap-horizontal`,size:14}),m.swipeHint]}),d(`div`,{className:`wui-kanban-board`,"data-wui-scroller":``,children:x.map(e=>{let t=`${U}-${e.key}`,n=Z.get(e.key)||[],i=n.filter(Q),o=!!(e.collapsible&&e.collapsed),s=v(e.visibleLimit),c=q.has(e.key),l=g(i.map(e=>String(C(e))),s,c,fe),u=typeof e.summary==`function`?e.summary(i):e.summary;X&&(u=a(ee(i.map(e=>T?.(e))),X));let p=ae?.(e,i);return f(`section`,{className:`wui-kanban-column`,id:t,"data-wui-column":e.key,"data-tone":e.tone&&h.includes(e.tone)?e.tone:`neutral`,"aria-labelledby":`${t}-title`,"data-accept-from":e.acceptFrom?e.acceptFrom.join(` `):void 0,"data-collapsible":e.collapsible?``:void 0,"data-collapsed":o?``:void 0,children:[f(`header`,{className:`wui-kanban-head`,children:[d(`span`,{className:`wui-kanban-dot`,"aria-hidden":`true`}),d(`h2`,{className:`wui-kanban-title`,id:`${t}-title`,children:e.href?d(`a`,{href:e.href,children:e.title}):e.title}),d(`span`,{className:`wui-kanban-count`,"data-wui-count":``,children:i.length}),e.collapsible&&d(`span`,{className:`wui-kanban-lock`,"aria-hidden":`true`,children:d(r,{name:`lock`,size:14})}),p!=null&&p!==!1&&d(`div`,{className:`wui-kanban-actions`,"data-wui-no-drag":``,children:p}),e.collapsible&&d(`button`,{type:`button`,className:`wui-kanban-collapse`,"data-wui-collapse":``,"aria-expanded":o?`false`:`true`,"aria-controls":`${t}-body`,"aria-label":o?m.expand(e.title):m.collapse(e.title),children:d(r,{name:`chevron-left`,size:16})}),u!=null&&d(`div`,{className:`wui-kanban-summary`,"data-wui-summary":``,children:u})]}),d(`p`,{className:`wui-kanban-drop-note`,"data-wui-drop-note":``,hidden:!0}),d(`div`,{className:`wui-kanban-body`,id:`${t}-body`,"data-wui-body":``,children:n.map(e=>{let t=String(C(e)),n=G.has(t);return d(`article`,{className:`wui-kanban-card`,"data-wui-card":t,tabIndex:0,"aria-label":E?E(e):void 0,"data-wui-locked":D?.(e)?``:void 0,"data-wui-value":T?T(e)??void 0:void 0,"aria-current":F!=null&&t===String(F)?`true`:void 0,"aria-busy":n?`true`:void 0,"data-wui-saving":n?``:void 0,"data-wui-overflow":l.has(t)?``:void 0,hidden:!Q(e),children:ie?.(e)},t)})}),s!=null&&d(`button`,{type:`button`,className:`wui-kanban-more`,"data-wui-more":``,"aria-controls":`${t}-body`,"aria-expanded":c?`true`:`false`,hidden:c?i.length<=s:l.size===0,onClick:()=>me(e.key,n),children:c?m.fewer:m.more(l.size)}),d(`p`,{className:`wui-kanban-empty`,"data-wui-empty":``,hidden:i.length>0,children:e.emptyText??ce})]},e.key)})}),d(`p`,{className:`visually-hidden`,id:`${U}-help`,"data-wui-help":``,children:m.help}),d(`div`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}export{b as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import r from"./AppIcon.js";import{errorToast as i}from"./toast.js";import{formatValue as a}from"@webority/ui-elements/helpers";import{useEffect as o,useId as s,useMemo as c,useRef as l,useState as u}from"react";import{jsx as d,jsxs as f}from"react/jsx-runtime";import{KANBAN_SUMMARY_FORMATS as p,KANBAN_TEXT as m,KANBAN_TONES as h,kanbanOverflow as g,kanbanSummaryFormat as _,kanbanVisibleLimit as v,sumKanbanValues as ee}from"@webority/ui-elements/elements/kanban";var te=e=>e.key??e.id,ne=e=>e.column,y=[`rupees`,`paise`],re=[`inline`,`stacked`];function b(b){let{columns:x,cards:S,renderCard:C,renderColumnActions:w,getCardKey:T=te,getCardColumn:E=ne,getCardValue:D,cardLabel:O,isCardLocked:k,onLocked:A,onMove:j,accept:ie,filter:ae,boardId:oe,ariaLabel:se=`Board`,emptyText:ce=m.empty,readOnly:le=!1,swipeHint:ue=!1,fill:M=!1,columnWidth:N,fillOffset:P,activeCardKey:F,headLayout:I=`inline`,summaryFormat:L,summaryUnit:R,className:z=``,id:B,...V}=b;if(!Array.isArray(x))throw Error(`<AppKanban> columns is required: pass the board's stage columns.`);if(!Array.isArray(S))throw Error(`<AppKanban> cards is required: pass the cards, an empty array for an empty board.`);n(`AppKanban`,V),t(`AppKanban`,`summaryFormat`,L,p),t(`AppKanban`,`summaryUnit`,R,y),t(`AppKanban`,`headLayout`,I,re);for(let e of x)t(`AppKanban`,`columns[].tone`,e.tone,h);let H=s(),U=B||`kanban-${H.replace(/[^a-zA-Z0-9_-]/g,``)}`,W=l(null),[G,K]=u(()=>new Map),[q,de]=u(()=>new Set),[fe,J]=u(()=>new Set),pe=c(()=>new Map(S.map(e=>[String(T(e)),e])),[S,T]),Y=l(null);Y.current={accept:ie,onMove:j,onLocked:A,byKey:pe,columns:x};let X=L&&p.includes(L)&&(R==null||y.includes(R))?_(L,R):null,Z=c(()=>{let e=new Map(x.map(e=>[e.key,[]])),t=[];for(let n of S){let r=String(T(n)),i=G.get(r);i?t.push([n,i]):e.get(E(n))?.push(n)}for(let[n,r]of t){let t=e.get(r.to);t&&t.splice(Math.min(r.index,t.length),0,n)}return e},[x,S,G,T,E]);o(()=>{let e=W.current;if(!e)return;e.accept=(e,t,n)=>{let r=Y.current.accept;return!r||r(Y.current.byKey.get(e.getAttribute(`data-wui-card`)),t,n)};let t=e=>{let{key:t,from:n,to:r,index:a}=e.detail,o=Y.current.onMove,s=Y.current.byKey.get(t);if(!o||!s)return;let c=Y.current.columns.find(e=>e.key===r)?.visibleLimit!=null;c&&J(e=>new Set(e).add(t)),K(e=>new Map(e).set(t,{to:r,index:a}));let l=()=>K(e=>{let n=new Map(e);return n.delete(t),n}),u;try{u=o({card:s,key:t,from:n,to:r,index:a})}catch(e){u=Promise.reject(e)}Promise.resolve(u).then(l,e=>{l(),c&&J(e=>{let n=new Set(e);return n.delete(t),n}),i(e?.message||m.failed.server)})},n=e=>{let{key:t,reason:n}=e.detail,r=Y.current.byKey.get(t);r&&Y.current.onLocked?.({card:r,key:t,reason:n})};return e.addEventListener(`wui:kanban:move`,t),e.addEventListener(`wui:kanban:locked`,n),()=>{e.removeEventListener(`wui:kanban:move`,t),e.removeEventListener(`wui:kanban:locked`,n),e.accept=void 0}},[]);let Q=e=>ae?.(e)!==!1,me=(e,t)=>{q.has(e)&&J(e=>{let n=new Set(e);for(let e of t)n.delete(String(T(e)));return n}),de(t=>{let n=new Set(t);return n.delete(e)||n.add(e),n})},$={};return N!=null&&($[`--wui-kanban-column-width`]=`${N}px`),P!=null&&($[`--wui-kanban-fill-offset`]=`${P}px`),f(`wui-kanban`,{ref:W,id:U,class:z?`wui-kanban ${z}`:`wui-kanban`,role:`region`,"aria-label":se,"board-id":oe||void 0,"summary-format":X?L:void 0,"summary-unit":X&&R?R:void 0,readonly:le?``:void 0,fill:M?``:void 0,"data-head-layout":I===`stacked`?`stacked`:void 0,style:$,controlled:``,...e(`AppKanban`,b),...V,children:[d(`nav`,{className:`wui-kanban-switcher`,"aria-label":`Board columns`,children:x.map((e,t)=>f(`button`,{type:`button`,className:`wui-kanban-switch`,"data-wui-switch":e.key,"aria-controls":`${U}-${e.key}`,"aria-current":t===0?`true`:void 0,children:[d(`span`,{className:`wui-kanban-switch-title`,children:e.title}),d(`span`,{className:`wui-kanban-count`,"data-wui-count":``,children:(Z.get(e.key)||[]).filter(Q).length})]},e.key))}),ue&&f(`p`,{className:`wui-kanban-hint`,"aria-hidden":`true`,children:[d(r,{name:`arrow-swap-horizontal`,size:14}),m.swipeHint]}),d(`div`,{className:`wui-kanban-board`,"data-wui-scroller":``,children:x.map(e=>{let t=`${U}-${e.key}`,n=Z.get(e.key)||[],i=n.filter(Q),o=!!(e.collapsible&&e.collapsed),s=v(e.visibleLimit),c=q.has(e.key),l=g(i.map(e=>String(T(e))),s,c,fe),u=typeof e.summary==`function`?e.summary(i):e.summary;X&&(u=a(ee(i.map(e=>D?.(e))),X));let p=w?.(e,i);return f(`section`,{className:`wui-kanban-column`,id:t,"data-wui-column":e.key,"data-tone":e.tone&&h.includes(e.tone)?e.tone:`neutral`,"aria-labelledby":`${t}-title`,"data-accept-from":e.acceptFrom?e.acceptFrom.join(` `):void 0,"data-collapsible":e.collapsible?``:void 0,"data-collapsed":o?``:void 0,children:[f(`header`,{className:`wui-kanban-head`,children:[d(`span`,{className:`wui-kanban-dot`,"aria-hidden":`true`}),d(`h2`,{className:`wui-kanban-title`,id:`${t}-title`,children:e.href?d(`a`,{href:e.href,children:e.title}):e.title}),d(`span`,{className:`wui-kanban-count`,"data-wui-count":``,children:i.length}),e.collapsible&&d(`span`,{className:`wui-kanban-lock`,"aria-hidden":`true`,children:d(r,{name:`lock`,size:14})}),p!=null&&p!==!1&&d(`div`,{className:`wui-kanban-actions`,"data-wui-no-drag":``,children:p}),e.collapsible&&d(`button`,{type:`button`,className:`wui-kanban-collapse`,"data-wui-collapse":``,"aria-expanded":o?`false`:`true`,"aria-controls":`${t}-body`,"aria-label":o?m.expand(e.title):m.collapse(e.title),children:d(r,{name:`chevron-left`,size:16})}),u!=null&&d(`div`,{className:`wui-kanban-summary`,"data-wui-summary":``,children:u})]}),d(`p`,{className:`wui-kanban-drop-note`,"data-wui-drop-note":``,hidden:!0}),d(`div`,{className:`wui-kanban-body`,id:`${t}-body`,"data-wui-body":``,children:n.map(e=>{let t=String(T(e)),n=G.has(t);return d(`article`,{className:`wui-kanban-card`,"data-wui-card":t,tabIndex:0,"aria-label":O?O(e):void 0,"data-wui-locked":k?.(e)?``:void 0,"data-wui-value":D?D(e)??void 0:void 0,"aria-current":F!=null&&t===String(F)?`true`:void 0,"aria-busy":n?`true`:void 0,"data-wui-saving":n?``:void 0,"data-wui-overflow":l.has(t)?``:void 0,hidden:!Q(e),children:C?.(e)},t)})}),s!=null&&d(`button`,{type:`button`,className:`wui-kanban-more`,"data-wui-more":``,"aria-controls":`${t}-body`,"aria-expanded":c?`true`:`false`,hidden:c?i.length<=s:l.size===0,onClick:()=>me(e.key,n),children:c?m.fewer:m.more(l.size)}),d(`p`,{className:`wui-kanban-empty`,"data-wui-empty":``,hidden:i.length>0,children:e.emptyText??ce})]},e.key)})}),d(`p`,{className:`visually-hidden`,id:`${U}-help`,"data-wui-help":``,children:m.help}),d(`div`,{className:`visually-hidden`,"data-wui-live":``,"aria-live":`polite`,"aria-atomic":`true`})]})}export{b as default};
@@ -1 +1 @@
1
- import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{shortcutChip as r}from"../lib/shortcutChip.js";import{cloneElement as i,useId as a,useState as o}from"react";import{OverlayTrigger as s,Tooltip as c}from"react-bootstrap";import{jsx as l,jsxs as u}from"react/jsx-runtime";var d=[`default`,`dark`,`primary`,`success`,`warning`,`danger`],f=[`sm`,`md`,`lg`],p={start:`left`,end:`right`,top:`top`,bottom:`bottom`},m=[`auto`,`top`,`bottom`,`start`,`end`],h={modifiers:[{name:`offset`,options:{offset:[0,6]}}]};function g(g){let{content:_,children:v,placement:y=`top`,tone:b=`default`,size:x=`md`,open:S,shortcut:C,className:w=``,...T}=g;n(`AppTooltip`,T),t(`AppTooltip`,`tone`,b,d),t(`AppTooltip`,`size`,x,f),t(`AppTooltip`,`placement`,y,m);let E=a(),[D,O]=o(!1),k=typeof S==`boolean`,A=u(c,{id:E,className:[`wui-tooltip`,b&&b!=="default"?`tone-${b}`:``,x&&x!==`md`?`size-${x}`:``,w].filter(Boolean).join(` `),...e(`AppTooltip`,g),children:[_,r(C,{inTooltip:!0})]}),j=e=>{v.props.onClick?.(e),T.onClick?.(e),O(!1)};return l(s,{trigger:[`hover`,`focus`],placement:p[y]||y,popperConfig:h,show:k?S:D,onToggle:k?void 0:e=>O(e),overlay:A,children:k?i(v,T):i(v,{...T,onClick:j})})}export{g as default};
1
+ import{wuiMarkerAttributes as e}from"../lib/wuiMarker.js";import t from"./warnInvalidValue.js";import n from"./warnUnknownProps.js";import{shortcutChip as r}from"../lib/shortcutChip.js";import{cloneElement as i,useId as a,useRef as o,useState as s}from"react";import{OverlayTrigger as c,Tooltip as l}from"react-bootstrap";import{jsx as u,jsxs as d}from"react/jsx-runtime";var f=[`default`,`dark`,`primary`,`success`,`warning`,`danger`],p=[`sm`,`md`,`lg`],m={start:`left`,end:`right`,top:`top`,bottom:`bottom`},h=[`auto`,`top`,`bottom`,`start`,`end`],g={modifiers:[{name:`offset`,options:{offset:[0,6]}}]};function _(_){let{content:v,children:y,placement:b=`top`,tone:x=`default`,size:S=`md`,open:C,shortcut:w,className:T=``,...E}=_;n(`AppTooltip`,E),t(`AppTooltip`,`tone`,x,f),t(`AppTooltip`,`size`,S,p),t(`AppTooltip`,`placement`,b,h);let D=a(),[O,k]=s(!1),A=typeof C==`boolean`,j=d(l,{id:D,className:[`wui-tooltip`,x&&x!=="default"?`tone-${x}`:``,S&&S!==`md`?`size-${S}`:``,T].filter(Boolean).join(` `),...e(`AppTooltip`,_),children:[v,r(w,{inTooltip:!0})]}),M=e=>{y.props.onClick?.(e),E.onClick?.(e),k(!1)},N=o(!1),P=e=>{y.props.onFocusCapture?.(e),E.onFocusCapture?.(e),N.current=!e.currentTarget.matches?.(`:focus-visible`),queueMicrotask(()=>{N.current=!1})};return u(c,{trigger:[`hover`,`focus`],placement:m[b]||b,popperConfig:g,show:A?C:O,onToggle:A?void 0:e=>{let t=N.current;N.current=!1,!(e&&t)&&k(e)},overlay:j,children:A?i(y,E):i(y,{...E,onClick:M,onFocusCapture:P})})}export{_ as default};
@@ -2,7 +2,7 @@
2
2
  "format": "webority-guidance/1",
3
3
  "package": {
4
4
  "name": "@webority/ui-react",
5
- "version": "0.98.0"
5
+ "version": "0.99.0"
6
6
  },
7
7
  "components": [
8
8
  {
@@ -32,4 +32,4 @@ export default function AppBanner(props: {
32
32
  * @default ""
33
33
  */
34
34
  className?: string;
35
- }): import("react").JSX.Element;
35
+ }): import("react").JSX.Element | null;
@@ -115,4 +115,4 @@ export default function AppCard(props: {
115
115
  * @default "Close"
116
116
  */
117
117
  closeLabel?: string;
118
- }): import("react").JSX.Element;
118
+ }): import("react").JSX.Element | null;
@@ -79,4 +79,4 @@ export default function AppConfirmDialog(props: {
79
79
  * @default ""
80
80
  */
81
81
  className?: string;
82
- }): import("react").JSX.Element;
82
+ }): import("react").JSX.Element | null;
@@ -19,4 +19,4 @@ export default function AppCountryFlag(props: {
19
19
  * @default ""
20
20
  */
21
21
  className?: string;
22
- }): import("react").JSX.Element;
22
+ }): import("react").JSX.Element | null;
@@ -35,4 +35,4 @@ export default function AppErrorSummary(props: {
35
35
  * @default ""
36
36
  */
37
37
  className?: string;
38
- }): import("react").JSX.Element;
38
+ }): import("react").JSX.Element | null;
@@ -31,4 +31,4 @@ export default function AppInfoTip(props: {
31
31
  * @default ""
32
32
  */
33
33
  className?: string;
34
- }): import("react").JSX.Element;
34
+ }): import("react").JSX.Element | null;
@@ -67,4 +67,4 @@ export default function AppOnboardingChecklist(props: {
67
67
  * @default ""
68
68
  */
69
69
  className?: string;
70
- }): import("react").JSX.Element;
70
+ }): import("react").JSX.Element | null;
@@ -36,4 +36,4 @@ export default function AppPagination(props: {
36
36
  ariaLabel?: string;
37
37
  /** Extra CSS class to add to the nav wrapper. */
38
38
  className?: string;
39
- }): import("react").JSX.Element;
39
+ }): import("react").JSX.Element | null;
@@ -33,4 +33,4 @@ export default function AppQrCode(props: {
33
33
  /** Extra classes on the code. */
34
34
  className?: string;
35
35
  style?: import('react').CSSProperties;
36
- }): import("react").JSX.Element;
36
+ }): import("react").JSX.Element | null;
@@ -35,4 +35,4 @@ export default function AppSparkline(props: {
35
35
  * @default ""
36
36
  */
37
37
  className?: string;
38
- }): import("react").JSX.Element;
38
+ }): import("react").JSX.Element | null;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * A plain tooltip on any element (hover or focus to reveal). Distinct from AppInfoTip (a help
2
+ * A plain tooltip on any element (hover or keyboard focus to reveal). Distinct from AppInfoTip (a help
3
3
  * "?" icon beside a label) and AppPopover (a click-opened panel). Wraps react-bootstrap's
4
4
  * OverlayTrigger/Tooltip (Popper positioning); the Razor counterpart `<app-tooltip>` uses
5
5
  * Bootstrap's own tooltip, so both surfaces stay in lockstep.
@@ -1,39 +1,39 @@
1
1
  import "@webority/ui-elements/elements/status-icon";
2
2
  export declare const SuccessIcon: ({ size }: {
3
- size?: number;
3
+ size?: number | undefined;
4
4
  }) => import("react").JSX.Element;
5
5
  export declare const ErrorIcon: ({ size }: {
6
- size?: number;
6
+ size?: number | undefined;
7
7
  }) => import("react").JSX.Element;
8
8
  export declare const WarningIcon: ({ size }: {
9
- size?: number;
9
+ size?: number | undefined;
10
10
  }) => import("react").JSX.Element;
11
11
  export declare const InfoIcon: ({ size }: {
12
- size?: number;
12
+ size?: number | undefined;
13
13
  }) => import("react").JSX.Element;
14
14
  export declare const DeleteIcon: ({ size }: {
15
- size?: number;
15
+ size?: number | undefined;
16
16
  }) => import("react").JSX.Element;
17
17
  export declare const PrimaryIcon: ({ size }: {
18
- size?: number;
18
+ size?: number | undefined;
19
19
  }) => import("react").JSX.Element;
20
20
  export declare const MODAL_ICONS: {
21
21
  success: ({ size }: {
22
- size?: number;
22
+ size?: number | undefined;
23
23
  }) => import("react").JSX.Element;
24
24
  error: ({ size }: {
25
- size?: number;
25
+ size?: number | undefined;
26
26
  }) => import("react").JSX.Element;
27
27
  warning: ({ size }: {
28
- size?: number;
28
+ size?: number | undefined;
29
29
  }) => import("react").JSX.Element;
30
30
  info: ({ size }: {
31
- size?: number;
31
+ size?: number | undefined;
32
32
  }) => import("react").JSX.Element;
33
33
  delete: ({ size }: {
34
- size?: number;
34
+ size?: number | undefined;
35
35
  }) => import("react").JSX.Element;
36
36
  primary: ({ size }: {
37
- size?: number;
37
+ size?: number | undefined;
38
38
  }) => import("react").JSX.Element;
39
39
  };
@@ -217,6 +217,6 @@ export declare const GLYPHS: {
217
217
  export declare const iconNames: string[];
218
218
  /** The library's single icon SVG emitter — identical markup to Razor's IconMarkup.Render. */
219
219
  export declare function glyphSvg(name: any, { size, className }?: {
220
- className?: string;
221
- size?: number;
220
+ className?: string | undefined;
221
+ size?: number | undefined;
222
222
  }): string;
@@ -19,4 +19,4 @@ export declare const ILLUSTRATION_NAMES: string[];
19
19
  export default function EmptyIllustration({ name, className }: {
20
20
  name?: string;
21
21
  className?: string;
22
- }): import("react").JSX.Element;
22
+ }): import("react").JSX.Element | null;
@@ -10,11 +10,11 @@ export declare function nameOf(item: any): any;
10
10
  * The size line for a picked File, or for an existing or uploading item that carries a finite
11
11
  * `sizeBytes` of 0 or more. Null when the size is unknown.
12
12
  */
13
- export declare function sizeLabelOf(item: any): string;
13
+ export declare function sizeLabelOf(item: any): string | null;
14
14
  /** The link a stored file opens; a freshly picked File has none. */
15
15
  export declare function linkOf(item: any): any;
16
16
  /** Upload progress while it is under 100, else null: a finished upload draws no bar. */
17
- export declare function uploadProgressOf(item: any): number;
17
+ export declare function uploadProgressOf(item: any): number | null;
18
18
  /** Why the upload failed, or null. */
19
19
  export declare function uploadErrorOf(item: any): any;
20
20
  /**
@@ -22,4 +22,4 @@ export declare function uploadErrorOf(item: any): any;
22
22
  * change/unmount. An existing attachment already carries `url`. Non-images get no URL — the
23
23
  * caller renders a file-type icon instead.
24
24
  */
25
- export declare function useItemUrl(item: any, isImage: any): any;
25
+ export declare function useItemUrl(item: any, isImage: any): null;
@@ -26,7 +26,7 @@ export declare function buildListQuery({ page, pageSize, sortBy, sortOrder, filt
26
26
  }>;
27
27
  }): URLSearchParams;
28
28
  /** The empty value of a facet: "" (enum, text), [] (multiEnum) or { from: "", to: "" } (dateRange). */
29
- export declare function emptyFacetValue(facet: any): "" | any[] | {
29
+ export declare function emptyFacetValue(facet: any): "" | never[] | {
30
30
  from: string;
31
31
  to: string;
32
32
  };
@@ -1,5 +1,5 @@
1
1
  /** The normalised form of an href or path, or null when it can never match. */
2
- export declare function normalizeNavPath(href: any): string;
2
+ export declare function normalizeNavPath(href: any): string | null;
3
3
  /**
4
4
  * How well `href` (plus any `also` prefixes) matches the current path: the length of the longest
5
5
  * matching target, or -1 when none matches. `pathBase` is stripped from a target that starts with it.
@@ -1,6 +1,6 @@
1
1
  /** Default cookie name (AppShellTagHelper.CollapsedCookie). */
2
2
  export declare const SHELL_COLLAPSED_COOKIE = "wui-shell-collapsed";
3
3
  /** true / false from the cookie ("1" / "0"), or null when it is absent, holds anything else or cannot be read. */
4
- export declare function readShellCollapsed(name?: string, doc?: Document): boolean;
4
+ export declare function readShellCollapsed(name?: string, doc?: Document): boolean | null;
5
5
  /** Remember the rail state for a year, site-wide; a frame without cookie access remembers nothing. */
6
6
  export declare function writeShellCollapsed(collapsed: any, name?: string, doc?: Document): void;
@@ -5,7 +5,7 @@
5
5
  * @internal not exported from the package barrel
6
6
  */
7
7
  export declare function shortcutChip(shortcut: any, { inTooltip }?: {
8
- inTooltip?: boolean;
9
- }): import("react").JSX.Element;
8
+ inTooltip?: boolean | undefined;
9
+ }): import("react").JSX.Element | null;
10
10
  /** The `aria-keyshortcuts` value for a control with this shortcut, or undefined without one. */
11
- export declare function shortcutAria(shortcut: any): string;
11
+ export declare function shortcutAria(shortcut: any): string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-react",
3
- "version": "0.98.0",
3
+ "version": "0.99.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,8 +29,8 @@
29
29
  },
30
30
  "sideEffects": false,
31
31
  "dependencies": {
32
- "@webority/theme": "0.98.0",
33
- "@webority/ui-elements": "0.98.0"
32
+ "@webority/theme": "0.99.0",
33
+ "@webority/ui-elements": "0.99.0"
34
34
  },
35
35
  "peerDependencies": {
36
36
  "@webority/analytics": "^0.28.0",
@@ -56,8 +56,8 @@
56
56
  "typescript": "^7.0.2",
57
57
  "vite": "^8.0.12",
58
58
  "vitest": "5.0.1",
59
- "@webority/tokens": "0.98.0",
60
- "@webority/canvas-kit": "0.98.0"
59
+ "@webority/canvas-kit": "0.99.0",
60
+ "@webority/tokens": "0.99.0"
61
61
  },
62
62
  "scripts": {
63
63
  "build": "vite build && tsc -p tsconfig.json && node ../../scripts/inject-meta-docs.mjs && node ../canvas-kit/dist/cli.js build --config canvas-kit.json --out dist/canvas-kit && node ../canvas-kit/dist/cli.js guidance --config canvas-kit.json --out dist/guidance.json && node ../../scripts/sync-rcl-assets.mjs analytics",