@db-ux/react-core-components 4.11.1 → 4.12.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.
- package/CHANGELOG.md +23 -0
- package/dist/components/accordion/accordion.d.ts +1 -1
- package/dist/components/accordion/accordion.js +83 -102
- package/dist/components/accordion/index.d.ts +1 -1
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/accordion/model.d.ts +2 -2
- package/dist/components/accordion/model.js +2 -4
- package/dist/components/accordion-item/accordion-item.d.ts +2 -2
- package/dist/components/accordion-item/accordion-item.js +56 -89
- package/dist/components/accordion-item/index.d.ts +1 -1
- package/dist/components/accordion-item/index.js +1 -0
- package/dist/components/accordion-item/model.d.ts +1 -1
- package/dist/components/accordion-item/model.js +1 -0
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/badge/badge.js +28 -72
- package/dist/components/badge/index.d.ts +1 -1
- package/dist/components/badge/index.js +1 -0
- package/dist/components/badge/model.d.ts +1 -1
- package/dist/components/badge/model.js +1 -12
- package/dist/components/brand/brand.d.ts +1 -1
- package/dist/components/brand/brand.js +10 -60
- package/dist/components/brand/index.d.ts +1 -1
- package/dist/components/brand/index.js +1 -0
- package/dist/components/brand/model.d.ts +1 -1
- package/dist/components/brand/model.js +1 -0
- package/dist/components/button/button.d.ts +1 -1
- package/dist/components/button/button.js +19 -75
- package/dist/components/button/index.d.ts +1 -1
- package/dist/components/button/index.js +1 -0
- package/dist/components/button/model.d.ts +1 -1
- package/dist/components/button/model.js +2 -13
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/card/card.js +14 -65
- package/dist/components/card/index.d.ts +1 -1
- package/dist/components/card/index.js +1 -0
- package/dist/components/card/model.d.ts +1 -1
- package/dist/components/card/model.js +2 -8
- package/dist/components/checkbox/checkbox.d.ts +1 -1
- package/dist/components/checkbox/checkbox.js +143 -163
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/checkbox/model.d.ts +1 -1
- package/dist/components/checkbox/model.js +1 -0
- package/dist/components/custom-button/custom-button.d.ts +1 -1
- package/dist/components/custom-button/custom-button.js +10 -65
- package/dist/components/custom-button/index.d.ts +1 -1
- package/dist/components/custom-button/index.js +1 -0
- package/dist/components/custom-button/model.d.ts +2 -2
- package/dist/components/custom-button/model.js +1 -0
- package/dist/components/custom-select/custom-select.d.ts +1 -1
- package/dist/components/custom-select/custom-select.js +688 -509
- package/dist/components/custom-select/index.d.ts +1 -1
- package/dist/components/custom-select/index.js +1 -0
- package/dist/components/custom-select/model.d.ts +4 -4
- package/dist/components/custom-select/model.js +1 -8
- package/dist/components/custom-select-dropdown/custom-select-dropdown.d.ts +1 -1
- package/dist/components/custom-select-dropdown/custom-select-dropdown.js +10 -62
- package/dist/components/custom-select-dropdown/index.d.ts +1 -1
- package/dist/components/custom-select-dropdown/index.js +1 -0
- package/dist/components/custom-select-dropdown/model.d.ts +1 -1
- package/dist/components/custom-select-dropdown/model.js +1 -8
- package/dist/components/custom-select-form-field/custom-select-form-field.d.ts +1 -1
- package/dist/components/custom-select-form-field/custom-select-form-field.js +9 -57
- package/dist/components/custom-select-form-field/index.d.ts +1 -1
- package/dist/components/custom-select-form-field/index.js +1 -0
- package/dist/components/custom-select-form-field/model.d.ts +1 -1
- package/dist/components/custom-select-form-field/model.js +1 -0
- package/dist/components/custom-select-list/custom-select-list.d.ts +1 -1
- package/dist/components/custom-select-list/custom-select-list.js +9 -60
- package/dist/components/custom-select-list/index.d.ts +1 -1
- package/dist/components/custom-select-list/index.js +1 -0
- package/dist/components/custom-select-list/model.d.ts +1 -1
- package/dist/components/custom-select-list/model.js +1 -0
- package/dist/components/custom-select-list-item/custom-select-list-item.d.ts +2 -2
- package/dist/components/custom-select-list-item/custom-select-list-item.js +28 -89
- package/dist/components/custom-select-list-item/index.d.ts +1 -1
- package/dist/components/custom-select-list-item/index.js +1 -0
- package/dist/components/custom-select-list-item/model.d.ts +1 -1
- package/dist/components/custom-select-list-item/model.js +1 -4
- package/dist/components/divider/divider.d.ts +1 -1
- package/dist/components/divider/divider.js +9 -60
- package/dist/components/divider/index.d.ts +1 -1
- package/dist/components/divider/index.js +1 -0
- package/dist/components/divider/model.d.ts +1 -1
- package/dist/components/divider/model.js +2 -4
- package/dist/components/drawer/drawer.d.ts +2 -2
- package/dist/components/drawer/drawer.js +109 -118
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/drawer/model.d.ts +4 -1
- package/dist/components/drawer/model.js +4 -14
- package/dist/components/header/header.d.ts +1 -1
- package/dist/components/header/header.js +43 -143
- package/dist/components/header/index.d.ts +1 -1
- package/dist/components/header/index.js +1 -0
- package/dist/components/header/model.d.ts +1 -1
- package/dist/components/header/model.js +1 -0
- package/dist/components/icon/icon.d.ts +1 -1
- package/dist/components/icon/icon.js +9 -61
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/icon/index.js +1 -0
- package/dist/components/icon/model.d.ts +1 -1
- package/dist/components/icon/model.js +1 -11
- package/dist/components/infotext/index.d.ts +1 -1
- package/dist/components/infotext/index.js +1 -0
- package/dist/components/infotext/infotext.d.ts +1 -1
- package/dist/components/infotext/infotext.js +9 -62
- package/dist/components/infotext/model.d.ts +1 -1
- package/dist/components/infotext/model.js +1 -0
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/index.js +1 -0
- package/dist/components/input/input.d.ts +1 -1
- package/dist/components/input/input.js +154 -198
- package/dist/components/input/model.d.ts +1 -1
- package/dist/components/input/model.js +5 -21
- package/dist/components/link/index.d.ts +1 -1
- package/dist/components/link/index.js +1 -0
- package/dist/components/link/link.d.ts +1 -1
- package/dist/components/link/link.js +9 -70
- package/dist/components/link/model.d.ts +1 -1
- package/dist/components/link/model.js +3 -8
- package/dist/components/navigation/index.d.ts +1 -1
- package/dist/components/navigation/index.js +1 -0
- package/dist/components/navigation/model.d.ts +1 -1
- package/dist/components/navigation/model.js +1 -0
- package/dist/components/navigation/navigation.d.ts +1 -1
- package/dist/components/navigation/navigation.js +9 -57
- package/dist/components/navigation-item/index.d.ts +1 -1
- package/dist/components/navigation-item/index.js +1 -0
- package/dist/components/navigation-item/model.d.ts +2 -2
- package/dist/components/navigation-item/model.js +1 -0
- package/dist/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist/components/navigation-item/navigation-item.js +71 -117
- package/dist/components/notification/index.d.ts +1 -1
- package/dist/components/notification/index.js +1 -0
- package/dist/components/notification/model.d.ts +1 -1
- package/dist/components/notification/model.js +3 -12
- package/dist/components/notification/notification.d.ts +2 -2
- package/dist/components/notification/notification.js +23 -100
- package/dist/components/page/index.d.ts +1 -1
- package/dist/components/page/index.js +1 -0
- package/dist/components/page/model.d.ts +1 -1
- package/dist/components/page/model.js +2 -4
- package/dist/components/page/page.d.ts +1 -1
- package/dist/components/page/page.js +42 -74
- package/dist/components/popover/index.d.ts +1 -1
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/model.d.ts +1 -1
- package/dist/components/popover/model.js +1 -0
- package/dist/components/popover/popover.d.ts +1 -1
- package/dist/components/popover/popover.js +119 -126
- package/dist/components/radio/index.d.ts +1 -1
- package/dist/components/radio/index.js +1 -0
- package/dist/components/radio/model.d.ts +1 -1
- package/dist/components/radio/model.js +1 -0
- package/dist/components/radio/radio.d.ts +1 -1
- package/dist/components/radio/radio.js +86 -124
- package/dist/components/section/index.d.ts +1 -1
- package/dist/components/section/index.js +1 -0
- package/dist/components/section/model.d.ts +1 -1
- package/dist/components/section/model.js +1 -0
- package/dist/components/section/section.d.ts +1 -1
- package/dist/components/section/section.js +9 -59
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/index.js +1 -0
- package/dist/components/select/model.d.ts +1 -1
- package/dist/components/select/model.js +1 -0
- package/dist/components/select/select.d.ts +1 -1
- package/dist/components/select/select.js +172 -188
- package/dist/components/stack/index.d.ts +1 -1
- package/dist/components/stack/index.js +1 -0
- package/dist/components/stack/model.d.ts +1 -1
- package/dist/components/stack/model.js +4 -14
- package/dist/components/stack/stack.d.ts +1 -1
- package/dist/components/stack/stack.js +9 -63
- package/dist/components/switch/index.d.ts +1 -1
- package/dist/components/switch/index.js +1 -0
- package/dist/components/switch/model.d.ts +1 -1
- package/dist/components/switch/model.js +1 -0
- package/dist/components/switch/switch.d.ts +1 -1
- package/dist/components/switch/switch.js +135 -182
- package/dist/components/tab-item/index.d.ts +1 -1
- package/dist/components/tab-item/index.js +1 -0
- package/dist/components/tab-item/model.d.ts +1 -1
- package/dist/components/tab-item/model.js +1 -0
- package/dist/components/tab-item/tab-item.d.ts +1 -1
- package/dist/components/tab-item/tab-item.js +72 -105
- package/dist/components/tab-list/index.d.ts +1 -1
- package/dist/components/tab-list/index.js +1 -0
- package/dist/components/tab-list/model.d.ts +1 -1
- package/dist/components/tab-list/model.js +1 -0
- package/dist/components/tab-list/tab-list.d.ts +1 -1
- package/dist/components/tab-list/tab-list.js +9 -60
- package/dist/components/tab-panel/index.d.ts +1 -1
- package/dist/components/tab-panel/index.js +1 -0
- package/dist/components/tab-panel/model.d.ts +1 -1
- package/dist/components/tab-panel/model.js +1 -0
- package/dist/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist/components/tab-panel/tab-panel.js +10 -59
- package/dist/components/table/examples/data.d.ts +1 -1
- package/dist/components/table/examples/data.js +258 -0
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/model.d.ts +2 -2
- package/dist/components/table/model.js +6 -28
- package/dist/components/table/table.d.ts +1 -1
- package/dist/components/table/table.js +77 -111
- package/dist/components/table-body/index.d.ts +1 -1
- package/dist/components/table-body/index.js +1 -0
- package/dist/components/table-body/model.d.ts +2 -2
- package/dist/components/table-body/model.js +1 -0
- package/dist/components/table-body/table-body.d.ts +1 -1
- package/dist/components/table-body/table-body.js +12 -64
- package/dist/components/table-caption/index.d.ts +1 -1
- package/dist/components/table-caption/index.js +1 -0
- package/dist/components/table-caption/model.d.ts +1 -1
- package/dist/components/table-caption/model.js +1 -0
- package/dist/components/table-caption/table-caption.d.ts +1 -1
- package/dist/components/table-caption/table-caption.js +9 -57
- package/dist/components/table-data-cell/index.d.ts +1 -1
- package/dist/components/table-data-cell/index.js +1 -0
- package/dist/components/table-data-cell/model.d.ts +1 -1
- package/dist/components/table-data-cell/model.js +1 -0
- package/dist/components/table-data-cell/table-data-cell.d.ts +1 -1
- package/dist/components/table-data-cell/table-data-cell.js +9 -62
- package/dist/components/table-footer/index.d.ts +1 -1
- package/dist/components/table-footer/index.js +1 -0
- package/dist/components/table-footer/model.d.ts +2 -2
- package/dist/components/table-footer/model.js +1 -0
- package/dist/components/table-footer/table-footer.d.ts +1 -1
- package/dist/components/table-footer/table-footer.js +12 -64
- package/dist/components/table-head/index.d.ts +1 -1
- package/dist/components/table-head/index.js +1 -0
- package/dist/components/table-head/model.d.ts +2 -2
- package/dist/components/table-head/model.js +1 -0
- package/dist/components/table-head/table-head.d.ts +1 -1
- package/dist/components/table-head/table-head.js +18 -71
- package/dist/components/table-header-cell/index.d.ts +1 -1
- package/dist/components/table-header-cell/index.js +1 -0
- package/dist/components/table-header-cell/model.d.ts +1 -1
- package/dist/components/table-header-cell/model.js +1 -9
- package/dist/components/table-header-cell/table-header-cell.d.ts +1 -1
- package/dist/components/table-header-cell/table-header-cell.js +9 -65
- package/dist/components/table-row/index.d.ts +1 -1
- package/dist/components/table-row/index.js +1 -0
- package/dist/components/table-row/model.d.ts +4 -4
- package/dist/components/table-row/model.js +1 -8
- package/dist/components/table-row/table-row.d.ts +1 -1
- package/dist/components/table-row/table-row.js +20 -127
- package/dist/components/tabs/index.d.ts +1 -1
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/tabs/model.d.ts +3 -3
- package/dist/components/tabs/model.js +2 -4
- package/dist/components/tabs/tabs.d.ts +1 -1
- package/dist/components/tabs/tabs.js +170 -191
- package/dist/components/tag/index.d.ts +1 -1
- package/dist/components/tag/index.js +1 -0
- package/dist/components/tag/model.d.ts +1 -1
- package/dist/components/tag/model.js +1 -4
- package/dist/components/tag/tag.d.ts +1 -1
- package/dist/components/tag/tag.js +26 -91
- package/dist/components/textarea/index.d.ts +1 -1
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/textarea/model.d.ts +1 -1
- package/dist/components/textarea/model.js +2 -13
- package/dist/components/textarea/textarea.d.ts +1 -1
- package/dist/components/textarea/textarea.js +139 -165
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/model.d.ts +1 -1
- package/dist/components/tooltip/model.js +1 -4
- package/dist/components/tooltip/tooltip.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +197 -160
- package/dist/index.d.ts +97 -97
- package/dist/index.js +97 -75
- package/dist/shared/constants.js +100 -32
- package/dist/shared/examples/index.js +4 -0
- package/dist/shared/figma.js +1 -0
- package/dist/shared/model.js +22 -77
- package/dist/shared/showcase/show-code-link.js +51 -0
- package/dist/utils/document-click-listener.js +29 -26
- package/dist/utils/document-scroll-listener.js +38 -30
- package/dist/utils/floating-components.js +404 -107
- package/dist/utils/form-components.js +71 -34
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.js +170 -49
- package/dist/utils/navigation.js +134 -68
- package/dist/utils/react.js +21 -10
- package/package.json +6 -9
|
@@ -1,113 +1,79 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
"data-show-caption": i(c.showCaption),
|
|
78
|
-
"data-sticky-header": c.stickyHeader,
|
|
79
|
-
children: /* @__PURE__ */ m("table", {
|
|
80
|
-
ref: g,
|
|
81
|
-
...e(c, [
|
|
82
|
-
"data-icon-variant",
|
|
83
|
-
"data-icon-variant-before",
|
|
84
|
-
"data-icon-variant-after",
|
|
85
|
-
"data-icon-weight",
|
|
86
|
-
"data-icon-weight-before",
|
|
87
|
-
"data-icon-weight-after",
|
|
88
|
-
"data-interactive",
|
|
89
|
-
"data-force-mobile",
|
|
90
|
-
"data-color",
|
|
91
|
-
"data-container-color",
|
|
92
|
-
"data-bg-color",
|
|
93
|
-
"data-on-bg-color",
|
|
94
|
-
"data-color-scheme",
|
|
95
|
-
"data-font-size",
|
|
96
|
-
"data-headline-size",
|
|
97
|
-
"data-divider",
|
|
98
|
-
"data-focus",
|
|
99
|
-
"data-font",
|
|
100
|
-
"data-density"
|
|
101
|
-
]),
|
|
102
|
-
id: c.id,
|
|
103
|
-
children: [c.captionPlain ? /* @__PURE__ */ p("caption", { children: c.captionPlain }) : /* @__PURE__ */ p(f, { children: /* @__PURE__ */ p(f, { children: c.caption }) }), _ ? /* @__PURE__ */ m(f, { children: [
|
|
104
|
-
_?.header ? /* @__PURE__ */ p(s, { rows: _?.header }) : null,
|
|
105
|
-
_?.body ? /* @__PURE__ */ p(a, { rows: _?.body }) : null,
|
|
106
|
-
_?.footer ? /* @__PURE__ */ p(o, { rows: _?.footer }) : null
|
|
107
|
-
] }) : /* @__PURE__ */ p(f, { children: c.children })]
|
|
108
|
-
})
|
|
109
|
-
});
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { filterPassingProps, getRootProps } from "../../utils/react.js";
|
|
4
|
+
import { useState, useRef, useEffect, forwardRef } from "react";
|
|
5
|
+
import { cls, delay, getBooleanAsString } from "../../utils/index.js";
|
|
6
|
+
import DBTableBody from "../table-body/table-body.js";
|
|
7
|
+
import DBTableFooter from "../table-footer/table-footer.js";
|
|
8
|
+
import DBTableHead from "../table-head/table-head.js";
|
|
9
|
+
function DBTableFn(props, component) {
|
|
10
|
+
const _ref = component || useRef(undefined);
|
|
11
|
+
const [_data, set_data] = useState(() => undefined);
|
|
12
|
+
const [_style, set_style] = useState(() => undefined);
|
|
13
|
+
function convertData() {
|
|
14
|
+
try {
|
|
15
|
+
if (typeof props.data === "string") {
|
|
16
|
+
return JSON.parse(props.data);
|
|
17
|
+
}
|
|
18
|
+
return props.data;
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
console.error(error);
|
|
22
|
+
}
|
|
23
|
+
return {};
|
|
24
|
+
}
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (props.data) {
|
|
27
|
+
set_data(convertData());
|
|
28
|
+
}
|
|
29
|
+
else {
|
|
30
|
+
set_data(undefined);
|
|
31
|
+
}
|
|
32
|
+
}, [props.data]);
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (_ref.current && props.mobileVariant === "list") {
|
|
35
|
+
// Delay for angular
|
|
36
|
+
void delay(() => {
|
|
37
|
+
const table = _ref.current;
|
|
38
|
+
if (!table)
|
|
39
|
+
return;
|
|
40
|
+
const headerCells = table.querySelectorAll("thead tr th");
|
|
41
|
+
if (headerCells.length) {
|
|
42
|
+
const otherRows = table.querySelectorAll(":is(tbody,tfoot) tr");
|
|
43
|
+
otherRows.forEach((row) => {
|
|
44
|
+
const cells = row.querySelectorAll(":is(td,th)");
|
|
45
|
+
cells.forEach((cell, index) => {
|
|
46
|
+
const headerCell = headerCells[index];
|
|
47
|
+
if (headerCell) {
|
|
48
|
+
// Use only direct text nodes to avoid including text from nested elements (e.g. sort buttons)
|
|
49
|
+
const directText = Array.from(headerCell.childNodes)
|
|
50
|
+
.filter((node) => node.nodeType === Node.TEXT_NODE)
|
|
51
|
+
.map((node) => node.textContent?.trim())
|
|
52
|
+
.filter(Boolean)
|
|
53
|
+
.join(" ");
|
|
54
|
+
if (directText) {
|
|
55
|
+
cell.dataset["header"] = directText;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}, 1);
|
|
62
|
+
}
|
|
63
|
+
}, [props.mobileVariant, _ref.current, _data]);
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
if (props.columnSizes) {
|
|
66
|
+
const columnStyles = {};
|
|
67
|
+
Object.entries(props.columnSizes).forEach(([key, value]) => {
|
|
68
|
+
columnStyles[`--db-table-column-size-${key}`] = value;
|
|
69
|
+
});
|
|
70
|
+
set_style(columnStyles);
|
|
71
|
+
}
|
|
72
|
+
else {
|
|
73
|
+
set_style(undefined);
|
|
74
|
+
}
|
|
75
|
+
}, [props.columnSizes]);
|
|
76
|
+
return (_jsx("div", { ...getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), className: cls("db-table", props.className), style: _style, "data-width": props.width, "data-size": props.size, "data-divider": props.divider, "data-variant": props.variant, "data-mobile-variant": props.mobileVariant, "data-show-caption": getBooleanAsString(props.showCaption), "data-sticky-header": props.stickyHeader, children: _jsxs("table", { ref: _ref, ...filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), id: props.id, children: [props.captionPlain ? (_jsx("caption", { children: props.captionPlain })) : (_jsx(_Fragment, { children: _jsx(_Fragment, { children: props.caption }) })), _data ? (_jsxs(_Fragment, { children: [_data?.header ? _jsx(DBTableHead, { rows: _data?.header }) : null, _data?.body ? _jsx(DBTableBody, { rows: _data?.body }) : null, _data?.footer ? _jsx(DBTableFooter, { rows: _data?.footer }) : null] })) : (_jsx(_Fragment, { children: props.children }))] }) }));
|
|
110
77
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
export { g as default };
|
|
78
|
+
const DBTable = forwardRef(DBTableFn);
|
|
79
|
+
export default DBTable;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as DBTableBody } from './table-body';
|
|
1
|
+
export { default as DBTableBody } from './table-body.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DBTableBody } from './table-body.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GlobalProps, GlobalState } from '../../shared/model';
|
|
2
|
-
import type { DBTableRowProps } from '../table-row/model';
|
|
1
|
+
import type { GlobalProps, GlobalState } from '../../shared/model.js';
|
|
2
|
+
import type { DBTableRowProps } from '../table-row/model.js';
|
|
3
3
|
export type DBTableBodyDefaultProps = {
|
|
4
4
|
rows?: DBTableRowProps[];
|
|
5
5
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const DBTableBody: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("
|
|
2
|
+
declare const DBTableBody: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("../../index.js").GlobalProps | "rows"> & import("./model.js").DBTableBodyDefaultProps & import("../../index.js").GlobalProps & React.RefAttributes<any>>;
|
|
3
3
|
export default DBTableBody;
|
|
@@ -1,66 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
...e(i, [
|
|
13
|
-
"data-icon-variant",
|
|
14
|
-
"data-icon-variant-before",
|
|
15
|
-
"data-icon-variant-after",
|
|
16
|
-
"data-icon-weight",
|
|
17
|
-
"data-icon-weight-before",
|
|
18
|
-
"data-icon-weight-after",
|
|
19
|
-
"data-interactive",
|
|
20
|
-
"data-force-mobile",
|
|
21
|
-
"data-color",
|
|
22
|
-
"data-container-color",
|
|
23
|
-
"data-bg-color",
|
|
24
|
-
"data-on-bg-color",
|
|
25
|
-
"data-color-scheme",
|
|
26
|
-
"data-font-size",
|
|
27
|
-
"data-headline-size",
|
|
28
|
-
"data-divider",
|
|
29
|
-
"data-focus",
|
|
30
|
-
"data-font",
|
|
31
|
-
"data-density"
|
|
32
|
-
]),
|
|
33
|
-
id: i.id,
|
|
34
|
-
...t(i, [
|
|
35
|
-
"data-icon-variant",
|
|
36
|
-
"data-icon-variant-before",
|
|
37
|
-
"data-icon-variant-after",
|
|
38
|
-
"data-icon-weight",
|
|
39
|
-
"data-icon-weight-before",
|
|
40
|
-
"data-icon-weight-after",
|
|
41
|
-
"data-interactive",
|
|
42
|
-
"data-force-mobile",
|
|
43
|
-
"data-color",
|
|
44
|
-
"data-container-color",
|
|
45
|
-
"data-bg-color",
|
|
46
|
-
"data-on-bg-color",
|
|
47
|
-
"data-color-scheme",
|
|
48
|
-
"data-font-size",
|
|
49
|
-
"data-headline-size",
|
|
50
|
-
"data-divider",
|
|
51
|
-
"data-focus",
|
|
52
|
-
"data-font",
|
|
53
|
-
"data-density"
|
|
54
|
-
]),
|
|
55
|
-
className: n("db-table-body", i.className),
|
|
56
|
-
children: i.rows ? /* @__PURE__ */ c(s, { children: i.rows?.map((e, t) => /* @__PURE__ */ c(r, {
|
|
57
|
-
cells: e.cells,
|
|
58
|
-
className: e.className ?? e.class,
|
|
59
|
-
interactive: e.interactive,
|
|
60
|
-
id: e.id
|
|
61
|
-
}, `${e.id ?? i.id ?? u}-table-body-row-${t}`)) }) : /* @__PURE__ */ c(s, { children: i.children })
|
|
62
|
-
});
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { filterPassingProps, getRootProps } from "../../utils/react.js";
|
|
4
|
+
import { useRef, forwardRef } from "react";
|
|
5
|
+
import { cls } from "../../utils/index.js";
|
|
6
|
+
import DBTableRow from "../table-row/table-row.js";
|
|
7
|
+
import { useId } from "react";
|
|
8
|
+
function DBTableBodyFn(props, component) {
|
|
9
|
+
const uuid = useId();
|
|
10
|
+
const _ref = component || useRef(undefined);
|
|
11
|
+
return (_jsx("tbody", { ref: _ref, ...filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), id: props.id, ...getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), className: cls("db-table-body", props.className), children: props.rows ? (_jsx(_Fragment, { children: props.rows?.map((row, index) => (_jsx(DBTableRow, { cells: row.cells, className: row.className ?? row.class, interactive: row.interactive, id: row.id }, `${row.id ?? props.id ?? uuid}-table-body-row-${index}`))) })) : (_jsx(_Fragment, { children: props.children })) }));
|
|
63
12
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export { u as default };
|
|
13
|
+
const DBTableBody = forwardRef(DBTableBodyFn);
|
|
14
|
+
export default DBTableBody;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as DBTableCaption } from './table-caption';
|
|
1
|
+
export { default as DBTableCaption } from './table-caption.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DBTableCaption } from './table-caption.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { GlobalProps, GlobalState } from '../../shared/model';
|
|
1
|
+
import type { GlobalProps, GlobalState } from '../../shared/model.js';
|
|
2
2
|
export type DBTableCaptionDefaultProps = {};
|
|
3
3
|
export type DBTableCaptionProps = DBTableCaptionDefaultProps & GlobalProps;
|
|
4
4
|
export type DBTableCaptionDefaultState = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const DBTableCaption: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("
|
|
2
|
+
declare const DBTableCaption: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("../../index.js").GlobalProps> & import("../../index.js").GlobalProps & React.RefAttributes<any>>;
|
|
3
3
|
export default DBTableCaption;
|
|
@@ -1,59 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
ref: o || i(void 0),
|
|
10
|
-
...e(r, [
|
|
11
|
-
"data-icon-variant",
|
|
12
|
-
"data-icon-variant-before",
|
|
13
|
-
"data-icon-variant-after",
|
|
14
|
-
"data-icon-weight",
|
|
15
|
-
"data-icon-weight-before",
|
|
16
|
-
"data-icon-weight-after",
|
|
17
|
-
"data-interactive",
|
|
18
|
-
"data-force-mobile",
|
|
19
|
-
"data-color",
|
|
20
|
-
"data-container-color",
|
|
21
|
-
"data-bg-color",
|
|
22
|
-
"data-on-bg-color",
|
|
23
|
-
"data-color-scheme",
|
|
24
|
-
"data-font-size",
|
|
25
|
-
"data-headline-size",
|
|
26
|
-
"data-divider",
|
|
27
|
-
"data-focus",
|
|
28
|
-
"data-font",
|
|
29
|
-
"data-density"
|
|
30
|
-
]),
|
|
31
|
-
id: r.id,
|
|
32
|
-
...t(r, [
|
|
33
|
-
"data-icon-variant",
|
|
34
|
-
"data-icon-variant-before",
|
|
35
|
-
"data-icon-variant-after",
|
|
36
|
-
"data-icon-weight",
|
|
37
|
-
"data-icon-weight-before",
|
|
38
|
-
"data-icon-weight-after",
|
|
39
|
-
"data-interactive",
|
|
40
|
-
"data-force-mobile",
|
|
41
|
-
"data-color",
|
|
42
|
-
"data-container-color",
|
|
43
|
-
"data-bg-color",
|
|
44
|
-
"data-on-bg-color",
|
|
45
|
-
"data-color-scheme",
|
|
46
|
-
"data-font-size",
|
|
47
|
-
"data-headline-size",
|
|
48
|
-
"data-divider",
|
|
49
|
-
"data-focus",
|
|
50
|
-
"data-font",
|
|
51
|
-
"data-density"
|
|
52
|
-
]),
|
|
53
|
-
className: n("db-table-caption", r.className),
|
|
54
|
-
children: r.children
|
|
55
|
-
});
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { filterPassingProps, getRootProps } from "../../utils/react.js";
|
|
4
|
+
import { useRef, forwardRef } from "react";
|
|
5
|
+
import { cls } from "../../utils/index.js";
|
|
6
|
+
function DBTableCaptionFn(props, component) {
|
|
7
|
+
const _ref = component || useRef(undefined);
|
|
8
|
+
return (_jsx("caption", { ref: _ref, ...filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), id: props.id, ...getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), className: cls("db-table-caption", props.className), children: props.children }));
|
|
56
9
|
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
export { s as default };
|
|
10
|
+
const DBTableCaption = forwardRef(DBTableCaptionFn);
|
|
11
|
+
export default DBTableCaption;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as DBTableDataCell } from './table-data-cell';
|
|
1
|
+
export { default as DBTableDataCell } from './table-data-cell.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DBTableDataCell } from './table-data-cell.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DBTableCellProps, GlobalProps, GlobalState } from '../../shared/model';
|
|
1
|
+
import type { DBTableCellProps, GlobalProps, GlobalState } from '../../shared/model.js';
|
|
2
2
|
export type DBTableDataCellDefaultProps = {};
|
|
3
3
|
export type DBTableDataCellProps = DBTableDataCellDefaultProps & GlobalProps & DBTableCellProps;
|
|
4
4
|
export type DBTableDataCellDefaultState = {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const DBTableDataCell: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("
|
|
2
|
+
declare const DBTableDataCell: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("../../index.js").GlobalProps | keyof import("../../index.js").DBTableCellProps> & import("../../index.js").GlobalProps & import("../../index.js").DBTableCellProps & React.RefAttributes<any>>;
|
|
3
3
|
export default DBTableDataCell;
|
|
@@ -1,64 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
ref: s || a(void 0),
|
|
10
|
-
...e(i, [
|
|
11
|
-
"data-icon-variant",
|
|
12
|
-
"data-icon-variant-before",
|
|
13
|
-
"data-icon-variant-after",
|
|
14
|
-
"data-icon-weight",
|
|
15
|
-
"data-icon-weight-before",
|
|
16
|
-
"data-icon-weight-after",
|
|
17
|
-
"data-interactive",
|
|
18
|
-
"data-force-mobile",
|
|
19
|
-
"data-color",
|
|
20
|
-
"data-container-color",
|
|
21
|
-
"data-bg-color",
|
|
22
|
-
"data-on-bg-color",
|
|
23
|
-
"data-color-scheme",
|
|
24
|
-
"data-font-size",
|
|
25
|
-
"data-headline-size",
|
|
26
|
-
"data-divider",
|
|
27
|
-
"data-focus",
|
|
28
|
-
"data-font",
|
|
29
|
-
"data-density"
|
|
30
|
-
]),
|
|
31
|
-
id: i.id,
|
|
32
|
-
...t(i, [
|
|
33
|
-
"data-icon-variant",
|
|
34
|
-
"data-icon-variant-before",
|
|
35
|
-
"data-icon-variant-after",
|
|
36
|
-
"data-icon-weight",
|
|
37
|
-
"data-icon-weight-before",
|
|
38
|
-
"data-icon-weight-after",
|
|
39
|
-
"data-interactive",
|
|
40
|
-
"data-force-mobile",
|
|
41
|
-
"data-color",
|
|
42
|
-
"data-container-color",
|
|
43
|
-
"data-bg-color",
|
|
44
|
-
"data-on-bg-color",
|
|
45
|
-
"data-color-scheme",
|
|
46
|
-
"data-font-size",
|
|
47
|
-
"data-headline-size",
|
|
48
|
-
"data-divider",
|
|
49
|
-
"data-focus",
|
|
50
|
-
"data-font",
|
|
51
|
-
"data-density"
|
|
52
|
-
]),
|
|
53
|
-
className: n("db-table-data-cell", i.className),
|
|
54
|
-
"data-horizontal-alignment": i.horizontalAlignment,
|
|
55
|
-
"data-vertical-alignment": i.verticalAlignment,
|
|
56
|
-
colSpan: r(i.colSpan, i.colspan),
|
|
57
|
-
rowSpan: r(i.rowSpan, i.rowspan),
|
|
58
|
-
headers: i.headers,
|
|
59
|
-
children: i.children
|
|
60
|
-
});
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { filterPassingProps, getRootProps } from "../../utils/react.js";
|
|
4
|
+
import { useRef, forwardRef } from "react";
|
|
5
|
+
import { cls, getNumber } from "../../utils/index.js";
|
|
6
|
+
function DBTableDataCellFn(props, component) {
|
|
7
|
+
const _ref = component || useRef(undefined);
|
|
8
|
+
return (_jsx("td", { ref: _ref, ...filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), id: props.id, ...getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), className: cls("db-table-data-cell", props.className), "data-horizontal-alignment": props.horizontalAlignment, "data-vertical-alignment": props.verticalAlignment, colSpan: getNumber(props.colSpan, props.colspan), rowSpan: getNumber(props.rowSpan, props.rowspan), headers: props.headers, children: props.children }));
|
|
61
9
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
export { c as default };
|
|
10
|
+
const DBTableDataCell = forwardRef(DBTableDataCellFn);
|
|
11
|
+
export default DBTableDataCell;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as DBTableFooter } from './table-footer';
|
|
1
|
+
export { default as DBTableFooter } from './table-footer.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DBTableFooter } from './table-footer.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GlobalProps, GlobalState } from '../../shared/model';
|
|
2
|
-
import type { DBTableRowProps } from '../table-row/model';
|
|
1
|
+
import type { GlobalProps, GlobalState } from '../../shared/model.js';
|
|
2
|
+
import type { DBTableRowProps } from '../table-row/model.js';
|
|
3
3
|
export type DBTableFooterDefaultProps = {
|
|
4
4
|
rows?: DBTableRowProps[];
|
|
5
5
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
declare const DBTableFooter: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("
|
|
2
|
+
declare const DBTableFooter: React.ForwardRefExoticComponent<Omit<React.HTMLAttributes<any>, keyof import("../../index.js").GlobalProps | "rows"> & import("./model.js").DBTableFooterDefaultProps & import("../../index.js").GlobalProps & React.RefAttributes<any>>;
|
|
3
3
|
export default DBTableFooter;
|
|
@@ -1,66 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
...e(i, [
|
|
13
|
-
"data-icon-variant",
|
|
14
|
-
"data-icon-variant-before",
|
|
15
|
-
"data-icon-variant-after",
|
|
16
|
-
"data-icon-weight",
|
|
17
|
-
"data-icon-weight-before",
|
|
18
|
-
"data-icon-weight-after",
|
|
19
|
-
"data-interactive",
|
|
20
|
-
"data-force-mobile",
|
|
21
|
-
"data-color",
|
|
22
|
-
"data-container-color",
|
|
23
|
-
"data-bg-color",
|
|
24
|
-
"data-on-bg-color",
|
|
25
|
-
"data-color-scheme",
|
|
26
|
-
"data-font-size",
|
|
27
|
-
"data-headline-size",
|
|
28
|
-
"data-divider",
|
|
29
|
-
"data-focus",
|
|
30
|
-
"data-font",
|
|
31
|
-
"data-density"
|
|
32
|
-
]),
|
|
33
|
-
id: i.id,
|
|
34
|
-
...t(i, [
|
|
35
|
-
"data-icon-variant",
|
|
36
|
-
"data-icon-variant-before",
|
|
37
|
-
"data-icon-variant-after",
|
|
38
|
-
"data-icon-weight",
|
|
39
|
-
"data-icon-weight-before",
|
|
40
|
-
"data-icon-weight-after",
|
|
41
|
-
"data-interactive",
|
|
42
|
-
"data-force-mobile",
|
|
43
|
-
"data-color",
|
|
44
|
-
"data-container-color",
|
|
45
|
-
"data-bg-color",
|
|
46
|
-
"data-on-bg-color",
|
|
47
|
-
"data-color-scheme",
|
|
48
|
-
"data-font-size",
|
|
49
|
-
"data-headline-size",
|
|
50
|
-
"data-divider",
|
|
51
|
-
"data-focus",
|
|
52
|
-
"data-font",
|
|
53
|
-
"data-density"
|
|
54
|
-
]),
|
|
55
|
-
className: n("db-table-footer", i.className),
|
|
56
|
-
children: i.rows ? /* @__PURE__ */ c(s, { children: i.rows?.map((e, t) => /* @__PURE__ */ c(r, {
|
|
57
|
-
cells: e.cells,
|
|
58
|
-
className: e.className ?? e.class,
|
|
59
|
-
interactive: e.interactive,
|
|
60
|
-
id: e.id
|
|
61
|
-
}, `${e.id ?? i.id ?? u}-table-footer-row-${t}`)) }) : /* @__PURE__ */ c(s, { children: i.children })
|
|
62
|
-
});
|
|
2
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { filterPassingProps, getRootProps } from "../../utils/react.js";
|
|
4
|
+
import { useRef, forwardRef } from "react";
|
|
5
|
+
import { cls } from "../../utils/index.js";
|
|
6
|
+
import DBTableRow from "../table-row/table-row.js";
|
|
7
|
+
import { useId } from "react";
|
|
8
|
+
function DBTableFooterFn(props, component) {
|
|
9
|
+
const uuid = useId();
|
|
10
|
+
const _ref = component || useRef(undefined);
|
|
11
|
+
return (_jsx("tfoot", { ref: _ref, ...filterPassingProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), id: props.id, ...getRootProps(props, ["data-icon-variant", "data-icon-variant-before", "data-icon-variant-after", "data-icon-weight", "data-icon-weight-before", "data-icon-weight-after", "data-interactive", "data-force-mobile", "data-color", "data-container-color", "data-bg-color", "data-on-bg-color", "data-color-scheme", "data-font-size", "data-headline-size", "data-divider", "data-focus", "data-font", "data-density"]), className: cls("db-table-footer", props.className), children: props.rows ? (_jsx(_Fragment, { children: props.rows?.map((row, index) => (_jsx(DBTableRow, { cells: row.cells, className: row.className ?? row.class, interactive: row.interactive, id: row.id }, `${row.id ?? props.id ?? uuid}-table-footer-row-${index}`))) })) : (_jsx(_Fragment, { children: props.children })) }));
|
|
63
12
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
export { u as default };
|
|
13
|
+
const DBTableFooter = forwardRef(DBTableFooterFn);
|
|
14
|
+
export default DBTableFooter;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { default as DBTableHead } from './table-head';
|
|
1
|
+
export { default as DBTableHead } from './table-head.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as DBTableHead } from './table-head.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { GlobalProps, GlobalState } from '../../shared/model';
|
|
2
|
-
import type { DBTableRowCell, DBTableRowProps } from '../table-row/model';
|
|
1
|
+
import type { GlobalProps, GlobalState } from '../../shared/model.js';
|
|
2
|
+
import type { DBTableRowCell, DBTableRowProps } from '../table-row/model.js';
|
|
3
3
|
export type DBTableHeadDefaultProps = {
|
|
4
4
|
rows?: DBTableRowProps[];
|
|
5
5
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|