@bizapps/design-system-testing 1.12.1 → 1.12.3

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/main.js CHANGED
@@ -2690,7 +2690,7 @@ function DialogTitle({ className, ...props }) {
2690
2690
  Dialog$1.Title,
2691
2691
  {
2692
2692
  "data-slot": "dialog-title",
2693
- className: cn("font-heading text-lg leading-none font-bold", className),
2693
+ className: cn("font-heading text-lg leading-none font-bold wrap-anywhere", className),
2694
2694
  ...props
2695
2695
  }
2696
2696
  );
@@ -2704,7 +2704,7 @@ function DialogDescription({
2704
2704
  {
2705
2705
  "data-slot": "dialog-description",
2706
2706
  className: cn(
2707
- "text-muted-foreground *:[a]:hover:text-foreground text-sm *:[a]:underline *:[a]:underline-offset-3",
2707
+ "text-muted-foreground *:[a]:hover:text-foreground text-sm wrap-anywhere *:[a]:underline *:[a]:underline-offset-3",
2708
2708
  className
2709
2709
  ),
2710
2710
  ...props
@@ -2871,7 +2871,7 @@ function AlertDialogTitle({
2871
2871
  AlertDialog$1.Title,
2872
2872
  {
2873
2873
  "data-slot": "alert-dialog-title",
2874
- className: cn("font-heading text-lg font-bold", className),
2874
+ className: cn("font-heading text-lg font-bold wrap-anywhere", className),
2875
2875
  ...props
2876
2876
  }
2877
2877
  );
@@ -2885,7 +2885,7 @@ function AlertDialogDescription({
2885
2885
  {
2886
2886
  "data-slot": "alert-dialog-description",
2887
2887
  className: cn(
2888
- "text-muted-foreground *:[a]:hover:text-foreground text-xs text-balance md:text-pretty *:[a]:underline *:[a]:underline-offset-3",
2888
+ "text-muted-foreground *:[a]:hover:text-foreground text-xs text-balance wrap-anywhere md:text-pretty *:[a]:underline *:[a]:underline-offset-3",
2889
2889
  className
2890
2890
  ),
2891
2891
  ...props
@@ -9198,6 +9198,13 @@ var DEFAULT_LABELS = {
9198
9198
  var EASE = "cubic-bezier(.2,.8,.2,1)";
9199
9199
  var MOTION_MS = 240;
9200
9200
  var FADE_MS = MOTION_MS / 2;
9201
+ var RAIL_STAGGER_MS = 20;
9202
+ var ACCORDION_EASE = "cubic-bezier(.4,0,.2,1)";
9203
+ var ACCORDION_ITEM_FADE_MS = 260;
9204
+ var ACCORDION_OPEN_DELAY_MS = 120;
9205
+ var ACCORDION_OPEN_STAGGER_MS = 50;
9206
+ var ACCORDION_CLOSE_FADE_MS = 160;
9207
+ var ACCORDION_STAGGER_CAP = 8;
9201
9208
  var MORPH_MS = 360;
9202
9209
  var MORPH_EASE = "cubic-bezier(.65,0,.35,1)";
9203
9210
  var BOUNCE_KEYFRAMES = [
@@ -9335,7 +9342,7 @@ var DEFAULT_WIDTH = 305;
9335
9342
  var DEFAULT_COLLAPSED_WIDTH = 48;
9336
9343
  var TILE_ICON_SIZE = 22;
9337
9344
  var MIN_COLLAPSED_WIDTH = 40;
9338
- var t = (prop, ms = 300, delay = 0) => `${prop} ${ms}ms ${EASE} ${delay}ms`;
9345
+ var t = (prop, ms = 300, delay = 0, ease2 = EASE) => `${prop} ${ms}ms ${ease2} ${delay}ms`;
9339
9346
  function transition2(reduced, ...parts) {
9340
9347
  const kept = reduced ? parts.filter((part) => /^(opacity|visibility|background|color|box-shadow)/.test(part)) : parts;
9341
9348
  return kept.join(", ") || "none";
@@ -9983,6 +9990,11 @@ function ModuleCard({
9983
9990
  });
9984
9991
  return () => animation2?.cancel();
9985
9992
  }, [collapsed, hasActive, reduced]);
9993
+ const [toggle, setToggle] = useState({ collapsed, open, accordion: false });
9994
+ if (toggle.collapsed !== collapsed || toggle.open !== open) {
9995
+ setToggle({ collapsed, open, accordion: toggle.collapsed === collapsed });
9996
+ }
9997
+ const accordion = toggle.accordion && !reduced;
9986
9998
  const items = filterItems(module.items, query);
9987
9999
  const isEmpty = module.items.length === 0;
9988
10000
  const emptyMessage = /* @__PURE__ */ jsx(
@@ -10201,6 +10213,7 @@ function ModuleCard({
10201
10213
  list,
10202
10214
  visible: open,
10203
10215
  staggerIndex: index,
10216
+ accordion,
10204
10217
  onSelect: (navigates) => onSelect(item, navigates)
10205
10218
  },
10206
10219
  item.id
@@ -10325,20 +10338,27 @@ function ModuleCard({
10325
10338
  }
10326
10339
  ) });
10327
10340
  }
10328
- function ItemRow({ item, list, visible, staggerIndex, onSelect }) {
10341
+ function ItemRow({ item, list, visible, staggerIndex, accordion, onSelect }) {
10329
10342
  const { activeItemId, favoriteIds, reduced, labels, resolveIcon, renderLink } = list;
10330
10343
  const active = item.id === activeItemId;
10331
10344
  const favorite = favoriteIds?.includes(item.id) ?? false;
10332
10345
  const tabIndex = visible ? 0 : -1;
10333
10346
  const staggered = staggerIndex !== void 0;
10334
- const delay = staggered && visible ? Math.min(staggerIndex * 20, FADE_MS) : 0;
10347
+ let fade = t("opacity", FADE_MS, 0);
10348
+ if (staggered && accordion) {
10349
+ const step = Math.min(staggerIndex, ACCORDION_STAGGER_CAP);
10350
+ fade = visible ? t(
10351
+ "opacity",
10352
+ ACCORDION_ITEM_FADE_MS,
10353
+ ACCORDION_OPEN_DELAY_MS + step * ACCORDION_OPEN_STAGGER_MS,
10354
+ ACCORDION_EASE
10355
+ ) : t("opacity", ACCORDION_CLOSE_FADE_MS, 0, ACCORDION_EASE);
10356
+ } else if (staggered && visible) {
10357
+ fade = t("opacity", FADE_MS, Math.min(staggerIndex * RAIL_STAGGER_MS, FADE_MS));
10358
+ }
10335
10359
  const rowStyle = staggered ? {
10336
10360
  opacity: visible ? 1 : 0,
10337
- transition: transition2(
10338
- reduced,
10339
- t("opacity", FADE_MS, delay),
10340
- "background-color 180ms ease-out"
10341
- )
10361
+ transition: transition2(reduced, fade, "background-color 180ms ease-out")
10342
10362
  } : { transition: "background-color 180ms ease-out" };
10343
10363
  const className = cn(
10344
10364
  "focus-visible:ring-primary flex min-h-[46px] min-w-0 flex-1 cursor-pointer items-start gap-3 rounded-[10px] border-0 bg-transparent py-[13px] pr-1 pl-3 text-left text-[13px] leading-5 transition-transform duration-180 ease-[cubic-bezier(.2,.8,.2,1)] outline-none hover:text-primary focus-visible:ring-2 focus-visible:ring-inset disabled:cursor-not-allowed disabled:opacity-50",