infinity-ui-elements 1.0.7 → 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.esm.js CHANGED
@@ -3505,5 +3505,136 @@ const Button = React.forwardRef(({ className, variant = "primary", color = "prim
3505
3505
  });
3506
3506
  Button.displayName = "Button";
3507
3507
 
3508
- export { Button, buttonVariants };
3508
+ const textVariants = cva("", {
3509
+ variants: {
3510
+ variant: {
3511
+ "display-xlarge": "font-functional font-medium",
3512
+ "display-large": "font-functional font-medium",
3513
+ "display-medium": "font-functional font-medium",
3514
+ "display-small": "font-functional font-medium",
3515
+ "heading-2xlarge": "font-functional font-medium",
3516
+ "heading-xlarge": "font-functional font-medium",
3517
+ "heading-large": "font-display",
3518
+ "heading-medium": "font-display",
3519
+ "heading-small": "font-display",
3520
+ "body-large": "font-display",
3521
+ "body-medium": "font-display",
3522
+ "body-small": "font-display",
3523
+ "body-xsmall": "font-display",
3524
+ "caption-medium": "font-display font-semibold",
3525
+ },
3526
+ size: {
3527
+ "display-xlarge": "font-size-1100 leading-1100 tracking-[0%] mb-0",
3528
+ "display-large": "font-size-1000 leading-1000 tracking-[0%] mb-0",
3529
+ "display-medium": "font-size-900 leading-900 tracking-[0%] mb-0",
3530
+ "display-small": "font-size-800 leading-800 tracking-[0%] mb-0",
3531
+ "heading-2xlarge": "font-size-700 leading-700 tracking-[0%] mb-0",
3532
+ "heading-xlarge": "font-size-600 leading-600 tracking-[0%] mb-0",
3533
+ "heading-large": "font-size-500 leading-500 tracking-[0%] mb-0",
3534
+ "heading-medium": "font-size-400 leading-400 tracking-[0%] mb-0",
3535
+ "heading-small": "font-size-300 leading-300 tracking-[0%] mb-0",
3536
+ "body-large": "font-size-200 leading-200 tracking-[0%] mb-[var(--paragraph-spacing-400)]",
3537
+ "body-medium": "font-size-100 leading-100 tracking-[0%] mb-[var(--paragraph-spacing-300)]",
3538
+ "body-small": "font-size-75 leading-75 tracking-[0%] mb-[var(--paragraph-spacing-200)]",
3539
+ "body-xsmall": "font-size-25 leading-25 tracking-[0%] mb-[var(--paragraph-spacing-100)]",
3540
+ "caption-medium": "text-50 leading-50 tracking-[0%] mb-0",
3541
+ },
3542
+ weight: {
3543
+ regular: "font-normal",
3544
+ medium: "font-medium",
3545
+ semibold: "font-semibold",
3546
+ },
3547
+ color: {
3548
+ default: "text-surface-ink-neutral-normal",
3549
+ subtle: "text-surface-ink-neutral-subtle",
3550
+ muted: "text-surface-ink-neutral-muted",
3551
+ disabled: "text-surface-ink-neutral-disabled",
3552
+ primary: "text-surface-ink-primary-normal",
3553
+ },
3554
+ as: {
3555
+ h1: "",
3556
+ h2: "",
3557
+ h3: "",
3558
+ h4: "",
3559
+ h5: "",
3560
+ h6: "",
3561
+ p: "",
3562
+ span: "",
3563
+ div: "",
3564
+ },
3565
+ },
3566
+ compoundVariants: [
3567
+ // Display variants use Clash Grotesk with medium weight
3568
+ {
3569
+ variant: [
3570
+ "display-xlarge",
3571
+ "display-large",
3572
+ "display-medium",
3573
+ "display-small",
3574
+ "heading-2xlarge",
3575
+ "heading-xlarge",
3576
+ ],
3577
+ weight: "regular",
3578
+ class: "font-medium",
3579
+ },
3580
+ {
3581
+ variant: [
3582
+ "display-xlarge",
3583
+ "display-large",
3584
+ "display-medium",
3585
+ "display-small",
3586
+ "heading-2xlarge",
3587
+ "heading-xlarge",
3588
+ ],
3589
+ weight: "medium",
3590
+ class: "font-medium",
3591
+ },
3592
+ {
3593
+ variant: [
3594
+ "display-xlarge",
3595
+ "display-large",
3596
+ "display-medium",
3597
+ "display-small",
3598
+ "heading-2xlarge",
3599
+ "heading-xlarge",
3600
+ ],
3601
+ weight: "semibold",
3602
+ class: "font-medium",
3603
+ },
3604
+ // Caption medium is always semibold
3605
+ {
3606
+ variant: "caption-medium",
3607
+ weight: "regular",
3608
+ class: "font-semibold",
3609
+ },
3610
+ {
3611
+ variant: "caption-medium",
3612
+ weight: "medium",
3613
+ class: "font-semibold",
3614
+ },
3615
+ {
3616
+ variant: "caption-medium",
3617
+ weight: "semibold",
3618
+ class: "font-semibold",
3619
+ },
3620
+ ],
3621
+ defaultVariants: {
3622
+ variant: "body-medium",
3623
+ size: "body-medium",
3624
+ weight: "regular",
3625
+ color: "default",
3626
+ as: "p",
3627
+ },
3628
+ });
3629
+ const Text = React.forwardRef(({ className, variant, size, weight, color, as, children, ...props }, ref) => {
3630
+ const Component = as || "p";
3631
+ return React.createElement(Component, {
3632
+ className: cn(textVariants({ variant, size, weight, color, as, className })),
3633
+ ref,
3634
+ ...props,
3635
+ }, children);
3636
+ });
3637
+ Text.displayName = "Text";
3638
+
3639
+ export { Button, Text, buttonVariants, textVariants };
3509
3640
  //# sourceMappingURL=index.esm.js.map