@affinda/react 0.0.22 → 0.0.23

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/README.md CHANGED
@@ -126,7 +126,11 @@ import { Button, Heading, TypographyLockup } from '@affinda/react';
126
126
  - **PaperclipDecoration** - Decorative paperclip vector for hero sections
127
127
 
128
128
  **Footer:**
129
- - **Footer** / AfFooter - Full-featured footer with navigation, contact info, and social links
129
+ - **Footer** / AfFooter - Slot-based footer layout component
130
+ - **FooterColumn** / AfFooterColumn - Navigation column for footer
131
+ - **FooterLink** / AfFooterLink - Styled link for footer navigation
132
+ - **SocialLink** / AfSocialLink - Circular social media icon link
133
+ - **ContactItem** / AfContactItem - Label/value pair for contact info
130
134
 
131
135
  ## Quick Start Components
132
136
 
@@ -757,45 +761,103 @@ When generating Affinda UI code:
757
761
 
758
762
  ### Footer
759
763
 
760
- A comprehensive footer component matching affinda.com's design.
764
+ A flexible, slot-based footer component for composing marketing page footers.
761
765
 
762
766
  ```tsx
763
- import { Footer, Logo } from '@affinda/react';
767
+ import {
768
+ Footer,
769
+ FooterColumn,
770
+ FooterLink,
771
+ SocialLink,
772
+ ContactItem,
773
+ Logo
774
+ } from '@affinda/react';
764
775
 
765
776
  <Footer
766
- salesEmail="contact@affinda.com"
767
- supportEmail="support@affinda.com"
768
- linkedinUrl="https://www.linkedin.com/company/affinda/"
769
- youtubeUrl="https://www.youtube.com/@affinda"
770
- githubUrl="https://github.com/affinda"
771
- statusUrl="https://status.affinda.com"
777
+ copyrightText="© 2025 Your Company. All rights reserved."
778
+ statusText="All systems are operational"
779
+ statusUrl="https://status.example.com"
772
780
  systemsOperational={true}
781
+ showStatus={true}
773
782
  >
783
+ {/* Logo */}
774
784
  <Logo slot="logo" />
785
+
786
+ {/* Social Links */}
787
+ <div slot="social" style={{ display: 'flex', gap: '12px' }}>
788
+ <SocialLink href="https://linkedin.com/company/..." icon="linkedin" label="LinkedIn" />
789
+ <SocialLink href="https://youtube.com/..." icon="youtube" label="YouTube" />
790
+ <SocialLink href="https://github.com/..." icon="github" label="GitHub" />
791
+ </div>
792
+
793
+ {/* Contact Info */}
794
+ <div slot="contact" style={{ display: 'flex', flexDirection: 'column', gap: '20px' }}>
795
+ <ContactItem label="Sales enquiries" value="sales@example.com" />
796
+ <ContactItem label="Support" value="support@example.com" />
797
+ </div>
798
+
799
+ {/* Navigation Columns */}
800
+ <div slot="nav" style={{ display: 'contents' }}>
801
+ <FooterColumn heading="Products">
802
+ <FooterLink href="/product-a">Product A</FooterLink>
803
+ <FooterLink href="/product-b">Product B</FooterLink>
804
+ </FooterColumn>
805
+
806
+ <FooterColumn heading="Company">
807
+ <FooterLink href="/about">About</FooterLink>
808
+ <FooterLink href="/careers">Careers</FooterLink>
809
+ <FooterLink href="https://external.com" external>Partner Site</FooterLink>
810
+ </FooterColumn>
811
+ </div>
812
+
813
+ {/* Legal Links */}
814
+ <div slot="legal" style={{ display: 'flex', gap: '24px' }}>
815
+ <a href="/privacy">Privacy policy</a>
816
+ <a href="/terms">Terms of service</a>
817
+ </div>
818
+
819
+ {/* Certification Badges (optional) */}
820
+ <div slot="badges">
821
+ {/* Your certification badge SVGs or images */}
822
+ </div>
775
823
  </Footer>
776
824
  ```
777
825
 
778
- **Props:**
779
- - `salesEmail`: Sales contact email address
780
- - `supportEmail`: Support contact email address
781
- - `linkedinUrl`: LinkedIn profile URL
782
- - `youtubeUrl`: YouTube channel URL
783
- - `githubUrl`: GitHub organization URL
784
- - `statusUrl`: Status page URL
785
- - `systemsOperational`: Boolean indicating system status
786
- - `copyrightYear`: Copyright year (defaults to current year)
787
-
788
- **Slots:**
789
- - `logo`: Custom logo component (defaults to Affinda logo)
790
- - `nav-columns`: Custom navigation columns (defaults to Affinda navigation)
791
- - `badges`: Custom certification badges (defaults to GDPR, SOC, ISO badges)
826
+ **Footer Props:**
827
+ - `copyrightText`: Copyright text (e.g., "© 2025 Company. All rights reserved.")
828
+ - `statusText`: Status message text
829
+ - `statusUrl`: Link to status page
830
+ - `systemsOperational`: Boolean for green/red status indicator
831
+ - `showStatus`: Whether to show the status section
832
+
833
+ **Footer Slots:**
834
+ - `logo`: Your logo component
835
+ - `social`: Social media links (use SocialLink components)
836
+ - `contact`: Contact information (use ContactItem components)
837
+ - `nav`: Navigation columns (use FooterColumn + FooterLink components)
838
+ - `legal`: Legal/policy links
839
+ - `badges`: Certification badges
840
+
841
+ **Helper Components:**
842
+
843
+ - **FooterColumn**: Navigation column with heading
844
+ - Props: `heading` (string)
845
+
846
+ - **FooterLink**: Styled footer link
847
+ - Props: `href` (string), `external` (boolean - adds external link icon)
848
+
849
+ - **SocialLink**: Circular social media icon link
850
+ - Props: `href`, `label`, `icon` ('linkedin' | 'youtube' | 'github' | 'twitter' | 'facebook' | 'custom')
851
+
852
+ - **ContactItem**: Label + value pair for contact info
853
+ - Props: `label`, `value`
792
854
 
793
855
  **Features:**
794
856
  - Dark inkwell background with mist green text
795
- - Social media links with hover effects
796
- - Four-column navigation layout
857
+ - Fully composable via slots
858
+ - Built-in social media icons
859
+ - External link indicators
797
860
  - System status indicator
798
- - Legal links and certification badges
799
861
  - Fully responsive design
800
862
 
801
863
  ## Using Illustrations
@@ -8,9 +8,12 @@ import { AfButton as AfButtonElement } from "@affinda/wc/dist/components/af-butt
8
8
  import { AfCard as AfCardElement } from "@affinda/wc/dist/components/af-card.js";
9
9
  import { AfClientCarousel as AfClientCarouselElement } from "@affinda/wc/dist/components/af-client-carousel.js";
10
10
  import { AfColorSwatch as AfColorSwatchElement } from "@affinda/wc/dist/components/af-color-swatch.js";
11
+ import { AfContactItem as AfContactItemElement } from "@affinda/wc/dist/components/af-contact-item.js";
11
12
  import { AfContainer as AfContainerElement } from "@affinda/wc/dist/components/af-container.js";
12
13
  import { AfCtaSection as AfCtaSectionElement } from "@affinda/wc/dist/components/af-cta-section.js";
13
14
  import { AfFeatureAccordion as AfFeatureAccordionElement } from "@affinda/wc/dist/components/af-feature-accordion.js";
15
+ import { AfFooterColumn as AfFooterColumnElement } from "@affinda/wc/dist/components/af-footer-column.js";
16
+ import { AfFooterLink as AfFooterLinkElement } from "@affinda/wc/dist/components/af-footer-link.js";
14
17
  import { AfFooter as AfFooterElement } from "@affinda/wc/dist/components/af-footer.js";
15
18
  import { AfHeading as AfHeadingElement } from "@affinda/wc/dist/components/af-heading.js";
16
19
  import { AfHeroSection as AfHeroSectionElement } from "@affinda/wc/dist/components/af-hero-section.js";
@@ -20,6 +23,7 @@ import { AfLogo as AfLogoElement } from "@affinda/wc/dist/components/af-logo.js"
20
23
  import { AfNavItem as AfNavItemElement } from "@affinda/wc/dist/components/af-nav-item.js";
21
24
  import { AfNavbar as AfNavbarElement } from "@affinda/wc/dist/components/af-navbar.js";
22
25
  import { AfSection as AfSectionElement } from "@affinda/wc/dist/components/af-section.js";
26
+ import { AfSocialLink as AfSocialLinkElement } from "@affinda/wc/dist/components/af-social-link.js";
23
27
  import { AfTestimonialCarousel as AfTestimonialCarouselElement } from "@affinda/wc/dist/components/af-testimonial-carousel.js";
24
28
  import { AfTestimonialStat as AfTestimonialStatElement } from "@affinda/wc/dist/components/af-testimonial-stat.js";
25
29
  import { AfTestimonial as AfTestimonialElement } from "@affinda/wc/dist/components/af-testimonial.js";
@@ -38,6 +42,8 @@ export type AfClientCarouselEvents = NonNullable<unknown>;
38
42
  export declare const AfClientCarousel: StencilReactComponent<AfClientCarouselElement, AfClientCarouselEvents>;
39
43
  export type AfColorSwatchEvents = NonNullable<unknown>;
40
44
  export declare const AfColorSwatch: StencilReactComponent<AfColorSwatchElement, AfColorSwatchEvents>;
45
+ export type AfContactItemEvents = NonNullable<unknown>;
46
+ export declare const AfContactItem: StencilReactComponent<AfContactItemElement, AfContactItemEvents>;
41
47
  export type AfContainerEvents = NonNullable<unknown>;
42
48
  export declare const AfContainer: StencilReactComponent<AfContainerElement, AfContainerEvents>;
43
49
  export type AfCtaSectionEvents = NonNullable<unknown>;
@@ -46,6 +52,10 @@ export type AfFeatureAccordionEvents = NonNullable<unknown>;
46
52
  export declare const AfFeatureAccordion: StencilReactComponent<AfFeatureAccordionElement, AfFeatureAccordionEvents>;
47
53
  export type AfFooterEvents = NonNullable<unknown>;
48
54
  export declare const AfFooter: StencilReactComponent<AfFooterElement, AfFooterEvents>;
55
+ export type AfFooterColumnEvents = NonNullable<unknown>;
56
+ export declare const AfFooterColumn: StencilReactComponent<AfFooterColumnElement, AfFooterColumnEvents>;
57
+ export type AfFooterLinkEvents = NonNullable<unknown>;
58
+ export declare const AfFooterLink: StencilReactComponent<AfFooterLinkElement, AfFooterLinkEvents>;
49
59
  export type AfHeadingEvents = NonNullable<unknown>;
50
60
  export declare const AfHeading: StencilReactComponent<AfHeadingElement, AfHeadingEvents>;
51
61
  export type AfHeroSectionEvents = NonNullable<unknown>;
@@ -62,6 +72,8 @@ export type AfNavbarEvents = NonNullable<unknown>;
62
72
  export declare const AfNavbar: StencilReactComponent<AfNavbarElement, AfNavbarEvents>;
63
73
  export type AfSectionEvents = NonNullable<unknown>;
64
74
  export declare const AfSection: StencilReactComponent<AfSectionElement, AfSectionEvents>;
75
+ export type AfSocialLinkEvents = NonNullable<unknown>;
76
+ export declare const AfSocialLink: StencilReactComponent<AfSocialLinkElement, AfSocialLinkEvents>;
65
77
  export type AfTestimonialEvents = NonNullable<unknown>;
66
78
  export declare const AfTestimonial: StencilReactComponent<AfTestimonialElement, AfTestimonialEvents>;
67
79
  export type AfTestimonialCarouselEvents = NonNullable<unknown>;
@@ -10,9 +10,12 @@ import { AfButton as AfButtonElement, defineCustomElement as defineAfButton } fr
10
10
  import { AfCard as AfCardElement, defineCustomElement as defineAfCard } from "@affinda/wc/dist/components/af-card.js";
11
11
  import { AfClientCarousel as AfClientCarouselElement, defineCustomElement as defineAfClientCarousel } from "@affinda/wc/dist/components/af-client-carousel.js";
12
12
  import { AfColorSwatch as AfColorSwatchElement, defineCustomElement as defineAfColorSwatch } from "@affinda/wc/dist/components/af-color-swatch.js";
13
+ import { AfContactItem as AfContactItemElement, defineCustomElement as defineAfContactItem } from "@affinda/wc/dist/components/af-contact-item.js";
13
14
  import { AfContainer as AfContainerElement, defineCustomElement as defineAfContainer } from "@affinda/wc/dist/components/af-container.js";
14
15
  import { AfCtaSection as AfCtaSectionElement, defineCustomElement as defineAfCtaSection } from "@affinda/wc/dist/components/af-cta-section.js";
15
16
  import { AfFeatureAccordion as AfFeatureAccordionElement, defineCustomElement as defineAfFeatureAccordion } from "@affinda/wc/dist/components/af-feature-accordion.js";
17
+ import { AfFooterColumn as AfFooterColumnElement, defineCustomElement as defineAfFooterColumn } from "@affinda/wc/dist/components/af-footer-column.js";
18
+ import { AfFooterLink as AfFooterLinkElement, defineCustomElement as defineAfFooterLink } from "@affinda/wc/dist/components/af-footer-link.js";
16
19
  import { AfFooter as AfFooterElement, defineCustomElement as defineAfFooter } from "@affinda/wc/dist/components/af-footer.js";
17
20
  import { AfHeading as AfHeadingElement, defineCustomElement as defineAfHeading } from "@affinda/wc/dist/components/af-heading.js";
18
21
  import { AfHeroSection as AfHeroSectionElement, defineCustomElement as defineAfHeroSection } from "@affinda/wc/dist/components/af-hero-section.js";
@@ -22,6 +25,7 @@ import { AfLogo as AfLogoElement, defineCustomElement as defineAfLogo } from "@a
22
25
  import { AfNavItem as AfNavItemElement, defineCustomElement as defineAfNavItem } from "@affinda/wc/dist/components/af-nav-item.js";
23
26
  import { AfNavbar as AfNavbarElement, defineCustomElement as defineAfNavbar } from "@affinda/wc/dist/components/af-navbar.js";
24
27
  import { AfSection as AfSectionElement, defineCustomElement as defineAfSection } from "@affinda/wc/dist/components/af-section.js";
28
+ import { AfSocialLink as AfSocialLinkElement, defineCustomElement as defineAfSocialLink } from "@affinda/wc/dist/components/af-social-link.js";
25
29
  import { AfTestimonialCarousel as AfTestimonialCarouselElement, defineCustomElement as defineAfTestimonialCarousel } from "@affinda/wc/dist/components/af-testimonial-carousel.js";
26
30
  import { AfTestimonialStat as AfTestimonialStatElement, defineCustomElement as defineAfTestimonialStat } from "@affinda/wc/dist/components/af-testimonial-stat.js";
27
31
  import { AfTestimonial as AfTestimonialElement, defineCustomElement as defineAfTestimonial } from "@affinda/wc/dist/components/af-testimonial.js";
@@ -77,6 +81,14 @@ export const AfColorSwatch = /*@__PURE__*/ createComponent({
77
81
  events: {},
78
82
  defineCustomElement: defineAfColorSwatch
79
83
  });
84
+ export const AfContactItem = /*@__PURE__*/ createComponent({
85
+ tagName: 'af-contact-item',
86
+ elementClass: AfContactItemElement,
87
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
88
+ react: React,
89
+ events: {},
90
+ defineCustomElement: defineAfContactItem
91
+ });
80
92
  export const AfContainer = /*@__PURE__*/ createComponent({
81
93
  tagName: 'af-container',
82
94
  elementClass: AfContainerElement,
@@ -109,6 +121,22 @@ export const AfFooter = /*@__PURE__*/ createComponent({
109
121
  events: {},
110
122
  defineCustomElement: defineAfFooter
111
123
  });
124
+ export const AfFooterColumn = /*@__PURE__*/ createComponent({
125
+ tagName: 'af-footer-column',
126
+ elementClass: AfFooterColumnElement,
127
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
128
+ react: React,
129
+ events: {},
130
+ defineCustomElement: defineAfFooterColumn
131
+ });
132
+ export const AfFooterLink = /*@__PURE__*/ createComponent({
133
+ tagName: 'af-footer-link',
134
+ elementClass: AfFooterLinkElement,
135
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
136
+ react: React,
137
+ events: {},
138
+ defineCustomElement: defineAfFooterLink
139
+ });
112
140
  export const AfHeading = /*@__PURE__*/ createComponent({
113
141
  tagName: 'af-heading',
114
142
  elementClass: AfHeadingElement,
@@ -173,6 +201,14 @@ export const AfSection = /*@__PURE__*/ createComponent({
173
201
  events: {},
174
202
  defineCustomElement: defineAfSection
175
203
  });
204
+ export const AfSocialLink = /*@__PURE__*/ createComponent({
205
+ tagName: 'af-social-link',
206
+ elementClass: AfSocialLinkElement,
207
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
208
+ react: React,
209
+ events: {},
210
+ defineCustomElement: defineAfSocialLink
211
+ });
176
212
  export const AfTestimonial = /*@__PURE__*/ createComponent({
177
213
  tagName: 'af-testimonial',
178
214
  elementClass: AfTestimonialElement,
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
1
  export * from './generated/components.js';
2
- export { AfAspectRatio as AspectRatio, AfButton as Button, AfButtonGroup as ButtonGroup, AfCard as Card, AfClientCarousel as ClientCarousel, AfColorSwatch as ColorSwatch, AfContainer as Container, AfCtaSection as CtaSection, AfFeatureAccordion as FeatureAccordion, AfFooter as Footer, AfHeading as Heading, AfHeroSection as HeroSection, AfIconButton as IconButton, AfLogo as Logo, AfLogoWell as LogoWell, AfNavItem as NavItem, AfNavbar as Navbar, AfSection as Section, AfText as Text, AfTestimonial as Testimonial, AfTestimonialCarousel as TestimonialCarousel, AfTestimonialStat as TestimonialStat, AfTypographyLockup as TypographyLockup } from './generated/components.js';
2
+ export { AfAspectRatio as AspectRatio, AfButton as Button, AfButtonGroup as ButtonGroup, AfCard as Card, AfClientCarousel as ClientCarousel, AfColorSwatch as ColorSwatch, AfContactItem as ContactItem, AfContainer as Container, AfCtaSection as CtaSection, AfFeatureAccordion as FeatureAccordion, AfFooter as Footer, AfFooterColumn as FooterColumn, AfFooterLink as FooterLink, AfHeading as Heading, AfHeroSection as HeroSection, AfIconButton as IconButton, AfLogo as Logo, AfLogoWell as LogoWell, AfNavItem as NavItem, AfNavbar as Navbar, AfSection as Section, AfSocialLink as SocialLink, AfText as Text, AfTestimonial as Testimonial, AfTestimonialCarousel as TestimonialCarousel, AfTestimonialStat as TestimonialStat, AfTypographyLockup as TypographyLockup } from './generated/components.js';
3
3
  export * from '@affinda/icons/react';
4
4
  export { PaperclipDecoration } from './components/PaperclipDecoration';
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@
2
2
  export * from './generated/components.js';
3
3
  // Note: defineCustomElements should be imported directly from @affinda/wc/loader/index.js in your app
4
4
  // Re-export components without the 'Af' prefix for cleaner React usage
5
- export { AfAspectRatio as AspectRatio, AfButton as Button, AfButtonGroup as ButtonGroup, AfCard as Card, AfClientCarousel as ClientCarousel, AfColorSwatch as ColorSwatch, AfContainer as Container, AfCtaSection as CtaSection, AfFeatureAccordion as FeatureAccordion, AfFooter as Footer, AfHeading as Heading, AfHeroSection as HeroSection, AfIconButton as IconButton, AfLogo as Logo, AfLogoWell as LogoWell, AfNavItem as NavItem, AfNavbar as Navbar, AfSection as Section, AfText as Text, AfTestimonial as Testimonial, AfTestimonialCarousel as TestimonialCarousel, AfTestimonialStat as TestimonialStat, AfTypographyLockup as TypographyLockup } from './generated/components.js';
5
+ export { AfAspectRatio as AspectRatio, AfButton as Button, AfButtonGroup as ButtonGroup, AfCard as Card, AfClientCarousel as ClientCarousel, AfColorSwatch as ColorSwatch, AfContactItem as ContactItem, AfContainer as Container, AfCtaSection as CtaSection, AfFeatureAccordion as FeatureAccordion, AfFooter as Footer, AfFooterColumn as FooterColumn, AfFooterLink as FooterLink, AfHeading as Heading, AfHeroSection as HeroSection, AfIconButton as IconButton, AfLogo as Logo, AfLogoWell as LogoWell, AfNavItem as NavItem, AfNavbar as Navbar, AfSection as Section, AfSocialLink as SocialLink, AfText as Text, AfTestimonial as Testimonial, AfTestimonialCarousel as TestimonialCarousel, AfTestimonialStat as TestimonialStat, AfTypographyLockup as TypographyLockup } from './generated/components.js';
6
6
  // Re-export React icon components from icons package
7
7
  export * from '@affinda/icons/react';
8
8
  // Export custom React components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@affinda/react",
3
- "version": "0.0.22",
3
+ "version": "0.0.23",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "files": [
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@affinda/icons": "^0.0.3",
19
- "@affinda/wc": "^0.0.13",
19
+ "@affinda/wc": "^0.0.14",
20
20
  "@stencil/react-output-target": "^1.2.0"
21
21
  },
22
22
  "scripts": {