@plexui/vue 0.22.0 → 0.23.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.
Files changed (79) hide show
  1. package/dist/es/components/Alert/Alert.js +16 -4
  2. package/dist/es/components/Alert/Alert.js.map +1 -1
  3. package/dist/es/components/ColorPicker/ColorPicker.js +13 -9
  4. package/dist/es/components/ColorPicker/ColorPicker.js.map +1 -1
  5. package/dist/es/components/ColorPicker/ColorWell.js +5 -3
  6. package/dist/es/components/ColorPicker/ColorWell.js.map +1 -1
  7. package/dist/es/components/ColorPicker/shared.js +5 -4
  8. package/dist/es/components/ColorPicker/shared.js.map +1 -1
  9. package/dist/es/components/ContextMenu/ContextMenu.js +9 -9
  10. package/dist/es/components/ContextMenu/ContextMenu.js.map +1 -1
  11. package/dist/es/components/ContextMenu/shared.js +25 -5
  12. package/dist/es/components/ContextMenu/shared.js.map +1 -1
  13. package/dist/es/components/DatePicker/DatePicker.js +3 -3
  14. package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
  15. package/dist/es/components/DatePicker/useCalendarCollisionPadding.js +25 -0
  16. package/dist/es/components/DatePicker/useCalendarCollisionPadding.js.map +1 -0
  17. package/dist/es/components/DateRangePicker/DateRangePicker.js +3 -3
  18. package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
  19. package/dist/es/components/Dialog/Dialog.js +2 -2
  20. package/dist/es/components/Dialog/Dialog.js.map +1 -1
  21. package/dist/es/components/Input/Input.js +3 -0
  22. package/dist/es/components/Input/Input.js.map +1 -1
  23. package/dist/es/components/Menu/Menu.js +10 -1
  24. package/dist/es/components/Menu/Menu.js.map +1 -1
  25. package/dist/es/components/PhoneLayout/PhoneLayout.js +9 -1
  26. package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -1
  27. package/dist/es/components/Popover/Popover.js +2 -2
  28. package/dist/es/components/Popover/Popover.js.map +1 -1
  29. package/dist/es/components/ProgressSteps/ProgressSteps.js +7 -3
  30. package/dist/es/components/ProgressSteps/ProgressSteps.js.map +1 -1
  31. package/dist/es/components/ProgressSteps/index.js.map +1 -1
  32. package/dist/es/components/Select/Select.js +178 -32
  33. package/dist/es/components/Select/Select.js.map +1 -1
  34. package/dist/es/components/SelectControl/SelectControl.js +3 -1
  35. package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
  36. package/dist/es/components/Slider/Slider.js +24 -11
  37. package/dist/es/components/Slider/Slider.js.map +1 -1
  38. package/dist/es/components/Slider/sliderPrimitive.js +5 -2
  39. package/dist/es/components/Slider/sliderPrimitive.js.map +1 -1
  40. package/dist/es/components/Sortable/Sortable.js +1 -1
  41. package/dist/es/components/Sortable/Sortable.js.map +1 -1
  42. package/dist/es/components/StatCard/index.js +4 -1
  43. package/dist/es/components/StatCard/index.js.map +1 -1
  44. package/dist/es/components/{StatCard/StatCard.js → StatsCard/StatsCard.js} +32 -27
  45. package/dist/es/components/StatsCard/StatsCard.js.map +1 -0
  46. package/dist/es/components/StatsCard/index.js +2 -0
  47. package/dist/es/components/StatsCard/index.js.map +1 -0
  48. package/dist/es/components/SwipeActions/SwipeActions.js +32 -5
  49. package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -1
  50. package/dist/es/components/TabBar/TabBar.js +52 -21
  51. package/dist/es/components/TabBar/TabBar.js.map +1 -1
  52. package/dist/es/components/Tabs/Tabs.js +229 -6
  53. package/dist/es/components/Tabs/Tabs.js.map +1 -1
  54. package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
  55. package/dist/es/lib/menuTriggerCover.js +40 -3
  56. package/dist/es/lib/menuTriggerCover.js.map +1 -1
  57. package/dist/types/components/ColorPicker/ColorPicker.d.ts +3 -2
  58. package/dist/types/components/ColorPicker/shared.d.ts +5 -4
  59. package/dist/types/components/ContextMenu/shared.d.ts +28 -6
  60. package/dist/types/components/DatePicker/useCalendarCollisionPadding.d.ts +9 -0
  61. package/dist/types/components/Dialog/Dialog.d.ts +2 -2
  62. package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +5 -0
  63. package/dist/types/components/Popover/Popover.d.ts +5 -5
  64. package/dist/types/components/ProgressSteps/ProgressSteps.d.ts +17 -3
  65. package/dist/types/components/ProgressSteps/index.d.ts +1 -1
  66. package/dist/types/components/Select/Select.d.ts +19 -8
  67. package/dist/types/components/StatCard/index.d.ts +9 -1
  68. package/dist/types/components/{StatCard/StatCard.d.ts → StatsCard/StatsCard.d.ts} +19 -19
  69. package/dist/types/components/StatsCard/index.d.ts +1 -0
  70. package/dist/types/components/SwipeActions/SwipeActions.d.ts +4 -4
  71. package/dist/types/components/TabBar/TabBar.d.ts +34 -0
  72. package/dist/types/components/Tabs/Tabs.d.ts +33 -2
  73. package/dist/types/components/Toolbar/Toolbar.d.ts +1 -1
  74. package/dist/types/lib/menuTriggerCover.d.ts +16 -2
  75. package/package.json +2 -2
  76. package/dist/es/components/DatePicker/useCalendarGutter.js +0 -14
  77. package/dist/es/components/DatePicker/useCalendarGutter.js.map +0 -1
  78. package/dist/es/components/StatCard/StatCard.js.map +0 -1
  79. package/dist/types/components/DatePicker/useCalendarGutter.d.ts +0 -2
@@ -23,6 +23,14 @@ export const PhoneLayout = defineComponent({
23
23
  */
24
24
  export const usePhoneLayout = () => {
25
25
  const scope = inject(PHONE_LAYOUT, null);
26
+ const narrow = usePhoneWindow();
27
+ return computed(() => !!scope?.phone.value || narrow.value);
28
+ };
29
+ /**
30
+ * Whether the window is 767px wide or narrower, whatever PhoneLayout is around: for a part portaled out of one, which
31
+ * its phone rules do not reach (a Select's list). The server answers false.
32
+ */
33
+ export const usePhoneWindow = () => {
26
34
  const narrow = ref(false);
27
35
  let query = null;
28
36
  const update = () => { narrow.value = query?.matches ?? false; };
@@ -45,6 +53,6 @@ export const usePhoneLayout = () => {
45
53
  else
46
54
  query.removeListener(update);
47
55
  });
48
- return computed(() => !!scope?.phone.value || narrow.value);
56
+ return narrow;
49
57
  };
50
58
  //# sourceMappingURL=PhoneLayout.js.map
@@ -1 +1 @@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,IAAI,KAAK,GAA0B,IAAI,CAAA;IACvC,MAAM,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,GAAG,KAAK,EAAE,OAAO,IAAI,KAAK,CAAA,CAAC,CAAC,CAAA;IAC/D,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU;YAAE,OAAM;QACnD,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA;QACtC,MAAM,EAAE,CAAA;QACR,uDAAuD;QACvD,IAAI,OAAO,KAAK,CAAC,gBAAgB,KAAK,UAAU;YAAE,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;;YACrF,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAChC,CAAC,CAAC,CAAA;IACF,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,KAAK;YAAE,OAAM;QAClB,IAAI,OAAO,KAAK,CAAC,mBAAmB,KAAK,UAAU;YAAE,KAAK,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;;YAC3F,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;IACnC,CAAC,CAAC,CAAA;IACF,OAAO,QAAQ,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,MAAM,CAAC,KAAK,CAAC,CAAA;AAC7D,CAAC,CAAA","sourcesContent":["import clsx from \"clsx\"\nimport {\n computed,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n type ComputedRef,\n type InjectionKey,\n type Ref,\n} from \"vue\"\nimport s from \"@plexui/styles/components/PhoneLayout/PhoneLayout.module.css\"\nimport { PHONE_MEDIA } from \"../../lib/phoneLayout.js\"\n\nexport type PhoneLayoutValue = {\n /** Where dialogs inside the layout portal to: the PhoneLayout box, or null for the document body. */\n container: Ref<HTMLElement | null>\n /** Whether what is inside is laid out as on a phone: always inside a PhoneLayout, as its `layout` says in a Dialog. */\n phone: Readonly<Ref<boolean>>\n}\n\n/** Provided inside a PhoneLayout and a Dialog. */\nexport const PHONE_LAYOUT: InjectionKey<PhoneLayoutValue> = Symbol(\"PhoneLayout\")\n\n/**\n * Lays out what it holds as on a phone at any window width, such as a phone frame on a desktop page: components take\n * their phone presentation inside it, and a Dialog opened inside it covers the box instead of the window.\n */\nexport const PhoneLayout = defineComponent({\n name: \"PhoneLayout\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const container = shallowRef<HTMLElement | null>(null)\n provide(PHONE_LAYOUT, { container, phone: ref(true) })\n return () =>\n h(\n \"div\",\n { ...attrs, ref: container, class: clsx(s.PhoneLayout, attrs.class as string | undefined), \"data-plex-layout\": \"phone\" },\n slots.default?.(),\n )\n },\n})\n\n/**\n * Whether components here are laid out as on a phone: inside a PhoneLayout (or a Dialog with `layout=\"phone\"`), or\n * in a window 767px wide or narrower. The server answers false outside a PhoneLayout.\n */\nexport const usePhoneLayout = (): ComputedRef<boolean> => {\n const scope = inject(PHONE_LAYOUT, null)\n const narrow = ref(false)\n let query: MediaQueryList | null = null\n const update = () => { narrow.value = query?.matches ?? false }\n onMounted(() => {\n if (typeof window.matchMedia !== \"function\") return\n query = window.matchMedia(PHONE_MEDIA)\n update()\n // Safari before 14 has only the older listener methods\n if (typeof query.addEventListener === \"function\") query.addEventListener(\"change\", update)\n else query.addListener(update)\n })\n onBeforeUnmount(() => {\n if (!query) return\n if (typeof query.removeEventListener === \"function\") query.removeEventListener(\"change\", update)\n else query.removeListener(update)\n })\n return computed(() => !!scope?.phone.value || narrow.value)\n}\n"]}
1
+ {"version":3,"file":"PhoneLayout.js","sourceRoot":"","sources":["../../../../src/components/PhoneLayout/PhoneLayout.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EACL,QAAQ,EACR,eAAe,EACf,CAAC,E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AAiB,EAAE;IAC/C,MAAM,MAAM,GAAG,GAAG,CAAC,KAAK,CAAC,CAAA;IACzB,IAAI,KAAK,GAA0B,IAAI,CAAA;IACvC,MAAM,MAAM,GAAG,GAAG,EAAE,GAAG,MAAM,CAAC,KAAK,GAAG,KAAK,EAAE,OAAO,IAAI,KAAK,CAAA,CAAC,CAAC,CAAA;IAC/D,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,OAAO,MAAM,CAAC,UAAU,KAAK,UAAU;YAAE,OAAM;QACnD,KAAK,GAAG,MAAM,CAAC,UAAU,CAAC,WAAW,CAAC,CAAA;QACtC,MAAM,EAAE,CAAA;QACR,uDAAuD;QACvD,IAAI,OAAO,KAAK,CAAC,gBAAgB,KAAK,UAAU;YAAE,KAAK,CAAC,gBAAgB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;;YACrF,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAA;IAChC,CAAC,CAAC,CAAA;IACF,eAAe,CAAC,GAAG,EAAE;QACnB,IAAI,CAAC,KAAK;YAAE,OAAM;QAClB,IAAI,OAAO,KAAK,CAAC,mBAAmB,KAAK,UAAU;YAAE,KAAK,CAAC,mBAAmB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;;YAC3F,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAA;IACnC,CAAC,CAAC,CAAA;IACF,OAAO,MAAM,CAAA;AACf,CAAC,CAAA","sourcesContent":["import clsx from \"clsx\"\nimport {\n computed,\n defineComponent,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n provide,\n ref,\n shallowRef,\n type ComputedRef,\n type InjectionKey,\n type Ref,\n} from \"vue\"\nimport s from \"@plexui/styles/components/PhoneLayout/PhoneLayout.module.css\"\nimport { PHONE_MEDIA } from \"../../lib/phoneLayout.js\"\n\nexport type PhoneLayoutValue = {\n /** Where dialogs inside the layout portal to: the PhoneLayout box, or null for the document body. */\n container: Ref<HTMLElement | null>\n /** Whether what is inside is laid out as on a phone: always inside a PhoneLayout, as its `layout` says in a Dialog. */\n phone: Readonly<Ref<boolean>>\n}\n\n/** Provided inside a PhoneLayout and a Dialog. */\nexport const PHONE_LAYOUT: InjectionKey<PhoneLayoutValue> = Symbol(\"PhoneLayout\")\n\n/**\n * Lays out what it holds as on a phone at any window width, such as a phone frame on a desktop page: components take\n * their phone presentation inside it, and a Dialog opened inside it covers the box instead of the window.\n */\nexport const PhoneLayout = defineComponent({\n name: \"PhoneLayout\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const container = shallowRef<HTMLElement | null>(null)\n provide(PHONE_LAYOUT, { container, phone: ref(true) })\n return () =>\n h(\n \"div\",\n { ...attrs, ref: container, class: clsx(s.PhoneLayout, attrs.class as string | undefined), \"data-plex-layout\": \"phone\" },\n slots.default?.(),\n )\n },\n})\n\n/**\n * Whether components here are laid out as on a phone: inside a PhoneLayout (or a Dialog with `layout=\"phone\"`), or\n * in a window 767px wide or narrower. The server answers false outside a PhoneLayout.\n */\nexport const usePhoneLayout = (): ComputedRef<boolean> => {\n const scope = inject(PHONE_LAYOUT, null)\n const narrow = usePhoneWindow()\n return computed(() => !!scope?.phone.value || narrow.value)\n}\n\n/**\n * Whether the window is 767px wide or narrower, whatever PhoneLayout is around: for a part portaled out of one, which\n * its phone rules do not reach (a Select's list). The server answers false.\n */\nexport const usePhoneWindow = (): Ref<boolean> => {\n const narrow = ref(false)\n let query: MediaQueryList | null = null\n const update = () => { narrow.value = query?.matches ?? false }\n onMounted(() => {\n if (typeof window.matchMedia !== \"function\") return\n query = window.matchMedia(PHONE_MEDIA)\n update()\n // Safari before 14 has only the older listener methods\n if (typeof query.addEventListener === \"function\") query.addEventListener(\"change\", update)\n else query.addListener(update)\n })\n onBeforeUnmount(() => {\n if (!query) return\n if (typeof query.removeEventListener === \"function\") query.removeEventListener(\"change\", update)\n else query.removeListener(update)\n })\n return narrow\n}\n"]}
@@ -189,8 +189,8 @@ export const PopoverTrigger = defineComponent({
189
189
  const contentProps = {
190
190
  /** Avoids collisions with the viewport and scroll containers. @default true */
191
191
  avoidCollisions: { type: Boolean, default: undefined },
192
- /** Distance from viewport and scroll container boundaries, in pixels. @default 20 */
193
- collisionPadding: { type: Number, default: 20 },
192
+ /** Distance from viewport and scroll container boundaries, in pixels; an object sets it per side, and a side it leaves out gets 0. @default 20 */
193
+ collisionPadding: { type: [Number, Object], default: 20 },
194
194
  /** `width` of the popover; numbers are pixels. @default "auto" */
195
195
  width: [Number, String],
196
196
  /** `min-width` of the popover; numbers are pixels. @default 300 */
@@ -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,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,mBAAmB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5E,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,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAA;AAC9D,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,cAAc,EAAE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zB;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 { provideFieldColumns, provideFieldRow } from \"../../lib/fieldRow.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 { isHoverPointer } from \"../../lib/inputMode.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) => typeof nextState === \"boolean\",\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) => typeof event.type === \"string\",\n click: (event: MouseEvent) => typeof event.type === \"string\",\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 (!isHoverPointer(evt)) {\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 /** Distance from viewport and scroll container boundaries, in pixels. @default 20 */\n collisionPadding: { type: Number, default: 20 },\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 { style, ...rest } = attrs\n delete rest.dir\n delete rest[\"aria-labelledby\"]\n delete rest.forceMount\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 }, () => contentRef.value)\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\": props.collisionPadding,\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 if (!isHoverPointer(event)) return\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 if (!isHoverPointer(event)) return\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 // A popup opened from a Field row is not that row: its own controls keep their usual shape and menus\n provideFieldRow(() => false)\n provideFieldColumns(() => false)\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
+ {"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,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E,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 { provideFieldColumns, provideFieldRow } from \"../../lib/fieldRow.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 { isHoverPointer } from \"../../lib/inputMode.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) => typeof nextState === \"boolean\",\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) => typeof event.type === \"string\",\n click: (event: MouseEvent) => typeof event.type === \"string\",\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 (!isHoverPointer(evt)) {\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 /** Distance from viewport and scroll container boundaries, in pixels; an object sets it per side, and a side it leaves out gets 0. @default 20 */\n collisionPadding: { type: [Number, Object] as PropType<number | Partial<Record<PopoverSide, number>>>, default: 20 },\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 { style, ...rest } = attrs\n delete rest.dir\n delete rest[\"aria-labelledby\"]\n delete rest.forceMount\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 }, () => contentRef.value)\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\": props.collisionPadding,\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 if (!isHoverPointer(event)) return\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 if (!isHoverPointer(event)) return\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 // A popup opened from a Field row is not that row: its own controls keep their usual shape and menus\n provideFieldRow(() => false)\n provideFieldColumns(() => false)\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"]}
@@ -154,12 +154,16 @@ export const ProgressStepsStep = defineComponent({
154
154
  };
155
155
  },
156
156
  });
157
- /** Step title. Like React, only `class` reaches the DOM from attributes. */
157
+ /** Step title. Like React, only `class` reaches the DOM from attributes. `visuallyHidden` hides it from view and keeps
158
+ * it for screen readers, for steps that show their indicators alone; the step then takes no room under its indicator. */
158
159
  export const ProgressStepsTitle = defineComponent({
159
160
  name: "ProgressStepsTitle",
160
161
  inheritAttrs: false,
161
- setup(_props, { slots, attrs }) {
162
- return () => h("div", { class: [s.StepTitle, attrs.class] }, slots.default?.());
162
+ props: {
163
+ visuallyHidden: { type: Boolean, default: false },
164
+ },
165
+ setup(props, { slots, attrs }) {
166
+ return () => h("div", { class: [s.StepTitle, attrs.class], "data-visually-hidden": props.visuallyHidden ? "" : undefined }, slots.default?.());
163
167
  },
164
168
  });
165
169
  /** Step description. Like React, only `class` reaches the DOM from attributes. */
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressSteps.js","sourceRoot":"","sources":["../../../../src/components/ProgressSteps/ProgressSteps.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,UAAU,EACV,eAAe,EACf,eAAe,EACf,CAAC,EACD,MAAM,EACN,OAAO,EACP,OAAO,EACP,UAAU,GAMX,MAAM,KAAK,CAAA;AAEZ,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;A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OAAO,EAAE,EAAE,CAAC;aACtD,CACF,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAIF,4EAA4E;AAC5E,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;IAChD,IAAI,EAAE,oBAAoB;IAC1B,YAAY,EAAE,KAAK;IACnB,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;QAC5B,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IACjF,CAAC;CACF,CAAC,CAAA;AAEF,kFAAkF;AAClF,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC;IACtD,IAAI,EAAE,0BAA0B;IAChC,YAAY,EAAE,KAAK;IACnB,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;QAC5B,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IACvF,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n Comment,\n Fragment,\n cloneVNode,\n createTextVNode,\n defineComponent,\n h,\n inject,\n isVNode,\n provide,\n shallowRef,\n type Component,\n type InjectionKey,\n type PropType,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport type { Sizes } from \"@plexui/styles/types\"\nimport { isDev } from \"../../lib/environment.js\"\nimport { isTransparentFragment } from \"../../lib/renderHelpers.js\"\nimport { CheckMd } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/ProgressSteps/ProgressSteps.module.css\"\n\n// Vue port of packages/ui/src/components/ProgressSteps/ProgressSteps.tsx.\n// Flat exports: `ProgressStepsStep`, `ProgressStepsTitle`,\n// `ProgressStepsDescription` (React's `ProgressSteps.Step`, `.Title`, `.Description`).\n//\n// React counts children with `Children.count` and hands each element its\n// position as `_index` via `cloneElement`. The same is done with the slot\n// vnodes, following React's rules: lists (arrays, the fragment a v-for\n// renders, and the one a forwarded `<slot />` renders, see\n// `isTransparentFragment`) are flattened, an empty `v-if` placeholder counts\n// like React's `{cond && <Step />}` (which is `false`, still a child), and\n// text counts.\n// Template comments are dropped, like JSX comments.\n\ntype Orientation = \"horizontal\" | \"vertical\"\ntype StepState = \"completed\" | \"active\" | \"inactive\"\ntype ConnectorStyle = \"solid\" | \"dashed\"\ntype Variant = \"default\" | \"minimal\"\ntype Color = \"default\" | \"success\"\n\ntype ProgressStepsContextValue = {\n current: () => number\n totalSteps: () => number\n}\n\nconst ProgressStepsContextKey: InjectionKey<ProgressStepsContextValue> = Symbol(\"PlexUIProgressSteps\")\n\nconst useProgressStepsContext = () => {\n const context = inject(ProgressStepsContextKey, null)\n if (!context) {\n throw new Error(\"ProgressSteps components must be wrapped in <ProgressSteps />\")\n }\n return context\n}\n\n// React's `Children.map` slots: `null` stands for an empty child\n// (React's `false` / `null`), which is counted and indexed but not rendered.\nconst toChildSlots = (children: VNodeArrayChildren | undefined): Array<VNode | null> => {\n const result: Array<VNode | null> = []\n for (const child of children ?? []) {\n if (child == null || typeof child === \"boolean\") {\n result.push(null)\n continue\n }\n if (Array.isArray(child)) {\n result.push(...toChildSlots(child))\n continue\n }\n const vnode = isVNode(child) ? child : createTextVNode(String(child))\n if (vnode.type === Comment) {\n // `v-if` with no branch rendered (the compiler writes \"v-if\" in dev\n // builds, \"\" in production): React's `{cond && <Step />}`\n if (vnode.children === \"v-if\" || vnode.children === \"\") result.push(null)\n continue\n }\n if (isTransparentFragment(vnode)) {\n result.push(...toChildSlots(vnode.children as VNodeArrayChildren))\n continue\n }\n result.push(vnode)\n }\n return result\n}\n\n// React's `isValidElement`, minus fragments: React clones them too, but a\n// fragment ignores `_index`, so leaving them as they are renders the same\nconst isElementVNode = (vnode: VNode) => typeof vnode.type !== \"symbol\"\n\nconst ProgressStepsComponent = defineComponent({\n name: \"ProgressSteps\",\n inheritAttrs: false,\n props: {\n /** Current active step (1-indexed, starts from 1) */\n current: { type: Number, required: true },\n /** Total number of steps (required for minimal variant) */\n total: Number,\n /** Visual variant. @default \"default\" */\n variant: { type: String as PropType<Variant>, default: \"default\" },\n /** Color scheme. @default \"default\" */\n color: { type: String as PropType<Color>, default: \"default\" },\n /** Layout orientation. @default \"horizontal\" */\n orientation: { type: String as PropType<Orientation>, default: \"horizontal\" },\n /** Size of step indicators. @default \"md\" */\n size: { type: String as PropType<Sizes<\"sm\" | \"md\" | \"lg\">>, default: \"md\" },\n /** Connector line style. @default \"solid\" */\n connectorStyle: { type: String as PropType<ConnectorStyle>, default: \"solid\" },\n },\n setup(props, { slots, attrs }) {\n let warned = false\n // Written on each render, read by the steps: a step re-renders when the\n // count changes (its `isLast`), like React's context value\n const totalStepsRef = shallowRef(0)\n\n provide(ProgressStepsContextKey, {\n current: () => props.current,\n totalSteps: () => totalStepsRef.value,\n })\n\n return () => {\n const children = props.variant === \"minimal\" ? [] : toChildSlots(slots.default?.())\n const totalSteps = props.variant === \"minimal\" ? (props.total ?? 0) : children.length\n totalStepsRef.value = totalSteps\n\n if (isDev && props.variant === \"minimal\" && (props.total == null || props.total <= 0) && !warned) {\n warned = true\n // eslint-disable-next-line no-console\n console.warn('[ProgressSteps] variant=\"minimal\" requires a positive `total` prop. Received:', props.total)\n }\n\n // Minimal variant: render horizontal bar segments\n if (props.variant === \"minimal\") {\n // A div, not nav: role=\"progressbar\" is not allowed on <nav>\n return h(\n \"div\",\n {\n \"aria-label\": \"Progress\",\n \"role\": \"progressbar\",\n \"aria-valuenow\": props.current,\n \"aria-valuemin\": 1,\n \"aria-valuemax\": totalSteps,\n \"class\": [s.ProgressSteps, s.Minimal, attrs.class],\n \"data-size\": props.size,\n \"data-color\": props.color,\n \"data-variant\": \"minimal\",\n },\n [\n h(\n \"div\",\n { class: s.MinimalList },\n Array.from({ length: totalSteps }, (_, i) =>\n h(\"div\", { \"key\": i, \"class\": s.MinimalSegment, \"data-state\": i < props.current ? \"completed\" : \"upcoming\" }),\n ),\n ),\n ],\n )\n }\n\n return h(\n \"nav\",\n {\n \"aria-label\": \"Progress\",\n \"class\": [s.ProgressSteps, attrs.class],\n \"data-size\": props.size,\n \"data-color\": props.color,\n \"data-variant\": props.variant,\n },\n [\n h(\n \"ol\",\n {\n \"class\": s.List,\n \"data-orientation\": props.orientation,\n \"data-connector\": props.connectorStyle,\n \"data-variant\": props.variant,\n },\n children.map((child, index) =>\n child && isElementVNode(child) ? cloneVNode(child, { _index: index }) : child,\n ),\n ),\n ],\n )\n }\n },\n})\n\ntype ProgressStepsOwnProps = InstanceType<typeof ProgressStepsComponent>[\"$props\"]\n\n/** ProgressSteps props plus `class` (React's `className`). */\nexport type ProgressStepsProps = ProgressStepsOwnProps & { class?: unknown }\n\nexport const ProgressSteps = ProgressStepsComponent as typeof ProgressStepsComponent & {\n new (): { $props: ProgressStepsProps }\n}\n\n/** Icon for a step: a component (e.g. an icon from @plexui/vue), a vnode, or text */\nexport type StepIconProp = string | number | VNode | Component\n\nconst renderIcon = (icon: StepIconProp) =>\n (typeof icon === \"object\" && !isVNode(icon)) || typeof icon === \"function\" ? h(icon as Component) : icon\n\nconst hasContent = (nodes: VNode[] | undefined): nodes is VNode[] =>\n !!nodes?.some((node) => {\n if (node.type === Comment) return false\n if (Array.isArray(node.children) && node.type === Fragment) return hasContent(node.children as VNode[])\n return true\n })\n\n/** A step. Its position comes from <ProgressSteps>, like React's injected `_index`. */\nexport const ProgressStepsStep = defineComponent({\n name: \"ProgressStepsStep\",\n inheritAttrs: false,\n props: {\n /** Custom icon (replaces step number): a component, a vnode or text. The `icon` slot takes precedence. */\n icon: [String, Number, Object, Function] as PropType<StepIconProp>,\n /** @internal - injected by parent */\n _index: { type: Number, default: 0 },\n },\n setup(props, { slots }) {\n const context = useProgressStepsContext()\n\n return () => {\n const index = props._index\n const current = context.current()\n\n const state: StepState = index < current - 1 ? \"completed\" : index === current - 1 ? \"active\" : \"inactive\"\n const isLast = index === context.totalSteps() - 1\n\n const iconSlot = slots.icon?.()\n const icon = hasContent(iconSlot) ? iconSlot : props.icon != null ? renderIcon(props.icon) : index + 1\n\n return h(\n \"li\",\n {\n \"class\": s.Step,\n \"data-state\": state,\n \"aria-current\": state === \"active\" ? \"step\" : undefined,\n },\n [\n h(\"div\", { class: s.StepIndicator }, [state === \"completed\" ? h(CheckMd, { \"data-no-autosize\": true }) : icon]),\n !isLast ? h(\"div\", { class: s.StepConnector }) : null,\n h(\"div\", { class: s.StepContent }, slots.default?.()),\n ],\n )\n }\n },\n})\n\nexport type StepProps = InstanceType<typeof ProgressStepsStep>[\"$props\"]\n\n/** Step title. Like React, only `class` reaches the DOM from attributes. */\nexport const ProgressStepsTitle = defineComponent({\n name: \"ProgressStepsTitle\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n return () => h(\"div\", { class: [s.StepTitle, attrs.class] }, slots.default?.())\n },\n})\n\n/** Step description. Like React, only `class` reaches the DOM from attributes. */\nexport const ProgressStepsDescription = defineComponent({\n name: \"ProgressStepsDescription\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n return () => h(\"div\", { class: [s.StepDescription, attrs.class] }, slots.default?.())\n },\n})\n"]}
1
+ {"version":3,"file":"ProgressSteps.js","sourceRoot":"","sources":["../../../../src/components/ProgressSteps/ProgressSteps.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,QAAQ,EACR,UAAU,EACV,eAAe,EACf,eAAe,EACf,CAAC,EACD,MAAM,EACN,OAAO,EACP,OAAO,EACP,UAAU,GAMX,MAAM,KAAK,CAAA;AAEZ,OAAO,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BA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QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAIF;yHACyH;AACzH,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,CAAC;IAChD,IAAI,EAAE,oBAAoB;IAC1B,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE;QACL,cAAc,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE;KAClD;IACD,KAAK,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;QAC3B,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,sBAAsB,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IAChJ,CAAC;CACF,CAAC,CAAA;AAIF,kFAAkF;AAClF,MAAM,CAAC,MAAM,wBAAwB,GAAG,eAAe,CAAC;IACtD,IAAI,EAAE,0BAA0B;IAChC,YAAY,EAAE,KAAK;IACnB,KAAK,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE;QAC5B,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAA;IACvF,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n Comment,\n Fragment,\n cloneVNode,\n createTextVNode,\n defineComponent,\n h,\n inject,\n isVNode,\n provide,\n shallowRef,\n type Component,\n type InjectionKey,\n type PropType,\n type VNode,\n type VNodeArrayChildren,\n} from \"vue\"\nimport type { Sizes } from \"@plexui/styles/types\"\nimport { isDev } from \"../../lib/environment.js\"\nimport { isTransparentFragment } from \"../../lib/renderHelpers.js\"\nimport { CheckMd } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/ProgressSteps/ProgressSteps.module.css\"\n\n// Vue port of packages/ui/src/components/ProgressSteps/ProgressSteps.tsx.\n// Flat exports: `ProgressStepsStep`, `ProgressStepsTitle`,\n// `ProgressStepsDescription` (React's `ProgressSteps.Step`, `.Title`, `.Description`).\n//\n// React counts children with `Children.count` and hands each element its\n// position as `_index` via `cloneElement`. The same is done with the slot\n// vnodes, following React's rules: lists (arrays, the fragment a v-for\n// renders, and the one a forwarded `<slot />` renders, see\n// `isTransparentFragment`) are flattened, an empty `v-if` placeholder counts\n// like React's `{cond && <Step />}` (which is `false`, still a child), and\n// text counts.\n// Template comments are dropped, like JSX comments.\n\ntype Orientation = \"horizontal\" | \"vertical\"\ntype StepState = \"completed\" | \"active\" | \"inactive\"\ntype ConnectorStyle = \"solid\" | \"dashed\"\ntype Variant = \"default\" | \"minimal\"\ntype Color = \"default\" | \"success\"\n\ntype ProgressStepsContextValue = {\n current: () => number\n totalSteps: () => number\n}\n\nconst ProgressStepsContextKey: InjectionKey<ProgressStepsContextValue> = Symbol(\"PlexUIProgressSteps\")\n\nconst useProgressStepsContext = () => {\n const context = inject(ProgressStepsContextKey, null)\n if (!context) {\n throw new Error(\"ProgressSteps components must be wrapped in <ProgressSteps />\")\n }\n return context\n}\n\n// React's `Children.map` slots: `null` stands for an empty child\n// (React's `false` / `null`), which is counted and indexed but not rendered.\nconst toChildSlots = (children: VNodeArrayChildren | undefined): Array<VNode | null> => {\n const result: Array<VNode | null> = []\n for (const child of children ?? []) {\n if (child == null || typeof child === \"boolean\") {\n result.push(null)\n continue\n }\n if (Array.isArray(child)) {\n result.push(...toChildSlots(child))\n continue\n }\n const vnode = isVNode(child) ? child : createTextVNode(String(child))\n if (vnode.type === Comment) {\n // `v-if` with no branch rendered (the compiler writes \"v-if\" in dev\n // builds, \"\" in production): React's `{cond && <Step />}`\n if (vnode.children === \"v-if\" || vnode.children === \"\") result.push(null)\n continue\n }\n if (isTransparentFragment(vnode)) {\n result.push(...toChildSlots(vnode.children as VNodeArrayChildren))\n continue\n }\n result.push(vnode)\n }\n return result\n}\n\n// React's `isValidElement`, minus fragments: React clones them too, but a\n// fragment ignores `_index`, so leaving them as they are renders the same\nconst isElementVNode = (vnode: VNode) => typeof vnode.type !== \"symbol\"\n\nconst ProgressStepsComponent = defineComponent({\n name: \"ProgressSteps\",\n inheritAttrs: false,\n props: {\n /** Current active step (1-indexed, starts from 1) */\n current: { type: Number, required: true },\n /** Total number of steps (required for minimal variant) */\n total: Number,\n /** Visual variant. @default \"default\" */\n variant: { type: String as PropType<Variant>, default: \"default\" },\n /** Color scheme. @default \"default\" */\n color: { type: String as PropType<Color>, default: \"default\" },\n /** Layout orientation. @default \"horizontal\" */\n orientation: { type: String as PropType<Orientation>, default: \"horizontal\" },\n /** Size of step indicators. @default \"md\" */\n size: { type: String as PropType<Sizes<\"sm\" | \"md\" | \"lg\">>, default: \"md\" },\n /** Connector line style. @default \"solid\" */\n connectorStyle: { type: String as PropType<ConnectorStyle>, default: \"solid\" },\n },\n setup(props, { slots, attrs }) {\n let warned = false\n // Written on each render, read by the steps: a step re-renders when the\n // count changes (its `isLast`), like React's context value\n const totalStepsRef = shallowRef(0)\n\n provide(ProgressStepsContextKey, {\n current: () => props.current,\n totalSteps: () => totalStepsRef.value,\n })\n\n return () => {\n const children = props.variant === \"minimal\" ? [] : toChildSlots(slots.default?.())\n const totalSteps = props.variant === \"minimal\" ? (props.total ?? 0) : children.length\n totalStepsRef.value = totalSteps\n\n if (isDev && props.variant === \"minimal\" && (props.total == null || props.total <= 0) && !warned) {\n warned = true\n // eslint-disable-next-line no-console\n console.warn('[ProgressSteps] variant=\"minimal\" requires a positive `total` prop. Received:', props.total)\n }\n\n // Minimal variant: render horizontal bar segments\n if (props.variant === \"minimal\") {\n // A div, not nav: role=\"progressbar\" is not allowed on <nav>\n return h(\n \"div\",\n {\n \"aria-label\": \"Progress\",\n \"role\": \"progressbar\",\n \"aria-valuenow\": props.current,\n \"aria-valuemin\": 1,\n \"aria-valuemax\": totalSteps,\n \"class\": [s.ProgressSteps, s.Minimal, attrs.class],\n \"data-size\": props.size,\n \"data-color\": props.color,\n \"data-variant\": \"minimal\",\n },\n [\n h(\n \"div\",\n { class: s.MinimalList },\n Array.from({ length: totalSteps }, (_, i) =>\n h(\"div\", { \"key\": i, \"class\": s.MinimalSegment, \"data-state\": i < props.current ? \"completed\" : \"upcoming\" }),\n ),\n ),\n ],\n )\n }\n\n return h(\n \"nav\",\n {\n \"aria-label\": \"Progress\",\n \"class\": [s.ProgressSteps, attrs.class],\n \"data-size\": props.size,\n \"data-color\": props.color,\n \"data-variant\": props.variant,\n },\n [\n h(\n \"ol\",\n {\n \"class\": s.List,\n \"data-orientation\": props.orientation,\n \"data-connector\": props.connectorStyle,\n \"data-variant\": props.variant,\n },\n children.map((child, index) =>\n child && isElementVNode(child) ? cloneVNode(child, { _index: index }) : child,\n ),\n ),\n ],\n )\n }\n },\n})\n\ntype ProgressStepsOwnProps = InstanceType<typeof ProgressStepsComponent>[\"$props\"]\n\n/** ProgressSteps props plus `class` (React's `className`). */\nexport type ProgressStepsProps = ProgressStepsOwnProps & { class?: unknown }\n\nexport const ProgressSteps = ProgressStepsComponent as typeof ProgressStepsComponent & {\n new (): { $props: ProgressStepsProps }\n}\n\n/** Icon for a step: a component (e.g. an icon from @plexui/vue), a vnode, or text */\nexport type StepIconProp = string | number | VNode | Component\n\nconst renderIcon = (icon: StepIconProp) =>\n (typeof icon === \"object\" && !isVNode(icon)) || typeof icon === \"function\" ? h(icon as Component) : icon\n\nconst hasContent = (nodes: VNode[] | undefined): nodes is VNode[] =>\n !!nodes?.some((node) => {\n if (node.type === Comment) return false\n if (Array.isArray(node.children) && node.type === Fragment) return hasContent(node.children as VNode[])\n return true\n })\n\n/** A step. Its position comes from <ProgressSteps>, like React's injected `_index`. */\nexport const ProgressStepsStep = defineComponent({\n name: \"ProgressStepsStep\",\n inheritAttrs: false,\n props: {\n /** Custom icon (replaces step number): a component, a vnode or text. The `icon` slot takes precedence. */\n icon: [String, Number, Object, Function] as PropType<StepIconProp>,\n /** @internal - injected by parent */\n _index: { type: Number, default: 0 },\n },\n setup(props, { slots }) {\n const context = useProgressStepsContext()\n\n return () => {\n const index = props._index\n const current = context.current()\n\n const state: StepState = index < current - 1 ? \"completed\" : index === current - 1 ? \"active\" : \"inactive\"\n const isLast = index === context.totalSteps() - 1\n\n const iconSlot = slots.icon?.()\n const icon = hasContent(iconSlot) ? iconSlot : props.icon != null ? renderIcon(props.icon) : index + 1\n\n return h(\n \"li\",\n {\n \"class\": s.Step,\n \"data-state\": state,\n \"aria-current\": state === \"active\" ? \"step\" : undefined,\n },\n [\n h(\"div\", { class: s.StepIndicator }, [state === \"completed\" ? h(CheckMd, { \"data-no-autosize\": true }) : icon]),\n !isLast ? h(\"div\", { class: s.StepConnector }) : null,\n h(\"div\", { class: s.StepContent }, slots.default?.()),\n ],\n )\n }\n },\n})\n\nexport type StepProps = InstanceType<typeof ProgressStepsStep>[\"$props\"]\n\n/** Step title. Like React, only `class` reaches the DOM from attributes. `visuallyHidden` hides it from view and keeps\n * it for screen readers, for steps that show their indicators alone; the step then takes no room under its indicator. */\nexport const ProgressStepsTitle = defineComponent({\n name: \"ProgressStepsTitle\",\n inheritAttrs: false,\n props: {\n visuallyHidden: { type: Boolean, default: false },\n },\n setup(props, { slots, attrs }) {\n return () => h(\"div\", { class: [s.StepTitle, attrs.class], \"data-visually-hidden\": props.visuallyHidden ? \"\" : undefined }, slots.default?.())\n },\n})\n\nexport type TitleProps = InstanceType<typeof ProgressStepsTitle>[\"$props\"]\n\n/** Step description. Like React, only `class` reaches the DOM from attributes. */\nexport const ProgressStepsDescription = defineComponent({\n name: \"ProgressStepsDescription\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n return () => h(\"div\", { class: [s.StepDescription, attrs.class] }, slots.default?.())\n },\n})\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ProgressSteps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,GAInB,MAAM,oBAAoB,CAAA","sourcesContent":["export {\n ProgressSteps,\n ProgressStepsDescription,\n ProgressStepsStep,\n ProgressStepsTitle,\n type ProgressStepsProps,\n type StepIconProp,\n type StepProps,\n} from \"./ProgressSteps.js\"\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/ProgressSteps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,wBAAwB,EACxB,iBAAiB,EACjB,kBAAkB,GAKnB,MAAM,oBAAoB,CAAA","sourcesContent":["export {\n ProgressSteps,\n ProgressStepsDescription,\n ProgressStepsStep,\n ProgressStepsTitle,\n type ProgressStepsProps,\n type StepIconProp,\n type StepProps,\n type TitleProps,\n} from \"./ProgressSteps.js\"\n"]}