@soybeanjs/headless 0.0.2-beta.10 → 0.0.2-beta.13

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 (237) hide show
  1. package/dist/components/accordion/accordion-content.vue.d.ts +2 -2
  2. package/dist/components/accordion/accordion-header.vue.d.ts +2 -2
  3. package/dist/components/accordion/accordion-item.vue.d.ts +5 -5
  4. package/dist/components/accordion/accordion-root.vue.d.ts +3 -3
  5. package/dist/components/accordion/accordion-trigger.vue.d.ts +2 -2
  6. package/dist/components/alert/alert-close.vue.d.ts +2 -2
  7. package/dist/components/alert/alert-content.vue.d.ts +2 -2
  8. package/dist/components/alert/alert-description.vue.d.ts +2 -2
  9. package/dist/components/alert/alert-root.vue.d.ts +4 -4
  10. package/dist/components/alert/alert-title.vue.d.ts +2 -2
  11. package/dist/components/alert-dialog/alert-dialog-close.js +1 -1
  12. package/dist/components/alert-dialog/alert-dialog-close.vue.d.ts +2 -2
  13. package/dist/components/alert-dialog/alert-dialog-content.vue.d.ts +4 -4
  14. package/dist/components/alert-dialog/alert-dialog-root.vue.d.ts +4 -4
  15. package/dist/components/arrow/arrow.vue.d.ts +4 -4
  16. package/dist/components/aspect-ratio/aspect-ratio.vue.d.ts +3 -3
  17. package/dist/components/avatar/avatar-fallback.vue.d.ts +2 -2
  18. package/dist/components/avatar/avatar-image.vue.d.ts +4 -4
  19. package/dist/components/avatar/avatar-root.vue.d.ts +2 -2
  20. package/dist/components/badge/badge-content.vue.d.ts +2 -2
  21. package/dist/components/badge/badge-root.vue.d.ts +4 -4
  22. package/dist/components/breadcrumb/breadcrumb-ellipsis.vue.d.ts +2 -2
  23. package/dist/components/breadcrumb/breadcrumb-item.vue.d.ts +2 -2
  24. package/dist/components/breadcrumb/breadcrumb-link.vue.d.ts +2 -2
  25. package/dist/components/breadcrumb/breadcrumb-list.vue.d.ts +2 -2
  26. package/dist/components/breadcrumb/breadcrumb-page.vue.d.ts +2 -2
  27. package/dist/components/breadcrumb/breadcrumb-root.vue.d.ts +2 -2
  28. package/dist/components/breadcrumb/breadcrumb-separator.vue.d.ts +2 -2
  29. package/dist/components/button/button.vue.d.ts +5 -5
  30. package/dist/components/card/card-content.vue.d.ts +2 -2
  31. package/dist/components/card/card-description.vue.d.ts +2 -2
  32. package/dist/components/card/card-footer.vue.d.ts +2 -2
  33. package/dist/components/card/card-header.vue.d.ts +2 -2
  34. package/dist/components/card/card-root.vue.d.ts +2 -2
  35. package/dist/components/card/card-title-root.vue.d.ts +2 -2
  36. package/dist/components/card/card-title.vue.d.ts +2 -2
  37. package/dist/components/checkbox/checkbox-control.vue.d.ts +2 -2
  38. package/dist/components/checkbox/checkbox-group-root.vue.d.ts +3 -3
  39. package/dist/components/checkbox/checkbox-indicator.vue.d.ts +4 -4
  40. package/dist/components/checkbox/checkbox-label.vue.d.ts +2 -2
  41. package/dist/components/checkbox/checkbox-root.vue.d.ts +4 -4
  42. package/dist/components/collapsible/collapsible-content.vue.d.ts +2 -2
  43. package/dist/components/collapsible/collapsible-root.vue.d.ts +6 -6
  44. package/dist/components/collapsible/collapsible-trigger.vue.d.ts +4 -4
  45. package/dist/components/config-provider/config-provider.vue.d.ts +3 -3
  46. package/dist/components/context-menu/context-menu-content.vue.d.ts +4 -4
  47. package/dist/components/context-menu/context-menu-root.vue.d.ts +4 -4
  48. package/dist/components/context-menu/context-menu-trigger.vue.d.ts +4 -4
  49. package/dist/components/dialog/dialog-close.js +1 -1
  50. package/dist/components/dialog/dialog-close.vue.d.ts +2 -2
  51. package/dist/components/dialog/dialog-content.vue.d.ts +4 -4
  52. package/dist/components/dialog/dialog-description.vue.d.ts +2 -2
  53. package/dist/components/dialog/dialog-footer.vue.d.ts +2 -2
  54. package/dist/components/dialog/dialog-header.vue.d.ts +2 -2
  55. package/dist/components/dialog/dialog-overlay.vue.d.ts +2 -2
  56. package/dist/components/dialog/dialog-root.vue.d.ts +5 -5
  57. package/dist/components/dialog/dialog-title.vue.d.ts +2 -2
  58. package/dist/components/dialog/dialog-trigger.vue.d.ts +2 -2
  59. package/dist/components/dialog/types.d.ts +8 -2
  60. package/dist/components/dropdown-menu/dropdown-menu-content.vue.d.ts +4 -4
  61. package/dist/components/dropdown-menu/dropdown-menu-root.vue.d.ts +5 -5
  62. package/dist/components/dropdown-menu/dropdown-menu-trigger.vue.d.ts +4 -4
  63. package/dist/components/form/form-description.vue.d.ts +2 -2
  64. package/dist/components/form/form-error.vue.d.ts +2 -2
  65. package/dist/components/form/form-field-array.vue.d.ts +2 -2
  66. package/dist/components/form/form-field.vue.d.ts +2 -2
  67. package/dist/components/form/form-label.vue.d.ts +2 -2
  68. package/dist/components/input/input-control.vue.d.ts +2 -2
  69. package/dist/components/input/input-root.vue.d.ts +4 -4
  70. package/dist/components/kbd/kbd.vue.d.ts +2 -2
  71. package/dist/components/label/label.vue.d.ts +2 -2
  72. package/dist/components/layout/layout-footer.vue.d.ts +2 -2
  73. package/dist/components/layout/layout-header.vue.d.ts +2 -2
  74. package/dist/components/layout/layout-main.vue.d.ts +2 -2
  75. package/dist/components/layout/layout-mobile.vue.d.ts +2 -2
  76. package/dist/components/layout/layout-rail.vue.d.ts +2 -2
  77. package/dist/components/layout/layout-root.vue.d.ts +4 -4
  78. package/dist/components/layout/layout-sidebar.vue.d.ts +2 -2
  79. package/dist/components/layout/layout-tab.vue.d.ts +2 -2
  80. package/dist/components/layout/layout-trigger.vue.d.ts +2 -2
  81. package/dist/components/link/link.js +1 -1
  82. package/dist/components/link/link.vue.d.ts +4 -5
  83. package/dist/components/list/list-content.vue.d.ts +2 -2
  84. package/dist/components/list/list-description.vue.d.ts +2 -2
  85. package/dist/components/list/list-item.vue.d.ts +2 -2
  86. package/dist/components/list/list-root.vue.d.ts +2 -2
  87. package/dist/components/list/list-title.vue.d.ts +2 -2
  88. package/dist/components/listbox/listbox-content.vue.d.ts +2 -2
  89. package/dist/components/listbox/listbox-filter.vue.d.ts +4 -4
  90. package/dist/components/listbox/listbox-group-label.vue.d.ts +2 -2
  91. package/dist/components/listbox/listbox-group.vue.d.ts +2 -2
  92. package/dist/components/listbox/listbox-item-indicator.vue.d.ts +4 -4
  93. package/dist/components/listbox/listbox-item.vue.d.ts +5 -5
  94. package/dist/components/listbox/listbox-root.vue.d.ts +7 -7
  95. package/dist/components/listbox/listbox-virtualizer.vue.d.ts +2 -2
  96. package/dist/components/menu/menu-checkbox-group.vue.d.ts +3 -3
  97. package/dist/components/menu/menu-checkbox-item.vue.d.ts +4 -4
  98. package/dist/components/menu/menu-content.vue.d.ts +4 -4
  99. package/dist/components/menu/menu-group-label.vue.d.ts +2 -2
  100. package/dist/components/menu/menu-group.vue.d.ts +2 -2
  101. package/dist/components/menu/menu-item-indicator.vue.d.ts +4 -4
  102. package/dist/components/menu/menu-item.vue.d.ts +4 -4
  103. package/dist/components/menu/menu-radio-group.vue.d.ts +3 -3
  104. package/dist/components/menu/menu-radio-item.vue.d.ts +4 -4
  105. package/dist/components/menu/menu-root.vue.d.ts +4 -4
  106. package/dist/components/menu/menu-sub-content.vue.d.ts +4 -4
  107. package/dist/components/menu/menu-sub-trigger.vue.d.ts +2 -2
  108. package/dist/components/menu/menu-sub.vue.d.ts +4 -4
  109. package/dist/components/navigation-menu/navigation-menu-content.vue.d.ts +4 -4
  110. package/dist/components/navigation-menu/navigation-menu-indicator.vue.d.ts +2 -2
  111. package/dist/components/navigation-menu/navigation-menu-item.vue.d.ts +2 -2
  112. package/dist/components/navigation-menu/navigation-menu-link.vue.d.ts +4 -4
  113. package/dist/components/navigation-menu/navigation-menu-list.vue.d.ts +2 -2
  114. package/dist/components/navigation-menu/navigation-menu-root.vue.d.ts +4 -4
  115. package/dist/components/navigation-menu/navigation-menu-sub-list.vue.d.ts +2 -2
  116. package/dist/components/navigation-menu/navigation-menu-trigger.vue.d.ts +4 -4
  117. package/dist/components/navigation-menu/navigation-menu-viewport.vue.d.ts +3 -3
  118. package/dist/components/number-input/number-input-control.vue.d.ts +2 -2
  119. package/dist/components/number-input/number-input-decrement.vue.d.ts +4 -4
  120. package/dist/components/number-input/number-input-increment.vue.d.ts +4 -4
  121. package/dist/components/number-input/number-input-root.vue.d.ts +4 -4
  122. package/dist/components/pagination/pagination-ellipsis.vue.d.ts +2 -2
  123. package/dist/components/pagination/pagination-first.vue.d.ts +2 -2
  124. package/dist/components/pagination/pagination-last.vue.d.ts +2 -2
  125. package/dist/components/pagination/pagination-list-item.vue.d.ts +2 -2
  126. package/dist/components/pagination/pagination-list.vue.d.ts +2 -2
  127. package/dist/components/pagination/pagination-next.vue.d.ts +2 -2
  128. package/dist/components/pagination/pagination-prev.vue.d.ts +2 -2
  129. package/dist/components/pagination/pagination-root.vue.d.ts +4 -4
  130. package/dist/components/popover/popover-anchor.vue.d.ts +2 -2
  131. package/dist/components/popover/popover-close.vue.d.ts +4 -4
  132. package/dist/components/popover/popover-content.vue.d.ts +4 -4
  133. package/dist/components/popover/popover-root.vue.d.ts +4 -4
  134. package/dist/components/popover/popover-trigger.vue.d.ts +4 -4
  135. package/dist/components/popper/context.d.ts +5 -5
  136. package/dist/components/popper/popper-anchor.vue.d.ts +2 -2
  137. package/dist/components/popper/popper-arrow.vue.d.ts +2 -2
  138. package/dist/components/popper/popper-content.vue.d.ts +18 -18
  139. package/dist/components/popper/popper-root.vue.d.ts +2 -2
  140. package/dist/components/primitive/primitive.d.ts +2 -2
  141. package/dist/components/radio-group/radio-group-control.vue.d.ts +2 -2
  142. package/dist/components/radio-group/radio-group-indicator.vue.d.ts +4 -4
  143. package/dist/components/radio-group/radio-group-item.vue.d.ts +4 -4
  144. package/dist/components/radio-group/radio-group-label.vue.d.ts +2 -2
  145. package/dist/components/radio-group/radio-group-root.vue.d.ts +3 -3
  146. package/dist/components/roving-focus/roving-focus-group.vue.d.ts +6 -6
  147. package/dist/components/roving-focus/roving-focus-item.vue.d.ts +3 -3
  148. package/dist/components/select/select-arrow.vue.d.ts +2 -2
  149. package/dist/components/select/select-content.vue.d.ts +4 -4
  150. package/dist/components/select/select-group-label.vue.d.ts +2 -2
  151. package/dist/components/select/select-group.vue.d.ts +2 -2
  152. package/dist/components/select/select-item-indicator.vue.d.ts +4 -4
  153. package/dist/components/select/select-item-text.vue.d.ts +2 -2
  154. package/dist/components/select/select-item.vue.d.ts +4 -4
  155. package/dist/components/select/select-root.vue.d.ts +3 -3
  156. package/dist/components/select/select-scroll-down-button.vue.d.ts +2 -2
  157. package/dist/components/select/select-scroll-up-button.vue.d.ts +2 -2
  158. package/dist/components/select/select-separator.vue.d.ts +2 -2
  159. package/dist/components/select/select-trigger-icon.vue.d.ts +2 -2
  160. package/dist/components/select/select-trigger.vue.d.ts +4 -4
  161. package/dist/components/select/select-value.vue.d.ts +3 -3
  162. package/dist/components/select/select-viewport.vue.d.ts +2 -2
  163. package/dist/components/separator/separator-label.vue.d.ts +2 -2
  164. package/dist/components/separator/separator-root.vue.d.ts +3 -3
  165. package/dist/components/slot/slot.d.ts +2 -2
  166. package/dist/components/switch/switch-control.vue.d.ts +2 -2
  167. package/dist/components/switch/switch-root.vue.d.ts +3 -3
  168. package/dist/components/switch/switch-thumb.vue.d.ts +4 -4
  169. package/dist/components/tabs/tabs-content.vue.d.ts +2 -2
  170. package/dist/components/tabs/tabs-indicator.vue.d.ts +2 -2
  171. package/dist/components/tabs/tabs-list.vue.d.ts +2 -2
  172. package/dist/components/tabs/tabs-root.vue.d.ts +4 -4
  173. package/dist/components/tabs/tabs-trigger.vue.d.ts +4 -4
  174. package/dist/components/tag/tag.vue.d.ts +4 -4
  175. package/dist/components/textarea/textarea-control.vue.d.ts +2 -2
  176. package/dist/components/textarea/textarea-counter.vue.d.ts +2 -2
  177. package/dist/components/textarea/textarea-root.vue.d.ts +4 -4
  178. package/dist/components/toast/context.d.ts +13 -0
  179. package/dist/components/toast/context.js +1 -0
  180. package/dist/components/toast/index.d.ts +12 -0
  181. package/dist/components/toast/index.js +1 -0
  182. package/dist/components/toast/shared.js +1 -0
  183. package/dist/components/toast/toast-action.js +1 -0
  184. package/dist/components/toast/toast-action.vue.d.ts +22 -0
  185. package/dist/components/toast/toast-announce.js +1 -0
  186. package/dist/components/toast/toast-close.js +1 -0
  187. package/dist/components/toast/toast-close.vue.d.ts +22 -0
  188. package/dist/components/toast/toast-description.js +1 -0
  189. package/dist/components/toast/toast-description.vue.d.ts +18 -0
  190. package/dist/components/toast/toast-focus-proxy.js +1 -0
  191. package/dist/components/toast/toast-provider.js +1 -0
  192. package/dist/components/toast/toast-provider.vue.d.ts +25 -0
  193. package/dist/components/toast/toast-root.js +1 -0
  194. package/dist/components/toast/toast-root.vue.d.ts +48 -0
  195. package/dist/components/toast/toast-title.js +1 -0
  196. package/dist/components/toast/toast-title.vue.d.ts +18 -0
  197. package/dist/components/toast/toast-viewport.js +1 -0
  198. package/dist/components/toast/toast-viewport.vue.d.ts +24 -0
  199. package/dist/components/toast/types.d.ts +107 -0
  200. package/dist/components/tooltip/tooltip-content.vue.d.ts +4 -4
  201. package/dist/components/tooltip/tooltip-root.vue.d.ts +4 -4
  202. package/dist/components/tooltip/tooltip-trigger.vue.d.ts +4 -4
  203. package/dist/components/tree/tree-item.vue.d.ts +5 -5
  204. package/dist/components/tree/tree-root.vue.d.ts +3 -3
  205. package/dist/components/tree/tree-virtualizer-item.vue.d.ts +4 -4
  206. package/dist/components/tree/tree-virtualizer-root.vue.d.ts +3 -3
  207. package/dist/components/virtualizer/virtualizer-content.vue.d.ts +2 -2
  208. package/dist/components/virtualizer/virtualizer-item.vue.d.ts +2 -2
  209. package/dist/components/virtualizer/virtualizer-root.vue.d.ts +3 -3
  210. package/dist/components/visually-hidden/visually-hidden-input.vue.d.ts +3 -3
  211. package/dist/components/visually-hidden/visually-hidden.vue.d.ts +4 -4
  212. package/dist/composables/use-collection.d.ts +6 -6
  213. package/dist/composables/use-direction.d.ts +2 -2
  214. package/dist/composables/use-dismissable-layer.d.ts +6 -6
  215. package/dist/composables/use-exposed-element.d.ts +2 -2
  216. package/dist/composables/use-forward-element.d.ts +2 -2
  217. package/dist/composables/use-image-loading-status.d.ts +2 -2
  218. package/dist/composables/use-is-using-keyboard.d.ts +2 -2
  219. package/dist/composables/use-kbd.d.ts +2 -2
  220. package/dist/composables/use-locale.d.ts +2 -2
  221. package/dist/composables/use-nonce.d.ts +2 -2
  222. package/dist/composables/use-presence.d.ts +2 -2
  223. package/dist/composables/use-props.d.ts +3 -3
  224. package/dist/constants/components.d.ts +1 -0
  225. package/dist/constants/components.js +1 -1
  226. package/dist/index.d.ts +24 -14
  227. package/dist/index.js +1 -1
  228. package/dist/shared/dom.d.ts +2 -1
  229. package/dist/shared/dom.js +1 -1
  230. package/dist/shared/geometry.d.ts +3 -2
  231. package/dist/shared/geometry.js +1 -1
  232. package/dist/shared/index.d.ts +3 -3
  233. package/dist/shared/index.js +1 -1
  234. package/dist/types/common.d.ts +2 -1
  235. package/dist/types/event.d.ts +10 -1
  236. package/dist/types/index.d.ts +2 -2
  237. package/package.json +24 -48
@@ -1,5 +1,5 @@
1
1
  import { TagProps } from "./types.js";
2
- import * as vue1031 from "vue";
2
+ import * as vue193 from "vue";
3
3
 
4
4
  //#region src/components/tag/tag.vue.d.ts
5
5
  declare var __VLS_1: {
@@ -9,13 +9,13 @@ declare var __VLS_1: {
9
9
  type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_1) => any;
11
11
  };
12
- declare const __VLS_base: vue1031.DefineComponent<TagProps, {}, {}, {}, {}, vue1031.ComponentOptionsMixin, vue1031.ComponentOptionsMixin, {
12
+ declare const __VLS_base: vue193.DefineComponent<TagProps, {}, {}, {}, {}, vue193.ComponentOptionsMixin, vue193.ComponentOptionsMixin, {
13
13
  "update:open": (open: boolean) => any;
14
- }, string, vue1031.PublicProps, Readonly<TagProps> & Readonly<{
14
+ }, string, vue193.PublicProps, Readonly<TagProps> & Readonly<{
15
15
  "onUpdate:open"?: ((open: boolean) => any) | undefined;
16
16
  }>, {
17
17
  open: boolean;
18
- }, {}, {}, {}, string, vue1031.ComponentProvideOptions, false, {}, any>;
18
+ }, {}, {}, {}, string, vue193.ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
20
  declare const _default: typeof __VLS_export;
21
21
  type __VLS_WithSlots<T, S> = T & {
@@ -1,8 +1,8 @@
1
1
  import { TextareaControlProps } from "./types.js";
2
- import * as vue1357 from "vue";
2
+ import * as vue993 from "vue";
3
3
 
4
4
  //#region src/components/textarea/textarea-control.vue.d.ts
5
- declare const __VLS_export: vue1357.DefineComponent<TextareaControlProps, {}, {}, {}, {}, vue1357.ComponentOptionsMixin, vue1357.ComponentOptionsMixin, {}, string, vue1357.PublicProps, Readonly<TextareaControlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1357.ComponentProvideOptions, false, {}, any>;
5
+ declare const __VLS_export: vue993.DefineComponent<TextareaControlProps, {}, {}, {}, {}, vue993.ComponentOptionsMixin, vue993.ComponentOptionsMixin, {}, string, vue993.PublicProps, Readonly<TextareaControlProps> & Readonly<{}>, {}, {}, {}, {}, string, vue993.ComponentProvideOptions, false, {}, any>;
6
6
  declare const _default: typeof __VLS_export;
7
7
  //#endregion
8
8
  export { _default };
@@ -1,5 +1,5 @@
1
1
  import { TextareaCounterProps } from "./types.js";
2
- import * as vue1362 from "vue";
2
+ import * as vue988 from "vue";
3
3
 
4
4
  //#region src/components/textarea/textarea-counter.vue.d.ts
5
5
  declare var __VLS_1: {
@@ -9,7 +9,7 @@ declare var __VLS_1: {
9
9
  type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_1) => any;
11
11
  };
12
- declare const __VLS_base: vue1362.DefineComponent<TextareaCounterProps, {}, {}, {}, {}, vue1362.ComponentOptionsMixin, vue1362.ComponentOptionsMixin, {}, string, vue1362.PublicProps, Readonly<TextareaCounterProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1362.ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_base: vue988.DefineComponent<TextareaCounterProps, {}, {}, {}, {}, vue988.ComponentOptionsMixin, vue988.ComponentOptionsMixin, {}, string, vue988.PublicProps, Readonly<TextareaCounterProps> & Readonly<{}>, {}, {}, {}, {}, string, vue988.ComponentProvideOptions, false, {}, any>;
13
13
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
14
14
  declare const _default: typeof __VLS_export;
15
15
  type __VLS_WithSlots<T, S> = T & {
@@ -1,5 +1,5 @@
1
1
  import { TextareaRootProps } from "./types.js";
2
- import * as vue1352 from "vue";
2
+ import * as vue1219 from "vue";
3
3
 
4
4
  //#region src/components/textarea/textarea-root.vue.d.ts
5
5
  declare var __VLS_1: {
@@ -9,13 +9,13 @@ declare var __VLS_1: {
9
9
  type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_1) => any;
11
11
  };
12
- declare const __VLS_base: vue1352.DefineComponent<TextareaRootProps, {}, {}, {}, {}, vue1352.ComponentOptionsMixin, vue1352.ComponentOptionsMixin, {
12
+ declare const __VLS_base: vue1219.DefineComponent<TextareaRootProps, {}, {}, {}, {}, vue1219.ComponentOptionsMixin, vue1219.ComponentOptionsMixin, {
13
13
  "update:modelValue": (value: string) => any;
14
- }, string, vue1352.PublicProps, Readonly<TextareaRootProps> & Readonly<{
14
+ }, string, vue1219.PublicProps, Readonly<TextareaRootProps> & Readonly<{
15
15
  "onUpdate:modelValue"?: ((value: string) => any) | undefined;
16
16
  }>, {
17
17
  modelValue: string;
18
- }, {}, {}, {}, string, vue1352.ComponentProvideOptions, false, {}, any>;
18
+ }, {}, {}, {}, string, vue1219.ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
20
  declare const _default: typeof __VLS_export;
21
21
  type __VLS_WithSlots<T, S> = T & {
@@ -0,0 +1,13 @@
1
+ import { ClassValue } from "../../types/common.js";
2
+ import "../../types/index.js";
3
+ import "../../composables/index.js";
4
+ import { ToastThemeContextParams } from "./types.js";
5
+ import "../../index.js";
6
+ import { ComputedRef } from "vue";
7
+
8
+ //#region src/components/toast/context.d.ts
9
+
10
+ declare const provideToastThemeContext: (params: ToastThemeContextParams) => ToastThemeContextParams, useToastThemeContext: <N extends string | null | undefined = undefined>(consumerName?: N | undefined, defaultValue?: ToastThemeContextParams | undefined) => N extends null | undefined ? ToastThemeContextParams | null : ToastThemeContextParams;
11
+ declare const provideToastViewportThemeContext: (cls: ComputedRef<ClassValue>) => ComputedRef<ClassValue>, useToastViewportThemeContext: <N extends string | null | undefined = undefined>(consumerName?: N | undefined, defaultValue?: ComputedRef<ClassValue> | undefined) => N extends null | undefined ? ComputedRef<ClassValue> | null : ComputedRef<ClassValue>;
12
+ //#endregion
13
+ export { provideToastThemeContext, provideToastViewportThemeContext };
@@ -0,0 +1 @@
1
+ import{useContext as e}from"../../composables/use-context.js";import{useCollection as t}from"../../composables/use-collection.js";import{shallowRef as n}from"vue";const{provideCollectionContext:r,useCollectionContext:i,useCollectionItem:a}=t(`Toast`),[o,s]=e(`ToastProvider`,e=>{let t=n(null),r=e=>{t.value=e},i=n(!1),a=n(!1),o=n(0),s=()=>{o.value++},c=()=>{o.value--};return{...e,viewportElement:t,onViewportElementChange:r,isFocusedToastEscapeKeyDownRef:i,isClosePausedRef:a,toastCount:o,onToastAdd:s,onToastRemove:c}}),[c,l]=e(`ToastRoot`,e=>e),[u,d]=e(`ToastTheme`,e=>e),[f,p]=e(`ToastViewportTheme`,e=>e);export{r as provideCollectionContext,o as provideToastProviderContext,c as provideToastRootContext,u as provideToastThemeContext,f as provideToastViewportThemeContext,i as useCollectionContext,a as useCollectionItem,s as useToastProviderContext,l as useToastRootContext,d as useToastThemeContext,p as useToastViewportThemeContext};
@@ -0,0 +1,12 @@
1
+ import { PortalProps } from "../portal/types.js";
2
+ import { _default as _default$3 } from "../portal/portal.vue.js";
3
+ import { ToastActionProps, ToastCloseProps, ToastDescriptionProps, ToastProviderProps, ToastRootEmits, ToastRootProps, ToastThemeSlot, ToastTitleProps, ToastUi, ToastViewportProps } from "./types.js";
4
+ import { _default as _default$4 } from "./toast-provider.vue.js";
5
+ import { _default as _default$5 } from "./toast-root.vue.js";
6
+ import { _default as _default$7 } from "./toast-viewport.vue.js";
7
+ import { _default as _default$1 } from "./toast-close.vue.js";
8
+ import { _default } from "./toast-action.vue.js";
9
+ import { _default as _default$6 } from "./toast-title.vue.js";
10
+ import { _default as _default$2 } from "./toast-description.vue.js";
11
+ import { provideToastThemeContext, provideToastViewportThemeContext } from "./context.js";
12
+ export { _default as ToastAction, type ToastActionProps, _default$1 as ToastClose, type ToastCloseProps, _default$2 as ToastDescription, type ToastDescriptionProps, _default$3 as ToastPortal, type PortalProps as ToastPortalProps, _default$4 as ToastProvider, type ToastProviderProps, _default$5 as ToastRoot, type ToastRootEmits, type ToastRootProps, type ToastThemeSlot, _default$6 as ToastTitle, type ToastTitleProps, type ToastUi, _default$7 as ToastViewport, type ToastViewportProps, provideToastThemeContext, provideToastViewportThemeContext };
@@ -0,0 +1 @@
1
+ import e from"../portal/portal.js";import{provideToastThemeContext as t,provideToastViewportThemeContext as n}from"./context.js";import r from"./toast-provider.js";import i from"./toast-root.js";import a from"./toast-viewport.js";import o from"./toast-close.js";import s from"./toast-action.js";import c from"./toast-title.js";import l from"./toast-description.js";export{s as ToastAction,o as ToastClose,l as ToastDescription,e as ToastPortal,r as ToastProvider,i as ToastRoot,c as ToastTitle,a as ToastViewport,t as provideToastThemeContext,n as provideToastViewportThemeContext};
@@ -0,0 +1 @@
1
+ import{isHTMLElement as e}from"../../shared/dom.js";const t={swipeMoveX:`--soybean-toast-swipe-move-x`,swipeMoveY:`--soybean-toast-swipe-move-y`,swipeEndX:`--soybean-toast-swipe-end-x`,swipeEndY:`--soybean-toast-swipe-end-y`},n=`data-swipe`,r={start:`start`,move:`move`,cancel:`cancel`,end:`end`},i=`toast.swipeStart`,a=`toast.swipeMove`,o=`toast.swipeCancel`,s=`toast.swipeEnd`,c=`toast.viewportPause`,l=`toast.viewportResume`;function u(t){let n=[];return Array.from(t.childNodes).forEach(t=>{if(t.nodeType===t.TEXT_NODE&&t.textContent&&n.push(t.textContent),!e(t))return;let r=t.ariaHidden||t.hidden||t.style.display===`none`,i=t.dataset.soybeanToastAnnounceExclude===``;if(!r)if(i){let e=t.dataset.soybeanToastAnnounceAlt;e&&n.push(e)}else n.push(...u(t))}),n}export{n as TOAST_DATA_SWIPE,o as TOAST_SWIPE_CANCEL,s as TOAST_SWIPE_END,a as TOAST_SWIPE_MOVE,i as TOAST_SWIPE_START,c as VIEWPORT_PAUSE,l as VIEWPORT_RESUME,u as getAnnounceTextContent,t as toastCssVars,r as toastSwipe};
@@ -0,0 +1 @@
1
+ import{Primitive as e}from"../primitive/primitive.js";import{useToastRootContext as t,useToastThemeContext as n}from"./context.js";import{computed as r,createBlock as i,defineComponent as a,normalizeClass as o,openBlock as s,renderSlot as c,unref as l,withCtx as u}from"vue";var d=a({name:`ToastAction`,__name:`toast-action`,props:{altText:{},asChild:{type:Boolean},as:{default:`button`}},setup(a){let d=a,f=n(),{onClose:p}=t(`ToastAction`),m=r(()=>f?.ui?.value?.action),h=r(()=>d.as===`button`?`button`:void 0);return(t,n)=>(s(),i(l(e),{as:a.as,"as-child":a.asChild,class:o(m.value),type:h.value,"data-soybean-toast-announce-alt":a.altText,"data-soybean-toast-announce-exclude":``,onClick:l(p)},{default:u(()=>[c(t.$slots,`default`)]),_:3},8,[`as`,`as-child`,`class`,`type`,`data-soybean-toast-announce-alt`,`onClick`]))}});export{d as default};
@@ -0,0 +1,22 @@
1
+ import { AsTag } from "../primitive/types.js";
2
+ import "../primitive/index.js";
3
+ import { ToastActionProps } from "./types.js";
4
+ import * as vue1647 from "vue";
5
+
6
+ //#region src/components/toast/toast-action.vue.d.ts
7
+ declare var __VLS_10: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_10) => any;
10
+ };
11
+ declare const __VLS_base: vue1647.DefineComponent<ToastActionProps, {}, {}, {}, {}, vue1647.ComponentOptionsMixin, vue1647.ComponentOptionsMixin, {}, string, vue1647.PublicProps, Readonly<ToastActionProps> & Readonly<{}>, {
12
+ as: AsTag | vue1647.Component;
13
+ }, {}, {}, {}, string, vue1647.ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
21
+ //#endregion
22
+ export { _default };
@@ -0,0 +1 @@
1
+ import e from"../visually-hidden/visually-hidden.js";import{useToastProviderContext as t}from"./context.js";import{createBlock as n,createCommentVNode as r,createTextVNode as i,defineComponent as a,openBlock as o,renderSlot as s,shallowRef as c,toDisplayString as l,unref as u,withCtx as d}from"vue";import{useRafFn as f}from"@vueuse/core";import{useTimeout as p}from"@vueuse/shared";var m=a({name:`ToastAnnounce`,__name:`toast-announce`,setup(a){let{label:m}=t(`ToastAnnounce`),h=p(1e3),g=c(!1);return f(()=>{g.value=!0}),(t,a)=>u(h)||g.value?(o(),n(u(e),{key:0},{default:d(()=>[i(l(u(m))+` `,1),s(t.$slots,`default`)]),_:3})):r(`v-if`,!0)}});export{m as default};
@@ -0,0 +1 @@
1
+ import{Primitive as e}from"../primitive/primitive.js";import{useToastRootContext as t,useToastThemeContext as n}from"./context.js";import{computed as r,createBlock as i,defineComponent as a,normalizeClass as o,openBlock as s,renderSlot as c,unref as l,withCtx as u}from"vue";var d=a({name:`ToastClose`,__name:`toast-close`,props:{asChild:{type:Boolean},as:{default:`button`}},setup(a){let d=a,f=n(),{onClose:p}=t(`ToastClose`),m=r(()=>f?.ui?.value?.close),h=r(()=>d.as===`button`?`button`:void 0);return(t,n)=>(s(),i(l(e),{as:a.as,"as-child":a.asChild,class:o(m.value),type:h.value,"data-soybean-toast-announce-exclude":``,onClick:l(p)},{default:u(()=>[c(t.$slots,`default`)]),_:3},8,[`as`,`as-child`,`class`,`type`,`onClick`]))}});export{d as default};
@@ -0,0 +1,22 @@
1
+ import { AsTag } from "../primitive/types.js";
2
+ import "../primitive/index.js";
3
+ import { ToastCloseProps } from "./types.js";
4
+ import * as vue1624 from "vue";
5
+
6
+ //#region src/components/toast/toast-close.vue.d.ts
7
+ declare var __VLS_10: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_10) => any;
10
+ };
11
+ declare const __VLS_base: vue1624.DefineComponent<ToastCloseProps, {}, {}, {}, {}, vue1624.ComponentOptionsMixin, vue1624.ComponentOptionsMixin, {}, string, vue1624.PublicProps, Readonly<ToastCloseProps> & Readonly<{}>, {
12
+ as: AsTag | vue1624.Component;
13
+ }, {}, {}, {}, string, vue1624.ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
+ declare const _default: typeof __VLS_export;
16
+ type __VLS_WithSlots<T, S> = T & {
17
+ new (): {
18
+ $slots: S;
19
+ };
20
+ };
21
+ //#endregion
22
+ export { _default };
@@ -0,0 +1 @@
1
+ import{useToastThemeContext as e}from"./context.js";import{computed as t,createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,renderSlot as o}from"vue";var s=r({name:`ToastDescription`,__name:`toast-description`,setup(r){let s=e(),c=t(()=>s?.ui?.value?.description);return(e,t)=>(a(),n(`div`,{class:i(c.value)},[o(e.$slots,`default`)],2))}});export{s as default};
@@ -0,0 +1,18 @@
1
+ import { ToastDescriptionProps } from "./types.js";
2
+ import * as vue1653 from "vue";
3
+
4
+ //#region src/components/toast/toast-description.vue.d.ts
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: vue1653.DefineComponent<ToastDescriptionProps, {}, {}, {}, {}, vue1653.ComponentOptionsMixin, vue1653.ComponentOptionsMixin, {}, string, vue1653.PublicProps, Readonly<ToastDescriptionProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1653.ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
17
+ //#endregion
18
+ export { _default };
@@ -0,0 +1 @@
1
+ import e from"../visually-hidden/visually-hidden.js";import{useToastProviderContext as t}from"./context.js";import{createBlock as n,defineComponent as r,openBlock as i,renderSlot as a,unref as o,withCtx as s}from"vue";var c=r({name:`ToastFocusProxy`,__name:`toast-focus-proxy`,emits:[`focusFromOutsideViewport`],setup(r,{emit:c}){let l=c,{viewportElement:u}=t(`ToastFocusProxy`),d=e=>{let t=e.relatedTarget;u.value?.contains(t)||l(`focusFromOutsideViewport`)};return(t,r)=>(i(),n(o(e),{"aria-hidden":`true`,tabindex:`0`,style:{position:`fixed`},onFocus:d},{default:s(()=>[a(t.$slots,`default`)]),_:3}))}});export{c as default};
@@ -0,0 +1 @@
1
+ import{transformPropsToContext as e}from"../../shared/vue.js";import{provideCollectionContext as t,provideToastProviderContext as n}from"./context.js";import{defineComponent as r,renderSlot as i}from"vue";var a=r({name:`ToastProvider`,__name:`toast-provider`,props:{label:{default:`Notification`},duration:{default:5e3},swipeDirection:{default:`right`},swipeThreshold:{default:50}},setup(r){let a=r;return t(),n(e(a)),(e,t)=>i(e.$slots,`default`)}});export{a as default};
@@ -0,0 +1,25 @@
1
+ import { SwipeDirection } from "../../types/common.js";
2
+ import "../../types/index.js";
3
+ import { ToastProviderProps } from "./types.js";
4
+ import * as vue1619 from "vue";
5
+
6
+ //#region src/components/toast/toast-provider.vue.d.ts
7
+ declare var __VLS_1: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_1) => any;
10
+ };
11
+ declare const __VLS_base: vue1619.DefineComponent<ToastProviderProps, {}, {}, {}, {}, vue1619.ComponentOptionsMixin, vue1619.ComponentOptionsMixin, {}, string, vue1619.PublicProps, Readonly<ToastProviderProps> & Readonly<{}>, {
12
+ label: string;
13
+ duration: number;
14
+ swipeDirection: SwipeDirection;
15
+ swipeThreshold: number;
16
+ }, {}, {}, {}, string, vue1619.ComponentProvideOptions, false, {}, any>;
17
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
+ declare const _default: typeof __VLS_export;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
24
+ //#endregion
25
+ export { _default };
@@ -0,0 +1 @@
1
+ import{getDisclosureState as e}from"../../shared/value.js";import{getActiveElement as t}from"../../shared/dom.js";import{isClient as n}from"../../shared/env.js";import{handleAndDispatchCustomEvent as r}from"../../shared/event.js";import{isDeltaInDirection as i}from"../../shared/geometry.js";import{useControllableState as a}from"../../composables/use-controllable-state.js";import{usePresence as o}from"../../composables/use-presence.js";import{Primitive as s}from"../primitive/primitive.js";import{provideToastRootContext as c,useCollectionItem as l,useToastProviderContext as u,useToastThemeContext as d}from"./context.js";import f from"./toast-announce.js";import{TOAST_DATA_SWIPE as p,TOAST_SWIPE_CANCEL as m,TOAST_SWIPE_END as h,TOAST_SWIPE_MOVE as g,TOAST_SWIPE_START as ee,VIEWPORT_PAUSE as _,VIEWPORT_RESUME as v,getAnnounceTextContent as te,toastCssVars as y,toastSwipe as b}from"./shared.js";import{Fragment as ne,Teleport as x,computed as S,createBlock as C,createCommentVNode as w,createElementBlock as re,createTextVNode as ie,createVNode as ae,defineComponent as T,mergeProps as oe,onMounted as se,onUnmounted as E,onWatcherCleanup as D,openBlock as O,renderSlot as ce,shallowRef as k,toDisplayString as le,unref as A,useAttrs as ue,watch as de,watchEffect as fe,withCtx as j,withModifiers as pe}from"vue";import{onKeyStroke as me,useRafFn as he}from"@vueuse/core";var M=T({name:`ToastRoot`,inheritAttrs:!1,__name:`toast-root`,props:{liveType:{default:`foreground`},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!0},duration:{},forceMount:{type:Boolean},asChild:{type:Boolean},as:{default:`li`}},emits:[`escapeKeyDown`,`pause`,`resume`,`swipeStart`,`swipeMove`,`swipeCancel`,`swipeEnd`,`update:open`],setup(T,{emit:M}){let N=T,P=M,F=ue(),I=d(),L=S(()=>I?.ui?.value?.root),{swipeDirection:R,swipeThreshold:ge,viewportElement:z,isFocusedToastEscapeKeyDownRef:_e,isClosePausedRef:B,duration:ve,onToastAdd:ye,onToastRemove:be}=u(`ToastRoot`),{itemElement:V,setItemElement:xe,itemProps:Se}=l(),H=a(()=>N.open,e=>{P(`update:open`,e??!1)},N.defaultOpen),Ce=N.forceMount?k(!0):o(V,H),U=S(()=>typeof N.duration==`number`?N.duration:ve.value||5e3),we=S(()=>e(H.value)),W=k(null),G=k(null),K=k(0),q=k(U.value),J=k(0),Y=k(U.value),X=he(()=>{let e=new Date().getTime()-K.value;Y.value=Math.max(q.value-e,0)},{fpsLimit:60}),Z=S(()=>V.value?te(V.value):null),Q=e=>{let n=e?.pointerType===``;V.value?.contains(t())&&n&&z.value?.focus(),n&&(B.value=!1),H.value=!1},$=e=>{!e||e===1/0||n&&(window.clearTimeout(J.value),K.value=new Date().getTime(),J.value=window.setTimeout(Q,e))},Te=e=>{P(`swipeStart`,e),!e.defaultPrevented&&e.currentTarget.setAttribute(p,b.start)},Ee=e=>{if(P(`swipeMove`,e),e.defaultPrevented)return;let{x:t,y:n}=e.detail.delta,r=e.currentTarget;r.setAttribute(p,b.move),r.style.setProperty(y.swipeMoveX,`${t}px`),r.style.setProperty(y.swipeMoveY,`${n}px`)},De=e=>{if(P(`swipeCancel`,e),e.defaultPrevented)return;let t=e.currentTarget;t.setAttribute(p,b.cancel),Object.values(y).forEach(e=>{t.style.removeProperty(e)})},Oe=e=>{if(P(`swipeEnd`,e),e.defaultPrevented)return;let{x:t,y:n}=e.detail.delta,r=e.currentTarget;r.setAttribute(p,b.end),r.style.removeProperty(y.swipeMoveX),r.style.removeProperty(y.swipeMoveY),r.style.setProperty(y.swipeEndX,`${t}px`),r.style.setProperty(y.swipeEndY,`${n}px`),H.value=!1},ke=e=>{let{clientX:t,clientY:n}=e;W.value={x:t,y:n}},Ae=e=>{if(!W.value)return;let{clientX:t,clientY:n}=e,{x:a,y:o}=W.value,s=t-a,c=n-o,l=[`left`,`right`].includes(R.value),u=[`left`,`up`].includes(R.value)?Math.min:Math.max,d=l?u(0,s):0,f=l?0:u(0,c),p=e.pointerType===`touch`?10:2,m={x:d,y:f},h={originalEvent:e,delta:m};if(G.value){G.value=m,r(g,Ee,h);return}if(i(m,R.value,p)){G.value=m,r(ee,Te,h),e.target.setPointerCapture(e.pointerId);return}(Math.abs(s)>p||Math.abs(c)>p)&&(W.value=null)},je=e=>{let t=G.value,n=e.target;if(n.hasPointerCapture(e.pointerId)&&n.releasePointerCapture(e.pointerId),G.value=null,W.value=null,!t)return;let a=e.currentTarget,o={originalEvent:e,delta:t};i(t,R.value,ge.value)?r(h,Oe,o):r(m,De,o),a?.addEventListener(`click`,e=>e.preventDefault(),{once:!0})};return me(`Escape`,e=>{P(`escapeKeyDown`,e),e.defaultPrevented||(_e.value=!0,Q())}),fe(()=>{let e=z.value;if(!e)return;let t=()=>{$(q.value),X.resume(),P(`resume`)},n=()=>{let e=new Date().getTime()-K.value;q.value-=e,window.clearTimeout(J.value),X.pause(),P(`pause`)};e.addEventListener(_,n),e.addEventListener(v,t),D(()=>{e.removeEventListener(_,n),e.removeEventListener(v,t)})}),de(()=>[N.open,U.value],()=>{q.value=U.value,N.open&&!B.value&&$(U.value)},{immediate:!0}),c({onClose:Q}),se(()=>{ye()}),E(()=>{be()}),(e,t)=>A(Ce)?(O(),re(ne,{key:0},[Z.value?(O(),C(f,{key:0,role:`alert`,"aria-live":T.liveType===`foreground`?`assertive`:`polite`,"aria-atomic":`true`},{default:j(()=>[ie(le(Z.value),1)]),_:1},8,[`aria-live`])):w(`v-if`,!0),A(z)?(O(),C(x,{key:1,to:A(z)},[ae(A(s),oe({ref:A(xe)},{...A(F),...A(Se)},{as:T.as,"as-child":T.asChild,class:L.value,"aria-atomic":`true`,"aria-live":`off`,"data-swipe-direction":A(R),"data-state":we.value,role:`alert`,tabindex:`0`,style:{"user-select":`none`,"touch-action":`none`},onPointerdown:pe(ke,[`left`]),onPointermove:Ae,onPointerup:je}),{default:j(()=>[ce(e.$slots,`default`,{remaining:Y.value,duration:U.value})]),_:3},16,[`as`,`as-child`,`class`,`data-swipe-direction`,`data-state`])],8,[`to`])):w(`v-if`,!0)],64)):w(`v-if`,!0)}});export{M as default};
@@ -0,0 +1,48 @@
1
+ import { SwipeEvent } from "../../types/event.js";
2
+ import "../../types/index.js";
3
+ import { AsTag } from "../primitive/types.js";
4
+ import "../primitive/index.js";
5
+ import { ToastLiveType, ToastRootProps } from "./types.js";
6
+ import * as vue1630 from "vue";
7
+
8
+ //#region src/components/toast/toast-root.vue.d.ts
9
+ declare var __VLS_20: {
10
+ remaining: number;
11
+ duration: number;
12
+ };
13
+ type __VLS_Slots = {} & {
14
+ default?: (props: typeof __VLS_20) => any;
15
+ };
16
+ declare const __VLS_base: vue1630.DefineComponent<ToastRootProps, {}, {}, {}, {}, vue1630.ComponentOptionsMixin, vue1630.ComponentOptionsMixin, {
17
+ pause: () => any;
18
+ "update:open": (value: boolean) => any;
19
+ escapeKeyDown: (event: KeyboardEvent) => any;
20
+ resume: () => any;
21
+ swipeStart: (event: SwipeEvent) => any;
22
+ swipeMove: (event: SwipeEvent) => any;
23
+ swipeCancel: (event: SwipeEvent) => any;
24
+ swipeEnd: (event: SwipeEvent) => any;
25
+ }, string, vue1630.PublicProps, Readonly<ToastRootProps> & Readonly<{
26
+ onPause?: (() => any) | undefined;
27
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
28
+ onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
29
+ onResume?: (() => any) | undefined;
30
+ onSwipeStart?: ((event: SwipeEvent) => any) | undefined;
31
+ onSwipeMove?: ((event: SwipeEvent) => any) | undefined;
32
+ onSwipeCancel?: ((event: SwipeEvent) => any) | undefined;
33
+ onSwipeEnd?: ((event: SwipeEvent) => any) | undefined;
34
+ }>, {
35
+ as: AsTag | vue1630.Component;
36
+ open: boolean;
37
+ defaultOpen: boolean;
38
+ liveType: ToastLiveType;
39
+ }, {}, {}, {}, string, vue1630.ComponentProvideOptions, false, {}, any>;
40
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
41
+ declare const _default: typeof __VLS_export;
42
+ type __VLS_WithSlots<T, S> = T & {
43
+ new (): {
44
+ $slots: S;
45
+ };
46
+ };
47
+ //#endregion
48
+ export { _default };
@@ -0,0 +1 @@
1
+ import{useToastThemeContext as e}from"./context.js";import{computed as t,createElementBlock as n,defineComponent as r,normalizeClass as i,openBlock as a,renderSlot as o}from"vue";var s=r({name:`ToastTitle`,__name:`toast-title`,setup(r){let s=e(),c=t(()=>s?.ui?.value?.title);return(e,t)=>(a(),n(`div`,{class:i(c.value)},[o(e.$slots,`default`)],2))}});export{s as default};
@@ -0,0 +1,18 @@
1
+ import { ToastTitleProps } from "./types.js";
2
+ import * as vue1642 from "vue";
3
+
4
+ //#region src/components/toast/toast-title.vue.d.ts
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: vue1642.DefineComponent<ToastTitleProps, {}, {}, {}, {}, vue1642.ComponentOptionsMixin, vue1642.ComponentOptionsMixin, {}, string, vue1642.PublicProps, Readonly<ToastTitleProps> & Readonly<{}>, {}, {}, {}, {}, string, vue1642.ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
11
+ declare const _default: typeof __VLS_export;
12
+ type __VLS_WithSlots<T, S> = T & {
13
+ new (): {
14
+ $slots: S;
15
+ };
16
+ };
17
+ //#endregion
18
+ export { _default };
@@ -0,0 +1 @@
1
+ import{getActiveElement as e}from"../../shared/dom.js";import{getTabbableCandidates as t,tryFocusFirst as n}from"../../shared/focus.js";import{useForwardElement as r}from"../../composables/use-forward-element.js";import{Primitive as i}from"../primitive/primitive.js";import{useCollectionContext as a,useToastProviderContext as o,useToastViewportThemeContext as s}from"./context.js";import{VIEWPORT_PAUSE as c,VIEWPORT_RESUME as l}from"./shared.js";import u from"./toast-focus-proxy.js";import{computed as d,createBlock as f,createCommentVNode as p,createElementBlock as m,createVNode as h,defineComponent as g,mergeProps as _,normalizeStyle as v,onWatcherCleanup as y,openBlock as b,renderSlot as x,unref as S,useAttrs as C,watchEffect as w,withCtx as T}from"vue";import{onKeyStroke as E}from"@vueuse/core";const D=[`aria-label`];var O=g({name:`ToastViewport`,inheritAttrs:!1,__name:`toast-viewport`,props:{hotkey:{default:()=>[`F8`]},label:{type:[String,Function],default:`Notifications ({hotkey})`},asChild:{type:Boolean},as:{default:`ol`}},setup(g){let O=g,k=C(),A=s(),j=d(()=>A?.value),{onViewportElementChange:M,toastCount:N,isClosePausedRef:P}=o(`ToastViewport`),{onContainerElementChange:F,getOrderedElements:I}=a(`ToastViewport`),[L,R]=r(),[z,B]=r(),[V,H]=r(e=>{M(e),F(e)}),U=d(()=>N.value>0),W=d(()=>O.hotkey.join(`+`).replace(/Key/g,``).replace(/Digit/g,``)),G=d(()=>typeof O.label==`string`?O.label.replace(`{hotkey}`,W.value):O.label(W.value));E(O.hotkey,()=>{V.value?.focus()});let K=e=>{n(q(e))};w(()=>{let t=V.value;if(!t||!U.value)return;let r=()=>{if(!P.value){let e=new CustomEvent(c);t.dispatchEvent(e),P.value=!0}},i=()=>{if(P.value){let e=new CustomEvent(l);t.dispatchEvent(e),P.value=!1}},a=e=>{t.contains(e.relatedTarget)||i()},o=()=>{t.contains(e())||i()},s=r=>{let i=r.altKey||r.ctrlKey||r.metaKey;if(r.key===`Tab`&&!i){let i=e(),a=r.shiftKey;if(r.target===t&&a){L.value?.focus();return}let o=q(a?`backwards`:`forwards`),s=o.findIndex(e=>e===i);if(n(o.slice(s+1))){r.preventDefault();return}a?L.value?.focus():z.value?.focus()}};t.addEventListener(`focusin`,r),t.addEventListener(`focusout`,a),t.addEventListener(`pointermove`,r),t.addEventListener(`pointerleave`,o),t.addEventListener(`keydown`,s),window.addEventListener(`blur`,r),window.addEventListener(`focus`,i),y(()=>{t.removeEventListener(`focusin`,r),t.removeEventListener(`focusout`,a),t.removeEventListener(`pointermove`,r),t.removeEventListener(`pointerleave`,o),t.removeEventListener(`keydown`,s),window.removeEventListener(`blur`,r),window.removeEventListener(`focus`,i)})});function q(e){let n=I().map(n=>{let r=[n,...t(n)];return e===`forwards`?r:r.reverse()});return(e===`forwards`?n.reverse():n).flat()}return(e,t)=>(b(),m(`div`,{role:`region`,"aria-label":G.value,tabindex:`-1`,style:v({pointerEvents:U.value?void 0:`none`})},[U.value?(b(),f(u,{key:0,ref:S(R),onFocusFromOutsideViewport:t[0]||=e=>K(`forwards`)},null,512)):p(`v-if`,!0),h(S(i),_({ref:S(H)},S(k),{as:g.as,"as-child":g.asChild,class:j.value,tabindex:`-1`}),{default:T(()=>[x(e.$slots,`default`)]),_:3},16,[`as`,`as-child`,`class`]),U.value?(b(),f(u,{key:1,ref:S(B),onFocusFromOutsideViewport:t[1]||=e=>K(`backwards`)},null,512)):p(`v-if`,!0)],12,D))}});export{O as default};
@@ -0,0 +1,24 @@
1
+ import { AsTag } from "../primitive/types.js";
2
+ import "../primitive/index.js";
3
+ import { ToastViewportProps } from "./types.js";
4
+ import * as vue1636 from "vue";
5
+
6
+ //#region src/components/toast/toast-viewport.vue.d.ts
7
+ declare var __VLS_13: {};
8
+ type __VLS_Slots = {} & {
9
+ default?: (props: typeof __VLS_13) => any;
10
+ };
11
+ declare const __VLS_base: vue1636.DefineComponent<ToastViewportProps, {}, {}, {}, {}, vue1636.ComponentOptionsMixin, vue1636.ComponentOptionsMixin, {}, string, vue1636.PublicProps, Readonly<ToastViewportProps> & Readonly<{}>, {
12
+ label: string | ((hotkey: string) => string);
13
+ as: AsTag | vue1636.Component;
14
+ hotkey: string[];
15
+ }, {}, {}, {}, string, vue1636.ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
23
+ //#endregion
24
+ export { _default };
@@ -0,0 +1,107 @@
1
+ import { ClassValue, SwipeDirection } from "../../types/common.js";
2
+ import { SwipeEvent } from "../../types/event.js";
3
+ import { ForceMountProps } from "../../types/component.js";
4
+ import "../../types/index.js";
5
+ import { PrimitiveProps } from "../primitive/types.js";
6
+ import { ComputedRef, HTMLAttributes } from "vue";
7
+
8
+ //#region src/components/toast/types.d.ts
9
+ interface ToastProviderProps {
10
+ /**
11
+ * An author-localized label for each toast. Used to help screen reader users associate the interruption with a toast.
12
+ *
13
+ * @defaultValue 'Notification'
14
+ */
15
+ label?: string;
16
+ /**
17
+ * Time in milliseconds that each toast should remain visible for.
18
+ *
19
+ * @defaultValue 5000
20
+ */
21
+ duration?: number;
22
+ /**
23
+ * Direction of pointer swipe that should close the toast.
24
+ *
25
+ * @defaultValue 'right'
26
+ */
27
+ swipeDirection?: SwipeDirection;
28
+ /**
29
+ * Distance in pixels that the swipe must pass before a close is triggered.
30
+ *
31
+ * @defaultValue 50
32
+ */
33
+ swipeThreshold?: number;
34
+ }
35
+ type ToastLiveType = 'foreground' | 'background';
36
+ interface ToastRootProps extends ForceMountProps, PrimitiveProps, /** @vue-ignore */Omit<HTMLAttributes, 'onPause'> {
37
+ /**
38
+ * Control the sensitivity of the toast for accessibility purposes.
39
+ *
40
+ * For toasts that are the result of a user action, choose `foreground`. Toasts generated from background tasks should
41
+ * use `background`.
42
+ */
43
+ liveType?: ToastLiveType;
44
+ /** The controlled open state of the dialog. Can be bind as `v-model:open`. */
45
+ open?: boolean;
46
+ /** The open state of the dialog when it is initially rendered. Use when you do not need to control its open state. */
47
+ defaultOpen?: boolean;
48
+ /** Time in milliseconds that toast should remain visible for. Overrides value given to `ToastProvider`. */
49
+ duration?: number;
50
+ }
51
+ type ToastRootEmits = {
52
+ /** Event handler called when the escape key is down. It can be prevented by calling `event.preventDefault`. */
53
+ escapeKeyDown: [event: KeyboardEvent];
54
+ /**
55
+ * Event handler called when the dismiss timer is paused. This occurs when the pointer is moved over the viewport, the
56
+ * viewport is focused or when the window is blurred.
57
+ */
58
+ pause: [];
59
+ /**
60
+ * Event handler called when the dismiss timer is resumed. This occurs when the pointer is moved away from the
61
+ * viewport, the viewport is blurred or when the window is focused.
62
+ */
63
+ resume: [];
64
+ /** Event handler called when starting a swipe interaction. It can be prevented by calling `event.preventDefault`. */
65
+ swipeStart: [event: SwipeEvent];
66
+ /** Event handler called during a swipe interaction. It can be prevented by calling `event.preventDefault`. */
67
+ swipeMove: [event: SwipeEvent];
68
+ /** Event handler called when swipe interaction is cancelled. It can be prevented by calling `event.preventDefault`. */
69
+ swipeCancel: [event: SwipeEvent];
70
+ /** Event handler called at the end of a swipe interaction. It can be prevented by calling `event.preventDefault`. */
71
+ swipeEnd: [event: SwipeEvent];
72
+ /** Event handler called when the open state of the toast changes. */
73
+ 'update:open': [value: boolean];
74
+ };
75
+ interface ToastViewportProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {
76
+ /**
77
+ * The keys to use as the keyboard shortcut that will move focus to the toast viewport.
78
+ *
79
+ * @defaultValue ['F8']
80
+ */
81
+ hotkey?: string[];
82
+ /**
83
+ * An author-localized label for the toast viewport to provide context for screen reader users when navigating page
84
+ * landmarks. The available `{hotkey}` placeholder will be replaced for you. Alternatively, you can pass in a custom
85
+ * function to generate the label.
86
+ *
87
+ * @defaultValue 'Notifications ({hotkey})'
88
+ */
89
+ label?: string | ((hotkey: string) => string);
90
+ }
91
+ interface ToastCloseProps extends PrimitiveProps, /** @vue-ignore */HTMLAttributes {}
92
+ interface ToastActionProps extends ToastCloseProps {
93
+ /**
94
+ * A short description for an alternate way to carry out the action. For screen reader users who will not be able to
95
+ * navigate to the button easily/quickly.
96
+ */
97
+ altText: string;
98
+ }
99
+ interface ToastTitleProps extends /** @vue-ignore */HTMLAttributes {}
100
+ interface ToastDescriptionProps extends /** @vue-ignore */HTMLAttributes {}
101
+ type ToastThemeSlot = 'root' | 'title' | 'description' | 'action' | 'close';
102
+ type ToastUi = Record<ToastThemeSlot, ClassValue>;
103
+ interface ToastThemeContextParams {
104
+ ui: ComputedRef<ToastUi>;
105
+ }
106
+ //#endregion
107
+ export { ToastActionProps, ToastCloseProps, ToastDescriptionProps, ToastLiveType, ToastProviderProps, ToastRootEmits, ToastRootProps, ToastThemeContextParams, ToastThemeSlot, ToastTitleProps, ToastUi, ToastViewportProps };
@@ -1,20 +1,20 @@
1
1
  import { PointerDownOutsideEvent } from "../../types/event.js";
2
2
  import { TooltipContentProps } from "./types.js";
3
3
  import "../../index.js";
4
- import * as vue496 from "vue";
4
+ import * as vue698 from "vue";
5
5
 
6
6
  //#region src/components/tooltip/tooltip-content.vue.d.ts
7
7
  declare var __VLS_6: {};
8
8
  type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_6) => any;
10
10
  };
11
- declare const __VLS_base: vue496.DefineComponent<TooltipContentProps, {}, {}, {}, {}, vue496.ComponentOptionsMixin, vue496.ComponentOptionsMixin, {
11
+ declare const __VLS_base: vue698.DefineComponent<TooltipContentProps, {}, {}, {}, {}, vue698.ComponentOptionsMixin, vue698.ComponentOptionsMixin, {
12
12
  escapeKeyDown: (event: KeyboardEvent) => any;
13
13
  pointerDownOutside: (event: PointerDownOutsideEvent) => any;
14
- }, string, vue496.PublicProps, Readonly<TooltipContentProps> & Readonly<{
14
+ }, string, vue698.PublicProps, Readonly<TooltipContentProps> & Readonly<{
15
15
  onEscapeKeyDown?: ((event: KeyboardEvent) => any) | undefined;
16
16
  onPointerDownOutside?: ((event: PointerDownOutsideEvent) => any) | undefined;
17
- }>, {}, {}, {}, {}, string, vue496.ComponentProvideOptions, false, {}, any>;
17
+ }>, {}, {}, {}, {}, string, vue698.ComponentProvideOptions, false, {}, any>;
18
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
19
  declare const _default: typeof __VLS_export;
20
20
  type __VLS_WithSlots<T, S> = T & {
@@ -1,5 +1,5 @@
1
1
  import { TooltipRootProps } from "./types.js";
2
- import * as vue507 from "vue";
2
+ import * as vue703 from "vue";
3
3
 
4
4
  //#region src/components/tooltip/tooltip-root.vue.d.ts
5
5
  declare var __VLS_7: {
@@ -8,14 +8,14 @@ declare var __VLS_7: {
8
8
  type __VLS_Slots = {} & {
9
9
  default?: (props: typeof __VLS_7) => any;
10
10
  };
11
- declare const __VLS_base: vue507.DefineComponent<TooltipRootProps, {}, {}, {}, {}, vue507.ComponentOptionsMixin, vue507.ComponentOptionsMixin, {
11
+ declare const __VLS_base: vue703.DefineComponent<TooltipRootProps, {}, {}, {}, {}, vue703.ComponentOptionsMixin, vue703.ComponentOptionsMixin, {
12
12
  "update:open": (value: boolean) => any;
13
- }, string, vue507.PublicProps, Readonly<TooltipRootProps> & Readonly<{
13
+ }, string, vue703.PublicProps, Readonly<TooltipRootProps> & Readonly<{
14
14
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
15
15
  }>, {
16
16
  open: boolean;
17
17
  defaultOpen: boolean;
18
- }, {}, {}, {}, string, vue507.ComponentProvideOptions, false, {}, any>;
18
+ }, {}, {}, {}, string, vue703.ComponentProvideOptions, false, {}, any>;
19
19
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
20
20
  declare const _default: typeof __VLS_export;
21
21
  type __VLS_WithSlots<T, S> = T & {
@@ -2,16 +2,16 @@ import { AsTag } from "../primitive/types.js";
2
2
  import "../primitive/index.js";
3
3
  import { PopperAnchorProps } from "../popper/types.js";
4
4
  import "./types.js";
5
- import * as vue501 from "vue";
5
+ import * as vue708 from "vue";
6
6
 
7
7
  //#region src/components/tooltip/tooltip-trigger.vue.d.ts
8
8
  declare var __VLS_7: {};
9
9
  type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_7) => any;
11
11
  };
12
- declare const __VLS_base: vue501.DefineComponent<PopperAnchorProps, {}, {}, {}, {}, vue501.ComponentOptionsMixin, vue501.ComponentOptionsMixin, {}, string, vue501.PublicProps, Readonly<PopperAnchorProps> & Readonly<{}>, {
13
- as: AsTag | vue501.Component;
14
- }, {}, {}, {}, string, vue501.ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_base: vue708.DefineComponent<PopperAnchorProps, {}, {}, {}, {}, vue708.ComponentOptionsMixin, vue708.ComponentOptionsMixin, {}, string, vue708.PublicProps, Readonly<PopperAnchorProps> & Readonly<{}>, {
13
+ as: AsTag | vue708.Component;
14
+ }, {}, {}, {}, string, vue708.ComponentProvideOptions, false, {}, any>;
15
15
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
16
  declare const _default: typeof __VLS_export;
17
17
  type __VLS_WithSlots<T, S> = T & {
@@ -3,7 +3,7 @@ import "../../types/index.js";
3
3
  import { AsTag } from "../primitive/types.js";
4
4
  import "../primitive/index.js";
5
5
  import { TreeItemProps } from "./types.js";
6
- import * as vue610 from "vue";
6
+ import * as vue1591 from "vue";
7
7
 
8
8
  //#region src/components/tree/tree-item.vue.d.ts
9
9
  declare var __VLS_17: {
@@ -14,15 +14,15 @@ declare var __VLS_17: {
14
14
  type __VLS_Slots = {} & {
15
15
  default?: (props: typeof __VLS_17) => any;
16
16
  };
17
- declare const __VLS_base: vue610.DefineComponent<TreeItemProps, {}, {}, {}, {}, vue610.ComponentOptionsMixin, vue610.ComponentOptionsMixin, {
17
+ declare const __VLS_base: vue1591.DefineComponent<TreeItemProps, {}, {}, {}, {}, vue1591.ComponentOptionsMixin, vue1591.ComponentOptionsMixin, {
18
18
  select: (event: TreeSelectEvent<string>) => any;
19
19
  toggle: (event: TreeToggleEvent<string>) => any;
20
- }, string, vue610.PublicProps, Readonly<TreeItemProps> & Readonly<{
20
+ }, string, vue1591.PublicProps, Readonly<TreeItemProps> & Readonly<{
21
21
  onSelect?: ((event: TreeSelectEvent<string>) => any) | undefined;
22
22
  onToggle?: ((event: TreeToggleEvent<string>) => any) | undefined;
23
23
  }>, {
24
- as: AsTag | vue610.Component;
25
- }, {}, {}, {}, string, vue610.ComponentProvideOptions, false, {}, any>;
24
+ as: AsTag | vue1591.Component;
25
+ }, {}, {}, {}, string, vue1591.ComponentProvideOptions, false, {}, any>;
26
26
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
27
  declare const _default: typeof __VLS_export;
28
28
  type __VLS_WithSlots<T, S> = T & {
@@ -1,14 +1,14 @@
1
1
  import { MaybeArray } from "../../types/common.js";
2
2
  import "../../types/index.js";
3
3
  import { FlattenedItem, TreeItemData, TreeRootProps } from "./types.js";
4
- import * as vue608 from "vue";
4
+ import * as vue1587 from "vue";
5
5
 
6
6
  //#region src/components/tree/tree-root.vue.d.ts
7
7
  declare const __VLS_export: <T extends TreeItemData, U extends MaybeArray<string> | undefined, M extends boolean>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
8
  props: __VLS_PrettifyLocal<TreeRootProps<T, U, M> & {
9
9
  "onUpdate:modelValue"?: ((value: string | ((U extends string ? false : M extends true ? true : false) extends infer T_1 ? T_1 extends (U extends string ? false : M extends true ? true : false) ? T_1 extends true ? string[] : string : never : never)) => any) | undefined;
10
10
  "onUpdate:expanded"?: ((value: string[]) => any) | undefined;
11
- }> & vue608.PublicProps;
11
+ }> & vue1587.PublicProps;
12
12
  expose: (exposed: {}) => void;
13
13
  attrs: any;
14
14
  slots: {
@@ -21,7 +21,7 @@ declare const __VLS_export: <T extends TreeItemData, U extends MaybeArray<string
21
21
  }) => any;
22
22
  };
23
23
  emit: ((evt: "update:modelValue", value: string | ((U extends string ? false : M extends true ? true : false) extends infer T_1 ? T_1 extends (U extends string ? false : M extends true ? true : false) ? T_1 extends true ? string[] : string : never : never)) => void) & ((evt: "update:expanded", value: string[]) => void);
24
- }>) => vue608.VNode & {
24
+ }>) => vue1587.VNode & {
25
25
  __ctx?: Awaited<typeof __VLS_setup>;
26
26
  };
27
27
  declare const _default: typeof __VLS_export;