@tedi-design-system/react 19.0.0-rc.1 → 19.0.0-rc.3
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 +1 -1
- package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.d.ts +23 -0
- package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.es.js +12 -0
- package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.d.ts +34 -0
- package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.es.js +63 -0
- package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.d.ts +24 -0
- package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.es.js +8 -0
- package/src/tedi/components/misc/timeline/index.d.ts +4 -0
- package/src/tedi/components/misc/timeline/timeline.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/timeline.d.ts +48 -0
- package/src/tedi/components/misc/timeline/timeline.es.js +38 -0
- package/src/tedi/components/misc/timeline/timeline.module.scss.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/timeline.module.scss.es.js +18 -0
- 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 +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.es.js +33 -33
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-item/table-of-contents-item.d.ts +0 -10
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-list/table-of-contents-list.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-list/table-of-contents-list.es.js +27 -18
- 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 +21 -35
- 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 +17 -10
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.es.js +51 -52
- 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 +0 -1
- package/src/tedi/index.d.ts +1 -0
- package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
- package/src/tedi/providers/label-provider/labels-map.d.ts +0 -21
- package/src/tedi/providers/label-provider/labels-map.es.js +2 -23
- package/tedi.cjs.js +1 -1
- package/tedi.es.js +88 -80
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("../../../../../../../external/classnames/index.cjs.js"),l=require("../../timeline.module.scss.cjs.js"),i=({children:t,color:e="tertiary",className:n})=>r.jsx("div",{className:s.default(l.default["tedi-timeline-description"],{[`tedi-text--${e}`]:e!=="inherit"},n),children:t});i.displayName="TimelineDescription";exports.TimelineDescription=i;
|
package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TextColor } from '../../../../base/typography/text/text';
|
|
3
|
+
export interface TimelineDescriptionProps {
|
|
4
|
+
/**
|
|
5
|
+
* Description content, shown below the title in a muted style.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Text color, using the shared typography colors. Defaults to `tertiary`.
|
|
10
|
+
* Pass `'inherit'` to inherit the surrounding color instead.
|
|
11
|
+
* @default tertiary
|
|
12
|
+
*/
|
|
13
|
+
color?: TextColor | 'inherit';
|
|
14
|
+
/**
|
|
15
|
+
* Additional class name.
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const TimelineDescription: {
|
|
20
|
+
({ children, color, className, }: TimelineDescriptionProps): JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export default TimelineDescription;
|
package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.es.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import m from "../../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import r from "../../timeline.module.scss.es.js";
|
|
4
|
+
const o = ({
|
|
5
|
+
children: e,
|
|
6
|
+
color: i = "tertiary",
|
|
7
|
+
className: t
|
|
8
|
+
}) => /* @__PURE__ */ s("div", { className: m(r["tedi-timeline-description"], { [`tedi-text--${i}`]: i !== "inherit" }, t), children: e });
|
|
9
|
+
o.displayName = "TimelineDescription";
|
|
10
|
+
export {
|
|
11
|
+
o as TimelineDescription
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),u=require("../../../../../../../external/classnames/index.cjs.js"),f=require("react"),p=require("../../../../../helpers/hooks/use-breakpoint.cjs.js"),_=require("../../../separator/separator.cjs.js"),t=require("../../timeline.module.scss.cjs.js"),x=require("../timeline-description/timeline-description.cjs.js"),T=require("../timeline-title/timeline-title.cjs.js"),j=({children:y,timings:h=[],timingsBottom:l,state:n="future",isLast:v=!1})=>{const N=p.default(),s=p.isBreakpointBelow(N,"lg"),o=f.Children.toArray(y),r=(e,a)=>f.isValidElement(e)&&e.type===a,q=o.find(e=>r(e,T.TimelineTitle)),b=o.find(e=>r(e,x.TimelineDescription)),d=o.filter(e=>!r(e,T.TimelineTitle)&&!r(e,x.TimelineDescription)),g=n==="future"?"secondary":"accent",S=n==="past"?"accent":"secondary",c=l!=null&&typeof l!="boolean",m=c&&i.jsx("div",{className:t.default["tedi-timeline__timings-bottom"],children:l});return i.jsxs("div",{className:u.default(t.default["tedi-timeline-item"],{[t.default["tedi-timeline__item--has-bottom"]]:s&&c}),children:[i.jsxs("div",{className:t.default["tedi-timeline__timings"],children:[h.map((e,a)=>i.jsx("span",{className:t.default["tedi-timeline__time"],children:e},`${e}-${a}`)),!s&&m]}),i.jsxs("div",{className:u.default(t.default["tedi-timeline__marker"],{[t.default["tedi-timeline__marker--large"]]:n==="current"}),children:[i.jsx(_.Separator,{variant:"dot-only",color:g,dotSize:n==="current"?"large":"medium",dotStyle:n==="future"?"outlined":"filled"}),!v&&i.jsx(_.Separator,{axis:"vertical",color:S})]}),i.jsxs("div",{className:t.default["tedi-timeline__info"],children:[i.jsxs("div",{children:[q,b]}),d.length>0&&i.jsx("div",{className:t.default["tedi-timeline__content"],children:d})]}),s&&m]})};j.displayName="TimelineItem";exports.TimelineItem=j;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TimelineItemState } from '../../timeline';
|
|
3
|
+
export interface TimelineItemProps {
|
|
4
|
+
/**
|
|
5
|
+
* Item content. `Timeline.Title` and `Timeline.Description` are rendered in the
|
|
6
|
+
* info area; any other content is rendered below them.
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Timing labels shown before the item (e.g. `['2024', '16. detsember']`). On desktop
|
|
11
|
+
* they stack in the left column (first line larger); on mobile they sit inline.
|
|
12
|
+
*/
|
|
13
|
+
timings?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Content pinned to the bottom of the timings column on desktop and rendered after the
|
|
16
|
+
* item content on mobile — e.g. a "last modified" note.
|
|
17
|
+
*/
|
|
18
|
+
timingsBottom?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Current / past / future state. Injected by `Timeline` from its `activeIndex`.
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
state?: TimelineItemState;
|
|
24
|
+
/**
|
|
25
|
+
* Whether this is the last item (hides the connecting line). Injected by `Timeline`.
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
isLast?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const TimelineItem: {
|
|
31
|
+
({ children, timings, timingsBottom, state, isLast, }: TimelineItemProps): JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
export default TimelineItem;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import f from "../../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { Children as B, isValidElement as C } from "react";
|
|
4
|
+
import S, { isBreakpointBelow as j } from "../../../../../helpers/hooks/use-breakpoint.es.js";
|
|
5
|
+
import { Separator as _ } from "../../../separator/separator.es.js";
|
|
6
|
+
import i from "../../timeline.module.scss.es.js";
|
|
7
|
+
import { TimelineDescription as u } from "../timeline-description/timeline-description.es.js";
|
|
8
|
+
import { TimelineTitle as h } from "../timeline-title/timeline-title.es.js";
|
|
9
|
+
const A = ({
|
|
10
|
+
children: y,
|
|
11
|
+
timings: v = [],
|
|
12
|
+
timingsBottom: r,
|
|
13
|
+
state: t = "future",
|
|
14
|
+
isLast: N = !1
|
|
15
|
+
}) => {
|
|
16
|
+
const T = S(), m = j(T, "lg"), s = B.toArray(y), l = (e, c) => C(e) && e.type === c, k = s.find((e) => l(e, h)), b = s.find((e) => l(e, u)), a = s.filter((e) => !l(e, h) && !l(e, u)), g = t === "future" ? "secondary" : "accent", x = t === "past" ? "accent" : "secondary", d = r != null && typeof r != "boolean", p = d && /* @__PURE__ */ n("div", { className: i["tedi-timeline__timings-bottom"], children: r });
|
|
17
|
+
return /* @__PURE__ */ o(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: f(i["tedi-timeline-item"], {
|
|
21
|
+
[i["tedi-timeline__item--has-bottom"]]: m && d
|
|
22
|
+
}),
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ o("div", { className: i["tedi-timeline__timings"], children: [
|
|
25
|
+
v.map((e, c) => /* @__PURE__ */ n("span", { className: i["tedi-timeline__time"], children: e }, `${e}-${c}`)),
|
|
26
|
+
!m && p
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ o(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
className: f(i["tedi-timeline__marker"], {
|
|
32
|
+
[i["tedi-timeline__marker--large"]]: t === "current"
|
|
33
|
+
}),
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ n(
|
|
36
|
+
_,
|
|
37
|
+
{
|
|
38
|
+
variant: "dot-only",
|
|
39
|
+
color: g,
|
|
40
|
+
dotSize: t === "current" ? "large" : "medium",
|
|
41
|
+
dotStyle: t === "future" ? "outlined" : "filled"
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
!N && /* @__PURE__ */ n(_, { axis: "vertical", color: x })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ o("div", { className: i["tedi-timeline__info"], children: [
|
|
49
|
+
/* @__PURE__ */ o("div", { children: [
|
|
50
|
+
k,
|
|
51
|
+
b
|
|
52
|
+
] }),
|
|
53
|
+
a.length > 0 && /* @__PURE__ */ n("div", { className: i["tedi-timeline__content"], children: a })
|
|
54
|
+
] }),
|
|
55
|
+
m && p
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
A.displayName = "TimelineItem";
|
|
61
|
+
export {
|
|
62
|
+
A as TimelineItem
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),s=require("../../../../../../../external/classnames/index.cjs.js"),d=require("../../timeline.module.scss.cjs.js"),i=({children:t,color:e="secondary",className:l})=>n.jsx("div",{className:s.default(d.default["tedi-timeline-title"],{[`tedi-text--${e}`]:e!=="inherit"},l),children:t});i.displayName="TimelineTitle";exports.TimelineTitle=i;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TextColor } from '../../../../base/typography/text/text';
|
|
3
|
+
export interface TimelineTitleProps {
|
|
4
|
+
/**
|
|
5
|
+
* Title content. Wrap it in a heading element if you need heading semantics —
|
|
6
|
+
* nested typography inherits the title's size / weight.
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Text color, using the shared typography colors. Defaults to `secondary`.
|
|
11
|
+
* Pass `'inherit'` to inherit the surrounding color instead.
|
|
12
|
+
* @default secondary
|
|
13
|
+
*/
|
|
14
|
+
color?: TextColor | 'inherit';
|
|
15
|
+
/**
|
|
16
|
+
* Additional class name.
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare const TimelineTitle: {
|
|
21
|
+
({ children, color, className }: TimelineTitleProps): JSX.Element;
|
|
22
|
+
displayName: string;
|
|
23
|
+
};
|
|
24
|
+
export default TimelineTitle;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import s from "../../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import l from "../../timeline.module.scss.es.js";
|
|
4
|
+
const r = ({ children: i, color: e = "secondary", className: t }) => /* @__PURE__ */ m("div", { className: s(l["tedi-timeline-title"], { [`tedi-text--${e}`]: e !== "inherit" }, t), children: i });
|
|
5
|
+
r.displayName = "TimelineTitle";
|
|
6
|
+
export {
|
|
7
|
+
r as TimelineTitle
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const q=require("react/jsx-runtime"),y=require("../../../../../external/classnames/index.cjs.js"),n=require("react"),I=require("./components/timeline-description/timeline-description.cjs.js"),d=require("./components/timeline-item/timeline-item.cjs.js"),g=require("./components/timeline-title/timeline-title.cjs.js"),u=require("./timeline.module.scss.cjs.js"),c=e=>n.isValidElement(e)&&e.type===d.TimelineItem,j=(e,t)=>t===void 0?"future":e===t?"current":e<t?"past":"future",i=({children:e,activeIndex:t,variant:l="default",cardPadding:s,className:a})=>{const f=n.Children.toArray(e).filter(c).length;let m=-1;const T=n.Children.map(e,r=>{if(!c(r))return r;m+=1;const o=m;return n.cloneElement(r,{state:j(o,t),isLast:o===f-1})}),p=l==="card"&&s!==void 0?{"--tedi-timeline-card-padding":`${s}rem`}:void 0;return q.jsx("div",{className:y.default(u.default["tedi-timeline"],{[u.default["tedi-timeline--card"]]:l==="card"},a),style:p,children:T})};i.displayName="Timeline";i.Item=d.TimelineItem;i.Title=g.TimelineTitle;i.Description=I.TimelineDescription;exports.Timeline=i;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TimelineItemProps } from './components/timeline-item/timeline-item';
|
|
3
|
+
export type TimelineVariant = 'default' | 'card';
|
|
4
|
+
export type TimelineItemState = 'current' | 'past' | 'future';
|
|
5
|
+
export interface TimelineProps {
|
|
6
|
+
/**
|
|
7
|
+
* `Timeline.Item` elements.
|
|
8
|
+
*/
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
/**
|
|
11
|
+
* Index of the active (current) item. Items before it render as completed (past),
|
|
12
|
+
* items after it as upcoming (future). When omitted, all items are future.
|
|
13
|
+
*/
|
|
14
|
+
activeIndex?: number;
|
|
15
|
+
/**
|
|
16
|
+
* Visual variant. `card` wraps the timeline in card borders and padding.
|
|
17
|
+
* @default default
|
|
18
|
+
*/
|
|
19
|
+
variant?: TimelineVariant;
|
|
20
|
+
/**
|
|
21
|
+
* Vertical padding of each item in the `card` variant, in rem (same scale as
|
|
22
|
+
* `Card`). Both the gaps between items and the card's top/bottom edges resolve
|
|
23
|
+
* to twice this value. Horizontal item padding is fixed at the card default.
|
|
24
|
+
* @default 0.5
|
|
25
|
+
*/
|
|
26
|
+
cardPadding?: number;
|
|
27
|
+
/**
|
|
28
|
+
* Additional class name.
|
|
29
|
+
*/
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const Timeline: {
|
|
33
|
+
({ children, activeIndex, variant, cardPadding, className, }: TimelineProps): JSX.Element;
|
|
34
|
+
displayName: string;
|
|
35
|
+
Item: {
|
|
36
|
+
({ children, timings, timingsBottom, state, isLast, }: TimelineItemProps): JSX.Element;
|
|
37
|
+
displayName: string;
|
|
38
|
+
};
|
|
39
|
+
Title: {
|
|
40
|
+
({ children, color, className }: import('.').TimelineTitleProps): JSX.Element;
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
|
43
|
+
Description: {
|
|
44
|
+
({ children, color, className, }: import('.').TimelineDescriptionProps): JSX.Element;
|
|
45
|
+
displayName: string;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export default Timeline;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import E from "../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { Children as l, cloneElement as N, isValidElement as v } from "react";
|
|
4
|
+
import { TimelineDescription as C } from "./components/timeline-description/timeline-description.es.js";
|
|
5
|
+
import { TimelineItem as a } from "./components/timeline-item/timeline-item.es.js";
|
|
6
|
+
import { TimelineTitle as D } from "./components/timeline-title/timeline-title.es.js";
|
|
7
|
+
import p from "./timeline.module.scss.es.js";
|
|
8
|
+
const f = (e) => v(e) && e.type === a, I = (e, t) => t === void 0 ? "future" : e === t ? "current" : e < t ? "past" : "future", i = ({
|
|
9
|
+
children: e,
|
|
10
|
+
activeIndex: t,
|
|
11
|
+
variant: m = "default",
|
|
12
|
+
cardPadding: o,
|
|
13
|
+
className: u
|
|
14
|
+
}) => {
|
|
15
|
+
const c = l.toArray(e).filter(f).length;
|
|
16
|
+
let n = -1;
|
|
17
|
+
const d = l.map(e, (r) => {
|
|
18
|
+
if (!f(r)) return r;
|
|
19
|
+
n += 1;
|
|
20
|
+
const s = n;
|
|
21
|
+
return N(r, { state: I(s, t), isLast: s === c - 1 });
|
|
22
|
+
}), T = m === "card" && o !== void 0 ? { "--tedi-timeline-card-padding": `${o}rem` } : void 0;
|
|
23
|
+
return /* @__PURE__ */ y(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: E(p["tedi-timeline"], { [p["tedi-timeline--card"]]: m === "card" }, u),
|
|
27
|
+
style: T,
|
|
28
|
+
children: d
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
};
|
|
32
|
+
i.displayName = "Timeline";
|
|
33
|
+
i.Item = a;
|
|
34
|
+
i.Title = D;
|
|
35
|
+
i.Description = C;
|
|
36
|
+
export {
|
|
37
|
+
i as Timeline
|
|
38
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-timeline":"tedi-timeline-9ae74ae2","tedi-timeline--card":"tedi-timeline--card-a2e3bd66","tedi-timeline-item":"tedi-timeline-item-e902dd23","tedi-timeline__timings":"tedi-timeline__timings-546bfe94","tedi-timeline__info":"tedi-timeline__info-32fd4662","tedi-timeline__timings-bottom":"tedi-timeline__timings-bottom-3f346e9e","tedi-timeline__marker":"tedi-timeline__marker-38b5128b","tedi-timeline__item--has-bottom":"tedi-timeline__item--has-bottom-02d25709","tedi-timeline__time":"tedi-timeline__time-402ebe78","tedi-timeline__marker--large":"tedi-timeline__marker--large-c0c1e1b6","tedi-timeline__content":"tedi-timeline__content-a273bf25","tedi-timeline-title":"tedi-timeline-title-9c5618a5","tedi-timeline-description":"tedi-timeline-description-108c70de"};exports.default=e;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
"tedi-timeline": "tedi-timeline-9ae74ae2",
|
|
3
|
+
"tedi-timeline--card": "tedi-timeline--card-a2e3bd66",
|
|
4
|
+
"tedi-timeline-item": "tedi-timeline-item-e902dd23",
|
|
5
|
+
"tedi-timeline__timings": "tedi-timeline__timings-546bfe94",
|
|
6
|
+
"tedi-timeline__info": "tedi-timeline__info-32fd4662",
|
|
7
|
+
"tedi-timeline__timings-bottom": "tedi-timeline__timings-bottom-3f346e9e",
|
|
8
|
+
"tedi-timeline__marker": "tedi-timeline__marker-38b5128b",
|
|
9
|
+
"tedi-timeline__item--has-bottom": "tedi-timeline__item--has-bottom-02d25709",
|
|
10
|
+
"tedi-timeline__time": "tedi-timeline__time-402ebe78",
|
|
11
|
+
"tedi-timeline__marker--large": "tedi-timeline__marker--large-c0c1e1b6",
|
|
12
|
+
"tedi-timeline__content": "tedi-timeline__content-a273bf25",
|
|
13
|
+
"tedi-timeline-title": "tedi-timeline-title-9c5618a5",
|
|
14
|
+
"tedi-timeline-description": "tedi-timeline-description-108c70de"
|
|
15
|
+
};
|
|
16
|
+
export {
|
|
17
|
+
e as default
|
|
18
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),M=require("../../../../../../../external/classnames/index.cjs.js"),n=require("react"),C=require("../../../../base/typography/text/text.cjs.js"),T=require("../../../../buttons/collapse-button/collapse-button.cjs.js"),u=require("../../table-of-contents.cjs.js"),t=require("../../table-of-contents.module.scss.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),M=require("../../../../../../../external/classnames/index.cjs.js"),n=require("react"),C=require("../../../../base/typography/text/text.cjs.js"),T=require("../../../../buttons/collapse-button/collapse-button.cjs.js"),u=require("../../table-of-contents.cjs.js"),t=require("../../table-of-contents.module.scss.cjs.js"),y=require("../table-of-contents-list/table-of-contents-list.cjs.js"),B=require("../../../../../providers/label-provider/use-labels.cjs.js"),c=require("../../../../overlays/modal/modal.cjs.js"),g=j=>{const{children:f,heading:b,ariaLabel:_,activeId:o,numbered:x=!1,sticky:O=!0,className:q}=j,{getLabel:s}=B.useLabels(),[l,a]=n.useState(!1),h=n.useRef(null);n.useEffect(()=>{const d=h.current;if(!l||!d)return;const v=N=>{N.target.closest("a, button")&&a(!1)};return d.addEventListener("click",v),()=>d.removeEventListener("click",v)},[l]);const i=(b===void 0?s("table-of-contents.title"):b)??s("table-of-contents.title"),m=_||i,r=n.useMemo(()=>u.childrenToNodes(f),[f]),p=n.useMemo(()=>u.buildActiveTrail(r,o),[r,o]),L=n.useMemo(()=>({activeId:o,numbered:x,ariaLabel:m,activeTrail:p}),[o,x,m,p]);return e.jsxs(u.TableOfContentsContext.Provider,{value:L,children:[e.jsxs("div",{className:M.default(t.default["tedi-table-of-contents__bar"],{[t.default["tedi-table-of-contents__bar--static"]]:!O},q),children:[e.jsx(C.Text,{modifiers:"bold",className:t.default["tedi-table-of-contents__bar-title"],children:i}),e.jsx(T.CollapseButton,{open:l,onOpenChange:a,openText:s("open"),closeText:s("close"),underline:!1,"aria-haspopup":"dialog"})]}),e.jsx(c.Modal,{open:l,onToggle:a,children:e.jsxs(c.Modal.Content,{position:"bottom",fullscreen:"edge","aria-label":i,className:t.default["tedi-table-of-contents__sheet"],children:[e.jsx(c.Modal.Header,{closeButton:!1,children:e.jsxs("div",{className:t.default["tedi-table-of-contents__sheet-header"],children:[e.jsx(C.Text,{modifiers:"bold",className:t.default["tedi-table-of-contents__bar-title"],children:i}),e.jsx(T.CollapseButton,{open:l,onOpenChange:a,openText:s("open"),closeText:s("close"),underline:!1})]})}),e.jsx(c.Modal.Body,{children:e.jsx("div",{ref:h,className:t.default["tedi-table-of-contents"],children:e.jsx(y.TableOfContentsList,{nodes:r,heading:null})})})]})})]})};g.displayName="TableOfContentsCollapsible";exports.TableOfContentsCollapsible=g;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TableOfContentsProps } from '../../table-of-contents';
|
|
2
|
-
export interface TableOfContentsCollapsibleProps extends Pick<TableOfContentsProps, 'children' | 'heading' | '
|
|
2
|
+
export interface TableOfContentsCollapsibleProps extends Pick<TableOfContentsProps, 'children' | 'heading' | 'ariaLabel' | 'activeId' | 'numbered' | 'className'> {
|
|
3
3
|
/**
|
|
4
4
|
* Pin the bar to the bottom of the viewport. Set `false` to render it inline.
|
|
5
5
|
* @default true
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useState as
|
|
1
|
+
import { jsxs as i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import k from "../../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { useState as B, useRef as E, useEffect as H, useMemo as f } from "react";
|
|
4
4
|
import { Text as T } from "../../../../base/typography/text/text.es.js";
|
|
5
5
|
import { CollapseButton as _ } from "../../../../buttons/collapse-button/collapse-button.es.js";
|
|
6
|
-
import { childrenToNodes as
|
|
6
|
+
import { childrenToNodes as j, buildActiveTrail as M, TableOfContentsContext as R } from "../../table-of-contents.es.js";
|
|
7
7
|
import t from "../../table-of-contents.module.scss.es.js";
|
|
8
|
-
import { TableOfContentsList as
|
|
9
|
-
import { useLabels as
|
|
10
|
-
import { Modal as
|
|
11
|
-
const
|
|
12
|
-
const { children: m, heading: b,
|
|
13
|
-
|
|
14
|
-
const d =
|
|
8
|
+
import { TableOfContentsList as A } from "../table-of-contents-list/table-of-contents-list.es.js";
|
|
9
|
+
import { useLabels as I } from "../../../../../providers/label-provider/use-labels.es.js";
|
|
10
|
+
import { Modal as r } from "../../../../overlays/modal/modal.es.js";
|
|
11
|
+
const P = (C) => {
|
|
12
|
+
const { children: m, heading: b, ariaLabel: N, activeId: l, numbered: p = !1, sticky: x = !0, className: L } = C, { getLabel: o } = I(), [n, s] = B(!1), u = E(null);
|
|
13
|
+
H(() => {
|
|
14
|
+
const d = u.current;
|
|
15
15
|
if (!n || !d) return;
|
|
16
|
-
const g = (
|
|
17
|
-
|
|
16
|
+
const g = (y) => {
|
|
17
|
+
y.target.closest("a, button") && s(!1);
|
|
18
18
|
};
|
|
19
19
|
return d.addEventListener("click", g), () => d.removeEventListener("click", g);
|
|
20
20
|
}, [n]);
|
|
21
|
-
const
|
|
22
|
-
() => ({ activeId:
|
|
23
|
-
[
|
|
24
|
-
)
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
/* @__PURE__ */
|
|
21
|
+
const a = (b === void 0 ? o("table-of-contents.title") : b) ?? o("table-of-contents.title"), h = N || a, c = f(() => j(m), [m]), v = f(() => M(c, l), [c, l]), O = f(
|
|
22
|
+
() => ({ activeId: l, numbered: p, ariaLabel: h, activeTrail: v }),
|
|
23
|
+
[l, p, h, v]
|
|
24
|
+
);
|
|
25
|
+
return /* @__PURE__ */ i(R.Provider, { value: O, children: [
|
|
26
|
+
/* @__PURE__ */ i(
|
|
27
27
|
"div",
|
|
28
28
|
{
|
|
29
|
-
className:
|
|
29
|
+
className: k(
|
|
30
30
|
t["tedi-table-of-contents__bar"],
|
|
31
|
-
{ [t["tedi-table-of-contents__bar--static"]]: !
|
|
32
|
-
|
|
31
|
+
{ [t["tedi-table-of-contents__bar--static"]]: !x },
|
|
32
|
+
L
|
|
33
33
|
),
|
|
34
34
|
children: [
|
|
35
|
-
/* @__PURE__ */ e(T, { modifiers: "bold", className: t["tedi-table-of-contents__bar-title"], children:
|
|
35
|
+
/* @__PURE__ */ e(T, { modifiers: "bold", className: t["tedi-table-of-contents__bar-title"], children: a }),
|
|
36
36
|
/* @__PURE__ */ e(
|
|
37
37
|
_,
|
|
38
38
|
{
|
|
39
39
|
open: n,
|
|
40
|
-
onOpenChange:
|
|
40
|
+
onOpenChange: s,
|
|
41
41
|
openText: o("open"),
|
|
42
42
|
closeText: o("close"),
|
|
43
43
|
underline: !1,
|
|
@@ -47,34 +47,34 @@ const w = (C) => {
|
|
|
47
47
|
]
|
|
48
48
|
}
|
|
49
49
|
),
|
|
50
|
-
/* @__PURE__ */ e(
|
|
51
|
-
|
|
50
|
+
/* @__PURE__ */ e(r, { open: n, onToggle: s, children: /* @__PURE__ */ i(
|
|
51
|
+
r.Content,
|
|
52
52
|
{
|
|
53
53
|
position: "bottom",
|
|
54
54
|
fullscreen: "edge",
|
|
55
|
-
"aria-label":
|
|
55
|
+
"aria-label": a,
|
|
56
56
|
className: t["tedi-table-of-contents__sheet"],
|
|
57
57
|
children: [
|
|
58
|
-
/* @__PURE__ */ e(
|
|
59
|
-
/* @__PURE__ */ e(T, { modifiers: "bold", className: t["tedi-table-of-contents__bar-title"], children:
|
|
58
|
+
/* @__PURE__ */ e(r.Header, { closeButton: !1, children: /* @__PURE__ */ i("div", { className: t["tedi-table-of-contents__sheet-header"], children: [
|
|
59
|
+
/* @__PURE__ */ e(T, { modifiers: "bold", className: t["tedi-table-of-contents__bar-title"], children: a }),
|
|
60
60
|
/* @__PURE__ */ e(
|
|
61
61
|
_,
|
|
62
62
|
{
|
|
63
63
|
open: n,
|
|
64
|
-
onOpenChange:
|
|
64
|
+
onOpenChange: s,
|
|
65
65
|
openText: o("open"),
|
|
66
66
|
closeText: o("close"),
|
|
67
67
|
underline: !1
|
|
68
68
|
}
|
|
69
69
|
)
|
|
70
70
|
] }) }),
|
|
71
|
-
/* @__PURE__ */ e(
|
|
71
|
+
/* @__PURE__ */ e(r.Body, { children: /* @__PURE__ */ e("div", { ref: u, className: t["tedi-table-of-contents"], children: /* @__PURE__ */ e(A, { nodes: c, heading: null }) }) })
|
|
72
72
|
]
|
|
73
73
|
}
|
|
74
74
|
) })
|
|
75
75
|
] });
|
|
76
76
|
};
|
|
77
|
-
|
|
77
|
+
P.displayName = "TableOfContentsCollapsible";
|
|
78
78
|
export {
|
|
79
|
-
|
|
79
|
+
P as TableOfContentsCollapsible
|
|
80
80
|
};
|
|
@@ -11,20 +11,10 @@ export interface TableOfContentsItemProps {
|
|
|
11
11
|
* `TableOfContents.Item` children, which become this item's sub-items.
|
|
12
12
|
*/
|
|
13
13
|
children?: React.ReactNode;
|
|
14
|
-
/**
|
|
15
|
-
* Validation state for multistep-form usage (only rendered with `showIcons`
|
|
16
|
-
* on the parent): `true` = valid, `false` = invalid, `undefined` = not yet
|
|
17
|
-
* validated.
|
|
18
|
-
*/
|
|
19
|
-
isValid?: boolean;
|
|
20
14
|
/**
|
|
21
15
|
* Render a separator below the item.
|
|
22
16
|
*/
|
|
23
17
|
separator?: boolean;
|
|
24
|
-
/**
|
|
25
|
-
* Hide the validation glyph for this item even when `showIcons` is on.
|
|
26
|
-
*/
|
|
27
|
-
hideIcon?: boolean;
|
|
28
18
|
}
|
|
29
19
|
export declare const TableOfContentsItem: {
|
|
30
20
|
(_props: TableOfContentsItemProps): JSX.Element | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),m=require("../../../../../../../external/classnames/index.cjs.js"),i=require("react"),C=require("../../../../base/typography/heading/heading.cjs.js"),h=require("../../table-of-contents.cjs.js"),s=require("../../table-of-contents.module.scss.cjs.js"),L=require("../table-of-contents-row/table-of-contents-row.cjs.js"),O=require("../../../../../providers/label-provider/use-labels.cjs.js"),r=({nodes:d,heading:t})=>{const{numbered:c,headingLevel:u="h3",ariaLabel:n}=i.useContext(h.TableOfContentsContext),{getLabel:b}=O.useLabels(),l=i.useId(),f=c?"ol":"ul";return e.jsxs(e.Fragment,{children:[t&&e.jsx(C.Heading,{element:u,modifiers:"h4",id:l,className:s.default["tedi-table-of-contents__heading"],children:t}),e.jsx("nav",{"aria-labelledby":!n&&t?l:void 0,"aria-label":n||(t?void 0:b("table-of-contents.title")),children:e.jsx(f,{className:m.default(s.default["tedi-table-of-contents__list"],{[s.default["tedi-table-of-contents__list--headless"]]:!t}),children:d.map((a,o)=>e.jsx(L.TableOfContentsRow,{node:a,depth:1,index:o},a.id??o))})})]})};r.displayName="TableOfContentsList";exports.TableOfContentsList=r;
|
|
@@ -1,34 +1,43 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { useContext as
|
|
4
|
-
import { Heading as
|
|
5
|
-
import { TableOfContentsContext as
|
|
1
|
+
import { jsxs as c, Fragment as b, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import p from "../../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { useContext as h, useId as L } from "react";
|
|
4
|
+
import { Heading as u } from "../../../../base/typography/heading/heading.es.js";
|
|
5
|
+
import { TableOfContentsContext as C } from "../../table-of-contents.es.js";
|
|
6
6
|
import o from "../../table-of-contents.module.scss.es.js";
|
|
7
|
-
import { TableOfContentsRow as
|
|
8
|
-
import { useLabels as
|
|
9
|
-
const
|
|
10
|
-
const { numbered: r } =
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
t && /* @__PURE__ */ e(
|
|
7
|
+
import { TableOfContentsRow as _ } from "../table-of-contents-row/table-of-contents-row.es.js";
|
|
8
|
+
import { useLabels as v } from "../../../../../providers/label-provider/use-labels.es.js";
|
|
9
|
+
const x = ({ nodes: n, heading: t }) => {
|
|
10
|
+
const { numbered: r, headingLevel: m = "h3", ariaLabel: s } = h(C), { getLabel: d } = v(), l = L(), f = r ? "ol" : "ul";
|
|
11
|
+
return /* @__PURE__ */ c(b, { children: [
|
|
12
|
+
t && /* @__PURE__ */ e(
|
|
13
|
+
u,
|
|
14
|
+
{
|
|
15
|
+
element: m,
|
|
16
|
+
modifiers: "h4",
|
|
17
|
+
id: l,
|
|
18
|
+
className: o["tedi-table-of-contents__heading"],
|
|
19
|
+
children: t
|
|
20
|
+
}
|
|
21
|
+
),
|
|
13
22
|
/* @__PURE__ */ e(
|
|
14
23
|
"nav",
|
|
15
24
|
{
|
|
16
|
-
"aria-labelledby": t ?
|
|
17
|
-
"aria-label": t ? void 0 :
|
|
25
|
+
"aria-labelledby": !s && t ? l : void 0,
|
|
26
|
+
"aria-label": s || (t ? void 0 : d("table-of-contents.title")),
|
|
18
27
|
children: /* @__PURE__ */ e(
|
|
19
|
-
|
|
28
|
+
f,
|
|
20
29
|
{
|
|
21
|
-
className:
|
|
30
|
+
className: p(o["tedi-table-of-contents__list"], {
|
|
22
31
|
[o["tedi-table-of-contents__list--headless"]]: !t
|
|
23
32
|
}),
|
|
24
|
-
children:
|
|
33
|
+
children: n.map((a, i) => /* @__PURE__ */ e(_, { node: a, depth: 1, index: i }, a.id ?? i))
|
|
25
34
|
}
|
|
26
35
|
)
|
|
27
36
|
}
|
|
28
37
|
)
|
|
29
38
|
] });
|
|
30
39
|
};
|
|
31
|
-
|
|
40
|
+
x.displayName = "TableOfContentsList";
|
|
32
41
|
export {
|
|
33
|
-
|
|
42
|
+
x as TableOfContentsList
|
|
34
43
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),b=require("../../../../../../../external/classnames/index.cjs.js"),N=require("react"),T=require("../../../../misc/separator/separator.cjs.js"),w=require("../../table-of-contents.cjs.js"),t=require("../../table-of-contents.module.scss.cjs.js"),r=({node:m,depth:c,index:i,numberPrefix:a})=>{const{activeId:_,numbered:o,activeTrail:p}=N.useContext(w.TableOfContentsContext),{id:n,content:x,children:s,separator:j}=m,C=!!(s!=null&&s.length),d=!!n&&n===_,h=C&&!!n&&p.has(n),O=Math.min(c,2),l=a?`${a}.${i+1}`:`${i+1}`,v=a?l:`${l}.`,q=o?"ol":"ul";return e.jsxs("li",{"aria-current":d?"true":void 0,className:b.default(t.default["tedi-table-of-contents__item"],{[t.default["tedi-table-of-contents__item--selected"]]:d}),children:[e.jsxs("span",{className:b.default(t.default["tedi-table-of-contents__row"],t.default[`tedi-table-of-contents__row--level-${O}`]),children:[o&&e.jsx("span",{className:t.default["tedi-table-of-contents__number"],"aria-hidden":"true",children:v}),e.jsx("span",{className:t.default["tedi-table-of-contents__content"],children:x})]}),h&&e.jsx(q,{className:t.default["tedi-table-of-contents__group"],children:s.map((u,f)=>e.jsx(r,{node:u,depth:c+1,index:f,numberPrefix:o?l:void 0},u.id??f))}),j&&e.jsx(T.Separator,{})]})};r.displayName="TableOfContentsRow";exports.TableOfContentsRow=r;
|