@pathscale/ui 2.6.1 → 2.6.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/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/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/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/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSignal, createTrackedEffect } from "solid-js";
|
|
2
2
|
const oppositePlacement = {
|
|
3
3
|
top: "bottom",
|
|
4
4
|
bottom: "top",
|
|
@@ -36,7 +36,7 @@ const createOverlayPosition = (options)=>{
|
|
|
36
36
|
visibility: "hidden"
|
|
37
37
|
});
|
|
38
38
|
const [resolvedPlacement, setResolvedPlacement] = createSignal(options.placement());
|
|
39
|
-
|
|
39
|
+
createTrackedEffect(()=>{
|
|
40
40
|
if (!options.open()) {
|
|
41
41
|
setResolvedPlacement(options.placement());
|
|
42
42
|
setStyle({
|
|
@@ -103,12 +103,12 @@ const createOverlayPosition = (options)=>{
|
|
|
103
103
|
const resizeObserver = "u" > typeof ResizeObserver ? new ResizeObserver(schedule) : void 0;
|
|
104
104
|
if (trigger) resizeObserver?.observe(trigger);
|
|
105
105
|
resizeObserver?.observe(overlay);
|
|
106
|
-
|
|
106
|
+
return ()=>{
|
|
107
107
|
cancelAnimationFrame(frame);
|
|
108
108
|
window.removeEventListener("resize", schedule);
|
|
109
109
|
window.removeEventListener("scroll", schedule, true);
|
|
110
110
|
resizeObserver?.disconnect();
|
|
111
|
-
}
|
|
111
|
+
};
|
|
112
112
|
});
|
|
113
113
|
return {
|
|
114
114
|
style,
|
|
@@ -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 "./Calendar.css";
|
|
4
|
-
import { For, Show,
|
|
4
|
+
import { For, Show, createMemo, createTrackedEffect, createUniqueId, omit } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { DAYS_PER_WEEK, addDays, compareDates, getToday, normalizeDate, parseDate, shiftDateByMonths, toISODate, useCalendarNavigation, useCalendarState, useDateSelection } from "../../hooks/date/index.js";
|
|
7
7
|
import { CLASSES, componentRecipe } from "./Calendar.recipe.js";
|
|
@@ -41,7 +41,7 @@ const __solidLayoutCalendar = (_stable, p)=>{
|
|
|
41
41
|
maxDate,
|
|
42
42
|
isDateDisabled
|
|
43
43
|
});
|
|
44
|
-
|
|
44
|
+
createTrackedEffect(()=>{
|
|
45
45
|
navigation.syncFocusedDate(focusReferenceDate());
|
|
46
46
|
});
|
|
47
47
|
const calendarState = useCalendarState({
|
|
@@ -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 "./Checkbox.css";
|
|
4
|
-
import { Show,
|
|
4
|
+
import { Show, createSignal, createTrackedEffect, omit, useContext } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { CheckboxGroupContext } from "../checkbox-group/context.js";
|
|
7
7
|
import { CLASSES, componentRecipe } from "./Checkbox.recipe.js";
|
|
@@ -26,7 +26,7 @@ const __solidLayoutCheckbox = (_stable, p)=>{
|
|
|
26
26
|
const variant = ()=>p.variant ?? group?.variant() ?? "primary";
|
|
27
27
|
const name = ()=>p.name ?? group?.name();
|
|
28
28
|
const hasContent = ()=>null != p.children || null != p.description;
|
|
29
|
-
|
|
29
|
+
createTrackedEffect(()=>{
|
|
30
30
|
if (!inputRef) return;
|
|
31
31
|
inputRef.indeterminate = isIndeterminate();
|
|
32
32
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeProps, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./ColorField.css";
|
|
4
|
-
import {
|
|
4
|
+
import { createSignal, createTrackedEffect, omit } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { formatColor, parseColor } from "../color-wheel-flower/ColorUtils.js";
|
|
7
7
|
import { CLASSES, componentRecipe } from "./ColorField.recipe.js";
|
|
@@ -29,7 +29,7 @@ const __solidLayoutColorField = (_stable, p)=>{
|
|
|
29
29
|
const [lastValidValue, setLastValidValue] = createSignal(initialValue());
|
|
30
30
|
const [isInvalid, setIsInvalid] = createSignal(false);
|
|
31
31
|
const [isFocused, setIsFocused] = createSignal(false);
|
|
32
|
-
|
|
32
|
+
createTrackedEffect(()=>{
|
|
33
33
|
const nextValue = p.value;
|
|
34
34
|
const nextFormat = format();
|
|
35
35
|
if (isFocused()) return;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent, insert, mergeProps, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./ColorPicker.css";
|
|
4
|
-
import { createContext,
|
|
4
|
+
import { createContext, createMemo, createSignal, createTrackedEffect, omit, useContext } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import color_area from "../color-area/index.js";
|
|
7
7
|
import color_field from "../color-field/index.js";
|
|
@@ -266,7 +266,7 @@ const __solidLayoutColorPickerRoot = (_stable, p)=>{
|
|
|
266
266
|
const others = omit(p, "class", "children", "value", "defaultValue", "onChange", "state", "dataTheme");
|
|
267
267
|
const [internalState, setInternalState] = createSignal(toColorState(p.value ?? p.defaultValue) ?? fallbackState());
|
|
268
268
|
const isControlled = ()=>void 0 !== p.value;
|
|
269
|
-
|
|
269
|
+
createTrackedEffect(()=>{
|
|
270
270
|
if (!isControlled()) return;
|
|
271
271
|
const next = toColorState(p.value);
|
|
272
272
|
if (next) setInternalState(next);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./ColorSlider.css";
|
|
4
|
-
import {
|
|
4
|
+
import { createMemo, createSignal, createTrackedEffect, omit } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { CLASSES, componentRecipe } from "./ColorSlider.recipe.js";
|
|
7
7
|
var _tmpl$ = /*#__PURE__*/ template("<div><div></div><div>");
|
|
@@ -31,7 +31,7 @@ const __solidLayoutColorSlider = (_stable, p)=>{
|
|
|
31
31
|
const [isDragging, setIsDragging] = createSignal(false);
|
|
32
32
|
let sliderRef;
|
|
33
33
|
const isControlled = ()=>void 0 !== p.value;
|
|
34
|
-
|
|
34
|
+
createTrackedEffect(()=>{
|
|
35
35
|
const nextType = sliderType();
|
|
36
36
|
const nextValue = p.value;
|
|
37
37
|
if (void 0 === nextValue) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent, insert, memo, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./ColorWheelFlower.css";
|
|
4
|
-
import { For,
|
|
4
|
+
import { For, createMemo, createSignal, createTrackedEffect, onCleanup } from "solid-js";
|
|
5
5
|
import { clsx } from "clsx";
|
|
6
6
|
import { twMerge } from "../../lib/twMerge.js";
|
|
7
7
|
import color_swatch from "../color-swatch/index.js";
|
|
@@ -395,7 +395,7 @@ const __solidLayoutColorWheelFlower = (_stable, p)=>{
|
|
|
395
395
|
hex: item.hex
|
|
396
396
|
});
|
|
397
397
|
};
|
|
398
|
-
|
|
398
|
+
createTrackedEffect(()=>{
|
|
399
399
|
const selected = selectedIndex();
|
|
400
400
|
const current = context.color();
|
|
401
401
|
if (null === selected) return;
|
|
@@ -461,7 +461,7 @@ const __solidLayoutColorWheelFlower = (_stable, p)=>{
|
|
|
461
461
|
const color = colors()[index].rgb;
|
|
462
462
|
return `0 0 10px rgba(255,255,255,0.16), 0 0 20px ${toRgba(color, 0.35)}`;
|
|
463
463
|
});
|
|
464
|
-
|
|
464
|
+
createTrackedEffect(()=>{
|
|
465
465
|
const node = outerRingRef;
|
|
466
466
|
if (!node) return;
|
|
467
467
|
const target = outerRingTarget();
|
|
@@ -621,7 +621,7 @@ const __solidLayoutColorWheelFlower = (_stable, p)=>{
|
|
|
621
621
|
delay
|
|
622
622
|
};
|
|
623
623
|
};
|
|
624
|
-
|
|
624
|
+
createTrackedEffect(()=>{
|
|
625
625
|
if (!motionRef) return;
|
|
626
626
|
const target = dotTarget();
|
|
627
627
|
const transition = dotTransition();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent, effect, insert, memo, mergeProps, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./ComboBox.css";
|
|
4
|
-
import { For, Show, createContext,
|
|
4
|
+
import { For, Show, createContext, createMemo, createSignal, createTrackedEffect, createUniqueId, omit, onSettled, useContext } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { CLASSES, componentRecipe } from "./ComboBox.recipe.js";
|
|
7
7
|
import { resolveState } from "../vocabulary.js";
|
|
@@ -141,13 +141,13 @@ const __solidLayoutComboBoxRoot = (_stable, p)=>{
|
|
|
141
141
|
closeAndCommit();
|
|
142
142
|
};
|
|
143
143
|
const getOptionId = (key)=>`${listBoxId}-${toOptionKey(key, 0)}`;
|
|
144
|
-
|
|
144
|
+
createTrackedEffect(()=>{
|
|
145
145
|
if (void 0 !== p.inputValue) return;
|
|
146
146
|
const selected = selectedItem();
|
|
147
147
|
if (!selected) return;
|
|
148
148
|
if (internalInputValue() !== selected.textValue) setInternalInputValue(selected.textValue);
|
|
149
149
|
});
|
|
150
|
-
|
|
150
|
+
createTrackedEffect(()=>{
|
|
151
151
|
if (!isOpen()) return;
|
|
152
152
|
const enabledItems = getEnabledItems();
|
|
153
153
|
if (!enabledItems.length) return void setActiveKeySignal(null);
|
|
@@ -163,9 +163,9 @@ const __solidLayoutComboBoxRoot = (_stable, p)=>{
|
|
|
163
163
|
closeAndCommit();
|
|
164
164
|
};
|
|
165
165
|
document.addEventListener("pointerdown", handlePointerDown);
|
|
166
|
-
|
|
166
|
+
return ()=>{
|
|
167
167
|
document.removeEventListener("pointerdown", handlePointerDown);
|
|
168
|
-
}
|
|
168
|
+
};
|
|
169
169
|
});
|
|
170
170
|
const hiddenValue = createMemo(()=>{
|
|
171
171
|
const currentKey = selectedKey();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent, effect, insert, mergeProps, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./Composer.css";
|
|
4
|
-
import { For, Show,
|
|
4
|
+
import { For, Show, createSignal, createTrackedEffect, onSettled } from "solid-js";
|
|
5
5
|
import { isInvalid, resolveState } from "../vocabulary.js";
|
|
6
6
|
import { composer } from "./Composer.recipe.js";
|
|
7
7
|
import { afterValueLands, autosize, boundsFromRows, isSubmittable, newAutosizeMemo, shouldSubmit, viewportHeight } from "./Composer.interactions.js";
|
|
@@ -22,7 +22,7 @@ const __solidLayoutComposerLayout = (_stable, p)=>{
|
|
|
22
22
|
if (p.autofocus) field?.focus();
|
|
23
23
|
measure();
|
|
24
24
|
});
|
|
25
|
-
|
|
25
|
+
createTrackedEffect(()=>{
|
|
26
26
|
value();
|
|
27
27
|
measure();
|
|
28
28
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent, effect, insert, mergeProps, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./DateRangePicker.css";
|
|
4
|
-
import { Show,
|
|
4
|
+
import { Show, createMemo, createTrackedEffect, createUniqueId, omit } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { formatDate, toISODate, usePickerOpenState, useRangeSelection } from "../../hooks/date/index.js";
|
|
7
7
|
import calendar from "../calendar/index.js";
|
|
@@ -21,7 +21,7 @@ const __solidLayoutDateRangePicker = (_stable, p)=>{
|
|
|
21
21
|
onOpenChange: ()=>p.onOpenChange,
|
|
22
22
|
isDisabled
|
|
23
23
|
});
|
|
24
|
-
|
|
24
|
+
createTrackedEffect(()=>{
|
|
25
25
|
if (openState.isOpen()) return;
|
|
26
26
|
rangeSelection.clearPendingSelection();
|
|
27
27
|
});
|
|
@@ -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 "./Dialog.css";
|
|
4
|
-
import { Show, createContext,
|
|
4
|
+
import { Show, createContext, createSignal, createTrackedEffect, createUniqueId, omit, onCleanup, useContext } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import "../_shared/material.css";
|
|
7
7
|
import { CLASSES, componentRecipe } from "./Dialog.recipe.js";
|
|
@@ -83,7 +83,7 @@ const __solidLayoutDialogRoot = (_stable, p)=>{
|
|
|
83
83
|
p.onOpenChange?.(next);
|
|
84
84
|
};
|
|
85
85
|
let exitTimer;
|
|
86
|
-
|
|
86
|
+
createTrackedEffect(()=>{
|
|
87
87
|
const open = isOpen();
|
|
88
88
|
const state = animState();
|
|
89
89
|
if (open) {
|
|
@@ -108,7 +108,7 @@ const __solidLayoutDialogRoot = (_stable, p)=>{
|
|
|
108
108
|
if (exitTimer) clearTimeout(exitTimer);
|
|
109
109
|
});
|
|
110
110
|
let hasScrollLock = false;
|
|
111
|
-
|
|
111
|
+
createTrackedEffect(()=>{
|
|
112
112
|
const shouldLock = isVisibleState(animState());
|
|
113
113
|
if (shouldLock && !hasScrollLock) {
|
|
114
114
|
lockBodyScroll();
|
|
@@ -125,7 +125,7 @@ const __solidLayoutDialogRoot = (_stable, p)=>{
|
|
|
125
125
|
}
|
|
126
126
|
});
|
|
127
127
|
let restoreFocusTarget = null;
|
|
128
|
-
|
|
128
|
+
createTrackedEffect(()=>{
|
|
129
129
|
const state = animState();
|
|
130
130
|
const content = contentRef();
|
|
131
131
|
if (!isVisibleState(state) || !content) return;
|
|
@@ -146,11 +146,11 @@ const __solidLayoutDialogRoot = (_stable, p)=>{
|
|
|
146
146
|
if ("Tab" === event.key) trapFocus(event, content);
|
|
147
147
|
};
|
|
148
148
|
document.addEventListener("keydown", handleDocumentKeyDown);
|
|
149
|
-
|
|
149
|
+
return ()=>{
|
|
150
150
|
document.removeEventListener("keydown", handleDocumentKeyDown);
|
|
151
|
-
}
|
|
151
|
+
};
|
|
152
152
|
});
|
|
153
|
-
|
|
153
|
+
createTrackedEffect(()=>{
|
|
154
154
|
if ("closed" !== animState()) return;
|
|
155
155
|
if (!restoreFocusTarget) return;
|
|
156
156
|
queueMicrotask(()=>{
|
|
@@ -414,12 +414,12 @@ const __solidLayoutDialogHeading = (_stable, p)=>{
|
|
|
414
414
|
const context = useModalContext();
|
|
415
415
|
const uniqueId = createUniqueId();
|
|
416
416
|
const headingId = ()=>("string" == typeof p.id ? p.id : void 0) ?? `dialog-heading-${uniqueId}`;
|
|
417
|
-
|
|
417
|
+
createTrackedEffect(()=>{
|
|
418
418
|
const id = headingId();
|
|
419
419
|
context.setLabelledBy(id);
|
|
420
|
-
|
|
420
|
+
return ()=>{
|
|
421
421
|
if (context.labelledBy() === id) context.setLabelledBy(void 0);
|
|
422
|
-
}
|
|
422
|
+
};
|
|
423
423
|
});
|
|
424
424
|
var _el$7 = _tmpl$4();
|
|
425
425
|
spread(_el$7, mergeProps(others, {
|
|
@@ -472,12 +472,12 @@ const __solidLayoutDialogBody = (_stable, p)=>{
|
|
|
472
472
|
const context = useModalContext();
|
|
473
473
|
const uniqueId = createUniqueId();
|
|
474
474
|
const bodyId = ()=>("string" == typeof p.id ? p.id : void 0) ?? `dialog-body-${uniqueId}`;
|
|
475
|
-
|
|
475
|
+
createTrackedEffect(()=>{
|
|
476
476
|
const id = bodyId();
|
|
477
477
|
context.setDescribedBy(id);
|
|
478
|
-
|
|
478
|
+
return ()=>{
|
|
479
479
|
if (context.describedBy() === id) context.setDescribedBy(void 0);
|
|
480
|
-
}
|
|
480
|
+
};
|
|
481
481
|
});
|
|
482
482
|
var _el$9 = _tmpl$();
|
|
483
483
|
spread(_el$9, mergeProps(others, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Portal, className, createComponent, delegateEvents, effect, insert, memo, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./Drawer.css";
|
|
4
|
-
import { Show,
|
|
4
|
+
import { Show, createSignal, createTrackedEffect, createUniqueId, omit, onCleanup } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import "../_shared/material.css";
|
|
7
7
|
import { focusFirst, isSidePlacement, isVisibleState, trapFocus } from "./Drawer.a11y.js";
|
|
@@ -63,7 +63,7 @@ const __solidLayoutDrawerRoot = (_stable, p)=>{
|
|
|
63
63
|
setIsOpen(false);
|
|
64
64
|
};
|
|
65
65
|
let exitTimer;
|
|
66
|
-
|
|
66
|
+
createTrackedEffect(()=>{
|
|
67
67
|
const open = isOpen();
|
|
68
68
|
const state = animState();
|
|
69
69
|
if (open) {
|
|
@@ -88,7 +88,7 @@ const __solidLayoutDrawerRoot = (_stable, p)=>{
|
|
|
88
88
|
if (exitTimer) clearTimeout(exitTimer);
|
|
89
89
|
});
|
|
90
90
|
let hasScrollLock = false;
|
|
91
|
-
|
|
91
|
+
createTrackedEffect(()=>{
|
|
92
92
|
const visible = isVisibleState(animState());
|
|
93
93
|
if (visible && !hasScrollLock) {
|
|
94
94
|
lockBodyScroll();
|
|
@@ -102,7 +102,7 @@ const __solidLayoutDrawerRoot = (_stable, p)=>{
|
|
|
102
102
|
if (hasScrollLock) unlockBodyScroll();
|
|
103
103
|
});
|
|
104
104
|
let restoreFocusTarget = null;
|
|
105
|
-
|
|
105
|
+
createTrackedEffect(()=>{
|
|
106
106
|
const state = animState();
|
|
107
107
|
const dialog = dialogRef();
|
|
108
108
|
if (!isVisibleState(state) || !dialog) return;
|
|
@@ -123,9 +123,9 @@ const __solidLayoutDrawerRoot = (_stable, p)=>{
|
|
|
123
123
|
if ("Tab" === event.key && trapFocusEnabled()) trapFocus(event, dialog);
|
|
124
124
|
};
|
|
125
125
|
document.addEventListener("keydown", onKeyDown);
|
|
126
|
-
|
|
126
|
+
return ()=>document.removeEventListener("keydown", onKeyDown);
|
|
127
127
|
});
|
|
128
|
-
|
|
128
|
+
createTrackedEffect(()=>{
|
|
129
129
|
if ("closed" !== animState() || !restoreFocusEnabled()) return;
|
|
130
130
|
if (!restoreFocusTarget) return;
|
|
131
131
|
queueMicrotask(()=>{
|
|
@@ -221,10 +221,10 @@ const __solidLayoutDrawerContent = (_stable, p)=>{
|
|
|
221
221
|
const ctx = useDrawerContext();
|
|
222
222
|
const placement = ()=>p.placement ?? ctx.placement();
|
|
223
223
|
const scrollBehavior = ()=>p.scrollBehavior ?? ctx.scrollBehavior();
|
|
224
|
-
|
|
224
|
+
createTrackedEffect(()=>{
|
|
225
225
|
if (void 0 === p.placement) return;
|
|
226
226
|
ctx.setPlacementOverride(p.placement);
|
|
227
|
-
|
|
227
|
+
return ()=>ctx.setPlacementOverride(void 0);
|
|
228
228
|
});
|
|
229
229
|
var _el$3 = _tmpl$();
|
|
230
230
|
spread(_el$3, mergeProps(others, {
|
|
@@ -266,17 +266,15 @@ const __solidLayoutDrawerBackdrop = (_stable, p)=>{
|
|
|
266
266
|
const others = omit(p, "children", "class", "dataTheme", "style", "variant", "isDismissable", "shouldCloseOnBackdropClick", "onClick");
|
|
267
267
|
const ctx = useDrawerContext();
|
|
268
268
|
const variant = ()=>p.variant ?? ctx.backdrop();
|
|
269
|
-
|
|
270
|
-
if (void 0
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
}
|
|
269
|
+
createTrackedEffect(()=>{
|
|
270
|
+
if (void 0 === p.isDismissable) return;
|
|
271
|
+
ctx.setBackdropDismissableOverride(p.isDismissable);
|
|
272
|
+
return ()=>ctx.setBackdropDismissableOverride(void 0);
|
|
274
273
|
});
|
|
275
|
-
|
|
276
|
-
if (void 0
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
}
|
|
274
|
+
createTrackedEffect(()=>{
|
|
275
|
+
if (void 0 === p.shouldCloseOnBackdropClick) return;
|
|
276
|
+
ctx.setBackdropCloseOnClickOverride(p.shouldCloseOnBackdropClick);
|
|
277
|
+
return ()=>ctx.setBackdropCloseOnClickOverride(void 0);
|
|
280
278
|
});
|
|
281
279
|
const handleClick = (event)=>{
|
|
282
280
|
if (event.target === event.currentTarget) ctx.requestClose("backdrop");
|
|
@@ -417,12 +415,12 @@ const __solidLayoutDrawerHeading = (_stable, p)=>{
|
|
|
417
415
|
const ctx = useDrawerContext();
|
|
418
416
|
const uid = createUniqueId();
|
|
419
417
|
const headingId = ()=>p.id ?? `drawer-heading-${uid}`;
|
|
420
|
-
|
|
418
|
+
createTrackedEffect(()=>{
|
|
421
419
|
const id = headingId();
|
|
422
420
|
ctx.setLabelledBy(id);
|
|
423
|
-
|
|
421
|
+
return ()=>{
|
|
424
422
|
if (ctx.labelledBy() === id) ctx.setLabelledBy(void 0);
|
|
425
|
-
}
|
|
423
|
+
};
|
|
426
424
|
});
|
|
427
425
|
var _el$7 = _tmpl$3();
|
|
428
426
|
spread(_el$7, mergeProps(others, {
|
|
@@ -453,12 +451,12 @@ const __solidLayoutDrawerBody = (_stable, p)=>{
|
|
|
453
451
|
const ctx = useDrawerContext();
|
|
454
452
|
const uid = createUniqueId();
|
|
455
453
|
const bodyId = ()=>p.id ?? `drawer-body-${uid}`;
|
|
456
|
-
|
|
454
|
+
createTrackedEffect(()=>{
|
|
457
455
|
const id = bodyId();
|
|
458
456
|
ctx.setDescribedBy(id);
|
|
459
|
-
|
|
457
|
+
return ()=>{
|
|
460
458
|
if (ctx.describedBy() === id) ctx.setDescribedBy(void 0);
|
|
461
|
-
}
|
|
459
|
+
};
|
|
462
460
|
});
|
|
463
461
|
var _el$8 = _tmpl$();
|
|
464
462
|
spread(_el$8, mergeProps(others, {
|
|
@@ -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 "./Dropdown.css";
|
|
4
|
-
import { Show, createContext,
|
|
4
|
+
import { Show, createContext, 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 "./Dropdown.recipe.js";
|
|
@@ -93,14 +93,14 @@ const __solidLayoutDropdownRoot = (_stable, p)=>{
|
|
|
93
93
|
setItems((prev)=>prev.filter((item)=>item.key !== key));
|
|
94
94
|
if (focusedKey() === key) setFocusedKey(void 0);
|
|
95
95
|
};
|
|
96
|
-
|
|
96
|
+
createTrackedEffect(()=>{
|
|
97
97
|
if (!open()) return;
|
|
98
98
|
const request = focusRequest();
|
|
99
99
|
if (!request) return;
|
|
100
100
|
focusBoundary("first" === request ? "first" : "last");
|
|
101
101
|
setFocusRequest(null);
|
|
102
102
|
});
|
|
103
|
-
|
|
103
|
+
createTrackedEffect(()=>{
|
|
104
104
|
const list = items();
|
|
105
105
|
const currentFocused = focusedKey();
|
|
106
106
|
if (currentFocused && !list.some((item)=>item.key === currentFocused)) return void setFocusedKey(void 0);
|
|
@@ -119,9 +119,9 @@ const __solidLayoutDropdownRoot = (_stable, p)=>{
|
|
|
119
119
|
setOpen(false);
|
|
120
120
|
};
|
|
121
121
|
document.addEventListener("pointerdown", handlePointerDown);
|
|
122
|
-
|
|
122
|
+
return ()=>{
|
|
123
123
|
document.removeEventListener("pointerdown", handlePointerDown);
|
|
124
|
-
}
|
|
124
|
+
};
|
|
125
125
|
});
|
|
126
126
|
return createComponent(DropdownContext, {
|
|
127
127
|
value: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createSignal, createTrackedEffect, onSettled } from "solid-js";
|
|
2
2
|
function useImmersiveLanding(options) {
|
|
3
3
|
const { pages, initialPage = pages[0], currentPage: controlledPage, transitionDuration = 400, onNavigate, onNavigationComplete, enableScrollNavigation = true } = options;
|
|
4
4
|
const isControlled = !!controlledPage;
|
|
@@ -11,7 +11,7 @@ function useImmersiveLanding(options) {
|
|
|
11
11
|
const isLastPage = ()=>currentIndex() === pages.length - 1;
|
|
12
12
|
if (isControlled) {
|
|
13
13
|
let prevPage = controlledPage();
|
|
14
|
-
|
|
14
|
+
createTrackedEffect(()=>{
|
|
15
15
|
const next = controlledPage();
|
|
16
16
|
if (next !== prevPage && !isTransitioning()) {
|
|
17
17
|
const fromIndex = pages.indexOf(prevPage);
|
|
@@ -128,12 +128,12 @@ function useImmersiveLanding(options) {
|
|
|
128
128
|
passive: true
|
|
129
129
|
});
|
|
130
130
|
window.addEventListener("keydown", handleKeyDown);
|
|
131
|
-
|
|
131
|
+
return ()=>{
|
|
132
132
|
window.removeEventListener("wheel", handleWheel);
|
|
133
133
|
window.removeEventListener("touchstart", handleTouchStart);
|
|
134
134
|
window.removeEventListener("touchend", handleTouchEnd);
|
|
135
135
|
window.removeEventListener("keydown", handleKeyDown);
|
|
136
|
-
}
|
|
136
|
+
};
|
|
137
137
|
});
|
|
138
138
|
return {
|
|
139
139
|
activePage,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent, insert, memo, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./InputOTP.css";
|
|
4
|
-
import { For, Show, createContext,
|
|
4
|
+
import { For, Show, createContext, createMemo, createSignal, createTrackedEffect, omit, onSettled, useContext } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import { CLASSES, componentRecipe } from "./InputOTP.recipe.js";
|
|
7
7
|
import { resolveState } from "../vocabulary.js";
|
|
@@ -119,16 +119,16 @@ const __solidLayoutInputOTPRoot = (_stable, p)=>{
|
|
|
119
119
|
if (event.defaultPrevented || isDisabled()) return;
|
|
120
120
|
if ("ArrowLeft" === event.key || "ArrowRight" === event.key || "Backspace" === event.key || "Delete" === event.key || "Home" === event.key || "End" === event.key) queueMicrotask(syncActiveFromInputCaret);
|
|
121
121
|
};
|
|
122
|
-
|
|
122
|
+
createTrackedEffect(()=>{
|
|
123
123
|
const current = value();
|
|
124
124
|
if (current.length > maxLength()) setValue(current.slice(0, maxLength()));
|
|
125
125
|
});
|
|
126
|
-
|
|
126
|
+
createTrackedEffect(()=>{
|
|
127
127
|
if (void 0 !== p.value) return;
|
|
128
128
|
const normalized = sanitizeValue(internalValue());
|
|
129
129
|
if (normalized !== internalValue()) setInternalValue(normalized);
|
|
130
130
|
});
|
|
131
|
-
|
|
131
|
+
createTrackedEffect(()=>{
|
|
132
132
|
if (!isFocused()) return;
|
|
133
133
|
const active = clamp(activeIndex(), 0, maxLength());
|
|
134
134
|
inputRef?.setSelectionRange(active, active);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createComponent, effect, insert, memo, mergeProps, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
|
-
import { createContext,
|
|
3
|
+
import { createContext, createMemo, createTrackedEffect, createUniqueId, omit, onCleanup, useContext } from "solid-js";
|
|
4
4
|
import { twMerge } from "../../lib/twMerge.js";
|
|
5
5
|
import { ListBoxContext } from "./context.js";
|
|
6
6
|
import { CLASSES, componentRecipe } from "./ListBox.recipe.js";
|
|
@@ -96,7 +96,7 @@ const __solidLayoutListBoxItemRoot = (_stable, p)=>{
|
|
|
96
96
|
if (event.defaultPrevented) return;
|
|
97
97
|
if (listBox?.focusedKey() === key()) listBox.setFocusedKey(void 0);
|
|
98
98
|
};
|
|
99
|
-
|
|
99
|
+
createTrackedEffect(()=>{
|
|
100
100
|
if (!listBox || !itemRef) return;
|
|
101
101
|
listBox.registerItem({
|
|
102
102
|
key: key(),
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { createComponent, insert, memo, mergeProps, ref, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
3
|
import "./LiveChat.css";
|
|
4
|
-
import { For, Show,
|
|
4
|
+
import { For, Show, createSignal, createTrackedEffect, omit, onCleanup } from "solid-js";
|
|
5
5
|
import { twMerge } from "../../lib/twMerge.js";
|
|
6
6
|
import button_0 from "../button/index.js";
|
|
7
7
|
import input from "../input/index.js";
|
|
@@ -75,11 +75,11 @@ const __solidLayoutLiveChatPanel = (_stable, p)=>{
|
|
|
75
75
|
let hasObservedMessages = false;
|
|
76
76
|
let scrollRafId;
|
|
77
77
|
let scrollRafNestedId;
|
|
78
|
-
|
|
78
|
+
createTrackedEffect(()=>{
|
|
79
79
|
if (p.mockMode) setInternalMessages(getMockMessages());
|
|
80
80
|
else if (p.messages) setInternalMessages(p.messages);
|
|
81
81
|
});
|
|
82
|
-
|
|
82
|
+
createTrackedEffect(()=>{
|
|
83
83
|
if (!p.mockMode && p.messages) setInternalMessages(p.messages);
|
|
84
84
|
});
|
|
85
85
|
const isSending = ()=>p.isSending ?? sending();
|
|
@@ -113,7 +113,7 @@ const __solidLayoutLiveChatPanel = (_stable, p)=>{
|
|
|
113
113
|
});
|
|
114
114
|
});
|
|
115
115
|
};
|
|
116
|
-
|
|
116
|
+
createTrackedEffect(()=>{
|
|
117
117
|
const messages = internalMessages();
|
|
118
118
|
const nextMessageCount = messages.length;
|
|
119
119
|
const nextLastMessageId = messages[messages.length - 1]?.messageId;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createComponent, effect, insert, memo, mergeProps, ref, setAttribute, spread, template } from "@solidjs/web";
|
|
2
2
|
import { defineComponent } from "solid-layouts/solid-2/application-boundary";
|
|
3
|
-
import { createContext,
|
|
3
|
+
import { createContext, createMemo, createTrackedEffect, createUniqueId, omit, onCleanup, useContext } from "solid-js";
|
|
4
4
|
import { twMerge } from "../../lib/twMerge.js";
|
|
5
5
|
import { MenuContext } from "./context.js";
|
|
6
6
|
import { CLASSES, componentRecipe } from "./Menu.recipe.js";
|
|
@@ -110,7 +110,7 @@ const __solidLayoutMenuItemRoot = (_stable, p)=>{
|
|
|
110
110
|
if (event.defaultPrevented) return;
|
|
111
111
|
if (menu?.focusedKey() === key()) menu.setFocusedKey(void 0);
|
|
112
112
|
};
|
|
113
|
-
|
|
113
|
+
createTrackedEffect(()=>{
|
|
114
114
|
if (!menu || !itemRef) return;
|
|
115
115
|
menu.registerItem({
|
|
116
116
|
key: key(),
|
|
@@ -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 = ()=>{
|
|
@@ -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,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();
|