@nqmcreative/ui 0.2.0 → 0.2.2
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 +7 -5
- package/cli/index.mjs +16 -3
- package/dist/styles/matte/index.d.ts +1 -1
- package/dist/styles/sprout/Accordion.svelte +17 -0
- package/dist/styles/sprout/Accordion.svelte.d.ts +8 -0
- package/dist/styles/sprout/AccordionItem.svelte +46 -0
- package/dist/styles/sprout/AccordionItem.svelte.d.ts +14 -0
- package/dist/styles/sprout/Alert.svelte +100 -0
- package/dist/styles/sprout/Alert.svelte.d.ts +18 -0
- package/dist/styles/sprout/Avatar.svelte +60 -0
- package/dist/styles/sprout/Avatar.svelte.d.ts +16 -0
- package/dist/styles/sprout/AvatarGroup.svelte +17 -0
- package/dist/styles/sprout/AvatarGroup.svelte.d.ts +8 -0
- package/dist/styles/sprout/Badge.svelte +58 -0
- package/dist/styles/sprout/Badge.svelte.d.ts +16 -0
- package/dist/styles/sprout/Breadcrumb.svelte +49 -0
- package/dist/styles/sprout/Breadcrumb.svelte.d.ts +14 -0
- package/dist/styles/sprout/Button.svelte +105 -0
- package/dist/styles/sprout/Button.svelte.d.ts +21 -0
- package/dist/styles/sprout/CTASection.svelte +77 -0
- package/dist/styles/sprout/CTASection.svelte.d.ts +18 -0
- package/dist/styles/sprout/Calendar.svelte +202 -0
- package/dist/styles/sprout/Calendar.svelte.d.ts +22 -0
- package/dist/styles/sprout/Card.svelte +82 -0
- package/dist/styles/sprout/Card.svelte.d.ts +21 -0
- package/dist/styles/sprout/Checkbox.svelte +76 -0
- package/dist/styles/sprout/Checkbox.svelte.d.ts +15 -0
- package/dist/styles/sprout/CheckboxGroup.svelte +112 -0
- package/dist/styles/sprout/CheckboxGroup.svelte.d.ts +30 -0
- package/dist/styles/sprout/Combobox.svelte +267 -0
- package/dist/styles/sprout/Combobox.svelte.d.ts +29 -0
- package/dist/styles/sprout/CommandPalette.svelte +210 -0
- package/dist/styles/sprout/CommandPalette.svelte.d.ts +32 -0
- package/dist/styles/sprout/ConfirmDialog.svelte +97 -0
- package/dist/styles/sprout/ConfirmDialog.svelte.d.ts +22 -0
- package/dist/styles/sprout/ContextMenu.svelte +89 -0
- package/dist/styles/sprout/ContextMenu.svelte.d.ts +15 -0
- package/dist/styles/sprout/DatePicker.svelte +193 -0
- package/dist/styles/sprout/DatePicker.svelte.d.ts +23 -0
- package/dist/styles/sprout/Divider.svelte +30 -0
- package/dist/styles/sprout/Divider.svelte.d.ts +10 -0
- package/dist/styles/sprout/Drawer.svelte +166 -0
- package/dist/styles/sprout/Drawer.svelte.d.ts +20 -0
- package/dist/styles/sprout/Dropdown.svelte +95 -0
- package/dist/styles/sprout/Dropdown.svelte.d.ts +23 -0
- package/dist/styles/sprout/Dropzone.svelte +211 -0
- package/dist/styles/sprout/Dropzone.svelte.d.ts +29 -0
- package/dist/styles/sprout/EmptyState.svelte +71 -0
- package/dist/styles/sprout/EmptyState.svelte.d.ts +18 -0
- package/dist/styles/sprout/FeatureCard.svelte +61 -0
- package/dist/styles/sprout/FeatureCard.svelte.d.ts +16 -0
- package/dist/styles/sprout/FeatureGrid.svelte +62 -0
- package/dist/styles/sprout/FeatureGrid.svelte.d.ts +16 -0
- package/dist/styles/sprout/Field.svelte +42 -0
- package/dist/styles/sprout/Field.svelte.d.ts +16 -0
- package/dist/styles/sprout/Footer.svelte +91 -0
- package/dist/styles/sprout/Footer.svelte.d.ts +25 -0
- package/dist/styles/sprout/HeroSection.svelte +86 -0
- package/dist/styles/sprout/HeroSection.svelte.d.ts +21 -0
- package/dist/styles/sprout/Input.svelte +61 -0
- package/dist/styles/sprout/Input.svelte.d.ts +18 -0
- package/dist/styles/sprout/InputGroup.svelte +20 -0
- package/dist/styles/sprout/InputGroup.svelte.d.ts +11 -0
- package/dist/styles/sprout/Kbd.svelte +18 -0
- package/dist/styles/sprout/Kbd.svelte.d.ts +8 -0
- package/dist/styles/sprout/Label.svelte +16 -0
- package/dist/styles/sprout/Label.svelte.d.ts +9 -0
- package/dist/styles/sprout/Link.svelte +44 -0
- package/dist/styles/sprout/Link.svelte.d.ts +16 -0
- package/dist/styles/sprout/LocaleProvider.svelte +24 -0
- package/dist/styles/sprout/LocaleProvider.svelte.d.ts +10 -0
- package/dist/styles/sprout/LogoCloud.svelte +61 -0
- package/dist/styles/sprout/LogoCloud.svelte.d.ts +19 -0
- package/dist/styles/sprout/MenuItem.svelte +64 -0
- package/dist/styles/sprout/MenuItem.svelte.d.ts +18 -0
- package/dist/styles/sprout/MenuSeparator.svelte +22 -0
- package/dist/styles/sprout/MenuSeparator.svelte.d.ts +8 -0
- package/dist/styles/sprout/Modal.svelte +119 -0
- package/dist/styles/sprout/Modal.svelte.d.ts +21 -0
- package/dist/styles/sprout/MultiSelect.svelte +288 -0
- package/dist/styles/sprout/MultiSelect.svelte.d.ts +31 -0
- package/dist/styles/sprout/Navbar.svelte +201 -0
- package/dist/styles/sprout/Navbar.svelte.d.ts +33 -0
- package/dist/styles/sprout/NumberInput.svelte +97 -0
- package/dist/styles/sprout/NumberInput.svelte.d.ts +15 -0
- package/dist/styles/sprout/Pagination.svelte +84 -0
- package/dist/styles/sprout/Pagination.svelte.d.ts +15 -0
- package/dist/styles/sprout/PasswordInput.svelte +101 -0
- package/dist/styles/sprout/PasswordInput.svelte.d.ts +12 -0
- package/dist/styles/sprout/Popover.svelte +90 -0
- package/dist/styles/sprout/Popover.svelte.d.ts +19 -0
- package/dist/styles/sprout/PricingCard.svelte +109 -0
- package/dist/styles/sprout/PricingCard.svelte.d.ts +25 -0
- package/dist/styles/sprout/Progress.svelte +59 -0
- package/dist/styles/sprout/Progress.svelte.d.ts +17 -0
- package/dist/styles/sprout/Radio.svelte +56 -0
- package/dist/styles/sprout/Radio.svelte.d.ts +15 -0
- package/dist/styles/sprout/RadioGroup.svelte +96 -0
- package/dist/styles/sprout/RadioGroup.svelte.d.ts +27 -0
- package/dist/styles/sprout/SegmentedControl.svelte +89 -0
- package/dist/styles/sprout/SegmentedControl.svelte.d.ts +25 -0
- package/dist/styles/sprout/Select.svelte +62 -0
- package/dist/styles/sprout/Select.svelte.d.ts +20 -0
- package/dist/styles/sprout/Sidebar.svelte +206 -0
- package/dist/styles/sprout/Sidebar.svelte.d.ts +36 -0
- package/dist/styles/sprout/Skeleton.svelte +46 -0
- package/dist/styles/sprout/Skeleton.svelte.d.ts +13 -0
- package/dist/styles/sprout/Slider.svelte +80 -0
- package/dist/styles/sprout/Slider.svelte.d.ts +19 -0
- package/dist/styles/sprout/Spinner.svelte +34 -0
- package/dist/styles/sprout/Spinner.svelte.d.ts +13 -0
- package/dist/styles/sprout/Stat.svelte +51 -0
- package/dist/styles/sprout/Stat.svelte.d.ts +16 -0
- package/dist/styles/sprout/StatsBand.svelte +64 -0
- package/dist/styles/sprout/StatsBand.svelte.d.ts +20 -0
- package/dist/styles/sprout/Steps.svelte +143 -0
- package/dist/styles/sprout/Steps.svelte.d.ts +24 -0
- package/dist/styles/sprout/Switch.svelte +65 -0
- package/dist/styles/sprout/Switch.svelte.d.ts +14 -0
- package/dist/styles/sprout/Table.svelte +218 -0
- package/dist/styles/sprout/Table.svelte.d.ts +66 -0
- package/dist/styles/sprout/Tabs.svelte +103 -0
- package/dist/styles/sprout/Tabs.svelte.d.ts +23 -0
- package/dist/styles/sprout/Testimonial.svelte +65 -0
- package/dist/styles/sprout/Testimonial.svelte.d.ts +19 -0
- package/dist/styles/sprout/Textarea.svelte +55 -0
- package/dist/styles/sprout/Textarea.svelte.d.ts +12 -0
- package/dist/styles/sprout/ThemeToggle.svelte +131 -0
- package/dist/styles/sprout/ThemeToggle.svelte.d.ts +16 -0
- package/dist/styles/sprout/Toaster.svelte +133 -0
- package/dist/styles/sprout/Toaster.svelte.d.ts +8 -0
- package/dist/styles/sprout/Tooltip.svelte +34 -0
- package/dist/styles/sprout/Tooltip.svelte.d.ts +12 -0
- package/dist/styles/sprout/fonts.css +78 -0
- package/dist/styles/sprout/index.d.ts +109 -0
- package/dist/styles/sprout/index.js +83 -0
- package/dist/styles/sprout/lift.d.ts +40 -0
- package/dist/styles/sprout/lift.js +36 -0
- package/dist/styles/sprout/theme.css +255 -0
- package/package.json +269 -3
- package/registry.json +137 -65
|
@@ -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,133 @@
|
|
|
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
|
+
import { soft } from './lift.js';
|
|
10
|
+
|
|
11
|
+
export type ToasterPosition =
|
|
12
|
+
'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
|
|
13
|
+
|
|
14
|
+
interface Props {
|
|
15
|
+
position?: ToasterPosition;
|
|
16
|
+
class?: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
let { position = 'bottom-right', class: className = '' }: Props = $props();
|
|
20
|
+
|
|
21
|
+
const t = useLocale();
|
|
22
|
+
|
|
23
|
+
const positions: Record<ToasterPosition, string> = {
|
|
24
|
+
'top-left': 'top-4 left-4 items-start',
|
|
25
|
+
'top-center': 'top-4 left-1/2 -translate-x-1/2 items-center',
|
|
26
|
+
'top-right': 'top-4 right-4 items-end',
|
|
27
|
+
'bottom-left': 'bottom-4 left-4 items-start',
|
|
28
|
+
'bottom-center': 'bottom-4 left-1/2 -translate-x-1/2 items-center',
|
|
29
|
+
'bottom-right': 'bottom-4 right-4 items-end'
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const fromTop = $derived(position.startsWith('top'));
|
|
33
|
+
const fromLeft = $derived(position.endsWith('left'));
|
|
34
|
+
const fromCenter = $derived(position.endsWith('center'));
|
|
35
|
+
|
|
36
|
+
const enter = $derived(
|
|
37
|
+
fromCenter ? { y: fromTop ? -16 : 16, x: 0 } : { x: fromLeft ? -16 : 16, y: 0 }
|
|
38
|
+
);
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
<div
|
|
42
|
+
use:portal
|
|
43
|
+
aria-live="polite"
|
|
44
|
+
aria-label={t.current.notifications}
|
|
45
|
+
class="pointer-events-none fixed z-[100] flex w-[min(24rem,calc(100vw-2rem))] flex-col gap-2.5 {positions[
|
|
46
|
+
position
|
|
47
|
+
]} {fromTop ? '' : 'flex-col-reverse'} {className}"
|
|
48
|
+
>
|
|
49
|
+
{#each toast.items as item (item.id)}
|
|
50
|
+
<!--
|
|
51
|
+
sprout puts every toast on the same cream card and lets the glyph
|
|
52
|
+
carry the tone. matte tints the whole surface; here a tinted block
|
|
53
|
+
would fight the warm page underneath.
|
|
54
|
+
-->
|
|
55
|
+
<div
|
|
56
|
+
animate:flip={{ duration: 200 }}
|
|
57
|
+
in:fly={{ ...enter, duration: 220 }}
|
|
58
|
+
out:fly={{ ...enter, duration: 160 }}
|
|
59
|
+
role={item.tone === 'danger' ? 'alert' : 'status'}
|
|
60
|
+
class="pointer-events-auto flex w-full items-start gap-3 rounded-2xl border border-hairline bg-bg p-3.5 font-sans {soft}"
|
|
61
|
+
>
|
|
62
|
+
<span class="mt-0.5 shrink-0 {toneText[item.tone]}">
|
|
63
|
+
{#if item.loading}
|
|
64
|
+
<Spinner size="sm" label="" />
|
|
65
|
+
{:else if item.tone === 'success'}
|
|
66
|
+
<svg class="size-4" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
67
|
+
<circle cx="8" cy="8" r="6.5" stroke="currentColor" stroke-width="1.5" />
|
|
68
|
+
<path
|
|
69
|
+
d="m5 8.2 2.2 2.2L11 6"
|
|
70
|
+
stroke="currentColor"
|
|
71
|
+
stroke-width="1.6"
|
|
72
|
+
stroke-linecap="round"
|
|
73
|
+
stroke-linejoin="round"
|
|
74
|
+
/>
|
|
75
|
+
</svg>
|
|
76
|
+
{:else if item.tone === 'danger'}
|
|
77
|
+
<svg class="size-4" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
78
|
+
<circle cx="8" cy="8" r="6.5" stroke="currentColor" stroke-width="1.5" />
|
|
79
|
+
<path
|
|
80
|
+
d="m5.75 5.75 4.5 4.5M10.25 5.75l-4.5 4.5"
|
|
81
|
+
stroke="currentColor"
|
|
82
|
+
stroke-width="1.6"
|
|
83
|
+
stroke-linecap="round"
|
|
84
|
+
/>
|
|
85
|
+
</svg>
|
|
86
|
+
{:else}
|
|
87
|
+
<svg class="size-4" viewBox="0 0 16 16" fill="none" aria-hidden="true">
|
|
88
|
+
<circle cx="8" cy="8" r="6.5" stroke="currentColor" stroke-width="1.5" />
|
|
89
|
+
<path d="M8 4.75v4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" />
|
|
90
|
+
<circle cx="8" cy="11.25" r="0.85" fill="currentColor" />
|
|
91
|
+
</svg>
|
|
92
|
+
{/if}
|
|
93
|
+
</span>
|
|
94
|
+
|
|
95
|
+
<div class="flex min-w-0 flex-1 flex-col gap-1">
|
|
96
|
+
<p class="text-sm leading-snug font-semibold text-text">{item.title}</p>
|
|
97
|
+
{#if item.description}
|
|
98
|
+
<p class="text-[13px] leading-relaxed text-text-secondary">{item.description}</p>
|
|
99
|
+
{/if}
|
|
100
|
+
{#if item.action}
|
|
101
|
+
<button
|
|
102
|
+
type="button"
|
|
103
|
+
onclick={() => {
|
|
104
|
+
item.action?.onclick();
|
|
105
|
+
toast.dismiss(item.id);
|
|
106
|
+
}}
|
|
107
|
+
class="mt-1 self-start rounded font-sans text-[13px] font-semibold underline underline-offset-2 {toneText[
|
|
108
|
+
item.tone
|
|
109
|
+
]}"
|
|
110
|
+
>
|
|
111
|
+
{item.action.label}
|
|
112
|
+
</button>
|
|
113
|
+
{/if}
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<button
|
|
117
|
+
type="button"
|
|
118
|
+
onclick={() => toast.dismiss(item.id)}
|
|
119
|
+
aria-label={t.current.dismiss}
|
|
120
|
+
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"
|
|
121
|
+
>
|
|
122
|
+
<svg class="size-3.5" viewBox="0 0 14 14" fill="none" aria-hidden="true">
|
|
123
|
+
<path
|
|
124
|
+
d="m2 2 10 10M12 2 2 12"
|
|
125
|
+
stroke="currentColor"
|
|
126
|
+
stroke-width="1.6"
|
|
127
|
+
stroke-linecap="round"
|
|
128
|
+
/>
|
|
129
|
+
</svg>
|
|
130
|
+
</button>
|
|
131
|
+
</div>
|
|
132
|
+
{/each}
|
|
133
|
+
</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,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
import type { HTMLAttributes } from 'svelte/elements';
|
|
4
|
+
import { soft } from './lift.js';
|
|
5
|
+
|
|
6
|
+
export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
|
|
7
|
+
|
|
8
|
+
interface Props extends HTMLAttributes<HTMLSpanElement> {
|
|
9
|
+
/** Tooltip text. CSS-only: shows on hover and on keyboard focus. */
|
|
10
|
+
content: string;
|
|
11
|
+
placement?: TooltipPlacement;
|
|
12
|
+
children: Snippet;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
let { content, placement = 'top', class: className = '', children, ...rest }: Props = $props();
|
|
16
|
+
|
|
17
|
+
const placements: Record<TooltipPlacement, string> = {
|
|
18
|
+
top: 'bottom-full left-1/2 mb-1.5 -translate-x-1/2',
|
|
19
|
+
bottom: 'top-full left-1/2 mt-1.5 -translate-x-1/2',
|
|
20
|
+
left: 'right-full top-1/2 mr-1.5 -translate-y-1/2',
|
|
21
|
+
right: 'left-full top-1/2 ml-1.5 -translate-y-1/2'
|
|
22
|
+
};
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<span class="group/tt relative inline-flex" {...rest}>
|
|
26
|
+
{@render children()}
|
|
27
|
+
<span
|
|
28
|
+
role="tooltip"
|
|
29
|
+
class="pointer-events-none invisible absolute z-50 rounded-xl bg-text px-2 py-1 font-sans text-xs font-medium whitespace-nowrap text-text-inverse opacity-0 {soft} 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
|
|
30
|
+
{placements[placement]} {className}"
|
|
31
|
+
>
|
|
32
|
+
{content}
|
|
33
|
+
</span>
|
|
34
|
+
</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,78 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Optional: the two faces sprout is designed around — Fredoka (headings) and
|
|
3
|
+
* Plus Jakarta Sans (body). Import this only if your project doesn't already
|
|
4
|
+
* self-host or load them another way — without it the tokens fall back to the
|
|
5
|
+
* system stack, which works but loses the round, hand-drawn warmth the style is
|
|
6
|
+
* built on.
|
|
7
|
+
*
|
|
8
|
+
* These are plain `@font-face` rules rather than an `@import` of the Google
|
|
9
|
+
* stylesheet on purpose: `@import` is only valid before every other rule, so a
|
|
10
|
+
* bundler silently drops it when this file is imported after `tailwindcss` —
|
|
11
|
+
* the fonts then fall back with no error anywhere. `@font-face` works wherever
|
|
12
|
+
* you put it, and it skips the CSS-to-CSS round trip before the font files
|
|
13
|
+
* start downloading.
|
|
14
|
+
*
|
|
15
|
+
* Four rules for two families: both are variable fonts, so one file per subset
|
|
16
|
+
* covers every weight the style uses — 400 to 600 for Fredoka, 400 to 700 for
|
|
17
|
+
* Plus Jakarta Sans. Latin and Latin Extended only, around 90 kB in total. Add
|
|
18
|
+
* `<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>` to
|
|
19
|
+
* your document head to open the connection earlier.
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
/* --- Fredoka --- */
|
|
23
|
+
/* latin */
|
|
24
|
+
@font-face {
|
|
25
|
+
font-family: 'Fredoka';
|
|
26
|
+
font-style: normal;
|
|
27
|
+
font-weight: 400 600;
|
|
28
|
+
font-stretch: 100%;
|
|
29
|
+
font-display: swap;
|
|
30
|
+
src: url(https://fonts.gstatic.com/s/fredoka/v17/X7n64b87HvSqjb_WIi2yDCRwoQ_k7367_DWu89U.woff2)
|
|
31
|
+
format('woff2');
|
|
32
|
+
unicode-range:
|
|
33
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
34
|
+
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* latin-ext */
|
|
38
|
+
@font-face {
|
|
39
|
+
font-family: 'Fredoka';
|
|
40
|
+
font-style: normal;
|
|
41
|
+
font-weight: 400 600;
|
|
42
|
+
font-stretch: 100%;
|
|
43
|
+
font-display: swap;
|
|
44
|
+
src: url(https://fonts.gstatic.com/s/fredoka/v17/X7n64b87HvSqjb_WIi2yDCRwoQ_k7367_DWg89XyHw.woff2)
|
|
45
|
+
format('woff2');
|
|
46
|
+
unicode-range:
|
|
47
|
+
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
48
|
+
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
49
|
+
U+A720-A7FF;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* --- Plus Jakarta Sans --- */
|
|
53
|
+
/* latin */
|
|
54
|
+
@font-face {
|
|
55
|
+
font-family: 'Plus Jakarta Sans';
|
|
56
|
+
font-style: normal;
|
|
57
|
+
font-weight: 400 700;
|
|
58
|
+
font-display: swap;
|
|
59
|
+
src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko20yw.woff2)
|
|
60
|
+
format('woff2');
|
|
61
|
+
unicode-range:
|
|
62
|
+
U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
|
|
63
|
+
U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/* latin-ext */
|
|
67
|
+
@font-face {
|
|
68
|
+
font-family: 'Plus Jakarta Sans';
|
|
69
|
+
font-style: normal;
|
|
70
|
+
font-weight: 400 700;
|
|
71
|
+
font-display: swap;
|
|
72
|
+
src: url(https://fonts.gstatic.com/s/plusjakartasans/v12/LDIoaomQNQcsA88c7O9yZ4KMCoOg4Ko40yyygA.woff2)
|
|
73
|
+
format('woff2');
|
|
74
|
+
unicode-range:
|
|
75
|
+
U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
|
|
76
|
+
U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
|
|
77
|
+
U+A720-A7FF;
|
|
78
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sprout — Warm and fully rounded — leaf green on cream, pill buttons, and a round display face. For school, community and family sites.
|
|
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';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sprout — Warm and fully rounded — leaf green on cream, pill buttons, and a round display face. For school, community and family sites.
|
|
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
|
+
/* --- shared behaviour --- */
|
|
9
|
+
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';
|
|
10
|
+
/* --- locale --- */
|
|
11
|
+
export { default as LocaleProvider } from './LocaleProvider.svelte';
|
|
12
|
+
/* --- actions --- */
|
|
13
|
+
export { default as Button } from './Button.svelte';
|
|
14
|
+
export { default as Link } from './Link.svelte';
|
|
15
|
+
/* --- forms --- */
|
|
16
|
+
export { default as Input } from './Input.svelte';
|
|
17
|
+
export { default as Textarea } from './Textarea.svelte';
|
|
18
|
+
export { default as Select } 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 { default as Field } from './Field.svelte';
|
|
23
|
+
export { default as Label } from './Label.svelte';
|
|
24
|
+
export { default as PasswordInput } from './PasswordInput.svelte';
|
|
25
|
+
export { default as NumberInput } from './NumberInput.svelte';
|
|
26
|
+
export { default as Slider } from './Slider.svelte';
|
|
27
|
+
export { default as RadioGroup } from './RadioGroup.svelte';
|
|
28
|
+
export { default as CheckboxGroup } from './CheckboxGroup.svelte';
|
|
29
|
+
export { default as SegmentedControl } from './SegmentedControl.svelte';
|
|
30
|
+
export { default as InputGroup } from './InputGroup.svelte';
|
|
31
|
+
export { default as Combobox } from './Combobox.svelte';
|
|
32
|
+
export { default as MultiSelect } from './MultiSelect.svelte';
|
|
33
|
+
export { default as DatePicker } from './DatePicker.svelte';
|
|
34
|
+
export { default as Calendar } from './Calendar.svelte';
|
|
35
|
+
export { default as Dropzone } from './Dropzone.svelte';
|
|
36
|
+
/* --- data display --- */
|
|
37
|
+
export { default as Badge } from './Badge.svelte';
|
|
38
|
+
export { default as Avatar } from './Avatar.svelte';
|
|
39
|
+
export { default as AvatarGroup } from './AvatarGroup.svelte';
|
|
40
|
+
export { default as Card } from './Card.svelte';
|
|
41
|
+
export { default as Stat } from './Stat.svelte';
|
|
42
|
+
export { default as Table } from './Table.svelte';
|
|
43
|
+
export { default as Kbd } from './Kbd.svelte';
|
|
44
|
+
/* --- feedback --- */
|
|
45
|
+
export { default as Alert } from './Alert.svelte';
|
|
46
|
+
export { default as Progress } from './Progress.svelte';
|
|
47
|
+
export { default as Spinner } from './Spinner.svelte';
|
|
48
|
+
export { default as Skeleton } from './Skeleton.svelte';
|
|
49
|
+
export { default as EmptyState } from './EmptyState.svelte';
|
|
50
|
+
export { default as Toaster } from './Toaster.svelte';
|
|
51
|
+
/* --- layout & navigation --- */
|
|
52
|
+
export { default as Divider } from './Divider.svelte';
|
|
53
|
+
export { default as Tabs } from './Tabs.svelte';
|
|
54
|
+
export { default as Accordion } from './Accordion.svelte';
|
|
55
|
+
export { default as AccordionItem } from './AccordionItem.svelte';
|
|
56
|
+
export { default as Breadcrumb } from './Breadcrumb.svelte';
|
|
57
|
+
export { default as Pagination } from './Pagination.svelte';
|
|
58
|
+
export { default as Steps } from './Steps.svelte';
|
|
59
|
+
/* --- app shell --- */
|
|
60
|
+
export { default as Navbar } from './Navbar.svelte';
|
|
61
|
+
export { default as Sidebar } from './Sidebar.svelte';
|
|
62
|
+
export { default as Footer } from './Footer.svelte';
|
|
63
|
+
/* --- marketing --- */
|
|
64
|
+
export { default as HeroSection } from './HeroSection.svelte';
|
|
65
|
+
export { default as FeatureGrid } from './FeatureGrid.svelte';
|
|
66
|
+
export { default as FeatureCard } from './FeatureCard.svelte';
|
|
67
|
+
export { default as PricingCard } from './PricingCard.svelte';
|
|
68
|
+
export { default as Testimonial } from './Testimonial.svelte';
|
|
69
|
+
export { default as LogoCloud } from './LogoCloud.svelte';
|
|
70
|
+
export { default as CTASection } from './CTASection.svelte';
|
|
71
|
+
export { default as StatsBand } from './StatsBand.svelte';
|
|
72
|
+
/* --- overlay --- */
|
|
73
|
+
export { default as Modal } from './Modal.svelte';
|
|
74
|
+
export { default as Drawer } from './Drawer.svelte';
|
|
75
|
+
export { default as ConfirmDialog } from './ConfirmDialog.svelte';
|
|
76
|
+
export { default as CommandPalette } from './CommandPalette.svelte';
|
|
77
|
+
export { default as ContextMenu } from './ContextMenu.svelte';
|
|
78
|
+
export { default as Dropdown } from './Dropdown.svelte';
|
|
79
|
+
export { default as MenuItem } from './MenuItem.svelte';
|
|
80
|
+
export { default as MenuSeparator } from './MenuSeparator.svelte';
|
|
81
|
+
export { default as Popover } from './Popover.svelte';
|
|
82
|
+
export { default as ThemeToggle } from './ThemeToggle.svelte';
|
|
83
|
+
export { default as Tooltip } from './Tooltip.svelte';
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* sprout's shadows — a hard lip rather than a blur.
|
|
3
|
+
*
|
|
4
|
+
* The style's one structural idea: every raised thing sits on a solid edge in
|
|
5
|
+
* its own colour, the way a printed sticker or a moulded key does. A blurred
|
|
6
|
+
* drop shadow alone reads as glass; a flat offset reads as a physical object a
|
|
7
|
+
* child could press, which is the whole point of the style.
|
|
8
|
+
*
|
|
9
|
+
* Kept here rather than in `theme.css` because the token *names* are a contract
|
|
10
|
+
* shared by every style — a `--shadow-lip` that only sprout defined would fail
|
|
11
|
+
* `bun run scoped`. These are plain class strings instead, style-local by
|
|
12
|
+
* construction, and Tailwind sees them because it scans this file like any
|
|
13
|
+
* other source.
|
|
14
|
+
*
|
|
15
|
+
* No `dark:` anywhere, deliberately. Dark mode arrives two ways — an explicit
|
|
16
|
+
* `.dark` class *and* a bare OS preference — and the `dark:` variant only knows
|
|
17
|
+
* about the first, so a component that leant on it would be right half the
|
|
18
|
+
* time. Everything below is instead written to hold in both modes: the surface
|
|
19
|
+
* shadows are near-black at low alpha, and a tone's lip is mixed from the tone
|
|
20
|
+
* itself, so it darkens whatever the fill happens to be.
|
|
21
|
+
*/
|
|
22
|
+
import type { Tone } from '../../core/tones.js';
|
|
23
|
+
/** Barely raised: chips, inputs, table headers, anything sitting on a page. */
|
|
24
|
+
export declare const edge = "shadow-[0_2px_0_0_rgba(20,83,45,0.07)]";
|
|
25
|
+
/** The workhorse: cards, menus, popovers. A 4px lip plus a wide, soft drop. */
|
|
26
|
+
export declare const soft = "shadow-[0_4px_0_0_rgba(20,83,45,0.08),0_14px_30px_-10px_rgba(20,83,45,0.18)]";
|
|
27
|
+
/** `soft`, one step deeper, for a card that rises under the pointer. */
|
|
28
|
+
export declare const softOnHover = "hover:shadow-[0_6px_0_0_rgba(20,83,45,0.10),0_18px_36px_-12px_rgba(20,83,45,0.22)]";
|
|
29
|
+
/** Off the page entirely: modals, drawers, the command palette. */
|
|
30
|
+
export declare const float = "shadow-[0_6px_0_0_rgba(20,83,45,0.09),0_28px_60px_-20px_rgba(20,83,45,0.35)]";
|
|
31
|
+
/**
|
|
32
|
+
* A solid fill's own lip: the tone mixed most of the way to black, so it is
|
|
33
|
+
* always the same colour a shadow of that fill would be. Pair with
|
|
34
|
+
* `active:translate-y-[3px]` — the button travels down exactly as far as the
|
|
35
|
+
* lip shortens, so the top face lands where the shadow was and the whole thing
|
|
36
|
+
* reads as one pressed object.
|
|
37
|
+
*/
|
|
38
|
+
export declare const lift: Record<Tone, string>;
|
|
39
|
+
/** The same lip at 3px, for things too small to travel: icon tiles, dots. */
|
|
40
|
+
export declare const liftSm: Record<Tone, string>;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** Barely raised: chips, inputs, table headers, anything sitting on a page. */
|
|
2
|
+
export const edge = 'shadow-[0_2px_0_0_rgba(20,83,45,0.07)]';
|
|
3
|
+
/** The workhorse: cards, menus, popovers. A 4px lip plus a wide, soft drop. */
|
|
4
|
+
export const soft = 'shadow-[0_4px_0_0_rgba(20,83,45,0.08),0_14px_30px_-10px_rgba(20,83,45,0.18)]';
|
|
5
|
+
/** `soft`, one step deeper, for a card that rises under the pointer. */
|
|
6
|
+
export const softOnHover = 'hover:shadow-[0_6px_0_0_rgba(20,83,45,0.10),0_18px_36px_-12px_rgba(20,83,45,0.22)]';
|
|
7
|
+
/** Off the page entirely: modals, drawers, the command palette. */
|
|
8
|
+
export const float = 'shadow-[0_6px_0_0_rgba(20,83,45,0.09),0_28px_60px_-20px_rgba(20,83,45,0.35)]';
|
|
9
|
+
/**
|
|
10
|
+
* A solid fill's own lip: the tone mixed most of the way to black, so it is
|
|
11
|
+
* always the same colour a shadow of that fill would be. Pair with
|
|
12
|
+
* `active:translate-y-[3px]` — the button travels down exactly as far as the
|
|
13
|
+
* lip shortens, so the top face lands where the shadow was and the whole thing
|
|
14
|
+
* reads as one pressed object.
|
|
15
|
+
*/
|
|
16
|
+
export const lift = {
|
|
17
|
+
brand: 'shadow-[0_5px_0_0_color-mix(in_oklab,var(--color-brand)_72%,black)] active:shadow-[0_2px_0_0_color-mix(in_oklab,var(--color-brand)_72%,black)]',
|
|
18
|
+
accent: 'shadow-[0_5px_0_0_color-mix(in_oklab,var(--color-accent)_72%,black)] active:shadow-[0_2px_0_0_color-mix(in_oklab,var(--color-accent)_72%,black)]',
|
|
19
|
+
violet: 'shadow-[0_5px_0_0_color-mix(in_oklab,var(--color-violet)_72%,black)] active:shadow-[0_2px_0_0_color-mix(in_oklab,var(--color-violet)_72%,black)]',
|
|
20
|
+
info: 'shadow-[0_5px_0_0_color-mix(in_oklab,var(--color-info)_72%,black)] active:shadow-[0_2px_0_0_color-mix(in_oklab,var(--color-info)_72%,black)]',
|
|
21
|
+
success: 'shadow-[0_5px_0_0_color-mix(in_oklab,var(--color-success)_72%,black)] active:shadow-[0_2px_0_0_color-mix(in_oklab,var(--color-success)_72%,black)]',
|
|
22
|
+
warning: 'shadow-[0_5px_0_0_color-mix(in_oklab,var(--color-warning)_72%,black)] active:shadow-[0_2px_0_0_color-mix(in_oklab,var(--color-warning)_72%,black)]',
|
|
23
|
+
danger: 'shadow-[0_5px_0_0_color-mix(in_oklab,var(--color-danger)_72%,black)] active:shadow-[0_2px_0_0_color-mix(in_oklab,var(--color-danger)_72%,black)]',
|
|
24
|
+
neutral: 'shadow-[0_5px_0_0_color-mix(in_oklab,var(--color-neutral)_72%,black)] active:shadow-[0_2px_0_0_color-mix(in_oklab,var(--color-neutral)_72%,black)]'
|
|
25
|
+
};
|
|
26
|
+
/** The same lip at 3px, for things too small to travel: icon tiles, dots. */
|
|
27
|
+
export const liftSm = {
|
|
28
|
+
brand: 'shadow-[0_3px_0_0_color-mix(in_oklab,var(--color-brand)_72%,black)]',
|
|
29
|
+
accent: 'shadow-[0_3px_0_0_color-mix(in_oklab,var(--color-accent)_72%,black)]',
|
|
30
|
+
violet: 'shadow-[0_3px_0_0_color-mix(in_oklab,var(--color-violet)_72%,black)]',
|
|
31
|
+
info: 'shadow-[0_3px_0_0_color-mix(in_oklab,var(--color-info)_72%,black)]',
|
|
32
|
+
success: 'shadow-[0_3px_0_0_color-mix(in_oklab,var(--color-success)_72%,black)]',
|
|
33
|
+
warning: 'shadow-[0_3px_0_0_color-mix(in_oklab,var(--color-warning)_72%,black)]',
|
|
34
|
+
danger: 'shadow-[0_3px_0_0_color-mix(in_oklab,var(--color-danger)_72%,black)]',
|
|
35
|
+
neutral: 'shadow-[0_3px_0_0_color-mix(in_oklab,var(--color-neutral)_72%,black)]'
|
|
36
|
+
};
|