@l3mpire/ui 3.5.1 → 3.6.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/USAGE.md +12 -3
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +50 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +50 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
- package/src/styles/globals.css +27 -0
package/dist/index.mjs
CHANGED
|
@@ -492,7 +492,8 @@ var buttonVariants = cva3(
|
|
|
492
492
|
},
|
|
493
493
|
intent: {
|
|
494
494
|
brand: [],
|
|
495
|
-
alert: []
|
|
495
|
+
alert: [],
|
|
496
|
+
ai: []
|
|
496
497
|
},
|
|
497
498
|
size: {
|
|
498
499
|
sm: [
|
|
@@ -614,6 +615,48 @@ var buttonVariants = cva3(
|
|
|
614
615
|
"active:text-btn-ghost-alert-text-pressed"
|
|
615
616
|
]
|
|
616
617
|
},
|
|
618
|
+
// ── Solid + AI ─────────────────────────────────────────────────────
|
|
619
|
+
// Vivid brand→violet gradient fill, white label/icons, violet outer
|
|
620
|
+
// border + a translucent-white inner border (via inset shadow).
|
|
621
|
+
{
|
|
622
|
+
appearance: "solid",
|
|
623
|
+
intent: "ai",
|
|
624
|
+
class: [
|
|
625
|
+
"bg-ai-strong",
|
|
626
|
+
"text-[var(--core-text-main-invert-primary)]",
|
|
627
|
+
"border-[var(--violet-500)]",
|
|
628
|
+
"shadow-[inset_0_0_0_1px_rgb(255_255_255/0.6),0_1px_3px_0_var(--shadow-4)]",
|
|
629
|
+
"hover:bg-ai-strong-hover",
|
|
630
|
+
"active:bg-ai-strong-pressed"
|
|
631
|
+
]
|
|
632
|
+
},
|
|
633
|
+
// ── Outlined + AI ──────────────────────────────────────────────────
|
|
634
|
+
// Neutral surface (same as outlined brand), brand-blue border that
|
|
635
|
+
// deepens per state; label/icons are gradient-clipped (see component).
|
|
636
|
+
{
|
|
637
|
+
appearance: "outlined",
|
|
638
|
+
intent: "ai",
|
|
639
|
+
class: [
|
|
640
|
+
"bg-gradient-to-t from-btn-outlined-neutral-bg-default from-[10%] to-btn-outlined-neutral-bg-gradient-to-default",
|
|
641
|
+
"border-[var(--interactive-bg-primary-dark-default)]",
|
|
642
|
+
"shadow-[0_1px_3px_0_var(--shadow-4)]",
|
|
643
|
+
"hover:from-btn-outlined-neutral-bg-hover hover:from-[0%] hover:to-btn-outlined-neutral-bg-gradient-to-hover",
|
|
644
|
+
"hover:border-[var(--interactive-bg-primary-dark-hover)]",
|
|
645
|
+
"active:from-btn-outlined-neutral-bg-pressed active:to-btn-outlined-neutral-bg-gradient-to-pressed",
|
|
646
|
+
"active:border-[var(--interactive-bg-primary-dark-pressed)]"
|
|
647
|
+
]
|
|
648
|
+
},
|
|
649
|
+
// ── Ghost + AI ─────────────────────────────────────────────────────
|
|
650
|
+
// Subtle translucent gradient wash, no border; gradient-clipped text.
|
|
651
|
+
{
|
|
652
|
+
appearance: "ghost",
|
|
653
|
+
intent: "ai",
|
|
654
|
+
class: [
|
|
655
|
+
"bg-ai-subtle border-transparent",
|
|
656
|
+
"hover:bg-ai-subtle-hover",
|
|
657
|
+
"active:bg-ai-subtle-pressed"
|
|
658
|
+
]
|
|
659
|
+
},
|
|
617
660
|
// ── Icon-only size overrides ───────────────────────────────────────
|
|
618
661
|
{ size: "sm", iconOnly: true, class: "w-6 min-w-0 px-0" },
|
|
619
662
|
{ size: "md", iconOnly: true, class: "w-8 min-w-0 px-0" },
|
|
@@ -676,6 +719,8 @@ var Button = React6.forwardRef(
|
|
|
676
719
|
const isDisabled = disabled || loading;
|
|
677
720
|
const isIconOnly = iconOnlyProp ?? !children;
|
|
678
721
|
const iconSize = iconSizeMap[resolvedSize];
|
|
722
|
+
const aiGradientText = intent === "ai" && appearance !== "solid" && !isDisabled;
|
|
723
|
+
const aiTextClass = aiGradientText ? "ai-grad-text" : void 0;
|
|
679
724
|
const variantClasses = buttonVariants({
|
|
680
725
|
appearance,
|
|
681
726
|
intent,
|
|
@@ -685,7 +730,7 @@ var Button = React6.forwardRef(
|
|
|
685
730
|
className
|
|
686
731
|
});
|
|
687
732
|
const labelNode = !isIconOnly ? /* @__PURE__ */ jsxs5("span", { className: textWrapperClass(resolvedSize), children: [
|
|
688
|
-
children,
|
|
733
|
+
aiGradientText ? /* @__PURE__ */ jsx6("span", { className: aiTextClass, children }) : children,
|
|
689
734
|
badge != null && /* @__PURE__ */ jsx6(ButtonBadge, { size: resolvedSize, intent, children: badge })
|
|
690
735
|
] }) : null;
|
|
691
736
|
if (asChild) {
|
|
@@ -698,11 +743,12 @@ var Button = React6.forwardRef(
|
|
|
698
743
|
className: cn(variantClasses),
|
|
699
744
|
disabled: isDisabled,
|
|
700
745
|
"aria-busy": loading || void 0,
|
|
746
|
+
"data-ai-text": aiGradientText || void 0,
|
|
701
747
|
...props,
|
|
702
748
|
children: [
|
|
703
|
-
loading ? /* @__PURE__ */ jsx6(Icon4, { icon: faSpinnerSolid, size: iconSize, className: "animate-spin" }) : leftIcon ? /* @__PURE__ */ jsx6(Icon4, { icon: leftIcon, size: iconSize }) : null,
|
|
749
|
+
loading ? /* @__PURE__ */ jsx6(Icon4, { icon: faSpinnerSolid, size: iconSize, className: "animate-spin" }) : leftIcon ? /* @__PURE__ */ jsx6(Icon4, { icon: leftIcon, size: iconSize, className: aiTextClass }) : null,
|
|
704
750
|
labelNode,
|
|
705
|
-
rightIcon && !loading && /* @__PURE__ */ jsx6(Icon4, { icon: rightIcon, size: iconSize })
|
|
751
|
+
rightIcon && !loading && /* @__PURE__ */ jsx6(Icon4, { icon: rightIcon, size: iconSize, className: aiTextClass })
|
|
706
752
|
]
|
|
707
753
|
}
|
|
708
754
|
);
|