@auronui/vue 1.0.16 → 1.0.17

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 +1 @@
1
- {"version":3,"file":"SelectContent.js","names":[],"sources":["../../../src/components/select/SelectContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n SelectContent,\n SelectViewport,\n SelectPortal,\n injectSelectRootContext,\n} from 'reka-ui'\nimport { motion, AnimatePresence } from 'motion-v'\nimport { ref, watch } from 'vue'\nimport { useSelectInject } from './Select.context'\n\nconst props = withDefaults(defineProps<{\n position?: 'item-aligned' | 'popper'\n sideOffset?: number\n class?: string\n}>(), {\n position: 'popper',\n sideOffset: 8,\n class: undefined,\n})\n\nconst ctx = useSelectInject()\nconst rootContext = injectSelectRootContext()\n\n// Suppress scroll-behavior:smooth for the first frame after open so Reka's\n// programmatic scrollTop jump to the selected item is instant.\nconst justOpened = ref(false)\nwatch(() => rootContext.open.value, (open) => {\n if (open) {\n justOpened.value = true\n setTimeout(() => { justOpened.value = false }, 100)\n }\n})\n</script>\n\n<template>\n <SelectPortal>\n <AnimatePresence>\n <!--\n No force-mount on SelectContent. With force-mount=true, Reka's\n SelectContentImpl (which contains DismissableLayer with\n disableOutsidePointerEvents=true) would mount immediately on page load and\n block all pointer events — including clicks on the trigger button.\n\n Without force-mount, when open=false, Reka teleports slot content into a\n DocumentFragment (after SelectContent's own onMounted). Components inside\n the slot (SelectItem) still get created and their setup() runs, so\n textValue-based registrations fire at setup time.\n\n v-show (not v-if) on the visual wrapper ensures SelectItem components are\n always instantiated when inside the DocumentFragment — their setup() fires\n and populates itemRegistry. The animated chrome is visually hidden via\n v-show when closed; enter/exit animation runs via motion.div bindings.\n -->\n <SelectContent\n :position=\"props.position\"\n :side-offset=\"props.sideOffset\"\n data-slot=\"popover\"\n >\n <motion.div\n v-show=\"rootContext.open.value\"\n :class=\"[ctx.slots.value.popover(), { 'select__popover--opening': justOpened }]\"\n :animate=\"rootContext.open.value ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0.95 }\"\n :transition=\"{ duration: 0.15 }\"\n >\n <SelectViewport data-slot=\"list-box\">\n <slot />\n </SelectViewport>\n </motion.div>\n </SelectContent>\n </AnimatePresence>\n </SelectPortal>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SelectContent.js","names":[],"sources":["../../../src/components/select/SelectContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n SelectContent,\n SelectViewport,\n SelectPortal,\n injectSelectRootContext,\n} from 'reka-ui'\nimport { motion, AnimatePresence } from 'motion-v'\nimport { ref, watch } from 'vue'\nimport { useSelectInject } from './Select.context'\n\nconst props = withDefaults(defineProps<{\n position?: 'item-aligned' | 'popper'\n sideOffset?: number\n class?: string\n}>(), {\n position: 'popper',\n sideOffset: 8,\n class: undefined,\n})\n\nconst ctx = useSelectInject()\nconst rootContext = injectSelectRootContext()\n\n// Suppress scroll-behavior:smooth for the first frame after open so Reka's\n// programmatic scrollTop jump to the selected item is instant.\nconst justOpened = ref(false)\nwatch(() => rootContext.open.value, (open) => {\n if (open) {\n justOpened.value = true\n setTimeout(() => { justOpened.value = false }, 100)\n }\n})\n\nfunction handleKeydown(e: KeyboardEvent) {\n if (e.key === 'Tab') {\n rootContext.onOpenChange(false)\n }\n}\n</script>\n\n<template>\n <SelectPortal>\n <AnimatePresence>\n <!--\n No force-mount on SelectContent. With force-mount=true, Reka's\n SelectContentImpl (which contains DismissableLayer with\n disableOutsidePointerEvents=true) would mount immediately on page load and\n block all pointer events — including clicks on the trigger button.\n\n Without force-mount, when open=false, Reka teleports slot content into a\n DocumentFragment (after SelectContent's own onMounted). Components inside\n the slot (SelectItem) still get created and their setup() runs, so\n textValue-based registrations fire at setup time.\n\n v-show (not v-if) on the visual wrapper ensures SelectItem components are\n always instantiated when inside the DocumentFragment — their setup() fires\n and populates itemRegistry. The animated chrome is visually hidden via\n v-show when closed; enter/exit animation runs via motion.div bindings.\n -->\n <SelectContent\n :position=\"props.position\"\n :side-offset=\"props.sideOffset\"\n data-slot=\"popover\"\n >\n <motion.div\n v-show=\"rootContext.open.value\"\n :class=\"[ctx.slots.value.popover(), { 'select__popover--opening': justOpened }]\"\n :animate=\"rootContext.open.value ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0.95 }\"\n :transition=\"{ duration: 0.15 }\"\n @keydown=\"handleKeydown\"\n >\n <SelectViewport data-slot=\"list-box\">\n <slot />\n </SelectViewport>\n </motion.div>\n </SelectContent>\n </AnimatePresence>\n </SelectPortal>\n</template>\n"],"mappings":""}
@@ -24,6 +24,9 @@ var SelectContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
24
24
  }, 100);
25
25
  }
26
26
  });
27
+ function handleKeydown(e) {
28
+ if (e.key === "Tab") rootContext.onOpenChange(false);
29
+ }
27
30
  return (_ctx, _cache) => {
28
31
  return openBlock(), createBlock(unref(SelectPortal), null, {
29
32
  default: withCtx(() => [createVNode(unref(AnimatePresence_default), null, {
@@ -41,7 +44,8 @@ var SelectContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
41
44
  opacity: 0,
42
45
  scale: .95
43
46
  },
44
- transition: { duration: .15 }
47
+ transition: { duration: .15 },
48
+ onKeydown: handleKeydown
45
49
  }, {
46
50
  default: withCtx(() => [createVNode(unref(SelectViewport), { "data-slot": "list-box" }, {
47
51
  default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
@@ -1 +1 @@
1
- {"version":3,"file":"SelectContent.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/select/SelectContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n SelectContent,\n SelectViewport,\n SelectPortal,\n injectSelectRootContext,\n} from 'reka-ui'\nimport { motion, AnimatePresence } from 'motion-v'\nimport { ref, watch } from 'vue'\nimport { useSelectInject } from './Select.context'\n\nconst props = withDefaults(defineProps<{\n position?: 'item-aligned' | 'popper'\n sideOffset?: number\n class?: string\n}>(), {\n position: 'popper',\n sideOffset: 8,\n class: undefined,\n})\n\nconst ctx = useSelectInject()\nconst rootContext = injectSelectRootContext()\n\n// Suppress scroll-behavior:smooth for the first frame after open so Reka's\n// programmatic scrollTop jump to the selected item is instant.\nconst justOpened = ref(false)\nwatch(() => rootContext.open.value, (open) => {\n if (open) {\n justOpened.value = true\n setTimeout(() => { justOpened.value = false }, 100)\n }\n})\n</script>\n\n<template>\n <SelectPortal>\n <AnimatePresence>\n <!--\n No force-mount on SelectContent. With force-mount=true, Reka's\n SelectContentImpl (which contains DismissableLayer with\n disableOutsidePointerEvents=true) would mount immediately on page load and\n block all pointer events — including clicks on the trigger button.\n\n Without force-mount, when open=false, Reka teleports slot content into a\n DocumentFragment (after SelectContent's own onMounted). Components inside\n the slot (SelectItem) still get created and their setup() runs, so\n textValue-based registrations fire at setup time.\n\n v-show (not v-if) on the visual wrapper ensures SelectItem components are\n always instantiated when inside the DocumentFragment — their setup() fires\n and populates itemRegistry. The animated chrome is visually hidden via\n v-show when closed; enter/exit animation runs via motion.div bindings.\n -->\n <SelectContent\n :position=\"props.position\"\n :side-offset=\"props.sideOffset\"\n data-slot=\"popover\"\n >\n <motion.div\n v-show=\"rootContext.open.value\"\n :class=\"[ctx.slots.value.popover(), { 'select__popover--opening': justOpened }]\"\n :animate=\"rootContext.open.value ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0.95 }\"\n :transition=\"{ duration: 0.15 }\"\n >\n <SelectViewport data-slot=\"list-box\">\n <slot />\n </SelectViewport>\n </motion.div>\n </SelectContent>\n </AnimatePresence>\n </SelectPortal>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAWA,MAAM,QAAQ;EAUd,MAAM,MAAM,iBAAgB;EAC5B,MAAM,cAAc,yBAAwB;EAI5C,MAAM,aAAa,IAAI,MAAK;AAC5B,cAAY,YAAY,KAAK,QAAQ,SAAS;AAC5C,OAAI,MAAM;AACR,eAAW,QAAQ;AACnB,qBAAiB;AAAE,gBAAW,QAAQ;OAAS,IAAG;;IAErD;;uBAIC,YAmCe,MAAA,aAAA,EAAA,MAAA;2BADK,CAjClB,YAiCkB,MAAA,wBAAA,EAAA,MAAA;4BADA,CAfhB,YAegB,MAAA,cAAA,EAAA;MAdb,UAAU,MAAM;MAChB,eAAa,MAAM;MACpB,aAAU;;6BAWG,CAAA,eATb,YASa,MAAA,OAAA,CAAA,KAAA;OAPV,OAAK,eAAA,CAAG,MAAA,IAAG,CAAC,MAAM,MAAM,SAAO,EAAA,EAAA,4BAAkC,WAAA,OAAU,CAAA,CAAA;OAC3E,SAAS,MAAA,YAAW,CAAC,KAAK,QAAK;QAAA,SAAA;QAAA,OAAA;QAAA,GAAA;QAAA,SAAA;QAAA,OAAA;QAAA;OAC/B,YAAY,EAAA,UAAA,KAAkB;;8BAId,CAFjB,YAEiB,MAAA,eAAA,EAAA,EAFD,aAAU,YAAU,EAAA;+BAC1B,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA;;;;4CANF,MAAA,YAAW,CAAC,KAAK,MAAK,CAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"SelectContent.vue_vue_type_script_setup_true_lang.js","names":[],"sources":["../../../src/components/select/SelectContent.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n SelectContent,\n SelectViewport,\n SelectPortal,\n injectSelectRootContext,\n} from 'reka-ui'\nimport { motion, AnimatePresence } from 'motion-v'\nimport { ref, watch } from 'vue'\nimport { useSelectInject } from './Select.context'\n\nconst props = withDefaults(defineProps<{\n position?: 'item-aligned' | 'popper'\n sideOffset?: number\n class?: string\n}>(), {\n position: 'popper',\n sideOffset: 8,\n class: undefined,\n})\n\nconst ctx = useSelectInject()\nconst rootContext = injectSelectRootContext()\n\n// Suppress scroll-behavior:smooth for the first frame after open so Reka's\n// programmatic scrollTop jump to the selected item is instant.\nconst justOpened = ref(false)\nwatch(() => rootContext.open.value, (open) => {\n if (open) {\n justOpened.value = true\n setTimeout(() => { justOpened.value = false }, 100)\n }\n})\n\nfunction handleKeydown(e: KeyboardEvent) {\n if (e.key === 'Tab') {\n rootContext.onOpenChange(false)\n }\n}\n</script>\n\n<template>\n <SelectPortal>\n <AnimatePresence>\n <!--\n No force-mount on SelectContent. With force-mount=true, Reka's\n SelectContentImpl (which contains DismissableLayer with\n disableOutsidePointerEvents=true) would mount immediately on page load and\n block all pointer events — including clicks on the trigger button.\n\n Without force-mount, when open=false, Reka teleports slot content into a\n DocumentFragment (after SelectContent's own onMounted). Components inside\n the slot (SelectItem) still get created and their setup() runs, so\n textValue-based registrations fire at setup time.\n\n v-show (not v-if) on the visual wrapper ensures SelectItem components are\n always instantiated when inside the DocumentFragment — their setup() fires\n and populates itemRegistry. The animated chrome is visually hidden via\n v-show when closed; enter/exit animation runs via motion.div bindings.\n -->\n <SelectContent\n :position=\"props.position\"\n :side-offset=\"props.sideOffset\"\n data-slot=\"popover\"\n >\n <motion.div\n v-show=\"rootContext.open.value\"\n :class=\"[ctx.slots.value.popover(), { 'select__popover--opening': justOpened }]\"\n :animate=\"rootContext.open.value ? { opacity: 1, scale: 1 } : { opacity: 0, scale: 0.95 }\"\n :transition=\"{ duration: 0.15 }\"\n @keydown=\"handleKeydown\"\n >\n <SelectViewport data-slot=\"list-box\">\n <slot />\n </SelectViewport>\n </motion.div>\n </SelectContent>\n </AnimatePresence>\n </SelectPortal>\n</template>\n"],"mappings":";;;;;;;;;;;;;;EAWA,MAAM,QAAQ;EAUd,MAAM,MAAM,iBAAgB;EAC5B,MAAM,cAAc,yBAAwB;EAI5C,MAAM,aAAa,IAAI,MAAK;AAC5B,cAAY,YAAY,KAAK,QAAQ,SAAS;AAC5C,OAAI,MAAM;AACR,eAAW,QAAQ;AACnB,qBAAiB;AAAE,gBAAW,QAAQ;OAAS,IAAG;;IAErD;EAED,SAAS,cAAc,GAAkB;AACvC,OAAI,EAAE,QAAQ,MACZ,aAAY,aAAa,MAAK;;;uBAMhC,YAoCe,MAAA,aAAA,EAAA,MAAA;2BADK,CAlClB,YAkCkB,MAAA,wBAAA,EAAA,MAAA;4BADA,CAhBhB,YAgBgB,MAAA,cAAA,EAAA;MAfb,UAAU,MAAM;MAChB,eAAa,MAAM;MACpB,aAAU;;6BAYG,CAAA,eAVb,YAUa,MAAA,OAAA,CAAA,KAAA;OARV,OAAK,eAAA,CAAG,MAAA,IAAG,CAAC,MAAM,MAAM,SAAO,EAAA,EAAA,4BAAkC,WAAA,OAAU,CAAA,CAAA;OAC3E,SAAS,MAAA,YAAW,CAAC,KAAK,QAAK;QAAA,SAAA;QAAA,OAAA;QAAA,GAAA;QAAA,SAAA;QAAA,OAAA;QAAA;OAC/B,YAAY,EAAA,UAAA,KAAkB;OAC9B,WAAS;;8BAIO,CAFjB,YAEiB,MAAA,eAAA,EAAA,EAFD,aAAU,YAAU,EAAA;+BAC1B,CAAR,WAAQ,KAAA,QAAA,UAAA,CAAA,CAAA;;;;4CAPF,MAAA,YAAW,CAAC,KAAK,MAAK,CAAA,CAAA,CAAA,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectTrigger.js","names":[],"sources":["../../../src/components/select/SelectTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { SelectTrigger, SelectIcon, injectSelectRootContext } from 'reka-ui'\nimport { useSelectInject } from './Select.context'\n\nwithDefaults(defineProps<{\n class?: string\n}>(), {\n class: undefined,\n})\n\nconst ctx = useSelectInject()\nconst rootContext = injectSelectRootContext()\n\nconst isFilled = computed(() => {\n const v = rootContext?.modelValue?.value\n if (v == null) return false\n if (Array.isArray(v)) return v.length > 0\n return v !== ''\n})\n\nconst showInsideLabel = computed(\n () => ctx.hasLabel.value && ctx.labelPlacement.value === 'inside',\n)\n</script>\n\n<template>\n <SelectTrigger\n :id=\"ctx.triggerId.value\"\n :class=\"ctx.slots.value.trigger()\"\n :data-filled=\"isFilled || undefined\"\n :data-invalid=\"ctx.isInvalid.value || undefined\"\n :data-readonly=\"ctx.isReadonly.value || undefined\"\n :aria-invalid=\"ctx.isInvalid.value || undefined\"\n :aria-describedby=\"ctx.ariaDescribedBy.value\"\n data-slot=\"trigger\"\n >\n <label\n v-if=\"showInsideLabel\"\n :for=\"ctx.triggerId.value\"\n :class=\"ctx.slots.value.label()\"\n >{{ ctx.label.value }}<span\n v-if=\"ctx.isRequired.value\"\n aria-hidden=\"true\"\n > *</span></label>\n <span\n v-if=\"$slots.startContent\"\n :class=\"ctx.slots.value.startContent()\"\n data-slot=\"start-content\"\n >\n <slot name=\"startContent\" />\n </span>\n <slot />\n <SelectIcon\n :class=\"ctx.slots.value.indicator()\"\n data-slot=\"select-default-indicator\"\n >\n <slot name=\"selectorIcon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </slot>\n </SelectIcon>\n </SelectTrigger>\n</template>\n"],"mappings":""}
1
+ {"version":3,"file":"SelectTrigger.js","names":[],"sources":["../../../src/components/select/SelectTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport { SelectTrigger, SelectIcon, injectSelectRootContext } from 'reka-ui'\nimport { useSelectInject } from './Select.context'\n\nwithDefaults(defineProps<{\n class?: string\n}>(), {\n class: undefined,\n})\n\nconst ctx = useSelectInject()\nconst rootContext = injectSelectRootContext()\n\nconst isFilled = computed(() => {\n const v = rootContext?.modelValue?.value\n if (v == null) return false\n if (Array.isArray(v)) return v.length > 0\n return v !== ''\n})\n\nconst showInsideLabel = computed(\n () => ctx.hasLabel.value && ctx.labelPlacement.value === 'inside',\n)\n\n// Guard re-open when Reka returns focus to the trigger after close (value\n// selection, Escape, Tab). Set to true whenever open transitions true→false,\n// reset after a microtask once the focus-return event has been processed.\nconst skipNextFocus = ref(false)\n\n// flush:'sync' fires the moment open.value changes (synchronously, before any\n// Vue scheduling), so skipNextFocus is true before Reka's FocusScope can call\n// trigger.focus(). setTimeout defers the reset until after all pending\n// microtasks (render + focus-return) have flushed.\nwatch(() => rootContext.open.value, (open, wasOpen) => {\n if (!open && wasOpen) {\n skipNextFocus.value = true\n setTimeout(() => { skipNextFocus.value = false }, 0)\n }\n}, { flush: 'sync' })\n\nfunction handleFocus() {\n if (ctx.isDisabled.value || ctx.isReadonly.value || skipNextFocus.value || rootContext.open.value) return\n rootContext.onOpenChange(true)\n}\n</script>\n\n<template>\n <SelectTrigger\n :id=\"ctx.triggerId.value\"\n :class=\"ctx.slots.value.trigger()\"\n :data-filled=\"isFilled || undefined\"\n :data-invalid=\"ctx.isInvalid.value || undefined\"\n :data-readonly=\"ctx.isReadonly.value || undefined\"\n :aria-invalid=\"ctx.isInvalid.value || undefined\"\n :aria-describedby=\"ctx.ariaDescribedBy.value\"\n data-slot=\"trigger\"\n @focus=\"handleFocus\"\n >\n <label\n v-if=\"showInsideLabel\"\n :for=\"ctx.triggerId.value\"\n :class=\"ctx.slots.value.label()\"\n >{{ ctx.label.value }}<span\n v-if=\"ctx.isRequired.value\"\n aria-hidden=\"true\"\n > *</span></label>\n <span\n v-if=\"$slots.startContent\"\n :class=\"ctx.slots.value.startContent()\"\n data-slot=\"start-content\"\n >\n <slot name=\"startContent\" />\n </span>\n <slot />\n <SelectIcon\n :class=\"ctx.slots.value.indicator()\"\n data-slot=\"select-default-indicator\"\n >\n <slot name=\"selectorIcon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </slot>\n </SelectIcon>\n </SelectTrigger>\n</template>\n"],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { useSelectInject } from "./Select.context.js";
2
- import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderSlot, toDisplayString, unref, withCtx } from "vue";
2
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, ref, renderSlot, toDisplayString, unref, watch, withCtx } from "vue";
3
3
  import { SelectIcon, SelectTrigger, injectSelectRootContext } from "reka-ui";
4
4
  //#region src/components/select/SelectTrigger.vue?vue&type=script&setup=true&lang.ts
5
5
  var _hoisted_1 = ["for"];
@@ -20,6 +20,19 @@ var SelectTrigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
20
20
  return v !== "";
21
21
  });
22
22
  const showInsideLabel = computed(() => ctx.hasLabel.value && ctx.labelPlacement.value === "inside");
23
+ const skipNextFocus = ref(false);
24
+ watch(() => rootContext.open.value, (open, wasOpen) => {
25
+ if (!open && wasOpen) {
26
+ skipNextFocus.value = true;
27
+ setTimeout(() => {
28
+ skipNextFocus.value = false;
29
+ }, 0);
30
+ }
31
+ }, { flush: "sync" });
32
+ function handleFocus() {
33
+ if (ctx.isDisabled.value || ctx.isReadonly.value || skipNextFocus.value || rootContext.open.value) return;
34
+ rootContext.onOpenChange(true);
35
+ }
23
36
  return (_ctx, _cache) => {
24
37
  return openBlock(), createBlock(unref(SelectTrigger), {
25
38
  id: unref(ctx).triggerId.value,
@@ -29,7 +42,8 @@ var SelectTrigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */
29
42
  "data-readonly": unref(ctx).isReadonly.value || void 0,
30
43
  "aria-invalid": unref(ctx).isInvalid.value || void 0,
31
44
  "aria-describedby": unref(ctx).ariaDescribedBy.value,
32
- "data-slot": "trigger"
45
+ "data-slot": "trigger",
46
+ onFocus: handleFocus
33
47
  }, {
34
48
  default: withCtx(() => [
35
49
  showInsideLabel.value ? (openBlock(), createElementBlock("label", {
@@ -1 +1 @@
1
- {"version":3,"file":"SelectTrigger.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/select/SelectTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed } from 'vue'\nimport { SelectTrigger, SelectIcon, injectSelectRootContext } from 'reka-ui'\nimport { useSelectInject } from './Select.context'\n\nwithDefaults(defineProps<{\n class?: string\n}>(), {\n class: undefined,\n})\n\nconst ctx = useSelectInject()\nconst rootContext = injectSelectRootContext()\n\nconst isFilled = computed(() => {\n const v = rootContext?.modelValue?.value\n if (v == null) return false\n if (Array.isArray(v)) return v.length > 0\n return v !== ''\n})\n\nconst showInsideLabel = computed(\n () => ctx.hasLabel.value && ctx.labelPlacement.value === 'inside',\n)\n</script>\n\n<template>\n <SelectTrigger\n :id=\"ctx.triggerId.value\"\n :class=\"ctx.slots.value.trigger()\"\n :data-filled=\"isFilled || undefined\"\n :data-invalid=\"ctx.isInvalid.value || undefined\"\n :data-readonly=\"ctx.isReadonly.value || undefined\"\n :aria-invalid=\"ctx.isInvalid.value || undefined\"\n :aria-describedby=\"ctx.ariaDescribedBy.value\"\n data-slot=\"trigger\"\n >\n <label\n v-if=\"showInsideLabel\"\n :for=\"ctx.triggerId.value\"\n :class=\"ctx.slots.value.label()\"\n >{{ ctx.label.value }}<span\n v-if=\"ctx.isRequired.value\"\n aria-hidden=\"true\"\n > *</span></label>\n <span\n v-if=\"$slots.startContent\"\n :class=\"ctx.slots.value.startContent()\"\n data-slot=\"start-content\"\n >\n <slot name=\"startContent\" />\n </span>\n <slot />\n <SelectIcon\n :class=\"ctx.slots.value.indicator()\"\n data-slot=\"select-default-indicator\"\n >\n <slot name=\"selectorIcon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\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EV,WAA4B,KAAA,QAAA,eAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;KAE9B,WAAQ,KAAA,QAAA,UAAA;KACR,YAoBa,MAAA,WAAA,EAAA;MAnBV,OAAK,eAAE,MAAA,IAAG,CAAC,MAAM,MAAM,WAAS,CAAA;MACjC,aAAU;;6BAiBH,CAfP,WAeO,KAAA,QAAA,gBAAA,EAAA,QAAA,CAAA,OAAA,OAAA,OAAA,KAdL,mBAaM,OAAA;OAZJ,OAAM;OACN,OAAM;OACN,QAAO;OACP,SAAQ;OACR,MAAK;OACL,QAAO;OACP,gBAAa;OACb,kBAAe;OACf,mBAAgB;OAChB,eAAY;UAEZ,mBAAoC,YAAA,EAA1B,QAAO,kBAAgB,CAAA,CAAA,EAAA,GAAA,EAAA,CAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"SelectTrigger.vue_vue_type_script_setup_true_lang.js","names":["$slots"],"sources":["../../../src/components/select/SelectTrigger.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport { computed, ref, watch } from 'vue'\nimport { SelectTrigger, SelectIcon, injectSelectRootContext } from 'reka-ui'\nimport { useSelectInject } from './Select.context'\n\nwithDefaults(defineProps<{\n class?: string\n}>(), {\n class: undefined,\n})\n\nconst ctx = useSelectInject()\nconst rootContext = injectSelectRootContext()\n\nconst isFilled = computed(() => {\n const v = rootContext?.modelValue?.value\n if (v == null) return false\n if (Array.isArray(v)) return v.length > 0\n return v !== ''\n})\n\nconst showInsideLabel = computed(\n () => ctx.hasLabel.value && ctx.labelPlacement.value === 'inside',\n)\n\n// Guard re-open when Reka returns focus to the trigger after close (value\n// selection, Escape, Tab). Set to true whenever open transitions true→false,\n// reset after a microtask once the focus-return event has been processed.\nconst skipNextFocus = ref(false)\n\n// flush:'sync' fires the moment open.value changes (synchronously, before any\n// Vue scheduling), so skipNextFocus is true before Reka's FocusScope can call\n// trigger.focus(). setTimeout defers the reset until after all pending\n// microtasks (render + focus-return) have flushed.\nwatch(() => rootContext.open.value, (open, wasOpen) => {\n if (!open && wasOpen) {\n skipNextFocus.value = true\n setTimeout(() => { skipNextFocus.value = false }, 0)\n }\n}, { flush: 'sync' })\n\nfunction handleFocus() {\n if (ctx.isDisabled.value || ctx.isReadonly.value || skipNextFocus.value || rootContext.open.value) return\n rootContext.onOpenChange(true)\n}\n</script>\n\n<template>\n <SelectTrigger\n :id=\"ctx.triggerId.value\"\n :class=\"ctx.slots.value.trigger()\"\n :data-filled=\"isFilled || undefined\"\n :data-invalid=\"ctx.isInvalid.value || undefined\"\n :data-readonly=\"ctx.isReadonly.value || undefined\"\n :aria-invalid=\"ctx.isInvalid.value || undefined\"\n :aria-describedby=\"ctx.ariaDescribedBy.value\"\n data-slot=\"trigger\"\n @focus=\"handleFocus\"\n >\n <label\n v-if=\"showInsideLabel\"\n :for=\"ctx.triggerId.value\"\n :class=\"ctx.slots.value.label()\"\n >{{ ctx.label.value }}<span\n v-if=\"ctx.isRequired.value\"\n aria-hidden=\"true\"\n > *</span></label>\n <span\n v-if=\"$slots.startContent\"\n :class=\"ctx.slots.value.startContent()\"\n data-slot=\"start-content\"\n >\n <slot name=\"startContent\" />\n </span>\n <slot />\n <SelectIcon\n :class=\"ctx.slots.value.indicator()\"\n data-slot=\"select-default-indicator\"\n >\n <slot name=\"selectorIcon\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n stroke-width=\"2\"\n stroke-linecap=\"round\"\n stroke-linejoin=\"round\"\n aria-hidden=\"true\"\n >\n <polyline points=\"6 9 12 15 18 9\" />\n </svg>\n </slot>\n </SelectIcon>\n </SelectTrigger>\n</template>\n"],"mappings":";;;;;;;;;;;;;EAWA,MAAM,MAAM,iBAAgB;EAC5B,MAAM,cAAc,yBAAwB;EAE5C,MAAM,WAAW,eAAe;GAC9B,MAAM,IAAI,aAAa,YAAY;AACnC,OAAI,KAAK,KAAM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AAA,WAAA,EADf,mBAMO,QAAA;;MAJJ,OAAK,eAAE,MAAA,IAAG,CAAC,MAAM,MAAM,cAAY,CAAA;MACpC,aAAU;SAEV,WAA4B,KAAA,QAAA,eAAA,CAAA,EAAA,EAAA,IAAA,mBAAA,IAAA,KAAA;KAE9B,WAAQ,KAAA,QAAA,UAAA;KACR,YAoBa,MAAA,WAAA,EAAA;MAnBV,OAAK,eAAE,MAAA,IAAG,CAAC,MAAM,MAAM,WAAS,CAAA;MACjC,aAAU;;6BAiBH,CAfP,WAeO,KAAA,QAAA,gBAAA,EAAA,QAAA,CAAA,OAAA,OAAA,OAAA,KAdL,mBAaM,OAAA;OAZJ,OAAM;OACN,OAAM;OACN,QAAO;OACP,SAAQ;OACR,MAAK;OACL,QAAO;OACP,gBAAa;OACb,kBAAe;OACf,mBAAgB;OAChB,eAAY;UAEZ,mBAAoC,YAAA,EAA1B,QAAO,kBAAgB,CAAA,CAAA,EAAA,GAAA,EAAA,CAAA,CAAA,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auronui/vue",
3
- "version": "1.0.16",
3
+ "version": "1.0.17",
4
4
  "description": "Vue 3 85 components with full visual and functional parity",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -69,7 +69,7 @@
69
69
  "tailwind-merge": "3.5.0",
70
70
  "tailwind-variants": "3.2.2",
71
71
  "vee-validate": "^4.15.1",
72
- "@auronui/styles": "1.0.16"
72
+ "@auronui/styles": "1.0.17"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@chialab/vitest-axe": "0.19.1",
@@ -88,8 +88,8 @@
88
88
  "vitest": "4.1.4",
89
89
  "vue": "^3.5.32",
90
90
  "vue-tsc": "^3.2.6",
91
- "@auronui/standard": "0.0.0",
92
- "@auronui/vitest": "0.0.0"
91
+ "@auronui/vitest": "0.0.0",
92
+ "@auronui/standard": "0.0.0"
93
93
  },
94
94
  "scripts": {
95
95
  "build": "vite build",