@nqmcreative/ui 0.1.1 → 0.2.0
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 +89 -34
- package/cli/index.mjs +67 -30
- package/dist/core/calendar.d.ts +3 -0
- package/dist/core/calendar.js +36 -0
- package/dist/core/dialog.svelte.d.ts +14 -0
- package/dist/core/dialog.svelte.js +23 -0
- package/dist/core/files.d.ts +35 -0
- package/dist/core/files.js +62 -0
- package/dist/core/index.d.ts +37 -0
- package/dist/core/index.js +35 -0
- package/dist/core/list.svelte.d.ts +41 -0
- package/dist/core/list.svelte.js +77 -0
- package/dist/core/number.d.ts +7 -0
- package/dist/core/number.js +17 -0
- package/dist/core/pagination.d.ts +6 -0
- package/dist/core/pagination.js +21 -0
- package/dist/core/password.d.ts +8 -0
- package/dist/core/password.js +23 -0
- package/dist/core/table.d.ts +22 -0
- package/dist/core/table.js +41 -0
- package/dist/core/theme.svelte.d.ts +16 -0
- package/dist/core/theme.svelte.js +34 -0
- package/dist/core/trigger.d.ts +35 -0
- package/dist/core/trigger.js +77 -0
- package/dist/index.d.ts +11 -103
- package/dist/index.js +11 -75
- package/dist/{components → styles/matte}/AccordionItem.svelte +1 -1
- package/dist/{components → styles/matte}/AccordionItem.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Alert.svelte +8 -2
- package/dist/{components → styles/matte}/Alert.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Avatar.svelte +1 -1
- package/dist/{components → styles/matte}/Avatar.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Badge.svelte +8 -3
- package/dist/{components → styles/matte}/Badge.svelte.d.ts +1 -3
- package/dist/{components → styles/matte}/Breadcrumb.svelte +2 -2
- package/dist/{components → styles/matte}/Breadcrumb.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Button.svelte +1 -1
- package/dist/{components → styles/matte}/Button.svelte.d.ts +1 -1
- package/dist/styles/matte/CTASection.svelte +76 -0
- package/dist/styles/matte/CTASection.svelte.d.ts +18 -0
- package/dist/{components → styles/matte}/Calendar.svelte +7 -17
- package/dist/{components → styles/matte}/Calendar.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Card.svelte +1 -1
- package/dist/{components → styles/matte}/Card.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Checkbox.svelte +1 -1
- package/dist/{components → styles/matte}/Checkbox.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/CheckboxGroup.svelte +1 -1
- package/dist/{components → styles/matte}/CheckboxGroup.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Combobox.svelte +31 -42
- package/dist/{components → styles/matte}/Combobox.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/CommandPalette.svelte +26 -41
- package/dist/{components → styles/matte}/CommandPalette.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/ConfirmDialog.svelte +2 -2
- package/dist/{components → styles/matte}/ConfirmDialog.svelte.d.ts +2 -2
- package/dist/{components → styles/matte}/ContextMenu.svelte +5 -7
- package/dist/{components → styles/matte}/DatePicker.svelte +7 -11
- package/dist/{components → styles/matte}/DatePicker.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Drawer.svelte +4 -7
- package/dist/{components → styles/matte}/Dropdown.svelte +18 -36
- package/dist/{components → styles/matte}/Dropdown.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Dropzone.svelte +11 -43
- package/dist/{components → styles/matte}/Dropzone.svelte.d.ts +2 -5
- package/dist/{components → styles/matte}/EmptyState.svelte +1 -1
- package/dist/{components → styles/matte}/EmptyState.svelte.d.ts +1 -1
- package/dist/styles/matte/FeatureCard.svelte +58 -0
- package/dist/styles/matte/FeatureCard.svelte.d.ts +16 -0
- package/dist/styles/matte/FeatureGrid.svelte +62 -0
- package/dist/styles/matte/FeatureGrid.svelte.d.ts +16 -0
- package/dist/{components → styles/matte}/Footer.svelte +1 -1
- package/dist/{components → styles/matte}/Footer.svelte.d.ts +1 -1
- package/dist/styles/matte/HeroSection.svelte +80 -0
- package/dist/styles/matte/HeroSection.svelte.d.ts +21 -0
- package/dist/{components → styles/matte}/Input.svelte +1 -1
- package/dist/{components → styles/matte}/Input.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Link.svelte +1 -1
- package/dist/{components → styles/matte}/Link.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/LocaleProvider.svelte +1 -1
- package/dist/{components → styles/matte}/LocaleProvider.svelte.d.ts +1 -1
- package/dist/styles/matte/LogoCloud.svelte +61 -0
- package/dist/styles/matte/LogoCloud.svelte.d.ts +19 -0
- package/dist/{components → styles/matte}/MenuItem.svelte +1 -1
- package/dist/{components → styles/matte}/MenuItem.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Modal.svelte +4 -7
- package/dist/{components → styles/matte}/MultiSelect.svelte +18 -37
- package/dist/{components → styles/matte}/MultiSelect.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Navbar.svelte +2 -2
- package/dist/{components → styles/matte}/Navbar.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/NumberInput.svelte +4 -8
- package/dist/{components → styles/matte}/NumberInput.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Pagination.svelte +4 -15
- package/dist/{components → styles/matte}/Pagination.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/PasswordInput.svelte +4 -13
- package/dist/{components → styles/matte}/PasswordInput.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Popover.svelte +16 -41
- package/dist/{components → styles/matte}/Popover.svelte.d.ts +1 -1
- package/dist/styles/matte/PricingCard.svelte +107 -0
- package/dist/styles/matte/PricingCard.svelte.d.ts +25 -0
- package/dist/{components → styles/matte}/Progress.svelte +3 -2
- package/dist/{components → styles/matte}/Progress.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Radio.svelte +1 -1
- package/dist/{components → styles/matte}/Radio.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/RadioGroup.svelte +1 -1
- package/dist/{components → styles/matte}/RadioGroup.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/SegmentedControl.svelte +1 -1
- package/dist/{components → styles/matte}/SegmentedControl.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Select.svelte +1 -1
- package/dist/{components → styles/matte}/Select.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Sidebar.svelte +2 -2
- package/dist/{components → styles/matte}/Sidebar.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Slider.svelte +3 -2
- package/dist/{components → styles/matte}/Slider.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Spinner.svelte +2 -2
- package/dist/{components → styles/matte}/Spinner.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Stat.svelte +1 -1
- package/dist/{components → styles/matte}/Stat.svelte.d.ts +1 -1
- package/dist/styles/matte/StatsBand.svelte +57 -0
- package/dist/styles/matte/StatsBand.svelte.d.ts +20 -0
- package/dist/{components → styles/matte}/Steps.svelte +1 -1
- package/dist/{components → styles/matte}/Steps.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Switch.svelte +1 -1
- package/dist/{components → styles/matte}/Switch.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/Table.svelte +6 -28
- package/dist/{components → styles/matte}/Table.svelte.d.ts +2 -6
- package/dist/{components → styles/matte}/Tabs.svelte +8 -1
- package/dist/{components → styles/matte}/Tabs.svelte.d.ts +1 -1
- package/dist/styles/matte/Testimonial.svelte +67 -0
- package/dist/styles/matte/Testimonial.svelte.d.ts +19 -0
- package/dist/{components → styles/matte}/Textarea.svelte +1 -1
- package/dist/{components → styles/matte}/Textarea.svelte.d.ts +1 -1
- package/dist/{components → styles/matte}/ThemeToggle.svelte +14 -27
- package/dist/{components → styles/matte}/ThemeToggle.svelte.d.ts +2 -6
- package/dist/{components → styles/matte}/Toaster.svelte +4 -4
- package/dist/styles/matte/index.d.ts +109 -0
- package/dist/styles/matte/index.js +83 -0
- package/dist/styles/paper/Accordion.svelte +17 -0
- package/dist/styles/paper/Accordion.svelte.d.ts +8 -0
- package/dist/styles/paper/AccordionItem.svelte +46 -0
- package/dist/styles/paper/AccordionItem.svelte.d.ts +14 -0
- package/dist/styles/paper/Alert.svelte +99 -0
- package/dist/styles/paper/Alert.svelte.d.ts +18 -0
- package/dist/styles/paper/Avatar.svelte +60 -0
- package/dist/styles/paper/Avatar.svelte.d.ts +16 -0
- package/dist/styles/paper/AvatarGroup.svelte +17 -0
- package/dist/styles/paper/AvatarGroup.svelte.d.ts +8 -0
- package/dist/styles/paper/Badge.svelte +58 -0
- package/dist/styles/paper/Badge.svelte.d.ts +16 -0
- package/dist/styles/paper/Breadcrumb.svelte +49 -0
- package/dist/styles/paper/Breadcrumb.svelte.d.ts +14 -0
- package/dist/styles/paper/Button.svelte +96 -0
- package/dist/styles/paper/Button.svelte.d.ts +21 -0
- package/dist/styles/paper/CTASection.svelte +76 -0
- package/dist/styles/paper/CTASection.svelte.d.ts +18 -0
- package/dist/styles/paper/Calendar.svelte +202 -0
- package/dist/styles/paper/Calendar.svelte.d.ts +22 -0
- package/dist/styles/paper/Card.svelte +78 -0
- package/dist/styles/paper/Card.svelte.d.ts +21 -0
- package/dist/styles/paper/Checkbox.svelte +75 -0
- package/dist/styles/paper/Checkbox.svelte.d.ts +15 -0
- package/dist/styles/paper/CheckboxGroup.svelte +111 -0
- package/dist/styles/paper/CheckboxGroup.svelte.d.ts +30 -0
- package/dist/styles/paper/Combobox.svelte +266 -0
- package/dist/styles/paper/Combobox.svelte.d.ts +29 -0
- package/dist/styles/paper/CommandPalette.svelte +209 -0
- package/dist/styles/paper/CommandPalette.svelte.d.ts +32 -0
- package/dist/styles/paper/ConfirmDialog.svelte +97 -0
- package/dist/styles/paper/ConfirmDialog.svelte.d.ts +22 -0
- package/dist/styles/paper/ContextMenu.svelte +88 -0
- package/dist/styles/paper/ContextMenu.svelte.d.ts +15 -0
- package/dist/styles/paper/DatePicker.svelte +192 -0
- package/dist/styles/paper/DatePicker.svelte.d.ts +23 -0
- package/dist/styles/paper/Divider.svelte +30 -0
- package/dist/styles/paper/Divider.svelte.d.ts +10 -0
- package/dist/styles/paper/Drawer.svelte +165 -0
- package/dist/styles/paper/Drawer.svelte.d.ts +20 -0
- package/dist/styles/paper/Dropdown.svelte +94 -0
- package/dist/styles/paper/Dropdown.svelte.d.ts +23 -0
- package/dist/styles/paper/Dropzone.svelte +210 -0
- package/dist/styles/paper/Dropzone.svelte.d.ts +29 -0
- package/dist/styles/paper/EmptyState.svelte +71 -0
- package/dist/styles/paper/EmptyState.svelte.d.ts +18 -0
- package/dist/styles/paper/FeatureCard.svelte +58 -0
- package/dist/styles/paper/FeatureCard.svelte.d.ts +16 -0
- package/dist/styles/paper/FeatureGrid.svelte +62 -0
- package/dist/styles/paper/FeatureGrid.svelte.d.ts +16 -0
- package/dist/styles/paper/Field.svelte +42 -0
- package/dist/styles/paper/Field.svelte.d.ts +16 -0
- package/dist/styles/paper/Footer.svelte +91 -0
- package/dist/styles/paper/Footer.svelte.d.ts +25 -0
- package/dist/styles/paper/HeroSection.svelte +86 -0
- package/dist/styles/paper/HeroSection.svelte.d.ts +21 -0
- package/dist/styles/paper/Input.svelte +60 -0
- package/dist/styles/paper/Input.svelte.d.ts +18 -0
- package/dist/styles/paper/InputGroup.svelte +20 -0
- package/dist/styles/paper/InputGroup.svelte.d.ts +11 -0
- package/dist/styles/paper/Kbd.svelte +17 -0
- package/dist/styles/paper/Kbd.svelte.d.ts +8 -0
- package/dist/styles/paper/Label.svelte +16 -0
- package/dist/styles/paper/Label.svelte.d.ts +9 -0
- package/dist/styles/paper/Link.svelte +44 -0
- package/dist/styles/paper/Link.svelte.d.ts +16 -0
- package/dist/styles/paper/LocaleProvider.svelte +24 -0
- package/dist/styles/paper/LocaleProvider.svelte.d.ts +10 -0
- package/dist/styles/paper/LogoCloud.svelte +61 -0
- package/dist/styles/paper/LogoCloud.svelte.d.ts +19 -0
- package/dist/styles/paper/MenuItem.svelte +64 -0
- package/dist/styles/paper/MenuItem.svelte.d.ts +18 -0
- package/dist/styles/paper/MenuSeparator.svelte +22 -0
- package/dist/styles/paper/MenuSeparator.svelte.d.ts +8 -0
- package/dist/styles/paper/Modal.svelte +118 -0
- package/dist/styles/paper/Modal.svelte.d.ts +21 -0
- package/dist/styles/paper/MultiSelect.svelte +287 -0
- package/dist/styles/paper/MultiSelect.svelte.d.ts +31 -0
- package/dist/styles/paper/Navbar.svelte +201 -0
- package/dist/styles/paper/Navbar.svelte.d.ts +33 -0
- package/dist/styles/paper/NumberInput.svelte +96 -0
- package/dist/styles/paper/NumberInput.svelte.d.ts +15 -0
- package/dist/styles/paper/Pagination.svelte +83 -0
- package/dist/styles/paper/Pagination.svelte.d.ts +15 -0
- package/dist/styles/paper/PasswordInput.svelte +100 -0
- package/dist/styles/paper/PasswordInput.svelte.d.ts +12 -0
- package/dist/styles/paper/Popover.svelte +89 -0
- package/dist/styles/paper/Popover.svelte.d.ts +19 -0
- package/dist/styles/paper/PricingCard.svelte +108 -0
- package/dist/styles/paper/PricingCard.svelte.d.ts +25 -0
- package/dist/styles/paper/Progress.svelte +59 -0
- package/dist/styles/paper/Progress.svelte.d.ts +17 -0
- package/dist/styles/paper/Radio.svelte +55 -0
- package/dist/styles/paper/Radio.svelte.d.ts +15 -0
- package/dist/styles/paper/RadioGroup.svelte +95 -0
- package/dist/styles/paper/RadioGroup.svelte.d.ts +27 -0
- package/dist/styles/paper/SegmentedControl.svelte +88 -0
- package/dist/styles/paper/SegmentedControl.svelte.d.ts +25 -0
- package/dist/styles/paper/Select.svelte +61 -0
- package/dist/styles/paper/Select.svelte.d.ts +20 -0
- package/dist/styles/paper/Sidebar.svelte +206 -0
- package/dist/styles/paper/Sidebar.svelte.d.ts +36 -0
- package/dist/styles/paper/Skeleton.svelte +46 -0
- package/dist/styles/paper/Skeleton.svelte.d.ts +13 -0
- package/dist/styles/paper/Slider.svelte +80 -0
- package/dist/styles/paper/Slider.svelte.d.ts +19 -0
- package/dist/styles/paper/Spinner.svelte +34 -0
- package/dist/styles/paper/Spinner.svelte.d.ts +13 -0
- package/dist/styles/paper/Stat.svelte +51 -0
- package/dist/styles/paper/Stat.svelte.d.ts +16 -0
- package/dist/styles/paper/StatsBand.svelte +63 -0
- package/dist/styles/paper/StatsBand.svelte.d.ts +20 -0
- package/dist/styles/paper/Steps.svelte +141 -0
- package/dist/styles/paper/Steps.svelte.d.ts +24 -0
- package/dist/styles/paper/Switch.svelte +64 -0
- package/dist/styles/paper/Switch.svelte.d.ts +14 -0
- package/dist/styles/paper/Table.svelte +217 -0
- package/dist/styles/paper/Table.svelte.d.ts +66 -0
- package/dist/styles/paper/Tabs.svelte +102 -0
- package/dist/styles/paper/Tabs.svelte.d.ts +23 -0
- package/dist/styles/paper/Testimonial.svelte +64 -0
- package/dist/styles/paper/Testimonial.svelte.d.ts +19 -0
- package/dist/styles/paper/Textarea.svelte +54 -0
- package/dist/styles/paper/Textarea.svelte.d.ts +12 -0
- package/dist/styles/paper/ThemeToggle.svelte +130 -0
- package/dist/styles/paper/ThemeToggle.svelte.d.ts +16 -0
- package/dist/styles/paper/Toaster.svelte +132 -0
- package/dist/styles/paper/Toaster.svelte.d.ts +8 -0
- package/dist/styles/paper/Tooltip.svelte +33 -0
- package/dist/styles/paper/Tooltip.svelte.d.ts +12 -0
- package/dist/styles/paper/fonts.css +46 -0
- package/dist/styles/paper/index.d.ts +109 -0
- package/dist/styles/paper/index.js +83 -0
- package/dist/styles/paper/theme.css +222 -0
- package/package.json +531 -201
- package/registry.json +658 -339
- /package/dist/{actions → core/actions}/anchor.d.ts +0 -0
- /package/dist/{actions → core/actions}/anchor.js +0 -0
- /package/dist/{actions → core/actions}/dismissable.d.ts +0 -0
- /package/dist/{actions → core/actions}/dismissable.js +0 -0
- /package/dist/{date.d.ts → core/date.d.ts} +0 -0
- /package/dist/{date.js → core/date.js} +0 -0
- /package/dist/{locale.svelte.d.ts → core/locale.svelte.d.ts} +0 -0
- /package/dist/{locale.svelte.js → core/locale.svelte.js} +0 -0
- /package/dist/{toast.svelte.d.ts → core/toast.svelte.d.ts} +0 -0
- /package/dist/{toast.svelte.js → core/toast.svelte.js} +0 -0
- /package/dist/{tones.d.ts → core/tones.d.ts} +0 -0
- /package/dist/{tones.js → core/tones.js} +0 -0
- /package/dist/{components → styles/matte}/Accordion.svelte +0 -0
- /package/dist/{components → styles/matte}/Accordion.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/AvatarGroup.svelte +0 -0
- /package/dist/{components → styles/matte}/AvatarGroup.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/ContextMenu.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/Divider.svelte +0 -0
- /package/dist/{components → styles/matte}/Divider.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/Drawer.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/Field.svelte +0 -0
- /package/dist/{components → styles/matte}/Field.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/InputGroup.svelte +0 -0
- /package/dist/{components → styles/matte}/InputGroup.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/Kbd.svelte +0 -0
- /package/dist/{components → styles/matte}/Kbd.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/Label.svelte +0 -0
- /package/dist/{components → styles/matte}/Label.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/MenuSeparator.svelte +0 -0
- /package/dist/{components → styles/matte}/MenuSeparator.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/Modal.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/Skeleton.svelte +0 -0
- /package/dist/{components → styles/matte}/Skeleton.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/Toaster.svelte.d.ts +0 -0
- /package/dist/{components → styles/matte}/Tooltip.svelte +0 -0
- /package/dist/{components → styles/matte}/Tooltip.svelte.d.ts +0 -0
- /package/dist/{fonts.css → styles/matte/fonts.css} +0 -0
- /package/dist/{theme.css → styles/matte/theme.css} +0 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
import Avatar from './Avatar.svelte';
|
|
5
|
+
import { toneBorderLeft, toneSurface, type Tone } from '../../core/tones.js';
|
|
6
|
+
|
|
7
|
+
export type TestimonialVariant = 'plain' | 'card' | 'accent';
|
|
8
|
+
|
|
9
|
+
interface Props extends HTMLAttributes<HTMLElement> {
|
|
10
|
+
quote: string;
|
|
11
|
+
author: string;
|
|
12
|
+
role?: string;
|
|
13
|
+
/** Avatar image. Falls back to the author's initials. */
|
|
14
|
+
avatar?: string;
|
|
15
|
+
tone?: Tone;
|
|
16
|
+
variant?: TestimonialVariant;
|
|
17
|
+
/** Bigger type, for a single pull quote. */
|
|
18
|
+
large?: boolean;
|
|
19
|
+
children?: Snippet;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let {
|
|
23
|
+
quote,
|
|
24
|
+
author,
|
|
25
|
+
role,
|
|
26
|
+
avatar,
|
|
27
|
+
tone = 'brand',
|
|
28
|
+
variant = 'plain',
|
|
29
|
+
large = false,
|
|
30
|
+
class: className = '',
|
|
31
|
+
children,
|
|
32
|
+
...rest
|
|
33
|
+
}: Props = $props();
|
|
34
|
+
|
|
35
|
+
const variants = $derived({
|
|
36
|
+
plain: '',
|
|
37
|
+
card: 'rounded-lg border border-hairline bg-bg p-6 shadow-xs',
|
|
38
|
+
accent: `rounded-lg ${toneSurface[tone]} border-l-4 ${toneBorderLeft[tone]} p-6`
|
|
39
|
+
});
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<figure class="flex flex-col gap-5 {variants[variant]} {className}" {...rest}>
|
|
43
|
+
<blockquote
|
|
44
|
+
class="font-sans leading-relaxed text-pretty text-text-secondary {large
|
|
45
|
+
? 'text-xl leading-relaxed sm:text-2xl'
|
|
46
|
+
: ''}"
|
|
47
|
+
>
|
|
48
|
+
“{quote}”
|
|
49
|
+
</blockquote>
|
|
50
|
+
|
|
51
|
+
{#if children}
|
|
52
|
+
{@render children()}
|
|
53
|
+
{/if}
|
|
54
|
+
|
|
55
|
+
<figcaption class="flex items-center gap-3">
|
|
56
|
+
<Avatar src={avatar} name={author} size="sm" {tone} />
|
|
57
|
+
<div class="flex min-w-0 flex-col">
|
|
58
|
+
<span class="font-sans text-sm font-semibold text-text">{author}</span>
|
|
59
|
+
{#if role}
|
|
60
|
+
<span class="font-sans text-[13px] text-text-muted">{role}</span>
|
|
61
|
+
{/if}
|
|
62
|
+
</div>
|
|
63
|
+
</figcaption>
|
|
64
|
+
</figure>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
import { type Tone } from '../../core/tones.js';
|
|
4
|
+
export type TestimonialVariant = 'plain' | 'card' | 'accent';
|
|
5
|
+
interface Props extends HTMLAttributes<HTMLElement> {
|
|
6
|
+
quote: string;
|
|
7
|
+
author: string;
|
|
8
|
+
role?: string;
|
|
9
|
+
/** Avatar image. Falls back to the author's initials. */
|
|
10
|
+
avatar?: string;
|
|
11
|
+
tone?: Tone;
|
|
12
|
+
variant?: TestimonialVariant;
|
|
13
|
+
/** Bigger type, for a single pull quote. */
|
|
14
|
+
large?: boolean;
|
|
15
|
+
children?: Snippet;
|
|
16
|
+
}
|
|
17
|
+
declare const Testimonial: import("svelte").Component<Props, {}, "">;
|
|
18
|
+
type Testimonial = ReturnType<typeof Testimonial>;
|
|
19
|
+
export default Testimonial;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { HTMLTextareaAttributes } from 'svelte/elements';
|
|
3
|
+
import { toneFocusBorder, type Tone } from '../../core/tones.js';
|
|
4
|
+
|
|
5
|
+
interface Props extends HTMLTextareaAttributes {
|
|
6
|
+
value?: string;
|
|
7
|
+
tone?: Tone;
|
|
8
|
+
invalid?: boolean;
|
|
9
|
+
/** Grow with the content instead of showing a scrollbar. */
|
|
10
|
+
autoresize?: boolean;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
let {
|
|
14
|
+
value = $bindable(''),
|
|
15
|
+
tone = 'brand',
|
|
16
|
+
invalid = false,
|
|
17
|
+
autoresize = false,
|
|
18
|
+
rows = 4,
|
|
19
|
+
class: className = '',
|
|
20
|
+
...rest
|
|
21
|
+
}: Props = $props();
|
|
22
|
+
|
|
23
|
+
/** Grows the field to fit its content on input, and once on mount. */
|
|
24
|
+
function autosize(node: HTMLTextAreaElement, enabled: boolean) {
|
|
25
|
+
let on = enabled;
|
|
26
|
+
const resize = () => {
|
|
27
|
+
if (!on) return;
|
|
28
|
+
node.style.height = 'auto';
|
|
29
|
+
node.style.height = `${node.scrollHeight}px`;
|
|
30
|
+
};
|
|
31
|
+
resize();
|
|
32
|
+
node.addEventListener('input', resize);
|
|
33
|
+
return {
|
|
34
|
+
update(next: boolean) {
|
|
35
|
+
on = next;
|
|
36
|
+
if (on) resize();
|
|
37
|
+
else node.style.height = '';
|
|
38
|
+
},
|
|
39
|
+
destroy() {
|
|
40
|
+
node.removeEventListener('input', resize);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<textarea
|
|
47
|
+
use:autosize={autoresize}
|
|
48
|
+
bind:value
|
|
49
|
+
{rows}
|
|
50
|
+
aria-invalid={invalid ? 'true' : undefined}
|
|
51
|
+
class="w-full rounded-md border bg-bg px-3 py-2 font-sans text-sm text-text shadow-xs transition-colors duration-150 ease-brand-out placeholder:text-text-muted focus:outline-none disabled:pointer-events-none disabled:opacity-50
|
|
52
|
+
{autoresize ? 'resize-none overflow-hidden' : 'resize-y'}
|
|
53
|
+
{invalid ? 'border-danger' : `border-hairline-strong ${toneFocusBorder[tone]}`} {className}"
|
|
54
|
+
{...rest}></textarea>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { HTMLTextareaAttributes } from 'svelte/elements';
|
|
2
|
+
import { type Tone } from '../../core/tones.js';
|
|
3
|
+
interface Props extends HTMLTextareaAttributes {
|
|
4
|
+
value?: string;
|
|
5
|
+
tone?: Tone;
|
|
6
|
+
invalid?: boolean;
|
|
7
|
+
/** Grow with the content instead of showing a scrollbar. */
|
|
8
|
+
autoresize?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const Textarea: import("svelte").Component<Props, {}, "value">;
|
|
11
|
+
type Textarea = ReturnType<typeof Textarea>;
|
|
12
|
+
export default Textarea;
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// Choosing a theme is style-agnostic: every style reads the same two classes
|
|
3
|
+
// off <html>, so `applyTheme`, `storedTheme` and `Theme` live in core and
|
|
4
|
+
// are re-exported by the style barrel — not by this component.
|
|
5
|
+
import { focusRing, toneRing, type Tone } from '../../core/tones.js';
|
|
6
|
+
import {
|
|
7
|
+
applyTheme,
|
|
8
|
+
nextTheme,
|
|
9
|
+
persistTheme,
|
|
10
|
+
storedTheme,
|
|
11
|
+
type Theme
|
|
12
|
+
} from '../../core/theme.svelte.js';
|
|
13
|
+
import { useLocale } from '../../core/locale.svelte.js';
|
|
14
|
+
|
|
15
|
+
interface Props {
|
|
16
|
+
/** Bindable. `'system'` follows the OS until the visitor chooses. */
|
|
17
|
+
theme?: Theme;
|
|
18
|
+
/** `'button'` cycles light → dark → system; `'segmented'` shows all three. */
|
|
19
|
+
variant?: 'button' | 'segmented';
|
|
20
|
+
tone?: Tone;
|
|
21
|
+
/** Remember the choice in `localStorage`. Default true. */
|
|
22
|
+
persist?: boolean;
|
|
23
|
+
onchange?: (theme: Theme) => void;
|
|
24
|
+
class?: string;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
let {
|
|
28
|
+
theme = $bindable(storedTheme()),
|
|
29
|
+
variant = 'button',
|
|
30
|
+
tone = 'neutral',
|
|
31
|
+
persist = true,
|
|
32
|
+
onchange,
|
|
33
|
+
class: className = ''
|
|
34
|
+
}: Props = $props();
|
|
35
|
+
|
|
36
|
+
const t = useLocale();
|
|
37
|
+
|
|
38
|
+
$effect(() => {
|
|
39
|
+
applyTheme(theme);
|
|
40
|
+
if (persist) persistTheme(theme);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
function set(next: Theme) {
|
|
44
|
+
theme = next;
|
|
45
|
+
onchange?.(next);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function cycle() {
|
|
49
|
+
set(nextTheme(theme));
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const options = $derived([
|
|
53
|
+
{ value: 'light' as Theme, label: t.current.lightMode },
|
|
54
|
+
{ value: 'dark' as Theme, label: t.current.darkMode },
|
|
55
|
+
{ value: 'system' as Theme, label: 'Auto' }
|
|
56
|
+
]);
|
|
57
|
+
</script>
|
|
58
|
+
|
|
59
|
+
{#snippet glyph(which: Theme)}
|
|
60
|
+
{#if which === 'light'}
|
|
61
|
+
<svg class="size-4" viewBox="0 0 20 20" fill="none" aria-hidden="true">
|
|
62
|
+
<circle cx="10" cy="10" r="3.5" stroke="currentColor" stroke-width="1.5" />
|
|
63
|
+
<path
|
|
64
|
+
d="M10 2v2M10 16v2M2 10h2M16 10h2M4.5 4.5 6 6M14 14l1.5 1.5M15.5 4.5 14 6M6 14l-1.5 1.5"
|
|
65
|
+
stroke="currentColor"
|
|
66
|
+
stroke-width="1.5"
|
|
67
|
+
stroke-linecap="round"
|
|
68
|
+
/>
|
|
69
|
+
</svg>
|
|
70
|
+
{:else if which === 'dark'}
|
|
71
|
+
<svg class="size-4" viewBox="0 0 20 20" fill="none" aria-hidden="true">
|
|
72
|
+
<path
|
|
73
|
+
d="M16 12.3A6.8 6.8 0 0 1 7.7 4a6.8 6.8 0 1 0 8.3 8.3Z"
|
|
74
|
+
stroke="currentColor"
|
|
75
|
+
stroke-width="1.5"
|
|
76
|
+
stroke-linejoin="round"
|
|
77
|
+
/>
|
|
78
|
+
</svg>
|
|
79
|
+
{:else}
|
|
80
|
+
<svg class="size-4" viewBox="0 0 20 20" fill="none" aria-hidden="true">
|
|
81
|
+
<rect
|
|
82
|
+
x="2.5"
|
|
83
|
+
y="4"
|
|
84
|
+
width="15"
|
|
85
|
+
height="10"
|
|
86
|
+
rx="1.5"
|
|
87
|
+
stroke="currentColor"
|
|
88
|
+
stroke-width="1.5"
|
|
89
|
+
/>
|
|
90
|
+
<path d="M7 17h6" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
|
91
|
+
</svg>
|
|
92
|
+
{/if}
|
|
93
|
+
{/snippet}
|
|
94
|
+
|
|
95
|
+
{#if variant === 'segmented'}
|
|
96
|
+
<div
|
|
97
|
+
role="radiogroup"
|
|
98
|
+
aria-label={t.current.toggleTheme}
|
|
99
|
+
class="inline-flex items-center gap-1 rounded-lg border border-hairline bg-bg-inset p-1 {className}"
|
|
100
|
+
>
|
|
101
|
+
{#each options as option (option.value)}
|
|
102
|
+
<button
|
|
103
|
+
type="button"
|
|
104
|
+
role="radio"
|
|
105
|
+
aria-checked={theme === option.value}
|
|
106
|
+
aria-label={option.label}
|
|
107
|
+
onclick={() => set(option.value)}
|
|
108
|
+
class="inline-flex h-8 items-center gap-1.5 rounded-md px-2.5 font-sans text-[13px] font-medium transition-all duration-150 ease-brand-out {focusRing} {toneRing[
|
|
109
|
+
tone
|
|
110
|
+
]}
|
|
111
|
+
{theme === option.value ? 'bg-bg text-text shadow-xs' : 'text-text-muted hover:text-text'}"
|
|
112
|
+
>
|
|
113
|
+
{@render glyph(option.value)}
|
|
114
|
+
<span class="hidden sm:inline">{option.label}</span>
|
|
115
|
+
</button>
|
|
116
|
+
{/each}
|
|
117
|
+
</div>
|
|
118
|
+
{:else}
|
|
119
|
+
<button
|
|
120
|
+
type="button"
|
|
121
|
+
onclick={cycle}
|
|
122
|
+
aria-label="{t.current.toggleTheme} ({theme})"
|
|
123
|
+
title={t.current.toggleTheme}
|
|
124
|
+
class="inline-flex size-9 items-center justify-center rounded-md border border-hairline bg-bg text-text-secondary shadow-xs transition-colors duration-150 ease-brand-out hover:bg-bg-alt hover:text-text {focusRing} {toneRing[
|
|
125
|
+
tone
|
|
126
|
+
]} {className}"
|
|
127
|
+
>
|
|
128
|
+
{@render glyph(theme)}
|
|
129
|
+
</button>
|
|
130
|
+
{/if}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Tone } from '../../core/tones.js';
|
|
2
|
+
import { type Theme } from '../../core/theme.svelte.js';
|
|
3
|
+
interface Props {
|
|
4
|
+
/** Bindable. `'system'` follows the OS until the visitor chooses. */
|
|
5
|
+
theme?: Theme;
|
|
6
|
+
/** `'button'` cycles light → dark → system; `'segmented'` shows all three. */
|
|
7
|
+
variant?: 'button' | 'segmented';
|
|
8
|
+
tone?: Tone;
|
|
9
|
+
/** Remember the choice in `localStorage`. Default true. */
|
|
10
|
+
persist?: boolean;
|
|
11
|
+
onchange?: (theme: Theme) => void;
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const ThemeToggle: import("svelte").Component<Props, {}, "theme">;
|
|
15
|
+
type ThemeToggle = ReturnType<typeof ThemeToggle>;
|
|
16
|
+
export default ThemeToggle;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { flip } from 'svelte/animate';
|
|
3
|
+
import { fly } from 'svelte/transition';
|
|
4
|
+
import { portal } from '../../core/actions/dismissable.js';
|
|
5
|
+
import { toast } from '../../core/toast.svelte.js';
|
|
6
|
+
import { toneText } from '../../core/tones.js';
|
|
7
|
+
import Spinner from './Spinner.svelte';
|
|
8
|
+
import { useLocale } from '../../core/locale.svelte.js';
|
|
9
|
+
|
|
10
|
+
export type ToasterPosition =
|
|
11
|
+
'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
12
|
+
|
|
13
|
+
interface Props {
|
|
14
|
+
position?: ToasterPosition;
|
|
15
|
+
class?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let { position = 'bottom-right', class: className = '' }: Props = $props();
|
|
19
|
+
|
|
20
|
+
const t = useLocale();
|
|
21
|
+
|
|
22
|
+
const positions: Record<ToasterPosition, string> = {
|
|
23
|
+
'top-left': 'top-4 left-4 items-start',
|
|
24
|
+
'top-center': 'top-4 left-1/2 -translate-x-1/2 items-center',
|
|
25
|
+
'top-right': 'top-4 right-4 items-end',
|
|
26
|
+
'bottom-left': 'bottom-4 left-4 items-start',
|
|
27
|
+
'bottom-center': 'bottom-4 left-1/2 -translate-x-1/2 items-center',
|
|
28
|
+
'bottom-right': 'bottom-4 right-4 items-end'
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const fromTop = $derived(position.startsWith('top'));
|
|
32
|
+
const fromLeft = $derived(position.endsWith('left'));
|
|
33
|
+
const fromCenter = $derived(position.endsWith('center'));
|
|
34
|
+
|
|
35
|
+
const enter = $derived(
|
|
36
|
+
fromCenter ? { y: fromTop ? -16 : 16, x: 0 } : { x: fromLeft ? -16 : 16, y: 0 }
|
|
37
|
+
);
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<div
|
|
41
|
+
use:portal
|
|
42
|
+
aria-live="polite"
|
|
43
|
+
aria-label={t.current.notifications}
|
|
44
|
+
class="pointer-events-none fixed z-[100] flex w-[min(24rem,calc(100vw-2rem))] flex-col gap-2.5 {positions[
|
|
45
|
+
position
|
|
46
|
+
]} {fromTop ? '' : 'flex-col-reverse'} {className}"
|
|
47
|
+
>
|
|
48
|
+
{#each toast.items as item (item.id)}
|
|
49
|
+
<!--
|
|
50
|
+
paper puts every toast on the same neutral card and lets the glyph
|
|
51
|
+
carry the tone. matte tints the whole surface; here the tinted block
|
|
52
|
+
would fight the page underneath.
|
|
53
|
+
-->
|
|
54
|
+
<div
|
|
55
|
+
animate:flip={{ duration: 200 }}
|
|
56
|
+
in:fly={{ ...enter, duration: 220 }}
|
|
57
|
+
out:fly={{ ...enter, duration: 160 }}
|
|
58
|
+
role={item.tone === 'danger' ? 'alert' : 'status'}
|
|
59
|
+
class="pointer-events-auto flex w-full items-start gap-3 rounded-lg border border-hairline bg-bg p-3.5 font-sans shadow-lg"
|
|
60
|
+
>
|
|
61
|
+
<span class="mt-0.5 shrink-0 {toneText[item.tone]}">
|
|
62
|
+
{#if item.loading}
|
|
63
|
+
<Spinner size="sm" label="" />
|
|
64
|
+
{:else if item.tone === 'success'}
|
|
65
|
+
<svg class="size-4" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
66
|
+
<circle cx="8" cy="8" r="6.5" stroke="currentColor" stroke-width="1.5" />
|
|
67
|
+
<path
|
|
68
|
+
d="m5 8.2 2.2 2.2L11 6"
|
|
69
|
+
stroke="currentColor"
|
|
70
|
+
stroke-width="1.6"
|
|
71
|
+
stroke-linecap="round"
|
|
72
|
+
stroke-linejoin="round"
|
|
73
|
+
/>
|
|
74
|
+
</svg>
|
|
75
|
+
{:else if item.tone === 'danger'}
|
|
76
|
+
<svg class="size-4" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
77
|
+
<circle cx="8" cy="8" r="6.5" stroke="currentColor" stroke-width="1.5" />
|
|
78
|
+
<path
|
|
79
|
+
d="m5.75 5.75 4.5 4.5M10.25 5.75l-4.5 4.5"
|
|
80
|
+
stroke="currentColor"
|
|
81
|
+
stroke-width="1.6"
|
|
82
|
+
stroke-linecap="round"
|
|
83
|
+
/>
|
|
84
|
+
</svg>
|
|
85
|
+
{:else}
|
|
86
|
+
<svg class="size-4" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
87
|
+
<circle cx="8" cy="8" r="6.5" stroke="currentColor" stroke-width="1.5" />
|
|
88
|
+
<path d="M8 4.75v4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
|
89
|
+
<circle cx="8" cy="11.25" r="0.85" fill="currentColor" />
|
|
90
|
+
</svg>
|
|
91
|
+
{/if}
|
|
92
|
+
</span>
|
|
93
|
+
|
|
94
|
+
<div class="flex min-w-0 flex-1 flex-col gap-1">
|
|
95
|
+
<p class="text-sm leading-snug font-semibold text-text">{item.title}</p>
|
|
96
|
+
{#if item.description}
|
|
97
|
+
<p class="text-[13px] leading-relaxed text-text-secondary">{item.description}</p>
|
|
98
|
+
{/if}
|
|
99
|
+
{#if item.action}
|
|
100
|
+
<button
|
|
101
|
+
type="button"
|
|
102
|
+
onclick={() => {
|
|
103
|
+
item.action?.onclick();
|
|
104
|
+
toast.dismiss(item.id);
|
|
105
|
+
}}
|
|
106
|
+
class="mt-1 self-start rounded font-sans text-[13px] font-semibold underline underline-offset-2 {toneText[
|
|
107
|
+
item.tone
|
|
108
|
+
]}"
|
|
109
|
+
>
|
|
110
|
+
{item.action.label}
|
|
111
|
+
</button>
|
|
112
|
+
{/if}
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
<button
|
|
116
|
+
type="button"
|
|
117
|
+
onclick={() => toast.dismiss(item.id)}
|
|
118
|
+
aria-label={t.current.dismiss}
|
|
119
|
+
class="-m-1 shrink-0 rounded p-1 text-text-muted transition-colors duration-150 hover:bg-bg-inset hover:text-text focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-current"
|
|
120
|
+
>
|
|
121
|
+
<svg class="size-3.5" viewBox="0 0 14 14" fill="none" aria-hidden="true">
|
|
122
|
+
<path
|
|
123
|
+
d="m2 2 10 10M12 2 2 12"
|
|
124
|
+
stroke="currentColor"
|
|
125
|
+
stroke-width="1.6"
|
|
126
|
+
stroke-linecap="round"
|
|
127
|
+
/>
|
|
128
|
+
</svg>
|
|
129
|
+
</button>
|
|
130
|
+
</div>
|
|
131
|
+
{/each}
|
|
132
|
+
</div>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type ToasterPosition = 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
2
|
+
interface Props {
|
|
3
|
+
position?: ToasterPosition;
|
|
4
|
+
class?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const Toaster: import("svelte").Component<Props, {}, "">;
|
|
7
|
+
type Toaster = ReturnType<typeof Toaster>;
|
|
8
|
+
export default Toaster;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
|
|
5
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
6
|
+
|
|
7
|
+
interface Props extends HTMLAttributes<HTMLSpanElement> {
|
|
8
|
+
/** Tooltip text. CSS-only: shows on hover and on keyboard focus. */
|
|
9
|
+
content: string;
|
|
10
|
+
placement?: TooltipPlacement;
|
|
11
|
+
children: Snippet;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
let { content, placement = 'top', class: className = '', children, ...rest }: Props = $props();
|
|
15
|
+
|
|
16
|
+
const placements: Record<TooltipPlacement, string> = {
|
|
17
|
+
top: 'bottom-full left-1/2 mb-1.5 -translate-x-1/2',
|
|
18
|
+
bottom: 'top-full left-1/2 mt-1.5 -translate-x-1/2',
|
|
19
|
+
left: 'right-full top-1/2 mr-1.5 -translate-y-1/2',
|
|
20
|
+
right: 'left-full top-1/2 ml-1.5 -translate-y-1/2'
|
|
21
|
+
};
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<span class="group/tt relative inline-flex" {...rest}>
|
|
25
|
+
{@render children()}
|
|
26
|
+
<span
|
|
27
|
+
role="tooltip"
|
|
28
|
+
class="pointer-events-none invisible absolute z-50 rounded-md bg-text px-2 py-1 font-sans text-xs font-medium whitespace-nowrap text-text-inverse opacity-0 shadow-lg transition-opacity duration-150 ease-brand-out group-focus-within/tt:visible group-focus-within/tt:opacity-100 group-hover/tt:visible group-hover/tt:opacity-100
|
|
29
|
+
{placements[placement]} {className}"
|
|
30
|
+
>
|
|
31
|
+
{content}
|
|
32
|
+
</span>
|
|
33
|
+
</span>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
3
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
4
|
+
interface Props extends HTMLAttributes<HTMLSpanElement> {
|
|
5
|
+
/** Tooltip text. CSS-only: shows on hover and on keyboard focus. */
|
|
6
|
+
content: string;
|
|
7
|
+
placement?: TooltipPlacement;
|
|
8
|
+
children: Snippet;
|
|
9
|
+
}
|
|
10
|
+
declare const Tooltip: import("svelte").Component<Props, {}, "">;
|
|
11
|
+
type Tooltip = ReturnType<typeof Tooltip>;
|
|
12
|
+
export default Tooltip;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Optional: Plus Jakarta Sans, the face paper is designed around. Import this
|
|
3
|
+
* only if your project doesn't already self-host or load it another way —
|
|
4
|
+
* without it the tokens fall back to the system stack, which works but reads
|
|
5
|
+
* harder and colder.
|
|
6
|
+
*
|
|
7
|
+
* These are plain `@font-face` rules rather than an `@import` of the Google
|
|
8
|
+
* stylesheet on purpose: `@import` is only valid before every other rule, so a
|
|
9
|
+
* bundler silently drops it when this file is imported after `tailwindcss` —
|
|
10
|
+
* the fonts then fall back with no error anywhere. `@font-face` works wherever
|
|
11
|
+
* you put it, and it skips the CSS-to-CSS round trip before the font files
|
|
12
|
+
* start downloading.
|
|
13
|
+
*
|
|
14
|
+
* Two rules rather than matte's eight: this is a variable font, so one file per
|
|
15
|
+
* subset covers every weight from 400 to 700. Latin and Latin Extended only —
|
|
16
|
+
* around 49 kB in total. Add
|
|
17
|
+
* `<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>` to
|
|
18
|
+
* your document head to open the connection earlier.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/* latin */
|
|
22
|
+
@font-face {
|
|
23
|
+
font-family: 'Plus Jakarta Sans';
|
|
24
|
+
font-style: normal;
|
|
25
|
+
font-weight: 400 700;
|
|
26
|
+
font-display: swap;
|
|
27
|
+
src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2)
|
|
28
|
+
format('woff2');
|
|
29
|
+
unicode-range:
|
|
30
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
31
|
+
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/* latin-ext */
|
|
35
|
+
@font-face {
|
|
36
|
+
font-family: 'Plus Jakarta Sans';
|
|
37
|
+
font-style: normal;
|
|
38
|
+
font-weight: 400 700;
|
|
39
|
+
font-display: swap;
|
|
40
|
+
src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2)
|
|
41
|
+
format('woff2');
|
|
42
|
+
unicode-range:
|
|
43
|
+
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
44
|
+
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
45
|
+
U+A720-A7FF;
|
|
46
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Paper — The neutral one. Start here if unsure: soft corners, light shadows, generous spacing, and nothing that fights the content.
|
|
3
|
+
*
|
|
4
|
+
* Generated by `bun run index`. Behaviour comes from
|
|
5
|
+
* `@nqmcreative/ui/core`, re-exported below so this one import covers
|
|
6
|
+
* the whole style.
|
|
7
|
+
*/
|
|
8
|
+
export { TONES, focusRing, peerFocusRing, toneBorder, toneBorderLeft, toneBorderSoft, toneFill, toneFocusBorder, toneFocusWithinBorder, toneHoverBorder, toneHoverText, tonePeerChecked, tonePeerFocus, toneRing, toneSoft, toneSoftHover, toneSolid, toneSolidHover, toneSurface, toneText, anchored, clickOutside, focusTrap, focusable, navigateList, portal, toast, locale, setLocale, provideLocale, useLocale, enUS, idID, LocaleStore, applyTheme, storedTheme, toISO, fromISO, today, isSameDay, addDays, addMonths, monthGrid, weekdayNames, monthLabel, isOutOfRange, formatISO, parseFormatted } from '../../core/index.js';
|
|
9
|
+
export type { Tone, Placement, AnchorOptions, ClickOutsideOptions, FocusTrapOptions, Toast, ToastOptions, ToastAction, Locale, Theme, DateFormat, TableSort, SortDirection, RejectedFile } from '../../core/index.js';
|
|
10
|
+
export { default as LocaleProvider } from './LocaleProvider.svelte';
|
|
11
|
+
export { default as Button } from './Button.svelte';
|
|
12
|
+
export type { ButtonVariant, ButtonSize } from './Button.svelte';
|
|
13
|
+
export { default as Link } from './Link.svelte';
|
|
14
|
+
export { default as Input } from './Input.svelte';
|
|
15
|
+
export type { InputSize } from './Input.svelte';
|
|
16
|
+
export { default as Textarea } from './Textarea.svelte';
|
|
17
|
+
export { default as Select } from './Select.svelte';
|
|
18
|
+
export type { SelectOption } from './Select.svelte';
|
|
19
|
+
export { default as Checkbox } from './Checkbox.svelte';
|
|
20
|
+
export { default as Radio } from './Radio.svelte';
|
|
21
|
+
export { default as Switch } from './Switch.svelte';
|
|
22
|
+
export type { SwitchSize } from './Switch.svelte';
|
|
23
|
+
export { default as Field } from './Field.svelte';
|
|
24
|
+
export { default as Label } from './Label.svelte';
|
|
25
|
+
export { default as PasswordInput } from './PasswordInput.svelte';
|
|
26
|
+
export { default as NumberInput } from './NumberInput.svelte';
|
|
27
|
+
export { default as Slider } from './Slider.svelte';
|
|
28
|
+
export { default as RadioGroup } from './RadioGroup.svelte';
|
|
29
|
+
export type { RadioOption } from './RadioGroup.svelte';
|
|
30
|
+
export { default as CheckboxGroup } from './CheckboxGroup.svelte';
|
|
31
|
+
export type { CheckboxOption } from './CheckboxGroup.svelte';
|
|
32
|
+
export { default as SegmentedControl } from './SegmentedControl.svelte';
|
|
33
|
+
export type { SegmentOption, SegmentedSize } from './SegmentedControl.svelte';
|
|
34
|
+
export { default as InputGroup } from './InputGroup.svelte';
|
|
35
|
+
export { default as Combobox } from './Combobox.svelte';
|
|
36
|
+
export type { ComboboxOption } from './Combobox.svelte';
|
|
37
|
+
export { default as MultiSelect } from './MultiSelect.svelte';
|
|
38
|
+
export type { MultiSelectOption } from './MultiSelect.svelte';
|
|
39
|
+
export { default as DatePicker } from './DatePicker.svelte';
|
|
40
|
+
export { default as Calendar } from './Calendar.svelte';
|
|
41
|
+
export { default as Dropzone } from './Dropzone.svelte';
|
|
42
|
+
export { default as Badge } from './Badge.svelte';
|
|
43
|
+
export type { BadgeVariant, BadgeSize } from './Badge.svelte';
|
|
44
|
+
export { default as Avatar } from './Avatar.svelte';
|
|
45
|
+
export type { AvatarSize } from './Avatar.svelte';
|
|
46
|
+
export { default as AvatarGroup } from './AvatarGroup.svelte';
|
|
47
|
+
export { default as Card } from './Card.svelte';
|
|
48
|
+
export type { CardVariant } from './Card.svelte';
|
|
49
|
+
export { default as Stat } from './Stat.svelte';
|
|
50
|
+
export type { StatTrend } from './Stat.svelte';
|
|
51
|
+
export { default as Table } from './Table.svelte';
|
|
52
|
+
export type { TableColumn } from './Table.svelte';
|
|
53
|
+
export { default as Kbd } from './Kbd.svelte';
|
|
54
|
+
export { default as Alert } from './Alert.svelte';
|
|
55
|
+
export type { AlertVariant } from './Alert.svelte';
|
|
56
|
+
export { default as Progress } from './Progress.svelte';
|
|
57
|
+
export type { ProgressSize } from './Progress.svelte';
|
|
58
|
+
export { default as Spinner } from './Spinner.svelte';
|
|
59
|
+
export type { SpinnerSize } from './Spinner.svelte';
|
|
60
|
+
export { default as Skeleton } from './Skeleton.svelte';
|
|
61
|
+
export type { SkeletonVariant } from './Skeleton.svelte';
|
|
62
|
+
export { default as EmptyState } from './EmptyState.svelte';
|
|
63
|
+
export { default as Toaster } from './Toaster.svelte';
|
|
64
|
+
export type { ToasterPosition } from './Toaster.svelte';
|
|
65
|
+
export { default as Divider } from './Divider.svelte';
|
|
66
|
+
export type { DividerOrientation } from './Divider.svelte';
|
|
67
|
+
export { default as Tabs } from './Tabs.svelte';
|
|
68
|
+
export type { TabItem, TabsVariant } from './Tabs.svelte';
|
|
69
|
+
export { default as Accordion } from './Accordion.svelte';
|
|
70
|
+
export { default as AccordionItem } from './AccordionItem.svelte';
|
|
71
|
+
export { default as Breadcrumb } from './Breadcrumb.svelte';
|
|
72
|
+
export type { BreadcrumbItem } from './Breadcrumb.svelte';
|
|
73
|
+
export { default as Pagination } from './Pagination.svelte';
|
|
74
|
+
export { default as Steps } from './Steps.svelte';
|
|
75
|
+
export type { StepItem } from './Steps.svelte';
|
|
76
|
+
export { default as Navbar } from './Navbar.svelte';
|
|
77
|
+
export type { NavItem } from './Navbar.svelte';
|
|
78
|
+
export { default as Sidebar } from './Sidebar.svelte';
|
|
79
|
+
export type { SidebarItem, SidebarSection } from './Sidebar.svelte';
|
|
80
|
+
export { default as Footer } from './Footer.svelte';
|
|
81
|
+
export type { FooterLink, FooterColumn } from './Footer.svelte';
|
|
82
|
+
export { default as HeroSection } from './HeroSection.svelte';
|
|
83
|
+
export { default as FeatureGrid } from './FeatureGrid.svelte';
|
|
84
|
+
export type { FeatureColumns } from './FeatureGrid.svelte';
|
|
85
|
+
export { default as FeatureCard } from './FeatureCard.svelte';
|
|
86
|
+
export { default as PricingCard } from './PricingCard.svelte';
|
|
87
|
+
export { default as Testimonial } from './Testimonial.svelte';
|
|
88
|
+
export type { TestimonialVariant } from './Testimonial.svelte';
|
|
89
|
+
export { default as LogoCloud } from './LogoCloud.svelte';
|
|
90
|
+
export type { Logo } from './LogoCloud.svelte';
|
|
91
|
+
export { default as CTASection } from './CTASection.svelte';
|
|
92
|
+
export type { CTAVariant } from './CTASection.svelte';
|
|
93
|
+
export { default as StatsBand } from './StatsBand.svelte';
|
|
94
|
+
export type { BandStat } from './StatsBand.svelte';
|
|
95
|
+
export { default as Modal } from './Modal.svelte';
|
|
96
|
+
export type { ModalSize } from './Modal.svelte';
|
|
97
|
+
export { default as Drawer } from './Drawer.svelte';
|
|
98
|
+
export type { DrawerSide, DrawerSize } from './Drawer.svelte';
|
|
99
|
+
export { default as ConfirmDialog } from './ConfirmDialog.svelte';
|
|
100
|
+
export { default as CommandPalette } from './CommandPalette.svelte';
|
|
101
|
+
export type { CommandItem } from './CommandPalette.svelte';
|
|
102
|
+
export { default as ContextMenu } from './ContextMenu.svelte';
|
|
103
|
+
export { default as Dropdown } from './Dropdown.svelte';
|
|
104
|
+
export { default as MenuItem } from './MenuItem.svelte';
|
|
105
|
+
export { default as MenuSeparator } from './MenuSeparator.svelte';
|
|
106
|
+
export { default as Popover } from './Popover.svelte';
|
|
107
|
+
export { default as ThemeToggle } from './ThemeToggle.svelte';
|
|
108
|
+
export { default as Tooltip } from './Tooltip.svelte';
|
|
109
|
+
export type { TooltipPlacement } from './Tooltip.svelte';
|