@affinda/react 0.0.20 → 0.0.21

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
@@ -115,6 +115,10 @@ import { Button, Heading, TypographyLockup } from '@affinda/react';
115
115
  - **TestimonialCarousel** / AfTestimonialCarousel - Carousel for sliding between multiple testimonials
116
116
  - **TestimonialStat** / AfTestimonialStat - Individual statistics within testimonials
117
117
 
118
+ **Feature Showcase:**
119
+ - **FeatureAccordion** / AfFeatureAccordion - Expandable accordion with auto-cycling timer and image display
120
+ - **CtaSection** / AfCtaSection - Call-to-action section with illustration and buttons
121
+
118
122
  **Brand:**
119
123
  - **Logo** / AfLogo - Affinda logo component
120
124
 
@@ -430,6 +434,72 @@ Site-wide navigation header with responsive design and mobile menu support.
430
434
  - Variant: `"01"` (primary links), `"02"` (secondary/utility links)
431
435
  - Variant: Controls visual style
432
436
 
437
+ #### Feature Showcase
438
+
439
+ **FeatureAccordion**
440
+ - Expandable accordion for showcasing product features
441
+ - Auto-cycles through items with a visual progress timer
442
+ - Displays accompanying images that change with each item
443
+ - Timer resets when user clicks an item
444
+
445
+ ```tsx
446
+ import { FeatureAccordion } from '@affinda/react';
447
+
448
+ <FeatureAccordion
449
+ heading="Give AI agents your paperwork"
450
+ items={JSON.stringify([
451
+ {
452
+ title: "Automate document processing with 99%+ accuracy",
453
+ description: "Extract any information from any document with industry-leading precision.",
454
+ imageUrl: "https://example.com/feature1.jpg",
455
+ imageAlt: "Document automation"
456
+ },
457
+ {
458
+ title: "Build models in minutes, not months",
459
+ description: "Affinda learns instantly from every interaction.",
460
+ imageUrl: "https://example.com/feature2.jpg",
461
+ imageAlt: "Fast model building"
462
+ }
463
+ ])}
464
+ cycleInterval={6000}
465
+ autoCycle={true}
466
+ />
467
+ ```
468
+
469
+ **Props:**
470
+ - `heading`: Section heading text
471
+ - `items`: JSON string array of accordion items (title, description, imageUrl, imageAlt)
472
+ - `cycleInterval`: Auto-cycle interval in milliseconds (default: 6000)
473
+ - `autoCycle`: Enable/disable auto-cycling (default: true)
474
+
475
+ **CtaSection**
476
+ - Call-to-action section with illustration and decorative background
477
+ - Styled to match the affinda.com design
478
+
479
+ ```tsx
480
+ import { CtaSection } from '@affinda/react';
481
+ import { getIllustrationUrlByScene } from '@affinda/illustrations';
482
+
483
+ <CtaSection
484
+ heading="See what our AI agents can do for you"
485
+ description="Upload your documents and watch our AI agents get to work."
486
+ primaryButtonText="Try for free"
487
+ primaryButtonUrl="https://app.affinda.com/auth/register"
488
+ secondaryButtonText="Talk to us"
489
+ secondaryButtonUrl="/contact"
490
+ illustrationUrl={getIllustrationUrlByScene('automate', 'inkwell')}
491
+ />
492
+ ```
493
+
494
+ **Props:**
495
+ - `heading`: Section heading text
496
+ - `description`: Description text below heading
497
+ - `primaryButtonText`: Text for primary CTA button
498
+ - `primaryButtonUrl`: URL for primary button
499
+ - `secondaryButtonText`: Text for secondary button
500
+ - `secondaryButtonUrl`: URL for secondary button
501
+ - `illustrationUrl`: URL to illustration image (use @affinda/illustrations)
502
+
433
503
  #### Social Proof & Testimonials
434
504
 
435
505
  **Testimonial**
@@ -682,10 +752,29 @@ When generating Affinda UI code:
682
752
 
683
753
  4. **Never use purple colors** - those were placeholder colors and have been removed
684
754
 
755
+ ## Using Illustrations
756
+
757
+ The `@affinda/illustrations` package provides themed illustration assets:
758
+
759
+ ```tsx
760
+ import { getIllustrationUrlByScene } from '@affinda/illustrations';
761
+
762
+ // Available scenes: 'document-raise', 'thinking', 'shapes', 'team-leader',
763
+ // 'grow-business', 'document-type', 'industries', 'accuracy', 'intelligence',
764
+ // 'page-turn', 'automate'
765
+
766
+ // Available themes: 'white-ivory', 'mist-green', 'soft-clay', 'inkwell'
767
+
768
+ <img
769
+ src={getIllustrationUrlByScene('automate', 'inkwell')}
770
+ alt="Automation illustration"
771
+ />
772
+ ```
773
+
685
774
  ## Related Packages
686
775
 
687
776
  - **@affinda/wc** - Core web components (used internally)
688
777
  - **@affinda/tokens** - Design tokens (colors, spacing, typography)
689
778
  - **@affinda/icons** - Icon library
690
- - **@affinda/illustrations** - Illustration assets
779
+ - **@affinda/illustrations** - Illustration assets (install separately: `npm install @affinda/illustrations`)
691
780
  - **@affinda/css** - Base CSS styles
@@ -9,6 +9,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
11
  import { AfContainer as AfContainerElement } from "@affinda/wc/dist/components/af-container.js";
12
+ import { AfCtaSection as AfCtaSectionElement } from "@affinda/wc/dist/components/af-cta-section.js";
13
+ import { AfFeatureAccordion as AfFeatureAccordionElement } from "@affinda/wc/dist/components/af-feature-accordion.js";
12
14
  import { AfHeading as AfHeadingElement } from "@affinda/wc/dist/components/af-heading.js";
13
15
  import { AfHeroSection as AfHeroSectionElement } from "@affinda/wc/dist/components/af-hero-section.js";
14
16
  import { AfIconButton as AfIconButtonElement } from "@affinda/wc/dist/components/af-icon-button.js";
@@ -37,6 +39,10 @@ export type AfColorSwatchEvents = NonNullable<unknown>;
37
39
  export declare const AfColorSwatch: StencilReactComponent<AfColorSwatchElement, AfColorSwatchEvents>;
38
40
  export type AfContainerEvents = NonNullable<unknown>;
39
41
  export declare const AfContainer: StencilReactComponent<AfContainerElement, AfContainerEvents>;
42
+ export type AfCtaSectionEvents = NonNullable<unknown>;
43
+ export declare const AfCtaSection: StencilReactComponent<AfCtaSectionElement, AfCtaSectionEvents>;
44
+ export type AfFeatureAccordionEvents = NonNullable<unknown>;
45
+ export declare const AfFeatureAccordion: StencilReactComponent<AfFeatureAccordionElement, AfFeatureAccordionEvents>;
40
46
  export type AfHeadingEvents = NonNullable<unknown>;
41
47
  export declare const AfHeading: StencilReactComponent<AfHeadingElement, AfHeadingEvents>;
42
48
  export type AfHeroSectionEvents = NonNullable<unknown>;
@@ -11,6 +11,8 @@ import { AfCard as AfCardElement, defineCustomElement as defineAfCard } from "@a
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
13
  import { AfContainer as AfContainerElement, defineCustomElement as defineAfContainer } from "@affinda/wc/dist/components/af-container.js";
14
+ import { AfCtaSection as AfCtaSectionElement, defineCustomElement as defineAfCtaSection } from "@affinda/wc/dist/components/af-cta-section.js";
15
+ import { AfFeatureAccordion as AfFeatureAccordionElement, defineCustomElement as defineAfFeatureAccordion } from "@affinda/wc/dist/components/af-feature-accordion.js";
14
16
  import { AfHeading as AfHeadingElement, defineCustomElement as defineAfHeading } from "@affinda/wc/dist/components/af-heading.js";
15
17
  import { AfHeroSection as AfHeroSectionElement, defineCustomElement as defineAfHeroSection } from "@affinda/wc/dist/components/af-hero-section.js";
16
18
  import { AfIconButton as AfIconButtonElement, defineCustomElement as defineAfIconButton } from "@affinda/wc/dist/components/af-icon-button.js";
@@ -82,6 +84,22 @@ export const AfContainer = /*@__PURE__*/ createComponent({
82
84
  events: {},
83
85
  defineCustomElement: defineAfContainer
84
86
  });
87
+ export const AfCtaSection = /*@__PURE__*/ createComponent({
88
+ tagName: 'af-cta-section',
89
+ elementClass: AfCtaSectionElement,
90
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
91
+ react: React,
92
+ events: {},
93
+ defineCustomElement: defineAfCtaSection
94
+ });
95
+ export const AfFeatureAccordion = /*@__PURE__*/ createComponent({
96
+ tagName: 'af-feature-accordion',
97
+ elementClass: AfFeatureAccordionElement,
98
+ // @ts-ignore - ignore potential React type mismatches between the Stencil Output Target and your project.
99
+ react: React,
100
+ events: {},
101
+ defineCustomElement: defineAfFeatureAccordion
102
+ });
85
103
  export const AfHeading = /*@__PURE__*/ createComponent({
86
104
  tagName: 'af-heading',
87
105
  elementClass: AfHeadingElement,
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, 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, AfContainer as Container, AfCtaSection as CtaSection, AfFeatureAccordion as FeatureAccordion, 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';
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, 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, AfContainer as Container, AfCtaSection as CtaSection, AfFeatureAccordion as FeatureAccordion, 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';
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.20",
3
+ "version": "0.0.21",
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.11",
19
+ "@affinda/wc": "^0.0.12",
20
20
  "@stencil/react-output-target": "^1.2.0"
21
21
  },
22
22
  "scripts": {