@solid2-aria/vaul 0.0.0-stage → 0.0.1
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/LICENSE +21 -0
- package/NOTICE.txt +29 -0
- package/README.md +152 -2
- package/VAUL-LICENSE +9 -0
- package/dist/browser/index.d.ts +107 -0
- package/dist/browser/index.js +1004 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/server/index.js +1058 -0
- package/dist/server/index.js.map +1 -0
- package/dist/style.css +216 -0
- package/docs/api.md +76 -0
- package/package.json +75 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["mounted() && (context.present || props.forceMount === true)","<button {...attributes} />","context.modal &&\n (context.present || props.forceMount === true || forceMount)","context.isOpen && context.modal && !context.childOpen","data-state={context.isOpen ? \"open\" : \"closed\"}","data-vaul-drawer-direction={context.direction}","data-vaul-custom-container={context.props.container ? \"true\" : \"false\"}","data-vaul-snap-points={\n (context.props.snapPoints?.length ?? 0) > 0 ? \"true\" : \"false\"\n }","data-vaul-delayed-snap-points={\n context.snapPointsOffset.length > 0 ? \"true\" : \"false\"\n }","data-vaul-handle-only={\n context.props.handleOnly === true ? \"true\" : \"false\"\n }","data-vaul-animate={context.shouldAnimate ? \"true\" : \"false\"}","<div\n {...rest}\n ref={[\n props.ref,\n (element) => {\n context.setOverlay(element);\n },\n ]}\n data-vaul-overlay=\"\"\n data-state={context.isOpen ? \"open\" : \"closed\"}\n data-vaul-snap-points={\n (context.props.snapPoints?.length ?? 0) > 0 ? \"true\" : \"false\"\n }\n data-vaul-snap-points-overlay={context.shouldFade ? \"true\" : \"false\"}\n data-vaul-animate={context.shouldAnimate ? \"true\" : \"false\"}\n />","data-vaul-snap-points={\n (context.props.snapPoints?.length ?? 0) > 0 ? \"true\" : \"false\"\n }","data-vaul-snap-points-overlay={context.shouldFade ? \"true\" : \"false\"}","<h2 id={context.titleId} {...props} />","<p id={context.descriptionId} {...props} />","<div\n {...rest}\n data-vaul-handle=\"\"\n aria-hidden=\"true\"\n data-vaul-drawer-visible={context.isOpen ? \"true\" : \"false\"}\n onClick={(event) => {\n callHandler(props.onClick, event);\n\n if (!event.defaultPrevented) {\n cycle();\n }\n }}\n onPointerDown={(event) => {\n callHandler(props.onPointerDown, event);\n\n if (event.defaultPrevented) {\n return;\n }\n\n pressTime = Date.now();\n pressPosition = { x: event.clientX, y: event.clientY };\n moved = false;\n context.press(event, true);\n event.stopPropagation();\n }}\n onPointerMove={(event) => {\n callHandler(props.onPointerMove, event);\n\n if (\n Math.abs(event.clientX - pressPosition.x) > 2 ||\n Math.abs(event.clientY - pressPosition.y) > 2\n ) {\n moved = true;\n }\n }}\n onPointerCancel={(event) => {\n callHandler(props.onPointerCancel, event);\n moved = true;\n context.cancelDrag();\n }}\n >\n <span data-vaul-handle-hitarea=\"\" aria-hidden=\"true\">\n {props.children}\n </span>\n </div>","{props.children}","props.children","<span data-vaul-handle-hitarea=\"\" aria-hidden=\"true\">\n {props.children}\n </span>","data-vaul-drawer-visible={context.isOpen ? \"true\" : \"false\"}","_$memo","SolidPortal","_$ssrElement","_$ssrElementAttribute","_$scope","_$escape","_$ssr"],"sources":["../../src/context.ts","../../src/constants.ts","../../src/helpers.ts","../../src/create-background.ts","../../src/create-snap-points.ts","../../src/create-drawer.ts","../../src/create-layer.ts","../../src/create-position.ts","../../src/drawer.tsx","../../src/index.ts"],"sourcesContent":["/*\n * Derived from Vaul (https://github.com/emilkowalski/vaul): src/context.ts.\n * Copyright (c) 2023 Emil Kowalski\n * Modified for Solid Aria: native Solid 2 contexts, reactive getters, and callback refs.\n * MIT licensed. See LICENSE, VAUL-LICENSE, and NOTICE.txt in the package root.\n */\n\nimport { createContext } from \"solid-js\";\n\nimport type { DialogProps, DrawerDirection, SnapPoint } from \"./types\";\n\nexport interface DrawerContextValue {\n readonly props: DialogProps;\n readonly isOpen: boolean;\n readonly present: boolean;\n readonly shouldAnimate: boolean;\n readonly direction: DrawerDirection;\n readonly modal: boolean;\n readonly dismissible: boolean;\n readonly contentId: string;\n readonly titleId: string;\n readonly descriptionId: string;\n readonly content: HTMLDivElement | null;\n readonly overlay: HTMLDivElement | null;\n readonly trigger: HTMLButtonElement | null;\n readonly activeSnapPoint: SnapPoint | null;\n readonly activeSnapPointIndex: number;\n readonly snapPointsOffset: readonly number[];\n readonly shouldFade: boolean;\n readonly isDragging: boolean;\n readonly dragProgress: number;\n readonly childOpen: boolean;\n setContent: (element: HTMLDivElement | null) => void;\n setOverlay: (element: HTMLDivElement | null) => void;\n setTrigger: (element: HTMLButtonElement | null) => void;\n setActiveSnapPoint: (point: SnapPoint | null) => void;\n setOpen: (open: boolean) => void;\n close: () => void;\n press: (event: PointerEvent, fromHandle?: boolean) => void;\n drag: (event: PointerEvent) => void;\n release: (event: PointerEvent) => void;\n cancelDrag: () => void;\n setChildOpen: (open: boolean) => void;\n setChildProgress: (progress: number) => void;\n}\n\nexport const DrawerContext = createContext<DrawerContextValue>();\nexport const PortalContext = createContext(false);\n","/*\n * Derived from Vaul (https://github.com/emilkowalski/vaul): src/constants.ts.\n * Copyright (c) 2023 Emil Kowalski\n * Modified for Solid Aria: preserved drawer animation and gesture constants.\n * MIT licensed. See LICENSE, VAUL-LICENSE, and NOTICE.txt in the package root.\n */\n\nexport const TRANSITIONS = {\n DURATION: 0.5,\n EASE: [0.32, 0.72, 0, 1],\n};\n\nexport const VELOCITY_THRESHOLD = 0.4;\n\nexport const CLOSE_THRESHOLD = 0.25;\n\nexport const SCROLL_LOCK_TIMEOUT = 100;\n\nexport const BORDER_RADIUS = 8;\n\nexport const NESTED_DISPLACEMENT = 16;\n\nexport const WINDOW_TOP_OFFSET = 26;\n\nexport const DRAG_CLASS = \"vaul-dragging\";\n","/*\n * Derived from Vaul (https://github.com/emilkowalski/vaul): src/helpers.ts and src/browser.ts.\n * Copyright (c) 2023 Emil Kowalski\n * Modified for Solid Aria: typed geometry and property-scoped style restoration without shared style caches.\n * MIT licensed. See LICENSE, VAUL-LICENSE, and NOTICE.txt in the package root.\n */\n\nimport type { DrawerDirection } from \"./types\";\n\nexport function isVertical(direction: DrawerDirection): boolean {\n return direction === \"top\" || direction === \"bottom\";\n}\n\nexport function directionSign(direction: DrawerDirection): 1 | -1 {\n return direction === \"bottom\" || direction === \"right\" ? 1 : -1;\n}\n\nexport function translate(\n distance: number,\n direction: DrawerDirection\n): string {\n return isVertical(direction)\n ? `translate3d(0, ${distance}px, 0)`\n : `translate3d(${distance}px, 0, 0)`;\n}\n\nexport function dampenValue(value: number): number {\n return Math.max(0, 8 * (Math.log(value + 1) - 2));\n}\n\nexport function clamp(value: number, min = 0, max = 1): number {\n return Math.min(max, Math.max(min, value));\n}\n\n/** Restore only the properties this operation owns, including priorities. */\nexport function assignStyle(\n element: HTMLElement,\n styles: Record<string, string>\n): () => void {\n const previous = Object.keys(styles).map((property) => ({\n priority: element.style.getPropertyPriority(property),\n property,\n value: element.style.getPropertyValue(property),\n }));\n\n for (const [property, value] of Object.entries(styles)) {\n element.style.setProperty(property, value);\n }\n\n return () => {\n for (const { property, value, priority } of previous) {\n if (value) {\n element.style.setProperty(property, value, priority);\n } else {\n element.style.removeProperty(property);\n }\n }\n };\n}\n\nexport function isSafari(view: Window): boolean {\n return /^(?:(?!chrome|android).)*safari/iu.test(view.navigator.userAgent);\n}\n\nexport function canScroll(\n target: HTMLElement,\n content: HTMLElement,\n direction: DrawerDirection,\n distance: number\n): boolean {\n const vertical = isVertical(direction);\n const forward = distance * directionSign(direction) < 0;\n\n for (\n let node: HTMLElement | null = target;\n node && content.contains(node);\n node = node.parentElement\n ) {\n const scrollSize = vertical ? node.scrollHeight : node.scrollWidth;\n const size = vertical ? node.clientHeight : node.clientWidth;\n\n if (scrollSize <= size) {\n continue;\n }\n\n const position = vertical ? node.scrollTop : node.scrollLeft;\n\n if (\n (forward && position < scrollSize - size) ||\n (!forward && position > 0)\n ) {\n return true;\n }\n }\n\n return false;\n}\n","/*\n * Derived from Vaul (https://github.com/emilkowalski/vaul): src/use-scale-background.ts and src/index.tsx.\n * Copyright (c) 2023 Emil Kowalski\n * Modified for Solid Aria: Solid 2 effects, document-local scaling, drag interpolation, and complete style cleanup.\n * MIT licensed. See LICENSE, VAUL-LICENSE, and NOTICE.txt in the package root.\n */\n\nimport { createEffect } from \"solid-js\";\n\nimport { BORDER_RADIUS, TRANSITIONS, WINDOW_TOP_OFFSET } from \"./constants\";\nimport type { DrawerContextValue } from \"./context\";\nimport { assignStyle, isVertical } from \"./helpers\";\n\nexport function createBackground(context: DrawerContextValue): void {\n let background: HTMLElement | null = null;\n let initialScale = 1;\n let vertical = true;\n createEffect(\n () => ({\n color:\n context.props.setBackgroundColorOnScale !== false &&\n context.props.noBodyStyles !== true,\n direction: context.direction,\n element: context.content,\n enabled: context.props.shouldScaleBackground === true,\n nested: context.props.nested === true,\n open: context.isOpen,\n }),\n ({\n element,\n open,\n enabled,\n color,\n direction,\n nested,\n }): undefined | (() => void) => {\n if (!element || !open || !enabled || nested) {\n return undefined;\n }\n\n const doc = element.ownerDocument;\n\n const wrapper = doc.querySelector<HTMLElement>(\n \"[data-vaul-drawer-wrapper], [vaul-drawer-wrapper]\"\n );\n\n const view = doc.defaultView;\n\n if (!wrapper || !view) {\n return undefined;\n }\n\n background = wrapper;\n initialScale = (view.innerWidth - WINDOW_TOP_OFFSET) / view.innerWidth;\n vertical = isVertical(direction);\n\n const restoreBody = color\n ? assignStyle(doc.body, { background: \"black\" })\n : undefined;\n\n const restoreWrapper = assignStyle(wrapper, {\n \"border-radius\": `${BORDER_RADIUS}px`,\n overflow: \"hidden\",\n transform: `scale(${initialScale}) ${vertical ? \"translate3d(0, 14px, 0)\" : \"translate3d(14px, 0, 0)\"}`,\n \"transform-origin\": vertical ? \"top\" : \"left\",\n \"transition-duration\": `${TRANSITIONS.DURATION}s`,\n \"transition-property\": \"transform, border-radius\",\n \"transition-timing-function\": `cubic-bezier(${TRANSITIONS.EASE.join(\",\")})`,\n });\n\n return () => {\n background = null;\n restoreWrapper();\n restoreBody?.();\n };\n },\n { ssrSource: \"client\" }\n );\n createEffect(\n () => ({\n dragging: context.isDragging,\n element: context.content,\n open: context.isOpen,\n progress: context.dragProgress,\n }),\n ({ progress, dragging, open }) => {\n if (!background || !open) {\n return;\n }\n\n const scale = initialScale + progress * (1 - initialScale);\n const displacement = 14 * (1 - progress);\n background.style.transitionDuration = dragging\n ? \"0s\"\n : `${TRANSITIONS.DURATION}s`;\n background.style.borderRadius = `${BORDER_RADIUS * (1 - progress)}px`;\n background.style.transform = `scale(${scale}) ${vertical ? `translate3d(0, ${displacement}px, 0)` : `translate3d(${displacement}px, 0, 0)`}`;\n },\n { ssrSource: \"client\" }\n );\n}\n","/*\n * Derived from Vaul (https://github.com/emilkowalski/vaul): src/use-snap-points.ts.\n * Copyright (c) 2023 Emil Kowalski\n * Modified for Solid Aria: pure snap geometry and selection, bounded sequential swipes, and container dimensions.\n * MIT licensed. See LICENSE, VAUL-LICENSE, and NOTICE.txt in the package root.\n */\n\nimport { VELOCITY_THRESHOLD } from \"./constants\";\nimport { clamp, directionSign } from \"./helpers\";\nimport type { DrawerDirection, SnapPoint } from \"./types\";\n\nexport function getSnapPointOffsets(\n points: readonly SnapPoint[],\n dimension: number,\n direction: DrawerDirection\n): number[] {\n return points.map((point) => {\n const visible =\n typeof point === \"number\"\n ? point * dimension\n : Number(point.replace(/px$/u, \"\"));\n\n return (dimension - visible) * directionSign(direction);\n });\n}\n\nexport function getOverlayOpacity(\n offsets: readonly number[],\n offset: number,\n fadeFromIndex: number,\n dimension: number\n): number {\n const faded = Math.abs(offsets[fadeFromIndex] ?? 0);\n\n const clear =\n fadeFromIndex === 0\n ? dimension\n : Math.abs(offsets[fadeFromIndex - 1] ?? faded);\n\n if (clear === faded) {\n return offset <= faded ? 1 : 0;\n }\n\n return clamp((clear - offset) / (clear - faded));\n}\n\nexport function selectSnapPoint(options: {\n offsets: readonly number[];\n activeIndex: number;\n /** Positive distance moves toward the closed edge. */\n distance: number;\n velocity: number;\n dimension: number;\n dismissible: boolean;\n sequential: boolean;\n}): number | \"close\" {\n const {\n offsets,\n activeIndex,\n distance,\n velocity,\n dimension,\n dismissible,\n sequential,\n } = options;\n\n const [first] = offsets;\n\n if (first === undefined) {\n return activeIndex;\n }\n\n const active = Math.abs(offsets[activeIndex] ?? first);\n const position = active + distance;\n\n if (!sequential && velocity > 2) {\n if (distance <= 0) {\n return offsets.length - 1;\n }\n\n return dismissible ? \"close\" : 0;\n }\n\n if (velocity > VELOCITY_THRESHOLD && Math.abs(distance) < dimension * 0.4) {\n if (distance > 0 && activeIndex === 0 && dismissible) {\n return \"close\";\n }\n\n return clamp(activeIndex + (distance > 0 ? -1 : 1), 0, offsets.length - 1);\n }\n\n const remaining = dimension - Math.abs(first);\n\n if (\n dismissible &&\n distance > 0 &&\n position > Math.abs(first) + remaining / 2\n ) {\n return \"close\";\n }\n\n let closest = 0;\n let difference = Infinity;\n\n for (const [index, offset] of offsets.entries()) {\n if (sequential && Math.abs(index - activeIndex) > 1) {\n continue;\n }\n\n const nextDifference = Math.abs(Math.abs(offset) - position);\n\n if (nextDifference < difference) {\n difference = nextDifference;\n closest = index;\n }\n }\n\n return closest;\n}\n","/*\n * Derived from Vaul (https://github.com/emilkowalski/vaul): src/index.tsx.\n * Copyright (c) 2023 Emil Kowalski\n * Modified for Solid Aria: native Solid 2 controlled state, presence, pointer gestures, measured snap-point entry, nested transforms, and lifecycle.\n * MIT licensed. See LICENSE, VAUL-LICENSE, and NOTICE.txt in the package root.\n */\n\nimport {\n createEffect,\n createMemo,\n createSignal,\n createUniqueId,\n onSettled,\n untrack,\n} from \"solid-js\";\n\nimport {\n CLOSE_THRESHOLD,\n DRAG_CLASS,\n NESTED_DISPLACEMENT,\n SCROLL_LOCK_TIMEOUT,\n TRANSITIONS,\n VELOCITY_THRESHOLD,\n} from \"./constants\";\nimport type { DrawerContextValue } from \"./context\";\nimport {\n getOverlayOpacity,\n getSnapPointOffsets,\n selectSnapPoint,\n} from \"./create-snap-points\";\nimport {\n canScroll,\n clamp,\n dampenValue,\n directionSign,\n isVertical,\n translate,\n} from \"./helpers\";\nimport type { DialogProps, SnapPoint } from \"./types\";\n\nconst transition = `${TRANSITIONS.DURATION}s cubic-bezier(${TRANSITIONS.EASE.join(\",\")})`;\n\ninterface Gesture {\n x: number;\n y: number;\n startedAt: number;\n dimension: number;\n startOffset: number;\n distance: number;\n allowed: boolean;\n fromHandle: boolean;\n pointerId: number;\n target: HTMLElement;\n}\n\nexport function createDrawer(\n props: DialogProps,\n parent?: DrawerContextValue\n): DrawerContextValue {\n const [internalOpen, setInternalOpen] = createSignal(\n untrack(() => props.defaultOpen ?? false)\n );\n\n const isOpen = createMemo(() => props.open ?? internalOpen());\n const [present, setPresent] = createSignal(untrack(isOpen));\n\n const [animate, setAnimate] = createSignal(\n untrack(() => props.defaultOpen !== true)\n );\n\n const [internalSnap, setInternalSnap] = createSignal<SnapPoint | null>(\n untrack(() => props.snapPoints?.[0] ?? null)\n );\n\n const activeSnap = createMemo(() =>\n props.activeSnapPoint === undefined ? internalSnap() : props.activeSnapPoint\n );\n\n const [content, setContent] = createSignal<HTMLDivElement | null>(null, {\n ownedWrite: true,\n });\n\n const [overlay, setOverlay] = createSignal<HTMLDivElement | null>(null, {\n ownedWrite: true,\n });\n\n const [trigger, setTrigger] = createSignal<HTMLButtonElement | null>(null, {\n ownedWrite: true,\n });\n\n const [dimension, setDimension] = createSignal(0);\n const [dragging, setDragging] = createSignal(false);\n const [dragProgress, setDragProgress] = createSignal(0);\n const [childOpen, setChildOpen] = createSignal(false);\n const [childProgress, setChildProgress] = createSignal(0);\n const direction = () => props.direction ?? \"bottom\";\n const points = () => props.snapPoints ?? [];\n\n const offsets = createMemo(() =>\n getSnapPointOffsets(points(), dimension(), direction())\n );\n\n const activeIndex = createMemo(() =>\n Math.max(0, points().indexOf(activeSnap() ?? points()[0] ?? 0))\n );\n\n const offset = () => offsets()[activeIndex()] ?? 0;\n\n const fadeFromIndex = () =>\n props.fadeFromIndex ?? Math.max(0, points().length - 1);\n\n const id = createUniqueId();\n let gesture: Gesture | null = null;\n let lastScrollTime = -Infinity;\n let openedAt = -Infinity;\n\n const onScroll = () => {\n lastScrollTime = Date.now();\n };\n\n function setOpen(open: boolean): void {\n if (open === isOpen()) {\n return;\n }\n\n if (props.open === undefined) {\n setInternalOpen(open);\n }\n\n props.onOpenChange?.(open);\n }\n\n function setActiveSnapPoint(point: SnapPoint | null): void {\n if (point === activeSnap()) {\n return;\n }\n\n if (props.activeSnapPoint === undefined) {\n setInternalSnap(point);\n }\n\n props.setActiveSnapPoint?.(point);\n }\n\n function resetPosition(): void {\n const element = content();\n\n if (!element) {\n return;\n }\n\n element.classList.remove(DRAG_CLASS);\n element.style.transition = `transform ${transition}`;\n element.style.transform = translate(offset(), direction());\n const backdrop = overlay();\n\n if (backdrop) {\n backdrop.style.transition = `opacity ${transition}`;\n backdrop.style.opacity = points().length\n ? `${getOverlayOpacity(offsets(), Math.abs(offset()), fadeFromIndex(), dimension())}`\n : \"1\";\n }\n }\n\n function cancelDrag(): void {\n if (!gesture) {\n return;\n }\n\n if (gesture.target.hasPointerCapture?.(gesture.pointerId)) {\n gesture.target.releasePointerCapture(gesture.pointerId);\n }\n\n gesture = null;\n setDragging(false);\n setDragProgress(0);\n untrack(resetPosition);\n parent?.setChildProgress(0);\n }\n\n function close(): void {\n cancelDrag();\n\n if (props.dismissible !== false) {\n setOpen(false);\n }\n }\n\n createEffect(\n isOpen,\n (open, previous): undefined | (() => void) => {\n if (open) {\n openedAt = Date.now();\n setPresent(true);\n } else {\n cancelDrag();\n\n if (previous === true) {\n props.onClose?.();\n }\n }\n\n parent?.setChildOpen(open);\n\n if (previous === undefined && !open) {\n return undefined;\n }\n\n const view = untrack(content)?.ownerDocument.defaultView;\n\n const duration =\n view?.matchMedia(\"(prefers-reduced-motion: reduce)\").matches === true\n ? 0\n : TRANSITIONS.DURATION * 1000;\n\n const timer = setTimeout(() => {\n if (!open) {\n setPresent(false);\n setActiveSnapPoint(points()[0] ?? null);\n }\n\n if (previous !== undefined) {\n props.onAnimationEnd?.(open);\n }\n }, duration);\n\n return () => {\n clearTimeout(timer);\n };\n },\n { ssrSource: \"client\" }\n );\n\n createEffect(\n () => ({\n container: props.container,\n direction: direction(),\n element: content(),\n }),\n ({\n element,\n container,\n direction: currentDirection,\n }): undefined | (() => void) => {\n if (!element) {\n return undefined;\n }\n\n const view = element.ownerDocument.defaultView;\n\n if (!view) {\n return undefined;\n }\n\n const measure = (): void => {\n const rect = container?.getBoundingClientRect();\n setDimension(\n isVertical(currentDirection)\n ? (rect?.height ?? view.innerHeight)\n : (rect?.width ?? view.innerWidth)\n );\n };\n\n measure();\n view.addEventListener(\"resize\", measure);\n\n const observer =\n typeof ResizeObserver === \"undefined\"\n ? undefined\n : new ResizeObserver(measure);\n\n if (container) {\n observer?.observe(container);\n }\n\n element.addEventListener(\"scroll\", onScroll, true);\n\n return () => {\n view.removeEventListener(\"resize\", measure);\n observer?.disconnect();\n element.removeEventListener(\"scroll\", onScroll, true);\n cancelDrag();\n };\n },\n { ssrSource: \"client\" }\n );\n\n createEffect(\n () => ({\n animate: animate(),\n backdrop: overlay(),\n child: childOpen(),\n dimension: dimension(),\n direction: direction(),\n element: content(),\n hasSnapPoints: points().length > 0,\n offset: offset(),\n opacity: points().length\n ? getOverlayOpacity(\n offsets(),\n Math.abs(offset()),\n fadeFromIndex(),\n dimension()\n )\n : 1,\n open: isOpen(),\n progress: childProgress(),\n }),\n ({\n animate: shouldAnimate,\n element,\n backdrop,\n dimension: currentDimension,\n hasSnapPoints,\n open,\n offset: currentOffset,\n child,\n progress,\n direction: currentDirection,\n opacity,\n }) => {\n if (!element || (hasSnapPoints && currentDimension === 0)) {\n return;\n }\n\n const sign = directionSign(currentDirection);\n const view = element.ownerDocument.defaultView;\n\n const size = isVertical(currentDirection)\n ? view?.innerHeight\n : view?.innerWidth;\n\n const scale = child\n ? 1 - (NESTED_DISPLACEMENT / Math.max(1, size ?? 1)) * (1 - progress)\n : 1;\n\n const displacement = child\n ? -NESTED_DISPLACEMENT * (1 - progress) * sign\n : 0;\n\n if (hasSnapPoints && shouldAnimate && element.style.transform === \"\") {\n // Commit the closed position before transitioning to the measured snap point.\n element.getBoundingClientRect();\n }\n\n element.style.transition = shouldAnimate\n ? `transform ${transition}`\n : \"none\";\n element.style.transform = `${translate(open ? currentOffset + displacement : sign * (size ?? currentDimension), currentDirection)} scale(${scale})`;\n\n if (backdrop) {\n backdrop.style.transition = shouldAnimate\n ? `opacity ${transition}`\n : \"none\";\n backdrop.style.opacity = open ? `${opacity}` : \"0\";\n }\n },\n { ssrSource: \"client\" }\n );\n\n onSettled(() => {\n const frame = requestAnimationFrame(() => {\n setAnimate(true);\n });\n\n return () => {\n cancelAnimationFrame(frame);\n parent?.setChildOpen(false);\n };\n });\n\n function press(event: PointerEvent, fromHandle = false): void {\n const element = content();\n const { target } = event;\n\n if (\n !element ||\n !isOpen() ||\n childOpen() ||\n event.defaultPrevented ||\n event.button > 0\n ) {\n return;\n }\n\n if (\n !(target instanceof HTMLElement) ||\n target.closest(\"[data-vaul-drawer]\") !== element\n ) {\n return;\n }\n\n if (\n target.closest(\"[data-vaul-no-drag],select,option\") ||\n (props.handleOnly === true && !fromHandle)\n ) {\n return;\n }\n\n if (props.dismissible === false && !points().length) {\n return;\n }\n\n const rect = element.getBoundingClientRect();\n gesture = {\n allowed: false,\n dimension: isVertical(direction()) ? rect.height : rect.width,\n distance: 0,\n fromHandle,\n pointerId: event.pointerId,\n startOffset: Math.abs(offset()),\n startedAt: Date.now(),\n target,\n x: event.clientX,\n y: event.clientY,\n };\n }\n\n function canDrag(target: HTMLElement, distance: number): boolean {\n if (!gesture || target.closest(\"[data-vaul-no-drag],select,option\")) {\n return false;\n }\n\n if (gesture.fromHandle) {\n return true;\n }\n\n if ((target.ownerDocument.getSelection()?.toString().length ?? 0) > 0) {\n return false;\n }\n\n if (Date.now() - openedAt < TRANSITIONS.DURATION * 1000) {\n return false;\n }\n\n if (\n Date.now() - lastScrollTime <\n (props.scrollLockTimeout ?? SCROLL_LOCK_TIMEOUT)\n ) {\n return false;\n }\n\n const lastOffset = Math.abs(offsets().at(-1) ?? 0);\n\n if (distance < 0 && gesture.startOffset > lastOffset) {\n return true;\n }\n\n const element = content();\n\n return (\n element !== null && !canScroll(target, element, direction(), distance)\n );\n }\n\n function claimGesture(\n event: PointerEvent,\n current: Gesture,\n axis: number,\n cross: number,\n distance: number\n ): boolean {\n if (current.allowed) {\n return true;\n }\n\n const threshold = event.pointerType === \"touch\" ? 10 : 2;\n\n if (Math.abs(axis) < threshold && Math.abs(cross) < threshold) {\n return false;\n }\n\n if (Math.abs(cross) > Math.abs(axis)) {\n gesture = null;\n\n return false;\n }\n\n if (!canDrag(current.target, distance)) {\n return false;\n }\n\n current.allowed = true;\n current.target.setPointerCapture?.(event.pointerId);\n setDragging(true);\n\n return true;\n }\n\n function drag(event: PointerEvent): void {\n const current = gesture;\n const element = content();\n\n if (!current || !element || current.pointerId !== event.pointerId) {\n return;\n }\n\n const dx = event.clientX - current.x;\n const dy = event.clientY - current.y;\n const vertical = isVertical(direction());\n const axis = vertical ? dy : dx;\n const cross = vertical ? dx : dy;\n const distance = axis * directionSign(direction());\n\n if (!claimGesture(event, current, axis, cross, distance)) {\n return;\n }\n\n event.preventDefault();\n const minimum = Math.abs(offsets().at(-1) ?? 0);\n let position = current.startOffset + distance;\n\n if (position < minimum) {\n position = minimum - dampenValue(minimum - position);\n }\n\n if (props.dismissible === false) {\n position = Math.min(position, Math.abs(offsets()[0] ?? 0));\n }\n\n current.distance = position - current.startOffset;\n element.classList.add(DRAG_CLASS);\n element.style.transition = \"none\";\n element.style.transform = translate(\n position * directionSign(direction()),\n direction()\n );\n\n const percentage = clamp(\n Math.max(0, distance) /\n Math.max(1, current.dimension - current.startOffset)\n );\n\n const backdrop = overlay();\n\n if (backdrop) {\n backdrop.style.transition = \"none\";\n backdrop.style.opacity = points().length\n ? `${getOverlayOpacity(offsets(), position, fadeFromIndex(), dimension())}`\n : `${1 - percentage}`;\n }\n\n setDragProgress(percentage);\n props.onDrag?.(event, percentage);\n parent?.setChildProgress(percentage);\n }\n\n function release(event: PointerEvent): void {\n const current = gesture;\n\n if (!current || event.pointerId !== current.pointerId) {\n return;\n }\n\n const velocity =\n Math.abs(current.distance) / Math.max(1, Date.now() - current.startedAt);\n\n let next: number | \"close\" = activeIndex();\n\n if (current.allowed && points().length) {\n next = selectSnapPoint({\n activeIndex: activeIndex(),\n dimension: dimension(),\n dismissible: props.dismissible !== false,\n distance: current.distance,\n offsets: offsets(),\n sequential: props.snapToSequentialPoint ?? false,\n velocity,\n });\n } else if (\n current.allowed &&\n current.distance > 0 &&\n props.dismissible !== false &&\n (velocity > VELOCITY_THRESHOLD ||\n current.distance >=\n current.dimension * (props.closeThreshold ?? CLOSE_THRESHOLD))\n ) {\n next = \"close\";\n }\n\n cancelDrag();\n\n if (!current.allowed) {\n return;\n }\n\n if (next === \"close\") {\n close();\n } else if (points().length) {\n setActiveSnapPoint(points()[next] ?? null);\n }\n\n props.onRelease?.(event, next !== \"close\");\n }\n\n return {\n get activeSnapPoint() {\n return activeSnap();\n },\n get activeSnapPointIndex() {\n return activeIndex();\n },\n cancelDrag,\n get childOpen() {\n return childOpen();\n },\n close,\n get content() {\n return content();\n },\n contentId: `vaul-${id}`,\n descriptionId: `vaul-${id}-description`,\n get direction() {\n return direction();\n },\n get dismissible() {\n return props.dismissible ?? true;\n },\n drag,\n get dragProgress() {\n return dragProgress();\n },\n get isDragging() {\n return dragging();\n },\n get isOpen() {\n return isOpen();\n },\n get modal() {\n return props.modal ?? true;\n },\n get overlay() {\n return overlay();\n },\n get present() {\n return present();\n },\n press,\n props,\n release,\n setActiveSnapPoint,\n setChildOpen(open) {\n setChildOpen(open);\n setChildProgress(0);\n },\n setChildProgress(progress) {\n setChildProgress(progress);\n },\n setContent(element) {\n setContent(element);\n },\n setOpen,\n setOverlay(element) {\n setOverlay(element);\n },\n setTrigger(element) {\n setTrigger(element);\n },\n get shouldAnimate() {\n return animate();\n },\n get shouldFade() {\n return !points().length || activeIndex() >= fadeFromIndex();\n },\n get snapPointsOffset() {\n return offsets();\n },\n titleId: `vaul-${id}-title`,\n get trigger() {\n return trigger();\n },\n };\n}\n","import { ariaHideOutside } from \"@solid2-aria/core/overlays/aria-hide-outside\";\nimport { createPreventScroll } from \"@solid2-aria/core/overlays/create-prevent-scroll\";\nimport { createEffect, untrack } from \"solid-js\";\n\nimport type { DrawerContextValue } from \"./context\";\nimport type {\n ContentProps,\n FocusOutsideEvent,\n PointerDownOutsideEvent,\n} from \"./types\";\n\nconst layers = new WeakMap<Document, HTMLDivElement[]>();\n\nexport function createLayer(\n context: DrawerContextValue,\n props: ContentProps\n): void {\n createPreventScroll({\n get isDisabled() {\n return (\n !context.isOpen ||\n !context.content ||\n !context.modal ||\n context.props.noBodyStyles === true ||\n (!context.overlay && context.props.disablePreventScroll !== true)\n );\n },\n });\n\n createEffect(\n () => ({\n element: context.content,\n modal: context.modal,\n open: context.isOpen,\n overlay: context.overlay,\n }),\n ({ element, overlay, open, modal }): undefined | (() => void) => {\n if (!element || !open || !modal) {\n return undefined;\n }\n\n return ariaHideOutside(overlay ? [element, overlay] : [element], {\n shouldUseInert: true,\n });\n },\n { ssrSource: \"client\" }\n );\n\n createEffect(\n () => ({ element: context.content, open: context.isOpen }),\n ({ element, open }): undefined | (() => void) => {\n if (!element || !open) {\n return undefined;\n }\n\n const doc = element.ownerDocument;\n const stack = layers.get(doc) ?? [];\n layers.set(doc, stack);\n stack.push(element);\n const previous = doc.activeElement;\n let interactedOutside = false;\n const autoFocus = new Event(\"openAutoFocus\", { cancelable: true });\n props.onOpenAutoFocus?.(autoFocus);\n\n if (!autoFocus.defaultPrevented && context.props.autoFocus === true) {\n const first = element.querySelector<HTMLElement>(\n \"[autofocus],button:not([disabled]),[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex='0']\"\n );\n\n (first ?? element).focus({ preventScroll: true });\n }\n\n const isTop = () => stack.at(-1) === element;\n\n const isOutside = (event: Event) =>\n !event.composedPath().includes(element);\n\n function pointerDown(event: PointerEvent): void {\n if (!isTop() || !isOutside(event)) {\n return;\n }\n\n const outside: PointerDownOutsideEvent = new CustomEvent(\n \"pointerDownOutside\",\n {\n cancelable: true,\n detail: { originalEvent: event },\n }\n );\n\n props.onPointerDownOutside?.(outside);\n props.onInteractOutside?.(outside);\n\n if (\n outside.defaultPrevented ||\n !context.modal ||\n event.button > 0 ||\n event.ctrlKey\n ) {\n return;\n }\n\n interactedOutside = !context.modal;\n context.close();\n }\n\n function focusIn(event: FocusEvent): void {\n if (!isTop() || !isOutside(event)) {\n return;\n }\n\n const outside: FocusOutsideEvent = new CustomEvent(\"focusOutside\", {\n cancelable: true,\n detail: { originalEvent: event },\n });\n\n props.onFocusOutside?.(outside);\n props.onInteractOutside?.(outside);\n\n if (!context.modal) {\n interactedOutside = true;\n }\n }\n\n function keyDown(event: KeyboardEvent): void {\n if (event.key !== \"Escape\" || !isTop() || event.defaultPrevented) {\n return;\n }\n\n props.onEscapeKeyDown?.(event);\n\n if (event.defaultPrevented) {\n return;\n }\n\n event.preventDefault();\n context.close();\n }\n\n doc.addEventListener(\"pointerdown\", pointerDown);\n doc.addEventListener(\"focusin\", focusIn);\n doc.addEventListener(\"keydown\", keyDown);\n\n const touchMove = (event: TouchEvent) => {\n if (element.classList.contains(\"vaul-dragging\") && event.cancelable) {\n event.preventDefault();\n }\n };\n\n element.addEventListener(\"touchmove\", touchMove, { passive: false });\n\n return () => {\n const index = stack.indexOf(element);\n const wasTop = isTop();\n\n if (index !== -1) {\n stack.splice(index, 1);\n }\n\n if (!stack.length) {\n layers.delete(doc);\n }\n\n doc.removeEventListener(\"pointerdown\", pointerDown);\n doc.removeEventListener(\"focusin\", focusIn);\n doc.removeEventListener(\"keydown\", keyDown);\n element.removeEventListener(\"touchmove\", touchMove);\n\n const closeAutoFocus = new Event(\"closeAutoFocus\", {\n cancelable: true,\n });\n\n props.onCloseAutoFocus?.(closeAutoFocus);\n\n if (closeAutoFocus.defaultPrevented || interactedOutside || !wasTop) {\n return;\n }\n\n const target = untrack(() => context.trigger) ?? previous;\n queueMicrotask(() => {\n if (target instanceof HTMLElement && target.isConnected) {\n target.focus({ preventScroll: true });\n }\n });\n };\n },\n { ssrSource: \"client\" }\n );\n}\n","/*\n * Derived from Vaul (https://github.com/emilkowalski/vaul): src/use-position-fixed.ts and src/index.tsx.\n * Copyright (c) 2023 Emil Kowalski\n * Modified for Solid Aria: Solid 2 lifecycle, per-drawer style ownership, viewport resizing, and route-aware restoration.\n * MIT licensed. See LICENSE, VAUL-LICENSE, and NOTICE.txt in the package root.\n */\n\nimport { createEffect } from \"solid-js\";\n\nimport { WINDOW_TOP_OFFSET } from \"./constants\";\nimport type { DrawerContextValue } from \"./context\";\nimport { assignStyle, isSafari } from \"./helpers\";\n\nexport function createPosition(context: DrawerContextValue): void {\n createEffect(\n () => ({\n element: context.content,\n modal: context.modal,\n nested: context.props.nested === true,\n noBodyStyles: context.props.noBodyStyles === true,\n open: context.isOpen,\n preventScrollRestoration: context.props.preventScrollRestoration === true,\n }),\n ({\n element,\n open,\n modal,\n noBodyStyles,\n nested,\n preventScrollRestoration,\n }): undefined | (() => void) => {\n if (!element || !open || !modal || noBodyStyles || nested) {\n return undefined;\n }\n\n const doc = element.ownerDocument;\n const view = doc.defaultView;\n\n if (\n !view ||\n !isSafari(view) ||\n view.matchMedia(\"(display-mode: standalone)\").matches\n ) {\n return undefined;\n }\n\n const { scrollX, scrollY } = view;\n const url = view.location.href;\n\n const restore = assignStyle(doc.body, {\n height: \"auto\",\n left: `${-scrollX}px`,\n position: \"fixed\",\n right: \"0\",\n top: `${-scrollY}px`,\n });\n\n return () => {\n restore();\n\n if (!preventScrollRestoration || url === view.location.href) {\n view.scrollTo(scrollX, scrollY);\n }\n };\n },\n { ssrSource: \"client\" }\n );\n\n createEffect(\n () => ({\n direction: context.direction,\n element: context.content,\n fixed: context.props.fixed === true,\n open: context.isOpen,\n reposition: context.props.repositionInputs !== false,\n }),\n ({\n element,\n open,\n reposition,\n fixed,\n direction,\n }): undefined | (() => void) => {\n if (!element || !open || !reposition || direction !== \"bottom\") {\n return undefined;\n }\n\n const doc = element.ownerDocument;\n const view = doc.defaultView;\n const viewport = view?.visualViewport;\n\n if (!view || !viewport) {\n return undefined;\n }\n\n const { height } = element.style;\n const { bottom } = element.style;\n let keyboardOpen = false;\n const initialHeight = element.getBoundingClientRect().height;\n\n const resize = (): void => {\n const focused = doc.activeElement;\n\n if (\n !keyboardOpen &&\n (!(focused instanceof HTMLElement) ||\n !element.contains(focused) ||\n !focused.matches(\"input,textarea,[contenteditable]\"))\n ) {\n return;\n }\n\n const diff = Math.max(\n 0,\n view.innerHeight - viewport.height - viewport.offsetTop\n );\n\n keyboardOpen = diff > 60;\n\n if (!keyboardOpen) {\n element.style.height = height;\n element.style.bottom = bottom;\n\n return;\n }\n\n const rect = element.getBoundingClientRect();\n\n const available = Math.max(\n 0,\n viewport.height - Math.max(WINDOW_TOP_OFFSET, rect.top)\n );\n\n element.style.height = `${fixed ? Math.max(0, initialHeight - diff) : available}px`;\n element.style.bottom = `${diff}px`;\n\n if (focused instanceof HTMLElement) {\n focused.scrollIntoView({ block: \"nearest\" });\n }\n };\n\n viewport.addEventListener(\"resize\", resize);\n viewport.addEventListener(\"scroll\", resize);\n\n return () => {\n viewport.removeEventListener(\"resize\", resize);\n viewport.removeEventListener(\"scroll\", resize);\n element.style.height = height;\n element.style.bottom = bottom;\n };\n },\n { ssrSource: \"client\" }\n );\n}\n","/*\n * Derived from Vaul (https://github.com/emilkowalski/vaul): src/index.tsx.\n * Copyright (c) 2023 Emil Kowalski\n * Modified for Solid Aria: Solid 2 components, contexts, callback refs, portals, presence, and native DOM event composition.\n * MIT licensed. See LICENSE, VAUL-LICENSE, and NOTICE.txt in the package root.\n */\n\nimport { FocusScope } from \"@solid2-aria/core/focus/focus-scope\";\nimport { Portal as SolidPortal } from \"@solidjs/web\";\nimport type { JSX } from \"@solidjs/web\";\nimport {\n createSignal,\n merge,\n omit,\n onSettled,\n Show,\n useContext,\n} from \"solid-js\";\n\nimport { DrawerContext, PortalContext } from \"./context\";\nimport { createBackground } from \"./create-background\";\nimport { createDrawer } from \"./create-drawer\";\nimport { createLayer } from \"./create-layer\";\nimport { createPosition } from \"./create-position\";\nimport type {\n CloseProps,\n ContentProps,\n DescriptionProps,\n DialogProps,\n HandleProps,\n OverlayProps,\n PortalProps,\n TitleProps,\n TriggerProps,\n} from \"./types\";\n\nexport function Root(props: DialogProps): JSX.Element {\n const context = createDrawer(props);\n createBackground(context);\n createPosition(context);\n\n return <DrawerContext value={context}>{props.children}</DrawerContext>;\n}\n\nexport function NestedRoot(props: DialogProps): JSX.Element {\n const parent = useContext(DrawerContext);\n const context = createDrawer(merge(props, { nested: true }), parent);\n createPosition(context);\n\n return <DrawerContext value={context}>{props.children}</DrawerContext>;\n}\n\nexport function Portal(props: PortalProps): JSX.Element {\n const context = useContext(DrawerContext);\n const [mounted, setMounted] = createSignal(false);\n onSettled(() => {\n setMounted(true);\n });\n\n return (\n <Show when={mounted() && (context.present || props.forceMount === true)}>\n <SolidPortal\n mount={props.container ?? context.props.container ?? document.body}\n >\n <PortalContext value={props.forceMount ?? false}>\n {props.children}\n </PortalContext>\n </SolidPortal>\n </Show>\n );\n}\n\nexport function Trigger(props: TriggerProps): JSX.Element {\n const context = useContext(DrawerContext);\n\n const attributes = merge(omit(props, \"render\", \"ref\", \"onClick\"), {\n \"aria-controls\": context.contentId,\n get \"aria-expanded\"(): \"true\" | \"false\" {\n return context.isOpen ? \"true\" : \"false\";\n },\n \"aria-haspopup\": \"dialog\" as const,\n get \"data-state\"() {\n return context.isOpen ? \"open\" : \"closed\";\n },\n onClick(\n event: Parameters<JSX.EventHandler<HTMLButtonElement, MouseEvent>>[0]\n ) {\n callHandler(props.onClick, event);\n\n if (!event.defaultPrevented) {\n context.setOpen(!context.isOpen);\n }\n },\n get ref() {\n return [\n props.ref,\n (element: HTMLButtonElement) => {\n context.setTrigger(element);\n },\n ];\n },\n get type() {\n return props.type ?? \"button\";\n },\n });\n\n return (\n <Show when={props.render} keyed fallback={<button {...attributes} />}>\n {(render) => render(attributes)}\n </Show>\n );\n}\n\nexport function Close(props: CloseProps): JSX.Element {\n const context = useContext(DrawerContext);\n\n const attributes = merge(omit(props, \"render\", \"onClick\"), {\n onClick(\n event: Parameters<JSX.EventHandler<HTMLButtonElement, MouseEvent>>[0]\n ) {\n callHandler(props.onClick, event);\n\n if (!event.defaultPrevented) {\n context.close();\n }\n },\n get type() {\n return props.type ?? \"button\";\n },\n });\n\n return (\n <Show when={props.render} keyed fallback={<button {...attributes} />}>\n {(render) => render(attributes)}\n </Show>\n );\n}\n\nexport function Overlay(props: OverlayProps): JSX.Element {\n const context = useContext(DrawerContext);\n const forceMount = useContext(PortalContext);\n\n return (\n <Show\n when={\n context.modal &&\n (context.present || props.forceMount === true || forceMount)\n }\n >\n <OverlayElement {...props} />\n </Show>\n );\n}\n\nfunction OverlayElement(props: OverlayProps): JSX.Element {\n const context = useContext(DrawerContext);\n const rest = omit(props, \"forceMount\", \"ref\");\n onSettled(() => () => {\n context.setOverlay(null);\n });\n\n return (\n <div\n {...rest}\n ref={[\n props.ref,\n (element) => {\n context.setOverlay(element);\n },\n ]}\n data-vaul-overlay=\"\"\n data-state={context.isOpen ? \"open\" : \"closed\"}\n data-vaul-snap-points={\n (context.props.snapPoints?.length ?? 0) > 0 ? \"true\" : \"false\"\n }\n data-vaul-snap-points-overlay={context.shouldFade ? \"true\" : \"false\"}\n data-vaul-animate={context.shouldAnimate ? \"true\" : \"false\"}\n />\n );\n}\n\nexport function Content(props: ContentProps): JSX.Element {\n const context = useContext(DrawerContext);\n const forceMount = useContext(PortalContext);\n\n return (\n <Show when={context.present || props.forceMount === true || forceMount}>\n <ContentElement {...props} />\n </Show>\n );\n}\n\nfunction ContentElement(props: ContentProps): JSX.Element {\n const context = useContext(DrawerContext);\n\n const rest = omit(\n props,\n \"forceMount\",\n \"ref\",\n \"onOpenAutoFocus\",\n \"onCloseAutoFocus\",\n \"onEscapeKeyDown\",\n \"onPointerDownOutside\",\n \"onFocusOutside\",\n \"onInteractOutside\",\n \"onPointerDown\",\n \"onPointerMove\",\n \"onPointerUp\",\n \"onPointerCancel\",\n \"onLostPointerCapture\"\n );\n\n createLayer(context, props);\n onSettled(() => () => {\n context.setContent(null);\n });\n\n return (\n <FocusScope contain={context.isOpen && context.modal && !context.childOpen}>\n <div\n id={context.contentId}\n role=\"dialog\"\n aria-modal={context.modal ? \"true\" : undefined}\n aria-labelledby={context.titleId}\n aria-describedby={context.descriptionId}\n tabindex={-1}\n {...rest}\n ref={[\n props.ref,\n (element) => {\n context.setContent(element);\n },\n ]}\n data-state={context.isOpen ? \"open\" : \"closed\"}\n data-vaul-drawer=\"\"\n data-vaul-drawer-direction={context.direction}\n data-vaul-custom-container={context.props.container ? \"true\" : \"false\"}\n data-vaul-snap-points={\n (context.props.snapPoints?.length ?? 0) > 0 ? \"true\" : \"false\"\n }\n data-vaul-delayed-snap-points={\n context.snapPointsOffset.length > 0 ? \"true\" : \"false\"\n }\n data-vaul-handle-only={\n context.props.handleOnly === true ? \"true\" : \"false\"\n }\n data-vaul-animate={context.shouldAnimate ? \"true\" : \"false\"}\n onPointerDown={(event) => {\n callHandler(props.onPointerDown, event);\n context.press(event);\n }}\n onPointerMove={(event) => {\n callHandler(props.onPointerMove, event);\n\n if (!event.defaultPrevented) {\n context.drag(event);\n }\n }}\n onPointerUp={(event) => {\n callHandler(props.onPointerUp, event);\n context.release(event);\n }}\n onPointerCancel={(event) => {\n callHandler(props.onPointerCancel, event);\n context.cancelDrag();\n }}\n onLostPointerCapture={(event) => {\n callHandler(props.onLostPointerCapture, event);\n context.cancelDrag();\n }}\n />\n </FocusScope>\n );\n}\n\nexport function Title(props: TitleProps): JSX.Element {\n const context = useContext(DrawerContext);\n\n return <h2 id={context.titleId} {...props} />;\n}\n\nexport function Description(props: DescriptionProps): JSX.Element {\n const context = useContext(DrawerContext);\n\n return <p id={context.descriptionId} {...props} />;\n}\n\nexport function Handle(props: HandleProps): JSX.Element {\n const context = useContext(DrawerContext);\n\n const rest = omit(\n props,\n \"preventCycle\",\n \"children\",\n \"onClick\",\n \"onPointerDown\",\n \"onPointerMove\",\n \"onPointerCancel\"\n );\n\n let pressTime = 0;\n let pressPosition = { x: 0, y: 0 };\n let moved = false;\n let lastClick = -Infinity;\n\n function cycle(): void {\n if (\n props.preventCycle === true ||\n moved ||\n Date.now() - pressTime > 250 ||\n Date.now() - lastClick < 120\n ) {\n return;\n }\n\n lastClick = Date.now();\n const points = context.props.snapPoints;\n\n if (!points || points.length === 0) {\n context.close();\n\n return;\n }\n\n const next = points[context.activeSnapPointIndex + 1];\n\n if (next !== undefined) {\n context.setActiveSnapPoint(next);\n } else if (context.dismissible) {\n context.close();\n } else {\n context.setActiveSnapPoint(points[0] ?? null);\n }\n }\n\n return (\n <div\n {...rest}\n data-vaul-handle=\"\"\n aria-hidden=\"true\"\n data-vaul-drawer-visible={context.isOpen ? \"true\" : \"false\"}\n onClick={(event) => {\n callHandler(props.onClick, event);\n\n if (!event.defaultPrevented) {\n cycle();\n }\n }}\n onPointerDown={(event) => {\n callHandler(props.onPointerDown, event);\n\n if (event.defaultPrevented) {\n return;\n }\n\n pressTime = Date.now();\n pressPosition = { x: event.clientX, y: event.clientY };\n moved = false;\n context.press(event, true);\n event.stopPropagation();\n }}\n onPointerMove={(event) => {\n callHandler(props.onPointerMove, event);\n\n if (\n Math.abs(event.clientX - pressPosition.x) > 2 ||\n Math.abs(event.clientY - pressPosition.y) > 2\n ) {\n moved = true;\n }\n }}\n onPointerCancel={(event) => {\n callHandler(props.onPointerCancel, event);\n moved = true;\n context.cancelDrag();\n }}\n >\n <span data-vaul-handle-hitarea=\"\" aria-hidden=\"true\">\n {props.children}\n </span>\n </div>\n );\n}\n\nfunction callHandler<T, E extends Event>(\n handler: JSX.EventHandlerUnion<T, E> | undefined,\n event: Parameters<JSX.EventHandler<T, E>>[0]\n): void {\n if (typeof handler === \"function\") {\n handler(event);\n } else if (handler) {\n handler[0](handler[1], event);\n }\n}\n","import {\n Close,\n Content,\n Description,\n Handle,\n NestedRoot,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n} from \"./drawer\";\n\nexport {\n Close,\n Content,\n Description,\n Handle,\n NestedRoot,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n} from \"./drawer\";\n\nexport type {\n CloseProps,\n ContentProps,\n DescriptionProps,\n DialogProps,\n DrawerDirection,\n DrawerProps,\n FocusOutsideEvent,\n HandleProps,\n InteractOutsideEvent,\n OverlayProps,\n PointerDownOutsideEvent,\n PortalProps,\n SnapPoint,\n TitleProps,\n TriggerProps,\n WithFadeFromProps,\n WithoutFadeFromProps,\n} from \"./types\";\n\nexport const Drawer = {\n Close,\n Content,\n Description,\n Handle,\n NestedRoot,\n Overlay,\n Portal,\n Root,\n Title,\n Trigger,\n};\n"],"mappings":";;;;;;;;;;;;AA8CA,MAAa,gBAAgB,cAAkC;AAC/D,MAAa,gBAAgB,cAAc,KAAK;;ACxChD,MAAa,cAAc;CACzB,UAAU;CACV,MAAM;EAAC;EAAM;EAAM;EAAG;CAAC;AACzB;AAcA,MAAa,aAAa;;ACf1B,SAAgB,WAAW,WAAqC;CAC9D,OAAO,cAAc,SAAS,cAAc;AAC9C;AAEA,SAAgB,cAAc,WAAoC;CAChE,OAAO,cAAc,YAAY,cAAc,UAAU,IAAI;AAC/D;AAEA,SAAgB,UACd,UACA,WACQ;CACR,OAAO,WAAW,SAAS,IACvB,kBAAkB,SAAS,UAC3B,eAAe,SAAS;AAC9B;AAEA,SAAgB,YAAY,OAAuB;CACjD,OAAO,KAAK,IAAI,GAAG,KAAK,KAAK,IAAI,QAAQ,CAAC,IAAI,EAAE;AAClD;AAEA,SAAgB,MAAM,OAAe,MAAM,GAAG,MAAM,GAAW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ACF;CAqCA,OACEC,WAAAA,OACM,YADN;EAyCE,OAAA,MACEC,YAAAA;GAACC,OAAAA,OAAAA,MAAM,QAAO;EAAC,CAAA,GADjBC,IAAAA,QACEF,GACI;CACH,GA5CL,MAAA,aAAA,2CAIEG,oBAAAA,4BAA0B,QAAQ,SAAS,SAAS,OAAO,CAwCxD;AAET;AAEA,SAAS,YACP,SACA,OACM;CACN,IAAI,OAAO,YAAY,YACrB,QAAQ,KAAK;MACR,IAAI,SACT,QAAQ,EAAE,CAAC,QAAQ,IAAI,KAAK;AAEhC;;AC3VA,MAAa,SAAS;CACpB;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF"}
|
package/dist/style.css
ADDED
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Derived from Vaul (https://github.com/emilkowalski/vaul): src/style.css.
|
|
3
|
+
* Copyright (c) 2023 Emil Kowalski
|
|
4
|
+
* Modified for Solid Aria: directional entrance animations and Solid-controlled exit and snap transitions; fixed handle selector, scrolling, exit interaction, and reduced motion.
|
|
5
|
+
* MIT licensed. See LICENSE, VAUL-LICENSE, and NOTICE.txt in the package root.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
[data-vaul-drawer] {
|
|
9
|
+
touch-action: auto;
|
|
10
|
+
will-change: transform;
|
|
11
|
+
transition: transform 0.5s cubic-bezier(0.32, 0.72, 0, 1);
|
|
12
|
+
animation-duration: 0.5s;
|
|
13
|
+
animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
[data-vaul-drawer][data-vaul-snap-points="false"][data-vaul-drawer-direction="bottom"][data-state="open"] {
|
|
17
|
+
animation-name: slideFromBottom;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
[data-vaul-drawer][data-vaul-snap-points="false"][data-vaul-drawer-direction="top"][data-state="open"] {
|
|
21
|
+
animation-name: slideFromTop;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[data-vaul-drawer][data-vaul-snap-points="false"][data-vaul-drawer-direction="left"][data-state="open"] {
|
|
25
|
+
animation-name: slideFromLeft;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
[data-vaul-drawer][data-vaul-snap-points="false"][data-vaul-drawer-direction="right"][data-state="open"] {
|
|
29
|
+
animation-name: slideFromRight;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
[data-vaul-drawer][data-vaul-snap-points="true"][data-vaul-drawer-direction="bottom"] {
|
|
33
|
+
transform: translate3d(0, var(--initial-transform, 100%), 0);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
[data-vaul-drawer][data-vaul-snap-points="true"][data-vaul-drawer-direction="top"] {
|
|
37
|
+
transform: translate3d(0, calc(var(--initial-transform, 100%) * -1), 0);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
[data-vaul-drawer][data-vaul-snap-points="true"][data-vaul-drawer-direction="left"] {
|
|
41
|
+
transform: translate3d(calc(var(--initial-transform, 100%) * -1), 0, 0);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
[data-vaul-drawer][data-vaul-snap-points="true"][data-vaul-drawer-direction="right"] {
|
|
45
|
+
transform: translate3d(var(--initial-transform, 100%), 0, 0);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
[data-vaul-overlay][data-vaul-snap-points="false"] {
|
|
49
|
+
animation-duration: 0.5s;
|
|
50
|
+
animation-timing-function: cubic-bezier(0.32, 0.72, 0, 1);
|
|
51
|
+
}
|
|
52
|
+
[data-vaul-overlay][data-vaul-snap-points="false"][data-state="open"] {
|
|
53
|
+
animation-name: fadeIn;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
[data-vaul-animate="false"] {
|
|
57
|
+
animation: none !important;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
[data-vaul-overlay][data-vaul-snap-points="true"] {
|
|
61
|
+
opacity: 0;
|
|
62
|
+
transition: opacity 0.5s cubic-bezier(0.32, 0.72, 0, 1);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
[data-vaul-drawer]:not([data-vaul-custom-container="true"])::after {
|
|
66
|
+
content: "";
|
|
67
|
+
position: absolute;
|
|
68
|
+
background: inherit;
|
|
69
|
+
background-color: inherit;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
[data-vaul-drawer][data-vaul-drawer-direction="top"]::after {
|
|
73
|
+
top: initial;
|
|
74
|
+
bottom: 100%;
|
|
75
|
+
left: 0;
|
|
76
|
+
right: 0;
|
|
77
|
+
height: 200%;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
[data-vaul-drawer][data-vaul-drawer-direction="bottom"]::after {
|
|
81
|
+
top: 100%;
|
|
82
|
+
bottom: initial;
|
|
83
|
+
left: 0;
|
|
84
|
+
right: 0;
|
|
85
|
+
height: 200%;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[data-vaul-drawer][data-vaul-drawer-direction="left"]::after {
|
|
89
|
+
left: initial;
|
|
90
|
+
right: 100%;
|
|
91
|
+
top: 0;
|
|
92
|
+
bottom: 0;
|
|
93
|
+
width: 200%;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
[data-vaul-drawer][data-vaul-drawer-direction="right"]::after {
|
|
97
|
+
left: 100%;
|
|
98
|
+
right: initial;
|
|
99
|
+
top: 0;
|
|
100
|
+
bottom: 0;
|
|
101
|
+
width: 200%;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
[data-vaul-overlay][data-vaul-snap-points="true"]:not(
|
|
105
|
+
[data-vaul-snap-points-overlay="true"]
|
|
106
|
+
):not([data-state="closed"]) {
|
|
107
|
+
opacity: 0;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
[data-vaul-handle] {
|
|
111
|
+
display: block;
|
|
112
|
+
position: relative;
|
|
113
|
+
opacity: 0.7;
|
|
114
|
+
background: #e2e2e4;
|
|
115
|
+
margin-left: auto;
|
|
116
|
+
margin-right: auto;
|
|
117
|
+
height: 5px;
|
|
118
|
+
width: 32px;
|
|
119
|
+
border-radius: 1rem;
|
|
120
|
+
touch-action: none;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
[data-vaul-handle]:hover,
|
|
124
|
+
[data-vaul-handle]:active {
|
|
125
|
+
opacity: 1;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
[data-vaul-handle-hitarea] {
|
|
129
|
+
position: absolute;
|
|
130
|
+
left: 50%;
|
|
131
|
+
top: 50%;
|
|
132
|
+
transform: translate(-50%, -50%);
|
|
133
|
+
width: max(100%, 2.75rem); /* 44px */
|
|
134
|
+
height: max(100%, 2.75rem); /* 44px */
|
|
135
|
+
touch-action: inherit;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
@media (hover: hover) and (pointer: fine) {
|
|
139
|
+
[data-vaul-drawer] {
|
|
140
|
+
user-select: none;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
@media (pointer: fine) {
|
|
145
|
+
[data-vaul-handle-hitarea] {
|
|
146
|
+
width: 100%;
|
|
147
|
+
height: 100%;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
@keyframes fadeIn {
|
|
152
|
+
from {
|
|
153
|
+
opacity: 0;
|
|
154
|
+
}
|
|
155
|
+
to {
|
|
156
|
+
opacity: 1;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
@keyframes slideFromBottom {
|
|
161
|
+
from {
|
|
162
|
+
transform: translate3d(0, var(--initial-transform, 100%), 0);
|
|
163
|
+
}
|
|
164
|
+
to {
|
|
165
|
+
transform: translate3d(0, 0, 0);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
@keyframes slideFromTop {
|
|
170
|
+
from {
|
|
171
|
+
transform: translate3d(0, calc(var(--initial-transform, 100%) * -1), 0);
|
|
172
|
+
}
|
|
173
|
+
to {
|
|
174
|
+
transform: translate3d(0, 0, 0);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
@keyframes slideFromLeft {
|
|
179
|
+
from {
|
|
180
|
+
transform: translate3d(calc(var(--initial-transform, 100%) * -1), 0, 0);
|
|
181
|
+
}
|
|
182
|
+
to {
|
|
183
|
+
transform: translate3d(0, 0, 0);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
@keyframes slideFromRight {
|
|
188
|
+
from {
|
|
189
|
+
transform: translate3d(var(--initial-transform, 100%), 0, 0);
|
|
190
|
+
}
|
|
191
|
+
to {
|
|
192
|
+
transform: translate3d(0, 0, 0);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* Preserve native scrolling until a gesture is claimed by the drawer. */
|
|
197
|
+
[data-vaul-drawer-direction="left"],
|
|
198
|
+
[data-vaul-drawer-direction="right"] {
|
|
199
|
+
touch-action: auto;
|
|
200
|
+
}
|
|
201
|
+
[data-vaul-drawer][data-vaul-handle-only="true"] {
|
|
202
|
+
touch-action: auto;
|
|
203
|
+
}
|
|
204
|
+
[data-vaul-drawer][data-state="closed"] {
|
|
205
|
+
pointer-events: none;
|
|
206
|
+
}
|
|
207
|
+
[data-vaul-overlay][data-state="closed"] {
|
|
208
|
+
pointer-events: none;
|
|
209
|
+
}
|
|
210
|
+
@media (prefers-reduced-motion: reduce) {
|
|
211
|
+
[data-vaul-drawer],
|
|
212
|
+
[data-vaul-overlay] {
|
|
213
|
+
animation-duration: 0.01ms !important;
|
|
214
|
+
transition-duration: 0.01ms !important;
|
|
215
|
+
}
|
|
216
|
+
}
|
package/docs/api.md
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# API reference
|
|
2
|
+
|
|
3
|
+
`@solid2-aria/vaul` exports the `Drawer` namespace and each component as a named export: `Root`, `NestedRoot`, `Trigger`, `Portal`, `Overlay`, `Content`, `Handle`, `Close`, `Title`, and `Description`.
|
|
4
|
+
|
|
5
|
+
The stylesheet is available at `@solid2-aria/vaul/style.css` and `@solid2-aria/vaul/styles.css`. It is imported explicitly by the consumer. Browser and server exports are selected through the package's `browser` and default export conditions.
|
|
6
|
+
|
|
7
|
+
## Root and NestedRoot
|
|
8
|
+
|
|
9
|
+
`DrawerProps` and `DialogProps` describe the same props. `NestedRoot` requires a parent root and updates the parent drawer's scale during nested opening and dragging.
|
|
10
|
+
|
|
11
|
+
| Prop | Default | Behavior |
|
|
12
|
+
| --- | --- | --- |
|
|
13
|
+
| `open` | Uncontrolled | Controlled open state. |
|
|
14
|
+
| `defaultOpen` | `false` | Initial uncontrolled state. Skips the initial entry animation. |
|
|
15
|
+
| `onOpenChange` | None | Receives a requested open state. Controlled state waits for the parent to update `open`. |
|
|
16
|
+
| `onClose` | None | Runs when the drawer's actual state changes from open to closed. |
|
|
17
|
+
| `onAnimationEnd` | None | Receives the committed state after the 500 ms transition. Interrupted transitions cancel the prior callback. Reduced motion uses zero delay. |
|
|
18
|
+
| `direction` | `"bottom"` | `"top"`, `"bottom"`, `"left"`, or `"right"`. |
|
|
19
|
+
| `dismissible` | `true` | Allows Escape, outside interaction, the close component, and dragging to dismiss. Controlled `open` can close a non-dismissible drawer. |
|
|
20
|
+
| `modal` | `true` | Contains focus, hides outside content from assistive technology, and renders the overlay. With `false`, outside interaction leaves the drawer open. |
|
|
21
|
+
| `autoFocus` | `false` | Focuses the first available control on opening. |
|
|
22
|
+
| `handleOnly` | `false` | Restricts dragging to `Handle`. |
|
|
23
|
+
| `closeThreshold` | `0.25` | Fraction of the drawer dimension that a slow drag must cross to dismiss. Fast gestures also use velocity. |
|
|
24
|
+
| `scrollLockTimeout` | `100` | Milliseconds after content scrolling during which dragging is blocked. |
|
|
25
|
+
| `snapPoints` | None | Visible viewport fractions or pixel strings, ordered smallest first. A custom root container supplies the viewport dimension. |
|
|
26
|
+
| `activeSnapPoint` | First point | Controlled active snap point. |
|
|
27
|
+
| `setActiveSnapPoint` | None | Receives a requested active point, including a reset after exit. |
|
|
28
|
+
| `fadeFromIndex` | Last point | Overlay becomes fully opaque at this point and fades between it and the previous point. Requires `snapPoints`. |
|
|
29
|
+
| `snapToSequentialPoint` | `false` | Limits each gesture to adjacent points, including fast swipes. |
|
|
30
|
+
| `shouldScaleBackground` | `false` | Scales the element marked `data-vaul-drawer-wrapper`. |
|
|
31
|
+
| `setBackgroundColorOnScale` | `true` | Sets the body background to black while scaling. |
|
|
32
|
+
| `noBodyStyles` | `false` | Skips body styling and document scroll locking. Focus management remains active. |
|
|
33
|
+
| `disablePreventScroll` | `false` | Enables additional scroll locking when no overlay is mounted. An open modal overlay normally enables scroll locking. |
|
|
34
|
+
| `repositionInputs` | `true` | Resizes bottom drawers when the visual viewport reports an obscuring software keyboard. |
|
|
35
|
+
| `fixed` | `false` | Reduces drawer height rather than expanding it to the available keyboard viewport. |
|
|
36
|
+
| `preventScrollRestoration` | `false` | Skips Safari scroll restoration if the URL changed while open. |
|
|
37
|
+
| `container` | Document viewport | Container for portal mounting and snap geometry. Container resizing recalculates offsets. |
|
|
38
|
+
| `onDrag` | None | Receives the native pointer event and the dragged fraction. |
|
|
39
|
+
| `onRelease` | None | Receives the native pointer event and whether the gesture requests an open drawer. |
|
|
40
|
+
|
|
41
|
+
The underlying scroll and focus behavior comes from `@solid2-aria/core`. Mobile Safari positioning and visual-viewport adaptations are included. Real-device keyboard behavior depends on browser viewport reporting.
|
|
42
|
+
|
|
43
|
+
## Trigger and Close
|
|
44
|
+
|
|
45
|
+
These components render native buttons and accept Solid button attributes. `render` accepts the reactive button props and returns custom JSX. React `asChild` is replaced by this callback. A click handler can prevent the default drawer action.
|
|
46
|
+
|
|
47
|
+
The trigger exposes `aria-haspopup`, `aria-expanded`, `aria-controls`, and `data-state`. Buttons default to `type="button"`.
|
|
48
|
+
|
|
49
|
+
## Portal, Overlay, and Content
|
|
50
|
+
|
|
51
|
+
`Portal` accepts `container`, `forceMount`, and `children`. Its container overrides the root's portal container. Changing only the portal container does not change root snap geometry. Portals render after client settlement and are absent from server HTML.
|
|
52
|
+
|
|
53
|
+
`Overlay` and `Content` accept native Solid div attributes and `forceMount`. `Portal.forceMount` also keeps its overlay and content mounted while closed. Closed content has no active modal effects. Normal closing retains content for the exit transition.
|
|
54
|
+
|
|
55
|
+
`Content` renders `role="dialog"` with the IDs generated for `Title` and `Description`. It accepts these cancellable events:
|
|
56
|
+
|
|
57
|
+
| Event | Value |
|
|
58
|
+
| ---------------------- | ----------------------------------------------- |
|
|
59
|
+
| `onOpenAutoFocus` | Cancelable native `Event`. |
|
|
60
|
+
| `onCloseAutoFocus` | Cancelable native `Event`. |
|
|
61
|
+
| `onEscapeKeyDown` | Native `KeyboardEvent`. |
|
|
62
|
+
| `onPointerDownOutside` | `CustomEvent<{ originalEvent: PointerEvent }>`. |
|
|
63
|
+
| `onFocusOutside` | `CustomEvent<{ originalEvent: FocusEvent }>`. |
|
|
64
|
+
| `onInteractOutside` | Either outside event. |
|
|
65
|
+
|
|
66
|
+
`Content` forwards `aria-label`, `aria-labelledby`, and `aria-describedby`, so callers can supply their own labels or omit a description with `aria-describedby={undefined}`. `Title` renders an `h2`; `Description` renders a paragraph.
|
|
67
|
+
|
|
68
|
+
Vaul-compatible attributes include `data-state`, `data-vaul-drawer`, `data-vaul-overlay`, `data-vaul-drawer-direction`, `data-vaul-snap-points`, `data-vaul-snap-points-overlay`, `data-vaul-custom-container`, `data-vaul-delayed-snap-points`, and `data-vaul-animate`. String-valued states use `"true"` and `"false"`.
|
|
69
|
+
|
|
70
|
+
## Handle
|
|
71
|
+
|
|
72
|
+
`Handle` accepts native div attributes and `preventCycle`. Tapping advances to the next snap point and dismisses from the last point if allowed. Without snap points, tapping dismisses. Long presses and drag gestures do not cycle points. `preventCycle` disables tap cycling while retaining dragging.
|
|
73
|
+
|
|
74
|
+
The handle is hidden from assistive technology. `Close` supplies the keyboard-accessible close control. Its inner span expands the pointer target to at least 44 pixels.
|
|
75
|
+
|
|
76
|
+
`data-vaul-no-drag` on an element or its ancestor excludes that content from gesture initiation. Scrollable content keeps native scrolling until the drawer claims a drag.
|
package/package.json
CHANGED
|
@@ -1,6 +1,77 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@solid2-aria/vaul",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "Unstyled, draggable drawers for Solid 2, based on Vaul",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"solid",
|
|
8
|
+
"solid2-aria",
|
|
9
|
+
"solidjs",
|
|
10
|
+
"vaul"
|
|
11
|
+
],
|
|
12
|
+
"license": "MIT",
|
|
13
|
+
"author": {
|
|
14
|
+
"name": "pekochan069",
|
|
15
|
+
"email": "pekochan069@gmail.com",
|
|
16
|
+
"url": "https://github.com/pekochan069/solid2-aria.git"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "https://github.com/pekochan069/solid2-aria.git",
|
|
21
|
+
"directory": "packages/solid2-vaul"
|
|
22
|
+
},
|
|
23
|
+
"files": [
|
|
24
|
+
"dist",
|
|
25
|
+
"docs",
|
|
26
|
+
"LICENSE",
|
|
27
|
+
"VAUL-LICENSE",
|
|
28
|
+
"NOTICE.txt",
|
|
29
|
+
"README.md"
|
|
30
|
+
],
|
|
31
|
+
"type": "module",
|
|
32
|
+
"sideEffects": [
|
|
33
|
+
"**/*.css"
|
|
34
|
+
],
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/browser/index.d.ts",
|
|
38
|
+
"browser": "./dist/browser/index.js",
|
|
39
|
+
"default": "./dist/server/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./style.css": "./dist/style.css",
|
|
42
|
+
"./styles.css": "./dist/style.css",
|
|
43
|
+
"./package.json": "./package.json"
|
|
44
|
+
},
|
|
45
|
+
"publishConfig": {
|
|
46
|
+
"access": "public"
|
|
47
|
+
},
|
|
48
|
+
"scripts": {
|
|
49
|
+
"build": "tsdown",
|
|
50
|
+
"dev": "tsdown --watch",
|
|
51
|
+
"prepack": "bun run build",
|
|
52
|
+
"check-types": "tsrs --noEmit",
|
|
53
|
+
"test": "bun test --conditions=browser --conditions=development --preload ./tests/setup.ts",
|
|
54
|
+
"check": "ultracite check",
|
|
55
|
+
"fix": "ultracite fix",
|
|
56
|
+
"check-build": "bun scripts/check-build.ts",
|
|
57
|
+
"check-browser": "bun scripts/check-browser.ts"
|
|
58
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@solid2-aria/core": "^0.0.1"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@playwright/test": "^1.64.1",
|
|
64
|
+
"@solidjs/compiler": "^2.0.0-rc.17",
|
|
65
|
+
"@solidjs/web": "^2.0.0-rc.17",
|
|
66
|
+
"@types/bun": "^1.4.4",
|
|
67
|
+
"happy-dom": "^21.0.4",
|
|
68
|
+
"solid-js": "^2.0.0-rc.17",
|
|
69
|
+
"tsdown": "^0.23.2",
|
|
70
|
+
"tsrs": "^0.20.0-ts7.1.0-beta",
|
|
71
|
+
"typescript": "^7.1.0-beta"
|
|
72
|
+
},
|
|
73
|
+
"peerDependencies": {
|
|
74
|
+
"@solidjs/web": "^2.0.0-rc.17",
|
|
75
|
+
"solid-js": "^2.0.0-rc.17"
|
|
76
|
+
}
|
|
77
|
+
}
|