@smwb/ui-solid 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -5
- package/dist/assets/styles/less/components/carousel/carousel.entry.css +1 -1
- package/dist/components/dataDisplay/carousel/carousel.d.ts +10 -0
- package/dist/components/dataDisplay/carousel/carousel.js +223 -106
- package/dist/components/dataDisplay/carousel/carousel.js.map +1 -1
- package/dist/components/dataDisplay/carousel/utils.d.ts +5 -0
- package/dist/components/dataDisplay/carousel/utils.js +26 -12
- package/dist/components/dataDisplay/carousel/utils.js.map +1 -1
- package/dist/components/layout/screenDivider/screenDivider.js +40 -49
- package/dist/components/layout/screenDivider/screenDivider.js.map +1 -1
- package/dist/headless/components/dataDisplay/carousel/carousel.js +223 -106
- package/dist/headless/components/dataDisplay/carousel/carousel.js.map +1 -1
- package/dist/headless/components/dataDisplay/carousel/utils.js +26 -12
- package/dist/headless/components/dataDisplay/carousel/utils.js.map +1 -1
- package/dist/headless/components/layout/screenDivider/screenDivider.js +38 -47
- package/dist/headless/components/layout/screenDivider/screenDivider.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../../src/components/dataDisplay/carousel/utils.ts"],"sourcesContent":["import type { JSX } from \"solid-js\";\n\nexport function getActiveSlideDotsLength(slidesCount: number, slidesToShow: number): number {\n const dots = Math.floor(slidesCount / slidesToShow);\n return slidesCount % slidesToShow === 0 ? dots - 1 : dots;\n}\n\nexport function getSlideIndexForMultipleParts(\n activeIndex: number,\n slidesToShow: number,\n slidesCount: number,\n isNextSlideDisabled: boolean\n): number {\n const dotsLength = getActiveSlideDotsLength(slidesCount, slidesToShow);\n if (activeIndex === slidesCount + slidesToShow) return 0;\n if (isNextSlideDisabled || (activeIndex < slidesToShow && activeIndex !== 0)) return dotsLength;\n if (activeIndex === 0) return slidesCount % slidesToShow === 0 ? dotsLength : dotsLength - 1;\n return slidesToShow > 0 ? Math.floor(activeIndex / slidesToShow) - 1 : 0;\n}\n\nexport function isMouseEvent(event: Event): event is MouseEvent {\n return event instanceof MouseEvent;\n}\n\nexport function isTouchEvent(event: Event): event is TouchEvent {\n return typeof TouchEvent !== \"undefined\" && event instanceof TouchEvent;\n}\n\nexport function coordX(event: MouseEvent | TouchEvent): number {\n if (isTouchEvent(event)) return event.changedTouches[0]?.clientX ?? 0;\n return event.clientX;\n}\n\nexport function coordY(event: MouseEvent | TouchEvent): number {\n if (isTouchEvent(event)) return event.changedTouches[0]?.clientY ?? 0;\n return event.clientY;\n}\n\nexport function dragPrevent(event: Event): void {\n const target = event.target as HTMLElement;\n if (target.tagName === \"A\" || target.tagName === \"IMG\") {\n event.preventDefault();\n }\n}\n\nexport function getSlideWidth(slidesToShow: number): number {\n return 100 / slidesToShow;\n}\n\nexport function getSlideStyle(slidesToShow: number): JSX.CSSProperties {\n return { width: `${getSlideWidth(slidesToShow)}%` };\n}\n\nexport function getSlidesToShow(slidesToShow: number, slidesCount: number): number {\n if (slidesToShow <= 0 || slidesCount === 0) return 1;\n if (slidesToShow > slidesCount) return slidesCount;\n return slidesToShow;\n}\n\nexport function getStartSlide(startSlide: number, slidesCount: number): number {\n if (startSlide <= 0 || slidesCount === 0) return 0;\n const maxIndex = slidesCount - 1;\n if (startSlide > maxIndex) return maxIndex;\n return startSlide;\n}\n"],"names":["getActiveSlideDotsLength","slidesCount","slidesToShow","dots","getSlideIndexForMultipleParts","activeIndex","isNextSlideDisabled","dotsLength","isMouseEvent","event","isTouchEvent","coordX","coordY","dragPrevent","target","getSlideWidth","getSlideStyle","getSlidesToShow","getStartSlide","startSlide","maxIndex"],"mappings":"AAEO,SAASA,EAAyBC,GAAqBC,GAA8B;AAC1F,QAAMC,IAAO,KAAK,MAAMF,IAAcC,CAAY;AAClD,SAAOD,IAAcC,MAAiB,IAAIC,IAAO,IAAIA;AACvD;AAEO,SAASC,EACdC,GACAH,GACAD,GACAK,GACQ;AACR,QAAMC,IAAaP,EAAyBC,GAAaC,CAAY;AACrE,SAAIG,MAAgBJ,IAAcC,IAAqB,IACnDI,KAAwBD,IAAcH,KAAgBG,MAAgB,IAAWE,IACjFF,MAAgB,IAAUJ,IAAcC,MAAiB,IAAIK,IAAaA,IAAa,IACpFL,IAAe,IAAI,KAAK,MAAMG,IAAcH,CAAY,IAAI,IAAI;AACzE;AAEO,SAASM,EAAaC,GAAmC;AAC9D,SAAOA,aAAiB;AAC1B;AAEO,SAASC,EAAaD,GAAmC;AAC9D,SAAO,OAAO,aAAe,OAAeA,aAAiB;AAC/D;AAEO,SAASE,EAAOF,GAAwC;AAC7D,SAAIC,EAAaD,CAAK,IAAUA,EAAM,eAAe,CAAC,GAAG,WAAW,IAC7DA,EAAM;AACf;AAEO,SAASG,EAAOH,GAAwC;AAC7D,SAAIC,EAAaD,CAAK,IAAUA,EAAM,eAAe,CAAC,GAAG,WAAW,IAC7DA,EAAM;AACf;AAEO,SAASI,EAAYJ,GAAoB;AAC9C,QAAMK,IAASL,EAAM;AACrB,GAAIK,EAAO,YAAY,OAAOA,EAAO,YAAY,UAC/CL,EAAM,eAAA;AAEV;AAEO,SAASM,EAAcb,GAA8B;AAC1D,SAAO,MAAMA;AACf;AAEO,SAASc,EAAcd,GAAyC;AACrE,SAAO,EAAE,OAAO,GAAGa,EAAcb,CAAY,CAAC,IAAA;AAChD;AAEO,SAASe,EAAgBf,GAAsBD,GAA6B;AACjF,SAAIC,KAAgB,KAAKD,MAAgB,IAAU,IAC/CC,IAAeD,IAAoBA,IAChCC;AACT;AAEO,SAASgB,EAAcC,GAAoBlB,GAA6B;AAC7E,MAAIkB,KAAc,KAAKlB,MAAgB,EAAG,QAAO;AACjD,QAAMmB,IAAWnB,IAAc;AAC/B,SAAIkB,IAAaC,IAAiBA,IAC3BD;AACT;"}
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../src/components/dataDisplay/carousel/utils.ts"],"sourcesContent":["import type { JSX } from \"solid-js\";\n\nexport function getActiveSlideDotsLength(slidesCount: number, slidesToShow: number): number {\n const dots = Math.floor(slidesCount / slidesToShow);\n return slidesCount % slidesToShow === 0 ? dots - 1 : dots;\n}\n\nexport function getSlideIndexForMultipleParts(\n activeIndex: number,\n slidesToShow: number,\n slidesCount: number,\n isNextSlideDisabled: boolean\n): number {\n const dotsLength = getActiveSlideDotsLength(slidesCount, slidesToShow);\n if (activeIndex === slidesCount + slidesToShow) return 0;\n if (isNextSlideDisabled || (activeIndex < slidesToShow && activeIndex !== 0)) return dotsLength;\n if (activeIndex === 0) return slidesCount % slidesToShow === 0 ? dotsLength : dotsLength - 1;\n return slidesToShow > 0 ? Math.floor(activeIndex / slidesToShow) - 1 : 0;\n}\n\nexport function isMouseEvent(event: Event): event is MouseEvent {\n return event instanceof MouseEvent;\n}\n\nexport function isTouchEvent(event: Event): event is TouchEvent {\n return typeof TouchEvent !== \"undefined\" && event instanceof TouchEvent;\n}\n\nexport function coordX(event: MouseEvent | TouchEvent): number {\n if (isTouchEvent(event)) return event.changedTouches[0]?.clientX ?? 0;\n return event.clientX;\n}\n\nexport function coordY(event: MouseEvent | TouchEvent): number {\n if (isTouchEvent(event)) return event.changedTouches[0]?.clientY ?? 0;\n return event.clientY;\n}\n\nexport function dragPrevent(event: Event): void {\n const target = event.target as HTMLElement;\n if (target.tagName === \"A\" || target.tagName === \"IMG\") {\n event.preventDefault();\n }\n}\n\nexport function getSlideWidth(slidesToShow: number): number {\n return 100 / slidesToShow;\n}\n\nexport function getSlideStyle(slidesToShow: number): JSX.CSSProperties {\n return { width: `${getSlideWidth(slidesToShow)}%` };\n}\n\nexport function getSlidesToShow(slidesToShow: number, slidesCount: number): number {\n if (slidesToShow <= 0 || slidesCount === 0) return 1;\n if (slidesToShow > slidesCount) return slidesCount;\n return slidesToShow;\n}\n\nexport function getStartSlide(startSlide: number, slidesCount: number): number {\n if (startSlide <= 0 || slidesCount === 0) return 0;\n const maxIndex = slidesCount - 1;\n if (startSlide > maxIndex) return maxIndex;\n return startSlide;\n}\n\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\n/** Number -> \"<n>px\", string -> as-is, nullish -> undefined. */\nexport function toCssLength(value?: number | string): string | undefined {\n if (value === undefined || value === null) return undefined;\n return typeof value === \"number\" ? `${value}px` : value;\n}\n\n/** Number/string -> string, nullish -> undefined (for unit-less CSS values like aspect-ratio). */\nexport function toCssNumber(value?: number | string): string | undefined {\n if (value === undefined || value === null) return undefined;\n return String(value);\n}\n"],"names":["getActiveSlideDotsLength","slidesCount","slidesToShow","dots","getSlideIndexForMultipleParts","activeIndex","isNextSlideDisabled","dotsLength","isMouseEvent","event","isTouchEvent","coordX","coordY","dragPrevent","target","getSlideWidth","getSlideStyle","getSlidesToShow","getStartSlide","startSlide","maxIndex","clamp","value","min","max","toCssLength","toCssNumber"],"mappings":"AAEO,SAASA,EAAyBC,GAAqBC,GAA8B;AAC1F,QAAMC,IAAO,KAAK,MAAMF,IAAcC,CAAY;AAClD,SAAOD,IAAcC,MAAiB,IAAIC,IAAO,IAAIA;AACvD;AAEO,SAASC,EACdC,GACAH,GACAD,GACAK,GACQ;AACR,QAAMC,IAAaP,EAAyBC,GAAaC,CAAY;AACrE,SAAIG,MAAgBJ,IAAcC,IAAqB,IACnDI,KAAwBD,IAAcH,KAAgBG,MAAgB,IAAWE,IACjFF,MAAgB,IAAUJ,IAAcC,MAAiB,IAAIK,IAAaA,IAAa,IACpFL,IAAe,IAAI,KAAK,MAAMG,IAAcH,CAAY,IAAI,IAAI;AACzE;AAEO,SAASM,EAAaC,GAAmC;AAC9D,SAAOA,aAAiB;AAC1B;AAEO,SAASC,EAAaD,GAAmC;AAC9D,SAAO,OAAO,aAAe,OAAeA,aAAiB;AAC/D;AAEO,SAASE,EAAOF,GAAwC;AAC7D,SAAIC,EAAaD,CAAK,IAAUA,EAAM,eAAe,CAAC,GAAG,WAAW,IAC7DA,EAAM;AACf;AAEO,SAASG,EAAOH,GAAwC;AAC7D,SAAIC,EAAaD,CAAK,IAAUA,EAAM,eAAe,CAAC,GAAG,WAAW,IAC7DA,EAAM;AACf;AAEO,SAASI,EAAYJ,GAAoB;AAC9C,QAAMK,IAASL,EAAM;AACrB,GAAIK,EAAO,YAAY,OAAOA,EAAO,YAAY,UAC/CL,EAAM,eAAA;AAEV;AAEO,SAASM,EAAcb,GAA8B;AAC1D,SAAO,MAAMA;AACf;AAEO,SAASc,EAAcd,GAAyC;AACrE,SAAO,EAAE,OAAO,GAAGa,EAAcb,CAAY,CAAC,IAAA;AAChD;AAEO,SAASe,EAAgBf,GAAsBD,GAA6B;AACjF,SAAIC,KAAgB,KAAKD,MAAgB,IAAU,IAC/CC,IAAeD,IAAoBA,IAChCC;AACT;AAEO,SAASgB,EAAcC,GAAoBlB,GAA6B;AAC7E,MAAIkB,KAAc,KAAKlB,MAAgB,EAAG,QAAO;AACjD,QAAMmB,IAAWnB,IAAc;AAC/B,SAAIkB,IAAaC,IAAiBA,IAC3BD;AACT;AAEO,SAASE,EAAMC,GAAeC,GAAaC,GAAqB;AACrE,SAAO,KAAK,IAAI,KAAK,IAAIF,GAAOC,CAAG,GAAGC,CAAG;AAC3C;AAGO,SAASC,EAAYH,GAA6C;AACvE,MAA2BA,KAAU;AACrC,WAAO,OAAOA,KAAU,WAAW,GAAGA,CAAK,OAAOA;AACpD;AAGO,SAASI,EAAYJ,GAA6C;AACvE,MAA2BA,KAAU;AACrC,WAAO,OAAOA,CAAK;AACrB;"}
|
|
@@ -1,65 +1,56 @@
|
|
|
1
|
-
import { isServer as
|
|
2
|
-
import { mergeProps as
|
|
3
|
-
import
|
|
4
|
-
import { throttle as
|
|
5
|
-
import { mergeRefs as
|
|
6
|
-
var
|
|
7
|
-
const C = (
|
|
8
|
-
function re(
|
|
9
|
-
const
|
|
1
|
+
import { isServer as F, use as H, insert as $, setAttribute as v, effect as N, className as m, style as L, template as O, delegateEvents as U } from "solid-js/web";
|
|
2
|
+
import { mergeProps as X, splitProps as Y, createSignal as x, createEffect as f, children as j, onCleanup as q } from "solid-js";
|
|
3
|
+
import u from "clsx";
|
|
4
|
+
import { throttle as G } from "../../../utils/throttle.js";
|
|
5
|
+
import { mergeRefs as J } from "../../../primitives/mergeRefs.js";
|
|
6
|
+
var Q = /* @__PURE__ */ O("<div data-testid=screen-divider><div></div><span class=smwb-screen-divider__resizer role=separator aria-valuemin=0 aria-valuemax=100 tabindex=0></span><div>");
|
|
7
|
+
const C = (d, l) => !d && l ? 100 - l : d || 50;
|
|
8
|
+
function re(d) {
|
|
9
|
+
const l = X({
|
|
10
10
|
orientation: "horizontal",
|
|
11
11
|
keyboardStep: 5,
|
|
12
12
|
resizerAriaLabel: "Resize panels"
|
|
13
|
-
},
|
|
14
|
-
let
|
|
15
|
-
const [
|
|
13
|
+
}, d), [e] = Y(l, ["class", "orientation", "sizeFirst", "sizeSecond", "children", "onSizeChange", "keyboardStep", "resizerAriaLabel", "ref"]);
|
|
14
|
+
let h;
|
|
15
|
+
const [a, s] = x(C(e.sizeFirst, e.sizeSecond)), [g, b] = x(!1);
|
|
16
16
|
f(() => {
|
|
17
|
-
s(
|
|
17
|
+
s(C(e.sizeFirst, e.sizeSecond));
|
|
18
18
|
}), f(() => {
|
|
19
|
-
e.onSizeChange?.(
|
|
19
|
+
e.onSizeChange?.(a());
|
|
20
20
|
});
|
|
21
|
-
const
|
|
22
|
-
if (!
|
|
23
|
-
const o =
|
|
24
|
-
if (o)
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
const n = r / o.clientHeight * 100;
|
|
29
|
-
C(n, o.clientWidth) > 5 && n < 101 && s(n - 7);
|
|
30
|
-
} else {
|
|
31
|
-
let r = t.clientX - o.offsetLeft;
|
|
32
|
-
r < 0 && (r = 0);
|
|
33
|
-
const n = r / o.clientWidth * 100;
|
|
34
|
-
C(n, o.clientWidth) > 5 && n < 101 && s(n);
|
|
35
|
-
}
|
|
36
|
-
}, 1e3 / 60), R = () => {
|
|
21
|
+
const _ = j(() => e.children), p = () => _.toArray(), y = G((t) => {
|
|
22
|
+
if (!g()) return;
|
|
23
|
+
const o = h;
|
|
24
|
+
if (!o) return;
|
|
25
|
+
const i = o.getBoundingClientRect(), n = e.orientation === "vertical" ? i.height : i.width, c = e.orientation === "vertical" ? t.clientY - i.top : t.clientX - i.left, r = Math.max(5, Math.min(n - 5, c));
|
|
26
|
+
s(r / n * 100);
|
|
27
|
+
}, 1e3 / 60), M = () => {
|
|
37
28
|
b(!0);
|
|
38
|
-
},
|
|
29
|
+
}, w = () => {
|
|
39
30
|
b(!1);
|
|
40
31
|
};
|
|
41
32
|
f(() => {
|
|
42
|
-
|
|
43
|
-
document.body.removeEventListener("pointerup",
|
|
33
|
+
F || (g() ? (document.body.addEventListener("pointerup", w), document.body.addEventListener("pointermove", y), document.body.style.cursor = e.orientation === "horizontal" ? "e-resize" : "n-resize") : document.body.style.cursor = "default", q(() => {
|
|
34
|
+
document.body.removeEventListener("pointerup", w), document.body.removeEventListener("pointermove", y);
|
|
44
35
|
}));
|
|
45
36
|
});
|
|
46
|
-
const
|
|
47
|
-
const o = e.orientation === "vertical" ? "ArrowUp" : "ArrowLeft",
|
|
48
|
-
t.key === o ? (t.preventDefault(), s((n) => Math.max(0, n - e.keyboardStep))) : t.key ===
|
|
49
|
-
},
|
|
50
|
-
height: `${
|
|
37
|
+
const R = (t) => {
|
|
38
|
+
const o = e.orientation === "vertical" ? "ArrowUp" : "ArrowLeft", i = e.orientation === "vertical" ? "ArrowDown" : "ArrowRight";
|
|
39
|
+
t.key === o ? (t.preventDefault(), s((n) => Math.max(0, n - e.keyboardStep))) : t.key === i ? (t.preventDefault(), s((n) => Math.min(100, n + e.keyboardStep))) : t.key === "Home" ? (t.preventDefault(), s(0)) : t.key === "End" && (t.preventDefault(), s(100));
|
|
40
|
+
}, K = () => e.orientation === "vertical" ? {
|
|
41
|
+
height: `${a()}%`
|
|
51
42
|
} : {
|
|
52
|
-
width: `${
|
|
53
|
-
},
|
|
54
|
-
height: `${100 -
|
|
43
|
+
width: `${a()}%`
|
|
44
|
+
}, I = () => e.orientation === "vertical" ? {
|
|
45
|
+
height: `${100 - a()}%`
|
|
55
46
|
} : {
|
|
56
|
-
width: `${100 -
|
|
47
|
+
width: `${100 - a()}%`
|
|
57
48
|
};
|
|
58
49
|
return (() => {
|
|
59
|
-
var t =
|
|
60
|
-
return typeof
|
|
61
|
-
var z =
|
|
62
|
-
return z !==
|
|
50
|
+
var t = Q(), o = t.firstChild, i = o.nextSibling, n = i.nextSibling, c = J(e.ref, (r) => h = r);
|
|
51
|
+
return typeof c == "function" && H(c, t), $(o, () => p()[0] ?? ""), i.$$keydown = R, i.$$pointerdown = M, v(i, "draggable", !1), $(n, () => p()[1] ?? ""), N((r) => {
|
|
52
|
+
var z = u("smwb-screen-divider__wrapper", `smwb-${e.orientation}`, e.class), S = u("smwb-screen-divider__first", `smwb-${e.orientation}`), P = K(), D = e.orientation === "vertical" ? "horizontal" : "vertical", k = Math.round(a()), A = e.resizerAriaLabel, E = u("smwb-screen-divider__second", `smwb-${e.orientation}`), B = I();
|
|
53
|
+
return z !== r.e && m(t, r.e = z), S !== r.t && m(o, r.t = S), r.a = L(o, P, r.a), D !== r.o && v(i, "aria-orientation", r.o = D), k !== r.i && v(i, "aria-valuenow", r.i = k), A !== r.n && v(i, "aria-label", r.n = A), E !== r.s && m(n, r.s = E), r.h = L(n, B, r.h), r;
|
|
63
54
|
}, {
|
|
64
55
|
e: void 0,
|
|
65
56
|
t: void 0,
|
|
@@ -72,7 +63,7 @@ function re(a) {
|
|
|
72
63
|
}), t;
|
|
73
64
|
})();
|
|
74
65
|
}
|
|
75
|
-
|
|
66
|
+
U(["pointerdown", "keydown"]);
|
|
76
67
|
export {
|
|
77
68
|
re as ScreenDivider
|
|
78
69
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenDivider.js","sources":["../../../../../src/components/layout/screenDivider/screenDivider.tsx"],"sourcesContent":["import {\n type JSX,\n type ParentProps,\n children as resolveChildren,\n createEffect,\n createSignal,\n mergeProps,\n onCleanup,\n splitProps,\n} from \"solid-js\";\nimport { isServer } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { throttle } from \"../../../utils/throttle\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface ScreenDividerProps {\n sizeFirst?: number;\n sizeSecond?: number;\n class?: string;\n orientation?: \"horizontal\" | \"vertical\";\n /** Called with the first pane size (percent) whenever it changes. */\n onSizeChange?: (sizeFirst: number) => void;\n /** Step (in percent) applied on arrow-key resize. */\n keyboardStep?: number;\n /** Accessible label for the resizer handle. */\n resizerAriaLabel?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst toPixels = (percent: number, parentSize: number): number => parentSize * (percent / 100);\n\nconst getInitialDivider = (sizeFirst?: number | null, sizeSecond?: number | null): number => {\n if (!sizeFirst && sizeSecond) {\n return 100 - sizeSecond;\n }\n if (sizeFirst) {\n return sizeFirst;\n }\n return 50;\n};\n\nexport function ScreenDivider(props: ParentProps<ScreenDividerProps>): JSX.Element {\n const merged = mergeProps(\n { orientation: \"horizontal\" as const, keyboardStep: 5, resizerAriaLabel: \"Resize panels\" },\n props\n );\n const [local] = splitProps(merged, [\n \"class\",\n \"orientation\",\n \"sizeFirst\",\n \"sizeSecond\",\n \"children\",\n \"onSizeChange\",\n \"keyboardStep\",\n \"resizerAriaLabel\",\n \"ref\",\n ]);\n\n let wrapperEl: HTMLDivElement | undefined;\n const [divider, setDivider] = createSignal(getInitialDivider(local.sizeFirst, local.sizeSecond));\n const [isDragging, setIsDragging] = createSignal(false);\n\n // Sync with controlled size props.\n createEffect(() => {\n setDivider(getInitialDivider(local.sizeFirst, local.sizeSecond));\n });\n\n // Report size changes.\n createEffect(() => {\n local.onSizeChange?.(divider());\n });\n\n const resolved = resolveChildren(() => local.children);\n const child = (): unknown[] => resolved.toArray();\n\n const dragOver = throttle((event: PointerEvent) => {\n if (!isDragging()) return;\n const wrapper = wrapperEl;\n if (!wrapper) return;\n if (local.orientation === \"vertical\") {\n let relativeMouseY = event.clientY - wrapper.offsetTop;\n if (relativeMouseY < 0) relativeMouseY = 0;\n const newDivider = (relativeMouseY / wrapper.clientHeight) * 100;\n if (toPixels(newDivider, wrapper.clientWidth) > 5 && newDivider < 101) {\n setDivider(newDivider - 7);\n }\n } else {\n let relativeMouseX = event.clientX - wrapper.offsetLeft;\n if (relativeMouseX < 0) relativeMouseX = 0;\n const newDivider = (relativeMouseX / wrapper.clientWidth) * 100;\n if (toPixels(newDivider, wrapper.clientWidth) > 5 && newDivider < 101) {\n setDivider(newDivider);\n }\n }\n }, 1000 / 60);\n\n const handleDragStart = (): void => {\n setIsDragging(true);\n };\n const handleDragEnd = (): void => {\n setIsDragging(false);\n };\n\n createEffect(() => {\n if (isServer) return;\n if (isDragging()) {\n document.body.addEventListener(\"pointerup\", handleDragEnd);\n document.body.addEventListener(\"pointermove\", dragOver);\n document.body.style.cursor = local.orientation === \"horizontal\" ? \"e-resize\" : \"n-resize\";\n } else {\n document.body.style.cursor = \"default\";\n }\n onCleanup(() => {\n document.body.removeEventListener(\"pointerup\", handleDragEnd);\n document.body.removeEventListener(\"pointermove\", dragOver);\n });\n });\n\n const onResizerKeyDown: JSX.EventHandler<HTMLSpanElement, KeyboardEvent> = (event) => {\n const decreaseKey = local.orientation === \"vertical\" ? \"ArrowUp\" : \"ArrowLeft\";\n const increaseKey = local.orientation === \"vertical\" ? \"ArrowDown\" : \"ArrowRight\";\n if (event.key === decreaseKey) {\n event.preventDefault();\n setDivider((prev) => Math.max(0, prev - local.keyboardStep));\n } else if (event.key === increaseKey) {\n event.preventDefault();\n setDivider((prev) => Math.min(100, prev + local.keyboardStep));\n } else if (event.key === \"Home\") {\n event.preventDefault();\n setDivider(0);\n } else if (event.key === \"End\") {\n event.preventDefault();\n setDivider(100);\n }\n };\n\n const firstChildStyle = (): JSX.CSSProperties =>\n local.orientation === \"vertical\" ? { height: `${divider()}%` } : { width: `${divider()}%` };\n const secondChildStyle = (): JSX.CSSProperties =>\n local.orientation === \"vertical\" ? { height: `${100 - divider()}%` } : { width: `${100 - divider()}%` };\n\n return (\n <div\n class={cn(\"smwb-screen-divider__wrapper\", `smwb-${local.orientation}`, local.class)}\n ref={mergeRefs(local.ref, (el) => (wrapperEl = el))}\n data-testid=\"screen-divider\"\n >\n <div class={cn(\"smwb-screen-divider__first\", `smwb-${local.orientation}`)} style={firstChildStyle()}>\n {(child()[0] ?? \"\") as JSX.Element}\n </div>\n <span\n class=\"smwb-screen-divider__resizer\"\n onPointerDown={handleDragStart}\n draggable={false}\n role=\"separator\"\n aria-orientation={local.orientation === \"vertical\" ? \"horizontal\" : \"vertical\"}\n aria-valuenow={Math.round(divider())}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-label={local.resizerAriaLabel}\n tabindex={0}\n onKeyDown={onResizerKeyDown}\n />\n <div class={cn(\"smwb-screen-divider__second\", `smwb-${local.orientation}`)} style={secondChildStyle()}>\n {(child()[1] ?? \"\") as JSX.Element}\n </div>\n </div>\n );\n}\n\nexport default ScreenDivider;\n"],"names":["toPixels","percent","parentSize","getInitialDivider","sizeFirst","sizeSecond","ScreenDivider","props","merged","mergeProps","orientation","keyboardStep","resizerAriaLabel","local","splitProps","wrapperEl","divider","setDivider","createSignal","isDragging","setIsDragging","createEffect","onSizeChange","resolved","resolveChildren","children","child","toArray","dragOver","throttle","event","wrapper","relativeMouseY","clientY","offsetTop","newDivider","clientHeight","clientWidth","relativeMouseX","clientX","offsetLeft","handleDragStart","handleDragEnd","isServer","document","body","addEventListener","style","cursor","onCleanup","removeEventListener","onResizerKeyDown","decreaseKey","increaseKey","key","preventDefault","prev","Math","max","min","firstChildStyle","height","width","secondChildStyle","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_el$4","_ref$","mergeRefs","ref","el","_$use","_$insert","$$keydown","$$pointerdown","_$setAttribute","_$effect","_p$","_v$","cn","class","_v$2","_v$3","_v$4","_v$5","round","_v$6","_v$7","_v$8","e","_$className","t","a","_$style","o","i","n","s","h","undefined","_$delegateEvents"],"mappings":";;;;;;AA6BA,MAAMA,IAAWA,CAACC,GAAiBC,MAA+BA,KAAcD,IAAU,MAEpFE,IAAoBA,CAACC,GAA2BC,MAChD,CAACD,KAAaC,IACT,MAAMA,IAEXD,KAGG;AAGF,SAASE,GAAcC,GAAqD;AACjF,QAAMC,IAASC,EACb;AAAA,IAAEC,aAAa;AAAA,IAAuBC,cAAc;AAAA,IAAGC,kBAAkB;AAAA,EAAA,GACzEL,CACF,GACM,CAACM,CAAK,IAAIC,EAAWN,GAAQ,CACjC,SACA,eACA,aACA,cACA,YACA,gBACA,gBACA,oBACA,KAAK,CACN;AAED,MAAIO;AACJ,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAaf,EAAkBU,EAAMT,WAAWS,EAAMR,UAAU,CAAC,GACzF,CAACc,GAAYC,CAAa,IAAIF,EAAa,EAAK;AAGtDG,EAAAA,EAAa,MAAM;AACjBJ,IAAAA,EAAWd,EAAkBU,EAAMT,WAAWS,EAAMR,UAAU,CAAC;AAAA,EACjE,CAAC,GAGDgB,EAAa,MAAM;AACjBR,IAAAA,EAAMS,eAAeN,GAAS;AAAA,EAChC,CAAC;AAED,QAAMO,IAAWC,EAAgB,MAAMX,EAAMY,QAAQ,GAC/CC,IAAQA,MAAiBH,EAASI,QAAAA,GAElCC,IAAWC,EAAS,CAACC,MAAwB;AACjD,QAAI,CAACX,IAAc;AACnB,UAAMY,IAAUhB;AAChB,QAAKgB;AACL,UAAIlB,EAAMH,gBAAgB,YAAY;AACpC,YAAIsB,IAAiBF,EAAMG,UAAUF,EAAQG;AAC7C,QAAIF,IAAiB,MAAGA,IAAiB;AACzC,cAAMG,IAAcH,IAAiBD,EAAQK,eAAgB;AAC7D,QAAIpC,EAASmC,GAAYJ,EAAQM,WAAW,IAAI,KAAKF,IAAa,OAChElB,EAAWkB,IAAa,CAAC;AAAA,MAE7B,OAAO;AAC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AAiB,EAAAY,IAAAX,CAAA,GAAAG,MAAAJ,EAAAc,KAAAD,EAAA5B,GAAAe,EAAAc,IAAAV,CAAA,GAAAJ,EAAAe,IAAAC,EAAA/B,GAAAoB,GAAAL,EAAAe,CAAA,GAAAT,MAAAN,EAAAiB,KAAAnB,EAAAX,GAAA,oBAAAa,EAAAiB,IAAAX,CAAA,GAAAC,MAAAP,EAAAkB,KAAApB,EAAAX,GAAA,iBAAAa,EAAAkB,IAAAX,CAAA,GAAAE,MAAAT,EAAAmB,KAAArB,EAAAX,GAAA,cAAAa,EAAAmB,IAAAV,CAAA,GAAAC,MAAAV,EAAAoB,KAAAP,EAAAxB,GAAAW,EAAAoB,IAAAV,CAAA,GAAAV,EAAAqB,IAAAL,EAAA3B,GAAAsB,GAAAX,EAAAqB,CAAA,GAAArB;AAAAA,IAAA,GAAA;AAAA,MAAAY,GAAAU;AAAAA,MAAAR,GAAAQ;AAAAA,MAAAP,GAAAO;AAAAA,MAAAL,GAAAK;AAAAA,MAAAJ,GAAAI;AAAAA,MAAAH,GAAAG;AAAAA,MAAAF,GAAAE;AAAAA,MAAAD,GAAAC;AAAAA,IAAAA,CAAA,GAAAvC;AAAAA,EAAA,GAAA;AAK3G;AAE6BwC,EAAA,CAAA,eAAA,SAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"screenDivider.js","sources":["../../../../../src/components/layout/screenDivider/screenDivider.tsx"],"sourcesContent":["import {\n type JSX,\n type ParentProps,\n children as resolveChildren,\n createEffect,\n createSignal,\n mergeProps,\n onCleanup,\n splitProps,\n} from \"solid-js\";\nimport { isServer } from \"solid-js/web\";\nimport cn from \"clsx\";\nimport { throttle } from \"../../../utils/throttle\";\nimport { mergeRefs, type Ref } from \"../../../primitives/mergeRefs\";\n\nexport interface ScreenDividerProps {\n sizeFirst?: number;\n sizeSecond?: number;\n class?: string;\n orientation?: \"horizontal\" | \"vertical\";\n /** Called with the first pane size (percent) whenever it changes. */\n onSizeChange?: (sizeFirst: number) => void;\n /** Step (in percent) applied on arrow-key resize. */\n keyboardStep?: number;\n /** Accessible label for the resizer handle. */\n resizerAriaLabel?: string;\n ref?: Ref<HTMLDivElement>;\n}\n\nconst getInitialDivider = (sizeFirst?: number | null, sizeSecond?: number | null): number => {\n if (!sizeFirst && sizeSecond) {\n return 100 - sizeSecond;\n }\n if (sizeFirst) {\n return sizeFirst;\n }\n return 50;\n};\n\nexport function ScreenDivider(props: ParentProps<ScreenDividerProps>): JSX.Element {\n const merged = mergeProps(\n { orientation: \"horizontal\" as const, keyboardStep: 5, resizerAriaLabel: \"Resize panels\" },\n props\n );\n const [local] = splitProps(merged, [\n \"class\",\n \"orientation\",\n \"sizeFirst\",\n \"sizeSecond\",\n \"children\",\n \"onSizeChange\",\n \"keyboardStep\",\n \"resizerAriaLabel\",\n \"ref\",\n ]);\n\n let wrapperEl: HTMLDivElement | undefined;\n const [divider, setDivider] = createSignal(getInitialDivider(local.sizeFirst, local.sizeSecond));\n const [isDragging, setIsDragging] = createSignal(false);\n\n // Sync with controlled size props.\n createEffect(() => {\n setDivider(getInitialDivider(local.sizeFirst, local.sizeSecond));\n });\n\n // Report size changes.\n createEffect(() => {\n local.onSizeChange?.(divider());\n });\n\n const resolved = resolveChildren(() => local.children);\n const child = (): unknown[] => resolved.toArray();\n\n const dragOver = throttle((event: PointerEvent) => {\n if (!isDragging()) return;\n const wrapper = wrapperEl;\n if (!wrapper) return;\n // Viewport-relative rect — using offsetLeft/offsetTop here is wrong\n // because they are relative to the nearest positioned ancestor, not\n // the viewport that clientX/clientY live in (this is what made the\n // divider drift away from the cursor when the wrapper was nested).\n const rect = wrapper.getBoundingClientRect();\n const total = local.orientation === \"vertical\" ? rect.height : rect.width;\n const cursor = local.orientation === \"vertical\" ? event.clientY - rect.top : event.clientX - rect.left;\n // 5px margin on each side so neither pane fully collapses.\n const clamped = Math.max(5, Math.min(total - 5, cursor));\n setDivider((clamped / total) * 100);\n }, 1000 / 60);\n\n const handleDragStart = (): void => {\n setIsDragging(true);\n };\n const handleDragEnd = (): void => {\n setIsDragging(false);\n };\n\n createEffect(() => {\n if (isServer) return;\n if (isDragging()) {\n document.body.addEventListener(\"pointerup\", handleDragEnd);\n document.body.addEventListener(\"pointermove\", dragOver);\n document.body.style.cursor = local.orientation === \"horizontal\" ? \"e-resize\" : \"n-resize\";\n } else {\n document.body.style.cursor = \"default\";\n }\n onCleanup(() => {\n document.body.removeEventListener(\"pointerup\", handleDragEnd);\n document.body.removeEventListener(\"pointermove\", dragOver);\n });\n });\n\n const onResizerKeyDown: JSX.EventHandler<HTMLSpanElement, KeyboardEvent> = (event) => {\n const decreaseKey = local.orientation === \"vertical\" ? \"ArrowUp\" : \"ArrowLeft\";\n const increaseKey = local.orientation === \"vertical\" ? \"ArrowDown\" : \"ArrowRight\";\n if (event.key === decreaseKey) {\n event.preventDefault();\n setDivider((prev) => Math.max(0, prev - local.keyboardStep));\n } else if (event.key === increaseKey) {\n event.preventDefault();\n setDivider((prev) => Math.min(100, prev + local.keyboardStep));\n } else if (event.key === \"Home\") {\n event.preventDefault();\n setDivider(0);\n } else if (event.key === \"End\") {\n event.preventDefault();\n setDivider(100);\n }\n };\n\n const firstChildStyle = (): JSX.CSSProperties =>\n local.orientation === \"vertical\" ? { height: `${divider()}%` } : { width: `${divider()}%` };\n const secondChildStyle = (): JSX.CSSProperties =>\n local.orientation === \"vertical\" ? { height: `${100 - divider()}%` } : { width: `${100 - divider()}%` };\n\n return (\n <div\n class={cn(\"smwb-screen-divider__wrapper\", `smwb-${local.orientation}`, local.class)}\n ref={mergeRefs(local.ref, (el) => (wrapperEl = el))}\n data-testid=\"screen-divider\"\n >\n <div class={cn(\"smwb-screen-divider__first\", `smwb-${local.orientation}`)} style={firstChildStyle()}>\n {(child()[0] ?? \"\") as JSX.Element}\n </div>\n <span\n class=\"smwb-screen-divider__resizer\"\n onPointerDown={handleDragStart}\n draggable={false}\n role=\"separator\"\n aria-orientation={local.orientation === \"vertical\" ? \"horizontal\" : \"vertical\"}\n aria-valuenow={Math.round(divider())}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-label={local.resizerAriaLabel}\n tabindex={0}\n onKeyDown={onResizerKeyDown}\n />\n <div class={cn(\"smwb-screen-divider__second\", `smwb-${local.orientation}`)} style={secondChildStyle()}>\n {(child()[1] ?? \"\") as JSX.Element}\n </div>\n </div>\n );\n}\n\nexport default ScreenDivider;\n"],"names":["getInitialDivider","sizeFirst","sizeSecond","ScreenDivider","props","merged","mergeProps","orientation","keyboardStep","resizerAriaLabel","local","splitProps","wrapperEl","divider","setDivider","createSignal","isDragging","setIsDragging","createEffect","onSizeChange","resolved","resolveChildren","children","child","toArray","dragOver","throttle","event","wrapper","rect","getBoundingClientRect","total","height","width","cursor","clientY","top","clientX","left","clamped","Math","max","min","handleDragStart","handleDragEnd","isServer","document","body","addEventListener","style","onCleanup","removeEventListener","onResizerKeyDown","decreaseKey","increaseKey","key","preventDefault","prev","firstChildStyle","secondChildStyle","_el$","_tmpl$","_el$2","firstChild","_el$3","nextSibling","_el$4","_ref$","mergeRefs","ref","el","_$use","_$insert","$$keydown","$$pointerdown","_$setAttribute","_$effect","_p$","_v$","cn","class","_v$2","_v$3","_v$4","_v$5","round","_v$6","_v$7","_v$8","e","_$className","t","a","_$style","o","i","n","s","h","undefined","_$delegateEvents"],"mappings":";;;;;;AA6BA,MAAMA,IAAoBA,CAACC,GAA2BC,MAChD,CAACD,KAAaC,IACT,MAAMA,IAEXD,KAGG;AAGF,SAASE,GAAcC,GAAqD;AACjF,QAAMC,IAASC,EACb;AAAA,IAAEC,aAAa;AAAA,IAAuBC,cAAc;AAAA,IAAGC,kBAAkB;AAAA,EAAA,GACzEL,CACF,GACM,CAACM,CAAK,IAAIC,EAAWN,GAAQ,CACjC,SACA,eACA,aACA,cACA,YACA,gBACA,gBACA,oBACA,KAAK,CACN;AAED,MAAIO;AACJ,QAAM,CAACC,GAASC,CAAU,IAAIC,EAAaf,EAAkBU,EAAMT,WAAWS,EAAMR,UAAU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AAAA,CAAA,GAAAvC;AAAAA,EAAA,GAAA;AAK3G;AAE6BwC,EAAA,CAAA,eAAA,SAAA,CAAA;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smwb/ui-solid",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"description": "SolidJS port of summer-ui: strict, tree-shakeable Material-style component library sharing the @smwb/ui-styles design system.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@eslint/js": "^9.39.0",
|
|
56
|
-
"@smwb/ui-styles": "^1.0.
|
|
56
|
+
"@smwb/ui-styles": "^1.0.1",
|
|
57
57
|
"@storybook/addon-docs": "^10.4.0",
|
|
58
58
|
"@storybook/addon-links": "^10.4.0",
|
|
59
59
|
"@storybook/test-runner": "^0.24.4",
|