@septkit/ui 0.0.3 → 0.0.4

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.
@@ -1,4 +1,4 @@
1
- import { defineComponent as h, useTemplateRef as k, ref as _, computed as t, createElementBlock as l, openBlock as r, createElementVNode as z, withDirectives as C, normalizeClass as O, withModifiers as S, renderSlot as a, unref as B } from "vue";
1
+ import { defineComponent as h, useTemplateRef as k, ref as _, computed as t, createElementBlock as l, openBlock as a, createElementVNode as z, withDirectives as C, normalizeClass as O, withModifiers as S, renderSlot as r, unref as B } from "vue";
2
2
  import { VOnClickOutside as D } from "../external/.pnpm/@vueuse_components@13.5.0_vue@3.5.17_typescript@5.8.3_/node_modules/@vueuse/components/index.js";
3
3
  const x = ["open"], q = {
4
4
  "data-testid": "dropdown-menu",
@@ -16,7 +16,7 @@ const x = ["open"], q = {
16
16
  },
17
17
  emits: ["open", "close"],
18
18
  setup(c, { expose: u, emit: p }) {
19
- const n = c, d = p, i = k("details-ref"), e = _(!1), b = t(
19
+ const n = c, i = p, d = k("details-ref"), e = _(!1), b = t(
20
20
  () => ({
21
21
  neutral: "btn-neutral",
22
22
  primary: "btn-primary",
@@ -46,7 +46,7 @@ const x = ["open"], q = {
46
46
  xl: "btn-xl",
47
47
  undefined: ""
48
48
  })[n.size ?? "undefined"]
49
- ), g = t(
49
+ ), v = t(
50
50
  () => ({
51
51
  wide: "btn-wide",
52
52
  block: "btn-block",
@@ -55,17 +55,17 @@ const x = ["open"], q = {
55
55
  undefined: ""
56
56
  })[n.modifier ?? "undefined"]
57
57
  );
58
- function v() {
59
- i.value && (i.value.open = e.value);
58
+ function w() {
59
+ d.value && (d.value.open = e.value);
60
60
  }
61
61
  function s() {
62
- e.value = !1, d("close");
62
+ e.value = !1, i("close");
63
63
  }
64
- function w() {
65
- console.debug({ level: "debug", msg: "opening dropdown" }), e.value = !0, d("open");
64
+ function g() {
65
+ console.debug({ level: "debug", msg: "opening dropdown" }), e.value = !0, i("open");
66
66
  }
67
67
  function y() {
68
- console.debug({ level: "debug", msg: "toggle dropdown" }), e.value ? s() : w();
68
+ e.value ? s() : g();
69
69
  }
70
70
  return u({
71
71
  /** Method to close the dropdown */
@@ -73,12 +73,12 @@ const x = ["open"], q = {
73
73
  /** Reactive boolean of the dropdown state */
74
74
  isOpen: e,
75
75
  id: n.id
76
- }), (o, E) => (r(), l("details", {
76
+ }), (o, E) => (a(), l("details", {
77
77
  "data-testid": "dropdown-wrapper",
78
78
  ref: "details-ref",
79
79
  class: "dropdown",
80
80
  open: e.value,
81
- onToggle: v
81
+ onToggle: w
82
82
  }, [
83
83
  z("summary", {
84
84
  "data-testid": "dropdown-trigger",
@@ -87,14 +87,14 @@ const x = ["open"], q = {
87
87
  b.value,
88
88
  f.value,
89
89
  m.value,
90
- g.value,
90
+ v.value,
91
91
  { "btn-active": o.active, "btn-disabled": o.disabled }
92
92
  ]])
93
93
  }, [
94
- a(o.$slots, "label")
94
+ r(o.$slots, "label")
95
95
  ], 2),
96
- C((r(), l("ul", q, [
97
- a(o.$slots, "items")
96
+ C((a(), l("ul", q, [
97
+ r(o.$slots, "items")
98
98
  ])), [
99
99
  [
100
100
  B(D),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@septkit/ui",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "type": "module",
5
5
  "source": "lib/index.ts",
6
6
  "scripts": {