vueless 0.0.342 → 0.0.343

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vueless",
3
- "version": "0.0.342",
3
+ "version": "0.0.343",
4
4
  "license": "MIT",
5
5
  "description": "Vue Styleless Component Framework.",
6
6
  "homepage": "https://vueless.com",
@@ -1,7 +1,7 @@
1
1
  export default /*tw*/ {
2
2
  wrapper: "relative inline-block",
3
3
  dropdownBadge: "{UBadge}",
4
- dropdownBadgeActive: "group",
4
+ dropdownBadgeActive: "group ring-dynamic ring-offset-dynamic ring-brand-700/15 border-brand-500 hover:border-brand-500",
5
5
  dropdownIcon: "{UIcon} transition duration-300 group-[]:rotate-180",
6
6
  dropdownList: {
7
7
  component: "{UDropdownList}",
@@ -52,13 +52,13 @@
52
52
 
53
53
  <UDropdownList
54
54
  v-if="isShownOptions"
55
+ ref="dropdownListRef"
55
56
  v-model="selectedItem"
56
57
  :size="size"
57
58
  :options="options"
58
59
  :value-key="valueKey"
59
60
  :label-key="labelKey"
60
61
  v-bind="dropdownListAttrs"
61
- tabindex="-1"
62
62
  :data-test="`${dataTest}-list`"
63
63
  @click="onClickList"
64
64
  />
@@ -66,7 +66,7 @@
66
66
  </template>
67
67
 
68
68
  <script setup>
69
- import { computed, provide, ref, watch, useId } from "vue";
69
+ import { nextTick, computed, provide, ref, watch, useId } from "vue";
70
70
 
71
71
  import UIcon from "../ui.image-icon/UIcon.vue";
72
72
  import UButton from "../ui.button/UButton.vue";
@@ -237,6 +237,7 @@ provide("hideDropdownOptions", hideOptions);
237
237
 
238
238
  const isShownOptions = ref(false);
239
239
  const selectedItem = ref("");
240
+ const dropdownListRef = ref(null);
240
241
 
241
242
  const elementId = props.id || useId();
242
243
 
@@ -266,6 +267,10 @@ watch(selectedItem, () => {
266
267
 
267
268
  function onClickButton() {
268
269
  isShownOptions.value = !isShownOptions.value;
270
+
271
+ if (isShownOptions.value) {
272
+ nextTick(() => dropdownListRef.value.wrapperRef.focus());
273
+ }
269
274
  }
270
275
 
271
276
  function hideOptions() {
@@ -1,7 +1,7 @@
1
1
  export default /*tw*/ {
2
2
  wrapper: "relative inline-block",
3
3
  dropdownButton: "{UButton}",
4
- dropdownButtonActive: "group",
4
+ dropdownButtonActive: "group ring-dynamic ring-offset-dynamic ring-brand-700/15 border-brand-500 hover:border-brand-500",
5
5
  dropdownIcon: "{UIcon} transition duration-300 group-[]:rotate-180",
6
6
  dropdownList: {
7
7
  base: "{UDropdownList} w-fit",
@@ -55,6 +55,7 @@
55
55
 
56
56
  <UDropdownList
57
57
  v-if="isShownOptions"
58
+ ref="dropdownListRef"
58
59
  v-model="selectedItem"
59
60
  :size="size"
60
61
  :options="options"
@@ -68,7 +69,7 @@
68
69
  </template>
69
70
 
70
71
  <script setup>
71
- import { computed, provide, ref, watch, useId } from "vue";
72
+ import { nextTick, computed, provide, ref, watch, useId } from "vue";
72
73
 
73
74
  import UIcon from "../ui.image-icon/UIcon.vue";
74
75
  import ULink from "../ui.button-link/ULink.vue";
@@ -230,6 +231,7 @@ provide("hideDropdownOptions", hideOptions);
230
231
 
231
232
  const isShownOptions = ref(false);
232
233
  const selectedItem = ref("");
234
+ const dropdownListRef = ref(null);
233
235
 
234
236
  const elementId = props.id || useId();
235
237
 
@@ -254,6 +256,10 @@ watch(selectedItem, () => {
254
256
 
255
257
  function onClickLink() {
256
258
  isShownOptions.value = !isShownOptions.value;
259
+
260
+ if (isShownOptions.value) {
261
+ nextTick(() => dropdownListRef.value.wrapperRef.focus());
262
+ }
257
263
  }
258
264
 
259
265
  function hideOptions() {
@@ -1,7 +1,7 @@
1
1
  export default /*tw*/ {
2
2
  wrapper: "relative inline-block",
3
3
  dropdownLink: "{ULink}",
4
- dropdownLinkActive: "group",
4
+ dropdownLinkActive: "group ring-dynamic ring-offset-4 ring-brand-700/15",
5
5
  dropdownIcon: "{UIcon} block transition duration-300 group-[]:rotate-180",
6
6
  dropdownList: {
7
7
  base: "{UDropdownList} w-fit",
package/web-types.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "framework": "vue",
3
3
  "name": "vueless",
4
- "version": "0.0.342",
4
+ "version": "0.0.343",
5
5
  "contributions": {
6
6
  "html": {
7
7
  "description-markup": "markdown",