@veevarts/design-system 2.10.0 → 2.12.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.
package/dist/index.js CHANGED
@@ -10434,29 +10434,30 @@ const $f = {
10434
10434
  searchLabel: a,
10435
10435
  searchPlaceholder: r,
10436
10436
  searchIcon: i,
10437
- children: s,
10438
- trailing: l,
10439
- searchWidth: o = "md",
10440
- className: c,
10441
- "data-testid": d = "admin-toolbar"
10437
+ searchClearable: s = !1,
10438
+ children: l,
10439
+ trailing: o,
10440
+ searchWidth: c = "md",
10441
+ className: d,
10442
+ "data-testid": f = "admin-toolbar"
10442
10443
  }) => {
10443
- const { ref: f, width: m } = Ot(), g = m > 0 && !Xt(m, Sf);
10444
+ const { ref: m, width: g } = Ot(), h = g > 0 && !Xt(g, Sf);
10444
10445
  return /* @__PURE__ */ u(
10445
10446
  "div",
10446
10447
  {
10447
- ref: f,
10448
+ ref: m,
10448
10449
  role: "search",
10449
- "data-testid": d,
10450
+ "data-testid": f,
10450
10451
  "data-variant": "framed",
10451
- "data-size": g ? "narrow" : "wide",
10452
- className: p(Ke.base, g && Ke.narrow, c),
10452
+ "data-size": h ? "narrow" : "wide",
10453
+ className: p(Ke.base, h && Ke.narrow, d),
10453
10454
  children: [
10454
- s,
10455
+ l,
10455
10456
  /* @__PURE__ */ n(
10456
10457
  "div",
10457
10458
  {
10458
- "data-testid": `${d}-search-slot`,
10459
- className: g ? Ke.searchNarrow : Ke.searchWide,
10459
+ "data-testid": `${f}-search-slot`,
10460
+ className: h ? Ke.searchNarrow : Ke.searchWide,
10460
10461
  children: /* @__PURE__ */ n(
10461
10462
  Ce,
10462
10463
  {
@@ -10465,20 +10466,22 @@ const $f = {
10465
10466
  placeholder: r ?? a,
10466
10467
  value: e,
10467
10468
  onValueChange: t,
10469
+ isClearable: s,
10470
+ onClear: s ? () => t("") : void 0,
10468
10471
  startContent: /* @__PURE__ */ n(
10469
10472
  "span",
10470
10473
  {
10471
10474
  "aria-hidden": "true",
10472
- "data-testid": `${d}-search-icon`,
10475
+ "data-testid": `${f}-search-icon`,
10473
10476
  className: Ke.icon,
10474
10477
  children: i ?? /* @__PURE__ */ n(T, { icon: "lucide:search" })
10475
10478
  }
10476
10479
  ),
10477
- "data-testid": `${d}-search`,
10480
+ "data-testid": `${f}-search`,
10478
10481
  variant: "bordered",
10479
10482
  radius: "none",
10480
10483
  classNames: {
10481
- base: g ? Ke.inputBaseNarrow : o === "lg" ? Ke.inputBaseLg : Ke.inputBaseMd,
10484
+ base: h ? Ke.inputBaseNarrow : c === "lg" ? Ke.inputBaseLg : Ke.inputBaseMd,
10482
10485
  inputWrapper: Ke.inputWrapper,
10483
10486
  innerWrapper: Ke.innerWrapper,
10484
10487
  input: Ke.input
@@ -10487,7 +10490,7 @@ const $f = {
10487
10490
  )
10488
10491
  }
10489
10492
  ),
10490
- l
10493
+ o
10491
10494
  ]
10492
10495
  }
10493
10496
  );
@@ -10497,13 +10500,14 @@ const $f = {
10497
10500
  searchLabel: a,
10498
10501
  searchPlaceholder: r,
10499
10502
  searchIcon: i,
10500
- children: s,
10501
- trailing: l,
10502
- searchWidth: o = "md",
10503
- variant: c = "default",
10504
- className: d,
10505
- "data-testid": f = "admin-toolbar"
10506
- }) => c === "framed" ? /* @__PURE__ */ n(
10503
+ searchClearable: s = !1,
10504
+ children: l,
10505
+ trailing: o,
10506
+ searchWidth: c = "md",
10507
+ variant: d = "default",
10508
+ className: f,
10509
+ "data-testid": m = "admin-toolbar"
10510
+ }) => d === "framed" ? /* @__PURE__ */ n(
10507
10511
  Af,
10508
10512
  {
10509
10513
  searchValue: e,
@@ -10511,13 +10515,14 @@ const $f = {
10511
10515
  searchLabel: a,
10512
10516
  searchPlaceholder: r,
10513
10517
  searchIcon: i,
10514
- trailing: l,
10515
- searchWidth: o,
10516
- className: d,
10517
- "data-testid": f,
10518
- children: s
10519
- }
10520
- ) : /* @__PURE__ */ u("div", { role: "search", "data-testid": f, className: p("flex flex-wrap items-center gap-3 mb-4", d), children: [
10518
+ searchClearable: s,
10519
+ trailing: o,
10520
+ searchWidth: c,
10521
+ className: f,
10522
+ "data-testid": m,
10523
+ children: l
10524
+ }
10525
+ ) : /* @__PURE__ */ u("div", { role: "search", "data-testid": m, className: p("flex flex-wrap items-center gap-3 mb-4", f), children: [
10521
10526
  /* @__PURE__ */ n(
10522
10527
  Ce,
10523
10528
  {
@@ -10526,12 +10531,14 @@ const $f = {
10526
10531
  placeholder: r ?? a,
10527
10532
  value: e,
10528
10533
  onValueChange: t,
10534
+ isClearable: s,
10535
+ onClear: s ? () => t("") : void 0,
10529
10536
  startContent: i ? /* @__PURE__ */ n("span", { "aria-hidden": "true", className: "flex text-acct-muted", children: i }) : void 0,
10530
- "data-testid": `${f}-search`,
10537
+ "data-testid": `${m}-search`,
10531
10538
  variant: "bordered",
10532
10539
  radius: "none",
10533
10540
  classNames: {
10534
- base: $f[o],
10541
+ base: $f[c],
10535
10542
  inputWrapper: [
10536
10543
  "h-10 min-h-10 !h-10 rounded-[11px] border border-acct-border bg-acct-surface px-3",
10537
10544
  "data-[hover=true]:border-acct-rust-border",
@@ -10541,8 +10548,8 @@ const $f = {
10541
10548
  }
10542
10549
  }
10543
10550
  ),
10544
- s,
10545
- l ? /* @__PURE__ */ n("div", { className: "ml-auto", children: l }) : null
10551
+ l,
10552
+ o ? /* @__PURE__ */ n("div", { className: "ml-auto", children: o }) : null
10546
10553
  ] });
10547
10554
  Df.displayName = "AdminToolbar";
10548
10555
  const Ef = "ml-0.5 inline-flex min-w-[18px] items-center justify-center rounded-full bg-primary px-1.5 text-xs font-semibold text-primary-foreground", Ff = "ml-0.5 inline-flex min-w-[1.125rem] items-center justify-center rounded-full bg-primary px-1.5 text-xs font-semibold text-primary-foreground", Lf = "h-9 gap-1.5 rounded-full border border-gray-200 bg-white px-3.5 text-sm font-medium text-gray-700 hover:bg-gray-50 data-[pressed=true]:bg-gray-50", _f = W.forwardRef(
@@ -11628,7 +11635,9 @@ mh.displayName = "ModalShellFooter";
11628
11635
  const fh = {
11629
11636
  2: "sm:grid-cols-2",
11630
11637
  3: "sm:grid-cols-3",
11631
- 4: "sm:grid-cols-4"
11638
+ 4: "sm:grid-cols-4",
11639
+ 5: "sm:grid-cols-5",
11640
+ 6: "sm:grid-cols-6"
11632
11641
  }, hh = {
11633
11642
  1: "grid-cols-1",
11634
11643
  2: "grid-cols-2"
@@ -8,6 +8,8 @@ export interface AdminToolbarProps {
8
8
  searchPlaceholder?: string;
9
9
  /** Leading glyph inside the search box. */
10
10
  searchIcon?: React.ReactNode;
11
+ /** Shows a clear button inside the search box while it holds text. Off by default. */
12
+ searchClearable?: boolean;
11
13
  /** Filters, sort pickers, a toggle — laid out after the search box. */
12
14
  children?: React.ReactNode;
13
15
  /** Pushed to the far right, for a primary action. */
@@ -93,9 +93,10 @@ export interface TileSelectProps {
93
93
  moreLabel?: string;
94
94
  /**
95
95
  * Grid columns on >= sm. Default `3`. Mobile collapses to 2.
96
+ * `5` and `6` keep a full method set on one row on a wide surface.
96
97
  * Ignored by `variant="compact"`, which is a single strip.
97
98
  */
98
- columnsDesktop?: 2 | 3 | 4;
99
+ columnsDesktop?: 2 | 3 | 4 | 5 | 6;
99
100
  columnsMobile?: 1 | 2;
100
101
  className?: string;
101
102
  'data-testid'?: string;
@@ -6,5 +6,5 @@
6
6
  * The literal Tailwind classes must stay spelled out (not interpolated) so
7
7
  * the JIT scanner keeps generating them.
8
8
  */
9
- export declare const GRID_DESKTOP_COLS: Record<2 | 3 | 4, string>;
9
+ export declare const GRID_DESKTOP_COLS: Record<2 | 3 | 4 | 5 | 6, string>;
10
10
  export declare const GRID_MOBILE_COLS: Record<1 | 2, string>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@veevarts/design-system",
3
3
  "private": false,
4
- "version": "2.10.0",
4
+ "version": "2.12.0",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",