@harnessio/ui 1.0.11 → 1.0.12

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.
@@ -206,6 +206,7 @@ export declare interface ActionData {
206
206
  isDanger?: boolean;
207
207
  disabled?: boolean;
208
208
  tooltip?: Pick<TooltipProps, 'title' | 'content'>;
209
+ testId?: string;
209
210
  }
210
211
 
211
212
  export declare const Alert: {
@@ -3818,6 +3819,8 @@ export declare interface MoreActionsTooltipProps {
3818
3819
  buttonVariant?: ButtonVariants;
3819
3820
  buttonSize?: ButtonSizes;
3820
3821
  disabled?: boolean;
3822
+ /** Accessible name and tooltip for the trigger button. Defaults to "Show more actions". */
3823
+ label?: string;
3821
3824
  }
3822
3825
 
3823
3826
  export declare const MultiSelect: ForwardRefExoticComponent<MultiSelectProps & RefAttributes<MultiSelectRef>>;
@@ -1,6 +1,6 @@
1
1
  import { A as e, B as t, j as o, E as r, k as i, r as n, L as l, S as b, s as p, t as c, c as g } from "./index-DMJBByGt.js";
2
2
  import { B as m, x as d, I as S, y as T, r as C, z as I, T as h, v as F, h as D, E as y, F as L, w as V } from "./button-Bke8AuEh.js";
3
- import { bP as P, G as B, A as M, t as x, v as w, o as f, p as v, bm as k, I as E, by as G, ad as N, ce as R, Y as W, V as H, bs as _, an as U, aV as O, aW as j, aY as z, aX as K, c8 as X, aa as q, ab as J, bb as Q, z as Y, q as Z, F as $, am as aa, al as sa, C as ea, Z as ta, ah as oa, bj as ra, g as ia, aD as na, aE as la, bv as ba, at as pa, Q as ca, O as ga, bp as ua, bw as ma, bx as da, aP as Sa, D as Ta, j as Ca, cj as Ia, bq as ha, bZ as Fa, _ as Da, ba as ya, af as La, f as Va, ai as Aa, cf as Pa, ae as Ba, aH as Ma, aG as xa, aI as wa, aF as fa, b9 as va, bl as ka, a7 as Ea, bY as Ga, a2 as Na, a4 as Ra, a3 as Wa, aC as Ha, ak as _a, bQ as Ua, H as Oa, E as ja, bh as za, aq as Ka, a9 as Xa, cg as qa, X as Ja, $ as Qa, bT as Ya, bU as Za, bS as $a, a0 as as, l as ss, L as es, M as ts, ap as os, ch as rs, r as is, a1 as ns, aZ as ls, a6 as bs, ay as ps, ax as cs, aL as gs, br as us, N as ms, aU as ds, n as Ss, bW as Ts, cd as Cs, P as Is, R as hs, c4 as Fs, k as Ds, aT as ys, as as Ls, b5 as Vs, b4 as As, a_ as Ps, b3 as Bs, a$ as Ms, b0 as xs, b1 as ws, b2 as fs, ac as vs, b6 as ks, bk as Es, bc as Gs, c3 as Ns, aR as Rs, aQ as Ws, cb as Hs, c0 as _s, B as Us, bX as Os, w as js, cc as zs, a8 as Ks, aS as Xs, aw as qs, b as Js, bK as Qs, bD as Ys, c9 as Zs, aN as $s, ca as ae, y as se, bo as ee, S as te, J as oe, K as re, av as ie, bn as ne, c as le, aM as be, bG as pe, bB as ce, d as ge, ci as ue, bH as me, bI as de, au as Se, a as Te, bu as Ce, T as Ie, bi as he, bV as Fe, a5 as De, bN as ye, bf as Le, be as Ve, bg as Ae, c7 as Pe, ar as Be, b8 as Me, bL as xe, U as we, bA as fe, bz as ve, bM as ke, bC as Ee, m as Ge, W as Ne, h as Re, aj as We, aA as He, c1 as _e, az as Ue, aB as Oe, ao as je, bO as ze, b$ as Ke, c2 as Xe, bR as qe, c5 as Je, aK as Qe, aJ as Ye, b_ as Ze, bJ as $e, bF as at, bE as st, e as et, s as tt, bt as ot, c6 as rt, ag as it, ck as nt, bd as lt, b7 as bt, x as pt, u as ct, aO as gt } from "./index-enhZfklq.js";
3
+ import { bP as P, G as B, A as M, t as x, v as w, o as f, p as v, bm as k, I as E, by as G, ad as N, ce as R, Y as W, V as H, bs as _, an as U, aV as O, aW as j, aY as z, aX as K, c8 as X, aa as q, ab as J, bb as Q, z as Y, q as Z, F as $, am as aa, al as sa, C as ea, Z as ta, ah as oa, bj as ra, g as ia, aD as na, aE as la, bv as ba, at as pa, Q as ca, O as ga, bp as ua, bw as ma, bx as da, aP as Sa, D as Ta, j as Ca, cj as Ia, bq as ha, bZ as Fa, _ as Da, ba as ya, af as La, f as Va, ai as Aa, cf as Pa, ae as Ba, aH as Ma, aG as xa, aI as wa, aF as fa, b9 as va, bl as ka, a7 as Ea, bY as Ga, a2 as Na, a4 as Ra, a3 as Wa, aC as Ha, ak as _a, bQ as Ua, H as Oa, E as ja, bh as za, aq as Ka, a9 as Xa, cg as qa, X as Ja, $ as Qa, bT as Ya, bU as Za, bS as $a, a0 as as, l as ss, L as es, M as ts, ap as os, ch as rs, r as is, a1 as ns, aZ as ls, a6 as bs, ay as ps, ax as cs, aL as gs, br as us, N as ms, aU as ds, n as Ss, bW as Ts, cd as Cs, P as Is, R as hs, c4 as Fs, k as Ds, aT as ys, as as Ls, b5 as Vs, b4 as As, a_ as Ps, b3 as Bs, a$ as Ms, b0 as xs, b1 as ws, b2 as fs, ac as vs, b6 as ks, bk as Es, bc as Gs, c3 as Ns, aR as Rs, aQ as Ws, cb as Hs, c0 as _s, B as Us, bX as Os, w as js, cc as zs, a8 as Ks, aS as Xs, aw as qs, b as Js, bK as Qs, bD as Ys, c9 as Zs, aN as $s, ca as ae, y as se, bo as ee, S as te, J as oe, K as re, av as ie, bn as ne, c as le, aM as be, bG as pe, bB as ce, d as ge, ci as ue, bH as me, bI as de, au as Se, a as Te, bu as Ce, T as Ie, bi as he, bV as Fe, a5 as De, bN as ye, bf as Le, be as Ve, bg as Ae, c7 as Pe, ar as Be, b8 as Me, bL as xe, U as we, bA as fe, bz as ve, bM as ke, bC as Ee, m as Ge, W as Ne, h as Re, aj as We, aA as He, c1 as _e, az as Ue, aB as Oe, ao as je, bO as ze, b$ as Ke, c2 as Xe, bR as qe, c5 as Je, aK as Qe, aJ as Ye, b_ as Ze, bJ as $e, bF as at, bE as st, e as et, s as tt, bt as ot, c6 as rt, ag as it, ck as nt, bd as lt, b7 as bt, x as pt, u as ct, aO as gt } from "./index-BYc1Xkw8.js";
4
4
  import { L as mt, T as dt, b as St, d as Tt, e as Ct, f as It, t as ht } from "./toggle-group-BQl6AZT0.js";
5
5
  export {
6
6
  P as AccentColor,
package/dist/context.d.ts CHANGED
@@ -34,6 +34,7 @@ declare interface ActionData {
34
34
  isDanger?: boolean;
35
35
  disabled?: boolean;
36
36
  tooltip?: Pick<TooltipProps, 'title' | 'content'>;
37
+ testId?: string;
37
38
  }
38
39
 
39
40
  declare interface BaseIconPropsV2 extends Omit<SVGProps<SVGSVGElement>, 'color'> {
@@ -752,6 +753,8 @@ declare interface MoreActionsTooltipProps {
752
753
  buttonVariant?: ButtonVariants;
753
754
  buttonSize?: ButtonSizes;
754
755
  disabled?: boolean;
756
+ /** Accessible name and tooltip for the trigger button. Defaults to "Show more actions". */
757
+ label?: string;
755
758
  }
756
759
 
757
760
  declare const NavLinkDefault: ForwardRefExoticComponent<NavLinkProps & RefAttributes<HTMLAnchorElement>>;
@@ -171453,13 +171453,14 @@ const Xke = (e, t) => {
171453
171453
  className: i,
171454
171454
  buttonVariant: o = "ghost",
171455
171455
  buttonSize: s = "md",
171456
- disabled: l = !1
171457
- }, c) => {
171458
- const { Link: u } = hr(), [d, p] = he(!1), m = Re(), g = Te((f) => {
171459
- f || (clearTimeout(m.current), p(!0), m.current = setTimeout(() => p(!1), Zke));
171456
+ disabled: l = !1,
171457
+ label: c = "Show more actions"
171458
+ }, u) => {
171459
+ const { Link: d } = hr(), [p, m] = he(!1), g = Re(), f = Te((E) => {
171460
+ E || (clearTimeout(g.current), m(!0), g.current = setTimeout(() => m(!1), Zke));
171460
171461
  }, []);
171461
- return be(() => () => clearTimeout(m.current), []), t.length ? /* @__PURE__ */ F(Ce.Root, { onOpenChange: g, children: [
171462
- /* @__PURE__ */ _(Ce.Trigger, { ref: c, disabled: l, asChild: !0, children: /* @__PURE__ */ _(
171462
+ return be(() => () => clearTimeout(g.current), []), t.length ? /* @__PURE__ */ F(Ce.Root, { onOpenChange: f, children: [
171463
+ /* @__PURE__ */ _(Ce.Trigger, { ref: u, disabled: l, asChild: !0, children: /* @__PURE__ */ _(
171463
171464
  nt,
171464
171465
  {
171465
171466
  theme: e,
@@ -171467,10 +171468,10 @@ const Xke = (e, t) => {
171467
171468
  variant: o,
171468
171469
  iconOnly: !0,
171469
171470
  size: s,
171470
- "aria-label": "Show more actions",
171471
+ "aria-label": c,
171471
171472
  tooltipProps: {
171472
- content: "Show more actions",
171473
- open: d ? !1 : void 0
171473
+ content: c,
171474
+ open: p ? !1 : void 0
171474
171475
  },
171475
171476
  children: /* @__PURE__ */ _(pe, { name: n })
171476
171477
  }
@@ -171482,58 +171483,62 @@ const Xke = (e, t) => {
171482
171483
  align: "end",
171483
171484
  sideOffset: r,
171484
171485
  alignOffset: a,
171485
- children: t.map((f, E) => {
171486
- const h = f.to ? /* @__PURE__ */ _(
171487
- u,
171486
+ children: t.map((E, h) => {
171487
+ const b = E.to ? /* @__PURE__ */ _(
171488
+ d,
171488
171489
  {
171489
- to: f.to,
171490
- onClick: (b) => {
171491
- b.stopPropagation();
171490
+ to: E.to,
171491
+ onClick: (T) => {
171492
+ T.stopPropagation();
171492
171493
  },
171493
- style: { pointerEvents: f.disabled ? "none" : void 0 },
171494
- children: f.iconName ? /* @__PURE__ */ _(
171494
+ style: { pointerEvents: E.disabled ? "none" : void 0 },
171495
+ children: E.iconName ? /* @__PURE__ */ _(
171495
171496
  Ce.IconItem,
171496
171497
  {
171497
- icon: f.iconName,
171498
- iconClassName: q({ "text-cn-danger": f.isDanger }),
171499
- title: /* @__PURE__ */ _(Se, { color: f.isDanger ? "danger" : "foreground-2", truncate: !0, children: f.title }),
171500
- disabled: f.disabled
171498
+ icon: E.iconName,
171499
+ iconClassName: q({ "text-cn-danger": E.isDanger }),
171500
+ title: /* @__PURE__ */ _(Se, { color: E.isDanger ? "danger" : "foreground-2", truncate: !0, children: E.title }),
171501
+ disabled: E.disabled,
171502
+ "data-testid": E.testId
171501
171503
  }
171502
171504
  ) : /* @__PURE__ */ _(
171503
171505
  Ce.Item,
171504
171506
  {
171505
- title: /* @__PURE__ */ _(Se, { color: f.isDanger ? "danger" : "foreground-2", truncate: !0, children: f.title }),
171506
- disabled: f.disabled
171507
+ title: /* @__PURE__ */ _(Se, { color: E.isDanger ? "danger" : "foreground-2", truncate: !0, children: E.title }),
171508
+ disabled: E.disabled,
171509
+ "data-testid": E.testId
171507
171510
  }
171508
171511
  )
171509
171512
  },
171510
- `${f.title}-${E}`
171511
- ) : f.iconName ? /* @__PURE__ */ _(
171513
+ `${E.title}-${h}`
171514
+ ) : E.iconName ? /* @__PURE__ */ _(
171512
171515
  Ce.IconItem,
171513
171516
  {
171514
- icon: f.iconName,
171515
- title: /* @__PURE__ */ _(Se, { color: f.isDanger ? "danger" : "foreground-2", truncate: !0, children: f.title }),
171516
- iconClassName: q({ "text-cn-danger": f.isDanger }),
171517
- onClick: (b) => {
171518
- var T;
171519
- b.stopPropagation(), (T = f == null ? void 0 : f.onClick) == null || T.call(f);
171517
+ icon: E.iconName,
171518
+ title: /* @__PURE__ */ _(Se, { color: E.isDanger ? "danger" : "foreground-2", truncate: !0, children: E.title }),
171519
+ iconClassName: q({ "text-cn-danger": E.isDanger }),
171520
+ onClick: (T) => {
171521
+ var v;
171522
+ T.stopPropagation(), (v = E == null ? void 0 : E.onClick) == null || v.call(E);
171520
171523
  },
171521
- disabled: f.disabled
171524
+ disabled: E.disabled,
171525
+ "data-testid": E.testId
171522
171526
  },
171523
- `${f.title}-${E}`
171527
+ `${E.title}-${h}`
171524
171528
  ) : /* @__PURE__ */ _(
171525
171529
  Ce.Item,
171526
171530
  {
171527
- title: /* @__PURE__ */ _(Se, { color: f.isDanger ? "danger" : "foreground-2", truncate: !0, children: f.title }),
171528
- onClick: (b) => {
171529
- var T;
171530
- b.stopPropagation(), (T = f == null ? void 0 : f.onClick) == null || T.call(f);
171531
+ title: /* @__PURE__ */ _(Se, { color: E.isDanger ? "danger" : "foreground-2", truncate: !0, children: E.title }),
171532
+ onClick: (T) => {
171533
+ var v;
171534
+ T.stopPropagation(), (v = E == null ? void 0 : E.onClick) == null || v.call(E);
171531
171535
  },
171532
- disabled: f.disabled
171536
+ disabled: E.disabled,
171537
+ "data-testid": E.testId
171533
171538
  },
171534
- `${f.title}-${E}`
171539
+ `${E.title}-${h}`
171535
171540
  );
171536
- return f.tooltip ? /* @__PURE__ */ _(fi, { ...f.tooltip, children: h }) : h;
171541
+ return E.tooltip ? /* @__PURE__ */ _(fi, { ...E.tooltip, children: b }) : b;
171537
171542
  })
171538
171543
  }
171539
171544
  )
@@ -181936,4 +181941,4 @@ export {
181936
181941
  ece as y,
181937
181942
  ea as z
181938
181943
  };
181939
- //# sourceMappingURL=index-enhZfklq.js.map
181944
+ //# sourceMappingURL=index-BYc1Xkw8.js.map