@pathscale/ui 2.6.1 → 2.6.3
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/components/_shared/overlayPosition.js +4 -4
- package/dist/components/calendar/Calendar.generated.js +2 -2
- package/dist/components/checkbox/Checkbox.generated.js +2 -2
- package/dist/components/color-field/ColorField.generated.js +2 -2
- package/dist/components/color-picker/ColorPicker.generated.js +2 -2
- package/dist/components/color-slider/ColorSlider.generated.js +2 -2
- package/dist/components/color-wheel-flower/ColorWheelFlower.generated.js +4 -4
- package/dist/components/combo-box/ComboBox.generated.js +5 -5
- package/dist/components/composer/Composer.generated.js +2 -2
- package/dist/components/date-range-picker/DateRangePicker.generated.js +2 -2
- package/dist/components/dialog/Dialog.generated.js +13 -13
- package/dist/components/drawer/Drawer.generated.js +22 -24
- package/dist/components/dropdown/Dropdown.generated.js +5 -5
- package/dist/components/immersive-landing/useImmersiveLanding.js +4 -4
- package/dist/components/input-otp/InputOTP.generated.js +4 -4
- package/dist/components/list-box/ListBoxItem.generated.js +2 -2
- package/dist/components/live-chat/LiveChatPanel.generated.js +4 -4
- package/dist/components/menu/MenuItem.generated.js +2 -2
- package/dist/components/metal-border/MetalBorder.generated.js +11 -10
- package/dist/components/popover/Popover.generated.js +4 -4
- package/dist/components/radio/Radio.css +17 -0
- package/dist/components/scroll-area/ScrollArea.generated.js +2 -2
- package/dist/components/scroll-area/useScrollArea.js +4 -4
- package/dist/components/select/Select.generated.js +6 -6
- package/dist/components/size-picker/sizeStore.js +2 -2
- package/dist/components/switch/Switch.css +16 -4
- package/dist/components/tabs/Tabs.generated.js +6 -6
- package/dist/components/theme-color-picker/ThemeColorPicker.generated.js +6 -6
- package/dist/components/theme-color-picker/hueShift.js +2 -2
- package/dist/components/toast/Toast.generated.js +4 -4
- package/dist/components/tooltip/Tooltip.generated.js +2 -2
- package/dist/components/video-preview/VideoPreview.generated.js +2 -2
- package/dist/hooks/date/usePickerOpenState.js +4 -4
- package/dist/hooks/table/useAnchoredOverlayPosition.js +4 -4
- package/dist/layouts.manifest.json +1 -1
- package/dist/motion/solid/AnimatedCollapse.js +2 -2
- package/dist/motion/solid/MotionDiv.js +2 -2
- package/dist/motion/solid/Presence.js +2 -2
- package/dist/primitives/streaming/useStreamingSubscription.js +2 -2
- package/dist/purge-manifest.json +12 -2
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { className, effect, insert, memo, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./MetalBorder.css";
|
|
4
|
-
import {
|
|
4
|
+
import { createSignal, createTrackedEffect, omit, onSettled } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { prefersReducedMotion } from "../../motion/reduced-motion.js";
|
|
7
7
|
import { CLASSES, componentRecipe } from "./MetalBorder.recipe.js";
|
|
@@ -157,7 +157,7 @@ const __solidLayoutMetalBorder = (_stable, p)=>{
|
|
|
157
157
|
]
|
|
158
158
|
});
|
|
159
159
|
}
|
|
160
|
-
|
|
160
|
+
const cleanup = ()=>{
|
|
161
161
|
resizeObserver?.disconnect();
|
|
162
162
|
intersectionObserver?.disconnect();
|
|
163
163
|
mutationObserver?.disconnect();
|
|
@@ -166,8 +166,8 @@ const __solidLayoutMetalBorder = (_stable, p)=>{
|
|
|
166
166
|
detachGlow();
|
|
167
167
|
if (instance) destroyInstance(instance);
|
|
168
168
|
instance = null;
|
|
169
|
-
}
|
|
170
|
-
if (!canvasRef || !hostRef) return;
|
|
169
|
+
};
|
|
170
|
+
if (!canvasRef || !hostRef) return cleanup;
|
|
171
171
|
try {
|
|
172
172
|
instance = createInstance({
|
|
173
173
|
hostCanvas: canvasRef,
|
|
@@ -183,7 +183,7 @@ const __solidLayoutMetalBorder = (_stable, p)=>{
|
|
|
183
183
|
setIsWebGlUnavailable(false);
|
|
184
184
|
} catch {
|
|
185
185
|
setIsWebGlUnavailable(true);
|
|
186
|
-
return;
|
|
186
|
+
return cleanup;
|
|
187
187
|
}
|
|
188
188
|
if (glow()) attachGlow();
|
|
189
189
|
resizeObserver = new ResizeObserver(()=>{
|
|
@@ -204,8 +204,9 @@ const __solidLayoutMetalBorder = (_stable, p)=>{
|
|
|
204
204
|
});
|
|
205
205
|
intersectionObserver.observe(hostRef);
|
|
206
206
|
}
|
|
207
|
+
return cleanup;
|
|
207
208
|
});
|
|
208
|
-
|
|
209
|
+
createTrackedEffect(()=>{
|
|
209
210
|
syncResolvedTheme();
|
|
210
211
|
if (!instance) return;
|
|
211
212
|
updateInstance(instance, {
|
|
@@ -217,13 +218,13 @@ const __solidLayoutMetalBorder = (_stable, p)=>{
|
|
|
217
218
|
theme: resolvedTheme()
|
|
218
219
|
});
|
|
219
220
|
});
|
|
220
|
-
|
|
221
|
+
createTrackedEffect(()=>{
|
|
221
222
|
if (!instance) return;
|
|
222
223
|
updateInstance(instance, {
|
|
223
224
|
opacityMul: strength()
|
|
224
225
|
});
|
|
225
226
|
});
|
|
226
|
-
|
|
227
|
+
createTrackedEffect(()=>{
|
|
227
228
|
if (!instance) return;
|
|
228
229
|
updateInstance(instance, {
|
|
229
230
|
kind: kind(),
|
|
@@ -241,13 +242,13 @@ const __solidLayoutMetalBorder = (_stable, p)=>{
|
|
|
241
242
|
});
|
|
242
243
|
}
|
|
243
244
|
});
|
|
244
|
-
|
|
245
|
+
createTrackedEffect(()=>{
|
|
245
246
|
if (!instance) return;
|
|
246
247
|
updateInstance(instance, {
|
|
247
248
|
paused: effectivePaused()
|
|
248
249
|
});
|
|
249
250
|
});
|
|
250
|
-
|
|
251
|
+
createTrackedEffect(()=>{
|
|
251
252
|
if (!instance) return;
|
|
252
253
|
if (glow()) attachGlow();
|
|
253
254
|
else if (glowHandles) detachGlow();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Portal, createComponent, insert, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./Popover.css";
|
|
4
|
-
import { Show, createContext,
|
|
4
|
+
import { Show, createContext, createMemo, createSignal, createTrackedEffect, omit, onSettled, useContext } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import "../_shared/material.css";
|
|
7
7
|
import { createOverlayPosition } from "../_shared/overlayPosition.js";
|
|
@@ -57,10 +57,10 @@ const __solidLayoutPopoverRoot = (_stable, p)=>{
|
|
|
57
57
|
};
|
|
58
58
|
document.addEventListener("pointerdown", handlePointerDown);
|
|
59
59
|
document.addEventListener("keydown", handleKeyDown);
|
|
60
|
-
|
|
60
|
+
return ()=>{
|
|
61
61
|
document.removeEventListener("pointerdown", handlePointerDown);
|
|
62
62
|
document.removeEventListener("keydown", handleKeyDown);
|
|
63
|
-
}
|
|
63
|
+
};
|
|
64
64
|
});
|
|
65
65
|
const ctx = {
|
|
66
66
|
isOpen,
|
|
@@ -175,7 +175,7 @@ const __solidLayoutPopoverContent = (_stable, p)=>{
|
|
|
175
175
|
autoFlip: ctx.autoFlip,
|
|
176
176
|
align: ()=>"center"
|
|
177
177
|
});
|
|
178
|
-
|
|
178
|
+
createTrackedEffect(()=>{
|
|
179
179
|
ctx.setPlacement(overlayPosition.placement());
|
|
180
180
|
});
|
|
181
181
|
const style = ()=>{
|
|
@@ -82,10 +82,27 @@
|
|
|
82
82
|
box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-accent) 22%, transparent);
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
+
/*
|
|
86
|
+
* Hover has to reach a radio that carries its own indicator content.
|
|
87
|
+
*
|
|
88
|
+
* The second rule below is `:empty::before`, which is right for the dot this
|
|
89
|
+
* component draws itself: there is nothing to tint but the pseudo-element.
|
|
90
|
+
* A radio given real content — a colour swatch, an icon, a preview — has a
|
|
91
|
+
* non-empty indicator, so that half matched nothing, and the surviving half
|
|
92
|
+
* only moved `border-color` on `.radio__control`. Any consumer that also
|
|
93
|
+
* restyled the control's border then had no hover feedback at all: that is
|
|
94
|
+
* what happened to AgencyZero's colour wheel, where 31 petals gave no
|
|
95
|
+
* indication of which one the pointer was on.
|
|
96
|
+
*
|
|
97
|
+
* So the control lifts on hover as well. `transform` is the one channel a
|
|
98
|
+
* consumer's own border and background overrides cannot silently cancel, and
|
|
99
|
+
* it reads on a petal whose entire surface is already a colour.
|
|
100
|
+
*/
|
|
85
101
|
@media (hover: hover) {
|
|
86
102
|
.radio:hover:not([data-selected="true"]):not([data-disabled="true"]) .radio__control,
|
|
87
103
|
.radio[data-hovered="true"]:not([data-selected="true"]):not([data-disabled="true"]) .radio__control {
|
|
88
104
|
border-color: color-mix(in oklab, var(--color-base-content) 24%, transparent);
|
|
105
|
+
transform: scale(1.12);
|
|
89
106
|
}
|
|
90
107
|
|
|
91
108
|
.radio:hover:not([data-selected="true"]):not([data-disabled="true"]) .radio__indicator:empty::before,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { insert, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./ScrollArea.css";
|
|
4
|
-
import {
|
|
4
|
+
import { createMemo, createTrackedEffect, omit } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { CLASSES, componentRecipe } from "./ScrollArea.recipe.js";
|
|
7
7
|
import { applyControlledScrollAreaVisibility, clearScrollAreaDataAttributes, useScrollArea } from "./useScrollArea.js";
|
|
@@ -23,7 +23,7 @@ const __solidLayoutScrollArea = (_stable, p)=>{
|
|
|
23
23
|
isEnabled,
|
|
24
24
|
onVisibilityChange: ()=>p.onVisibilityChange
|
|
25
25
|
});
|
|
26
|
-
|
|
26
|
+
createTrackedEffect(()=>{
|
|
27
27
|
const el = containerRef;
|
|
28
28
|
if (!el) return;
|
|
29
29
|
if (!isEnabled()) return void clearScrollAreaDataAttributes(el);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createTrackedEffect } from "solid-js";
|
|
2
2
|
const clearScrollAreaDataAttributes = (el)=>{
|
|
3
3
|
delete el.dataset.topScroll;
|
|
4
4
|
delete el.dataset.bottomScroll;
|
|
@@ -50,7 +50,7 @@ const applyAutoVisibilityDataAttributes = (el, orientation, hasScrollBefore, has
|
|
|
50
50
|
delete el.dataset.leftRightScroll;
|
|
51
51
|
};
|
|
52
52
|
const useScrollArea = (props)=>{
|
|
53
|
-
|
|
53
|
+
createTrackedEffect(()=>{
|
|
54
54
|
const el = props.containerRef();
|
|
55
55
|
const isEnabled = props.isEnabled();
|
|
56
56
|
const visibility = props.visibility();
|
|
@@ -86,12 +86,12 @@ const useScrollArea = (props)=>{
|
|
|
86
86
|
});
|
|
87
87
|
const resizeObserver = "u" > typeof ResizeObserver ? new ResizeObserver(()=>checkOverflow()) : void 0;
|
|
88
88
|
resizeObserver?.observe(el);
|
|
89
|
-
|
|
89
|
+
return ()=>{
|
|
90
90
|
el.removeEventListener("scroll", checkOverflow);
|
|
91
91
|
resizeObserver?.disconnect();
|
|
92
92
|
if (null !== rafId) cancelAnimationFrame(rafId);
|
|
93
93
|
prevState = null;
|
|
94
|
-
}
|
|
94
|
+
};
|
|
95
95
|
});
|
|
96
96
|
};
|
|
97
97
|
export { applyControlledScrollAreaVisibility, clearScrollAreaDataAttributes, useScrollArea };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Portal, createComponent, insert, memo, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./Select.css";
|
|
4
|
-
import { createContext,
|
|
4
|
+
import { createContext, createMemo, createSignal, createTrackedEffect, createUniqueId, omit, onCleanup, onSettled, useContext } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { createOverlayPosition } from "../_shared/overlayPosition.js";
|
|
7
7
|
import { CLASSES, componentRecipe } from "./Select.recipe.js";
|
|
@@ -156,14 +156,14 @@ const __solidLayoutSelectRoot = (_stable, p)=>{
|
|
|
156
156
|
setRootRefSignal(el);
|
|
157
157
|
if ("function" == typeof p.ref) p.ref(el);
|
|
158
158
|
};
|
|
159
|
-
|
|
159
|
+
createTrackedEffect(()=>{
|
|
160
160
|
if (!open()) return;
|
|
161
161
|
const request = focusRequest();
|
|
162
162
|
if (!request) return;
|
|
163
163
|
focusBoundary(request);
|
|
164
164
|
setFocusRequest(null);
|
|
165
165
|
});
|
|
166
|
-
|
|
166
|
+
createTrackedEffect(()=>{
|
|
167
167
|
const currentFocused = focusedKey();
|
|
168
168
|
const currentOptions = options();
|
|
169
169
|
if (currentFocused && !currentOptions.some((option)=>option.key === currentFocused)) return void setFocusedKey(void 0);
|
|
@@ -182,9 +182,9 @@ const __solidLayoutSelectRoot = (_stable, p)=>{
|
|
|
182
182
|
setOpen(false);
|
|
183
183
|
};
|
|
184
184
|
document.addEventListener("pointerdown", handlePointerDown);
|
|
185
|
-
|
|
185
|
+
return ()=>{
|
|
186
186
|
document.removeEventListener("pointerdown", handlePointerDown);
|
|
187
|
-
}
|
|
187
|
+
};
|
|
188
188
|
});
|
|
189
189
|
return createComponent(SelectContext, {
|
|
190
190
|
value: {
|
|
@@ -632,7 +632,7 @@ const __solidLayoutSelectOption = (_stable, p)=>{
|
|
|
632
632
|
});
|
|
633
633
|
if ("function" == typeof p.ref) p.ref(el);
|
|
634
634
|
};
|
|
635
|
-
|
|
635
|
+
createTrackedEffect(()=>{
|
|
636
636
|
if (!optionRef) return;
|
|
637
637
|
ctx.registerOption({
|
|
638
638
|
key: key(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSignal, createTrackedEffect } from "solid-js";
|
|
2
2
|
const SIZE_SCALE = {
|
|
3
3
|
M: 100,
|
|
4
4
|
L: 112.5,
|
|
@@ -16,7 +16,7 @@ function createSizeStore(storagePrefix) {
|
|
|
16
16
|
return "M";
|
|
17
17
|
};
|
|
18
18
|
const [size, setSizeInternal] = createSignal(getInitial());
|
|
19
|
-
|
|
19
|
+
createTrackedEffect(()=>{
|
|
20
20
|
const s = size();
|
|
21
21
|
if ("u" < typeof window) return;
|
|
22
22
|
localStorage.setItem(STORAGE_KEY, s);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@layer components {
|
|
2
2
|
.switch {
|
|
3
|
+
--switch-travel: 2.5rem;
|
|
3
4
|
position: relative;
|
|
4
5
|
display: inline-flex;
|
|
5
6
|
align-items: center;
|
|
@@ -64,9 +65,20 @@
|
|
|
64
65
|
0 0 5px 0 rgb(var(--shadow-color, 0 0 0) / 2%),
|
|
65
66
|
0 2px 10px 0 rgb(var(--shadow-color, 0 0 0) / 6%),
|
|
66
67
|
0 0 1px 0 rgb(var(--shadow-color, 0 0 0) / 30%);
|
|
68
|
+
/*
|
|
69
|
+
* `transform`, not `margin`.
|
|
70
|
+
*
|
|
71
|
+
* Sliding the thumb by animating `margin-inline-start` re-runs layout on
|
|
72
|
+
* every frame of the 300ms travel, for the whole switch and whatever
|
|
73
|
+
* shares its formatting context. On a renderer where layout is the
|
|
74
|
+
* expensive phase that is what a toggle "not feeling smooth" is made of.
|
|
75
|
+
* A transform composites instead, so the same movement costs no layout at
|
|
76
|
+
* all, and `will-change` keeps it off the main thread.
|
|
77
|
+
*/
|
|
67
78
|
transition:
|
|
68
|
-
|
|
79
|
+
transform 300ms ease,
|
|
69
80
|
background-color 200ms ease;
|
|
81
|
+
will-change: transform;
|
|
70
82
|
}
|
|
71
83
|
|
|
72
84
|
.switch__icon {
|
|
@@ -121,7 +133,7 @@
|
|
|
121
133
|
}
|
|
122
134
|
|
|
123
135
|
.switch[data-selected="true"] .switch__thumb {
|
|
124
|
-
|
|
136
|
+
transform: translateX(calc(var(--switch-travel, 2.5rem) - 1.625rem));
|
|
125
137
|
box-shadow:
|
|
126
138
|
0 0 5px 0 rgb(var(--shadow-color, 0 0 0) / 2%),
|
|
127
139
|
0 2px 10px 0 rgb(var(--shadow-color, 0 0 0) / 6%),
|
|
@@ -157,7 +169,7 @@
|
|
|
157
169
|
}
|
|
158
170
|
|
|
159
171
|
.switch--sm[data-selected="true"] .switch__thumb {
|
|
160
|
-
|
|
172
|
+
transform: translateX(calc(2rem - 1.28125rem));
|
|
161
173
|
}
|
|
162
174
|
|
|
163
175
|
/* ── Size: md (default) ── */
|
|
@@ -179,7 +191,7 @@
|
|
|
179
191
|
}
|
|
180
192
|
|
|
181
193
|
.switch--lg[data-selected="true"] .switch__thumb {
|
|
182
|
-
|
|
194
|
+
transform: translateX(calc(3rem - 1.96875rem));
|
|
183
195
|
}
|
|
184
196
|
|
|
185
197
|
/* ── Color: default ── */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent, insert, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./Tabs.css";
|
|
4
|
-
import { createContext,
|
|
4
|
+
import { createContext, createMemo, createSignal, createTrackedEffect, createUniqueId, omit, onCleanup, onSettled, useContext } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { CLASSES, componentRecipe } from "./Tabs.recipe.js";
|
|
7
7
|
import { observeTabIndicator } from "./Tabs.measurement.js";
|
|
@@ -145,26 +145,26 @@ const __solidLayoutTabList = (_stable, p)=>{
|
|
|
145
145
|
measureIndicator();
|
|
146
146
|
});
|
|
147
147
|
};
|
|
148
|
-
|
|
148
|
+
createTrackedEffect(()=>{
|
|
149
149
|
ctx.selectedKey();
|
|
150
150
|
ctx.tabs();
|
|
151
151
|
scheduleMeasure();
|
|
152
152
|
});
|
|
153
|
-
|
|
153
|
+
createTrackedEffect(()=>{
|
|
154
154
|
if (!listRef) return;
|
|
155
155
|
const disconnect = observeTabIndicator([
|
|
156
156
|
listRef,
|
|
157
157
|
...ctx.tabs().map((tab)=>tab.ref)
|
|
158
158
|
], scheduleMeasure);
|
|
159
|
-
|
|
159
|
+
return disconnect;
|
|
160
160
|
});
|
|
161
161
|
onSettled(()=>{
|
|
162
162
|
scheduleMeasure();
|
|
163
163
|
window.addEventListener("resize", scheduleMeasure);
|
|
164
|
-
|
|
164
|
+
return ()=>{
|
|
165
165
|
window.removeEventListener("resize", scheduleMeasure);
|
|
166
166
|
if (void 0 !== rafId) cancelAnimationFrame(rafId);
|
|
167
|
-
}
|
|
167
|
+
};
|
|
168
168
|
});
|
|
169
169
|
var _el$4 = _tmpl$2(), _el$5 = _el$4.firstChild;
|
|
170
170
|
ref(()=>setListRef, _el$4);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Portal, createComponent, insert, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
|
-
import { For, Show,
|
|
3
|
+
import { For, Show, createMemo, createSignal, createTrackedEffect, omit } from "solid-js";
|
|
4
4
|
import { twMerge } from "../../lib/twMerge.js";
|
|
5
5
|
import { ColorPickerContext, ColorWheelFlower } from "../color-wheel-flower/index.js";
|
|
6
6
|
import { createColorFromHsl, parseColor } from "../color-wheel-flower/ColorUtils.js";
|
|
@@ -69,7 +69,7 @@ const __solidLayoutThemeColorPicker = (_stable, p)=>{
|
|
|
69
69
|
store.setThemeColor(swatch.hex);
|
|
70
70
|
p.onColorChange?.(null, 0);
|
|
71
71
|
};
|
|
72
|
-
|
|
72
|
+
createTrackedEffect(()=>{
|
|
73
73
|
if (!isOpen()) return;
|
|
74
74
|
const handleClickOutside = (e)=>{
|
|
75
75
|
const target = e.target;
|
|
@@ -80,19 +80,19 @@ const __solidLayoutThemeColorPicker = (_stable, p)=>{
|
|
|
80
80
|
const timer = setTimeout(()=>{
|
|
81
81
|
document.addEventListener("click", handleClickOutside);
|
|
82
82
|
}, 0);
|
|
83
|
-
|
|
83
|
+
return ()=>{
|
|
84
84
|
clearTimeout(timer);
|
|
85
85
|
document.removeEventListener("click", handleClickOutside);
|
|
86
|
-
}
|
|
86
|
+
};
|
|
87
87
|
});
|
|
88
88
|
const handleKeyDown = (e)=>{
|
|
89
89
|
if ("Escape" === e.key && isOpen()) setIsOpen(false);
|
|
90
90
|
};
|
|
91
|
-
|
|
91
|
+
createTrackedEffect(()=>{
|
|
92
92
|
const timer = setTimeout(()=>{
|
|
93
93
|
setFeatureAvailable(true);
|
|
94
94
|
}, 0);
|
|
95
|
-
|
|
95
|
+
return ()=>clearTimeout(timer);
|
|
96
96
|
});
|
|
97
97
|
const contextValue = ()=>({
|
|
98
98
|
color: colorValue,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSignal, createTrackedEffect } from "solid-js";
|
|
2
2
|
let cspAllowsInlineStyles = null;
|
|
3
3
|
const checkCspAllowsInlineStyles = ()=>{
|
|
4
4
|
if (null !== cspAllowsInlineStyles) return cspAllowsInlineStyles;
|
|
@@ -159,7 +159,7 @@ function createHueShiftStore(storagePrefix) {
|
|
|
159
159
|
const color = readThemeColor();
|
|
160
160
|
if (null !== color) applyThemeColor(color);
|
|
161
161
|
};
|
|
162
|
-
|
|
162
|
+
createTrackedEffect(()=>{
|
|
163
163
|
const color = themeColor();
|
|
164
164
|
if ("u" < typeof window) return;
|
|
165
165
|
if (null === color) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent, insert, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./Toast.css";
|
|
4
|
-
import { For, Show, createContext,
|
|
4
|
+
import { For, Show, createContext, createMemo, createSignal, createTrackedEffect, omit, useContext } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import button_0 from "../button/index.js";
|
|
7
7
|
import close_button from "../close-button/index.js";
|
|
@@ -601,7 +601,7 @@ const __solidLayoutToastProvider = (_stable, p)=>{
|
|
|
601
601
|
if (!node) return void itemRefs.delete(key);
|
|
602
602
|
itemRefs.set(key, node);
|
|
603
603
|
};
|
|
604
|
-
|
|
604
|
+
createTrackedEffect(()=>{
|
|
605
605
|
const frontmostToast = toasts()[0];
|
|
606
606
|
const frontmostNode = frontmostToast ? itemRefs.get(frontmostToast.key) : void 0;
|
|
607
607
|
if (!frontmostNode) return void setFrontHeight(0);
|
|
@@ -612,9 +612,9 @@ const __solidLayoutToastProvider = (_stable, p)=>{
|
|
|
612
612
|
if (entry) setFrontHeight(entry.contentRect.height);
|
|
613
613
|
});
|
|
614
614
|
resizeObserver.observe(frontmostNode);
|
|
615
|
-
|
|
615
|
+
return ()=>{
|
|
616
616
|
resizeObserver.disconnect();
|
|
617
|
-
}
|
|
617
|
+
};
|
|
618
618
|
});
|
|
619
619
|
const widthValue = createMemo(()=>{
|
|
620
620
|
if ("number" == typeof p.width) return `${p.width}px`;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Portal, createComponent, insert, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./Tooltip.css";
|
|
4
|
-
import { Show, createContext,
|
|
4
|
+
import { Show, createContext, createSignal, createTrackedEffect, omit, onCleanup, useContext } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { createOverlayPosition } from "../_shared/overlayPosition.js";
|
|
7
7
|
import { CLASSES, componentRecipe } from "./Tooltip.recipe.js";
|
|
@@ -138,7 +138,7 @@ const __solidLayoutTooltipContent = (_stable, p)=>{
|
|
|
138
138
|
autoFlip: ctx.autoFlip,
|
|
139
139
|
align: ()=>"center"
|
|
140
140
|
});
|
|
141
|
-
|
|
141
|
+
createTrackedEffect(()=>{
|
|
142
142
|
ctx.setPlacement(overlayPosition.placement());
|
|
143
143
|
});
|
|
144
144
|
const style = ()=>{
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createComponent, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
|
-
import { Show,
|
|
3
|
+
import { Show, createTrackedEffect, omit, onCleanup } from "solid-js";
|
|
4
4
|
import { twMerge } from "../../lib/twMerge.js";
|
|
5
5
|
import { CLASSES, componentRecipe } from "./VideoPreview.recipe.js";
|
|
6
6
|
var _tmpl$ = /*#__PURE__*/ template("<video>");
|
|
@@ -14,7 +14,7 @@ const __solidLayoutVideoPreview = (_stable, p)=>{
|
|
|
14
14
|
},
|
|
15
15
|
children: (stream)=>{
|
|
16
16
|
let videoRef;
|
|
17
|
-
|
|
17
|
+
createTrackedEffect(()=>{
|
|
18
18
|
videoRef.srcObject = stream();
|
|
19
19
|
});
|
|
20
20
|
onCleanup(()=>{
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createMemo, createSignal, createTrackedEffect, onSettled } from "solid-js";
|
|
2
2
|
const usePickerOpenState = (options)=>{
|
|
3
3
|
const [internalOpen, setInternalOpen] = createSignal(Boolean(options.defaultOpen()));
|
|
4
4
|
const [rootRef, setRootRef] = createSignal(void 0);
|
|
@@ -29,12 +29,12 @@ const usePickerOpenState = (options)=>{
|
|
|
29
29
|
};
|
|
30
30
|
document.addEventListener("pointerdown", handlePointerDown);
|
|
31
31
|
document.addEventListener("keydown", handleGlobalKeyDown);
|
|
32
|
-
|
|
32
|
+
return ()=>{
|
|
33
33
|
document.removeEventListener("pointerdown", handlePointerDown);
|
|
34
34
|
document.removeEventListener("keydown", handleGlobalKeyDown);
|
|
35
|
-
}
|
|
35
|
+
};
|
|
36
36
|
});
|
|
37
|
-
|
|
37
|
+
createTrackedEffect(()=>{
|
|
38
38
|
if (!options.isDisabled()) return;
|
|
39
39
|
if (!isOpen()) return;
|
|
40
40
|
setOpen(false);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSignal, createTrackedEffect } from "solid-js";
|
|
2
2
|
const resolveNumber = (value)=>{
|
|
3
3
|
if ("function" == typeof value) return value();
|
|
4
4
|
return value;
|
|
@@ -39,7 +39,7 @@ const useAnchoredOverlayPosition = (options)=>{
|
|
|
39
39
|
"z-index": options.zIndex?.toString() ?? "1300"
|
|
40
40
|
});
|
|
41
41
|
};
|
|
42
|
-
|
|
42
|
+
createTrackedEffect(()=>{
|
|
43
43
|
if (!options.isOpen()) return;
|
|
44
44
|
requestAnimationFrame(()=>{
|
|
45
45
|
updatePosition();
|
|
@@ -48,10 +48,10 @@ const useAnchoredOverlayPosition = (options)=>{
|
|
|
48
48
|
const onViewportChange = ()=>updatePosition();
|
|
49
49
|
window.addEventListener("resize", onViewportChange);
|
|
50
50
|
window.addEventListener("scroll", onViewportChange, true);
|
|
51
|
-
|
|
51
|
+
return ()=>{
|
|
52
52
|
window.removeEventListener("resize", onViewportChange);
|
|
53
53
|
window.removeEventListener("scroll", onViewportChange, true);
|
|
54
|
-
}
|
|
54
|
+
};
|
|
55
55
|
});
|
|
56
56
|
return {
|
|
57
57
|
style,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { className, createComponent, effect, insert, ref, setAttribute, style, template } from "@solidjs/web";
|
|
2
|
-
import { Show,
|
|
2
|
+
import { Show, createSignal, createTrackedEffect, onCleanup, untrack } from "solid-js";
|
|
3
3
|
import { getMotionDriver } from "../driver.js";
|
|
4
4
|
import { resolveEase } from "../easing.js";
|
|
5
5
|
import { prefersReducedMotion } from "../reduced-motion.js";
|
|
@@ -85,7 +85,7 @@ const AnimatedCollapse = (props)=>{
|
|
|
85
85
|
teardownObserver();
|
|
86
86
|
}
|
|
87
87
|
};
|
|
88
|
-
|
|
88
|
+
createTrackedEffect(()=>{
|
|
89
89
|
const open = props.open;
|
|
90
90
|
untrack(()=>{
|
|
91
91
|
const target = nextCollapsePhase(phase(), open);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { insert, ref, spread, template } from "@solidjs/web";
|
|
2
|
-
import {
|
|
2
|
+
import { createSignal, createTrackedEffect, omit, onCleanup } from "solid-js";
|
|
3
3
|
import { runMotion } from "../engine.js";
|
|
4
4
|
var _tmpl$ = /*#__PURE__*/ template("<div>");
|
|
5
5
|
const MotionDiv = (props)=>{
|
|
@@ -23,7 +23,7 @@ const MotionDiv = (props)=>{
|
|
|
23
23
|
stopActive();
|
|
24
24
|
activeControl = runMotion(target, from ?? {}, to ?? {}, transition, onComplete);
|
|
25
25
|
};
|
|
26
|
-
|
|
26
|
+
createTrackedEffect(()=>{
|
|
27
27
|
const target = elementRef();
|
|
28
28
|
if (!target) return;
|
|
29
29
|
const isExiting = Boolean(props.isExiting);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createComponent } from "@solidjs/web";
|
|
2
|
-
import { Show,
|
|
2
|
+
import { Show, createSignal, createTrackedEffect, onCleanup, untrack } from "solid-js";
|
|
3
3
|
import { prefersReducedMotion } from "../reduced-motion.js";
|
|
4
4
|
import { nextPresenceState } from "./presenceState.js";
|
|
5
5
|
const DEFAULT_EXIT_TIMEOUT = 800;
|
|
@@ -22,7 +22,7 @@ const Presence = (props)=>{
|
|
|
22
22
|
isExiting: false
|
|
23
23
|
} : prev);
|
|
24
24
|
};
|
|
25
|
-
|
|
25
|
+
createTrackedEffect(()=>{
|
|
26
26
|
const when = props.when;
|
|
27
27
|
untrack(()=>{
|
|
28
28
|
const next = nextPresenceState(state(), when);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSignal, createTrackedEffect, onCleanup } from "solid-js";
|
|
2
2
|
const resolveOption = (value)=>{
|
|
3
3
|
if ("function" == typeof value) return value();
|
|
4
4
|
return value;
|
|
@@ -95,7 +95,7 @@ const useStreamingSubscription = (options)=>{
|
|
|
95
95
|
observer.error(nextError);
|
|
96
96
|
}
|
|
97
97
|
};
|
|
98
|
-
|
|
98
|
+
createTrackedEffect(()=>{
|
|
99
99
|
const shouldEnable = resolveOption(options.enabled ?? true);
|
|
100
100
|
if (!shouldEnable) return void stop();
|
|
101
101
|
if (!isRunning) start();
|
package/dist/purge-manifest.json
CHANGED
|
@@ -14685,7 +14685,8 @@
|
|
|
14685
14685
|
"--switch-control-bg-hover",
|
|
14686
14686
|
"--switch-control-bg-pressed",
|
|
14687
14687
|
"--switch-control-border",
|
|
14688
|
-
"--switch-control-border-checked"
|
|
14688
|
+
"--switch-control-border-checked",
|
|
14689
|
+
"--switch-travel"
|
|
14689
14690
|
],
|
|
14690
14691
|
"referenced": [
|
|
14691
14692
|
"--border",
|
|
@@ -14709,7 +14710,8 @@
|
|
|
14709
14710
|
"--switch-control-bg-hover",
|
|
14710
14711
|
"--switch-control-bg-pressed",
|
|
14711
14712
|
"--switch-control-border",
|
|
14712
|
-
"--switch-control-border-checked"
|
|
14713
|
+
"--switch-control-border-checked",
|
|
14714
|
+
"--switch-travel"
|
|
14713
14715
|
]
|
|
14714
14716
|
},
|
|
14715
14717
|
"keyframes": {
|
|
@@ -34432,6 +34434,14 @@
|
|
|
34432
34434
|
"Switch"
|
|
34433
34435
|
]
|
|
34434
34436
|
},
|
|
34437
|
+
"--switch-travel": {
|
|
34438
|
+
"declaredBy": [
|
|
34439
|
+
"Switch"
|
|
34440
|
+
],
|
|
34441
|
+
"referencedBy": [
|
|
34442
|
+
"Switch"
|
|
34443
|
+
]
|
|
34444
|
+
},
|
|
34435
34445
|
"--dropdown-trigger-bg": {
|
|
34436
34446
|
"declaredBy": [
|
|
34437
34447
|
"Dropdown"
|