@plexui/vue 0.9.0 → 0.11.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 (188) hide show
  1. package/dist/es/components/Alert/Alert.js +6 -2
  2. package/dist/es/components/Alert/Alert.js.map +1 -1
  3. package/dist/es/components/Avatar/Avatar.js +3 -1
  4. package/dist/es/components/Avatar/Avatar.js.map +1 -1
  5. package/dist/es/components/ButtonGroup/ButtonGroup.js +7 -0
  6. package/dist/es/components/ButtonGroup/ButtonGroup.js.map +1 -1
  7. package/dist/es/components/ButtonGroup/index.js.map +1 -1
  8. package/dist/es/components/Checkbox/Checkbox.js +5 -6
  9. package/dist/es/components/Checkbox/Checkbox.js.map +1 -1
  10. package/dist/es/components/ColorPicker/ColorPicker.js +476 -0
  11. package/dist/es/components/ColorPicker/ColorPicker.js.map +1 -0
  12. package/dist/es/components/ColorPicker/ColorWell.js +186 -0
  13. package/dist/es/components/ColorPicker/ColorWell.js.map +1 -0
  14. package/dist/es/components/ColorPicker/index.js +3 -0
  15. package/dist/es/components/ColorPicker/index.js.map +1 -0
  16. package/dist/es/components/ColorPicker/shared.js +132 -0
  17. package/dist/es/components/ColorPicker/shared.js.map +1 -0
  18. package/dist/es/components/ContextMenu/ContextMenu.js +223 -0
  19. package/dist/es/components/ContextMenu/ContextMenu.js.map +1 -0
  20. package/dist/es/components/ContextMenu/index.js +2 -0
  21. package/dist/es/components/ContextMenu/index.js.map +1 -0
  22. package/dist/es/components/ContextMenu/shared.js +58 -0
  23. package/dist/es/components/ContextMenu/shared.js.map +1 -0
  24. package/dist/es/components/DatePicker/DatePicker.js +19 -3
  25. package/dist/es/components/DatePicker/DatePicker.js.map +1 -1
  26. package/dist/es/components/DateRangePicker/DateRangePicker.js +1 -1
  27. package/dist/es/components/DateRangePicker/DateRangePicker.js.map +1 -1
  28. package/dist/es/components/Dialog/Dialog.js +245 -25
  29. package/dist/es/components/Dialog/Dialog.js.map +1 -1
  30. package/dist/es/components/Dialog/dialogSteps.js +85 -0
  31. package/dist/es/components/Dialog/dialogSteps.js.map +1 -0
  32. package/dist/es/components/Dialog/dialogViewport.js +74 -0
  33. package/dist/es/components/Dialog/dialogViewport.js.map +1 -0
  34. package/dist/es/components/Dialog/index.js +1 -1
  35. package/dist/es/components/Dialog/index.js.map +1 -1
  36. package/dist/es/components/Dialog/sheetDrag.js +2 -1
  37. package/dist/es/components/Dialog/sheetDrag.js.map +1 -1
  38. package/dist/es/components/Field/Field.js +11 -3
  39. package/dist/es/components/Field/Field.js.map +1 -1
  40. package/dist/es/components/FieldGroup/FieldGroup.js +12 -1
  41. package/dist/es/components/FieldGroup/FieldGroup.js.map +1 -1
  42. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js +2 -2
  43. package/dist/es/components/FloatingLabelInput/FloatingLabelInput.js.map +1 -1
  44. package/dist/es/components/Icon/index.js +1 -0
  45. package/dist/es/components/Icon/index.js.map +1 -1
  46. package/dist/es/components/Icon/svg/Eyedropper.js +10 -0
  47. package/dist/es/components/Icon/svg/Eyedropper.js.map +1 -0
  48. package/dist/es/components/IndexBar/IndexBar.js +215 -0
  49. package/dist/es/components/IndexBar/IndexBar.js.map +1 -0
  50. package/dist/es/components/IndexBar/index.js +2 -0
  51. package/dist/es/components/IndexBar/index.js.map +1 -0
  52. package/dist/es/components/Indicator/LoadingIndicator.js +1 -1
  53. package/dist/es/components/Indicator/LoadingIndicator.js.map +1 -1
  54. package/dist/es/components/Input/Input.js +3 -2
  55. package/dist/es/components/Input/Input.js.map +1 -1
  56. package/dist/es/components/MarkdownEditor/MarkdownEditor.js +149 -1
  57. package/dist/es/components/MarkdownEditor/MarkdownEditor.js.map +1 -1
  58. package/dist/es/components/Menu/Menu.js +206 -33
  59. package/dist/es/components/Menu/Menu.js.map +1 -1
  60. package/dist/es/components/Menu/index.js +1 -1
  61. package/dist/es/components/Menu/index.js.map +1 -1
  62. package/dist/es/components/Page/Page.js +43 -11
  63. package/dist/es/components/Page/Page.js.map +1 -1
  64. package/dist/es/components/PageControl/PageControl.js +210 -0
  65. package/dist/es/components/PageControl/PageControl.js.map +1 -0
  66. package/dist/es/components/PageControl/index.js +2 -0
  67. package/dist/es/components/PageControl/index.js.map +1 -0
  68. package/dist/es/components/PhoneLayout/PhoneLayout.js +50 -0
  69. package/dist/es/components/PhoneLayout/PhoneLayout.js.map +1 -0
  70. package/dist/es/components/PhoneLayout/index.js +2 -0
  71. package/dist/es/components/PhoneLayout/index.js.map +1 -0
  72. package/dist/es/components/Popover/Popover.js +5 -1
  73. package/dist/es/components/Popover/Popover.js.map +1 -1
  74. package/dist/es/components/Popover/deferredPointerDownOutside.js +59 -4
  75. package/dist/es/components/Popover/deferredPointerDownOutside.js.map +1 -1
  76. package/dist/es/components/Select/Select.js +18 -11
  77. package/dist/es/components/Select/Select.js.map +1 -1
  78. package/dist/es/components/SelectControl/SelectControl.js +1 -0
  79. package/dist/es/components/SelectControl/SelectControl.js.map +1 -1
  80. package/dist/es/components/Sidebar/Sidebar.js +21 -6
  81. package/dist/es/components/Sidebar/Sidebar.js.map +1 -1
  82. package/dist/es/components/Slider/Slider.js +44 -9
  83. package/dist/es/components/Slider/Slider.js.map +1 -1
  84. package/dist/es/components/Stepper/Stepper.js +195 -0
  85. package/dist/es/components/Stepper/Stepper.js.map +1 -0
  86. package/dist/es/components/Stepper/index.js +2 -0
  87. package/dist/es/components/Stepper/index.js.map +1 -0
  88. package/dist/es/components/SwipeActions/SwipeActions.js +374 -0
  89. package/dist/es/components/SwipeActions/SwipeActions.js.map +1 -0
  90. package/dist/es/components/SwipeActions/index.js +2 -0
  91. package/dist/es/components/SwipeActions/index.js.map +1 -0
  92. package/dist/es/components/Switch/Switch.js +3 -1
  93. package/dist/es/components/Switch/Switch.js.map +1 -1
  94. package/dist/es/components/TabBar/TabBar.js +205 -0
  95. package/dist/es/components/TabBar/TabBar.js.map +1 -0
  96. package/dist/es/components/TabBar/index.js +2 -0
  97. package/dist/es/components/TabBar/index.js.map +1 -0
  98. package/dist/es/components/Tabs/Tabs.js +10 -2
  99. package/dist/es/components/Tabs/Tabs.js.map +1 -1
  100. package/dist/es/components/TagInput/TagInput.js +3 -46
  101. package/dist/es/components/TagInput/TagInput.js.map +1 -1
  102. package/dist/es/components/Textarea/Textarea.js +2 -0
  103. package/dist/es/components/Textarea/Textarea.js.map +1 -1
  104. package/dist/es/components/Tip/Tip.js +276 -0
  105. package/dist/es/components/Tip/Tip.js.map +1 -0
  106. package/dist/es/components/Tip/index.js +2 -0
  107. package/dist/es/components/Tip/index.js.map +1 -0
  108. package/dist/es/components/Toast/ToastRenderer.js +30 -13
  109. package/dist/es/components/Toast/ToastRenderer.js.map +1 -1
  110. package/dist/es/components/Toast/Toaster.js +17 -6
  111. package/dist/es/components/Toast/Toaster.js.map +1 -1
  112. package/dist/es/components/Toast/toastLifecycle.js +113 -1
  113. package/dist/es/components/Toast/toastLifecycle.js.map +1 -1
  114. package/dist/es/components/Toolbar/Toolbar.js +37 -6
  115. package/dist/es/components/Toolbar/Toolbar.js.map +1 -1
  116. package/dist/es/components/Toolbar/index.js.map +1 -1
  117. package/dist/es/components/Tooltip/slot.js +3 -3
  118. package/dist/es/components/Tooltip/slot.js.map +1 -1
  119. package/dist/es/composables/useEscCloseStack.js +8 -4
  120. package/dist/es/composables/useEscCloseStack.js.map +1 -1
  121. package/dist/es/lib/fieldRow.js +15 -2
  122. package/dist/es/lib/fieldRow.js.map +1 -1
  123. package/dist/es/lib/floatingBoundary.js +3 -1
  124. package/dist/es/lib/floatingBoundary.js.map +1 -1
  125. package/dist/es/lib/helpers.js +21 -0
  126. package/dist/es/lib/helpers.js.map +1 -1
  127. package/dist/es/lib/menuSubmenuPlacement.js +51 -6
  128. package/dist/es/lib/menuSubmenuPlacement.js.map +1 -1
  129. package/dist/es/lib/menuTriggerCover.js +70 -0
  130. package/dist/es/lib/menuTriggerCover.js.map +1 -0
  131. package/dist/es/lib/phoneLayout.js +16 -0
  132. package/dist/es/lib/phoneLayout.js.map +1 -0
  133. package/dist/es/lib/scrollEdges.js +34 -0
  134. package/dist/es/lib/scrollEdges.js.map +1 -0
  135. package/dist/es/lib/toastRegion.js +6 -0
  136. package/dist/es/lib/toastRegion.js.map +1 -0
  137. package/dist/types/components/ButtonGroup/ButtonGroup.d.ts +13 -0
  138. package/dist/types/components/ButtonGroup/index.d.ts +1 -1
  139. package/dist/types/components/ColorPicker/ColorPicker.d.ts +244 -0
  140. package/dist/types/components/ColorPicker/ColorWell.d.ts +334 -0
  141. package/dist/types/components/ColorPicker/index.d.ts +3 -0
  142. package/dist/types/components/ColorPicker/shared.d.ts +69 -0
  143. package/dist/types/components/ContextMenu/ContextMenu.d.ts +128 -0
  144. package/dist/types/components/ContextMenu/index.d.ts +1 -0
  145. package/dist/types/components/ContextMenu/shared.d.ts +51 -0
  146. package/dist/types/components/DatePicker/DatePicker.d.ts +24 -4
  147. package/dist/types/components/DateRangePicker/DateRangePicker.d.ts +4 -4
  148. package/dist/types/components/Dialog/Dialog.d.ts +100 -4
  149. package/dist/types/components/Dialog/dialogSteps.d.ts +10 -0
  150. package/dist/types/components/Dialog/dialogViewport.d.ts +1 -0
  151. package/dist/types/components/Dialog/index.d.ts +1 -1
  152. package/dist/types/components/Field/Field.d.ts +21 -2
  153. package/dist/types/components/FieldGroup/FieldGroup.d.ts +18 -1
  154. package/dist/types/components/Icon/index.d.ts +1 -0
  155. package/dist/types/components/Icon/svg/Eyedropper.d.ts +3 -0
  156. package/dist/types/components/IndexBar/IndexBar.d.ts +112 -0
  157. package/dist/types/components/IndexBar/index.d.ts +1 -0
  158. package/dist/types/components/Indicator/LoadingIndicator.d.ts +2 -2
  159. package/dist/types/components/Menu/Menu.d.ts +153 -40
  160. package/dist/types/components/Menu/index.d.ts +1 -1
  161. package/dist/types/components/Page/Page.d.ts +13 -5
  162. package/dist/types/components/PageControl/PageControl.d.ts +216 -0
  163. package/dist/types/components/PageControl/index.d.ts +1 -0
  164. package/dist/types/components/PhoneLayout/PhoneLayout.d.ts +21 -0
  165. package/dist/types/components/PhoneLayout/index.d.ts +1 -0
  166. package/dist/types/components/Popover/deferredPointerDownOutside.d.ts +1 -1
  167. package/dist/types/components/Select/Select.d.ts +6 -6
  168. package/dist/types/components/Stepper/Stepper.d.ts +338 -0
  169. package/dist/types/components/Stepper/index.d.ts +1 -0
  170. package/dist/types/components/SwipeActions/SwipeActions.d.ts +135 -0
  171. package/dist/types/components/SwipeActions/index.d.ts +1 -0
  172. package/dist/types/components/TabBar/TabBar.d.ts +405 -0
  173. package/dist/types/components/TabBar/index.d.ts +1 -0
  174. package/dist/types/components/Tip/Tip.d.ts +146 -0
  175. package/dist/types/components/Tip/index.d.ts +1 -0
  176. package/dist/types/components/Toast/toastLifecycle.d.ts +34 -0
  177. package/dist/types/components/Toolbar/Toolbar.d.ts +26 -9
  178. package/dist/types/components/Toolbar/index.d.ts +1 -1
  179. package/dist/types/components/Tooltip/CopyTooltip.d.ts +1 -1
  180. package/dist/types/composables/useEscCloseStack.d.ts +2 -2
  181. package/dist/types/lib/fieldRow.d.ts +5 -0
  182. package/dist/types/lib/helpers.d.ts +6 -0
  183. package/dist/types/lib/menuSubmenuPlacement.d.ts +14 -1
  184. package/dist/types/lib/menuTriggerCover.d.ts +23 -0
  185. package/dist/types/lib/phoneLayout.d.ts +11 -0
  186. package/dist/types/lib/scrollEdges.d.ts +16 -0
  187. package/dist/types/lib/toastRegion.d.ts +5 -0
  188. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tip.js","sourceRoot":"","sources":["../../../../src/components/Tip/Tip.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EACL,QAAQ,EACR,kBAAkB,EAClB,eAAe,EACf,CAAC,EACD,MAAM,EACN,OAAO,EACP,eAAe,EACf,OAAO,EACP,GAAG,EACH,KAAK,GAMN,MAAM,KAAK,CAAA;AACZ,OAAO,EACL,aAAa,IAAI,iBAAiB,EAClC,YA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E,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC,EAAE,CAAC;yCAChH;qCACF,CACF;oCACH,CAAC,CAAC,kBAAkB,EAAE;6BACzB;yBACF,CACF;qBACF;iBACF,CAAC;aACH;SACF,CACF,CAAA;IACL,CAAC;CACF,CAAC,CAAA;AAEF,0GAA0G;AAC1G,2FAA2F;AAC3F,MAAM,CAAC,MAAM,GAAG,GAAyD,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE;IACnG,OAAO,EAAE,UAAU;CACpB,CAAC,CAAA","sourcesContent":["import clsx from \"clsx\"\nimport {\n computed,\n createCommentVNode,\n defineComponent,\n h,\n inject,\n markRaw,\n onBeforeUnmount,\n provide,\n ref,\n watch,\n type InjectionKey,\n type PropType,\n type Slots,\n type VNodeArrayChildren,\n type VNodeChild,\n} from \"vue\"\nimport {\n PopoverAnchor as RekaPopoverAnchor,\n PopoverArrow as RekaPopoverArrow,\n PopoverContent as RekaPopoverContent,\n PopoverPortal as RekaPopoverPortal,\n PopoverRoot as RekaPopoverRoot,\n useId,\n} from \"reka-ui\"\nimport s from \"@plexui/styles/components/Tip/Tip.module.css\"\nimport { useEscCloseStack } from \"../../composables/useEscCloseStack.js\"\nimport { preventDefaultHandler } from \"../../lib/helpers.js\"\nimport { hasContent } from \"../../lib/slotContent.js\"\nimport { Button } from \"../Button/index.js\"\nimport { X } from \"../Icon/index.js\"\nimport { useDeferredPointerDownOutside } from \"../Popover/deferredPointerDownOutside.js\"\nimport { TransitionGroup } from \"../Transition/index.js\"\nimport { overlayTiming } from \"../Transition/shared.js\"\n\n/** The edge of an inline tip that points at what it explains. */\nexport type TipArrowEdge = \"top\" | \"bottom\" | \"left\" | \"right\"\n\n/** How a tip's actions show on a phone. */\nexport type TipMobileActions = \"rows\" | \"buttons\"\n\ntype BodyOptions = {\n title?: string\n description?: string\n onClose?: () => void\n arrowEdge?: TipArrowEdge\n mobileActions?: TipMobileActions\n className?: unknown\n titleId: string\n descriptionId: string\n role?: string\n}\n\n// The tip itself, the same DOM as React's: the symbol, the title over the description, the actions, Close\nconst renderBody = (options: BodyOptions, slots: Slots) => {\n const title: VNodeChild = slots.title ? slots.title() : options.title\n const description: VNodeChild = slots.description ? slots.description() : options.description\n const icon = slots.icon?.()\n const actions = slots.actions?.()\n const hasDescription = hasContent([description as VNodeArrayChildren])\n return h(\n \"div\",\n {\n \"class\": clsx(s.Tip, options.className as string),\n \"role\": options.role,\n \"aria-labelledby\": options.role ? options.titleId : undefined,\n \"data-arrow-edge\": options.arrowEdge,\n \"data-mobile-actions\": options.mobileActions === \"buttons\" ? options.mobileActions : undefined,\n },\n [\n hasContent(icon) ? h(\"div\", { class: s.Icon }, icon) : null,\n h(\"div\", { class: s.Message }, [\n h(\"div\", { class: s.Title, id: options.titleId }, [title]),\n hasDescription ? h(\"div\", { class: s.Description, id: options.descriptionId }, [description]) : null,\n ]),\n hasContent(actions) ? h(\"div\", { class: s.Actions }, actions) : null,\n options.onClose\n ? h(\n Button,\n { \"type\": \"button\", \"onClick\": options.onClose, \"color\": \"secondary\", \"variant\": \"soft\", \"uniform\": true, \"pill\": true, \"aria-label\": \"Close tip\", \"class\": s.Close },\n { default: () => [h(X)] },\n )\n : null,\n ],\n )\n}\n\n// The ids that name and describe a popover tip\nconst TIP_POPOVER_LABELS: InjectionKey<() => { labelledBy: string, describedBy?: string }> = Symbol(\"TipPopoverLabels\")\n\n// The element Reka's content renders (`as`): Reka names its content after a trigger, and a tip has none, so the\n// tip's title names it (and its description describes it) here. Raw: Reka passes `as` through reactive props.\nconst TipPopoverElement = markRaw(\n defineComponent({\n name: \"TipPopoverElement\",\n inheritAttrs: false,\n setup(_props, { slots, attrs }) {\n const labels = inject(TIP_POPOVER_LABELS)!\n return () => {\n const rest: Record<string, unknown> = { ...attrs }\n delete rest.dir\n delete rest.forceMount\n const { labelledBy, describedBy } = labels()\n return h(\"div\", { ...rest, \"aria-labelledby\": labelledBy, \"aria-describedby\": describedBy }, slots.default?.())\n }\n },\n }),\n)\n\nconst contentProps = {\n /** The tip's title: what the feature is (or the `title` slot). */\n title: String,\n /** One or two sentences on how to use it (or the `description` slot). */\n description: String,\n /**\n * How the actions show at 767px and below: rows of text under a separator, as iOS tips show them, or the buttons\n * as given, each a full-width capsule under the message, as an iOS card that asks for a permission.\n * @default \"rows\"\n */\n mobileActions: String as PropType<TipMobileActions>,\n}\n\nconst TipComponent = defineComponent({\n name: \"Tip\",\n inheritAttrs: false,\n props: {\n ...contentProps,\n /** Shows the Close button; called when it is clicked. */\n onClose: Function as PropType<() => void>,\n /** Draws an arrow at this edge, pointing at what the tip explains (TipKit's annotation). */\n arrowEdge: String as PropType<TipArrowEdge>,\n },\n setup(props, { slots, attrs }) {\n const id = useId(undefined, \"plexui-tip\")\n return () =>\n renderBody(\n {\n ...props,\n className: attrs.class,\n titleId: `${id}-title`,\n descriptionId: `${id}-description`,\n role: \"note\",\n },\n slots,\n )\n },\n})\n\nconst TABBABLE =\n 'a[href], button:not([disabled]), input:not([disabled]):not([type=\"hidden\"]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"]), [contenteditable=\"true\"]'\n\n// What Tab can reach: no focus guards, nothing hidden (checkVisibility where the browser has it)\nconst tabbables = (root: ParentNode) =>\n [...root.querySelectorAll<HTMLElement>(TABBABLE)].filter(\n (element) =>\n element.tabIndex >= 0 &&\n !element.closest(\"[hidden], [inert], [data-radix-focus-guard], [data-reka-focus-guard]\") &&\n (typeof element.checkVisibility !== \"function\" || element.checkVisibility({ visibilityProperty: true })),\n )\n\n// The first element Tab reaches after the control, outside the tip\nconst nextAfter = (control: HTMLElement, tip: HTMLElement) =>\n tabbables(control.ownerDocument).find(\n (element) =>\n !tip.contains(element) &&\n !control.contains(element) &&\n !!(control.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_FOLLOWING),\n )\n\n// Takes the Tab only when the focus moved\nconst focusInstead = (event: KeyboardEvent, element: HTMLElement | undefined) => {\n if (!element) return\n element.focus()\n if (element.ownerDocument.activeElement === element) event.preventDefault()\n}\n\n// A popover tip renders at the end of the page, but Tab reaches it as if it sat right after its control: from the\n// control (or its last control) Tab moves into the tip, and Shift+Tab from what follows the control moves to the\n// tip's last control. Listened for on the document, after the control's own handlers.\nconst tabIntoTip = (event: KeyboardEvent, control: HTMLElement, tip: HTMLElement) => {\n if (event.key !== \"Tab\" || event.defaultPrevented || !(event.target instanceof Node) || tip.contains(event.target)) return\n const items = tabbables(tip)\n if (event.shiftKey) {\n if (event.target === nextAfter(control, tip)) focusInstead(event, items.at(-1))\n } else if (event.target === (tabbables(control).at(-1) ?? control)) {\n focusInstead(event, items[0])\n }\n}\n\n// Shift+Tab from the tip's first control returns to the control; Tab from its last moves on to what follows it\nconst tabOutOfTip = (event: KeyboardEvent, control: HTMLElement, tip: HTMLElement) => {\n if (event.key !== \"Tab\" || event.defaultPrevented) return\n const items = tabbables(tip)\n if (event.shiftKey) {\n if (event.target === items[0]) focusInstead(event, tabbables(control).at(-1) ?? (control.tabIndex >= 0 ? control : undefined))\n } else if (event.target === items.at(-1)) {\n focusInstead(event, nextAfter(control, tip))\n }\n}\n\n/**\n * A tip anchored to a control, after TipKit's popover tip. The default slot is the control; `icon`,\n * `title`, `description` and `actions` slots fill the tip. It does not take the focus. Bind `v-model:open`.\n */\nexport const TipPopover = defineComponent({\n name: \"TipPopover\",\n inheritAttrs: false,\n props: {\n ...contentProps,\n /** Shows the tip (controlled, `v-model:open`). */\n open: { type: Boolean, default: undefined },\n /** Shows the tip at first (uncontrolled). @default false */\n defaultOpen: { type: Boolean, default: false },\n /** The side of the control the tip shows on. Turned when it does not fit. @default \"bottom\" */\n side: { type: String as PropType<\"top\" | \"right\" | \"bottom\" | \"left\">, default: \"bottom\" },\n /** The alignment against the control. @default \"center\" */\n align: { type: String as PropType<\"start\" | \"center\" | \"end\">, default: \"center\" },\n /** The distance from the control to the arrow's point, in pixels. @default 4 */\n sideOffset: { type: Number, default: 4 },\n /** Shows the Close button. @default true */\n closeButton: { type: Boolean, default: true },\n },\n emits: {\n /** Close, Escape or a press outside closes the tip. */\n \"update:open\": (open: boolean) => typeof open === \"boolean\",\n },\n setup(props, { slots, attrs, emit }) {\n const uncontrolledOpen = ref(props.defaultOpen)\n const open = computed(() => props.open ?? uncontrolledOpen.value)\n const setOpen = (next: boolean) => {\n if (props.open === undefined) uncontrolledOpen.value = next\n emit(\"update:open\", next)\n }\n const anchor = ref<{ $el?: Element } | null>(null)\n const tip = ref<{ $el?: Element } | null>(null)\n const id = useId(undefined, \"plexui-tip\")\n const titleId = `${id}-title`\n const descriptionId = `${id}-description`\n const control = () => (anchor.value?.$el instanceof HTMLElement ? anchor.value.$el : undefined)\n const tipElement = () => (tip.value?.$el instanceof HTMLElement ? tip.value.$el : undefined)\n // A press outside closes the tip on the click that completes it, as a Popover does; a press on the control\n // does not close it. The tip never takes the focus, so focus moving elsewhere does not close it either.\n const deferred = useDeferredPointerDownOutside(() => setOpen(false))\n const { reset } = deferred\n const onPointerDownOutside = (event: CustomEvent<{ originalEvent: PointerEvent }>) => {\n const target = event.detail.originalEvent.target\n if (target instanceof Node && control()?.contains(target)) {\n reset()\n event.preventDefault()\n return\n }\n deferred.onPointerDownOutside(event)\n }\n // Tab reaches the tip as if it sat right after the control: on the document, after the control's own handlers\n const onDocumentKeydown = (event: KeyboardEvent) => {\n const element = control()\n const content = tipElement()\n if (element && content) tabIntoTip(event, element, content)\n }\n let listening: Document | undefined\n const stopListening = () => {\n listening?.removeEventListener(\"keydown\", onDocumentKeydown)\n listening = undefined\n }\n watch(open, (isOpen) => {\n stopListening()\n if (!isOpen || typeof document === \"undefined\") return\n listening = control()?.ownerDocument ?? document\n listening.addEventListener(\"keydown\", onDocumentKeydown)\n }, { immediate: true, flush: \"post\" })\n onBeforeUnmount(stopListening)\n const onTipKeydown = (event: KeyboardEvent) => {\n const element = control()\n const content = tipElement()\n if (element && content) tabOutOfTip(event, element, content)\n }\n provide(TIP_POPOVER_LABELS, () => ({\n labelledBy: titleId,\n describedBy: props.description || slots.description ? descriptionId : undefined,\n }))\n watch(open, (isOpen) => { if (!isOpen) reset() })\n useEscCloseStack(open, () => setOpen(false))\n\n return () =>\n h(\n RekaPopoverRoot,\n { \"open\": open.value, \"onUpdate:open\": setOpen, \"modal\": false },\n {\n default: () => [\n h(RekaPopoverAnchor, { asChild: true, ref: anchor }, { default: () => slots.default?.() }),\n h(RekaPopoverPortal, null, {\n default: () => [\n h(\n TransitionGroup,\n { class: s.Transition, ...overlayTiming, overlay: true },\n {\n default: () => [\n open.value\n ? h(\n RekaPopoverContent,\n {\n \"key\": \"tip\",\n \"ref\": tip,\n \"forceMount\": true,\n \"as\": TipPopoverElement,\n \"class\": clsx(s.Popover, attrs.class as string),\n \"side\": props.side,\n \"align\": props.align,\n \"sideOffset\": props.sideOffset,\n // The arrow stays clear of the tip's corners\n \"arrowPadding\": 26,\n \"collisionPadding\": 16,\n \"hideWhenDetached\": true,\n \"onOpenAutoFocus\": preventDefaultHandler,\n \"onCloseAutoFocus\": preventDefaultHandler,\n \"onEscapeKeyDown\": preventDefaultHandler,\n onPointerDownOutside,\n \"onFocusOutside\": preventDefaultHandler,\n // Before Reka's focus scope, which would wrap Tab around inside the tip\n \"onKeydownCapture\": onTipKeydown,\n },\n {\n default: () => [\n renderBody(\n {\n title: props.title,\n description: props.description,\n mobileActions: props.mobileActions,\n onClose: props.closeButton ? () => setOpen(false) : undefined,\n titleId,\n descriptionId,\n },\n slots,\n ),\n h(RekaPopoverArrow, { asChild: true, width: 47, height: 13 }, { default: () => h(\"span\", { class: s.Arrow }) }),\n ],\n },\n )\n : createCommentVNode(),\n ],\n },\n ),\n ],\n }),\n ],\n },\n )\n },\n})\n\n/** A tip inside the page, after TipKit: a title, a description, an optional symbol, actions and Close. */\n// Typed explicitly so the published declaration refers to the part instead of expanding it\nexport const Tip: typeof TipComponent & { Popover: typeof TipPopover } = Object.assign(TipComponent, {\n Popover: TipPopover,\n})\n\nexport type TipProps = InstanceType<typeof TipComponent>[\"$props\"]\nexport type TipPopoverProps = InstanceType<typeof TipPopover>[\"$props\"]\n"]}
@@ -0,0 +1,2 @@
1
+ export { Tip, TipPopover } from "./Tip.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/Tip/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,UAAU,EAAiF,MAAM,UAAU,CAAA","sourcesContent":["export { Tip, TipPopover, type TipArrowEdge, type TipMobileActions, type TipPopoverProps, type TipProps } from \"./Tip.js\"\n"]}
@@ -2,7 +2,7 @@ import clsx from "clsx";
2
2
  import { defineComponent, h, isVNode, mergeProps, onBeforeUnmount, onMounted, onUpdated, ref, toRaw, watch } from "vue";
3
3
  import { toast, useVueSonner } from "vue-sonner";
4
4
  import { CheckCircle, InfoCircle, Warning, XCircle } from "../Icon/index.js";
5
- import { documentDirection, offsetStyles, ToastLifecycle } from "./toastLifecycle.js";
5
+ import { announcerStyle, documentDirection, offsetStyles, ToastLifecycle } from "./toastLifecycle.js";
6
6
  const fallbackIcons = { success: CheckCircle, error: XCircle, warning: Warning, info: InfoCircle };
7
7
  const CloseIcon = () => h("svg", { xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", width: 12, height: 12, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "1.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, [h("line", { x1: 18, y1: 6, x2: 6, y2: 18 }), h("line", { x1: 6, y1: 6, x2: 18, y2: 18 })]);
8
8
  const actionObject = (value) => typeof value === "object" && value !== null && "label" in value;
@@ -37,8 +37,16 @@ const ToastItem = defineComponent({
37
37
  props.lifecycle.measure(props.entry.toast.id, element.offsetHeight || element.getBoundingClientRect().height);
38
38
  element.style.height = height;
39
39
  };
40
+ const custom = () => Boolean(props.entry.toast.component);
41
+ const alert = () => props.lifecycle.alertRole(props.entry, custom());
42
+ // After every render: a new toast, or new words in one (a promise that settles), is read once
43
+ const announce = () => { if (node.value)
44
+ props.lifecycle.speak(props.entry.toast.id, node.value, custom()); };
45
+ // A custom toast that changes its own words, without a new render here, is read again too
46
+ let words = null;
40
47
  onMounted(() => {
41
48
  props.lifecycle.setNode(props.entry.toast.id, node.value);
49
+ announce();
42
50
  measure();
43
51
  observer = typeof ResizeObserver !== "undefined" ? new ResizeObserver(measure) : null;
44
52
  if (node.value) {
@@ -46,9 +54,12 @@ const ToastItem = defineComponent({
46
54
  for (const child of node.value.children)
47
55
  observer?.observe(child);
48
56
  }
57
+ words = typeof MutationObserver !== "undefined" ? new MutationObserver(announce) : null;
58
+ if (node.value)
59
+ words?.observe(node.value, { childList: true, characterData: true, subtree: true });
49
60
  });
50
- onUpdated(measure);
51
- onBeforeUnmount(() => { observer?.disconnect(); props.lifecycle.setNode(props.entry.toast.id, null); });
61
+ onUpdated(() => { announce(); measure(); });
62
+ onBeforeUnmount(() => { observer?.disconnect(); words?.disconnect(); props.lifecycle.setNode(props.entry.toast.id, null); });
52
63
  return () => {
53
64
  const { entry, lifecycle, options, index, count } = props;
54
65
  const item = entry.toast;
@@ -95,7 +106,7 @@ const ToastItem = defineComponent({
95
106
  item.promise || item.type === "loading" ? item.icon ? content(item.icon) : loader() : null,
96
107
  item.type !== "loading" ? type && slots[`${type}-icon`] && !item.icon ? slots[`${type}-icon`]?.() : content(icon) : null,
97
108
  ]) : null,
98
- h("div", { "data-content": "", class: slot("content") }, [h("div", { "data-title": "", class: slot("title") }, content(item.title, item.componentProps)), item.description ? h("div", { "data-description": "", class: clsx(options.toastOptions?.descriptionClass, slot("description")) }, content(item.description, item.componentProps)) : null]),
109
+ h("div", { "data-content": "", role: alert() ? "alert" : undefined, class: slot("content") }, [h("div", { "data-title": "", class: slot("title") }, content(item.title, item.componentProps)), item.description ? h("div", { "data-description": "", class: clsx(options.toastOptions?.descriptionClass, slot("description")) }, content(item.description, item.componentProps)) : null]),
99
110
  actionButton("cancel"), actionButton("action"),
100
111
  ],
101
112
  ]);
@@ -129,15 +140,21 @@ export const ToastRenderer = defineComponent({
129
140
  const hotkeyLabel = (props.hotkey ?? ["altKey", "KeyT"]).join("+").replace(/Key|Digit/g, "");
130
141
  const positions = [...new Set(lifecycle.entries.map((entry) => lifecycle.position(entry)))];
131
142
  const dir = props.dir === "auto" || !props.dir ? documentDirection(typeof document === "undefined" ? undefined : document) : props.dir;
132
- return h("section", { "aria-label": `${props.containerAriaLabel ?? "Notifications"} ${hotkeyLabel}`, tabindex: -1, "aria-live": "polite", "aria-relevant": "additions text", "aria-atomic": "false" }, positions.map((position) => {
133
- const entries = lifecycle.at(position);
134
- const [y, x] = position.split("-");
135
- return h("ol", mergeProps({ key: position, ref: (node) => lifecycle.setList(position, node instanceof HTMLElement ? node : null), dir, tabindex: -1, class: props.class,
136
- "data-sonner-toaster": "true", "data-sonner-theme": props.theme ?? "light", "data-y-position": y, "data-x-position": x,
137
- style: { "--front-toast-height": `${entries.find((entry) => !entry.removed)?.height ?? 0}px`, "--width": "356px", "--gap": `${props.gap ?? 14}px`, ...props.style, ...offsetStyles(props.offset, props.mobileOffset) },
138
- onFocusin: (event) => lifecycle.focusIn(event), onFocusout: (event) => lifecycle.focusOut(event),
139
- onPointerenter: (event) => lifecycle.pointerEnter(event), onMouseenter: () => lifecycle.hover(true), onMousemove: () => lifecycle.hover(true), onMouseleave: () => lifecycle.hover(false), }, attrs), entries.map((entry, index) => h(ToastItem, { key: entry.toast.id, entry, lifecycle, options: props, index, count: entries.length, revision: version }, slots)));
140
- }));
143
+ // aria-live="off": not a live region itself (an announcer or an alert's role speaks, once), but a modal's
144
+ // aria-hidden on everything else (Radix and Reka call aria-hidden's hideOthers) keeps any [aria-live]
145
+ return h("section", { ref: (node) => lifecycle.setRegion(node instanceof HTMLElement ? node : null), "aria-label": `${props.containerAriaLabel ?? "Notifications"} ${hotkeyLabel}`, tabindex: -1, "aria-live": "off" }, [
146
+ h("div", { key: "polite", ref: (node) => lifecycle.setAnnouncer("polite", node instanceof HTMLElement ? node : null), role: "status", "aria-live": "polite", "aria-atomic": "false", "data-toast-announcer": "polite", style: announcerStyle }),
147
+ h("div", { key: "assertive", ref: (node) => lifecycle.setAnnouncer("assertive", node instanceof HTMLElement ? node : null), role: "alert", "aria-live": "assertive", "aria-atomic": "false", "data-toast-announcer": "assertive", style: announcerStyle }),
148
+ ...positions.map((position) => {
149
+ const entries = lifecycle.at(position);
150
+ const [y, x] = position.split("-");
151
+ return h("ol", mergeProps({ key: position, ref: (node) => lifecycle.setList(position, node instanceof HTMLElement ? node : null), dir, tabindex: -1, class: props.class,
152
+ "data-sonner-toaster": "true", "data-sonner-theme": props.theme ?? "light", "data-y-position": y, "data-x-position": x,
153
+ style: { "--front-toast-height": `${entries.find((entry) => !entry.removed)?.height ?? 0}px`, "--width": "356px", "--gap": `${props.gap ?? 14}px`, ...props.style, ...offsetStyles(props.offset, props.mobileOffset) },
154
+ onFocusin: (event) => lifecycle.focusIn(event), onFocusout: (event) => lifecycle.focusOut(event),
155
+ onPointerenter: (event) => lifecycle.pointerEnter(event), onMouseenter: () => lifecycle.hover(true), onMousemove: () => lifecycle.hover(true), onMouseleave: () => lifecycle.hover(false), }, attrs), entries.map((entry, index) => h(ToastItem, { key: entry.toast.id, entry, lifecycle, options: props, index, count: entries.length, revision: version }, slots)));
156
+ }),
157
+ ]);
141
158
  };
142
159
  },
143
160
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ToastRenderer.js","sourceRoot":"","sources":["../../../../src/components/Toast/ToastRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK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,CAAC,CAAC,CAAA;QACL,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import clsx from \"clsx\"\nimport { defineComponent, h, isVNode, mergeProps, onBeforeUnmount, onMounted, onUpdated, ref, toRaw, watch, type Component, type CSSProperties, type PropType } from \"vue\"\nimport { toast, useVueSonner, type Action, type ToastT, type ToasterProps } from \"vue-sonner\"\nimport { CheckCircle, InfoCircle, Warning, XCircle } from \"../Icon/index.js\"\nimport { documentDirection, offsetStyles, ToastLifecycle, type Position, type ToastEntry } from \"./toastLifecycle.js\"\n\ntype Classes = NonNullable<NonNullable<ToasterProps[\"toastOptions\"]>[\"classes\"]>\nconst fallbackIcons = { success: CheckCircle, error: XCircle, warning: Warning, info: InfoCircle }\nconst CloseIcon = () => h(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", \"aria-hidden\": \"true\", width: 12, height: 12, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", \"stroke-width\": \"1.5\", \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }, [h(\"line\", { x1: 18, y1: 6, x2: 6, y2: 18 }), h(\"line\", { x1: 6, y1: 6, x2: 18, y2: 18 })])\nconst actionObject = (value: Action | Component | undefined): value is Action => typeof value === \"object\" && value !== null && \"label\" in value\nconst content = (value: unknown, componentProps?: unknown) => {\n if (value === undefined || value === null || value === false) return undefined\n if (typeof value === \"string\" || typeof value === \"number\") return String(value)\n if (isVNode(value)) return value\n if (typeof value === \"object\" || typeof value === \"function\") return h(toRaw(value) as Component, typeof componentProps === \"object\" && componentProps !== null ? componentProps : {})\n return undefined\n}\n\nconst ToastItem = defineComponent({\n name: \"ToastItem\",\n props: {\n entry: { type: Object as PropType<ToastEntry<ToastT>>, required: true },\n lifecycle: { type: Object as PropType<ToastLifecycle<ToastT>>, required: true },\n options: { type: Object as PropType<ToasterProps>, required: true },\n index: { type: Number, required: true }, count: { type: Number, required: true }, revision: Number,\n },\n setup(props, { slots }) {\n const node = ref<HTMLElement | null>(null)\n let observer: ResizeObserver | null = null\n const measure = () => {\n const element = node.value\n if (!element) return\n const height = element.style.height\n element.style.height = \"auto\"\n props.lifecycle.measure(props.entry.toast.id, element.offsetHeight || element.getBoundingClientRect().height)\n element.style.height = height\n }\n onMounted(() => {\n props.lifecycle.setNode(props.entry.toast.id, node.value)\n measure()\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(measure) : null\n if (node.value) { observer?.observe(node.value); for (const child of node.value.children) observer?.observe(child) }\n })\n onUpdated(measure)\n onBeforeUnmount(() => { observer?.disconnect(); props.lifecycle.setNode(props.entry.toast.id, null) })\n return () => {\n const { entry, lifecycle, options, index, count } = props\n const item = entry.toast\n const slot = (name: keyof Classes) => clsx(options.toastOptions?.classes?.[name], item.classes?.[name])\n const [y, x] = lifecycle.position(entry).split(\"-\")\n const visible = index < (options.visibleToasts ?? 3)\n const disabled = item.dismissible === false || item.type === \"loading\"\n const type = item.type === \"normal\" || item.type === \"default\" ? undefined : item.type\n const icon = item.icon ?? (type && type in fallbackIcons ? options.icons?.[type as keyof typeof fallbackIcons] ?? fallbackIcons[type as keyof typeof fallbackIcons] : undefined)\n const actionButton = (kind: \"action\" | \"cancel\") => {\n const action = item[kind]\n if (!action) return null\n if (!actionObject(action)) return content(action)\n return h(\"button\", { type: \"button\", \"data-button\": \"true\", [`data-${kind}`]: \"true\", disabled: kind === \"cancel\" && disabled,\n class: slot(kind === \"action\" ? \"actionButton\" : \"cancelButton\"),\n style: kind === \"action\" ? item.actionButtonStyle ?? options.toastOptions?.actionButtonStyle : item.cancelButtonStyle ?? options.toastOptions?.cancelButtonStyle,\n onClick: (event: MouseEvent) => { if (kind === \"cancel\" && disabled) return; action.onClick(event); if (kind === \"cancel\" || !event.defaultPrevented) lifecycle.close(item.id, \"action\") },\n }, content(action.label))\n }\n const loader = () => h(\"div\", { class: clsx(\"sonner-loading-wrapper\", slot(\"loader\")), \"data-visible\": item.type === \"loading\" },\n slots[\"loading-icon\"] ? slots[\"loading-icon\"]() : options.icons?.loading ? h(\"div\", { class: \"sonner-loader\", \"data-visible\": item.type === \"loading\" }, content(options.icons.loading)) : h(\"div\", { class: \"sonner-spinner\" }, Array.from({ length: 12 }, (_, i) => h(\"div\", { key: i, class: \"sonner-loading-bar\" }))))\n return h(\"li\", {\n ref: node, tabindex: visible && !entry.removed ? 0 : -1, inert: !visible || entry.removed ? \"\" : undefined, \"aria-hidden\": !visible || entry.removed || undefined,\n class: clsx(options.toastOptions?.class, item.class, slot(\"toast\"), slot(\"default\"), type && slot(type as keyof Classes)),\n \"data-sonner-toast\": \"\", \"data-rich-colors\": item.richColors ?? options.richColors ?? undefined, \"data-styled\": !Boolean(item.component || item.unstyled || options.toastOptions?.unstyled),\n \"data-mounted\": entry.mounted, \"data-promise\": Boolean(item.promise), \"data-swiped\": Boolean(entry.x || entry.y), \"data-removed\": entry.removed,\n \"data-visible\": visible, \"data-y-position\": y, \"data-x-position\": x, \"data-index\": index, \"data-front\": index === 0, \"data-swiping\": entry.swiping,\n \"data-dismissible\": item.dismissible !== false, \"data-type\": type, \"data-invert\": item.invert || options.invert || undefined,\n \"data-swipe-out\": Boolean(entry.swipeOut), \"data-swipe-direction\": entry.swipeOut, \"data-expanded\": lifecycle.expanded || Boolean(options.expand && entry.mounted), \"data-testid\": item.testId,\n style: { \"--index\": index, \"--toasts-before\": index, \"--z-index\": count - index, \"--offset\": `${lifecycle.offset(entry)}px`, \"--initial-height\": options.expand ? \"auto\" : `${entry.height}px`, \"--swipe-amount-x\": `${entry.x}px`, \"--swipe-amount-y\": `${entry.y}px`, ...options.toastOptions?.style, ...item.style },\n onPointerdown: (event: PointerEvent) => lifecycle.pointerDown(item.id, event), onPointermove: (event: PointerEvent) => lifecycle.pointerMove(item.id, event),\n onPointerup: (event: PointerEvent) => lifecycle.pointerEnd(item.id, event), onPointercancel: (event: PointerEvent) => lifecycle.pointerEnd(item.id, event, true), onLostpointercapture: (event: PointerEvent) => lifecycle.pointerEnd(item.id, event, true),\n }, [\n (item.closeButton ?? options.toastOptions?.closeButton ?? options.closeButton) && !item.component && item.type !== \"loading\" ? h(\"button\", {\n type: \"button\", \"aria-label\": options.toastOptions?.closeButtonAriaLabel ?? \"Close toast\", \"data-disabled\": disabled, disabled, \"data-close-button\": \"true\", \"data-close-button-position\": item.closeButtonPosition ?? options.closeButtonPosition ?? \"top-left\", class: slot(\"closeButton\"),\n onClick: () => lifecycle.close(item.id, \"dismiss\"),\n }, options.icons?.close ? content(options.icons.close) : slots[\"close-icon\"]?.() ?? h(CloseIcon)) : null,\n item.component ? h(toRaw(item.component), { ...item.componentProps, onCloseToast: () => { if (!disabled) lifecycle.close(item.id, \"dismiss\") }, isPaused: lifecycle.paused }) : [\n (type || item.icon || item.promise) && item.icon !== null ? h(\"div\", { \"data-icon\": \"\", class: slot(\"icon\") }, [\n item.promise || item.type === \"loading\" ? item.icon ? content(item.icon) : loader() : null,\n item.type !== \"loading\" ? type && slots[`${type}-icon`] && !item.icon ? slots[`${type}-icon`]?.() : content(icon) : null,\n ]) : null,\n h(\"div\", { \"data-content\": \"\", class: slot(\"content\") }, [h(\"div\", { \"data-title\": \"\", class: slot(\"title\") }, content(item.title, item.componentProps)), item.description ? h(\"div\", { \"data-description\": \"\", class: clsx(options.toastOptions?.descriptionClass, slot(\"description\")) }, content(item.description, item.componentProps)) : null]),\n actionButton(\"cancel\"), actionButton(\"action\"),\n ],\n ])\n }\n },\n})\n\n/** Owns presentation/interaction only; vue-sonner remains the public toast store. */\nexport const ToastRenderer = defineComponent({\n name: \"ToastRenderer\", inheritAttrs: false,\n props: {\n id: String, position: String as PropType<ToasterProps[\"position\"]>, duration: Number, gap: Number, visibleToasts: Number,\n expand: { type: Boolean, default: undefined }, closeButton: { type: Boolean, default: undefined }, invert: { type: Boolean, default: undefined }, richColors: { type: Boolean, default: undefined },\n theme: String as PropType<ToasterProps[\"theme\"]>, hotkey: Array as PropType<string[]>, dir: String as PropType<ToasterProps[\"dir\"]>,\n swipeDirections: Array as PropType<ToasterProps[\"swipeDirections\"]>, icons: Object as PropType<ToasterProps[\"icons\"]>, containerAriaLabel: String,\n offset: [String, Number, Object] as PropType<ToasterProps[\"offset\"]>, mobileOffset: [String, Number, Object] as PropType<ToasterProps[\"mobileOffset\"]>,\n class: String, style: Object as PropType<CSSProperties>, toastOptions: Object as PropType<ToasterProps[\"toastOptions\"]>, closeButtonPosition: String as PropType<ToasterProps[\"closeButtonPosition\"]>,\n },\n setup(props, { attrs, slots }) {\n const { activeToasts } = useVueSonner()\n const revision = ref(0)\n const lifecycle = new ToastLifecycle<ToastT>(toast.dismiss, (reason, item) => reason === \"auto\" ? item.onAutoClose?.(item) : item.onDismiss?.(item))\n const unsubscribe = lifecycle.subscribe(() => { revision.value++ })\n const keydown = (event: KeyboardEvent) => lifecycle.keyDown(event, props.hotkey ?? [\"altKey\", \"KeyT\"])\n onMounted(() => { lifecycle.connect(document); document.addEventListener(\"keydown\", keydown) })\n onBeforeUnmount(() => { unsubscribe(); lifecycle.disconnect(); document.removeEventListener(\"keydown\", keydown) })\n watch(() => [activeToasts.value, props.id, props.position, props.duration, props.toastOptions?.duration, props.gap, props.visibleToasts, props.expand, props.swipeDirections], () => {\n lifecycle.sync(activeToasts.value, { id: props.id, position: props.position ?? \"bottom-right\", duration: props.toastOptions?.duration ?? props.duration ?? 4000, gap: props.gap ?? 14, visibleToasts: props.visibleToasts ?? 3, expand: props.expand, swipeDirections: props.swipeDirections })\n }, { immediate: true })\n return () => {\n const version = revision.value\n const hotkeyLabel = (props.hotkey ?? [\"altKey\", \"KeyT\"]).join(\"+\").replace(/Key|Digit/g, \"\")\n const positions = [...new Set(lifecycle.entries.map((entry) => lifecycle.position(entry)))]\n const dir = props.dir === \"auto\" || !props.dir ? documentDirection(typeof document === \"undefined\" ? undefined : document) : props.dir\n return h(\"section\", { \"aria-label\": `${props.containerAriaLabel ?? \"Notifications\"} ${hotkeyLabel}`, tabindex: -1, \"aria-live\": \"polite\", \"aria-relevant\": \"additions text\", \"aria-atomic\": \"false\" }, positions.map((position: Position) => {\n const entries = lifecycle.at(position)\n const [y, x] = position.split(\"-\")\n return h(\"ol\", mergeProps({ key: position, ref: (node) => lifecycle.setList(position, node instanceof HTMLElement ? node : null), dir, tabindex: -1, class: props.class,\n \"data-sonner-toaster\": \"true\", \"data-sonner-theme\": props.theme ?? \"light\", \"data-y-position\": y, \"data-x-position\": x,\n style: { \"--front-toast-height\": `${entries.find((entry) => !entry.removed)?.height ?? 0}px`, \"--width\": \"356px\", \"--gap\": `${props.gap ?? 14}px`, ...props.style, ...offsetStyles(props.offset, props.mobileOffset) },\n onFocusin: (event: FocusEvent) => lifecycle.focusIn(event), onFocusout: (event: FocusEvent) => lifecycle.focusOut(event),\n onPointerenter: (event: PointerEvent) => lifecycle.pointerEnter(event), onMouseenter: () => lifecycle.hover(true), onMousemove: () => lifecycle.hover(true), onMouseleave: () => lifecycle.hover(false),\n }, attrs), entries.map((entry, index) => h(ToastItem, { key: entry.toast.id, entry, lifecycle, options: props, index, count: entries.length, revision: version }, slots)))\n }))\n }\n },\n})\n"]}
1
+ {"version":3,"file":"ToastRenderer.js","sourceRoot":"","sources":["../../../../src/components/Toast/ToastRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAA;AACvB,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,EAAqD,MAAM,KAAK,CAAA;AAC1K,OAAO,EAAE,KAAK,EAAE,YAAY,EAA+C,MAAM,YAAY,CAAA;AAC7F,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC5E,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,YAAY,EAAE,cAAc,EAAkC,MAAM,qBAAqB,CAAA;AAGrI,MAAM,aAAa,GAAG,EAAE,OA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M,EAAE,KAAK,CAAC,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,EAAE,EAAE,GAAG,EAAE,KAAK,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,CAAA;gBAC1K,CAAC,CAAC;aACH,CAAC,CAAA;QACJ,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA","sourcesContent":["import clsx from \"clsx\"\nimport { defineComponent, h, isVNode, mergeProps, onBeforeUnmount, onMounted, onUpdated, ref, toRaw, watch, type Component, type CSSProperties, type PropType } from \"vue\"\nimport { toast, useVueSonner, type Action, type ToastT, type ToasterProps } from \"vue-sonner\"\nimport { CheckCircle, InfoCircle, Warning, XCircle } from \"../Icon/index.js\"\nimport { announcerStyle, documentDirection, offsetStyles, ToastLifecycle, type Position, type ToastEntry } from \"./toastLifecycle.js\"\n\ntype Classes = NonNullable<NonNullable<ToasterProps[\"toastOptions\"]>[\"classes\"]>\nconst fallbackIcons = { success: CheckCircle, error: XCircle, warning: Warning, info: InfoCircle }\nconst CloseIcon = () => h(\"svg\", { xmlns: \"http://www.w3.org/2000/svg\", \"aria-hidden\": \"true\", width: 12, height: 12, viewBox: \"0 0 24 24\", fill: \"none\", stroke: \"currentColor\", \"stroke-width\": \"1.5\", \"stroke-linecap\": \"round\", \"stroke-linejoin\": \"round\" }, [h(\"line\", { x1: 18, y1: 6, x2: 6, y2: 18 }), h(\"line\", { x1: 6, y1: 6, x2: 18, y2: 18 })])\nconst actionObject = (value: Action | Component | undefined): value is Action => typeof value === \"object\" && value !== null && \"label\" in value\nconst content = (value: unknown, componentProps?: unknown) => {\n if (value === undefined || value === null || value === false) return undefined\n if (typeof value === \"string\" || typeof value === \"number\") return String(value)\n if (isVNode(value)) return value\n if (typeof value === \"object\" || typeof value === \"function\") return h(toRaw(value) as Component, typeof componentProps === \"object\" && componentProps !== null ? componentProps : {})\n return undefined\n}\n\nconst ToastItem = defineComponent({\n name: \"ToastItem\",\n props: {\n entry: { type: Object as PropType<ToastEntry<ToastT>>, required: true },\n lifecycle: { type: Object as PropType<ToastLifecycle<ToastT>>, required: true },\n options: { type: Object as PropType<ToasterProps>, required: true },\n index: { type: Number, required: true }, count: { type: Number, required: true }, revision: Number,\n },\n setup(props, { slots }) {\n const node = ref<HTMLElement | null>(null)\n let observer: ResizeObserver | null = null\n const measure = () => {\n const element = node.value\n if (!element) return\n const height = element.style.height\n element.style.height = \"auto\"\n props.lifecycle.measure(props.entry.toast.id, element.offsetHeight || element.getBoundingClientRect().height)\n element.style.height = height\n }\n const custom = () => Boolean(props.entry.toast.component)\n const alert = () => props.lifecycle.alertRole(props.entry, custom())\n // After every render: a new toast, or new words in one (a promise that settles), is read once\n const announce = () => { if (node.value) props.lifecycle.speak(props.entry.toast.id, node.value, custom()) }\n // A custom toast that changes its own words, without a new render here, is read again too\n let words: MutationObserver | null = null\n onMounted(() => {\n props.lifecycle.setNode(props.entry.toast.id, node.value)\n announce()\n measure()\n observer = typeof ResizeObserver !== \"undefined\" ? new ResizeObserver(measure) : null\n if (node.value) { observer?.observe(node.value); for (const child of node.value.children) observer?.observe(child) }\n words = typeof MutationObserver !== \"undefined\" ? new MutationObserver(announce) : null\n if (node.value) words?.observe(node.value, { childList: true, characterData: true, subtree: true })\n })\n onUpdated(() => { announce(); measure() })\n onBeforeUnmount(() => { observer?.disconnect(); words?.disconnect(); props.lifecycle.setNode(props.entry.toast.id, null) })\n return () => {\n const { entry, lifecycle, options, index, count } = props\n const item = entry.toast\n const slot = (name: keyof Classes) => clsx(options.toastOptions?.classes?.[name], item.classes?.[name])\n const [y, x] = lifecycle.position(entry).split(\"-\")\n const visible = index < (options.visibleToasts ?? 3)\n const disabled = item.dismissible === false || item.type === \"loading\"\n const type = item.type === \"normal\" || item.type === \"default\" ? undefined : item.type\n const icon = item.icon ?? (type && type in fallbackIcons ? options.icons?.[type as keyof typeof fallbackIcons] ?? fallbackIcons[type as keyof typeof fallbackIcons] : undefined)\n const actionButton = (kind: \"action\" | \"cancel\") => {\n const action = item[kind]\n if (!action) return null\n if (!actionObject(action)) return content(action)\n return h(\"button\", { type: \"button\", \"data-button\": \"true\", [`data-${kind}`]: \"true\", disabled: kind === \"cancel\" && disabled,\n class: slot(kind === \"action\" ? \"actionButton\" : \"cancelButton\"),\n style: kind === \"action\" ? item.actionButtonStyle ?? options.toastOptions?.actionButtonStyle : item.cancelButtonStyle ?? options.toastOptions?.cancelButtonStyle,\n onClick: (event: MouseEvent) => { if (kind === \"cancel\" && disabled) return; action.onClick(event); if (kind === \"cancel\" || !event.defaultPrevented) lifecycle.close(item.id, \"action\") },\n }, content(action.label))\n }\n const loader = () => h(\"div\", { class: clsx(\"sonner-loading-wrapper\", slot(\"loader\")), \"data-visible\": item.type === \"loading\" },\n slots[\"loading-icon\"] ? slots[\"loading-icon\"]() : options.icons?.loading ? h(\"div\", { class: \"sonner-loader\", \"data-visible\": item.type === \"loading\" }, content(options.icons.loading)) : h(\"div\", { class: \"sonner-spinner\" }, Array.from({ length: 12 }, (_, i) => h(\"div\", { key: i, class: \"sonner-loading-bar\" }))))\n return h(\"li\", {\n ref: node, tabindex: visible && !entry.removed ? 0 : -1, inert: !visible || entry.removed ? \"\" : undefined, \"aria-hidden\": !visible || entry.removed || undefined,\n class: clsx(options.toastOptions?.class, item.class, slot(\"toast\"), slot(\"default\"), type && slot(type as keyof Classes)),\n \"data-sonner-toast\": \"\", \"data-rich-colors\": item.richColors ?? options.richColors ?? undefined, \"data-styled\": !Boolean(item.component || item.unstyled || options.toastOptions?.unstyled),\n \"data-mounted\": entry.mounted, \"data-promise\": Boolean(item.promise), \"data-swiped\": Boolean(entry.x || entry.y), \"data-removed\": entry.removed,\n \"data-visible\": visible, \"data-y-position\": y, \"data-x-position\": x, \"data-index\": index, \"data-front\": index === 0, \"data-swiping\": entry.swiping,\n \"data-dismissible\": item.dismissible !== false, \"data-type\": type, \"data-invert\": item.invert || options.invert || undefined,\n \"data-swipe-out\": Boolean(entry.swipeOut), \"data-swipe-direction\": entry.swipeOut, \"data-expanded\": lifecycle.expanded || Boolean(options.expand && entry.mounted), \"data-testid\": item.testId,\n style: { \"--index\": index, \"--toasts-before\": index, \"--z-index\": count - index, \"--offset\": `${lifecycle.offset(entry)}px`, \"--initial-height\": options.expand ? \"auto\" : `${entry.height}px`, \"--swipe-amount-x\": `${entry.x}px`, \"--swipe-amount-y\": `${entry.y}px`, ...options.toastOptions?.style, ...item.style },\n onPointerdown: (event: PointerEvent) => lifecycle.pointerDown(item.id, event), onPointermove: (event: PointerEvent) => lifecycle.pointerMove(item.id, event),\n onPointerup: (event: PointerEvent) => lifecycle.pointerEnd(item.id, event), onPointercancel: (event: PointerEvent) => lifecycle.pointerEnd(item.id, event, true), onLostpointercapture: (event: PointerEvent) => lifecycle.pointerEnd(item.id, event, true),\n }, [\n (item.closeButton ?? options.toastOptions?.closeButton ?? options.closeButton) && !item.component && item.type !== \"loading\" ? h(\"button\", {\n type: \"button\", \"aria-label\": options.toastOptions?.closeButtonAriaLabel ?? \"Close toast\", \"data-disabled\": disabled, disabled, \"data-close-button\": \"true\", \"data-close-button-position\": item.closeButtonPosition ?? options.closeButtonPosition ?? \"top-left\", class: slot(\"closeButton\"),\n onClick: () => lifecycle.close(item.id, \"dismiss\"),\n }, options.icons?.close ? content(options.icons.close) : slots[\"close-icon\"]?.() ?? h(CloseIcon)) : null,\n item.component ? h(toRaw(item.component), { ...item.componentProps, onCloseToast: () => { if (!disabled) lifecycle.close(item.id, \"dismiss\") }, isPaused: lifecycle.paused }) : [\n (type || item.icon || item.promise) && item.icon !== null ? h(\"div\", { \"data-icon\": \"\", class: slot(\"icon\") }, [\n item.promise || item.type === \"loading\" ? item.icon ? content(item.icon) : loader() : null,\n item.type !== \"loading\" ? type && slots[`${type}-icon`] && !item.icon ? slots[`${type}-icon`]?.() : content(icon) : null,\n ]) : null,\n h(\"div\", { \"data-content\": \"\", role: alert() ? \"alert\" : undefined, class: slot(\"content\") }, [h(\"div\", { \"data-title\": \"\", class: slot(\"title\") }, content(item.title, item.componentProps)), item.description ? h(\"div\", { \"data-description\": \"\", class: clsx(options.toastOptions?.descriptionClass, slot(\"description\")) }, content(item.description, item.componentProps)) : null]),\n actionButton(\"cancel\"), actionButton(\"action\"),\n ],\n ])\n }\n },\n})\n\n/** Owns presentation/interaction only; vue-sonner remains the public toast store. */\nexport const ToastRenderer = defineComponent({\n name: \"ToastRenderer\", inheritAttrs: false,\n props: {\n id: String, position: String as PropType<ToasterProps[\"position\"]>, duration: Number, gap: Number, visibleToasts: Number,\n expand: { type: Boolean, default: undefined }, closeButton: { type: Boolean, default: undefined }, invert: { type: Boolean, default: undefined }, richColors: { type: Boolean, default: undefined },\n theme: String as PropType<ToasterProps[\"theme\"]>, hotkey: Array as PropType<string[]>, dir: String as PropType<ToasterProps[\"dir\"]>,\n swipeDirections: Array as PropType<ToasterProps[\"swipeDirections\"]>, icons: Object as PropType<ToasterProps[\"icons\"]>, containerAriaLabel: String,\n offset: [String, Number, Object] as PropType<ToasterProps[\"offset\"]>, mobileOffset: [String, Number, Object] as PropType<ToasterProps[\"mobileOffset\"]>,\n class: String, style: Object as PropType<CSSProperties>, toastOptions: Object as PropType<ToasterProps[\"toastOptions\"]>, closeButtonPosition: String as PropType<ToasterProps[\"closeButtonPosition\"]>,\n },\n setup(props, { attrs, slots }) {\n const { activeToasts } = useVueSonner()\n const revision = ref(0)\n const lifecycle = new ToastLifecycle<ToastT>(toast.dismiss, (reason, item) => reason === \"auto\" ? item.onAutoClose?.(item) : item.onDismiss?.(item))\n const unsubscribe = lifecycle.subscribe(() => { revision.value++ })\n const keydown = (event: KeyboardEvent) => lifecycle.keyDown(event, props.hotkey ?? [\"altKey\", \"KeyT\"])\n onMounted(() => { lifecycle.connect(document); document.addEventListener(\"keydown\", keydown) })\n onBeforeUnmount(() => { unsubscribe(); lifecycle.disconnect(); document.removeEventListener(\"keydown\", keydown) })\n watch(() => [activeToasts.value, props.id, props.position, props.duration, props.toastOptions?.duration, props.gap, props.visibleToasts, props.expand, props.swipeDirections], () => {\n lifecycle.sync(activeToasts.value, { id: props.id, position: props.position ?? \"bottom-right\", duration: props.toastOptions?.duration ?? props.duration ?? 4000, gap: props.gap ?? 14, visibleToasts: props.visibleToasts ?? 3, expand: props.expand, swipeDirections: props.swipeDirections })\n }, { immediate: true })\n return () => {\n const version = revision.value\n const hotkeyLabel = (props.hotkey ?? [\"altKey\", \"KeyT\"]).join(\"+\").replace(/Key|Digit/g, \"\")\n const positions = [...new Set(lifecycle.entries.map((entry) => lifecycle.position(entry)))]\n const dir = props.dir === \"auto\" || !props.dir ? documentDirection(typeof document === \"undefined\" ? undefined : document) : props.dir\n // aria-live=\"off\": not a live region itself (an announcer or an alert's role speaks, once), but a modal's\n // aria-hidden on everything else (Radix and Reka call aria-hidden's hideOthers) keeps any [aria-live]\n return h(\"section\", { ref: (node) => lifecycle.setRegion(node instanceof HTMLElement ? node : null), \"aria-label\": `${props.containerAriaLabel ?? \"Notifications\"} ${hotkeyLabel}`, tabindex: -1, \"aria-live\": \"off\" }, [\n h(\"div\", { key: \"polite\", ref: (node) => lifecycle.setAnnouncer(\"polite\", node instanceof HTMLElement ? node : null), role: \"status\", \"aria-live\": \"polite\", \"aria-atomic\": \"false\", \"data-toast-announcer\": \"polite\", style: announcerStyle }),\n h(\"div\", { key: \"assertive\", ref: (node) => lifecycle.setAnnouncer(\"assertive\", node instanceof HTMLElement ? node : null), role: \"alert\", \"aria-live\": \"assertive\", \"aria-atomic\": \"false\", \"data-toast-announcer\": \"assertive\", style: announcerStyle }),\n ...positions.map((position: Position) => {\n const entries = lifecycle.at(position)\n const [y, x] = position.split(\"-\")\n return h(\"ol\", mergeProps({ key: position, ref: (node) => lifecycle.setList(position, node instanceof HTMLElement ? node : null), dir, tabindex: -1, class: props.class,\n \"data-sonner-toaster\": \"true\", \"data-sonner-theme\": props.theme ?? \"light\", \"data-y-position\": y, \"data-x-position\": x,\n style: { \"--front-toast-height\": `${entries.find((entry) => !entry.removed)?.height ?? 0}px`, \"--width\": \"356px\", \"--gap\": `${props.gap ?? 14}px`, ...props.style, ...offsetStyles(props.offset, props.mobileOffset) },\n onFocusin: (event: FocusEvent) => lifecycle.focusIn(event), onFocusout: (event: FocusEvent) => lifecycle.focusOut(event),\n onPointerenter: (event: PointerEvent) => lifecycle.pointerEnter(event), onMouseenter: () => lifecycle.hover(true), onMousemove: () => lifecycle.hover(true), onMouseleave: () => lifecycle.hover(false),\n }, attrs), entries.map((entry, index) => h(ToastItem, { key: entry.toast.id, entry, lifecycle, options: props, index, count: entries.length, revision: version }, slots)))\n }),\n ])\n }\n },\n})\n"]}
@@ -19,13 +19,24 @@ export const compact = { class: s.Compact };
19
19
  const readTheme = () => document.documentElement.getAttribute("data-theme") === "dark" ? "dark" : "light";
20
20
  // Keep a gutter outside the safe area; explicit offsets override each supplied
21
21
  // edge, while omitted edges retain the safe default. Sonner applies these only
22
- // at its mobile breakpoint, so desktop positioning is unchanged.
22
+ // at its mobile breakpoint (600px), where a toast fills the width between the
23
+ // side gutters: 14, as the iOS 27 kit's notifications on a phone (Notification -
24
+ // Collapsed - List 135:73247, 374 of 402). A page moves the top and bottom edges
25
+ // with --toast-mobile-offset-top / -bottom (below its own top bar, say), and
26
+ // --toast-offset-top / -bottom above the breakpoint.
23
27
  const safeMobileOffset = {
24
- top: "calc(16px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)))",
25
- right: "calc(16px + var(--safe-area-inset-right, env(safe-area-inset-right, 0px)))",
26
- bottom: "calc(16px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)))",
27
- left: "calc(16px + var(--safe-area-inset-left, env(safe-area-inset-left, 0px)))",
28
+ top: "var(--toast-mobile-offset-top, calc(16px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))))",
29
+ right: "calc(14px + var(--safe-area-inset-right, env(safe-area-inset-right, 0px)))",
30
+ bottom: "var(--toast-mobile-offset-bottom, calc(16px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))))",
31
+ left: "calc(14px + var(--safe-area-inset-left, env(safe-area-inset-left, 0px)))",
28
32
  };
33
+ const pageOffset = {
34
+ top: "var(--toast-offset-top, 32px)",
35
+ bottom: "var(--toast-offset-bottom, 32px)",
36
+ };
37
+ const resolveOffset = (offset) => typeof offset === "number" || typeof offset === "string"
38
+ ? offset
39
+ : { ...offset, top: offset?.top ?? pageOffset.top, bottom: offset?.bottom ?? pageOffset.bottom };
29
40
  const resolveMobileOffset = (offset) => typeof offset === "number" || typeof offset === "string"
30
41
  ? offset
31
42
  : {
@@ -143,7 +154,7 @@ const ToasterComponent = defineComponent({
143
154
  "theme": theme.value,
144
155
  "position": props.position,
145
156
  "duration": props.duration,
146
- "offset": props.offset,
157
+ "offset": resolveOffset(props.offset),
147
158
  "mobileOffset": resolveMobileOffset(props.mobileOffset),
148
159
  "gap": props.gap,
149
160
  "class": s.Toaster,
@@ -1 +1 @@
1
- {"version":3,"file":"Toaster.js","sourceRoot":"","sources":["../../../../src/components/Toast/Toaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,EAAiC,MAAM,KAAK,CAAA;AACxG,OAAO,EAA2C,MAAM,YAAY,CAAA;AACpE,OAAO,EAAE,aAAa,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACnE,mFAAmF;AACnF,OAAO,sBAAsB,CAAA;AAC7B,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC5E,OAAO,CAAC,MAAM,kDAAkD,CAAA;AAEhE,8EAA8E;AAC9E,8EAA8E;AAC9E,6EAA6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U,EAAE,KAAK,CAAC,QAAQ;gBAC1B,QAAQ,EAAE,KAAK,CAAC,MAAM;gBACtB,cAAc,EAAE,mBAAmB,CAAC,KAAK,CAAC,YAAY,CAAC;gBACvD,KAAK,EAAE,KAAK,CAAC,GAAG;gBAChB,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,OAAO,EAAE,YAAY;gBACrB,cAAc,EAAE,YAAY;gBAC5B,iEAAiE;gBACjE,qEAAqE;gBACrE,0EAA0E;gBAC1E,QAAQ,EAAE,IAAI;gBACd,YAAY,EAAE,IAAI;gBAClB,qEAAqE;gBACrE,sEAAsE;gBACtE,qEAAqE;gBACrE,qBAAqB,EAAE,MAAM;gBAC7B,YAAY,EAAE,SAAS;gBACvB,GAAG,KAAK;aACT,EACD,SAAS,CACV,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAWF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAkF,CAAA","sourcesContent":["import { defineComponent, h, onBeforeUnmount, onMounted, ref, type Component, type PropType } from \"vue\"\nimport { type ToasterProps as SonnerToasterProps } from \"vue-sonner\"\nimport { ToastRenderer as SonnerToaster } from \"./ToastRenderer.js\"\n// sonner (React) injects its stylesheet on import; vue-sonner 2 ships it as a file\nimport \"vue-sonner/style.css\"\nimport { CheckCircle, InfoCircle, Warning, XCircle } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/Toast/Toast.module.css\"\n\n// Vue port of packages/ui/src/components/Toast/Toaster.tsx on vue-sonner, the\n// Vue port of sonner. vue-sonner names a few options differently from sonner:\n// `class` (sonner `className`), `classes` (`classNames`), `descriptionClass`\n// (`descriptionClassName`), and `toast.custom` takes a component. The type\n// icons are slots in vue-sonner (`icons` only feeds the close icon), so the\n// Plex icons and a caller's `icons` go in as slots.\n\n/**\n * Spread into any `toast(...)` options to get a shrink-to-fit, centered\n * layout: `toast(\"Saved\", compact)`, `toast.success(\"Done\", { ...compact, description })`.\n */\nexport const compact = { class: s.Compact } as const\n\ntype PlexTheme = \"light\" | \"dark\"\n\ntype ToastIcons = NonNullable<SonnerToasterProps[\"icons\"]>\n\nconst readTheme = (): PlexTheme =>\n document.documentElement.getAttribute(\"data-theme\") === \"dark\" ? \"dark\" : \"light\"\n\n// Keep a gutter outside the safe area; explicit offsets override each supplied\n// edge, while omitted edges retain the safe default. Sonner applies these only\n// at its mobile breakpoint, so desktop positioning is unchanged.\nconst safeMobileOffset = {\n top: \"calc(16px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)))\",\n right: \"calc(16px + var(--safe-area-inset-right, env(safe-area-inset-right, 0px)))\",\n bottom: \"calc(16px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px)))\",\n left: \"calc(16px + var(--safe-area-inset-left, env(safe-area-inset-left, 0px)))\",\n}\n\nconst resolveMobileOffset = (offset: SonnerToasterProps[\"mobileOffset\"]) =>\n typeof offset === \"number\" || typeof offset === \"string\"\n ? offset\n : {\n top: offset?.top ?? safeMobileOffset.top,\n right: offset?.right ?? safeMobileOffset.right,\n bottom: offset?.bottom ?? safeMobileOffset.bottom,\n left: offset?.left ?? safeMobileOffset.left,\n }\n\n/* Maps PlexUI semantic tokens onto sonner's CSS-variable hooks. Sonner's own\n stylesheet reads these for every toast, so the base look stays aligned with\n <Popover> / <Menu> without overriding each slot. */\nconst toasterStyle = {\n \"--normal-bg\": \"var(--color-surface-elevated)\",\n \"--normal-text\": \"var(--color-text)\",\n \"--normal-border\": \"transparent\",\n \"--border-radius\": \"var(--radius-xl)\",\n \"--width\": \"400px\",\n}\n\nconst toastOptions = {\n classes: {\n toast: s.Toast,\n title: s.Title,\n description: s.Description,\n content: s.Content,\n icon: s.Icon,\n actionButton: s.ActionButton,\n cancelButton: s.CancelButton,\n success: s.Success,\n error: s.Error,\n warning: s.Warning,\n info: s.Info,\n },\n}\n\nconst PLEX_ICONS = {\n success: CheckCircle,\n error: XCircle,\n warning: Warning,\n info: InfoCircle,\n} as const\n\n// sonner's close icon. vue-sonner's own misspells `stroke-width` (`stoke-width`),\n// so its X draws at the default 1px instead of 1.5px.\nconst CloseIcon = () =>\n h(\n \"svg\",\n {\n \"xmlns\": \"http://www.w3.org/2000/svg\",\n \"aria-hidden\": \"true\",\n \"width\": \"12\",\n \"height\": \"12\",\n \"viewBox\": \"0 0 24 24\",\n \"fill\": \"none\",\n \"stroke\": \"currentColor\",\n \"stroke-width\": \"1.5\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n },\n [h(\"line\", { x1: \"18\", y1: \"6\", x2: \"6\", y2: \"18\" }), h(\"line\", { x1: \"6\", y1: \"6\", x2: \"18\", y2: \"18\" })],\n )\n\nconst ToasterComponent = defineComponent({\n name: \"Toaster\",\n inheritAttrs: false,\n props: {\n /** Where toasts anchor on the viewport. @default \"top-center\" */\n position: { type: String as PropType<SonnerToasterProps[\"position\"]>, default: \"top-center\" },\n /** Default auto-dismiss duration in ms. @default 3000 */\n duration: { type: Number, default: 3000 },\n /** Distance from the viewport edge */\n offset: [String, Number, Object] as PropType<SonnerToasterProps[\"offset\"]>,\n /** Mobile distance from each safe viewport edge; explicit values override the default. */\n mobileOffset: [String, Number, Object] as PropType<SonnerToasterProps[\"mobileOffset\"]>,\n /** Gap between stacked toasts in px */\n gap: Number,\n },\n setup(props, { attrs, slots }) {\n const theme = ref<PlexTheme>(\"light\")\n let observer: MutationObserver | null = null\n\n onMounted(() => {\n theme.value = readTheme()\n\n observer = new MutationObserver(() => {\n theme.value = readTheme()\n })\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"data-theme\"],\n })\n })\n\n onBeforeUnmount(() => observer?.disconnect())\n\n // React passes `icons={{ success: <CheckCircle aria-hidden=\"true\" />, ... }}`,\n // which a caller's `icons` replaces as a whole (sonner's own icons then)\n const iconSlot = (type: keyof typeof PLEX_ICONS) => {\n const own = slots[`${type}-icon`]\n if (own) return own\n const userIcons = attrs.icons as ToastIcons | undefined\n if (userIcons) {\n const icon = userIcons[type]\n return icon ? () => h(icon as Component) : undefined\n }\n return () => h(PLEX_ICONS[type], { \"aria-hidden\": \"true\" })\n }\n\n return () => {\n const iconSlots: Record<string, () => unknown> = {}\n for (const type of Object.keys(PLEX_ICONS) as Array<keyof typeof PLEX_ICONS>) {\n const slot = iconSlot(type)\n if (slot) iconSlots[`${type}-icon`] = slot\n }\n // sonner wraps a custom `icons.loading` in its loader box (vue-sonner\n // ignores it); the slot renders only while the toast is loading\n const loadingIcon = (attrs.icons as ToastIcons | undefined)?.loading\n if (slots[\"loading-icon\"]) iconSlots[\"loading-icon\"] = slots[\"loading-icon\"]\n else if (loadingIcon) {\n iconSlots[\"loading-icon\"] = () => h(\"div\", { \"class\": \"sonner-loader\", \"data-visible\": \"true\" }, [h(loadingIcon)])\n }\n // vue-sonner prefers `icons.close` over this slot, as sonner does over its own icon\n iconSlots[\"close-icon\"] = slots[\"close-icon\"] ?? CloseIcon\n\n // vue-sonner's prop types reject `undefined`, which it treats as \"use the default\"\n return h(\n SonnerToaster as Component,\n {\n \"theme\": theme.value,\n \"position\": props.position,\n \"duration\": props.duration,\n \"offset\": props.offset,\n \"mobileOffset\": resolveMobileOffset(props.mobileOffset),\n \"gap\": props.gap,\n \"class\": s.Toaster,\n \"style\": toasterStyle,\n \"toastOptions\": toastOptions,\n // sonner leaves these unset, so React renders no `data-invert` /\n // `data-rich-colors`. vue-sonner defaults them to `false` and prints\n // \"false\"; `null` keeps the attributes off, as `undefined` does in React.\n \"invert\": null,\n \"richColors\": null,\n // vue-sonner binds `$attrs` last on its <ol>: React's sonner renders\n // `data-sonner-toaster=\"true\"` there and no `data-theme` (which would\n // also re-scope Plex's `:where([data-theme])` tokens at the toaster)\n \"data-sonner-toaster\": \"true\",\n \"data-theme\": undefined,\n ...attrs,\n },\n iconSlots,\n )\n }\n },\n})\n\ntype ToasterOwnProps = InstanceType<typeof ToasterComponent>[\"$props\"]\n\n/** Toaster props plus the vue-sonner `Toaster` props it forwards. */\nexport type ToasterProps = ToasterOwnProps &\n Omit<\n SonnerToasterProps,\n \"position\" | \"duration\" | \"closeButton\" | \"offset\" | \"mobileOffset\" | \"gap\" | \"theme\" | \"richColors\" | \"toastOptions\" | \"style\"\n >\n\n/**\n * Toast viewport. Every other vue-sonner `Toaster` prop (`expand`,\n * `visible-toasts`, `hotkey`, `dir`, `swipe-directions`, ...) is forwarded,\n * last, as React spreads `restProps`. Icon slots (`success-icon`, ...,\n * `close-icon`) replace the default icons.\n */\nexport const Toaster = ToasterComponent as typeof ToasterComponent & { new (): { $props: ToasterProps } }\n"]}
1
+ {"version":3,"file":"Toaster.js","sourceRoot":"","sources":["../../../../src/components/Toast/Toaster.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,GAAG,EAAiC,MAAM,KAAK,CAAA;AACxG,OAAO,EAA2C,MAAM,YAAY,CAAA;AACpE,OAAO,EAAE,aAAa,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAA;AACnE,mFAAmF;AACnF,OAAO,sBAAsB,CAAA;AAC7B,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAA;AAC5E,OAAO,CAAC,MAAM,kDAAkD,CAAA;AAEhE,8EAA8E;AAC9E,8EAA8E;AAC9E,6EAA6E;AAC7E,2EAA2E;AAC3E,4EAA4E;AAC5E,oDAAoD;AAEpD;;;GAGG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,EAAW,CAAA;AAMpD,MAAM,SAAS,GAAG,GAAc,EAAE,CAChC,QAAQ,CAAC,eAAe,CAAC,YAAY,CAAC,YAAY,CAAC,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAA;AAEnF,+EAA+E;AAC/E,+EAA+E;AAC/E,8EAA8E;AAC9E,iFAAiF;AACjF,i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AO,EAAE,KAAK,CAAC,KAAK;gBACpB,UAAU,EAAE,KAAK,CAAC,QAAQ;gBAC1B,UAAU,EAAE,KAAK,CAAC,QAAQ;gBAC1B,QAAQ,EAAE,aAAa,CAAC,KAAK,CAAC,MAAM,CAAC;gBACrC,cAAc,EAAE,mBAAmB,CAAC,KAAK,CAAC,YAAY,CAAC;gBACvD,KAAK,EAAE,KAAK,CAAC,GAAG;gBAChB,OAAO,EAAE,CAAC,CAAC,OAAO;gBAClB,OAAO,EAAE,YAAY;gBACrB,cAAc,EAAE,YAAY;gBAC5B,iEAAiE;gBACjE,qEAAqE;gBACrE,0EAA0E;gBAC1E,QAAQ,EAAE,IAAI;gBACd,YAAY,EAAE,IAAI;gBAClB,qEAAqE;gBACrE,sEAAsE;gBACtE,qEAAqE;gBACrE,qBAAqB,EAAE,MAAM;gBAC7B,YAAY,EAAE,SAAS;gBACvB,GAAG,KAAK;aACT,EACD,SAAS,CACV,CAAA;QACH,CAAC,CAAA;IACH,CAAC;CACF,CAAC,CAAA;AAWF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAkF,CAAA","sourcesContent":["import { defineComponent, h, onBeforeUnmount, onMounted, ref, type Component, type PropType } from \"vue\"\nimport { type ToasterProps as SonnerToasterProps } from \"vue-sonner\"\nimport { ToastRenderer as SonnerToaster } from \"./ToastRenderer.js\"\n// sonner (React) injects its stylesheet on import; vue-sonner 2 ships it as a file\nimport \"vue-sonner/style.css\"\nimport { CheckCircle, InfoCircle, Warning, XCircle } from \"../Icon/index.js\"\nimport s from \"@plexui/styles/components/Toast/Toast.module.css\"\n\n// Vue port of packages/ui/src/components/Toast/Toaster.tsx on vue-sonner, the\n// Vue port of sonner. vue-sonner names a few options differently from sonner:\n// `class` (sonner `className`), `classes` (`classNames`), `descriptionClass`\n// (`descriptionClassName`), and `toast.custom` takes a component. The type\n// icons are slots in vue-sonner (`icons` only feeds the close icon), so the\n// Plex icons and a caller's `icons` go in as slots.\n\n/**\n * Spread into any `toast(...)` options to get a shrink-to-fit, centered\n * layout: `toast(\"Saved\", compact)`, `toast.success(\"Done\", { ...compact, description })`.\n */\nexport const compact = { class: s.Compact } as const\n\ntype PlexTheme = \"light\" | \"dark\"\n\ntype ToastIcons = NonNullable<SonnerToasterProps[\"icons\"]>\n\nconst readTheme = (): PlexTheme =>\n document.documentElement.getAttribute(\"data-theme\") === \"dark\" ? \"dark\" : \"light\"\n\n// Keep a gutter outside the safe area; explicit offsets override each supplied\n// edge, while omitted edges retain the safe default. Sonner applies these only\n// at its mobile breakpoint (600px), where a toast fills the width between the\n// side gutters: 14, as the iOS 27 kit's notifications on a phone (Notification -\n// Collapsed - List 135:73247, 374 of 402). A page moves the top and bottom edges\n// with --toast-mobile-offset-top / -bottom (below its own top bar, say), and\n// --toast-offset-top / -bottom above the breakpoint.\nconst safeMobileOffset = {\n top: \"var(--toast-mobile-offset-top, calc(16px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px))))\",\n right: \"calc(14px + var(--safe-area-inset-right, env(safe-area-inset-right, 0px)))\",\n bottom: \"var(--toast-mobile-offset-bottom, calc(16px + var(--safe-area-inset-bottom, env(safe-area-inset-bottom, 0px))))\",\n left: \"calc(14px + var(--safe-area-inset-left, env(safe-area-inset-left, 0px)))\",\n}\n\nconst pageOffset = {\n top: \"var(--toast-offset-top, 32px)\",\n bottom: \"var(--toast-offset-bottom, 32px)\",\n}\n\nconst resolveOffset = (offset: SonnerToasterProps[\"offset\"]) =>\n typeof offset === \"number\" || typeof offset === \"string\"\n ? offset\n : { ...offset, top: offset?.top ?? pageOffset.top, bottom: offset?.bottom ?? pageOffset.bottom }\n\nconst resolveMobileOffset = (offset: SonnerToasterProps[\"mobileOffset\"]) =>\n typeof offset === \"number\" || typeof offset === \"string\"\n ? offset\n : {\n top: offset?.top ?? safeMobileOffset.top,\n right: offset?.right ?? safeMobileOffset.right,\n bottom: offset?.bottom ?? safeMobileOffset.bottom,\n left: offset?.left ?? safeMobileOffset.left,\n }\n\n/* Maps PlexUI semantic tokens onto sonner's CSS-variable hooks. Sonner's own\n stylesheet reads these for every toast, so the base look stays aligned with\n <Popover> / <Menu> without overriding each slot. */\nconst toasterStyle = {\n \"--normal-bg\": \"var(--color-surface-elevated)\",\n \"--normal-text\": \"var(--color-text)\",\n \"--normal-border\": \"transparent\",\n \"--border-radius\": \"var(--radius-xl)\",\n \"--width\": \"400px\",\n}\n\nconst toastOptions = {\n classes: {\n toast: s.Toast,\n title: s.Title,\n description: s.Description,\n content: s.Content,\n icon: s.Icon,\n actionButton: s.ActionButton,\n cancelButton: s.CancelButton,\n success: s.Success,\n error: s.Error,\n warning: s.Warning,\n info: s.Info,\n },\n}\n\nconst PLEX_ICONS = {\n success: CheckCircle,\n error: XCircle,\n warning: Warning,\n info: InfoCircle,\n} as const\n\n// sonner's close icon. vue-sonner's own misspells `stroke-width` (`stoke-width`),\n// so its X draws at the default 1px instead of 1.5px.\nconst CloseIcon = () =>\n h(\n \"svg\",\n {\n \"xmlns\": \"http://www.w3.org/2000/svg\",\n \"aria-hidden\": \"true\",\n \"width\": \"12\",\n \"height\": \"12\",\n \"viewBox\": \"0 0 24 24\",\n \"fill\": \"none\",\n \"stroke\": \"currentColor\",\n \"stroke-width\": \"1.5\",\n \"stroke-linecap\": \"round\",\n \"stroke-linejoin\": \"round\",\n },\n [h(\"line\", { x1: \"18\", y1: \"6\", x2: \"6\", y2: \"18\" }), h(\"line\", { x1: \"6\", y1: \"6\", x2: \"18\", y2: \"18\" })],\n )\n\nconst ToasterComponent = defineComponent({\n name: \"Toaster\",\n inheritAttrs: false,\n props: {\n /** Where toasts anchor on the viewport. @default \"top-center\" */\n position: { type: String as PropType<SonnerToasterProps[\"position\"]>, default: \"top-center\" },\n /** Default auto-dismiss duration in ms. @default 3000 */\n duration: { type: Number, default: 3000 },\n /** Distance from the viewport edge */\n offset: [String, Number, Object] as PropType<SonnerToasterProps[\"offset\"]>,\n /** Mobile distance from each safe viewport edge; explicit values override the default. */\n mobileOffset: [String, Number, Object] as PropType<SonnerToasterProps[\"mobileOffset\"]>,\n /** Gap between stacked toasts in px */\n gap: Number,\n },\n setup(props, { attrs, slots }) {\n const theme = ref<PlexTheme>(\"light\")\n let observer: MutationObserver | null = null\n\n onMounted(() => {\n theme.value = readTheme()\n\n observer = new MutationObserver(() => {\n theme.value = readTheme()\n })\n\n observer.observe(document.documentElement, {\n attributes: true,\n attributeFilter: [\"data-theme\"],\n })\n })\n\n onBeforeUnmount(() => observer?.disconnect())\n\n // React passes `icons={{ success: <CheckCircle aria-hidden=\"true\" />, ... }}`,\n // which a caller's `icons` replaces as a whole (sonner's own icons then)\n const iconSlot = (type: keyof typeof PLEX_ICONS) => {\n const own = slots[`${type}-icon`]\n if (own) return own\n const userIcons = attrs.icons as ToastIcons | undefined\n if (userIcons) {\n const icon = userIcons[type]\n return icon ? () => h(icon as Component) : undefined\n }\n return () => h(PLEX_ICONS[type], { \"aria-hidden\": \"true\" })\n }\n\n return () => {\n const iconSlots: Record<string, () => unknown> = {}\n for (const type of Object.keys(PLEX_ICONS) as Array<keyof typeof PLEX_ICONS>) {\n const slot = iconSlot(type)\n if (slot) iconSlots[`${type}-icon`] = slot\n }\n // sonner wraps a custom `icons.loading` in its loader box (vue-sonner\n // ignores it); the slot renders only while the toast is loading\n const loadingIcon = (attrs.icons as ToastIcons | undefined)?.loading\n if (slots[\"loading-icon\"]) iconSlots[\"loading-icon\"] = slots[\"loading-icon\"]\n else if (loadingIcon) {\n iconSlots[\"loading-icon\"] = () => h(\"div\", { \"class\": \"sonner-loader\", \"data-visible\": \"true\" }, [h(loadingIcon)])\n }\n // vue-sonner prefers `icons.close` over this slot, as sonner does over its own icon\n iconSlots[\"close-icon\"] = slots[\"close-icon\"] ?? CloseIcon\n\n // vue-sonner's prop types reject `undefined`, which it treats as \"use the default\"\n return h(\n SonnerToaster as Component,\n {\n \"theme\": theme.value,\n \"position\": props.position,\n \"duration\": props.duration,\n \"offset\": resolveOffset(props.offset),\n \"mobileOffset\": resolveMobileOffset(props.mobileOffset),\n \"gap\": props.gap,\n \"class\": s.Toaster,\n \"style\": toasterStyle,\n \"toastOptions\": toastOptions,\n // sonner leaves these unset, so React renders no `data-invert` /\n // `data-rich-colors`. vue-sonner defaults them to `false` and prints\n // \"false\"; `null` keeps the attributes off, as `undefined` does in React.\n \"invert\": null,\n \"richColors\": null,\n // vue-sonner binds `$attrs` last on its <ol>: React's sonner renders\n // `data-sonner-toaster=\"true\"` there and no `data-theme` (which would\n // also re-scope Plex's `:where([data-theme])` tokens at the toaster)\n \"data-sonner-toaster\": \"true\",\n \"data-theme\": undefined,\n ...attrs,\n },\n iconSlots,\n )\n }\n },\n})\n\ntype ToasterOwnProps = InstanceType<typeof ToasterComponent>[\"$props\"]\n\n/** Toaster props plus the vue-sonner `Toaster` props it forwards. */\nexport type ToasterProps = ToasterOwnProps &\n Omit<\n SonnerToasterProps,\n \"position\" | \"duration\" | \"closeButton\" | \"offset\" | \"mobileOffset\" | \"gap\" | \"theme\" | \"richColors\" | \"toastOptions\" | \"style\"\n >\n\n/**\n * Toast viewport. Every other vue-sonner `Toaster` prop (`expand`,\n * `visible-toasts`, `hotkey`, `dir`, `swipe-directions`, ...) is forwarded,\n * last, as React spreads `restProps`. Icon slots (`success-icon`, ...,\n * `close-icon`) replace the default icons.\n */\nexport const Toaster = ToasterComponent as typeof ToasterComponent & { new (): { $props: ToasterProps } }\n"]}
@@ -1,4 +1,6 @@
1
1
  const EXIT_DURATION = 200;
2
+ /** How long an announced line stays in the polite region before it leaves the DOM */
3
+ const ANNOUNCE_DURATION = 7000;
2
4
  export class ToastLifecycle {
3
5
  dismissStore;
4
6
  notify;
@@ -16,6 +18,14 @@ export class ToastLifecycle {
16
18
  lists = new Map();
17
19
  suppressed = new Map();
18
20
  lastPointerType = "";
21
+ region = null;
22
+ announcers = { polite: null, assertive: null };
23
+ announced = new Map();
24
+ /** Alerts read by the assertive announcer: shown behind the stack, their own role could not speak */
25
+ assertive = new Set();
26
+ announceTimers = new Set();
27
+ pending = new Map();
28
+ flushTimer;
19
29
  constructor(dismissStore, notify) {
20
30
  this.dismissStore = dismissStore;
21
31
  this.notify = notify;
@@ -25,10 +35,95 @@ export class ToastLifecycle {
25
35
  emit() { this.revision++; this.listeners.forEach((listener) => listener()); }
26
36
  get expanded() { return this.hovered || this.focused; }
27
37
  get paused() { return this.expanded || Boolean(this.gesture) || this.hidden; }
28
- connect(doc) { this.doc = doc; this.hidden = doc.hidden; doc.addEventListener("visibilitychange", this.visibility); this.refreshTimers(); }
38
+ connect(doc) {
39
+ this.doc = doc;
40
+ this.hidden = doc.hidden;
41
+ doc.addEventListener("visibilitychange", this.visibility);
42
+ for (const type of ISOLATED_EVENTS)
43
+ doc.addEventListener(type, this.isolate);
44
+ this.refreshTimers();
45
+ }
29
46
  visibility = () => { this.hidden = Boolean(this.doc?.hidden); this.refreshTimers(); this.emit(); };
47
+ /* The region is a layer of its own, above any modal. A modal layer (Radix, Reka) listens on the
48
+ document for focus and presses outside it: it would pull focus back out of a toast and close
49
+ on a press of its close or action. This listener, added when the Toaster mounts and so before a
50
+ Dialog opens, runs after the framework's own (React delegates to its root, Vue binds to the
51
+ element) and stops the ones added after it, only while a modal layer has turned the page's
52
+ pointer events off: then nothing under the toast should hear it. Without a modal, a Popover a
53
+ custom toast opened still hears a press elsewhere in the toast. */
54
+ isolate = (event) => {
55
+ const region = this.region;
56
+ if (!region || this.doc?.body.style.pointerEvents !== "none")
57
+ return;
58
+ const related = event.type === "focusout" ? event.relatedTarget : null;
59
+ if (event.target instanceof Node && region.contains(event.target) || related instanceof Node && region.contains(related))
60
+ event.stopImmediatePropagation();
61
+ };
62
+ setRegion(node) { this.region = node; }
63
+ setAnnouncer(kind, node) { this.announcers[kind] = node; }
64
+ /** An error that waits to be closed interrupts as an alert; every other toast is read politely. */
65
+ alert(entry) { return entry.toast.type === "error" && (entry.toast.duration || this.config.duration) === Infinity; }
66
+ /** Whether a toast's content carries role="alert": an alert, unless it came in behind the stack and the assertive announcer read it. */
67
+ alertRole(entry, custom) { return !custom && this.alert(entry) && !this.assertive.has(entry.toast.id); }
68
+ visible(entry) { return this.at(this.position(entry)).indexOf(entry) < this.config.visibleToasts; }
69
+ /** Reads a toast's words once, and again only when they change (a promise that settles, a custom toast's own state). */
70
+ speak(id, node, custom) {
71
+ const entry = this.entries.find((item) => item.toast.id === id);
72
+ if (!entry || entry.removed)
73
+ return;
74
+ const text = toastText(node);
75
+ const alert = this.alert(entry) && !custom;
76
+ // An alert speaks at once, never also politely: words still waiting to be read politely are read as the alert
77
+ if (alert && this.pending.get(id)?.assertive === false) {
78
+ this.pending.delete(id);
79
+ this.announced.delete(id);
80
+ }
81
+ if (!text || this.announced.get(id) === text)
82
+ return;
83
+ this.announced.set(id, text);
84
+ // A shown alert reads itself by its role; one that came in behind the stack (inert, aria-hidden) cannot
85
+ if (alert && this.visible(entry) && !this.assertive.has(id))
86
+ return;
87
+ this.pending.set(id, { text, assertive: alert });
88
+ // Its content then drops role="alert", so it does not speak again once the stack brings it forward
89
+ if (alert && !this.assertive.has(id)) {
90
+ this.assertive.add(id);
91
+ this.emit();
92
+ }
93
+ // Toasts shown together are read together, the oldest first, whichever framework renders them first
94
+ if (this.flushTimer === undefined)
95
+ this.flushTimer = setTimeout(this.flush, 0);
96
+ }
97
+ flush = () => {
98
+ this.flushTimer = undefined;
99
+ const order = this.entries.map((entry) => entry.toast.id).reverse();
100
+ const lines = [...this.pending].sort(([a], [b]) => order.indexOf(a) - order.indexOf(b));
101
+ this.pending.clear();
102
+ for (const [, { text, assertive }] of lines) {
103
+ const node = this.announcers[assertive ? "assertive" : "polite"];
104
+ if (!node)
105
+ continue;
106
+ const line = node.ownerDocument.createElement("div");
107
+ line.textContent = text;
108
+ node.append(line);
109
+ const timer = setTimeout(() => { line.remove(); this.announceTimers.delete(timer); }, ANNOUNCE_DURATION);
110
+ this.announceTimers.add(timer);
111
+ }
112
+ };
30
113
  disconnect() {
31
114
  this.doc?.removeEventListener("visibilitychange", this.visibility);
115
+ for (const type of ISOLATED_EVENTS)
116
+ this.doc?.removeEventListener(type, this.isolate);
117
+ for (const timer of this.announceTimers)
118
+ clearTimeout(timer);
119
+ clearTimeout(this.flushTimer);
120
+ this.flushTimer = undefined;
121
+ this.announceTimers.clear();
122
+ this.announced.clear();
123
+ this.assertive.clear();
124
+ this.pending.clear();
125
+ this.announcers.polite?.replaceChildren();
126
+ this.announcers.assertive?.replaceChildren();
32
127
  for (const entry of this.entries) {
33
128
  clearTimeout(entry.timer);
34
129
  clearTimeout(entry.exitTimer);
@@ -141,6 +236,9 @@ export class ToastLifecycle {
141
236
  return;
142
237
  entry.exitOffset = this.offset(entry);
143
238
  entry.removed = true;
239
+ this.announced.delete(id);
240
+ this.assertive.delete(id);
241
+ this.pending.delete(id);
144
242
  entry.detached = reason === "detach";
145
243
  this.pause(entry);
146
244
  if (this.gesture?.id === id)
@@ -264,6 +362,20 @@ export class ToastLifecycle {
264
362
  this.emit();
265
363
  }
266
364
  }
365
+ const ISOLATED_EVENTS = ["focusin", "focusout", "pointerdown"];
366
+ /** The words a toast says: its title and description, or a custom toast's text. */
367
+ export const toastText = (node) => {
368
+ const words = (element) => element?.textContent?.replace(/\s+/g, " ").trim() ?? "";
369
+ if (!node.querySelector("[data-content]"))
370
+ return words(node);
371
+ const title = words(node.querySelector("[data-title]"));
372
+ const description = words(node.querySelector("[data-description]"));
373
+ if (!title || !description)
374
+ return title || description;
375
+ return `${/[.!?…:;。!?]$/u.test(title) ? title : `${title}.`} ${description}`;
376
+ };
377
+ /** Hides the polite announcer from sight, not from a screen reader. */
378
+ export const announcerStyle = { position: "absolute", width: "1px", height: "1px", margin: "-1px", padding: "0", overflow: "hidden", clip: "rect(0 0 0 0)", clipPath: "inset(50%)", whiteSpace: "nowrap", border: "0" };
267
379
  export const offsetStyles = (offset, mobileOffset) => {
268
380
  const style = {};
269
381
  for (const [prefix, value, fallback] of [["--offset", offset, "32px"], ["--mobile-offset", mobileOffset, "16px"]]) {