@bridge-ui/vue 0.0.1-beta.7 → 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (93) hide show
  1. package/dist/Actions/BridgeUIHosts.vue.d.ts +3 -2
  2. package/dist/Actions/BridgeUIHosts.vue_vue_type_script_setup_true_lang.js +15 -10
  3. package/dist/Actions/Drawer/BridgeDrawerHost.js +5 -0
  4. package/dist/Actions/Drawer/BridgeDrawerHost.vue.d.ts +14 -0
  5. package/dist/Actions/Drawer/BridgeDrawerHost.vue_vue_type_script_setup_true_lang.js +35 -0
  6. package/dist/Actions/Drawer/bridgeDrawer.types.d.ts +44 -0
  7. package/dist/Actions/Drawer/bridgeDrawerInjectionKey.d.ts +3 -0
  8. package/dist/Actions/Drawer/bridgeDrawerInjectionKey.js +4 -0
  9. package/dist/Actions/Drawer/createBridgeDrawerApi.d.ts +2 -0
  10. package/dist/Actions/Drawer/createBridgeDrawerApi.js +49 -0
  11. package/dist/Actions/Drawer/index.d.ts +3 -0
  12. package/dist/Actions/Drawer/index.js +3 -0
  13. package/dist/Actions/Drawer/useDrawerAction.d.ts +5 -0
  14. package/dist/Actions/Drawer/useDrawerAction.js +26 -0
  15. package/dist/Actions/bridgeUIHosts.types.d.ts +5 -0
  16. package/dist/Actions/index.d.ts +2 -0
  17. package/dist/Actions/index.js +8 -6
  18. package/dist/Components/Badge/badge.types.d.ts +1 -1
  19. package/dist/Components/Chip/chip.types.d.ts +1 -1
  20. package/dist/Components/Drawer/Drawer.js +5 -0
  21. package/dist/Components/Drawer/Drawer.vue.d.ts +39 -0
  22. package/dist/Components/Drawer/Drawer.vue_vue_type_script_setup_true_lang.js +96 -0
  23. package/dist/Components/Drawer/composables/useDrawer.d.ts +63 -0
  24. package/dist/Components/Drawer/composables/useDrawer.js +208 -0
  25. package/dist/Components/Drawer/drawer.types.d.ts +188 -0
  26. package/dist/Components/Drawer/index.d.ts +4 -0
  27. package/dist/Components/Drawer/index.js +3 -0
  28. package/dist/Components/FormControl/formControl.types.d.ts +6 -6
  29. package/dist/Components/FormField/formField.types.d.ts +7 -7
  30. package/dist/Components/Label/label.types.d.ts +1 -1
  31. package/dist/Components/Link/link.types.d.ts +3 -3
  32. package/dist/Components/List/list.types.d.ts +1 -1
  33. package/dist/Components/ListItem/listItem.types.d.ts +1 -1
  34. package/dist/Components/ListSection/listSection.types.d.ts +1 -1
  35. package/dist/Components/Listbox/listbox.types.d.ts +5 -5
  36. package/dist/Components/Menu/menu.types.d.ts +3 -3
  37. package/dist/Components/Modal/composables/useModal.js +0 -1
  38. package/dist/Components/Modal/modal.types.d.ts +3 -2
  39. package/dist/Components/Select/Select.vue.d.ts +2 -2
  40. package/dist/Components/Select/select.types.d.ts +5 -5
  41. package/dist/Components/Snackbar/composables/useSnackbar.js +1 -1
  42. package/dist/Components/Snackbar/snackbar.types.d.ts +7 -7
  43. package/dist/Components/Spinner/composables/useSpinner.js +16 -16
  44. package/dist/Components/Tab/Tab.js +5 -0
  45. package/dist/Components/Tab/Tab.vue.d.ts +11 -0
  46. package/dist/Components/Tab/Tab.vue_vue_type_script_setup_true_lang.js +33 -0
  47. package/dist/Components/Tab/composables/useTab.d.ts +23 -0
  48. package/dist/Components/Tab/composables/useTab.js +88 -0
  49. package/dist/Components/Tab/index.d.ts +3 -0
  50. package/dist/Components/Tab/index.js +3 -0
  51. package/dist/Components/Tab/tab.types.d.ts +94 -0
  52. package/dist/Components/TabItem/TabItem.js +5 -0
  53. package/dist/Components/TabItem/TabItem.vue.d.ts +11 -0
  54. package/dist/Components/TabItem/TabItem.vue_vue_type_script_setup_true_lang.js +25 -0
  55. package/dist/Components/TabItem/composables/useTabItem.d.ts +3 -0
  56. package/dist/Components/TabItem/composables/useTabItem.js +39 -0
  57. package/dist/Components/TabItem/index.d.ts +3 -0
  58. package/dist/Components/TabItem/index.js +3 -0
  59. package/dist/Components/TabItem/tabItem.types.d.ts +72 -0
  60. package/dist/Components/TabList/TabList.js +5 -0
  61. package/dist/Components/TabList/TabList.vue.d.ts +11 -0
  62. package/dist/Components/TabList/TabList.vue_vue_type_script_setup_true_lang.js +18 -0
  63. package/dist/Components/TabList/composables/useTabList.d.ts +10 -0
  64. package/dist/Components/TabList/composables/useTabList.js +65 -0
  65. package/dist/Components/TabList/index.d.ts +3 -0
  66. package/dist/Components/TabList/index.js +3 -0
  67. package/dist/Components/TabList/tabList.types.d.ts +38 -0
  68. package/dist/Components/TabPanel/TabPanel.js +5 -0
  69. package/dist/Components/TabPanel/TabPanel.vue.d.ts +11 -0
  70. package/dist/Components/TabPanel/TabPanel.vue_vue_type_script_setup_true_lang.js +20 -0
  71. package/dist/Components/TabPanel/composables/useTabPanel.d.ts +14 -0
  72. package/dist/Components/TabPanel/composables/useTabPanel.js +51 -0
  73. package/dist/Components/TabPanel/index.d.ts +3 -0
  74. package/dist/Components/TabPanel/index.js +3 -0
  75. package/dist/Components/TabPanel/tabPanel.types.d.ts +48 -0
  76. package/dist/Components/Tabs/Tabs.js +5 -0
  77. package/dist/Components/Tabs/Tabs.vue.d.ts +24 -0
  78. package/dist/Components/Tabs/Tabs.vue_vue_type_script_setup_true_lang.js +73 -0
  79. package/dist/Components/Tabs/composables/useTabs.d.ts +39 -0
  80. package/dist/Components/Tabs/composables/useTabs.js +99 -0
  81. package/dist/Components/Tabs/index.d.ts +4 -0
  82. package/dist/Components/Tabs/index.js +4 -0
  83. package/dist/Components/Tabs/tabs.types.d.ts +93 -0
  84. package/dist/Components/Tabs/tabsInjectionKey.d.ts +121 -0
  85. package/dist/Components/Tabs/tabsInjectionKey.js +4 -0
  86. package/dist/Utils/index.d.ts +2 -0
  87. package/dist/Utils/index.js +20 -19
  88. package/dist/Utils/useBreakpoint.d.ts +19 -0
  89. package/dist/Utils/useBreakpoint.js +35 -0
  90. package/dist/index.d.ts +14 -1
  91. package/dist/index.js +76 -62
  92. package/dist/theme.css +9 -0
  93. package/package.json +2 -2
@@ -185,30 +185,30 @@ export interface SnackbarSlots {
185
185
  /**
186
186
  * Inline actions below the description.
187
187
  */
188
- actions?: Slot;
188
+ actions?: Slot<undefined>;
189
189
  /**
190
190
  * Content below the title/description.
191
191
  */
192
- default?: Slot;
192
+ default?: Slot<undefined>;
193
193
  /**
194
194
  * Custom description markup.
195
195
  */
196
- description?: Slot;
196
+ description?: Slot<undefined>;
197
197
  /**
198
198
  * Custom icon markup.
199
199
  */
200
- icon?: Slot;
200
+ icon?: Slot<undefined>;
201
201
  /**
202
202
  * Vertical action column on the right edge (WireUI `rightButtons` layout).
203
203
  */
204
- right?: Slot;
204
+ right?: Slot<undefined>;
205
205
  /**
206
206
  * Custom title markup.
207
207
  */
208
- title?: Slot;
208
+ title?: Slot<undefined>;
209
209
  /**
210
210
  * Content before the close button (e.g. compact accept action with `padding="small"`).
211
211
  */
212
- trailing?: Slot;
212
+ trailing?: Slot<undefined>;
213
213
  }
214
214
  export type SnackbarProps = MergeHtmlProps<SnackbarOwnProps, HTMLAttributes>;
@@ -32,17 +32,17 @@ function v(o, v) {
32
32
  }), C = n({
33
33
  entry: S,
34
34
  props: () => b.value.componentProps
35
- }), w = r(() => x.value.customProps), T = r(() => a(d(p, S.value?.customProps?.color), x.value.color)), E = r(() => a(d(m, S.value?.customProps?.size), x.value.size)), D = r(() => a(d(h, S.value?.customProps?.variant), x.value.variant)), O = r(() => x.value.thickness ?? s), k = r(() => x.value.variant === "determinate"), A = r(() => x.value.variant === "indeterminate"), j = r(() => !!x.value.enableTrack), M = r(() => !!x.value.disableShrink), N = r(() => _(x.value.value)), P = r(() => u(O.value)), F = c / 2, I = r(() => e(w.value?.root, b.value.inheritedAttrs, {
35
+ }), w = r(() => x.value.customProps), T = r(() => a(d(p, S.value?.customProps?.color), x.value.color)), E = r(() => a(d(m, S.value?.customProps?.size), x.value.size)), D = r(() => a(d(h, S.value?.customProps?.variant), x.value.variant)), O = r(() => x.value.thickness ?? s), k = r(() => u(O.value)), A = c / 2, j = r(() => _(x.value.value)), M = r(() => !!x.value.enableTrack), N = r(() => !!x.value.disableShrink), P = r(() => x.value.variant === "determinate"), F = r(() => x.value.variant === "indeterminate"), I = r(() => e(w.value?.root, b.value.inheritedAttrs, {
36
36
  role: "progressbar",
37
- ...k.value ? {
37
+ ...P.value ? {
38
38
  "aria-valuemin": 0,
39
39
  "aria-valuemax": 100,
40
- "aria-valuenow": N.value
40
+ "aria-valuenow": j.value
41
41
  } : {},
42
42
  class: l({
43
43
  "inline-block": !0,
44
44
  [E.value ?? ""]: !0,
45
- [D.value ?? ""]: A.value,
45
+ [D.value ?? ""]: F.value,
46
46
  [C.value.root ?? ""]: !0
47
47
  })
48
48
  }));
@@ -53,31 +53,31 @@ function v(o, v) {
53
53
  [C.value.svg ?? ""]: !0
54
54
  }))),
55
55
  rootBind: I,
56
- trackBind: r(() => j.value ? e(w.value?.track, {
57
- cx: F,
58
- cy: F,
56
+ trackBind: r(() => M.value ? e(w.value?.track, {
57
+ cx: A,
58
+ cy: A,
59
59
  fill: "none",
60
- r: P.value.radius,
60
+ r: k.value.radius,
61
61
  "stroke-width": O.value
62
62
  }, l({
63
63
  [T.value?.track ?? ""]: !0,
64
64
  [C.value.track ?? ""]: !0
65
65
  })) : null),
66
66
  circleBind: r(() => {
67
- let { radius: t, circumference: n } = P.value, r = k.value ? {
67
+ let { radius: t, circumference: n } = k.value, r = P.value ? {
68
68
  transformOrigin: "50% 50%",
69
69
  transform: "rotate(-90deg)",
70
70
  strokeDasharray: n,
71
71
  transition: "stroke-dashoffset 200ms linear",
72
- strokeDashoffset: (100 - N.value) / 100 * n
73
- } : {}, i = A.value ? {
72
+ strokeDashoffset: (100 - j.value) / 100 * n
73
+ } : {}, i = F.value ? {
74
74
  strokeDashoffset: 0,
75
- strokeDasharray: M.value ? `${n * .8}px, ${n}px` : "80px, 200px"
75
+ strokeDasharray: N.value ? `${n * .8}px, ${n}px` : "80px, 200px"
76
76
  } : {};
77
77
  return e(w.value?.circle, {
78
78
  r: t,
79
- cx: F,
80
- cy: F,
79
+ cx: A,
80
+ cy: A,
81
81
  fill: "none",
82
82
  "stroke-width": O.value,
83
83
  style: {
@@ -86,11 +86,11 @@ function v(o, v) {
86
86
  }
87
87
  }, l({
88
88
  [T.value?.circle ?? ""]: !0,
89
- "animate-bridge-spinner-dash": A.value && !M.value,
89
+ "animate-bridge-spinner-dash": F.value && !N.value,
90
90
  [C.value.circle ?? ""]: !0
91
91
  }));
92
92
  }),
93
- enableTrack: j
93
+ enableTrack: M
94
94
  };
95
95
  }
96
96
  //#endregion
@@ -0,0 +1,5 @@
1
+ import e from "./Tab.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/Tab/Tab.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,11 @@
1
+ import { TabOwnProps, TabSlots } from './tab.types';
2
+ type __VLS_Slots = TabSlots;
3
+ declare const __VLS_base: import('vue').DefineComponent<TabOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TabOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
4
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
7
+ type __VLS_WithSlots<T, S> = T & {
8
+ new (): {
9
+ $slots: S;
10
+ };
11
+ };
@@ -0,0 +1,33 @@
1
+ import { hasNamedSlot as e, resolveNamedSlot as t } from "../../Utils/slotOrProp.js";
2
+ import n from "../Icon/Icon.js";
3
+ import { useTab as r } from "./composables/useTab.js";
4
+ import { createBlock as i, createCommentVNode as a, createElementBlock as o, defineComponent as s, guardReactiveProps as c, mergeProps as l, normalizeProps as u, openBlock as d, resolveDynamicComponent as f, unref as p, useSlots as m } from "vue";
5
+ //#region src/Components/Tab/Tab.vue?vue&type=script&setup=true&lang.ts
6
+ var h = /* @__PURE__ */ s({
7
+ inheritAttrs: !1,
8
+ __name: "Tab",
9
+ props: {
10
+ classes: {},
11
+ customProps: {},
12
+ disabled: { type: Boolean },
13
+ endIcon: { type: [Function, Object] },
14
+ startIcon: { type: [Function, Object] },
15
+ value: {}
16
+ },
17
+ setup(s) {
18
+ let h = m(), { merged: g, iconSize: _, rootBind: v, endIconBind: y, endSlotBind: b, startIconBind: x, startSlotBind: S } = r(s);
19
+ return (r, s) => (d(), o("button", u(c(p(v))), [
20
+ p(g).startIcon ? (d(), i(p(n), l({
21
+ key: 0,
22
+ size: p(_)
23
+ }, p(x), { icon: p(g).startIcon }), null, 16, ["size", "icon"])) : p(e)(p(h), "start") ? (d(), o("div", u(l({ key: 1 }, p(S))), [(d(), i(f(p(t)(p(h), "start"))))], 16)) : a("", !0),
24
+ (d(), i(f(p(t)(p(h), "default")))),
25
+ p(g).endIcon ? (d(), i(p(n), l({
26
+ key: 2,
27
+ size: p(_)
28
+ }, p(y), { icon: p(g).endIcon }), null, 16, ["size", "icon"])) : p(e)(p(h), "end") ? (d(), o("div", u(l({ key: 3 }, p(b))), [(d(), i(f(p(t)(p(h), "end"))))], 16)) : a("", !0)
29
+ ], 16));
30
+ }
31
+ });
32
+ //#endregion
33
+ export { h as default };
@@ -0,0 +1,23 @@
1
+ import { IconSize } from '@bridge-ui/core';
2
+ import { TabOwnProps, TabProps } from '../tab.types';
3
+ export declare function useTab(props: TabOwnProps): {
4
+ merged: import('vue').ComputedRef<TabOwnProps>;
5
+ iconSize: import('vue').ComputedRef<keyof IconSize>;
6
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<{
7
+ role: string;
8
+ type: string;
9
+ onClick: (event: PointerEvent) => void;
10
+ disabled: boolean;
11
+ onKeydown: (event: KeyboardEvent) => void;
12
+ "aria-selected": boolean;
13
+ tabindex: number;
14
+ id: string;
15
+ "aria-controls": string;
16
+ class: string;
17
+ }, "class", import('vue').ButtonHTMLAttributes | undefined, Omit<TabProps, "value" | "classes" | "customProps" | "disabled" | "endIcon" | "startIcon">>>;
18
+ selected: import('vue').ComputedRef<boolean>;
19
+ endIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
20
+ endSlotBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
21
+ startIconBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", Partial<Omit<import('../../Icon').IconProps, "icon">> | undefined, {}>>;
22
+ startSlotBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
23
+ };
@@ -0,0 +1,88 @@
1
+ import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
2
+ import { TABS_INJECTION_KEY as r } from "../../Tabs/tabsInjectionKey.js";
3
+ import { computed as i, inject as a, onBeforeUnmount as o, onMounted as s, useAttrs as c, watch as l } from "vue";
4
+ import { get as u } from "es-toolkit/compat";
5
+ import { cn as d, getTabId as f, getTabPanelId as p, splitComponentProps as m } from "@bridge-ui/core";
6
+ //#region src/Components/Tab/composables/useTab.ts
7
+ var h = [
8
+ "value",
9
+ "classes",
10
+ "endIcon",
11
+ "disabled",
12
+ "startIcon",
13
+ "customProps"
14
+ ];
15
+ function g(g) {
16
+ let _ = c(), v = a(r, null);
17
+ if (!v) throw Error("Tab must be used within a Tabs provider");
18
+ let y = v, b = i(() => m({
19
+ bridgeKeys: h,
20
+ props: {
21
+ ..._,
22
+ ...g
23
+ }
24
+ })), { merged: x, entry: S } = t({
25
+ componentName: "Tab",
26
+ props: () => b.value.componentProps
27
+ }), C = i(() => x.value.value), w = i(() => x.value.disabled === !0), T = i(() => y.value.selected === C.value), E = null;
28
+ function D() {
29
+ E?.(), E = y.value.registerTab(C.value, w.value);
30
+ }
31
+ s(D), l([C, w], D), o(() => {
32
+ E?.(), E = null;
33
+ });
34
+ let O = n({
35
+ entry: S,
36
+ props: () => b.value.componentProps
37
+ });
38
+ function k(e) {
39
+ w.value || (y.value.setSelected(C.value), b.value.inheritedAttrs.onClick?.(e));
40
+ }
41
+ function A(e) {
42
+ let t = y.value;
43
+ t.activation === "manual" && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), w.value || t.setSelected(C.value)), b.value.inheritedAttrs.onKeydown?.(e);
44
+ }
45
+ let j = i(() => x.value.customProps);
46
+ return {
47
+ merged: x,
48
+ iconSize: i(() => y.value.tokenClasses.iconSize ?? "md"),
49
+ rootBind: i(() => {
50
+ let t = y.value;
51
+ return e(j.value?.root, b.value.inheritedAttrs, {
52
+ role: "tab",
53
+ type: "button",
54
+ onClick: k,
55
+ disabled: w.value,
56
+ onKeydown: A,
57
+ "aria-selected": T.value,
58
+ tabindex: T.value ? 0 : -1,
59
+ id: f(t.id, C.value),
60
+ "aria-controls": p(t.id, C.value),
61
+ class: d({
62
+ "inline-flex cursor-pointer items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-500/40 disabled:pointer-events-none disabled:opacity-50": !0,
63
+ [t.tokenClasses.iconGap ?? ""]: !0,
64
+ [t.tokenClasses.tabSize ?? ""]: !0,
65
+ [t.tokenClasses.tabVariant ?? ""]: !0,
66
+ [t.tokenClasses.tabOrientation ?? ""]: !0,
67
+ [t.tokenClasses.tabVariantSelected ?? ""]: T.value,
68
+ [t.tokenClasses.colorSelected ?? ""]: T.value,
69
+ [t.tokenClasses.colorSelectedSoft ?? ""]: T.value && t.tokenClasses.softFill === !0,
70
+ [u(O.value, "root") ?? ""]: !0
71
+ })
72
+ });
73
+ }),
74
+ selected: T,
75
+ endIconBind: i(() => e(j.value?.endIcon, {}, d({
76
+ "shrink-0": !0,
77
+ [u(O.value, "endIcon") ?? ""]: !0
78
+ }))),
79
+ endSlotBind: i(() => e(j.value?.end, {}, "inline-flex shrink-0 items-center")),
80
+ startIconBind: i(() => e(j.value?.startIcon, {}, d({
81
+ "shrink-0": !0,
82
+ [u(O.value, "startIcon") ?? ""]: !0
83
+ }))),
84
+ startSlotBind: i(() => e(j.value?.start, {}, "inline-flex shrink-0 items-center"))
85
+ };
86
+ }
87
+ //#endregion
88
+ export { g as useTab };
@@ -0,0 +1,3 @@
1
+ export { useTab } from './composables/useTab';
2
+ export type { TabClasses, TabCustomProps, TabOwnProps, TabProps, TabSlots, } from './tab.types';
3
+ export { default as Tab } from './Tab.vue';
@@ -0,0 +1,3 @@
1
+ import { useTab as e } from "./composables/useTab.js";
2
+ import t from "./Tab.js";
3
+ export { t as Tab, e as useTab };
@@ -0,0 +1,94 @@
1
+ import { LucideIcon } from '@lucide/vue';
2
+ import { ButtonHTMLAttributes, HTMLAttributes, Slot } from 'vue';
3
+ import { MergeHtmlProps } from '@bridge-ui/core';
4
+ import { IconProps } from '../Icon';
5
+ export interface TabClasses {
6
+ /**
7
+ * Classes merged onto the end icon.
8
+ */
9
+ endIcon?: string;
10
+ /**
11
+ * Classes merged onto the tab button.
12
+ */
13
+ root?: string;
14
+ /**
15
+ * Classes merged onto the start icon.
16
+ */
17
+ startIcon?: string;
18
+ }
19
+ export interface TabCustomProps {
20
+ /**
21
+ * Props forwarded to the inline-end slot wrapper.
22
+ */
23
+ end?: HTMLAttributes;
24
+ /**
25
+ * Props forwarded to the end `Icon`.
26
+ */
27
+ endIcon?: Partial<Omit<IconProps, "icon">>;
28
+ /**
29
+ * Props forwarded to the tab button.
30
+ */
31
+ root?: ButtonHTMLAttributes;
32
+ /**
33
+ * Props forwarded to the inline-start slot wrapper.
34
+ */
35
+ start?: HTMLAttributes;
36
+ /**
37
+ * Props forwarded to the start `Icon`.
38
+ */
39
+ startIcon?: Partial<Omit<IconProps, "icon">>;
40
+ }
41
+ /**
42
+ * Tab trigger (`role="tab"`). Must be used inside `Tabs` / `TabList`.
43
+ */
44
+ export interface TabOwnProps {
45
+ /**
46
+ * Classes for tab parts.
47
+ *
48
+ * @default undefined
49
+ */
50
+ classes?: TabClasses;
51
+ /**
52
+ * Props forwarded to each tab part.
53
+ *
54
+ * @default undefined
55
+ */
56
+ customProps?: TabCustomProps;
57
+ /**
58
+ * Whether the tab is disabled.
59
+ *
60
+ * @default false
61
+ */
62
+ disabled?: boolean;
63
+ /**
64
+ * Icon at the **inline end** (physical right in `ltr`, physical left in `rtl`).
65
+ *
66
+ * @default undefined
67
+ */
68
+ endIcon?: LucideIcon;
69
+ /**
70
+ * Icon at the **inline start** (physical left in `ltr`, physical right in `rtl`). Prefer over the `#start` slot.
71
+ *
72
+ * @default undefined
73
+ */
74
+ startIcon?: LucideIcon;
75
+ /**
76
+ * Stable value matching a `TabPanel`.
77
+ */
78
+ value: string;
79
+ }
80
+ export interface TabSlots {
81
+ /**
82
+ * The label content.
83
+ */
84
+ default?: Slot<undefined>;
85
+ /**
86
+ * Slot at the inline end (ignored when `endIcon` is set).
87
+ */
88
+ end?: Slot<undefined>;
89
+ /**
90
+ * Slot at the inline start (ignored when `startIcon` is set).
91
+ */
92
+ start?: Slot<undefined>;
93
+ }
94
+ export type TabProps = MergeHtmlProps<TabOwnProps, ButtonHTMLAttributes>;
@@ -0,0 +1,5 @@
1
+ import e from "./TabItem.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/TabItem/TabItem.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,11 @@
1
+ import { TabItemOwnProps, TabItemSlots } from './tabItem.types';
2
+ type __VLS_Slots = TabItemSlots;
3
+ declare const __VLS_base: import('vue').DefineComponent<TabItemOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TabItemOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
4
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
7
+ type __VLS_WithSlots<T, S> = T & {
8
+ new (): {
9
+ $slots: S;
10
+ };
11
+ };
@@ -0,0 +1,25 @@
1
+ import { useTabItem as e } from "./composables/useTabItem.js";
2
+ import { createElementBlock as t, defineComponent as n, openBlock as r, useSlots as i } from "vue";
3
+ //#region src/Components/TabItem/TabItem.vue?vue&type=script&setup=true&lang.ts
4
+ var a = {
5
+ hidden: "",
6
+ "aria-hidden": "true"
7
+ }, o = /* @__PURE__ */ n({
8
+ name: "TabItem",
9
+ inheritAttrs: !1,
10
+ __name: "TabItem",
11
+ props: {
12
+ classes: {},
13
+ disabled: { type: Boolean },
14
+ endIcon: { type: [Function, Object] },
15
+ keepMounted: { type: Boolean },
16
+ label: {},
17
+ startIcon: { type: [Function, Object] },
18
+ value: {}
19
+ },
20
+ setup(n) {
21
+ return e(n, i()), (e, n) => (r(), t("span", a));
22
+ }
23
+ });
24
+ //#endregion
25
+ export { o as default };
@@ -0,0 +1,3 @@
1
+ import { SetupContext } from 'vue';
2
+ import { TabItemOwnProps, TabItemSlots } from '../tabItem.types';
3
+ export declare function useTabItem(props: TabItemOwnProps, slots: SetupContext<TabItemSlots>["slots"]): void;
@@ -0,0 +1,39 @@
1
+ import { TABS_INJECTION_KEY as e } from "../../Tabs/tabsInjectionKey.js";
2
+ import { inject as t, onBeforeUnmount as n, onMounted as r, watch as i } from "vue";
3
+ //#region src/Components/TabItem/composables/useTabItem.ts
4
+ function a(a, o) {
5
+ let s = t(e, null);
6
+ if (!s) throw Error("TabItem must be used within a Tabs provider");
7
+ let c = s, l;
8
+ function u() {
9
+ l?.(), l = c.value.registerTabItem({
10
+ value: a.value,
11
+ endIcon: a.endIcon,
12
+ disabled: a.disabled,
13
+ startIcon: a.startIcon,
14
+ keepMounted: a.keepMounted,
15
+ panel: () => o.default?.(),
16
+ label: a.label ?? (() => o.label?.()),
17
+ slots: o.start || o.end ? {
18
+ end: o.end ? () => o.end?.() : void 0,
19
+ start: o.start ? () => o.start?.() : void 0
20
+ } : void 0
21
+ });
22
+ }
23
+ r(u), i(() => [
24
+ a.label,
25
+ a.value,
26
+ a.endIcon,
27
+ a.disabled,
28
+ a.startIcon,
29
+ a.keepMounted,
30
+ !!o.end,
31
+ !!o.label,
32
+ !!o.start,
33
+ !!o.default
34
+ ], u), n(() => {
35
+ l?.();
36
+ });
37
+ }
38
+ //#endregion
39
+ export { a as useTabItem };
@@ -0,0 +1,3 @@
1
+ export { useTabItem } from './composables/useTabItem';
2
+ export type { TabItemClasses, TabItemOwnProps, TabItemProps, TabItemSlots, } from './tabItem.types';
3
+ export { default as TabItem } from './TabItem.vue';
@@ -0,0 +1,3 @@
1
+ import { useTabItem as e } from "./composables/useTabItem.js";
2
+ import t from "./TabItem.js";
3
+ export { t as TabItem, e as useTabItem };
@@ -0,0 +1,72 @@
1
+ import { LucideIcon } from '@lucide/vue';
2
+ import { Slot } from 'vue';
3
+ export interface TabItemClasses {
4
+ /**
5
+ * Unused on the registration-only root; reserved for overrides.
6
+ */
7
+ root?: string;
8
+ }
9
+ /**
10
+ * Ergonomic shortcut: registers a `Tab` label + `TabPanel` content with `Tabs`.
11
+ */
12
+ export interface TabItemOwnProps {
13
+ /**
14
+ * Classes reserved for registry overrides.
15
+ *
16
+ * @default undefined
17
+ */
18
+ classes?: TabItemClasses;
19
+ /**
20
+ * Whether the tab is disabled.
21
+ *
22
+ * @default false
23
+ */
24
+ disabled?: boolean;
25
+ /**
26
+ * Icon at the **inline end** on the tab trigger.
27
+ *
28
+ * @default undefined
29
+ */
30
+ endIcon?: LucideIcon;
31
+ /**
32
+ * When set, overrides `Tabs` `keepMounted` for this panel.
33
+ *
34
+ * @default undefined
35
+ */
36
+ keepMounted?: boolean;
37
+ /**
38
+ * Label shown on the tab trigger (or use the `label` slot).
39
+ *
40
+ * @default undefined
41
+ */
42
+ label?: string;
43
+ /**
44
+ * Icon at the **inline start** on the tab trigger.
45
+ *
46
+ * @default undefined
47
+ */
48
+ startIcon?: LucideIcon;
49
+ /**
50
+ * Stable value for the tab / panel pair.
51
+ */
52
+ value: string;
53
+ }
54
+ export interface TabItemSlots {
55
+ /**
56
+ * Panel content for this tab.
57
+ */
58
+ default?: Slot<undefined>;
59
+ /**
60
+ * Trailing custom content on the tab trigger (ignored when `endIcon` is set).
61
+ */
62
+ end?: Slot<undefined>;
63
+ /**
64
+ * Label content when not using the `label` prop.
65
+ */
66
+ label?: Slot<undefined>;
67
+ /**
68
+ * Leading custom content on the tab trigger (ignored when `startIcon` is set).
69
+ */
70
+ start?: Slot<undefined>;
71
+ }
72
+ export type TabItemProps = TabItemOwnProps;
@@ -0,0 +1,5 @@
1
+ import e from "./TabList.vue_vue_type_script_setup_true_lang.js";
2
+ //#region src/Components/TabList/TabList.vue
3
+ var t = e;
4
+ //#endregion
5
+ export { t as default };
@@ -0,0 +1,11 @@
1
+ import { TabListOwnProps, TabListSlots } from './tabList.types';
2
+ type __VLS_Slots = TabListSlots;
3
+ declare const __VLS_base: import('vue').DefineComponent<TabListOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TabListOwnProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
4
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
5
+ declare const _default: typeof __VLS_export;
6
+ export default _default;
7
+ type __VLS_WithSlots<T, S> = T & {
8
+ new (): {
9
+ $slots: S;
10
+ };
11
+ };
@@ -0,0 +1,18 @@
1
+ import { resolveNamedSlot as e } from "../../Utils/slotOrProp.js";
2
+ import { useTabList as t } from "./composables/useTabList.js";
3
+ import { createBlock as n, createElementBlock as r, defineComponent as i, guardReactiveProps as a, normalizeProps as o, openBlock as s, resolveDynamicComponent as c, unref as l, useSlots as u } from "vue";
4
+ //#region src/Components/TabList/TabList.vue?vue&type=script&setup=true&lang.ts
5
+ var d = /* @__PURE__ */ i({
6
+ inheritAttrs: !1,
7
+ __name: "TabList",
8
+ props: {
9
+ classes: {},
10
+ customProps: {}
11
+ },
12
+ setup(i) {
13
+ let d = u(), { rootBind: f } = t(i);
14
+ return (t, i) => (s(), r("div", o(a(l(f))), [(s(), n(c(l(e)(l(d), "default"))))], 16));
15
+ }
16
+ });
17
+ //#endregion
18
+ export { d as default };
@@ -0,0 +1,10 @@
1
+ import { TabListOwnProps, TabListProps } from '../tabList.types';
2
+ export declare function useTabList(props: TabListOwnProps): {
3
+ merged: import('vue').ComputedRef<TabListOwnProps>;
4
+ rootBind: import('vue').ComputedRef<import('@bridge-ui/core').MergePartBind<{
5
+ role: string;
6
+ onKeydown: (event: KeyboardEvent) => void;
7
+ "aria-orientation": "horizontal" | "vertical";
8
+ class: string;
9
+ }, "class", import('vue').HTMLAttributes | undefined, Omit<TabListProps, "classes" | "customProps">>>;
10
+ };