@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.cjs +6 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -15
- package/dist/index.d.ts +1 -15
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.cjs
CHANGED
|
@@ -738,6 +738,7 @@ TooltipContent.displayName = "TooltipContent";
|
|
|
738
738
|
// src/components/ui/button.tsx
|
|
739
739
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
740
740
|
var { color: color3 } = semanticTokens_default;
|
|
741
|
+
var DEFAULT_VARIANT = "ghost";
|
|
741
742
|
var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
742
743
|
"",
|
|
743
744
|
{
|
|
@@ -777,7 +778,7 @@ var buttonVariants = (0, import_class_variance_authority2.cva)(
|
|
|
777
778
|
}
|
|
778
779
|
},
|
|
779
780
|
defaultVariants: {
|
|
780
|
-
variant:
|
|
781
|
+
variant: DEFAULT_VARIANT,
|
|
781
782
|
size: "default",
|
|
782
783
|
shape: "default"
|
|
783
784
|
}
|
|
@@ -836,7 +837,7 @@ var pillDisabled = "opacity-50 cursor-not-allowed";
|
|
|
836
837
|
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";
|
|
837
838
|
var Button = React4.forwardRef(
|
|
838
839
|
({ className, variant, size, shape, asChild = false, children, style, selected, tooltipText, ...props }, ref) => {
|
|
839
|
-
const finalVariant = variant ??
|
|
840
|
+
const finalVariant = variant ?? DEFAULT_VARIANT;
|
|
840
841
|
const finalSize = size ?? "default";
|
|
841
842
|
const isPill = shape === "pill";
|
|
842
843
|
const isLink = finalVariant === "link";
|
|
@@ -2956,7 +2957,7 @@ var React27 = __toESM(require("react"), 1);
|
|
|
2956
2957
|
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
2957
2958
|
var CARD_TEXT_LIMIT = 20;
|
|
2958
2959
|
var TruncatedText = ({ text, maxLength, className, viewMode = "grid" /* GRID */ }) => {
|
|
2959
|
-
maxLength = viewMode === "list" /* LIST */ ?
|
|
2960
|
+
maxLength = maxLength ? maxLength : viewMode === "list" /* LIST */ ? void 0 : CARD_TEXT_LIMIT;
|
|
2960
2961
|
if (maxLength === void 0) {
|
|
2961
2962
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TruncatedTextByWidth, { text, className });
|
|
2962
2963
|
}
|
|
@@ -2964,7 +2965,7 @@ var TruncatedText = ({ text, maxLength, className, viewMode = "grid" /* GRID */
|
|
|
2964
2965
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { className: cn("cursor-default", className), children: text || "" });
|
|
2965
2966
|
}
|
|
2966
2967
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Tooltip, { children: [
|
|
2967
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { children: [
|
|
2968
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TooltipTrigger, { asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)("span", { className: cn("block w-full truncate", className), children: [
|
|
2968
2969
|
text.slice(0, maxLength),
|
|
2969
2970
|
"\u2026"
|
|
2970
2971
|
] }) }),
|
|
@@ -2996,7 +2997,7 @@ var TruncatedTextByWidth = ({ text, className }) => {
|
|
|
2996
2997
|
}
|
|
2997
2998
|
const textSpan = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)("span", { ref, className: cn("block w-full truncate", className), children: text });
|
|
2998
2999
|
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(Tooltip, { children: [
|
|
2999
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TooltipTrigger, { className: "min-w-0 w-full", children: textSpan }),
|
|
3000
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(TooltipTrigger, { asChild: true, className: "min-w-0 w-full", children: textSpan }),
|
|
3000
3001
|
isOverflowing && /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
3001
3002
|
TooltipContent,
|
|
3002
3003
|
{
|