@tedi-design-system/react 19.1.0-rc.5 → 19.1.0-rc.7
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/bundle-stats.html +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.cjs.js +1 -1
- package/external/hoist-non-react-statics/external/react-is/index.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.development.es.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.cjs.js +1 -1
- package/external/prop-types/external/react-is/cjs/react-is.production.min.es.js +1 -1
- package/external/prop-types/external/react-is/index.cjs.js +1 -1
- package/external/prop-types/external/react-is/index.es.js +1 -1
- package/index.css +1 -1
- package/package.json +2 -2
- package/src/tedi/components/content/card/card.module.scss.cjs.js +1 -1
- package/src/tedi/components/content/card/card.module.scss.es.js +3 -2
- package/src/tedi/components/misc/affix/affix.cjs.js +1 -1
- package/src/tedi/components/misc/affix/affix.es.js +20 -8
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.d.ts +9 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.es.js +78 -39
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-item/table-of-contents-item.d.ts +6 -0
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-row/table-of-contents-row.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-row/table-of-contents-row.es.js +23 -28
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.d.ts +32 -21
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.es.js +58 -55
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.es.js +4 -1
|
@@ -1,70 +1,73 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { useMemo as
|
|
4
|
-
import { Affix as
|
|
5
|
-
import { TableOfContentsCollapsible as
|
|
6
|
-
import { TableOfContentsItem as
|
|
7
|
-
import { TableOfContentsList as
|
|
8
|
-
import
|
|
9
|
-
import { useLabels as
|
|
1
|
+
import { jsx as o, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import N from "../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { useMemo as p, createContext as E, Children as k, isValidElement as P } from "react";
|
|
4
|
+
import { Affix as S } from "../../misc/affix/affix.es.js";
|
|
5
|
+
import { TableOfContentsCollapsible as V } from "./components/table-of-contents-collapsible/table-of-contents-collapsible.es.js";
|
|
6
|
+
import { TableOfContentsItem as O } from "./components/table-of-contents-item/table-of-contents-item.es.js";
|
|
7
|
+
import { TableOfContentsList as j } from "./components/table-of-contents-list/table-of-contents-list.es.js";
|
|
8
|
+
import m from "./table-of-contents.module.scss.es.js";
|
|
9
|
+
import { useLabels as F } from "../../../providers/label-provider/use-labels.es.js";
|
|
10
|
+
import { useBreakpointProps as H } from "../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
10
11
|
import { Card as M } from "../../content/card/card.es.js";
|
|
11
|
-
import { CardContent as
|
|
12
|
-
const
|
|
12
|
+
import { CardContent as q } from "../../content/card/card-content/card-content.es.js";
|
|
13
|
+
const z = E({
|
|
13
14
|
activeTrail: /* @__PURE__ */ new Set()
|
|
14
|
-
}),
|
|
15
|
-
const { id:
|
|
15
|
+
}), u = (e) => P(e) && e.type === O, x = (e) => k.toArray(e).filter(u).map((a) => {
|
|
16
|
+
const { id: i, separator: s, slot: l, children: r } = a.props, t = k.toArray(r), n = t.filter(u), c = t.filter((d) => !u(d));
|
|
16
17
|
return {
|
|
17
|
-
id:
|
|
18
|
-
separator:
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
id: i,
|
|
19
|
+
separator: s,
|
|
20
|
+
slot: l,
|
|
21
|
+
content: /* @__PURE__ */ o(B, { children: c }),
|
|
22
|
+
children: n.length ? x(r) : void 0
|
|
21
23
|
};
|
|
22
|
-
}),
|
|
23
|
-
const
|
|
24
|
-
if (!
|
|
25
|
-
const
|
|
26
|
-
for (const t of
|
|
27
|
-
const
|
|
28
|
-
if (t.id ===
|
|
29
|
-
return
|
|
24
|
+
}), D = (e, a) => {
|
|
25
|
+
const i = /* @__PURE__ */ new Set();
|
|
26
|
+
if (!a) return i;
|
|
27
|
+
const s = (l, r) => {
|
|
28
|
+
for (const t of l) {
|
|
29
|
+
const n = t.id ? [...r, t.id] : r;
|
|
30
|
+
if (t.id === a || t.children && s(t.children, n))
|
|
31
|
+
return n.forEach((c) => i.add(c)), !0;
|
|
30
32
|
}
|
|
31
33
|
return !1;
|
|
32
34
|
};
|
|
33
|
-
return
|
|
35
|
+
return s(e, []), i;
|
|
34
36
|
};
|
|
35
|
-
function
|
|
36
|
-
const { getLabel:
|
|
37
|
-
children:
|
|
38
|
-
heading:
|
|
39
|
-
headingLevel:
|
|
40
|
-
ariaLabel:
|
|
41
|
-
activeId:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
function b(e) {
|
|
38
|
+
const { getLabel: a } = F(), { getCurrentBreakpointProps: i } = H(e.defaultServerBreakpoint), {
|
|
39
|
+
children: s,
|
|
40
|
+
heading: l,
|
|
41
|
+
headingLevel: r = "h3",
|
|
42
|
+
ariaLabel: t,
|
|
43
|
+
activeId: n,
|
|
44
|
+
defaultOpen: c = !0,
|
|
45
|
+
numbered: d = !1,
|
|
46
|
+
sticky: h = !0,
|
|
47
|
+
variant: C = "default",
|
|
48
|
+
bordered: A = !1,
|
|
49
|
+
className: L
|
|
50
|
+
} = i(e), I = l === void 0 ? a("table-of-contents.title") : l, f = p(() => x(s), [s]), v = p(() => D(f, n), [f, n]), w = p(
|
|
51
|
+
() => ({ activeId: n, numbered: d, headingLevel: r, ariaLabel: t, activeTrail: v, defaultOpen: c }),
|
|
52
|
+
[n, d, r, t, v, c]
|
|
53
|
+
), T = /* @__PURE__ */ o(
|
|
51
54
|
"div",
|
|
52
55
|
{
|
|
53
|
-
className:
|
|
54
|
-
[
|
|
56
|
+
className: N(m["tedi-table-of-contents"], {
|
|
57
|
+
[m["tedi-table-of-contents--transparent"]]: C === "transparent",
|
|
58
|
+
[m["tedi-table-of-contents--bordered"]]: A
|
|
55
59
|
}),
|
|
56
|
-
|
|
57
|
-
children: /* @__PURE__ */ r(F, { nodes: d, heading: L })
|
|
60
|
+
children: /* @__PURE__ */ o(j, { nodes: f, heading: I })
|
|
58
61
|
}
|
|
59
|
-
),
|
|
60
|
-
return /* @__PURE__ */
|
|
62
|
+
), g = N({ [m["tedi-table-of-contents--sticky"]]: h }, L), y = C === "transparent" ? /* @__PURE__ */ o("div", { className: g, children: T }) : /* @__PURE__ */ o(M, { className: g, children: /* @__PURE__ */ o(q, { padding: 0, children: T }) });
|
|
63
|
+
return /* @__PURE__ */ o(z.Provider, { value: w, children: h ? /* @__PURE__ */ o(S, { position: "sticky", top: 1.5, bottom: 1.5, children: y }) : y });
|
|
61
64
|
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
b.displayName = "TableOfContents";
|
|
66
|
+
b.Item = O;
|
|
67
|
+
b.Collapsible = V;
|
|
65
68
|
export {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
69
|
+
b as TableOfContents,
|
|
70
|
+
z as TableOfContentsContext,
|
|
71
|
+
D as buildActiveTrail,
|
|
72
|
+
x as childrenToNodes
|
|
70
73
|
};
|
package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-table-of-contents":"tedi-table-of-contents-ce55e86d","tedi-table-of-contents--transparent":"tedi-table-of-contents--transparent-067ea2c2","tedi-table-of-contents__list":"tedi-table-of-contents__list-94025876","tedi-table-of-contents--sticky":"tedi-table-of-contents--sticky-1ee87047","tedi-table-of-contents__heading":"tedi-table-of-contents__heading-c6b7a6df","tedi-table-of-contents__group":"tedi-table-of-contents__group-590e4963","tedi-table-of-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-table-of-contents":"tedi-table-of-contents-ce55e86d","tedi-table-of-contents--bordered":"tedi-table-of-contents--bordered-90b16d0b","tedi-table-of-contents--transparent":"tedi-table-of-contents--transparent-067ea2c2","tedi-table-of-contents__list":"tedi-table-of-contents__list-94025876","tedi-table-of-contents--sticky":"tedi-table-of-contents--sticky-1ee87047","tedi-table-of-contents__heading":"tedi-table-of-contents__heading-c6b7a6df","tedi-table-of-contents__group":"tedi-table-of-contents__group-590e4963","tedi-table-of-contents__item":"tedi-table-of-contents__item-29f072b5","tedi-table-of-contents__row":"tedi-table-of-contents__row-fb686650","tedi-table-of-contents__row--level-2":"tedi-table-of-contents__row--level-2-4fec675b","tedi-table-of-contents__number":"tedi-table-of-contents__number-693b03b7","tedi-table-of-contents__content":"tedi-table-of-contents__content-8a05ad59","tedi-table-of-contents__slot":"tedi-table-of-contents__slot-53aefc57","tedi-table-of-contents__item--selected":"tedi-table-of-contents__item--selected-632958d1","tedi-table-of-contents__separator":"tedi-table-of-contents__separator-b824eeee","tedi-table-of-contents__bar":"tedi-table-of-contents__bar-f4daef0b","tedi-table-of-contents__bar--static":"tedi-table-of-contents__bar--static-f919cf73","tedi-table-of-contents__bar--hidden":"tedi-table-of-contents__bar--hidden-53dd04a2","tedi-table-of-contents__bar-title":"tedi-table-of-contents__bar-title-b82ab4ed","tedi-table-of-contents__sheet":"tedi-table-of-contents__sheet-16e41b54","tedi-table-of-contents__sheet-header":"tedi-table-of-contents__sheet-header-ec904c54"};exports.default=t;
|
package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.es.js
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
const t = {
|
|
2
2
|
"tedi-table-of-contents": "tedi-table-of-contents-ce55e86d",
|
|
3
|
+
"tedi-table-of-contents--bordered": "tedi-table-of-contents--bordered-90b16d0b",
|
|
3
4
|
"tedi-table-of-contents--transparent": "tedi-table-of-contents--transparent-067ea2c2",
|
|
4
5
|
"tedi-table-of-contents__list": "tedi-table-of-contents__list-94025876",
|
|
5
6
|
"tedi-table-of-contents--sticky": "tedi-table-of-contents--sticky-1ee87047",
|
|
6
7
|
"tedi-table-of-contents__heading": "tedi-table-of-contents__heading-c6b7a6df",
|
|
7
8
|
"tedi-table-of-contents__group": "tedi-table-of-contents__group-590e4963",
|
|
8
|
-
"tedi-table-of-contents__list--headless": "tedi-table-of-contents__list--headless-99c1bab5",
|
|
9
9
|
"tedi-table-of-contents__item": "tedi-table-of-contents__item-29f072b5",
|
|
10
10
|
"tedi-table-of-contents__row": "tedi-table-of-contents__row-fb686650",
|
|
11
11
|
"tedi-table-of-contents__row--level-2": "tedi-table-of-contents__row--level-2-4fec675b",
|
|
12
12
|
"tedi-table-of-contents__number": "tedi-table-of-contents__number-693b03b7",
|
|
13
13
|
"tedi-table-of-contents__content": "tedi-table-of-contents__content-8a05ad59",
|
|
14
|
+
"tedi-table-of-contents__slot": "tedi-table-of-contents__slot-53aefc57",
|
|
14
15
|
"tedi-table-of-contents__item--selected": "tedi-table-of-contents__item--selected-632958d1",
|
|
16
|
+
"tedi-table-of-contents__separator": "tedi-table-of-contents__separator-b824eeee",
|
|
15
17
|
"tedi-table-of-contents__bar": "tedi-table-of-contents__bar-f4daef0b",
|
|
16
18
|
"tedi-table-of-contents__bar--static": "tedi-table-of-contents__bar--static-f919cf73",
|
|
19
|
+
"tedi-table-of-contents__bar--hidden": "tedi-table-of-contents__bar--hidden-53dd04a2",
|
|
17
20
|
"tedi-table-of-contents__bar-title": "tedi-table-of-contents__bar-title-b82ab4ed",
|
|
18
21
|
"tedi-table-of-contents__sheet": "tedi-table-of-contents__sheet-16e41b54",
|
|
19
22
|
"tedi-table-of-contents__sheet-header": "tedi-table-of-contents__sheet-header-ec904c54"
|