@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
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../../../src/components/DatePicker/DatePicker.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,0DAA0D,CAAA;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAiB,MAAM,KAAK,CAAA;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAuC,MAAM,qBAAqB,CAAA;AAClH,OAAO,EAAE,aAA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QAAQ,EAAE,GAAG;wBACb,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,CAAC,KAAK;wBACxD,IAAI,EAAE,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ;wBAChE,UAAU,EAAE,KAAK,CAAC,UAAU;wBAC5B,KAAK;wBACL,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;qBAChE,EACD,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,CACrC;iBACF;aACF,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAMF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAAA","sourcesContent":["import s from \"@plexui/styles/components/DatePicker/Calendar.module.css\"\nimport { DateTime } from \"luxon\"\nimport { defineComponent, h, provide, toRaw, useId, type PropType } from \"vue\"\nimport type { ControlSize } from \"@plexui/styles/types\"\nimport { useBreakpoint } from \"../../composables/useBreakpoints.js\"\nimport { isAfter } from \"../../lib/dateUtils.js\"\nimport { Calendar } from \"../Icon/index.js\"\nimport { Popover, PopoverContent, PopoverTrigger, type PopoverAlign, type PopoverSide } from \"../Popover/index.js\"\nimport { SelectControl, type DropdownIconType } from \"../SelectControl/index.js\"\nimport { DateCalendar } from \"./Calendar.js\"\nimport { useCalendarGutter } from \"./useCalendarGutter.js\"\nimport { DateContextKey, type DateContextValue } from \"./context.js\"\n\n// Vue port of packages/ui/src/components/DatePicker/DatePicker.tsx.\n// - `value` + `update:value` (`v-model:value`), plus `change` with the same\n// value (React's `onChange`). Like React the picker is controlled: a\n// parent that does not update `value` keeps the shown date.\n// - `aria-label`, `aria-labelledby`, `aria-describedby` and `aria-invalid`\n// reach the trigger, as in React. Other attributes are not passed on\n// (React's DatePicker takes no other props).\n// - DateTime values are read unwrapped (`toRaw`), so a `ref()` holding one\n// (a deep reactive proxy) works like a plain value.\n\nconst DatePickerComponent = defineComponent({\n name: \"DatePicker\",\n inheritAttrs: false,\n props: {\n /** Allow targeting the input for forms and accessibility. */\n id: String,\n \"ariaLabel\": String,\n \"ariaLabelledby\": String,\n \"ariaDescribedby\": String,\n \"ariaInvalid\": {\n type: [Boolean, String] as PropType<boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\">,\n default: undefined,\n },\n /** The selected date value (`v-model:value`). */\n value: { type: Object as PropType<DateTime | null>, default: null },\n /** Defines the earliest selectable date (inclusive). */\n min: Object as PropType<DateTime>,\n /** Defines the latest selectable date (inclusive). */\n max: Object as PropType<DateTime>,\n /** Preferred side; collisions can flip it. On phones, left and right prefer bottom so seven 44px day targets fit. @default \"bottom\" */\n side: { type: String as PropType<PopoverSide>, default: \"bottom\" },\n /** The distance in pixels from the trigger. @default 8 */\n sideOffset: { type: Number, default: 8 },\n /** The preferred alignment against the trigger. @default \"center\" */\n align: { type: String as PropType<PopoverAlign>, default: \"center\" },\n /** An offset in pixels from the \"start\" or \"end\" alignment options. @default 0 */\n alignOffset: Number,\n /** Disables the select visually and from interactions. @default false */\n disabled: { type: Boolean, default: false },\n /** Placeholder text for the select. @default \"Select date...\" */\n placeholder: { type: String, default: \"Select date...\" },\n /** Style variant for the select trigger. @default \"outline\" */\n variant: { type: String as PropType<\"soft\" | \"outline\" | \"ghost\">, default: \"outline\" },\n /** Determines if the select trigger should be a fully rounded pill shape. @default true */\n pill: { type: Boolean, default: true },\n /** Size of the control: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Icon displayed in the far right of the select trigger. @default \"dropdown\" */\n dropdownIconType: String as PropType<DropdownIconType>,\n /** Custom class applied to the select trigger */\n triggerClassName: String,\n /** Display calendar icon at the start of the trigger. @default true */\n triggerShowIcon: { type: Boolean, default: true },\n /** Format of dates displayed in the trigger. @default \"MM/dd/yy\" (\"MM/dd/yy HH:mm\" with `showTime` and no `triggerTimeFormat`) */\n triggerDateFormat: String,\n /**\n * With `showTime`, the format of the time shown after the date in the trigger. The date and the time are\n * then two parts: in a row of a `FieldGroup` on a phone, the two capsules of iOS's compact date and time.\n */\n triggerTimeFormat: String,\n /** Display a clear action that allows the select to be unset. @default false */\n clearable: { type: Boolean, default: false },\n /** Extends select to 100% of available width. @default false */\n block: { type: Boolean, default: false },\n /** Calendar header: arrow navigation (`\"buttons\"`) or month and year dropdowns. @default \"buttons\" */\n captionLayout: { type: String as PropType<\"buttons\" | \"dropdown\">, default: \"buttons\" },\n /** Show time input below the calendar for combined date and time selection. @default false */\n showTime: { type: Boolean, default: false },\n /** Range of selectable years when `captionLayout` is `\"dropdown\"`. @default [currentYear - 120, currentYear] */\n yearRange: Array as unknown as PropType<[number, number]>,\n },\n emits: {\n \"update:value\": (nextValue: DateTime | null) => nextValue === null || DateTime.isDateTime(nextValue),\n \"change\": (nextValue: DateTime | null) => nextValue === null || DateTime.isDateTime(nextValue),\n },\n setup(props, { emit }) {\n const wide = useBreakpoint(\"md\")\n const calendarGutter = useCalendarGutter()\n const unwrap = <T>(value: T): T => (value ? toRaw(value) : value)\n\n const onChange = (nextValue: DateTime | null) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const store: DateContextValue = {\n get value() {\n return unwrap(props.value) ?? null\n },\n get min() {\n return unwrap(props.min)\n },\n get max() {\n return unwrap(props.max)\n },\n get disabled() {\n return props.disabled\n },\n get captionLayout() {\n return props.captionLayout\n },\n get showTime() {\n return props.showTime\n },\n get yearRange() {\n return props.yearRange\n },\n onChange,\n }\n provide(DateContextKey, store)\n\n const handleClearClick = () => {\n onChange(null)\n }\n\n // The value text needs an id for aria-labelledby, also when `id` is not set\n const generatedId = useId()\n\n return () => {\n const { id, ariaLabelledby, align, placeholder } = props\n const value = store.value\n const { min, max } = store\n\n // min and max are inclusive, so equal bounds allow one date\n if (min && max && isAfter(min, max)) {\n throw new Error(\"DatePicker error: `min` date must not be after the `max` date\")\n }\n\n const valueId = `${id ?? generatedId}-value`\n\n const timeFormat = props.showTime ? props.triggerTimeFormat : undefined\n const triggerDateFormat = props.triggerDateFormat ?? (props.showTime && !timeFormat ? \"MM/dd/yy HH:mm\" : \"MM/dd/yy\")\n // With a time format the date and the time are two parts, apart by a space; a phone row draws each as a capsule\n const text = !value\n ? placeholder\n : timeFormat\n ? h(\"span\", { \"data-date-parts\": \"\" }, [\n h(\"span\", { \"data-date-part\": \"date\" }, value.toFormat(triggerDateFormat)),\n \" \",\n h(\"span\", { \"data-date-part\": \"time\" }, value.toFormat(timeFormat)),\n ])\n : value.toFormat(triggerDateFormat)\n\n return h(Popover, null, {\n default: () => [\n h(PopoverTrigger, null, {\n default: () => [\n h(\n SelectControl,\n {\n \"id\": id,\n \"aria-label\": props.ariaLabel,\n \"aria-labelledby\": ariaLabelledby ? `${ariaLabelledby} ${valueId}` : undefined,\n \"aria-describedby\": props.ariaDescribedby,\n \"aria-invalid\": props.ariaInvalid,\n \"class\": props.triggerClassName,\n \"data-date-picker\": \"\",\n \"selected\": !!value,\n \"variant\": props.variant,\n \"pill\": props.pill,\n \"block\": props.block,\n \"size\": props.size,\n \"disabled\": props.disabled,\n \"interactOnEnter\": true,\n \"StartIcon\": props.triggerShowIcon ? Calendar : undefined,\n \"dropdownIconType\": props.dropdownIconType,\n \"onClearClick\": props.clearable ? handleClearClick : undefined,\n },\n { default: () => [ariaLabelledby ? h(\"span\", { id: valueId }, text) : text] },\n ),\n ],\n }),\n h(\n PopoverContent,\n {\n class: s.Popover,\n minWidth: 230,\n collisionPadding: wide.value ? 20 : calendarGutter.value,\n side: wide.value || props.side === \"top\" ? props.side : \"bottom\",\n sideOffset: props.sideOffset,\n align,\n alignOffset: props.alignOffset ?? (align === \"center\" ? 0 : -5),\n },\n { default: () => [h(DateCalendar)] },\n ),\n ],\n })\n }\n },\n})\n\ntype DatePickerOwnProps = InstanceType<typeof DatePickerComponent>[\"$props\"]\n\nexport type DatePickerProps = DatePickerOwnProps\n\n/**\n * A date (and optionally time) picker: a SelectControl trigger opening a\n * calendar in a popover. Bind the date (a luxon `DateTime`) with\n * `v-model:value`.\n */\nexport const DatePicker = DatePickerComponent\n"]}
1
+ {"version":3,"file":"DatePicker.js","sourceRoot":"","sources":["../../../../src/components/DatePicker/DatePicker.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,0DAA0D,CAAA;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAiB,MAAM,KAAK,CAAA;AAE9E,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAuC,MAAM,qBAAqB,CAAA;AAClH,OAAO,EAAE,aAAa,EAAyB,MAAM,2BAA2B,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAC5C,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAA;AAC9E,OAAO,EAAE,cAAc,EAAyB,MAAM,cAAc,CAAA;AAEpE,oEAAoE;AACpE,4EAA4E;AAC5E,uEAAuE;AACvE,8DAA8D;AAC9D,2EAA2E;AAC3E,uEAAuE;AACvE,+CAA+C;AAC/C,2EAA2E;AAC3E,sDAAsD;AAEtD,MAAM,mBAAmB,GAAG,eAAe,CAAC;IAC1C,IAAI,EAAE,YAAY;IAClB,YAAY,EAAE,KAAK;IACnB,KAAK,EAAE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AAC,CAAC;qBAChE,EACD,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,EAAE,CACrC;iBACF;aACF,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAMF;;;;GAIG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,mBAAmB,CAAA","sourcesContent":["import s from \"@plexui/styles/components/DatePicker/Calendar.module.css\"\nimport { DateTime } from \"luxon\"\nimport { defineComponent, h, provide, toRaw, useId, type PropType } from \"vue\"\nimport type { ControlSize } from \"@plexui/styles/types\"\nimport { useBreakpoint } from \"../../composables/useBreakpoints.js\"\nimport { isAfter } from \"../../lib/dateUtils.js\"\nimport { Calendar } from \"../Icon/index.js\"\nimport { Popover, PopoverContent, PopoverTrigger, type PopoverAlign, type PopoverSide } from \"../Popover/index.js\"\nimport { SelectControl, type DropdownIconType } from \"../SelectControl/index.js\"\nimport { DateCalendar } from \"./Calendar.js\"\nimport { useCalendarCollisionPadding } from \"./useCalendarCollisionPadding.js\"\nimport { DateContextKey, type DateContextValue } from \"./context.js\"\n\n// Vue port of packages/ui/src/components/DatePicker/DatePicker.tsx.\n// - `value` + `update:value` (`v-model:value`), plus `change` with the same\n// value (React's `onChange`). Like React the picker is controlled: a\n// parent that does not update `value` keeps the shown date.\n// - `aria-label`, `aria-labelledby`, `aria-describedby` and `aria-invalid`\n// reach the trigger, as in React. Other attributes are not passed on\n// (React's DatePicker takes no other props).\n// - DateTime values are read unwrapped (`toRaw`), so a `ref()` holding one\n// (a deep reactive proxy) works like a plain value.\n\nconst DatePickerComponent = defineComponent({\n name: \"DatePicker\",\n inheritAttrs: false,\n props: {\n /** Allow targeting the input for forms and accessibility. */\n id: String,\n \"ariaLabel\": String,\n \"ariaLabelledby\": String,\n \"ariaDescribedby\": String,\n \"ariaInvalid\": {\n type: [Boolean, String] as PropType<boolean | \"true\" | \"false\" | \"grammar\" | \"spelling\">,\n default: undefined,\n },\n /** The selected date value (`v-model:value`). */\n value: { type: Object as PropType<DateTime | null>, default: null },\n /** Defines the earliest selectable date (inclusive). */\n min: Object as PropType<DateTime>,\n /** Defines the latest selectable date (inclusive). */\n max: Object as PropType<DateTime>,\n /** Preferred side; collisions can flip it. On phones, left and right prefer bottom so seven 44px day targets fit. @default \"bottom\" */\n side: { type: String as PropType<PopoverSide>, default: \"bottom\" },\n /** The distance in pixels from the trigger. @default 8 */\n sideOffset: { type: Number, default: 8 },\n /** The preferred alignment against the trigger. @default \"center\" */\n align: { type: String as PropType<PopoverAlign>, default: \"center\" },\n /** An offset in pixels from the \"start\" or \"end\" alignment options. @default 0 */\n alignOffset: Number,\n /** Disables the select visually and from interactions. @default false */\n disabled: { type: Boolean, default: false },\n /** Placeholder text for the select. @default \"Select date...\" */\n placeholder: { type: String, default: \"Select date...\" },\n /** Style variant for the select trigger. @default \"outline\" */\n variant: { type: String as PropType<\"soft\" | \"outline\" | \"ghost\">, default: \"outline\" },\n /** Determines if the select trigger should be a fully rounded pill shape. @default true */\n pill: { type: Boolean, default: true },\n /** Size of the control: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Icon displayed in the far right of the select trigger. @default \"dropdown\" */\n dropdownIconType: String as PropType<DropdownIconType>,\n /** Custom class applied to the select trigger */\n triggerClassName: String,\n /** Display calendar icon at the start of the trigger. @default true */\n triggerShowIcon: { type: Boolean, default: true },\n /** Format of dates displayed in the trigger. @default \"MM/dd/yy\" (\"MM/dd/yy HH:mm\" with `showTime` and no `triggerTimeFormat`) */\n triggerDateFormat: String,\n /**\n * With `showTime`, the format of the time shown after the date in the trigger. The date and the time are\n * then two parts: in a row of a `FieldGroup` on a phone, the two capsules of iOS's compact date and time.\n */\n triggerTimeFormat: String,\n /** Display a clear action that allows the select to be unset. @default false */\n clearable: { type: Boolean, default: false },\n /** Extends select to 100% of available width. @default false */\n block: { type: Boolean, default: false },\n /** Calendar header: arrow navigation (`\"buttons\"`) or month and year dropdowns. @default \"buttons\" */\n captionLayout: { type: String as PropType<\"buttons\" | \"dropdown\">, default: \"buttons\" },\n /** Show time input below the calendar for combined date and time selection. @default false */\n showTime: { type: Boolean, default: false },\n /** Range of selectable years when `captionLayout` is `\"dropdown\"`. @default [currentYear - 120, currentYear] */\n yearRange: Array as unknown as PropType<[number, number]>,\n },\n emits: {\n \"update:value\": (nextValue: DateTime | null) => nextValue === null || DateTime.isDateTime(nextValue),\n \"change\": (nextValue: DateTime | null) => nextValue === null || DateTime.isDateTime(nextValue),\n },\n setup(props, { emit }) {\n const wide = useBreakpoint(\"md\")\n const calendarCollisionPadding = useCalendarCollisionPadding()\n const unwrap = <T>(value: T): T => (value ? toRaw(value) : value)\n\n const onChange = (nextValue: DateTime | null) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue)\n }\n\n const store: DateContextValue = {\n get value() {\n return unwrap(props.value) ?? null\n },\n get min() {\n return unwrap(props.min)\n },\n get max() {\n return unwrap(props.max)\n },\n get disabled() {\n return props.disabled\n },\n get captionLayout() {\n return props.captionLayout\n },\n get showTime() {\n return props.showTime\n },\n get yearRange() {\n return props.yearRange\n },\n onChange,\n }\n provide(DateContextKey, store)\n\n const handleClearClick = () => {\n onChange(null)\n }\n\n // The value text needs an id for aria-labelledby, also when `id` is not set\n const generatedId = useId()\n\n return () => {\n const { id, ariaLabelledby, align, placeholder } = props\n const value = store.value\n const { min, max } = store\n\n // min and max are inclusive, so equal bounds allow one date\n if (min && max && isAfter(min, max)) {\n throw new Error(\"DatePicker error: `min` date must not be after the `max` date\")\n }\n\n const valueId = `${id ?? generatedId}-value`\n\n const timeFormat = props.showTime ? props.triggerTimeFormat : undefined\n const triggerDateFormat = props.triggerDateFormat ?? (props.showTime && !timeFormat ? \"MM/dd/yy HH:mm\" : \"MM/dd/yy\")\n // With a time format the date and the time are two parts, apart by a space; a phone row draws each as a capsule\n const text = !value\n ? placeholder\n : timeFormat\n ? h(\"span\", { \"data-date-parts\": \"\" }, [\n h(\"span\", { \"data-date-part\": \"date\" }, value.toFormat(triggerDateFormat)),\n \" \",\n h(\"span\", { \"data-date-part\": \"time\" }, value.toFormat(timeFormat)),\n ])\n : value.toFormat(triggerDateFormat)\n\n return h(Popover, null, {\n default: () => [\n h(PopoverTrigger, null, {\n default: () => [\n h(\n SelectControl,\n {\n \"id\": id,\n \"aria-label\": props.ariaLabel,\n \"aria-labelledby\": ariaLabelledby ? `${ariaLabelledby} ${valueId}` : undefined,\n \"aria-describedby\": props.ariaDescribedby,\n \"aria-invalid\": props.ariaInvalid,\n \"class\": props.triggerClassName,\n \"data-date-picker\": \"\",\n \"selected\": !!value,\n \"variant\": props.variant,\n \"pill\": props.pill,\n \"block\": props.block,\n \"size\": props.size,\n \"disabled\": props.disabled,\n \"interactOnEnter\": true,\n \"StartIcon\": props.triggerShowIcon ? Calendar : undefined,\n \"dropdownIconType\": props.dropdownIconType,\n \"onClearClick\": props.clearable ? handleClearClick : undefined,\n },\n { default: () => [ariaLabelledby ? h(\"span\", { id: valueId }, text) : text] },\n ),\n ],\n }),\n h(\n PopoverContent,\n {\n class: s.Popover,\n minWidth: 230,\n collisionPadding: wide.value ? 20 : calendarCollisionPadding.value,\n side: wide.value || props.side === \"top\" ? props.side : \"bottom\",\n sideOffset: props.sideOffset,\n align,\n alignOffset: props.alignOffset ?? (align === \"center\" ? 0 : -5),\n },\n { default: () => [h(DateCalendar)] },\n ),\n ],\n })\n }\n },\n})\n\ntype DatePickerOwnProps = InstanceType<typeof DatePickerComponent>[\"$props\"]\n\nexport type DatePickerProps = DatePickerOwnProps\n\n/**\n * A date (and optionally time) picker: a SelectControl trigger opening a\n * calendar in a popover. Bind the date (a luxon `DateTime`) with\n * `v-model:value`.\n */\nexport const DatePicker = DatePickerComponent\n"]}
@@ -0,0 +1,25 @@
1
+ import { computed, onBeforeUnmount, onMounted, ref } from "vue";
2
+ // Mirrors React's useCalendarCollisionPadding. The calendar's collision padding on a phone: seven 44px days leave the
3
+ // rest of the width to two outer and two inner gutters (the CSS uses the same gutter for its width), and the calendar
4
+ // keeps that gutter above and below. Where the 328px calendar fits with room to spare, its sides keep up to 32px from
5
+ // the screen's edges, as iOS 27.2 keeps the compact date picker's calendar 32pt from the edge it would cross (UIKit
6
+ // and Calendar on an iPhone 17).
7
+ export const calendarCollisionPadding = (width) => {
8
+ const gutter = Math.max(3, Math.min(16, (width - 308) / 4));
9
+ const side = Math.max(gutter, Math.min(32, (width - 328) / 2));
10
+ return { top: gutter, right: side, bottom: gutter, left: side };
11
+ };
12
+ // The root's client width leaves out a classic scrollbar, as the popover's own viewport does; a document with no
13
+ // layout (0) falls back to the window's width.
14
+ const viewportWidth = () => document.documentElement.clientWidth || window.innerWidth;
15
+ export const useCalendarCollisionPadding = () => {
16
+ const width = ref();
17
+ const update = () => { width.value = viewportWidth(); };
18
+ onMounted(() => {
19
+ update();
20
+ window.addEventListener("resize", update);
21
+ });
22
+ onBeforeUnmount(() => window.removeEventListener("resize", update));
23
+ return computed(() => width.value === undefined ? { top: 16, right: 16, bottom: 16, left: 16 } : calendarCollisionPadding(width.value));
24
+ };
25
+ //# sourceMappingURL=useCalendarCollisionPadding.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCalendarCollisionPadding.js","sourceRoot":"","sources":["../../../../src/components/DatePicker/useCalendarCollisionPadding.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,EAAoB,MAAM,KAAK,CAAA;AAIjF,sHAAsH;AACtH,sHAAsH;AACtH,sHAAsH;AACtH,oHAAoH;AACpH,iCAAiC;AACjC,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,KAAa,EAA4B,EAAE;IAClF,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC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ding = { top: number; right: number; bottom: number; left: number }\n\n// Mirrors React's useCalendarCollisionPadding. The calendar's collision padding on a phone: seven 44px days leave the\n// rest of the width to two outer and two inner gutters (the CSS uses the same gutter for its width), and the calendar\n// keeps that gutter above and below. Where the 328px calendar fits with room to spare, its sides keep up to 32px from\n// the screen's edges, as iOS 27.2 keeps the compact date picker's calendar 32pt from the edge it would cross (UIKit\n// and Calendar on an iPhone 17).\nexport const calendarCollisionPadding = (width: number): CalendarCollisionPadding => {\n const gutter = Math.max(3, Math.min(16, (width - 308) / 4))\n const side = Math.max(gutter, Math.min(32, (width - 328) / 2))\n return { top: gutter, right: side, bottom: gutter, left: side }\n}\n\n// The root's client width leaves out a classic scrollbar, as the popover's own viewport does; a document with no\n// layout (0) falls back to the window's width.\nconst viewportWidth = () => document.documentElement.clientWidth || window.innerWidth\n\nexport const useCalendarCollisionPadding = (): ComputedRef<CalendarCollisionPadding> => {\n const width = ref<number>()\n const update = () => { width.value = viewportWidth() }\n\n onMounted(() => {\n update()\n window.addEventListener(\"resize\", update)\n })\n onBeforeUnmount(() => window.removeEventListener(\"resize\", update))\n\n return computed(() => width.value === undefined ? { top: 16, right: 16, bottom: 16, left: 16 } : calendarCollisionPadding(width.value))\n}\n"]}
@@ -4,7 +4,7 @@ import { computed, defineComponent, h, provide, toRaw } from "vue";
4
4
  import { useBreakpoint } from "../../composables/useBreakpoints.js";
5
5
  import { isAfter } from "../../lib/dateUtils.js";
6
6
  import { Popover, PopoverContent, PopoverTrigger } from "../Popover/index.js";
7
- import { useCalendarGutter } from "../DatePicker/useCalendarGutter.js";
7
+ import { useCalendarCollisionPadding } from "../DatePicker/useCalendarCollisionPadding.js";
8
8
  import { DateRangeCalendar, DateRangeShortcuts } from "./Calendar.js";
9
9
  import { DateRangeContextKey } from "./context.js";
10
10
  import { DateRangeTrigger } from "./Trigger.js";
@@ -72,7 +72,7 @@ const DateRangePickerComponent = defineComponent({
72
72
  },
73
73
  setup(props, { emit }) {
74
74
  const wide = useBreakpoint("md");
75
- const calendarGutter = useCalendarGutter();
75
+ const calendarCollisionPadding = useCalendarCollisionPadding();
76
76
  const unwrap = (value) => (value ? toRaw(value) : value);
77
77
  // A new range only when `value` or one of its endpoints changes, as the
78
78
  // identity React's effects see. The endpoints are read through the array
@@ -157,7 +157,7 @@ const DateRangePickerComponent = defineComponent({
157
157
  h(PopoverContent, {
158
158
  class: s.Popover,
159
159
  minWidth: 230,
160
- collisionPadding: wide.value ? 20 : calendarGutter.value,
160
+ collisionPadding: wide.value ? 20 : calendarCollisionPadding.value,
161
161
  side: wide.value || props.side === "top" ? props.side : "bottom",
162
162
  sideOffset: props.sideOffset,
163
163
  align,
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangePicker.js","sourceRoot":"","sources":["../../../../src/components/DateRangePicker/DateRangePicker.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,+DAA+D,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAiB,MAAM,KAAK,CAAA;AAEjF,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAA;AAChD,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAuC,MAAM,qBAAqB,CAAA;AAClH,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AAEtE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AACrE,OAAO,EAAE,mBAAmB,EAA8B,MAAM,cAAc,CAAA;AAC9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAA0D,MAAM,YAAY,CAAA;AAEnF,8EAA8E;AAC9E,0EAA0E;AAC1E,4EAA4E;AAC5E,uEAAuE;AACvE,mCAAmC;AACnC,y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AAI,EAAE,IAAI,CAAC,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,QAAQ;wBAChE,UAAU,EAAE,KAAK,CAAC,UAAU;wBAC5B,KAAK;wBACL,WAAW,EAAE,KAAK,CAAC,WAAW,IAAI,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;qBAChE,EACD;wBACE,OAAO,EAAE,GAAG,EAAE,CAAC;4BACb,CAAC,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,kBAAkB,EAAE,EAAE,SAAS,EAAE,KAAK,CAAC,SAAS,EAAE,CAAC,EAAE,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC;yBAC3G;qBACF,CACF;iBACF;aACF,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAIF;;;;GAIG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,wBAAwB,CAAA","sourcesContent":["import s from \"@plexui/styles/components/DateRangePicker/Calendar.module.css\"\nimport { DateTime } from \"luxon\"\nimport { computed, defineComponent, h, provide, toRaw, type PropType } from \"vue\"\nimport type { ControlSize } from \"@plexui/styles/types\"\nimport { useBreakpoint } from \"../../composables/useBreakpoints.js\"\nimport { isAfter } from \"../../lib/dateUtils.js\"\nimport { Popover, PopoverContent, PopoverTrigger, type PopoverAlign, type PopoverSide } from \"../Popover/index.js\"\nimport { useCalendarGutter } from \"../DatePicker/useCalendarGutter.js\"\nimport type { DropdownIconType } from \"../SelectControl/index.js\"\nimport { DateRangeCalendar, DateRangeShortcuts } from \"./Calendar.js\"\nimport { DateRangeContextKey, type DateRangeContextValue } from \"./context.js\"\nimport { DateRangeTrigger } from \"./Trigger.js\"\nimport { type DateRange, type DateRangeShortcut, type WeekStart } from \"./types.js\"\n\n// Vue port of packages/ui/src/components/DateRangePicker/DateRangePicker.tsx.\n// - `value` + `update:value` (`v-model:value`), plus `change`, which also\n// carries the selected shortcut like React's `onChange(range, shortcut)`.\n// Like React the picker is controlled: a parent that does not update\n// `value` keeps the shown range.\n// - DateTime values are read unwrapped (`toRaw`), so a `ref()` holding a\n// range (a deep reactive proxy) works like a plain value.\n\nconst DateRangePickerComponent = defineComponent({\n name: \"DateRangePicker\",\n inheritAttrs: false,\n props: {\n /** The selected date range value (`v-model:value`). */\n value: { type: Array as unknown as PropType<DateRange | null>, default: null },\n /** Defines the earliest selectable date (inclusive). */\n min: Object as PropType<DateTime>,\n /** Defines the latest selectable date (inclusive). */\n max: Object as PropType<DateTime>,\n /** Maximum length of the selectable range in days (inclusive). */\n maxRangeDays: Number,\n /** The day each week starts on, from 0 (Sunday) to 6 (Saturday). @default 0 */\n weekStartsOn: { type: Number as PropType<WeekStart>, default: 0 },\n /** Date range shortcuts for quick selection, shown to the left of the calendar. Not shown below the md breakpoint: on a phone, offer them in a row of their own (see the docs). */\n shortcuts: Array as PropType<DateRangeShortcut[]>,\n /** Preferred side; collisions can flip it. On phones, left and right prefer bottom so seven 44px day targets fit. @default \"bottom\" */\n side: { type: String as PropType<PopoverSide>, default: \"bottom\" },\n /** The distance in pixels from the trigger. @default 8 */\n sideOffset: { type: Number, default: 8 },\n /** The preferred alignment against the trigger. @default \"center\" */\n align: { type: String as PropType<PopoverAlign>, default: \"center\" },\n /** An offset in pixels from the \"start\" or \"end\" alignment options. @default 0 */\n alignOffset: Number,\n /** Disables the select visually and from interactions. @default false */\n disabled: { type: Boolean, default: false },\n /** Placeholder text for the select. @default \"Select date range...\" */\n placeholder: { type: String, default: \"Select date range...\" },\n /** Style variant for the select trigger. @default \"outline\" */\n variant: { type: String as PropType<\"soft\" | \"outline\" | \"ghost\">, default: \"outline\" },\n /** Determines if the select trigger should be a fully rounded pill shape. @default true */\n pill: { type: Boolean, default: true },\n /** Size of the control: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Icon displayed in the far right of the select trigger. @default \"dropdown\" */\n dropdownIconType: String as PropType<DropdownIconType>,\n /** Custom class applied to the select trigger */\n triggerClassName: String,\n /** Display calendar icon at the start of the trigger. @default true */\n triggerShowIcon: { type: Boolean, default: true },\n /** Shows a stepper in the trigger when the selected range matches the unit ('month'). */\n triggerStepperUnit: String as PropType<\"month\">,\n /** Format of dates displayed in the trigger. @default \"MM/dd/yy\" */\n triggerDateFormat: { type: String, default: \"MM/dd/yy\" },\n /** Display a clear action that allows the select to be unset. @default false */\n clearable: { type: Boolean, default: false },\n /** Extends select to 100% of available width. @default false */\n block: { type: Boolean, default: false },\n },\n emits: {\n \"update:value\": (nextValue: DateRange | null) => nextValue === null || nextValue.every(DateTime.isDateTime),\n \"change\": (nextValue: DateRange | null, shortcut?: DateRangeShortcut) =>\n (nextValue === null || nextValue.every(DateTime.isDateTime)) &&\n (shortcut === undefined || typeof shortcut.getDateRange === \"function\"),\n },\n setup(props, { emit }) {\n const wide = useBreakpoint(\"md\")\n const calendarGutter = useCalendarGutter()\n const unwrap = <T>(value: T): T => (value ? toRaw(value) : value)\n\n // A new range only when `value` or one of its endpoints changes, as the\n // identity React's effects see. The endpoints are read through the array\n // so that `range.value[0] = date` on a `ref()` range is tracked.\n const value = computed<DateRange | null>(() => {\n const range = props.value\n if (!range) return null\n return [toRaw(range[0]), toRaw(range[1])]\n })\n\n const store: DateRangeContextValue = {\n get value() {\n return value.value\n },\n get min() {\n return unwrap(props.min)\n },\n get max() {\n return unwrap(props.max)\n },\n get maxRangeDays() {\n return props.maxRangeDays\n },\n get weekStartsOn() {\n return props.weekStartsOn\n },\n get triggerStepperUnit() {\n return props.triggerStepperUnit\n },\n get triggerClassName() {\n return props.triggerClassName\n },\n get triggerShowIcon() {\n return props.triggerShowIcon\n },\n get triggerDateFormat() {\n return props.triggerDateFormat\n },\n get disabled() {\n return props.disabled\n },\n get variant() {\n return props.variant\n },\n get pill() {\n return props.pill\n },\n get block() {\n return props.block\n },\n get size() {\n return props.size\n },\n get dropdownIconType() {\n return props.dropdownIconType\n },\n get clearable() {\n return props.clearable\n },\n get placeholder() {\n return props.placeholder\n },\n get shortcuts() {\n return props.shortcuts\n },\n onChange: (nextValue, shortcut) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue, shortcut)\n },\n }\n provide(DateRangeContextKey, store)\n\n return () => {\n const { min, max } = store\n const { align } = props\n\n // min and max are inclusive, so equal bounds allow one date\n if (min && max && isAfter(min, max)) {\n throw new Error(\"DateRangePicker error: `min` date must not be after the `max` date\")\n }\n\n return h(Popover, null, {\n default: () => [\n h(PopoverTrigger, null, { default: () => [h(DateRangeTrigger)] }),\n h(\n PopoverContent,\n {\n class: s.Popover,\n minWidth: 230,\n collisionPadding: wide.value ? 20 : calendarGutter.value,\n side: wide.value || props.side === \"top\" ? props.side : \"bottom\",\n sideOffset: props.sideOffset,\n align,\n alignOffset: props.alignOffset ?? (align === \"center\" ? 0 : -5),\n },\n {\n default: () => [\n h(\"div\", { class: \"flex\" }, [h(DateRangeShortcuts, { shortcuts: props.shortcuts }), h(DateRangeCalendar)]),\n ],\n },\n ),\n ],\n })\n }\n },\n})\n\nexport type DateRangePickerProps = InstanceType<typeof DateRangePickerComponent>[\"$props\"]\n\n/**\n * A date range picker: a SelectControl trigger (or a month stepper) opening\n * two calendars and optional shortcuts in a popover. Bind the range\n * (`[start, end]` luxon `DateTime`s) with `v-model:value`.\n */\nexport const DateRangePicker = DateRangePickerComponent\n"]}
1
+ {"version":3,"file":"DateRangePicker.js","sourceRoot":"","sources":["../../../../src/components/DateRangePicker/DateRangePicker.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,+DAA+D,CAAA;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,QAAQ,EAAE,eAAe,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAiB,M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AwB,CAAA","sourcesContent":["import s from \"@plexui/styles/components/DateRangePicker/Calendar.module.css\"\nimport { DateTime } from \"luxon\"\nimport { computed, defineComponent, h, provide, toRaw, type PropType } from \"vue\"\nimport type { ControlSize } from \"@plexui/styles/types\"\nimport { useBreakpoint } from \"../../composables/useBreakpoints.js\"\nimport { isAfter } from \"../../lib/dateUtils.js\"\nimport { Popover, PopoverContent, PopoverTrigger, type PopoverAlign, type PopoverSide } from \"../Popover/index.js\"\nimport { useCalendarCollisionPadding } from \"../DatePicker/useCalendarCollisionPadding.js\"\nimport type { DropdownIconType } from \"../SelectControl/index.js\"\nimport { DateRangeCalendar, DateRangeShortcuts } from \"./Calendar.js\"\nimport { DateRangeContextKey, type DateRangeContextValue } from \"./context.js\"\nimport { DateRangeTrigger } from \"./Trigger.js\"\nimport { type DateRange, type DateRangeShortcut, type WeekStart } from \"./types.js\"\n\n// Vue port of packages/ui/src/components/DateRangePicker/DateRangePicker.tsx.\n// - `value` + `update:value` (`v-model:value`), plus `change`, which also\n// carries the selected shortcut like React's `onChange(range, shortcut)`.\n// Like React the picker is controlled: a parent that does not update\n// `value` keeps the shown range.\n// - DateTime values are read unwrapped (`toRaw`), so a `ref()` holding a\n// range (a deep reactive proxy) works like a plain value.\n\nconst DateRangePickerComponent = defineComponent({\n name: \"DateRangePicker\",\n inheritAttrs: false,\n props: {\n /** The selected date range value (`v-model:value`). */\n value: { type: Array as unknown as PropType<DateRange | null>, default: null },\n /** Defines the earliest selectable date (inclusive). */\n min: Object as PropType<DateTime>,\n /** Defines the latest selectable date (inclusive). */\n max: Object as PropType<DateTime>,\n /** Maximum length of the selectable range in days (inclusive). */\n maxRangeDays: Number,\n /** The day each week starts on, from 0 (Sunday) to 6 (Saturday). @default 0 */\n weekStartsOn: { type: Number as PropType<WeekStart>, default: 0 },\n /** Date range shortcuts for quick selection, shown to the left of the calendar. Not shown below the md breakpoint: on a phone, offer them in a row of their own (see the docs). */\n shortcuts: Array as PropType<DateRangeShortcut[]>,\n /** Preferred side; collisions can flip it. On phones, left and right prefer bottom so seven 44px day targets fit. @default \"bottom\" */\n side: { type: String as PropType<PopoverSide>, default: \"bottom\" },\n /** The distance in pixels from the trigger. @default 8 */\n sideOffset: { type: Number, default: 8 },\n /** The preferred alignment against the trigger. @default \"center\" */\n align: { type: String as PropType<PopoverAlign>, default: \"center\" },\n /** An offset in pixels from the \"start\" or \"end\" alignment options. @default 0 */\n alignOffset: Number,\n /** Disables the select visually and from interactions. @default false */\n disabled: { type: Boolean, default: false },\n /** Placeholder text for the select. @default \"Select date range...\" */\n placeholder: { type: String, default: \"Select date range...\" },\n /** Style variant for the select trigger. @default \"outline\" */\n variant: { type: String as PropType<\"soft\" | \"outline\" | \"ghost\">, default: \"outline\" },\n /** Determines if the select trigger should be a fully rounded pill shape. @default true */\n pill: { type: Boolean, default: true },\n /** Size of the control: `3xs` 22px up to `3xl` 48px. @default \"md\" */\n size: { type: String as PropType<ControlSize>, default: \"md\" },\n /** Icon displayed in the far right of the select trigger. @default \"dropdown\" */\n dropdownIconType: String as PropType<DropdownIconType>,\n /** Custom class applied to the select trigger */\n triggerClassName: String,\n /** Display calendar icon at the start of the trigger. @default true */\n triggerShowIcon: { type: Boolean, default: true },\n /** Shows a stepper in the trigger when the selected range matches the unit ('month'). */\n triggerStepperUnit: String as PropType<\"month\">,\n /** Format of dates displayed in the trigger. @default \"MM/dd/yy\" */\n triggerDateFormat: { type: String, default: \"MM/dd/yy\" },\n /** Display a clear action that allows the select to be unset. @default false */\n clearable: { type: Boolean, default: false },\n /** Extends select to 100% of available width. @default false */\n block: { type: Boolean, default: false },\n },\n emits: {\n \"update:value\": (nextValue: DateRange | null) => nextValue === null || nextValue.every(DateTime.isDateTime),\n \"change\": (nextValue: DateRange | null, shortcut?: DateRangeShortcut) =>\n (nextValue === null || nextValue.every(DateTime.isDateTime)) &&\n (shortcut === undefined || typeof shortcut.getDateRange === \"function\"),\n },\n setup(props, { emit }) {\n const wide = useBreakpoint(\"md\")\n const calendarCollisionPadding = useCalendarCollisionPadding()\n const unwrap = <T>(value: T): T => (value ? toRaw(value) : value)\n\n // A new range only when `value` or one of its endpoints changes, as the\n // identity React's effects see. The endpoints are read through the array\n // so that `range.value[0] = date` on a `ref()` range is tracked.\n const value = computed<DateRange | null>(() => {\n const range = props.value\n if (!range) return null\n return [toRaw(range[0]), toRaw(range[1])]\n })\n\n const store: DateRangeContextValue = {\n get value() {\n return value.value\n },\n get min() {\n return unwrap(props.min)\n },\n get max() {\n return unwrap(props.max)\n },\n get maxRangeDays() {\n return props.maxRangeDays\n },\n get weekStartsOn() {\n return props.weekStartsOn\n },\n get triggerStepperUnit() {\n return props.triggerStepperUnit\n },\n get triggerClassName() {\n return props.triggerClassName\n },\n get triggerShowIcon() {\n return props.triggerShowIcon\n },\n get triggerDateFormat() {\n return props.triggerDateFormat\n },\n get disabled() {\n return props.disabled\n },\n get variant() {\n return props.variant\n },\n get pill() {\n return props.pill\n },\n get block() {\n return props.block\n },\n get size() {\n return props.size\n },\n get dropdownIconType() {\n return props.dropdownIconType\n },\n get clearable() {\n return props.clearable\n },\n get placeholder() {\n return props.placeholder\n },\n get shortcuts() {\n return props.shortcuts\n },\n onChange: (nextValue, shortcut) => {\n emit(\"update:value\", nextValue)\n emit(\"change\", nextValue, shortcut)\n },\n }\n provide(DateRangeContextKey, store)\n\n return () => {\n const { min, max } = store\n const { align } = props\n\n // min and max are inclusive, so equal bounds allow one date\n if (min && max && isAfter(min, max)) {\n throw new Error(\"DateRangePicker error: `min` date must not be after the `max` date\")\n }\n\n return h(Popover, null, {\n default: () => [\n h(PopoverTrigger, null, { default: () => [h(DateRangeTrigger)] }),\n h(\n PopoverContent,\n {\n class: s.Popover,\n minWidth: 230,\n collisionPadding: wide.value ? 20 : calendarCollisionPadding.value,\n side: wide.value || props.side === \"top\" ? props.side : \"bottom\",\n sideOffset: props.sideOffset,\n align,\n alignOffset: props.alignOffset ?? (align === \"center\" ? 0 : -5),\n },\n {\n default: () => [\n h(\"div\", { class: \"flex\" }, [h(DateRangeShortcuts, { shortcuts: props.shortcuts }), h(DateRangeCalendar)]),\n ],\n },\n ),\n ],\n })\n }\n },\n})\n\nexport type DateRangePickerProps = InstanceType<typeof DateRangePickerComponent>[\"$props\"]\n\n/**\n * A date range picker: a SelectControl trigger (or a month stepper) opening\n * two calendars and optional shortcuts in a popover. Bind the range\n * (`[start, end]` luxon `DateTime`s) with `v-model:value`.\n */\nexport const DateRangePicker = DateRangePickerComponent\n"]}
@@ -476,7 +476,7 @@ export const DialogHeader = defineComponent({
476
476
  const slot = descriptionSlot ? descriptionSlot.own.value ?? descriptionSlot.body.value : null;
477
477
  // On a phone the header of a Sheet is its Toolbar (iOS 27 kit Sheets 507-24684, Toolbar - Top - iPhone
478
478
  // 1-54520): Close at the leading edge, the title alone centered on the row of controls, the header actions
479
- // at the trailing edge, all on one 44px row under the grabber.
479
+ // at the trailing edge, all on one 44px row 16px under the top edge.
480
480
  return [
481
481
  h(Toolbar, mergeProps({ "background": props.background, "data-dialog-bar": "" }, attrs), () => [
482
482
  sheet?.value?.showClose
@@ -559,7 +559,7 @@ export const DialogDescriptionSlot = defineComponent({
559
559
  export const DialogFooter = defineComponent({
560
560
  name: "DialogFooter",
561
561
  props: {
562
- /** Override the mobile action layout. Alerts default to inline; sheets to stacked. */
562
+ /** Override the mobile action layout. Two alert actions default to inline, three or more and sheets to stacked. */
563
563
  mobileLayout: String,
564
564
  /** How the bar meets the content scrolled under it in a phone Sheet. @default "soft" */
565
565
  background: { type: String, default: "soft" },
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,QAAQ,IAAI,aAAa,EACzB,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,WAAW,EACX,OAAO,EACP,GAAG,EACH,UAAU,EACV,QAAQ,E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ACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n cloneVNode,\n computed,\n createCommentVNode,\n defineComponent,\n Fragment as FragmentVNode,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n onUnmounted,\n provide,\n ref,\n shallowRef,\n Teleport,\n watch,\n type ComputedRef,\n type CSSProperties,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\n type VNodeArrayChildren,\n isVNode,\n mergeProps,\n} from \"vue\"\nimport {\n DialogContent as RekaDialogContent,\n DialogDescription as RekaDialogDescription,\n DialogOverlay as RekaDialogOverlay,\n DialogPortal as RekaDialogPortal,\n DialogRoot as RekaDialogRoot,\n DialogTitle as RekaDialogTitle,\n FocusScope as RekaFocusScope,\n injectDialogRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { inToastRegion } from \"../../lib/toastRegion.js\"\nimport { cancelableKeyCopy, dataAttributes, keepMovedFocus, preventDefaultHandler, toCssVariables } from \"../../lib/helpers.js\"\nimport { dismissableSurfaces, useDeferredPointerDownOutside } from \"../Popover/deferredPointerDownOutside.js\"\nimport { firstElementChild } from \"../Tooltip/slot.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport { attachSheetDrag } from \"./sheetDrag.js\"\nimport { watchDialogViewport } from \"./dialogViewport.js\"\nimport { enterStep, leaveStep, releaseStepHeight, settleStepHeight, STEP_TIMING } from \"./dialogSteps.js\"\nimport { PHONE_LAYOUT as PHONE_LAYOUT_SCOPE, type PhoneLayoutValue } from \"../PhoneLayout/PhoneLayout.js\"\nimport { overlayTiming, overlayTimingLarge } from \"../Transition/shared.js\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { NavigationButton } from \"../Button/NavigationButton.js\"\nimport { TOOLBAR_HOST, Toolbar, ToolbarLeading, ToolbarTrailing, type BarBackground } from \"../Toolbar/Toolbar.js\"\nimport { observeScrollEdges } from \"../../lib/scrollEdges.js\"\nimport s from \"@plexui/styles/components/Dialog/Dialog.module.css\"\nimport t from \"@plexui/styles/components/Toolbar/Toolbar.module.css\"\n\nconst DOUBLE_CLICK = 300\n\n/** Where content lies under the bars: DialogBody reports it, the bars show their lines with it. */\ntype DialogScroll = { scrolled: Ref<boolean>; contentBelow: Ref<boolean> }\nconst DIALOG_SCROLL: InjectionKey<DialogScroll> = Symbol(\"DialogScroll\")\n// What the header of a Sheet needs from its content to become the Sheet's bar on a phone\ntype DialogSheet = { showClose: boolean }\nconst DIALOG_SHEET: InjectionKey<ComputedRef<DialogSheet | null>> = Symbol(\"DialogSheet\")\n// Inside that bar: the title, the description and the header actions take the Toolbar's parts\nconst DIALOG_BAR: InjectionKey<ComputedRef<boolean>> = Symbol(\"DialogBar\")\n// Where DialogBody takes a phone Sheet's description: the first text of the content, under the bar\n// Where a phone Sheet's description goes: the top of DialogBody, or first a DialogDescriptionSlot of the content's own\ntype DialogDescriptionSlots = { body: Ref<HTMLElement | null>; own: Ref<HTMLElement | null> }\nconst DIALOG_DESCRIPTION_SLOT: InjectionKey<DialogDescriptionSlots> = Symbol(\"DialogDescriptionSlot\")\n\n// The phone layout of the Dialog style sheet (its rules for the Sheet's bar use the same query). A dialog's content\n// mounts on the client only (its portal waits for the document), so it reads the layout as it mounts, with nothing to\n// swap after it.\nconst PHONE_LAYOUT = \"(width <= 767px)\"\nconst phoneLayout = () => (typeof window !== \"undefined\" && typeof window.matchMedia === \"function\" ? window.matchMedia(PHONE_LAYOUT) : null)\nconst usePhoneLayout = (): Readonly<Ref<boolean>> => {\n // Inside a PhoneLayout, or a dialog with `layout=\"phone\"`, at any window width\n const scope = inject(PHONE_LAYOUT_SCOPE, null)\n const query = phoneLayout()\n const narrow = ref(query?.matches ?? false)\n const phone = computed(() => !!scope?.phone.value || narrow.value)\n const update = () => { narrow.value = !!query?.matches }\n if (!query) return phone\n // Safari before 14 has only the older listener methods\n if (typeof query.addEventListener !== \"function\") {\n query.addListener(update)\n onBeforeUnmount(() => query.removeListener(update))\n } else {\n query.addEventListener(\"change\", update)\n onBeforeUnmount(() => query.removeEventListener(\"change\", update))\n }\n return phone\n}\n\n// Vue port of packages/ui/src/components/Dialog/Dialog.tsx on Reka UI\n// (the Vue lineage of Radix, same anatomy). Exports are flat (`Dialog`,\n// `DialogTrigger`, ...) because runtime-compiled templates cannot resolve\n// `Dialog.Trigger` from the `components` option.\n//\n// Where Reka differs from Radix (radix-ui 1.8), the port follows Radix:\n// - The content is labelled and described only while a DialogTitle /\n// DialogDescription is mounted.\n// - A press outside (the overlay) closes it on the click that follows\n// (../Popover/deferredPointerDownOutside.ts); the overlay is a dismiss\n// surface.\n// - The portal renders once mounted, so a closed dialog server-renders\n// nothing.\n\ntype DialogContextValue = {\n open: ComputedRef<boolean>\n setOpen: (nextState: boolean) => void\n /** Mounted DialogTitle / DialogDescription parts (Radix's title and description counts) */\n titleCount: Ref<number>\n descriptionCount: Ref<number>\n /** Retain the native modal owner until its animated subtree actually unmounts. */\n mountedSurfaces: Ref<number>\n}\n\nconst DialogContextKey: InjectionKey<DialogContextValue> = Symbol(\"PlexUIDialog\")\n\nconst useDialogContext = () => {\n const context = inject(DialogContextKey, null)\n\n if (!context) {\n throw new Error(\"Dialog compound components must be used inside <Dialog>\")\n }\n\n return context\n}\n\n/** Modal dialog root. Uncontrolled by default; bind `v-model:open` to control it. */\nexport const Dialog = defineComponent({\n name: \"Dialog\",\n props: {\n open: { type: Boolean, default: undefined },\n },\n emits: {\n \"update:open\": (open: boolean) => typeof open === \"boolean\",\n },\n setup(props, { slots, emit }) {\n const internalOpen = ref(false)\n const isOpen = computed(() => props.open ?? internalOpen.value)\n const mountedSurfaces = ref(0)\n const nativeOpen = computed(() => isOpen.value || mountedSurfaces.value > 0)\n\n const setOpen = (nextState: boolean) => {\n emit(\"update:open\", nextState)\n internalOpen.value = nextState\n }\n\n provide(DialogContextKey, { open: isOpen, setOpen, titleCount: ref(0), descriptionCount: ref(0), mountedSurfaces })\n\n return () =>\n h(RekaDialogRoot, { \"open\": nativeOpen.value, \"onUpdate:open\": setOpen }, { default: () => slots.default?.() })\n },\n})\n\n// Trigger and Close render their child with the dialog wiring merged in,\n// like Reka's `asChild` parts, but run the dialog action after the child's\n// own click handlers and skip it when one called preventDefault() (Radix's\n// composeEventHandlers). Reka's parts run first and cannot be cancelled.\n// Attributes the child sets itself win, as with Radix and Reka slots. The\n// child is the first element, also through a forwarded `<slot />`.\nconst withDialogProps = (\n child: VNode | undefined,\n props: Record<string, unknown>,\n onClick: (event: Event) => void,\n ref?: (el: unknown) => void,\n) => {\n if (!child) return null\n const own = child.props ?? {}\n const extra = Object.fromEntries(Object.entries(props).filter(([key]) => !(key in own)))\n return cloneVNode(child, { ...extra, onClick, ...(ref ? { ref } : {}) }, true)\n}\n\nexport const DialogTrigger = defineComponent({\n name: \"DialogTrigger\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const { open, setOpen } = useDialogContext()\n const { forwardRef, currentElement } = useForwardExpose()\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Focus returns here when the dialog closes\n onMounted(() => {\n rootContext.triggerElement.value = currentElement.value\n })\n\n const onClick = (event: Event) => {\n if (!event.defaultPrevented) setOpen(!open.value)\n }\n\n return () => {\n const isOpen = open.value\n return withDialogProps(\n firstElementChild(slots.default?.()),\n {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen || false,\n \"aria-controls\": isOpen ? rootContext.contentId : undefined,\n \"data-state\": isOpen ? \"open\" : \"closed\",\n },\n onClick,\n forwardRef as (el: unknown) => void,\n )\n }\n },\n})\n\n// Reka 2.11's force-mounted Dialog releases hideOthers when its `present`\n// becomes false, then calls the same non-idempotent cleanup again on unmount.\n// Keep its public Root open until this transition-owned subtree unmounts.\n// The logical open state still drives Plex triggers, events and exit rendering.\nconst DialogSurface = defineComponent({\n name: \"DialogSurface\",\n setup(_props, { slots }) {\n const { mountedSurfaces } = useDialogContext()\n onMounted(() => { mountedSurfaces.value++ })\n // Descendant Reka cleanup runs first; never send it present=false while alive.\n onUnmounted(() => { mountedSurfaces.value-- })\n return () => h(\"div\", slots.default?.())\n },\n})\n\n/** Overlay and panel. `class` lands on the panel, like `className` in React. */\nconst TOP_TOOLBAR = '[data-toolbar][data-placement=\"top\"]'\nconst BOTTOM_TOOLBAR = '[data-toolbar][data-placement=\"bottom\"]'\n\nexport const DialogContent = defineComponent({\n name: \"DialogContent\",\n inheritAttrs: false,\n props: {\n /** Panel width; numbers are pixels. @default 480 */\n width: { type: [Number, String] as PropType<number | string>, default: 480 },\n /** Renders the close button in the top corner. @default true */\n showClose: { type: Boolean, default: true },\n /**\n * Rounder panel and a round close button, for dialogs that sit beside pill controls.\n * @default false\n */\n pill: { type: Boolean, default: false },\n /**\n * Where the panel sits: centered, near the top, a sheet along the bottom,\n * a full-height panel on the start or end side, or the whole screen.\n * @default \"center\"\n */\n placement: { type: String as PropType<DialogPlacement>, default: \"center\" },\n /** Placement at 767px and below, such as a bottom sheet on phones. @default placement */\n mobilePlacement: String as PropType<Extract<DialogPlacement, \"center\" | \"bottom\" | \"fullscreen\">>,\n /** Mobile presentation at 767px and below. Sheets default to bottom placement. */\n mobileVariant: String as PropType<\"alert\" | \"sheet\">,\n /** Mobile panel palette; dark mode uses elevated surfaces. @default \"plain\" */\n surface: { type: String as PropType<\"plain\" | \"grouped\">, default: \"plain\" },\n /** Called when focus moves into the dialog on open; `event.preventDefault()` keeps it for you to place. */\n onOpenAutoFocus: Function as PropType<(event: Event) => void>,\n /** Called when focus returns on close; `event.preventDefault()` keeps it elsewhere. */\n onCloseAutoFocus: Function as PropType<(event: Event) => void>,\n /**\n * Called on Escape before the dialog closes; `event.preventDefault()` keeps it open, such as for a form with\n * unsaved changes.\n */\n onEscapeKeyDown: Function as PropType<(event: KeyboardEvent) => void>,\n /**\n * Called on a press or a focus outside the dialog before it closes; `event.preventDefault()` keeps it open, such\n * as for a press on a developer panel over the page.\n */\n onInteractOutside: Function as PropType<(event: DialogInteractOutsideEvent) => void>,\n /** Stack order of the overlay and the dialog. @default 50 */\n zIndex: Number,\n /** Class, style and data attributes for the fixed layer that holds the panel. Data attributes of DialogContent land here too. */\n rootProps: Object as PropType<DialogLayerProps>,\n /** Class, style and data attributes for the overlay. */\n overlayProps: Object as PropType<DialogLayerProps>,\n /** `phone` lays the dialog out as on a phone at any window width. Inside a PhoneLayout it always is. @default \"auto\" */\n layout: { type: String as PropType<\"auto\" | \"phone\">, default: \"auto\" },\n },\n setup(props, { slots, attrs }) {\n const { open, setOpen, titleCount, descriptionCount } = useDialogContext()\n const outerPhoneLayout = inject(PHONE_LAYOUT_SCOPE, null)\n // A dialog laid out as on a phone by its own prop, outside a PhoneLayout, keeps the window: what it holds and\n // the dialogs it opens are phone ones too, for as long as the prop says so.\n const phoneLayout = computed(() => !!outerPhoneLayout?.phone.value || props.layout === \"phone\")\n const portalTarget = computed(() => outerPhoneLayout?.container.value ?? null)\n provide(PHONE_LAYOUT_SCOPE, { container: outerPhoneLayout?.container ?? shallowRef(null), phone: phoneLayout } satisfies PhoneLayoutValue)\n const scroll: DialogScroll = { scrolled: ref(false), contentBelow: ref(false) }\n provide(DIALOG_SCROLL, scroll)\n provide(TOOLBAR_HOST, { kind: \"dialog\", scrolled: scroll.scrolled, contentBelow: scroll.contentBelow })\n provide(DIALOG_SHEET, computed(() => (props.mobileVariant === \"sheet\" ? { showClose: props.showClose } : null)))\n // A dialog opened from a header action is not inside that header's bar\n provide(DIALOG_BAR, computed(() => false))\n provide(DIALOG_DESCRIPTION_SLOT, { body: shallowRef<HTMLElement | null>(null), own: shallowRef<HTMLElement | null>(null) })\n const mobilePlacement = computed(() =>\n props.mobileVariant === \"alert\"\n ? \"center\"\n : props.mobilePlacement ?? (props.mobileVariant === \"sheet\" ? \"bottom\" : undefined),\n )\n const rootContext = injectDialogRootContext()\n // Radix's root makes the content id; Reka's trigger does, so a dialog\n // without one would render `id=\"\"`\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Reka replaces the root's content ref as it mounts, so the layer is found from the panel once it is in place\n const panelNode = shallowRef<HTMLElement | null>(null)\n let stopViewport: (() => void) | undefined\n watch(\n [panelNode, portalTarget],\n ([panel, box]) => {\n stopViewport?.()\n const content = panel?.closest<HTMLElement>(\"[data-plex-dialog]\")\n stopViewport = content ? watchDialogViewport(content, box) : undefined\n },\n { flush: \"post\", immediate: true },\n )\n onBeforeUnmount(() => stopViewport?.())\n\n const handleCloseAutoFocus = (rekaEvent: Event) => {\n // Reka announces unmount before descendant scopes release their traps.\n // Match Radix (and our Menu adapter): dispatch the cancellable callback\n // on the detached content, so custom focus restoration is not trapped.\n rekaEvent.preventDefault()\n const container = rekaEvent.target instanceof HTMLElement ? rekaEvent.target : rootContext.contentElement.value\n const trigger = rootContext.triggerElement.value\n setTimeout(() => {\n const event = new CustomEvent(rekaEvent.type, { bubbles: false, cancelable: true })\n const restoreFocus = (closeEvent: Event) => {\n props.onCloseAutoFocus?.(closeEvent)\n keepMovedFocus(closeEvent)\n if (!closeEvent.defaultPrevented) trigger?.focus()\n }\n if (!container) return restoreFocus(event)\n container.addEventListener(event.type, restoreFocus)\n container.dispatchEvent(event)\n container.removeEventListener(event.type, restoreFocus)\n }, 0)\n }\n\n // Escape goes through the shared stack, as in React, so the dialog\n // closes before overlays opened earlier (a forced-open Tooltip)\n useEscCloseStack(open, (event) => {\n if (props.onEscapeKeyDown) {\n const request = cancelableKeyCopy(event)\n props.onEscapeKeyDown(request)\n if (request.defaultPrevented) return\n }\n setOpen(false)\n })\n\n // The second click of a double click lands on the overlay: it must not undo the first\n let openedAt = 0\n\n // The owner's handler comes first; a prevented interaction keeps the dialog open\n const ownerKeepsOpen = (event: DialogInteractOutsideEvent) => {\n props.onInteractOutside?.(event)\n return event.defaultPrevented\n }\n // Radix's modal content: a Ctrl+click (macOS right click) does not dismiss. A deferred press asks the owner when\n // the click completes it, as Radix does, so a form that changed meanwhile can still forbid closing.\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n const request = new CustomEvent(\"dismissableLayer.pointerDownOutside\", { cancelable: true, detail: { originalEvent } })\n if (ownerKeepsOpen(request)) return\n if (!originalEvent.ctrlKey && performance.now() - openedAt >= DOUBLE_CLICK) setOpen(false)\n }, () => rootContext.contentElement.value)\n const handlePointerDownOutside = (event: Parameters<typeof outsidePress.onPointerDownOutside>[0]) => {\n // The native modal owner outlives logical open. An exiting layer must not\n // start a deferred dismissal that closes a trigger-driven reopen.\n if (!open.value) return event.preventDefault()\n // A press in a toast is not outside: the toast region is a layer above the dialog. The Toaster stops it\n // before Reka sees it; this holds when the Toaster mounted after the dialog.\n if (inToastRegion(event.detail.originalEvent.target)) return event.preventDefault()\n // A primary mouse or pen press waits for its click; a touch or another button dismisses now, as Reka does\n const { originalEvent } = event.detail\n if (originalEvent.button === 0 && originalEvent.pointerType !== \"touch\") return outsidePress.onPointerDownOutside(event)\n if (!ownerKeepsOpen(event as DialogInteractOutsideEvent)) outsidePress.onPointerDownOutside(event)\n }\n // Focus moving out while a press waits for its click is that press, as on Radix: the owner hears of it once\n const handleFocusOutside = (event: Parameters<typeof outsidePress.onFocusOutside>[0]) => {\n if (inToastRegion((event as DialogInteractOutsideEvent).detail?.originalEvent.target)) return event.preventDefault()\n outsidePress.onFocusOutside(event)\n if (!event.defaultPrevented) props.onInteractOutside?.(event as DialogInteractOutsideEvent)\n }\n const handleInteractOutside = (event: Event) => {\n if (!open.value) event.preventDefault()\n }\n watch(\n open,\n (isOpen) => {\n if (isOpen) openedAt = performance.now()\n else outsidePress.reset()\n },\n { immediate: true },\n )\n\n const boundary = provideFloatingBoundaryScope()\n let panelElement: HTMLElement | undefined\n let detachDrag: (() => void) | undefined\n let barObserver: ResizeObserver | undefined\n let barChildren: MutationObserver | undefined\n const setPanelRef = (instance: unknown) => {\n const element = instance instanceof HTMLElement ? instance : undefined\n if (element === panelElement) return\n detachDrag?.()\n barObserver?.disconnect()\n barChildren?.disconnect()\n detachDrag = undefined\n panelElement = element\n panelNode.value = element ?? null\n boundary.setRoot(element)\n if (element) {\n const update = () => {\n // A phone Toolbar takes the place of the header or footer bar on its side.\n // A phone Toolbar takes the place of the header or footer bar on its side: one the dialog places itself\n // before the bar its header becomes.\n const header = element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}:not([data-dialog-bar])`)\n ?? element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}`)\n ?? element.querySelector<HTMLElement>(`:scope > .${s.Header}`)\n const footer = element.querySelector<HTMLElement>(`:scope > ${BOTTOM_TOOLBAR}`) ?? element.querySelector<HTMLElement>(`:scope > .${s.Footer}`)\n element.style.setProperty(\"--dialog-header-height\", `${header?.offsetHeight ?? 0}px`)\n element.style.setProperty(\"--dialog-footer-height\", `${footer?.offsetHeight ?? 0}px`)\n }\n barObserver = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n const observeBars = () => {\n barObserver?.disconnect()\n element.querySelectorAll<HTMLElement>(`:scope > .${s.Header}, :scope > .${s.Footer}, :scope > [data-toolbar]`)\n .forEach((bar) => barObserver?.observe(bar, { box: \"border-box\" }))\n update()\n }\n observeBars()\n barChildren = new MutationObserver(observeBars)\n barChildren.observe(element, { childList: true })\n }\n if (element && mobilePlacement.value === \"bottom\") {\n detachDrag = attachSheetDrag(element, () => setOpen(false))\n }\n }\n\n watch(mobilePlacement, () => {\n detachDrag?.()\n detachDrag = panelElement && mobilePlacement.value === \"bottom\"\n ? attachSheetDrag(panelElement, () => setOpen(false))\n : undefined\n })\n onBeforeUnmount(() => { detachDrag?.(); barObserver?.disconnect(); barChildren?.disconnect() })\n\n let overlayElement: Element | undefined\n const setOverlayRef = (instance: unknown) => {\n const el = (instance as { $el?: unknown } | null)?.$el\n const element = el instanceof Element ? el : undefined\n if (element === overlayElement) return\n if (overlayElement) dismissableSurfaces.delete(overlayElement)\n overlayElement = element\n if (element) dismissableSurfaces.add(element)\n }\n\n const renderDialog = () =>\n h(DialogSurface, { key: \"dialog\" }, () => [\n h(RekaDialogOverlay, {\n ...props.overlayProps,\n class: [s.Overlay, props.overlayProps?.class],\n style: [layerStyle(), props.overlayProps?.style],\n forceMount: true,\n ref: setOverlayRef,\n \"data-state\": open.value ? \"open\" : \"closed\",\n }),\n h(\n RekaDialogContent,\n {\n ...dataAttributes(attrs),\n ...props.rootProps,\n \"forceMount\": true,\n \"class\": [s.Content, props.rootProps?.class],\n \"data-plex-dialog\": \"\",\n \"style\": [toCssVariables({ \"dialog-width\": props.width }), layerStyle(), props.rootProps?.style],\n \"data-placement\": props.placement === \"center\" ? undefined : props.placement,\n \"data-mobile-placement\": mobilePlacement.value,\n \"data-mobile-variant\": props.mobileVariant,\n \"data-surface\": props.surface,\n \"data-state\": open.value ? \"open\" : \"closed\",\n \"data-pill\": props.pill ? \"\" : undefined,\n \"onOpenAutoFocus\": props.onOpenAutoFocus,\n \"onCloseAutoFocus\": handleCloseAutoFocus,\n // Radix labels and describes the content only by mounted parts\n ...(titleCount.value > 0 ? {} : { \"aria-labelledby\": undefined }),\n ...(descriptionCount.value > 0 ? {} : { \"aria-describedby\": undefined }),\n \"onEscapeKeyDown\": preventDefaultHandler,\n \"onPointerDownOutside\": handlePointerDownOutside,\n \"onFocusOutside\": handleFocusOutside,\n \"onInteractOutside\": handleInteractOutside,\n },\n {\n default: () => [\n // The native Content is the sole focus owner while open, so it\n // keeps tracking replacement inputs. Activate this non-trapping\n // scope only during logical exit to pause the retained modal owner.\n // A second live trap would leave the paused native scope tracking\n // removed inputs; its mutation fallback could then select current text.\n h(RekaFocusScope, {\n asChild: true,\n present: !open.value,\n loop: false,\n trapped: false,\n onMountAutoFocus: preventDefaultHandler,\n onUnmountAutoFocus: preventDefaultHandler,\n }, () => h(\"div\", { class: [s.Panel, attrs.class], ref: setPanelRef }, [\n props.showClose\n ? h(DialogClose, null, {\n default: () => [\n h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"class\": s.CloseButton, \"aria-label\": \"Close dialog\" }),\n ],\n })\n : null,\n slots.default?.(),\n ])),\n ],\n },\n ),\n ])\n\n const layerStyle = () => toCssVariables({ \"dialog-z-index\": props.zIndex === undefined ? undefined : String(props.zIndex) })\n\n return () => {\n const { placement } = props\n const crossesScreen =\n placement === \"bottom\" || placement === \"start\" || placement === \"end\" || placement === \"fullscreen\" || mobilePlacement.value === \"bottom\" || mobilePlacement.value === \"fullscreen\"\n // Portaled out of any phone layout, a phone dialog carries its own scope, above its transition: the phone rules\n // of the style sheet start there.\n const scoped = (group: VNode) =>\n phoneLayout.value && !portalTarget.value ? h(\"div\", { class: s.PhoneScope, \"data-plex-layout\": \"phone\" }, [group]) : group\n return h(RekaDialogPortal, { to: portalTarget.value ?? undefined }, {\n default: () => [\n scoped(h(\n TransitionGroup,\n // A dialog mounted open enters too, as `v-if` and `open` together do\n {\n class: s.Transition,\n ...(crossesScreen ? overlayTimingLarge : overlayTiming),\n overlay: true,\n preventInitialTransition: false,\n },\n // `open && <div>` in React: closed still renders the empty wrapper\n { default: () => [open.value ? renderDialog() : createCommentVNode()] },\n )),\n ],\n })\n }\n },\n})\n\n/** How a Sheet's bar meets the content scrolled under it; see `BarBackground`. */\nexport type DialogBarBackground = BarBackground\n\n// The header's own parts, fragments opened up, so its actions can stand at the end of the bar\nconst headerParts = (children: VNodeArrayChildren | undefined): VNodeArrayChildren =>\n (children ?? []).flatMap((part) =>\n isVNode(part) && part.type === FragmentVNode ? headerParts(part.children as VNodeArrayChildren) : Array.isArray(part) ? headerParts(part) : [part])\nconst isHeaderAction = (part: unknown) => isVNode(part) && part.type === DialogHeaderAction\nconst isDescription = (part: unknown) => isVNode(part) && part.type === DialogDescription\n\n// The parts it holds stand outside the header's bar, as React's descriptions stand outside the bar's provider\nconst OutsideBar = defineComponent({\n name: \"DialogOutsideBar\",\n setup(_props, { slots }) {\n provide(DIALOG_BAR, computed(() => false))\n return () => slots.default?.()\n },\n})\n\nexport const DialogHeader = defineComponent({\n name: \"DialogHeader\",\n // A phone Sheet's header is the bar and the description under it: its attributes go to the bar\n inheritAttrs: false,\n props: {\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"glass\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"glass\" },\n },\n setup(props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const bar = computed(() => !!sheet?.value && phone.value)\n provide(DIALOG_BAR, bar)\n return () => {\n if (!bar.value) return h(\"div\", mergeProps({ \"class\": s.Header, \"data-background\": props.background, \"data-scrolled\": scroll?.scrolled.value ? \"\" : undefined }, attrs), slots.default?.())\n const parts = headerParts(slots.default?.())\n const descriptions = parts.filter(isDescription)\n const slot = descriptionSlot ? descriptionSlot.own.value ?? descriptionSlot.body.value : null\n // On a phone the header of a Sheet is its Toolbar (iOS 27 kit Sheets 507-24684, Toolbar - Top - iPhone\n // 1-54520): Close at the leading edge, the title alone centered on the row of controls, the header actions\n // at the trailing edge, all on one 44px row under the grabber.\n return [\n h(Toolbar, mergeProps({ \"background\": props.background, \"data-dialog-bar\": \"\" }, attrs), () => [\n sheet?.value?.showClose\n ? h(ToolbarLeading, { class: s.BarClose }, () => [\n h(DialogClose, null, { default: () => [h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"aria-label\": \"Close dialog\" })] }),\n ])\n : null,\n h(\"div\", { class: [t.Heading, s.BarHeading] }, parts.filter((part) => !isHeaderAction(part) && !isDescription(part))),\n ...parts.filter(isHeaderAction),\n ]),\n // The description reads as the first text of the content, at the top of DialogBody when there is one\n descriptions.length > 0\n ? h(Teleport, { to: slot, disabled: !slot }, [h(\"div\", { class: s.SheetDescription }, [h(OutsideBar, null, () => descriptions)])])\n : null,\n ]\n }\n },\n})\n\nexport const DialogHeaderAction = defineComponent({\n name: \"DialogHeaderAction\",\n setup(_props, { slots }) {\n const bar = inject(DIALOG_BAR, null)\n return () => (bar?.value ? h(ToolbarTrailing, null, () => slots.default?.()) : h(\"div\", { class: s.HeaderAction }, slots.default?.()))\n },\n})\n\n/** The scrolling part between DialogHeader and DialogFooter: with it, only the body scrolls. */\nexport const DialogBody = defineComponent({\n name: \"DialogBody\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setDescriptionSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.body.value = slot instanceof HTMLElement ? slot : null\n }\n const element = ref<HTMLElement | null>(null)\n let stop: (() => void) | undefined\n onMounted(() => {\n if (!element.value || !scroll) return\n stop = observeScrollEdges(element.value, (edges) => {\n scroll.scrolled.value = edges.scrolled\n scroll.contentBelow.value = edges.contentBelow\n })\n })\n onBeforeUnmount(() => {\n stop?.()\n if (scroll) { scroll.scrolled.value = false; scroll.contentBelow.value = false }\n })\n return () => h(\"div\", { ref: element, class: [s.Body, attrs.class] }, [\n sheet?.value && phone.value ? h(\"div\", { ref: setDescriptionSlot, class: s.SheetDescriptionSlot }) : null,\n slots.default?.(),\n ])\n },\n})\n\n/**\n * Where a phone Sheet's description goes in content of your own, such as a scroller inside a form so that Enter\n * submits: the description starts it, as it starts DialogBody, and it comes before the body's place. It renders\n * nothing outside a phone Sheet.\n */\nexport const DialogDescriptionSlot = defineComponent({\n name: \"DialogDescriptionSlot\",\n setup() {\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setOwnSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.own.value = slot instanceof HTMLElement ? slot : null\n }\n return () => (sheet?.value && phone.value ? h(\"div\", { ref: setOwnSlot, class: s.SheetDescriptionSlot }) : null)\n },\n})\n\nexport const DialogFooter = defineComponent({\n name: \"DialogFooter\",\n props: {\n /** Override the mobile action layout. Alerts default to inline; sheets to stacked. */\n mobileLayout: String as PropType<\"inline\" | \"stacked\">,\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"soft\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"soft\" },\n },\n setup(props, { slots }) {\n const boundary = useFloatingBoundaryRegistration()\n const scroll = inject(DIALOG_SCROLL, null)\n return () => h(\"div\", {\n \"ref\": boundary?.setFooter,\n \"class\": s.Footer,\n \"data-mobile-layout\": props.mobileLayout,\n \"data-background\": props.background,\n \"data-content-below\": scroll?.contentBelow.value ? \"\" : undefined,\n }, slots.default?.())\n },\n})\n\n/** Counts a mounted part, as Radix's title and description counts do. */\nconst useMountedCount = (count: Ref<number>) => {\n onMounted(() => {\n count.value++\n })\n onBeforeUnmount(() => {\n count.value--\n })\n}\n\nexport const DialogTitle = defineComponent({\n name: \"DialogTitle\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().titleCount)\n const bar = inject(DIALOG_BAR, null)\n return () => h(RekaDialogTitle, { class: bar?.value ? t.Title : s.Title }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogDescription = defineComponent({\n name: \"DialogDescription\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().descriptionCount)\n const bar = inject(DIALOG_BAR, null)\n const element = ref<{ $el?: Element } | Element | null>(null)\n const shown = ref(false)\n // The header leaves its own descriptions out of the bar. One the bar still holds, inside a part of the\n // header's own, is the title's second line (Toolbar's subtitle) when the reader sees it; one that is only\n // read out, visually hidden, leaves the title on its one line.\n const measure = () => {\n const node = element.value instanceof Element ? element.value : element.value?.$el\n shown.value = !!bar?.value && node instanceof HTMLElement && node.offsetHeight > 1 && node.offsetWidth > 1\n }\n onMounted(measure)\n watch(() => bar?.value, () => queueMicrotask(measure))\n return () => h(RekaDialogDescription, { ref: element, class: bar?.value && shown.value ? t.Subtitle : s.Description }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogClose = defineComponent({\n name: \"DialogClose\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const onClick = (event: Event) => {\n if (!event.defaultPrevented) rootContext.onOpenChange(false)\n }\n return () => withDialogProps(firstElementChild(slots.default?.()), { type: \"button\" }, onClick)\n },\n})\n\n/** The steps of a flow inside a dialog, such as a sign-in that asks for an email and then a code. */\nexport const DialogSteps = defineComponent({\n name: \"DialogSteps\",\n props: {\n /** The step on screen. A new value brings its content in. */\n step: { type: [String, Number] as PropType<string | number>, required: true },\n /**\n * `forward` brings the new step in from the trailing edge over the one before, as a push on iOS; `back` returns\n * to a step before it.\n * @default \"forward\"\n */\n direction: { type: String as PropType<\"forward\" | \"back\">, default: \"forward\" },\n },\n setup(props, { slots }) {\n return () => {\n // Resolve this step now, so a step that leaves cannot read the next one\n const entry = h(\"div\", { \"key\": props.step, \"data-dialog-step\": \"\", \"tabindex\": -1 }, slots.default?.())\n return h(\"div\", { \"class\": s.Steps, \"data-direction\": props.direction }, [\n h(TransitionGroup, {\n ...STEP_TIMING,\n as: \"div\",\n overlay: true,\n class: s.Step,\n onEnter: enterStep,\n onExit: leaveStep,\n onExitActive: settleStepHeight,\n onExitComplete: releaseStepHeight,\n }, () => [entry]),\n ])\n }\n },\n})\n\nexport type DialogProps = InstanceType<typeof Dialog>[\"$props\"]\n\nexport type DialogPlacement = \"center\" | \"top\" | \"bottom\" | \"start\" | \"end\" | \"fullscreen\"\n\n/** A press or a focus outside the dialog; `event.detail.originalEvent` is the browser's event. */\nexport type DialogInteractOutsideEvent = CustomEvent<{ originalEvent: PointerEvent | FocusEvent }>\n\n/** Class, style and data attributes for one of the dialog's layers. */\nexport type DialogLayerProps = {\n class?: HTMLAttributes[\"class\"]\n style?: string | CSSProperties\n [dataAttribute: `data-${string}`]: string | number | boolean | undefined\n}\n\n/** DialogContent props; `class` lands on the panel, like `className` in React. */\nexport type DialogContentProps = InstanceType<typeof DialogContent>[\"$props\"] & { class?: HTMLAttributes[\"class\"] }\n\nexport type DialogHeaderProps = InstanceType<typeof DialogHeader>[\"$props\"]\nexport type DialogFooterProps = InstanceType<typeof DialogFooter>[\"$props\"]\nexport type DialogStepsProps = InstanceType<typeof DialogSteps>[\"$props\"]\n"]}
1
+ {"version":3,"file":"Dialog.js","sourceRoot":"","sources":["../../../../src/components/Dialog/Dialog.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,QAAQ,IAAI,aAAa,EACzB,CAAC,EACD,MAAM,EACN,eAAe,EACf,SAAS,EACT,WAAW,EACX,OAAO,EACP,GAAG,EACH,UAAU,EACV,QAAQ,EACR,KAAK,EASL,OAAO,EACP,UAAU,GACX,MAAM,KAAK,CAAA;AACZ,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,iBAAiB,IAAI,qBAAqB,EAC1C,aAAa,IAAI,iBAAiB,EAClC,YAAY,IAAI,gBAAgB,EAChC,UAAU,IAAI,cAAc,EAC5B,WAAW,IAAI,eAAe,EAC9B,UAAU,IAAI,cAAc,EAC5B,uBAAuB,EACvB,gBAAgB,EAChB,KAAK,GACN,MAAM,SAAS,CAAA;AAChB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAA;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC/H,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAA;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACz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AO,CAAC,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,KAAK,EAAE,gBAAgB,EAAE,KAAK,CAAC,SAAS,EAAE,EAAE;gBACvE,CAAC,CAAC,eAAe,EAAE;oBACjB,GAAG,WAAW;oBACd,EAAE,EAAE,KAAK;oBACT,OAAO,EAAE,IAAI;oBACb,KAAK,EAAE,CAAC,CAAC,IAAI;oBACb,OAAO,EAAE,SAAS;oBAClB,MAAM,EAAE,SAAS;oBACjB,YAAY,EAAE,gBAAgB;oBAC9B,cAAc,EAAE,iBAAiB;iBAClC,EAAE,GAAG,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC;aAClB,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import {\n cloneVNode,\n computed,\n createCommentVNode,\n defineComponent,\n Fragment as FragmentVNode,\n h,\n inject,\n onBeforeUnmount,\n onMounted,\n onUnmounted,\n provide,\n ref,\n shallowRef,\n Teleport,\n watch,\n type ComputedRef,\n type CSSProperties,\n type HTMLAttributes,\n type InjectionKey,\n type PropType,\n type Ref,\n type VNode,\n type VNodeArrayChildren,\n isVNode,\n mergeProps,\n} from \"vue\"\nimport {\n DialogContent as RekaDialogContent,\n DialogDescription as RekaDialogDescription,\n DialogOverlay as RekaDialogOverlay,\n DialogPortal as RekaDialogPortal,\n DialogRoot as RekaDialogRoot,\n DialogTitle as RekaDialogTitle,\n FocusScope as RekaFocusScope,\n injectDialogRootContext,\n useForwardExpose,\n useId,\n} from \"reka-ui\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { inToastRegion } from \"../../lib/toastRegion.js\"\nimport { cancelableKeyCopy, dataAttributes, keepMovedFocus, preventDefaultHandler, toCssVariables } from \"../../lib/helpers.js\"\nimport { dismissableSurfaces, useDeferredPointerDownOutside } from \"../Popover/deferredPointerDownOutside.js\"\nimport { firstElementChild } from \"../Tooltip/slot.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport { attachSheetDrag } from \"./sheetDrag.js\"\nimport { watchDialogViewport } from \"./dialogViewport.js\"\nimport { enterStep, leaveStep, releaseStepHeight, settleStepHeight, STEP_TIMING } from \"./dialogSteps.js\"\nimport { PHONE_LAYOUT as PHONE_LAYOUT_SCOPE, type PhoneLayoutValue } from \"../PhoneLayout/PhoneLayout.js\"\nimport { overlayTiming, overlayTimingLarge } from \"../Transition/shared.js\"\nimport { provideFloatingBoundaryScope, useFloatingBoundaryRegistration } from \"../../composables/useFloatingBoundary.js\"\nimport { NavigationButton } from \"../Button/NavigationButton.js\"\nimport { TOOLBAR_HOST, Toolbar, ToolbarLeading, ToolbarTrailing, type BarBackground } from \"../Toolbar/Toolbar.js\"\nimport { observeScrollEdges } from \"../../lib/scrollEdges.js\"\nimport s from \"@plexui/styles/components/Dialog/Dialog.module.css\"\nimport t from \"@plexui/styles/components/Toolbar/Toolbar.module.css\"\n\nconst DOUBLE_CLICK = 300\n\n/** Where content lies under the bars: DialogBody reports it, the bars show their lines with it. */\ntype DialogScroll = { scrolled: Ref<boolean>; contentBelow: Ref<boolean> }\nconst DIALOG_SCROLL: InjectionKey<DialogScroll> = Symbol(\"DialogScroll\")\n// What the header of a Sheet needs from its content to become the Sheet's bar on a phone\ntype DialogSheet = { showClose: boolean }\nconst DIALOG_SHEET: InjectionKey<ComputedRef<DialogSheet | null>> = Symbol(\"DialogSheet\")\n// Inside that bar: the title, the description and the header actions take the Toolbar's parts\nconst DIALOG_BAR: InjectionKey<ComputedRef<boolean>> = Symbol(\"DialogBar\")\n// Where DialogBody takes a phone Sheet's description: the first text of the content, under the bar\n// Where a phone Sheet's description goes: the top of DialogBody, or first a DialogDescriptionSlot of the content's own\ntype DialogDescriptionSlots = { body: Ref<HTMLElement | null>; own: Ref<HTMLElement | null> }\nconst DIALOG_DESCRIPTION_SLOT: InjectionKey<DialogDescriptionSlots> = Symbol(\"DialogDescriptionSlot\")\n\n// The phone layout of the Dialog style sheet (its rules for the Sheet's bar use the same query). A dialog's content\n// mounts on the client only (its portal waits for the document), so it reads the layout as it mounts, with nothing to\n// swap after it.\nconst PHONE_LAYOUT = \"(width <= 767px)\"\nconst phoneLayout = () => (typeof window !== \"undefined\" && typeof window.matchMedia === \"function\" ? window.matchMedia(PHONE_LAYOUT) : null)\nconst usePhoneLayout = (): Readonly<Ref<boolean>> => {\n // Inside a PhoneLayout, or a dialog with `layout=\"phone\"`, at any window width\n const scope = inject(PHONE_LAYOUT_SCOPE, null)\n const query = phoneLayout()\n const narrow = ref(query?.matches ?? false)\n const phone = computed(() => !!scope?.phone.value || narrow.value)\n const update = () => { narrow.value = !!query?.matches }\n if (!query) return phone\n // Safari before 14 has only the older listener methods\n if (typeof query.addEventListener !== \"function\") {\n query.addListener(update)\n onBeforeUnmount(() => query.removeListener(update))\n } else {\n query.addEventListener(\"change\", update)\n onBeforeUnmount(() => query.removeEventListener(\"change\", update))\n }\n return phone\n}\n\n// Vue port of packages/ui/src/components/Dialog/Dialog.tsx on Reka UI\n// (the Vue lineage of Radix, same anatomy). Exports are flat (`Dialog`,\n// `DialogTrigger`, ...) because runtime-compiled templates cannot resolve\n// `Dialog.Trigger` from the `components` option.\n//\n// Where Reka differs from Radix (radix-ui 1.8), the port follows Radix:\n// - The content is labelled and described only while a DialogTitle /\n// DialogDescription is mounted.\n// - A press outside (the overlay) closes it on the click that follows\n// (../Popover/deferredPointerDownOutside.ts); the overlay is a dismiss\n// surface.\n// - The portal renders once mounted, so a closed dialog server-renders\n// nothing.\n\ntype DialogContextValue = {\n open: ComputedRef<boolean>\n setOpen: (nextState: boolean) => void\n /** Mounted DialogTitle / DialogDescription parts (Radix's title and description counts) */\n titleCount: Ref<number>\n descriptionCount: Ref<number>\n /** Retain the native modal owner until its animated subtree actually unmounts. */\n mountedSurfaces: Ref<number>\n}\n\nconst DialogContextKey: InjectionKey<DialogContextValue> = Symbol(\"PlexUIDialog\")\n\nconst useDialogContext = () => {\n const context = inject(DialogContextKey, null)\n\n if (!context) {\n throw new Error(\"Dialog compound components must be used inside <Dialog>\")\n }\n\n return context\n}\n\n/** Modal dialog root. Uncontrolled by default; bind `v-model:open` to control it. */\nexport const Dialog = defineComponent({\n name: \"Dialog\",\n props: {\n open: { type: Boolean, default: undefined },\n },\n emits: {\n \"update:open\": (open: boolean) => typeof open === \"boolean\",\n },\n setup(props, { slots, emit }) {\n const internalOpen = ref(false)\n const isOpen = computed(() => props.open ?? internalOpen.value)\n const mountedSurfaces = ref(0)\n const nativeOpen = computed(() => isOpen.value || mountedSurfaces.value > 0)\n\n const setOpen = (nextState: boolean) => {\n emit(\"update:open\", nextState)\n internalOpen.value = nextState\n }\n\n provide(DialogContextKey, { open: isOpen, setOpen, titleCount: ref(0), descriptionCount: ref(0), mountedSurfaces })\n\n return () =>\n h(RekaDialogRoot, { \"open\": nativeOpen.value, \"onUpdate:open\": setOpen }, { default: () => slots.default?.() })\n },\n})\n\n// Trigger and Close render their child with the dialog wiring merged in,\n// like Reka's `asChild` parts, but run the dialog action after the child's\n// own click handlers and skip it when one called preventDefault() (Radix's\n// composeEventHandlers). Reka's parts run first and cannot be cancelled.\n// Attributes the child sets itself win, as with Radix and Reka slots. The\n// child is the first element, also through a forwarded `<slot />`.\nconst withDialogProps = (\n child: VNode | undefined,\n props: Record<string, unknown>,\n onClick: (event: Event) => void,\n ref?: (el: unknown) => void,\n) => {\n if (!child) return null\n const own = child.props ?? {}\n const extra = Object.fromEntries(Object.entries(props).filter(([key]) => !(key in own)))\n return cloneVNode(child, { ...extra, onClick, ...(ref ? { ref } : {}) }, true)\n}\n\nexport const DialogTrigger = defineComponent({\n name: \"DialogTrigger\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const { open, setOpen } = useDialogContext()\n const { forwardRef, currentElement } = useForwardExpose()\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Focus returns here when the dialog closes\n onMounted(() => {\n rootContext.triggerElement.value = currentElement.value\n })\n\n const onClick = (event: Event) => {\n if (!event.defaultPrevented) setOpen(!open.value)\n }\n\n return () => {\n const isOpen = open.value\n return withDialogProps(\n firstElementChild(slots.default?.()),\n {\n \"type\": \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": isOpen || false,\n \"aria-controls\": isOpen ? rootContext.contentId : undefined,\n \"data-state\": isOpen ? \"open\" : \"closed\",\n },\n onClick,\n forwardRef as (el: unknown) => void,\n )\n }\n },\n})\n\n// Reka 2.11's force-mounted Dialog releases hideOthers when its `present`\n// becomes false, then calls the same non-idempotent cleanup again on unmount.\n// Keep its public Root open until this transition-owned subtree unmounts.\n// The logical open state still drives Plex triggers, events and exit rendering.\nconst DialogSurface = defineComponent({\n name: \"DialogSurface\",\n setup(_props, { slots }) {\n const { mountedSurfaces } = useDialogContext()\n onMounted(() => { mountedSurfaces.value++ })\n // Descendant Reka cleanup runs first; never send it present=false while alive.\n onUnmounted(() => { mountedSurfaces.value-- })\n return () => h(\"div\", slots.default?.())\n },\n})\n\n/** Overlay and panel. `class` lands on the panel, like `className` in React. */\nconst TOP_TOOLBAR = '[data-toolbar][data-placement=\"top\"]'\nconst BOTTOM_TOOLBAR = '[data-toolbar][data-placement=\"bottom\"]'\n\nexport const DialogContent = defineComponent({\n name: \"DialogContent\",\n inheritAttrs: false,\n props: {\n /** Panel width; numbers are pixels. @default 480 */\n width: { type: [Number, String] as PropType<number | string>, default: 480 },\n /** Renders the close button in the top corner. @default true */\n showClose: { type: Boolean, default: true },\n /**\n * Rounder panel and a round close button, for dialogs that sit beside pill controls.\n * @default false\n */\n pill: { type: Boolean, default: false },\n /**\n * Where the panel sits: centered, near the top, a sheet along the bottom,\n * a full-height panel on the start or end side, or the whole screen.\n * @default \"center\"\n */\n placement: { type: String as PropType<DialogPlacement>, default: \"center\" },\n /** Placement at 767px and below, such as a bottom sheet on phones. @default placement */\n mobilePlacement: String as PropType<Extract<DialogPlacement, \"center\" | \"bottom\" | \"fullscreen\">>,\n /** Mobile presentation at 767px and below. Sheets default to bottom placement. */\n mobileVariant: String as PropType<\"alert\" | \"sheet\">,\n /** Mobile panel palette; dark mode uses elevated surfaces. @default \"plain\" */\n surface: { type: String as PropType<\"plain\" | \"grouped\">, default: \"plain\" },\n /** Called when focus moves into the dialog on open; `event.preventDefault()` keeps it for you to place. */\n onOpenAutoFocus: Function as PropType<(event: Event) => void>,\n /** Called when focus returns on close; `event.preventDefault()` keeps it elsewhere. */\n onCloseAutoFocus: Function as PropType<(event: Event) => void>,\n /**\n * Called on Escape before the dialog closes; `event.preventDefault()` keeps it open, such as for a form with\n * unsaved changes.\n */\n onEscapeKeyDown: Function as PropType<(event: KeyboardEvent) => void>,\n /**\n * Called on a press or a focus outside the dialog before it closes; `event.preventDefault()` keeps it open, such\n * as for a press on a developer panel over the page.\n */\n onInteractOutside: Function as PropType<(event: DialogInteractOutsideEvent) => void>,\n /** Stack order of the overlay and the dialog. @default 50 */\n zIndex: Number,\n /** Class, style and data attributes for the fixed layer that holds the panel. Data attributes of DialogContent land here too. */\n rootProps: Object as PropType<DialogLayerProps>,\n /** Class, style and data attributes for the overlay. */\n overlayProps: Object as PropType<DialogLayerProps>,\n /** `phone` lays the dialog out as on a phone at any window width. Inside a PhoneLayout it always is. @default \"auto\" */\n layout: { type: String as PropType<\"auto\" | \"phone\">, default: \"auto\" },\n },\n setup(props, { slots, attrs }) {\n const { open, setOpen, titleCount, descriptionCount } = useDialogContext()\n const outerPhoneLayout = inject(PHONE_LAYOUT_SCOPE, null)\n // A dialog laid out as on a phone by its own prop, outside a PhoneLayout, keeps the window: what it holds and\n // the dialogs it opens are phone ones too, for as long as the prop says so.\n const phoneLayout = computed(() => !!outerPhoneLayout?.phone.value || props.layout === \"phone\")\n const portalTarget = computed(() => outerPhoneLayout?.container.value ?? null)\n provide(PHONE_LAYOUT_SCOPE, { container: outerPhoneLayout?.container ?? shallowRef(null), phone: phoneLayout } satisfies PhoneLayoutValue)\n const scroll: DialogScroll = { scrolled: ref(false), contentBelow: ref(false) }\n provide(DIALOG_SCROLL, scroll)\n provide(TOOLBAR_HOST, { kind: \"dialog\", scrolled: scroll.scrolled, contentBelow: scroll.contentBelow })\n provide(DIALOG_SHEET, computed(() => (props.mobileVariant === \"sheet\" ? { showClose: props.showClose } : null)))\n // A dialog opened from a header action is not inside that header's bar\n provide(DIALOG_BAR, computed(() => false))\n provide(DIALOG_DESCRIPTION_SLOT, { body: shallowRef<HTMLElement | null>(null), own: shallowRef<HTMLElement | null>(null) })\n const mobilePlacement = computed(() =>\n props.mobileVariant === \"alert\"\n ? \"center\"\n : props.mobilePlacement ?? (props.mobileVariant === \"sheet\" ? \"bottom\" : undefined),\n )\n const rootContext = injectDialogRootContext()\n // Radix's root makes the content id; Reka's trigger does, so a dialog\n // without one would render `id=\"\"`\n rootContext.contentId ||= useId(undefined, \"reka-dialog-content\")\n // Reka replaces the root's content ref as it mounts, so the layer is found from the panel once it is in place\n const panelNode = shallowRef<HTMLElement | null>(null)\n let stopViewport: (() => void) | undefined\n watch(\n [panelNode, portalTarget],\n ([panel, box]) => {\n stopViewport?.()\n const content = panel?.closest<HTMLElement>(\"[data-plex-dialog]\")\n stopViewport = content ? watchDialogViewport(content, box) : undefined\n },\n { flush: \"post\", immediate: true },\n )\n onBeforeUnmount(() => stopViewport?.())\n\n const handleCloseAutoFocus = (rekaEvent: Event) => {\n // Reka announces unmount before descendant scopes release their traps.\n // Match Radix (and our Menu adapter): dispatch the cancellable callback\n // on the detached content, so custom focus restoration is not trapped.\n rekaEvent.preventDefault()\n const container = rekaEvent.target instanceof HTMLElement ? rekaEvent.target : rootContext.contentElement.value\n const trigger = rootContext.triggerElement.value\n setTimeout(() => {\n const event = new CustomEvent(rekaEvent.type, { bubbles: false, cancelable: true })\n const restoreFocus = (closeEvent: Event) => {\n props.onCloseAutoFocus?.(closeEvent)\n keepMovedFocus(closeEvent)\n if (!closeEvent.defaultPrevented) trigger?.focus()\n }\n if (!container) return restoreFocus(event)\n container.addEventListener(event.type, restoreFocus)\n container.dispatchEvent(event)\n container.removeEventListener(event.type, restoreFocus)\n }, 0)\n }\n\n // Escape goes through the shared stack, as in React, so the dialog\n // closes before overlays opened earlier (a forced-open Tooltip)\n useEscCloseStack(open, (event) => {\n if (props.onEscapeKeyDown) {\n const request = cancelableKeyCopy(event)\n props.onEscapeKeyDown(request)\n if (request.defaultPrevented) return\n }\n setOpen(false)\n })\n\n // The second click of a double click lands on the overlay: it must not undo the first\n let openedAt = 0\n\n // The owner's handler comes first; a prevented interaction keeps the dialog open\n const ownerKeepsOpen = (event: DialogInteractOutsideEvent) => {\n props.onInteractOutside?.(event)\n return event.defaultPrevented\n }\n // Radix's modal content: a Ctrl+click (macOS right click) does not dismiss. A deferred press asks the owner when\n // the click completes it, as Radix does, so a form that changed meanwhile can still forbid closing.\n const outsidePress = useDeferredPointerDownOutside((originalEvent) => {\n const request = new CustomEvent(\"dismissableLayer.pointerDownOutside\", { cancelable: true, detail: { originalEvent } })\n if (ownerKeepsOpen(request)) return\n if (!originalEvent.ctrlKey && performance.now() - openedAt >= DOUBLE_CLICK) setOpen(false)\n }, () => rootContext.contentElement.value)\n const handlePointerDownOutside = (event: Parameters<typeof outsidePress.onPointerDownOutside>[0]) => {\n // The native modal owner outlives logical open. An exiting layer must not\n // start a deferred dismissal that closes a trigger-driven reopen.\n if (!open.value) return event.preventDefault()\n // A press in a toast is not outside: the toast region is a layer above the dialog. The Toaster stops it\n // before Reka sees it; this holds when the Toaster mounted after the dialog.\n if (inToastRegion(event.detail.originalEvent.target)) return event.preventDefault()\n // A primary mouse or pen press waits for its click; a touch or another button dismisses now, as Reka does\n const { originalEvent } = event.detail\n if (originalEvent.button === 0 && originalEvent.pointerType !== \"touch\") return outsidePress.onPointerDownOutside(event)\n if (!ownerKeepsOpen(event as DialogInteractOutsideEvent)) outsidePress.onPointerDownOutside(event)\n }\n // Focus moving out while a press waits for its click is that press, as on Radix: the owner hears of it once\n const handleFocusOutside = (event: Parameters<typeof outsidePress.onFocusOutside>[0]) => {\n if (inToastRegion((event as DialogInteractOutsideEvent).detail?.originalEvent.target)) return event.preventDefault()\n outsidePress.onFocusOutside(event)\n if (!event.defaultPrevented) props.onInteractOutside?.(event as DialogInteractOutsideEvent)\n }\n const handleInteractOutside = (event: Event) => {\n if (!open.value) event.preventDefault()\n }\n watch(\n open,\n (isOpen) => {\n if (isOpen) openedAt = performance.now()\n else outsidePress.reset()\n },\n { immediate: true },\n )\n\n const boundary = provideFloatingBoundaryScope()\n let panelElement: HTMLElement | undefined\n let detachDrag: (() => void) | undefined\n let barObserver: ResizeObserver | undefined\n let barChildren: MutationObserver | undefined\n const setPanelRef = (instance: unknown) => {\n const element = instance instanceof HTMLElement ? instance : undefined\n if (element === panelElement) return\n detachDrag?.()\n barObserver?.disconnect()\n barChildren?.disconnect()\n detachDrag = undefined\n panelElement = element\n panelNode.value = element ?? null\n boundary.setRoot(element)\n if (element) {\n const update = () => {\n // A phone Toolbar takes the place of the header or footer bar on its side.\n // A phone Toolbar takes the place of the header or footer bar on its side: one the dialog places itself\n // before the bar its header becomes.\n const header = element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}:not([data-dialog-bar])`)\n ?? element.querySelector<HTMLElement>(`:scope > ${TOP_TOOLBAR}`)\n ?? element.querySelector<HTMLElement>(`:scope > .${s.Header}`)\n const footer = element.querySelector<HTMLElement>(`:scope > ${BOTTOM_TOOLBAR}`) ?? element.querySelector<HTMLElement>(`:scope > .${s.Footer}`)\n element.style.setProperty(\"--dialog-header-height\", `${header?.offsetHeight ?? 0}px`)\n element.style.setProperty(\"--dialog-footer-height\", `${footer?.offsetHeight ?? 0}px`)\n }\n barObserver = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(update) : undefined\n const observeBars = () => {\n barObserver?.disconnect()\n element.querySelectorAll<HTMLElement>(`:scope > .${s.Header}, :scope > .${s.Footer}, :scope > [data-toolbar]`)\n .forEach((bar) => barObserver?.observe(bar, { box: \"border-box\" }))\n update()\n }\n observeBars()\n barChildren = new MutationObserver(observeBars)\n barChildren.observe(element, { childList: true })\n }\n if (element && mobilePlacement.value === \"bottom\") {\n detachDrag = attachSheetDrag(element, () => setOpen(false))\n }\n }\n\n watch(mobilePlacement, () => {\n detachDrag?.()\n detachDrag = panelElement && mobilePlacement.value === \"bottom\"\n ? attachSheetDrag(panelElement, () => setOpen(false))\n : undefined\n })\n onBeforeUnmount(() => { detachDrag?.(); barObserver?.disconnect(); barChildren?.disconnect() })\n\n let overlayElement: Element | undefined\n const setOverlayRef = (instance: unknown) => {\n const el = (instance as { $el?: unknown } | null)?.$el\n const element = el instanceof Element ? el : undefined\n if (element === overlayElement) return\n if (overlayElement) dismissableSurfaces.delete(overlayElement)\n overlayElement = element\n if (element) dismissableSurfaces.add(element)\n }\n\n const renderDialog = () =>\n h(DialogSurface, { key: \"dialog\" }, () => [\n h(RekaDialogOverlay, {\n ...props.overlayProps,\n class: [s.Overlay, props.overlayProps?.class],\n style: [layerStyle(), props.overlayProps?.style],\n forceMount: true,\n ref: setOverlayRef,\n \"data-state\": open.value ? \"open\" : \"closed\",\n }),\n h(\n RekaDialogContent,\n {\n ...dataAttributes(attrs),\n ...props.rootProps,\n \"forceMount\": true,\n \"class\": [s.Content, props.rootProps?.class],\n \"data-plex-dialog\": \"\",\n \"style\": [toCssVariables({ \"dialog-width\": props.width }), layerStyle(), props.rootProps?.style],\n \"data-placement\": props.placement === \"center\" ? undefined : props.placement,\n \"data-mobile-placement\": mobilePlacement.value,\n \"data-mobile-variant\": props.mobileVariant,\n \"data-surface\": props.surface,\n \"data-state\": open.value ? \"open\" : \"closed\",\n \"data-pill\": props.pill ? \"\" : undefined,\n \"onOpenAutoFocus\": props.onOpenAutoFocus,\n \"onCloseAutoFocus\": handleCloseAutoFocus,\n // Radix labels and describes the content only by mounted parts\n ...(titleCount.value > 0 ? {} : { \"aria-labelledby\": undefined }),\n ...(descriptionCount.value > 0 ? {} : { \"aria-describedby\": undefined }),\n \"onEscapeKeyDown\": preventDefaultHandler,\n \"onPointerDownOutside\": handlePointerDownOutside,\n \"onFocusOutside\": handleFocusOutside,\n \"onInteractOutside\": handleInteractOutside,\n },\n {\n default: () => [\n // The native Content is the sole focus owner while open, so it\n // keeps tracking replacement inputs. Activate this non-trapping\n // scope only during logical exit to pause the retained modal owner.\n // A second live trap would leave the paused native scope tracking\n // removed inputs; its mutation fallback could then select current text.\n h(RekaFocusScope, {\n asChild: true,\n present: !open.value,\n loop: false,\n trapped: false,\n onMountAutoFocus: preventDefaultHandler,\n onUnmountAutoFocus: preventDefaultHandler,\n }, () => h(\"div\", { class: [s.Panel, attrs.class], ref: setPanelRef }, [\n props.showClose\n ? h(DialogClose, null, {\n default: () => [\n h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"class\": s.CloseButton, \"aria-label\": \"Close dialog\" }),\n ],\n })\n : null,\n slots.default?.(),\n ])),\n ],\n },\n ),\n ])\n\n const layerStyle = () => toCssVariables({ \"dialog-z-index\": props.zIndex === undefined ? undefined : String(props.zIndex) })\n\n return () => {\n const { placement } = props\n const crossesScreen =\n placement === \"bottom\" || placement === \"start\" || placement === \"end\" || placement === \"fullscreen\" || mobilePlacement.value === \"bottom\" || mobilePlacement.value === \"fullscreen\"\n // Portaled out of any phone layout, a phone dialog carries its own scope, above its transition: the phone rules\n // of the style sheet start there.\n const scoped = (group: VNode) =>\n phoneLayout.value && !portalTarget.value ? h(\"div\", { class: s.PhoneScope, \"data-plex-layout\": \"phone\" }, [group]) : group\n return h(RekaDialogPortal, { to: portalTarget.value ?? undefined }, {\n default: () => [\n scoped(h(\n TransitionGroup,\n // A dialog mounted open enters too, as `v-if` and `open` together do\n {\n class: s.Transition,\n ...(crossesScreen ? overlayTimingLarge : overlayTiming),\n overlay: true,\n preventInitialTransition: false,\n },\n // `open && <div>` in React: closed still renders the empty wrapper\n { default: () => [open.value ? renderDialog() : createCommentVNode()] },\n )),\n ],\n })\n }\n },\n})\n\n/** How a Sheet's bar meets the content scrolled under it; see `BarBackground`. */\nexport type DialogBarBackground = BarBackground\n\n// The header's own parts, fragments opened up, so its actions can stand at the end of the bar\nconst headerParts = (children: VNodeArrayChildren | undefined): VNodeArrayChildren =>\n (children ?? []).flatMap((part) =>\n isVNode(part) && part.type === FragmentVNode ? headerParts(part.children as VNodeArrayChildren) : Array.isArray(part) ? headerParts(part) : [part])\nconst isHeaderAction = (part: unknown) => isVNode(part) && part.type === DialogHeaderAction\nconst isDescription = (part: unknown) => isVNode(part) && part.type === DialogDescription\n\n// The parts it holds stand outside the header's bar, as React's descriptions stand outside the bar's provider\nconst OutsideBar = defineComponent({\n name: \"DialogOutsideBar\",\n setup(_props, { slots }) {\n provide(DIALOG_BAR, computed(() => false))\n return () => slots.default?.()\n },\n})\n\nexport const DialogHeader = defineComponent({\n name: \"DialogHeader\",\n // A phone Sheet's header is the bar and the description under it: its attributes go to the bar\n inheritAttrs: false,\n props: {\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"glass\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"glass\" },\n },\n setup(props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const bar = computed(() => !!sheet?.value && phone.value)\n provide(DIALOG_BAR, bar)\n return () => {\n if (!bar.value) return h(\"div\", mergeProps({ \"class\": s.Header, \"data-background\": props.background, \"data-scrolled\": scroll?.scrolled.value ? \"\" : undefined }, attrs), slots.default?.())\n const parts = headerParts(slots.default?.())\n const descriptions = parts.filter(isDescription)\n const slot = descriptionSlot ? descriptionSlot.own.value ?? descriptionSlot.body.value : null\n // On a phone the header of a Sheet is its Toolbar (iOS 27 kit Sheets 507-24684, Toolbar - Top - iPhone\n // 1-54520): Close at the leading edge, the title alone centered on the row of controls, the header actions\n // at the trailing edge, all on one 44px row 16px under the top edge.\n return [\n h(Toolbar, mergeProps({ \"background\": props.background, \"data-dialog-bar\": \"\" }, attrs), () => [\n sheet?.value?.showClose\n ? h(ToolbarLeading, { class: s.BarClose }, () => [\n h(DialogClose, null, { default: () => [h(NavigationButton, { \"action\": \"close\", \"variant\": \"ghost\", \"aria-label\": \"Close dialog\" })] }),\n ])\n : null,\n h(\"div\", { class: [t.Heading, s.BarHeading] }, parts.filter((part) => !isHeaderAction(part) && !isDescription(part))),\n ...parts.filter(isHeaderAction),\n ]),\n // The description reads as the first text of the content, at the top of DialogBody when there is one\n descriptions.length > 0\n ? h(Teleport, { to: slot, disabled: !slot }, [h(\"div\", { class: s.SheetDescription }, [h(OutsideBar, null, () => descriptions)])])\n : null,\n ]\n }\n },\n})\n\nexport const DialogHeaderAction = defineComponent({\n name: \"DialogHeaderAction\",\n setup(_props, { slots }) {\n const bar = inject(DIALOG_BAR, null)\n return () => (bar?.value ? h(ToolbarTrailing, null, () => slots.default?.()) : h(\"div\", { class: s.HeaderAction }, slots.default?.()))\n },\n})\n\n/** The scrolling part between DialogHeader and DialogFooter: with it, only the body scrolls. */\nexport const DialogBody = defineComponent({\n name: \"DialogBody\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const scroll = inject(DIALOG_SCROLL, null)\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setDescriptionSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.body.value = slot instanceof HTMLElement ? slot : null\n }\n const element = ref<HTMLElement | null>(null)\n let stop: (() => void) | undefined\n onMounted(() => {\n if (!element.value || !scroll) return\n stop = observeScrollEdges(element.value, (edges) => {\n scroll.scrolled.value = edges.scrolled\n scroll.contentBelow.value = edges.contentBelow\n })\n })\n onBeforeUnmount(() => {\n stop?.()\n if (scroll) { scroll.scrolled.value = false; scroll.contentBelow.value = false }\n })\n return () => h(\"div\", { ref: element, class: [s.Body, attrs.class] }, [\n sheet?.value && phone.value ? h(\"div\", { ref: setDescriptionSlot, class: s.SheetDescriptionSlot }) : null,\n slots.default?.(),\n ])\n },\n})\n\n/**\n * Where a phone Sheet's description goes in content of your own, such as a scroller inside a form so that Enter\n * submits: the description starts it, as it starts DialogBody, and it comes before the body's place. It renders\n * nothing outside a phone Sheet.\n */\nexport const DialogDescriptionSlot = defineComponent({\n name: \"DialogDescriptionSlot\",\n setup() {\n const sheet = inject(DIALOG_SHEET, null)\n const descriptionSlot = inject(DIALOG_DESCRIPTION_SLOT, null)\n const phone = usePhoneLayout()\n const setOwnSlot = (slot: unknown) => {\n if (descriptionSlot) descriptionSlot.own.value = slot instanceof HTMLElement ? slot : null\n }\n return () => (sheet?.value && phone.value ? h(\"div\", { ref: setOwnSlot, class: s.SheetDescriptionSlot }) : null)\n },\n})\n\nexport const DialogFooter = defineComponent({\n name: \"DialogFooter\",\n props: {\n /** Override the mobile action layout. Two alert actions default to inline, three or more and sheets to stacked. */\n mobileLayout: String as PropType<\"inline\" | \"stacked\">,\n /** How the bar meets the content scrolled under it in a phone Sheet. @default \"soft\" */\n background: { type: String as PropType<DialogBarBackground>, default: \"soft\" },\n },\n setup(props, { slots }) {\n const boundary = useFloatingBoundaryRegistration()\n const scroll = inject(DIALOG_SCROLL, null)\n return () => h(\"div\", {\n \"ref\": boundary?.setFooter,\n \"class\": s.Footer,\n \"data-mobile-layout\": props.mobileLayout,\n \"data-background\": props.background,\n \"data-content-below\": scroll?.contentBelow.value ? \"\" : undefined,\n }, slots.default?.())\n },\n})\n\n/** Counts a mounted part, as Radix's title and description counts do. */\nconst useMountedCount = (count: Ref<number>) => {\n onMounted(() => {\n count.value++\n })\n onBeforeUnmount(() => {\n count.value--\n })\n}\n\nexport const DialogTitle = defineComponent({\n name: \"DialogTitle\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().titleCount)\n const bar = inject(DIALOG_BAR, null)\n return () => h(RekaDialogTitle, { class: bar?.value ? t.Title : s.Title }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogDescription = defineComponent({\n name: \"DialogDescription\",\n setup(_props, { slots }) {\n useMountedCount(useDialogContext().descriptionCount)\n const bar = inject(DIALOG_BAR, null)\n const element = ref<{ $el?: Element } | Element | null>(null)\n const shown = ref(false)\n // The header leaves its own descriptions out of the bar. One the bar still holds, inside a part of the\n // header's own, is the title's second line (Toolbar's subtitle) when the reader sees it; one that is only\n // read out, visually hidden, leaves the title on its one line.\n const measure = () => {\n const node = element.value instanceof Element ? element.value : element.value?.$el\n shown.value = !!bar?.value && node instanceof HTMLElement && node.offsetHeight > 1 && node.offsetWidth > 1\n }\n onMounted(measure)\n watch(() => bar?.value, () => queueMicrotask(measure))\n return () => h(RekaDialogDescription, { ref: element, class: bar?.value && shown.value ? t.Subtitle : s.Description }, { default: () => slots.default?.() })\n },\n})\n\nexport const DialogClose = defineComponent({\n name: \"DialogClose\",\n setup(_props, { slots }) {\n const rootContext = injectDialogRootContext()\n const onClick = (event: Event) => {\n if (!event.defaultPrevented) rootContext.onOpenChange(false)\n }\n return () => withDialogProps(firstElementChild(slots.default?.()), { type: \"button\" }, onClick)\n },\n})\n\n/** The steps of a flow inside a dialog, such as a sign-in that asks for an email and then a code. */\nexport const DialogSteps = defineComponent({\n name: \"DialogSteps\",\n props: {\n /** The step on screen. A new value brings its content in. */\n step: { type: [String, Number] as PropType<string | number>, required: true },\n /**\n * `forward` brings the new step in from the trailing edge over the one before, as a push on iOS; `back` returns\n * to a step before it.\n * @default \"forward\"\n */\n direction: { type: String as PropType<\"forward\" | \"back\">, default: \"forward\" },\n },\n setup(props, { slots }) {\n return () => {\n // Resolve this step now, so a step that leaves cannot read the next one\n const entry = h(\"div\", { \"key\": props.step, \"data-dialog-step\": \"\", \"tabindex\": -1 }, slots.default?.())\n return h(\"div\", { \"class\": s.Steps, \"data-direction\": props.direction }, [\n h(TransitionGroup, {\n ...STEP_TIMING,\n as: \"div\",\n overlay: true,\n class: s.Step,\n onEnter: enterStep,\n onExit: leaveStep,\n onExitActive: settleStepHeight,\n onExitComplete: releaseStepHeight,\n }, () => [entry]),\n ])\n }\n },\n})\n\nexport type DialogProps = InstanceType<typeof Dialog>[\"$props\"]\n\nexport type DialogPlacement = \"center\" | \"top\" | \"bottom\" | \"start\" | \"end\" | \"fullscreen\"\n\n/** A press or a focus outside the dialog; `event.detail.originalEvent` is the browser's event. */\nexport type DialogInteractOutsideEvent = CustomEvent<{ originalEvent: PointerEvent | FocusEvent }>\n\n/** Class, style and data attributes for one of the dialog's layers. */\nexport type DialogLayerProps = {\n class?: HTMLAttributes[\"class\"]\n style?: string | CSSProperties\n [dataAttribute: `data-${string}`]: string | number | boolean | undefined\n}\n\n/** DialogContent props; `class` lands on the panel, like `className` in React. */\nexport type DialogContentProps = InstanceType<typeof DialogContent>[\"$props\"] & { class?: HTMLAttributes[\"class\"] }\n\nexport type DialogHeaderProps = InstanceType<typeof DialogHeader>[\"$props\"]\nexport type DialogFooterProps = InstanceType<typeof DialogFooter>[\"$props\"]\nexport type DialogStepsProps = InstanceType<typeof DialogSteps>[\"$props\"]\n"]}
@@ -191,6 +191,9 @@ const InputComponent = defineComponent({
191
191
  "data-optically-align": props.opticallyAlign,
192
192
  "data-has-start-adornment": hasStartAdornment ? "" : undefined,
193
193
  "data-has-end-adornment": hasEndAdornment || showClearButton ? "" : undefined,
194
+ // Only an end adornment, not the clear button: the phone rules place the clear button at the field's end
195
+ // when nothing follows it, a text adornment too (`:last-child` does not see text)
196
+ "data-end-adornment": hasEndAdornment ? "" : undefined,
194
197
  "onMousedown": handleMouseDown,
195
198
  }, [
196
199
  hasStartAdornment ? startAdornment : null,