nuxt-hs-ui 2.11.0 → 2.11.2

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.
package/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.15.0"
6
6
  },
7
- "version": "2.11.0",
7
+ "version": "2.11.2",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -277,9 +277,9 @@ const lenLabelClass = computed(() => {
277
277
  return [
278
278
  twMerge(
279
279
  "text-white bg-[#2fa412]",
280
- props.maxLen - state.value.length < 5 ? "bg-[#fdc90d]" : "",
281
- props.maxLen - state.value.length < 3 ? "bg-[#fd750d]" : "",
282
- props.maxLen - state.value.length < 1 ? "bg-[#fa541d]" : ""
280
+ props.maxLen - state.value.length < 9 ? "bg-[#fdc90d]" : "",
281
+ props.maxLen - state.value.length < 6 ? "bg-[#fd750d]" : "",
282
+ props.maxLen - state.value.length < 3 ? "bg-[#fa541d]" : ""
283
283
  ),
284
284
  ];
285
285
  });
@@ -319,9 +319,9 @@ const rowLabelClass = computed(() => {
319
319
  return [
320
320
  twMerge(
321
321
  "text-white bg-[#2fa412]",
322
- last < 5 ? "bg-[#fdc90d]" : "",
323
- last < 3 ? "bg-[#fd750d]" : "",
324
- last < 1 ? "bg-[#fa541d]" : ""
322
+ last < 9 ? "bg-[#fdc90d]" : "",
323
+ last < 6 ? "bg-[#fd750d]" : "",
324
+ last < 3 ? "bg-[#fa541d]" : ""
325
325
  ),
326
326
  ];
327
327
  });
@@ -9,7 +9,7 @@
9
9
  // [ tailwind ]
10
10
  import { twMerge } from "tailwind-merge";
11
11
  // [ NUXT ]
12
- import { useId, computed, watch, onUnmounted } from "#imports";
12
+ import { useId, computed, watch, onUnmounted, ref } from "#imports";
13
13
  // [ utils ]
14
14
  import { type ClassType, ClassTypeToString } from "../../utils/class-style";
15
15
  // [ composables ]
@@ -111,6 +111,7 @@ const classInner = computed(() => {
111
111
  "transition-opacity",
112
112
  props.closeable ? "cursor-pointer" : "",
113
113
  props.show ? "pointer-events-all" : "pointer-events-none",
114
+ // "bg-red-600",
114
115
  ClassTypeToString(props.classInner)
115
116
  );
116
117
  });
@@ -120,6 +121,14 @@ const closeOnBackEvent = () => {
120
121
  emit("close");
121
122
  }
122
123
  };
124
+ const down = ref(false);
125
+ const downStop = () => {
126
+ // console.log("downStop", down.value);
127
+ if (down.value) {
128
+ down.value = false;
129
+ closeOnBackEvent();
130
+ }
131
+ };
123
132
  </script>
124
133
 
125
134
  <template>
@@ -133,10 +142,17 @@ const closeOnBackEvent = () => {
133
142
  :class="classStyle"
134
143
  :style="{ zIndex: zOrder, opacity: props.show ? 1 : 0 }"
135
144
  >
136
- <!-- :aria-hidden="!props.show" -->
137
- <div :class="classInner" @click="closeOnBackEvent">
145
+ <div
146
+ :class="classInner"
147
+ @mousedown.self="down = true"
148
+ @mouseup.self="downStop"
149
+ @mousedown.stop
150
+ @mouseup.stop
151
+ @click.stop=""
152
+ >
138
153
  <slot />
139
154
  </div>
155
+ <div class="fixed bottom-0 right-0 bg-white z-50">{{ down }}</div>
140
156
  </div>
141
157
  </Teleport>
142
158
  </ClientOnly>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-hs-ui",
3
- "version": "2.11.0",
3
+ "version": "2.11.2",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "https://github.com/hare-systems-ryo/nuxt-hs-ui",
6
6
  "license": "MIT",