@volverjs/ui-vue 0.0.3 → 0.0.5-beta.1

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.
Files changed (236) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +54 -15
  3. package/auto-imports.d.ts +12 -3
  4. package/bin/icons.cjs +1 -73
  5. package/dist/Volver.d.ts +23 -11
  6. package/dist/components/VvAccordion/VvAccordion.es.js +180 -74
  7. package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
  8. package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -1
  9. package/dist/components/VvAccordion/index.d.ts +8 -3
  10. package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +280 -122
  11. package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
  12. package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -12
  13. package/dist/components/VvAccordionGroup/index.d.ts +8 -0
  14. package/dist/components/VvAction/VvAction.es.js +338 -0
  15. package/dist/components/VvAction/VvAction.umd.js +1 -0
  16. package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
  17. package/dist/components/VvAction/index.d.ts +24 -0
  18. package/dist/components/VvBadge/VvBadge.es.js +251 -22
  19. package/dist/components/VvBadge/VvBadge.umd.js +1 -1
  20. package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
  21. package/dist/components/VvBadge/index.d.ts +1 -1
  22. package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +280 -62
  23. package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
  24. package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -11
  25. package/dist/components/VvBreadcrumb/index.d.ts +1 -1
  26. package/dist/components/VvButton/VvButton.es.js +720 -261
  27. package/dist/components/VvButton/VvButton.umd.js +1 -1
  28. package/dist/components/VvButton/VvButton.vue.d.ts +54 -54
  29. package/dist/components/VvButton/index.d.ts +30 -75
  30. package/dist/components/VvButtonGroup/VvButtonGroup.es.js +296 -49
  31. package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
  32. package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
  33. package/dist/components/VvButtonGroup/index.d.ts +1 -1
  34. package/dist/components/VvCard/VvCard.es.js +60 -28
  35. package/dist/components/VvCard/VvCard.umd.js +1 -1
  36. package/dist/components/VvCheckbox/VvCheckbox.es.js +630 -172
  37. package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
  38. package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
  39. package/dist/components/VvCheckbox/index.d.ts +6 -6
  40. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +736 -228
  41. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
  42. package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +9 -9
  43. package/dist/components/VvCheckboxGroup/index.d.ts +4 -4
  44. package/dist/components/VvCombobox/VvCombobox.es.js +1673 -768
  45. package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
  46. package/dist/components/VvCombobox/VvCombobox.vue.d.ts +159 -61
  47. package/dist/components/VvCombobox/index.d.ts +54 -23
  48. package/dist/components/VvDialog/VvDialog.es.js +426 -115
  49. package/dist/components/VvDialog/VvDialog.umd.js +1 -1
  50. package/dist/components/VvDialog/VvDialog.vue.d.ts +12 -3
  51. package/dist/components/VvDialog/index.d.ts +4 -1
  52. package/dist/components/VvDropdown/VvDropdown.es.js +504 -190
  53. package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
  54. package/dist/components/VvDropdown/VvDropdown.vue.d.ts +114 -42
  55. package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
  56. package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
  57. package/dist/components/VvDropdown/index.d.ts +35 -14
  58. package/dist/components/VvDropdownAction/VvDropdownAction.es.js +454 -0
  59. package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
  60. package/dist/components/VvDropdownItem/VvDropdownItem.es.js +48 -18
  61. package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
  62. package/dist/components/VvDropdownOption/VvDropdownOption.es.js +361 -0
  63. package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
  64. package/dist/components/VvIcon/VvIcon.es.js +116 -52
  65. package/dist/components/VvIcon/VvIcon.umd.js +1 -1
  66. package/dist/components/VvIcon/VvIcon.vue.d.ts +7 -7
  67. package/dist/components/VvIcon/index.d.ts +2 -2
  68. package/dist/components/VvInputText/VvInputPasswordAction.d.ts +2 -2
  69. package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
  70. package/dist/components/VvInputText/VvInputText.es.js +1054 -376
  71. package/dist/components/VvInputText/VvInputText.umd.js +1 -1
  72. package/dist/components/VvInputText/VvInputText.vue.d.ts +107 -20
  73. package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
  74. package/dist/components/VvInputText/index.d.ts +67 -3
  75. package/dist/components/VvProgress/VvProgress.es.js +254 -23
  76. package/dist/components/VvProgress/VvProgress.umd.js +1 -1
  77. package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
  78. package/dist/components/VvProgress/index.d.ts +1 -1
  79. package/dist/components/VvRadio/VvRadio.es.js +568 -137
  80. package/dist/components/VvRadio/VvRadio.umd.js +1 -1
  81. package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
  82. package/dist/components/VvRadio/index.d.ts +6 -6
  83. package/dist/components/VvRadioGroup/VvRadioGroup.es.js +674 -193
  84. package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
  85. package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +9 -9
  86. package/dist/components/VvRadioGroup/index.d.ts +4 -4
  87. package/dist/components/VvSelect/VvSelect.es.js +703 -251
  88. package/dist/components/VvSelect/VvSelect.umd.js +1 -1
  89. package/dist/components/VvSelect/VvSelect.vue.d.ts +24 -17
  90. package/dist/components/VvSelect/index.d.ts +8 -8
  91. package/dist/components/VvTextarea/VvTextarea.es.js +747 -272
  92. package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
  93. package/dist/components/VvTextarea/VvTextarea.vue.d.ts +21 -14
  94. package/dist/components/VvTextarea/index.d.ts +7 -7
  95. package/dist/components/VvTooltip/VvTooltip.es.js +252 -24
  96. package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
  97. package/dist/components/VvTooltip/VvTooltip.vue.d.ts +7 -7
  98. package/dist/components/VvTooltip/index.d.ts +2 -2
  99. package/dist/components/index.es.js +3676 -2007
  100. package/dist/components/index.umd.js +1 -1
  101. package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
  102. package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -3
  103. package/dist/composables/group/useInjectedGroupState.d.ts +2 -2
  104. package/dist/composables/group/useProvideGroupState.d.ts +1 -1
  105. package/dist/composables/useComponentFocus.d.ts +1 -1
  106. package/dist/composables/useComponentIcon.d.ts +7 -7
  107. package/dist/composables/useDebouncedInput.d.ts +4 -1
  108. package/dist/composables/useDefaults.d.ts +2 -0
  109. package/dist/composables/useModifiers.d.ts +1 -1
  110. package/dist/composables/useOptions.d.ts +2 -2
  111. package/dist/composables/useTextCount.d.ts +3 -3
  112. package/dist/composables/useUniqueId.d.ts +1 -1
  113. package/dist/composables/useVolver.d.ts +1 -1
  114. package/dist/constants.d.ts +30 -0
  115. package/dist/directives/index.es.js +288 -0
  116. package/dist/directives/index.umd.js +1 -0
  117. package/dist/directives/v-tooltip.es.js +285 -0
  118. package/dist/directives/v-tooltip.umd.js +1 -0
  119. package/dist/icons.es.js +38 -23
  120. package/dist/icons.umd.js +1 -1
  121. package/dist/index.d.ts +0 -1
  122. package/dist/index.es.js +115 -3269
  123. package/dist/index.umd.js +1 -1
  124. package/dist/props/index.d.ts +215 -23
  125. package/dist/resolvers/unplugin.d.ts +14 -8
  126. package/dist/resolvers/unplugin.es.js +94 -33
  127. package/dist/resolvers/unplugin.umd.js +1 -1
  128. package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
  129. package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
  130. package/dist/stories/InputText/InputText.settings.d.ts +53 -0
  131. package/dist/stories/argTypes.d.ts +1 -1
  132. package/package.json +167 -63
  133. package/src/Volver.ts +60 -26
  134. package/src/assets/icons/detailed.json +1 -1
  135. package/src/assets/icons/normal.json +1 -1
  136. package/src/assets/icons/simple.json +1 -1
  137. package/src/components/VvAccordion/VvAccordion.vue +19 -22
  138. package/src/components/VvAccordion/index.ts +12 -4
  139. package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
  140. package/src/components/VvAccordionGroup/index.ts +8 -0
  141. package/src/components/VvAction/VvAction.vue +144 -0
  142. package/src/components/VvAction/index.ts +5 -0
  143. package/src/components/VvBadge/VvBadge.vue +2 -2
  144. package/src/components/VvBadge/index.ts +1 -1
  145. package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
  146. package/src/components/VvButton/VvButton.vue +41 -124
  147. package/src/components/VvButton/index.ts +16 -88
  148. package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
  149. package/src/components/VvButtonGroup/index.ts +1 -1
  150. package/src/components/VvCard/VvCard.vue +2 -2
  151. package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
  152. package/src/components/VvCheckbox/index.ts +11 -7
  153. package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
  154. package/src/components/VvCheckboxGroup/index.ts +1 -1
  155. package/src/components/VvCombobox/VvCombobox.vue +85 -57
  156. package/src/components/VvCombobox/index.ts +12 -10
  157. package/src/components/VvDialog/VvDialog.vue +28 -11
  158. package/src/components/VvDialog/index.ts +5 -2
  159. package/src/components/VvDropdown/VvDropdown.vue +6 -5
  160. package/src/components/VvDropdown/VvDropdownAction.vue +46 -0
  161. package/src/components/VvDropdown/VvDropdownOption.vue +72 -0
  162. package/src/components/VvDropdown/index.ts +6 -11
  163. package/src/components/VvIcon/VvIcon.vue +3 -3
  164. package/src/components/VvIcon/index.ts +3 -3
  165. package/src/components/VvInputText/VvInputClearAction.ts +2 -2
  166. package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
  167. package/src/components/VvInputText/VvInputStepAction.ts +3 -2
  168. package/src/components/VvInputText/VvInputText.vue +128 -35
  169. package/src/components/VvInputText/VvInputTextActions.ts +5 -8
  170. package/src/components/VvInputText/index.ts +62 -1
  171. package/src/components/VvProgress/VvProgress.vue +2 -2
  172. package/src/components/VvProgress/index.ts +1 -1
  173. package/src/components/VvRadio/VvRadio.vue +3 -7
  174. package/src/components/VvRadio/index.ts +11 -7
  175. package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
  176. package/src/components/VvRadioGroup/index.ts +1 -1
  177. package/src/components/VvSelect/VvSelect.vue +4 -4
  178. package/src/components/VvSelect/index.ts +3 -5
  179. package/src/components/VvTextarea/VvTextarea.vue +4 -4
  180. package/src/components/VvTextarea/index.ts +1 -1
  181. package/src/components/VvTooltip/VvTooltip.vue +2 -2
  182. package/src/components/VvTooltip/index.ts +3 -3
  183. package/src/composables/dropdown/useInjectDropdown.ts +2 -2
  184. package/src/composables/dropdown/useProvideDropdown.ts +9 -11
  185. package/src/composables/group/useInjectedGroupState.ts +1 -1
  186. package/src/composables/group/useProvideGroupState.ts +1 -1
  187. package/src/composables/useComponentIcon.ts +1 -1
  188. package/src/composables/useDebouncedInput.ts +10 -3
  189. package/src/composables/useDefaults.ts +89 -0
  190. package/src/composables/useModifiers.ts +8 -9
  191. package/src/composables/useOptions.ts +1 -1
  192. package/src/composables/useVolver.ts +2 -2
  193. package/src/constants.ts +36 -0
  194. package/src/directives/index.ts +1 -1
  195. package/src/directives/v-tooltip.ts +2 -2
  196. package/src/index.ts +0 -2
  197. package/src/props/index.ts +111 -19
  198. package/src/resolvers/unplugin.ts +96 -49
  199. package/src/stories/Accordion/Accordion.stories.mdx +8 -2
  200. package/src/stories/Accordion/Accordion.test.ts +21 -15
  201. package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
  202. package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
  203. package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
  204. package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +3 -2
  205. package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
  206. package/src/stories/Button/Button.stories.mdx +4 -2
  207. package/src/stories/Button/Button.test.ts +3 -1
  208. package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
  209. package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
  210. package/src/stories/Button/ButtonState.stories.mdx +2 -11
  211. package/src/stories/Card/Card.stories.mdx +2 -1
  212. package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
  213. package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
  214. package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
  215. package/src/stories/Combobox/Combobox.settings.ts +44 -0
  216. package/src/stories/Combobox/Combobox.stories.mdx +40 -1
  217. package/src/stories/Dialog/Dialog.stories.mdx +2 -1
  218. package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
  219. package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
  220. package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
  221. package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
  222. package/src/stories/Icon/Icon.stories.mdx +2 -1
  223. package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
  224. package/src/stories/InputText/InputText.settings.ts +53 -0
  225. package/src/stories/InputText/InputText.stories.mdx +42 -1
  226. package/src/stories/InputText/InputText.test.ts +5 -2
  227. package/src/stories/Progress/Progress.stories.mdx +2 -1
  228. package/src/stories/Radio/Radio.stories.mdx +2 -1
  229. package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
  230. package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
  231. package/src/stories/Select/Select.stories.mdx +2 -1
  232. package/src/stories/Textarea/Textarea.stories.mdx +2 -1
  233. package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
  234. package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
  235. package/src/stories/argTypes.ts +2 -2
  236. package/src/types/group.d.ts +5 -0
@@ -1 +1 @@
1
- (function(t,l){typeof exports=="object"&&typeof module<"u"?module.exports=l(require("vue"),require("@floating-ui/vue")):typeof define=="function"&&define.amd?define(["vue","@floating-ui/vue"],l):(t=typeof globalThis<"u"?globalThis:t||self,t.VvDropdown=l(t.vue,t.vue$1))})(this,function(t,l){"use strict";var p=(o=>(o.left="left",o.right="right",o.top="top",o.bottom="bottom",o))(p||{}),v=(o=>(o.topStart="top-start",o.topEnd="top-end",o.bottomStart="bottom-start",o.bottomEnd="bottom-end",o.leftStart="left-start",o.leftEnd="left-end",o.rightStart="right-start",o.rightEnd="right-end",o))(v||{}),m=(o=>(o.before="before",o.after="after",o))(m||{});const V={modifiers:[String,Array]};m.before;const z={id:[String,Number]},N={placement:{type:String,default:p.bottom,validator:o=>Object.values(p).includes(o)||Object.values(v).includes(o)},transitionName:{type:String},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!0},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean}},w=["listbox","menu"],j={...z,...V,...N,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:w[1],validator:o=>w.includes(o)}},A=["id","tabindex","role","aria-labelledby"],R={name:"VvDropdown",inheritAttrs:!1};return t.defineComponent({...R,props:j,emits:["update:modelValue"],setup(o,{emit:C}){const r=o,{id:W}=toRefs(r),h=useUniqueId(W),T=useAttrs(),x=ref("auto"),E=ref("auto"),S=ref(null),s=ref(null),u=ref(null),F=ref(null),i=computed({get:()=>r.reference??S.value,set:e=>{S.value=e}}),I=computed(()=>{const e=[];if(r.autoPlacement?typeof r.autoPlacement=="boolean"?e.push(l.autoPlacement()):e.push(l.autoPlacement(r.autoPlacement)):r.flip&&(typeof r.flip=="boolean"?e.push(l.flip()):e.push(l.flip(r.flip))),r.shift&&(typeof r.shift=="boolean"?e.push(l.shift()):e.push(l.shift(r.shift))),r.size){const n=({availableWidth:d,availableHeight:c})=>{x.value=`${d}px`,E.value=`${c}px`};typeof r.size=="boolean"?e.push(l.size({apply:n})):e.push(l.size({...r.size,apply:n}))}return r.offset&&(e.push(l.offset(Number(r.offset))),["string","number"].includes(typeof r.offset)?e.push(l.offset(Number(r.offset))):e.push(l.offset(r.offset))),r.arrow&&e.push(l.arrow({element:u})),e}),{x:K,y:M,strategy:q,middlewareData:P,placement:U}=l.useFloating(i,s,{whileElementsMounted:l.autoUpdate,placement:r.placement,middleware:I}),H=computed(()=>({position:q.value,top:`${M.value??0}px`,left:`${K.value??0}px`,maxWidth:x.value,maxHeight:E.value,width:r.triggerWidth&&i.value?`${i.value.offsetWidth}px`:void 0})),L=computed(()=>U.value.split("-")[0]),b=computed(()=>({top:"bottom",right:"left",bottom:"top",left:"right"})[L.value]??"bottom"),$=computed(()=>{var e,n,d,c;return["bottom","top"].includes(b.value)?{right:`${((e=P.value.arrow)==null?void 0:e.x)??0}px`,[b.value]:`${-(((n=u.value)==null?void 0:n.offsetWidth)??0)/2}px`}:{top:`${((d=P.value.arrow)==null?void 0:d.y)??0}px`,[b.value]:`${-(((c=u.value)==null?void 0:c.offsetWidth)??0)/2}px`}}),g=useVModel(r,"modelValue",C),k=ref(!1),a=computed({get:()=>g.value??k.value,set:e=>{if(g.value===void 0){k.value=e;return}g.value=e}}),G=()=>{a.value=!0},_=()=>{a.value=!1},D=()=>{a.value=!a.value},J=e=>{i.value=e};watch(a,e=>{e&&r.autofocusFirst&&nextTick(()=>{const n=y(s.value);n.length>0&&n[0].focus()})}),onClickOutside(s,()=>{r.autoClose&&(a.value=!1)},{ignore:[i]});const Q=computed(()=>{var e;return((e=i.value)==null?void 0:e.getAttribute("id"))??void 0}),O=computed(()=>({"aria-controls":h.value,"aria-haspopup":!0,"aria-expanded":a.value})),{component:X,bus:Y}=useProvideDropdownTrigger({reference:i,id:h,expanded:a,aria:O});Y.on("click",D);const{role:B,modifiers:Z}=toRefs(r),{itemRole:ee}=useProvideDropdownItem({role:B,expanded:a}),te=useBemModifiers("vv-dropdown",Z,computed(()=>({arrow:r.arrow}))),{focused:f}=useFocusWithin(s);function y(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])')].filter(n=>!n.hasAttribute("disabled")&&!n.getAttribute("aria-hidden")):[]}const oe=()=>{nextTick(()=>{if(f.value){const e=y(s.value);if(e.length===0||!document.activeElement)return;const n=e.indexOf(document.activeElement);n<e.length-1?e[n+1].focus():e[0].focus()}})},re=()=>{nextTick(()=>{if(f.value){const e=y(s.value);if(e.length===0||!document.activeElement)return;const n=e.indexOf(document.activeElement);n>0?e[n-1].focus():e[e.length-1].focus()}})};return onKeyStroke("Escape",e=>{a.value&&(e.preventDefault(),_())}),onKeyStroke("ArrowDown",e=>{a.value&&f.value&&(e.preventDefault(),oe())}),onKeyStroke("ArrowUp",e=>{a.value&&f.value&&(e.preventDefault(),re())}),onKeyStroke([" ","Enter"],e=>{a.value&&f.value&&(e.preventDefault(),document.activeElement.click())}),(e,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[t.createVNode(t.unref(X),null,{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default",t.normalizeProps(t.guardReactiveProps({init:J,show:G,hide:_,toggle:D,expanded:t.unref(a),aria:t.unref(O)})))]),_:3}),t.createVNode(t.Transition,{name:e.transitionName},{default:t.withCtx(()=>[t.withDirectives(t.createElementVNode("div",{ref_key:"floatingEl",ref:s,style:t.normalizeStyle(t.unref(H)),class:t.normalizeClass(t.unref(te))},[r.arrow?(t.openBlock(),t.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:u,style:t.normalizeStyle(t.unref($)),class:"vv-dropdown__arrow"},null,4)):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"before",t.normalizeProps(t.guardReactiveProps({expanded:t.unref(a)}))),t.createElementVNode("ul",t.mergeProps(t.unref(T),{id:t.unref(h),ref_key:"listEl",ref:F,tabindex:t.unref(a)?void 0:-1,role:t.unref(B),"aria-labelledby":t.unref(Q),class:"vv-dropdown__list"}),[t.renderSlot(e.$slots,"items",t.normalizeProps(t.guardReactiveProps({role:t.unref(ee)})))],16,A),t.renderSlot(e.$slots,"after",t.normalizeProps(t.guardReactiveProps({expanded:t.unref(a)})))],6),[[t.vShow,t.unref(a)]])]),_:3},8,["name"])],64))}})});
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("vue"),require("@floating-ui/vue"),require("nanoid"),require("@vueuse/core"),require("mitt")):"function"==typeof define&&define.amd?define(["vue","@floating-ui/vue","nanoid","@vueuse/core","mitt"],t):(e="undefined"!=typeof globalThis?globalThis:e||self).VvDropdown=t(e.vue,e.vue$1,e.nanoid,e.core,e.mitt)}(this,(function(e,t,o,l,r){"use strict";var n=(e=>(e.left="left",e.right="right",e.top="top",e.bottom="bottom",e))(n||{}),a=(e=>(e.topStart="top-start",e.topEnd="top-end",e.bottomStart="bottom-start",e.bottomEnd="bottom-end",e.leftStart="left-start",e.leftEnd="left-end",e.rightStart="right-start",e.rightEnd="right-end",e))(a||{}),u=(e=>(e.before="before",e.after="after",e))(u||{}),i=(e=>(e.button="button",e.submit="submit",e.reset="reset",e))(i||{}),d=(e=>(e.listbox="listbox",e.menu="menu",e))(d||{}),s=(e=>(e.option="option",e.presentation="presentation",e))(s||{});const f=Symbol.for("dropdownTrigger"),p=Symbol.for("dropdownItem"),c=(Boolean,Boolean,Boolean,{modifiers:[String,Array]});u.before;const v={id:[String,Number]},m={placement:{type:String,default:n.bottom,validator:e=>Object.values(n).includes(e)||Object.values(a).includes(e)},transitionName:{type:String},offset:{type:[Number,String,Object],default:0},shift:{type:[Boolean,Object],default:!1},flip:{type:[Boolean,Object],default:!0},size:{type:[Boolean,Object],default:()=>({padding:10})},autoPlacement:{type:[Boolean,Object],default:!1},arrow:{type:Boolean,default:!1},autoClose:{type:Boolean,default:!0},autofocusFirst:{type:Boolean,default:!0},triggerWidth:{type:Boolean}};i.button;const b={...v,...c,...m,modelValue:{type:Boolean,default:void 0},reference:{type:Object,default:null},role:{type:String,default:d.menu,validator:e=>Object.values(d).includes(e)}};const h=["id","tabindex","role","aria-labelledby"];return e.defineComponent({name:"VvDropdown",inheritAttrs:!1,props:b,emits:["update:modelValue"],setup(n,{emit:a}){const u=n,{id:i}=e.toRefs(u),c=(t=>e.computed((()=>String((null==t?void 0:t.value)||o.nanoid()))))(i),v=e.useAttrs(),m=e.ref("auto"),b=e.ref("auto"),g=e.ref(null),y=e.ref(null),x=e.ref(null),w=e.ref(null),S=e.computed({get:()=>u.reference??g.value,set:e=>{g.value=e}}),E=e.computed((()=>{const e=[];if(u.autoPlacement?"boolean"==typeof u.autoPlacement?e.push(t.autoPlacement()):e.push(t.autoPlacement(u.autoPlacement)):u.flip&&("boolean"==typeof u.flip?e.push(t.flip()):e.push(t.flip(u.flip))),u.shift&&("boolean"==typeof u.shift?e.push(t.shift()):e.push(t.shift(u.shift))),u.size){const o=({availableWidth:e,availableHeight:t})=>{m.value=`${e}px`,b.value=`${t}px`};"boolean"==typeof u.size?e.push(t.size({apply:o})):e.push(t.size({...u.size,apply:o}))}return u.offset&&(e.push(t.offset(Number(u.offset))),["string","number"].includes(typeof u.offset)?e.push(t.offset(Number(u.offset))):e.push(t.offset(u.offset))),u.arrow&&e.push(t.arrow({element:x})),e})),{x:k,y:$,strategy:B,middlewareData:P,placement:z}=t.useFloating(S,y,{whileElementsMounted:t.autoUpdate,placement:u.placement,middleware:E}),O=e.computed((()=>({position:B.value,top:`${$.value??0}px`,left:`${k.value??0}px`,maxWidth:m.value,maxHeight:b.value,width:u.triggerWidth&&S.value?`${S.value.offsetWidth}px`:void 0}))),V=e.computed((()=>z.value.split("-")[0])),j=e.computed((()=>({top:"bottom",right:"left",bottom:"top",left:"right"}[V.value]??"bottom"))),A=e.computed((()=>{var e,t,o,l;return["bottom","top"].includes(j.value)?{right:`${(null==(e=P.value.arrow)?void 0:e.x)??0}px`,[j.value]:-((null==(t=x.value)?void 0:t.offsetWidth)??0)/2+"px"}:{top:`${(null==(o=P.value.arrow)?void 0:o.y)??0}px`,[j.value]:-((null==(l=x.value)?void 0:l.offsetWidth)??0)/2+"px"}})),N=l.useVModel(u,"modelValue",a),D=e.ref(!1),C=e.computed({get:()=>N.value??D.value,set:e=>{void 0!==N.value?N.value=e:D.value=e}}),_=()=>{C.value=!0},R=()=>{C.value=!1},T=()=>{C.value=!C.value},W=e=>{S.value=e};e.watch(C,(t=>{t&&u.autofocusFirst&&e.nextTick((()=>{const e=L(y.value);e.length>0&&e[0].focus()}))})),l.onClickOutside(y,(()=>{u.autoClose&&(C.value=!1)}),{ignore:[S]});const q=e.computed((()=>{var e,t;return(null==(t=null==(e=S.value)?void 0:e.getAttribute)?void 0:t.call(e,"id"))??void 0})),F=e.computed((()=>({"aria-controls":c.value,"aria-haspopup":!0,"aria-expanded":C.value}))),{component:K,bus:H}=function({reference:t,id:o,expanded:l,aria:n}){const a=r(),u=e.defineComponent({name:"VvDropdownTriggerProvider",provide:()=>({[f]:{reference:t,id:o,expanded:l,aria:n,bus:a}}),setup:()=>({}),render(){var t,o;return e.h(e.Fragment,{},null==(o=(t=this.$slots).default)?void 0:o.call(t))}});return{bus:a,component:u}}({reference:S,id:c,expanded:C,aria:F});H.on("click",T);const{role:M,modifiers:U}=e.toRefs(u),{itemRole:I}=function({role:t,expanded:o}){const l=e.computed((()=>t.value===d.listbox?s.option:s.presentation));return e.provide(p,{role:l,expanded:o}),{itemRole:l}}({role:M,expanded:C}),G=function(t,o,l){return e.computed((()=>{const r={[t]:!0},n="string"==typeof(null==o?void 0:o.value)?o.value.split(" "):null==o?void 0:o.value;return n&&Array.isArray(n)&&n.forEach((e=>{e&&(r[`${t}--${e}`]=!0)})),l&&Object.keys(l.value).forEach((o=>{r[`${t}--${o}`]=e.unref(l.value[o])})),r}))}("vv-dropdown",U,e.computed((()=>({arrow:u.arrow})))),{focused:J}=l.useFocusWithin(y);function L(e){return e?[...e.querySelectorAll('a[href], button, input, textarea, select, details,[tabindex]:not([tabindex="-1"])')].filter((e=>!e.hasAttribute("disabled")&&!e.getAttribute("aria-hidden"))):[]}return l.onKeyStroke("Escape",(e=>{C.value&&(e.preventDefault(),R())})),l.onKeyStroke("ArrowDown",(t=>{C.value&&J.value&&(t.preventDefault(),e.nextTick((()=>{if(J.value){const e=L(y.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t<e.length-1?e[t+1].focus():e[0].focus()}})))})),l.onKeyStroke("ArrowUp",(t=>{C.value&&J.value&&(t.preventDefault(),e.nextTick((()=>{if(J.value){const e=L(y.value);if(0===e.length||!document.activeElement)return;const t=e.indexOf(document.activeElement);t>0?e[t-1].focus():e[e.length-1].focus()}})))})),l.onKeyStroke([" ","Enter"],(e=>{if(C.value&&J.value){e.preventDefault();document.activeElement.click()}})),(t,o)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(e.unref(K),null,{default:e.withCtx((()=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({init:W,show:_,hide:R,toggle:T,expanded:e.unref(C),aria:e.unref(F)})))])),_:3}),e.createVNode(e.Transition,{name:t.transitionName},{default:e.withCtx((()=>[e.withDirectives(e.createElementVNode("div",{ref_key:"floatingEl",ref:y,style:e.normalizeStyle(e.unref(O)),class:e.normalizeClass(e.unref(G))},[u.arrow?(e.openBlock(),e.createElementBlock("div",{key:0,ref_key:"arrowEl",ref:x,style:e.normalizeStyle(e.unref(A)),class:"vv-dropdown__arrow"},null,4)):e.createCommentVNode("",!0),e.renderSlot(t.$slots,"before",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(C)}))),e.createElementVNode("ul",e.mergeProps(e.unref(v),{id:e.unref(c),ref_key:"listEl",ref:w,tabindex:e.unref(C)?void 0:-1,role:e.unref(M),"aria-labelledby":e.unref(q),class:"vv-dropdown__list"}),[e.renderSlot(t.$slots,"items",e.normalizeProps(e.guardReactiveProps({role:e.unref(I)})))],16,h),e.renderSlot(t.$slots,"after",e.normalizeProps(e.guardReactiveProps({expanded:e.unref(C)})))],6),[[e.vShow,e.unref(C)]])])),_:3},8,["name"])],64))}})}));
@@ -4,47 +4,67 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
4
4
  default: undefined;
5
5
  };
6
6
  reference: {
7
- type: import("vue").PropType<HTMLElement | null>;
7
+ type: globalThis.PropType<HTMLElement | null>;
8
8
  default: null;
9
9
  };
10
10
  role: {
11
- type: import("vue").PropType<"menu" | "listbox">;
12
- default: "menu";
13
- validator: (value: string) => boolean;
11
+ type: globalThis.PropType<"menu" | "listbox">;
12
+ default: import("@/constants").DropdownRole;
13
+ validator: (value: import("@/constants").DropdownRole) => boolean;
14
14
  };
15
15
  placement: {
16
- type: import("vue").PropType<import("../../constants.js").Side | import("../../constants.js").Placement>;
17
- default: import("../../constants.js").Side;
16
+ type: globalThis.PropType<"left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end">;
17
+ default: import("@/constants").Side;
18
18
  validator: (value: never) => boolean;
19
19
  };
20
20
  transitionName: {
21
21
  type: StringConstructor;
22
22
  };
23
23
  offset: {
24
- type: import("vue").PropType<string | import("@floating-ui/core").OffsetOptions | undefined>;
24
+ type: globalThis.PropType<string | import("@floating-ui/vue").OffsetOptions | undefined>;
25
25
  default: number;
26
26
  };
27
27
  shift: {
28
- type: import("vue").PropType<boolean | Partial<import("@floating-ui/core").ShiftOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
28
+ type: globalThis.PropType<boolean | Partial<import("@floating-ui/vue").ShiftOptions & {
29
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
30
+ elementContext: import("@floating-ui/vue").ElementContext;
31
+ altBoundary: boolean;
32
+ padding: import("@floating-ui/vue").Padding;
29
33
  boundary: import("@floating-ui/vue").Boundary;
30
34
  }> | undefined>;
31
35
  default: boolean;
32
36
  };
33
37
  flip: {
34
- type: import("vue").PropType<boolean | Partial<import("@floating-ui/core").FlipOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
38
+ type: globalThis.PropType<boolean | Partial<import("@floating-ui/vue").FlipOptions & {
39
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
40
+ elementContext: import("@floating-ui/vue").ElementContext;
41
+ altBoundary: boolean;
42
+ padding: import("@floating-ui/vue").Padding;
35
43
  boundary: import("@floating-ui/vue").Boundary;
36
44
  }> | undefined>;
37
45
  default: boolean;
38
46
  };
39
47
  size: {
40
- type: import("vue").PropType<boolean | Partial<Omit<import("@floating-ui/core").SizeOptions, "apply"> & {
41
- apply(args: Omit<import("@floating-ui/core").MiddlewareArguments, "elements"> & {
48
+ type: globalThis.PropType<boolean | Partial<{
49
+ apply: (args: {
50
+ x: number;
51
+ y: number;
52
+ placement: import("@floating-ui/vue").Placement;
53
+ initialPlacement: import("@floating-ui/vue").Placement;
54
+ strategy: import("@floating-ui/vue").Strategy;
55
+ middlewareData: import("@floating-ui/vue").MiddlewareData;
56
+ rects: import("@floating-ui/vue").ElementRects;
57
+ platform: import("@floating-ui/core").Platform;
42
58
  elements: import("@floating-ui/vue").Elements;
43
59
  } & {
44
60
  availableWidth: number;
45
61
  availableHeight: number;
46
- }): void | Promise<void>;
47
- } & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
62
+ }) => void | Promise<void>;
63
+ } & {
64
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
65
+ elementContext: import("@floating-ui/vue").ElementContext;
66
+ altBoundary: boolean;
67
+ padding: import("@floating-ui/vue").Padding;
48
68
  boundary: import("@floating-ui/vue").Boundary;
49
69
  }> | undefined>;
50
70
  default: () => {
@@ -52,7 +72,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
52
72
  };
53
73
  };
54
74
  autoPlacement: {
55
- type: import("vue").PropType<boolean | Partial<import("@floating-ui/core").AutoPlacementOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
75
+ type: globalThis.PropType<boolean | Partial<import("@floating-ui/vue").AutoPlacementOptions & {
76
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
77
+ elementContext: import("@floating-ui/vue").ElementContext;
78
+ altBoundary: boolean;
79
+ padding: import("@floating-ui/vue").Padding;
56
80
  boundary: import("@floating-ui/vue").Boundary;
57
81
  }> | undefined>;
58
82
  default: boolean;
@@ -72,7 +96,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
72
96
  triggerWidth: {
73
97
  type: BooleanConstructor;
74
98
  };
75
- modifiers: import("vue").PropType<string | string[]>;
99
+ modifiers: globalThis.PropType<string | string[]>;
76
100
  id: (StringConstructor | NumberConstructor)[];
77
101
  }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
78
102
  modelValue: {
@@ -80,47 +104,67 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
80
104
  default: undefined;
81
105
  };
82
106
  reference: {
83
- type: import("vue").PropType<HTMLElement | null>;
107
+ type: globalThis.PropType<HTMLElement | null>;
84
108
  default: null;
85
109
  };
86
110
  role: {
87
- type: import("vue").PropType<"menu" | "listbox">;
88
- default: "menu";
89
- validator: (value: string) => boolean;
111
+ type: globalThis.PropType<"menu" | "listbox">;
112
+ default: import("@/constants").DropdownRole;
113
+ validator: (value: import("@/constants").DropdownRole) => boolean;
90
114
  };
91
115
  placement: {
92
- type: import("vue").PropType<import("../../constants.js").Side | import("../../constants.js").Placement>;
93
- default: import("../../constants.js").Side;
116
+ type: globalThis.PropType<"left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end">;
117
+ default: import("@/constants").Side;
94
118
  validator: (value: never) => boolean;
95
119
  };
96
120
  transitionName: {
97
121
  type: StringConstructor;
98
122
  };
99
123
  offset: {
100
- type: import("vue").PropType<string | import("@floating-ui/core").OffsetOptions | undefined>;
124
+ type: globalThis.PropType<string | import("@floating-ui/vue").OffsetOptions | undefined>;
101
125
  default: number;
102
126
  };
103
127
  shift: {
104
- type: import("vue").PropType<boolean | Partial<import("@floating-ui/core").ShiftOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
128
+ type: globalThis.PropType<boolean | Partial<import("@floating-ui/vue").ShiftOptions & {
129
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
130
+ elementContext: import("@floating-ui/vue").ElementContext;
131
+ altBoundary: boolean;
132
+ padding: import("@floating-ui/vue").Padding;
105
133
  boundary: import("@floating-ui/vue").Boundary;
106
134
  }> | undefined>;
107
135
  default: boolean;
108
136
  };
109
137
  flip: {
110
- type: import("vue").PropType<boolean | Partial<import("@floating-ui/core").FlipOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
138
+ type: globalThis.PropType<boolean | Partial<import("@floating-ui/vue").FlipOptions & {
139
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
140
+ elementContext: import("@floating-ui/vue").ElementContext;
141
+ altBoundary: boolean;
142
+ padding: import("@floating-ui/vue").Padding;
111
143
  boundary: import("@floating-ui/vue").Boundary;
112
144
  }> | undefined>;
113
145
  default: boolean;
114
146
  };
115
147
  size: {
116
- type: import("vue").PropType<boolean | Partial<Omit<import("@floating-ui/core").SizeOptions, "apply"> & {
117
- apply(args: Omit<import("@floating-ui/core").MiddlewareArguments, "elements"> & {
148
+ type: globalThis.PropType<boolean | Partial<{
149
+ apply: (args: {
150
+ x: number;
151
+ y: number;
152
+ placement: import("@floating-ui/vue").Placement;
153
+ initialPlacement: import("@floating-ui/vue").Placement;
154
+ strategy: import("@floating-ui/vue").Strategy;
155
+ middlewareData: import("@floating-ui/vue").MiddlewareData;
156
+ rects: import("@floating-ui/vue").ElementRects;
157
+ platform: import("@floating-ui/core").Platform;
118
158
  elements: import("@floating-ui/vue").Elements;
119
159
  } & {
120
160
  availableWidth: number;
121
161
  availableHeight: number;
122
- }): void | Promise<void>;
123
- } & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
162
+ }) => void | Promise<void>;
163
+ } & {
164
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
165
+ elementContext: import("@floating-ui/vue").ElementContext;
166
+ altBoundary: boolean;
167
+ padding: import("@floating-ui/vue").Padding;
124
168
  boundary: import("@floating-ui/vue").Boundary;
125
169
  }> | undefined>;
126
170
  default: () => {
@@ -128,7 +172,11 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
128
172
  };
129
173
  };
130
174
  autoPlacement: {
131
- type: import("vue").PropType<boolean | Partial<import("@floating-ui/core").AutoPlacementOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
175
+ type: globalThis.PropType<boolean | Partial<import("@floating-ui/vue").AutoPlacementOptions & {
176
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
177
+ elementContext: import("@floating-ui/vue").ElementContext;
178
+ altBoundary: boolean;
179
+ padding: import("@floating-ui/vue").Padding;
132
180
  boundary: import("@floating-ui/vue").Boundary;
133
181
  }> | undefined>;
134
182
  default: boolean;
@@ -148,33 +196,57 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
148
196
  triggerWidth: {
149
197
  type: BooleanConstructor;
150
198
  };
151
- modifiers: import("vue").PropType<string | string[]>;
199
+ modifiers: globalThis.PropType<string | string[]>;
152
200
  id: (StringConstructor | NumberConstructor)[];
153
201
  }>> & {
154
202
  "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
155
203
  }, {
156
204
  modelValue: boolean;
157
- shift: boolean | Partial<import("@floating-ui/core").ShiftOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
158
- boundary: import("@floating-ui/vue").Boundary;
159
- }> | undefined;
160
- flip: boolean | Partial<import("@floating-ui/core").FlipOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
205
+ shift: boolean | Partial<import("@floating-ui/vue").ShiftOptions & {
206
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
207
+ elementContext: import("@floating-ui/vue").ElementContext;
208
+ altBoundary: boolean;
209
+ padding: import("@floating-ui/vue").Padding;
161
210
  boundary: import("@floating-ui/vue").Boundary;
162
211
  }> | undefined;
163
212
  reference: HTMLElement | null;
164
213
  role: "menu" | "listbox";
165
- placement: import("../../constants.js").Side | import("../../constants.js").Placement;
166
- offset: string | import("@floating-ui/core").OffsetOptions | undefined;
167
- size: boolean | Partial<Omit<import("@floating-ui/core").SizeOptions, "apply"> & {
168
- apply(args: Omit<import("@floating-ui/core").MiddlewareArguments, "elements"> & {
214
+ flip: boolean | Partial<import("@floating-ui/vue").FlipOptions & {
215
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
216
+ elementContext: import("@floating-ui/vue").ElementContext;
217
+ altBoundary: boolean;
218
+ padding: import("@floating-ui/vue").Padding;
219
+ boundary: import("@floating-ui/vue").Boundary;
220
+ }> | undefined;
221
+ placement: "left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end";
222
+ offset: string | import("@floating-ui/vue").OffsetOptions | undefined;
223
+ size: boolean | Partial<{
224
+ apply: (args: {
225
+ x: number;
226
+ y: number;
227
+ placement: import("@floating-ui/vue").Placement;
228
+ initialPlacement: import("@floating-ui/vue").Placement;
229
+ strategy: import("@floating-ui/vue").Strategy;
230
+ middlewareData: import("@floating-ui/vue").MiddlewareData;
231
+ rects: import("@floating-ui/vue").ElementRects;
232
+ platform: import("@floating-ui/core").Platform;
169
233
  elements: import("@floating-ui/vue").Elements;
170
234
  } & {
171
235
  availableWidth: number;
172
236
  availableHeight: number;
173
- }): void | Promise<void>;
174
- } & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
237
+ }) => void | Promise<void>;
238
+ } & {
239
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
240
+ elementContext: import("@floating-ui/vue").ElementContext;
241
+ altBoundary: boolean;
242
+ padding: import("@floating-ui/vue").Padding;
175
243
  boundary: import("@floating-ui/vue").Boundary;
176
244
  }> | undefined;
177
- autoPlacement: boolean | Partial<import("@floating-ui/core").AutoPlacementOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
245
+ autoPlacement: boolean | Partial<import("@floating-ui/vue").AutoPlacementOptions & {
246
+ rootBoundary: import("@floating-ui/vue").RootBoundary;
247
+ elementContext: import("@floating-ui/vue").ElementContext;
248
+ altBoundary: boolean;
249
+ padding: import("@floating-ui/vue").Padding;
178
250
  boundary: import("@floating-ui/vue").Boundary;
179
251
  }> | undefined;
180
252
  arrow: boolean;
@@ -198,7 +270,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
198
270
  expanded: boolean;
199
271
  }) => any;
200
272
  items: (_: {
201
- role: "option" | "presentation";
273
+ role: import("@/constants").DropdownItemRole;
202
274
  }) => any;
203
275
  after: (_: {
204
276
  expanded: boolean;
@@ -0,0 +1,61 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2
+ modifiers: globalThis.PropType<string | string[]>;
3
+ type: {
4
+ type: globalThis.PropType<"button" | "submit" | "reset">;
5
+ default: import("../../constants").ButtonType;
6
+ validator: (value: import("../../constants").ButtonType) => boolean;
7
+ };
8
+ to: {
9
+ type: (StringConstructor | ObjectConstructor)[];
10
+ };
11
+ href: StringConstructor;
12
+ target: {
13
+ type: globalThis.PropType<"_blank" | "_self" | "_parent" | "_top">;
14
+ validator: (value: import("../../constants").AnchorTarget) => boolean;
15
+ };
16
+ rel: {
17
+ type: StringConstructor;
18
+ default: string;
19
+ };
20
+ active: BooleanConstructor;
21
+ pressed: BooleanConstructor;
22
+ label: (StringConstructor | NumberConstructor)[];
23
+ disabled: BooleanConstructor;
24
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
25
+ modifiers: globalThis.PropType<string | string[]>;
26
+ type: {
27
+ type: globalThis.PropType<"button" | "submit" | "reset">;
28
+ default: import("../../constants").ButtonType;
29
+ validator: (value: import("../../constants").ButtonType) => boolean;
30
+ };
31
+ to: {
32
+ type: (StringConstructor | ObjectConstructor)[];
33
+ };
34
+ href: StringConstructor;
35
+ target: {
36
+ type: globalThis.PropType<"_blank" | "_self" | "_parent" | "_top">;
37
+ validator: (value: import("../../constants").AnchorTarget) => boolean;
38
+ };
39
+ rel: {
40
+ type: StringConstructor;
41
+ default: string;
42
+ };
43
+ active: BooleanConstructor;
44
+ pressed: BooleanConstructor;
45
+ label: (StringConstructor | NumberConstructor)[];
46
+ disabled: BooleanConstructor;
47
+ }>>, {
48
+ disabled: boolean;
49
+ type: "button" | "submit" | "reset";
50
+ rel: string;
51
+ active: boolean;
52
+ pressed: boolean;
53
+ }>, {
54
+ default: (_: {}) => any;
55
+ }>;
56
+ export default _default;
57
+ type __VLS_WithTemplateSlots<T, S> = T & {
58
+ new (): {
59
+ $slots: S;
60
+ };
61
+ };
@@ -0,0 +1,52 @@
1
+ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
2
+ deselectHintLabel: {
3
+ type: StringConstructor;
4
+ };
5
+ selectHintLabel: {
6
+ type: StringConstructor;
7
+ };
8
+ selectedHintLabel: {
9
+ type: StringConstructor;
10
+ };
11
+ modifiers: globalThis.PropType<string | string[]>;
12
+ unselectable: {
13
+ type: BooleanConstructor;
14
+ default: boolean;
15
+ };
16
+ selected: BooleanConstructor;
17
+ disabled: BooleanConstructor;
18
+ }, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
+ deselectHintLabel: {
20
+ type: StringConstructor;
21
+ };
22
+ selectHintLabel: {
23
+ type: StringConstructor;
24
+ };
25
+ selectedHintLabel: {
26
+ type: StringConstructor;
27
+ };
28
+ modifiers: globalThis.PropType<string | string[]>;
29
+ unselectable: {
30
+ type: BooleanConstructor;
31
+ default: boolean;
32
+ };
33
+ selected: BooleanConstructor;
34
+ disabled: BooleanConstructor;
35
+ }>>, {
36
+ disabled: boolean;
37
+ unselectable: boolean;
38
+ selected: boolean;
39
+ }>, {
40
+ default: (_: {}) => any;
41
+ hint: (_: {
42
+ disabled: boolean;
43
+ selected: boolean;
44
+ unselectable: boolean;
45
+ }) => any;
46
+ }>;
47
+ export default _default;
48
+ type __VLS_WithTemplateSlots<T, S> = T & {
49
+ new (): {
50
+ $slots: S;
51
+ };
52
+ };
@@ -1,8 +1,5 @@
1
1
  import type { PropType } from 'vue';
2
- export declare const DROPDOWN_ROLES: readonly ["listbox", "menu"];
3
- export declare const DROPDOWN_ITEM_ROLES: readonly ["option", "presentation"];
4
- export type DropdownRole = (typeof DROPDOWN_ROLES)[number];
5
- export type DropdownItemRole = (typeof DROPDOWN_ITEM_ROLES)[number];
2
+ import { DropdownRole } from '../../constants';
6
3
  export declare const VvDropdownProps: {
7
4
  /**
8
5
  * Show / hide dropdown programmatically
@@ -23,11 +20,11 @@ export declare const VvDropdownProps: {
23
20
  */
24
21
  role: {
25
22
  type: PropType<"menu" | "listbox">;
26
- default: "menu";
27
- validator: (value: string) => boolean;
23
+ default: DropdownRole;
24
+ validator: (value: DropdownRole) => boolean;
28
25
  };
29
26
  placement: {
30
- type: PropType<import("../../constants").Side | import("../../constants").Placement>;
27
+ type: PropType<"left" | "right" | "top" | "bottom" | "top-start" | "top-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end" | "right-start" | "right-end">;
31
28
  default: import("../../constants").Side;
32
29
  validator: (value: never) => boolean;
33
30
  };
@@ -39,26 +36,46 @@ export declare const VvDropdownProps: {
39
36
  default: number;
40
37
  };
41
38
  shift: {
42
- type: PropType<boolean | Partial<import("@floating-ui/core").ShiftOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
39
+ type: PropType<boolean | Partial<import("@floating-ui/core").ShiftOptions & {
40
+ rootBoundary: import("@floating-ui/core").RootBoundary;
41
+ elementContext: import("@floating-ui/core").ElementContext;
42
+ altBoundary: boolean;
43
+ padding: import("@floating-ui/core").Padding;
43
44
  boundary: import("@floating-ui/dom").Boundary;
44
45
  }> | undefined>;
45
46
  default: boolean;
46
47
  };
47
48
  flip: {
48
- type: PropType<boolean | Partial<import("@floating-ui/core").FlipOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
49
+ type: PropType<boolean | Partial<import("@floating-ui/core").FlipOptions & {
50
+ rootBoundary: import("@floating-ui/core").RootBoundary;
51
+ elementContext: import("@floating-ui/core").ElementContext;
52
+ altBoundary: boolean;
53
+ padding: import("@floating-ui/core").Padding;
49
54
  boundary: import("@floating-ui/dom").Boundary;
50
55
  }> | undefined>;
51
56
  default: boolean;
52
57
  };
53
58
  size: {
54
- type: PropType<boolean | Partial<Omit<import("@floating-ui/core").SizeOptions, "apply"> & {
55
- apply(args: Omit<import("@floating-ui/core").MiddlewareArguments, "elements"> & {
59
+ type: PropType<boolean | Partial<{
60
+ apply: (args: {
61
+ x: number;
62
+ y: number;
63
+ placement: import("@floating-ui/core").Placement;
64
+ initialPlacement: import("@floating-ui/core").Placement;
65
+ strategy: import("@floating-ui/core").Strategy;
66
+ middlewareData: import("@floating-ui/core").MiddlewareData;
67
+ rects: import("@floating-ui/core").ElementRects;
68
+ platform: import("@floating-ui/core").Platform;
56
69
  elements: import("@floating-ui/dom").Elements;
57
70
  } & {
58
71
  availableWidth: number;
59
72
  availableHeight: number;
60
- }): void | Promise<void>;
61
- } & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
73
+ }) => void | Promise<void>;
74
+ } & {
75
+ rootBoundary: import("@floating-ui/core").RootBoundary;
76
+ elementContext: import("@floating-ui/core").ElementContext;
77
+ altBoundary: boolean;
78
+ padding: import("@floating-ui/core").Padding;
62
79
  boundary: import("@floating-ui/dom").Boundary;
63
80
  }> | undefined>;
64
81
  default: () => {
@@ -66,7 +83,11 @@ export declare const VvDropdownProps: {
66
83
  };
67
84
  };
68
85
  autoPlacement: {
69
- type: PropType<boolean | Partial<import("@floating-ui/core").AutoPlacementOptions & Omit<import("@floating-ui/core").DetectOverflowOptions, "boundary"> & {
86
+ type: PropType<boolean | Partial<import("@floating-ui/core").AutoPlacementOptions & {
87
+ rootBoundary: import("@floating-ui/core").RootBoundary;
88
+ elementContext: import("@floating-ui/core").ElementContext;
89
+ altBoundary: boolean;
90
+ padding: import("@floating-ui/core").Padding;
70
91
  boundary: import("@floating-ui/dom").Boundary;
71
92
  }> | undefined>;
72
93
  default: boolean;