@opensite/ui 3.5.0 → 3.5.1

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.
@@ -1,84 +1,189 @@
1
1
  import * as React from 'react';
2
+ import { ImageSliderImage } from './image-slider.cjs';
2
3
  import { S as SectionBackground, s as SectionSpacing, t as PatternName } from './community-initiatives-Cgd-IXlI.cjs';
3
- import { O as OptixFlowConfig } from './blocks-DyouPohq.cjs';
4
+ import { L as LogoItem, A as ActionConfig, O as OptixFlowConfig } from './blocks-DyouPohq.cjs';
4
5
  import 'react/jsx-runtime';
5
6
  import 'class-variance-authority';
6
7
  import '@page-speed/pressable';
7
8
  import '@opensite/hooks/usePlatformFromUrl';
8
9
 
9
- interface TechnologyItem {
10
+ /**
11
+ * Configuration for a single panel in the {@link HeroTechCarousel} block.
12
+ *
13
+ * Each panel renders as a full-height column on desktop and as a stacked,
14
+ * content-fit row on mobile. Every visual element is optional so panels can
15
+ * range from purely visual (background only) to fully populated (logo +
16
+ * title + content + actions).
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * const item: HeroPanelItem = {
21
+ * logo: { src: "/logo.svg", alt: "Brand" },
22
+ * title: "Item title",
23
+ * content: "Short supporting copy",
24
+ * actions: [{ label: "Get Started", href: "/start" }],
25
+ * backgroundMedia: [
26
+ * { src: "/bg-1.jpg", alt: "" },
27
+ * { src: "/bg-2.jpg", alt: "" },
28
+ * ],
29
+ * };
30
+ * ```
31
+ */
32
+ interface HeroPanelItem {
10
33
  /**
11
- * Technology name
34
+ * Optional logo rendered above the title.
35
+ * Follows the standard {@link LogoItem} prop shape used across blocks.
36
+ * Default styling applies `object-contain` so SVG/PNG logos preserve aspect ratio.
12
37
  */
13
- name: string;
38
+ logo?: LogoItem;
14
39
  /**
15
- * Installation command
40
+ * Custom slot for the logo (overrides the {@link logo} prop).
16
41
  */
17
- command: string;
42
+ logoSlot?: React.ReactNode;
18
43
  /**
19
- * Logo image source (optional, uses default if not provided)
44
+ * Optional panel title.
20
45
  */
21
- logo?: string;
22
- }
23
- interface HeroTechCarouselProps {
46
+ title?: React.ReactNode | string;
47
+ /**
48
+ * Optional supporting content rendered below the title.
49
+ */
50
+ content?: React.ReactNode | string;
51
+ /**
52
+ * Optional action buttons / links rendered at the bottom of the panel.
53
+ */
54
+ actions?: ActionConfig[];
55
+ /**
56
+ * Optional background media for the panel.
57
+ *
58
+ * - `0` items → no background, panel renders on the section background.
59
+ * - `1` item → static background image.
60
+ * - `2+` items → autoplaying image carousel via {@link ImageSlider}.
61
+ */
62
+ backgroundMedia?: ImageSliderImage[];
63
+ /**
64
+ * Autoplay interval (ms) for this panel's background carousel.
65
+ * Falls back to the block-level `backgroundAutoplayIntervalMs` when omitted.
66
+ */
67
+ backgroundAutoplayIntervalMs?: number;
24
68
  /**
25
- * Main heading content
69
+ * Optional id for the panel element (for anchor links / analytics).
26
70
  */
27
- heading?: React.ReactNode;
71
+ id?: string;
28
72
  /**
29
- * Description text below heading
73
+ * Additional CSS classes for this panel's outer wrapper.
30
74
  */
31
- description?: React.ReactNode;
75
+ className?: string;
32
76
  /**
33
- * Array of technology items for the carousel
77
+ * Additional CSS classes for the panel's content layer (above the background).
34
78
  */
35
- technologies?: TechnologyItem[];
79
+ contentClassName?: string;
36
80
  /**
37
- * Custom slot for carousel (overrides technologies array)
81
+ * Additional CSS classes for the panel's logo element.
38
82
  */
39
- carouselSlot?: React.ReactNode;
83
+ logoClassName?: string;
40
84
  /**
41
- * Autoplay delay in milliseconds
85
+ * Additional CSS classes for the panel's title element.
42
86
  */
43
- autoplayDelay?: number; /**
44
- * Background style for the section
87
+ titleClassName?: string;
88
+ /**
89
+ * Additional CSS classes for the panel's content paragraph.
90
+ */
91
+ textClassName?: string;
92
+ /**
93
+ * Additional CSS classes for the panel's actions wrapper.
94
+ */
95
+ actionsClassName?: string;
96
+ /**
97
+ * Additional CSS classes applied to the panel's background overlay.
98
+ * Useful for tuning legibility per-panel (e.g. `bg-black/60`).
99
+ */
100
+ overlayClassName?: string;
101
+ /**
102
+ * Per-panel OptixFlow override. Falls back to the block-level config.
103
+ */
104
+ optixFlowConfig?: OptixFlowConfig;
105
+ }
106
+ interface HeroTechCarouselProps {
107
+ /**
108
+ * Panels rendered side-by-side on desktop and stacked on mobile.
109
+ * Capped at {@link HERO_TECH_CAROUSEL_MAX_ITEMS} (4) — additional entries are ignored.
110
+ */
111
+ items?: HeroPanelItem[];
112
+ /**
113
+ * Default autoplay interval (ms) used when a panel has 2+ background media
114
+ * items and does not specify its own `backgroundAutoplayIntervalMs`.
115
+ * @default 5000
116
+ */
117
+ backgroundAutoplayIntervalMs?: number;
118
+ /**
119
+ * Background style for the section.
45
120
  */
46
121
  background?: SectionBackground;
47
122
  /**
48
- * Vertical spacing for the section
123
+ * Vertical spacing for the section. Defaults to `none` so panels can fill
124
+ * the full viewport on desktop without padding.
49
125
  */
50
126
  spacing?: SectionSpacing;
51
127
  /**
52
- * Optional background pattern name
128
+ * Optional background pattern name applied to the section.
53
129
  */
54
130
  pattern?: PatternName | undefined;
55
131
  /**
56
- * Pattern overlay opacity (0-1)
132
+ * Pattern overlay opacity (0-1).
57
133
  */
58
134
  patternOpacity?: number;
59
135
  /**
60
- * Additional CSS classes for the section
136
+ * Additional CSS classes for the section.
61
137
  */
62
138
  className?: string;
63
139
  /**
64
- * Additional CSS classes for the container
140
+ * Additional CSS classes for the section container.
65
141
  */
66
142
  containerClassName?: string;
67
143
  /**
68
- * Additional CSS classes for the heading
144
+ * Additional CSS classes for the panels wrapper (the flex/grid track).
69
145
  */
70
- headingClassName?: string;
146
+ panelsClassName?: string;
71
147
  /**
72
- * Additional CSS classes for the description
148
+ * Default classes shared by every panel content layer (title/content/actions).
149
+ * Per-panel `contentClassName` is appended after this.
73
150
  */
74
- descriptionClassName?: string;
151
+ panelContentClassName?: string;
75
152
  /**
76
- * OptixFlow image optimization configuration
153
+ * Block-level OptixFlow image optimization configuration. Applies to all
154
+ * panels unless a panel provides its own `optixFlowConfig`.
77
155
  */
78
156
  optixFlowConfig?: OptixFlowConfig;
79
157
  /** Optional Section ID */
80
158
  sectionId?: string;
81
159
  }
82
- declare function HeroTechCarousel({ sectionId, heading, description, technologies, carouselSlot, autoplayDelay, background, pattern, patternOpacity, className, containerClassName, spacing, headingClassName, descriptionClassName, optixFlowConfig, }: HeroTechCarouselProps): React.JSX.Element;
160
+ /**
161
+ * Hero block that renders 1–4 side-by-side panels on desktop and stacks them
162
+ * vertically on mobile. Each panel can include a logo, title, supporting copy,
163
+ * actions, and an optional background image or autoplaying image carousel.
164
+ *
165
+ * - Desktop: full-bleed `100vw` width, `100dvh` height, panels share the row equally.
166
+ * - Mobile: panels stack vertically with content-fit height and modern padding.
167
+ *
168
+ * @example
169
+ * ```tsx
170
+ * <HeroTechCarousel
171
+ * items={[
172
+ * {
173
+ * logo: { src: "/logos/insurance.svg", alt: "InsuranceSite" },
174
+ * title: "InsuranceSite",
175
+ * content: "Built for modern brokers",
176
+ * actions: [{ label: "Get Started", href: "/insurance" }],
177
+ * backgroundMedia: [
178
+ * { src: "/img/insurance-1.jpg", alt: "" },
179
+ * { src: "/img/insurance-2.jpg", alt: "" },
180
+ * ],
181
+ * },
182
+ * // ... up to 4 items
183
+ * ]}
184
+ * />
185
+ * ```
186
+ */
187
+ declare function HeroTechCarousel({ sectionId, items, backgroundAutoplayIntervalMs, background, spacing, pattern, patternOpacity, className, containerClassName, panelsClassName, panelContentClassName, optixFlowConfig, }: HeroTechCarouselProps): React.JSX.Element;
83
188
 
84
189
  export { HeroTechCarousel, type HeroTechCarouselProps };
@@ -1,84 +1,189 @@
1
1
  import * as React from 'react';
2
+ import { ImageSliderImage } from './image-slider.js';
2
3
  import { S as SectionBackground, s as SectionSpacing, t as PatternName } from './community-initiatives-Dud0DKXB.js';
3
- import { O as OptixFlowConfig } from './blocks-DyouPohq.js';
4
+ import { L as LogoItem, A as ActionConfig, O as OptixFlowConfig } from './blocks-DyouPohq.js';
4
5
  import 'react/jsx-runtime';
5
6
  import 'class-variance-authority';
6
7
  import '@page-speed/pressable';
7
8
  import '@opensite/hooks/usePlatformFromUrl';
8
9
 
9
- interface TechnologyItem {
10
+ /**
11
+ * Configuration for a single panel in the {@link HeroTechCarousel} block.
12
+ *
13
+ * Each panel renders as a full-height column on desktop and as a stacked,
14
+ * content-fit row on mobile. Every visual element is optional so panels can
15
+ * range from purely visual (background only) to fully populated (logo +
16
+ * title + content + actions).
17
+ *
18
+ * @example
19
+ * ```tsx
20
+ * const item: HeroPanelItem = {
21
+ * logo: { src: "/logo.svg", alt: "Brand" },
22
+ * title: "Item title",
23
+ * content: "Short supporting copy",
24
+ * actions: [{ label: "Get Started", href: "/start" }],
25
+ * backgroundMedia: [
26
+ * { src: "/bg-1.jpg", alt: "" },
27
+ * { src: "/bg-2.jpg", alt: "" },
28
+ * ],
29
+ * };
30
+ * ```
31
+ */
32
+ interface HeroPanelItem {
10
33
  /**
11
- * Technology name
34
+ * Optional logo rendered above the title.
35
+ * Follows the standard {@link LogoItem} prop shape used across blocks.
36
+ * Default styling applies `object-contain` so SVG/PNG logos preserve aspect ratio.
12
37
  */
13
- name: string;
38
+ logo?: LogoItem;
14
39
  /**
15
- * Installation command
40
+ * Custom slot for the logo (overrides the {@link logo} prop).
16
41
  */
17
- command: string;
42
+ logoSlot?: React.ReactNode;
18
43
  /**
19
- * Logo image source (optional, uses default if not provided)
44
+ * Optional panel title.
20
45
  */
21
- logo?: string;
22
- }
23
- interface HeroTechCarouselProps {
46
+ title?: React.ReactNode | string;
47
+ /**
48
+ * Optional supporting content rendered below the title.
49
+ */
50
+ content?: React.ReactNode | string;
51
+ /**
52
+ * Optional action buttons / links rendered at the bottom of the panel.
53
+ */
54
+ actions?: ActionConfig[];
55
+ /**
56
+ * Optional background media for the panel.
57
+ *
58
+ * - `0` items → no background, panel renders on the section background.
59
+ * - `1` item → static background image.
60
+ * - `2+` items → autoplaying image carousel via {@link ImageSlider}.
61
+ */
62
+ backgroundMedia?: ImageSliderImage[];
63
+ /**
64
+ * Autoplay interval (ms) for this panel's background carousel.
65
+ * Falls back to the block-level `backgroundAutoplayIntervalMs` when omitted.
66
+ */
67
+ backgroundAutoplayIntervalMs?: number;
24
68
  /**
25
- * Main heading content
69
+ * Optional id for the panel element (for anchor links / analytics).
26
70
  */
27
- heading?: React.ReactNode;
71
+ id?: string;
28
72
  /**
29
- * Description text below heading
73
+ * Additional CSS classes for this panel's outer wrapper.
30
74
  */
31
- description?: React.ReactNode;
75
+ className?: string;
32
76
  /**
33
- * Array of technology items for the carousel
77
+ * Additional CSS classes for the panel's content layer (above the background).
34
78
  */
35
- technologies?: TechnologyItem[];
79
+ contentClassName?: string;
36
80
  /**
37
- * Custom slot for carousel (overrides technologies array)
81
+ * Additional CSS classes for the panel's logo element.
38
82
  */
39
- carouselSlot?: React.ReactNode;
83
+ logoClassName?: string;
40
84
  /**
41
- * Autoplay delay in milliseconds
85
+ * Additional CSS classes for the panel's title element.
42
86
  */
43
- autoplayDelay?: number; /**
44
- * Background style for the section
87
+ titleClassName?: string;
88
+ /**
89
+ * Additional CSS classes for the panel's content paragraph.
90
+ */
91
+ textClassName?: string;
92
+ /**
93
+ * Additional CSS classes for the panel's actions wrapper.
94
+ */
95
+ actionsClassName?: string;
96
+ /**
97
+ * Additional CSS classes applied to the panel's background overlay.
98
+ * Useful for tuning legibility per-panel (e.g. `bg-black/60`).
99
+ */
100
+ overlayClassName?: string;
101
+ /**
102
+ * Per-panel OptixFlow override. Falls back to the block-level config.
103
+ */
104
+ optixFlowConfig?: OptixFlowConfig;
105
+ }
106
+ interface HeroTechCarouselProps {
107
+ /**
108
+ * Panels rendered side-by-side on desktop and stacked on mobile.
109
+ * Capped at {@link HERO_TECH_CAROUSEL_MAX_ITEMS} (4) — additional entries are ignored.
110
+ */
111
+ items?: HeroPanelItem[];
112
+ /**
113
+ * Default autoplay interval (ms) used when a panel has 2+ background media
114
+ * items and does not specify its own `backgroundAutoplayIntervalMs`.
115
+ * @default 5000
116
+ */
117
+ backgroundAutoplayIntervalMs?: number;
118
+ /**
119
+ * Background style for the section.
45
120
  */
46
121
  background?: SectionBackground;
47
122
  /**
48
- * Vertical spacing for the section
123
+ * Vertical spacing for the section. Defaults to `none` so panels can fill
124
+ * the full viewport on desktop without padding.
49
125
  */
50
126
  spacing?: SectionSpacing;
51
127
  /**
52
- * Optional background pattern name
128
+ * Optional background pattern name applied to the section.
53
129
  */
54
130
  pattern?: PatternName | undefined;
55
131
  /**
56
- * Pattern overlay opacity (0-1)
132
+ * Pattern overlay opacity (0-1).
57
133
  */
58
134
  patternOpacity?: number;
59
135
  /**
60
- * Additional CSS classes for the section
136
+ * Additional CSS classes for the section.
61
137
  */
62
138
  className?: string;
63
139
  /**
64
- * Additional CSS classes for the container
140
+ * Additional CSS classes for the section container.
65
141
  */
66
142
  containerClassName?: string;
67
143
  /**
68
- * Additional CSS classes for the heading
144
+ * Additional CSS classes for the panels wrapper (the flex/grid track).
69
145
  */
70
- headingClassName?: string;
146
+ panelsClassName?: string;
71
147
  /**
72
- * Additional CSS classes for the description
148
+ * Default classes shared by every panel content layer (title/content/actions).
149
+ * Per-panel `contentClassName` is appended after this.
73
150
  */
74
- descriptionClassName?: string;
151
+ panelContentClassName?: string;
75
152
  /**
76
- * OptixFlow image optimization configuration
153
+ * Block-level OptixFlow image optimization configuration. Applies to all
154
+ * panels unless a panel provides its own `optixFlowConfig`.
77
155
  */
78
156
  optixFlowConfig?: OptixFlowConfig;
79
157
  /** Optional Section ID */
80
158
  sectionId?: string;
81
159
  }
82
- declare function HeroTechCarousel({ sectionId, heading, description, technologies, carouselSlot, autoplayDelay, background, pattern, patternOpacity, className, containerClassName, spacing, headingClassName, descriptionClassName, optixFlowConfig, }: HeroTechCarouselProps): React.JSX.Element;
160
+ /**
161
+ * Hero block that renders 1–4 side-by-side panels on desktop and stacks them
162
+ * vertically on mobile. Each panel can include a logo, title, supporting copy,
163
+ * actions, and an optional background image or autoplaying image carousel.
164
+ *
165
+ * - Desktop: full-bleed `100vw` width, `100dvh` height, panels share the row equally.
166
+ * - Mobile: panels stack vertically with content-fit height and modern padding.
167
+ *
168
+ * @example
169
+ * ```tsx
170
+ * <HeroTechCarousel
171
+ * items={[
172
+ * {
173
+ * logo: { src: "/logos/insurance.svg", alt: "InsuranceSite" },
174
+ * title: "InsuranceSite",
175
+ * content: "Built for modern brokers",
176
+ * actions: [{ label: "Get Started", href: "/insurance" }],
177
+ * backgroundMedia: [
178
+ * { src: "/img/insurance-1.jpg", alt: "" },
179
+ * { src: "/img/insurance-2.jpg", alt: "" },
180
+ * ],
181
+ * },
182
+ * // ... up to 4 items
183
+ * ]}
184
+ * />
185
+ * ```
186
+ */
187
+ declare function HeroTechCarousel({ sectionId, items, backgroundAutoplayIntervalMs, background, spacing, pattern, patternOpacity, className, containerClassName, panelsClassName, panelContentClassName, optixFlowConfig, }: HeroTechCarouselProps): React.JSX.Element;
83
188
 
84
189
  export { HeroTechCarousel, type HeroTechCarouselProps };