morya-ui 0.4.1 → 0.4.3

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 (252) hide show
  1. package/CHANGELOG.md +60 -1
  2. package/dist/Button-Bjsth0ct.js +326 -0
  3. package/dist/{Card-B1CB9Trm.js → Card-Ct5vJmoV.js} +1 -1
  4. package/dist/{Checkbox-BKt8hdhV.js → Checkbox-Bo26OGHP.js} +1 -1
  5. package/dist/{DatePicker-CSoMFEvh.js → DatePicker-CsMGzCqY.js} +4 -4
  6. package/dist/{Empty-iNcc0G-q.js → Empty-rMhOPi79.js} +2 -2
  7. package/dist/{FlyoutSubmenu-C1RfFRzH.js → FlyoutSubmenu-C0id6-Sb.js} +1 -1
  8. package/dist/{Icon-od9Ob-Ay.js → Icon-CmHjx7W8.js} +1 -1
  9. package/dist/{Input-DQHYqvNk.js → Input-CxSTVp9E.js} +3 -3
  10. package/dist/{Loading-BPpR-jGa.js → Loading-D_qRwfKv.js} +11 -11
  11. package/dist/{Pagination-DLphD6LC.js → Pagination-CnGOpp0m.js} +3 -3
  12. package/dist/{Popover-B_2c9NWs.js → Popover-D1uZ1N9Z.js} +2 -2
  13. package/dist/{ProgressSpinner-B_OJG_0l.js → ProgressSpinner-hmR23xpi.js} +2 -2
  14. package/dist/{Radio-Bxd806ys.js → Radio-CZAyelC_.js} +1 -1
  15. package/dist/{Segmented-BRMSmXCl.js → Segmented-BpdO7arR.js} +2 -2
  16. package/dist/{Select-DxMlpgc5.js → Select-CySmusHs.js} +5 -5
  17. package/dist/{Textarea-BBvpgIQL.js → Textarea-DskjTCcz.js} +3 -3
  18. package/dist/{Tooltip-BJp-ZMqQ.js → Tooltip-DSfkflHp.js} +2 -2
  19. package/dist/alert/index.js +15 -15
  20. package/dist/alert/style.css +1 -1
  21. package/dist/auto-complete/index.js +4 -4
  22. package/dist/avatar/index.js +1 -1
  23. package/dist/badge/index.js +24 -24
  24. package/dist/badge/style.css +0 -1
  25. package/dist/block-ui/index.js +1 -1
  26. package/dist/breadcrumb/index.js +1 -1
  27. package/dist/button/index.js +9 -9
  28. package/dist/button/style.css +464 -775
  29. package/dist/button/style.js +1 -0
  30. package/dist/calendar/index.js +3 -3
  31. package/dist/card/index.js +1 -1
  32. package/dist/carousel/index.js +2 -4
  33. package/dist/carousel/style.css +457 -775
  34. package/dist/cascade-select/index.js +5 -5
  35. package/dist/checkbox/index.js +1 -1
  36. package/dist/chip/index.js +35 -35
  37. package/dist/chip/style.css +1 -1
  38. package/dist/command-menu/index.js +5 -5
  39. package/dist/components/Alert/Alert.vue.d.ts +2 -2
  40. package/dist/components/Alert/Alert.vue.d.ts.map +1 -1
  41. package/dist/components/Alert/index.d.ts +1 -1
  42. package/dist/components/Alert/index.d.ts.map +1 -1
  43. package/dist/components/Alert/styles.css +1 -1
  44. package/dist/components/Alert/types.d.ts +3 -3
  45. package/dist/components/Alert/types.d.ts.map +1 -1
  46. package/dist/components/Badge/Badge.vue.d.ts +2 -2
  47. package/dist/components/Badge/index.d.ts +1 -1
  48. package/dist/components/Badge/index.d.ts.map +1 -1
  49. package/dist/components/Badge/styles.css +0 -1
  50. package/dist/components/Badge/types.d.ts +3 -4
  51. package/dist/components/Badge/types.d.ts.map +1 -1
  52. package/dist/components/Button/Button.vue.d.ts +15 -22
  53. package/dist/components/Button/Button.vue.d.ts.map +1 -1
  54. package/dist/components/Button/ButtonGroup.vue.d.ts +1 -1
  55. package/dist/components/Button/ButtonGroup.vue.d.ts.map +1 -1
  56. package/dist/components/Button/buttonHelpers.d.ts +25 -0
  57. package/dist/components/Button/buttonHelpers.d.ts.map +1 -0
  58. package/dist/components/Button/index.d.ts +2 -1
  59. package/dist/components/Button/index.d.ts.map +1 -1
  60. package/dist/components/Button/styles.css +463 -781
  61. package/dist/components/Button/types.d.ts +63 -61
  62. package/dist/components/Button/types.d.ts.map +1 -1
  63. package/dist/components/Carousel/Carousel.vue.d.ts.map +1 -1
  64. package/dist/components/Chip/index.d.ts +1 -1
  65. package/dist/components/Chip/index.d.ts.map +1 -1
  66. package/dist/components/Chip/styles.css +1 -1
  67. package/dist/components/Chip/types.d.ts +3 -3
  68. package/dist/components/Chip/types.d.ts.map +1 -1
  69. package/dist/components/ConfirmDialog/ConfirmDialog.vue.d.ts +2 -2
  70. package/dist/components/ConfirmDialog/ConfirmDialog.vue.d.ts.map +1 -1
  71. package/dist/components/ConfirmDialog/types.d.ts +3 -3
  72. package/dist/components/ConfirmDialog/types.d.ts.map +1 -1
  73. package/dist/components/ConfirmDialog/useConfirm.d.ts +1 -1
  74. package/dist/components/ConfirmDialog/useConfirm.d.ts.map +1 -1
  75. package/dist/components/ConfirmPopup/ConfirmPopup.vue.d.ts.map +1 -1
  76. package/dist/components/ConfirmPopup/types.d.ts +3 -3
  77. package/dist/components/ConfirmPopup/types.d.ts.map +1 -1
  78. package/dist/components/Dialog/Dialog.vue.d.ts.map +1 -1
  79. package/dist/components/Dialog/styles.css +2 -3
  80. package/dist/components/Dialog/types.d.ts +4 -5
  81. package/dist/components/Dialog/types.d.ts.map +1 -1
  82. package/dist/components/Dialog/useModal.d.ts +2 -2
  83. package/dist/components/Dialog/useModal.d.ts.map +1 -1
  84. package/dist/components/Divider/Divider.vue.d.ts +1 -1
  85. package/dist/components/Mentions/Mentions.vue.d.ts +1 -1
  86. package/dist/components/Message/Message.vue.d.ts.map +1 -1
  87. package/dist/components/Message/index.d.ts +1 -1
  88. package/dist/components/Message/index.d.ts.map +1 -1
  89. package/dist/components/Message/message.d.ts +4 -0
  90. package/dist/components/Message/message.d.ts.map +1 -1
  91. package/dist/components/Message/styles.css +7 -9
  92. package/dist/components/Message/types.d.ts +4 -4
  93. package/dist/components/Message/types.d.ts.map +1 -1
  94. package/dist/components/Page/PageFilters.vue.d.ts.map +1 -1
  95. package/dist/components/Page/PageStat.vue.d.ts +2 -2
  96. package/dist/components/Page/index.d.ts +1 -1
  97. package/dist/components/Page/index.d.ts.map +1 -1
  98. package/dist/components/Page/styles.css +2 -2
  99. package/dist/components/Page/types.d.ts +2 -2
  100. package/dist/components/Page/types.d.ts.map +1 -1
  101. package/dist/components/ProgressBar/ProgressBar.vue.d.ts.map +1 -1
  102. package/dist/components/ProgressBar/styles.css +1 -1
  103. package/dist/components/ProgressBar/types.d.ts +2 -7
  104. package/dist/components/ProgressBar/types.d.ts.map +1 -1
  105. package/dist/components/QRCode/QRCode.vue.d.ts.map +1 -1
  106. package/dist/components/Select/Select.vue.d.ts +1 -1
  107. package/dist/components/SplitButton/SplitButton.vue.d.ts +0 -1
  108. package/dist/components/SplitButton/SplitButton.vue.d.ts.map +1 -1
  109. package/dist/components/SplitButton/types.d.ts +3 -3
  110. package/dist/components/SplitButton/types.d.ts.map +1 -1
  111. package/dist/components/Status/Status.vue.d.ts +2 -2
  112. package/dist/components/Status/Status.vue.d.ts.map +1 -1
  113. package/dist/components/Status/index.d.ts +1 -1
  114. package/dist/components/Status/index.d.ts.map +1 -1
  115. package/dist/components/Status/styles.css +0 -1
  116. package/dist/components/Status/types.d.ts +4 -5
  117. package/dist/components/Status/types.d.ts.map +1 -1
  118. package/dist/components/Table/Table.vue.d.ts +4 -4
  119. package/dist/components/Table/Table.vue.d.ts.map +1 -1
  120. package/dist/components/Table/render/TableThead.vue.d.ts +2 -0
  121. package/dist/components/Table/render/TableThead.vue.d.ts.map +1 -1
  122. package/dist/components/Table/state/internal.d.ts +1 -0
  123. package/dist/components/Table/state/internal.d.ts.map +1 -1
  124. package/dist/components/Table/styles.css +9 -0
  125. package/dist/components/Tag/Tag.vue.d.ts +3 -3
  126. package/dist/components/Tag/index.d.ts +1 -1
  127. package/dist/components/Tag/index.d.ts.map +1 -1
  128. package/dist/components/Tag/styles.css +0 -1
  129. package/dist/components/Tag/types.d.ts +4 -5
  130. package/dist/components/Tag/types.d.ts.map +1 -1
  131. package/dist/components/Timeline/Timeline.vue.d.ts.map +1 -1
  132. package/dist/components/Timeline/index.d.ts +1 -1
  133. package/dist/components/Timeline/index.d.ts.map +1 -1
  134. package/dist/components/Timeline/styles.css +2 -4
  135. package/dist/components/Timeline/types.d.ts +3 -3
  136. package/dist/components/Timeline/types.d.ts.map +1 -1
  137. package/dist/components/Toast/Toast.vue.d.ts.map +1 -1
  138. package/dist/components/Toast/index.d.ts +1 -1
  139. package/dist/components/Toast/index.d.ts.map +1 -1
  140. package/dist/components/Toast/styles.css +1 -3
  141. package/dist/components/Toast/toast.d.ts +4 -0
  142. package/dist/components/Toast/toast.d.ts.map +1 -1
  143. package/dist/components/Toast/types.d.ts +5 -5
  144. package/dist/components/Toast/types.d.ts.map +1 -1
  145. package/dist/components/Toast/useNotification.d.ts +3 -2
  146. package/dist/components/Toast/useNotification.d.ts.map +1 -1
  147. package/dist/components/Tour/Tour.vue.d.ts.map +1 -1
  148. package/dist/{config-COgrsSV2.js → config-BEpyhJi3.js} +12 -5
  149. package/dist/config-provider/index.js +1 -1
  150. package/dist/config-provider/style.css +457 -775
  151. package/dist/confirm-dialog/index.js +62 -59
  152. package/dist/confirm-dialog/style.css +459 -778
  153. package/dist/confirm-popup/index.js +18 -15
  154. package/dist/confirm-popup/style.css +457 -775
  155. package/dist/context-menu/index.js +5 -5
  156. package/dist/data-view/index.js +3 -3
  157. package/dist/date-picker/index.js +1 -1
  158. package/dist/descriptions/index.js +1 -1
  159. package/dist/dialog/index.js +126 -116
  160. package/dist/dialog/style.css +459 -778
  161. package/dist/dock/index.js +2 -2
  162. package/dist/drawer/index.js +4 -4
  163. package/dist/dropdown/index.js +6 -6
  164. package/dist/empty/index.js +1 -1
  165. package/dist/fieldset/index.js +1 -1
  166. package/dist/file-upload/index.js +2 -2
  167. package/dist/flex/index.js +1 -1
  168. package/dist/form/index.js +2 -2
  169. package/dist/gallery/index.js +2 -2
  170. package/dist/icon/index.js +1 -1
  171. package/dist/{icon-COrt_N8A.js → icon-H8prbteT.js} +1 -1
  172. package/dist/image/index.js +2 -2
  173. package/dist/index.d.ts +12 -12
  174. package/dist/index.d.ts.map +1 -1
  175. package/dist/index.js +4478 -4380
  176. package/dist/input/index.js +1 -1
  177. package/dist/input-color/index.js +2 -2
  178. package/dist/input-number/index.js +3 -3
  179. package/dist/input-otp/index.js +2 -2
  180. package/dist/input-password/index.js +4 -4
  181. package/dist/input-tags/index.js +3 -3
  182. package/dist/layout/index.js +2 -2
  183. package/dist/list/index.js +4 -4
  184. package/dist/listbox/index.js +2 -2
  185. package/dist/loading/index.js +1 -1
  186. package/dist/locale-CZddM-tH.js +21 -0
  187. package/dist/mega-menu/index.js +5 -5
  188. package/dist/mentions/index.js +4 -4
  189. package/dist/menu/index.js +6 -6
  190. package/dist/menubar/index.js +5 -5
  191. package/dist/message/index.js +116 -117
  192. package/dist/message/style.css +7 -9
  193. package/dist/order-list/index.js +2 -2
  194. package/dist/page/index.js +9 -11
  195. package/dist/page/style.css +459 -777
  196. package/dist/pagination/index.js +1 -1
  197. package/dist/panel/index.js +3 -3
  198. package/dist/pick-list/index.js +2 -2
  199. package/dist/popover/index.js +1 -1
  200. package/dist/progress-bar/index.js +33 -34
  201. package/dist/progress-bar/style.css +1 -1
  202. package/dist/progress-spinner/index.js +1 -1
  203. package/dist/qr-code/index.js +4 -4
  204. package/dist/qr-code/style.css +457 -775
  205. package/dist/radio/index.js +1 -1
  206. package/dist/rating/index.js +3 -3
  207. package/dist/result/index.js +2 -2
  208. package/dist/scroll-top/index.js +3 -3
  209. package/dist/segmented/index.js +1 -1
  210. package/dist/select/index.js +1 -1
  211. package/dist/select-button/index.js +1 -1
  212. package/dist/shared/componentDefaults.d.ts +6 -0
  213. package/dist/shared/componentDefaults.d.ts.map +1 -1
  214. package/dist/shared/types.d.ts +7 -20
  215. package/dist/shared/types.d.ts.map +1 -1
  216. package/dist/sidebar/index.js +3 -3
  217. package/dist/slider/index.js +2 -2
  218. package/dist/space/index.js +1 -1
  219. package/dist/speed-dial/index.js +5 -5
  220. package/dist/split-button/index.js +9 -12
  221. package/dist/split-button/style.css +463 -781
  222. package/dist/splitter/index.js +1 -1
  223. package/dist/status/index.js +30 -31
  224. package/dist/status/style.css +0 -1
  225. package/dist/stepper/index.js +1 -1
  226. package/dist/styles.css +1 -1
  227. package/dist/switch/index.js +1 -1
  228. package/dist/table/index.js +1629 -1623
  229. package/dist/table/style.css +9 -0
  230. package/dist/tabs/index.js +2 -2
  231. package/dist/tag/index.js +52 -52
  232. package/dist/tag/style.css +0 -1
  233. package/dist/terminal/index.js +1 -1
  234. package/dist/textarea/index.js +1 -1
  235. package/dist/tiered-menu/index.js +4 -4
  236. package/dist/time-picker/index.js +1 -1
  237. package/dist/timeline/index.js +67 -72
  238. package/dist/timeline/style.css +2 -4
  239. package/dist/toast/index.js +135 -136
  240. package/dist/toast/style.css +458 -778
  241. package/dist/toggle-button/index.js +3 -3
  242. package/dist/tooltip/index.js +1 -1
  243. package/dist/tour/index.js +8 -9
  244. package/dist/tour/style.css +457 -775
  245. package/dist/tree/index.js +3 -3
  246. package/dist/tree-select/index.js +5 -5
  247. package/dist/{types-DGuu4Eg4.js → types-DBQfGctj.js} +1 -4
  248. package/dist/typography/index.js +3 -3
  249. package/dist/{useMotionTransition-S2rlviyZ.js → useMotionTransition-DqL_SEML.js} +1 -1
  250. package/package.json +1 -1
  251. package/dist/Button-TaJ0LKtP.js +0 -234
  252. package/dist/locale-Dnk0UIie.js +0 -21
@@ -1,13 +1,13 @@
1
1
  import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
2
2
  import { n as t, t as n } from "../overlay-oR-5MDuE.js";
3
3
  import { t as r } from "../useFloatingViewportSync-wLLKIGUA.js";
4
- import { t as i } from "../useMotionTransition-S2rlviyZ.js";
5
- import { t as a } from "../Icon-od9Ob-Ay.js";
4
+ import { t as i } from "../useMotionTransition-DqL_SEML.js";
5
+ import { t as a } from "../Icon-CmHjx7W8.js";
6
6
  import { t as o } from "../Scrollbar-DTeJ8P5b.js";
7
- import { t as s } from "../icon-COrt_N8A.js";
7
+ import { t as s } from "../icon-H8prbteT.js";
8
8
  import { t as c } from "../key-CaQYVkjh.js";
9
- import { t as l } from "../FlyoutSubmenu-C1RfFRzH.js";
10
- import { c as u } from "../config-COgrsSV2.js";
9
+ import { t as l } from "../FlyoutSubmenu-C0id6-Sb.js";
10
+ import { l as u } from "../config-BEpyhJi3.js";
11
11
  import "./style.js";
12
12
  import { Fragment as d, Teleport as f, Transition as p, computed as m, createBlock as h, createCommentVNode as g, createElementBlock as _, createElementVNode as v, createVNode as y, defineComponent as b, mergeModels as x, mergeProps as S, nextTick as C, normalizeClass as w, normalizeStyle as T, onBeforeUnmount as E, openBlock as D, ref as O, renderList as k, renderSlot as A, toDisplayString as j, unref as M, useAttrs as N, useModel as P, watch as F, withCtx as I, withModifiers as L } from "vue";
13
13
  //#region src/components/ContextMenu/ContextMenuNodes.vue?vue&type=script&setup=true&lang.ts
@@ -1,7 +1,7 @@
1
1
  import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
2
- import { t } from "../Loading-BPpR-jGa.js";
3
- import { t as n } from "../Pagination-DLphD6LC.js";
4
- import { n as r } from "../locale-Dnk0UIie.js";
2
+ import { t } from "../Loading-D_qRwfKv.js";
3
+ import { t as n } from "../Pagination-CnGOpp0m.js";
4
+ import { n as r } from "../locale-CZddM-tH.js";
5
5
  import "./style.js";
6
6
  import { Fragment as i, computed as a, createBlock as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createSlots as u, createVNode as d, defineComponent as f, mergeProps as p, openBlock as m, ref as h, renderList as g, renderSlot as _, toDisplayString as v, unref as y, useAttrs as b, useSlots as x, watch as S, withCtx as C } from "vue";
7
7
  //#region src/components/DataView/DataView.vue?vue&type=script&setup=true&lang.ts
@@ -1,3 +1,3 @@
1
- import { t as e } from "../DatePicker-CSoMFEvh.js";
1
+ import { t as e } from "../DatePicker-CsMGzCqY.js";
2
2
  import "./style.js";
3
3
  export { e as MDatePicker };
@@ -1,5 +1,5 @@
1
1
  import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
2
- import { o as t } from "../config-COgrsSV2.js";
2
+ import { o as t } from "../config-BEpyhJi3.js";
3
3
  import "./style.js";
4
4
  import { computed as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createTextVNode as o, defineComponent as s, inject as c, mergeProps as l, normalizeClass as u, normalizeStyle as d, openBlock as f, provide as p, renderSlot as m, toDisplayString as h, toRef as g, unref as _, useAttrs as v, useSlots as y } from "vue";
5
5
  //#region src/components/Descriptions/types.ts
@@ -1,28 +1,28 @@
1
1
  import { a as e } from "../useComponentAttrs-e-5QAjdw.js";
2
2
  import { n as t } from "../overlay-oR-5MDuE.js";
3
- import { t as n } from "../useMotionTransition-S2rlviyZ.js";
4
- import { t as r } from "../Icon-od9Ob-Ay.js";
5
- import { t as i } from "../Button-TaJ0LKtP.js";
3
+ import { t as n } from "../useMotionTransition-DqL_SEML.js";
4
+ import { t as r } from "../Icon-CmHjx7W8.js";
5
+ import { t as i } from "../Button-Bjsth0ct.js";
6
6
  import { t as a } from "../useModalOverlay-Beo3CEAt.js";
7
7
  import { t as o } from "../asyncGuard-CPGT_TKu.js";
8
8
  import { t as s } from "../lastPointer-CRxcUqdd.js";
9
9
  import { t as c } from "../overlayHost-78CGtMgR.js";
10
- import { c as l } from "../config-COgrsSV2.js";
11
- import { n as u } from "../locale-Dnk0UIie.js";
10
+ import { l } from "../config-BEpyhJi3.js";
11
+ import { n as u } from "../locale-CZddM-tH.js";
12
12
  import "./style.js";
13
- import { Teleport as d, Transition as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createVNode as v, defineComponent as y, h as b, mergeProps as ee, nextTick as x, normalizeClass as S, normalizeStyle as C, onBeforeUnmount as w, openBlock as T, reactive as E, ref as D, render as O, renderSlot as k, toDisplayString as te, toRef as A, unref as j, useAttrs as M, useSlots as N, watch as P, withCtx as ne, withModifiers as re } from "vue";
13
+ import { Teleport as d, Transition as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createVNode as v, defineComponent as y, h as b, mergeProps as x, nextTick as S, normalizeClass as C, normalizeStyle as ee, onBeforeUnmount as w, openBlock as T, reactive as E, ref as D, render as O, renderSlot as k, toDisplayString as te, toRef as A, unref as j, useAttrs as M, useSlots as N, watch as P, withCtx as F, withModifiers as ne } from "vue";
14
14
  //#region src/components/Dialog/Dialog.vue?vue&type=script&setup=true&lang.ts
15
- var ie = ["aria-modal", "aria-label"], ae = {
15
+ var re = ["aria-modal", "aria-label"], ie = {
16
16
  key: 0,
17
17
  class: "m-dialog__header"
18
- }, oe = { class: "m-dialog__heading" }, se = {
18
+ }, ae = { class: "m-dialog__heading" }, oe = {
19
19
  key: 0,
20
20
  class: "m-dialog__type-icon",
21
21
  "aria-hidden": "true"
22
- }, ce = { key: 0 }, le = {
22
+ }, se = { key: 0 }, ce = {
23
23
  key: 0,
24
24
  class: "m-dialog__actions"
25
- }, ue = ["aria-label", "disabled"], de = ["aria-label", "disabled"], fe = { class: "m-dialog__body" }, F = /* @__PURE__ */ y({
25
+ }, le = ["aria-label", "disabled"], ue = ["aria-label", "disabled"], de = { class: "m-dialog__body" }, I = /* @__PURE__ */ y({
26
26
  inheritAttrs: !1,
27
27
  __name: "Dialog",
28
28
  props: {
@@ -79,7 +79,7 @@ var ie = ["aria-modal", "aria-label"], ae = {
79
79
  type: {},
80
80
  positiveText: {},
81
81
  negativeText: {},
82
- positiveSeverity: {},
82
+ positiveColor: {},
83
83
  onPositiveClick: {},
84
84
  onNegativeClick: {},
85
85
  beforeClose: {},
@@ -98,209 +98,211 @@ var ie = ["aria-modal", "aria-label"], ae = {
98
98
  "unmaximize"
99
99
  ],
100
100
  setup(c, { expose: y, emit: b }) {
101
- let x = c, w = b, E = M(), { rootAttrs: O } = e(E, () => x.pt), F = p(() => {
101
+ let S = c, w = b, E = M(), { rootAttrs: O } = e(E, () => S.pt), I = p(() => {
102
102
  let e = O.value.style;
103
103
  if (e) return typeof e == "string" ? e.match(/(?:^|;)\s*width\s*:\s*([^;]+)/i)?.[1]?.trim() : typeof e.width == "string" ? e.width : void 0;
104
- }), I = p(() => {
104
+ }), L = p(() => {
105
105
  let e = { ...O.value }, t = e.style;
106
- if (!t || !F.value) return e;
106
+ if (!t || !I.value) return e;
107
107
  if (typeof t == "string") {
108
108
  let n = t.replace(/(?:^|;)\s*width\s*:\s*[^;]+/i, "").replace(/^;|;$/g, "").trim();
109
109
  return n ? e.style = n : delete e.style, e;
110
110
  }
111
111
  let { width: n, ...r } = t;
112
112
  return Object.keys(r).length ? e.style = r : delete e.style, e;
113
- }), L = N(), R = l(), z = u(), B = D(null), V = D(!1), H = D(s()), U = D(null), { transitionName: pe, transitionCss: me } = n({
113
+ }), R = N(), z = l(), B = u(), V = D(null), H = D(!1), U = D(s()), W = D(null), { transitionName: fe, transitionCss: pe } = n({
114
114
  role: "dialog",
115
- local: () => x.transition,
115
+ local: () => S.transition,
116
116
  componentName: "Dialog",
117
117
  fallback: "zoom"
118
- }), W = p(() => x.header ?? x.title), G = p(() => t(x, R.value.appendTo)), K = p(() => {
119
- let e = x.type;
120
- return e === "warning" || e === "warn" ? "warn" : e;
121
- }), q = p(() => {
122
- switch (K.value) {
118
+ }), G = p(() => S.header ?? S.title), K = p(() => t(S, z.value.appendTo)), q = p(() => {
119
+ switch (S.type) {
123
120
  case "success": return "check-circle";
124
- case "warn": return "warning";
125
- case "error": return "x-circle";
121
+ case "warning": return "warning";
122
+ case "danger": return "x-circle";
126
123
  case "info": return "info";
127
124
  default: return;
128
125
  }
129
- }), J = p(() => !L.footer && !!(x.positiveText || x.negativeText)), he = p(() => !!(L.footer || J.value)), Y = p(() => U.value != null), ge = p(() => x.ariaLabel ?? W.value), _e = p(() => ({
130
- "--m-dialog-origin-x": `${H.value.x}px`,
131
- "--m-dialog-origin-y": `${H.value.y}px`
132
- })), ve = p(() => x.centered === !0 ? "center" : x.centered === !1 ? "top" : x.position), ye = p(() => [`m-dialog-backdrop--${ve.value}`, {
133
- "m-dialog-backdrop--modal": x.modal,
134
- "m-dialog-backdrop--maximized": V.value
135
- }]), X = p(() => {
136
- if (V.value) return;
137
- let e = x.width ?? F.value;
126
+ }), J = p(() => !R.footer && !!(S.positiveText || S.negativeText)), me = p(() => !!(R.footer || J.value)), he = p(() => {
127
+ let e = S.positiveColor;
128
+ return !e || e === "primary" ? { type: "primary" } : e === "danger" ? {
129
+ type: "primary",
130
+ danger: !0
131
+ } : {
132
+ color: e,
133
+ variant: "solid"
134
+ };
135
+ }), Y = p(() => W.value != null), ge = p(() => S.ariaLabel ?? G.value), X = p(() => ({
136
+ "--m-dialog-origin-x": `${U.value.x}px`,
137
+ "--m-dialog-origin-y": `${U.value.y}px`
138
+ })), _e = p(() => S.centered === !0 ? "center" : S.centered === !1 ? "top" : S.position), ve = p(() => [`m-dialog-backdrop--${_e.value}`, {
139
+ "m-dialog-backdrop--modal": S.modal,
140
+ "m-dialog-backdrop--maximized": H.value
141
+ }]), ye = p(() => {
142
+ if (H.value) return;
143
+ let e = S.width ?? I.value;
138
144
  return e ? { width: e } : void 0;
139
- }), be = p(() => x.maskClosable === void 0 ? x.dismissableMask === void 0 ? x.closeOnOutsideClick === void 0 || x.closeOnOutsideClick : x.dismissableMask : x.maskClosable);
145
+ }), be = p(() => S.maskClosable === void 0 ? S.dismissableMask === void 0 ? S.closeOnOutsideClick === void 0 || S.closeOnOutsideClick : S.dismissableMask : S.maskClosable);
140
146
  function Z() {
141
- V.value = !1, U.value = null, w("update:modelValue", !1), w("close");
147
+ H.value = !1, W.value = null, w("update:modelValue", !1), w("close");
142
148
  }
143
149
  async function Q() {
144
- if (!U.value) {
145
- if (!x.beforeClose) {
150
+ if (!W.value) {
151
+ if (!S.beforeClose) {
146
152
  Z();
147
153
  return;
148
154
  }
149
- U.value = "close";
155
+ W.value = "close";
150
156
  try {
151
- if (!await o(x.beforeClose)) return;
157
+ if (!await o(S.beforeClose)) return;
152
158
  Z();
153
159
  } finally {
154
- U.value === "close" && (U.value = null);
160
+ W.value === "close" && (W.value = null);
155
161
  }
156
162
  }
157
163
  }
158
164
  async function xe(e) {
159
- if (!U.value) {
160
- U.value = "positive";
165
+ if (!W.value) {
166
+ W.value = "positive";
161
167
  try {
162
- if (!await o(x.onPositiveClick, e)) return;
168
+ if (!await o(S.onPositiveClick, e)) return;
163
169
  Z();
164
170
  } finally {
165
- U.value === "positive" && (U.value = null);
171
+ W.value === "positive" && (W.value = null);
166
172
  }
167
173
  }
168
174
  }
169
175
  async function Se(e) {
170
- if (!U.value) {
171
- U.value = "negative";
176
+ if (!W.value) {
177
+ W.value = "negative";
172
178
  try {
173
- if (!await o(x.onNegativeClick, e)) return;
179
+ if (!await o(S.onNegativeClick, e)) return;
174
180
  Z();
175
181
  } finally {
176
- U.value === "negative" && (U.value = null);
182
+ W.value === "negative" && (W.value = null);
177
183
  }
178
184
  }
179
185
  }
180
186
  function $() {
181
- V.value = !V.value, V.value ? w("maximize") : w("unmaximize");
187
+ H.value = !H.value, H.value ? w("maximize") : w("unmaximize");
182
188
  }
183
189
  function Ce() {
184
190
  be.value && Q();
185
191
  }
186
- return P(() => x.modelValue, (e) => {
187
- e && (H.value = s());
192
+ return P(() => S.modelValue, (e) => {
193
+ e && (U.value = s());
188
194
  }), a({
189
- open: A(x, "modelValue"),
190
- container: B,
191
- closeOnEsc: A(x, "closeOnEsc"),
192
- blockScroll: () => x.blockScroll && x.modal,
195
+ open: A(S, "modelValue"),
196
+ container: V,
197
+ closeOnEsc: A(S, "closeOnEsc"),
198
+ blockScroll: () => S.blockScroll && S.modal,
193
199
  onEscape: () => {
194
200
  Q();
195
201
  },
196
202
  onOpen: () => w("show"),
197
203
  onClose: () => {
198
- V.value = !1, w("hide");
204
+ H.value = !1, w("hide");
199
205
  }
200
206
  }), y({
201
207
  close: Q,
202
208
  maximize: () => {
203
- V.value || $();
209
+ H.value || $();
204
210
  },
205
211
  unmaximize: () => {
206
- V.value && $();
212
+ H.value && $();
207
213
  }
208
214
  }), (e, t) => (T(), m(d, {
209
- to: G.value.to,
210
- disabled: G.value.disabled
215
+ to: K.value.to,
216
+ disabled: K.value.disabled
211
217
  }, [v(f, {
212
- name: j(pe),
213
- css: j(me)
218
+ name: j(fe),
219
+ css: j(pe)
214
220
  }, {
215
- default: ne(() => [c.modelValue ? (T(), g("div", ee({ key: 0 }, I.value, {
216
- class: ["m-dialog-backdrop", ye.value],
217
- style: _e.value
221
+ default: F(() => [c.modelValue ? (T(), g("div", x({ key: 0 }, L.value, {
222
+ class: ["m-dialog-backdrop", ve.value],
223
+ style: X.value
218
224
  }), [_("div", {
219
225
  class: "m-dialog-zoom",
220
- onClick: re(Ce, ["self"])
226
+ onClick: ne(Ce, ["self"])
221
227
  }, [_("section", {
222
228
  ref_key: "dialogElement",
223
- ref: B,
224
- class: S(["m-dialog", {
225
- "m-dialog--maximized": V.value,
226
- [`m-dialog--${K.value}`]: K.value
229
+ ref: V,
230
+ class: C(["m-dialog", {
231
+ "m-dialog--maximized": H.value,
232
+ [`m-dialog--${S.type}`]: S.type
227
233
  }]),
228
- style: C(X.value),
234
+ style: ee(ye.value),
229
235
  role: "dialog",
230
236
  "aria-modal": c.modal || void 0,
231
237
  "aria-label": ge.value,
232
238
  tabindex: "-1"
233
239
  }, [
234
- e.$slots.header || W.value || q.value || c.closable || c.maximizable ? (T(), g("header", ae, [_("div", oe, [q.value ? (T(), g("span", se, [v(r, {
240
+ e.$slots.header || G.value || q.value || c.closable || c.maximizable ? (T(), g("header", ie, [_("div", ae, [q.value ? (T(), g("span", oe, [v(r, {
235
241
  name: q.value,
236
242
  size: "sm"
237
- }, null, 8, ["name"])])) : h("", !0), k(e.$slots, "header", {}, () => [W.value ? (T(), g("h2", ce, te(W.value), 1)) : h("", !0)])]), c.maximizable || c.closable ? (T(), g("div", le, [c.maximizable ? (T(), g("button", {
243
+ }, null, 8, ["name"])])) : h("", !0), k(e.$slots, "header", {}, () => [G.value ? (T(), g("h2", se, te(G.value), 1)) : h("", !0)])]), c.maximizable || c.closable ? (T(), g("div", ce, [c.maximizable ? (T(), g("button", {
238
244
  key: 0,
239
245
  type: "button",
240
246
  class: "m-dialog__action",
241
- "aria-label": V.value ? j(z).restore : j(z).maximize,
247
+ "aria-label": H.value ? j(B).restore : j(B).maximize,
242
248
  disabled: Y.value,
243
249
  onClick: $
244
250
  }, [v(r, {
245
- name: V.value ? "restore" : "maximize",
251
+ name: H.value ? "restore" : "maximize",
246
252
  size: "sm"
247
- }, null, 8, ["name"])], 8, ue)) : h("", !0), c.closable ? (T(), g("button", {
253
+ }, null, 8, ["name"])], 8, le)) : h("", !0), c.closable ? (T(), g("button", {
248
254
  key: 1,
249
255
  type: "button",
250
256
  class: "m-dialog__action",
251
- "aria-label": j(z).close,
257
+ "aria-label": j(B).close,
252
258
  disabled: Y.value,
253
259
  onClick: Q
254
260
  }, [v(r, {
255
261
  name: "close",
256
262
  size: "sm"
257
- })], 8, de)) : h("", !0)])) : h("", !0)])) : h("", !0),
258
- _("div", fe, [k(e.$slots, "default")]),
259
- he.value ? (T(), g("footer", {
263
+ })], 8, ue)) : h("", !0)])) : h("", !0)])) : h("", !0),
264
+ _("div", de, [k(e.$slots, "default")]),
265
+ me.value ? (T(), g("footer", {
260
266
  key: 1,
261
- class: S(["m-dialog__footer", { "m-dialog__footer--preset": J.value }])
267
+ class: C(["m-dialog__footer", { "m-dialog__footer--preset": J.value }])
262
268
  }, [k(e.$slots, "footer", {}, () => [c.negativeText ? (T(), m(i, {
263
269
  key: 0,
264
270
  label: c.negativeText,
265
- severity: "secondary",
266
271
  disabled: Y.value,
267
- loading: U.value === "negative",
272
+ loading: W.value === "negative",
268
273
  onClick: Se
269
274
  }, null, 8, [
270
275
  "label",
271
276
  "disabled",
272
277
  "loading"
273
- ])) : h("", !0), c.positiveText ? (T(), m(i, {
274
- key: 1,
278
+ ])) : h("", !0), c.positiveText ? (T(), m(i, x({ key: 1 }, he.value, {
275
279
  label: c.positiveText,
276
- severity: c.positiveSeverity,
277
- disabled: Y.value && U.value !== "positive",
278
- loading: U.value === "positive",
280
+ disabled: Y.value && W.value !== "positive",
281
+ loading: W.value === "positive",
279
282
  onClick: xe
280
- }, null, 8, [
283
+ }), null, 16, [
281
284
  "label",
282
- "severity",
283
285
  "disabled",
284
286
  "loading"
285
287
  ])) : h("", !0)])], 2)) : h("", !0)
286
- ], 14, ie)])], 16)) : h("", !0)]),
288
+ ], 14, re)])], 16)) : h("", !0)]),
287
289
  _: 3
288
290
  }, 8, ["name", "css"])], 8, ["to", "disabled"]));
289
291
  }
290
- }), I = /* @__PURE__ */ new Set();
291
- function L(e) {
292
+ }), L = /* @__PURE__ */ new Set();
293
+ function R(e) {
292
294
  return typeof e == "string" ? { content: e } : { ...e };
293
295
  }
294
- function R(e) {
296
+ function z(e) {
295
297
  if (typeof document > "u") return {
296
298
  destroy: () => {},
297
299
  update: () => {}
298
300
  };
299
301
  let t = document.createElement("div");
300
302
  document.body.appendChild(t);
301
- let n = E(L(e)), r = D(!0), a = D(!1), o = !1;
303
+ let n = E(R(e)), r = D(!0), a = D(!1), o = !1;
302
304
  function s() {
303
- o || (o = !0, I.delete(h), t.remove(), x(() => O(null, t)));
305
+ o || (o = !0, L.delete(h), t.remove(), S(() => O(null, t)));
304
306
  }
305
307
  function l() {
306
308
  r.value = !1;
@@ -327,7 +329,7 @@ function R(e) {
327
329
  name: "MModalHost",
328
330
  setup() {
329
331
  let e = u();
330
- return () => b(F, {
332
+ return () => b(I, {
331
333
  modelValue: r.value,
332
334
  "onUpdate:modelValue": (e) => {
333
335
  r.value = e;
@@ -343,15 +345,23 @@ function R(e) {
343
345
  onHide: p
344
346
  }, {
345
347
  default: () => n.content,
346
- footer: () => [n.showCancel ? b(i, {
347
- severity: "secondary",
348
- disabled: a.value,
349
- onClick: f
350
- }, { default: () => n.cancelText ?? e.value.reject ?? "Cancel" }) : null, b(i, {
351
- severity: n.okSeverity ?? "primary",
352
- loading: a.value,
353
- onClick: () => void d()
354
- }, { default: () => n.okText ?? e.value.confirm ?? "OK" })]
348
+ footer: () => {
349
+ let t = n.okColor ?? "primary", r = t === "primary" ? { type: "primary" } : t === "danger" ? {
350
+ type: "primary",
351
+ danger: !0
352
+ } : {
353
+ color: t,
354
+ variant: "solid"
355
+ };
356
+ return [n.showCancel ? b(i, {
357
+ disabled: a.value,
358
+ onClick: f
359
+ }, { default: () => n.cancelText ?? e.value.reject ?? "Cancel" }) : null, b(i, {
360
+ ...r,
361
+ loading: a.value,
362
+ onClick: () => void d()
363
+ }, { default: () => n.okText ?? e.value.confirm ?? "OK" })];
364
+ }
355
365
  });
356
366
  }
357
367
  }), h = {
@@ -359,16 +369,16 @@ function R(e) {
359
369
  r.value = !1, s();
360
370
  },
361
371
  update: (e) => {
362
- Object.assign(n, L(e));
372
+ Object.assign(n, R(e));
363
373
  }
364
374
  }, g = v(m), _ = c();
365
- return _ && (g.appContext = _), O(g, t), I.add(h), h;
375
+ return _ && (g.appContext = _), O(g, t), L.add(h), h;
366
376
  }
367
- function z() {
377
+ function B() {
368
378
  function e(e) {
369
- return (t) => R({
379
+ return (t) => z({
370
380
  ...e,
371
- ...L(t)
381
+ ...R(t)
372
382
  });
373
383
  }
374
384
  return {
@@ -385,20 +395,20 @@ function z() {
385
395
  showCancel: !1
386
396
  }),
387
397
  error: e({
388
- type: "error",
398
+ type: "danger",
389
399
  showCancel: !1
390
400
  }),
391
401
  confirm: e({ showCancel: !0 }),
392
402
  destroyAll: () => {
393
- for (let e of [...I]) e.destroy();
403
+ for (let e of [...L]) e.destroy();
394
404
  }
395
405
  };
396
406
  }
397
- var B = z();
398
- function V() {
407
+ var V = B();
408
+ function H() {
399
409
  w(() => {
400
- for (let e of [...I]) e.destroy();
410
+ for (let e of [...L]) e.destroy();
401
411
  });
402
412
  }
403
413
  //#endregion
404
- export { F as MDialog, B as modal, z as useModal, V as useModalCleanup };
414
+ export { I as MDialog, V as modal, B as useModal, H as useModalCleanup };