@bridge-ui/vue 0.1.1 → 0.3.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 +4 -1
- package/dist/Components/Autocomplete/composables/useAutocomplete.d.ts +1 -1
- package/dist/Components/CalendarRange/CalendarRange.vue_vue_type_script_setup_true_lang.js +135 -109
- package/dist/Components/CalendarRange/calendarRange.types.d.ts +17 -5
- package/dist/Components/CalendarRange/composables/useCalendarRange.d.ts +4 -2
- package/dist/Components/CalendarRange/composables/useCalendarRange.js +85 -86
- package/dist/Components/ColorField/composables/useColorField.d.ts +2 -1
- package/dist/Components/DataTable/DataTable.js +5 -0
- package/dist/Components/DataTable/DataTable.vue.d.ts +43 -0
- package/dist/Components/DataTable/DataTable.vue_vue_type_script_setup_true_lang.js +382 -0
- package/dist/Components/DataTable/DataTableCellContent.js +5 -0
- package/dist/Components/DataTable/DataTableCellContent.vue.d.ts +23 -0
- package/dist/Components/DataTable/DataTableCellContent.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/Components/DataTable/DataTableColumnsMenu.js +5 -0
- package/dist/Components/DataTable/DataTableColumnsMenu.vue.d.ts +11 -0
- package/dist/Components/DataTable/DataTableColumnsMenu.vue_vue_type_script_setup_true_lang.js +47 -0
- package/dist/Components/DataTable/DataTableFilterMenu.js +5 -0
- package/dist/Components/DataTable/DataTableFilterMenu.vue.d.ts +17 -0
- package/dist/Components/DataTable/DataTableFilterMenu.vue_vue_type_script_setup_true_lang.js +132 -0
- package/dist/Components/DataTable/DataTableFilterOptions.js +5 -0
- package/dist/Components/DataTable/DataTableFilterOptions.vue.d.ts +14 -0
- package/dist/Components/DataTable/DataTableFilterOptions.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/Components/DataTable/DataTableSearch.js +5 -0
- package/dist/Components/DataTable/DataTableSearch.vue.d.ts +12 -0
- package/dist/Components/DataTable/DataTableSearch.vue_vue_type_script_setup_true_lang.js +39 -0
- package/dist/Components/DataTable/DataTableSelection.js +5 -0
- package/dist/Components/DataTable/DataTableSelection.vue.d.ts +20 -0
- package/dist/Components/DataTable/DataTableSelection.vue_vue_type_script_setup_true_lang.js +55 -0
- package/dist/Components/DataTable/DataTableSortButton.js +5 -0
- package/dist/Components/DataTable/DataTableSortButton.vue.d.ts +17 -0
- package/dist/Components/DataTable/DataTableSortButton.vue_vue_type_script_setup_true_lang.js +43 -0
- package/dist/Components/DataTable/DataTableToolbarButton.js +5 -0
- package/dist/Components/DataTable/DataTableToolbarButton.vue.d.ts +13 -0
- package/dist/Components/DataTable/DataTableToolbarButton.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/Components/DataTable/composables/useDataTable.d.ts +557 -0
- package/dist/Components/DataTable/composables/useDataTable.js +479 -0
- package/dist/Components/DataTable/dataTable.types.d.ts +480 -0
- package/dist/Components/DataTable/index.d.ts +3 -0
- package/dist/Components/DataTable/index.js +3 -0
- package/dist/Components/DateField/composables/useDateField.d.ts +2 -1
- package/dist/Components/DateRangeField/composables/useDateRangeField.d.ts +2 -1
- package/dist/Components/DateTimeField/composables/useDateTimeField.d.ts +2 -1
- package/dist/Components/DateTimeRangeField/composables/useDateTimeRangeField.d.ts +2 -1
- package/dist/Components/DateTimeRangePicker/DateTimeRangePicker.vue_vue_type_script_setup_true_lang.js +1 -6
- package/dist/Components/Drawer/composables/useDrawer.js +1 -1
- package/dist/Components/FieldOverlay/FieldOverlay.vue_vue_type_script_setup_true_lang.js +35 -35
- package/dist/Components/FieldOverlay/composables/useFieldOverlay.d.ts +1 -0
- package/dist/Components/FieldOverlay/composables/useFieldOverlay.js +21 -19
- package/dist/Components/FieldOverlay/fieldOverlay.types.d.ts +11 -3
- package/dist/Components/FormField/composables/useFormField.d.ts +1 -1
- package/dist/Components/Listbox/composables/useListbox.js +1 -1
- package/dist/Components/Menu/Menu.vue_vue_type_script_setup_true_lang.js +1 -0
- package/dist/Components/Menu/composables/useMenu.d.ts +1 -1
- package/dist/Components/Menu/composables/useMenu.js +7 -3
- package/dist/Components/Menu/menu.types.d.ts +6 -0
- package/dist/Components/Modal/composables/useModal.js +1 -1
- package/dist/Components/NumberField/composables/useNumberField.d.ts +1 -1
- package/dist/Components/PasswordField/composables/usePasswordField.d.ts +1 -1
- package/dist/Components/Radio/Radio.vue_vue_type_script_setup_true_lang.js +9 -9
- package/dist/Components/Radio/composables/useRadio.js +57 -54
- package/dist/Components/Select/composables/useSelect.d.ts +1 -1
- package/dist/Components/Slider/composables/useSlider.d.ts +2 -2
- package/dist/Components/Snackbar/composables/useSnackbar.d.ts +1 -1
- package/dist/Components/Table/Table.js +5 -0
- package/dist/Components/Table/Table.vue.d.ts +16 -0
- package/dist/Components/Table/Table.vue_vue_type_script_setup_true_lang.js +44 -0
- package/dist/Components/Table/TableBody.js +5 -0
- package/dist/Components/Table/TableBody.vue.d.ts +11 -0
- package/dist/Components/Table/TableBody.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/Table/TableCaption.js +5 -0
- package/dist/Components/Table/TableCaption.vue.d.ts +11 -0
- package/dist/Components/Table/TableCaption.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/Table/TableCell.js +5 -0
- package/dist/Components/Table/TableCell.vue.d.ts +11 -0
- package/dist/Components/Table/TableCell.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/Components/Table/TableFooter.js +5 -0
- package/dist/Components/Table/TableFooter.vue.d.ts +11 -0
- package/dist/Components/Table/TableFooter.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/Table/TableHead.js +5 -0
- package/dist/Components/Table/TableHead.vue.d.ts +11 -0
- package/dist/Components/Table/TableHead.vue_vue_type_script_setup_true_lang.js +19 -0
- package/dist/Components/Table/TableHeader.js +5 -0
- package/dist/Components/Table/TableHeader.vue.d.ts +11 -0
- package/dist/Components/Table/TableHeader.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/Table/TableRow.js +5 -0
- package/dist/Components/Table/TableRow.vue.d.ts +11 -0
- package/dist/Components/Table/TableRow.vue_vue_type_script_setup_true_lang.js +17 -0
- package/dist/Components/Table/composables/useTable.d.ts +16 -0
- package/dist/Components/Table/composables/useTable.js +88 -0
- package/dist/Components/Table/composables/useTableCell.d.ts +12 -0
- package/dist/Components/Table/composables/useTableCell.js +40 -0
- package/dist/Components/Table/composables/useTablePart.d.ts +12 -0
- package/dist/Components/Table/composables/useTablePart.js +32 -0
- package/dist/Components/Table/composables/useTableRow.d.ts +6 -0
- package/dist/Components/Table/composables/useTableRow.js +29 -0
- package/dist/Components/Table/index.d.ts +14 -0
- package/dist/Components/Table/index.js +14 -0
- package/dist/Components/Table/table.types.d.ts +416 -0
- package/dist/Components/Table/tableInjectionKey.d.ts +114 -0
- package/dist/Components/Table/tableInjectionKey.js +4 -0
- package/dist/Components/TextField/composables/useTextField.d.ts +1 -1
- package/dist/Components/Textarea/composables/useTextarea.d.ts +1 -1
- package/dist/Components/TimeField/composables/useTimeField.d.ts +2 -1
- package/dist/Components/TimePanel/composables/useTimePanel.d.ts +4 -0
- package/dist/Components/TimePanel/composables/useTimePanel.js +13 -12
- package/dist/Components/TimeRangeField/composables/useTimeRangeField.d.ts +2 -1
- package/dist/Components/TimeRangePicker/TimeRangePicker.vue_vue_type_script_setup_true_lang.js +103 -89
- package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.d.ts +4 -2
- package/dist/Components/TimeRangePicker/composables/useTimeRangePicker.js +55 -54
- package/dist/Components/TimeRangePicker/timeRangePicker.types.d.ts +1 -7
- package/dist/index.js +32 -32
- package/dist/theme.css +2 -0
- package/docs/README.md +6 -0
- package/docs/ScrollUtilities.md +89 -0
- package/docs/components/Autocomplete.md +2 -0
- package/docs/components/CalendarDate.md +1 -1
- package/docs/components/CalendarRange.md +4 -3
- package/docs/components/DataTable.md +345 -0
- package/docs/components/DateField.md +2 -2
- package/docs/components/DatePicker.md +3 -3
- package/docs/components/DateRangePicker.md +4 -3
- package/docs/components/Drawer.md +21 -21
- package/docs/components/FieldOverlay.md +19 -8
- package/docs/components/Modal.md +19 -19
- package/docs/components/Pagination.md +2 -2
- package/docs/components/Select.md +2 -0
- package/docs/components/Table.md +122 -0
- package/docs/components/TimePanel.md +2 -0
- package/docs/components/TimeRangePicker.md +0 -1
- package/docs/examples/i18n-dictionary.ts +4 -0
- package/docs/examples/icon-fontawesome.ts +8 -0
- package/docs/examples/icon-heroicons.ts +8 -0
- package/docs/examples/icon-lucide.ts +8 -0
- package/docs/examples/icon-phosphor.ts +8 -0
- package/docs/examples/icon-tabler.ts +8 -0
- package/package.json +9 -2
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { useTableCell as e } from "./composables/useTableCell.js";
|
|
2
|
+
import { createElementBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, renderSlot as o, unref as s } from "vue";
|
|
3
|
+
//#region src/Components/Table/TableCell.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var c = /*@__PURE__*/ n({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "TableCell",
|
|
7
|
+
props: {
|
|
8
|
+
align: {},
|
|
9
|
+
classes: {},
|
|
10
|
+
customProps: {},
|
|
11
|
+
numeric: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(n) {
|
|
14
|
+
let { rootBind: c } = e(n, "cell");
|
|
15
|
+
return (e, n) => (a(), t("td", i(r(s(c))), [o(e.$slots, "default")], 16));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { c as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TableFooterOwnProps, TableFooterSlots } from './table.types';
|
|
2
|
+
type __VLS_Slots = TableFooterSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<TableFooterOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TableFooterOwnProps> & 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,17 @@
|
|
|
1
|
+
import { useTablePart as e } from "./composables/useTablePart.js";
|
|
2
|
+
import { createElementBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, renderSlot as o, unref as s } from "vue";
|
|
3
|
+
//#region src/Components/Table/TableFooter.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var c = /*@__PURE__*/ n({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "TableFooter",
|
|
7
|
+
props: {
|
|
8
|
+
classes: {},
|
|
9
|
+
customProps: {}
|
|
10
|
+
},
|
|
11
|
+
setup(n) {
|
|
12
|
+
let { rootBind: c } = e(n, "footer");
|
|
13
|
+
return (e, n) => (a(), t("tfoot", i(r(s(c))), [o(e.$slots, "default")], 16));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { c as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TableHeadOwnProps, TableHeadSlots } from './table.types';
|
|
2
|
+
type __VLS_Slots = TableHeadSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<TableHeadOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TableHeadOwnProps> & 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,19 @@
|
|
|
1
|
+
import { useTableCell as e } from "./composables/useTableCell.js";
|
|
2
|
+
import { createElementBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, renderSlot as o, unref as s } from "vue";
|
|
3
|
+
//#region src/Components/Table/TableHead.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var c = /*@__PURE__*/ n({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "TableHead",
|
|
7
|
+
props: {
|
|
8
|
+
align: {},
|
|
9
|
+
classes: {},
|
|
10
|
+
customProps: {},
|
|
11
|
+
numeric: { type: Boolean }
|
|
12
|
+
},
|
|
13
|
+
setup(n) {
|
|
14
|
+
let { rootBind: c } = e(n, "head");
|
|
15
|
+
return (e, n) => (a(), t("th", i(r(s(c))), [o(e.$slots, "default")], 16));
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { c as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TableHeaderOwnProps, TableHeaderSlots } from './table.types';
|
|
2
|
+
type __VLS_Slots = TableHeaderSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<TableHeaderOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TableHeaderOwnProps> & 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,17 @@
|
|
|
1
|
+
import { useTablePart as e } from "./composables/useTablePart.js";
|
|
2
|
+
import { createElementBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, renderSlot as o, unref as s } from "vue";
|
|
3
|
+
//#region src/Components/Table/TableHeader.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var c = /*@__PURE__*/ n({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "TableHeader",
|
|
7
|
+
props: {
|
|
8
|
+
classes: {},
|
|
9
|
+
customProps: {}
|
|
10
|
+
},
|
|
11
|
+
setup(n) {
|
|
12
|
+
let { rootBind: c } = e(n, "header");
|
|
13
|
+
return (e, n) => (a(), t("thead", i(r(s(c))), [o(e.$slots, "default")], 16));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { c as default };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { TableRowOwnProps, TableRowSlots } from './table.types';
|
|
2
|
+
type __VLS_Slots = TableRowSlots;
|
|
3
|
+
declare const __VLS_base: import('vue').DefineComponent<TableRowOwnProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<TableRowOwnProps> & 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,17 @@
|
|
|
1
|
+
import { useTableRow as e } from "./composables/useTableRow.js";
|
|
2
|
+
import { createElementBlock as t, defineComponent as n, guardReactiveProps as r, normalizeProps as i, openBlock as a, renderSlot as o, unref as s } from "vue";
|
|
3
|
+
//#region src/Components/Table/TableRow.vue?vue&type=script&setup=true&lang.ts
|
|
4
|
+
var c = /*@__PURE__*/ n({
|
|
5
|
+
inheritAttrs: !1,
|
|
6
|
+
__name: "TableRow",
|
|
7
|
+
props: {
|
|
8
|
+
classes: {},
|
|
9
|
+
customProps: {}
|
|
10
|
+
},
|
|
11
|
+
setup(n) {
|
|
12
|
+
let { rootBind: c } = e(n);
|
|
13
|
+
return (e, n) => (a(), t("tr", i(r(s(c))), [o(e.$slots, "default")], 16));
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
//#endregion
|
|
17
|
+
export { c as default };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LibDefaultsShape, MergeLibDefaults } from '@bridge-ui/core/Utils';
|
|
2
|
+
import { TableOwnProps, TableProps } from '../table.types';
|
|
3
|
+
import { TableContextValue } from '../tableInjectionKey';
|
|
4
|
+
type TableLibDefaults = LibDefaultsShape<TableOwnProps, "full" | "size" | "rounded" | "striped" | "variant" | "hoverable" | "stickyHeader">;
|
|
5
|
+
type TableMerged = MergeLibDefaults<TableOwnProps, TableLibDefaults>;
|
|
6
|
+
export declare function useTable(props: TableOwnProps, libDefaults: TableLibDefaults): {
|
|
7
|
+
merged: import('vue').ComputedRef<TableMerged>;
|
|
8
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
9
|
+
class: string;
|
|
10
|
+
}, "class", import('vue').HTMLAttributes | undefined, Omit<TableProps, "size" | "classes" | "customProps" | "full" | "rounded" | "variant" | "hoverable" | "stickyHeader" | "striped">>>;
|
|
11
|
+
tableBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
12
|
+
class: string;
|
|
13
|
+
}, "class", import('vue').HTMLAttributes | undefined, {}>>;
|
|
14
|
+
contextValue: import('vue').ComputedRef<TableContextValue>;
|
|
15
|
+
};
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { mergePartBind as e, useBridgeUIComponent as t, useBridgeUIMergedRegistryClasses as n } from "../../../Utils/index.js";
|
|
2
|
+
import { TABLE_INJECTION_KEY as r } from "../tableInjectionKey.js";
|
|
3
|
+
import { computed as i, provide as a, useAttrs as o } from "vue";
|
|
4
|
+
import { get as s } from "es-toolkit/compat";
|
|
5
|
+
import { tableAlignProps as c, tableRoundedProps as l, tableSizeProps as u, tableVariantProps as d } from "@bridge-ui/core/Tokens";
|
|
6
|
+
import { cn as f, mergeBridgeUILayeredClasses as p, splitComponentProps as m } from "@bridge-ui/core/Utils";
|
|
7
|
+
//#region src/Components/Table/composables/useTable.ts
|
|
8
|
+
var h = [
|
|
9
|
+
"full",
|
|
10
|
+
"size",
|
|
11
|
+
"classes",
|
|
12
|
+
"rounded",
|
|
13
|
+
"striped",
|
|
14
|
+
"variant",
|
|
15
|
+
"hoverable",
|
|
16
|
+
"customProps",
|
|
17
|
+
"stickyHeader"
|
|
18
|
+
];
|
|
19
|
+
function g(g, _) {
|
|
20
|
+
let v = o(), y = i(() => m({
|
|
21
|
+
bridgeKeys: h,
|
|
22
|
+
props: {
|
|
23
|
+
...v,
|
|
24
|
+
...g
|
|
25
|
+
}
|
|
26
|
+
})), { merged: b, entry: x } = t({
|
|
27
|
+
libDefaults: _,
|
|
28
|
+
componentName: "Table",
|
|
29
|
+
props: () => y.value.componentProps
|
|
30
|
+
}), S = n({
|
|
31
|
+
entry: x,
|
|
32
|
+
props: () => y.value.componentProps
|
|
33
|
+
}), C = i(() => p(u, x.value?.tokens?.size)), w = i(() => p(d, x.value?.tokens?.variant)), T = i(() => p(c, x.value?.tokens?.align)), E = i(() => p(l, x.value?.tokens?.rounded)), D = i(() => s(C.value, b.value.size)), O = i(() => s(w.value, b.value.variant)), k = i(() => s(E.value, b.value.rounded)), A = i(() => ({
|
|
34
|
+
full: b.value.full === !0,
|
|
35
|
+
striped: b.value.striped === !0,
|
|
36
|
+
hoverable: b.value.hoverable === !0,
|
|
37
|
+
stickyHeader: b.value.stickyHeader === !0,
|
|
38
|
+
mergedClasses: {
|
|
39
|
+
row: s(S.value, "row"),
|
|
40
|
+
body: s(S.value, "body"),
|
|
41
|
+
cell: s(S.value, "cell"),
|
|
42
|
+
head: s(S.value, "head"),
|
|
43
|
+
footer: s(S.value, "footer"),
|
|
44
|
+
header: s(S.value, "header"),
|
|
45
|
+
caption: s(S.value, "caption")
|
|
46
|
+
},
|
|
47
|
+
tokenClasses: {
|
|
48
|
+
sizeHead: s(D.value, "head"),
|
|
49
|
+
sizeCell: s(D.value, "cell"),
|
|
50
|
+
align: T.value,
|
|
51
|
+
variantRow: s(O.value, "row"),
|
|
52
|
+
sizeCaption: s(D.value, "caption"),
|
|
53
|
+
variantBody: s(O.value, "body"),
|
|
54
|
+
variantHead: s(O.value, "head"),
|
|
55
|
+
variantCell: s(O.value, "cell"),
|
|
56
|
+
variantFooter: s(O.value, "footer"),
|
|
57
|
+
variantHeader: s(O.value, "header"),
|
|
58
|
+
roundedFooter: s(k.value, "footer"),
|
|
59
|
+
roundedHeader: s(k.value, "header"),
|
|
60
|
+
variantCaption: s(O.value, "caption"),
|
|
61
|
+
variantRowHover: s(O.value, "rowHover"),
|
|
62
|
+
variantRowStriped: s(O.value, "rowStriped"),
|
|
63
|
+
variantHeadSticky: s(O.value, "headSticky")
|
|
64
|
+
}
|
|
65
|
+
}));
|
|
66
|
+
return a(r, A), {
|
|
67
|
+
merged: b,
|
|
68
|
+
rootBind: i(() => e(b.value.customProps?.root, y.value.inheritedAttrs, { class: f({
|
|
69
|
+
"overflow-x-auto": b.value.stickyHeader !== !0,
|
|
70
|
+
[s(D.value, "root") ?? ""]: !0,
|
|
71
|
+
[s(O.value, "root") ?? ""]: !0,
|
|
72
|
+
[s(k.value, "root") ?? ""]: !0,
|
|
73
|
+
[s(S.value, "root") ?? ""]: !0
|
|
74
|
+
}) })),
|
|
75
|
+
tableBind: i(() => {
|
|
76
|
+
let t = b.value.stickyHeader === !0 ? s(O.value, "tableSticky") : s(O.value, "table");
|
|
77
|
+
return e(b.value.customProps?.table, {}, { class: f({
|
|
78
|
+
"min-w-full": b.value.full === !0,
|
|
79
|
+
[s(D.value, "table") ?? ""]: !0,
|
|
80
|
+
[t ?? ""]: !0,
|
|
81
|
+
[s(S.value, "table") ?? ""]: !0
|
|
82
|
+
}) });
|
|
83
|
+
}),
|
|
84
|
+
contextValue: A
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
//#endregion
|
|
88
|
+
export { g as useTable };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TableCellOwnProps, TableCellProps, TableHeadOwnProps, TableHeadProps } from '../table.types';
|
|
2
|
+
type TableCellKind = "cell" | "head";
|
|
3
|
+
/**
|
|
4
|
+
* Bind for `TableCell` (`td`) and `TableHead` (`th`).
|
|
5
|
+
*/
|
|
6
|
+
export declare function useTableCell(props: TableCellOwnProps | TableHeadOwnProps, part: TableCellKind): {
|
|
7
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
8
|
+
scope: string | undefined;
|
|
9
|
+
class: string;
|
|
10
|
+
}, "class", import('vue').TdHTMLAttributes | import('vue').ThHTMLAttributes | undefined, Omit<TableCellProps | TableHeadProps, "classes" | "customProps" | "numeric" | "align">>>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { mergePartBind as e } from "../../../Utils/index.js";
|
|
2
|
+
import { TABLE_INJECTION_KEY as t, TABLE_SECTION_INJECTION_KEY as n } from "../tableInjectionKey.js";
|
|
3
|
+
import { computed as r, inject as i, useAttrs as a } from "vue";
|
|
4
|
+
import { get as o } from "es-toolkit/compat";
|
|
5
|
+
import { cn as s, splitComponentProps as c } from "@bridge-ui/core/Utils";
|
|
6
|
+
//#region src/Components/Table/composables/useTableCell.ts
|
|
7
|
+
var l = [
|
|
8
|
+
"align",
|
|
9
|
+
"classes",
|
|
10
|
+
"numeric",
|
|
11
|
+
"customProps"
|
|
12
|
+
];
|
|
13
|
+
function u(u, d) {
|
|
14
|
+
let f = a(), p = i(t, null), m = i(n, null);
|
|
15
|
+
if (!p) throw Error("Table parts must be used within a Table provider");
|
|
16
|
+
let h = r(() => c({
|
|
17
|
+
props: {
|
|
18
|
+
...f,
|
|
19
|
+
...u
|
|
20
|
+
},
|
|
21
|
+
bridgeKeys: l
|
|
22
|
+
}));
|
|
23
|
+
return { rootBind: r(() => {
|
|
24
|
+
let t = p.value, n = h.value.componentProps.numeric === !0, r = h.value.componentProps.align ?? (n ? "end" : "start"), i = o(t.tokenClasses.align, r), a = d === "head" ? t.tokenClasses.sizeHead : t.tokenClasses.sizeCell, c = d === "head" ? t.tokenClasses.variantHead : t.tokenClasses.variantCell, l = d === "head" ? o(i, "head") : o(i, "cell"), u = d === "head" ? t.mergedClasses.head : t.mergedClasses.cell, f = d === "head" && t.stickyHeader && m?.value === "header";
|
|
25
|
+
return e(h.value.componentProps.customProps?.root, h.value.inheritedAttrs, {
|
|
26
|
+
scope: d === "head" ? "col" : void 0,
|
|
27
|
+
class: s({
|
|
28
|
+
"tabular-nums": n,
|
|
29
|
+
[a ?? ""]: !0,
|
|
30
|
+
[l ?? ""]: !0,
|
|
31
|
+
[c ?? ""]: !0,
|
|
32
|
+
[u ?? ""]: !0,
|
|
33
|
+
[h.value.componentProps.classes?.root ?? ""]: !0,
|
|
34
|
+
[t.tokenClasses.variantHeadSticky ?? ""]: f
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}) };
|
|
38
|
+
}
|
|
39
|
+
//#endregion
|
|
40
|
+
export { u as useTableCell };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TableBodyProps, TableCaptionProps, TableFooterProps, TableHeaderProps } from '../table.types';
|
|
2
|
+
type TablePartKind = "body" | "footer" | "header" | "caption";
|
|
3
|
+
type TablePartProps = TableBodyProps | TableFooterProps | TableHeaderProps | TableCaptionProps;
|
|
4
|
+
/**
|
|
5
|
+
* Bind for `TableHeader` / `TableBody` / `TableFooter` / `TableCaption`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useTablePart(props: TablePartProps, part: TablePartKind): {
|
|
8
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
9
|
+
class: string;
|
|
10
|
+
}, "class", import('vue').HTMLAttributes | undefined, Omit<TablePartProps, "classes" | "customProps">>>;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { mergePartBind as e } from "../../../Utils/index.js";
|
|
2
|
+
import { TABLE_INJECTION_KEY as t, TABLE_SECTION_INJECTION_KEY as n } from "../tableInjectionKey.js";
|
|
3
|
+
import { computed as r, inject as i, provide as a, useAttrs as o } from "vue";
|
|
4
|
+
import { cn as s, splitComponentProps as c } from "@bridge-ui/core/Utils";
|
|
5
|
+
//#region src/Components/Table/composables/useTablePart.ts
|
|
6
|
+
var l = ["classes", "customProps"];
|
|
7
|
+
function u(u, d) {
|
|
8
|
+
let f = o(), p = i(t, null);
|
|
9
|
+
if (!p) throw Error("Table parts must be used within a Table provider");
|
|
10
|
+
d !== "caption" && a(n, r(() => d));
|
|
11
|
+
let m = r(() => c({
|
|
12
|
+
props: {
|
|
13
|
+
...f,
|
|
14
|
+
...u
|
|
15
|
+
},
|
|
16
|
+
bridgeKeys: l
|
|
17
|
+
}));
|
|
18
|
+
return { rootBind: r(() => {
|
|
19
|
+
let t = p.value, n = d === "header" ? t.tokenClasses.variantHeader : d === "body" ? t.tokenClasses.variantBody : d === "footer" ? t.tokenClasses.variantFooter : t.tokenClasses.variantCaption, r = d === "caption" ? t.tokenClasses.sizeCaption : void 0;
|
|
20
|
+
return e(m.value.componentProps.customProps?.root, m.value.inheritedAttrs, { class: s({
|
|
21
|
+
"sticky top-0 z-20": d === "header" && t.stickyHeader,
|
|
22
|
+
[r ?? ""]: !0,
|
|
23
|
+
[n ?? ""]: !0,
|
|
24
|
+
[t.tokenClasses.roundedHeader ?? ""]: d === "header",
|
|
25
|
+
[t.tokenClasses.roundedFooter ?? ""]: d === "footer",
|
|
26
|
+
[t.mergedClasses[d] ?? ""]: !0,
|
|
27
|
+
[m.value.componentProps.classes?.root ?? ""]: !0
|
|
28
|
+
}) });
|
|
29
|
+
}) };
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { u as useTablePart };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TableRowOwnProps, TableRowProps } from '../table.types';
|
|
2
|
+
export declare function useTableRow(props: TableRowOwnProps): {
|
|
3
|
+
rootBind: import('vue').ComputedRef<import('@bridge-ui/core/Utils').MergePartBind<{
|
|
4
|
+
class: string;
|
|
5
|
+
}, "class", import('vue').HTMLAttributes | undefined, Omit<TableRowProps, "classes" | "customProps">>>;
|
|
6
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { mergePartBind as e } from "../../../Utils/index.js";
|
|
2
|
+
import { TABLE_INJECTION_KEY as t, TABLE_SECTION_INJECTION_KEY as n } from "../tableInjectionKey.js";
|
|
3
|
+
import { computed as r, inject as i, useAttrs as a } from "vue";
|
|
4
|
+
import { cn as o, splitComponentProps as s } from "@bridge-ui/core/Utils";
|
|
5
|
+
//#region src/Components/Table/composables/useTableRow.ts
|
|
6
|
+
var c = ["classes", "customProps"];
|
|
7
|
+
function l(l) {
|
|
8
|
+
let u = a(), d = i(t, null), f = i(n, null);
|
|
9
|
+
if (!d) throw Error("Table parts must be used within a Table provider");
|
|
10
|
+
let p = r(() => s({
|
|
11
|
+
props: {
|
|
12
|
+
...u,
|
|
13
|
+
...l
|
|
14
|
+
},
|
|
15
|
+
bridgeKeys: c
|
|
16
|
+
}));
|
|
17
|
+
return { rootBind: r(() => {
|
|
18
|
+
let t = d.value, n = f?.value === "body";
|
|
19
|
+
return e(p.value.componentProps.customProps?.root, p.value.inheritedAttrs, { class: o({
|
|
20
|
+
[t.tokenClasses.variantRow ?? ""]: !0,
|
|
21
|
+
[t.mergedClasses.row ?? ""]: !0,
|
|
22
|
+
[p.value.componentProps.classes?.root ?? ""]: !0,
|
|
23
|
+
[t.tokenClasses.variantRowHover ?? ""]: n && t.hoverable,
|
|
24
|
+
[t.tokenClasses.variantRowStriped ?? ""]: n && t.striped
|
|
25
|
+
}) });
|
|
26
|
+
}) };
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { l as useTableRow };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { useTable } from './composables/useTable';
|
|
2
|
+
export { useTableCell } from './composables/useTableCell';
|
|
3
|
+
export { useTablePart } from './composables/useTablePart';
|
|
4
|
+
export { useTableRow } from './composables/useTableRow';
|
|
5
|
+
export type { TableAlignOverrides, TableBodyClasses, TableBodyCustomProps, TableBodyOwnProps, TableBodyProps, TableBodySlots, TableCaptionClasses, TableCaptionCustomProps, TableCaptionOwnProps, TableCaptionProps, TableCaptionSlots, TableCellClasses, TableCellCustomProps, TableCellOwnProps, TableCellProps, TableCellSlots, TableClasses, TableCustomProps, TableFooterClasses, TableFooterCustomProps, TableFooterOwnProps, TableFooterProps, TableFooterSlots, TableHeadClasses, TableHeadCustomProps, TableHeadOwnProps, TableHeadProps, TableHeadSlots, TableHeaderClasses, TableHeaderCustomProps, TableHeaderOwnProps, TableHeaderProps, TableHeaderSlots, TableOwnProps, TableProps, TableRoundedOverrides, TableRowClasses, TableRowCustomProps, TableRowOwnProps, TableRowProps, TableRowSlots, TableSizeOverrides, TableSlots, TableVariantOverrides, } from './table.types';
|
|
6
|
+
export { default as Table } from './Table.vue';
|
|
7
|
+
export { default as TableBody } from './TableBody.vue';
|
|
8
|
+
export { default as TableCaption } from './TableCaption.vue';
|
|
9
|
+
export { default as TableCell } from './TableCell.vue';
|
|
10
|
+
export { default as TableFooter } from './TableFooter.vue';
|
|
11
|
+
export { default as TableHead } from './TableHead.vue';
|
|
12
|
+
export { default as TableHeader } from './TableHeader.vue';
|
|
13
|
+
export { TABLE_INJECTION_KEY, TABLE_SECTION_INJECTION_KEY, type TableContextValue, type TableSection, type TableTokenClasses, } from './tableInjectionKey';
|
|
14
|
+
export { default as TableRow } from './TableRow.vue';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TABLE_INJECTION_KEY as e, TABLE_SECTION_INJECTION_KEY as t } from "./tableInjectionKey.js";
|
|
2
|
+
import { useTable as n } from "./composables/useTable.js";
|
|
3
|
+
import { useTableCell as r } from "./composables/useTableCell.js";
|
|
4
|
+
import { useTablePart as i } from "./composables/useTablePart.js";
|
|
5
|
+
import { useTableRow as a } from "./composables/useTableRow.js";
|
|
6
|
+
import o from "./Table.js";
|
|
7
|
+
import s from "./TableBody.js";
|
|
8
|
+
import c from "./TableCaption.js";
|
|
9
|
+
import l from "./TableCell.js";
|
|
10
|
+
import u from "./TableFooter.js";
|
|
11
|
+
import d from "./TableHead.js";
|
|
12
|
+
import f from "./TableHeader.js";
|
|
13
|
+
import p from "./TableRow.js";
|
|
14
|
+
export { e as TABLE_INJECTION_KEY, t as TABLE_SECTION_INJECTION_KEY, o as Table, s as TableBody, c as TableCaption, l as TableCell, u as TableFooter, d as TableHead, f as TableHeader, p as TableRow, n as useTable, r as useTableCell, i as useTablePart, a as useTableRow };
|