@hebium-ui/vue 0.1.0-alpha.2 → 0.1.0-alpha.3

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 (234) hide show
  1. package/dist/_virtual/_/plugin-vue/export-helper.js +1 -2
  2. package/dist/components/alert/alert.js +2 -5
  3. package/dist/components/alert/alert.js.map +1 -1
  4. package/dist/components/alert/alert.types.d.ts +0 -2
  5. package/dist/components/alert/alert.vue.d.ts +0 -2
  6. package/dist/components/anchor/anchor.js +2 -5
  7. package/dist/components/anchor/anchor.js.map +1 -1
  8. package/dist/components/anchor/anchor.types.d.ts +0 -2
  9. package/dist/components/anchor/anchor.vue.d.ts +1 -3
  10. package/dist/components/avatar/avatar.js +2 -7
  11. package/dist/components/avatar/avatar.js.map +1 -1
  12. package/dist/components/avatar/avatar.types.d.ts +0 -2
  13. package/dist/components/avatar/avatar.vue.d.ts +0 -2
  14. package/dist/components/blockquote/blockquote.js +2 -10
  15. package/dist/components/blockquote/blockquote.js.map +1 -1
  16. package/dist/components/blockquote/blockquote.types.d.ts +0 -2
  17. package/dist/components/blockquote/blockquote.vue.d.ts +0 -2
  18. package/dist/components/button/button.js +2 -5
  19. package/dist/components/button/button.js.map +1 -1
  20. package/dist/components/button/button.types.d.ts +0 -2
  21. package/dist/components/button/button.vue.d.ts +1 -3
  22. package/dist/components/checkbox/checkbox.js +18 -15
  23. package/dist/components/checkbox/checkbox.js.map +1 -1
  24. package/dist/components/checkbox/checkbox.types.d.ts +1 -3
  25. package/dist/components/checkbox/checkbox.vue.d.ts +0 -2
  26. package/dist/components/code/code.js +2 -7
  27. package/dist/components/code/code.js.map +1 -1
  28. package/dist/components/code/code.types.d.ts +0 -2
  29. package/dist/components/code/code.vue.d.ts +1 -3
  30. package/dist/components/details/details.js +2 -9
  31. package/dist/components/details/details.js.map +1 -1
  32. package/dist/components/details/details.types.d.ts +0 -2
  33. package/dist/components/details/details.vue.d.ts +0 -2
  34. package/dist/components/dialog/dialog-close.js +2 -3
  35. package/dist/components/dialog/dialog-close.js.map +1 -1
  36. package/dist/components/dialog/dialog-close.vue.d.ts +0 -2
  37. package/dist/components/dialog/dialog-content.js +1 -6
  38. package/dist/components/dialog/dialog-content.js.map +1 -1
  39. package/dist/components/dialog/dialog-content.vue.d.ts +0 -2
  40. package/dist/components/dialog/dialog-trigger.js +2 -8
  41. package/dist/components/dialog/dialog-trigger.js.map +1 -1
  42. package/dist/components/dialog/dialog-trigger.vue.d.ts +1 -3
  43. package/dist/components/dialog/dialog.context.d.ts +0 -2
  44. package/dist/components/dialog/dialog.context.js +1 -2
  45. package/dist/components/dialog/dialog.js +1 -2
  46. package/dist/components/dialog/dialog.types.d.ts +0 -2
  47. package/dist/components/dialog/dialog.vue.d.ts +0 -2
  48. package/dist/components/dl/dl-dd.js +2 -3
  49. package/dist/components/dl/dl-dd.js.map +1 -1
  50. package/dist/components/dl/dl-dd.vue.d.ts +0 -2
  51. package/dist/components/dl/dl-dt.js +2 -3
  52. package/dist/components/dl/dl-dt.js.map +1 -1
  53. package/dist/components/dl/dl-dt.vue.d.ts +0 -2
  54. package/dist/components/dl/dl.js +2 -3
  55. package/dist/components/dl/dl.js.map +1 -1
  56. package/dist/components/dl/dl.types.d.ts +0 -2
  57. package/dist/components/dl/dl.vue.d.ts +0 -2
  58. package/dist/components/drawer/drawer-close.js +2 -3
  59. package/dist/components/drawer/drawer-close.js.map +1 -1
  60. package/dist/components/drawer/drawer-close.vue.d.ts +0 -2
  61. package/dist/components/drawer/drawer-content.js +1 -6
  62. package/dist/components/drawer/drawer-content.js.map +1 -1
  63. package/dist/components/drawer/drawer-content.vue.d.ts +0 -2
  64. package/dist/components/drawer/drawer-trigger.js +2 -7
  65. package/dist/components/drawer/drawer-trigger.js.map +1 -1
  66. package/dist/components/drawer/drawer-trigger.vue.d.ts +1 -3
  67. package/dist/components/drawer/drawer.context.d.ts +0 -2
  68. package/dist/components/drawer/drawer.context.js +1 -2
  69. package/dist/components/drawer/drawer.js +1 -2
  70. package/dist/components/drawer/drawer.types.d.ts +0 -2
  71. package/dist/components/drawer/drawer.vue.d.ts +0 -2
  72. package/dist/components/fieldset/fieldset.js +2 -3
  73. package/dist/components/fieldset/fieldset.js.map +1 -1
  74. package/dist/components/fieldset/fieldset.types.d.ts +0 -2
  75. package/dist/components/fieldset/fieldset.vue.d.ts +0 -2
  76. package/dist/components/heading/heading.js +2 -8
  77. package/dist/components/heading/heading.js.map +1 -1
  78. package/dist/components/heading/heading.types.d.ts +0 -2
  79. package/dist/components/heading/heading.vue.d.ts +0 -2
  80. package/dist/components/hr/hr.js +2 -7
  81. package/dist/components/hr/hr.js.map +1 -1
  82. package/dist/components/hr/hr.types.d.ts +0 -2
  83. package/dist/components/hr/hr.vue.d.ts +1 -3
  84. package/dist/components/index.d.ts +24 -18
  85. package/dist/components/input/input.js +10 -14
  86. package/dist/components/input/input.js.map +1 -1
  87. package/dist/components/input/input.types.d.ts +0 -2
  88. package/dist/components/input/input.vue.d.ts +0 -2
  89. package/dist/components/label/label.js +2 -7
  90. package/dist/components/label/label.js.map +1 -1
  91. package/dist/components/label/label.types.d.ts +0 -2
  92. package/dist/components/label/label.vue.d.ts +1 -3
  93. package/dist/components/menu/menu-content.js +1 -4
  94. package/dist/components/menu/menu-content.js.map +1 -1
  95. package/dist/components/menu/menu-content.vue.d.ts +1 -3
  96. package/dist/components/menu/menu-item.js +1 -4
  97. package/dist/components/menu/menu-item.js.map +1 -1
  98. package/dist/components/menu/menu-item.vue.d.ts +1 -3
  99. package/dist/components/menu/menu-trigger.js +2 -8
  100. package/dist/components/menu/menu-trigger.js.map +1 -1
  101. package/dist/components/menu/menu-trigger.vue.d.ts +1 -3
  102. package/dist/components/menu/menu.context.d.ts +0 -2
  103. package/dist/components/menu/menu.context.js +1 -2
  104. package/dist/components/menu/menu.js +1 -2
  105. package/dist/components/menu/menu.types.d.ts +0 -2
  106. package/dist/components/menu/menu.vue.d.ts +0 -2
  107. package/dist/components/paragraph/paragraph.js +2 -5
  108. package/dist/components/paragraph/paragraph.js.map +1 -1
  109. package/dist/components/paragraph/paragraph.types.d.ts +0 -2
  110. package/dist/components/paragraph/paragraph.vue.d.ts +1 -3
  111. package/dist/components/popover/popover-content.js +2 -5
  112. package/dist/components/popover/popover-content.js.map +1 -1
  113. package/dist/components/popover/popover-content.vue.d.ts +1 -3
  114. package/dist/components/popover/popover-trigger.js +2 -7
  115. package/dist/components/popover/popover-trigger.js.map +1 -1
  116. package/dist/components/popover/popover-trigger.vue.d.ts +1 -3
  117. package/dist/components/popover/popover.context.d.ts +0 -2
  118. package/dist/components/popover/popover.context.js +1 -2
  119. package/dist/components/popover/popover.js +1 -2
  120. package/dist/components/popover/popover.types.d.ts +0 -2
  121. package/dist/components/popover/popover.vue.d.ts +0 -2
  122. package/dist/components/progress/progress.js +3 -7
  123. package/dist/components/progress/progress.js.map +1 -1
  124. package/dist/components/progress/progress.types.d.ts +0 -2
  125. package/dist/components/progress/progress.vue.d.ts +0 -2
  126. package/dist/components/radio/radio.js +4 -11
  127. package/dist/components/radio/radio.js.map +1 -1
  128. package/dist/components/radio/radio.types.d.ts +0 -2
  129. package/dist/components/radio/radio.vue.d.ts +0 -2
  130. package/dist/components/radiogroup/radiogroup.js +11 -9
  131. package/dist/components/radiogroup/radiogroup.js.map +1 -1
  132. package/dist/components/radiogroup/radiogroup.types.d.ts +0 -2
  133. package/dist/components/radiogroup/radiogroup.vue.d.ts +1 -3
  134. package/dist/components/section/section.js +2 -5
  135. package/dist/components/section/section.js.map +1 -1
  136. package/dist/components/section/section.types.d.ts +0 -2
  137. package/dist/components/section/section.vue.d.ts +1 -3
  138. package/dist/components/segmented-control/segmented-control-item.js +1 -4
  139. package/dist/components/segmented-control/segmented-control-item.js.map +1 -1
  140. package/dist/components/segmented-control/segmented-control-item.vue.d.ts +1 -3
  141. package/dist/components/segmented-control/segmented-control.context.js +1 -2
  142. package/dist/components/segmented-control/segmented-control.js +2 -5
  143. package/dist/components/segmented-control/segmented-control.js.map +1 -1
  144. package/dist/components/segmented-control/segmented-control.types.d.ts +1 -3
  145. package/dist/components/segmented-control/segmented-control.vue.d.ts +1 -3
  146. package/dist/components/select/select.js +11 -12
  147. package/dist/components/select/select.js.map +1 -1
  148. package/dist/components/select/select.types.d.ts +0 -2
  149. package/dist/components/select/select.vue.d.ts +0 -2
  150. package/dist/components/skip-link/index.d.ts +3 -0
  151. package/dist/components/skip-link/skip-link.js +79 -0
  152. package/dist/components/skip-link/skip-link.js.map +1 -0
  153. package/dist/components/skip-link/skip-link.types.d.ts +10 -0
  154. package/dist/components/skip-link/skip-link.vue.d.ts +28 -0
  155. package/dist/components/table/table-caption.js +2 -7
  156. package/dist/components/table/table-caption.js.map +1 -1
  157. package/dist/components/table/table-caption.vue.d.ts +0 -2
  158. package/dist/components/table/table-tbody.js +2 -3
  159. package/dist/components/table/table-tbody.js.map +1 -1
  160. package/dist/components/table/table-tbody.vue.d.ts +0 -2
  161. package/dist/components/table/table-td.js +2 -3
  162. package/dist/components/table/table-td.js.map +1 -1
  163. package/dist/components/table/table-td.vue.d.ts +0 -2
  164. package/dist/components/table/table-tfoot.js +2 -3
  165. package/dist/components/table/table-tfoot.js.map +1 -1
  166. package/dist/components/table/table-tfoot.vue.d.ts +0 -2
  167. package/dist/components/table/table-th.js +2 -3
  168. package/dist/components/table/table-th.js.map +1 -1
  169. package/dist/components/table/table-th.vue.d.ts +0 -2
  170. package/dist/components/table/table-thead.js +2 -3
  171. package/dist/components/table/table-thead.js.map +1 -1
  172. package/dist/components/table/table-thead.vue.d.ts +0 -2
  173. package/dist/components/table/table-tr.js +2 -7
  174. package/dist/components/table/table-tr.js.map +1 -1
  175. package/dist/components/table/table-tr.vue.d.ts +0 -2
  176. package/dist/components/table/table.js +2 -7
  177. package/dist/components/table/table.js.map +1 -1
  178. package/dist/components/table/table.types.d.ts +0 -2
  179. package/dist/components/table/table.vue.d.ts +0 -2
  180. package/dist/components/tabs/tabs-list.js +2 -7
  181. package/dist/components/tabs/tabs-list.js.map +1 -1
  182. package/dist/components/tabs/tabs-list.vue.d.ts +1 -3
  183. package/dist/components/tabs/tabs-panel.js +2 -8
  184. package/dist/components/tabs/tabs-panel.js.map +1 -1
  185. package/dist/components/tabs/tabs-panel.vue.d.ts +1 -3
  186. package/dist/components/tabs/tabs-tab.js +1 -4
  187. package/dist/components/tabs/tabs-tab.js.map +1 -1
  188. package/dist/components/tabs/tabs-tab.vue.d.ts +1 -3
  189. package/dist/components/tabs/tabs.context.js +1 -2
  190. package/dist/components/tabs/tabs.js +2 -5
  191. package/dist/components/tabs/tabs.js.map +1 -1
  192. package/dist/components/tabs/tabs.types.d.ts +1 -3
  193. package/dist/components/tabs/tabs.vue.d.ts +1 -3
  194. package/dist/components/text/index.d.ts +3 -0
  195. package/dist/components/text/text.js +96 -0
  196. package/dist/components/text/text.js.map +1 -0
  197. package/dist/components/text/text.types.d.ts +24 -0
  198. package/dist/components/text/text.vue.d.ts +28 -0
  199. package/dist/components/textarea/textarea.js +10 -14
  200. package/dist/components/textarea/textarea.js.map +1 -1
  201. package/dist/components/textarea/textarea.types.d.ts +0 -2
  202. package/dist/components/textarea/textarea.vue.d.ts +0 -2
  203. package/dist/components/tooltip/tooltip-content.js +1 -4
  204. package/dist/components/tooltip/tooltip-content.js.map +1 -1
  205. package/dist/components/tooltip/tooltip-content.vue.d.ts +1 -3
  206. package/dist/components/tooltip/tooltip-trigger.js +1 -4
  207. package/dist/components/tooltip/tooltip-trigger.js.map +1 -1
  208. package/dist/components/tooltip/tooltip-trigger.vue.d.ts +1 -3
  209. package/dist/components/tooltip/tooltip.context.d.ts +0 -2
  210. package/dist/components/tooltip/tooltip.context.js +1 -2
  211. package/dist/components/tooltip/tooltip.js +1 -2
  212. package/dist/components/tooltip/tooltip.types.d.ts +0 -2
  213. package/dist/components/tooltip/tooltip.vue.d.ts +0 -2
  214. package/dist/components/visually-hidden/visually-hidden.js +2 -7
  215. package/dist/components/visually-hidden/visually-hidden.js.map +1 -1
  216. package/dist/components/visually-hidden/visually-hidden.types.d.ts +0 -2
  217. package/dist/components/visually-hidden/visually-hidden.vue.d.ts +1 -3
  218. package/dist/index.d.ts +22 -18
  219. package/dist/index.js +3 -1
  220. package/dist/plugin.d.ts +40 -38
  221. package/dist/plugin.js +5 -2
  222. package/dist/plugin.js.map +1 -1
  223. package/dist/provider/hui-provider.context.d.ts +8 -4
  224. package/dist/provider/hui-provider.context.js +9 -3
  225. package/dist/provider/hui-provider.context.js.map +1 -1
  226. package/dist/provider/hui-provider.js +1 -2
  227. package/dist/provider/hui-provider.vue.d.ts +0 -2
  228. package/dist/types/element.d.ts +0 -2
  229. package/dist/types/hui-component.d.ts +0 -2
  230. package/dist/types/polymorphic.d.ts +0 -2
  231. package/dist/utils/attr-to-bool.js +1 -2
  232. package/dist/utils/use-slot-presence.js +13 -0
  233. package/dist/utils/use-slot-presence.js.map +1 -0
  234. package/package.json +4 -4
@@ -91,32 +91,38 @@ import "./segmented-control/index.js";
91
91
  import { SelectExposed, SelectProps } from "./select/select.types.js";
92
92
  import _default$38 from "./select/select.vue.js";
93
93
  import "./select/index.js";
94
+ import { SkipLinkExposed, SkipLinkProps } from "./skip-link/skip-link.types.js";
95
+ import _default$39 from "./skip-link/skip-link.vue.js";
96
+ import "./skip-link/index.js";
94
97
  import { TableCaptionExposed, TableCaptionOwnProps, TableCaptionProps, TableExposed, TableOwnProps, TableProps, TableTbodyExposed, TableTbodyProps, TableTdExposed, TableTdProps, TableTfootExposed, TableTfootProps, TableThExposed, TableThProps, TableTheadExposed, TableTheadProps, TableTrExposed, TableTrOwnProps, TableTrProps } from "./table/table.types.js";
95
- import _default$39 from "./table/table-caption.vue.js";
96
- import _default$40 from "./table/table-tbody.vue.js";
97
- import _default$41 from "./table/table-td.vue.js";
98
- import _default$42 from "./table/table-tfoot.vue.js";
99
- import _default$43 from "./table/table-th.vue.js";
100
- import _default$44 from "./table/table-thead.vue.js";
101
- import _default$45 from "./table/table-tr.vue.js";
102
- import _default$46 from "./table/table.vue.js";
98
+ import _default$40 from "./table/table-caption.vue.js";
99
+ import _default$41 from "./table/table-tbody.vue.js";
100
+ import _default$42 from "./table/table-td.vue.js";
101
+ import _default$43 from "./table/table-tfoot.vue.js";
102
+ import _default$44 from "./table/table-th.vue.js";
103
+ import _default$45 from "./table/table-thead.vue.js";
104
+ import _default$46 from "./table/table-tr.vue.js";
105
+ import _default$47 from "./table/table.vue.js";
103
106
  import "./table/index.js";
104
- import _default$47 from "./tabs/tabs-list.vue.js";
107
+ import _default$48 from "./tabs/tabs-list.vue.js";
105
108
  import { ActivationMode, TabsExposed, TabsListExposed, TabsListProps, TabsPanelExposed, TabsPanelProps, TabsProps, TabsTabExposed, TabsTabProps } from "./tabs/tabs.types.js";
106
- import _default$48 from "./tabs/tabs-panel.vue.js";
107
- import _default$49 from "./tabs/tabs-tab.vue.js";
108
- import _default$50 from "./tabs/tabs.vue.js";
109
+ import _default$49 from "./tabs/tabs-panel.vue.js";
110
+ import _default$50 from "./tabs/tabs-tab.vue.js";
111
+ import _default$51 from "./tabs/tabs.vue.js";
109
112
  import "./tabs/index.js";
113
+ import { TextExposed, TextProps } from "./text/text.types.js";
114
+ import _default$52 from "./text/text.vue.js";
115
+ import "./text/index.js";
110
116
  import { TextareaExposed, TextareaProps } from "./textarea/textarea.types.js";
111
- import _default$51 from "./textarea/textarea.vue.js";
117
+ import _default$53 from "./textarea/textarea.vue.js";
112
118
  import "./textarea/index.js";
113
119
  import { TooltipContentExposed, TooltipContentProps, TooltipProps, TooltipTriggerExposed, TooltipTriggerProps } from "./tooltip/tooltip.types.js";
114
- import _default$52 from "./tooltip/tooltip-content.vue.js";
115
- import _default$53 from "./tooltip/tooltip-trigger.vue.js";
120
+ import _default$54 from "./tooltip/tooltip-content.vue.js";
121
+ import _default$55 from "./tooltip/tooltip-trigger.vue.js";
116
122
  import { useTooltipId } from "./tooltip/tooltip.context.js";
117
- import _default$54 from "./tooltip/tooltip.vue.js";
123
+ import _default$56 from "./tooltip/tooltip.vue.js";
118
124
  import "./tooltip/index.js";
119
125
  import { VisuallyHiddenExposed, VisuallyHiddenProps } from "./visually-hidden/visually-hidden.types.js";
120
- import _default$55 from "./visually-hidden/visually-hidden.vue.js";
126
+ import _default$57 from "./visually-hidden/visually-hidden.vue.js";
121
127
  import "./visually-hidden/index.js";
122
- export { type ActivationMode, _default as Alert, type AlertExposed, type AlertProps, _default$1 as Anchor, type AnchorExposed, type AnchorProps, _default$2 as Avatar, type AvatarExposed, type AvatarProps, _default$3 as Blockquote, type BlockquoteExposed, type BlockquoteProps, _default$4 as Button, type ButtonExposed, type ButtonProps, _default$5 as Checkbox, type CheckboxExposed, type CheckboxProps, _default$6 as Code, type CodeExposed, type CodeProps, _default$7 as Details, type DetailsExposed, type DetailsProps, _default$11 as Dialog, _default$8 as DialogClose, type DialogCloseExposed, type DialogCloseProps, _default$9 as DialogContent, type DialogContentExposed, type DialogContentProps, type DialogHeadingOptions, type DialogProps, _default$10 as DialogTrigger, type DialogTriggerExposed, type DialogTriggerProps, _default$14 as Dl, _default$12 as DlDd, type DlDdExposed, type DlDdProps, _default$13 as DlDt, type DlDtExposed, type DlDtProps, type DlExposed, type DlProps, _default$18 as Drawer, _default$15 as DrawerClose, type DrawerCloseExposed, type DrawerCloseProps, _default$16 as DrawerContent, type DrawerContentExposed, type DrawerContentProps, type DrawerHeadingOptions, type DrawerProps, _default$17 as DrawerTrigger, type DrawerTriggerExposed, type DrawerTriggerProps, _default$19 as Fieldset, type FieldsetExposed, type FieldsetProps, _default$20 as Heading, type HeadingExposed, type HeadingProps, _default$21 as Hr, type HrExposed, type HrProps, _default$23 as Input, type InputExposed, type InputProps, _default$22 as Label, type LabelExposed, type LabelProps, _default$27 as Menu, _default$24 as MenuContent, type MenuContentExposed, type MenuContentProps, _default$25 as MenuItem, type MenuItemExposed, type MenuItemProps, type MenuProps, _default$26 as MenuTrigger, type MenuTriggerExposed, type MenuTriggerProps, _default$28 as Paragraph, type ParagraphExposed, type ParagraphProps, _default$31 as Popover, _default$29 as PopoverContent, type PopoverContentExposed, type PopoverContentProps, type PopoverProps, _default$30 as PopoverTrigger, type PopoverTriggerExposed, type PopoverTriggerProps, _default$32 as Progress, type ProgressExposed, type ProgressProps, _default$33 as Radio, type RadioExposed, type RadioProps, _default$34 as Radiogroup, type RadiogroupExposed, type RadiogroupProps, _default$35 as Section, type SectionExposed, type SectionProps, _default$37 as SegmentedControl, type SegmentedControlExposed, _default$36 as SegmentedControlItem, type SegmentedControlItemExposed, type SegmentedControlItemProps, type SegmentedControlProps, _default$38 as Select, type SelectExposed, type SelectProps, _default$46 as Table, _default$39 as TableCaption, type TableCaptionExposed, type TableCaptionOwnProps, type TableCaptionProps, type TableExposed, type TableOwnProps, type TableProps, _default$40 as TableTbody, type TableTbodyExposed, type TableTbodyProps, _default$41 as TableTd, type TableTdExposed, type TableTdProps, _default$42 as TableTfoot, type TableTfootExposed, type TableTfootProps, _default$43 as TableTh, type TableThExposed, type TableThProps, _default$44 as TableThead, type TableTheadExposed, type TableTheadProps, _default$45 as TableTr, type TableTrExposed, type TableTrOwnProps, type TableTrProps, _default$50 as Tabs, type TabsExposed, _default$47 as TabsList, type TabsListExposed, type TabsListProps, _default$48 as TabsPanel, type TabsPanelExposed, type TabsPanelProps, type TabsProps, _default$49 as TabsTab, type TabsTabExposed, type TabsTabProps, _default$51 as Textarea, type TextareaExposed, type TextareaProps, _default$54 as Tooltip, _default$52 as TooltipContent, type TooltipContentExposed, type TooltipContentProps, type TooltipProps, _default$53 as TooltipTrigger, type TooltipTriggerExposed, type TooltipTriggerProps, _default$55 as VisuallyHidden, type VisuallyHiddenExposed, type VisuallyHiddenProps, useDialogId, useDrawerId, useMenuId, usePopoverId, useTooltipId };
128
+ export { type ActivationMode, _default as Alert, type AlertExposed, type AlertProps, _default$1 as Anchor, type AnchorExposed, type AnchorProps, _default$2 as Avatar, type AvatarExposed, type AvatarProps, _default$3 as Blockquote, type BlockquoteExposed, type BlockquoteProps, _default$4 as Button, type ButtonExposed, type ButtonProps, _default$5 as Checkbox, type CheckboxExposed, type CheckboxProps, _default$6 as Code, type CodeExposed, type CodeProps, _default$7 as Details, type DetailsExposed, type DetailsProps, _default$11 as Dialog, _default$8 as DialogClose, type DialogCloseExposed, type DialogCloseProps, _default$9 as DialogContent, type DialogContentExposed, type DialogContentProps, type DialogHeadingOptions, type DialogProps, _default$10 as DialogTrigger, type DialogTriggerExposed, type DialogTriggerProps, _default$14 as Dl, _default$12 as DlDd, type DlDdExposed, type DlDdProps, _default$13 as DlDt, type DlDtExposed, type DlDtProps, type DlExposed, type DlProps, _default$18 as Drawer, _default$15 as DrawerClose, type DrawerCloseExposed, type DrawerCloseProps, _default$16 as DrawerContent, type DrawerContentExposed, type DrawerContentProps, type DrawerHeadingOptions, type DrawerProps, _default$17 as DrawerTrigger, type DrawerTriggerExposed, type DrawerTriggerProps, _default$19 as Fieldset, type FieldsetExposed, type FieldsetProps, _default$20 as Heading, type HeadingExposed, type HeadingProps, _default$21 as Hr, type HrExposed, type HrProps, _default$23 as Input, type InputExposed, type InputProps, _default$22 as Label, type LabelExposed, type LabelProps, _default$27 as Menu, _default$24 as MenuContent, type MenuContentExposed, type MenuContentProps, _default$25 as MenuItem, type MenuItemExposed, type MenuItemProps, type MenuProps, _default$26 as MenuTrigger, type MenuTriggerExposed, type MenuTriggerProps, _default$28 as Paragraph, type ParagraphExposed, type ParagraphProps, _default$31 as Popover, _default$29 as PopoverContent, type PopoverContentExposed, type PopoverContentProps, type PopoverProps, _default$30 as PopoverTrigger, type PopoverTriggerExposed, type PopoverTriggerProps, _default$32 as Progress, type ProgressExposed, type ProgressProps, _default$33 as Radio, type RadioExposed, type RadioProps, _default$34 as Radiogroup, type RadiogroupExposed, type RadiogroupProps, _default$35 as Section, type SectionExposed, type SectionProps, _default$37 as SegmentedControl, type SegmentedControlExposed, _default$36 as SegmentedControlItem, type SegmentedControlItemExposed, type SegmentedControlItemProps, type SegmentedControlProps, _default$38 as Select, type SelectExposed, type SelectProps, _default$39 as SkipLink, type SkipLinkExposed, type SkipLinkProps, _default$47 as Table, _default$40 as TableCaption, type TableCaptionExposed, type TableCaptionOwnProps, type TableCaptionProps, type TableExposed, type TableOwnProps, type TableProps, _default$41 as TableTbody, type TableTbodyExposed, type TableTbodyProps, _default$42 as TableTd, type TableTdExposed, type TableTdProps, _default$43 as TableTfoot, type TableTfootExposed, type TableTfootProps, _default$44 as TableTh, type TableThExposed, type TableThProps, _default$45 as TableThead, type TableTheadExposed, type TableTheadProps, _default$46 as TableTr, type TableTrExposed, type TableTrOwnProps, type TableTrProps, _default$51 as Tabs, type TabsExposed, _default$48 as TabsList, type TabsListExposed, type TabsListProps, _default$49 as TabsPanel, type TabsPanelExposed, type TabsPanelProps, type TabsProps, _default$50 as TabsTab, type TabsTabExposed, type TabsTabProps, _default$52 as Text, type TextExposed, type TextProps, _default$53 as Textarea, type TextareaExposed, type TextareaProps, _default$56 as Tooltip, _default$54 as TooltipContent, type TooltipContentExposed, type TooltipContentProps, type TooltipProps, _default$55 as TooltipTrigger, type TooltipTriggerExposed, type TooltipTriggerProps, _default$57 as VisuallyHidden, type VisuallyHiddenExposed, type VisuallyHiddenProps, useDialogId, useDrawerId, useMenuId, usePopoverId, useTooltipId };
@@ -1,10 +1,11 @@
1
1
  import { useHuiAttrs, useHuiClasses, useHuiProps, useHuiStyles } from "../../provider/hui-provider.context.js";
2
2
  import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js";
3
3
  import { attrToBool } from "../../utils/attr-to-bool.js";
4
+ import { useSlotPresence } from "../../utils/use-slot-presence.js";
4
5
  import label_default from "../label/label.js";
5
- import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, defineComponent, mergeProps, normalizeClass, normalizeProps, normalizeStyle, onBeforeUpdate, openBlock, ref, renderSlot, useAttrs, useId, useSlots, useTemplateRef, withCtx } from "vue";
6
+ import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, defineComponent, mergeProps, normalizeClass, normalizeProps, normalizeStyle, openBlock, renderSlot, useAttrs, useId, useSlots, useTemplateRef, withCtx } from "vue";
6
7
  import { inputControl, inputRecipe, toStrbool } from "@hebium-ui/core";
7
- //#region src/components/input/input.vue
8
+ // src/components/input/input.vue
8
9
  const _sfc_main = /*@__PURE__*/ defineComponent({
9
10
  name: "HuiInput",
10
11
  inheritAttrs: false,
@@ -33,12 +34,12 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
33
34
  const attrs = useAttrs();
34
35
  const resolvedProps = useHuiProps("Input", props, attrs);
35
36
  const generatedId = useId();
36
- const hasLabel = ref(Boolean(slots.label || slots.description || slots.error));
37
- const hasError = ref(Boolean(slots.error));
38
- onBeforeUpdate(() => {
39
- hasLabel.value = Boolean(slots.label || slots.description || slots.error);
40
- hasError.value = Boolean(slots.error);
41
- });
37
+ const hasLabel = useSlotPresence(slots, [
38
+ "label",
39
+ "description",
40
+ "error"
41
+ ]);
42
+ const hasError = useSlotPresence(slots, ["error"]);
42
43
  const inputState = computed(() => {
43
44
  const resolved = resolvedProps.value;
44
45
  return {
@@ -61,11 +62,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
61
62
  const forwardedAttrs = useHuiAttrs(resolvedProps, [
62
63
  "id",
63
64
  "color",
64
- "labelProps",
65
- "classes",
66
- "styles",
67
- "class",
68
- "style"
65
+ "labelProps"
69
66
  ]);
70
67
  const inputAttrs = computed(() => ({
71
68
  ...inputControl.getControlAttributes(inputState.value),
@@ -130,7 +127,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
130
127
  }), null, 16)], 6);
131
128
  }
132
129
  var input_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/input/input.vue"]]);
133
- //#endregion
134
130
  export { input_default as default };
135
131
 
136
132
  //# sourceMappingURL=input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.js","names":["_useSlots","Label","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createBlock","_normalizeProps","_mergeProps","_createSlots","_withCtx","_renderSlot","_createCommentVNode","_createElementVNode"],"sources":["../../../src/components/input/input.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n inputControl,\n inputRecipe,\n type InputSlots as InputRecipeSlots,\n toStrbool,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n onBeforeUpdate,\n ref,\n type StyleValue,\n useAttrs,\n useId,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type { HuiElementInstance, HuiElementPropsNoInfer } from \"~/types\";\nimport { attrToBool } from \"~/utils\";\nimport { Label } from \"../label\";\nimport type { InputOwnProps } from \"./input.types\";\n\ndefineOptions({\n name: \"HuiInput\",\n inheritAttrs: false,\n});\n\ntype Props =\n & InputOwnProps\n & {\n classes?:\n | Partial<Record<InputRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<InputRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"input\">,\n keyof InputOwnProps | \"children\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\nconst slots = defineSlots<{\n label?: () => unknown;\n description?: () => unknown;\n error?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Input\", props, attrs);\nconst generatedId = useId();\nconst hasLabel = ref(Boolean(slots.label || slots.description || slots.error));\nconst hasError = ref(Boolean(slots.error));\n\nonBeforeUpdate(() => {\n hasLabel.value = Boolean(slots.label || slots.description || slots.error);\n hasError.value = Boolean(slots.error);\n});\n\nconst inputState = computed(() => {\n const resolved = resolvedProps.value;\n\n return {\n id: resolved.id || generatedId,\n invalid: hasError.value,\n required: attrToBool(resolved.required ?? resolved[\"aria-required\"]),\n disabled: attrToBool(resolved.disabled)\n || attrToBool(resolved[\"aria-disabled\"]),\n readOnly: attrToBool(resolved.readonly)\n || attrToBool(resolved[\"aria-readonly\"]),\n };\n});\nconst recipe = computed(() => {\n const state = inputState.value;\n\n return inputRecipe({\n color: resolvedProps.value.color,\n error: toStrbool(state.invalid),\n });\n});\nconst cls = useHuiClasses(\n \"Input\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Input\", InputRecipeSlots>(\n \"Input\",\n computed(() => props.styles ?? {}),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"id\",\n \"color\",\n \"labelProps\",\n \"classes\",\n \"styles\",\n \"class\",\n \"style\",\n]);\nconst inputAttrs = computed<Record<string, unknown>>(() => ({\n ...inputControl.getControlAttributes(inputState.value),\n ...forwardedAttrs.value,\n}));\nconst labelAttrs = computed<Record<string, unknown>>(() => ({\n ...inputControl.getLabelAttributes(inputState.value),\n ...resolvedProps.value.labelProps,\n}));\nconst inputRef = useTemplateRef<HuiElementInstance<\"input\">>(\"input\");\n\ndefineExpose({\n input: inputRef,\n});\n</script>\n\n<template>\n <div :class=\"cls.root\" :style=\"sls.root\">\n <Label v-if=\"hasLabel\" v-bind=\"labelAttrs\">\n <template v-if=\"slots.label\" #default>\n <slot name=\"label\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n <template v-if=\"slots.error\" #error>\n <slot name=\"error\" />\n </template>\n </Label>\n <input\n ref=\"input\"\n v-bind=\"inputAttrs\"\n :class=\"cls.input\"\n :style=\"sls.input\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgDA,MAAM,QAAQ;EAEd,MAAM,QAAQA,SAAA;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,SAAS,OAAO,KAAK;EACvD,MAAM,cAAc,MAAM;EAC1B,MAAM,WAAW,IAAI,QAAQ,MAAM,SAAS,MAAM,eAAe,MAAM,KAAK,CAAC;EAC7E,MAAM,WAAW,IAAI,QAAQ,MAAM,KAAK,CAAC;EAEzC,qBAAqB;GACnB,SAAS,QAAQ,QAAQ,MAAM,SAAS,MAAM,eAAe,MAAM,KAAK;GACxE,SAAS,QAAQ,QAAQ,MAAM,KAAK;EACtC,CAAC;EAED,MAAM,aAAa,eAAe;GAChC,MAAM,WAAW,cAAc;GAE/B,OAAO;IACL,IAAI,SAAS,MAAM;IACnB,SAAS,SAAS;IAClB,UAAU,WAAW,SAAS,YAAY,SAAS,gBAAgB;IACnE,UAAU,WAAW,SAAS,QAAQ,KACjC,WAAW,SAAS,gBAAgB;IACzC,UAAU,WAAW,SAAS,QAAQ,KACjC,WAAW,SAAS,gBAAgB;GAC3C;EACF,CAAC;EACD,MAAM,SAAS,eAAe;GAC5B,MAAM,QAAQ,WAAW;GAEzB,OAAO,YAAY;IACjB,OAAO,cAAc,MAAM;IAC3B,OAAO,UAAU,MAAM,OAAO;GAChC,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,SACA,QACA,eAAe,MAAM,WAAW,CAAC,CAAC,CACpC;EACA,MAAM,MAAM,aACV,SACA,eAAe,MAAM,UAAU,CAAC,CAAC,CACnC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,aAAa,gBAAyC;GAC1D,GAAG,aAAa,qBAAqB,WAAW,KAAK;GACrD,GAAG,eAAe;EACpB,EAAE;EACF,MAAM,aAAa,gBAAyC;GAC1D,GAAG,aAAa,mBAAmB,WAAW,KAAK;GACnD,GAAG,cAAc,MAAM;EACzB,EAAE;EACF,MAAM,WAAW,eAA4C,OAAO;EAEpE,SAAa,EACX,OAAO,SACT,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAE,UAAA,GAAAC,mBAkBM,OAAA;EAlBA,OAAKC,eAAE,OAAA,IAAI,IAAI;EAAG,OAAKC,eAAE,OAAA,IAAI,IAAI;CACxB,GAAA,CAAA,OAAA,YAAbH,UAAA,GAAAI,YAUQ,OAAA,UAAAC,eAAAC,WAAA,EAAA,KAAA,EAAA,GAVuB,OAAA,UAAU,CAAA,GAAAC,YAAA,EAAA,GAAA,EAAA,GAAA;EACvB,OAAA,MAAM,QAAA;GAAQ,MAAA;GAC5B,IAAAC,cAAqB,CAArBC,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;;;EAEP,OAAA,MAAM,cAAA;GAAc,MAAA;GAClC,IAAAD,cAA2B,CAA3BC,WAA2B,KAAA,QAAA,aAAA,CAAA,CAAA;;;EAEb,OAAA,MAAM,QAAA;GAAQ,MAAA;GAC5B,IAAAD,cAAqB,CAArBC,WAAqB,KAAA,QAAA,OAAA,CAAA,CAAA;;;CAGzB,CAAA,GAAA,IAAA,KAAAC,mBAAA,QAAA,IAAA,GAAAC,mBAKE,SALFL,WAKE,EAJA,KAAI,QAAO,GACH,OAAA,YAAU;EACjB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI"}
1
+ {"version":3,"file":"input.js","names":["_useSlots","Label","_openBlock","_createElementBlock","_normalizeClass","_normalizeStyle","_createBlock","_normalizeProps","_mergeProps","_createSlots","_withCtx","_renderSlot","_createCommentVNode","_createElementVNode"],"sources":["../../../src/components/input/input.vue"],"sourcesContent":["<script setup lang=\"ts\">\nimport {\n inputControl,\n inputRecipe,\n type InputSlots as InputRecipeSlots,\n toStrbool,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useId,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type { HuiElementInstance, HuiElementPropsNoInfer } from \"~/types\";\nimport { attrToBool, useSlotPresence } from \"~/utils\";\nimport { Label } from \"../label\";\nimport type { InputOwnProps } from \"./input.types\";\n\ndefineOptions({\n name: \"HuiInput\",\n inheritAttrs: false,\n});\n\ntype Props =\n & InputOwnProps\n & {\n classes?:\n | Partial<Record<InputRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<InputRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<\"input\">,\n keyof InputOwnProps | \"children\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\nconst slots = defineSlots<{\n label?: () => unknown;\n description?: () => unknown;\n error?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Input\", props, attrs);\nconst generatedId = useId();\nconst hasLabel = useSlotPresence(slots, [\"label\", \"description\", \"error\"]);\nconst hasError = useSlotPresence(slots, [\"error\"]);\n\nconst inputState = computed(() => {\n const resolved = resolvedProps.value;\n\n return {\n id: resolved.id || generatedId,\n invalid: hasError.value,\n required: attrToBool(resolved.required ?? resolved[\"aria-required\"]),\n disabled: attrToBool(resolved.disabled)\n || attrToBool(resolved[\"aria-disabled\"]),\n readOnly: attrToBool(resolved.readonly)\n || attrToBool(resolved[\"aria-readonly\"]),\n };\n});\nconst recipe = computed(() => {\n const state = inputState.value;\n\n return inputRecipe({\n color: resolvedProps.value.color,\n error: toStrbool(state.invalid),\n });\n});\nconst cls = useHuiClasses(\n \"Input\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Input\", InputRecipeSlots>(\n \"Input\",\n computed(() => props.styles ?? {}),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"id\",\n \"color\",\n \"labelProps\",\n]);\nconst inputAttrs = computed<Record<string, unknown>>(() => ({\n ...inputControl.getControlAttributes(inputState.value),\n ...forwardedAttrs.value,\n}));\nconst labelAttrs = computed<Record<string, unknown>>(() => ({\n ...inputControl.getLabelAttributes(inputState.value),\n ...resolvedProps.value.labelProps,\n}));\nconst inputRef = useTemplateRef<HuiElementInstance<\"input\">>(\"input\");\n\ndefineExpose({\n input: inputRef,\n});\n</script>\n\n<template>\n <div :class=\"cls.root\" :style=\"sls.root\">\n <Label v-if=\"hasLabel\" v-bind=\"labelAttrs\">\n <template v-if=\"slots.label\" #default>\n <slot name=\"label\" />\n </template>\n <template v-if=\"slots.description\" #description>\n <slot name=\"description\" />\n </template>\n <template v-if=\"slots.error\" #error>\n <slot name=\"error\" />\n </template>\n </Label>\n <input\n ref=\"input\"\n v-bind=\"inputAttrs\"\n :class=\"cls.input\"\n :style=\"sls.input\"\n />\n </div>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8CA,MAAM,QAAQ;EAEd,MAAM,QAAQA,SAAA;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,SAAS,OAAO,KAAK;EACvD,MAAM,cAAc,MAAM;EAC1B,MAAM,WAAW,gBAAgB,OAAO;GAAC;GAAS;GAAe;EAAO,CAAC;EACzE,MAAM,WAAW,gBAAgB,OAAO,CAAC,OAAO,CAAC;EAEjD,MAAM,aAAa,eAAe;GAChC,MAAM,WAAW,cAAc;GAE/B,OAAO;IACL,IAAI,SAAS,MAAM;IACnB,SAAS,SAAS;IAClB,UAAU,WAAW,SAAS,YAAY,SAAS,gBAAgB;IACnE,UAAU,WAAW,SAAS,QAAQ,KACjC,WAAW,SAAS,gBAAgB;IACzC,UAAU,WAAW,SAAS,QAAQ,KACjC,WAAW,SAAS,gBAAgB;GAC3C;EACF,CAAC;EACD,MAAM,SAAS,eAAe;GAC5B,MAAM,QAAQ,WAAW;GAEzB,OAAO,YAAY;IACjB,OAAO,cAAc,MAAM;IAC3B,OAAO,UAAU,MAAM,OAAO;GAChC,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,SACA,QACA,eAAe,MAAM,WAAW,CAAC,CAAC,CACpC;EACA,MAAM,MAAM,aACV,SACA,eAAe,MAAM,UAAU,CAAC,CAAC,CACnC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;EACF,CAAC;EACD,MAAM,aAAa,gBAAyC;GAC1D,GAAG,aAAa,qBAAqB,WAAW,KAAK;GACrD,GAAG,eAAe;EACpB,EAAE;EACF,MAAM,aAAa,gBAAyC;GAC1D,GAAG,aAAa,mBAAmB,WAAW,KAAK;GACnD,GAAG,cAAc,MAAM;EACzB,EAAE;EACF,MAAM,WAAW,eAA4C,OAAO;EAEpE,SAAa,EACX,OAAO,SACT,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAE,UAAA,GAAAC,mBAkBM,OAAA;EAlBA,OAAKC,eAAE,OAAA,IAAI,IAAI;EAAG,OAAKC,eAAE,OAAA,IAAI,IAAI;C,IACxB,OAAA,YAAbH,UAAA,GAAAI,YAUQ,OAAA,UAAAC,eAAAC,WAAA,EAAA,KAAA,EAAA,GAVuB,OAAA,UAAU,CAAA,GAAAC,YAAA,EAAA,GAAA,EAAA,GAAA;EACvB,OAAA,MAAM,Q;GAAQ,MAAA;GAC5B,IAAAC,cAAqB,CAArBC,WAAqB,KAAA,QAAA,OAAA,C;;;EAEP,OAAA,MAAM,c;GAAc,MAAA;GAClC,IAAAD,cAA2B,CAA3BC,WAA2B,KAAA,QAAA,aAAA,C;;;EAEb,OAAA,MAAM,Q;GAAQ,MAAA;GAC5B,IAAAD,cAAqB,CAArBC,WAAqB,KAAA,QAAA,OAAA,C;;;C,+CAGzBE,mBAKE,SALFL,WAKE,EAJA,KAAI,QAAO,GACH,OAAA,YAAU;EACjB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI"}
@@ -4,7 +4,6 @@ import "../../types/index.js";
4
4
  import { LabelProps } from "../label/label.types.js";
5
5
  import "../label/index.js";
6
6
  import { InputSlots, InputVariants } from "@hebium-ui/core";
7
- //#region src/components/input/input.types.d.ts
8
7
  type HtmlInputProps = Omit<HuiElementProps<"input">, "children" | "color">;
9
8
  export interface InputOwnProps {
10
9
  /**
@@ -22,6 +21,5 @@ export type InputProps = HuiComponentProps<HtmlInputProps & InputOwnProps, Input
22
21
  export interface InputExposed {
23
22
  readonly input: HuiElementInstance<"input"> | null;
24
23
  }
25
- //#endregion
26
24
  export {};
27
25
  //# sourceMappingURL=input.types.d.ts.map
@@ -3,7 +3,6 @@ import "../../types/index.js";
3
3
  import { InputOwnProps } from "./input.types.js";
4
4
  import { ClassValue, StyleValue } from "vue";
5
5
  import { InputSlots } from "@hebium-ui/core";
6
- //#region src/components/input/input.vue.d.ts
7
6
  type Props = InputOwnProps & {
8
7
  classes?: Partial<Record<InputSlots, ClassValue | undefined>> | undefined;
9
8
  styles?: Partial<Record<InputSlots, StyleValue | undefined>> | undefined;
@@ -23,6 +22,5 @@ type __VLS_WithSlots<T, S> = T & {
23
22
  $slots: S;
24
23
  };
25
24
  };
26
- //#endregion
27
25
  export { _default as default };
28
26
  //# sourceMappingURL=input.vue.d.ts.map
@@ -3,7 +3,7 @@ import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js"
3
3
  import { attrToBool } from "../../utils/attr-to-bool.js";
4
4
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, openBlock, renderSlot, resolveDynamicComponent, toRaw, useAttrs, useSlots, useTemplateRef, withCtx } from "vue";
5
5
  import { DEFAULT_LABEL_MAKER, labelMarker, labelRecipe } from "@hebium-ui/core";
6
- //#region src/components/label/label.vue
6
+ // src/components/label/label.vue
7
7
  const _sfc_main = /*@__PURE__*/ defineComponent({
8
8
  name: "HuiLabel",
9
9
  inheritAttrs: false,
@@ -61,11 +61,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
61
61
  "variant",
62
62
  "marker",
63
63
  "data-required",
64
- "dataRequired",
65
- "classes",
66
- "styles",
67
- "class",
68
- "style"
64
+ "dataRequired"
69
65
  ]);
70
66
  const markerAriaLabel = computed(() => {
71
67
  const marker = resolvedMarker.value;
@@ -136,7 +132,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
136
132
  }, 16, ["class", "style"]);
137
133
  }
138
134
  var label_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/label/label.vue"]]);
139
- //#endregion
140
135
  export { label_default as default };
141
136
 
142
137
  //# sourceMappingURL=label.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.js","names":["_useSlots","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_createElementBlock","_normalizeClass","_normalizeStyle","_renderSlot","_createCommentVNode","_createVNode","_createElementVNode"],"sources":["../../../src/components/label/label.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'label'\"\n>\nimport {\n DEFAULT_LABEL_MAKER,\n labelMarker,\n type LabelMarkerData,\n labelRecipe,\n type LabelSlots as LabelRecipeSlots,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n toRaw,\n useAttrs,\n useTemplateRef,\n type VNodeChild,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type {\n ElementType,\n HuiElementInstance,\n HuiElementPropsNoInfer,\n} from \"~/types\";\nimport { attrToBool } from \"~/utils\";\nimport type { LabelOwnProps } from \"./label.types\";\n\ndefineOptions({\n name: \"HuiLabel\",\n inheritAttrs: false,\n});\n\ntype Props =\n & LabelOwnProps\n & { as?: E | undefined }\n & {\n classes?:\n | Partial<Record<LabelRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<LabelRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n | keyof LabelOwnProps\n | \"as\"\n | \"classes\"\n | \"styles\"\n | \"class\"\n | \"style\"\n >;\n\nconst props = withDefaults(defineProps<Props>(), {\n \"data-required\": undefined,\n});\n\nconst slots = defineSlots<{\n default?: () => unknown;\n description?: () => unknown;\n error?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Label\", props, attrs);\nconst component = computed<E | \"label\">(() =>\n toRaw(resolvedProps.value.as ?? \"label\")\n);\nconst resolvedMarker = computed<LabelMarkerData<VNodeChild>>(() => {\n const resolved = resolvedProps.value;\n\n return labelMarker(\n resolved.marker ?? DEFAULT_LABEL_MAKER,\n attrToBool(resolved[\"dataRequired\"] ?? resolved[\"data-required\"]),\n );\n});\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n const marker = resolvedMarker.value;\n\n return labelRecipe({\n marker: marker.label ? marker.variant : undefined,\n variant: resolved.variant,\n });\n});\nconst cls = useHuiClasses(\n \"Label\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Label\", LabelRecipeSlots>(\n \"Label\",\n computed(() => props.styles ?? {}),\n);\nconst rootAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"variant\",\n \"marker\",\n \"data-required\",\n \"dataRequired\",\n \"classes\",\n \"styles\",\n \"class\",\n \"style\",\n]);\nconst markerAriaLabel = computed(() => {\n const marker = resolvedMarker.value;\n return \"aria-label\" in marker ? marker[\"aria-label\"] : undefined;\n});\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\nconst MarkerLabel = (): VNodeChild => resolvedMarker.value.label;\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <component\n :is=\"component\"\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n >\n <span\n v-if=\"slots.default\"\n :class=\"cls.fieldName\"\n :style=\"sls.fieldName\"\n >\n <slot />\n </span>\n <span\n v-if=\"resolvedMarker.label\"\n :aria-label=\"markerAriaLabel\"\n :class=\"cls.fieldMarker\"\n :style=\"sls.fieldMarker\"\n >\n <MarkerLabel />\n </span>\n <p\n v-if=\"slots.description\"\n :class=\"cls.description\"\n :style=\"sls.description\"\n >\n <slot name=\"description\" />\n </p>\n <p\n v-if=\"slots.error\"\n :class=\"cls.error\"\n :style=\"sls.error\"\n >\n <span\n aria-hidden=\"true\"\n :class=\"cls.errorIcon\"\n :style=\"sls.errorIcon\"\n />\n <span :class=\"cls.errorMessage\" :style=\"sls.errorMessage\">\n <slot name=\"error\" />\n </span>\n </p>\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6DA,MAAM,QAAQ;EAId,MAAM,QAAQA,SAAA;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,SAAS,OAAO,KAAK;EACvD,MAAM,YAAY,eAChB,MAAM,cAAc,MAAM,MAAM,OAAO,CACzC;EACA,MAAM,iBAAiB,eAA4C;GACjE,MAAM,WAAW,cAAc;GAE/B,OAAO,YACL,SAAS,UAAU,qBACnB,WAAW,SAAS,mBAAmB,SAAS,gBAAgB,CAClE;EACF,CAAC;EACD,MAAM,SAAS,eAAe;GAC5B,MAAM,WAAW,cAAc;GAC/B,MAAM,SAAS,eAAe;GAE9B,OAAO,YAAY;IACjB,QAAQ,OAAO,QAAQ,OAAO,UAAU,KAAA;IACxC,SAAS,SAAS;GACpB,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,SACA,QACA,eAAe,MAAM,WAAW,CAAC,CAAC,CACpC;EACA,MAAM,MAAM,aACV,SACA,eAAe,MAAM,UAAU,CAAC,CAAC,CACnC;EACA,MAAM,YAAY,YAAY,eAAe;GAC3C;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,kBAAkB,eAAe;GACrC,MAAM,SAAS,eAAe;GAC9B,OAAO,gBAAgB,SAAS,OAAO,gBAAgB,KAAA;EACzD,CAAC;EACD,MAAM,UAAU,eAAsC,MAAM;EAE5D,MAAM,oBAAgC,eAAe,MAAM;EAE3D,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAC,UAAA,GAAAC,YA2CYC,wBA1CL,OAAA,SAAS,GADhBC,WA2CY,EAzCV,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;;EAEZ,SAAAC,cAMO;GALC,OAAA,MAAM,WADdJ,UAAA,GAAAK,mBAMO,QAAA;;IAJJ,OAAKC,eAAE,OAAA,IAAI,SAAS;IACpB,OAAKC,eAAE,OAAA,IAAI,SAAS;GAErB,GAAA,CAAAC,WAAQ,KAAA,QAAA,SAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,QAAA,IAAA;GAGF,OAAA,eAAe,SADvBR,UAAA,GAAAK,mBAOO,QAAA;;IALJ,cAAY,OAAA;IACZ,OAAKC,eAAE,OAAA,IAAI,WAAW;IACtB,OAAKC,eAAE,OAAA,IAAI,WAAW;GAEvB,GAAA,CAAAG,YAAe,OAAA,cAAA,CAAA,GAAA,IAAA,UAAA,KAAAD,mBAAA,QAAA,IAAA;GAGT,OAAA,MAAM,eADdT,UAAA,GAAAK,mBAMI,KAAA;;IAJD,OAAKC,eAAE,OAAA,IAAI,WAAW;IACtB,OAAKC,eAAE,OAAA,IAAI,WAAW;GAEvB,GAAA,CAAAC,WAA2B,KAAA,QAAA,aAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,QAAA,IAAA;GAGrB,OAAA,MAAM,SADdR,UAAA,GAAAK,mBAaI,KAAA;;IAXD,OAAKC,eAAE,OAAA,IAAI,KAAK;IAChB,OAAKC,eAAE,OAAA,IAAI,KAAK;GAEjB,GAAA,CAAAI,mBAIE,QAAA;IAHA,eAAY;IACX,OAAKL,eAAE,OAAA,IAAI,SAAS;IACpB,OAAKC,eAAE,OAAA,IAAI,SAAS;GAEvB,GAAA,MAAA,CAAA,GAAAI,mBAEO,QAAA;IAFA,OAAKL,eAAE,OAAA,IAAI,YAAY;IAAG,OAAKC,eAAE,OAAA,IAAI,YAAY;GACtD,GAAA,CAAAC,WAAqB,KAAA,QAAA,OAAA,CAAA,GAAA,CAAA,CAAA,GAAA,CAAA,KAAA,mBAAA,QAAA,IAAA"}
1
+ {"version":3,"file":"label.js","names":["_useSlots","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_createElementBlock","_normalizeClass","_normalizeStyle","_renderSlot","_createCommentVNode","_createVNode","_createElementVNode"],"sources":["../../../src/components/label/label.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'label'\"\n>\nimport {\n DEFAULT_LABEL_MAKER,\n labelMarker,\n type LabelMarkerData,\n labelRecipe,\n type LabelSlots as LabelRecipeSlots,\n} from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n toRaw,\n useAttrs,\n useTemplateRef,\n type VNodeChild,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type {\n ElementType,\n HuiElementInstance,\n HuiElementPropsNoInfer,\n} from \"~/types\";\nimport { attrToBool } from \"~/utils\";\nimport type { LabelOwnProps } from \"./label.types\";\n\ndefineOptions({\n name: \"HuiLabel\",\n inheritAttrs: false,\n});\n\ntype Props =\n & LabelOwnProps\n & { as?: E | undefined }\n & {\n classes?:\n | Partial<Record<LabelRecipeSlots, ClassValue | undefined>>\n | undefined;\n styles?:\n | Partial<Record<LabelRecipeSlots, StyleValue | undefined>>\n | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n | keyof LabelOwnProps\n | \"as\"\n | \"classes\"\n | \"styles\"\n | \"class\"\n | \"style\"\n >;\n\nconst props = withDefaults(defineProps<Props>(), {\n \"data-required\": undefined,\n});\n\nconst slots = defineSlots<{\n default?: () => unknown;\n description?: () => unknown;\n error?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"Label\", props, attrs);\nconst component = computed<E | \"label\">(() =>\n toRaw(resolvedProps.value.as ?? \"label\")\n);\nconst resolvedMarker = computed<LabelMarkerData<VNodeChild>>(() => {\n const resolved = resolvedProps.value;\n\n return labelMarker(\n resolved.marker ?? DEFAULT_LABEL_MAKER,\n attrToBool(resolved[\"dataRequired\"] ?? resolved[\"data-required\"]),\n );\n});\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n const marker = resolvedMarker.value;\n\n return labelRecipe({\n marker: marker.label ? marker.variant : undefined,\n variant: resolved.variant,\n });\n});\nconst cls = useHuiClasses(\n \"Label\",\n recipe,\n computed(() => props.classes ?? {}),\n);\nconst sls = useHuiStyles<\"Label\", LabelRecipeSlots>(\n \"Label\",\n computed(() => props.styles ?? {}),\n);\nconst rootAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"variant\",\n \"marker\",\n \"data-required\",\n \"dataRequired\",\n]);\nconst markerAriaLabel = computed(() => {\n const marker = resolvedMarker.value;\n return \"aria-label\" in marker ? marker[\"aria-label\"] : undefined;\n});\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\nconst MarkerLabel = (): VNodeChild => resolvedMarker.value.label;\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <component\n :is=\"component\"\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n >\n <span\n v-if=\"slots.default\"\n :class=\"cls.fieldName\"\n :style=\"sls.fieldName\"\n >\n <slot />\n </span>\n <span\n v-if=\"resolvedMarker.label\"\n :aria-label=\"markerAriaLabel\"\n :class=\"cls.fieldMarker\"\n :style=\"sls.fieldMarker\"\n >\n <MarkerLabel />\n </span>\n <p\n v-if=\"slots.description\"\n :class=\"cls.description\"\n :style=\"sls.description\"\n >\n <slot name=\"description\" />\n </p>\n <p\n v-if=\"slots.error\"\n :class=\"cls.error\"\n :style=\"sls.error\"\n >\n <span\n aria-hidden=\"true\"\n :class=\"cls.errorIcon\"\n :style=\"sls.errorIcon\"\n />\n <span :class=\"cls.errorMessage\" :style=\"sls.errorMessage\">\n <slot name=\"error\" />\n </span>\n </p>\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6DA,MAAM,QAAQ;EAId,MAAM,QAAQA,SAAA;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,SAAS,OAAO,KAAK;EACvD,MAAM,YAAY,eAChB,MAAM,cAAc,MAAM,MAAM,OAAO,CACzC;EACA,MAAM,iBAAiB,eAA4C;GACjE,MAAM,WAAW,cAAc;GAE/B,OAAO,YACL,SAAS,UAAU,qBACnB,WAAW,SAAS,mBAAmB,SAAS,gBAAgB,CAClE;EACF,CAAC;EACD,MAAM,SAAS,eAAe;GAC5B,MAAM,WAAW,cAAc;GAC/B,MAAM,SAAS,eAAe;GAE9B,OAAO,YAAY;IACjB,QAAQ,OAAO,QAAQ,OAAO,UAAU,KAAA;IACxC,SAAS,SAAS;GACpB,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,SACA,QACA,eAAe,MAAM,WAAW,CAAC,CAAC,CACpC;EACA,MAAM,MAAM,aACV,SACA,eAAe,MAAM,UAAU,CAAC,CAAC,CACnC;EACA,MAAM,YAAY,YAAY,eAAe;GAC3C;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,kBAAkB,eAAe;GACrC,MAAM,SAAS,eAAe;GAC9B,OAAO,gBAAgB,SAAS,OAAO,gBAAgB,KAAA;EACzD,CAAC;EACD,MAAM,UAAU,eAAsC,MAAM;EAE5D,MAAM,oBAAgC,eAAe,MAAM;EAE3D,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAC,UAAA,GAAAC,YA2CYC,wBA1CL,OAAA,SAAS,GADhBC,WA2CY,EAzCV,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;;EAEZ,SAAAC,cAMO;GALC,OAAA,MAAM,WADdJ,UAAA,GAAAK,mBAMO,QAAA;;IAJJ,OAAKC,eAAE,OAAA,IAAI,SAAS;IACpB,OAAKC,eAAE,OAAA,IAAI,SAAS;G,IAErBC,WAAQ,KAAA,QAAA,SAAA,C;GAGF,OAAA,eAAe,SADvBR,UAAA,GAAAK,mBAOO,QAAA;;IALJ,cAAY,OAAA;IACZ,OAAKC,eAAE,OAAA,IAAI,WAAW;IACtB,OAAKC,eAAE,OAAA,IAAI,WAAW;G,IAEvBG,YAAe,OAAA,cAAA,C;GAGT,OAAA,MAAM,eADdV,UAAA,GAAAK,mBAMI,KAAA;;IAJD,OAAKC,eAAE,OAAA,IAAI,WAAW;IACtB,OAAKC,eAAE,OAAA,IAAI,WAAW;G,IAEvBC,WAA2B,KAAA,QAAA,aAAA,C;GAGrB,OAAA,MAAM,SADdR,UAAA,GAAAK,mBAaI,KAAA;;IAXD,OAAKC,eAAE,OAAA,IAAI,KAAK;IAChB,OAAKC,eAAE,OAAA,IAAI,KAAK;G,IAEjBI,mBAIE,QAAA;IAHA,eAAY;IACX,OAAKL,eAAE,OAAA,IAAI,SAAS;IACpB,OAAKC,eAAE,OAAA,IAAI,SAAS;G,aAEvBI,mBAEO,QAAA;IAFA,OAAKL,eAAE,OAAA,IAAI,YAAY;IAAG,OAAKC,eAAE,OAAA,IAAI,YAAY;G,IACtDC,WAAqB,KAAA,QAAA,OAAA,C"}
@@ -3,7 +3,6 @@ import { HuiPolymorphicProps } from "../../types/polymorphic.js";
3
3
  import "../../types/index.js";
4
4
  import { VNodeChild } from "vue";
5
5
  import { LabelMarker, LabelSlots, LabelVariants } from "@hebium-ui/core";
6
- //#region src/components/label/label.types.d.ts
7
6
  export interface LabelOwnProps {
8
7
  /**
9
8
  * The visual state of the label.
@@ -22,5 +21,4 @@ export type LabelProps<E extends ElementType = "label"> = HuiPolymorphicProps<E,
22
21
  export interface LabelExposed<E extends ElementType = "label"> {
23
22
  readonly root: HuiElementInstance<E> | null;
24
23
  }
25
- //#endregion
26
24
  //# sourceMappingURL=label.types.d.ts.map
@@ -3,14 +3,13 @@ import "../../types/index.js";
3
3
  import { LabelOwnProps } from "./label.types.js";
4
4
  import { ClassValue, StyleValue } from "vue";
5
5
  import { LabelSlots } from "@hebium-ui/core";
6
- //#region src/components/label/label.vue.d.ts
7
6
  declare const __VLS_export: <E extends ElementType = "label">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
7
  props: import("vue").PublicProps & __VLS_PrettifyLocal<LabelOwnProps & {
9
8
  as?: E | undefined;
10
9
  } & {
11
10
  classes?: Partial<Record<LabelSlots, ClassValue | undefined>> | undefined;
12
11
  styles?: Partial<Record<LabelSlots, StyleValue | undefined>> | undefined;
13
- } & Omit<HuiElementPropsNoInfer<E>, "style" | "as" | "class" | "classes" | "styles" | keyof LabelOwnProps>> & (typeof globalThis extends {
12
+ } & Omit<HuiElementPropsNoInfer<E>, "class" | "style" | "classes" | "styles" | "as" | keyof LabelOwnProps>> & (typeof globalThis extends {
14
13
  __VLS_PROPS_FALLBACK: infer P;
15
14
  } ? P : {});
16
15
  expose: (exposed: import("vue").ShallowUnwrapRef<{
@@ -28,6 +27,5 @@ declare const __VLS_export: <E extends ElementType = "label">(__VLS_props: NonNu
28
27
  };
29
28
  declare const _default: typeof __VLS_export;
30
29
  type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
31
- //#endregion
32
30
  export { _default as default };
33
31
  //# sourceMappingURL=label.vue.d.ts.map
@@ -3,7 +3,7 @@ import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js"
3
3
  import { useMenuId } from "./menu.context.js";
4
4
  import { computed, createBlock, defineComponent, mergeProps, openBlock, renderSlot, resolveDynamicComponent, useAttrs, useTemplateRef, withCtx } from "vue";
5
5
  import { menuControl, popoverRecipe } from "@hebium-ui/core";
6
- //#region src/components/menu/menu-content.vue
6
+ // src/components/menu/menu-content.vue
7
7
  const _sfc_main = /*@__PURE__*/ defineComponent({
8
8
  name: "HuiMenuContent",
9
9
  inheritAttrs: false,
@@ -75,8 +75,6 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
75
75
  "fallbacks",
76
76
  "visibility",
77
77
  "padding",
78
- "class",
79
- "style",
80
78
  "aria-label",
81
79
  "aria-labelledby"
82
80
  ]);
@@ -122,7 +120,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
122
120
  }, 16, ["class", "style"]);
123
121
  }
124
122
  var menu_content_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/menu/menu-content.vue"]]);
125
- //#endregion
126
123
  export { menu_content_default as default };
127
124
 
128
125
  //# sourceMappingURL=menu-content.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-content.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/menu/menu-content.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'div'\"\n>\nimport { menuControl, popoverRecipe } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type {\n ElementType,\n HuiElementInstance,\n HuiElementPropsNoInfer,\n} from \"~/types\";\nimport { useMenuId } from \"./menu.context\";\nimport type { MenuContentOwnProps } from \"./menu.types\";\n\ndefineOptions({\n name: \"HuiMenuContent\",\n inheritAttrs: false,\n});\n\ntype Props =\n & MenuContentOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof MenuContentOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"MenuContent\", props, attrs);\nconst component = computed<E | \"div\">(() => resolvedProps.value.as ?? \"div\");\nconst menuId = useMenuId();\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n return popoverRecipe({\n position: resolved.position,\n fallbacks: resolved.fallbacks,\n visibility: resolved.visibility,\n padding: resolved.padding ?? \"sm\",\n });\n});\nconst cls = useHuiClasses(\n \"MenuContent\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"MenuContent\",\n computed(() => ({ root: props.style })),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"position\",\n \"fallbacks\",\n \"visibility\",\n \"padding\",\n \"class\",\n \"style\",\n \"aria-label\",\n \"aria-labelledby\",\n]);\nconst rootAttrs = computed<Record<string, unknown>>(() => {\n const resolved = resolvedProps.value;\n return {\n ...menuControl.getContentAttributes(\n { menuId: menuId.value },\n {\n ariaLabel: resolved[\"aria-label\"],\n ariaLabelledBy: resolved[\"aria-labelledby\"],\n },\n ),\n ...forwardedAttrs.value,\n };\n});\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <component\n :is=\"component\"\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4CA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,eAAe,OAAO,KAAK;EAC7D,MAAM,YAAY,eAA0B,cAAc,MAAM,MAAM,KAAK;EAC3E,MAAM,SAAS,UAAU;EACzB,MAAM,SAAS,eAAe;GAC5B,MAAM,WAAW,cAAc;GAC/B,OAAO,cAAc;IACnB,UAAU,SAAS;IACnB,WAAW,SAAS;IACpB,YAAY,SAAS;IACrB,SAAS,SAAS,WAAW;GAC/B,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,eACA,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,eACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,YAAY,eAAwC;GACxD,MAAM,WAAW,cAAc;GAC/B,OAAO;IACL,GAAG,YAAY,qBACb,EAAE,QAAQ,OAAO,MAAM,GACvB;KACE,WAAW,SAAS;KACpB,gBAAgB,SAAS;IAC3B,CACF;IACA,GAAG,eAAe;GACpB;EACF,CAAC;EACD,MAAM,UAAU,eAAsC,MAAM;EAE5D,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAA,UAAA,GAAAC,YAQYC,wBAPL,OAAA,SAAS,GADhBC,WAQY,EANV,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;;EAEZ,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"menu-content.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/menu/menu-content.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'div'\"\n>\nimport { menuControl, popoverRecipe } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type {\n ElementType,\n HuiElementInstance,\n HuiElementPropsNoInfer,\n} from \"~/types\";\nimport { useMenuId } from \"./menu.context\";\nimport type { MenuContentOwnProps } from \"./menu.types\";\n\ndefineOptions({\n name: \"HuiMenuContent\",\n inheritAttrs: false,\n});\n\ntype Props =\n & MenuContentOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof MenuContentOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"MenuContent\", props, attrs);\nconst component = computed<E | \"div\">(() => resolvedProps.value.as ?? \"div\");\nconst menuId = useMenuId();\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n return popoverRecipe({\n position: resolved.position,\n fallbacks: resolved.fallbacks,\n visibility: resolved.visibility,\n padding: resolved.padding ?? \"sm\",\n });\n});\nconst cls = useHuiClasses(\n \"MenuContent\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"MenuContent\",\n computed(() => ({ root: props.style })),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"position\",\n \"fallbacks\",\n \"visibility\",\n \"padding\",\n \"aria-label\",\n \"aria-labelledby\",\n]);\nconst rootAttrs = computed<Record<string, unknown>>(() => {\n const resolved = resolvedProps.value;\n return {\n ...menuControl.getContentAttributes(\n { menuId: menuId.value },\n {\n ariaLabel: resolved[\"aria-label\"],\n ariaLabelledBy: resolved[\"aria-labelledby\"],\n },\n ),\n ...forwardedAttrs.value,\n };\n});\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <component\n :is=\"component\"\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4CA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,eAAe,OAAO,KAAK;EAC7D,MAAM,YAAY,eAA0B,cAAc,MAAM,MAAM,KAAK;EAC3E,MAAM,SAAS,UAAU;EACzB,MAAM,SAAS,eAAe;GAC5B,MAAM,WAAW,cAAc;GAC/B,OAAO,cAAc;IACnB,UAAU,SAAS;IACnB,WAAW,SAAS;IACpB,YAAY,SAAS;IACrB,SAAS,SAAS,WAAW;GAC/B,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,eACA,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,eACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,YAAY,eAAwC;GACxD,MAAM,WAAW,cAAc;GAC/B,OAAO;IACL,GAAG,YAAY,qBACb,EAAE,QAAQ,OAAO,MAAM,GACvB;KACE,WAAW,SAAS;KACpB,gBAAgB,SAAS;IAC3B,CACF;IACA,GAAG,eAAe;GACpB;EACF,CAAC;EACD,MAAM,UAAU,eAAsC,MAAM;EAE5D,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAA,UAAA,GAAAC,YAQYC,wBAPL,OAAA,SAAS,GADhBC,WAQY,EANV,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;;EAEZ,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,C"}
@@ -2,14 +2,13 @@ import { ElementType, HuiElementInstance, HuiElementPropsNoInfer } from "../../t
2
2
  import "../../types/index.js";
3
3
  import { MenuContentOwnProps } from "./menu.types.js";
4
4
  import { ClassValue, StyleValue } from "vue";
5
- //#region src/components/menu/menu-content.vue.d.ts
6
5
  declare const __VLS_export: <E extends ElementType = "div">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
6
  props: import("vue").PublicProps & __VLS_PrettifyLocal<MenuContentOwnProps & {
8
7
  as?: E | undefined;
9
8
  } & {
10
9
  class?: ClassValue | undefined;
11
10
  style?: StyleValue | undefined;
12
- } & Omit<HuiElementPropsNoInfer<E>, "style" | "as" | "class" | keyof MenuContentOwnProps>> & (typeof globalThis extends {
11
+ } & Omit<HuiElementPropsNoInfer<E>, "class" | "style" | "as" | keyof MenuContentOwnProps>> & (typeof globalThis extends {
13
12
  __VLS_PROPS_FALLBACK: infer P;
14
13
  } ? P : {});
15
14
  expose: (exposed: import("vue").ShallowUnwrapRef<{
@@ -25,6 +24,5 @@ declare const __VLS_export: <E extends ElementType = "div">(__VLS_props: NonNull
25
24
  };
26
25
  declare const _default: typeof __VLS_export;
27
26
  type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
28
- //#endregion
29
27
  export { _default as default };
30
28
  //# sourceMappingURL=menu-content.vue.d.ts.map
@@ -4,7 +4,7 @@ import { attrToBool } from "../../utils/attr-to-bool.js";
4
4
  import { useMenuId } from "./menu.context.js";
5
5
  import { computed, createBlock, defineComponent, mergeProps, openBlock, renderSlot, resolveDynamicComponent, useAttrs, useTemplateRef, withCtx } from "vue";
6
6
  import { menuControl, menuitemRecipe } from "@hebium-ui/core";
7
- //#region src/components/menu/menu-item.vue
7
+ // src/components/menu/menu-item.vue
8
8
  const _sfc_main = /*@__PURE__*/ defineComponent({
9
9
  name: "HuiMenuItem",
10
10
  inheritAttrs: false,
@@ -69,8 +69,6 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
69
69
  const sls = useHuiStyles("MenuItem", computed(() => ({ root: props.style })));
70
70
  const forwardedAttrs = useHuiAttrs(resolvedProps, [
71
71
  "as",
72
- "class",
73
- "style",
74
72
  "color",
75
73
  "focusKey",
76
74
  "activation",
@@ -159,7 +157,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
159
157
  }, 16, ["class", "style"]);
160
158
  }
161
159
  var menu_item_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/menu/menu-item.vue"]]);
162
- //#endregion
163
160
  export { menu_item_default as default };
164
161
 
165
162
  //# sourceMappingURL=menu-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-item.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/menu/menu-item.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'div'\"\n>\nimport { menuControl, menuitemRecipe } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type {\n ElementType,\n HuiElementInstance,\n HuiElementPropsNoInfer,\n} from \"~/types\";\nimport { attrToBool } from \"~/utils\";\nimport { useMenuId } from \"./menu.context\";\nimport type { MenuItemOwnProps } from \"./menu.types\";\n\ndefineOptions({\n name: \"HuiMenuItem\",\n inheritAttrs: false,\n});\n\ntype Props =\n & MenuItemOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof MenuItemOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"MenuItem\", props, attrs);\nconst component = computed<E | \"div\">(() => resolvedProps.value.as ?? \"div\");\nconst menuId = useMenuId();\nconst isDisabled = computed(() =>\n attrToBool(resolvedProps.value[\"aria-disabled\"])\n);\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n return menuitemRecipe({\n color: resolved.color,\n });\n});\nconst cls = useHuiClasses(\n \"MenuItem\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"MenuItem\",\n computed(() => ({ root: props.style })),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"class\",\n \"style\",\n \"color\",\n \"focusKey\",\n \"activation\",\n \"onAction\",\n \"onClick\",\n \"onKeydown\",\n \"aria-disabled\",\n]);\nconst rootAttrs = computed<Record<string, unknown>>(() => {\n const resolved = resolvedProps.value;\n return {\n ...menuControl.getItemAttributes(\n { menuId: menuId.value },\n {\n focusKey: resolved.focusKey,\n disabled: resolved[\"aria-disabled\"] == null\n ? undefined\n : isDisabled.value,\n },\n ),\n ...forwardedAttrs.value,\n };\n});\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\nfunction handleClick(event: MouseEvent): void {\n const resolved = resolvedProps.value;\n const onClick = resolved[\"onClick\"];\n if (typeof onClick === \"function\") onClick(event);\n\n menuControl.handleMenuitemActivation(\n event,\n menuId.value,\n {\n activation: resolved.activation ?? \"managed\",\n disabled: isDisabled.value,\n },\n resolvedProps.value.onAction,\n );\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n const resolved = resolvedProps.value;\n const onKeydown = resolved[\"onKeydown\"];\n if (typeof onKeydown === \"function\") onKeydown(event);\n if (event.defaultPrevented) return;\n\n const action = menuControl.handleMenuitemKeydown(\n event,\n resolved.activation ?? \"managed\",\n );\n switch (action) {\n case \"action\":\n menuControl.handleMenuitemActivation(event, menuId.value, {\n activation: resolved.activation ?? \"managed\",\n disabled: isDisabled.value,\n }, resolvedProps.value.onAction);\n return;\n case \"focus-move\":\n menuControl.moveMenuitemFocus(event, menuId.value);\n return;\n case \"focus-set\":\n menuControl.setMenuitemFocus(event, menuId.value);\n return;\n case \"focus-out\":\n menuControl.hideMenu(menuId.value);\n return;\n case \"none\":\n return;\n }\n}\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <component\n :is=\"component\"\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n @click=\"handleClick\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,YAAY,OAAO,KAAK;EAC1D,MAAM,YAAY,eAA0B,cAAc,MAAM,MAAM,KAAK;EAC3E,MAAM,SAAS,UAAU;EACzB,MAAM,aAAa,eACjB,WAAW,cAAc,MAAM,gBAAgB,CACjD;EACA,MAAM,SAAS,eAAe;GAC5B,MAAM,WAAW,cAAc;GAC/B,OAAO,eAAe,EACpB,OAAO,SAAS,MAClB,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,YACA,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,YACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,YAAY,eAAwC;GACxD,MAAM,WAAW,cAAc;GAC/B,OAAO;IACL,GAAG,YAAY,kBACb,EAAE,QAAQ,OAAO,MAAM,GACvB;KACE,UAAU,SAAS;KACnB,UAAU,SAAS,oBAAoB,OACnC,KAAA,IACA,WAAW;IACjB,CACF;IACA,GAAG,eAAe;GACpB;EACF,CAAC;EACD,MAAM,UAAU,eAAsC,MAAM;EAE5D,SAAS,YAAY,OAAyB;GAC5C,MAAM,WAAW,cAAc;GAC/B,MAAM,UAAU,SAAS;GACzB,IAAI,OAAO,YAAY,YAAY,QAAQ,KAAK;GAEhD,YAAY,yBACV,OACA,OAAO,OACP;IACE,YAAY,SAAS,cAAc;IACnC,UAAU,WAAW;GACvB,GACA,cAAc,MAAM,QACtB;EACF;EAEA,SAAS,cAAc,OAA4B;GACjD,MAAM,WAAW,cAAc;GAC/B,MAAM,YAAY,SAAS;GAC3B,IAAI,OAAO,cAAc,YAAY,UAAU,KAAK;GACpD,IAAI,MAAM,kBAAkB;GAM5B,QAJe,YAAY,sBACzB,OACA,SAAS,cAAc,SAEjB,GAAR;IACE,KAAK;KACH,YAAY,yBAAyB,OAAO,OAAO,OAAO;MACxD,YAAY,SAAS,cAAc;MACnC,UAAU,WAAW;KACvB,GAAG,cAAc,MAAM,QAAQ;KAC/B;IACF,KAAK;KACH,YAAY,kBAAkB,OAAO,OAAO,KAAK;KACjD;IACF,KAAK;KACH,YAAY,iBAAiB,OAAO,OAAO,KAAK;KAChD;IACF,KAAK;KACH,YAAY,SAAS,OAAO,KAAK;KACjC;IACF,KAAK,QACH;GACJ;EACF;EAEA,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAA,UAAA,GAAAC,YAUYC,wBATL,OAAA,SAAS,GADhBC,WAUY,EARV,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;EACX,SAAO,OAAA;EACP,WAAS,OAAA;;EAEV,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"menu-item.js","names":["_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/menu/menu-item.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = 'div'\"\n>\nimport { menuControl, menuitemRecipe } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type {\n ElementType,\n HuiElementInstance,\n HuiElementPropsNoInfer,\n} from \"~/types\";\nimport { attrToBool } from \"~/utils\";\nimport { useMenuId } from \"./menu.context\";\nimport type { MenuItemOwnProps } from \"./menu.types\";\n\ndefineOptions({\n name: \"HuiMenuItem\",\n inheritAttrs: false,\n});\n\ntype Props =\n & MenuItemOwnProps\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n keyof MenuItemOwnProps | \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"MenuItem\", props, attrs);\nconst component = computed<E | \"div\">(() => resolvedProps.value.as ?? \"div\");\nconst menuId = useMenuId();\nconst isDisabled = computed(() =>\n attrToBool(resolvedProps.value[\"aria-disabled\"])\n);\nconst recipe = computed(() => {\n const resolved = resolvedProps.value;\n return menuitemRecipe({\n color: resolved.color,\n });\n});\nconst cls = useHuiClasses(\n \"MenuItem\",\n recipe,\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles(\n \"MenuItem\",\n computed(() => ({ root: props.style })),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"color\",\n \"focusKey\",\n \"activation\",\n \"onAction\",\n \"onClick\",\n \"onKeydown\",\n \"aria-disabled\",\n]);\nconst rootAttrs = computed<Record<string, unknown>>(() => {\n const resolved = resolvedProps.value;\n return {\n ...menuControl.getItemAttributes(\n { menuId: menuId.value },\n {\n focusKey: resolved.focusKey,\n disabled: resolved[\"aria-disabled\"] == null\n ? undefined\n : isDisabled.value,\n },\n ),\n ...forwardedAttrs.value,\n };\n});\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\nfunction handleClick(event: MouseEvent): void {\n const resolved = resolvedProps.value;\n const onClick = resolved[\"onClick\"];\n if (typeof onClick === \"function\") onClick(event);\n\n menuControl.handleMenuitemActivation(\n event,\n menuId.value,\n {\n activation: resolved.activation ?? \"managed\",\n disabled: isDisabled.value,\n },\n resolvedProps.value.onAction,\n );\n}\n\nfunction handleKeydown(event: KeyboardEvent): void {\n const resolved = resolvedProps.value;\n const onKeydown = resolved[\"onKeydown\"];\n if (typeof onKeydown === \"function\") onKeydown(event);\n if (event.defaultPrevented) return;\n\n const action = menuControl.handleMenuitemKeydown(\n event,\n resolved.activation ?? \"managed\",\n );\n switch (action) {\n case \"action\":\n menuControl.handleMenuitemActivation(event, menuId.value, {\n activation: resolved.activation ?? \"managed\",\n disabled: isDisabled.value,\n }, resolvedProps.value.onAction);\n return;\n case \"focus-move\":\n menuControl.moveMenuitemFocus(event, menuId.value);\n return;\n case \"focus-set\":\n menuControl.setMenuitemFocus(event, menuId.value);\n return;\n case \"focus-out\":\n menuControl.hideMenu(menuId.value);\n return;\n case \"none\":\n return;\n }\n}\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <component\n :is=\"component\"\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n @click=\"handleClick\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6CA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,YAAY,OAAO,KAAK;EAC1D,MAAM,YAAY,eAA0B,cAAc,MAAM,MAAM,KAAK;EAC3E,MAAM,SAAS,UAAU;EACzB,MAAM,aAAa,eACjB,WAAW,cAAc,MAAM,gBAAgB,CACjD;EACA,MAAM,SAAS,eAAe;GAC5B,MAAM,WAAW,cAAc;GAC/B,OAAO,eAAe,EACpB,OAAO,SAAS,MAClB,CAAC;EACH,CAAC;EACD,MAAM,MAAM,cACV,YACA,QACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,YACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,YAAY,eAAwC;GACxD,MAAM,WAAW,cAAc;GAC/B,OAAO;IACL,GAAG,YAAY,kBACb,EAAE,QAAQ,OAAO,MAAM,GACvB;KACE,UAAU,SAAS;KACnB,UAAU,SAAS,oBAAoB,OACnC,KAAA,IACA,WAAW;IACjB,CACF;IACA,GAAG,eAAe;GACpB;EACF,CAAC;EACD,MAAM,UAAU,eAAsC,MAAM;EAE5D,SAAS,YAAY,OAAyB;GAC5C,MAAM,WAAW,cAAc;GAC/B,MAAM,UAAU,SAAS;GACzB,IAAI,OAAO,YAAY,YAAY,QAAQ,KAAK;GAEhD,YAAY,yBACV,OACA,OAAO,OACP;IACE,YAAY,SAAS,cAAc;IACnC,UAAU,WAAW;GACvB,GACA,cAAc,MAAM,QACtB;EACF;EAEA,SAAS,cAAc,OAA4B;GACjD,MAAM,WAAW,cAAc;GAC/B,MAAM,YAAY,SAAS;GAC3B,IAAI,OAAO,cAAc,YAAY,UAAU,KAAK;GACpD,IAAI,MAAM,kBAAkB;GAM5B,QAJe,YAAY,sBACzB,OACA,SAAS,cAAc,SAEjB,GAAR;IACE,KAAK;KACH,YAAY,yBAAyB,OAAO,OAAO,OAAO;MACxD,YAAY,SAAS,cAAc;MACnC,UAAU,WAAW;KACvB,GAAG,cAAc,MAAM,QAAQ;KAC/B;IACF,KAAK;KACH,YAAY,kBAAkB,OAAO,OAAO,KAAK;KACjD;IACF,KAAK;KACH,YAAY,iBAAiB,OAAO,OAAO,KAAK;KAChD;IACF,KAAK;KACH,YAAY,SAAS,OAAO,KAAK;KACjC;IACF,KAAK,QACH;GACJ;EACF;EAEA,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAA,UAAA,GAAAC,YAUYC,wBATL,OAAA,SAAS,GADhBC,WAUY,EARV,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;EACX,SAAO,OAAA;EACP,WAAS,OAAA;;EAEV,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,C"}
@@ -2,14 +2,13 @@ import { ElementType, HuiElementInstance, HuiElementPropsNoInfer } from "../../t
2
2
  import "../../types/index.js";
3
3
  import { MenuItemOwnProps } from "./menu.types.js";
4
4
  import { ClassValue, StyleValue } from "vue";
5
- //#region src/components/menu/menu-item.vue.d.ts
6
5
  declare const __VLS_export: <E extends ElementType = "div">(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
6
  props: import("vue").PublicProps & __VLS_PrettifyLocal<MenuItemOwnProps & {
8
7
  as?: E | undefined;
9
8
  } & {
10
9
  class?: ClassValue | undefined;
11
10
  style?: StyleValue | undefined;
12
- } & Omit<HuiElementPropsNoInfer<E>, "style" | "as" | "class" | keyof MenuItemOwnProps>> & (typeof globalThis extends {
11
+ } & Omit<HuiElementPropsNoInfer<E>, "class" | "style" | "as" | keyof MenuItemOwnProps>> & (typeof globalThis extends {
13
12
  __VLS_PROPS_FALLBACK: infer P;
14
13
  } ? P : {});
15
14
  expose: (exposed: import("vue").ShallowUnwrapRef<{
@@ -25,6 +24,5 @@ declare const __VLS_export: <E extends ElementType = "div">(__VLS_props: NonNull
25
24
  };
26
25
  declare const _default: typeof __VLS_export;
27
26
  type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
28
- //#endregion
29
27
  export { _default as default };
30
28
  //# sourceMappingURL=menu-item.vue.d.ts.map
@@ -4,7 +4,7 @@ import button_default from "../button/button.js";
4
4
  import { useMenuId } from "./menu.context.js";
5
5
  import { computed, createBlock, defineComponent, mergeProps, openBlock, renderSlot, resolveDynamicComponent, useAttrs, useTemplateRef, withCtx } from "vue";
6
6
  import { menuControl } from "@hebium-ui/core";
7
- //#region src/components/menu/menu-trigger.vue
7
+ // src/components/menu/menu-trigger.vue
8
8
  const _sfc_main = /*@__PURE__*/ defineComponent({
9
9
  name: "HuiMenuTrigger",
10
10
  inheritAttrs: false,
@@ -45,12 +45,7 @@ const _sfc_main = /*@__PURE__*/ defineComponent({
45
45
  const menuId = useMenuId();
46
46
  const cls = useHuiClasses("MenuTrigger", computed(() => ({ root: "" })), computed(() => ({ root: props.class })));
47
47
  const sls = useHuiStyles("MenuTrigger", computed(() => ({ root: props.style })));
48
- const forwardedAttrs = useHuiAttrs(resolvedProps, [
49
- "as",
50
- "class",
51
- "style",
52
- "onKeydown"
53
- ]);
48
+ const forwardedAttrs = useHuiAttrs(resolvedProps, ["as", "onKeydown"]);
54
49
  const rootAttrs = computed(() => {
55
50
  const resolved = resolvedProps.value;
56
51
  return {
@@ -97,7 +92,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
97
92
  }, 16, ["class", "style"]);
98
93
  }
99
94
  var menu_trigger_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/menu/menu-trigger.vue"]]);
100
- //#endregion
101
95
  export { menu_trigger_default as default };
102
96
 
103
97
  //# sourceMappingURL=menu-trigger.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"menu-trigger.js","names":["Button","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/menu/menu-trigger.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = typeof Button\"\n>\nimport { menuControl } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type {\n ElementType,\n HuiElementInstance,\n HuiElementPropsNoInfer,\n} from \"~/types\";\nimport { Button } from \"../button\";\nimport { useMenuId } from \"./menu.context\";\n\ndefineOptions({\n name: \"HuiMenuTrigger\",\n inheritAttrs: false,\n});\n\ntype Props =\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"MenuTrigger\", props, attrs);\nconst component = computed<E | typeof Button>(() =>\n resolvedProps.value.as ?? Button\n);\nconst menuId = useMenuId();\nconst cls = useHuiClasses<\"MenuTrigger\", \"root\">(\n \"MenuTrigger\",\n computed(() => ({ root: \"\" })),\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles<\"MenuTrigger\", \"root\">(\n \"MenuTrigger\",\n computed(() => ({ root: props.style })),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"class\",\n \"style\",\n \"onKeydown\",\n]);\nconst rootAttrs = computed<Record<string, unknown>>(() => {\n const resolved = resolvedProps.value;\n return {\n ...menuControl.getTriggerAttributes(\n { menuId: menuId.value },\n { isButtonElement: resolved.as === undefined },\n ),\n ...forwardedAttrs.value,\n };\n});\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\nfunction handleKeydown(event: KeyboardEvent): void {\n const onKeydown = resolvedProps.value[\"onKeydown\"];\n if (typeof onKeydown === \"function\") onKeydown(event);\n if (event.defaultPrevented) return;\n\n menuControl.handleMenuTriggerKeydown(event, menuId.value);\n}\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <component\n :is=\"component\"\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,eAAe,OAAO,KAAK;EAC7D,MAAM,YAAY,eAChB,cAAc,MAAM,MAAMA,cAC5B;EACA,MAAM,SAAS,UAAU;EACzB,MAAM,MAAM,cACV,eACA,gBAAgB,EAAE,MAAM,GAAG,EAAE,GAC7B,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,eACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,iBAAiB,YAAY,eAAe;GAChD;GACA;GACA;GACA;EACF,CAAC;EACD,MAAM,YAAY,eAAwC;GACxD,MAAM,WAAW,cAAc;GAC/B,OAAO;IACL,GAAG,YAAY,qBACb,EAAE,QAAQ,OAAO,MAAM,GACvB,EAAE,iBAAiB,SAAS,OAAO,KAAA,EAAU,CAC/C;IACA,GAAG,eAAe;GACpB;EACF,CAAC;EACD,MAAM,UAAU,eAAsC,MAAM;EAE5D,SAAS,cAAc,OAA4B;GACjD,MAAM,YAAY,cAAc,MAAM;GACtC,IAAI,OAAO,cAAc,YAAY,UAAU,KAAK;GACpD,IAAI,MAAM,kBAAkB;GAE5B,YAAY,yBAAyB,OAAO,OAAO,KAAK;EAC1D;EAEA,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAC,UAAA,GAAAC,YASYC,wBARL,OAAA,SAAS,GADhBC,WASY,EAPV,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;EACX,WAAS,OAAA;;EAEV,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,CAAA,CAAA"}
1
+ {"version":3,"file":"menu-trigger.js","names":["Button","_openBlock","_createBlock","_resolveDynamicComponent","_mergeProps","_withCtx","_renderSlot"],"sources":["../../../src/components/menu/menu-trigger.vue"],"sourcesContent":["<script\n setup\n lang=\"ts\"\n generic=\"E extends ElementType = typeof Button\"\n>\nimport { menuControl } from \"@hebium-ui/core\";\nimport {\n type ClassValue,\n computed,\n type StyleValue,\n useAttrs,\n useTemplateRef,\n} from \"vue\";\nimport {\n useHuiAttrs,\n useHuiClasses,\n useHuiProps,\n useHuiStyles,\n} from \"~/provider\";\nimport type {\n ElementType,\n HuiElementInstance,\n HuiElementPropsNoInfer,\n} from \"~/types\";\nimport { Button } from \"../button\";\nimport { useMenuId } from \"./menu.context\";\n\ndefineOptions({\n name: \"HuiMenuTrigger\",\n inheritAttrs: false,\n});\n\ntype Props =\n & { as?: E | undefined }\n & {\n class?: ClassValue | undefined;\n style?: StyleValue | undefined;\n }\n & /* @vue-ignore */ Omit<\n HuiElementPropsNoInfer<E>,\n \"as\" | \"class\" | \"style\"\n >;\n\nconst props = defineProps<Props>();\n\ndefineSlots<{\n default?: () => unknown;\n}>();\n\nconst attrs = useAttrs();\nconst resolvedProps = useHuiProps(\"MenuTrigger\", props, attrs);\nconst component = computed<E | typeof Button>(() =>\n resolvedProps.value.as ?? Button\n);\nconst menuId = useMenuId();\nconst cls = useHuiClasses<\"MenuTrigger\", \"root\">(\n \"MenuTrigger\",\n computed(() => ({ root: \"\" })),\n computed(() => ({ root: props.class })),\n);\nconst sls = useHuiStyles<\"MenuTrigger\", \"root\">(\n \"MenuTrigger\",\n computed(() => ({ root: props.style })),\n);\nconst forwardedAttrs = useHuiAttrs(resolvedProps, [\n \"as\",\n \"onKeydown\",\n]);\nconst rootAttrs = computed<Record<string, unknown>>(() => {\n const resolved = resolvedProps.value;\n return {\n ...menuControl.getTriggerAttributes(\n { menuId: menuId.value },\n { isButtonElement: resolved.as === undefined },\n ),\n ...forwardedAttrs.value,\n };\n});\nconst rootRef = useTemplateRef<HuiElementInstance<E>>(\"root\");\n\nfunction handleKeydown(event: KeyboardEvent): void {\n const onKeydown = resolvedProps.value[\"onKeydown\"];\n if (typeof onKeydown === \"function\") onKeydown(event);\n if (event.defaultPrevented) return;\n\n menuControl.handleMenuTriggerKeydown(event, menuId.value);\n}\n\ndefineExpose({\n root: rootRef,\n});\n</script>\n\n<template>\n <component\n :is=\"component\"\n ref=\"root\"\n v-bind=\"rootAttrs\"\n :class=\"cls.root\"\n :style=\"sls.root\"\n @keydown=\"handleKeydown\"\n >\n <slot />\n </component>\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA2CA,MAAM,QAAQ;EAMd,MAAM,QAAQ,SAAS;EACvB,MAAM,gBAAgB,YAAY,eAAe,OAAO,KAAK;EAC7D,MAAM,YAAY,eAChB,cAAc,MAAM,MAAMA,cAC5B;EACA,MAAM,SAAS,UAAU;EACzB,MAAM,MAAM,cACV,eACA,gBAAgB,EAAE,MAAM,GAAG,EAAE,GAC7B,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,MAAM,aACV,eACA,gBAAgB,EAAE,MAAM,MAAM,MAAM,EAAE,CACxC;EACA,MAAM,iBAAiB,YAAY,eAAe,CAChD,MACA,WACF,CAAC;EACD,MAAM,YAAY,eAAwC;GACxD,MAAM,WAAW,cAAc;GAC/B,OAAO;IACL,GAAG,YAAY,qBACb,EAAE,QAAQ,OAAO,MAAM,GACvB,EAAE,iBAAiB,SAAS,OAAO,KAAA,EAAU,CAC/C;IACA,GAAG,eAAe;GACpB;EACF,CAAC;EACD,MAAM,UAAU,eAAsC,MAAM;EAE5D,SAAS,cAAc,OAA4B;GACjD,MAAM,YAAY,cAAc,MAAM;GACtC,IAAI,OAAO,cAAc,YAAY,UAAU,KAAK;GACpD,IAAI,MAAM,kBAAkB;GAE5B,YAAY,yBAAyB,OAAO,OAAO,KAAK;EAC1D;EAEA,SAAa,EACX,MAAM,QACR,CAAC;;;;;;;;;;;;;;;;;;;;;;CAIC,OAAAC,UAAA,GAAAC,YASYC,wBARL,OAAA,SAAS,GADhBC,WASY,EAPV,KAAI,OAAM,GACF,OAAA,WAAS;EAChB,OAAO,OAAA,IAAI;EACX,OAAO,OAAA,IAAI;EACX,WAAS,OAAA;;EAEV,SAAAC,cAAQ,CAARC,WAAQ,KAAA,QAAA,SAAA,C"}
@@ -3,14 +3,13 @@ import "../../types/index.js";
3
3
  import _default$1 from "../button/button.vue.js";
4
4
  import "../button/index.js";
5
5
  import { ClassValue, StyleValue } from "vue";
6
- //#region src/components/menu/menu-trigger.vue.d.ts
7
6
  declare const __VLS_export: <E extends ElementType = typeof _default$1>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
8
7
  props: import("vue").PublicProps & __VLS_PrettifyLocal<{
9
8
  as?: E | undefined;
10
9
  } & {
11
10
  class?: ClassValue | undefined;
12
11
  style?: StyleValue | undefined;
13
- } & Omit<HuiElementPropsNoInfer<E>, "style" | "as" | "class">> & (typeof globalThis extends {
12
+ } & Omit<HuiElementPropsNoInfer<E>, "class" | "style" | "as">> & (typeof globalThis extends {
14
13
  __VLS_PROPS_FALLBACK: infer P;
15
14
  } ? P : {});
16
15
  expose: (exposed: import("vue").ShallowUnwrapRef<{
@@ -26,6 +25,5 @@ declare const __VLS_export: <E extends ElementType = typeof _default$1>(__VLS_pr
26
25
  };
27
26
  declare const _default: typeof __VLS_export;
28
27
  type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K]; } : { [K in keyof T as K]: T[K]; }) & {};
29
- //#endregion
30
28
  export { _default as default };
31
29
  //# sourceMappingURL=menu-trigger.vue.d.ts.map
@@ -1,5 +1,3 @@
1
1
  import { ComputedRef, InjectionKey } from "vue";
2
- //#region src/components/menu/menu.context.d.ts
3
2
  export declare function useMenuId(): ComputedRef<string>;
4
- //#endregion
5
3
  //# sourceMappingURL=menu.context.d.ts.map
@@ -1,5 +1,5 @@
1
1
  import { inject } from "vue";
2
- //#region src/components/menu/menu.context.ts
2
+ // src/components/menu/menu.context.ts
3
3
  const MenuContext = Symbol("Menu");
4
4
  function useMenuContext() {
5
5
  const context = inject(MenuContext);
@@ -9,7 +9,6 @@ function useMenuContext() {
9
9
  function useMenuId() {
10
10
  return useMenuContext().menuId;
11
11
  }
12
- //#endregion
13
12
  export { MenuContext, useMenuId };
14
13
 
15
14
  //# sourceMappingURL=menu.context.js.map
@@ -2,7 +2,7 @@ import { useHuiProps } from "../../provider/hui-provider.context.js";
2
2
  import export_helper_default from "../../_virtual/_/plugin-vue/export-helper.js";
3
3
  import { MenuContext } from "./menu.context.js";
4
4
  import { computed, defineComponent, provide, renderSlot, useAttrs, useId } from "vue";
5
- //#region src/components/menu/menu.vue
5
+ // src/components/menu/menu.vue
6
6
  const _sfc_main = /*@__PURE__*/ defineComponent({
7
7
  name: "HuiMenu",
8
8
  inheritAttrs: false,
@@ -37,7 +37,6 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
37
37
  return renderSlot(_ctx.$slots, "default");
38
38
  }
39
39
  var menu_default = /*#__PURE__*/ export_helper_default(_sfc_main, [["render", _sfc_render], ["__file", "/home/runner/work/hebium-ui/hebium-ui/packages/vue/src/components/menu/menu.vue"]]);
40
- //#endregion
41
40
  export { menu_default as default };
42
41
 
43
42
  //# sourceMappingURL=menu.js.map
@@ -4,7 +4,6 @@ import "../../types/index.js";
4
4
  import _default from "../button/button.vue.js";
5
5
  import "../button/index.js";
6
6
  import { ButtonSlots, MenuItemActivation, MenuitemSlots, MenuitemVariants, PopoverSlots, PopoverVariants } from "@hebium-ui/core";
7
- //#region src/components/menu/menu.types.d.ts
8
7
  export interface MenuProps {
9
8
  /**
10
9
  * The id of the menu content element.
@@ -76,5 +75,4 @@ export type MenuItemProps<E extends ElementType = "div"> = HuiPolymorphicProps<E
76
75
  export interface MenuItemExposed<E extends ElementType = "div"> {
77
76
  readonly root: HuiElementInstance<E> | null;
78
77
  }
79
- //#endregion
80
78
  //# sourceMappingURL=menu.types.d.ts.map
@@ -1,5 +1,4 @@
1
1
  import { MenuProps } from "./menu.types.js";
2
- //#region src/components/menu/menu.vue.d.ts
3
2
  type __VLS_Slots = {
4
3
  default?: () => unknown;
5
4
  };
@@ -11,6 +10,5 @@ type __VLS_WithSlots<T, S> = T & {
11
10
  $slots: S;
12
11
  };
13
12
  };
14
- //#endregion
15
13
  export { _default as default };
16
14
  //# sourceMappingURL=menu.vue.d.ts.map