@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 CHANGED
@@ -156,13 +156,15 @@ icon-spin classes are the load-bearing ones; the rest are decorative.
156
156
 
157
157
  | Class | Usage |
158
158
  |---|---|
159
- | `bg-ai-gradient` | Brand AI gradient (blue → violet → indigo, 125deg) |
159
+ | `bg-ai-gradient` | Decorative brand AI gradient (blue → violet → indigo, 125deg) |
160
+ | `bg-ai-subtle` / `-hover` / `-pressed` | Translucent AI wash (ghost AI surfaces) |
161
+ | `bg-ai-strong` / `-hover` / `-pressed` | Vivid AI gradient (solid AI fill) |
162
+ | `ai-grad-text` | Gradient-clipped text/icons (outlined/ghost AI); follows `[data-ai-text]` host hover/pressed |
160
163
  | `ai-shimmer-text` | Text with a tertiary → info → tertiary sweep (2.1s) |
161
164
  | `ai-icon-spin` | Wrapper that rotates its child icon (see FA Kit caveat below) |
162
165
  | `ai-skeleton` | Surface skeleton with a horizontal sheen sweep |
163
166
  | `ai-cell-reveal` | One-shot blur(3px) → clear, 320ms fade-in for cells |
164
167
  | `ai-pulse` | Breathing scale + opacity for dot indicators |
165
- | `ai-gradient-text` | Flat info-blue accent for AI labels |
166
168
  | `ai-orb` | Decorative gradient disc with a soft glow |
167
169
  | `ai-halo` | Conic-gradient halo that rotates around an orb |
168
170
  | `ai-ring` | Pulsing concentric ring |
@@ -236,12 +238,19 @@ import { faPaperPlaneOutline } from "@l3mpire/icons";
236
238
  <Button appearance="solid" intent="brand" size="md" badge={99}>
237
239
  Notifications
238
240
  </Button>
241
+
242
+ {/* AI intent — brand→violet gradient. Solid = vivid fill + white label;
243
+ outlined/ghost = gradient-clipped label & icons. No disabled-specific
244
+ art (falls back to the appearance's disabled style). */}
245
+ <Button appearance="solid" intent="ai" leftIcon={faStarsOutline}>Ask AI</Button>
246
+ <Button appearance="outlined" intent="ai" leftIcon={faStarsOutline}>Ask AI</Button>
247
+ <Button appearance="ghost" intent="ai" leftIcon={faStarsOutline}>Ask AI</Button>
239
248
  ```
240
249
 
241
250
  | Prop | Values |
242
251
  |---|---|
243
252
  | `appearance` | `"solid"`, `"outlined"`, `"ghost"` |
244
- | `intent` | `"brand"`, `"alert"` |
253
+ | `intent` | `"brand"`, `"alert"`, `"ai"` |
245
254
  | `size` | `"sm"` (24px), `"md"` (32px, radius 10px), `"lg"` (40px, radius 12px) |
246
255
  | `leftIcon` | `IconDefinition` |
247
256
  | `rightIcon` | `IconDefinition` |
package/dist/index.d.mts CHANGED
@@ -489,7 +489,7 @@ declare const BrowserTab: React.ForwardRefExoticComponent<BrowserTabProps & Reac
489
489
 
490
490
  declare const buttonVariants: (props?: ({
491
491
  appearance?: "solid" | "outlined" | "ghost" | null | undefined;
492
- intent?: "alert" | "brand" | null | undefined;
492
+ intent?: "alert" | "brand" | "ai" | null | undefined;
493
493
  size?: "sm" | "md" | "lg" | null | undefined;
494
494
  iconOnly?: boolean | null | undefined;
495
495
  fullWidth?: boolean | null | undefined;
@@ -652,7 +652,7 @@ interface InputLabelProps extends React.ComponentPropsWithoutRef<typeof LabelPri
652
652
  declare const InputLabel: React.ForwardRefExoticComponent<InputLabelProps & React.RefAttributes<HTMLLabelElement>>;
653
653
 
654
654
  declare const infoMessageVariants: (props?: ({
655
- type?: "alert" | "success" | "warning" | "info" | "ai" | "empty" | null | undefined;
655
+ type?: "alert" | "success" | "warning" | "ai" | "info" | "empty" | null | undefined;
656
656
  } & class_variance_authority_types.ClassProp) | undefined) => string;
657
657
  interface InfoMessageProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof infoMessageVariants> {
658
658
  title: React.ReactNode;
package/dist/index.d.ts CHANGED
@@ -489,7 +489,7 @@ declare const BrowserTab: React.ForwardRefExoticComponent<BrowserTabProps & Reac
489
489
 
490
490
  declare const buttonVariants: (props?: ({
491
491
  appearance?: "solid" | "outlined" | "ghost" | null | undefined;
492
- intent?: "alert" | "brand" | null | undefined;
492
+ intent?: "alert" | "brand" | "ai" | null | undefined;
493
493
  size?: "sm" | "md" | "lg" | null | undefined;
494
494
  iconOnly?: boolean | null | undefined;
495
495
  fullWidth?: boolean | null | undefined;
@@ -652,7 +652,7 @@ interface InputLabelProps extends React.ComponentPropsWithoutRef<typeof LabelPri
652
652
  declare const InputLabel: React.ForwardRefExoticComponent<InputLabelProps & React.RefAttributes<HTMLLabelElement>>;
653
653
 
654
654
  declare const infoMessageVariants: (props?: ({
655
- type?: "alert" | "success" | "warning" | "info" | "ai" | "empty" | null | undefined;
655
+ type?: "alert" | "success" | "warning" | "ai" | "info" | "empty" | null | undefined;
656
656
  } & class_variance_authority_types.ClassProp) | undefined) => string;
657
657
  interface InfoMessageProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, VariantProps<typeof infoMessageVariants> {
658
658
  title: React.ReactNode;
package/dist/index.js CHANGED
@@ -700,7 +700,8 @@ var buttonVariants = (0, import_class_variance_authority3.cva)(
700
700
  },
701
701
  intent: {
702
702
  brand: [],
703
- alert: []
703
+ alert: [],
704
+ ai: []
704
705
  },
705
706
  size: {
706
707
  sm: [
@@ -822,6 +823,48 @@ var buttonVariants = (0, import_class_variance_authority3.cva)(
822
823
  "active:text-btn-ghost-alert-text-pressed"
823
824
  ]
824
825
  },
826
+ // ── Solid + AI ─────────────────────────────────────────────────────
827
+ // Vivid brand→violet gradient fill, white label/icons, violet outer
828
+ // border + a translucent-white inner border (via inset shadow).
829
+ {
830
+ appearance: "solid",
831
+ intent: "ai",
832
+ class: [
833
+ "bg-ai-strong",
834
+ "text-[var(--core-text-main-invert-primary)]",
835
+ "border-[var(--violet-500)]",
836
+ "shadow-[inset_0_0_0_1px_rgb(255_255_255/0.6),0_1px_3px_0_var(--shadow-4)]",
837
+ "hover:bg-ai-strong-hover",
838
+ "active:bg-ai-strong-pressed"
839
+ ]
840
+ },
841
+ // ── Outlined + AI ──────────────────────────────────────────────────
842
+ // Neutral surface (same as outlined brand), brand-blue border that
843
+ // deepens per state; label/icons are gradient-clipped (see component).
844
+ {
845
+ appearance: "outlined",
846
+ intent: "ai",
847
+ class: [
848
+ "bg-gradient-to-t from-btn-outlined-neutral-bg-default from-[10%] to-btn-outlined-neutral-bg-gradient-to-default",
849
+ "border-[var(--interactive-bg-primary-dark-default)]",
850
+ "shadow-[0_1px_3px_0_var(--shadow-4)]",
851
+ "hover:from-btn-outlined-neutral-bg-hover hover:from-[0%] hover:to-btn-outlined-neutral-bg-gradient-to-hover",
852
+ "hover:border-[var(--interactive-bg-primary-dark-hover)]",
853
+ "active:from-btn-outlined-neutral-bg-pressed active:to-btn-outlined-neutral-bg-gradient-to-pressed",
854
+ "active:border-[var(--interactive-bg-primary-dark-pressed)]"
855
+ ]
856
+ },
857
+ // ── Ghost + AI ─────────────────────────────────────────────────────
858
+ // Subtle translucent gradient wash, no border; gradient-clipped text.
859
+ {
860
+ appearance: "ghost",
861
+ intent: "ai",
862
+ class: [
863
+ "bg-ai-subtle border-transparent",
864
+ "hover:bg-ai-subtle-hover",
865
+ "active:bg-ai-subtle-pressed"
866
+ ]
867
+ },
825
868
  // ── Icon-only size overrides ───────────────────────────────────────
826
869
  { size: "sm", iconOnly: true, class: "w-6 min-w-0 px-0" },
827
870
  { size: "md", iconOnly: true, class: "w-8 min-w-0 px-0" },
@@ -884,6 +927,8 @@ var Button = React6.forwardRef(
884
927
  const isDisabled = disabled || loading;
885
928
  const isIconOnly = iconOnlyProp ?? !children;
886
929
  const iconSize = iconSizeMap[resolvedSize];
930
+ const aiGradientText = intent === "ai" && appearance !== "solid" && !isDisabled;
931
+ const aiTextClass = aiGradientText ? "ai-grad-text" : void 0;
887
932
  const variantClasses = buttonVariants({
888
933
  appearance,
889
934
  intent,
@@ -893,7 +938,7 @@ var Button = React6.forwardRef(
893
938
  className
894
939
  });
895
940
  const labelNode = !isIconOnly ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("span", { className: textWrapperClass(resolvedSize), children: [
896
- children,
941
+ aiGradientText ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { className: aiTextClass, children }) : children,
897
942
  badge != null && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ButtonBadge, { size: resolvedSize, intent, children: badge })
898
943
  ] }) : null;
899
944
  if (asChild) {
@@ -906,11 +951,12 @@ var Button = React6.forwardRef(
906
951
  className: cn(variantClasses),
907
952
  disabled: isDisabled,
908
953
  "aria-busy": loading || void 0,
954
+ "data-ai-text": aiGradientText || void 0,
909
955
  ...props,
910
956
  children: [
911
- loading ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons5.Icon, { icon: import_icons5.faSpinnerSolid, size: iconSize, className: "animate-spin" }) : leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons5.Icon, { icon: leftIcon, size: iconSize }) : null,
957
+ loading ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons5.Icon, { icon: import_icons5.faSpinnerSolid, size: iconSize, className: "animate-spin" }) : leftIcon ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons5.Icon, { icon: leftIcon, size: iconSize, className: aiTextClass }) : null,
912
958
  labelNode,
913
- rightIcon && !loading && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons5.Icon, { icon: rightIcon, size: iconSize })
959
+ rightIcon && !loading && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_icons5.Icon, { icon: rightIcon, size: iconSize, className: aiTextClass })
914
960
  ]
915
961
  }
916
962
  );