@hyvor/design 2.1.8-beta.5 → 2.1.9

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 (64) hide show
  1. package/dist/cloud/HyvorBar/BarNotice/BarNotice.svelte +1 -1
  2. package/dist/cloud/HyvorBar/BarSupport.svelte +1 -1
  3. package/dist/cloud/HyvorBar/Organization/BarOrganization.svelte +1 -1
  4. package/dist/components/Avatar/Avatar.svelte +50 -4
  5. package/dist/components/Avatar/Avatar.svelte.d.ts +4 -1
  6. package/dist/components/Avatar/AvatarStack.svelte +6 -3
  7. package/dist/components/ButtonGroup/ButtonGroup.svelte +82 -0
  8. package/dist/components/{Button → ButtonGroup}/ButtonGroup.svelte.d.ts +1 -0
  9. package/dist/components/Modal/ConfirmModalProvider.svelte +6 -9
  10. package/dist/components/Modal/ModalFooter.svelte +24 -27
  11. package/dist/components/Toast/ToastMessage.svelte +3 -6
  12. package/dist/components/Toast/ToastProvider.svelte +8 -4
  13. package/dist/components/Tooltip/Tooltip.svelte +54 -28
  14. package/dist/components/Tooltip/Tooltip.svelte.d.ts +15 -35
  15. package/dist/components/index.d.ts +1 -1
  16. package/dist/components/index.js +1 -1
  17. package/dist/index.css +4 -1
  18. package/dist/marketing/Docs/Docs.svelte +2 -2
  19. package/dist/marketing/Footer/Footer.svelte +98 -402
  20. package/dist/marketing/Footer/Footer.svelte.d.ts +2 -18
  21. package/dist/marketing/Footer/FooterLinkList.svelte +3 -10
  22. package/dist/marketing/Header/Header.svelte +28 -72
  23. package/dist/marketing/Header/Header.svelte.d.ts +2 -5
  24. package/dist/marketing/index.d.ts +0 -18
  25. package/dist/marketing/index.js +0 -17
  26. package/dist/marketing/social.d.ts +1 -1
  27. package/dist/marketing/social.js +1 -1
  28. package/package.json +1 -1
  29. package/dist/components/Button/ButtonGroup.svelte +0 -18
  30. package/dist/marketing/AllFeaturesAccordion/AllFeaturesAccordion.svelte +0 -251
  31. package/dist/marketing/AllFeaturesAccordion/AllFeaturesAccordion.svelte.d.ts +0 -23
  32. package/dist/marketing/AllFeaturesAccordion/AllFeaturesAccordionFeature.svelte +0 -75
  33. package/dist/marketing/AllFeaturesAccordion/AllFeaturesAccordionFeature.svelte.d.ts +0 -10
  34. package/dist/marketing/FAQ/FAQ.svelte +0 -233
  35. package/dist/marketing/FAQ/FAQ.svelte.d.ts +0 -13
  36. package/dist/marketing/FeatureSplit/FeatureSplit.svelte +0 -325
  37. package/dist/marketing/FeatureSplit/FeatureSplit.svelte.d.ts +0 -24
  38. package/dist/marketing/FullTrialSignup/FullTrialSignup.svelte +0 -164
  39. package/dist/marketing/FullTrialSignup/FullTrialSignup.svelte.d.ts +0 -18
  40. package/dist/marketing/Header/HeaderLanguageToggle.svelte +0 -121
  41. package/dist/marketing/Header/HeaderLanguageToggle.svelte.d.ts +0 -14
  42. package/dist/marketing/Header/HeaderNavLink.svelte +0 -148
  43. package/dist/marketing/Header/HeaderNavLink.svelte.d.ts +0 -17
  44. package/dist/marketing/Header/language.d.ts +0 -18
  45. package/dist/marketing/Header/language.js +0 -35
  46. package/dist/marketing/Hero/Hero.svelte +0 -353
  47. package/dist/marketing/Hero/Hero.svelte.d.ts +0 -16
  48. package/dist/marketing/LogoStrip/LogoStrip.svelte +0 -204
  49. package/dist/marketing/LogoStrip/LogoStrip.svelte.d.ts +0 -19
  50. package/dist/marketing/Seal/CcpaSeal.svelte +0 -29
  51. package/dist/marketing/Seal/CcpaSeal.svelte.d.ts +0 -6
  52. package/dist/marketing/Seal/GdprSeal.svelte +0 -60
  53. package/dist/marketing/Seal/GdprSeal.svelte.d.ts +0 -6
  54. package/dist/marketing/Seal/IsoSeal.svelte +0 -44
  55. package/dist/marketing/Seal/IsoSeal.svelte.d.ts +0 -6
  56. package/dist/marketing/Seal/Seal.svelte +0 -62
  57. package/dist/marketing/Seal/Seal.svelte.d.ts +0 -8
  58. package/dist/marketing/Seal/SsoSeal.svelte +0 -31
  59. package/dist/marketing/Seal/SsoSeal.svelte.d.ts +0 -6
  60. package/dist/marketing/Seal/ccpa.svg +0 -131
  61. package/dist/marketing/SpotlightSplit/SpotlightSplit.svelte +0 -256
  62. package/dist/marketing/SpotlightSplit/SpotlightSplit.svelte.d.ts +0 -19
  63. package/dist/marketing/Testimonials/Testimonials.svelte +0 -382
  64. package/dist/marketing/Testimonials/Testimonials.svelte.d.ts +0 -23
@@ -1,164 +0,0 @@
1
- <script lang="ts">
2
- import Button from '../../components/Button/Button.svelte';
3
- import IconCheckCircleFill from '@hyvor/icons/IconCheckCircleFill';
4
-
5
- type ButtonConfig = { href: string; label: string; external?: boolean };
6
-
7
- interface Props {
8
- badge?: string | null;
9
- title?: string;
10
- description?: string;
11
- button?: ButtonConfig | ButtonConfig[] | null;
12
- checks?: string[];
13
- accentColor?: string;
14
- accentColorDark?: string;
15
- [key: string]: any;
16
- }
17
-
18
- let {
19
- badge = null,
20
- title = 'Start your trial today',
21
- description = '',
22
- button = null,
23
- checks = ['14-day free trial', 'No credit card required', 'Cancel anytime'],
24
- accentColor,
25
- accentColorDark,
26
- ...rest
27
- }: Props = $props();
28
-
29
- const buttons = $derived(button ? (Array.isArray(button) ? button : [button]) : []);
30
- </script>
31
-
32
- <section
33
- class="hds-full-trial-signup"
34
- style:--fts-accent={accentColor}
35
- style:--fts-accent-dark={accentColorDark}
36
- {...rest}
37
- >
38
- <div class="hds-container inner">
39
- {#if badge}
40
- <div class="badge">{badge}</div>
41
- {/if}
42
-
43
- <h2>{title}</h2>
44
-
45
- {#if description}
46
- <p>{description}</p>
47
- {/if}
48
-
49
- {#if buttons.length}
50
- <div class="cta-actions">
51
- {#each buttons as b}
52
- <Button
53
- as="a"
54
- size="large"
55
- href={b.href}
56
- target={b.external ? '_blank' : undefined}
57
- rel={b.external ? 'noopener' : undefined}
58
- >
59
- {b.label}
60
- </Button>
61
- {/each}
62
- </div>
63
- {/if}
64
-
65
- {#if checks.length}
66
- <div class="checks">
67
- {#each checks as check}
68
- <div class="check">
69
- <IconCheckCircleFill size={15} />
70
- {check}
71
- </div>
72
- {/each}
73
- </div>
74
- {/if}
75
- </div>
76
- </section>
77
-
78
- <style>
79
- .hds-full-trial-signup {
80
- --fts-accent-resolved: var(--fts-accent, var(--accent));
81
- padding: 96px 0 138px;
82
- background: linear-gradient(
83
- to bottom,
84
- var(--background, var(--box-background)),
85
- color-mix(in srgb, var(--fts-accent-resolved) 40%, var(--background, var(--box-background)))
86
- );
87
- text-align: center;
88
- }
89
-
90
- :global(:root.dark) .hds-full-trial-signup {
91
- --fts-accent-resolved: var(--fts-accent-dark, var(--fts-accent, var(--accent)));
92
- }
93
-
94
- .inner {
95
- width: 600px;
96
- max-width: 100%;
97
- }
98
-
99
- .badge {
100
- display: inline-flex;
101
- padding: 4px 14px;
102
- border-radius: 100px;
103
- font-size: 13px;
104
- font-weight: 600;
105
- background: color-mix(in srgb, var(--fts-accent-resolved) 12%, transparent);
106
- color: var(--fts-accent-resolved);
107
- border: 1px solid color-mix(in srgb, var(--fts-accent-resolved) 25%, transparent);
108
- margin-bottom: 24px;
109
- }
110
-
111
- h2 {
112
- font-size: clamp(28px, 4vw, 40px);
113
- font-weight: 800;
114
- margin: 0 0 12px;
115
- letter-spacing: -0.02em;
116
- font-family: var(--font-serif);
117
- }
118
-
119
- p {
120
- font-size: 1rem;
121
- color: var(--text-light);
122
- margin: 0 0 32px;
123
- }
124
-
125
- .cta-actions {
126
- display: flex;
127
- justify-content: center;
128
- flex-wrap: wrap;
129
- gap: 12px;
130
- margin: 0 0 24px;
131
- }
132
-
133
- .checks {
134
- display: flex;
135
- align-items: center;
136
- justify-content: center;
137
- gap: 20px;
138
- flex-wrap: wrap;
139
- margin-top: 24px;
140
- }
141
-
142
- .check {
143
- display: flex;
144
- align-items: center;
145
- gap: 6px;
146
- font-size: 14px;
147
- color: var(--text-light);
148
- }
149
-
150
- .check :global(svg) {
151
- color: var(--fts-accent-resolved);
152
- }
153
-
154
- @media (max-width: 600px) {
155
- .checks {
156
- flex-direction: column;
157
- align-items: flex-start;
158
- width: fit-content;
159
- max-width: 100%;
160
- margin: 24px auto 0;
161
- gap: 10px;
162
- }
163
- }
164
- </style>
@@ -1,18 +0,0 @@
1
- type ButtonConfig = {
2
- href: string;
3
- label: string;
4
- external?: boolean;
5
- };
6
- interface Props {
7
- badge?: string | null;
8
- title?: string;
9
- description?: string;
10
- button?: ButtonConfig | ButtonConfig[] | null;
11
- checks?: string[];
12
- accentColor?: string;
13
- accentColorDark?: string;
14
- [key: string]: any;
15
- }
16
- declare const FullTrialSignup: import("svelte").Component<Props, {}, "">;
17
- type FullTrialSignup = ReturnType<typeof FullTrialSignup>;
18
- export default FullTrialSignup;
@@ -1,121 +0,0 @@
1
- <script lang="ts">
2
- import Dropdown from '../../components/Dropdown/Dropdown.svelte';
3
- import HeaderNavLink from './HeaderNavLink.svelte';
4
- import type {
5
- DropdownAlign,
6
- DropdownPosition
7
- } from '../../components/Dropdown/dropdown.types.js';
8
- import type { LanguageOption } from './language.js';
9
-
10
- interface Props {
11
- languages: LanguageOption[];
12
- current: string;
13
- href: (code: string) => string;
14
- showName?: boolean;
15
- align?: DropdownAlign;
16
- position?: DropdownPosition;
17
- label?: string;
18
- }
19
-
20
- let {
21
- languages,
22
- current,
23
- href,
24
- showName = false,
25
- align = 'center',
26
- position = 'bottom',
27
- label = 'Change language'
28
- }: Props = $props();
29
-
30
- const currentLanguage = $derived(languages.find((l) => l.code === current) ?? languages[0]);
31
-
32
- let show = $state(false);
33
-
34
- // close the dropdown once a language link inside it is clicked
35
- function closeOnLinkClick(e: MouseEvent) {
36
- const target = e.target as HTMLElement;
37
- if (target.tagName === 'A' || target.closest('a')) {
38
- show = false;
39
- }
40
- }
41
- </script>
42
-
43
- {#if currentLanguage}
44
- <div class="header-language-toggle">
45
- <Dropdown bind:show {align} {position} contentPadding={8}>
46
- {#snippet trigger()}
47
- <HeaderNavLink aria-label={label} aria-expanded={show}>
48
- <span class="flag">{currentLanguage.flag}</span>
49
- {#if showName}{currentLanguage.name}{/if}
50
- </HeaderNavLink>
51
- {/snippet}
52
- {#snippet content()}
53
- <!-- svelte-ignore a11y_click_events_have_key_events, a11y_no_static_element_interactions -->
54
- <div class="menu" onclick={closeOnLinkClick}>
55
- {#each languages as language (language.code)}
56
- <HeaderNavLink
57
- href={href(language.code)}
58
- active={language.code === current}
59
- data-lang={language.code}
60
- menu
61
- >
62
- <span class="lang-row">
63
- <span class="flag">{language.flag}</span>
64
- <span class="name">{language.name}</span>
65
- <span class="code">{language.code.toUpperCase()}</span>
66
- </span>
67
- </HeaderNavLink>
68
- {/each}
69
- </div>
70
- {/snippet}
71
- </Dropdown>
72
- </div>
73
- {/if}
74
-
75
- <style>
76
- .header-language-toggle {
77
- position: relative;
78
- display: inline-flex;
79
- margin-left: 12px;
80
- padding-left: 12px;
81
- }
82
-
83
- /* a short divider, centered on the toggle, separating it from nav links,
84
- rather than a full-height border-left */
85
- .header-language-toggle::before {
86
- content: '';
87
- position: absolute;
88
- left: 0;
89
- top: 50%;
90
- transform: translateY(-50%);
91
- width: 1px;
92
- height: 16px;
93
- background: var(--border);
94
- }
95
-
96
- .flag {
97
- font-size: 15px;
98
- line-height: 1;
99
- }
100
-
101
- .menu {
102
- display: flex;
103
- flex-direction: column;
104
- gap: 2px;
105
- }
106
-
107
- .lang-row {
108
- display: flex;
109
- align-items: center;
110
- gap: 8px;
111
- width: 100%;
112
- }
113
-
114
- .code {
115
- margin-left: auto;
116
- padding-left: 8px;
117
- font-size: 11px;
118
- font-weight: 600;
119
- color: var(--text-light);
120
- }
121
- </style>
@@ -1,14 +0,0 @@
1
- import type { DropdownAlign, DropdownPosition } from '../../components/Dropdown/dropdown.types.js';
2
- import type { LanguageOption } from './language.js';
3
- interface Props {
4
- languages: LanguageOption[];
5
- current: string;
6
- href: (code: string) => string;
7
- showName?: boolean;
8
- align?: DropdownAlign;
9
- position?: DropdownPosition;
10
- label?: string;
11
- }
12
- declare const HeaderLanguageToggle: import("svelte").Component<Props, {}, "">;
13
- type HeaderLanguageToggle = ReturnType<typeof HeaderLanguageToggle>;
14
- export default HeaderLanguageToggle;
@@ -1,148 +0,0 @@
1
- <script lang="ts">
2
- import type { Snippet } from 'svelte';
3
-
4
- interface Props {
5
- href?: string;
6
- active?: boolean;
7
- menu?: boolean;
8
- target?: string;
9
- rel?: string;
10
- start?: Snippet;
11
- children?: Snippet;
12
- end?: Snippet;
13
- description?: Snippet;
14
- onclick?: (event: MouseEvent) => void;
15
- [key: string]: unknown;
16
- }
17
-
18
- let {
19
- href,
20
- active = false,
21
- menu = false,
22
- target,
23
- rel,
24
- start,
25
- children,
26
- end,
27
- description,
28
- onclick,
29
- ...rest
30
- }: Props = $props();
31
- </script>
32
-
33
- <svelte:element
34
- this={href ? 'a' : 'span'}
35
- {href}
36
- {target}
37
- {rel}
38
- {onclick}
39
- role={href ? undefined : 'button'}
40
- tabindex={href ? undefined : 0}
41
- class="header-nav-link"
42
- class:active
43
- class:menu={menu || !!description}
44
- class:rich={!!description}
45
- {...rest}
46
- >
47
- {#if description}
48
- {#if start}
49
- <span class="icon-box">{@render start()}</span>
50
- {/if}
51
- <span class="text-stack">
52
- <span class="title">{@render children?.()}</span>
53
- <span class="desc">{@render description()}</span>
54
- </span>
55
- {:else}
56
- {#if start}
57
- <span class="start">{@render start()}</span>
58
- {/if}
59
- {@render children?.()}
60
- {#if end}
61
- <span class="end">{@render end()}</span>
62
- {/if}
63
- {/if}
64
- </svelte:element>
65
-
66
- <style>
67
- .header-nav-link {
68
- display: inline-flex;
69
- align-items: center;
70
- gap: 6px;
71
- padding: 6px 16px;
72
- border-radius: 20px;
73
- font-size: 13px;
74
- font-weight: 500;
75
- color: var(--text-light);
76
- text-decoration: none;
77
- white-space: nowrap;
78
- cursor: pointer;
79
- user-select: none;
80
- transition:
81
- 0.15s background-color,
82
- 0.15s color;
83
- }
84
-
85
- .header-nav-link:hover {
86
- background: var(--hover, var(--accent-lightest));
87
- color: var(--text);
88
- }
89
-
90
- .header-nav-link.active {
91
- background: var(--accent-light);
92
- color: var(--text);
93
- }
94
-
95
- .header-nav-link.menu {
96
- width: 100%;
97
- padding: 8px 10px;
98
- border-radius: 12px;
99
- }
100
-
101
- .start,
102
- .end {
103
- display: inline-flex;
104
- align-items: center;
105
- }
106
-
107
- /* icon + title + description layout, see `description` above */
108
- .header-nav-link.rich {
109
- align-items: flex-start;
110
- gap: 10px;
111
- white-space: normal;
112
- }
113
-
114
- .icon-box {
115
- flex: none;
116
- display: inline-flex;
117
- align-items: center;
118
- justify-content: center;
119
- width: 30px;
120
- height: 30px;
121
- border-radius: 8px;
122
- background: var(--accent-light);
123
- color: var(--accent);
124
- }
125
-
126
- .header-nav-link.rich.active .icon-box {
127
- background: var(--background);
128
- }
129
-
130
- .text-stack {
131
- display: flex;
132
- flex-direction: column;
133
- gap: 1px;
134
- padding-top: 1px;
135
- }
136
-
137
- .title {
138
- font-size: 13px;
139
- font-weight: 600;
140
- color: var(--text);
141
- }
142
-
143
- .desc {
144
- font-size: 12px;
145
- font-weight: 400;
146
- color: var(--text-light);
147
- }
148
- </style>
@@ -1,17 +0,0 @@
1
- import type { Snippet } from 'svelte';
2
- interface Props {
3
- href?: string;
4
- active?: boolean;
5
- menu?: boolean;
6
- target?: string;
7
- rel?: string;
8
- start?: Snippet;
9
- children?: Snippet;
10
- end?: Snippet;
11
- description?: Snippet;
12
- onclick?: (event: MouseEvent) => void;
13
- [key: string]: unknown;
14
- }
15
- declare const HeaderNavLink: import("svelte").Component<Props, {}, "">;
16
- type HeaderNavLink = ReturnType<typeof HeaderNavLink>;
17
- export default HeaderNavLink;
@@ -1,18 +0,0 @@
1
- export interface LanguageOption {
2
- /** language/locale code, e.g. "en", "fr" */
3
- code: string;
4
- /** an emoji flag shown next to the name */
5
- flag: string;
6
- name: string;
7
- }
8
- /**
9
- * Rewrites `path` (the current pathname) from `currentLang` to `targetLang`,
10
- * for the common convention where the default language is served without a
11
- * prefix and every other language is served under `/{code}`.
12
- *
13
- * @example
14
- * buildLocalizedUrl('/pricing', 'en', 'fr', 'en') // '/fr/pricing'
15
- * buildLocalizedUrl('/fr/pricing', 'fr', 'en', 'en') // '/pricing'
16
- * buildLocalizedUrl('/fr', 'fr', 'en', 'en') // '/'
17
- */
18
- export declare function buildLocalizedUrl(path: string, currentLang: string, targetLang: string, defaultLang: string): string;
@@ -1,35 +0,0 @@
1
- // Shared helpers for marketing sites that serve translated pages on their own
2
- // URLs (e.g. a SvelteKit `[[lang]]` route param) rather than switching
3
- // language client-side on one page. This is a different case from
4
- // `InternationalizationService`/`LanguageToggle` in
5
- // `$lib/components/Internationalization`, which swap translated strings in
6
- // place on a single page; use that instead if you don't have per-language
7
- // routes.
8
- /**
9
- * Rewrites `path` (the current pathname) from `currentLang` to `targetLang`,
10
- * for the common convention where the default language is served without a
11
- * prefix and every other language is served under `/{code}`.
12
- *
13
- * @example
14
- * buildLocalizedUrl('/pricing', 'en', 'fr', 'en') // '/fr/pricing'
15
- * buildLocalizedUrl('/fr/pricing', 'fr', 'en', 'en') // '/pricing'
16
- * buildLocalizedUrl('/fr', 'fr', 'en', 'en') // '/'
17
- */
18
- export function buildLocalizedUrl(path, currentLang, targetLang, defaultLang) {
19
- let basePath = path;
20
- // strip the current language prefix, if any, to get the language-agnostic path
21
- if (currentLang !== defaultLang) {
22
- const prefix = `/${currentLang}`;
23
- if (basePath === prefix) {
24
- basePath = '/';
25
- }
26
- else if (basePath.startsWith(`${prefix}/`)) {
27
- basePath = basePath.slice(prefix.length);
28
- }
29
- }
30
- // the default language is served without a prefix
31
- if (targetLang === defaultLang) {
32
- return basePath;
33
- }
34
- return basePath === '/' ? `/${targetLang}` : `/${targetLang}${basePath}`;
35
- }