@hyvor/design 2.1.9 → 2.1.10

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.
Files changed (49) hide show
  1. package/dist/cloud/HyvorBar/BarSupport.svelte +1 -1
  2. package/dist/components/ColorPicker/ColorPicker.svelte +68 -9
  3. package/dist/components/ColorPicker/ColorPicker.svelte.d.ts +3 -0
  4. package/dist/index.css +4 -0
  5. package/dist/marketing/AllFeaturesAccordion/AllFeaturesAccordion.svelte +251 -0
  6. package/dist/marketing/AllFeaturesAccordion/AllFeaturesAccordion.svelte.d.ts +23 -0
  7. package/dist/marketing/AllFeaturesAccordion/AllFeaturesAccordionFeature.svelte +70 -0
  8. package/dist/marketing/AllFeaturesAccordion/AllFeaturesAccordionFeature.svelte.d.ts +10 -0
  9. package/dist/marketing/FAQ/FAQ.svelte +227 -0
  10. package/dist/marketing/FAQ/FAQ.svelte.d.ts +13 -0
  11. package/dist/marketing/FeatureSplit/FeatureSplit.svelte +325 -0
  12. package/dist/marketing/FeatureSplit/FeatureSplit.svelte.d.ts +24 -0
  13. package/dist/marketing/Footer/Footer.svelte +395 -98
  14. package/dist/marketing/Footer/Footer.svelte.d.ts +18 -2
  15. package/dist/marketing/Footer/FooterLinkList.svelte +10 -3
  16. package/dist/marketing/FullTrialSignup/FullTrialSignup.svelte +164 -0
  17. package/dist/marketing/FullTrialSignup/FullTrialSignup.svelte.d.ts +18 -0
  18. package/dist/marketing/Header/Header.svelte +72 -28
  19. package/dist/marketing/Header/Header.svelte.d.ts +5 -2
  20. package/dist/marketing/Header/HeaderLanguageToggle.svelte +119 -0
  21. package/dist/marketing/Header/HeaderLanguageToggle.svelte.d.ts +14 -0
  22. package/dist/marketing/Header/HeaderNavLink.svelte +149 -0
  23. package/dist/marketing/Header/HeaderNavLink.svelte.d.ts +18 -0
  24. package/dist/marketing/Header/language.d.ts +16 -0
  25. package/dist/marketing/Header/language.js +28 -0
  26. package/dist/marketing/Hero/Hero.svelte +349 -0
  27. package/dist/marketing/Hero/Hero.svelte.d.ts +16 -0
  28. package/dist/marketing/LogoStrip/LogoStrip.svelte +199 -0
  29. package/dist/marketing/LogoStrip/LogoStrip.svelte.d.ts +19 -0
  30. package/dist/marketing/Seal/CcpaSeal.svelte +29 -0
  31. package/dist/marketing/Seal/CcpaSeal.svelte.d.ts +6 -0
  32. package/dist/marketing/Seal/GdprSeal.svelte +60 -0
  33. package/dist/marketing/Seal/GdprSeal.svelte.d.ts +6 -0
  34. package/dist/marketing/Seal/IsoSeal.svelte +44 -0
  35. package/dist/marketing/Seal/IsoSeal.svelte.d.ts +6 -0
  36. package/dist/marketing/Seal/Seal.svelte +62 -0
  37. package/dist/marketing/Seal/Seal.svelte.d.ts +8 -0
  38. package/dist/marketing/Seal/SsoSeal.svelte +31 -0
  39. package/dist/marketing/Seal/SsoSeal.svelte.d.ts +6 -0
  40. package/dist/marketing/Seal/ccpa.svg +131 -0
  41. package/dist/marketing/SpotlightSplit/SpotlightSplit.svelte +256 -0
  42. package/dist/marketing/SpotlightSplit/SpotlightSplit.svelte.d.ts +19 -0
  43. package/dist/marketing/Testimonials/Testimonials.svelte +441 -0
  44. package/dist/marketing/Testimonials/Testimonials.svelte.d.ts +24 -0
  45. package/dist/marketing/index.d.ts +20 -2
  46. package/dist/marketing/index.js +26 -2
  47. package/dist/marketing/social.d.ts +1 -1
  48. package/dist/marketing/social.js +1 -1
  49. package/package.json +1 -1
@@ -0,0 +1,227 @@
1
+ <script lang="ts">
2
+ interface FaqItem {
3
+ q: string;
4
+ a: string; // as HTML - also used in rich schema
5
+ }
6
+
7
+ interface Props {
8
+ items: FaqItem[];
9
+ columns?: 1 | 2;
10
+ // emit the FAQPage JSON-LD rich schema into <svelte:head>
11
+ richSchema?: boolean;
12
+ toggleIconBg?: string;
13
+ }
14
+
15
+ let { items, columns = 2, richSchema = true, toggleIconBg }: Props = $props();
16
+
17
+ const uid = $props.id();
18
+
19
+ const cols = $derived.by(() => {
20
+ const indexed = items.map((item, index) => ({ item, index }));
21
+ if (columns === 1) return [indexed];
22
+ const mid = Math.ceil(indexed.length / 2);
23
+ return [indexed.slice(0, mid), indexed.slice(mid)];
24
+ });
25
+
26
+ // independent open/close state per item, first one open by default
27
+ let openStates = $state(items.map((_, i) => i === 0));
28
+
29
+ function toggle(i: number) {
30
+ openStates[i] = !openStates[i];
31
+ }
32
+
33
+ const richSchemaObj = $derived({
34
+ '@context': 'https://schema.org',
35
+ '@type': 'FAQPage',
36
+ mainEntity: items.map((item) => ({
37
+ '@type': 'Question',
38
+ name: item.q,
39
+ acceptedAnswer: {
40
+ '@type': 'Answer',
41
+ text: item.a
42
+ }
43
+ }))
44
+ });
45
+
46
+ const richSchemaScript = $derived(
47
+ '<' + 'script type="application/ld+json">' + JSON.stringify(richSchemaObj) + '<' + '/script>'
48
+ );
49
+ </script>
50
+
51
+ <svelte:head>
52
+ {#if richSchema}
53
+ {@html richSchemaScript}
54
+ {/if}
55
+ </svelte:head>
56
+
57
+ <div class="hds-faq" class:single={columns === 1} style:--faq-toggle-icon-bg={toggleIconBg}>
58
+ {#each cols as col, colIndex (colIndex)}
59
+ <div class="faq-col">
60
+ {#each col as { item, index } (item.q)}
61
+ <div class="faq" class:open={openStates[index]}>
62
+ <h3 class="heading">
63
+ <button
64
+ class="trigger"
65
+ id="hds-faq-trigger-{uid}-{index}"
66
+ onclick={() => toggle(index)}
67
+ aria-expanded={openStates[index]}
68
+ aria-controls="hds-faq-panel-{uid}-{index}"
69
+ >
70
+ <span class="q">{item.q}</span>
71
+ <span class="toggle-icon" aria-hidden="true">
72
+ <span class="line horizontal"></span>
73
+ <span class="line vertical"></span>
74
+ </span>
75
+ </button>
76
+ </h3>
77
+
78
+ <div
79
+ class="body"
80
+ class:open={openStates[index]}
81
+ role="region"
82
+ id="hds-faq-panel-{uid}-{index}"
83
+ aria-labelledby="hds-faq-trigger-{uid}-{index}"
84
+ >
85
+ <div class="body-inner">
86
+ <div class="a">{@html item.a}</div>
87
+ </div>
88
+ </div>
89
+ </div>
90
+ {/each}
91
+ </div>
92
+ {/each}
93
+ </div>
94
+
95
+ <style>
96
+ .hds-faq {
97
+ display: flex;
98
+ gap: 0 60px;
99
+ }
100
+
101
+ .hds-faq.single {
102
+ display: block;
103
+ }
104
+
105
+ .faq-col {
106
+ flex: 1;
107
+ min-width: 0;
108
+ }
109
+
110
+ .faq {
111
+ border-bottom: 1px solid var(--border);
112
+ }
113
+
114
+ .heading {
115
+ margin: 0;
116
+ font-size: inherit;
117
+ font-weight: inherit;
118
+ }
119
+
120
+ .trigger {
121
+ display: flex;
122
+ align-items: center;
123
+ justify-content: space-between;
124
+ gap: 20px;
125
+ width: 100%;
126
+ padding: 20px 0;
127
+ background: none;
128
+ border: none;
129
+ cursor: pointer;
130
+ text-align: left;
131
+ color: inherit;
132
+ font: inherit;
133
+ }
134
+
135
+ .q {
136
+ font-size: 16px;
137
+ font-weight: 600;
138
+ letter-spacing: -0.01em;
139
+ }
140
+
141
+ .toggle-icon {
142
+ position: relative;
143
+ flex-shrink: 0;
144
+ width: 24px;
145
+ height: 24px;
146
+ border-radius: 50%;
147
+ background: var(--faq-toggle-icon-bg, var(--accent-light));
148
+ color: var(--accent);
149
+ transition: transform 0.3s cubic-bezier(0.65, 0, 0.35, 1);
150
+ }
151
+
152
+ .faq.open .toggle-icon {
153
+ transform: rotate(180deg);
154
+ }
155
+
156
+ .line {
157
+ position: absolute;
158
+ top: 50%;
159
+ left: 50%;
160
+ background: currentColor;
161
+ border-radius: 2px;
162
+ transform: translate(-50%, -50%);
163
+ transition:
164
+ transform 0.3s cubic-bezier(0.65, 0, 0.35, 1),
165
+ opacity 0.2s ease;
166
+ }
167
+
168
+ .line.horizontal {
169
+ width: 12px;
170
+ height: 2px;
171
+ }
172
+
173
+ .line.vertical {
174
+ width: 2px;
175
+ height: 12px;
176
+ }
177
+
178
+ .faq.open .line.vertical {
179
+ transform: translate(-50%, -50%) rotate(90deg);
180
+ opacity: 0;
181
+ }
182
+
183
+ /* CSS grid row trick: content stays in DOM for SEO, height animates via grid */
184
+ .body {
185
+ display: grid;
186
+ grid-template-rows: 0fr;
187
+ transition: grid-template-rows 0.3s cubic-bezier(0.65, 0, 0.35, 1);
188
+ }
189
+
190
+ .body.open {
191
+ grid-template-rows: 1fr;
192
+ }
193
+
194
+ .body-inner {
195
+ overflow: hidden;
196
+ }
197
+
198
+ .a {
199
+ padding: 0 30px 22px 0;
200
+ font-size: 15px;
201
+ line-height: 1.6;
202
+ color: var(--text-light);
203
+ opacity: 0;
204
+ transform: translateY(-6px);
205
+ transition:
206
+ opacity 0.25s ease,
207
+ transform 0.25s ease;
208
+ }
209
+
210
+ .body.open .a {
211
+ opacity: 1;
212
+ transform: translateY(0);
213
+ transition-delay: 0.08s;
214
+ }
215
+
216
+ .a :global(a) {
217
+ color: var(--link);
218
+ text-decoration: underline;
219
+ }
220
+
221
+ @media (max-width: 768px) {
222
+ .hds-faq {
223
+ flex-direction: column;
224
+ gap: 0;
225
+ }
226
+ }
227
+ </style>
@@ -0,0 +1,13 @@
1
+ interface FaqItem {
2
+ q: string;
3
+ a: string;
4
+ }
5
+ interface Props {
6
+ items: FaqItem[];
7
+ columns?: 1 | 2;
8
+ richSchema?: boolean;
9
+ toggleIconBg?: string;
10
+ }
11
+ declare const FAQ: import("svelte").Component<Props, {}, "">;
12
+ type FAQ = ReturnType<typeof FAQ>;
13
+ export default FAQ;
@@ -0,0 +1,325 @@
1
+ <script lang="ts">
2
+ import Button from '../../components/Button/Button.svelte';
3
+ import IconBoxArrowUpRight from '@hyvor/icons/IconBoxArrowUpRight';
4
+ import IconCheckCircleFill from '@hyvor/icons/IconCheckCircleFill';
5
+ import type { Snippet } from 'svelte';
6
+
7
+ type ButtonConfig = { href: string; label: string; external?: boolean };
8
+
9
+ interface Props {
10
+ eyebrow: string;
11
+ title: string | Snippet;
12
+ description: string;
13
+ bullets?: string[] | Snippet;
14
+ button?: ButtonConfig | ButtonConfig[] | null;
15
+ flip?: boolean;
16
+ altBg?: boolean;
17
+ overlap?: boolean;
18
+ interactiveBullets?: boolean;
19
+ visual: Snippet<[activeBullet: number]>;
20
+ after?: Snippet;
21
+ left?: Snippet;
22
+ max?: boolean;
23
+ }
24
+
25
+ let {
26
+ eyebrow,
27
+ title,
28
+ description,
29
+ bullets = [],
30
+ button = null,
31
+ flip = false,
32
+ altBg = false,
33
+ overlap = false,
34
+ interactiveBullets = false,
35
+ visual,
36
+ after,
37
+ left,
38
+ max = false
39
+ }: Props = $props();
40
+
41
+ let inView = $state(false);
42
+ let activeBullet = $state(0);
43
+
44
+ // how long the active bullet's progress bar takes to fill before auto-advancing
45
+ const AUTO_ADVANCE_MS = 5000;
46
+
47
+ $effect(() => {
48
+ if (!interactiveBullets || !inView) return;
49
+ if (!Array.isArray(bullets) || bullets.length <= 1) return;
50
+ activeBullet;
51
+ const count = bullets.length;
52
+ const timer = setTimeout(() => {
53
+ activeBullet = (activeBullet + 1) % count;
54
+ }, AUTO_ADVANCE_MS);
55
+ return () => clearTimeout(timer);
56
+ });
57
+
58
+ function onView(node: HTMLElement, callback: () => void) {
59
+ const observer = new IntersectionObserver(
60
+ (entries) => {
61
+ if (entries[0]?.isIntersecting) {
62
+ callback();
63
+ observer.disconnect();
64
+ }
65
+ },
66
+ { threshold: 0.25 }
67
+ );
68
+ observer.observe(node);
69
+ return {
70
+ destroy() {
71
+ observer.disconnect();
72
+ }
73
+ };
74
+ }
75
+ </script>
76
+
77
+ <section class="hds-feature-split" class:alt-bg={altBg}>
78
+ <div class={max ? 'hds-container-max split' : 'hds-container split'} class:flip class:overlap>
79
+ <div class="text-col" class:in-view={inView} use:onView={() => (inView = true)}>
80
+ {#if left}
81
+ {@render left()}
82
+ {:else}
83
+ <span class="eyebrow">{eyebrow}</span>
84
+ <h2>
85
+ {#if typeof title === 'string'}
86
+ {@html title}
87
+ {:else}
88
+ {@render title()}
89
+ {/if}
90
+ </h2>
91
+ <p>{description}</p>
92
+
93
+ {#if Array.isArray(bullets)}
94
+ {#if bullets.length}
95
+ <ul class="bullets" class:interactive={interactiveBullets}>
96
+ {#each bullets as b, i}
97
+ <li>
98
+ {#if interactiveBullets}
99
+ <button
100
+ type="button"
101
+ class="bullet-btn"
102
+ class:active={activeBullet === i}
103
+ style="animation-duration: {AUTO_ADVANCE_MS}ms"
104
+ onclick={() => (activeBullet = i)}
105
+ >
106
+ <IconCheckCircleFill size={14} />{b}
107
+ </button>
108
+ {:else}
109
+ <IconCheckCircleFill size={14} />{b}
110
+ {/if}
111
+ </li>
112
+ {/each}
113
+ </ul>
114
+ {/if}
115
+ {:else if bullets}
116
+ {@render bullets()}
117
+ {/if}
118
+
119
+ {#if button}
120
+ {@const buttons = Array.isArray(button) ? button : [button]}
121
+ <div class="buttons">
122
+ {#each buttons as b}
123
+ <Button
124
+ as="a"
125
+ href={b.href}
126
+ target={b.external ? '_blank' : undefined}
127
+ rel={b.external ? 'noopener' : undefined}
128
+ variant="outline"
129
+ size="small"
130
+ >
131
+ {b.label}
132
+ {#snippet end()}<IconBoxArrowUpRight size={11} />{/snippet}
133
+ </Button>
134
+ {/each}
135
+ </div>
136
+ {/if}
137
+ {/if}
138
+ </div>
139
+
140
+ <div class="visual-col">
141
+ {@render visual(activeBullet)}
142
+ </div>
143
+ </div>
144
+
145
+ {#if after}
146
+ <div class="hds-container-max">
147
+ {@render after()}
148
+ </div>
149
+ {/if}
150
+ </section>
151
+
152
+ <style>
153
+ .hds-feature-split {
154
+ padding: 100px 0;
155
+ overflow-x: hidden;
156
+ }
157
+
158
+ .alt-bg {
159
+ background: color-mix(in srgb, var(--accent) 10%, var(--background));
160
+ }
161
+
162
+ .split {
163
+ display: flex;
164
+ align-items: center;
165
+ gap: 72px;
166
+ }
167
+
168
+ .split.flip {
169
+ flex-direction: row-reverse;
170
+ }
171
+
172
+ .text-col,
173
+ .visual-col {
174
+ flex: 1;
175
+ min-width: 0;
176
+ }
177
+
178
+ .text-col {
179
+ opacity: 0;
180
+ transform: translateY(18px);
181
+ transition:
182
+ opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
183
+ transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
184
+ }
185
+
186
+ .text-col.in-view {
187
+ opacity: 1;
188
+ transform: none;
189
+ }
190
+ .split.overlap .text-col {
191
+ z-index: 2;
192
+ }
193
+
194
+ .eyebrow {
195
+ display: inline-block;
196
+ font-size: 12px;
197
+ font-weight: 700;
198
+ letter-spacing: 0.1em;
199
+ text-transform: uppercase;
200
+ color: var(--accent);
201
+ margin-bottom: 16px;
202
+ }
203
+
204
+ h2 {
205
+ font-size: clamp(26px, 3.5vw, 38px);
206
+ font-weight: 800;
207
+ letter-spacing: -0.02em;
208
+ line-height: 1.15;
209
+ margin: 0 0 16px;
210
+ }
211
+
212
+ p {
213
+ font-size: 16px;
214
+ line-height: 1.7;
215
+ color: var(--text-light);
216
+ margin: 0 0 28px;
217
+ max-width: 440px;
218
+ }
219
+
220
+ .bullets {
221
+ list-style: none;
222
+ margin: 0 0 32px;
223
+ padding: 0;
224
+ display: flex;
225
+ flex-direction: column;
226
+ gap: 10px;
227
+ }
228
+
229
+ .bullets li {
230
+ display: flex;
231
+ align-items: flex-start;
232
+ gap: 10px;
233
+ font-size: 1rem;
234
+ text-align: left;
235
+ }
236
+
237
+ .bullets li :global(svg) {
238
+ color: var(--accent);
239
+ flex-shrink: 0;
240
+ margin-top: 0.3em;
241
+ }
242
+
243
+ .bullet-btn {
244
+ position: relative;
245
+ display: flex;
246
+ align-items: flex-start;
247
+ gap: 10px;
248
+ width: 100%;
249
+ padding: 8px 10px;
250
+ border: none;
251
+ border-radius: 20px;
252
+ background-color: transparent;
253
+ background-image: linear-gradient(
254
+ color-mix(in srgb, var(--accent) 14%, transparent),
255
+ color-mix(in srgb, var(--accent) 14%, transparent)
256
+ );
257
+ background-repeat: no-repeat;
258
+ background-position: left center;
259
+ background-size: 0% 100%;
260
+ color: var(--text-light);
261
+ font: inherit;
262
+ font-size: 1rem;
263
+ text-align: left;
264
+ cursor: pointer;
265
+ transition:
266
+ background-color 0.2s,
267
+ color 0.2s;
268
+ }
269
+
270
+ .bullet-btn:hover {
271
+ background-color: color-mix(in srgb, var(--text) 4%, transparent);
272
+ }
273
+
274
+ .bullet-btn.active {
275
+ color: var(--text);
276
+ animation-name: bullet-fill;
277
+ animation-timing-function: linear;
278
+ animation-fill-mode: forwards;
279
+ }
280
+
281
+ @keyframes bullet-fill {
282
+ from {
283
+ background-size: 0% 100%;
284
+ }
285
+ to {
286
+ background-size: 100% 100%;
287
+ }
288
+ }
289
+
290
+ .bullets.interactive li :global(svg) {
291
+ color: var(--text-light);
292
+ }
293
+
294
+ .bullets.interactive li:has(.bullet-btn.active) :global(svg) {
295
+ color: var(--accent);
296
+ }
297
+
298
+ .buttons {
299
+ display: flex;
300
+ flex-wrap: wrap;
301
+ gap: 12px;
302
+ }
303
+
304
+ @media (max-width: 900px) {
305
+ .split,
306
+ .split.flip {
307
+ flex-direction: column;
308
+ align-items: stretch;
309
+ gap: 48px;
310
+ }
311
+
312
+ .text-col {
313
+ width: 100%;
314
+ text-align: left;
315
+ }
316
+
317
+ .visual-col {
318
+ width: 100%;
319
+ }
320
+
321
+ p {
322
+ max-width: 100%;
323
+ }
324
+ }
325
+ </style>
@@ -0,0 +1,24 @@
1
+ import type { Snippet } from 'svelte';
2
+ type ButtonConfig = {
3
+ href: string;
4
+ label: string;
5
+ external?: boolean;
6
+ };
7
+ interface Props {
8
+ eyebrow: string;
9
+ title: string | Snippet;
10
+ description: string;
11
+ bullets?: string[] | Snippet;
12
+ button?: ButtonConfig | ButtonConfig[] | null;
13
+ flip?: boolean;
14
+ altBg?: boolean;
15
+ overlap?: boolean;
16
+ interactiveBullets?: boolean;
17
+ visual: Snippet<[activeBullet: number]>;
18
+ after?: Snippet;
19
+ left?: Snippet;
20
+ max?: boolean;
21
+ }
22
+ declare const FeatureSplit: import("svelte").Component<Props, {}, "">;
23
+ type FeatureSplit = ReturnType<typeof FeatureSplit>;
24
+ export default FeatureSplit;