@sit-onyx/headless 0.4.0-dev-20251110091137 → 0.4.0-dev-20251111093451
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/composables/comboBox/SelectOnlyCombobox.d.vue.ts +306 -305
- package/dist/composables/comboBox/TestCombobox.d.vue.ts +306 -305
- package/dist/composables/comboBox/createComboBox.d.ts +316 -315
- package/dist/composables/listbox/createListbox.d.ts +1 -0
- package/dist/index.js +9 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -434,6 +434,10 @@ const createListbox = createBuilder(
|
|
|
434
434
|
}
|
|
435
435
|
return descendantKeyIdMap.get(value);
|
|
436
436
|
};
|
|
437
|
+
const getOptionValueById = (id) => {
|
|
438
|
+
const entries = Array.from(descendantKeyIdMap.entries());
|
|
439
|
+
return entries.find(([_value, key]) => key === id)?.[0];
|
|
440
|
+
};
|
|
437
441
|
const isFocused = ref(false);
|
|
438
442
|
watchEffect(async () => {
|
|
439
443
|
if (!isExpanded.value || options.activeOption.value == void 0 || !isFocused.value && !options.controlled) {
|
|
@@ -527,7 +531,8 @@ const createListbox = createBuilder(
|
|
|
527
531
|
isFocused
|
|
528
532
|
},
|
|
529
533
|
internals: {
|
|
530
|
-
getOptionId
|
|
534
|
+
getOptionId,
|
|
535
|
+
getOptionValueById
|
|
531
536
|
}
|
|
532
537
|
};
|
|
533
538
|
}
|
|
@@ -646,7 +651,7 @@ const createComboBox = createBuilder(
|
|
|
646
651
|
});
|
|
647
652
|
const {
|
|
648
653
|
elements: { option, group, listbox },
|
|
649
|
-
internals: { getOptionId }
|
|
654
|
+
internals: { getOptionId, getOptionValueById }
|
|
650
655
|
} = createListbox({
|
|
651
656
|
label: listLabel,
|
|
652
657
|
description: listDescription,
|
|
@@ -697,7 +702,8 @@ const createComboBox = createBuilder(
|
|
|
697
702
|
tabindex: "-1",
|
|
698
703
|
onClick: () => onToggle?.()
|
|
699
704
|
}))
|
|
700
|
-
}
|
|
705
|
+
},
|
|
706
|
+
internals: { getOptionId, getOptionValueById }
|
|
701
707
|
};
|
|
702
708
|
}
|
|
703
709
|
);
|
package/package.json
CHANGED