@mudakit/ui 0.4.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/MudaButton-B9EAJW32.js +57 -0
  3. package/dist/{MudaColorPicker-CnB1MYB3.js → MudaColorPicker-D9BhgHf9.js} +22 -22
  4. package/dist/MudaDialog-dQSFVdgu.js +55 -0
  5. package/dist/{MudaFormCombobox-DqH-EyMV.js → MudaFormCombobox-CK2De6Rv.js} +36 -36
  6. package/dist/MudaSidebar-DvKS4VtE.js +141 -0
  7. package/dist/components/MudaButton/MudaButton.types.d.ts +2 -0
  8. package/dist/components/MudaButton/MudaButton.vue.d.ts +4 -3
  9. package/dist/components/MudaButton/index.d.ts +1 -0
  10. package/dist/components/MudaButton/index.js +1 -1
  11. package/dist/components/MudaColorPicker/index.js +1 -1
  12. package/dist/components/MudaDialog/index.js +1 -1
  13. package/dist/components/MudaFormCombobox/index.js +1 -1
  14. package/dist/components/MudaSidebar/MudaSidebar.types.d.ts +16 -0
  15. package/dist/components/MudaSidebar/MudaSidebar.vue.d.ts +67 -0
  16. package/dist/components/MudaSidebar/MudaSidebarDrawer.vue.d.ts +29 -0
  17. package/dist/components/MudaSidebar/index.d.ts +2 -0
  18. package/dist/components/MudaSidebar/index.js +2 -0
  19. package/dist/components/MudaSidebar/useMudaSidebarContext.d.ts +13 -0
  20. package/dist/composables/index.d.ts +6 -0
  21. package/dist/composables/index.js +6 -0
  22. package/dist/composables/useMudaColors.d.ts +70 -0
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.js +33 -43
  25. package/dist/style.css +1 -1
  26. package/dist/useBodyScrollLock-4K-3lAFL.js +12 -0
  27. package/dist/useResizeObserver-B0uwslYk.js +47 -0
  28. package/package.json +6 -1
  29. package/dist/MudaButton-CWY0U8WO.js +0 -43
  30. package/dist/MudaDialog-D0VZdP3Y.js +0 -61
@@ -1,61 +0,0 @@
1
- import { t as e } from "./keymap-BzfMgdJH.js";
2
- import { t } from "./useZIndex-DWnsohLZ.js";
3
- import { t as n } from "./useKeyDown-B1jmp4nA.js";
4
- import { t as r } from "./MudaFocusTrap-CGlvV_MC.js";
5
- import { Teleport as i, Transition as a, createBlock as o, createCommentVNode as s, createElementVNode as c, createVNode as l, defineComponent as u, mergeProps as d, normalizeStyle as f, onUnmounted as p, openBlock as m, renderSlot as h, unref as g, useModel as _, useTemplateRef as v, watch as y, withCtx as b, withModifiers as x } from "vue";
6
- //#region src/composables/useBodyScrollLock.ts
7
- var S = 0, C = "", w = (e) => {
8
- let t = !1, n = () => {
9
- t || typeof document > "u" || (S === 0 && (C = document.body.style.overflow, document.body.style.overflow = "hidden"), S += 1, t = !0);
10
- }, r = () => {
11
- !t || typeof document > "u" || (--S, t = !1, S === 0 && (document.body.style.overflow = C));
12
- };
13
- y(e, (e) => e ? n() : r(), { immediate: !0 }), p(r);
14
- }, T = { class: "muda:fixed muda:inset-0 muda:w-screen muda:overflow-y-auto muda:py-6" }, E = { class: "muda:flex muda:min-h-full muda:items-center muda:justify-center" }, D = /* @__PURE__ */ u({
15
- inheritAttrs: !1,
16
- __name: "MudaDialog",
17
- props: {
18
- modelValue: {
19
- type: Boolean,
20
- required: !0
21
- },
22
- modelModifiers: {}
23
- },
24
- emits: ["update:modelValue"],
25
- setup(u) {
26
- let p = _(u, "modelValue"), y = v("dialog"), S = t();
27
- w(p), n((t) => {
28
- if (p.value) switch (t.key) {
29
- case e.Escape: p.value = !1, t.preventDefault();
30
- }
31
- });
32
- let C = (e) => {
33
- y.value?.contains(e.target) || (p.value = !1);
34
- };
35
- return (e, t) => (m(), o(i, { to: "body" }, [l(a, {
36
- "enter-active-class": "muda:transition-opacity muda:ease-linear muda:duration-100",
37
- "leave-active-class": "muda:transition-opacity muda:ease-linear muda:duration-100",
38
- "enter-from-class": "muda:opacity-0",
39
- "leave-to-class": "muda:opacity-0"
40
- }, {
41
- default: b(() => [p.value ? (m(), o(g(r), {
42
- key: 0,
43
- role: "dialog",
44
- class: "muda:fixed muda:inset-0 muda:bg-gray-500/30 muda:backdrop-blur-xs muda:transition-opacity",
45
- style: f({ zIndex: g(S) }),
46
- onClickCapture: C,
47
- onWheel: t[0] ||= x(() => {}, ["stop"])
48
- }, {
49
- default: b(() => [c("div", T, [c("div", E, [c("div", d(e.$attrs, {
50
- class: "muda:rounded-lg muda:bg-background muda:p-4 muda:focus:outline-hidden",
51
- tabindex: "0",
52
- ref: "dialog"
53
- }), [h(e.$slots, "default")], 16)])])]),
54
- _: 3
55
- }, 8, ["style"])) : s("", !0)]),
56
- _: 3
57
- })]));
58
- }
59
- });
60
- //#endregion
61
- export { w as n, D as t };