@db-ux/react-core-components 4.9.1 → 4.10.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/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,15 +1,61 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
import { filterPassingProps as e, getRootProps as t } from "../../utils/react.js";
|
|
3
|
+
import { cls as n } from "../../utils/index.js";
|
|
4
|
+
import { forwardRef as r, useEffect as i, useRef as a } from "react";
|
|
5
|
+
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/tab-panel/tab-panel.tsx
|
|
7
|
+
function l(r, l) {
|
|
8
|
+
let u = l || a(l);
|
|
9
|
+
return i(() => {}, []), /* @__PURE__ */ c("section", {
|
|
10
|
+
role: "tabpanel",
|
|
11
|
+
ref: u,
|
|
12
|
+
...e(r, [
|
|
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
|
+
...t(r, [
|
|
34
|
+
"data-icon-variant",
|
|
35
|
+
"data-icon-variant-before",
|
|
36
|
+
"data-icon-variant-after",
|
|
37
|
+
"data-icon-weight",
|
|
38
|
+
"data-icon-weight-before",
|
|
39
|
+
"data-icon-weight-after",
|
|
40
|
+
"data-interactive",
|
|
41
|
+
"data-force-mobile",
|
|
42
|
+
"data-color",
|
|
43
|
+
"data-container-color",
|
|
44
|
+
"data-bg-color",
|
|
45
|
+
"data-on-bg-color",
|
|
46
|
+
"data-color-scheme",
|
|
47
|
+
"data-font-size",
|
|
48
|
+
"data-headline-size",
|
|
49
|
+
"data-divider",
|
|
50
|
+
"data-focus",
|
|
51
|
+
"data-font",
|
|
52
|
+
"data-density"
|
|
53
|
+
]),
|
|
54
|
+
className: n("db-tab-panel", r.className),
|
|
55
|
+
id: r.id ?? r.propOverrides?.id,
|
|
56
|
+
children: [r.content ? /* @__PURE__ */ s(o, { children: r.content }) : null, r.children]
|
|
57
|
+
});
|
|
13
58
|
}
|
|
14
|
-
|
|
15
|
-
|
|
59
|
+
var u = r(l);
|
|
60
|
+
//#endregion
|
|
61
|
+
export { u as default };
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/components/tabs/model.ts
|
|
2
|
+
var e = ["scrollbar", "arrows"], t = ["auto", "manually"];
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as TabsBehaviorList, t as TabsInitialSelectedModeList };
|
|
@@ -1,180 +1,193 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
function
|
|
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
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
2
|
+
import { filterPassingProps as e, getRootProps as t } from "../../utils/react.js";
|
|
3
|
+
import { cls as n } from "../../utils/index.js";
|
|
4
|
+
import r from "../button/button.js";
|
|
5
|
+
import i from "../tab-item/tab-item.js";
|
|
6
|
+
import a from "../tab-list/tab-list.js";
|
|
7
|
+
import o from "../tab-panel/tab-panel.js";
|
|
8
|
+
import { forwardRef as s, useEffect as c, useId as l, useRef as u, useState as d } from "react";
|
|
9
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
|
+
//#region src/components/tabs/tabs.tsx
|
|
11
|
+
function h(s, h) {
|
|
12
|
+
let g = l(), _ = h || u(h), [v, y] = d(() => ""), [b, x] = d(() => !1), [S, C] = d(() => !1), [w, T] = d(() => !1), [E, D] = d(() => null), [O, k] = d(() => void 0);
|
|
13
|
+
function A() {
|
|
14
|
+
try {
|
|
15
|
+
return typeof s.tabs == "string" ? JSON.parse(s.tabs) : s.tabs;
|
|
16
|
+
} catch (e) {
|
|
17
|
+
console.error(e);
|
|
18
|
+
}
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
function j(e) {
|
|
22
|
+
let t = e.scrollWidth > e.clientWidth;
|
|
23
|
+
C(t && e.scrollLeft > 1), T(t && e.scrollLeft < e.scrollWidth - e.clientWidth);
|
|
24
|
+
}
|
|
25
|
+
function M(e) {
|
|
26
|
+
let t = Number(s.arrowScrollDistance) || 100;
|
|
27
|
+
e && (t *= -1), E?.scrollBy({
|
|
28
|
+
top: 0,
|
|
29
|
+
left: t,
|
|
30
|
+
behavior: "smooth"
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function N() {
|
|
34
|
+
if (_.current) {
|
|
35
|
+
let e = _.current.querySelector(".db-tab-list");
|
|
36
|
+
if (e) {
|
|
37
|
+
let t = e.querySelector("[role=\"tablist\"]");
|
|
38
|
+
if (t && (t.setAttribute("aria-orientation", s.orientation || "horizontal"), s.behavior === "arrows" && (D(t), j(t), t.addEventListener("scroll", () => {
|
|
39
|
+
j(t);
|
|
40
|
+
}), !O))) {
|
|
41
|
+
let e = new ResizeObserver(() => {
|
|
42
|
+
j(t);
|
|
43
|
+
});
|
|
44
|
+
e.observe(t), k(e);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function P(e) {
|
|
50
|
+
if (_.current) {
|
|
51
|
+
let t = Array.from(_.current.getElementsByClassName("db-tab-item")), n = Array.from(_.current.querySelectorAll(":is(:scope > .db-tab-panel, :scope > db-tab-panel > .db-tab-panel)"));
|
|
52
|
+
for (let r of t) {
|
|
53
|
+
let i = t.indexOf(r), a = r.querySelector("label"), o = r.querySelector("input");
|
|
54
|
+
if (o && a) {
|
|
55
|
+
if (!o.id) {
|
|
56
|
+
let e = `${v}-tab-${i}`;
|
|
57
|
+
a.setAttribute("for", e), o.id = e, o.setAttribute("name", v), n.length > i && o.setAttribute("aria-controls", `${v}-tab-panel-${i}`);
|
|
58
|
+
}
|
|
59
|
+
if (e) {
|
|
60
|
+
let e = !s.initialSelectedMode || s.initialSelectedMode === "auto", t = s.initialSelectedIndex == null && i === 0 || Number(s.initialSelectedIndex) === i;
|
|
61
|
+
e && t && o.click();
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
for (let e of n) {
|
|
66
|
+
if (e.id) continue;
|
|
67
|
+
let t = n.indexOf(e);
|
|
68
|
+
e.id = `${v}-tab-panel-${t}`, e.setAttribute("aria-labelledby", `${v}-tab-${t}`);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
function F(e) {
|
|
73
|
+
if (e.stopPropagation(), e.target) {
|
|
74
|
+
let t = e.target.parentElement;
|
|
75
|
+
if (t && t.parentElement && t.parentElement?.nodeName === "LI") {
|
|
76
|
+
let n = t.parentElement;
|
|
77
|
+
if (n) {
|
|
78
|
+
let t = n.parentElement;
|
|
79
|
+
if (t) {
|
|
80
|
+
let r = Array.from(t.children).indexOf(n);
|
|
81
|
+
s.onIndexChange && s.onIndexChange(r), s.onTabSelect && s.onTabSelect(e);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return c(() => {
|
|
88
|
+
y(`tabs-${s.name || g}`), x(!0);
|
|
89
|
+
}, []), c(() => {
|
|
90
|
+
if (_.current && b) {
|
|
91
|
+
N(), P(!0);
|
|
92
|
+
let e = _.current.querySelector(".db-tab-list");
|
|
93
|
+
e && new MutationObserver((e) => {
|
|
94
|
+
e.forEach((e) => {
|
|
95
|
+
(e.removedNodes.length || e.addedNodes.length) && (N(), P());
|
|
96
|
+
});
|
|
97
|
+
}).observe(e, {
|
|
98
|
+
childList: !0,
|
|
99
|
+
subtree: !0
|
|
100
|
+
}), x(!1);
|
|
101
|
+
}
|
|
102
|
+
}, [_.current, b]), c(() => () => {
|
|
103
|
+
O?.disconnect(), k(void 0);
|
|
104
|
+
}, []), /* @__PURE__ */ m("div", {
|
|
105
|
+
ref: _,
|
|
106
|
+
...e(s, [
|
|
107
|
+
"data-icon-variant",
|
|
108
|
+
"data-icon-variant-before",
|
|
109
|
+
"data-icon-variant-after",
|
|
110
|
+
"data-icon-weight",
|
|
111
|
+
"data-icon-weight-before",
|
|
112
|
+
"data-icon-weight-after",
|
|
113
|
+
"data-interactive",
|
|
114
|
+
"data-force-mobile",
|
|
115
|
+
"data-color",
|
|
116
|
+
"data-container-color",
|
|
117
|
+
"data-bg-color",
|
|
118
|
+
"data-on-bg-color",
|
|
119
|
+
"data-color-scheme",
|
|
120
|
+
"data-font-size",
|
|
121
|
+
"data-headline-size",
|
|
122
|
+
"data-divider",
|
|
123
|
+
"data-focus",
|
|
124
|
+
"data-font",
|
|
125
|
+
"data-density",
|
|
126
|
+
"onTabSelect",
|
|
127
|
+
"onIndexChange"
|
|
128
|
+
]),
|
|
129
|
+
id: s.id ?? s.propOverrides?.id,
|
|
130
|
+
...t(s, [
|
|
131
|
+
"data-icon-variant",
|
|
132
|
+
"data-icon-variant-before",
|
|
133
|
+
"data-icon-variant-after",
|
|
134
|
+
"data-icon-weight",
|
|
135
|
+
"data-icon-weight-before",
|
|
136
|
+
"data-icon-weight-after",
|
|
137
|
+
"data-interactive",
|
|
138
|
+
"data-force-mobile",
|
|
139
|
+
"data-color",
|
|
140
|
+
"data-container-color",
|
|
141
|
+
"data-bg-color",
|
|
142
|
+
"data-on-bg-color",
|
|
143
|
+
"data-color-scheme",
|
|
144
|
+
"data-font-size",
|
|
145
|
+
"data-headline-size",
|
|
146
|
+
"data-divider",
|
|
147
|
+
"data-focus",
|
|
148
|
+
"data-font",
|
|
149
|
+
"data-density"
|
|
150
|
+
]),
|
|
151
|
+
className: n("db-tabs", s.className),
|
|
152
|
+
"data-orientation": s.orientation,
|
|
153
|
+
"data-scroll-behavior": s.behavior,
|
|
154
|
+
"data-alignment": s.alignment ?? "start",
|
|
155
|
+
"data-width": s.width ?? "auto",
|
|
156
|
+
onInput: (e) => F(e),
|
|
157
|
+
onChange: (e) => F(e),
|
|
158
|
+
children: [
|
|
159
|
+
S ? /* @__PURE__ */ p(r, {
|
|
160
|
+
className: "tabs-scroll-left",
|
|
161
|
+
variant: "ghost",
|
|
162
|
+
icon: "chevron_left",
|
|
163
|
+
type: "button",
|
|
164
|
+
noText: !0,
|
|
165
|
+
onClick: (e) => M(!0),
|
|
166
|
+
children: "Scroll left"
|
|
167
|
+
}) : null,
|
|
168
|
+
s.tabs ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(a, { children: A()?.map((e, t) => /* @__PURE__ */ p(i, {
|
|
169
|
+
active: e.active,
|
|
170
|
+
label: e.label,
|
|
171
|
+
iconTrailing: e.iconTrailing,
|
|
172
|
+
icon: e.icon,
|
|
173
|
+
noText: e.noText
|
|
174
|
+
}, s.name + "tab-item" + t)) }), A()?.map((e, t) => /* @__PURE__ */ p(o, {
|
|
175
|
+
content: e.content,
|
|
176
|
+
children: e.children
|
|
177
|
+
}, s.name + "tab-panel" + t))] }) : null,
|
|
178
|
+
w ? /* @__PURE__ */ p(r, {
|
|
179
|
+
className: "tabs-scroll-right",
|
|
180
|
+
variant: "ghost",
|
|
181
|
+
icon: "chevron_right",
|
|
182
|
+
type: "button",
|
|
183
|
+
noText: !0,
|
|
184
|
+
onClick: (e) => M(),
|
|
185
|
+
children: "Scroll right"
|
|
186
|
+
}) : null,
|
|
187
|
+
s.children
|
|
188
|
+
]
|
|
189
|
+
});
|
|
178
190
|
}
|
|
179
|
-
|
|
180
|
-
|
|
191
|
+
var g = s(h);
|
|
192
|
+
//#endregion
|
|
193
|
+
export { g as default };
|
|
@@ -1,34 +1,93 @@
|
|
|
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, getBooleanAsString as r } from "../../utils/index.js";
|
|
4
|
+
import { DEFAULT_REMOVE as i } from "../../shared/constants.js";
|
|
5
|
+
import a from "../tooltip/tooltip.js";
|
|
6
|
+
import { forwardRef as o, useRef as s } from "react";
|
|
7
|
+
import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
//#region src/components/tag/tag.tsx
|
|
9
|
+
function d(o, d) {
|
|
10
|
+
let f = d || s(d);
|
|
11
|
+
function p(e) {
|
|
12
|
+
e && (e.stopPropagation(), o.onRemove && o.onRemove(e));
|
|
13
|
+
}
|
|
14
|
+
function m() {
|
|
15
|
+
return o.removeButton ? o.removeButton : i;
|
|
16
|
+
}
|
|
17
|
+
return /* @__PURE__ */ u("div", {
|
|
18
|
+
ref: f,
|
|
19
|
+
...e(o, [
|
|
20
|
+
"data-icon-variant",
|
|
21
|
+
"data-icon-variant-before",
|
|
22
|
+
"data-icon-variant-after",
|
|
23
|
+
"data-icon-weight",
|
|
24
|
+
"data-icon-weight-before",
|
|
25
|
+
"data-icon-weight-after",
|
|
26
|
+
"data-interactive",
|
|
27
|
+
"data-force-mobile",
|
|
28
|
+
"data-color",
|
|
29
|
+
"data-container-color",
|
|
30
|
+
"data-bg-color",
|
|
31
|
+
"data-on-bg-color",
|
|
32
|
+
"data-color-scheme",
|
|
33
|
+
"data-font-size",
|
|
34
|
+
"data-headline-size",
|
|
35
|
+
"data-divider",
|
|
36
|
+
"data-focus",
|
|
37
|
+
"data-font",
|
|
38
|
+
"data-density",
|
|
39
|
+
"onRemove"
|
|
40
|
+
]),
|
|
41
|
+
id: o.id ?? o.propOverrides?.id,
|
|
42
|
+
...t(o, [
|
|
43
|
+
"data-icon-variant",
|
|
44
|
+
"data-icon-variant-before",
|
|
45
|
+
"data-icon-variant-after",
|
|
46
|
+
"data-icon-weight",
|
|
47
|
+
"data-icon-weight-before",
|
|
48
|
+
"data-icon-weight-after",
|
|
49
|
+
"data-interactive",
|
|
50
|
+
"data-force-mobile",
|
|
51
|
+
"data-color",
|
|
52
|
+
"data-container-color",
|
|
53
|
+
"data-bg-color",
|
|
54
|
+
"data-on-bg-color",
|
|
55
|
+
"data-color-scheme",
|
|
56
|
+
"data-font-size",
|
|
57
|
+
"data-headline-size",
|
|
58
|
+
"data-divider",
|
|
59
|
+
"data-focus",
|
|
60
|
+
"data-font",
|
|
61
|
+
"data-density"
|
|
62
|
+
]),
|
|
63
|
+
className: n("db-tag", o.className),
|
|
64
|
+
"data-semantic": o.semantic,
|
|
65
|
+
"data-emphasis": o.emphasis,
|
|
66
|
+
"data-icon": o.icon,
|
|
67
|
+
"data-show-check-state": r(o.showCheckState ?? !0),
|
|
68
|
+
"data-show-icon": r(o.showIcon),
|
|
69
|
+
"data-no-text": r(o.noText),
|
|
70
|
+
"data-overflow": r(o.overflow),
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ l(c, { children: o.content }),
|
|
73
|
+
o.text ? /* @__PURE__ */ l(c, { children: o.text }) : null,
|
|
74
|
+
o.children,
|
|
75
|
+
o.behavior === "removable" ? /* @__PURE__ */ l("button", {
|
|
76
|
+
className: "db-button db-tab-remove-button",
|
|
77
|
+
"data-icon": "cross",
|
|
78
|
+
"data-size": "small",
|
|
79
|
+
"data-no-text": "true",
|
|
80
|
+
"data-variant": "ghost",
|
|
81
|
+
type: "button",
|
|
82
|
+
onClick: (e) => p(e),
|
|
83
|
+
children: /* @__PURE__ */ l(a, {
|
|
84
|
+
variant: "label",
|
|
85
|
+
children: m()
|
|
86
|
+
})
|
|
87
|
+
}) : null
|
|
88
|
+
]
|
|
89
|
+
});
|
|
32
90
|
}
|
|
33
|
-
|
|
34
|
-
|
|
91
|
+
var f = o(d);
|
|
92
|
+
//#endregion
|
|
93
|
+
export { f as default };
|
|
@@ -1,2 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
//#region src/components/textarea/model.ts
|
|
2
|
+
var e = [
|
|
3
|
+
"none",
|
|
4
|
+
"both",
|
|
5
|
+
"horizontal",
|
|
6
|
+
"vertical"
|
|
7
|
+
], t = [
|
|
8
|
+
"hard",
|
|
9
|
+
"soft",
|
|
10
|
+
"off"
|
|
11
|
+
];
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as TextareaResizeList, t as TextareaWrapList };
|