@brumaombra/ui-vintage 0.4.0 → 0.5.0

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 (220) hide show
  1. package/dist/{AlertDialogTitle.vue_vue_type_script_setup_true_lang-Ca0g2mVz.js → AlertDialogTitle.vue_vue_type_script_setup_true_lang-_UW48pv7.js} +6 -5
  2. package/dist/{Busy-D1u_LUYu.js → Busy-BaCc_Jo8.js} +2 -1
  3. package/dist/{CalendarPrevButton.vue_vue_type_script_setup_true_lang-BA4Aw_Sl.js → CalendarPrevButton.vue_vue_type_script_setup_true_lang-DdzS6YGM.js} +18 -11
  4. package/dist/Card.vue_vue_type_script_setup_true_lang-D0pFVflK.js +30 -0
  5. package/dist/{Card.vue_vue_type_script_setup_true_lang-6ol3rxy1.js → CardContent.vue_vue_type_script_setup_true_lang-dBzO0q1t.js} +3 -8
  6. package/dist/{CardFooter.vue_vue_type_script_setup_true_lang-B1eS9wge.js → CardFooter.vue_vue_type_script_setup_true_lang-B5EqgrgN.js} +1 -19
  7. package/dist/CardText.vue_vue_type_script_setup_true_lang-DbDhSd3h.js +22 -0
  8. package/dist/{Collection-Coi6nyvb.js → Collection-4P3HQ4uU.js} +1 -1
  9. package/dist/{ConfigProvider-D2O0Jles.js → ConfigProvider-DYO65bNW.js} +1 -1
  10. package/dist/DatePicker.vue_vue_type_script_setup_true_lang-C2Ug81pX.js +88 -0
  11. package/dist/DialogClose-DxCTEp0d.js +36 -0
  12. package/dist/{DialogPortal-D81oXsCY.js → DialogPortal-BiMJAKLg.js} +1 -1
  13. package/dist/{DialogTitle-CLuntLBB.js → DialogTitle-jKgSCoXM.js} +10 -6
  14. package/dist/{DialogTitle.vue_vue_type_script_setup_true_lang-BG4dvMRo.js → DialogTitle.vue_vue_type_script_setup_true_lang-CycrzAMT.js} +33 -10
  15. package/dist/{DialogTrigger-BQbSAHMb.js → DialogTrigger-Cb3rLcid.js} +5 -35
  16. package/dist/EmptyStateCard.vue_vue_type_script_setup_true_lang-BYKX6WRQ.js +59 -0
  17. package/dist/{FocusScope-DYbCtSNc.js → FocusScope-mzbqk6Y_.js} +8 -14
  18. package/dist/HugeiconsIcon.vue-By2RXWWz.js +111 -0
  19. package/dist/{Input.vue_vue_type_script_setup_true_lang-6SfPeT8d.js → Input.vue_vue_type_script_setup_true_lang-BdjbS5s7.js} +1 -1
  20. package/dist/{Label.vue_vue_type_script_setup_true_lang-pMIzCHzV.js → Label.vue_vue_type_script_setup_true_lang-CdLIMAdF.js} +2 -2
  21. package/dist/LandingContent.vue_vue_type_script_setup_true_lang-Wgtl_yeD.js +21 -0
  22. package/dist/LandingFooter.vue_vue_type_script_setup_true_lang-CDy30mYg.js +159 -0
  23. package/dist/LandingNavbar.vue_vue_type_script_setup_true_lang-0jX2tmdb.js +59 -0
  24. package/dist/LandingShell.vue_vue_type_script_setup_true_lang-BXwdQR24.js +49 -0
  25. package/dist/LanguageFlag.vue_vue_type_script_setup_true_lang-CgszKeNv.js +68 -0
  26. package/dist/LoadMoreButton.vue_vue_type_script_setup_true_lang-CGhFcsF-.js +61 -0
  27. package/dist/LoadingStateCard.vue_vue_type_script_setup_true_lang-DwyQjtZ3.js +53 -0
  28. package/dist/{MessageToast-C1L25W2l.js → MessageToast-uKrMyOZf.js} +15 -12
  29. package/dist/{NativeSelectOption.vue_vue_type_script_setup_true_lang-COnFRt8g.js → NativeSelectOption.vue_vue_type_script_setup_true_lang-CNcUI9Yh.js} +4 -3
  30. package/dist/{PopoverTrigger.vue_vue_type_script_setup_true_lang-DFZJvU_P.js → PopoverTrigger.vue_vue_type_script_setup_true_lang-Cf33q_yT.js} +11 -8
  31. package/dist/{PopperContent-h-thLTz8.js → PopperContent-DUJ8a4i0.js} +4 -4
  32. package/dist/Presence-CTmUEdMR.js +168 -0
  33. package/dist/Progress.vue_vue_type_script_setup_true_lang-BDJfyW-d.js +188 -0
  34. package/dist/{Separator.vue_vue_type_script_setup_true_lang-CMRkdntA.js → Separator.vue_vue_type_script_setup_true_lang-D9BozdWD.js} +1 -1
  35. package/dist/{SheetTitle.vue_vue_type_script_setup_true_lang-BQbpsE2c.js → SheetTitle.vue_vue_type_script_setup_true_lang-Ja7-gmXd.js} +4 -4
  36. package/dist/{Slider.vue_vue_type_script_setup_true_lang-C_CsSGAt.js → Slider.vue_vue_type_script_setup_true_lang-CSOSwGGr.js} +10 -9
  37. package/dist/{Switch.vue_vue_type_script_setup_true_lang-BG6nkPSO.js → Switch.vue_vue_type_script_setup_true_lang-C8mqOepU.js} +7 -6
  38. package/dist/{Teleport-CV0tKbq5.js → Teleport-DTOwRCqx.js} +7 -185
  39. package/dist/TimePicker.vue_vue_type_script_setup_true_lang-tbOoMfZu.js +51 -0
  40. package/dist/{TooltipTrigger.vue_vue_type_script_setup_true_lang-DEPKysA_.js → TooltipTrigger.vue_vue_type_script_setup_true_lang-BMdZRPa3.js} +9 -6
  41. package/dist/{VisuallyHiddenInput-1G1IEkBL.js → VisuallyHiddenInput-D5eipDQU.js} +1 -1
  42. package/dist/alert-dialog.js +7 -6
  43. package/dist/alert.js +8 -18
  44. package/dist/badge.js +9 -36
  45. package/dist/breadcrumb.js +159 -0
  46. package/dist/busy-indicator.js +1 -1
  47. package/dist/busy.js +1 -1
  48. package/dist/button.js +11 -7
  49. package/dist/calendar.js +1 -1
  50. package/dist/card-grid.js +58 -0
  51. package/dist/card.js +9 -6
  52. package/dist/chip.js +47 -0
  53. package/dist/color-tokens-D9BviGPK.js +40 -0
  54. package/dist/command.js +17 -33
  55. package/dist/components/card-grid/CardGrid.vue.d.ts +88 -0
  56. package/dist/components/card-grid/index.d.ts +2 -0
  57. package/dist/components/chip/Chip.vue.d.ts +17 -0
  58. package/dist/components/chip/index.d.ts +2 -0
  59. package/dist/components/confirm-dialog/confirm-dialog-state.d.ts +11 -8
  60. package/dist/components/dashboard-shell/DashboardShell.vue.d.ts +12 -2
  61. package/dist/components/data-list/DataList.vue.d.ts +21 -0
  62. package/dist/components/data-list/DataListItem.vue.d.ts +21 -0
  63. package/dist/components/data-list/DataListLabel.vue.d.ts +21 -0
  64. package/dist/components/data-list/DataListText.vue.d.ts +21 -0
  65. package/dist/components/data-list/DataListValue.vue.d.ts +21 -0
  66. package/dist/components/data-list/index.d.ts +5 -0
  67. package/dist/components/empty-state-card/EmptyStateCard.vue.d.ts +73 -0
  68. package/dist/components/empty-state-card/index.d.ts +2 -0
  69. package/dist/components/info-card/InfoCard.vue.d.ts +46 -0
  70. package/dist/components/info-card/index.d.ts +2 -0
  71. package/dist/components/landing/landing-content/LandingContent.vue.d.ts +2 -3
  72. package/dist/components/landing/landing-footer/LandingFooter.vue.d.ts +5 -10
  73. package/dist/components/landing/landing-navbar/LandingNavbar.vue.d.ts +8 -1
  74. package/dist/components/landing/landing-shell/LandingShell.vue.d.ts +0 -1
  75. package/dist/components/language-flag/LanguageFlag.vue.d.ts +14 -0
  76. package/dist/components/language-flag/flags/EnglishFlag.vue.d.ts +2 -0
  77. package/dist/components/language-flag/flags/ItalianFlag.vue.d.ts +2 -0
  78. package/dist/components/language-flag/index.d.ts +4 -0
  79. package/dist/components/language-selector/LanguageSelector.vue.d.ts +35 -0
  80. package/dist/components/language-selector/index.d.ts +3 -0
  81. package/dist/components/load-more-button/LoadMoreButton.vue.d.ts +36 -0
  82. package/dist/components/load-more-button/index.d.ts +2 -0
  83. package/dist/components/loading-state-card/LoadingStateCard.vue.d.ts +55 -0
  84. package/dist/components/loading-state-card/index.d.ts +2 -0
  85. package/dist/components/message-dialog/message-dialog-state.d.ts +9 -7
  86. package/dist/components/message-toast/index.d.ts +1 -1
  87. package/dist/components/message-toast/message-toast-state.d.ts +3 -3
  88. package/dist/components/page-header/PageHeader.vue.d.ts +48 -0
  89. package/dist/components/page-header/index.d.ts +2 -0
  90. package/dist/components/progress-component/ProgressComponent.vue.d.ts +47 -0
  91. package/dist/components/progress-component/index.d.ts +2 -0
  92. package/dist/components/single-value-card/SingleValueCard.vue.d.ts +40 -0
  93. package/dist/components/single-value-card/index.d.ts +2 -0
  94. package/dist/components/slider-form-component/SliderFormComponent.vue.d.ts +2 -2
  95. package/dist/components/text-link/TextLink.vue.d.ts +35 -0
  96. package/dist/components/text-link/index.d.ts +2 -0
  97. package/dist/components/theme-selector/ThemeSelector.vue.d.ts +2 -0
  98. package/dist/components/theme-selector/index.d.ts +2 -0
  99. package/dist/components/ui/alert/Alert.vue.d.ts +2 -2
  100. package/dist/components/ui/alert/index.d.ts +6 -5
  101. package/dist/components/ui/badge/Badge.vue.d.ts +7 -20
  102. package/dist/components/ui/badge/index.d.ts +0 -5
  103. package/dist/components/ui/breadcrumb/Breadcrumb.vue.d.ts +21 -0
  104. package/dist/components/ui/breadcrumb/BreadcrumbEllipsis.vue.d.ts +21 -0
  105. package/dist/components/ui/breadcrumb/BreadcrumbItem.vue.d.ts +21 -0
  106. package/dist/components/ui/breadcrumb/BreadcrumbLink.vue.d.ts +24 -0
  107. package/dist/components/ui/breadcrumb/BreadcrumbList.vue.d.ts +21 -0
  108. package/dist/components/ui/breadcrumb/BreadcrumbPage.vue.d.ts +21 -0
  109. package/dist/components/ui/breadcrumb/BreadcrumbSeparator.vue.d.ts +21 -0
  110. package/dist/components/ui/breadcrumb/index.d.ts +7 -0
  111. package/dist/components/ui/button/index.d.ts +6 -6
  112. package/dist/components/ui/card/Card.vue.d.ts +3 -0
  113. package/dist/components/ui/card/CardText.vue.d.ts +21 -0
  114. package/dist/components/ui/card/index.d.ts +1 -0
  115. package/dist/components/ui/date-picker/DatePicker.vue.d.ts +2 -0
  116. package/dist/components/ui/date-time-picker/DateTimePicker.vue.d.ts +27 -0
  117. package/dist/components/ui/date-time-picker/index.d.ts +2 -0
  118. package/dist/components/ui/dialog/DialogContent.vue.d.ts +4 -1
  119. package/dist/components/ui/dialog/DialogFooter.vue.d.ts +1 -4
  120. package/dist/components/ui/dialog/DialogScrollContent.vue.d.ts +4 -1
  121. package/dist/components/ui/field/index.d.ts +4 -4
  122. package/dist/components/ui/progress/Progress.vue.d.ts +9 -0
  123. package/dist/components/ui/progress/index.d.ts +1 -0
  124. package/dist/components/ui/scroll-area/ScrollArea.vue.d.ts +22 -0
  125. package/dist/components/ui/scroll-area/ScrollBar.vue.d.ts +9 -0
  126. package/dist/components/ui/scroll-area/index.d.ts +2 -0
  127. package/dist/components/ui/select/SelectItemContent.vue.d.ts +15 -0
  128. package/dist/components/ui/select/SelectValueContent.vue.d.ts +16 -0
  129. package/dist/components/ui/select/index.d.ts +2 -0
  130. package/dist/components/ui/sidebar/index.d.ts +4 -4
  131. package/dist/components/ui/table/Table.vue.d.ts +21 -0
  132. package/dist/components/ui/table/TableBody.vue.d.ts +21 -0
  133. package/dist/components/ui/table/TableCaption.vue.d.ts +21 -0
  134. package/dist/components/ui/table/TableCell.vue.d.ts +21 -0
  135. package/dist/components/ui/table/TableEmpty.vue.d.ts +24 -0
  136. package/dist/components/ui/table/TableFooter.vue.d.ts +21 -0
  137. package/dist/components/ui/table/TableHead.vue.d.ts +21 -0
  138. package/dist/components/ui/table/TableHeader.vue.d.ts +21 -0
  139. package/dist/components/ui/table/TableRow.vue.d.ts +21 -0
  140. package/dist/components/ui/table/index.d.ts +9 -0
  141. package/dist/components/ui/tabs/Tabs.vue.d.ts +28 -0
  142. package/dist/components/ui/tabs/TabsContent.vue.d.ts +22 -0
  143. package/dist/components/ui/tabs/TabsList.vue.d.ts +22 -0
  144. package/dist/components/ui/tabs/TabsTrigger.vue.d.ts +22 -0
  145. package/dist/components/ui/tabs/index.d.ts +4 -0
  146. package/dist/components/ui/textarea/Textarea.vue.d.ts +12 -0
  147. package/dist/components/ui/textarea/index.d.ts +1 -0
  148. package/dist/components/ui/time-picker/TimePicker.vue.d.ts +21 -0
  149. package/dist/components/ui/time-picker/index.d.ts +2 -0
  150. package/dist/confirm-dialog.js +15 -11
  151. package/dist/createContext-BabAT1K8.js +19 -0
  152. package/dist/dashboard-shell.js +88 -38
  153. package/dist/data-list.js +97 -0
  154. package/dist/date-picker.js +3 -82
  155. package/dist/date-time-picker.js +140 -0
  156. package/dist/dialog.js +36 -29
  157. package/dist/empty-state-card.js +5 -0
  158. package/dist/error-page.js +8 -6
  159. package/dist/field.js +2 -2
  160. package/dist/getActiveElement-Bmy6QsUb.js +9 -0
  161. package/dist/i18n/en.json.d.ts +57 -0
  162. package/dist/i18n/it.json.d.ts +57 -0
  163. package/dist/i18n.js +148 -0
  164. package/dist/{index-qGMU40e1.js → index-DDJjWaIl.js} +64 -0
  165. package/dist/{index-Cq9Ekgtb.js → index-Dw56kNV0.js} +10 -10
  166. package/dist/index.min-CZ9FIOXr.js +23 -0
  167. package/dist/info-card.js +65 -0
  168. package/dist/input.js +1 -1
  169. package/dist/label.js +1 -1
  170. package/dist/landing-content.js +5 -0
  171. package/dist/landing-footer.js +5 -0
  172. package/dist/landing-navbar.js +5 -0
  173. package/dist/landing-shell.js +5 -0
  174. package/dist/landing.js +9 -237
  175. package/dist/language-flag.js +7 -0
  176. package/dist/language-selector.js +123 -0
  177. package/dist/lib/color-tokens.d.ts +6 -0
  178. package/dist/lib/i18n.d.ts +222 -0
  179. package/dist/load-more-button.js +5 -0
  180. package/dist/loading-state-card.js +5 -0
  181. package/dist/message-dialog.js +34 -18
  182. package/dist/message-toast.js +2 -2
  183. package/dist/native-select.js +1 -1
  184. package/dist/nullish-D3tMkl6i.js +6 -0
  185. package/dist/page-header.js +57 -0
  186. package/dist/popover.js +4 -4
  187. package/dist/progress-component.js +51 -0
  188. package/dist/progress.js +4 -0
  189. package/dist/scroll-area.js +1080 -0
  190. package/dist/select.js +149 -53
  191. package/dist/separator.js +1 -1
  192. package/dist/sheet.js +3 -2
  193. package/dist/sidebar.js +10 -9
  194. package/dist/single-value-card.js +64 -0
  195. package/dist/slider-form-component.js +2 -2
  196. package/dist/slider.js +1 -1
  197. package/dist/style.css +822 -144
  198. package/dist/switch-form-component.js +2 -2
  199. package/dist/switch.js +1 -1
  200. package/dist/table.js +193 -0
  201. package/dist/tabs.js +658 -0
  202. package/dist/text-link.js +39 -0
  203. package/dist/textarea.js +37 -0
  204. package/dist/theme-selector.js +159 -0
  205. package/dist/time-picker.js +5 -0
  206. package/dist/tooltip.js +2 -2
  207. package/dist/{useDirection-SIyEYNxv.js → useDirection-B2bMgzzV.js} +1 -1
  208. package/dist/{useFocusGuards-WYWvpJy2.js → useFocusGuards-2C1jyYW5.js} +1 -1
  209. package/dist/{useFormControl-CyoJwp9r.js → useFormControl-DZ4LnB9F.js} +1 -1
  210. package/dist/{useForwardExpose-BiRQH8eO.js → useForwardExpose-BcX3VRdS.js} +1 -1
  211. package/dist/{useForwardPropsEmits-DmumnZO5.js → useForwardPropsEmits-GlUGKcIz.js} +1 -17
  212. package/dist/useId-CF6wz41D.js +16 -0
  213. package/dist/useNonce-CWj1JlPB.js +12 -0
  214. package/dist/{usePrimitiveElement-Bk3ZOslv.js → usePrimitiveElement-BCpwlakH.js} +1 -1
  215. package/dist/{useSize-BLYTFgnQ.js → useSize-DUgGY9t1.js} +1 -1
  216. package/dist/{useTypeahead-KTl4-oeq.js → useTypeahead-4RK0Emcv.js} +2 -2
  217. package/dist/{utils-BXBXPGDA.js → utils-DbR1EZn-.js} +1 -1
  218. package/dist/utils-hdwtyAF3.js +44 -0
  219. package/package.json +111 -2
  220. package/dist/HugeiconsIcon.vue-CurGbgrJ.js +0 -125
package/dist/tabs.js ADDED
@@ -0,0 +1,658 @@
1
+ import { defineComponent, toRefs, ref, openBlock, createBlock, unref, withCtx, createVNode, renderSlot, computed, onMounted, onUnmounted, nextTick, shallowRef, onBeforeUnmount, normalizeStyle, createCommentVNode, withKeys, withModifiers, mergeProps, normalizeProps, guardReactiveProps } from "vue";
2
+ import { u as useForwardPropsEmits, a as useForwardProps } from "./useForwardPropsEmits-GlUGKcIz.js";
3
+ import { c as createContext } from "./createContext-BabAT1K8.js";
4
+ import { u as useDirection } from "./useDirection-B2bMgzzV.js";
5
+ import { u as useForwardExpose } from "./useForwardExpose-BcX3VRdS.js";
6
+ import { u as useId } from "./useId-CF6wz41D.js";
7
+ import { P as Primitive } from "./Primitive-D3IcFg81.js";
8
+ import { a as useVModel } from "./index-Dw56kNV0.js";
9
+ import { c as cn } from "./utils-Bz4m9VPB.js";
10
+ import { r as reactiveOmit } from "./index-DDJjWaIl.js";
11
+ import { P as Presence_default } from "./Presence-CTmUEdMR.js";
12
+ import { u as useCollection } from "./Collection-4P3HQ4uU.js";
13
+ import { f as focusFirst, E as ENTRY_FOCUS, a as EVENT_OPTIONS, g as getFocusIntent, w as wrapArray } from "./utils-hdwtyAF3.js";
14
+ const [injectRovingFocusGroupContext, provideRovingFocusGroupContext] = createContext("RovingFocusGroup");
15
+ var RovingFocusGroup_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
16
+ __name: "RovingFocusGroup",
17
+ props: {
18
+ orientation: {
19
+ type: String,
20
+ required: false,
21
+ default: void 0
22
+ },
23
+ dir: {
24
+ type: String,
25
+ required: false
26
+ },
27
+ loop: {
28
+ type: Boolean,
29
+ required: false,
30
+ default: false
31
+ },
32
+ currentTabStopId: {
33
+ type: [String, null],
34
+ required: false
35
+ },
36
+ defaultCurrentTabStopId: {
37
+ type: String,
38
+ required: false
39
+ },
40
+ preventScrollOnEntryFocus: {
41
+ type: Boolean,
42
+ required: false,
43
+ default: false
44
+ },
45
+ asChild: {
46
+ type: Boolean,
47
+ required: false
48
+ },
49
+ as: {
50
+ type: null,
51
+ required: false
52
+ }
53
+ },
54
+ emits: ["entryFocus", "update:currentTabStopId"],
55
+ setup(__props, { expose: __expose, emit: __emit }) {
56
+ const props = __props;
57
+ const emits = __emit;
58
+ const { loop, orientation, dir: propDir } = toRefs(props);
59
+ const dir = useDirection(propDir);
60
+ const currentTabStopId = useVModel(props, "currentTabStopId", emits, {
61
+ defaultValue: props.defaultCurrentTabStopId,
62
+ passive: props.currentTabStopId === void 0
63
+ });
64
+ const isTabbingBackOut = ref(false);
65
+ const isClickFocus = ref(false);
66
+ const focusableItemsCount = ref(0);
67
+ const { getItems, CollectionSlot } = useCollection({ isProvider: true });
68
+ function handleFocus(event) {
69
+ const isKeyboardFocus = !isClickFocus.value;
70
+ if (event.currentTarget && event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut.value) {
71
+ const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);
72
+ event.currentTarget.dispatchEvent(entryFocusEvent);
73
+ emits("entryFocus", entryFocusEvent);
74
+ if (!entryFocusEvent.defaultPrevented) {
75
+ const items = getItems().map((i) => i.ref).filter((i) => i.dataset.disabled !== "");
76
+ const activeItem = items.find((item) => item.getAttribute("data-active") === "");
77
+ const highlightedItem = items.find((item) => item.getAttribute("data-highlighted") === "");
78
+ const currentItem = items.find((item) => item.id === currentTabStopId.value);
79
+ const candidateItems = [
80
+ activeItem,
81
+ highlightedItem,
82
+ currentItem,
83
+ ...items
84
+ ].filter(Boolean);
85
+ focusFirst(candidateItems, props.preventScrollOnEntryFocus);
86
+ }
87
+ }
88
+ isClickFocus.value = false;
89
+ }
90
+ function handleMouseUp() {
91
+ setTimeout(() => {
92
+ isClickFocus.value = false;
93
+ }, 1);
94
+ }
95
+ __expose({ getItems });
96
+ provideRovingFocusGroupContext({
97
+ loop,
98
+ dir,
99
+ orientation,
100
+ currentTabStopId,
101
+ onItemFocus: (tabStopId) => {
102
+ currentTabStopId.value = tabStopId;
103
+ },
104
+ onItemShiftTab: () => {
105
+ isTabbingBackOut.value = true;
106
+ },
107
+ onFocusableItemAdd: () => {
108
+ focusableItemsCount.value++;
109
+ },
110
+ onFocusableItemRemove: () => {
111
+ focusableItemsCount.value--;
112
+ }
113
+ });
114
+ return (_ctx, _cache) => {
115
+ return openBlock(), createBlock(unref(CollectionSlot), null, {
116
+ default: withCtx(() => [createVNode(unref(Primitive), {
117
+ tabindex: isTabbingBackOut.value || focusableItemsCount.value === 0 ? -1 : 0,
118
+ "data-orientation": unref(orientation),
119
+ as: _ctx.as,
120
+ "as-child": _ctx.asChild,
121
+ dir: unref(dir),
122
+ style: { "outline": "none" },
123
+ onMousedown: _cache[0] || (_cache[0] = ($event) => isClickFocus.value = true),
124
+ onMouseup: handleMouseUp,
125
+ onFocus: handleFocus,
126
+ onBlur: _cache[1] || (_cache[1] = ($event) => isTabbingBackOut.value = false)
127
+ }, {
128
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
129
+ _: 3
130
+ }, 8, [
131
+ "tabindex",
132
+ "data-orientation",
133
+ "as",
134
+ "as-child",
135
+ "dir"
136
+ ])]),
137
+ _: 3
138
+ });
139
+ };
140
+ }
141
+ });
142
+ var RovingFocusGroup_default = RovingFocusGroup_vue_vue_type_script_setup_true_lang_default;
143
+ var RovingFocusItem_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
144
+ __name: "RovingFocusItem",
145
+ props: {
146
+ tabStopId: {
147
+ type: String,
148
+ required: false
149
+ },
150
+ focusable: {
151
+ type: Boolean,
152
+ required: false,
153
+ default: true
154
+ },
155
+ active: {
156
+ type: Boolean,
157
+ required: false
158
+ },
159
+ allowShiftKey: {
160
+ type: Boolean,
161
+ required: false
162
+ },
163
+ asChild: {
164
+ type: Boolean,
165
+ required: false
166
+ },
167
+ as: {
168
+ type: null,
169
+ required: false,
170
+ default: "span"
171
+ }
172
+ },
173
+ setup(__props) {
174
+ const props = __props;
175
+ const context = injectRovingFocusGroupContext();
176
+ const randomId = useId();
177
+ const id = computed(() => props.tabStopId || randomId);
178
+ const isCurrentTabStop = computed(() => context.currentTabStopId.value === id.value);
179
+ const { getItems, CollectionItem } = useCollection();
180
+ onMounted(() => {
181
+ if (props.focusable) context.onFocusableItemAdd();
182
+ });
183
+ onUnmounted(() => {
184
+ if (props.focusable) context.onFocusableItemRemove();
185
+ });
186
+ function handleKeydown(event) {
187
+ if (event.key === "Tab" && event.shiftKey) {
188
+ context.onItemShiftTab();
189
+ return;
190
+ }
191
+ if (event.target !== event.currentTarget) return;
192
+ const focusIntent = getFocusIntent(event, context.orientation.value, context.dir.value);
193
+ if (focusIntent !== void 0) {
194
+ if (event.metaKey || event.ctrlKey || event.altKey || (props.allowShiftKey ? false : event.shiftKey)) return;
195
+ event.preventDefault();
196
+ let candidateNodes = [...getItems().map((i) => i.ref).filter((i) => i.dataset.disabled !== "")];
197
+ if (focusIntent === "last") candidateNodes.reverse();
198
+ else if (focusIntent === "prev" || focusIntent === "next") {
199
+ if (focusIntent === "prev") candidateNodes.reverse();
200
+ const currentIndex = candidateNodes.indexOf(event.currentTarget);
201
+ candidateNodes = context.loop.value ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);
202
+ }
203
+ nextTick(() => focusFirst(candidateNodes));
204
+ }
205
+ }
206
+ return (_ctx, _cache) => {
207
+ return openBlock(), createBlock(unref(CollectionItem), null, {
208
+ default: withCtx(() => [createVNode(unref(Primitive), {
209
+ tabindex: isCurrentTabStop.value ? 0 : -1,
210
+ "data-orientation": unref(context).orientation.value,
211
+ "data-active": _ctx.active ? "" : void 0,
212
+ "data-disabled": !_ctx.focusable ? "" : void 0,
213
+ as: _ctx.as,
214
+ "as-child": _ctx.asChild,
215
+ onMousedown: _cache[0] || (_cache[0] = (event) => {
216
+ if (!_ctx.focusable) event.preventDefault();
217
+ else unref(context).onItemFocus(id.value);
218
+ }),
219
+ onFocus: _cache[1] || (_cache[1] = ($event) => unref(context).onItemFocus(id.value)),
220
+ onKeydown: handleKeydown
221
+ }, {
222
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
223
+ _: 3
224
+ }, 8, [
225
+ "tabindex",
226
+ "data-orientation",
227
+ "data-active",
228
+ "data-disabled",
229
+ "as",
230
+ "as-child"
231
+ ])]),
232
+ _: 3
233
+ });
234
+ };
235
+ }
236
+ });
237
+ var RovingFocusItem_default = RovingFocusItem_vue_vue_type_script_setup_true_lang_default;
238
+ const [injectTabsRootContext, provideTabsRootContext] = createContext("TabsRoot");
239
+ var TabsRoot_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
240
+ __name: "TabsRoot",
241
+ props: {
242
+ defaultValue: {
243
+ type: null,
244
+ required: false
245
+ },
246
+ orientation: {
247
+ type: String,
248
+ required: false,
249
+ default: "horizontal"
250
+ },
251
+ dir: {
252
+ type: String,
253
+ required: false
254
+ },
255
+ activationMode: {
256
+ type: String,
257
+ required: false,
258
+ default: "automatic"
259
+ },
260
+ modelValue: {
261
+ type: null,
262
+ required: false
263
+ },
264
+ unmountOnHide: {
265
+ type: Boolean,
266
+ required: false,
267
+ default: true
268
+ },
269
+ asChild: {
270
+ type: Boolean,
271
+ required: false
272
+ },
273
+ as: {
274
+ type: null,
275
+ required: false
276
+ }
277
+ },
278
+ emits: ["update:modelValue"],
279
+ setup(__props, { emit: __emit }) {
280
+ const props = __props;
281
+ const emits = __emit;
282
+ const { orientation, unmountOnHide, dir: propDir } = toRefs(props);
283
+ const dir = useDirection(propDir);
284
+ useForwardExpose();
285
+ const modelValue = useVModel(props, "modelValue", emits, {
286
+ defaultValue: props.defaultValue,
287
+ passive: props.modelValue === void 0
288
+ });
289
+ const tabsList = ref();
290
+ const contentIds = shallowRef(/* @__PURE__ */ new Set());
291
+ provideTabsRootContext({
292
+ modelValue,
293
+ changeModelValue: (value) => {
294
+ modelValue.value = value;
295
+ },
296
+ orientation,
297
+ dir,
298
+ unmountOnHide,
299
+ activationMode: props.activationMode,
300
+ baseId: useId(void 0, "reka-tabs"),
301
+ tabsList,
302
+ contentIds,
303
+ registerContent: (value) => {
304
+ contentIds.value = /* @__PURE__ */ new Set([...contentIds.value, value]);
305
+ },
306
+ unregisterContent: (value) => {
307
+ const newSet = new Set(contentIds.value);
308
+ newSet.delete(value);
309
+ contentIds.value = newSet;
310
+ }
311
+ });
312
+ return (_ctx, _cache) => {
313
+ return openBlock(), createBlock(unref(Primitive), {
314
+ dir: unref(dir),
315
+ "data-orientation": unref(orientation),
316
+ "as-child": _ctx.asChild,
317
+ as: _ctx.as
318
+ }, {
319
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default", { modelValue: unref(modelValue) })]),
320
+ _: 3
321
+ }, 8, [
322
+ "dir",
323
+ "data-orientation",
324
+ "as-child",
325
+ "as"
326
+ ]);
327
+ };
328
+ }
329
+ });
330
+ var TabsRoot_default = TabsRoot_vue_vue_type_script_setup_true_lang_default;
331
+ function makeTriggerId(baseId, value) {
332
+ return `${baseId}-trigger-${value}`;
333
+ }
334
+ function makeContentId(baseId, value) {
335
+ return `${baseId}-content-${value}`;
336
+ }
337
+ var TabsContent_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
338
+ __name: "TabsContent",
339
+ props: {
340
+ value: {
341
+ type: [String, Number],
342
+ required: true
343
+ },
344
+ forceMount: {
345
+ type: Boolean,
346
+ required: false
347
+ },
348
+ asChild: {
349
+ type: Boolean,
350
+ required: false
351
+ },
352
+ as: {
353
+ type: null,
354
+ required: false
355
+ }
356
+ },
357
+ setup(__props) {
358
+ const props = __props;
359
+ const { forwardRef } = useForwardExpose();
360
+ const rootContext = injectTabsRootContext();
361
+ const triggerId = computed(() => makeTriggerId(rootContext.baseId, props.value));
362
+ const contentId = computed(() => makeContentId(rootContext.baseId, props.value));
363
+ const isSelected = computed(() => props.value === rootContext.modelValue.value);
364
+ const isMountAnimationPreventedRef = ref(isSelected.value);
365
+ onMounted(() => {
366
+ rootContext.registerContent(props.value);
367
+ requestAnimationFrame(() => {
368
+ isMountAnimationPreventedRef.value = false;
369
+ });
370
+ });
371
+ onBeforeUnmount(() => {
372
+ rootContext.unregisterContent(props.value);
373
+ });
374
+ return (_ctx, _cache) => {
375
+ return openBlock(), createBlock(unref(Presence_default), {
376
+ present: _ctx.forceMount || isSelected.value,
377
+ "force-mount": ""
378
+ }, {
379
+ default: withCtx(({ present }) => [createVNode(unref(Primitive), {
380
+ id: contentId.value,
381
+ ref: unref(forwardRef),
382
+ "as-child": _ctx.asChild,
383
+ as: _ctx.as,
384
+ role: "tabpanel",
385
+ "data-state": isSelected.value ? "active" : "inactive",
386
+ "data-orientation": unref(rootContext).orientation.value,
387
+ "aria-labelledby": triggerId.value,
388
+ hidden: !present,
389
+ tabindex: "0",
390
+ style: normalizeStyle({ animationDuration: isMountAnimationPreventedRef.value ? "0s" : void 0 })
391
+ }, {
392
+ default: withCtx(() => [(unref(rootContext).unmountOnHide.value ? present : true) ? renderSlot(_ctx.$slots, "default", { key: 0 }) : createCommentVNode("v-if", true)]),
393
+ _: 2
394
+ }, 1032, [
395
+ "id",
396
+ "as-child",
397
+ "as",
398
+ "data-state",
399
+ "data-orientation",
400
+ "aria-labelledby",
401
+ "hidden",
402
+ "style"
403
+ ])]),
404
+ _: 3
405
+ }, 8, ["present"]);
406
+ };
407
+ }
408
+ });
409
+ var TabsContent_default = TabsContent_vue_vue_type_script_setup_true_lang_default;
410
+ var TabsList_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
411
+ __name: "TabsList",
412
+ props: {
413
+ loop: {
414
+ type: Boolean,
415
+ required: false,
416
+ default: true
417
+ },
418
+ asChild: {
419
+ type: Boolean,
420
+ required: false
421
+ },
422
+ as: {
423
+ type: null,
424
+ required: false
425
+ }
426
+ },
427
+ setup(__props) {
428
+ const props = __props;
429
+ const { loop } = toRefs(props);
430
+ const { forwardRef, currentElement } = useForwardExpose();
431
+ const context = injectTabsRootContext();
432
+ context.tabsList = currentElement;
433
+ return (_ctx, _cache) => {
434
+ return openBlock(), createBlock(unref(RovingFocusGroup_default), {
435
+ "as-child": "",
436
+ orientation: unref(context).orientation.value,
437
+ dir: unref(context).dir.value,
438
+ loop: unref(loop)
439
+ }, {
440
+ default: withCtx(() => [createVNode(unref(Primitive), {
441
+ ref: unref(forwardRef),
442
+ role: "tablist",
443
+ "as-child": _ctx.asChild,
444
+ as: _ctx.as,
445
+ "aria-orientation": unref(context).orientation.value
446
+ }, {
447
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
448
+ _: 3
449
+ }, 8, [
450
+ "as-child",
451
+ "as",
452
+ "aria-orientation"
453
+ ])]),
454
+ _: 3
455
+ }, 8, [
456
+ "orientation",
457
+ "dir",
458
+ "loop"
459
+ ]);
460
+ };
461
+ }
462
+ });
463
+ var TabsList_default = TabsList_vue_vue_type_script_setup_true_lang_default;
464
+ var TabsTrigger_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
465
+ __name: "TabsTrigger",
466
+ props: {
467
+ value: {
468
+ type: [String, Number],
469
+ required: true
470
+ },
471
+ disabled: {
472
+ type: Boolean,
473
+ required: false,
474
+ default: false
475
+ },
476
+ asChild: {
477
+ type: Boolean,
478
+ required: false
479
+ },
480
+ as: {
481
+ type: null,
482
+ required: false,
483
+ default: "button"
484
+ }
485
+ },
486
+ setup(__props) {
487
+ const props = __props;
488
+ const { forwardRef } = useForwardExpose();
489
+ const rootContext = injectTabsRootContext();
490
+ const triggerId = computed(() => makeTriggerId(rootContext.baseId, props.value));
491
+ const contentId = computed(() => rootContext.contentIds.value.has(props.value) ? makeContentId(rootContext.baseId, props.value) : void 0);
492
+ const isSelected = computed(() => props.value === rootContext.modelValue.value);
493
+ return (_ctx, _cache) => {
494
+ return openBlock(), createBlock(unref(RovingFocusItem_default), {
495
+ "as-child": "",
496
+ focusable: !_ctx.disabled,
497
+ active: isSelected.value
498
+ }, {
499
+ default: withCtx(() => [createVNode(unref(Primitive), {
500
+ id: triggerId.value,
501
+ ref: unref(forwardRef),
502
+ role: "tab",
503
+ type: _ctx.as === "button" ? "button" : void 0,
504
+ as: _ctx.as,
505
+ "as-child": _ctx.asChild,
506
+ "aria-selected": isSelected.value ? "true" : "false",
507
+ "aria-controls": contentId.value,
508
+ "data-state": isSelected.value ? "active" : "inactive",
509
+ disabled: _ctx.disabled,
510
+ "data-disabled": _ctx.disabled ? "" : void 0,
511
+ "data-orientation": unref(rootContext).orientation.value,
512
+ onMousedown: _cache[0] || (_cache[0] = withModifiers((event) => {
513
+ if (!_ctx.disabled && event.ctrlKey === false) unref(rootContext).changeModelValue(_ctx.value);
514
+ else event.preventDefault();
515
+ }, ["left"])),
516
+ onKeydown: _cache[1] || (_cache[1] = withKeys(($event) => unref(rootContext).changeModelValue(_ctx.value), ["enter", "space"])),
517
+ onFocus: _cache[2] || (_cache[2] = () => {
518
+ const isAutomaticActivation = unref(rootContext).activationMode !== "manual";
519
+ if (!isSelected.value && !_ctx.disabled && isAutomaticActivation) unref(rootContext).changeModelValue(_ctx.value);
520
+ })
521
+ }, {
522
+ default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
523
+ _: 3
524
+ }, 8, [
525
+ "id",
526
+ "type",
527
+ "as",
528
+ "as-child",
529
+ "aria-selected",
530
+ "aria-controls",
531
+ "data-state",
532
+ "disabled",
533
+ "data-disabled",
534
+ "data-orientation"
535
+ ])]),
536
+ _: 3
537
+ }, 8, ["focusable", "active"]);
538
+ };
539
+ }
540
+ });
541
+ var TabsTrigger_default = TabsTrigger_vue_vue_type_script_setup_true_lang_default;
542
+ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
543
+ __name: "Tabs",
544
+ props: {
545
+ defaultValue: {},
546
+ orientation: {},
547
+ dir: {},
548
+ activationMode: {},
549
+ modelValue: {},
550
+ unmountOnHide: { type: Boolean },
551
+ asChild: { type: Boolean },
552
+ as: {},
553
+ class: {}
554
+ },
555
+ emits: ["update:modelValue"],
556
+ setup(__props, { emit: __emit }) {
557
+ const props = __props;
558
+ const emits = __emit;
559
+ const delegatedProps = reactiveOmit(props, "class");
560
+ const forwarded = useForwardPropsEmits(delegatedProps, emits);
561
+ return (_ctx, _cache) => {
562
+ return openBlock(), createBlock(unref(TabsRoot_default), mergeProps({ "data-slot": "tabs" }, unref(forwarded), {
563
+ class: unref(cn)("flex flex-col gap-2", props.class)
564
+ }), {
565
+ default: withCtx((slotProps) => [
566
+ renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotProps)))
567
+ ]),
568
+ _: 3
569
+ }, 16, ["class"]);
570
+ };
571
+ }
572
+ });
573
+ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
574
+ __name: "TabsContent",
575
+ props: {
576
+ value: {},
577
+ forceMount: { type: Boolean },
578
+ asChild: { type: Boolean },
579
+ as: {},
580
+ class: {}
581
+ },
582
+ setup(__props) {
583
+ const props = __props;
584
+ const delegatedProps = reactiveOmit(props, "class");
585
+ return (_ctx, _cache) => {
586
+ return openBlock(), createBlock(unref(TabsContent_default), mergeProps({
587
+ "data-slot": "tabs-content",
588
+ class: unref(cn)("flex-1 outline-none", props.class)
589
+ }, unref(delegatedProps)), {
590
+ default: withCtx(() => [
591
+ renderSlot(_ctx.$slots, "default")
592
+ ]),
593
+ _: 3
594
+ }, 16, ["class"]);
595
+ };
596
+ }
597
+ });
598
+ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
599
+ __name: "TabsList",
600
+ props: {
601
+ loop: { type: Boolean },
602
+ asChild: { type: Boolean },
603
+ as: {},
604
+ class: {}
605
+ },
606
+ setup(__props) {
607
+ const props = __props;
608
+ const delegatedProps = reactiveOmit(props, "class");
609
+ return (_ctx, _cache) => {
610
+ return openBlock(), createBlock(unref(TabsList_default), mergeProps({ "data-slot": "tabs-list" }, unref(delegatedProps), {
611
+ class: unref(cn)(
612
+ "inline-flex h-auto w-fit items-center justify-center gap-1 rounded border border-border bg-card p-1 text-card-foreground transition-colors duration-300 ease-in-out",
613
+ props.class
614
+ )
615
+ }), {
616
+ default: withCtx(() => [
617
+ renderSlot(_ctx.$slots, "default")
618
+ ]),
619
+ _: 3
620
+ }, 16, ["class"]);
621
+ };
622
+ }
623
+ });
624
+ const _sfc_main = /* @__PURE__ */ defineComponent({
625
+ __name: "TabsTrigger",
626
+ props: {
627
+ value: {},
628
+ disabled: { type: Boolean },
629
+ asChild: { type: Boolean },
630
+ as: {},
631
+ class: {}
632
+ },
633
+ setup(__props) {
634
+ const props = __props;
635
+ const delegatedProps = reactiveOmit(props, "class");
636
+ const forwardedProps = useForwardProps(delegatedProps);
637
+ return (_ctx, _cache) => {
638
+ return openBlock(), createBlock(unref(TabsTrigger_default), mergeProps({
639
+ "data-slot": "tabs-trigger",
640
+ class: unref(cn)(
641
+ "text-muted-foreground hover:text-foreground focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex min-h-9 flex-1 cursor-pointer items-center justify-center gap-1.5 rounded-sm border border-transparent bg-transparent px-4 py-2 text-sm font-medium whitespace-nowrap transition-colors duration-300 ease-in-out focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:cursor-pointer data-[state=active]:border-foreground data-[state=active]:bg-muted data-[state=active]:font-semibold data-[state=active]:outline-1 data-[state=active]:outline-border data-[state=active]:outline-offset-0 data-[state=active]:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
642
+ props.class
643
+ )
644
+ }, unref(forwardedProps)), {
645
+ default: withCtx(() => [
646
+ renderSlot(_ctx.$slots, "default")
647
+ ]),
648
+ _: 3
649
+ }, 16, ["class"]);
650
+ };
651
+ }
652
+ });
653
+ export {
654
+ _sfc_main$3 as Tabs,
655
+ _sfc_main$2 as TabsContent,
656
+ _sfc_main$1 as TabsList,
657
+ _sfc_main as TabsTrigger
658
+ };
@@ -0,0 +1,39 @@
1
+ import { defineComponent, openBlock, createBlock, resolveDynamicComponent, mergeProps, withCtx, createTextVNode, toDisplayString } from "vue";
2
+ const _sfc_main = /* @__PURE__ */ defineComponent({
3
+ __name: "TextLink",
4
+ props: {
5
+ to: { type: String, required: true },
6
+ text: { type: String, required: true },
7
+ linkComponent: { type: [String, Object], default: "a" }
8
+ },
9
+ emits: ["click"],
10
+ setup(__props, { emit: __emit }) {
11
+ const props = __props;
12
+ const emits = __emit;
13
+ const getLinkProps = () => {
14
+ if (props.linkComponent === "a") {
15
+ return { href: props.to };
16
+ } else {
17
+ return { to: props.to };
18
+ }
19
+ };
20
+ const handleClick = (event) => {
21
+ emits("click", event);
22
+ };
23
+ return (_ctx, _cache) => {
24
+ return openBlock(), createBlock(resolveDynamicComponent(props.linkComponent), mergeProps(getLinkProps(), {
25
+ class: "cursor-pointer font-medium text-[var(--text-primary-light)] hover:underline dark:text-[var(--text-primary-dark)]",
26
+ onClick: handleClick
27
+ }), {
28
+ default: withCtx(() => [
29
+ createTextVNode(toDisplayString(props.text), 1)
30
+ ]),
31
+ _: 1
32
+ }, 16);
33
+ };
34
+ }
35
+ });
36
+ export {
37
+ _sfc_main as TextLink,
38
+ _sfc_main as default
39
+ };