@dryui/ui 0.1.10 → 0.1.12
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/dist/adjust/adjust.svelte +4 -2
- package/dist/alpha-slider/alpha-slider.svelte +4 -2
- package/dist/aspect-ratio/aspect-ratio.svelte +2 -1
- package/dist/aurora/aurora.svelte +12 -2
- package/dist/beam/beam.svelte +23 -22
- package/dist/chromatic-aberration/chromatic-aberration.svelte +3 -0
- package/dist/color-picker/color-picker-alpha-slider.svelte +2 -1
- package/dist/color-picker/color-picker-area.svelte +11 -5
- package/dist/color-picker/color-picker-swatch.svelte +6 -3
- package/dist/displacement/displacement.svelte +3 -0
- package/dist/gauge/gauge.svelte +3 -3
- package/dist/god-rays/god-rays.svelte +10 -0
- package/dist/image-comparison/image-comparison.svelte +3 -1
- package/dist/marquee/marquee.svelte +9 -13
- package/dist/progress/progress.svelte +8 -4
- package/dist/qr-code/qr-code.svelte +1 -1
- package/dist/reveal/reveal.svelte +3 -1
- package/dist/shader-canvas/shader-canvas.svelte +3 -2
- package/dist/skeleton/skeleton.svelte +8 -5
- package/dist/slider/slider.svelte +1 -1
- package/dist/splitter/splitter-root.svelte +7 -4
- package/dist/spotlight/spotlight.svelte +7 -0
- package/dist/themes/default.css +16 -1
- package/dist/thumbnail/accordion.svelte +2 -2
- package/dist/thumbnail/add-on-selector.svelte +2 -2
- package/dist/thumbnail/affix-group.svelte +2 -2
- package/dist/thumbnail/alert-dialog.svelte +2 -2
- package/dist/thumbnail/alert.svelte +2 -2
- package/dist/thumbnail/alpha-slider.svelte +2 -2
- package/dist/thumbnail/amenity-grid.svelte +2 -2
- package/dist/thumbnail/aspect-ratio.svelte +2 -2
- package/dist/thumbnail/aurora.svelte +2 -2
- package/dist/thumbnail/avatar.svelte +2 -2
- package/dist/thumbnail/backdrop.svelte +2 -2
- package/dist/thumbnail/badge.svelte +2 -2
- package/dist/thumbnail/booking-confirmation.svelte +2 -2
- package/dist/thumbnail/breadcrumb.svelte +2 -2
- package/dist/thumbnail/button-group.svelte +2 -2
- package/dist/thumbnail/button.svelte +2 -2
- package/dist/thumbnail/calendar.svelte +2 -2
- package/dist/thumbnail/card.svelte +2 -2
- package/dist/thumbnail/carousel.svelte +2 -2
- package/dist/thumbnail/chart.svelte +2 -2
- package/dist/thumbnail/chat-thread.svelte +2 -2
- package/dist/thumbnail/checkbox.svelte +2 -2
- package/dist/thumbnail/chip-group.svelte +2 -2
- package/dist/thumbnail/chip.svelte +2 -2
- package/dist/thumbnail/chromatic-shift.svelte +2 -2
- package/dist/thumbnail/clipboard.svelte +2 -2
- package/dist/thumbnail/code-block.svelte +2 -2
- package/dist/thumbnail/collapsible.svelte +2 -2
- package/dist/thumbnail/color-picker.svelte +2 -2
- package/dist/thumbnail/combobox.svelte +2 -2
- package/dist/thumbnail/command-palette.svelte +2 -2
- package/dist/thumbnail/commerce-header.svelte +2 -2
- package/dist/thumbnail/comparison-table.svelte +2 -2
- package/dist/thumbnail/container.svelte +2 -2
- package/dist/thumbnail/context-menu.svelte +2 -2
- package/dist/thumbnail/country-select.svelte +2 -2
- package/dist/thumbnail/currency-selector.svelte +2 -2
- package/dist/thumbnail/data-grid.svelte +2 -2
- package/dist/thumbnail/date-field.svelte +2 -2
- package/dist/thumbnail/date-picker.svelte +2 -2
- package/dist/thumbnail/date-range-picker.svelte +2 -2
- package/dist/thumbnail/date-time-input.svelte +2 -2
- package/dist/thumbnail/description-list.svelte +2 -2
- package/dist/thumbnail/dialog.svelte +2 -2
- package/dist/thumbnail/displacement.svelte +2 -2
- package/dist/thumbnail/drag-and-drop.svelte +2 -2
- package/dist/thumbnail/drawer.svelte +2 -2
- package/dist/thumbnail/drop-zone.svelte +2 -2
- package/dist/thumbnail/dropdown-menu.svelte +2 -2
- package/dist/thumbnail/fare-class-picker.svelte +2 -2
- package/dist/thumbnail/field.svelte +2 -2
- package/dist/thumbnail/fieldset.svelte +2 -2
- package/dist/thumbnail/file-select.svelte +2 -2
- package/dist/thumbnail/file-upload.svelte +2 -2
- package/dist/thumbnail/filter-sidebar.svelte +2 -2
- package/dist/thumbnail/flexible-dates-grid.svelte +2 -2
- package/dist/thumbnail/flight-timeline.svelte +2 -2
- package/dist/thumbnail/flip-card.svelte +2 -2
- package/dist/thumbnail/float-button.svelte +2 -2
- package/dist/thumbnail/focus-trap.svelte +2 -2
- package/dist/thumbnail/format-bytes.svelte +2 -2
- package/dist/thumbnail/format-date.svelte +2 -2
- package/dist/thumbnail/format-number.svelte +2 -2
- package/dist/thumbnail/gauge.svelte +2 -2
- package/dist/thumbnail/glow.svelte +2 -2
- package/dist/thumbnail/gradient-mesh.svelte +2 -2
- package/dist/thumbnail/guest-room-selector.svelte +2 -2
- package/dist/thumbnail/halftone.svelte +2 -2
- package/dist/thumbnail/heading.svelte +2 -2
- package/dist/thumbnail/hotel-gallery.svelte +2 -2
- package/dist/thumbnail/hotkey.svelte +2 -2
- package/dist/thumbnail/hover-card.svelte +2 -2
- package/dist/thumbnail/icon.svelte +2 -2
- package/dist/thumbnail/image-comparison.svelte +2 -2
- package/dist/thumbnail/image.svelte +2 -2
- package/dist/thumbnail/infinite-scroll.svelte +2 -2
- package/dist/thumbnail/input-group.svelte +2 -2
- package/dist/thumbnail/input.svelte +2 -2
- package/dist/thumbnail/itinerary-timeline.svelte +2 -2
- package/dist/thumbnail/kbd.svelte +2 -2
- package/dist/thumbnail/label.svelte +2 -2
- package/dist/thumbnail/layout-header-content-footer.svelte +2 -2
- package/dist/thumbnail/layout-header-sidebar-main.svelte +2 -2
- package/dist/thumbnail/layout-sidebar-main.svelte +2 -2
- package/dist/thumbnail/link-preview.svelte +2 -2
- package/dist/thumbnail/link.svelte +2 -2
- package/dist/thumbnail/list.svelte +2 -2
- package/dist/thumbnail/listbox.svelte +2 -2
- package/dist/thumbnail/location-autocomplete.svelte +2 -2
- package/dist/thumbnail/loyalty-points-display.svelte +2 -2
- package/dist/thumbnail/map-list-toggle.svelte +2 -2
- package/dist/thumbnail/map.svelte +2 -2
- package/dist/thumbnail/markdown-renderer.svelte +2 -2
- package/dist/thumbnail/marquee.svelte +2 -2
- package/dist/thumbnail/mask-reveal.svelte +2 -2
- package/dist/thumbnail/mega-menu.svelte +2 -2
- package/dist/thumbnail/menubar.svelte +2 -2
- package/dist/thumbnail/multi-city-search-form.svelte +2 -2
- package/dist/thumbnail/multi-select-combobox.svelte +2 -2
- package/dist/thumbnail/navigation-menu.svelte +2 -2
- package/dist/thumbnail/noise.svelte +2 -2
- package/dist/thumbnail/notification-center.svelte +2 -2
- package/dist/thumbnail/number-input.svelte +2 -2
- package/dist/thumbnail/option-swatch-group.svelte +2 -2
- package/dist/thumbnail/pagination.svelte +2 -2
- package/dist/thumbnail/passenger-class-selector.svelte +2 -2
- package/dist/thumbnail/payment-card-input.svelte +2 -2
- package/dist/thumbnail/phone-input.svelte +2 -2
- package/dist/thumbnail/pin-input.svelte +2 -2
- package/dist/thumbnail/popover.svelte +2 -2
- package/dist/thumbnail/portal.svelte +2 -2
- package/dist/thumbnail/price-calendar.svelte +2 -2
- package/dist/thumbnail/price-summary-panel.svelte +2 -2
- package/dist/thumbnail/progress-ring.svelte +2 -2
- package/dist/thumbnail/progress.svelte +2 -2
- package/dist/thumbnail/promo-code-input.svelte +2 -2
- package/dist/thumbnail/promo-mosaic.svelte +2 -2
- package/dist/thumbnail/prompt-input.svelte +2 -2
- package/dist/thumbnail/qr-code.svelte +2 -2
- package/dist/thumbnail/radio-group.svelte +2 -2
- package/dist/thumbnail/range-calendar.svelte +2 -2
- package/dist/thumbnail/rating.svelte +2 -2
- package/dist/thumbnail/recent-searches.svelte +2 -2
- package/dist/thumbnail/relative-time.svelte +2 -2
- package/dist/thumbnail/result-card-car.svelte +2 -2
- package/dist/thumbnail/result-card-flight.svelte +2 -2
- package/dist/thumbnail/result-card-hotel.svelte +2 -2
- package/dist/thumbnail/reveal.svelte +2 -2
- package/dist/thumbnail/review-card.svelte +2 -2
- package/dist/thumbnail/rich-text-editor.svelte +2 -2
- package/dist/thumbnail/room-type-picker.svelte +2 -2
- package/dist/thumbnail/root.svelte +2 -2
- package/dist/thumbnail/route-map.svelte +2 -2
- package/dist/thumbnail/scroll-area.svelte +2 -2
- package/dist/thumbnail/scroll-to-top.svelte +2 -2
- package/dist/thumbnail/search-form-tabs.svelte +2 -2
- package/dist/thumbnail/seat-map.svelte +2 -2
- package/dist/thumbnail/segmented-control.svelte +2 -2
- package/dist/thumbnail/select.svelte +2 -2
- package/dist/thumbnail/selectable-tile-group.svelte +2 -2
- package/dist/thumbnail/separator.svelte +2 -2
- package/dist/thumbnail/shader-canvas.svelte +2 -2
- package/dist/thumbnail/sidebar.svelte +2 -2
- package/dist/thumbnail/skeleton.svelte +2 -2
- package/dist/thumbnail/slider.svelte +2 -2
- package/dist/thumbnail/sort-bar.svelte +2 -2
- package/dist/thumbnail/spacer.svelte +2 -2
- package/dist/thumbnail/sparkline.svelte +2 -2
- package/dist/thumbnail/spinner.svelte +2 -2
- package/dist/thumbnail/splitter.svelte +2 -2
- package/dist/thumbnail/spotlight.svelte +2 -2
- package/dist/thumbnail/star-rating.svelte +2 -2
- package/dist/thumbnail/stepper.svelte +2 -2
- package/dist/thumbnail/svg.svelte +2 -2
- package/dist/thumbnail/system-map.svelte +2 -2
- package/dist/thumbnail/table-of-contents.svelte +2 -2
- package/dist/thumbnail/table.svelte +2 -2
- package/dist/thumbnail/tabs.svelte +2 -2
- package/dist/thumbnail/tag.svelte +2 -2
- package/dist/thumbnail/tags-input.svelte +2 -2
- package/dist/thumbnail/text.svelte +2 -2
- package/dist/thumbnail/textarea.svelte +2 -2
- package/dist/thumbnail/time-input.svelte +2 -2
- package/dist/thumbnail/timeline.svelte +2 -2
- package/dist/thumbnail/toast.svelte +2 -2
- package/dist/thumbnail/toggle-group.svelte +2 -2
- package/dist/thumbnail/toggle.svelte +2 -2
- package/dist/thumbnail/toolbar.svelte +2 -2
- package/dist/thumbnail/tooltip.svelte +2 -2
- package/dist/thumbnail/tour.svelte +2 -2
- package/dist/thumbnail/transfer.svelte +2 -2
- package/dist/thumbnail/tree.svelte +2 -2
- package/dist/thumbnail/trip-card.svelte +2 -2
- package/dist/thumbnail/trust-badges.svelte +2 -2
- package/dist/thumbnail/typing-indicator.svelte +2 -2
- package/dist/thumbnail/typography.svelte +2 -2
- package/dist/thumbnail/video-embed.svelte +2 -2
- package/dist/thumbnail/virtual-list.svelte +2 -2
- package/dist/thumbnail/visually-hidden.svelte +2 -2
- package/dist/toast/toast-root.svelte +1 -1
- package/dist/tree/tree-item-children.svelte +3 -2
- package/dist/video-embed/video-embed.svelte +2 -1
- package/dist/virtual-list/virtual-list.svelte +9 -5
- package/package.json +2 -2
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
function applyStyles(node: HTMLElement) {
|
|
49
49
|
$effect(() => {
|
|
50
50
|
node.style.cssText = style || '';
|
|
51
|
-
node.style.setProperty('
|
|
52
|
-
node.style.setProperty('
|
|
51
|
+
node.style.setProperty('--_filter', filterString ?? 'none');
|
|
52
|
+
node.style.setProperty('--_blend', blendMode ?? 'normal');
|
|
53
53
|
});
|
|
54
54
|
}
|
|
55
55
|
</script>
|
|
@@ -61,5 +61,7 @@
|
|
|
61
61
|
<style>
|
|
62
62
|
[data-adjust] {
|
|
63
63
|
border-radius: inherit;
|
|
64
|
+
filter: var(--_filter, none);
|
|
65
|
+
mix-blend-mode: var(--_blend, normal);
|
|
64
66
|
}
|
|
65
67
|
</style>
|
|
@@ -31,13 +31,13 @@
|
|
|
31
31
|
|
|
32
32
|
function setTrackBg(node: HTMLDivElement) {
|
|
33
33
|
$effect(() => {
|
|
34
|
-
node.style.setProperty('
|
|
34
|
+
node.style.setProperty('--_track-bg', `linear-gradient(to right, transparent, ${color})`);
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
function setSwatchBg(node: HTMLDivElement) {
|
|
39
39
|
$effect(() => {
|
|
40
|
-
node.style.setProperty('
|
|
40
|
+
node.style.setProperty('--_swatch-bg', swatchColor);
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
</script>
|
|
@@ -96,6 +96,7 @@
|
|
|
96
96
|
position: absolute;
|
|
97
97
|
inset: 0;
|
|
98
98
|
border-radius: var(--dry-radius-full);
|
|
99
|
+
background: var(--_track-bg, linear-gradient(to right, transparent, hsl(230, 65%, 55%)));
|
|
99
100
|
}
|
|
100
101
|
|
|
101
102
|
[data-alpha-slider-input] {
|
|
@@ -148,6 +149,7 @@
|
|
|
148
149
|
[data-alpha-slider-swatch] {
|
|
149
150
|
position: absolute;
|
|
150
151
|
inset: 0;
|
|
152
|
+
background: var(--_swatch-bg, hsl(230, 65%, 55%));
|
|
151
153
|
}
|
|
152
154
|
|
|
153
155
|
[data-alpha-slider-value-label] {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
function applyRatio(node: HTMLElement) {
|
|
13
13
|
$effect(() => {
|
|
14
|
-
node.style.setProperty('
|
|
14
|
+
node.style.setProperty('--_ratio', String(ratio));
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
</script>
|
|
@@ -23,5 +23,6 @@
|
|
|
23
23
|
<style>
|
|
24
24
|
div {
|
|
25
25
|
overflow: hidden;
|
|
26
|
+
aspect-ratio: var(--_ratio, 16 / 9);
|
|
26
27
|
}
|
|
27
28
|
</style>
|
|
@@ -116,8 +116,11 @@
|
|
|
116
116
|
$effect(() => {
|
|
117
117
|
node.style.cssText = style || '';
|
|
118
118
|
if (customPalette?.[0]) node.style.setProperty('--dry-aurora-color-1', customPalette[0]);
|
|
119
|
+
else node.style.removeProperty('--dry-aurora-color-1');
|
|
119
120
|
if (customPalette?.[1]) node.style.setProperty('--dry-aurora-color-2', customPalette[1]);
|
|
121
|
+
else node.style.removeProperty('--dry-aurora-color-2');
|
|
120
122
|
if (customPalette?.[2]) node.style.setProperty('--dry-aurora-color-3', customPalette[2]);
|
|
123
|
+
else node.style.removeProperty('--dry-aurora-color-3');
|
|
121
124
|
node.style.setProperty('--dry-aurora-duration', speedDuration);
|
|
122
125
|
node.style.setProperty(
|
|
123
126
|
'--dry-aurora-intensity',
|
|
@@ -129,8 +132,11 @@
|
|
|
129
132
|
|
|
130
133
|
function applyBackdropStyles(node: HTMLElement) {
|
|
131
134
|
$effect(() => {
|
|
132
|
-
node.style.setProperty('
|
|
133
|
-
node.style.
|
|
135
|
+
if (blendMode) node.style.setProperty('--_aurora-backdrop-blend', blendMode);
|
|
136
|
+
else node.style.removeProperty('--_aurora-backdrop-blend');
|
|
137
|
+
if (layerOpacity != null)
|
|
138
|
+
node.style.setProperty('--_aurora-backdrop-opacity', String(layerOpacity));
|
|
139
|
+
else node.style.removeProperty('--_aurora-backdrop-opacity');
|
|
134
140
|
});
|
|
135
141
|
}
|
|
136
142
|
</script>
|
|
@@ -163,6 +169,8 @@
|
|
|
163
169
|
--dry-aurora-angle: 0deg;
|
|
164
170
|
--dry-aurora-shift: 0%;
|
|
165
171
|
--dry-aurora-duration: 18s;
|
|
172
|
+
--dry-aurora-intensity: 80;
|
|
173
|
+
--dry-aurora-waviness: 50;
|
|
166
174
|
--dry-aurora-surface: linear-gradient(
|
|
167
175
|
145deg,
|
|
168
176
|
color-mix(in srgb, var(--dry-color-bg-base) 84%, var(--dry-color-bg-overlay)),
|
|
@@ -215,6 +223,8 @@
|
|
|
215
223
|
overflow: hidden;
|
|
216
224
|
border-radius: inherit;
|
|
217
225
|
z-index: 0;
|
|
226
|
+
mix-blend-mode: var(--_aurora-backdrop-blend, normal);
|
|
227
|
+
opacity: var(--_aurora-backdrop-opacity, 1);
|
|
218
228
|
}
|
|
219
229
|
|
|
220
230
|
[data-aurora-layer] {
|
package/dist/beam/beam.svelte
CHANGED
|
@@ -28,36 +28,23 @@
|
|
|
28
28
|
|
|
29
29
|
const clampedIntensity = $derived(`${Math.max(0, Math.min(100, intensity))}`);
|
|
30
30
|
const speedValue = $derived(`${Math.max(0, speed)}s`);
|
|
31
|
-
const gradientString = $derived(
|
|
32
|
-
`linear-gradient(${angle}deg, transparent 0%, transparent calc(50% - ${width}px), ${color} 50%, transparent calc(50% + ${width}px), transparent 100%)`
|
|
33
|
-
);
|
|
34
|
-
const rootStyle = $derived.by(() => {
|
|
35
|
-
const declarations = [
|
|
36
|
-
style,
|
|
37
|
-
`--dry-beam-speed: ${speedValue}`,
|
|
38
|
-
`--dry-beam-intensity: ${clampedIntensity}`,
|
|
39
|
-
`--dry-beam-width: ${width}px`,
|
|
40
|
-
blendMode ? `--dry-beam-blend: ${blendMode}` : null
|
|
41
|
-
].filter(Boolean);
|
|
42
|
-
return declarations.join('; ');
|
|
43
|
-
});
|
|
44
|
-
const layerStyle = $derived(`background-image: ${gradientString};`);
|
|
45
31
|
|
|
46
32
|
function applyRootStyles(node: HTMLElement) {
|
|
47
33
|
$effect(() => {
|
|
48
|
-
node.style.cssText =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
node.style.
|
|
34
|
+
node.style.cssText = style || '';
|
|
35
|
+
node.style.setProperty('--dry-beam-color', color);
|
|
36
|
+
node.style.setProperty('--dry-beam-angle', `${angle}deg`);
|
|
37
|
+
node.style.setProperty('--dry-beam-speed', speedValue);
|
|
38
|
+
node.style.setProperty('--dry-beam-intensity', clampedIntensity);
|
|
39
|
+
node.style.setProperty('--dry-beam-width', `${width}px`);
|
|
40
|
+
if (blendMode) node.style.setProperty('--dry-beam-blend', blendMode);
|
|
41
|
+
else node.style.removeProperty('--dry-beam-blend');
|
|
55
42
|
});
|
|
56
43
|
}
|
|
57
44
|
</script>
|
|
58
45
|
|
|
59
46
|
<div data-beam class={className} {...rest} {@attach applyRootStyles}>
|
|
60
|
-
<div data-beam-layer
|
|
47
|
+
<div data-beam-layer></div>
|
|
61
48
|
{#if children}
|
|
62
49
|
{@render children()}
|
|
63
50
|
{/if}
|
|
@@ -65,6 +52,12 @@
|
|
|
65
52
|
|
|
66
53
|
<style>
|
|
67
54
|
[data-beam] {
|
|
55
|
+
--dry-beam-color: var(--dry-color-fill-brand);
|
|
56
|
+
--dry-beam-angle: 45deg;
|
|
57
|
+
--dry-beam-speed: 3s;
|
|
58
|
+
--dry-beam-intensity: 70;
|
|
59
|
+
--dry-beam-width: 2px;
|
|
60
|
+
|
|
68
61
|
position: relative;
|
|
69
62
|
overflow: hidden;
|
|
70
63
|
border-radius: inherit;
|
|
@@ -74,6 +67,14 @@
|
|
|
74
67
|
position: absolute;
|
|
75
68
|
inset: 0;
|
|
76
69
|
pointer-events: none;
|
|
70
|
+
background-image: linear-gradient(
|
|
71
|
+
var(--dry-beam-angle, 45deg),
|
|
72
|
+
transparent 0%,
|
|
73
|
+
transparent calc(50% - var(--dry-beam-width, 2px)),
|
|
74
|
+
var(--dry-beam-color, var(--dry-color-fill-brand)) 50%,
|
|
75
|
+
transparent calc(50% + var(--dry-beam-width, 2px)),
|
|
76
|
+
transparent 100%
|
|
77
|
+
);
|
|
77
78
|
background-size: 300% 300%;
|
|
78
79
|
opacity: calc(var(--dry-beam-intensity, 70) / 100);
|
|
79
80
|
mix-blend-mode: var(--dry-beam-blend, var(--dry-beam-default-blend, multiply));
|
|
@@ -16,6 +16,9 @@
|
|
|
16
16
|
const offsetX = $derived(Math.round(offset * Math.cos((angle * Math.PI) / 180)));
|
|
17
17
|
const offsetY = $derived(Math.round(offset * Math.sin((angle * Math.PI) / 180)));
|
|
18
18
|
|
|
19
|
+
// Flash-on-load: filter references a runtime-generated SVG filter ID (url(#${filterId})),
|
|
20
|
+
// so no CSS default is possible — the ID isn't known until mount. The SVG <filter> element
|
|
21
|
+
// is in the same template, so the @attach sets it immediately on first paint.
|
|
19
22
|
function applyFilterStyles(node: HTMLElement) {
|
|
20
23
|
node.style.cssText = style || '';
|
|
21
24
|
node.style.setProperty('filter', `url(#${filterId})`);
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
function applyStyles(node: HTMLElement) {
|
|
21
21
|
$effect(() => {
|
|
22
22
|
node.style.cssText = style || '';
|
|
23
|
-
node.style.setProperty('--
|
|
23
|
+
node.style.setProperty('--_alpha-rgb', rgbStr);
|
|
24
24
|
});
|
|
25
25
|
}
|
|
26
26
|
</script>
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
[data-cp-slider] {
|
|
56
|
+
--dry-alpha-rgb: var(--_alpha-rgb, 255, 0, 0);
|
|
56
57
|
--dry-slider-track-height: var(--dry-color-picker-slider-track-height);
|
|
57
58
|
--dry-slider-thumb-size: var(--dry-color-picker-slider-thumb-size);
|
|
58
59
|
|
|
@@ -109,11 +109,11 @@
|
|
|
109
109
|
function applyStyles(node: HTMLElement) {
|
|
110
110
|
$effect(() => {
|
|
111
111
|
node.style.cssText = style || '';
|
|
112
|
-
node.style.setProperty('--
|
|
113
|
-
node.style.setProperty('--
|
|
114
|
-
node.style.setProperty('--
|
|
115
|
-
node.style.setProperty('--
|
|
116
|
-
node.style.setProperty('--
|
|
112
|
+
node.style.setProperty('--_area-w', `${width}px`);
|
|
113
|
+
node.style.setProperty('--_area-h', `${height}px`);
|
|
114
|
+
node.style.setProperty('--_ind-left', `${indicatorX}px`);
|
|
115
|
+
node.style.setProperty('--_ind-top', `${indicatorY}px`);
|
|
116
|
+
node.style.setProperty('--_ind-color', ctx.hex);
|
|
117
117
|
});
|
|
118
118
|
}
|
|
119
119
|
</script>
|
|
@@ -137,6 +137,12 @@
|
|
|
137
137
|
|
|
138
138
|
<style>
|
|
139
139
|
[data-cp-area] {
|
|
140
|
+
--dry-color-picker-area-width: var(--_area-w, 200px);
|
|
141
|
+
--dry-color-picker-area-height: var(--_area-h, 150px);
|
|
142
|
+
--dry-color-picker-indicator-left: var(--_ind-left, 0px);
|
|
143
|
+
--dry-color-picker-indicator-top: var(--_ind-top, 0px);
|
|
144
|
+
--dry-color-picker-indicator-color: var(--_ind-color, #ff0000);
|
|
145
|
+
|
|
140
146
|
position: relative;
|
|
141
147
|
display: grid;
|
|
142
148
|
grid-template-columns: var(--dry-color-picker-area-width);
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
function applyStyles(node: HTMLElement) {
|
|
37
37
|
$effect(() => {
|
|
38
38
|
node.style.cssText = style || '';
|
|
39
|
-
node.style.setProperty('--
|
|
40
|
-
node.style.setProperty('--
|
|
39
|
+
node.style.setProperty('--_swatch-color', displayColor);
|
|
40
|
+
node.style.setProperty('--_swatch-opacity', String(displayAlpha));
|
|
41
41
|
});
|
|
42
42
|
}
|
|
43
43
|
</script>
|
|
@@ -58,6 +58,9 @@
|
|
|
58
58
|
|
|
59
59
|
<style>
|
|
60
60
|
[data-cp-swatch] {
|
|
61
|
+
--dry-swatch-color: var(--_swatch-color, #ff0000);
|
|
62
|
+
--dry-swatch-opacity: var(--_swatch-opacity, 1);
|
|
63
|
+
|
|
61
64
|
height: var(--dry-color-picker-swatch-size);
|
|
62
65
|
aspect-ratio: 1;
|
|
63
66
|
border-radius: var(--dry-radius-md);
|
|
@@ -84,7 +87,7 @@
|
|
|
84
87
|
position: absolute;
|
|
85
88
|
inset: 0;
|
|
86
89
|
background: var(--dry-swatch-color);
|
|
87
|
-
opacity: var(--dry-swatch-opacity
|
|
90
|
+
opacity: var(--dry-swatch-opacity);
|
|
88
91
|
border-radius: inherit;
|
|
89
92
|
}
|
|
90
93
|
|
|
@@ -69,6 +69,9 @@
|
|
|
69
69
|
return () => mql.removeEventListener('change', handler);
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
+
// Flash-on-load: filter references a runtime-generated SVG filter ID (url(#${filterId})),
|
|
73
|
+
// so no CSS default is possible — the ID isn't known until mount. The SVG <filter> element
|
|
74
|
+
// is in the same template, so the @attach sets it immediately on first paint.
|
|
72
75
|
function applyFilterStyles(node: HTMLElement) {
|
|
73
76
|
$effect(() => {
|
|
74
77
|
node.style.cssText = style || '';
|
package/dist/gauge/gauge.svelte
CHANGED
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
|
|
62
62
|
function applyFillStroke(node: SVGElement) {
|
|
63
63
|
$effect(() => {
|
|
64
|
-
if (thresholdColor) node.style.setProperty('stroke', thresholdColor);
|
|
65
|
-
else node.style.removeProperty('stroke');
|
|
64
|
+
if (thresholdColor) node.style.setProperty('--_gauge-fill-stroke', thresholdColor);
|
|
65
|
+
else node.style.removeProperty('--_gauge-fill-stroke');
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
</script>
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
|
|
116
116
|
[data-gauge] [data-part='fill'] {
|
|
117
117
|
fill: none;
|
|
118
|
-
stroke: var(--dry-gauge-fill-color);
|
|
118
|
+
stroke: var(--_gauge-fill-stroke, var(--dry-gauge-fill-color));
|
|
119
119
|
stroke-width: var(--dry-gauge-stroke-width);
|
|
120
120
|
stroke-linecap: round;
|
|
121
121
|
transition: d var(--dry-duration-normal, 0.3s) var(--dry-ease-default, ease);
|
|
@@ -57,6 +57,9 @@
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
+
// Flash-on-load: background is a computed conic-gradient with a dynamic number of stops
|
|
61
|
+
// based on rayCount, so no static CSS default is possible. The layer is invisible without
|
|
62
|
+
// its gradient anyway (transparent), so no visible flash occurs.
|
|
60
63
|
function applyLayerStyles(node: HTMLElement) {
|
|
61
64
|
$effect(() => {
|
|
62
65
|
node.style.setProperty('background', gradientString);
|
|
@@ -79,6 +82,13 @@
|
|
|
79
82
|
|
|
80
83
|
<style>
|
|
81
84
|
[data-god-rays] {
|
|
85
|
+
--dry-rays-color: rgba(255, 255, 255, 0.15);
|
|
86
|
+
--dry-rays-cx: 50%;
|
|
87
|
+
--dry-rays-cy: 0%;
|
|
88
|
+
--dry-rays-intensity: 60;
|
|
89
|
+
--dry-rays-blend: screen;
|
|
90
|
+
--dry-rays-speed: 0s;
|
|
91
|
+
|
|
82
92
|
position: relative;
|
|
83
93
|
overflow: hidden;
|
|
84
94
|
border-radius: inherit;
|
|
@@ -25,7 +25,8 @@
|
|
|
25
25
|
|
|
26
26
|
function syncStyles(node: HTMLElement) {
|
|
27
27
|
$effect(() => {
|
|
28
|
-
node.style.cssText =
|
|
28
|
+
node.style.cssText = style || '';
|
|
29
|
+
node.style.setProperty('--dry-image-comparison-position', `${position}%`);
|
|
29
30
|
});
|
|
30
31
|
}
|
|
31
32
|
|
|
@@ -120,6 +121,7 @@
|
|
|
120
121
|
|
|
121
122
|
<style>
|
|
122
123
|
[data-image-comparison] {
|
|
124
|
+
--dry-image-comparison-position: 50%;
|
|
123
125
|
--dry-image-comparison-handle-width: 2px;
|
|
124
126
|
--dry-image-comparison-handle-color: var(--dry-color-bg-overlay);
|
|
125
127
|
--dry-image-comparison-arrow-color: var(--dry-color-text-strong);
|
|
@@ -60,17 +60,9 @@
|
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
-
function
|
|
63
|
+
function applyFlowDirection(node: HTMLElement) {
|
|
64
64
|
$effect(() => {
|
|
65
|
-
node.style.setProperty('
|
|
66
|
-
node.style.setProperty('gap', 'var(--marquee-gap)');
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
function applyContentStyles(node: HTMLElement) {
|
|
71
|
-
$effect(() => {
|
|
72
|
-
node.style.setProperty('grid-auto-flow', isVertical ? 'row' : 'column');
|
|
73
|
-
node.style.setProperty('gap', 'var(--marquee-gap)');
|
|
65
|
+
node.style.setProperty('--_flow', isVertical ? 'row' : 'column');
|
|
74
66
|
});
|
|
75
67
|
}
|
|
76
68
|
</script>
|
|
@@ -85,11 +77,11 @@
|
|
|
85
77
|
use:applyRootStyles
|
|
86
78
|
{...rest}
|
|
87
79
|
>
|
|
88
|
-
<div data-marquee-track use:
|
|
89
|
-
<div data-marquee-content bind:this={contentEl} use:
|
|
80
|
+
<div data-marquee-track use:applyFlowDirection>
|
|
81
|
+
<div data-marquee-content bind:this={contentEl} use:applyFlowDirection>
|
|
90
82
|
{@render children()}
|
|
91
83
|
</div>
|
|
92
|
-
<div data-marquee-content aria-hidden="true" use:
|
|
84
|
+
<div data-marquee-content aria-hidden="true" use:applyFlowDirection>
|
|
93
85
|
{@render children()}
|
|
94
86
|
</div>
|
|
95
87
|
</div>
|
|
@@ -107,6 +99,8 @@
|
|
|
107
99
|
|
|
108
100
|
[data-marquee-track] {
|
|
109
101
|
display: grid;
|
|
102
|
+
grid-auto-flow: var(--_flow, column);
|
|
103
|
+
gap: var(--marquee-gap, 1rem);
|
|
110
104
|
animation-duration: var(--dry-marquee-speed);
|
|
111
105
|
animation-timing-function: linear;
|
|
112
106
|
animation-iteration-count: infinite;
|
|
@@ -115,6 +109,8 @@
|
|
|
115
109
|
|
|
116
110
|
[data-marquee-content] {
|
|
117
111
|
display: grid;
|
|
112
|
+
grid-auto-flow: var(--_flow, column);
|
|
113
|
+
gap: var(--marquee-gap, 1rem);
|
|
118
114
|
}
|
|
119
115
|
|
|
120
116
|
[data-marquee][data-direction='left'] [data-marquee-track],
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
const segment = getSegment();
|
|
62
62
|
const widthPct = max > 0 ? Math.min(Math.max((segment.value / max) * 100, 0), 100) : 0;
|
|
63
63
|
node.style.setProperty('width', `${widthPct}%`);
|
|
64
|
-
node.style.setProperty('
|
|
64
|
+
node.style.setProperty('--_segment-bg', segment.color);
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
|
|
@@ -75,9 +75,11 @@
|
|
|
75
75
|
$effect(() => {
|
|
76
76
|
const threshold = getThreshold();
|
|
77
77
|
const leftPct = max > 0 ? Math.min(Math.max((threshold.value / max) * 100, 0), 100) : 0;
|
|
78
|
-
node.style.setProperty('left', `${leftPct}%`);
|
|
78
|
+
node.style.setProperty('--_threshold-left', `${leftPct}%`);
|
|
79
79
|
if (threshold.color) {
|
|
80
|
-
node.style.setProperty('
|
|
80
|
+
node.style.setProperty('--_threshold-color', threshold.color);
|
|
81
|
+
} else {
|
|
82
|
+
node.style.removeProperty('--_threshold-color');
|
|
81
83
|
}
|
|
82
84
|
});
|
|
83
85
|
}
|
|
@@ -236,6 +238,7 @@
|
|
|
236
238
|
}
|
|
237
239
|
|
|
238
240
|
[data-part='segment'] {
|
|
241
|
+
background-color: var(--_segment-bg, var(--dry-progress-bar));
|
|
239
242
|
height: 100%;
|
|
240
243
|
transition: width var(--dry-duration-slow, 300ms) ease;
|
|
241
244
|
}
|
|
@@ -260,7 +263,8 @@
|
|
|
260
263
|
position: absolute;
|
|
261
264
|
top: -4px;
|
|
262
265
|
bottom: -4px;
|
|
263
|
-
|
|
266
|
+
left: var(--_threshold-left, 0%);
|
|
267
|
+
border-inline-start: 2px solid var(--_threshold-color, var(--dry-color-text-strong, #1a1a2e));
|
|
264
268
|
opacity: 0.3;
|
|
265
269
|
z-index: 1;
|
|
266
270
|
}
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
if (delayValue) node.style.setProperty('--dry-reveal-delay', delayValue);
|
|
67
67
|
if (durationValue) node.style.setProperty('--dry-reveal-duration', durationValue);
|
|
68
68
|
if (distanceValue) node.style.setProperty('--dry-reveal-distance', distanceValue);
|
|
69
|
-
node.style.setProperty('
|
|
69
|
+
node.style.setProperty('--_blend-mode', blendMode ?? 'normal');
|
|
70
70
|
});
|
|
71
71
|
}
|
|
72
72
|
|
|
@@ -137,8 +137,10 @@
|
|
|
137
137
|
--dry-reveal-offset-y: 0px;
|
|
138
138
|
--dry-reveal-mask-top: 0%;
|
|
139
139
|
--dry-reveal-mask-radius: 0px;
|
|
140
|
+
--_blend-mode: normal;
|
|
140
141
|
|
|
141
142
|
display: block;
|
|
143
|
+
mix-blend-mode: var(--_blend-mode);
|
|
142
144
|
opacity: var(--dry-reveal-hidden-opacity);
|
|
143
145
|
transform: translate3d(0, var(--dry-reveal-offset-y), 0) scale(var(--dry-reveal-hidden-scale));
|
|
144
146
|
filter: blur(var(--dry-reveal-hidden-blur));
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
function setAspectRatio(node: HTMLDivElement) {
|
|
71
71
|
$effect(() => {
|
|
72
72
|
if (aspectRatio) {
|
|
73
|
-
node.style.setProperty('
|
|
73
|
+
node.style.setProperty('--_ratio', aspectRatio);
|
|
74
74
|
} else {
|
|
75
|
-
node.style.removeProperty('
|
|
75
|
+
node.style.removeProperty('--_ratio');
|
|
76
76
|
}
|
|
77
77
|
});
|
|
78
78
|
}
|
|
@@ -116,6 +116,7 @@
|
|
|
116
116
|
position: relative;
|
|
117
117
|
overflow: hidden;
|
|
118
118
|
border-radius: inherit;
|
|
119
|
+
aspect-ratio: var(--_ratio);
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
</style>
|
|
@@ -17,9 +17,9 @@
|
|
|
17
17
|
node.style.removeProperty('width');
|
|
18
18
|
}
|
|
19
19
|
if (height) {
|
|
20
|
-
node.style.setProperty('
|
|
20
|
+
node.style.setProperty('--_h', height);
|
|
21
21
|
} else {
|
|
22
|
-
node.style.removeProperty('
|
|
22
|
+
node.style.removeProperty('--_h');
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
}
|
|
@@ -59,6 +59,9 @@
|
|
|
59
59
|
background-size: 200% 100%;
|
|
60
60
|
animation: skeleton-shimmer 1.5s ease-in-out infinite;
|
|
61
61
|
border-radius: var(--dry-skeleton-radius);
|
|
62
|
+
/* width set via @attach inline style (lint bans width in CSS);
|
|
63
|
+
--_h set by @attach when height prop is provided,
|
|
64
|
+
overriding variant defaults via the var() fallback chain */
|
|
62
65
|
}
|
|
63
66
|
|
|
64
67
|
@keyframes skeleton-shimmer {
|
|
@@ -81,17 +84,17 @@
|
|
|
81
84
|
|
|
82
85
|
div[data-variant='text'] {
|
|
83
86
|
--dry-skeleton-radius: var(--dry-radius-md);
|
|
84
|
-
height: var(--dry-text-base-leading);
|
|
87
|
+
height: var(--_h, var(--dry-text-base-leading));
|
|
85
88
|
}
|
|
86
89
|
|
|
87
90
|
div[data-variant='circular'] {
|
|
88
91
|
--dry-skeleton-radius: var(--dry-radius-full);
|
|
89
92
|
aspect-ratio: 1;
|
|
90
|
-
height: var(--dry-space-10);
|
|
93
|
+
height: var(--_h, var(--dry-space-10));
|
|
91
94
|
}
|
|
92
95
|
|
|
93
96
|
div[data-variant='rectangular'] {
|
|
94
97
|
--dry-skeleton-radius: var(--dry-radius-sm);
|
|
95
|
-
height: var(--dry-space-16);
|
|
98
|
+
height: var(--_h, var(--dry-space-16));
|
|
96
99
|
}
|
|
97
100
|
</style>
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
function applyGridTemplate(node: HTMLElement) {
|
|
34
34
|
$effect(() => {
|
|
35
35
|
if (orientation === 'vertical') {
|
|
36
|
-
node.style.
|
|
37
|
-
node.style.
|
|
36
|
+
node.style.removeProperty('--_splitter-columns');
|
|
37
|
+
node.style.setProperty('--_splitter-rows', trackTemplate);
|
|
38
38
|
} else {
|
|
39
|
-
node.style.
|
|
40
|
-
node.style.
|
|
39
|
+
node.style.removeProperty('--_splitter-rows');
|
|
40
|
+
node.style.setProperty('--_splitter-columns', trackTemplate);
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
43
|
}
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
[data-part='root'] {
|
|
114
114
|
display: grid;
|
|
115
115
|
grid-auto-flow: column;
|
|
116
|
+
grid-template-columns: var(--_splitter-columns, 1fr max-content 1fr);
|
|
116
117
|
height: 100%;
|
|
117
118
|
min-height: 0;
|
|
118
119
|
align-items: stretch;
|
|
@@ -120,5 +121,7 @@
|
|
|
120
121
|
|
|
121
122
|
[data-part='root'][data-orientation='vertical'] {
|
|
122
123
|
grid-auto-flow: row;
|
|
124
|
+
grid-template-columns: initial;
|
|
125
|
+
grid-template-rows: var(--_splitter-rows, 1fr max-content 1fr);
|
|
123
126
|
}
|
|
124
127
|
</style>
|
|
@@ -130,6 +130,7 @@
|
|
|
130
130
|
node.style.setProperty('--dry-spotlight-x', x);
|
|
131
131
|
node.style.setProperty('--dry-spotlight-y', y);
|
|
132
132
|
if (blendMode) node.style.setProperty('--dry-spotlight-blend', blendMode);
|
|
133
|
+
else node.style.removeProperty('--dry-spotlight-blend');
|
|
133
134
|
});
|
|
134
135
|
}
|
|
135
136
|
</script>
|
|
@@ -154,6 +155,12 @@
|
|
|
154
155
|
|
|
155
156
|
<style>
|
|
156
157
|
[data-spotlight] {
|
|
158
|
+
--dry-spotlight-radius: 260px;
|
|
159
|
+
--dry-spotlight-intensity: 26%;
|
|
160
|
+
--dry-spotlight-color: rgba(59, 130, 246, 0.28);
|
|
161
|
+
--dry-spotlight-x: 50%;
|
|
162
|
+
--dry-spotlight-y: 50%;
|
|
163
|
+
|
|
157
164
|
position: relative;
|
|
158
165
|
isolation: isolate;
|
|
159
166
|
overflow: hidden;
|
package/dist/themes/default.css
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
|
-
|
|
1
|
+
*,
|
|
2
|
+
*::before,
|
|
3
|
+
*::after {
|
|
4
|
+
box-sizing: border-box;
|
|
5
|
+
margin: 0;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
html {
|
|
2
9
|
font-family: var(--dry-font-sans);
|
|
10
|
+
color: var(--dry-color-text-strong);
|
|
11
|
+
background: var(--dry-color-bg-base);
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
body {
|
|
16
|
+
margin: 0;
|
|
17
|
+
min-height: 100dvh;
|
|
3
18
|
}
|
|
4
19
|
|
|
5
20
|
code, pre, kbd, samp {
|