@plexui/vue 0.1.12 → 0.3.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.
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sortable.js","sourceRoot":"","sources":["../../../src/lib/sortable.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,wDAAwD,CAAA;AAsDtE,MAAM,cAAc,GAAG,CAAC,CAAA;AACxB,MAAM,UAAU,GAAG,GAAG,CAAA;AACtB,0DAA0D;AAC1D,MAAM,WAAW,GAAG,GAAG,CAAA;AACvB,MAAM,WAAW,GAAG,EAAE,CAAA;AACtB,MAAM,WAAW,GAAG,CAAC,CAAA;AACrB,MAAM,WAAW,GAAG,EAAE,CAAA;AACtB,MAAM,SAAS,GAAG,EAAE,CAAA;AACpB,MAAM,UAAU,GAAG,EAAE,CAAA;AACrB,MAAM,IAAI,GAAG,CAAC,CAAA;AACd,8DAA8D;AAC9D,MAAM,MAAM,GAAG,2BAA2B,CAAA;AAC1C,MAAM,MAAM,GAAG,wBAAwB,CAAA;AACvC,MAAM,IAAI,GAAG,sBAAsB,CAAA;AACnC,MAAM,MAAM,GAAG,sBAAsB,CAAA;AACrC,MAAM,WAAW,GAAG;IAClB,SAAS;IACT,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,mBAAmB;IACnB,eAAe;IACf,iBAAiB;IACjB,iBAAiB;IACjB,aAAa;IACb,cAAc;IACd,eAAe;IACf,eAAe;IACf,YAAY;CACb,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAEX,2EAA2E;AAC3E,MAAM,OAAO,GAAG,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,CAAC,kCAAkC,CAAC,CAAC,OAAO,CAAA;AAEnF,4DAA4D;AAC5D,MAAM,SAAS,GAAG,CAAC,IAAiB,EAAE,EAAE;IACtC,MAAM,KAAK,GAAG,UAAU,CAAC,gBAAgB,CAAC,IAAI,CAA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K,MAAM;QAAE,MAAM,CAAC,KAAK,EAAE,CAAA;IAC3E,QAAQ,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,KAAK,CAAC,MAAM,EAAE,CAAC,CAAA;AAC5D,CAAC","sourcesContent":["import s from \"@plexui/styles/components/Sortable/Sortable.module.css\"\n\n// Drag to reorder, for any list of elements. Nothing moves until the drop: the\n// item leaves a flat slot and shrinks to a chip at the cursor, a line marks the\n// nearest gap, and only the drop changes the order. Items that stand apart part\n// at the gap. Rows that touch hold still: their text would run over the hairlines.\n// Lists of one group trade items, and a target outside them takes an item whole.\n\nexport type SortableLayout = \"list\" | \"grid\"\n\n/** Applies a move to the list. Resolves once the DOM shows the new order. */\nexport type SortableCommit = (from: number, to: number) => void | Promise<void>\n\n/** A move inside a list, into another list of its group or onto a target */\nexport type SortableMove<T = unknown> = {\n /** The entry of `value` that moved */\n item: T\n /** The `name` of the list it left */\n from: string\n /** Its place there */\n fromIndex: number\n /** The `name` of the list or the target it reached */\n to: string\n /** Its place after the move. A target has no places: the app decides. */\n toIndex?: number\n}\n\n/** What a list does when an item leaves it. Resolves once the DOM shows the move. */\nexport type SortableLink = {\n move: (fromIndex: number, to: string, toIndex?: number) => void | Promise<void>\n hold?: (name: string) => void\n}\n\ntype Slot = {\n gap: number\n /** Offsets from the list's corner, so a scroll under the drag keeps them true */\n x: number\n y: number\n length: number\n before?: Element\n after?: Element\n}\n\ntype Area = {\n list: HTMLElement\n items: HTMLElement[]\n slots: Slot[]\n}\n\ntype Found = {\n area: Area\n slot: Slot\n}\n\nconst START_DISTANCE = 4\nconst TOUCH_HOLD = 200\n// Long enough to pass over a target on the way to another\nconst TARGET_HOLD = 500\nconst SCROLL_EDGE = 80\nconst SCROLL_SLOW = 4\nconst SCROLL_FAST = 30\nconst NEAR_LIST = 40\nconst LINE_INSET = 16\nconst PART = 4\n// --cubic-enter: an animation here cannot read a CSS variable\nconst EASING = \"cubic-bezier(.19,1,.22,1)\"\nconst HANDLE = \"[data-sortable-handle]\"\nconst GRAB = \"[data-sortable-grab]\"\nconst STATIC = \"data-sortable-static\"\nconst INTERACTIVE = [\n \"a[href]\",\n \"button\",\n \"input\",\n \"select\",\n \"summary\",\n \"textarea\",\n \"[contenteditable]\",\n \"[role=button]\",\n \"[role=checkbox]\",\n \"[role=combobox]\",\n \"[role=link]\",\n \"[role=radio]\",\n \"[role=slider]\",\n \"[role=switch]\",\n \"[role=tab]\",\n].join(\",\")\n\n// Read at the moment of use: the setting can change while the page is open\nconst reduced = () => window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches\n\n/** How far the line stands in from the sides of the list */\nconst lineInset = (list: HTMLElement) => {\n const inset = parseFloat(getComputedStyle(list).getPropertyValue(\"--sortable-line-inset\"))\n return Number.isNaN(inset) ? LINE_INSET : inset\n}\n\n/** A head row or an empty message stands among the items and is not one of them */\nconst itemsOf = (list: HTMLElement) => ([...list.children] as HTMLElement[]).filter((item) => !item.hasAttribute(STATIC))\n\n/** The lists a drag from this one can reach, in the order of the page */\nconst listsOf = (list: HTMLElement) => {\n const { group } = list.dataset\n if (!group) return [list]\n return [...document.querySelectorAll<HTMLElement>(`[data-sortable][data-group=\"${CSS.escape(group)}\"]:not([data-disabled])`)]\n}\n\n/** Grips stand in a table, elsewhere only when the list asks for them */\nconst showsHandles = (list: HTMLElement) => (list.dataset.handles ?? String(list.tagName === \"TBODY\")) === \"true\"\n\n/** The direct child of the list that holds `target` */\nconst itemOf = (list: HTMLElement, target: Element) => {\n let node: Element | null = target\n while (node && node.parentElement !== list) node = node.parentElement\n return node as HTMLElement | null\n}\n\n/** The order after a move. `to` counts the list without the moved item. */\nexport const moveItem = <T>(items: readonly T[], from: number, to: number) => {\n const next = [...items]\n next.splice(to, 0, ...next.splice(from, 1))\n return next\n}\n\nconst labelOf = (item: HTMLElement) => {\n const named = item.dataset.sortableLabel ?? item.querySelector(\"[data-sortable-label], label\")?.textContent\n if (named) return named.trim()\n // The cells of a row or the lines of a card run together: the first one is the name\n const texts = document.createTreeWalker(item, NodeFilter.SHOW_TEXT)\n while (texts.nextNode()) {\n if (texts.currentNode.textContent?.trim()) return texts.currentNode.parentElement?.textContent?.trim() ?? \"\"\n }\n return \"\"\n}\n\n/** What a screen reader hears: a picture has no text of its own */\nconst nameOf = (item: HTMLElement) => labelOf(item) || item.querySelector(\"img\")?.alt || \"\"\n\nfunction makeChip(item: HTMLElement) {\n const chip = document.createElement(\"div\")\n chip.className = s.Chip\n const image = item.querySelector<HTMLElement>(\"[data-sortable-image], img\")\n if (image instanceof HTMLImageElement) {\n const picture = document.createElement(\"img\")\n picture.className = s.ChipImage\n picture.src = image.currentSrc || image.src\n picture.alt = \"\"\n chip.append(picture)\n } else if (image) {\n // A cropped background: the chip takes the element as it stands, at the chip's size\n const picture = image.cloneNode(false) as HTMLElement\n picture.className = s.ChipImage\n picture.hidden = false\n chip.append(picture)\n }\n const text = labelOf(item)\n if (text) {\n const label = document.createElement(\"span\")\n label.className = s.ChipLabel\n label.textContent = text\n chip.append(label)\n }\n document.body.append(chip)\n return chip\n}\n\nfunction announce(text: string) {\n let region = document.querySelector(\"[data-sortable-live]\")\n if (!region) {\n region = document.createElement(\"div\")\n region.className = s.Live\n region.setAttribute(\"aria-live\", \"polite\")\n region.setAttribute(\"data-sortable-live\", \"\")\n document.body.append(region)\n }\n region.textContent = text\n}\n\nconst scrollParent = (start: Element | null) => {\n for (let node = start; node && node !== document.body; node = node.parentElement) {\n if (/auto|scroll/.test(getComputedStyle(node).overflowY) && node.scrollHeight > node.clientHeight) return node\n }\n return undefined\n}\n\n// The nearer the edge the faster: slow to aim at a row, fast across a long list\nconst scrollStep = (depth: number) =>\n SCROLL_SLOW + (SCROLL_FAST - SCROLL_SLOW) * Math.min(depth / SCROLL_EDGE, 1)\n\nfunction listSlots(list: HTMLElement, items: HTMLElement[]) {\n const box = list.getBoundingClientRect()\n const inset = lineInset(list)\n if (!items.length) {\n // Above a message or an empty row: the line must not cross its text\n const rest = (list.lastElementChild ?? list).getBoundingClientRect()\n return [{ gap: 0, x: inset, y: rest.top - box.top, length: box.width - inset * 2 }]\n }\n const rects = items.map((item) => item.getBoundingClientRect())\n return Array.from({ length: items.length + 1 }, (_, gap): Slot => {\n const above = rects[gap - 1]\n const below = rects[gap]\n const y = above && below ? (above.bottom + below.top) / 2 : (below?.top ?? above.bottom)\n return {\n gap,\n x: inset,\n y: y - box.top,\n length: box.width - inset * 2,\n before: items[gap - 1],\n after: items[gap],\n }\n })\n}\n\n// One slot per gap, and two where a line wraps: the end of one line and the start of the next\nfunction gridSlots(list: HTMLElement, items: HTMLElement[]) {\n const box = list.getBoundingClientRect()\n if (!items.length) return [{ gap: 0, x: 0, y: 0, length: box.height }]\n const half = (parseFloat(getComputedStyle(list).columnGap) || 8) / 2\n const rects = items.map((item) => item.getBoundingClientRect())\n const slots: Slot[] = []\n const add = (gap: number, x: number, rect: DOMRect, before?: Element, after?: Element) =>\n slots.push({ gap, x: x - box.left, y: rect.top - box.top, length: rect.height, before, after })\n\n rects.forEach((rect, gap) => {\n const previous = rects[gap - 1]\n if (previous && Math.abs(previous.top - rect.top) < rect.height / 2) {\n add(gap, (previous.right + rect.left) / 2, rect, items[gap - 1], items[gap])\n return\n }\n if (previous) add(gap, previous.right + half, previous, items[gap - 1])\n add(gap, rect.left - half, rect, undefined, items[gap])\n })\n const last = rects.length - 1\n add(rects.length, rects[last].right + half, rects[last], items[last])\n return slots\n}\n\n// The chip keeps its size and fades out: grown to the item, its text would stand over the item's own\nfunction flyChip(chip: HTMLElement, to: DOMRect | undefined, layout: SortableLayout) {\n if (reduced() || !to) {\n chip.remove()\n return\n }\n const from = chip.getBoundingClientRect()\n const x = layout === \"grid\" ? to.left + (to.width - from.width) / 2 : to.left\n const y = to.top + (to.height - from.height) / 2\n chip.animate(\n [\n { transform: `translate(${from.left}px, ${from.top}px)`, opacity: 1 },\n { transform: `translate(${x}px, ${y}px)`, opacity: 0 },\n ],\n { duration: 200, easing: EASING, fill: \"forwards\" },\n ).onfinish = () => chip.remove()\n}\n\n/** The items that changed place slide there from where they stood */\nasync function flip(items: HTMLElement[], work: () => void | Promise<void>, skip?: HTMLElement) {\n const before = new Map(items.map((item) => [item, item.getBoundingClientRect()]))\n await work()\n if (reduced()) return\n items\n .filter((item) => item !== skip && item.isConnected)\n .forEach((item) => {\n const was = before.get(item) as DOMRect\n const now = item.getBoundingClientRect()\n const x = was.left - now.left\n const y = was.top - now.top\n if (x || y) item.animate([{ transform: `translate(${x}px, ${y}px)` }, { transform: \"none\" }], { duration: 200, easing: EASING })\n })\n}\n\nconst swallow = (event: Event) => {\n event.stopPropagation()\n event.preventDefault()\n}\n\nfunction startDrag(\n event: PointerEvent,\n list: HTMLElement,\n source: HTMLElement,\n layout: SortableLayout,\n immediate: boolean,\n commit: SortableCommit,\n link?: SortableLink,\n) {\n const touch = event.pointerType === \"touch\" && !immediate\n const origin = { x: event.clientX, y: event.clientY }\n const pointer = { ...origin }\n const holdTimer = touch ? setTimeout(begin, TOUCH_HOLD) : undefined\n const style = getComputedStyle(list)\n const part = parseFloat(layout === \"grid\" ? style.columnGap : style.rowGap) ? PART : 0\n const scroller = scrollParent(list)\n const { group } = list.dataset\n const targets = group ? `[data-sortable-target=\"${CSS.escape(group)}\"]` : undefined\n let drag:\n | {\n chip: HTMLElement\n line: HTMLElement\n width: number\n height: number\n areas: Area[]\n frame?: number\n found?: Found\n under?: Element | null\n target?: HTMLElement\n rest?: ReturnType<typeof setTimeout>\n }\n | undefined\n\n window.addEventListener(\"pointermove\", onMove)\n window.addEventListener(\"pointerup\", onUp)\n window.addEventListener(\"pointercancel\", onCancel)\n\n function onMove({ clientX, clientY }: PointerEvent) {\n pointer.x = clientX\n pointer.y = clientY\n if (drag) return\n const moved = Math.hypot(clientX - origin.x, clientY - origin.y) >= START_DISTANCE\n if (moved && touch) stopListening()\n else if (moved) begin()\n }\n\n function onUp() {\n finish(true)\n }\n\n function onCancel() {\n finish(false)\n }\n\n function onKey(keyEvent: KeyboardEvent) {\n if (keyEvent.key !== \"Escape\") return\n keyEvent.stopPropagation()\n finish(false)\n }\n\n function blockScroll(touchEvent: TouchEvent) {\n touchEvent.preventDefault()\n }\n\n function stopListening() {\n clearTimeout(holdTimer)\n window.removeEventListener(\"pointermove\", onMove)\n window.removeEventListener(\"pointerup\", onUp)\n window.removeEventListener(\"pointercancel\", onCancel)\n window.removeEventListener(\"keydown\", onKey, true)\n window.removeEventListener(\"touchmove\", blockScroll)\n }\n\n function measure() {\n return listsOf(list).map((entry) => {\n const items = itemsOf(entry)\n entry.setAttribute(\"data-dragging\", \"\")\n return { list: entry, items, slots: layout === \"grid\" ? gridSlots(entry, items) : listSlots(entry, items) }\n })\n }\n\n function begin() {\n const areas = measure()\n window.getSelection()?.removeAllRanges()\n document.documentElement.classList.add(s.Dragging)\n source.setAttribute(\"data-sortable-source\", \"\")\n window.addEventListener(\"keydown\", onKey, true)\n window.addEventListener(\"touchmove\", blockScroll, { passive: false })\n const chip = makeChip(source)\n const line = document.createElement(\"div\")\n line.className = s.Line\n line.hidden = true\n document.body.append(line)\n const { width, height } = chip.getBoundingClientRect()\n drag = { chip, line, width, height, areas }\n tick()\n }\n\n function tick() {\n if (!drag) return\n drag.under = targets ? document.elementFromPoint(pointer.x, pointer.y) : undefined\n autoScroll()\n update()\n drag.frame = requestAnimationFrame(tick)\n }\n\n /** A column of targets with a scroll of its own scrolls alone, the page stays */\n function panelUnder() {\n const panel = targets && drag?.under ? scrollParent(drag.under) : undefined\n return panel && panel !== scroller && panel.querySelector(targets as string) ? panel : undefined\n }\n\n function autoScroll() {\n const area = panelUnder() ?? scroller\n const box = area?.getBoundingClientRect() ?? { top: 0, bottom: window.innerHeight }\n const above = box.top + SCROLL_EDGE - pointer.y\n const below = pointer.y - box.bottom + SCROLL_EDGE\n const step = above > 0 ? -scrollStep(above) : below > 0 ? scrollStep(below) : 0\n if (!step) return\n if (area) area.scrollTop += step\n else window.scrollBy(0, step)\n }\n\n function update() {\n if (!drag) return\n drag.chip.style.transform = `translate(${pointer.x - drag.width / 2}px, ${pointer.y - drag.height / 2}px)`\n const target = (targets && drag.under?.closest<HTMLElement>(targets)) || undefined\n if (target !== drag.target) pointAt(target)\n const box = source.getBoundingClientRect()\n const overSource = pointer.x >= box.left && pointer.x <= box.right && pointer.y >= box.top && pointer.y <= box.bottom\n source.toggleAttribute(\"data-sortable-away\", !overSource)\n showGap(target || overSource ? undefined : nearestSlot())\n }\n\n function pointAt(target: HTMLElement | undefined) {\n if (!drag) return\n clearTimeout(drag.rest)\n drag.target?.removeAttribute(\"data-over\")\n drag.target = target\n if (!target) return\n target.setAttribute(\"data-over\", \"\")\n drag.rest = setTimeout(() => {\n link?.hold?.(target.dataset.name as string)\n // What the hold changed is drawn two frames on: a list opened, the page jumped\n requestAnimationFrame(() => requestAnimationFrame(() => drag && (drag.areas = measure())))\n }, TARGET_HOLD)\n }\n\n function distance(slot: Slot, box: DOMRect) {\n if (layout === \"list\") return Math.abs(pointer.y - (box.top + slot.y))\n const top = box.top + slot.y\n return Math.hypot(pointer.x - (box.left + slot.x), Math.max(top - pointer.y, 0, pointer.y - top - slot.length))\n }\n\n function nearestSlot() {\n if (!drag) return undefined\n let best: Found | undefined\n let closest = Infinity\n for (const area of drag.areas) {\n const box = area.list.getBoundingClientRect()\n const near =\n pointer.x >= box.left - NEAR_LIST &&\n pointer.x <= box.right + NEAR_LIST &&\n pointer.y >= box.top - NEAR_LIST &&\n pointer.y <= box.bottom + NEAR_LIST\n if (!near) continue\n for (const slot of area.slots) {\n const away = distance(slot, box)\n if (away < closest) {\n closest = away\n best = { area, slot }\n }\n }\n }\n if (!best) return undefined\n const index = best.area.items.indexOf(source)\n return index >= 0 && (best.slot.gap === index || best.slot.gap === index + 1) ? undefined : best\n }\n\n function shift(slot: Slot | undefined, by: number) {\n const move = (item: Element | undefined, offset: number) => {\n if (!item || !part) return\n ;(item as HTMLElement).style.transform = by\n ? layout === \"grid\"\n ? `translateX(${offset}px)`\n : `translateY(${offset}px)`\n : \"\"\n }\n move(slot?.before, -by)\n move(slot?.after, by)\n }\n\n function showGap(found: Found | undefined) {\n if (!drag) return\n if (found?.slot !== drag.found?.slot) {\n shift(drag.found?.slot, 0)\n shift(found?.slot, part)\n }\n drag.found = found\n drag.line.hidden = !found\n if (!found) return\n const box = found.area.list.getBoundingClientRect()\n if (layout === \"grid\") {\n drag.line.style.transform = `translate(${box.left + found.slot.x - 1}px, ${box.top + found.slot.y}px)`\n drag.line.style.height = `${found.slot.length}px`\n } else {\n drag.line.style.transform = `translate(${box.left + found.slot.x}px, ${box.top + found.slot.y - 1}px)`\n drag.line.style.width = `${found.slot.length}px`\n }\n }\n\n function restoreSource() {\n source.removeAttribute(\"data-sortable-source\")\n source.removeAttribute(\"data-sortable-away\")\n }\n\n function settle(chip: HTMLElement, item: HTMLElement | undefined = source) {\n const shown = item?.isConnected ? item : undefined\n flyChip(chip, shown?.getBoundingClientRect(), layout)\n if (!reduced() && shown) shown.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 250, easing: EASING })\n }\n\n async function land(chip: HTMLElement, areas: Area[], { area, slot: { gap } }: Found, clear: () => void) {\n const from = itemsOf(list).indexOf(source)\n restoreSource()\n if (area.list === list) {\n const to = gap > from ? gap - 1 : gap\n await flip(\n area.items,\n () => {\n clear()\n return commit(from, to)\n },\n source,\n )\n announce(`${nameOf(source)}, ${to + 1} / ${area.items.length}`)\n settle(chip)\n return\n }\n const name = nameOf(source)\n await flip(\n areas.flatMap(({ items }) => items),\n () => {\n clear()\n return link?.move(from, area.list.dataset.name as string, gap)\n },\n source,\n )\n announce(`${name}, ${gap + 1} / ${area.items.length + 1}`)\n // A framework builds the row anew under its new parent\n settle(chip, source.isConnected ? source : itemsOf(area.list)[gap])\n }\n\n async function dropOn(chip: HTMLElement, areas: Area[], name: string, clear: () => void) {\n const from = itemsOf(list).indexOf(source)\n restoreSource()\n await flip(\n areas.flatMap(({ items }) => items),\n () => {\n clear()\n return link?.move(from, name)\n },\n source,\n )\n flyChip(chip, undefined, layout)\n }\n\n function finish(drop: boolean) {\n stopListening()\n if (!drag) return\n const { chip, line, found, areas, frame, target, rest } = drag\n if (frame) cancelAnimationFrame(frame)\n clearTimeout(rest)\n target?.removeAttribute(\"data-over\")\n // The pointer lifts over a row: that click must not act on it\n window.addEventListener(\"click\", swallow, { capture: true, once: true })\n setTimeout(() => window.removeEventListener(\"click\", swallow, { capture: true }))\n line.remove()\n drag = undefined\n // On a drop this waits for the flip to read where the parted items stand\n const clear = () => {\n areas.forEach((area) => area.list.removeAttribute(\"data-dragging\"))\n document.documentElement.classList.remove(s.Dragging)\n shift(found?.slot, 0)\n }\n const targetName = target?.dataset.name\n if (drop && targetName && targetName !== list.dataset.name) {\n void dropOn(chip, areas, targetName, clear)\n return\n }\n if (drop && found && !target) {\n void land(chip, areas, found, clear)\n return\n }\n clear()\n restoreSource()\n settle(chip)\n }\n}\n\n/** Starts a drag from a press inside the list. Goes on the list's `pointerdown`. */\nexport function sortablePointerDown(\n event: PointerEvent,\n list: HTMLElement,\n layout: SortableLayout,\n commit: SortableCommit,\n link?: SortableLink,\n) {\n const target = event.target as Element\n if (event.button || target.closest(\"[data-sortable]\") !== list) return\n const source = itemOf(list, target)\n if (!source || source.hasAttribute(STATIC)) return\n const handle = target.closest(HANDLE)\n const control = target.closest(INTERACTIVE)\n // A grip in sight is the only way to drag, otherwise anything but a control\n // starts it, and a control that opens its row on a click may let a pull through\n if (source.querySelector(HANDLE) && showsHandles(list) ? !handle : control && !control.closest(GRAB)) return\n startDrag(event, list, source, layout, !!handle, commit, link)\n}\n\nconst KEY_STEPS: Record<string, number> = { ArrowUp: -1, ArrowLeft: -1, ArrowDown: 1, ArrowRight: 1 }\n\n/** Moves the focused handle's item with the arrow keys. Goes on the list's `keydown`. */\nexport async function sortableKeyDown(event: KeyboardEvent, list: HTMLElement, commit: SortableCommit, link?: SortableLink) {\n const step = KEY_STEPS[event.key]\n const target = event.target as HTMLElement\n if (!step || target.closest(\"[data-sortable]\") !== list) return\n const source = itemOf(list, target)\n if (!source || (target !== source && !target.closest(HANDLE))) return\n const items = itemsOf(list)\n const from = items.indexOf(source)\n const to = from + step\n if (to < 0 || to >= items.length) {\n // Past the end of the list: on to the next list of the group\n const lists = listsOf(list)\n const next = lists[lists.indexOf(list) + step]\n if (!next || !link) return\n event.preventDefault()\n const place = step > 0 ? 0 : itemsOf(next).length\n const name = nameOf(source)\n await flip(lists.flatMap(itemsOf), () => link.move(from, next.dataset.name as string, place))\n const landed = itemsOf(next)[place]\n ;(landed?.querySelector<HTMLElement>(HANDLE) ?? landed)?.focus()\n announce(`${name}, ${place + 1} / ${itemsOf(next).length}`)\n return\n }\n event.preventDefault()\n await flip(items, () => commit(from, to))\n // Moving an element in the document drops its focus\n if (target.isConnected && document.activeElement !== target) target.focus()\n announce(`${nameOf(source)}, ${to + 1} / ${items.length}`)\n}\n"]}
@@ -0,0 +1,163 @@
1
+ import { type Component, type PropType, type SlotsType, type VNodeChild } from "vue";
2
+ import { type SortableLayout, type SortableMove } from "../../lib/sortable.js";
3
+ /** Reorders its direct children by dragging, from anywhere but a control, or by a `SortableHandle` where grips are shown. */
4
+ export declare const Sortable: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
5
+ /** The list, in the order of the children. Bind with `v-model:value`. */
6
+ value: {
7
+ type: PropType<readonly unknown[]>;
8
+ required: true;
9
+ };
10
+ /** `list` for rows one under another, `grid` for items that stand side by side. @default "list" */
11
+ layout: {
12
+ type: PropType<SortableLayout>;
13
+ default: string;
14
+ };
15
+ /** Element to render, such as `TableBody` for table rows. @default "div" */
16
+ as: {
17
+ type: PropType<string | Component>;
18
+ default: string;
19
+ };
20
+ /** Turns dragging off. @default false */
21
+ disabled: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ /** Shows the grips of `SortableHandle`. A hidden grip still takes the keyboard, and the item drags from anywhere but a control. @default true in a table, otherwise false */
26
+ handles: {
27
+ type: BooleanConstructor;
28
+ default: undefined;
29
+ };
30
+ /** Lists of one group trade items, and a `SortableTarget` of that group takes them. Give each list a `name`. */
31
+ group: {
32
+ type: StringConstructor;
33
+ default: undefined;
34
+ };
35
+ /** Names the list in `move`. */
36
+ name: {
37
+ type: StringConstructor;
38
+ default: undefined;
39
+ };
40
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
41
+ [key: string]: any;
42
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
43
+ "update:value": (_value: unknown[]) => true;
44
+ change: (_value: unknown[]) => true;
45
+ /** An item moved, inside this list or out of it. Out of it the app updates both lists: `update:value` is for a move inside one. */
46
+ move: (_move: SortableMove) => true;
47
+ /** A drag rests on a `SortableTarget` of the group: open what it stands for or go there. */
48
+ hold: (_name: string) => true;
49
+ }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
50
+ /** The list, in the order of the children. Bind with `v-model:value`. */
51
+ value: {
52
+ type: PropType<readonly unknown[]>;
53
+ required: true;
54
+ };
55
+ /** `list` for rows one under another, `grid` for items that stand side by side. @default "list" */
56
+ layout: {
57
+ type: PropType<SortableLayout>;
58
+ default: string;
59
+ };
60
+ /** Element to render, such as `TableBody` for table rows. @default "div" */
61
+ as: {
62
+ type: PropType<string | Component>;
63
+ default: string;
64
+ };
65
+ /** Turns dragging off. @default false */
66
+ disabled: {
67
+ type: BooleanConstructor;
68
+ default: boolean;
69
+ };
70
+ /** Shows the grips of `SortableHandle`. A hidden grip still takes the keyboard, and the item drags from anywhere but a control. @default true in a table, otherwise false */
71
+ handles: {
72
+ type: BooleanConstructor;
73
+ default: undefined;
74
+ };
75
+ /** Lists of one group trade items, and a `SortableTarget` of that group takes them. Give each list a `name`. */
76
+ group: {
77
+ type: StringConstructor;
78
+ default: undefined;
79
+ };
80
+ /** Names the list in `move`. */
81
+ name: {
82
+ type: StringConstructor;
83
+ default: undefined;
84
+ };
85
+ }>> & Readonly<{
86
+ onChange?: ((_value: unknown[]) => any) | undefined;
87
+ "onUpdate:value"?: ((_value: unknown[]) => any) | undefined;
88
+ onMove?: ((_move: SortableMove) => any) | undefined;
89
+ onHold?: ((_name: string) => any) | undefined;
90
+ }>, {
91
+ disabled: boolean;
92
+ name: string;
93
+ as: string | Component;
94
+ layout: SortableLayout;
95
+ group: string;
96
+ handles: boolean;
97
+ }, SlotsType<{
98
+ /** The items, one direct child per entry of `value`, keyed by the entry and not by its index */
99
+ default?: () => VNodeChild;
100
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
101
+ /** The grip of an item. Arrow keys move the item while the handle has focus. */
102
+ export declare const SortableHandle: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
103
+ /** Name of the handle for assistive technology. @default "Reorder" */
104
+ ariaLabel: {
105
+ type: StringConstructor;
106
+ default: string;
107
+ };
108
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
109
+ [key: string]: any;
110
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
111
+ /** Name of the handle for assistive technology. @default "Reorder" */
112
+ ariaLabel: {
113
+ type: StringConstructor;
114
+ default: string;
115
+ };
116
+ }>> & Readonly<{}>, {
117
+ ariaLabel: string;
118
+ }, SlotsType<{
119
+ /** The grip */
120
+ default?: () => VNodeChild;
121
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
122
+ /** A place outside the lists that takes an item whole: a folder, a category in a side list. */
123
+ export declare const SortableTarget: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
124
+ /** The `group` of the lists whose items it takes */
125
+ group: {
126
+ type: StringConstructor;
127
+ required: true;
128
+ };
129
+ /** Names the target in `move` and `hold` on the list */
130
+ name: {
131
+ type: StringConstructor;
132
+ required: true;
133
+ };
134
+ /** Element to render. @default "div" */
135
+ as: {
136
+ type: PropType<string | Component>;
137
+ default: string;
138
+ };
139
+ }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
140
+ [key: string]: any;
141
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
142
+ /** The `group` of the lists whose items it takes */
143
+ group: {
144
+ type: StringConstructor;
145
+ required: true;
146
+ };
147
+ /** Names the target in `move` and `hold` on the list */
148
+ name: {
149
+ type: StringConstructor;
150
+ required: true;
151
+ };
152
+ /** Element to render. @default "div" */
153
+ as: {
154
+ type: PropType<string | Component>;
155
+ default: string;
156
+ };
157
+ }>> & Readonly<{}>, {
158
+ as: string | Component;
159
+ }, SlotsType<{
160
+ /** What the target shows */
161
+ default?: () => VNodeChild;
162
+ }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
163
+ export type { SortableLayout, SortableMove };
@@ -0,0 +1 @@
1
+ export { Sortable, SortableHandle, SortableTarget, type SortableLayout, type SortableMove } from "./Sortable.js";
@@ -1,5 +1,5 @@
1
1
  import { type PropType } from "vue";
2
- import type { Sizes } from "@plexui/styles/types";
2
+ import type { Sizes, Variants } from "@plexui/styles/types";
3
3
  export type Tag = {
4
4
  value: string;
5
5
  valid: boolean;
@@ -24,6 +24,11 @@ export declare const TagInput: import("vue").DefineComponent<import("vue").Extra
24
24
  type: PropType<Sizes<"sm" | "md" | "lg" | "xl" | "2xl" | "3xl">>;
25
25
  default: string;
26
26
  };
27
+ /** Visual style. `ghost` has no frame, for a field that its container already frames. @default "outline" */
28
+ variant: {
29
+ type: PropType<Variants<"outline" | "ghost">>;
30
+ default: string;
31
+ };
27
32
  /** Placeholder text for the input */
28
33
  placeholder: {
29
34
  type: StringConstructor;
@@ -78,6 +83,11 @@ export declare const TagInput: import("vue").DefineComponent<import("vue").Extra
78
83
  type: PropType<Sizes<"sm" | "md" | "lg" | "xl" | "2xl" | "3xl">>;
79
84
  default: string;
80
85
  };
86
+ /** Visual style. `ghost` has no frame, for a field that its container already frames. @default "outline" */
87
+ variant: {
88
+ type: PropType<Variants<"outline" | "ghost">>;
89
+ default: string;
90
+ };
81
91
  /** Placeholder text for the input */
82
92
  placeholder: {
83
93
  type: StringConstructor;
@@ -121,6 +131,7 @@ export declare const TagInput: import("vue").DefineComponent<import("vue").Extra
121
131
  size: "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
122
132
  delimiters: string[];
123
133
  placeholder: string;
134
+ variant: "outline" | "ghost";
124
135
  pill: boolean;
125
136
  autoFocus: boolean;
126
137
  rows: number;
@@ -3,7 +3,7 @@ import type { ControlSize, Sizes, Variants } from "@plexui/styles/types";
3
3
  declare const TextareaComponent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
4
4
  /** Visual style of the textarea. @default "outline" */
5
5
  variant: {
6
- type: PropType<Variants<"outline" | "soft">>;
6
+ type: PropType<Variants<"outline" | "soft" | "ghost">>;
7
7
  default: string;
8
8
  };
9
9
  /** Controls the size of the textarea. @default "md" */
@@ -80,7 +80,7 @@ declare const TextareaComponent: import("vue").DefineComponent<import("vue").Ext
80
80
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
81
81
  /** Visual style of the textarea. @default "outline" */
82
82
  variant: {
83
- type: PropType<Variants<"outline" | "soft">>;
83
+ type: PropType<Variants<"outline" | "soft" | "ghost">>;
84
84
  default: string;
85
85
  };
86
86
  /** Controls the size of the textarea. @default "md" */
@@ -157,7 +157,7 @@ declare const TextareaComponent: import("vue").DefineComponent<import("vue").Ext
157
157
  defaultValue: string | number;
158
158
  disabled: boolean;
159
159
  size: "3xs" | "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl";
160
- variant: "soft" | "outline";
160
+ variant: "soft" | "outline" | "ghost";
161
161
  readOnly: boolean;
162
162
  readonly: boolean;
163
163
  allowAutofillExtensions: boolean;
@@ -0,0 +1,27 @@
1
+ export type SortableLayout = "list" | "grid";
2
+ /** Applies a move to the list. Resolves once the DOM shows the new order. */
3
+ export type SortableCommit = (from: number, to: number) => void | Promise<void>;
4
+ /** A move inside a list, into another list of its group or onto a target */
5
+ export type SortableMove<T = unknown> = {
6
+ /** The entry of `value` that moved */
7
+ item: T;
8
+ /** The `name` of the list it left */
9
+ from: string;
10
+ /** Its place there */
11
+ fromIndex: number;
12
+ /** The `name` of the list or the target it reached */
13
+ to: string;
14
+ /** Its place after the move. A target has no places: the app decides. */
15
+ toIndex?: number;
16
+ };
17
+ /** What a list does when an item leaves it. Resolves once the DOM shows the move. */
18
+ export type SortableLink = {
19
+ move: (fromIndex: number, to: string, toIndex?: number) => void | Promise<void>;
20
+ hold?: (name: string) => void;
21
+ };
22
+ /** The order after a move. `to` counts the list without the moved item. */
23
+ export declare const moveItem: <T>(items: readonly T[], from: number, to: number) => T[];
24
+ /** Starts a drag from a press inside the list. Goes on the list's `pointerdown`. */
25
+ export declare function sortablePointerDown(event: PointerEvent, list: HTMLElement, layout: SortableLayout, commit: SortableCommit, link?: SortableLink): void;
26
+ /** Moves the focused handle's item with the arrow keys. Goes on the list's `keydown`. */
27
+ export declare function sortableKeyDown(event: KeyboardEvent, list: HTMLElement, commit: SortableCommit, link?: SortableLink): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plexui/vue",
3
- "version": "0.1.12",
3
+ "version": "0.3.0",
4
4
  "description": "Plex UI components for Vue 3, built on Reka UI and the shared @plexui/styles CSS",
5
5
  "type": "module",
6
6
  "license": "MIT",