@dryui/theme-wizard 3.0.0 → 5.0.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/package.json +5 -5
- package/dist/actions.d.ts +0 -4
- package/dist/actions.js +0 -9
- package/dist/components/AlphaSlider.svelte +0 -13
- package/dist/components/AlphaSlider.svelte.d.ts +0 -9
- package/dist/components/ContrastBadge.svelte +0 -22
- package/dist/components/ContrastBadge.svelte.d.ts +0 -8
- package/dist/components/HsbPicker.svelte +0 -304
- package/dist/components/HsbPicker.svelte.d.ts +0 -9
- package/dist/components/StepIndicator.svelte +0 -87
- package/dist/components/StepIndicator.svelte.d.ts +0 -7
- package/dist/components/TokenPreview.svelte +0 -55
- package/dist/components/TokenPreview.svelte.d.ts +0 -8
- package/dist/components/WizardShell.svelte +0 -140
- package/dist/components/WizardShell.svelte.d.ts +0 -15
- package/dist/engine/derivation.d.ts +0 -282
- package/dist/engine/derivation.js +0 -1445
- package/dist/engine/derivation.test.d.ts +0 -1
- package/dist/engine/derivation.test.js +0 -956
- package/dist/engine/export-css.d.ts +0 -32
- package/dist/engine/export-css.js +0 -90
- package/dist/engine/export-css.test.d.ts +0 -1
- package/dist/engine/export-css.test.js +0 -78
- package/dist/engine/index.d.ts +0 -10
- package/dist/engine/index.js +0 -6
- package/dist/engine/palette.d.ts +0 -16
- package/dist/engine/palette.js +0 -44
- package/dist/engine/presets.d.ts +0 -6
- package/dist/engine/presets.js +0 -34
- package/dist/engine/url-codec.d.ts +0 -53
- package/dist/engine/url-codec.js +0 -243
- package/dist/engine/url-codec.test.d.ts +0 -1
- package/dist/engine/url-codec.test.js +0 -137
- package/dist/index.d.ts +0 -14
- package/dist/index.js +0 -17
- package/dist/state.svelte.d.ts +0 -104
- package/dist/state.svelte.js +0 -574
- package/dist/steps/BrandColor.svelte +0 -218
- package/dist/steps/BrandColor.svelte.d.ts +0 -6
- package/dist/steps/Personality.svelte +0 -319
- package/dist/steps/Personality.svelte.d.ts +0 -3
- package/dist/steps/PreviewExport.svelte +0 -115
- package/dist/steps/PreviewExport.svelte.d.ts +0 -9
- package/dist/steps/Shape.svelte +0 -121
- package/dist/steps/Shape.svelte.d.ts +0 -18
- package/dist/steps/Typography.svelte +0 -115
- package/dist/steps/Typography.svelte.d.ts +0 -18
package/dist/steps/Shape.svelte
DELETED
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Card } from '@dryui/ui/card';
|
|
3
|
-
import { SegmentedControl } from '@dryui/ui/segmented-control';
|
|
4
|
-
import { Text } from '@dryui/ui/text';
|
|
5
|
-
import { wizardState, setRadiusPreset, setDensity } from '../state.svelte.js';
|
|
6
|
-
import type { RadiusPreset } from '../state.svelte.js';
|
|
7
|
-
|
|
8
|
-
const PRESETS: { value: RadiusPreset; label: string; description: string }[] = [
|
|
9
|
-
{ value: 'sharp', label: 'Sharp', description: 'Tight corners' },
|
|
10
|
-
{ value: 'soft', label: 'Soft', description: 'Gentle corners' },
|
|
11
|
-
{ value: 'rounded', label: 'Rounded', description: 'Friendly surfaces' },
|
|
12
|
-
{ value: 'pill', label: 'Pill', description: 'Capsule shapes' }
|
|
13
|
-
];
|
|
14
|
-
</script>
|
|
15
|
-
|
|
16
|
-
<section class="shape-section">
|
|
17
|
-
<div class="corner-grid">
|
|
18
|
-
{#each PRESETS as preset (preset.value)}
|
|
19
|
-
<Card.Root
|
|
20
|
-
as="button"
|
|
21
|
-
variant="interactive"
|
|
22
|
-
size="sm"
|
|
23
|
-
selected={wizardState.shape.radiusPreset === preset.value}
|
|
24
|
-
onclick={() => setRadiusPreset(preset.value)}
|
|
25
|
-
>
|
|
26
|
-
<Card.Content>
|
|
27
|
-
<div class="corner-option">
|
|
28
|
-
<div class="shape-hint" data-shape={preset.value}></div>
|
|
29
|
-
<div class="corner-meta">
|
|
30
|
-
<Text as="span" size="sm" weight="semibold">{preset.label}</Text>
|
|
31
|
-
<Text as="span" size="xs" color="muted">{preset.description}</Text>
|
|
32
|
-
</div>
|
|
33
|
-
</div>
|
|
34
|
-
</Card.Content>
|
|
35
|
-
</Card.Root>
|
|
36
|
-
{/each}
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<div class="density-control">
|
|
40
|
-
<Text as="span" size="sm" weight="semibold">Spacing density</Text>
|
|
41
|
-
<SegmentedControl.Root value={wizardState.shape.density}>
|
|
42
|
-
<SegmentedControl.Item value="compact" onclick={() => setDensity('compact')}>
|
|
43
|
-
Compact
|
|
44
|
-
</SegmentedControl.Item>
|
|
45
|
-
<SegmentedControl.Item value="default" onclick={() => setDensity('default')}>
|
|
46
|
-
Default
|
|
47
|
-
</SegmentedControl.Item>
|
|
48
|
-
<SegmentedControl.Item value="spacious" onclick={() => setDensity('spacious')}>
|
|
49
|
-
Spacious
|
|
50
|
-
</SegmentedControl.Item>
|
|
51
|
-
</SegmentedControl.Root>
|
|
52
|
-
</div>
|
|
53
|
-
</section>
|
|
54
|
-
|
|
55
|
-
<style>
|
|
56
|
-
.shape-section {
|
|
57
|
-
display: grid;
|
|
58
|
-
gap: var(--dry-space-5);
|
|
59
|
-
container-type: inline-size;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
.corner-grid {
|
|
63
|
-
display: grid;
|
|
64
|
-
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
65
|
-
gap: var(--dry-space-4);
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
.corner-option {
|
|
69
|
-
display: grid;
|
|
70
|
-
gap: var(--dry-space-3);
|
|
71
|
-
justify-items: start;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
.corner-meta {
|
|
75
|
-
display: grid;
|
|
76
|
-
gap: var(--dry-space-1);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
.shape-hint {
|
|
80
|
-
aspect-ratio: 1;
|
|
81
|
-
height: 2.5rem;
|
|
82
|
-
border: 2px solid var(--dry-color-stroke-strong);
|
|
83
|
-
background: var(--dry-color-bg-base);
|
|
84
|
-
transition: border-radius 0.2s ease;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.shape-hint[data-shape='sharp'] {
|
|
88
|
-
border-radius: 2px;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.shape-hint[data-shape='soft'] {
|
|
92
|
-
border-radius: 8px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.shape-hint[data-shape='rounded'] {
|
|
96
|
-
border-radius: 16px;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.shape-hint[data-shape='pill'] {
|
|
100
|
-
border-radius: 9999px;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
.density-control {
|
|
104
|
-
display: grid;
|
|
105
|
-
grid-template-columns: auto minmax(0, 20rem);
|
|
106
|
-
align-items: center;
|
|
107
|
-
gap: var(--dry-space-4);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
@container (max-width: 40rem) {
|
|
111
|
-
.corner-grid {
|
|
112
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
@container (max-width: 30rem) {
|
|
117
|
-
.density-control {
|
|
118
|
-
grid-template-columns: 1fr;
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
</style>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const Shape: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, string>;
|
|
17
|
-
type Shape = InstanceType<typeof Shape>;
|
|
18
|
-
export default Shape;
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { Card } from '@dryui/ui/card';
|
|
3
|
-
import { SegmentedControl } from '@dryui/ui/segmented-control';
|
|
4
|
-
import { Text } from '@dryui/ui/text';
|
|
5
|
-
import {
|
|
6
|
-
FONT_STACKS,
|
|
7
|
-
setFontPreset,
|
|
8
|
-
setTypeScale,
|
|
9
|
-
wizardState,
|
|
10
|
-
type FontPreset
|
|
11
|
-
} from '../state.svelte.js';
|
|
12
|
-
|
|
13
|
-
const FONT_SAMPLES: Record<FontPreset, string> = {
|
|
14
|
-
System: 'Fast, neutral, and familiar',
|
|
15
|
-
Humanist: 'Warm curves for readable product copy',
|
|
16
|
-
Geometric: 'Sharper rhythm with a modern edge',
|
|
17
|
-
Classical: 'Refined without turning formal',
|
|
18
|
-
Serif: 'Editorial and literary by default',
|
|
19
|
-
Mono: 'Technical, precise, and utilitarian'
|
|
20
|
-
};
|
|
21
|
-
|
|
22
|
-
const FONT_PRESETS = (Object.keys(FONT_STACKS) as FontPreset[]).map((name) => ({
|
|
23
|
-
name,
|
|
24
|
-
stack: FONT_STACKS[name],
|
|
25
|
-
sample: FONT_SAMPLES[name]
|
|
26
|
-
}));
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<section class="typography-section">
|
|
30
|
-
<div class="font-grid">
|
|
31
|
-
{#each FONT_PRESETS as preset (preset.name)}
|
|
32
|
-
<Card.Root
|
|
33
|
-
as="button"
|
|
34
|
-
variant="interactive"
|
|
35
|
-
size="sm"
|
|
36
|
-
selected={wizardState.typography.fontPreset === preset.name}
|
|
37
|
-
onclick={() => setFontPreset(preset.name)}
|
|
38
|
-
>
|
|
39
|
-
<Card.Content>
|
|
40
|
-
<div class="font-option" style:--_stack={preset.stack}>
|
|
41
|
-
<span class="font-display">Ag</span>
|
|
42
|
-
<div class="font-meta">
|
|
43
|
-
<Text as="span" size="sm" weight="semibold">{preset.name}</Text>
|
|
44
|
-
<Text as="span" size="xs" color="muted">{preset.sample}</Text>
|
|
45
|
-
</div>
|
|
46
|
-
</div>
|
|
47
|
-
</Card.Content>
|
|
48
|
-
</Card.Root>
|
|
49
|
-
{/each}
|
|
50
|
-
</div>
|
|
51
|
-
|
|
52
|
-
<div class="scale-control">
|
|
53
|
-
<Text as="span" size="sm" weight="semibold">Type scale</Text>
|
|
54
|
-
<SegmentedControl.Root value={wizardState.typography.scale}>
|
|
55
|
-
<SegmentedControl.Item value="compact" onclick={() => setTypeScale('compact')}>
|
|
56
|
-
Compact
|
|
57
|
-
</SegmentedControl.Item>
|
|
58
|
-
<SegmentedControl.Item value="default" onclick={() => setTypeScale('default')}>
|
|
59
|
-
Default
|
|
60
|
-
</SegmentedControl.Item>
|
|
61
|
-
<SegmentedControl.Item value="spacious" onclick={() => setTypeScale('spacious')}>
|
|
62
|
-
Spacious
|
|
63
|
-
</SegmentedControl.Item>
|
|
64
|
-
</SegmentedControl.Root>
|
|
65
|
-
</div>
|
|
66
|
-
</section>
|
|
67
|
-
|
|
68
|
-
<style>
|
|
69
|
-
.typography-section {
|
|
70
|
-
display: grid;
|
|
71
|
-
gap: var(--dry-space-5);
|
|
72
|
-
container-type: inline-size;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
.font-grid {
|
|
76
|
-
display: grid;
|
|
77
|
-
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
78
|
-
gap: var(--dry-space-4);
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.font-option {
|
|
82
|
-
display: grid;
|
|
83
|
-
gap: var(--dry-space-2);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
.font-display {
|
|
87
|
-
font-family: var(--_stack, inherit);
|
|
88
|
-
font-size: 2rem;
|
|
89
|
-
line-height: 1;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.font-meta {
|
|
93
|
-
display: grid;
|
|
94
|
-
gap: var(--dry-space-1);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.scale-control {
|
|
98
|
-
display: grid;
|
|
99
|
-
grid-template-columns: auto minmax(0, 20rem);
|
|
100
|
-
align-items: center;
|
|
101
|
-
gap: var(--dry-space-4);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
@container (max-width: 40rem) {
|
|
105
|
-
.font-grid {
|
|
106
|
-
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
@container (max-width: 30rem) {
|
|
111
|
-
.scale-control {
|
|
112
|
-
grid-template-columns: 1fr;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
</style>
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const Typography: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
-
[evt: string]: CustomEvent<any>;
|
|
16
|
-
}, {}, {}, string>;
|
|
17
|
-
type Typography = InstanceType<typeof Typography>;
|
|
18
|
-
export default Typography;
|