@chromatic-com/tetra 3.0.0--canary.106.e65baac.0 → 3.0.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.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _emotion_react from '@emotion/react';
2
2
  import * as React from 'react';
3
- import React__default, { FC, ReactNode, ElementType, FunctionComponent } from 'react';
3
+ import React__default, { FC, ReactNode, ElementType, ComponentType, FunctionComponent } from 'react';
4
4
  import * as _emotion_styled from '@emotion/styled';
5
5
  import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
6
6
 
@@ -407,6 +407,8 @@ declare const icons: {
407
407
  readonly youtube: JSX.Element;
408
408
  readonly linkedin: JSX.Element;
409
409
  readonly vscode: JSX.Element;
410
+ readonly bluesky: JSX.Element;
411
+ readonly photostabilize: JSX.Element;
410
412
  };
411
413
 
412
414
  type Icons = keyof typeof icons;
@@ -513,12 +515,13 @@ interface ButtonProps {
513
515
  size?: 'sm' | 'md' | 'lg';
514
516
  variant?: 'solid' | 'outline';
515
517
  color?: 'blue' | 'white' | 'slate';
518
+ inverted?: boolean;
516
519
  leftIcon?: Icons;
517
520
  rightIcon?: Icons;
518
521
  href?: string;
519
522
  target?: '_blank' | '_self' | '_parent' | '_top';
520
523
  onClick?: () => void;
521
- as?: 'button' | 'a';
524
+ as?: 'button' | 'a' | 'span';
522
525
  }
523
526
  declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
524
527
 
@@ -555,30 +558,11 @@ declare const DropdownMenuItem: _emotion_styled.StyledComponent<RadixDropdownMen
555
558
  theme?: _emotion_react.Theme | undefined;
556
559
  }, {}, {}>;
557
560
 
558
- interface FooterItem {
559
- title: string;
560
- href: string;
561
- LinkWrapper?: any;
562
- }
563
- interface FooterColumn {
564
- title: string;
565
- links: FooterItem[];
566
- }
567
- interface FooterSocialItem extends FooterItem {
568
- icon: IconProps['name'];
569
- }
570
- interface HomeItem {
571
- href: string;
572
- LinkWrapper?: any;
573
- }
574
-
575
561
  interface FooterProps {
576
562
  theme: 'light' | 'dark';
577
- columns: FooterColumn[];
578
- socialLinks: FooterSocialItem[];
579
- homeLink: HomeItem;
563
+ LinkWrapper: ElementType;
580
564
  }
581
- declare const Footer: ({ theme, columns, socialLinks, homeLink, ...props }: FooterProps) => JSX.Element;
565
+ declare const Footer: ({ theme, LinkWrapper, ...props }: FooterProps) => JSX.Element;
582
566
 
583
567
  interface ColumnProps {
584
568
  children: ReactNode;
@@ -601,55 +585,32 @@ declare const Grid: FC<GridProps> & {
601
585
  Column: FC<ColumnProps>;
602
586
  };
603
587
 
604
- interface HeaderMobileSection {
605
- name?: string;
606
- maxItems?: number;
607
- collapsible?: boolean;
608
- content: {
609
- title: string;
610
- href: string;
611
- linkWrapper?: any;
612
- icon?: Icons;
613
- iconColor?: keyof typeof color;
614
- customIcon?: ReactNode;
615
- }[];
616
- }
617
- interface HeaderDesktopItemContent {
618
- type: 'link' | 'separator';
588
+ interface HeaderLink {
619
589
  title: string;
620
- description?: string;
621
- href?: string;
622
- linkWrapper?: any;
623
590
  icon?: Icons;
624
591
  iconColor?: keyof typeof color;
625
- customIcon?: ReactNode;
626
- }
627
- interface HeaderDesktopItem {
628
- id: string;
629
- name: string;
630
- href?: string;
592
+ customIcon?: React__default.ReactNode;
593
+ href: string;
631
594
  linkWrapper?: any;
632
- leftPosition?: number;
633
- menu?: {
634
- content: HeaderDesktopItemContent[];
635
- backgroundColor?: keyof typeof color;
636
- }[];
637
595
  }
596
+ type HeaderLinks = Record<LinkKeys, HeaderLink>;
597
+
638
598
  interface HeaderProps {
639
599
  theme?: 'light' | 'dark';
640
- logo?: 'chromatic' | 'storybook';
641
- logoHref?: string;
642
600
  logoLinkWrapper?: any;
643
- desktopData: HeaderDesktopItem[];
644
- desktopRight?: ReactNode;
645
601
  desktopActiveId?: string;
646
- mobileData: HeaderMobileSection[];
647
- mobileTop?: ReactNode;
648
- mobileBottom?: ReactNode;
649
602
  fullWidth?: boolean;
603
+ loggedIn?: boolean;
604
+ maintenanceMode?: boolean;
605
+ isSticky?: boolean;
606
+ links: HeaderLinks;
607
+ TrackSignUp: ComponentType<{
608
+ children: ReactNode;
609
+ }>;
650
610
  }
611
+ type LinkKeys = 'signin' | 'signup' | 'uiTest' | 'visualTest' | 'interactionTest' | 'accessibilityTest' | 'storybook' | 'playwright' | 'cypress' | 'turboSnap' | 'uiReview' | 'publish' | 'figmaPlugin' | 'frontendTeams' | 'designSystems' | 'digitalAgencies' | 'aboutChromatic' | 'careers' | 'security' | 'enterprise' | 'netlify' | 'monday' | 'collective' | 'ezcater' | 'blog' | 'changelog' | 'frontendTestingGuide' | 'docs' | 'pricing' | 'sales' | 'steadySnap';
651
612
 
652
- declare const Header: FC<HeaderProps>;
613
+ declare const Header: ({ theme, links, logoLinkWrapper, desktopActiveId, fullWidth, loggedIn, maintenanceMode, isSticky, TrackSignUp, }: HeaderProps) => JSX.Element;
653
614
 
654
615
  declare const CollectiveIcon: () => JSX.Element;
655
616
 
@@ -678,6 +639,7 @@ interface LinkProps {
678
639
  children: React__default.ReactNode;
679
640
  size?: 'default' | 'sm' | 'md' | 'lg';
680
641
  color?: keyof typeof color;
642
+ inverted?: boolean;
681
643
  leftIcon?: Icons;
682
644
  rightIcon?: Icons;
683
645
  href?: string;
@@ -693,6 +655,7 @@ interface LinkWithWrapperProps extends React__default.AnchorHTMLAttributes<HTMLA
693
655
  LinkWrapper?: ElementType;
694
656
  children: ReactNode;
695
657
  href: string;
658
+ noAnchor?: boolean;
696
659
  }
697
660
  /**
698
661
  * Optionally replace anchor tags with a wrapper component
@@ -844,4 +807,4 @@ declare const Text: FC<TextProps>;
844
807
 
845
808
  declare const cssVariables: string;
846
809
 
847
- export { Accordion, Avatar, BBCIcon, Button, CollectiveIcon, Container, CustomerStoryHero, CypressIcon, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuItem, EzCaterIcon, FigmaIcon, Footer, FooterProps, FullWidthContainer, Grid, HStack, Header, HeaderProps, Icon, Icons, IntegrationImage, Link, LinkWithWrapper, ListTypes, Logo, MondayIcon, NavDropdownMenu, NetlifyIcon, NormalizeArea, PlaywrightIcon, Stack, Stat, SubNav, Testimonial, Text, VStack, animations, breakpoint, color, cssVariables, fontFamily, fontSize, fontWeight, lineHeight, max2xl, maxLg, maxMd, maxSm, maxXl, min2xl, minBase, minLg, minMd, minSm, minXl, spacing, t, typography, useMediaQuery };
810
+ export { Accordion, Avatar, BBCIcon, Button, CollectiveIcon, Container, CustomerStoryHero, CypressIcon, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuItem, EzCaterIcon, FigmaIcon, Footer, type FooterProps, FullWidthContainer, Grid, HStack, Header, type HeaderProps, Icon, type Icons, IntegrationImage, Link, LinkWithWrapper, type ListTypes, Logo, MondayIcon, NavDropdownMenu, NetlifyIcon, NormalizeArea, PlaywrightIcon, Stack, Stat, SubNav, Testimonial, Text, VStack, animations, breakpoint, color, cssVariables, fontFamily, fontSize, fontWeight, lineHeight, max2xl, maxLg, maxMd, maxSm, maxXl, min2xl, minBase, minLg, minMd, minSm, minXl, spacing, t, typography, useMediaQuery };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as _emotion_react from '@emotion/react';
2
2
  import * as React from 'react';
3
- import React__default, { FC, ReactNode, ElementType, FunctionComponent } from 'react';
3
+ import React__default, { FC, ReactNode, ElementType, ComponentType, FunctionComponent } from 'react';
4
4
  import * as _emotion_styled from '@emotion/styled';
5
5
  import * as RadixDropdownMenu from '@radix-ui/react-dropdown-menu';
6
6
 
@@ -407,6 +407,8 @@ declare const icons: {
407
407
  readonly youtube: JSX.Element;
408
408
  readonly linkedin: JSX.Element;
409
409
  readonly vscode: JSX.Element;
410
+ readonly bluesky: JSX.Element;
411
+ readonly photostabilize: JSX.Element;
410
412
  };
411
413
 
412
414
  type Icons = keyof typeof icons;
@@ -513,12 +515,13 @@ interface ButtonProps {
513
515
  size?: 'sm' | 'md' | 'lg';
514
516
  variant?: 'solid' | 'outline';
515
517
  color?: 'blue' | 'white' | 'slate';
518
+ inverted?: boolean;
516
519
  leftIcon?: Icons;
517
520
  rightIcon?: Icons;
518
521
  href?: string;
519
522
  target?: '_blank' | '_self' | '_parent' | '_top';
520
523
  onClick?: () => void;
521
- as?: 'button' | 'a';
524
+ as?: 'button' | 'a' | 'span';
522
525
  }
523
526
  declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLAnchorElement | HTMLButtonElement>>;
524
527
 
@@ -555,30 +558,11 @@ declare const DropdownMenuItem: _emotion_styled.StyledComponent<RadixDropdownMen
555
558
  theme?: _emotion_react.Theme | undefined;
556
559
  }, {}, {}>;
557
560
 
558
- interface FooterItem {
559
- title: string;
560
- href: string;
561
- LinkWrapper?: any;
562
- }
563
- interface FooterColumn {
564
- title: string;
565
- links: FooterItem[];
566
- }
567
- interface FooterSocialItem extends FooterItem {
568
- icon: IconProps['name'];
569
- }
570
- interface HomeItem {
571
- href: string;
572
- LinkWrapper?: any;
573
- }
574
-
575
561
  interface FooterProps {
576
562
  theme: 'light' | 'dark';
577
- columns: FooterColumn[];
578
- socialLinks: FooterSocialItem[];
579
- homeLink: HomeItem;
563
+ LinkWrapper: ElementType;
580
564
  }
581
- declare const Footer: ({ theme, columns, socialLinks, homeLink, ...props }: FooterProps) => JSX.Element;
565
+ declare const Footer: ({ theme, LinkWrapper, ...props }: FooterProps) => JSX.Element;
582
566
 
583
567
  interface ColumnProps {
584
568
  children: ReactNode;
@@ -601,55 +585,32 @@ declare const Grid: FC<GridProps> & {
601
585
  Column: FC<ColumnProps>;
602
586
  };
603
587
 
604
- interface HeaderMobileSection {
605
- name?: string;
606
- maxItems?: number;
607
- collapsible?: boolean;
608
- content: {
609
- title: string;
610
- href: string;
611
- linkWrapper?: any;
612
- icon?: Icons;
613
- iconColor?: keyof typeof color;
614
- customIcon?: ReactNode;
615
- }[];
616
- }
617
- interface HeaderDesktopItemContent {
618
- type: 'link' | 'separator';
588
+ interface HeaderLink {
619
589
  title: string;
620
- description?: string;
621
- href?: string;
622
- linkWrapper?: any;
623
590
  icon?: Icons;
624
591
  iconColor?: keyof typeof color;
625
- customIcon?: ReactNode;
626
- }
627
- interface HeaderDesktopItem {
628
- id: string;
629
- name: string;
630
- href?: string;
592
+ customIcon?: React__default.ReactNode;
593
+ href: string;
631
594
  linkWrapper?: any;
632
- leftPosition?: number;
633
- menu?: {
634
- content: HeaderDesktopItemContent[];
635
- backgroundColor?: keyof typeof color;
636
- }[];
637
595
  }
596
+ type HeaderLinks = Record<LinkKeys, HeaderLink>;
597
+
638
598
  interface HeaderProps {
639
599
  theme?: 'light' | 'dark';
640
- logo?: 'chromatic' | 'storybook';
641
- logoHref?: string;
642
600
  logoLinkWrapper?: any;
643
- desktopData: HeaderDesktopItem[];
644
- desktopRight?: ReactNode;
645
601
  desktopActiveId?: string;
646
- mobileData: HeaderMobileSection[];
647
- mobileTop?: ReactNode;
648
- mobileBottom?: ReactNode;
649
602
  fullWidth?: boolean;
603
+ loggedIn?: boolean;
604
+ maintenanceMode?: boolean;
605
+ isSticky?: boolean;
606
+ links: HeaderLinks;
607
+ TrackSignUp: ComponentType<{
608
+ children: ReactNode;
609
+ }>;
650
610
  }
611
+ type LinkKeys = 'signin' | 'signup' | 'uiTest' | 'visualTest' | 'interactionTest' | 'accessibilityTest' | 'storybook' | 'playwright' | 'cypress' | 'turboSnap' | 'uiReview' | 'publish' | 'figmaPlugin' | 'frontendTeams' | 'designSystems' | 'digitalAgencies' | 'aboutChromatic' | 'careers' | 'security' | 'enterprise' | 'netlify' | 'monday' | 'collective' | 'ezcater' | 'blog' | 'changelog' | 'frontendTestingGuide' | 'docs' | 'pricing' | 'sales' | 'steadySnap';
651
612
 
652
- declare const Header: FC<HeaderProps>;
613
+ declare const Header: ({ theme, links, logoLinkWrapper, desktopActiveId, fullWidth, loggedIn, maintenanceMode, isSticky, TrackSignUp, }: HeaderProps) => JSX.Element;
653
614
 
654
615
  declare const CollectiveIcon: () => JSX.Element;
655
616
 
@@ -678,6 +639,7 @@ interface LinkProps {
678
639
  children: React__default.ReactNode;
679
640
  size?: 'default' | 'sm' | 'md' | 'lg';
680
641
  color?: keyof typeof color;
642
+ inverted?: boolean;
681
643
  leftIcon?: Icons;
682
644
  rightIcon?: Icons;
683
645
  href?: string;
@@ -693,6 +655,7 @@ interface LinkWithWrapperProps extends React__default.AnchorHTMLAttributes<HTMLA
693
655
  LinkWrapper?: ElementType;
694
656
  children: ReactNode;
695
657
  href: string;
658
+ noAnchor?: boolean;
696
659
  }
697
660
  /**
698
661
  * Optionally replace anchor tags with a wrapper component
@@ -844,4 +807,4 @@ declare const Text: FC<TextProps>;
844
807
 
845
808
  declare const cssVariables: string;
846
809
 
847
- export { Accordion, Avatar, BBCIcon, Button, CollectiveIcon, Container, CustomerStoryHero, CypressIcon, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuItem, EzCaterIcon, FigmaIcon, Footer, FooterProps, FullWidthContainer, Grid, HStack, Header, HeaderProps, Icon, Icons, IntegrationImage, Link, LinkWithWrapper, ListTypes, Logo, MondayIcon, NavDropdownMenu, NetlifyIcon, NormalizeArea, PlaywrightIcon, Stack, Stat, SubNav, Testimonial, Text, VStack, animations, breakpoint, color, cssVariables, fontFamily, fontSize, fontWeight, lineHeight, max2xl, maxLg, maxMd, maxSm, maxXl, min2xl, minBase, minLg, minMd, minSm, minXl, spacing, t, typography, useMediaQuery };
810
+ export { Accordion, Avatar, BBCIcon, Button, CollectiveIcon, Container, CustomerStoryHero, CypressIcon, Divider, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuItem, EzCaterIcon, FigmaIcon, Footer, type FooterProps, FullWidthContainer, Grid, HStack, Header, type HeaderProps, Icon, type Icons, IntegrationImage, Link, LinkWithWrapper, type ListTypes, Logo, MondayIcon, NavDropdownMenu, NetlifyIcon, NormalizeArea, PlaywrightIcon, Stack, Stat, SubNav, Testimonial, Text, VStack, animations, breakpoint, color, cssVariables, fontFamily, fontSize, fontWeight, lineHeight, max2xl, maxLg, maxMd, maxSm, maxXl, min2xl, minBase, minLg, minMd, minSm, minXl, spacing, t, typography, useMediaQuery };