@wow-two-beta/fe 0.0.48 → 0.0.50

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 (149) hide show
  1. package/dist/feedback/FeedbackBus.d.ts +154 -29
  2. package/dist/feedback/FeedbackBus.js +264 -27
  3. package/dist/feedback/FeedbackBus.js.map +1 -1
  4. package/dist/feedback/index.d.ts +1 -1
  5. package/dist/feedback/index.js +3 -1
  6. package/dist/foundation/dom/enums/ElementTag.d.ts +2 -0
  7. package/dist/foundation/dom/enums/ElementTag.js +3 -1
  8. package/dist/foundation/dom/enums/ElementTag.js.map +1 -1
  9. package/dist/index.js +325 -312
  10. package/dist/index.js.map +1 -1
  11. package/dist/presentation/display/index.js +105 -102
  12. package/dist/presentation/display/index.js.map +1 -1
  13. package/dist/presentation/display/notificationCenterGroup/NotificationCenterButton.vue.d.ts +18 -0
  14. package/dist/presentation/display/notificationCenterGroup/NotificationCenterButton.vue.js +120 -0
  15. package/dist/presentation/display/notificationCenterGroup/NotificationCenterButton.vue.js.map +1 -0
  16. package/dist/presentation/display/notificationCenterGroup/NotificationCenterButton2.vue.js +5 -0
  17. package/dist/presentation/display/notificationCenterGroup/NotificationCenterButton2.vue.js.map +1 -0
  18. package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroup.vue.d.ts +11 -6
  19. package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroup.vue.js +255 -61
  20. package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroup.vue.js.map +1 -1
  21. package/dist/presentation/display/notificationCenterGroup/{NotificationItem.vue.d.ts → NotificationCenterGroupItem.vue.d.ts} +13 -12
  22. package/dist/presentation/display/notificationCenterGroup/{NotificationItem.vue.js → NotificationCenterGroupItem.vue.js} +81 -58
  23. package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroupItem.vue.js.map +1 -0
  24. package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroupItem2.vue.js +5 -0
  25. package/dist/presentation/display/notificationCenterGroup/NotificationCenterGroupItem2.vue.js.map +1 -0
  26. package/dist/presentation/display/notificationCenterGroup/index.d.ts +6 -1
  27. package/dist/presentation/feedback/feedbackToastHost/FeedbackToastHost.vue.d.ts +1 -9
  28. package/dist/presentation/feedback/feedbackToastHost/FeedbackToastHost.vue.js +165 -20
  29. package/dist/presentation/feedback/feedbackToastHost/FeedbackToastHost.vue.js.map +1 -1
  30. package/dist/presentation/feedback/feedbackToastHost/RemindLaterButton.vue.d.ts +7 -0
  31. package/dist/presentation/feedback/feedbackToastHost/RemindLaterButton.vue.js +56 -0
  32. package/dist/presentation/feedback/feedbackToastHost/RemindLaterButton.vue.js.map +1 -0
  33. package/dist/presentation/feedback/feedbackToastHost/RemindLaterButton2.vue.js +5 -0
  34. package/dist/presentation/feedback/feedbackToastHost/RemindLaterButton2.vue.js.map +1 -0
  35. package/dist/presentation/feedback/index.js +9 -1
  36. package/dist/presentation/feedback/index.js.map +1 -1
  37. package/dist/presentation/feedback/toast/Toast.vue.d.ts +34 -8
  38. package/dist/presentation/feedback/toast/Toast.vue.js +290 -85
  39. package/dist/presentation/feedback/toast/Toast.vue.js.map +1 -1
  40. package/dist/presentation/feedback/toast/ToastContent.vue.d.ts +25 -0
  41. package/dist/presentation/feedback/toast/ToastContent.vue.js +78 -0
  42. package/dist/presentation/feedback/toast/ToastContent.vue.js.map +1 -0
  43. package/dist/presentation/feedback/toast/ToastContent2.vue.js +5 -0
  44. package/dist/presentation/feedback/toast/ToastContent2.vue.js.map +1 -0
  45. package/dist/presentation/feedback/toast/ToastRunningProgress.vue.d.ts +15 -0
  46. package/dist/presentation/feedback/toast/ToastRunningProgress.vue.js +88 -0
  47. package/dist/presentation/feedback/toast/ToastRunningProgress.vue.js.map +1 -0
  48. package/dist/presentation/feedback/toast/ToastRunningProgress2.vue.js +5 -0
  49. package/dist/presentation/feedback/toast/ToastRunningProgress2.vue.js.map +1 -0
  50. package/dist/presentation/feedback/toast/ToastSurface.d.ts +8 -0
  51. package/dist/presentation/feedback/toast/ToastSurface.js +10 -0
  52. package/dist/presentation/feedback/toast/ToastSurface.js.map +1 -0
  53. package/dist/presentation/feedback/toast/index.d.ts +1 -0
  54. package/dist/presentation/feedback/toastHost/ToastContent.d.ts +3 -0
  55. package/dist/presentation/feedback/toastHost/ToastEntry.d.ts +12 -0
  56. package/dist/presentation/feedback/toastHost/ToastFocusExtensions.d.ts +2 -0
  57. package/dist/presentation/feedback/toastHost/ToastFocusExtensions.js +11 -0
  58. package/dist/presentation/feedback/toastHost/ToastFocusExtensions.js.map +1 -0
  59. package/dist/presentation/feedback/toastHost/ToastGroup.d.ts +8 -0
  60. package/dist/presentation/feedback/toastHost/ToastGroupLatest.d.ts +10 -0
  61. package/dist/presentation/feedback/toastHost/ToastHost.vue.d.ts +55 -110
  62. package/dist/presentation/feedback/toastHost/ToastHost.vue.js +394 -399
  63. package/dist/presentation/feedback/toastHost/ToastHost.vue.js.map +1 -1
  64. package/dist/presentation/feedback/toastHost/ToastHost2.vue.js +4 -5
  65. package/dist/presentation/feedback/toastHost/ToastHostStore.d.ts +37 -0
  66. package/dist/presentation/feedback/toastHost/ToastHostStore.js +98 -0
  67. package/dist/presentation/feedback/toastHost/ToastHostStore.js.map +1 -0
  68. package/dist/presentation/feedback/toastHost/ToastHostStyles.d.ts +34 -0
  69. package/dist/presentation/feedback/toastHost/ToastHostStyles.js +44 -0
  70. package/dist/presentation/feedback/toastHost/ToastHostStyles.js.map +1 -0
  71. package/dist/presentation/feedback/toastHost/ToastNode.d.ts +3 -0
  72. package/dist/presentation/feedback/toastHost/ToastOptions.d.ts +72 -0
  73. package/dist/presentation/feedback/toastHost/ToastProgress.vue.d.ts +11 -0
  74. package/dist/presentation/feedback/toastHost/ToastProgress.vue.js +44 -0
  75. package/dist/presentation/feedback/toastHost/ToastProgress.vue.js.map +1 -0
  76. package/dist/presentation/feedback/toastHost/ToastProgress2.vue.js +5 -0
  77. package/dist/presentation/feedback/toastHost/ToastProgress2.vue.js.map +1 -0
  78. package/dist/presentation/feedback/toastHost/ToastPromiseOptions.d.ts +12 -0
  79. package/dist/presentation/feedback/toastHost/ToastRing.vue.d.ts +14 -0
  80. package/dist/presentation/feedback/toastHost/ToastRing.vue.js +65 -0
  81. package/dist/presentation/feedback/toastHost/ToastRing.vue.js.map +1 -0
  82. package/dist/presentation/feedback/toastHost/ToastRing2.vue.js +5 -0
  83. package/dist/presentation/feedback/toastHost/ToastRing2.vue.js.map +1 -0
  84. package/dist/presentation/feedback/toastHost/ToastSeconds.vue.d.ts +9 -0
  85. package/dist/presentation/feedback/toastHost/ToastSeconds.vue.js +56 -0
  86. package/dist/presentation/feedback/toastHost/ToastSeconds.vue.js.map +1 -0
  87. package/dist/presentation/feedback/toastHost/ToastSeconds2.vue.js +5 -0
  88. package/dist/presentation/feedback/toastHost/ToastSeconds2.vue.js.map +1 -0
  89. package/dist/presentation/feedback/toastHost/ToastSeverity.d.ts +3 -0
  90. package/dist/presentation/feedback/toastHost/UseResolvedToasts.d.ts +27 -0
  91. package/dist/presentation/feedback/toastHost/UseResolvedToasts.js +34 -0
  92. package/dist/presentation/feedback/toastHost/UseResolvedToasts.js.map +1 -0
  93. package/dist/presentation/feedback/toastHost/UseToastAnnouncer.d.ts +14 -0
  94. package/dist/presentation/feedback/toastHost/UseToastAnnouncer.js +106 -0
  95. package/dist/presentation/feedback/toastHost/UseToastAnnouncer.js.map +1 -0
  96. package/dist/presentation/feedback/toastHost/UseToastCapacity.d.ts +34 -0
  97. package/dist/presentation/feedback/toastHost/UseToastCapacity.js +128 -0
  98. package/dist/presentation/feedback/toastHost/UseToastCapacity.js.map +1 -0
  99. package/dist/presentation/feedback/toastHost/UseToastClock.d.ts +44 -0
  100. package/dist/presentation/feedback/toastHost/UseToastClock.js +134 -0
  101. package/dist/presentation/feedback/toastHost/UseToastClock.js.map +1 -0
  102. package/dist/presentation/feedback/toastHost/UseToastCountdown.d.ts +26 -0
  103. package/dist/presentation/feedback/toastHost/UseToastCountdown.js +23 -0
  104. package/dist/presentation/feedback/toastHost/UseToastCountdown.js.map +1 -0
  105. package/dist/presentation/feedback/toastHost/UseToastEntries.d.ts +4 -0
  106. package/dist/presentation/feedback/toastHost/UseToastEntries.js +17 -0
  107. package/dist/presentation/feedback/toastHost/UseToastEntries.js.map +1 -0
  108. package/dist/presentation/feedback/toastHost/UseToastExits.d.ts +11 -0
  109. package/dist/presentation/feedback/toastHost/UseToastExits.js +52 -0
  110. package/dist/presentation/feedback/toastHost/UseToastExits.js.map +1 -0
  111. package/dist/presentation/feedback/toastHost/UseToastGroupMotion.d.ts +43 -0
  112. package/dist/presentation/feedback/toastHost/UseToastGroupMotion.js +173 -0
  113. package/dist/presentation/feedback/toastHost/UseToastGroupMotion.js.map +1 -0
  114. package/dist/presentation/feedback/toastHost/UseToastHost.d.ts +10 -0
  115. package/dist/presentation/feedback/toastHost/UseToastHost.js +14 -0
  116. package/dist/presentation/feedback/toastHost/UseToastHost.js.map +1 -0
  117. package/dist/presentation/feedback/toastHost/UseToastHotkey.d.ts +20 -0
  118. package/dist/presentation/feedback/toastHost/UseToastHotkey.js +66 -0
  119. package/dist/presentation/feedback/toastHost/UseToastHotkey.js.map +1 -0
  120. package/dist/presentation/feedback/toastHost/UseToastPins.d.ts +26 -0
  121. package/dist/presentation/feedback/toastHost/UseToastPins.js +35 -0
  122. package/dist/presentation/feedback/toastHost/UseToastPins.js.map +1 -0
  123. package/dist/presentation/feedback/toastHost/UseToastStackMotion.d.ts +27 -0
  124. package/dist/presentation/feedback/toastHost/UseToastStackMotion.js +96 -0
  125. package/dist/presentation/feedback/toastHost/UseToastStackMotion.js.map +1 -0
  126. package/dist/presentation/feedback/toastHost/UseToastSwipe.d.ts +19 -0
  127. package/dist/presentation/feedback/toastHost/UseToastSwipe.js +173 -0
  128. package/dist/presentation/feedback/toastHost/UseToastSwipe.js.map +1 -0
  129. package/dist/presentation/feedback/toastHost/index.d.ts +8 -1
  130. package/dist/presentation/feedback/toastHost/index.js +7 -1
  131. package/dist/presentation/feedback/toastHost/index.js.map +1 -1
  132. package/dist/presentation/feedback/toastHost/styles.css +14 -2
  133. package/dist/presentation/layout/grid/Grid.variants.d.ts +7 -0
  134. package/dist/presentation/layout/grid/Grid.variants.js +4 -0
  135. package/dist/presentation/layout/grid/Grid.variants.js.map +1 -1
  136. package/dist/presentation/layout/grid/Grid.vue.d.ts +5 -0
  137. package/dist/presentation/layout/grid/Grid.vue.js +16 -4
  138. package/dist/presentation/layout/grid/Grid.vue.js.map +1 -1
  139. package/dist/presentation/layout/grid/index.d.ts +1 -1
  140. package/dist/presentation/layout/index.js +3 -1
  141. package/dist/presentation/layout/navbar/Navbar.vue.js.map +1 -1
  142. package/dist/presentation/overlays/popover/PopoverContent.vue.js +4 -4
  143. package/dist/presentation/overlays/popover/PopoverContent.vue.js.map +1 -1
  144. package/dist/presentation/overlays/tooltip/Tooltip.vue.js +52 -63
  145. package/dist/presentation/overlays/tooltip/Tooltip.vue.js.map +1 -1
  146. package/package.json +1 -1
  147. package/dist/presentation/display/notificationCenterGroup/NotificationItem.vue.js.map +0 -1
  148. package/dist/presentation/display/notificationCenterGroup/NotificationItem2.vue.js +0 -5
  149. package/dist/presentation/display/notificationCenterGroup/NotificationItem2.vue.js.map +0 -1
@@ -0,0 +1,56 @@
1
+ import { defineComponent, shallowRef, openBlock, createElementBlock, createVNode, unref, withCtx, createTextVNode, toDisplayString, createCommentVNode } from "vue";
2
+ import { useLocale } from "../../../foundation/i18n/providers/LocaleContext.js";
3
+ import _sfc_main$1 from "../../actions/button/Button.vue.js";
4
+ const _hoisted_1 = { class: "flex flex-wrap items-center gap-2" };
5
+ const _hoisted_2 = {
6
+ key: 0,
7
+ role: "status",
8
+ class: "text-xs text-destructive-soft-foreground"
9
+ };
10
+ const _sfc_main = /* @__PURE__ */ defineComponent({
11
+ ...{ name: "RemindLaterButton" },
12
+ __name: "RemindLaterButton",
13
+ props: {
14
+ schedule: { type: Function }
15
+ },
16
+ setup(__props) {
17
+ const props = __props;
18
+ const locale = useLocale();
19
+ const pending = shallowRef(false);
20
+ const failed = shallowRef(false);
21
+ async function remind(event) {
22
+ event.currentTarget?.focus();
23
+ if (pending.value) return;
24
+ pending.value = true;
25
+ failed.value = false;
26
+ try {
27
+ await props.schedule();
28
+ } catch {
29
+ failed.value = true;
30
+ } finally {
31
+ pending.value = false;
32
+ }
33
+ }
34
+ return (_ctx, _cache) => {
35
+ return openBlock(), createElementBlock("div", _hoisted_1, [
36
+ createVNode(unref(_sfc_main$1), {
37
+ size: "xs",
38
+ variant: "outline",
39
+ "is-loading": pending.value,
40
+ "loading-text": unref(locale).t("FeedbackToastHost.schedulingReminder", void 0, "Scheduling…"),
41
+ onClick: remind
42
+ }, {
43
+ default: withCtx(() => [
44
+ createTextVNode(toDisplayString(unref(locale).t("FeedbackToastHost.remindLater", void 0, "Remind later")), 1)
45
+ ]),
46
+ _: 1
47
+ }, 8, ["is-loading", "loading-text"]),
48
+ failed.value ? (openBlock(), createElementBlock("span", _hoisted_2, toDisplayString(unref(locale).t("FeedbackToastHost.reminderFailed", void 0, "Could not schedule the reminder. Try again.")), 1)) : createCommentVNode("", true)
49
+ ]);
50
+ };
51
+ }
52
+ });
53
+ export {
54
+ _sfc_main as default
55
+ };
56
+ //# sourceMappingURL=RemindLaterButton.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemindLaterButton.vue.js","sources":["../../../../src/presentation/feedback/feedbackToastHost/RemindLaterButton.vue"],"sourcesContent":["<script lang=\"ts\">\n/** Defines props for the Remind later button of a bus notice. */\nexport interface RemindLaterButtonProps {\n /** Schedules the reminder. A rejection shows the retry hint and keeps the button available. */\n readonly schedule: () => Promise<void>;\n}\n</script>\n\n<script setup lang=\"ts\">\nimport { shallowRef } from 'vue';\n\nimport { useLocale } from '../../../foundation/i18n';\nimport { Button } from '../../actions/button';\n\n/** Renders the Remind later button of a bus notice: loading while the scheduler runs, a status line on failure. */\ndefineOptions({ name: 'RemindLaterButton' });\n\nconst props = defineProps<RemindLaterButtonProps>();\n\nconst locale = useLocale();\nconst pending = shallowRef(false);\nconst failed = shallowRef(false);\n\n/** Runs the scheduler, holding the button while it runs and flagging a rejection. */\nasync function remind(event: MouseEvent): Promise<void> {\n (event.currentTarget as HTMLElement | null)?.focus();\n if (pending.value) return;\n pending.value = true;\n failed.value = false;\n try {\n await props.schedule();\n } catch {\n failed.value = true;\n } finally {\n pending.value = false;\n }\n}\n</script>\n\n<template>\n <div class=\"flex flex-wrap items-center gap-2\">\n <Button\n size=\"xs\"\n variant=\"outline\"\n :is-loading=\"pending\"\n :loading-text=\"locale.t('FeedbackToastHost.schedulingReminder', undefined, 'Scheduling…')\"\n @click=\"remind\"\n >\n {{ locale.t('FeedbackToastHost.remindLater', undefined, 'Remind later') }}\n </Button>\n <span v-if=\"failed\" role=\"status\" class=\"text-xs text-destructive-soft-foreground\">\n {{ locale.t('FeedbackToastHost.reminderFailed', undefined, 'Could not schedule the reminder. Try again.') }}\n </span>\n </div>\n</template>\n"],"names":["_openBlock","_createElementBlock","_createVNode","_unref","Button","_toDisplayString"],"mappings":";;;;;;;;;;;;;;;;AAiBA,UAAM,QAAQ;AAEd,UAAM,SAAS,UAAA;AACf,UAAM,UAAU,WAAW,KAAK;AAChC,UAAM,SAAS,WAAW,KAAK;AAG/B,mBAAe,OAAO,OAAkC;AACrD,YAAM,eAAsC,MAAA;AAC7C,UAAI,QAAQ,MAAO;AACnB,cAAQ,QAAQ;AAChB,aAAO,QAAQ;AACf,UAAI;AACF,cAAM,MAAM,SAAA;AAAA,MACd,QAAQ;AACN,eAAO,QAAQ;AAAA,MACjB,UAAA;AACE,gBAAQ,QAAQ;AAAA,MAClB;AAAA,IACF;;AAIE,aAAAA,UAAA,GAAAC,mBAaM,OAbN,YAaM;AAAA,QAZJC,YAQSC,MAAAC,WAAA,GAAA;AAAA,UAPP,MAAK;AAAA,UACL,SAAQ;AAAA,UACP,cAAY,QAAA;AAAA,UACZ,gBAAcD,MAAA,MAAA,EAAO,0CAA0C,QAAS,aAAA;AAAA,UACxE,SAAO;AAAA,QAAA;2BAER,MAA0E;AAAA,4CAAvEA,MAAA,MAAA,EAAO,EAAC,iCAAkC,QAAS,cAAA,CAAA,GAAA,CAAA;AAAA,UAAA;;;QAE5C,OAAA,SAAZH,aAAAC,mBAEO,QAFP,YAEOI,gBADFF,cAAO,sCAAsC,QAAS,6CAAA,CAAA,GAAA,CAAA;;;;;"}
@@ -0,0 +1,5 @@
1
+ import _sfc_main from "./RemindLaterButton.vue.js";
2
+ export {
3
+ _sfc_main as default
4
+ };
5
+ //# sourceMappingURL=RemindLaterButton2.vue.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RemindLaterButton2.vue.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
@@ -1,4 +1,7 @@
1
- import { DefaultToastDurations, default as default2, ToastTimer, toastHost, useToastHost } from "./toastHost/ToastHost.vue.js";
1
+ import { ToastGroupMotion, default as default2, ToastMotion, ToastTimer } from "./toastHost/ToastHost.vue.js";
2
+ import { toastHost } from "./toastHost/ToastHostStore.js";
3
+ import { DefaultToastDurations, DefaultToastPriorityDurations } from "./toastHost/UseResolvedToasts.js";
4
+ import { useToastHost } from "./toastHost/UseToastHost.js";
2
5
  import { default as default3 } from "./alert/Alert.vue.js";
3
6
  import { default as default4 } from "./alertSimple/AlertSimple.vue.js";
4
7
  import { default as default5 } from "./banner/Banner.vue.js";
@@ -34,6 +37,7 @@ import { default as default34, TypingTone } from "./typingIndicator/TypingIndica
34
37
  import { default as default35 } from "./undoBar/UndoBar.vue.js";
35
38
  import { SkeletonStateAnimation, SkeletonStateShape, skeletonBoxClass, skeletonLineClass, skeletonPaintClass, skeletonSlotVariants, skeletonVariants } from "./skeletonState/SkeletonState.variants.js";
36
39
  import { SpinnerTone, spinnerVariants } from "./spinner/Spinner.variants.js";
40
+ import { ToastSurface } from "./toast/ToastSurface.js";
37
41
  import { alertSimpleVariants } from "./alertSimple/AlertSimple.variants.js";
38
42
  import { bannerSimpleVariants } from "./bannerSimple/BannerSimple.variants.js";
39
43
  import { progressFillVariants, progressTrackVariants } from "./progressBar/ProgressBar.variants.js";
@@ -50,6 +54,7 @@ export {
50
54
  default9 as DataRegion,
51
55
  DataRegionState,
52
56
  DefaultToastDurations,
57
+ DefaultToastPriorityDurations,
53
58
  default10 as ErrorBoundary,
54
59
  default11 as FeedbackToastHost,
55
60
  default12 as FieldErrorCallout,
@@ -77,8 +82,11 @@ export {
77
82
  default29 as SplashScreen,
78
83
  default30 as StatusIndicator,
79
84
  default31 as Toast,
85
+ ToastGroupMotion,
80
86
  default2 as ToastHost,
87
+ ToastMotion,
81
88
  default32 as ToastSimple,
89
+ ToastSurface,
82
90
  ToastTimer,
83
91
  default33 as TrendIndicator,
84
92
  default34 as TypingIndicator,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -1,4 +1,7 @@
1
+ import { NoticeProgress } from '../../../feedback';
1
2
  import { Severity } from '../../../foundation/styles';
3
+ import { ToastSurface } from './ToastSurface';
4
+ /** Defines props for the toast card. */
2
5
  export interface ToastProps {
3
6
  /** The semantic severity palette. */
4
7
  readonly severity?: Severity;
@@ -14,21 +17,40 @@ export interface ToastProps {
14
17
  readonly closeLabel?: string;
15
18
  /** The accessible label for removing a retained notice. Default "Delete notification". */
16
19
  readonly deleteLabel?: string;
17
- /**
18
- * Shows the severity's own glyph when no `icon` is given — a distinct shape per severity, so the meaning
19
- * never rests on colour alone. `neutral` has none. Default `true`.
20
- */
20
+ /** The pin toggle's pressed state; the toggle renders only when this is supplied. */
21
+ readonly isPinned?: boolean;
22
+ /** The accessible label for the pin toggle. Default "Pin notification". */
23
+ readonly pinLabel?: string;
24
+ /** The tooltip shown on a pinned toggle. Default "Unpin notification". */
25
+ readonly unpinLabel?: string;
26
+ /** The details disclosure's open state; supplying it makes the disclosure controlled. */
27
+ readonly detailsOpen?: boolean;
28
+ /** The compact layout, which places actions alongside the copy and wraps them as space requires. */
29
+ readonly isCompact?: boolean;
30
+ /** @internal The grouped layout, which fits the details viewport to at most three complete rows. */
31
+ readonly isGrouped?: boolean;
32
+ /** The switch for the severity's own glyph, shown when no `icon` is given; `neutral` has none. Default `true`. */
21
33
  readonly showSeverityIcon?: boolean;
34
+ /** The card material. Default `ToastSurface.Solid`. */
35
+ readonly surface?: ToastSurface;
36
+ /** The running operation's progress, shown under the copy when supplied. */
37
+ readonly progress?: NoticeProgress;
38
+ /** Fires when the close button is activated; the button renders only when this is supplied. */
39
+ readonly onClose?: () => void;
40
+ /** Fires when the delete button is activated; the button renders only when this is supplied. */
41
+ readonly onDelete?: () => void;
22
42
  }
23
43
  declare const _default: __VLS_WithSlots<import('vue').DefineComponent<ToastProps, {
24
44
  el: import('vue').ComputedRef<HTMLDivElement | null>;
25
45
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
26
- delete: () => any;
27
- close: () => any;
46
+ togglePin: () => any;
47
+ "update:detailsOpen": (value: boolean) => any;
28
48
  }, string, import('vue').PublicProps, Readonly<ToastProps> & Readonly<{
29
- onDelete?: (() => any) | undefined;
30
- onClose?: (() => any) | undefined;
49
+ onTogglePin?: (() => any) | undefined;
50
+ "onUpdate:detailsOpen"?: ((value: boolean) => any) | undefined;
31
51
  }>, {
52
+ readonly isPinned: boolean;
53
+ readonly detailsOpen: boolean;
32
54
  readonly showSeverityIcon: boolean;
33
55
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>, {
34
56
  /** The extra content below the description. */
@@ -41,8 +63,12 @@ declare const _default: __VLS_WithSlots<import('vue').DefineComponent<ToastProps
41
63
  description?(): unknown;
42
64
  /** The action row. Falls back to the `actions` prop. */
43
65
  actions?(): unknown;
66
+ /** Extra content shown on demand below the summary and its controls. */
67
+ details?(): unknown;
44
68
  /** The adornment beside the close button — a countdown, a timestamp. */
45
69
  trailing?(): unknown;
70
+ /** The decorative indicator wrapping the close glyph. */
71
+ closeIndicator?(): unknown;
46
72
  }>;
47
73
  export default _default;
48
74
  type __VLS_WithSlots<T, S> = T & {
@@ -1,31 +1,41 @@
1
- import { defineComponent, useAttrs, useSlots, getCurrentInstance, useTemplateRef, computed, openBlock, createBlock, mergeProps, unref, withCtx, createElementBlock, renderSlot, normalizeClass, Fragment, createTextVNode, toDisplayString, createCommentVNode, createElementVNode, createVNode } from "vue";
1
+ import { defineComponent, useAttrs, useSlots, useTemplateRef, useId, ref, computed, watch, onBeforeUpdate, onUpdated, openBlock, createBlock, mergeProps, unref, withCtx, createElementVNode, normalizeClass, createElementBlock, renderSlot, Fragment, createTextVNode, toDisplayString, createCommentVNode, createVNode, createSlots, withModifiers, withDirectives, vShow } from "vue";
2
+ import { useLocale } from "../../../foundation/i18n/providers/LocaleContext.js";
2
3
  import { useLocaleDefaults } from "../../../foundation/i18n/UseLocaleDefaults.js";
3
- import { Trash2, X } from "lucide-vue-next";
4
- import { cn } from "../../../foundation/styles/Cn.js";
5
- import { Severity } from "../../../foundation/styles/enums/Severity.js";
6
4
  import { SeverityIcons, SeverityIconClasses } from "../../../foundation/icons/SeverityIcons.js";
7
5
  import _sfc_main$1 from "../toastSimple/ToastSimple.vue.js";
6
+ import _sfc_main$3 from "./ToastContent.vue.js";
7
+ import _sfc_main$4 from "./ToastRunningProgress.vue.js";
8
+ import { ChevronDown, Pin, Trash2, X } from "lucide-vue-next";
9
+ import { cn } from "../../../foundation/styles/Cn.js";
10
+ import { Severity } from "../../../foundation/styles/enums/Severity.js";
11
+ import { ToastSurface } from "./ToastSurface.js";
8
12
  import _sfc_main$2 from "../../../foundation/icons/icon/Icon.vue.js";
13
+ import _sfc_main$5 from "../../actions/button/Button.vue.js";
9
14
  const _hoisted_1 = {
10
15
  key: 0,
11
16
  "data-toast-icon": "",
12
17
  class: "mt-0.5 shrink-0"
13
18
  };
14
- const _hoisted_2 = { class: "min-w-0 flex-1" };
15
- const _hoisted_3 = {
16
- key: 0,
17
- class: "font-medium"
18
- };
19
+ const _hoisted_2 = ["aria-label", "aria-pressed", "title"];
20
+ const _hoisted_3 = ["aria-label"];
19
21
  const _hoisted_4 = {
20
- key: 2,
21
- class: "mt-2 flex flex-wrap items-center gap-2"
22
- };
23
- const _hoisted_5 = {
24
- key: 1,
22
+ key: 3,
25
23
  class: "flex h-5 shrink-0 items-center"
26
24
  };
27
- const _hoisted_6 = ["aria-label"];
28
- const _hoisted_7 = ["aria-label"];
25
+ const _hoisted_5 = ["aria-label"];
26
+ const _hoisted_6 = {
27
+ key: 0,
28
+ "aria-hidden": "true",
29
+ class: "pointer-events-none absolute inset-0"
30
+ };
31
+ const _hoisted_7 = ["id"];
32
+ const CloseIcon = X;
33
+ const GlassClasses = [
34
+ "data-[toast-surface=glass]:surface-glass-menu",
35
+ "data-[toast-surface=glass]:[box-shadow:var(--glass-menu-shadow,0_10px_15px_-3px_rgb(0_0_0/0.1),0_4px_6px_-4px_rgb(0_0_0/0.1)),inset_0_1px_0_var(--glass-highlight,transparent)]"
36
+ ];
37
+ const GlassEdgeClass = "data-[toast-surface=glass]:border-glass-edge";
38
+ const IconControlClass = "grid size-6 shrink-0 place-items-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring pointer-coarse:size-9";
29
39
  const _sfc_main = /* @__PURE__ */ defineComponent({
30
40
  ...{ name: "Toast", inheritAttrs: false },
31
41
  __name: "Toast",
@@ -37,106 +47,301 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
37
47
  actions: {},
38
48
  closeLabel: {},
39
49
  deleteLabel: {},
40
- showSeverityIcon: { type: Boolean, default: true }
50
+ isPinned: { type: Boolean, default: void 0 },
51
+ pinLabel: {},
52
+ unpinLabel: {},
53
+ detailsOpen: { type: Boolean, default: void 0 },
54
+ isCompact: { type: Boolean },
55
+ isGrouped: { type: Boolean },
56
+ showSeverityIcon: { type: Boolean, default: true },
57
+ surface: {},
58
+ progress: {},
59
+ onClose: {},
60
+ onDelete: {}
41
61
  },
42
- emits: ["close", "delete"],
62
+ emits: ["togglePin", "update:detailsOpen"],
43
63
  setup(__props, { expose: __expose, emit: __emit }) {
44
- const CloseIcon = X;
45
64
  const componentProps = __props;
46
- const props = useLocaleDefaults(componentProps, "Toast", { closeLabel: "Dismiss", deleteLabel: "Delete notification" });
65
+ const props = useLocaleDefaults(componentProps, "Toast", {
66
+ closeLabel: "Dismiss",
67
+ deleteLabel: "Delete notification",
68
+ pinLabel: "Pin notification",
69
+ unpinLabel: "Unpin notification"
70
+ });
47
71
  const emit = __emit;
48
72
  const attrs = useAttrs();
49
73
  const slots = useSlots();
50
- const instance = getCurrentInstance();
74
+ const locale = useLocale();
51
75
  const inner = useTemplateRef("inner");
52
- const hasClose = () => Boolean(instance?.vnode.props?.onClose);
53
- const hasDelete = () => Boolean(instance?.vnode.props?.onDelete);
76
+ const header = useTemplateRef("header");
77
+ const details = useTemplateRef("details");
78
+ const detailsId = useId();
79
+ const titleId = useId();
80
+ const localExpanded = ref(false);
81
+ let readingAnchor;
82
+ const isDetailsOpen = computed(() => props.detailsOpen ?? localExpanded.value);
54
83
  const severityIcon = computed(
55
84
  () => props.showSeverityIcon && !props.icon ? SeverityIcons[props.severity ?? Severity.Neutral] : null
56
85
  );
57
86
  const severityIconClass = computed(() => SeverityIconClasses[props.severity ?? Severity.Neutral]);
58
- const hasIcon = () => Boolean(props.icon) || Boolean(slots.icon) || severityIcon.value !== null;
59
- const hasTitle = () => Boolean(props.title) || Boolean(slots.title);
60
- const hasDescription = () => Boolean(props.description) || Boolean(slots.description);
61
- const hasActions = () => Boolean(props.actions) || Boolean(slots.actions);
62
- const classes = computed(() => cn("flex items-start gap-3", attrs.class));
63
- const descriptionClasses = () => cn("text-sm", hasTitle() && "mt-0.5 text-muted-foreground");
87
+ const isGlass = computed(() => props.surface === ToastSurface.Glass);
88
+ const classes = computed(
89
+ () => cn(
90
+ "min-w-0 [overflow-wrap:anywhere]",
91
+ isGlass.value && GlassClasses,
92
+ isGlass.value && (props.severity ?? Severity.Neutral) === Severity.Neutral && GlassEdgeClass,
93
+ props.isCompact && "py-2",
94
+ props.isGrouped && "flex max-h-(--toast-available-height) flex-col overflow-hidden p-0",
95
+ attrs.class
96
+ )
97
+ );
64
98
  const rest = computed(() => {
65
99
  const { class: _class, ...others } = attrs;
66
100
  return others;
67
101
  });
68
102
  const el = computed(() => inner.value?.el ?? null);
69
103
  __expose({ el });
104
+ watch(
105
+ [details, isDetailsOpen, () => props.isGrouped],
106
+ ([viewport, open, grouped], _previous, onCleanup) => {
107
+ if (!viewport || !open || !grouped) {
108
+ if (viewport?.style.maxHeight) viewport.style.removeProperty("max-height");
109
+ return;
110
+ }
111
+ fitGroupDetails();
112
+ const observer = typeof ResizeObserver === "undefined" ? void 0 : new ResizeObserver(fitGroupDetails);
113
+ if (header.value) observer?.observe(header.value);
114
+ if (viewport.firstElementChild) observer?.observe(viewport.firstElementChild);
115
+ window.addEventListener("resize", fitGroupDetails);
116
+ onCleanup(() => {
117
+ observer?.disconnect();
118
+ window.removeEventListener("resize", fitGroupDetails);
119
+ });
120
+ },
121
+ { flush: "post" }
122
+ );
123
+ onBeforeUpdate(() => {
124
+ const viewport = details.value;
125
+ if (!props.isGrouped || !isDetailsOpen.value || !viewport) return;
126
+ if (viewport.scrollTop === 0 && !viewport.contains(document.activeElement)) return;
127
+ const row = Array.from(groupRows(viewport)).find((item) => item.offsetTop + item.offsetHeight > viewport.scrollTop);
128
+ if (row) readingAnchor = { row, offset: row.offsetTop - viewport.scrollTop };
129
+ });
130
+ onUpdated(() => {
131
+ fitGroupDetails();
132
+ const viewport = details.value;
133
+ if (viewport && readingAnchor && viewport.contains(readingAnchor.row)) {
134
+ viewport.scrollTop = readingAnchor.row.offsetTop - readingAnchor.offset;
135
+ }
136
+ readingAnchor = void 0;
137
+ });
138
+ function toggleDetails() {
139
+ const next = !isDetailsOpen.value;
140
+ localExpanded.value = next;
141
+ emit("update:detailsOpen", next);
142
+ }
143
+ function hasIcon() {
144
+ return Boolean(props.icon) || Boolean(slots.icon) || severityIcon.value !== null;
145
+ }
146
+ function hasTitle() {
147
+ return Boolean(props.title) || Boolean(slots.title);
148
+ }
149
+ function hasDescription() {
150
+ return Boolean(props.description) || Boolean(slots.description);
151
+ }
152
+ function hasActions() {
153
+ return Boolean(props.actions) || Boolean(slots.actions);
154
+ }
155
+ function groupRows(viewport) {
156
+ return viewport.querySelectorAll(":scope > ul > [data-toast-group-row]");
157
+ }
158
+ function blockEdges(style) {
159
+ return [style.paddingTop, style.paddingBottom, style.borderTopWidth, style.borderBottomWidth].reduce(
160
+ (sum, value) => sum + (Number.parseFloat(value) || 0),
161
+ 0
162
+ );
163
+ }
164
+ function fitGroupDetails() {
165
+ if (!props.isGrouped || !isDetailsOpen.value || !details.value || !header.value || !el.value) return;
166
+ const viewport = details.value;
167
+ const rows = groupRows(viewport);
168
+ const first = rows[0];
169
+ if (!first) return;
170
+ const surfaceStyle = getComputedStyle(el.value);
171
+ const viewportStyle = getComputedStyle(viewport);
172
+ const boxEdges = blockEdges(viewportStyle);
173
+ const limit = Number.parseFloat(surfaceStyle.maxHeight);
174
+ const chrome = header.value.offsetHeight + blockEdges(surfaceStyle) + (Number.parseFloat(viewportStyle.marginTop) || 0);
175
+ const room = Number.isFinite(limit) ? Math.max(0, limit - chrome - boxEdges) : window.innerHeight * 0.55;
176
+ let height = 0;
177
+ for (const row of Array.from(rows).slice(0, 3)) {
178
+ if (height + row.offsetHeight > room) break;
179
+ height += row.offsetHeight;
180
+ }
181
+ const cap = `${boxEdges + (height || Math.min(first.offsetHeight, room))}px`;
182
+ if (viewport.style.maxHeight !== cap) viewport.style.maxHeight = cap;
183
+ }
70
184
  return (_ctx, _cache) => {
71
185
  return openBlock(), createBlock(_sfc_main$1, mergeProps({
72
186
  ref_key: "inner",
73
187
  ref: inner,
74
- severity: unref(props).severity
188
+ severity: unref(props).severity,
189
+ "data-toast-card": "",
190
+ "data-toast-surface": isGlass.value ? unref(ToastSurface).Glass : void 0
75
191
  }, rest.value, { class: classes.value }), {
76
192
  default: withCtx(() => [
77
- hasIcon() ? (openBlock(), createElementBlock("span", _hoisted_1, [
78
- renderSlot(_ctx.$slots, "icon", {}, () => [
79
- severityIcon.value ? (openBlock(), createBlock(unref(_sfc_main$2), {
80
- key: 0,
81
- icon: severityIcon.value,
82
- size: 16,
83
- class: normalizeClass(severityIconClass.value)
84
- }, null, 8, ["icon", "class"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
85
- createTextVNode(toDisplayString(unref(props).icon), 1)
86
- ], 64))
87
- ])
88
- ])) : createCommentVNode("", true),
89
- createElementVNode("div", _hoisted_2, [
90
- hasTitle() ? (openBlock(), createElementBlock("div", _hoisted_3, [
91
- renderSlot(_ctx.$slots, "title", {}, () => [
92
- createTextVNode(toDisplayString(unref(props).title), 1)
193
+ createElementVNode("div", {
194
+ ref_key: "header",
195
+ ref: header,
196
+ class: normalizeClass(["flex shrink-0 items-start gap-3", unref(props).isGrouped && ["px-3", unref(props).isCompact ? "py-2" : "py-3"]])
197
+ }, [
198
+ hasIcon() ? (openBlock(), createElementBlock("span", _hoisted_1, [
199
+ renderSlot(_ctx.$slots, "icon", {}, () => [
200
+ severityIcon.value ? (openBlock(), createBlock(unref(_sfc_main$2), {
201
+ key: 0,
202
+ icon: severityIcon.value,
203
+ size: 16,
204
+ class: normalizeClass(severityIconClass.value)
205
+ }, null, 8, ["icon", "class"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
206
+ createTextVNode(toDisplayString(unref(props).icon), 1)
207
+ ], 64))
93
208
  ])
94
209
  ])) : createCommentVNode("", true),
95
- hasDescription() ? (openBlock(), createElementBlock("div", {
210
+ createVNode(_sfc_main$3, {
211
+ class: "min-w-0 flex-1",
212
+ "is-compact": unref(props).isCompact,
213
+ "title-id": unref(titleId)
214
+ }, createSlots({ _: 2 }, [
215
+ hasTitle() ? {
216
+ name: "title",
217
+ fn: withCtx(() => [
218
+ renderSlot(_ctx.$slots, "title", {}, () => [
219
+ createTextVNode(toDisplayString(unref(props).title), 1)
220
+ ])
221
+ ]),
222
+ key: "0"
223
+ } : void 0,
224
+ hasDescription() ? {
225
+ name: "description",
226
+ fn: withCtx(() => [
227
+ renderSlot(_ctx.$slots, "description", {}, () => [
228
+ createTextVNode(toDisplayString(unref(props).description), 1)
229
+ ])
230
+ ]),
231
+ key: "1"
232
+ } : void 0,
233
+ unref(props).progress ? {
234
+ name: "progress",
235
+ fn: withCtx(() => [
236
+ createVNode(_sfc_main$4, {
237
+ progress: unref(props).progress,
238
+ severity: unref(props).severity,
239
+ "is-compact": unref(props).isCompact,
240
+ "aria-labelledby": hasTitle() ? unref(titleId) : void 0
241
+ }, null, 8, ["progress", "severity", "is-compact", "aria-labelledby"])
242
+ ]),
243
+ key: "2"
244
+ } : void 0,
245
+ hasActions() || unref(slots).details ? {
246
+ name: "actions",
247
+ fn: withCtx(() => [
248
+ renderSlot(_ctx.$slots, "actions", {}, () => [
249
+ createTextVNode(toDisplayString(unref(props).actions), 1)
250
+ ]),
251
+ unref(slots).details ? (openBlock(), createBlock(unref(_sfc_main$5), {
252
+ key: 0,
253
+ size: "xs",
254
+ variant: "ghost",
255
+ "aria-expanded": isDetailsOpen.value,
256
+ "aria-controls": unref(detailsId),
257
+ onClick: toggleDetails
258
+ }, {
259
+ trailing: withCtx(() => [
260
+ createVNode(unref(_sfc_main$2), {
261
+ icon: unref(ChevronDown),
262
+ size: 12,
263
+ class: normalizeClass({ "rotate-180": isDetailsOpen.value })
264
+ }, null, 8, ["icon", "class"])
265
+ ]),
266
+ default: withCtx(() => [
267
+ createTextVNode(" " + toDisplayString(isDetailsOpen.value ? unref(locale).t("Toast.hideDetails", void 0, "Hide details") : unref(locale).t("Toast.showDetails", void 0, "Show details")), 1)
268
+ ]),
269
+ _: 1
270
+ }, 8, ["aria-expanded", "aria-controls"])) : createCommentVNode("", true)
271
+ ]),
272
+ key: "3"
273
+ } : void 0,
274
+ unref(slots).default ? {
275
+ name: "default",
276
+ fn: withCtx(() => [
277
+ renderSlot(_ctx.$slots, "default")
278
+ ]),
279
+ key: "4"
280
+ } : void 0
281
+ ]), 1032, ["is-compact", "title-id"]),
282
+ unref(props).isPinned !== void 0 ? (openBlock(), createElementBlock("button", {
96
283
  key: 1,
97
- class: normalizeClass(descriptionClasses())
284
+ type: "button",
285
+ "aria-label": unref(props).pinLabel,
286
+ "aria-pressed": unref(props).isPinned,
287
+ title: unref(props).isPinned ? unref(props).unpinLabel : unref(props).pinLabel,
288
+ class: normalizeClass(unref(cn)(IconControlClass, unref(props).isPinned && "bg-primary-soft text-primary-soft-foreground")),
289
+ onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {
290
+ }, ["prevent"])),
291
+ onClick: _cache[1] || (_cache[1] = ($event) => emit("togglePin"))
98
292
  }, [
99
- renderSlot(_ctx.$slots, "description", {}, () => [
100
- createTextVNode(toDisplayString(unref(props).description), 1)
101
- ])
102
- ], 2)) : createCommentVNode("", true),
103
- hasActions() ? (openBlock(), createElementBlock("div", _hoisted_4, [
104
- renderSlot(_ctx.$slots, "actions", {}, () => [
105
- createTextVNode(toDisplayString(unref(props).actions), 1)
106
- ])
293
+ createVNode(unref(_sfc_main$2), {
294
+ icon: unref(Pin),
295
+ size: 14,
296
+ class: normalizeClass(unref(props).isPinned ? "fill-current" : void 0)
297
+ }, null, 8, ["icon", "class"])
298
+ ], 42, _hoisted_2)) : createCommentVNode("", true),
299
+ unref(props).onDelete ? (openBlock(), createElementBlock("button", {
300
+ key: 2,
301
+ type: "button",
302
+ "aria-label": unref(props).deleteLabel,
303
+ class: normalizeClass(IconControlClass),
304
+ onClick: _cache[2] || (_cache[2] = ($event) => unref(props).onDelete())
305
+ }, [
306
+ createVNode(unref(_sfc_main$2), {
307
+ icon: unref(Trash2),
308
+ size: 14
309
+ }, null, 8, ["icon"])
310
+ ], 8, _hoisted_3)) : createCommentVNode("", true),
311
+ unref(slots).trailing ? (openBlock(), createElementBlock("span", _hoisted_4, [
312
+ renderSlot(_ctx.$slots, "trailing")
107
313
  ])) : createCommentVNode("", true),
108
- renderSlot(_ctx.$slots, "default")
109
- ]),
110
- unref(slots).trailing ? (openBlock(), createElementBlock("span", _hoisted_5, [
111
- renderSlot(_ctx.$slots, "trailing")
112
- ])) : createCommentVNode("", true),
113
- hasDelete() ? (openBlock(), createElementBlock("button", {
114
- key: 2,
115
- type: "button",
116
- "aria-label": unref(props).deleteLabel,
117
- class: "grid h-6 w-6 shrink-0 place-items-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",
118
- onClick: _cache[0] || (_cache[0] = ($event) => emit("delete"))
119
- }, [
120
- createVNode(unref(_sfc_main$2), {
121
- icon: unref(Trash2),
122
- size: 14
123
- }, null, 8, ["icon"])
124
- ], 8, _hoisted_6)) : createCommentVNode("", true),
125
- hasClose() ? (openBlock(), createElementBlock("button", {
126
- key: 3,
127
- type: "button",
128
- "aria-label": unref(props).closeLabel,
129
- class: "-mr-1 grid h-6 w-6 shrink-0 place-items-center rounded text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring",
130
- onClick: _cache[1] || (_cache[1] = ($event) => emit("close"))
314
+ unref(props).onClose ? (openBlock(), createElementBlock("button", {
315
+ key: 4,
316
+ type: "button",
317
+ "aria-label": unref(props).closeLabel,
318
+ class: normalizeClass(unref(cn)(IconControlClass, "relative -mr-1")),
319
+ onClick: _cache[3] || (_cache[3] = ($event) => unref(props).onClose())
320
+ }, [
321
+ unref(slots).closeIndicator ? (openBlock(), createElementBlock("span", _hoisted_6, [
322
+ renderSlot(_ctx.$slots, "closeIndicator")
323
+ ])) : createCommentVNode("", true),
324
+ createVNode(unref(_sfc_main$2), {
325
+ icon: unref(CloseIcon),
326
+ size: 14
327
+ }, null, 8, ["icon"])
328
+ ], 10, _hoisted_5)) : createCommentVNode("", true)
329
+ ], 2),
330
+ unref(slots).details ? withDirectives((openBlock(), createElementBlock("div", {
331
+ key: 0,
332
+ id: unref(detailsId),
333
+ ref_key: "details",
334
+ ref: details,
335
+ "data-toast-details": "",
336
+ class: normalizeClass(["relative max-h-[min(18rem,55dvh)] overflow-y-auto overscroll-contain border-t border-border", unref(props).isGrouped ? "scroll-py-1 [overflow-anchor:none]" : "mt-2 pt-2"])
131
337
  }, [
132
- createVNode(unref(_sfc_main$2), {
133
- icon: unref(CloseIcon),
134
- size: 14
135
- }, null, 8, ["icon"])
136
- ], 8, _hoisted_7)) : createCommentVNode("", true)
338
+ isDetailsOpen.value ? renderSlot(_ctx.$slots, "details", {}, void 0, void 0, 0) : createCommentVNode("", true)
339
+ ], 10, _hoisted_7)), [
340
+ [vShow, isDetailsOpen.value]
341
+ ]) : createCommentVNode("", true)
137
342
  ]),
138
343
  _: 3
139
- }, 16, ["severity", "class"]);
344
+ }, 16, ["severity", "data-toast-surface", "class"]);
140
345
  };
141
346
  }
142
347
  });