@db-ux/react-core-components 4.9.1 → 4.10.0-esm-94516f3
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 +9 -1
- package/README.md +97 -35
- package/dist/components/accordion/accordion.js +102 -86
- package/dist/components/accordion/model.js +4 -2
- package/dist/components/accordion-item/accordion-item.d.ts +2 -1
- package/dist/components/accordion-item/accordion-item.js +89 -56
- package/dist/components/accordion-item/model.d.ts +4 -0
- package/dist/components/badge/badge.js +72 -32
- package/dist/components/badge/model.js +12 -1
- package/dist/components/brand/brand.js +60 -13
- package/dist/components/button/button.js +75 -21
- package/dist/components/button/model.js +13 -2
- package/dist/components/card/card.js +65 -15
- package/dist/components/card/model.js +8 -2
- package/dist/components/checkbox/checkbox.js +163 -157
- package/dist/components/custom-button/custom-button.js +65 -10
- package/dist/components/custom-select/custom-select.js +509 -727
- package/dist/components/custom-select/model.js +8 -1
- package/dist/components/custom-select-dropdown/custom-select-dropdown.js +62 -11
- package/dist/components/custom-select-dropdown/model.js +8 -1
- package/dist/components/custom-select-form-field/custom-select-form-field.js +57 -10
- package/dist/components/custom-select-list/custom-select-list.js +60 -11
- package/dist/components/custom-select-list-item/custom-select-list-item.js +89 -32
- package/dist/components/custom-select-list-item/model.js +4 -1
- package/dist/components/divider/divider.js +60 -10
- package/dist/components/divider/model.js +4 -2
- package/dist/components/drawer/drawer.js +118 -97
- package/dist/components/drawer/model.js +14 -4
- package/dist/components/header/header.js +143 -65
- package/dist/components/icon/icon.js +61 -12
- package/dist/components/icon/model.js +11 -1
- package/dist/components/infotext/infotext.js +62 -12
- package/dist/components/input/input.js +198 -167
- package/dist/components/input/model.js +21 -5
- package/dist/components/link/link.js +70 -12
- package/dist/components/link/model.js +8 -3
- package/dist/components/navigation/navigation.js +57 -11
- package/dist/components/navigation-item/model.d.ts +4 -0
- package/dist/components/navigation-item/navigation-item.js +117 -81
- package/dist/components/notification/model.js +12 -3
- package/dist/components/notification/notification.js +100 -32
- package/dist/components/page/model.js +4 -2
- package/dist/components/page/page.js +74 -46
- package/dist/components/popover/popover.js +126 -125
- package/dist/components/radio/radio.js +124 -85
- package/dist/components/section/section.js +59 -10
- package/dist/components/select/select.js +188 -191
- package/dist/components/stack/model.js +14 -4
- package/dist/components/stack/stack.js +63 -10
- package/dist/components/switch/switch.js +182 -150
- package/dist/components/tab-item/tab-item.js +105 -76
- package/dist/components/tab-list/tab-list.js +60 -11
- package/dist/components/tab-panel/tab-panel.js +59 -13
- package/dist/components/tabs/model.js +4 -2
- package/dist/components/tabs/tabs.js +191 -178
- package/dist/components/tag/model.js +4 -1
- package/dist/components/tag/tag.js +91 -32
- package/dist/components/textarea/model.js +13 -2
- package/dist/components/textarea/textarea.js +165 -150
- package/dist/components/tooltip/model.js +4 -1
- package/dist/components/tooltip/tooltip.js +119 -115
- package/dist/index.js +64 -81
- package/dist/shared/constants.js +32 -94
- package/dist/shared/figma.d.ts +12 -6
- package/dist/shared/model.js +73 -22
- package/dist/utils/document-click-listener.js +26 -29
- package/dist/utils/document-scroll-listener.js +30 -38
- package/dist/utils/floating-components.js +107 -358
- package/dist/utils/form-components.js +34 -60
- package/dist/utils/index.js +49 -167
- package/dist/utils/navigation.js +68 -135
- package/dist/utils/react.js +10 -15
- package/package.json +11 -8
- package/dist/components/accordion/index.js +0 -1
- package/dist/components/accordion-item/index.js +0 -1
- package/dist/components/accordion-item/model.js +0 -1
- package/dist/components/badge/index.js +0 -1
- package/dist/components/brand/index.js +0 -1
- package/dist/components/brand/model.js +0 -1
- package/dist/components/button/index.js +0 -1
- package/dist/components/card/index.js +0 -1
- package/dist/components/checkbox/index.js +0 -1
- package/dist/components/checkbox/model.js +0 -1
- package/dist/components/custom-button/index.js +0 -1
- package/dist/components/custom-button/model.js +0 -1
- package/dist/components/custom-select/index.js +0 -1
- package/dist/components/custom-select-dropdown/index.js +0 -1
- package/dist/components/custom-select-form-field/index.js +0 -1
- package/dist/components/custom-select-form-field/model.js +0 -1
- package/dist/components/custom-select-list/index.js +0 -1
- package/dist/components/custom-select-list/model.js +0 -1
- package/dist/components/custom-select-list-item/index.js +0 -1
- package/dist/components/divider/index.js +0 -1
- package/dist/components/drawer/index.js +0 -1
- package/dist/components/header/index.js +0 -1
- package/dist/components/header/model.js +0 -1
- package/dist/components/icon/index.js +0 -1
- package/dist/components/infotext/index.js +0 -1
- package/dist/components/infotext/model.js +0 -1
- package/dist/components/input/index.js +0 -1
- package/dist/components/link/index.js +0 -1
- package/dist/components/navigation/index.js +0 -1
- package/dist/components/navigation/model.js +0 -1
- package/dist/components/navigation-item/index.js +0 -1
- package/dist/components/navigation-item/model.js +0 -1
- package/dist/components/notification/index.js +0 -1
- package/dist/components/page/index.js +0 -1
- package/dist/components/popover/index.js +0 -1
- package/dist/components/popover/model.js +0 -1
- package/dist/components/radio/index.js +0 -1
- package/dist/components/radio/model.js +0 -1
- package/dist/components/section/index.js +0 -1
- package/dist/components/section/model.js +0 -1
- package/dist/components/select/index.js +0 -1
- package/dist/components/select/model.js +0 -1
- package/dist/components/stack/index.js +0 -1
- package/dist/components/switch/index.js +0 -1
- package/dist/components/switch/model.js +0 -1
- package/dist/components/tab-item/index.js +0 -1
- package/dist/components/tab-item/model.js +0 -1
- package/dist/components/tab-list/index.js +0 -1
- package/dist/components/tab-list/model.js +0 -1
- package/dist/components/tab-panel/index.js +0 -1
- package/dist/components/tab-panel/model.js +0 -1
- package/dist/components/tabs/index.js +0 -1
- package/dist/components/tag/index.js +0 -1
- package/dist/components/textarea/index.js +0 -1
- package/dist/components/tooltip/index.js +0 -1
- package/dist/shared/examples/index.js +0 -4
- package/dist/shared/figma.js +0 -1
- package/dist/shared/showcase/show-code-link.js +0 -51
|
@@ -1,83 +1,119 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
|
|
10
|
-
function
|
|
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
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
2
|
+
import { filterPassingProps as e, getRootProps as t } from "../../utils/react.js";
|
|
3
|
+
import { cls as n, delay as r, getBoolean as i, getBooleanAsString as a } from "../../utils/index.js";
|
|
4
|
+
import "../../shared/constants.js";
|
|
5
|
+
import o from "../button/button.js";
|
|
6
|
+
import { NavigationItemSafeTriangle as s } from "../../utils/navigation.js";
|
|
7
|
+
import { forwardRef as c, useEffect as l, useId as u, useRef as d, useState as f } from "react";
|
|
8
|
+
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/navigation-item/navigation-item.tsx
|
|
10
|
+
function g(c, g) {
|
|
11
|
+
let _ = u(), v = g || d(g), [y, b] = f(() => !1), [x, S] = f(() => !1), [C, w] = f(() => !0), [T, E] = f(() => !1), [D, O] = f(() => !1), [k, A] = f(() => void 0), [j, M] = f(() => void 0), [N, P] = f(() => void 0);
|
|
12
|
+
function F(e) {
|
|
13
|
+
e?.target?.nodeName === "A" && (O(!0), r(() => {
|
|
14
|
+
O(!1);
|
|
15
|
+
}, 1e3));
|
|
16
|
+
}
|
|
17
|
+
function I(e) {
|
|
18
|
+
c.onClick && (e.stopPropagation(), c.onClick(e)), x && E(!0);
|
|
19
|
+
}
|
|
20
|
+
function L(e) {
|
|
21
|
+
e.stopPropagation(), E(!1);
|
|
22
|
+
}
|
|
23
|
+
return l(() => {
|
|
24
|
+
b(!0);
|
|
25
|
+
let e = `sub-nav-${c.id ?? _}`;
|
|
26
|
+
M(e), P(`${e}-toggle`);
|
|
27
|
+
}, []), l(() => {
|
|
28
|
+
c.subNavigationExpanded !== void 0 && E(!!i(c.subNavigationExpanded, "subNavigationExpanded"));
|
|
29
|
+
}, [c.subNavigationExpanded]), l(() => {
|
|
30
|
+
if (y && v.current) {
|
|
31
|
+
let e = v.current.querySelector("menu");
|
|
32
|
+
e && (e.children?.length > 0 ? (S(!0), k || A(new s(v.current, e))) : w(!1));
|
|
33
|
+
}
|
|
34
|
+
}, [y, v.current]), /* @__PURE__ */ m("li", {
|
|
35
|
+
ref: v,
|
|
36
|
+
...e(c, [
|
|
37
|
+
"data-icon-variant",
|
|
38
|
+
"data-icon-variant-before",
|
|
39
|
+
"data-icon-variant-after",
|
|
40
|
+
"data-icon-weight",
|
|
41
|
+
"data-icon-weight-before",
|
|
42
|
+
"data-icon-weight-after",
|
|
43
|
+
"data-interactive",
|
|
44
|
+
"data-force-mobile",
|
|
45
|
+
"data-color",
|
|
46
|
+
"data-container-color",
|
|
47
|
+
"data-bg-color",
|
|
48
|
+
"data-on-bg-color",
|
|
49
|
+
"data-color-scheme",
|
|
50
|
+
"data-font-size",
|
|
51
|
+
"data-headline-size",
|
|
52
|
+
"data-divider",
|
|
53
|
+
"data-focus",
|
|
54
|
+
"data-font",
|
|
55
|
+
"data-density"
|
|
56
|
+
]),
|
|
57
|
+
id: c.id ?? c.propOverrides?.id,
|
|
58
|
+
onMouseOver: (e) => k?.enableFollow(),
|
|
59
|
+
onMouseLeave: (e) => k?.disableFollow(),
|
|
60
|
+
onMouseMove: (e) => k?.followByMouseEvent(e),
|
|
61
|
+
...t(c, [
|
|
62
|
+
"data-icon-variant",
|
|
63
|
+
"data-icon-variant-before",
|
|
64
|
+
"data-icon-variant-after",
|
|
65
|
+
"data-icon-weight",
|
|
66
|
+
"data-icon-weight-before",
|
|
67
|
+
"data-icon-weight-after",
|
|
68
|
+
"data-interactive",
|
|
69
|
+
"data-force-mobile",
|
|
70
|
+
"data-color",
|
|
71
|
+
"data-container-color",
|
|
72
|
+
"data-bg-color",
|
|
73
|
+
"data-on-bg-color",
|
|
74
|
+
"data-color-scheme",
|
|
75
|
+
"data-font-size",
|
|
76
|
+
"data-headline-size",
|
|
77
|
+
"data-divider",
|
|
78
|
+
"data-focus",
|
|
79
|
+
"data-font",
|
|
80
|
+
"data-density"
|
|
81
|
+
]),
|
|
82
|
+
className: n("db-navigation-item", c.className),
|
|
83
|
+
"data-width": c.width,
|
|
84
|
+
"data-icon": c.icon,
|
|
85
|
+
"data-show-icon": a(c.showIcon),
|
|
86
|
+
"data-active": c.active,
|
|
87
|
+
"data-wrap": a(c.wrap),
|
|
88
|
+
"aria-disabled": a(c.disabled),
|
|
89
|
+
children: !i(c.hideSubNavigation, "hideSubNavigation") && C ? /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m("button", {
|
|
90
|
+
className: "db-navigation-item-expand-button",
|
|
91
|
+
id: N,
|
|
92
|
+
"aria-haspopup": x ? "true" : void 0,
|
|
93
|
+
"aria-expanded": T,
|
|
94
|
+
"aria-controls": j,
|
|
95
|
+
disabled: i(c.disabled, "disabled"),
|
|
96
|
+
onClick: (e) => I(e),
|
|
97
|
+
children: c.text ? /* @__PURE__ */ m(p, { children: c.text }) : /* @__PURE__ */ m(p, { children: c.children })
|
|
98
|
+
}), /* @__PURE__ */ h("menu", {
|
|
99
|
+
className: "db-sub-navigation",
|
|
100
|
+
id: j,
|
|
101
|
+
"aria-labelledby": N,
|
|
102
|
+
"data-force-close": D,
|
|
103
|
+
onClick: (e) => F(e),
|
|
104
|
+
children: [x ? /* @__PURE__ */ m("div", {
|
|
105
|
+
className: "db-mobile-navigation-back",
|
|
106
|
+
children: /* @__PURE__ */ m(o, {
|
|
107
|
+
icon: "arrow_left",
|
|
108
|
+
variant: "ghost",
|
|
109
|
+
id: c.backButtonId,
|
|
110
|
+
onClick: (e) => L(e),
|
|
111
|
+
children: c.backButtonText ?? "Back"
|
|
112
|
+
})
|
|
113
|
+
}) : null, /* @__PURE__ */ m(p, { children: c.subNavigation })]
|
|
114
|
+
})] }) : c.text ? /* @__PURE__ */ m(p, { children: c.text }) : /* @__PURE__ */ m(p, { children: c.children })
|
|
115
|
+
});
|
|
81
116
|
}
|
|
82
|
-
|
|
83
|
-
|
|
117
|
+
var _ = c(g);
|
|
118
|
+
//#endregion
|
|
119
|
+
export { _ as default };
|
|
@@ -1,3 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
//#region src/components/notification/model.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"docked",
|
|
4
|
+
"standalone",
|
|
5
|
+
"overlay"
|
|
6
|
+
], t = ["block", "inline"], n = [
|
|
7
|
+
"assertive",
|
|
8
|
+
"polite",
|
|
9
|
+
"off"
|
|
10
|
+
];
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as NotificationAriaLiveList, t as NotificationLinkVariantList, e as NotificationVariantList };
|
|
@@ -1,34 +1,102 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
2
|
+
import { filterPassingProps as e, getRootProps as t } from "../../utils/react.js";
|
|
3
|
+
import { cls as n, getBoolean as r, getBooleanAsString as i, getNotificationRole as a, stringPropVisible as o } from "../../utils/index.js";
|
|
4
|
+
import "../../shared/constants.js";
|
|
5
|
+
import s from "../button/button.js";
|
|
6
|
+
import { forwardRef as c, useRef as l } from "react";
|
|
7
|
+
import { Fragment as u, jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/notification/notification.tsx
|
|
9
|
+
function p(c, p) {
|
|
10
|
+
let m = p || l(p);
|
|
11
|
+
function h(e) {
|
|
12
|
+
e && (e.stopPropagation(), c.onClose && c.onClose(e));
|
|
13
|
+
}
|
|
14
|
+
return /* @__PURE__ */ f("div", {
|
|
15
|
+
ref: m,
|
|
16
|
+
...e(c, [
|
|
17
|
+
"data-icon-variant",
|
|
18
|
+
"data-icon-variant-before",
|
|
19
|
+
"data-icon-variant-after",
|
|
20
|
+
"data-icon-weight",
|
|
21
|
+
"data-icon-weight-before",
|
|
22
|
+
"data-icon-weight-after",
|
|
23
|
+
"data-interactive",
|
|
24
|
+
"data-force-mobile",
|
|
25
|
+
"data-color",
|
|
26
|
+
"data-container-color",
|
|
27
|
+
"data-bg-color",
|
|
28
|
+
"data-on-bg-color",
|
|
29
|
+
"data-color-scheme",
|
|
30
|
+
"data-font-size",
|
|
31
|
+
"data-headline-size",
|
|
32
|
+
"data-divider",
|
|
33
|
+
"data-focus",
|
|
34
|
+
"data-font",
|
|
35
|
+
"data-density",
|
|
36
|
+
"onClose"
|
|
37
|
+
]),
|
|
38
|
+
id: c.id ?? c.propOverrides?.id,
|
|
39
|
+
...t(c, [
|
|
40
|
+
"data-icon-variant",
|
|
41
|
+
"data-icon-variant-before",
|
|
42
|
+
"data-icon-variant-after",
|
|
43
|
+
"data-icon-weight",
|
|
44
|
+
"data-icon-weight-before",
|
|
45
|
+
"data-icon-weight-after",
|
|
46
|
+
"data-interactive",
|
|
47
|
+
"data-force-mobile",
|
|
48
|
+
"data-color",
|
|
49
|
+
"data-container-color",
|
|
50
|
+
"data-bg-color",
|
|
51
|
+
"data-on-bg-color",
|
|
52
|
+
"data-color-scheme",
|
|
53
|
+
"data-font-size",
|
|
54
|
+
"data-headline-size",
|
|
55
|
+
"data-divider",
|
|
56
|
+
"data-focus",
|
|
57
|
+
"data-font",
|
|
58
|
+
"data-density"
|
|
59
|
+
]),
|
|
60
|
+
className: n("db-notification", c.className),
|
|
61
|
+
role: a({
|
|
62
|
+
semantic: c.semantic,
|
|
63
|
+
role: c.role,
|
|
64
|
+
ariaLive: c.ariaLive
|
|
65
|
+
}),
|
|
66
|
+
"aria-live": c.ariaLive,
|
|
67
|
+
"data-semantic": c.semantic,
|
|
68
|
+
"data-variant": c.variant,
|
|
69
|
+
"data-icon": r(c.showIcon) === !1 ? void 0 : c.icon,
|
|
70
|
+
"data-show-icon": i(c.showIcon),
|
|
71
|
+
"data-link-variant": c.linkVariant,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ d(u, { children: c.image }),
|
|
74
|
+
o(c.headline, c.showHeadline) ? /* @__PURE__ */ d("header", {
|
|
75
|
+
"data-area": "head",
|
|
76
|
+
children: c.headline
|
|
77
|
+
}) : null,
|
|
78
|
+
/* @__PURE__ */ f("div", {
|
|
79
|
+
"data-area": "content",
|
|
80
|
+
children: [c.text ? /* @__PURE__ */ d(u, { children: c.text }) : null, c.children]
|
|
81
|
+
}),
|
|
82
|
+
o(c.timestamp, c.showTimestamp) ? /* @__PURE__ */ d("time", {
|
|
83
|
+
"data-area": "timestamp",
|
|
84
|
+
dateTime: c.timestampDatetime,
|
|
85
|
+
children: c.timestamp
|
|
86
|
+
}) : null,
|
|
87
|
+
/* @__PURE__ */ d(u, { children: c.link }),
|
|
88
|
+
r(c.closeable, "closeable") ? /* @__PURE__ */ d(s, {
|
|
89
|
+
icon: "cross",
|
|
90
|
+
variant: "ghost",
|
|
91
|
+
size: "small",
|
|
92
|
+
id: c.closeButtonId,
|
|
93
|
+
noText: !0,
|
|
94
|
+
onClick: (e) => h(e),
|
|
95
|
+
children: c.closeButtonText ?? "Close"
|
|
96
|
+
}) : null
|
|
97
|
+
]
|
|
98
|
+
});
|
|
32
99
|
}
|
|
33
|
-
|
|
34
|
-
|
|
100
|
+
var m = c(p);
|
|
101
|
+
//#endregion
|
|
102
|
+
export { m as default };
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/components/page/model.ts
|
|
2
|
+
var e = ["auto", "fixed"], t = ["hidden", "auto"];
|
|
3
|
+
//#endregion
|
|
4
|
+
export { t as PageDocumentOverflowList, e as PageVariantList };
|
|
@@ -1,48 +1,76 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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
|
-
|
|
2
|
+
import { filterPassingProps as e, getRootProps as t } from "../../utils/react.js";
|
|
3
|
+
import { cls as n, getBooleanAsString as r } from "../../utils/index.js";
|
|
4
|
+
import { forwardRef as i, useEffect as a, useRef as o, useState as s } from "react";
|
|
5
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/page/page.tsx
|
|
7
|
+
function d(i, d) {
|
|
8
|
+
let f = d || o(d), [p, m] = s(() => !1), h = o(!1);
|
|
9
|
+
return h.current ||= (typeof window < "u" && document && (i.documentOverflow === "hidden" || i.variant === "fixed" && i.documentOverflow !== "auto") && document.documentElement.classList.add("db-page-document"), !0), a(() => {
|
|
10
|
+
m(!i.fadeIn), document && i.fadeIn ? document.fonts.ready.then(() => {
|
|
11
|
+
m(!0);
|
|
12
|
+
}) : m(!0);
|
|
13
|
+
}, []), a(() => () => {
|
|
14
|
+
typeof window < "u" && document.documentElement.classList.contains("db-page-document") && document.documentElement.classList.remove("db-page-document");
|
|
15
|
+
}, []), /* @__PURE__ */ u("div", {
|
|
16
|
+
ref: f,
|
|
17
|
+
...e(i, [
|
|
18
|
+
"data-icon-variant",
|
|
19
|
+
"data-icon-variant-before",
|
|
20
|
+
"data-icon-variant-after",
|
|
21
|
+
"data-icon-weight",
|
|
22
|
+
"data-icon-weight-before",
|
|
23
|
+
"data-icon-weight-after",
|
|
24
|
+
"data-interactive",
|
|
25
|
+
"data-force-mobile",
|
|
26
|
+
"data-color",
|
|
27
|
+
"data-container-color",
|
|
28
|
+
"data-bg-color",
|
|
29
|
+
"data-on-bg-color",
|
|
30
|
+
"data-color-scheme",
|
|
31
|
+
"data-font-size",
|
|
32
|
+
"data-headline-size",
|
|
33
|
+
"data-divider",
|
|
34
|
+
"data-focus",
|
|
35
|
+
"data-font",
|
|
36
|
+
"data-density"
|
|
37
|
+
]),
|
|
38
|
+
id: i.id ?? i.propOverrides?.id,
|
|
39
|
+
...t(i, [
|
|
40
|
+
"data-icon-variant",
|
|
41
|
+
"data-icon-variant-before",
|
|
42
|
+
"data-icon-variant-after",
|
|
43
|
+
"data-icon-weight",
|
|
44
|
+
"data-icon-weight-before",
|
|
45
|
+
"data-icon-weight-after",
|
|
46
|
+
"data-interactive",
|
|
47
|
+
"data-force-mobile",
|
|
48
|
+
"data-color",
|
|
49
|
+
"data-container-color",
|
|
50
|
+
"data-bg-color",
|
|
51
|
+
"data-on-bg-color",
|
|
52
|
+
"data-color-scheme",
|
|
53
|
+
"data-font-size",
|
|
54
|
+
"data-headline-size",
|
|
55
|
+
"data-divider",
|
|
56
|
+
"data-focus",
|
|
57
|
+
"data-font",
|
|
58
|
+
"data-density"
|
|
59
|
+
]),
|
|
60
|
+
className: n("db-page", i.className),
|
|
61
|
+
"data-variant": i.variant,
|
|
62
|
+
"data-fade-in": r(i.fadeIn),
|
|
63
|
+
"data-fonts-loaded": r(p),
|
|
64
|
+
children: [
|
|
65
|
+
/* @__PURE__ */ l(c, { children: i.header }),
|
|
66
|
+
/* @__PURE__ */ l("main", {
|
|
67
|
+
className: n("db-main", i.mainClass),
|
|
68
|
+
children: i.children
|
|
69
|
+
}),
|
|
70
|
+
/* @__PURE__ */ l(c, { children: i.footer })
|
|
71
|
+
]
|
|
72
|
+
});
|
|
46
73
|
}
|
|
47
|
-
|
|
48
|
-
|
|
74
|
+
var f = i(d);
|
|
75
|
+
//#endregion
|
|
76
|
+
export { f as default };
|