infinity-ui-elements 1.0.8 → 1.1.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/dist/index.js CHANGED
@@ -3526,6 +3526,139 @@ const Button = React__namespace.forwardRef(({ className, variant = "primary", co
3526
3526
  });
3527
3527
  Button.displayName = "Button";
3528
3528
 
3529
+ const textVariants = cva("", {
3530
+ variants: {
3531
+ variant: {
3532
+ "display-xlarge": "font-functional font-medium",
3533
+ "display-large": "font-functional font-medium",
3534
+ "display-medium": "font-functional font-medium",
3535
+ "display-small": "font-functional font-medium",
3536
+ "heading-2xlarge": "font-functional font-medium",
3537
+ "heading-xlarge": "font-functional font-medium",
3538
+ "heading-large": "font-display",
3539
+ "heading-medium": "font-display",
3540
+ "heading-small": "font-display",
3541
+ "body-large": "font-display",
3542
+ "body-medium": "font-display",
3543
+ "body-small": "font-display",
3544
+ "body-xsmall": "font-display",
3545
+ "caption-medium": "font-display font-semibold",
3546
+ },
3547
+ size: {
3548
+ "display-xlarge": "font-size-1100 leading-1100 tracking-[0%] mb-0",
3549
+ "display-large": "font-size-1000 leading-1000 tracking-[0%] mb-0",
3550
+ "display-medium": "font-size-900 leading-900 tracking-[0%] mb-0",
3551
+ "display-small": "font-size-800 leading-800 tracking-[0%] mb-0",
3552
+ "heading-2xlarge": "font-size-700 leading-700 tracking-[0%] mb-0",
3553
+ "heading-xlarge": "font-size-600 leading-600 tracking-[0%] mb-0",
3554
+ "heading-large": "font-size-500 leading-500 tracking-[0%] mb-0",
3555
+ "heading-medium": "font-size-400 leading-400 tracking-[0%] mb-0",
3556
+ "heading-small": "font-size-300 leading-300 tracking-[0%] mb-0",
3557
+ "body-large": "font-size-200 leading-200 tracking-[0%] mb-[var(--paragraph-spacing-400)]",
3558
+ "body-medium": "font-size-100 leading-100 tracking-[0%] mb-[var(--paragraph-spacing-300)]",
3559
+ "body-small": "font-size-75 leading-75 tracking-[0%] mb-[var(--paragraph-spacing-200)]",
3560
+ "body-xsmall": "font-size-25 leading-25 tracking-[0%] mb-[var(--paragraph-spacing-100)]",
3561
+ "caption-medium": "text-50 leading-50 tracking-[0%] mb-0",
3562
+ },
3563
+ weight: {
3564
+ regular: "font-normal",
3565
+ medium: "font-medium",
3566
+ semibold: "font-semibold",
3567
+ },
3568
+ color: {
3569
+ default: "text-surface-ink-neutral-normal",
3570
+ subtle: "text-surface-ink-neutral-subtle",
3571
+ muted: "text-surface-ink-neutral-muted",
3572
+ disabled: "text-surface-ink-neutral-disabled",
3573
+ primary: "text-surface-ink-primary-normal",
3574
+ },
3575
+ as: {
3576
+ h1: "",
3577
+ h2: "",
3578
+ h3: "",
3579
+ h4: "",
3580
+ h5: "",
3581
+ h6: "",
3582
+ p: "",
3583
+ span: "",
3584
+ div: "",
3585
+ },
3586
+ },
3587
+ compoundVariants: [
3588
+ // Display variants use Clash Grotesk with medium weight
3589
+ {
3590
+ variant: [
3591
+ "display-xlarge",
3592
+ "display-large",
3593
+ "display-medium",
3594
+ "display-small",
3595
+ "heading-2xlarge",
3596
+ "heading-xlarge",
3597
+ ],
3598
+ weight: "regular",
3599
+ class: "font-medium",
3600
+ },
3601
+ {
3602
+ variant: [
3603
+ "display-xlarge",
3604
+ "display-large",
3605
+ "display-medium",
3606
+ "display-small",
3607
+ "heading-2xlarge",
3608
+ "heading-xlarge",
3609
+ ],
3610
+ weight: "medium",
3611
+ class: "font-medium",
3612
+ },
3613
+ {
3614
+ variant: [
3615
+ "display-xlarge",
3616
+ "display-large",
3617
+ "display-medium",
3618
+ "display-small",
3619
+ "heading-2xlarge",
3620
+ "heading-xlarge",
3621
+ ],
3622
+ weight: "semibold",
3623
+ class: "font-medium",
3624
+ },
3625
+ // Caption medium is always semibold
3626
+ {
3627
+ variant: "caption-medium",
3628
+ weight: "regular",
3629
+ class: "font-semibold",
3630
+ },
3631
+ {
3632
+ variant: "caption-medium",
3633
+ weight: "medium",
3634
+ class: "font-semibold",
3635
+ },
3636
+ {
3637
+ variant: "caption-medium",
3638
+ weight: "semibold",
3639
+ class: "font-semibold",
3640
+ },
3641
+ ],
3642
+ defaultVariants: {
3643
+ variant: "body-medium",
3644
+ size: "body-medium",
3645
+ weight: "regular",
3646
+ color: "default",
3647
+ as: "p",
3648
+ },
3649
+ });
3650
+ const Text = React__namespace.forwardRef(({ className, variant, size, weight, color, as, children, ...props }, ref) => {
3651
+ const Component = as || "p";
3652
+ return React__namespace.createElement(Component, {
3653
+ className: cn(textVariants({ variant, size, weight, color, as, className })),
3654
+ ref,
3655
+ ...props,
3656
+ }, children);
3657
+ });
3658
+ Text.displayName = "Text";
3659
+
3529
3660
  exports.Button = Button;
3661
+ exports.Text = Text;
3530
3662
  exports.buttonVariants = buttonVariants;
3663
+ exports.textVariants = textVariants;
3531
3664
  //# sourceMappingURL=index.js.map