@plexui/vue 0.1.3 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/DateRangePicker/Calendar.js +19 -18
- package/dist/es/components/DateRangePicker/Calendar.js.map +1 -1
- package/dist/es/components/DateRangePicker/DateRangePicker.js +5 -0
- package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
- package/dist/es/components/DateRangePicker/context.js.map +1 -1
- package/dist/es/components/DateRangePicker/index.js.map +1 -1
- package/dist/es/components/DateRangePicker/types.js.map +1 -1
- package/dist/es/components/Dialog/Dialog.js +46 -11
- package/dist/es/components/Dialog/Dialog.js.map +1 -1
- package/dist/es/components/Field/Field.js +6 -3
- package/dist/es/components/Field/Field.js.map +1 -1
- package/dist/es/components/InputGroup/InputGroup.js +0 -1
- package/dist/es/components/InputGroup/InputGroup.js.map +1 -1
- package/dist/es/components/Menu/Menu.js +27 -5
- package/dist/es/components/Menu/Menu.js.map +1 -1
- package/dist/es/components/Popover/Popover.js +24 -9
- package/dist/es/components/Popover/Popover.js.map +1 -1
- package/dist/es/components/Select/Select.js +33 -15
- package/dist/es/components/Select/Select.js.map +1 -1
- package/dist/es/components/SelectControl/SelectControl.js +7 -4
- package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
- package/dist/es/components/Transition/TransitionGroup.js +12 -1
- package/dist/es/components/Transition/TransitionGroup.js.map +1 -1
- package/dist/es/components/Transition/shared.js +30 -1
- package/dist/es/components/Transition/shared.js.map +1 -1
- package/dist/es/components/Transition/useTransitionChild.js +2 -2
- package/dist/es/components/Transition/useTransitionChild.js.map +1 -1
- package/dist/es/lib/dateUtils.js +5 -0
- package/dist/es/lib/dateUtils.js.map +1 -1
- package/dist/es/lib/helpers.js +30 -0
- package/dist/es/lib/helpers.js.map +1 -1
- package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +23 -1
- package/dist/types/components/DateRangePicker/context.d.ts +2 -1
- package/dist/types/components/DateRangePicker/index.d.ts +1 -1
- package/dist/types/components/DateRangePicker/types.d.ts +2 -0
- package/dist/types/components/Field/Field.d.ts +2 -2
- package/dist/types/components/Select/Select.d.ts +11 -0
- package/dist/types/components/SelectControl/SelectControl.d.ts +11 -0
- package/dist/types/components/Transition/TransitionGroup.d.ts +11 -0
- package/dist/types/components/Transition/shared.d.ts +23 -0
- package/dist/types/components/Transition/useTransitionChild.d.ts +1 -0
- package/dist/types/lib/dateUtils.d.ts +5 -0
- package/dist/types/lib/helpers.d.ts +13 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../../src/components/Popover/Popover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,CAAC,EACD,OAAO,EACP,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,EACL,eAAe,GAGhB,MAAM,KAAK,CAAA;AACZ,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,cAAc,IAAI,kBAAkB,EACpC,aAAa,IAAI,iBAAiB,EAClC,WAAW,IAAI,eAAe,EAC9B,wBAAwB,EACxB,gBAAgB,EAChB,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC/F,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAA;AAC5F,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,uBAAuB,EAAE,gBAAgB,EAAgB,MAAM,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CAAC,CAAC,CAAC,kBAAkB,EAChE,EAAE,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS,EAAE,GAAI,KAAsB,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,EACxG,KAAK,CACN;4BACH,CAAC,CAAC,kBAAkB,EAAE;qBACzB;iBACF,CACF;aACF;SACF,CAAC,CAAA;IACN,CAAC;CACF,CAAC,CAAA;AAEF,gFAAgF;AAChF,+EAA+E;AAC/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,OAAO,GAGhB,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;IAClC,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,cAAc;CACxB,CAAC,CAAA","sourcesContent":["import {\n computed,\n createCommentVNode,\n defineComponent,\n h,\n markRaw,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n watch,\n watchPostEffect,\n type ExtractPropTypes,\n type PropType,\n} from \"vue\"\nimport {\n PopoverAnchor as RekaPopoverAnchor,\n PopoverContent as RekaPopoverContent,\n PopoverPortal as RekaPopoverPortal,\n PopoverRoot as RekaPopoverRoot,\n injectPopoverRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { focusableElements, preventDefaultHandler, toCssVariables } from \"../../lib/helpers.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport { withRadixVariableNames } from \"../Tooltip/Tooltip.js\"\nimport { composeEventHandlers, firstElementChild, mergeSlotProps } from \"../Tooltip/slot.js\"\nimport { useDeferredPointerDownOutside } from \"./deferredPointerDownOutside.js\"\nimport { createPointerIntentArea, isPointInPolygon, type Polygon } from \"./pointerIntent.js\"\nimport { PopoverContextKey, usePopoverContext, type PopoverContextValue } from \"./usePopoverContext.js\"\nimport { usePopoverController } from \"./usePopoverController.js\"\nimport s from \"@plexui/styles/components/Popover/Popover.module.css\"\n\n// Vue port of packages/ui/src/components/Popover/Popover.tsx on Reka UI.\n// Exports are flat (`PopoverTrigger`, `PopoverContent`) because\n// runtime-compiled templates cannot resolve `Popover.Trigger`; the static\n// properties are kept for render functions and SFCs.\n//\n// Reka keeps positioning, the dismissable layer, the focus scope and focus\n// return. As in Tooltip, the port follows Radix where they differ:\n// - The trigger is Radix's: it runs after the child's handlers and toggles\n// only when none called preventDefault(), carries no `id`, and has\n// `aria-controls` only while open.\n// - The content element is rendered here (Reka's `as`): Radix's custom\n// property names (the shared CSS reads `--radix-popover-content-*`), no\n// `dir`, no `aria-labelledby`.\n// - A press outside closes it on the click that follows, as Radix's\n// deferred outside press does (./deferredPointerDownOutside.ts).\n// - The portal renders once mounted, as Radix's does, so a closed popover\n// server-renders nothing.\n\nexport type PopoverSide = \"top\" | \"right\" | \"bottom\" | \"left\"\nexport type PopoverAlign = \"start\" | \"center\" | \"end\"\n\nconst PopoverComponent = defineComponent({\n name: \"Popover\",\n props: {\n /** Controlled visibility (`v-model:open`); uncontrolled when omitted */\n open: { type: Boolean, default: undefined },\n /** Opens on hover and focus instead of click. @default false */\n showOnHover: { type: Boolean, default: false },\n /** Delay before a hover popover opens, in milliseconds. @default 150 */\n hoverOpenDelay: { type: Number, default: 150 },\n },\n emits: {\n \"update:open\": (_nextState: boolean) => true,\n },\n setup(props, { slots, emit }) {\n const open = ref(false)\n const shake = ref(false)\n const triggerRef = shallowRef<HTMLElement | null>(null)\n const contentRef = shallowRef<HTMLElement | null>(null)\n let openTimer: ReturnType<typeof setTimeout> | undefined\n const hoverOpenFocusedWithTab = { current: false }\n const isPointerInTransitRef = { current: false }\n const isOpen = computed(() => props.open ?? open.value)\n\n const temporarilyPreventClickToClose = ref(false)\n watch(temporarilyPreventClickToClose, (prevent, _, onCleanup) => {\n if (!prevent) return\n const id = setTimeout(() => {\n temporarilyPreventClickToClose.value = false\n }, 500)\n onCleanup(() => clearTimeout(id))\n })\n\n const handleOpenChange = (nextState: boolean) => {\n clearTimeout(openTimer)\n\n // No-op if the state is not changing\n if (isOpen.value === nextState) {\n return\n }\n\n if (!nextState) {\n // clear any running shake animation on close\n shake.value = false\n\n // Check for specific hover conditions where focus should be\n // immediately restored to the trigger before closing\n if (props.showOnHover && hoverOpenFocusedWithTab.current) {\n triggerRef.value?.focus()\n }\n\n // Always cleanup this state\n hoverOpenFocusedWithTab.current = false\n }\n\n emit(\"update:open\", nextState)\n open.value = nextState\n\n if (props.showOnHover) {\n temporarilyPreventClickToClose.value = nextState\n }\n }\n\n const handleTriggerEnter = () => {\n openTimer = setTimeout(() => handleOpenChange(true), props.hoverOpenDelay)\n }\n\n const handleTriggerLeave = () => {\n clearTimeout(openTimer)\n }\n\n onBeforeUnmount(() => {\n clearTimeout(openTimer)\n })\n\n const store: PopoverContextValue = {\n open: isOpen,\n setOpen: handleOpenChange,\n shake,\n setShake: (next) => {\n shake.value = next\n },\n showOnHover: computed(() => props.showOnHover),\n temporarilyPreventClickToClose,\n onTriggerEnter: handleTriggerEnter,\n onTriggerLeave: handleTriggerLeave,\n isPointerInTransitRef,\n triggerRef,\n contentRef,\n hoverOpenFocusedWithTab,\n }\n provide(PopoverContextKey, store)\n\n return () =>\n h(\n RekaPopoverRoot,\n { \"open\": isOpen.value, \"onUpdate:open\": handleOpenChange, \"modal\": false },\n { default: () => slots.default?.() },\n )\n },\n})\n\n/**\n * Renders its child (a button, link, ...) as the popover trigger. Like\n * `Popover.Trigger` in React it takes no other props: attributes on it are\n * not passed on.\n */\nexport const PopoverTrigger = defineComponent({\n name: \"PopoverTrigger\",\n inheritAttrs: false,\n emits: {\n pointerdown: (_event: PointerEvent) => true,\n click: (_event: MouseEvent) => true,\n },\n setup(_props, { slots, emit }) {\n const {\n open,\n setOpen,\n showOnHover,\n temporarilyPreventClickToClose,\n onTriggerEnter,\n onTriggerLeave,\n isPointerInTransitRef,\n triggerRef,\n contentRef,\n } = usePopoverContext()\n const rootContext = injectPopoverRootContext()\n rootContext.contentId ||= useId(undefined, \"reka-popover-content\")\n const { forwardRef, currentElement } = useForwardExpose()\n let hasPointerMoveOpened = false\n\n // Focus returns here on close, and pointer-downs on it are not \"outside\".\n // Follows a replaced child element, as Radix's composed ref does\n watchPostEffect(() => {\n triggerRef.value = currentElement.value ?? null\n rootContext.triggerElement.value = currentElement.value\n })\n\n const maybePreventClickClose = (evt: Event) => {\n // Don't prevent temporary close if the trigger is an anchor tag itself\n const isLink = (evt.currentTarget as Element).nodeName.toLocaleLowerCase() === \"a\"\n\n if (!isLink && temporarilyPreventClickToClose.value) {\n // Prevents tooltip listeners from closing\n evt.preventDefault()\n evt.stopPropagation()\n }\n }\n\n const handlePointerMove = (evt: PointerEvent) => {\n if (evt.pointerType === \"touch\") {\n return\n }\n\n if (!hasPointerMoveOpened && !isPointerInTransitRef.current) {\n onTriggerEnter()\n hasPointerMoveOpened = true\n }\n }\n\n const handlePointerLeave = () => {\n if (!hasPointerMoveOpened) {\n return\n }\n\n onTriggerLeave()\n hasPointerMoveOpened = false\n }\n\n const handleBlur = () => {\n setTimeout(() => {\n // Ignore this handler if focus has moved into the popover\n if (contentRef.value?.contains(document.activeElement)) {\n return\n }\n\n setOpen(false)\n }, 50)\n }\n\n const onPointerdown = (evt: PointerEvent) => {\n maybePreventClickClose(evt)\n emit(\"pointerdown\", evt)\n }\n\n const onClick = composeEventHandlers(\n (evt: MouseEvent) => {\n maybePreventClickClose(evt)\n emit(\"click\", evt)\n },\n () => rootContext.onOpenToggle(),\n )\n\n return () => {\n const child = firstElementChild(slots.default?.())\n if (!child) return null\n\n const isOpen = open.value\n const hover = showOnHover.value\n // Radix's PopoverTrigger props, then Plex's handlers\n const triggerProps = {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen,\n \"aria-controls\": isOpen ? rootContext.contentId : undefined,\n \"data-state\": isOpen ? \"open\" : \"closed\",\n onPointerdown,\n onClick,\n \"onPointermove\": hover ? handlePointerMove : undefined,\n \"onPointerleave\": hover ? handlePointerLeave : undefined,\n \"onFocus\": hover ? () => setOpen(true) : undefined,\n \"onBlur\": hover ? handleBlur : undefined,\n }\n\n return h(RekaPopoverAnchor, { asChild: true, ref: forwardRef }, { default: () => mergeSlotProps(child, triggerProps) })\n }\n },\n})\n\nconst contentProps = {\n /** Avoids collisions with the viewport and scroll containers. @default true */\n avoidCollisions: { type: Boolean, default: undefined },\n /** `width` of the popover; numbers are pixels. @default \"auto\" */\n width: [Number, String] as PropType<number | \"auto\">,\n /** `min-width` of the popover; numbers are pixels. @default 300 */\n minWidth: [Number, String] as PropType<number | \"auto\">,\n /** `max-width` of the popover, in pixels */\n maxWidth: Number,\n /** Preferred side of the trigger. @default \"bottom\" */\n side: String as PropType<PopoverSide>,\n /** Distance from the trigger, in pixels. @default 8 */\n sideOffset: { type: Number, default: 8 },\n /** Preferred alignment against the trigger. @default \"center\" */\n align: String as PropType<PopoverAlign>,\n /** Offset from the \"start\" or \"end\" alignment, in pixels. @default 0 */\n alignOffset: Number,\n /** Translucent popover surface. @default false */\n translucent: { type: Boolean, default: undefined },\n /** Moves focus into the popover when it opens. @default true */\n autoFocus: { type: Boolean, default: true },\n}\n\ntype ContentProps = ExtractPropTypes<typeof contentProps>\n\n// The element Reka's content renders (`as`). Raw: Reka passes `as` through\n// reactive props, and Vue warns about a component made reactive.\nconst PopoverContentElement = markRaw(defineComponent({\n name: \"PopoverContentElement\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const { contentRef } = usePopoverContext()\n const setContentRef = (el: unknown) => {\n contentRef.value = (el as HTMLElement | null) ?? null\n }\n\n return () => {\n const { \"dir\": _dir, \"aria-labelledby\": _labelledBy, style, ...rest } = attrs\n return h(\n \"div\",\n { ...rest, style: withRadixVariableNames(style, \"popover\"), ref: setContentRef },\n slots.default?.(),\n )\n }\n },\n}))\n\nconst PopoverContentImpl = defineComponent({\n name: \"PopoverContentImpl\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { showOnHover, shake, contentRef, setOpen, triggerRef } = usePopoverContext()\n const controller = usePopoverController()\n\n // Radix's non-modal content: a press on the trigger is left to the\n // trigger, and focus does not return to it after a press outside\n let pressedOutside = false\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n if (triggerRef.value?.contains(originalEvent.target as Node)) return\n pressedOutside = true\n setOpen(false)\n })\n const handleCloseAutoFocus = (event: Event) => {\n if (showOnHover.value || pressedOutside) event.preventDefault()\n }\n\n const handleKeyDown = (evt: KeyboardEvent) => {\n const contentElement = contentRef.value\n\n if (\n // When the current target is our container\n contentElement &&\n evt.target === contentElement &&\n // We know that shift key tabs will lead to closing the popover (because we don't use `modal`)\n evt.key === \"Tab\" &&\n evt.shiftKey\n ) {\n // Prevent that from happening\n evt.preventDefault()\n evt.stopPropagation()\n\n // Move focus to the last focusable element, placing the user in the focus loop\n const focusable = focusableElements(contentElement)\n const lastFocusable = focusable[focusable.length - 1]\n lastFocusable?.focus()\n }\n }\n\n // Important that we send initial focus into the popover, placing it onto the container.\n // This allows focus looping to begin, as well as capturing scoped key presses.\n // We prevent Reka's default behavior of focusing an element, because this can have adverse side-effects.\n onMounted(() => {\n watch(\n [showOnHover, () => props.autoFocus],\n () => {\n const contentElement = contentRef.value\n\n if (!contentElement || !props.autoFocus) {\n return\n }\n\n // If we're already focused within the content area, no-op.\n // This would be true if some inner component declares autoFocus\n if (contentElement.contains(document.activeElement)) {\n return\n }\n\n // Our focus isn't in the content area - move it there.\n // NOTE: Don't automatically shift focus on hover popovers\n if (!showOnHover.value) {\n contentElement.focus({ preventScroll: true })\n }\n },\n { immediate: true },\n )\n })\n\n return () =>\n h(\n RekaPopoverContent,\n {\n \"as\": PopoverContentElement,\n \"class\": [s.Popover, attrs.class],\n \"style\": toCssVariables({\n \"popover-width\": props.width,\n \"popover-min-width\": props.minWidth,\n \"popover-max-width\": props.maxWidth,\n }),\n \"onCloseAutoFocus\": handleCloseAutoFocus,\n \"onPointerDownOutside\": outsidePress.onPointerDownOutside,\n \"onFocusOutside\": outsidePress.onFocusOutside,\n \"data-animate\": shake.value ? \"shake\" : undefined,\n \"data-translucent\": props.translucent ? \"true\" : undefined,\n \"side\": props.side,\n \"sideOffset\": props.sideOffset,\n \"align\": props.align,\n \"alignOffset\": props.alignOffset ?? (props.align === \"center\" ? 0 : -5),\n \"avoidCollisions\": props.avoidCollisions ?? true,\n \"hideWhenDetached\": true,\n \"collisionPadding\": 20,\n \"onOpenAutoFocus\": preventDefaultHandler,\n // Escape is handled by the Escape stack in PopoverContent\n \"onEscapeKeyDown\": preventDefaultHandler,\n \"onKeydown\": handleKeyDown,\n },\n { default: () => slots.default?.(controller) },\n )\n },\n})\n\nconst PopoverContentHoverable = defineComponent({\n name: \"PopoverContentHoverable\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { setOpen, triggerRef, contentRef, isPointerInTransitRef, hoverOpenFocusedWithTab } = usePopoverContext()\n const pointerGraceArea = shallowRef<Polygon | null>(null)\n\n const handleRemoveGraceArea = () => {\n pointerGraceArea.value = null\n isPointerInTransitRef.current = false\n }\n\n const handleCreateGraceArea = (event: PointerEvent, hoverTarget: HTMLElement) => {\n const graceArea = createPointerIntentArea(event, hoverTarget)\n pointerGraceArea.value = graceArea\n isPointerInTransitRef.current = true\n }\n\n onBeforeUnmount(handleRemoveGraceArea)\n\n let removeLeaveListeners = () => {}\n onMounted(() => {\n const trigger = triggerRef.value\n const content = contentRef.value\n\n if (!trigger || !content) {\n return\n }\n\n const handleTriggerLeave = (event: PointerEvent) => handleCreateGraceArea(event, content)\n const handleContentLeave = (event: PointerEvent) => handleCreateGraceArea(event, trigger)\n\n trigger.addEventListener(\"pointerleave\", handleTriggerLeave)\n content.addEventListener(\"pointerleave\", handleContentLeave)\n removeLeaveListeners = () => {\n trigger.removeEventListener(\"pointerleave\", handleTriggerLeave)\n content.removeEventListener(\"pointerleave\", handleContentLeave)\n }\n })\n onBeforeUnmount(() => removeLeaveListeners())\n\n watch(pointerGraceArea, (graceArea, _, onCleanup) => {\n if (!graceArea) {\n return\n }\n\n const handleTrackPointerGrace = (event: PointerEvent) => {\n const trigger = triggerRef.value\n const content = contentRef.value\n const target = event.target as HTMLElement\n const pointerPosition = { x: event.clientX, y: event.clientY }\n const hasEnteredTarget = trigger?.contains(target) || content?.contains(target)\n const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, graceArea)\n // Stop considering grace areas when the pointer runs into other control triggers\n const targetHasPopup = target.hasAttribute(\"aria-haspopup\")\n\n if (hasEnteredTarget) {\n handleRemoveGraceArea()\n } else if (isPointerOutsideGraceArea || targetHasPopup) {\n handleRemoveGraceArea()\n setOpen(false)\n }\n }\n document.addEventListener(\"pointermove\", handleTrackPointerGrace)\n onCleanup(() => document.removeEventListener(\"pointermove\", handleTrackPointerGrace))\n })\n\n // Hoverable doesn't place focus in the popover by default.\n // If it is open and Tab is pressed, focus the first focusable element and\n // remember to restore focus to the trigger on close.\n const handleKeyDown = (evt: KeyboardEvent) => {\n if (!contentRef.value) {\n return\n }\n\n // Only assume forward tab is attempting to move into the popup\n if (evt.key === \"Tab\" && !evt.shiftKey) {\n const [firstFocusable] = focusableElements(contentRef.value)\n if (firstFocusable) {\n evt.preventDefault()\n firstFocusable.focus()\n hoverOpenFocusedWithTab.current = true\n document.removeEventListener(\"keydown\", handleKeyDown)\n }\n }\n }\n onMounted(() => document.addEventListener(\"keydown\", handleKeyDown))\n onBeforeUnmount(() => document.removeEventListener(\"keydown\", handleKeyDown))\n\n return () => h(PopoverContentImpl, { ...props, class: attrs.class }, slots)\n },\n})\n\n/**\n * The floating panel. `class` lands on the panel. The default slot receives\n * `{ close, shake }`, the same functions `usePopoverController()` returns.\n */\nexport const PopoverContent = defineComponent({\n name: \"PopoverContent\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { open, showOnHover, setOpen } = usePopoverContext()\n\n useEscCloseStack(open, () => {\n setOpen(false)\n })\n\n return () =>\n h(RekaPopoverPortal, null, {\n default: () => [\n h(\n TransitionGroup,\n { class: s.Transition, enterDuration: 600, exitDuration: 300, disableAnimations: true },\n {\n default: () => [\n open.value\n ? h(\n showOnHover.value ? PopoverContentHoverable : PopoverContentImpl,\n { key: showOnHover.value ? \"popover-hover\" : \"popover\", ...(props as ContentProps), class: attrs.class },\n slots,\n )\n : createCommentVNode(),\n ],\n },\n ),\n ],\n })\n },\n})\n\n/** Popover root. Uncontrolled by default; bind `v-model:open` to control it. */\n// Typed explicitly so the published declaration refers to the parts instead of\n// expanding them (an expanded component type fails consumers' type checks)\nexport const Popover: typeof PopoverComponent & {\n Trigger: typeof PopoverTrigger\n Content: typeof PopoverContent\n} = Object.assign(PopoverComponent, {\n Trigger: PopoverTrigger,\n Content: PopoverContent,\n})\n\nexport type PopoverProps = InstanceType<typeof PopoverComponent>[\"$props\"]\nexport type PopoverContentProps = InstanceType<typeof PopoverContent>[\"$props\"]\n"]}
|
|
1
|
+
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../../src/components/Popover/Popover.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,CAAC,EACD,OAAO,EACP,QAAQ,EACR,eAAe,EACf,SAAS,EACT,OAAO,EACP,GAAG,EACH,UAAU,EACV,KAAK,EACL,eAAe,GAGhB,MAAM,KAAK,CAAA;AACZ,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,cAAc,IAAI,kBAAkB,EACpC,aAAa,IAAI,iBAAiB,EAClC,WAAW,IAAI,eAAe,EAC9B,wBAAwB,EACxB,gBAAgB,EAChB,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC/H,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,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AAK,EAAE;QAC3B,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,GAAG,iBAAiB,EAAE,CAAA;QAE1D,gBAAgB,CAAC,IAAI,EAAE,GAAG,EAAE;YAC1B,OAAO,CAAC,KAAK,CAAC,CAAA;QAChB,CAAC,CAAC,CAAA;QAEF,OAAO,GAAG,EAAE,CACV,CAAC,CAAC,iBAAiB,EAAE,IAAI,EAAE;YACzB,OAAO,EAAE,GAAG,EAAE,CAAC;gBACb,CAAC,CACC,eAAe,EACf,EAAE,KAAK,EAAE,CAAC,CAAC,UAAU,EAAE,GAAG,aAAa,EAAE,OAAO,EAAE,IAAI,EAAE,EACxD;oBACE,OAAO,EAAE,GAAG,EAAE,CAAC;wBACb,IAAI,CAAC,KAAK;4BACR,CAAC,CAAC,CAAC,CACC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,kBAAkB,EAChE;gCACE,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC,SAAS;gCACpD,GAAI,KAAsB;gCAC1B,GAAG,cAAc,CAAC,KAAK,CAAC;gCACxB,KAAK,EAAE,KAAK,CAAC,KAAK;6BACnB,EACD,KAAK,CACN;4BACH,CAAC,CAAC,kBAAkB,EAAE;qBACzB;iBACF,CACF;aACF;SACF,CAAC,CAAA;IACN,CAAC;CACF,CAAC,CAAA;AAEF,gFAAgF;AAChF,+EAA+E;AAC/E,2EAA2E;AAC3E,MAAM,CAAC,MAAM,OAAO,GAGhB,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;IAClC,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,cAAc;CACxB,CAAC,CAAA","sourcesContent":["import {\n computed,\n createCommentVNode,\n defineComponent,\n h,\n markRaw,\n nextTick,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n watch,\n watchPostEffect,\n type ExtractPropTypes,\n type PropType,\n} from \"vue\"\nimport {\n PopoverAnchor as RekaPopoverAnchor,\n PopoverContent as RekaPopoverContent,\n PopoverPortal as RekaPopoverPortal,\n PopoverRoot as RekaPopoverRoot,\n injectPopoverRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { dataAttributes, focusableElements, keepMovedFocus, preventDefaultHandler, toCssVariables } from \"../../lib/helpers.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport { overlayTiming } from \"../Transition/shared.js\"\nimport { withRadixVariableNames } from \"../Tooltip/Tooltip.js\"\nimport { composeEventHandlers, firstElementChild, mergeSlotProps } from \"../Tooltip/slot.js\"\nimport { useDeferredPointerDownOutside } from \"./deferredPointerDownOutside.js\"\nimport { createPointerIntentArea, isPointInPolygon, type Polygon } from \"./pointerIntent.js\"\nimport { PopoverContextKey, usePopoverContext, type PopoverContextValue } from \"./usePopoverContext.js\"\nimport { usePopoverController } from \"./usePopoverController.js\"\nimport s from \"@plexui/styles/components/Popover/Popover.module.css\"\n\n// Vue port of packages/ui/src/components/Popover/Popover.tsx on Reka UI.\n// Exports are flat (`PopoverTrigger`, `PopoverContent`) because\n// runtime-compiled templates cannot resolve `Popover.Trigger`; the static\n// properties are kept for render functions and SFCs.\n//\n// Reka keeps positioning, the dismissable layer, the focus scope and focus\n// return. As in Tooltip, the port follows Radix where they differ:\n// - The trigger is Radix's: it runs after the child's handlers and toggles\n// only when none called preventDefault(), carries no `id`, and has\n// `aria-controls` only while open.\n// - The content element is rendered here (Reka's `as`): Radix's custom\n// property names (the shared CSS reads `--radix-popover-content-*`), no\n// `dir`, no `aria-labelledby`.\n// - A press outside closes it on the click that follows, as Radix's\n// deferred outside press does (./deferredPointerDownOutside.ts).\n// - The portal renders once mounted, as Radix's does, so a closed popover\n// server-renders nothing.\n\nexport type PopoverSide = \"top\" | \"right\" | \"bottom\" | \"left\"\nexport type PopoverAlign = \"start\" | \"center\" | \"end\"\n\nconst PopoverComponent = defineComponent({\n name: \"Popover\",\n props: {\n /** Controlled visibility (`v-model:open`); uncontrolled when omitted */\n open: { type: Boolean, default: undefined },\n /** Opens on hover and focus instead of click. @default false */\n showOnHover: { type: Boolean, default: false },\n /** Delay before a hover popover opens, in milliseconds. @default 150 */\n hoverOpenDelay: { type: Number, default: 150 },\n },\n emits: {\n \"update:open\": (_nextState: boolean) => true,\n },\n setup(props, { slots, emit }) {\n const open = ref(false)\n const shake = ref(false)\n const triggerRef = shallowRef<HTMLElement | null>(null)\n const contentRef = shallowRef<HTMLElement | null>(null)\n let openTimer: ReturnType<typeof setTimeout> | undefined\n const hoverOpenFocusedWithTab = { current: false }\n const isPointerInTransitRef = { current: false }\n const isOpen = computed(() => props.open ?? open.value)\n\n const temporarilyPreventClickToClose = ref(false)\n watch(temporarilyPreventClickToClose, (prevent, _, onCleanup) => {\n if (!prevent) return\n const id = setTimeout(() => {\n temporarilyPreventClickToClose.value = false\n }, 500)\n onCleanup(() => clearTimeout(id))\n })\n\n const handleOpenChange = (nextState: boolean) => {\n clearTimeout(openTimer)\n\n // No-op if the state is not changing\n if (isOpen.value === nextState) {\n return\n }\n\n if (!nextState) {\n // clear any running shake animation on close\n shake.value = false\n\n // Check for specific hover conditions where focus should be\n // immediately restored to the trigger before closing\n if (props.showOnHover && hoverOpenFocusedWithTab.current) {\n triggerRef.value?.focus()\n }\n\n // Always cleanup this state\n hoverOpenFocusedWithTab.current = false\n }\n\n emit(\"update:open\", nextState)\n open.value = nextState\n\n if (props.showOnHover) {\n temporarilyPreventClickToClose.value = nextState\n }\n }\n\n const handleTriggerEnter = () => {\n openTimer = setTimeout(() => handleOpenChange(true), props.hoverOpenDelay)\n }\n\n const handleTriggerLeave = () => {\n clearTimeout(openTimer)\n }\n\n onBeforeUnmount(() => {\n clearTimeout(openTimer)\n })\n\n const store: PopoverContextValue = {\n open: isOpen,\n setOpen: handleOpenChange,\n shake,\n setShake: (next) => {\n shake.value = next\n },\n showOnHover: computed(() => props.showOnHover),\n temporarilyPreventClickToClose,\n onTriggerEnter: handleTriggerEnter,\n onTriggerLeave: handleTriggerLeave,\n isPointerInTransitRef,\n triggerRef,\n contentRef,\n hoverOpenFocusedWithTab,\n }\n provide(PopoverContextKey, store)\n\n return () =>\n h(\n RekaPopoverRoot,\n { \"open\": isOpen.value, \"onUpdate:open\": handleOpenChange, \"modal\": false },\n { default: () => slots.default?.() },\n )\n },\n})\n\n/**\n * Renders its child (a button, link, ...) as the popover trigger. Like\n * `Popover.Trigger` in React it takes no other props: attributes on it are\n * not passed on.\n */\nexport const PopoverTrigger = defineComponent({\n name: \"PopoverTrigger\",\n inheritAttrs: false,\n emits: {\n pointerdown: (_event: PointerEvent) => true,\n click: (_event: MouseEvent) => true,\n },\n setup(_props, { slots, emit }) {\n const {\n open,\n setOpen,\n showOnHover,\n temporarilyPreventClickToClose,\n onTriggerEnter,\n onTriggerLeave,\n isPointerInTransitRef,\n triggerRef,\n contentRef,\n } = usePopoverContext()\n const rootContext = injectPopoverRootContext()\n rootContext.contentId ||= useId(undefined, \"reka-popover-content\")\n const { forwardRef, currentElement } = useForwardExpose()\n let hasPointerMoveOpened = false\n\n // Focus returns here on close, and pointer-downs on it are not \"outside\".\n // Follows a replaced child element, as Radix's composed ref does\n watchPostEffect(() => {\n triggerRef.value = currentElement.value ?? null\n rootContext.triggerElement.value = currentElement.value\n })\n\n const maybePreventClickClose = (evt: Event) => {\n // Don't prevent temporary close if the trigger is an anchor tag itself\n const isLink = (evt.currentTarget as Element).nodeName.toLocaleLowerCase() === \"a\"\n\n if (!isLink && temporarilyPreventClickToClose.value) {\n // Prevents tooltip listeners from closing\n evt.preventDefault()\n evt.stopPropagation()\n }\n }\n\n const handlePointerMove = (evt: PointerEvent) => {\n if (evt.pointerType === \"touch\") {\n return\n }\n\n if (!hasPointerMoveOpened && !isPointerInTransitRef.current) {\n onTriggerEnter()\n hasPointerMoveOpened = true\n }\n }\n\n const handlePointerLeave = () => {\n if (!hasPointerMoveOpened) {\n return\n }\n\n onTriggerLeave()\n hasPointerMoveOpened = false\n }\n\n const handleBlur = () => {\n setTimeout(() => {\n // Ignore this handler if focus has moved into the popover\n if (contentRef.value?.contains(document.activeElement)) {\n return\n }\n\n setOpen(false)\n }, 50)\n }\n\n const onPointerdown = (evt: PointerEvent) => {\n maybePreventClickClose(evt)\n emit(\"pointerdown\", evt)\n }\n\n const onClick = composeEventHandlers(\n (evt: MouseEvent) => {\n maybePreventClickClose(evt)\n emit(\"click\", evt)\n },\n () => rootContext.onOpenToggle(),\n )\n\n return () => {\n const child = firstElementChild(slots.default?.())\n if (!child) return null\n\n const isOpen = open.value\n const hover = showOnHover.value\n // Radix's PopoverTrigger props, then Plex's handlers\n const triggerProps = {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen,\n \"aria-controls\": isOpen ? rootContext.contentId : undefined,\n \"data-state\": isOpen ? \"open\" : \"closed\",\n onPointerdown,\n onClick,\n \"onPointermove\": hover ? handlePointerMove : undefined,\n \"onPointerleave\": hover ? handlePointerLeave : undefined,\n \"onFocus\": hover ? () => setOpen(true) : undefined,\n \"onBlur\": hover ? handleBlur : undefined,\n }\n\n return h(RekaPopoverAnchor, { asChild: true, ref: forwardRef }, { default: () => mergeSlotProps(child, triggerProps) })\n }\n },\n})\n\nconst contentProps = {\n /** Avoids collisions with the viewport and scroll containers. @default true */\n avoidCollisions: { type: Boolean, default: undefined },\n /** `width` of the popover; numbers are pixels. @default \"auto\" */\n width: [Number, String] as PropType<number | \"auto\">,\n /** `min-width` of the popover; numbers are pixels. @default 300 */\n minWidth: [Number, String] as PropType<number | \"auto\">,\n /** `max-width` of the popover, in pixels */\n maxWidth: Number,\n /** Preferred side of the trigger. @default \"bottom\" */\n side: String as PropType<PopoverSide>,\n /** Distance from the trigger, in pixels. @default 8 */\n sideOffset: { type: Number, default: 8 },\n /** Preferred alignment against the trigger. @default \"center\" */\n align: String as PropType<PopoverAlign>,\n /** Offset from the \"start\" or \"end\" alignment, in pixels. @default 0 */\n alignOffset: Number,\n /** Translucent popover surface. @default false */\n translucent: { type: Boolean, default: undefined },\n /** Moves focus into the popover when it opens. @default true */\n autoFocus: { type: Boolean, default: true },\n}\n\ntype ContentProps = ExtractPropTypes<typeof contentProps>\n\n// The element Reka's content renders (`as`). Raw: Reka passes `as` through\n// reactive props, and Vue warns about a component made reactive.\nconst PopoverContentElement = markRaw(defineComponent({\n name: \"PopoverContentElement\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const { contentRef } = usePopoverContext()\n const setContentRef = (el: unknown) => {\n contentRef.value = (el as HTMLElement | null) ?? null\n }\n\n return () => {\n const { \"dir\": _dir, \"aria-labelledby\": _labelledBy, \"forceMount\": _forceMount, style, ...rest } = attrs\n return h(\n \"div\",\n { ...rest, style: withRadixVariableNames(style, \"popover\"), ref: setContentRef },\n slots.default?.(),\n )\n }\n },\n}))\n\nconst PopoverContentImpl = defineComponent({\n name: \"PopoverContentImpl\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { showOnHover, shake, contentRef, setOpen, triggerRef } = usePopoverContext()\n const controller = usePopoverController()\n\n // Radix's non-modal content: a press on the trigger is left to the\n // trigger, and focus does not return to it after a press outside\n let pressedOutside = false\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n if (triggerRef.value?.contains(originalEvent.target as Node)) return\n pressedOutside = true\n setOpen(false)\n })\n const handleCloseAutoFocus = (event: Event) => {\n if (showOnHover.value || pressedOutside) event.preventDefault()\n else keepMovedFocus(event)\n }\n\n const handleKeyDown = (evt: KeyboardEvent) => {\n const contentElement = contentRef.value\n\n if (\n // When the current target is our container\n contentElement &&\n evt.target === contentElement &&\n // We know that shift key tabs will lead to closing the popover (because we don't use `modal`)\n evt.key === \"Tab\" &&\n evt.shiftKey\n ) {\n // Prevent that from happening\n evt.preventDefault()\n evt.stopPropagation()\n\n // Move focus to the last focusable element, placing the user in the focus loop\n const focusable = focusableElements(contentElement)\n const lastFocusable = focusable[focusable.length - 1]\n lastFocusable?.focus()\n }\n }\n\n // Important that we send initial focus into the popover, placing it onto the container.\n // This allows focus looping to begin, as well as capturing scoped key presses.\n // We prevent Reka's default behavior of focusing an element, because this can have adverse side-effects.\n // A tick later, as with the Select's list: until Reka's focus scope here has\n // registered, a Dialog around this content sends the focus straight back,\n // and the content takes that for focus moving outside and closes.\n onMounted(() => {\n watch(\n [showOnHover, () => props.autoFocus],\n async () => {\n await nextTick()\n const contentElement = contentRef.value\n\n if (!contentElement || !props.autoFocus) {\n return\n }\n\n // If we're already focused within the content area, no-op.\n // This would be true if some inner component declares autoFocus\n if (contentElement.contains(document.activeElement)) {\n return\n }\n\n // Our focus isn't in the content area - move it there.\n // NOTE: Don't automatically shift focus on hover popovers\n if (!showOnHover.value) {\n contentElement.focus({ preventScroll: true })\n }\n },\n { immediate: true },\n )\n })\n\n return () =>\n h(\n RekaPopoverContent,\n {\n ...dataAttributes(attrs),\n \"forceMount\": true,\n \"as\": PopoverContentElement,\n \"class\": [s.Popover, attrs.class],\n \"style\": toCssVariables({\n \"popover-width\": props.width,\n \"popover-min-width\": props.minWidth,\n \"popover-max-width\": props.maxWidth,\n }),\n \"onCloseAutoFocus\": handleCloseAutoFocus,\n \"onPointerDownOutside\": outsidePress.onPointerDownOutside,\n \"onFocusOutside\": outsidePress.onFocusOutside,\n \"data-animate\": shake.value ? \"shake\" : undefined,\n \"data-translucent\": props.translucent ? \"true\" : undefined,\n \"side\": props.side,\n \"sideOffset\": props.sideOffset,\n \"align\": props.align,\n \"alignOffset\": props.alignOffset ?? (props.align === \"center\" ? 0 : -5),\n \"avoidCollisions\": props.avoidCollisions ?? true,\n \"hideWhenDetached\": true,\n \"collisionPadding\": 20,\n \"onOpenAutoFocus\": preventDefaultHandler,\n // Escape is handled by the Escape stack in PopoverContent\n \"onEscapeKeyDown\": preventDefaultHandler,\n \"onKeydown\": handleKeyDown,\n },\n { default: () => slots.default?.(controller) },\n )\n },\n})\n\nconst PopoverContentHoverable = defineComponent({\n name: \"PopoverContentHoverable\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { open, setOpen, triggerRef, contentRef, isPointerInTransitRef, hoverOpenFocusedWithTab } = usePopoverContext()\n const pointerGraceArea = shallowRef<Polygon | null>(null)\n\n const handleRemoveGraceArea = () => {\n pointerGraceArea.value = null\n isPointerInTransitRef.current = false\n }\n\n const handleCreateGraceArea = (event: PointerEvent, hoverTarget: HTMLElement) => {\n const graceArea = createPointerIntentArea(event, hoverTarget)\n pointerGraceArea.value = graceArea\n isPointerInTransitRef.current = true\n }\n\n onBeforeUnmount(handleRemoveGraceArea)\n\n let removeLeaveListeners = () => {}\n onMounted(() => {\n const trigger = triggerRef.value\n const content = contentRef.value\n\n if (!trigger || !content) {\n return\n }\n\n const handleTriggerLeave = (event: PointerEvent) => handleCreateGraceArea(event, content)\n const handleContentLeave = (event: PointerEvent) => handleCreateGraceArea(event, trigger)\n\n trigger.addEventListener(\"pointerleave\", handleTriggerLeave)\n content.addEventListener(\"pointerleave\", handleContentLeave)\n removeLeaveListeners = () => {\n trigger.removeEventListener(\"pointerleave\", handleTriggerLeave)\n content.removeEventListener(\"pointerleave\", handleContentLeave)\n }\n })\n onBeforeUnmount(() => removeLeaveListeners())\n\n watch(pointerGraceArea, (graceArea, _, onCleanup) => {\n if (!graceArea) {\n return\n }\n\n const handleTrackPointerGrace = (event: PointerEvent) => {\n const trigger = triggerRef.value\n const content = contentRef.value\n const target = event.target as HTMLElement\n const pointerPosition = { x: event.clientX, y: event.clientY }\n const hasEnteredTarget = trigger?.contains(target) || content?.contains(target)\n const isPointerOutsideGraceArea = !isPointInPolygon(pointerPosition, graceArea)\n // Stop considering grace areas when the pointer runs into other control triggers\n const targetHasPopup = target.hasAttribute(\"aria-haspopup\")\n\n if (hasEnteredTarget) {\n handleRemoveGraceArea()\n } else if (isPointerOutsideGraceArea || targetHasPopup) {\n handleRemoveGraceArea()\n setOpen(false)\n }\n }\n document.addEventListener(\"pointermove\", handleTrackPointerGrace)\n onCleanup(() => document.removeEventListener(\"pointermove\", handleTrackPointerGrace))\n })\n\n // Hoverable doesn't place focus in the popover by default.\n // If it is open and Tab is pressed, focus the first focusable element and\n // remember to restore focus to the trigger on close.\n const handleKeyDown = (evt: KeyboardEvent) => {\n // Closed and still leaving: Tab belongs to the page again\n if (!open.value || !contentRef.value) {\n return\n }\n\n // Only assume forward tab is attempting to move into the popup\n if (evt.key === \"Tab\" && !evt.shiftKey) {\n const [firstFocusable] = focusableElements(contentRef.value)\n if (firstFocusable) {\n evt.preventDefault()\n firstFocusable.focus()\n hoverOpenFocusedWithTab.current = true\n document.removeEventListener(\"keydown\", handleKeyDown)\n }\n }\n }\n onMounted(() => document.addEventListener(\"keydown\", handleKeyDown))\n onBeforeUnmount(() => document.removeEventListener(\"keydown\", handleKeyDown))\n\n return () => h(PopoverContentImpl, { ...props, ...dataAttributes(attrs), class: attrs.class }, slots)\n },\n})\n\n/**\n * The floating panel. `class` lands on the panel. The default slot receives\n * `{ close, shake }`, the same functions `usePopoverController()` returns.\n */\nexport const PopoverContent = defineComponent({\n name: \"PopoverContent\",\n inheritAttrs: false,\n props: contentProps,\n setup(props, { slots, attrs }) {\n const { open, showOnHover, setOpen } = usePopoverContext()\n\n useEscCloseStack(open, () => {\n setOpen(false)\n })\n\n return () =>\n h(RekaPopoverPortal, null, {\n default: () => [\n h(\n TransitionGroup,\n { class: s.Transition, ...overlayTiming, overlay: true },\n {\n default: () => [\n open.value\n ? h(\n showOnHover.value ? PopoverContentHoverable : PopoverContentImpl,\n {\n key: showOnHover.value ? \"popover-hover\" : \"popover\",\n ...(props as ContentProps),\n ...dataAttributes(attrs),\n class: attrs.class,\n },\n slots,\n )\n : createCommentVNode(),\n ],\n },\n ),\n ],\n })\n },\n})\n\n/** Popover root. Uncontrolled by default; bind `v-model:open` to control it. */\n// Typed explicitly so the published declaration refers to the parts instead of\n// expanding them (an expanded component type fails consumers' type checks)\nexport const Popover: typeof PopoverComponent & {\n Trigger: typeof PopoverTrigger\n Content: typeof PopoverContent\n} = Object.assign(PopoverComponent, {\n Trigger: PopoverTrigger,\n Content: PopoverContent,\n})\n\nexport type PopoverProps = InstanceType<typeof PopoverComponent>[\"$props\"]\nexport type PopoverContentProps = InstanceType<typeof PopoverContent>[\"$props\"]\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
|
-
import { cloneVNode, computed, createCommentVNode, defineComponent, h, inject, markRaw, onBeforeUnmount, onBeforeUpdate, onMounted, provide, ref, shallowRef, toRaw, useId, watch, } from "vue";
|
|
2
|
+
import { cloneVNode, computed, createCommentVNode, defineComponent, h, inject, markRaw, nextTick, onBeforeUnmount, onBeforeUpdate, onMounted, provide, ref, shallowRef, toRaw, useId, watch, } from "vue";
|
|
3
3
|
import { PopoverAnchor as RekaPopoverAnchor, PopoverContent as RekaPopoverContent, PopoverPortal as RekaPopoverPortal, PopoverRoot as RekaPopoverRoot, injectPopoverRootContext, useId as useRekaId, } from "reka-ui";
|
|
4
4
|
import { useEscCloseStack } from "../../composables/useEscCloseStack.js";
|
|
5
|
-
import { preventDefaultHandler, toCssVariables, waitForAnimationFrame } from "../../lib/helpers.js";
|
|
5
|
+
import { preventDefaultHandler, pressHandlers, toCssVariables, waitForAnimationFrame } from "../../lib/helpers.js";
|
|
6
6
|
import { Check, Info, Search } from "../Icon/index.js";
|
|
7
7
|
import { Input } from "../Input/index.js";
|
|
8
8
|
import { useDeferredPointerDownOutside } from "../Popover/deferredPointerDownOutside.js";
|
|
@@ -10,7 +10,9 @@ import { SelectControl } from "../SelectControl/index.js";
|
|
|
10
10
|
import { Tooltip } from "../Tooltip/index.js";
|
|
11
11
|
import { withRadixVariableNames } from "../Tooltip/Tooltip.js";
|
|
12
12
|
import { composeEventHandlers, firstElementChild, mergeSlotProps } from "../Tooltip/slot.js";
|
|
13
|
+
import getDisableAnimations from "../Transition/getDisableAnimations.js";
|
|
13
14
|
import { TransitionGroup } from "../Transition/index.js";
|
|
15
|
+
import { overlayTiming } from "../Transition/shared.js";
|
|
14
16
|
import s from "@plexui/styles/components/Select/Select.module.css";
|
|
15
17
|
const selectProps = {
|
|
16
18
|
/** Options or option groups. Should be a stable reference. */
|
|
@@ -31,6 +33,8 @@ const selectProps = {
|
|
|
31
33
|
placeholder: { type: String, default: "Select..." },
|
|
32
34
|
/** Placeholder text while loading. @default "Loading..." */
|
|
33
35
|
loadingPlaceholder: { type: String, default: "Loading..." },
|
|
36
|
+
/** Text of a `multiple` trigger when every option is selected. @default "All selected" */
|
|
37
|
+
allSelectedLabel: { type: String, default: "All selected" },
|
|
34
38
|
/** Displays loading indicator on top of button contents. @default false */
|
|
35
39
|
loading: { type: Boolean, default: false },
|
|
36
40
|
/** Style variant for the select trigger. @default "outline" */
|
|
@@ -119,8 +123,8 @@ const useCustomSelectMenuContext = () => {
|
|
|
119
123
|
return context;
|
|
120
124
|
};
|
|
121
125
|
const renderContent = (content) => typeof content === "function" ? content() : content;
|
|
122
|
-
const defaultMultiTriggerView = ({ values, selectedAll }) => selectedAll
|
|
123
|
-
?
|
|
126
|
+
const defaultMultiTriggerView = ({ values, selectedAll }, allSelectedLabel) => selectedAll
|
|
127
|
+
? allSelectedLabel
|
|
124
128
|
: values.length === 0
|
|
125
129
|
? // NOTE: Zero length is impossible - an empty option with `placeholder` is always returned
|
|
126
130
|
"Select..."
|
|
@@ -279,7 +283,7 @@ const SelectTrigger = defineComponent({
|
|
|
279
283
|
if (props.TriggerView)
|
|
280
284
|
return h(props.TriggerView, viewProps);
|
|
281
285
|
return multiple
|
|
282
|
-
? defaultMultiTriggerView(viewProps)
|
|
286
|
+
? defaultMultiTriggerView(viewProps, props.allSelectedLabel)
|
|
283
287
|
: viewProps.label;
|
|
284
288
|
};
|
|
285
289
|
return h(SelectControl, {
|
|
@@ -302,6 +306,7 @@ const SelectTrigger = defineComponent({
|
|
|
302
306
|
"dropdownIconType": props.dropdownIconType,
|
|
303
307
|
"onClearClick": props.clearable ? handleClearClick : undefined,
|
|
304
308
|
"onInteract": ownProps.onOpenChange,
|
|
309
|
+
"interactOnEnter": true,
|
|
305
310
|
"onKeydown": handleKeyDown,
|
|
306
311
|
// pass along props from the popover trigger
|
|
307
312
|
...attrs,
|
|
@@ -322,6 +327,12 @@ const SelectTrigger = defineComponent({
|
|
|
322
327
|
"onFocus": () => {
|
|
323
328
|
triggerEl.value?.focus();
|
|
324
329
|
},
|
|
330
|
+
// A label's `for` lands here, and its click opens the list like a press on the trigger
|
|
331
|
+
"onClick": () => {
|
|
332
|
+
if (!loading) {
|
|
333
|
+
ownProps.onOpenChange?.(true);
|
|
334
|
+
}
|
|
335
|
+
},
|
|
325
336
|
// don't make this readOnly because that prevents the value from being required
|
|
326
337
|
"required": props.required,
|
|
327
338
|
"class": s.FormInput,
|
|
@@ -473,13 +484,14 @@ const CustomSelect = defineComponent({
|
|
|
473
484
|
return h(RekaPopoverRoot, { "open": open.value, "onUpdate:open": handleRootOpenChange, "modal": false }, {
|
|
474
485
|
default: () => [
|
|
475
486
|
h(SelectPopoverTrigger, null, { default: renderTrigger }),
|
|
476
|
-
// React replaces the menu's wrapper when it
|
|
477
|
-
// TransitionGroup), so React DOM appends the
|
|
478
|
-
// A Teleport keeps its place in <body>: a new
|
|
479
|
-
// the wrapper to the end the same way.
|
|
480
|
-
|
|
487
|
+
// Without animations React replaces the menu's wrapper when it
|
|
488
|
+
// opens or closes (see TransitionGroup), so React DOM appends the
|
|
489
|
+
// new one to <body>. A Teleport keeps its place in <body>: a new
|
|
490
|
+
// one per state moves the wrapper to the end the same way. With
|
|
491
|
+
// animations the group has to stay, to run the exit.
|
|
492
|
+
h(RekaPopoverPortal, { key: !getDisableAnimations() || open.value ? "open" : "closed", forceMount: mounted.value }, {
|
|
481
493
|
default: () => [
|
|
482
|
-
h(TransitionGroup, { class: s.Menu,
|
|
494
|
+
h(TransitionGroup, { class: s.Menu, ...overlayTiming, overlay: true }, { default: () => [open.value ? h(SelectPopoverContent, { key: "dropdown" }) : createCommentVNode()] }),
|
|
483
495
|
],
|
|
484
496
|
}),
|
|
485
497
|
],
|
|
@@ -498,7 +510,7 @@ const SelectContentElement = markRaw(defineComponent({
|
|
|
498
510
|
selectContentRef.value = el ?? null;
|
|
499
511
|
};
|
|
500
512
|
return () => {
|
|
501
|
-
const { "dir": _dir, "aria-labelledby": _labelledBy, style, ...rest } = attrs;
|
|
513
|
+
const { "dir": _dir, "aria-labelledby": _labelledBy, "forceMount": _forceMount, style, ...rest } = attrs;
|
|
502
514
|
return h("div", { ...rest, style: withRadixVariableNames(style, "popover"), ref: setContentRef }, slots.default?.());
|
|
503
515
|
};
|
|
504
516
|
},
|
|
@@ -516,6 +528,7 @@ const SelectPopoverContent = defineComponent({
|
|
|
516
528
|
handleRootOpenChange(false);
|
|
517
529
|
});
|
|
518
530
|
return () => h(RekaPopoverContent, {
|
|
531
|
+
forceMount: true,
|
|
519
532
|
as: SelectContentElement,
|
|
520
533
|
class: s.MenuList,
|
|
521
534
|
"data-pill": props.pill ? "" : undefined,
|
|
@@ -761,8 +774,11 @@ const CustomSelectMenu = defineComponent({
|
|
|
761
774
|
// Send initial focus to the search input, or the list without one (the
|
|
762
775
|
// menu container when there are no options), to capture key events
|
|
763
776
|
const autoFocusTarget = searchInputRef.value || listRef.value || menuRef.value;
|
|
777
|
+
// A tick later: until Reka's focus scope here has registered, a Dialog
|
|
778
|
+
// around the menu sends the focus straight back, and the menu takes that
|
|
779
|
+
// for focus moving outside and closes. No key can come between.
|
|
764
780
|
if (autoFocusTarget)
|
|
765
|
-
focusMounted(autoFocusTarget);
|
|
781
|
+
nextTick(() => focusMounted(autoFocusTarget));
|
|
766
782
|
});
|
|
767
783
|
// On search behavior (React's layout effect on `filteredOptions`, skipped on mount)
|
|
768
784
|
watch(filteredOptions, (nextFilteredOptions) => {
|
|
@@ -826,6 +842,8 @@ const CustomSelectSearch = defineComponent({
|
|
|
826
842
|
h(Input, {
|
|
827
843
|
"value": props.value,
|
|
828
844
|
"size": selectProps.searchSize,
|
|
845
|
+
"variant": "ghost",
|
|
846
|
+
"pill": true,
|
|
829
847
|
"placeholder": selectProps.searchPlaceholder,
|
|
830
848
|
"aria-label": selectProps.searchAriaLabel,
|
|
831
849
|
"onUpdate:value": (next) => emit("update:value", next),
|
|
@@ -1083,7 +1101,7 @@ const CustomSelectOption = defineComponent({
|
|
|
1083
1101
|
// Internal attribute for selecting DOM nodes
|
|
1084
1102
|
[INTERNAL_DOM_SELECTION_DATA_ATTR]: value,
|
|
1085
1103
|
// Allow options to behave like a native select, when you can open and select an item in a single click
|
|
1086
|
-
|
|
1104
|
+
...(disabled ? {} : pressHandlers(handlePointerUp)),
|
|
1087
1105
|
// Pointer move prevents contention between keyboard presses and a still mouse
|
|
1088
1106
|
"onPointermove": disabled ? undefined : handlePointerMove,
|
|
1089
1107
|
"onPointerleave": disabled ? undefined : handlePointerLeave,
|
|
@@ -1176,7 +1194,7 @@ const CustomSelectAction = defineComponent({
|
|
|
1176
1194
|
};
|
|
1177
1195
|
return () => {
|
|
1178
1196
|
const { label, Icon, className } = props.action;
|
|
1179
|
-
return h("div", { class: s.Action,
|
|
1197
|
+
return h("div", { class: s.Action, ...pressHandlers(handlePointerUp), onKeydown: handleKeyDown, tabindex: 0 }, [
|
|
1180
1198
|
h("div", { class: clsx(s.ActionInner, className) }, [Icon ? h(Icon, { role: "presentation" }) : null, label]),
|
|
1181
1199
|
]);
|
|
1182
1200
|
};
|