@vectramindnpm/unified-design-system 0.2.1 → 0.2.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/index.d.cts CHANGED
@@ -318,22 +318,8 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProp
318
318
  }
319
319
  declare function Badge({ className, variant, style, dot, children, ...props }: BadgeProps): React$1.JSX.Element;
320
320
 
321
- /**
322
- * Button's variant surface is six semantic colors × five sizes × two shapes, all
323
- * independently composable — plus a small set of named "preset" variants
324
- * (cancel/save/close, formButtonSubmit/Cancel/Back, borderPrimary, deptedit, submenu)
325
- * that restore fixed page-context styling (sizing + a specific color skin) as a single
326
- * prop, instead of every call site repeating the same `className` string. See
327
- * `PRESET_BASE`/`PRESET_OVERRIDE` below for exactly what each one renders. `pill` isn't
328
- * in this list - it's a `shape`, not a variant (`shape="pill"`, combinable with any
329
- * variant above).
330
- *
331
- * `refreshIcon`/`selectedIcon` were dropped entirely rather than folded in: an icon-only
332
- * refresh/selected button already has a proper home in `ButtonIcon` (`variant="refresh"`),
333
- * so Button doesn't need to duplicate that.
334
- */
335
321
  declare const buttonVariants: (props?: ({
336
- variant?: "link" | "secondary" | "destructive" | "outline" | "cancel" | "close" | "primary" | "ghost" | "borderPrimary" | "deptedit" | "submenu" | "save" | "formButtonSubmit" | "formButtonCancel" | "formButtonBack" | null | undefined;
322
+ variant?: "link" | "secondary" | "destructive" | "outline" | "cancel" | "close" | "ghost" | "primary" | "borderPrimary" | "deptedit" | "submenu" | "save" | "formButtonSubmit" | "formButtonCancel" | "formButtonBack" | null | undefined;
337
323
  size?: "sm" | "lg" | "default" | "icon" | "iconLg" | null | undefined;
338
324
  shape?: "pill" | "default" | null | undefined;
339
325
  selected?: boolean | null | undefined;
package/dist/index.d.ts CHANGED
@@ -318,22 +318,8 @@ interface BadgeProps extends React$1.HTMLAttributes<HTMLDivElement>, VariantProp
318
318
  }
319
319
  declare function Badge({ className, variant, style, dot, children, ...props }: BadgeProps): React$1.JSX.Element;
320
320
 
321
- /**
322
- * Button's variant surface is six semantic colors × five sizes × two shapes, all
323
- * independently composable — plus a small set of named "preset" variants
324
- * (cancel/save/close, formButtonSubmit/Cancel/Back, borderPrimary, deptedit, submenu)
325
- * that restore fixed page-context styling (sizing + a specific color skin) as a single
326
- * prop, instead of every call site repeating the same `className` string. See
327
- * `PRESET_BASE`/`PRESET_OVERRIDE` below for exactly what each one renders. `pill` isn't
328
- * in this list - it's a `shape`, not a variant (`shape="pill"`, combinable with any
329
- * variant above).
330
- *
331
- * `refreshIcon`/`selectedIcon` were dropped entirely rather than folded in: an icon-only
332
- * refresh/selected button already has a proper home in `ButtonIcon` (`variant="refresh"`),
333
- * so Button doesn't need to duplicate that.
334
- */
335
321
  declare const buttonVariants: (props?: ({
336
- variant?: "link" | "secondary" | "destructive" | "outline" | "cancel" | "close" | "primary" | "ghost" | "borderPrimary" | "deptedit" | "submenu" | "save" | "formButtonSubmit" | "formButtonCancel" | "formButtonBack" | null | undefined;
322
+ variant?: "link" | "secondary" | "destructive" | "outline" | "cancel" | "close" | "ghost" | "primary" | "borderPrimary" | "deptedit" | "submenu" | "save" | "formButtonSubmit" | "formButtonCancel" | "formButtonBack" | null | undefined;
337
323
  size?: "sm" | "lg" | "default" | "icon" | "iconLg" | null | undefined;
338
324
  shape?: "pill" | "default" | null | undefined;
339
325
  selected?: boolean | null | undefined;
package/dist/index.js CHANGED
@@ -620,6 +620,7 @@ TooltipContent.displayName = "TooltipContent";
620
620
  // src/components/ui/button.tsx
621
621
  import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
622
622
  var { color: color3 } = semanticTokens_default;
623
+ var DEFAULT_VARIANT = "ghost";
623
624
  var buttonVariants = cva2(
624
625
  "",
625
626
  {
@@ -659,7 +660,7 @@ var buttonVariants = cva2(
659
660
  }
660
661
  },
661
662
  defaultVariants: {
662
- variant: "primary",
663
+ variant: DEFAULT_VARIANT,
663
664
  size: "default",
664
665
  shape: "default"
665
666
  }
@@ -718,7 +719,7 @@ var pillDisabled = "opacity-50 cursor-not-allowed";
718
719
  var selectedGradient = "border border-interactive-brand bg-gradient-to-r from-[var(--color-button-selected-gradient-start)] via-[var(--color-button-selected-gradient-mid)] to-interactive-brand text-white font-extrabold";
719
720
  var Button = React4.forwardRef(
720
721
  ({ className, variant, size, shape, asChild = false, children, style, selected, tooltipText, ...props }, ref) => {
721
- const finalVariant = variant ?? "primary";
722
+ const finalVariant = variant ?? DEFAULT_VARIANT;
722
723
  const finalSize = size ?? "default";
723
724
  const isPill = shape === "pill";
724
725
  const isLink = finalVariant === "link";
@@ -2838,7 +2839,7 @@ import * as React27 from "react";
2838
2839
  import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
2839
2840
  var CARD_TEXT_LIMIT = 20;
2840
2841
  var TruncatedText = ({ text, maxLength, className, viewMode = "grid" /* GRID */ }) => {
2841
- maxLength = viewMode === "list" /* LIST */ ? maxLength : CARD_TEXT_LIMIT;
2842
+ maxLength = maxLength ? maxLength : viewMode === "list" /* LIST */ ? void 0 : CARD_TEXT_LIMIT;
2842
2843
  if (maxLength === void 0) {
2843
2844
  return /* @__PURE__ */ jsx27(TruncatedTextByWidth, { text, className });
2844
2845
  }
@@ -2846,7 +2847,7 @@ var TruncatedText = ({ text, maxLength, className, viewMode = "grid" /* GRID */
2846
2847
  return /* @__PURE__ */ jsx27("span", { className: cn("cursor-default", className), children: text || "" });
2847
2848
  }
2848
2849
  return /* @__PURE__ */ jsxs17(Tooltip, { children: [
2849
- /* @__PURE__ */ jsx27(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs17("span", { children: [
2850
+ /* @__PURE__ */ jsx27(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ jsxs17("span", { className: cn("block w-full truncate", className), children: [
2850
2851
  text.slice(0, maxLength),
2851
2852
  "\u2026"
2852
2853
  ] }) }),
@@ -2878,7 +2879,7 @@ var TruncatedTextByWidth = ({ text, className }) => {
2878
2879
  }
2879
2880
  const textSpan = /* @__PURE__ */ jsx27("span", { ref, className: cn("block w-full truncate", className), children: text });
2880
2881
  return /* @__PURE__ */ jsxs17(Tooltip, { children: [
2881
- /* @__PURE__ */ jsx27(TooltipTrigger, { className: "min-w-0 w-full", children: textSpan }),
2882
+ /* @__PURE__ */ jsx27(TooltipTrigger, { asChild: true, className: "min-w-0 w-full", children: textSpan }),
2882
2883
  isOverflowing && /* @__PURE__ */ jsx27(
2883
2884
  TooltipContent,
2884
2885
  {