@bridge-ui/vue 0.3.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.
- package/ai/skills/bridge-ui-components/SKILL.md +3 -1
- package/dist/Components/Accordion/accordionInjectionKey.d.ts +1 -0
- package/dist/Components/Accordion/composables/useAccordion.js +3 -2
- package/dist/Components/AccordionItem/composables/useAccordionItem.js +1 -0
- package/dist/Components/Autocomplete/Autocomplete.vue_vue_type_script_setup_true_lang.js +40 -45
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +1 -0
- package/dist/Components/ColorField/ColorField.vue_vue_type_script_setup_true_lang.js +39 -44
- package/dist/Components/ColorField/composables/useColorField.d.ts +1 -0
- package/dist/Components/DataTable/DataTable.vue.d.ts +4 -4
- package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +139 -121
- package/dist/Components/DataTable/DataTableColumnsMenu.vue.d.ts +9 -3
- package/dist/Components/DataTable/DataTableColumnsMenu.vue_vue_type_script_setup_true_lang.js +71 -26
- package/dist/Components/DataTable/DataTableFilterMenu.vue.d.ts +5 -2
- package/dist/Components/DataTable/DataTableFilterMenu.vue_vue_type_script_setup_true_lang.js +94 -75
- package/dist/Components/DataTable/DataTableFilterOptions.vue.d.ts +4 -1
- package/dist/Components/DataTable/DataTableFilterOptions.vue_vue_type_script_setup_true_lang.js +12 -4
- package/dist/Components/DataTable/DataTableSelection.vue_vue_type_script_setup_true_lang.js +22 -21
- package/dist/Components/DataTable/DataTableToolbarButton.vue.d.ts +2 -1
- package/dist/Components/DataTable/composables/useDataTable.d.ts +12 -4
- package/dist/Components/DataTable/composables/useDataTable.js +255 -223
- package/dist/Components/DataTable/composables/useDataTableColumnsMenu.d.ts +27 -0
- package/dist/Components/DataTable/composables/useDataTableColumnsMenu.js +54 -0
- package/dist/Components/DataTable/dataTable.types.d.ts +26 -9
- package/dist/Components/DataTable/index.d.ts +1 -1
- package/dist/Components/DateField/DateField.vue_vue_type_script_setup_true_lang.js +52 -57
- package/dist/Components/DateField/composables/useDateField.d.ts +1 -0
- package/dist/Components/DateRangeField/DateRangeField.vue_vue_type_script_setup_true_lang.js +50 -55
- package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +1 -0
- package/dist/Components/DateTimeField/DateTimeField.vue_vue_type_script_setup_true_lang.js +56 -61
- package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +1 -0
- package/dist/Components/DateTimeRangeField/DateTimeRangeField.vue_vue_type_script_setup_true_lang.js +56 -61
- package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +1 -0
- package/dist/Components/EmptyState/EmptyState.js +5 -0
- package/dist/Components/EmptyState/EmptyState.vue.d.ts +16 -0
- package/dist/Components/EmptyState/EmptyState.vue_vue_type_script_setup_true_lang.js +42 -0
- package/dist/Components/EmptyState/composables/useEmptyState.d.ts +24 -0
- package/dist/Components/EmptyState/composables/useEmptyState.js +76 -0
- package/dist/Components/EmptyState/emptyState.types.d.ts +140 -0
- package/dist/Components/EmptyState/index.d.ts +3 -0
- package/dist/Components/EmptyState/index.js +3 -0
- package/dist/Components/FormField/composables/useFormField.d.ts +1 -0
- package/dist/Components/FormField/composables/useFormField.js +80 -75
- package/dist/Components/List/composables/useList.d.ts +3 -1
- package/dist/Components/List/composables/useList.js +2 -2
- package/dist/Components/ListItem/ListItem.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/Components/ListSection/ListSection.vue_vue_type_script_setup_true_lang.js +4 -4
- package/dist/Components/ListSection/composables/useListSection.d.ts +1 -0
- package/dist/Components/ListSection/composables/useListSection.js +30 -28
- package/dist/Components/ListSection/listSectionInjectionKey.d.ts +5 -0
- package/dist/Components/ListSection/listSectionInjectionKey.js +4 -0
- package/dist/Components/NumberField/NumberField.vue_vue_type_script_setup_true_lang.js +53 -43
- package/dist/Components/NumberField/composables/useNumberField.d.ts +8 -1
- package/dist/Components/NumberField/composables/useNumberField.js +49 -36
- package/dist/Components/NumberField/index.d.ts +1 -1
- package/dist/Components/NumberField/numberField.types.d.ts +13 -1
- package/dist/Components/PasswordField/PasswordField.vue_vue_type_script_setup_true_lang.js +28 -33
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +1 -0
- package/dist/Components/Select/Select.vue_vue_type_script_setup_true_lang.js +42 -47
- package/dist/Components/Select/composables/useSelect.d.ts +1 -0
- package/dist/Components/Sidebar/Sidebar.js +5 -0
- package/dist/Components/Sidebar/Sidebar.vue.d.ts +16 -0
- package/dist/Components/Sidebar/Sidebar.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/Components/Sidebar/SidebarInset.js +5 -0
- package/dist/Components/Sidebar/SidebarInset.vue.d.ts +11 -0
- package/dist/Components/Sidebar/SidebarInset.vue_vue_type_script_setup_true_lang.js +18 -0
- package/dist/Components/Sidebar/SidebarList.js +5 -0
- package/dist/Components/Sidebar/SidebarList.vue.d.ts +16 -0
- package/dist/Components/Sidebar/SidebarList.vue_vue_type_script_setup_true_lang.js +40 -0
- package/dist/Components/Sidebar/SidebarListItem.js +5 -0
- package/dist/Components/Sidebar/SidebarListItem.vue.d.ts +13 -0
- package/dist/Components/Sidebar/SidebarListItem.vue_vue_type_script_setup_true_lang.js +120 -0
- package/dist/Components/Sidebar/SidebarProvider.js +5 -0
- package/dist/Components/Sidebar/SidebarProvider.vue.d.ts +24 -0
- package/dist/Components/Sidebar/SidebarProvider.vue_vue_type_script_setup_true_lang.js +29 -0
- package/dist/Components/Sidebar/SidebarTrigger.js +5 -0
- package/dist/Components/Sidebar/SidebarTrigger.vue.d.ts +11 -0
- package/dist/Components/Sidebar/SidebarTrigger.vue_vue_type_script_setup_true_lang.js +35 -0
- package/dist/Components/Sidebar/composables/useSidebar.d.ts +6 -0
- package/dist/Components/Sidebar/composables/useSidebar.js +10 -0
- package/dist/Components/Sidebar/composables/useSidebarInset.d.ts +7 -0
- package/dist/Components/Sidebar/composables/useSidebarInset.js +32 -0
- package/dist/Components/Sidebar/composables/useSidebarList.d.ts +8 -0
- package/dist/Components/Sidebar/composables/useSidebarList.js +27 -0
- package/dist/Components/Sidebar/composables/useSidebarListItem.d.ts +15 -0
- package/dist/Components/Sidebar/composables/useSidebarListItem.js +44 -0
- package/dist/Components/Sidebar/composables/useSidebarProvider.d.ts +18 -0
- package/dist/Components/Sidebar/composables/useSidebarProvider.js +88 -0
- package/dist/Components/Sidebar/composables/useSidebarShell.d.ts +41 -0
- package/dist/Components/Sidebar/composables/useSidebarShell.js +116 -0
- package/dist/Components/Sidebar/composables/useSidebarTrigger.d.ts +10 -0
- package/dist/Components/Sidebar/composables/useSidebarTrigger.js +25 -0
- package/dist/Components/Sidebar/index.d.ts +15 -0
- package/dist/Components/Sidebar/index.js +15 -0
- package/dist/Components/Sidebar/sidebar.types.d.ts +244 -0
- package/dist/Components/Sidebar/sidebarInjectionKey.d.ts +80 -0
- package/dist/Components/Sidebar/sidebarInjectionKey.js +4 -0
- package/dist/Components/Sidebar/sidebarListInjectionKey.d.ts +5 -0
- package/dist/Components/Sidebar/sidebarListInjectionKey.js +4 -0
- package/dist/Components/Slider/Slider.vue_vue_type_script_setup_true_lang.js +42 -47
- package/dist/Components/Slider/composables/useSlider.d.ts +1 -1
- package/dist/Components/Table/Table.vue_vue_type_script_setup_true_lang.js +2 -2
- package/dist/Components/Table/composables/useTable.d.ts +3 -0
- package/dist/Components/Table/composables/useTable.js +1 -0
- package/dist/Components/Table/table.types.d.ts +2 -1
- package/dist/Components/TextField/TextField.vue_vue_type_script_setup_true_lang.js +11 -16
- package/dist/Components/TextField/composables/useTextField.d.ts +1 -0
- package/dist/Components/Textarea/Textarea.vue_vue_type_script_setup_true_lang.js +15 -20
- package/dist/Components/Textarea/composables/useTextarea.d.ts +1 -0
- package/dist/Components/TimeField/TimeField.vue_vue_type_script_setup_true_lang.js +45 -50
- package/dist/Components/TimeField/composables/useTimeField.d.ts +1 -0
- package/dist/Components/TimeRangeField/TimeRangeField.vue_vue_type_script_setup_true_lang.js +45 -50
- package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +1 -0
- package/dist/Utils/index.d.ts +1 -0
- package/dist/Utils/index.js +28 -27
- package/dist/Utils/useOptionalModel.d.ts +6 -0
- package/dist/Utils/useOptionalModel.js +13 -0
- package/dist/augments.d.ts +11 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +79 -64
- package/dist/theme.css +46 -42
- package/docs/README.md +2 -0
- package/docs/ScrollUtilities.md +1 -1
- package/docs/components/DataTable.md +43 -17
- package/docs/components/Drawer.md +1 -1
- package/docs/components/EmptyState.md +125 -0
- package/docs/components/List.md +1 -1
- package/docs/components/NumberField.md +17 -6
- package/docs/components/Sidebar.md +281 -0
- package/docs/examples/i18n-dictionary.ts +6 -0
- package/docs/examples/icon-fontawesome.ts +5 -0
- package/docs/examples/icon-heroicons.ts +6 -0
- package/docs/examples/icon-lucide.ts +6 -0
- package/docs/examples/icon-phosphor.ts +6 -0
- package/docs/examples/icon-tabler.ts +6 -0
- package/package.json +2 -2
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { hasNamedSlot as e } from "../../Utils/slotOrProp.js";
|
|
2
|
+
import t from "../ListItem/ListItem.js";
|
|
3
|
+
import { useSidebarListItem as n } from "./composables/useSidebarListItem.js";
|
|
4
|
+
import r from "../Tooltip/Tooltip.js";
|
|
5
|
+
import { computed as i, createBlock as a, createElementBlock as o, createSlots as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeProps as d, normalizeProps as f, openBlock as p, renderSlot as m, unref as h, useAttrs as g, useSlots as _, withCtx as v } from "vue";
|
|
6
|
+
import { cn as y } from "@bridge-ui/core/Utils";
|
|
7
|
+
//#region src/Components/Sidebar/SidebarListItem.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var b = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "list-none"
|
|
11
|
+
}, x = /*@__PURE__*/ l({
|
|
12
|
+
inheritAttrs: !1,
|
|
13
|
+
__name: "SidebarListItem",
|
|
14
|
+
props: {
|
|
15
|
+
as: {},
|
|
16
|
+
classes: {},
|
|
17
|
+
customProps: {},
|
|
18
|
+
dense: { type: Boolean },
|
|
19
|
+
disabled: { type: Boolean },
|
|
20
|
+
divider: { type: Boolean },
|
|
21
|
+
interactive: { type: Boolean },
|
|
22
|
+
primary: {},
|
|
23
|
+
role: {},
|
|
24
|
+
secondary: {},
|
|
25
|
+
selected: { type: Boolean },
|
|
26
|
+
selectedIcon: {},
|
|
27
|
+
value: {},
|
|
28
|
+
tooltip: {},
|
|
29
|
+
tooltipPlacement: {}
|
|
30
|
+
},
|
|
31
|
+
setup(l) {
|
|
32
|
+
let x = l, S = g(), C = _(), { itemClasses: w, accessibleName: T, tooltip: E, tooltipPlacement: D } = n(x), O = i(() => {
|
|
33
|
+
let { classes: e, customProps: t, tooltip: n, tooltipPlacement: r, ...i } = x;
|
|
34
|
+
return {
|
|
35
|
+
...S,
|
|
36
|
+
...i,
|
|
37
|
+
...E.value ? { as: "div" } : {},
|
|
38
|
+
customProps: {
|
|
39
|
+
...t,
|
|
40
|
+
interactive: {
|
|
41
|
+
...T.value ? { "aria-label": T.value } : {},
|
|
42
|
+
...t?.interactive
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
classes: {
|
|
46
|
+
...e,
|
|
47
|
+
end: y(w.value.end, e?.end),
|
|
48
|
+
start: y(w.value.start, e?.start),
|
|
49
|
+
content: y(w.value.content, e?.content),
|
|
50
|
+
interactive: y(w.value.interactive, e?.interactive)
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
return (n, i) => h(E) ? (p(), o("li", b, [c(r, {
|
|
55
|
+
content: h(E),
|
|
56
|
+
placement: h(D),
|
|
57
|
+
classes: {
|
|
58
|
+
root: "flex w-full min-w-0",
|
|
59
|
+
trigger: "flex w-full min-w-0"
|
|
60
|
+
}
|
|
61
|
+
}, {
|
|
62
|
+
trigger: v(() => [c(t, f(u(O.value)), s({ _: 2 }, [
|
|
63
|
+
h(e)(h(C), "default") ? {
|
|
64
|
+
name: "default",
|
|
65
|
+
fn: v(() => [m(n.$slots, "default")]),
|
|
66
|
+
key: "0"
|
|
67
|
+
} : void 0,
|
|
68
|
+
h(e)(h(C), "start") ? {
|
|
69
|
+
name: "start",
|
|
70
|
+
fn: v(() => [m(n.$slots, "start")]),
|
|
71
|
+
key: "1"
|
|
72
|
+
} : void 0,
|
|
73
|
+
h(e)(h(C), "end") ? {
|
|
74
|
+
name: "end",
|
|
75
|
+
fn: v(() => [m(n.$slots, "end")]),
|
|
76
|
+
key: "2"
|
|
77
|
+
} : void 0,
|
|
78
|
+
h(e)(h(C), "primary") ? {
|
|
79
|
+
name: "primary",
|
|
80
|
+
fn: v(() => [m(n.$slots, "primary")]),
|
|
81
|
+
key: "3"
|
|
82
|
+
} : void 0,
|
|
83
|
+
h(e)(h(C), "secondary") ? {
|
|
84
|
+
name: "secondary",
|
|
85
|
+
fn: v(() => [m(n.$slots, "secondary")]),
|
|
86
|
+
key: "4"
|
|
87
|
+
} : void 0
|
|
88
|
+
]), 1040)]),
|
|
89
|
+
_: 3
|
|
90
|
+
}, 8, ["content", "placement"])])) : (p(), a(t, f(d({ key: 1 }, O.value)), s({ _: 2 }, [
|
|
91
|
+
h(e)(h(C), "default") ? {
|
|
92
|
+
name: "default",
|
|
93
|
+
fn: v(() => [m(n.$slots, "default")]),
|
|
94
|
+
key: "0"
|
|
95
|
+
} : void 0,
|
|
96
|
+
h(e)(h(C), "start") ? {
|
|
97
|
+
name: "start",
|
|
98
|
+
fn: v(() => [m(n.$slots, "start")]),
|
|
99
|
+
key: "1"
|
|
100
|
+
} : void 0,
|
|
101
|
+
h(e)(h(C), "end") ? {
|
|
102
|
+
name: "end",
|
|
103
|
+
fn: v(() => [m(n.$slots, "end")]),
|
|
104
|
+
key: "2"
|
|
105
|
+
} : void 0,
|
|
106
|
+
h(e)(h(C), "primary") ? {
|
|
107
|
+
name: "primary",
|
|
108
|
+
fn: v(() => [m(n.$slots, "primary")]),
|
|
109
|
+
key: "3"
|
|
110
|
+
} : void 0,
|
|
111
|
+
h(e)(h(C), "secondary") ? {
|
|
112
|
+
name: "secondary",
|
|
113
|
+
fn: v(() => [m(n.$slots, "secondary")]),
|
|
114
|
+
key: "4"
|
|
115
|
+
} : void 0
|
|
116
|
+
]), 1040));
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
//#endregion
|
|
120
|
+
export { x as default };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SidebarProviderOwnProps, SidebarProviderSlots } from './sidebar.types';
|
|
2
|
+
type __VLS_Slots = SidebarProviderSlots;
|
|
3
|
+
type __VLS_Props = SidebarProviderOwnProps;
|
|
4
|
+
type __VLS_ModelProps = {
|
|
5
|
+
modelValue?: boolean | undefined;
|
|
6
|
+
};
|
|
7
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
8
|
+
declare const __VLS_base: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
9
|
+
"update:modelValue": (...args: unknown[]) => any;
|
|
10
|
+
openChange: (open: boolean) => any;
|
|
11
|
+
}, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
12
|
+
"onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
|
|
13
|
+
onOpenChange?: ((open: boolean) => any) | undefined;
|
|
14
|
+
}>, {
|
|
15
|
+
defaultOpen: boolean;
|
|
16
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
18
|
+
declare const _default: typeof __VLS_export;
|
|
19
|
+
export default _default;
|
|
20
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
21
|
+
new (): {
|
|
22
|
+
$slots: S;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { useSidebarProvider as e } from "./composables/useSidebarProvider.js";
|
|
2
|
+
import { createElementBlock as t, defineComponent as n, guardReactiveProps as r, mergeModels as i, normalizeProps as a, openBlock as o, renderSlot as s, unref as c, useModel as l } from "vue";
|
|
3
|
+
//#region src/Components/Sidebar/SidebarProvider.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var u = /*@__PURE__*/ n({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
name: "SidebarProvider",
|
|
7
|
+
__name: "SidebarProvider",
|
|
8
|
+
props: /*@__PURE__*/ i({
|
|
9
|
+
classes: {},
|
|
10
|
+
customProps: {},
|
|
11
|
+
defaultOpen: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: !0
|
|
14
|
+
}
|
|
15
|
+
}, {
|
|
16
|
+
modelValue: {
|
|
17
|
+
type: Boolean,
|
|
18
|
+
default: void 0
|
|
19
|
+
},
|
|
20
|
+
modelModifiers: {}
|
|
21
|
+
}),
|
|
22
|
+
emits: /*@__PURE__*/ i(["openChange", "update:modelValue"], ["update:modelValue"]),
|
|
23
|
+
setup(n, { emit: i }) {
|
|
24
|
+
let u = i, d = n, f = l(n, "modelValue"), { rootBind: p } = e(d, { defaultOpen: !0 }, f, u);
|
|
25
|
+
return (e, n) => (o(), t("div", a(r(c(p))), [s(e.$slots, "default")], 16));
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
//#endregion
|
|
29
|
+
export { u as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { SidebarTriggerOwnProps, SidebarTriggerSlots } from './sidebar.types';
|
|
2
|
+
type __VLS_Slots = SidebarTriggerSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<SidebarTriggerOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<SidebarTriggerOwnProps> & 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,35 @@
|
|
|
1
|
+
import e from "../Button/Button.js";
|
|
2
|
+
import { useSidebarTrigger as t } from "./composables/useSidebarTrigger.js";
|
|
3
|
+
import { createBlock as n, createCommentVNode as r, defineComponent as i, mergeProps as a, openBlock as o, renderSlot as s, unref as c, useSlots as l, withCtx as u } from "vue";
|
|
4
|
+
//#region src/Components/Sidebar/SidebarTrigger.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var d = /*@__PURE__*/ i({
|
|
6
|
+
inheritAttrs: !1,
|
|
7
|
+
__name: "SidebarTrigger",
|
|
8
|
+
setup(i) {
|
|
9
|
+
let d = l(), { attrs: f, panelId: p, expanded: m, iconClass: h, ariaLabel: g, handleClick: _, hasDefaultSlot: v } = t(d);
|
|
10
|
+
return (t, i) => (o(), n(c(e), a(c(f), {
|
|
11
|
+
color: "dark",
|
|
12
|
+
type: "button",
|
|
13
|
+
density: "mini",
|
|
14
|
+
variant: "light",
|
|
15
|
+
"aria-label": c(g),
|
|
16
|
+
onClick: c(_),
|
|
17
|
+
"aria-expanded": c(m),
|
|
18
|
+
classes: { icon: c(h) },
|
|
19
|
+
"aria-controls": c(p) || void 0,
|
|
20
|
+
icon: c(v) ? void 0 : "panelLeft"
|
|
21
|
+
}), {
|
|
22
|
+
default: u(() => [c(v) ? s(t.$slots, "default", {}, void 0, void 0, 0) : r("", !0)]),
|
|
23
|
+
_: 3
|
|
24
|
+
}, 16, [
|
|
25
|
+
"aria-label",
|
|
26
|
+
"onClick",
|
|
27
|
+
"aria-expanded",
|
|
28
|
+
"classes",
|
|
29
|
+
"aria-controls",
|
|
30
|
+
"icon"
|
|
31
|
+
]));
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
export { d as default };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SidebarContextValue } from '../sidebarInjectionKey';
|
|
2
|
+
/**
|
|
3
|
+
* Reads the nearest `SidebarProvider` context. Throws when used outside it.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useSidebar(): import('vue').ComputedRef<SidebarContextValue>;
|
|
6
|
+
export type { SidebarContextValue };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SIDEBAR_INJECTION_KEY as e } from "../sidebarInjectionKey.js";
|
|
2
|
+
import { inject as t } from "vue";
|
|
3
|
+
//#region src/Components/Sidebar/composables/useSidebar.ts
|
|
4
|
+
function n() {
|
|
5
|
+
let n = t(e);
|
|
6
|
+
if (!n) throw Error("useSidebar must be used within a SidebarProvider");
|
|
7
|
+
return n;
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { n as useSidebar };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SidebarInsetOwnProps, SidebarInsetProps } from '../sidebar.types';
|
|
2
|
+
export declare function useSidebarInset(props: SidebarInsetOwnProps): {
|
|
3
|
+
merged: import('vue').ComputedRef<SidebarInsetOwnProps>;
|
|
4
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
5
|
+
class: string;
|
|
6
|
+
}, "class", import('vue').HTMLAttributes | undefined, Omit<Omit<SidebarInsetProps, "classes" | "customProps">, never>>>;
|
|
7
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { mergePartBind as e, useBridgeUIComponent as t } from "../../../Utils/index.js";
|
|
2
|
+
import { useSidebar as n } from "./useSidebar.js";
|
|
3
|
+
import { computed as r, useAttrs as i } from "vue";
|
|
4
|
+
import { get as a, omit as o } from "es-toolkit/compat";
|
|
5
|
+
import { sidebarVariantProps as s } from "@bridge-ui/core/Tokens";
|
|
6
|
+
import { cn as c, mergeBridgeUILayeredClasses as l, splitComponentProps as u } from "@bridge-ui/core/Utils";
|
|
7
|
+
//#region src/Components/Sidebar/composables/useSidebarInset.ts
|
|
8
|
+
var d = ["classes", "customProps"];
|
|
9
|
+
function f(f) {
|
|
10
|
+
let p = n(), m = i(), h = r(() => u({
|
|
11
|
+
props: {
|
|
12
|
+
...m,
|
|
13
|
+
...f
|
|
14
|
+
},
|
|
15
|
+
bridgeKeys: d
|
|
16
|
+
})), { merged: g, entry: _ } = t({
|
|
17
|
+
componentName: "Sidebar",
|
|
18
|
+
props: () => h.value.componentProps
|
|
19
|
+
}), v = r(() => g.value.customProps), y = r(() => {
|
|
20
|
+
let e = l(s, _.value?.tokens?.variant);
|
|
21
|
+
return a(e, p.value.variant);
|
|
22
|
+
}), b = r(() => o(h.value.inheritedAttrs, []));
|
|
23
|
+
return {
|
|
24
|
+
merged: g,
|
|
25
|
+
rootBind: r(() => e(v.value?.root, b.value, { class: c({
|
|
26
|
+
[a(y.value, "inset") ?? ""]: !0,
|
|
27
|
+
[a(g.value.classes, "root") ?? ""]: !0
|
|
28
|
+
}) }))
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { f as useSidebarInset };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { SidebarListProps } from '../sidebar.types';
|
|
2
|
+
/**
|
|
3
|
+
* Binds icon-rail mode and applies nav chrome.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useSidebarList(props: Pick<SidebarListProps, "nested" | "iconOnly">): {
|
|
6
|
+
iconOnly: import('vue').ComputedRef<boolean>;
|
|
7
|
+
rootClassName: import('vue').ComputedRef<string>;
|
|
8
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { useSidebar as e } from "./useSidebar.js";
|
|
2
|
+
import { SIDEBAR_LIST_INJECTION_KEY as t } from "../sidebarListInjectionKey.js";
|
|
3
|
+
import { computed as n, getCurrentInstance as r, inject as i, provide as a } from "vue";
|
|
4
|
+
import { isSidebarIconOnly as o } from "@bridge-ui/core/Domain";
|
|
5
|
+
import { cn as s } from "@bridge-ui/core/Utils";
|
|
6
|
+
//#region src/Components/Sidebar/composables/useSidebarList.ts
|
|
7
|
+
function c(c) {
|
|
8
|
+
let l = e(), u = r(), d = i(t, null), f = n(() => {
|
|
9
|
+
let e = u?.vnode.props ?? {};
|
|
10
|
+
return "iconOnly" in e || "icon-only" in e ? c.iconOnly === !0 : d ? d.value.iconOnly : o({
|
|
11
|
+
state: l.value.state,
|
|
12
|
+
isMobile: l.value.isMobile,
|
|
13
|
+
collapsible: l.value.collapsible
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
return a(t, n(() => ({ iconOnly: f.value }))), {
|
|
17
|
+
iconOnly: f,
|
|
18
|
+
rootClassName: n(() => s({
|
|
19
|
+
"flex flex-col gap-1": !0,
|
|
20
|
+
"px-2": c.nested !== !0,
|
|
21
|
+
"ml-3.5 translate-x-px border-l border-dark-200 py-0.5 pl-2.5 dark:border-dark-700": c.nested === !0,
|
|
22
|
+
hidden: c.nested === !0 && f.value
|
|
23
|
+
}))
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
//#endregion
|
|
27
|
+
export { c as useSidebarList };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SidebarListItemProps } from '../sidebar.types';
|
|
2
|
+
/**
|
|
3
|
+
* Tooltip and nav chrome for a rail item.
|
|
4
|
+
*/
|
|
5
|
+
export declare function useSidebarListItem(props: Pick<SidebarListItemProps, "primary" | "tooltip" | "secondary" | "tooltipPlacement">): {
|
|
6
|
+
tooltip: import('vue').ComputedRef<string | undefined>;
|
|
7
|
+
itemClasses: import('vue').ComputedRef<{
|
|
8
|
+
end: string;
|
|
9
|
+
content: string;
|
|
10
|
+
start: string;
|
|
11
|
+
interactive: string;
|
|
12
|
+
}>;
|
|
13
|
+
accessibleName: import('vue').ComputedRef<string | undefined>;
|
|
14
|
+
tooltipPlacement: import('vue').ComputedRef<import('@floating-ui/utils').Placement>;
|
|
15
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { isPropPresent as e } from "../../../Utils/slotOrProp.js";
|
|
2
|
+
import { useSidebar as t } from "./useSidebar.js";
|
|
3
|
+
import { SIDEBAR_LIST_INJECTION_KEY as n } from "../sidebarListInjectionKey.js";
|
|
4
|
+
import { computed as r, inject as i } from "vue";
|
|
5
|
+
import { isSidebarIconOnly as a, resolveSidebarListTooltipPlacement as o } from "@bridge-ui/core/Domain";
|
|
6
|
+
import { cn as s } from "@bridge-ui/core/Utils";
|
|
7
|
+
//#region src/Components/Sidebar/composables/useSidebarListItem.ts
|
|
8
|
+
function c(c) {
|
|
9
|
+
let l = t(), u = i(n, null), d = r(() => u ? u.value.iconOnly : a({
|
|
10
|
+
state: l.value.state,
|
|
11
|
+
isMobile: l.value.isMobile,
|
|
12
|
+
collapsible: l.value.collapsible
|
|
13
|
+
})), f = r(() => {
|
|
14
|
+
if (d.value) {
|
|
15
|
+
if (c.tooltip !== void 0) return c.tooltip || void 0;
|
|
16
|
+
if (typeof c.primary == "string") return c.primary;
|
|
17
|
+
}
|
|
18
|
+
}), p = r(() => c.tooltipPlacement === void 0 ? o(l.value.side) : c.tooltipPlacement), m = r(() => {
|
|
19
|
+
if (!(!d.value || typeof c.primary != "string")) return c.primary;
|
|
20
|
+
});
|
|
21
|
+
return {
|
|
22
|
+
tooltip: f,
|
|
23
|
+
itemClasses: r(() => {
|
|
24
|
+
let t = e(c.secondary);
|
|
25
|
+
return {
|
|
26
|
+
end: s({ hidden: d.value }),
|
|
27
|
+
content: s({ hidden: d.value }),
|
|
28
|
+
start: s({ "items-center justify-center": !0 }),
|
|
29
|
+
interactive: s({
|
|
30
|
+
"gap-x-2 overflow-hidden rounded-lg px-2 transition-[width,height,padding] duration-200 ease-linear": !d.value,
|
|
31
|
+
"min-h-12 py-2": !d.value && t,
|
|
32
|
+
"min-h-8 py-0": !d.value && !t,
|
|
33
|
+
"gap-0 overflow-hidden rounded-lg p-0": d.value,
|
|
34
|
+
"size-8 justify-center": d.value && t,
|
|
35
|
+
"h-8 w-full px-2": d.value && !t
|
|
36
|
+
})
|
|
37
|
+
};
|
|
38
|
+
}),
|
|
39
|
+
accessibleName: m,
|
|
40
|
+
tooltipPlacement: p
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//#endregion
|
|
44
|
+
export { c as useSidebarListItem };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Ref, SetupContext } from 'vue';
|
|
2
|
+
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
|
|
3
|
+
import { SidebarProviderEmits, SidebarProviderOwnProps, SidebarProviderProps } from '../sidebar.types';
|
|
4
|
+
type SidebarProviderLibDefaults = LibDefaultsShape<SidebarProviderOwnProps, "defaultOpen">;
|
|
5
|
+
type SidebarProviderMerged = MergeLibDefaults<SidebarProviderOwnProps, SidebarProviderLibDefaults>;
|
|
6
|
+
export declare function useSidebarProvider(props: SidebarProviderOwnProps, libDefaults: SidebarProviderLibDefaults, openModel: Ref<boolean | undefined>, emit: SetupContext<SidebarProviderEmits>["emit"]): {
|
|
7
|
+
merged: import('vue').ComputedRef<SidebarProviderMerged>;
|
|
8
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
9
|
+
"data-side": keyof import('@bridge-ui/core/Tokens').SidebarSide;
|
|
10
|
+
class: string;
|
|
11
|
+
style: {
|
|
12
|
+
"--bridge-sidebar-width": string;
|
|
13
|
+
"--bridge-sidebar-width-icon": string;
|
|
14
|
+
"--bridge-sidebar-width-mobile": string;
|
|
15
|
+
};
|
|
16
|
+
}, "class", import('vue').HTMLAttributes | undefined, Partial<Omit<SidebarProviderProps, "classes" | "customProps" | "defaultOpen">>>>;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { useBreakpoint as e } from "../../../Utils/useBreakpoint.js";
|
|
2
|
+
import { mergePartBind as t, useBridgeUIComponent as n, useBridgeUIMergedRegistryClasses as r } from "../../../Utils/index.js";
|
|
3
|
+
import { SIDEBAR_INJECTION_KEY as i } from "../sidebarInjectionKey.js";
|
|
4
|
+
import { computed as a, provide as o, ref as s, useAttrs as c } from "vue";
|
|
5
|
+
import { get as l, omit as u } from "es-toolkit/compat";
|
|
6
|
+
import { SIDEBAR_DESKTOP_BREAKPOINT as d, SIDEBAR_WIDTH_ICON_VAR as f, SIDEBAR_WIDTH_MOBILE_VAR as p, SIDEBAR_WIDTH_VAR as m, resolveSidebarState as h, shouldToggleDesktopSidebar as g, toggleSidebarOpen as _ } from "@bridge-ui/core/Domain";
|
|
7
|
+
import { sidebarWidthProps as v } from "@bridge-ui/core/Tokens";
|
|
8
|
+
import { cn as y, splitComponentProps as b } from "@bridge-ui/core/Utils";
|
|
9
|
+
import { toMerged as x } from "es-toolkit/object";
|
|
10
|
+
//#region src/Components/Sidebar/composables/useSidebarProvider.ts
|
|
11
|
+
var S = [
|
|
12
|
+
"classes",
|
|
13
|
+
"customProps",
|
|
14
|
+
"defaultOpen"
|
|
15
|
+
], C = {
|
|
16
|
+
panelId: "",
|
|
17
|
+
side: "left",
|
|
18
|
+
variant: "sidebar",
|
|
19
|
+
collapsible: "offcanvas"
|
|
20
|
+
};
|
|
21
|
+
function w(w, T, E, D) {
|
|
22
|
+
let O = c(), k = e(), A = a(() => b({
|
|
23
|
+
props: {
|
|
24
|
+
...O,
|
|
25
|
+
...w
|
|
26
|
+
},
|
|
27
|
+
bridgeKeys: S
|
|
28
|
+
})), { merged: j, entry: M } = n({
|
|
29
|
+
libDefaults: T,
|
|
30
|
+
componentName: "Sidebar",
|
|
31
|
+
props: () => A.value.componentProps
|
|
32
|
+
}), N = a(() => j.value.customProps), P = r({
|
|
33
|
+
entry: M,
|
|
34
|
+
props: () => A.value.componentProps
|
|
35
|
+
}), F = a(() => k.lessThan(d)), I = s(j.value.defaultOpen), L = s(!1), R = s({ ...C }), z = a(() => E.value ?? I.value), B = (e) => {
|
|
36
|
+
E.value === void 0 && (I.value = e), E.value = e, D("openChange", e);
|
|
37
|
+
}, V = (e) => {
|
|
38
|
+
L.value = e;
|
|
39
|
+
}, H = (e) => {
|
|
40
|
+
let t = {
|
|
41
|
+
...R.value,
|
|
42
|
+
...e
|
|
43
|
+
};
|
|
44
|
+
(R.value.side !== t.side || R.value.panelId !== t.panelId || R.value.variant !== t.variant || R.value.collapsible !== t.collapsible) && (R.value = t);
|
|
45
|
+
}, U = () => {
|
|
46
|
+
if (F.value) {
|
|
47
|
+
V(_(L.value));
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
g(R.value.collapsible) && B(_(z.value));
|
|
51
|
+
}, W = a(() => h(z.value, R.value.collapsible)), G = a(() => x(v, M.value?.tokens?.width ?? {})), K = a(() => ({
|
|
52
|
+
setOpen: B,
|
|
53
|
+
setLayout: H,
|
|
54
|
+
toggleSidebar: U,
|
|
55
|
+
setOpenMobile: V,
|
|
56
|
+
open: z.value,
|
|
57
|
+
state: W.value,
|
|
58
|
+
side: R.value.side,
|
|
59
|
+
isMobile: F.value,
|
|
60
|
+
openMobile: L.value,
|
|
61
|
+
panelId: R.value.panelId,
|
|
62
|
+
variant: R.value.variant,
|
|
63
|
+
collapsible: R.value.collapsible
|
|
64
|
+
}));
|
|
65
|
+
o(i, K);
|
|
66
|
+
let q = a(() => u(A.value.inheritedAttrs, ["modelValue", "onUpdate:modelValue"]));
|
|
67
|
+
return {
|
|
68
|
+
merged: j,
|
|
69
|
+
rootBind: a(() => {
|
|
70
|
+
let e = q.value.style;
|
|
71
|
+
return t(N.value?.root, q.value, {
|
|
72
|
+
"data-side": R.value.side,
|
|
73
|
+
class: y({
|
|
74
|
+
"flex min-h-svh w-full data-[side=right]:flex-row-reverse": !0,
|
|
75
|
+
[l(P.value, "root") ?? ""]: !0
|
|
76
|
+
}),
|
|
77
|
+
style: {
|
|
78
|
+
...e,
|
|
79
|
+
[m]: G.value.default,
|
|
80
|
+
[f]: G.value.icon,
|
|
81
|
+
[p]: G.value.mobile
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
})
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
export { w as useSidebarProvider };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
|
|
2
|
+
import { SidebarOwnProps, SidebarProps } from '../sidebar.types';
|
|
3
|
+
type SidebarLibDefaults = LibDefaultsShape<SidebarOwnProps, "side" | "variant" | "ariaLabel" | "collapsible">;
|
|
4
|
+
type SidebarMerged = MergeLibDefaults<SidebarOwnProps, SidebarLibDefaults>;
|
|
5
|
+
export declare function useSidebarShell(props: SidebarOwnProps, libDefaults: SidebarLibDefaults): {
|
|
6
|
+
slots: Readonly<{
|
|
7
|
+
[name: string]: import('vue').Slot<any> | undefined;
|
|
8
|
+
}>;
|
|
9
|
+
merged: import('vue').ComputedRef<SidebarMerged>;
|
|
10
|
+
panelId: string;
|
|
11
|
+
gapBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
12
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
13
|
+
"data-side": NonNullable<keyof import('@bridge-ui/core/Tokens').SidebarSide | undefined>;
|
|
14
|
+
"data-state": import('@bridge-ui/core/Domain').SidebarState;
|
|
15
|
+
"data-variant": NonNullable<keyof import('@bridge-ui/core/Tokens').SidebarVariant | undefined>;
|
|
16
|
+
"data-collapsible": "" | import('@bridge-ui/core/Domain').SidebarCollapsibleMode;
|
|
17
|
+
"data-mobile": string;
|
|
18
|
+
class: string;
|
|
19
|
+
}, "class", import('vue').HTMLAttributes | undefined, Omit<Omit<SidebarProps, "classes" | "customProps" | "variant" | "ariaLabel" | "collapsible" | "side">, never>>>;
|
|
20
|
+
asideBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
21
|
+
"data-side": NonNullable<keyof import('@bridge-ui/core/Tokens').SidebarSide | undefined>;
|
|
22
|
+
"aria-label": string;
|
|
23
|
+
inert: boolean | undefined;
|
|
24
|
+
id: string | undefined;
|
|
25
|
+
class: string;
|
|
26
|
+
}, "class", {}, {}>>;
|
|
27
|
+
panelBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
28
|
+
headerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
29
|
+
footerBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
30
|
+
contentBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<object, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
31
|
+
mobileWidth: import('vue').ComputedRef<string>;
|
|
32
|
+
showAsDrawer: import('vue').ComputedRef<boolean>;
|
|
33
|
+
drawerPanelStyle: import('vue').ComputedRef<{
|
|
34
|
+
width: string;
|
|
35
|
+
maxWidth: string;
|
|
36
|
+
}>;
|
|
37
|
+
isMobile: import('vue').ComputedRef<boolean>;
|
|
38
|
+
openMobile: import('vue').ComputedRef<boolean>;
|
|
39
|
+
setOpenMobile: (next: boolean) => void;
|
|
40
|
+
};
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
|
+
import { useSidebar as r } from "./useSidebar.js";
|
|
3
|
+
import { computed as i, useAttrs as a, useId as o, useSlots as s, watch as c } from "vue";
|
|
4
|
+
import { get as l, omit as u } from "es-toolkit/compat";
|
|
5
|
+
import { getSidebarPanelId as d, resolveSidebarCollapsibleData as f, shouldRenderSidebarAsDrawer as p } from "@bridge-ui/core/Domain";
|
|
6
|
+
import { sidebarCollapsibleProps as m, sidebarSideProps as h, sidebarVariantProps as g, sidebarWidthProps as _ } from "@bridge-ui/core/Tokens";
|
|
7
|
+
import { cn as v, mergeBridgeUILayeredClasses as y, splitComponentProps as b } from "@bridge-ui/core/Utils";
|
|
8
|
+
import { toMerged as x } from "es-toolkit/object";
|
|
9
|
+
//#region src/Components/Sidebar/composables/useSidebarShell.ts
|
|
10
|
+
var S = [
|
|
11
|
+
"side",
|
|
12
|
+
"classes",
|
|
13
|
+
"variant",
|
|
14
|
+
"ariaLabel",
|
|
15
|
+
"collapsible",
|
|
16
|
+
"customProps"
|
|
17
|
+
];
|
|
18
|
+
function C(C, w) {
|
|
19
|
+
let T = o(), E = d(`bridge-sidebar${T}`), D = a(), O = s(), k = r(), A = i(() => b({
|
|
20
|
+
props: {
|
|
21
|
+
...D,
|
|
22
|
+
...C
|
|
23
|
+
},
|
|
24
|
+
bridgeKeys: S
|
|
25
|
+
})), { merged: j, entry: M } = t({
|
|
26
|
+
libDefaults: w,
|
|
27
|
+
componentName: "Sidebar",
|
|
28
|
+
props: () => A.value.componentProps
|
|
29
|
+
}), N = i(() => j.value.customProps), P = n({
|
|
30
|
+
entry: M,
|
|
31
|
+
props: () => A.value.componentProps
|
|
32
|
+
});
|
|
33
|
+
c(() => ({
|
|
34
|
+
panelId: E,
|
|
35
|
+
side: j.value.side,
|
|
36
|
+
variant: j.value.variant,
|
|
37
|
+
collapsible: j.value.collapsible
|
|
38
|
+
}), (e) => {
|
|
39
|
+
k.value.setLayout(e);
|
|
40
|
+
}, { immediate: !0 });
|
|
41
|
+
let F = i(() => {
|
|
42
|
+
let e = y(g, M.value?.tokens?.variant);
|
|
43
|
+
return l(e, j.value.variant);
|
|
44
|
+
}), I = i(() => {
|
|
45
|
+
let e = y(m, M.value?.tokens?.collapsible);
|
|
46
|
+
return l(e, j.value.collapsible);
|
|
47
|
+
}), L = i(() => {
|
|
48
|
+
let e = y(h, M.value?.tokens?.side);
|
|
49
|
+
return l(e, j.value.side);
|
|
50
|
+
}), R = i(() => f(k.value.state, j.value.collapsible)), z = i(() => p(k.value.isMobile) && k.value.openMobile), B = i(() => u(A.value.inheritedAttrs, [])), V = i(() => e(N.value?.root, B.value, {
|
|
51
|
+
"data-side": j.value.side,
|
|
52
|
+
"data-state": k.value.state,
|
|
53
|
+
"data-variant": j.value.variant,
|
|
54
|
+
"data-collapsible": R.value,
|
|
55
|
+
"data-mobile": k.value.isMobile ? "true" : "false",
|
|
56
|
+
class: v({
|
|
57
|
+
"group peer hidden text-dark-900 md:block dark:text-dark-100": !0,
|
|
58
|
+
[l(P.value, "root") ?? ""]: !0
|
|
59
|
+
})
|
|
60
|
+
})), H = i(() => e(N.value?.gap, {}, v({
|
|
61
|
+
[l(F.value, "gap") ?? ""]: !0,
|
|
62
|
+
[l(I.value, "gap") ?? ""]: !0,
|
|
63
|
+
[l(P.value, "gap") ?? ""]: !0
|
|
64
|
+
}))), U = i(() => {
|
|
65
|
+
let t = R.value === "offcanvas";
|
|
66
|
+
return e({}, {}, {
|
|
67
|
+
"data-side": j.value.side,
|
|
68
|
+
"aria-label": j.value.ariaLabel,
|
|
69
|
+
inert: t ? !0 : void 0,
|
|
70
|
+
id: z.value ? void 0 : E,
|
|
71
|
+
class: v({
|
|
72
|
+
"fixed inset-y-0 z-10 hidden h-full w-[var(--bridge-sidebar-width)] overflow-hidden transition-[left,right,width] duration-200 ease-linear md:flex": !0,
|
|
73
|
+
[L.value ?? ""]: !0,
|
|
74
|
+
[l(I.value, "panel") ?? ""]: !0
|
|
75
|
+
})
|
|
76
|
+
});
|
|
77
|
+
}), W = i(() => e(N.value?.panel, {}, v({
|
|
78
|
+
"flex h-full w-full flex-col overflow-hidden": !0,
|
|
79
|
+
[l(F.value, "panel") ?? ""]: !0,
|
|
80
|
+
[l(P.value, "panel") ?? ""]: !0
|
|
81
|
+
}))), G = i(() => e(N.value?.header, {}, v({
|
|
82
|
+
"flex shrink-0 flex-col gap-2 px-2 py-2.5": !0,
|
|
83
|
+
[l(P.value, "header") ?? ""]: !0
|
|
84
|
+
}))), K = i(() => e(N.value?.content, {}, v({
|
|
85
|
+
"bridge-scroll-fade-y flex min-h-0 flex-1 flex-col overflow-y-auto": !0,
|
|
86
|
+
[l(P.value, "content") ?? ""]: !0
|
|
87
|
+
}))), q = i(() => e(N.value?.footer, {}, v({
|
|
88
|
+
"flex shrink-0 flex-col gap-2 px-2 py-2.5": !0,
|
|
89
|
+
[l(P.value, "footer") ?? ""]: !0
|
|
90
|
+
}))), J = i(() => x(_, M.value?.tokens?.width ?? {}).mobile);
|
|
91
|
+
return {
|
|
92
|
+
slots: O,
|
|
93
|
+
merged: j,
|
|
94
|
+
panelId: E,
|
|
95
|
+
gapBind: H,
|
|
96
|
+
rootBind: V,
|
|
97
|
+
asideBind: U,
|
|
98
|
+
panelBind: W,
|
|
99
|
+
headerBind: G,
|
|
100
|
+
footerBind: q,
|
|
101
|
+
contentBind: K,
|
|
102
|
+
mobileWidth: J,
|
|
103
|
+
showAsDrawer: z,
|
|
104
|
+
drawerPanelStyle: i(() => ({
|
|
105
|
+
width: J.value,
|
|
106
|
+
maxWidth: `min(${J.value}, 88vw)`
|
|
107
|
+
})),
|
|
108
|
+
isMobile: i(() => k.value.isMobile),
|
|
109
|
+
openMobile: i(() => k.value.openMobile),
|
|
110
|
+
setOpenMobile: (e) => {
|
|
111
|
+
k.value.setOpenMobile(e);
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
export { C as useSidebarShell };
|