@tedi-design-system/react 18.0.0-rc.10 → 18.0.0-rc.12
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/community/components/layout/footer/footer.d.ts +6 -0
- package/src/community/components/placeholder/placeholder.d.ts +5 -0
- package/src/tedi/components/buttons/collapse/collapse.cjs.js +1 -1
- package/src/tedi/components/buttons/collapse/collapse.es.js +8 -7
- package/src/tedi/components/form/input-group/components/input/input.cjs.js +1 -1
- package/src/tedi/components/form/input-group/components/input/input.es.js +14 -13
- package/src/tedi/components/form/input-group/components/prefix/prefix.cjs.js +1 -1
- package/src/tedi/components/form/input-group/components/prefix/prefix.es.js +16 -16
- package/src/tedi/components/form/input-group/components/suffix/suffix.cjs.js +1 -1
- package/src/tedi/components/form/input-group/components/suffix/suffix.es.js +12 -12
- package/src/tedi/components/form/input-group/input-group.cjs.js +1 -1
- package/src/tedi/components/form/input-group/input-group.d.ts +13 -0
- package/src/tedi/components/form/input-group/input-group.es.js +47 -45
- package/src/tedi/components/form/input-group/input-group.module.scss.cjs.js +1 -1
- package/src/tedi/components/form/input-group/input-group.module.scss.es.js +2 -0
- package/src/tedi/components/layout/footer/footer-body/footer-body.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer-body/footer-body.d.ts +30 -0
- package/src/tedi/components/layout/footer/footer-body/footer-body.es.js +28 -0
- package/src/tedi/components/layout/footer/footer-bottom/footer-bottom.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer-bottom/footer-bottom.d.ts +23 -0
- package/src/tedi/components/layout/footer/footer-bottom/footer-bottom.es.js +25 -0
- package/src/tedi/components/layout/footer/footer-context.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer-context.d.ts +23 -0
- package/src/tedi/components/layout/footer/footer-context.es.js +7 -0
- package/src/tedi/components/layout/footer/footer-section/footer-section.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer-section/footer-section.d.ts +48 -0
- package/src/tedi/components/layout/footer/footer-section/footer-section.es.js +65 -0
- package/src/tedi/components/layout/footer/footer-side/footer-side.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer-side/footer-side.d.ts +36 -0
- package/src/tedi/components/layout/footer/footer-side/footer-side.es.js +34 -0
- package/src/tedi/components/layout/footer/footer.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer.d.ts +56 -0
- package/src/tedi/components/layout/footer/footer.es.js +64 -0
- package/src/tedi/components/layout/footer/footer.module.scss.cjs.js +1 -0
- package/src/tedi/components/layout/footer/footer.module.scss.es.js +31 -0
- package/src/tedi/components/layout/footer/index.d.ts +5 -0
- package/src/tedi/index.d.ts +1 -0
- package/tedi.cjs.js +1 -1
- package/tedi.es.js +87 -77
package/package.json
CHANGED
|
@@ -8,6 +8,9 @@ export type FooterCategory = {
|
|
|
8
8
|
heading: React.ReactNode;
|
|
9
9
|
icon?: string | IconProps;
|
|
10
10
|
};
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Use `Footer` from `@tedi-design-system/react/tedi` instead.
|
|
13
|
+
*/
|
|
11
14
|
export type FooterProps = {
|
|
12
15
|
/**
|
|
13
16
|
* Footer Categorys
|
|
@@ -30,5 +33,8 @@ export type FooterProps = {
|
|
|
30
33
|
*/
|
|
31
34
|
bottomElement?: React.ReactNode;
|
|
32
35
|
};
|
|
36
|
+
/**
|
|
37
|
+
* @deprecated Use `Footer` from `@tedi-design-system/react/tedi` instead.
|
|
38
|
+
*/
|
|
33
39
|
export declare const Footer: (props: FooterProps) => JSX.Element;
|
|
34
40
|
export default Footer;
|
|
@@ -2,6 +2,9 @@ import { default as React } from 'react';
|
|
|
2
2
|
import { IconProps } from '../../../tedi/components/base/icon/icon';
|
|
3
3
|
import { RowProps } from '../../../tedi/components/layout/grid';
|
|
4
4
|
import { CardProps } from '../card';
|
|
5
|
+
/**
|
|
6
|
+
* @deprecated Use EmptyState from `@tedi-design-system/react/tedi` instead.
|
|
7
|
+
*/
|
|
5
8
|
export interface PlaceholderProps {
|
|
6
9
|
/**
|
|
7
10
|
* Placeholder block content
|
|
@@ -31,6 +34,8 @@ export interface PlaceholderProps {
|
|
|
31
34
|
rowProps?: RowProps;
|
|
32
35
|
}
|
|
33
36
|
/**
|
|
37
|
+
* @deprecated Use EmptyState from `@tedi-design-system/react/tedi` instead.
|
|
38
|
+
*
|
|
34
39
|
* Placeholder is used to indicate, that there is no data to show. It can be used on its own or inside other components, like a `<CardContent>`.
|
|
35
40
|
* Other components also use it internally for displaying empty state. (E.g. `<Table>`)
|
|
36
41
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),s=require("../../../../../external/classnames/index.cjs.js"),_=require("react"),H=require("../../../../../external/react-animate-height/dist/esm/index.cjs.js"),J=require("../../../providers/printing-provider/printing-provider.cjs.js"),Q=require("../../base/icon/icon.cjs.js"),U=require("../../base/typography/text/text.cjs.js"),V=require("../../misc/print/print.cjs.js"),e=require("./collapse.module.scss.cjs.js"),W=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),X=require("../../../providers/label-provider/use-labels.cjs.js"),N=require("../../layout/grid/row.cjs.js"),i=require("../../layout/grid/col.cjs.js"),P=x=>{const{getCurrentBreakpointProps:k}=W.useBreakpointProps(x.defaultServerBreakpoint),{getLabel:h}=X.useLabels(),{id:r,children:w,className:O,openText:j=h("open"),closeText:y=h("close"),hideCollapseText:$=!1,title:d,titleRowProps:S,defaultOpen:B,open:c,onToggle:u,arrowType:n="default",size:o="default",underline:M=!0,toggleLabel:g,iconOnly:R=!1,controlsId:v,inverted:T=!1,...L}=k(x),b=v!==void 0,p=`${r}__trigger`,f=`${r}__content`,D=`${r}__animate`,[C,E]=_.useState(()=>B),m=J.usePrint(),a=_.useMemo(()=>m||(c!==void 0?c:C),[m,c,C]),z=R===!0&&!d,K=T&&n!=="secondary",A=s.default(e.default["tedi-collapse"],o==="small"&&e.default["tedi-collapse--small"],a&&e.default["tedi-collapse--is-open"],z&&e.default["tedi-collapse--icon-only"],K&&e.default["tedi-collapse--inverted"],e.default[`tedi-collapse--arrow-${n}`],O),q=()=>{const l=!a;E(l),u==null||u(l)},F=l=>{(l.key==="Enter"||l.key===" ")&&!l.repeat&&(l.preventDefault(),q())},G=g||(a?y:j),I=_.useMemo(()=>t.jsx("div",{id:f,role:"region","aria-labelledby":p,className:e.default["tedi-collapse__content"],children:w}),[w,f,p]);return t.jsxs("div",{"data-name":"collapse",...L,className:A,children:[t.jsx("button",{id:p,type:"button","data-name":"collapse-trigger",className:e.default["tedi-collapse__title"],"aria-label":G,"aria-expanded":a,"aria-controls":b?v:f,onKeyDown:F,onClick:q,children:t.jsxs(N.Row,{justifyContent:"between",alignItems:"center",wrap:"nowrap",...S,element:"span",children:[d&&t.jsx(i.Col,{"aria-hidden":"true",children:d}),t.jsx(i.Col,{width:"auto",children:t.jsxs(N.Row,{element:"span",alignItems:"center",gutter:0,wrap:"nowrap",children:[t.jsx(V.Print,{visibility:"hide",children:t.jsx(i.Col,{width:"auto",className:s.default({"visually-hidden":$}),children:t.jsx(U.Text,{element:"span",className:s.default(e.default["tedi-collapse__text"],{[e.default["tedi-collapse__text--underline"]]:M}),children:a?y:j})})}),t.jsx(i.Col,{width:"auto",children:t.jsx("div",{className:s.default(e.default["tedi-collapse__icon-wrapper"],e.default[`tedi-collapse__icon-wrapper--${n}`],o==="small"&&e.default["tedi-collapse__icon-wrapper--small"]),children:t.jsx(Q.Icon,{className:s.default(e.default["tedi-collapse__icon"],e.default[`tedi-collapse__icon--${n}`],o==="small"&&e.default["tedi-collapse__icon--small"]),name:"expand_more",color:"inherit",size:o==="small"||n==="secondary"?18:24})})})]})})]})}),!b&&(m?I:t.jsx(H.default,{id:D,duration:300,height:a?"auto":0,"data-testid":"collapse-inner",children:I}))]})};exports.Collapse=P;exports.default=P;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as h } from "react/jsx-runtime";
|
|
2
2
|
import n from "../../../../../external/classnames/index.es.js";
|
|
3
|
-
import
|
|
3
|
+
import f from "react";
|
|
4
4
|
import G from "../../../../../external/react-animate-height/dist/esm/index.es.js";
|
|
5
5
|
import { usePrint as J } from "../../../providers/printing-provider/printing-provider.es.js";
|
|
6
6
|
import { Icon as Q } from "../../base/icon/icon.es.js";
|
|
@@ -32,7 +32,7 @@ const pe = (w) => {
|
|
|
32
32
|
controlsId: C,
|
|
33
33
|
inverted: L = !1,
|
|
34
34
|
...M
|
|
35
|
-
} = $(w), I = C !== void 0, m = `${r}__trigger`, u = `${r}__content`, R = `${r}__animate`, [N, z] =
|
|
35
|
+
} = $(w), I = C !== void 0, m = `${r}__trigger`, u = `${r}__content`, R = `${r}__animate`, [N, z] = f.useState(() => j), _ = J(), o = f.useMemo(
|
|
36
36
|
() => _ || (d !== void 0 ? d : N),
|
|
37
37
|
[_, d, N]
|
|
38
38
|
), K = E === !0 && !c, A = L && a !== "secondary", H = n(
|
|
@@ -48,11 +48,11 @@ const pe = (w) => {
|
|
|
48
48
|
z(l), p == null || p(l);
|
|
49
49
|
}, q = (l) => {
|
|
50
50
|
(l.key === "Enter" || l.key === " ") && !l.repeat && (l.preventDefault(), k());
|
|
51
|
-
}, F = b || (o ? x : v), O =
|
|
51
|
+
}, F = b || (o ? x : v), O = f.useMemo(
|
|
52
52
|
() => /* @__PURE__ */ t("div", { id: u, role: "region", "aria-labelledby": m, className: e["tedi-collapse__content"], children: g }),
|
|
53
53
|
[g, u, m]
|
|
54
54
|
);
|
|
55
|
-
return /* @__PURE__ */
|
|
55
|
+
return /* @__PURE__ */ h("div", { "data-name": "collapse", ...M, className: H, children: [
|
|
56
56
|
/* @__PURE__ */ t(
|
|
57
57
|
"button",
|
|
58
58
|
{
|
|
@@ -65,9 +65,9 @@ const pe = (w) => {
|
|
|
65
65
|
"aria-controls": I ? C : u,
|
|
66
66
|
onKeyDown: q,
|
|
67
67
|
onClick: k,
|
|
68
|
-
children: /* @__PURE__ */
|
|
68
|
+
children: /* @__PURE__ */ h(P, { justifyContent: "between", alignItems: "center", wrap: "nowrap", ...T, element: "span", children: [
|
|
69
69
|
c && /* @__PURE__ */ t(s, { "aria-hidden": "true", children: c }),
|
|
70
|
-
/* @__PURE__ */ t(s, { width: "auto", children: /* @__PURE__ */
|
|
70
|
+
/* @__PURE__ */ t(s, { width: "auto", children: /* @__PURE__ */ h(P, { element: "span", alignItems: "center", gutter: 0, wrap: "nowrap", children: [
|
|
71
71
|
/* @__PURE__ */ t(V, { visibility: "hide", children: /* @__PURE__ */ t(s, { width: "auto", className: n({ "visually-hidden": S }), children: /* @__PURE__ */ t(
|
|
72
72
|
U,
|
|
73
73
|
{
|
|
@@ -95,6 +95,7 @@ const pe = (w) => {
|
|
|
95
95
|
i === "small" && e["tedi-collapse__icon--small"]
|
|
96
96
|
),
|
|
97
97
|
name: "expand_more",
|
|
98
|
+
color: "inherit",
|
|
98
99
|
size: i === "small" || a === "secondary" ? 18 : 24
|
|
99
100
|
}
|
|
100
101
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../../../../../../../external/classnames/index.cjs.js"),i=require("react"),n=require("../../input-group.cjs.js"),s=require("../../input-group.module.scss.cjs.js"),d=({children:t})=>{const{disabled:a,invalid:e,inputId:u}=n.useInputGroup();if(!i.isValidElement(t))return t;const o=typeof t.type=="string",r={disabled:a||t.props.disabled,id:t.props.id??u,className:p.default(t.props.className,s.default["tedi-input-group__input"]),...o?{"aria-invalid":e||t.props["aria-invalid"]||void 0}:{invalid:e||t.props.invalid,wrapperClassName:p.default(t.props.wrapperClassName,s.default["tedi-input-group__input"])}};return i.cloneElement(t,r)};exports.Input=d;
|
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import t from "../../../../../../../external/classnames/index.es.js";
|
|
2
|
-
import
|
|
2
|
+
import i from "react";
|
|
3
3
|
import { useInputGroup as u } from "../../input-group.es.js";
|
|
4
|
-
import
|
|
5
|
-
const
|
|
6
|
-
const { disabled:
|
|
7
|
-
if (!
|
|
8
|
-
const
|
|
9
|
-
disabled:
|
|
10
|
-
id: p.props.id ??
|
|
11
|
-
className: t(p.props.className,
|
|
12
|
-
|
|
13
|
-
|
|
4
|
+
import a from "../../input-group.module.scss.es.js";
|
|
5
|
+
const v = ({ children: p }) => {
|
|
6
|
+
const { disabled: o, invalid: s, inputId: r } = u();
|
|
7
|
+
if (!i.isValidElement(p)) return p;
|
|
8
|
+
const e = typeof p.type == "string", n = {
|
|
9
|
+
disabled: o || p.props.disabled,
|
|
10
|
+
id: p.props.id ?? r,
|
|
11
|
+
className: t(p.props.className, a["tedi-input-group__input"]),
|
|
12
|
+
...e ? { "aria-invalid": s || p.props["aria-invalid"] || void 0 } : {
|
|
13
|
+
invalid: s || p.props.invalid,
|
|
14
|
+
wrapperClassName: t(p.props.wrapperClassName, a["tedi-input-group__input"])
|
|
14
15
|
}
|
|
15
16
|
};
|
|
16
|
-
return
|
|
17
|
+
return i.cloneElement(p, n);
|
|
17
18
|
};
|
|
18
19
|
export {
|
|
19
|
-
|
|
20
|
+
v as Input
|
|
20
21
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),f=require("../../../../../../../external/classnames/index.cjs.js"),t=require("react"),c=require("../../input-group.cjs.js"),n=require("../../input-group.module.scss.cjs.js"),l=({children:e,className:s,...o})=>{const{registerPrefix:r,unregisterPrefix:i,disabled:u}=c.useInputGroup();t.useEffect(()=>(r(),()=>i()),[r,i]);const d=typeof e=="string"||typeof e=="number",p=u&&t.isValidElement(e)?t.cloneElement(e,{disabled:!0}):e;return a.jsx("div",{...o,className:f.default(n.default["tedi-input-group__prefix"],{[n.default["tedi-input-group__prefix--no-inner-div"]]:d},s),"aria-disabled":u,children:p})};exports.Prefix=l;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { useInputGroup as
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
const { registerPrefix:
|
|
8
|
-
|
|
9
|
-
const
|
|
2
|
+
import f from "../../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { useEffect as a, isValidElement as d, cloneElement as x } from "react";
|
|
4
|
+
import { useInputGroup as l } from "../../input-group.es.js";
|
|
5
|
+
import o from "../../input-group.module.scss.es.js";
|
|
6
|
+
const E = ({ children: e, className: s, ...n }) => {
|
|
7
|
+
const { registerPrefix: t, unregisterPrefix: r, disabled: i } = l();
|
|
8
|
+
a(() => (t(), () => r()), [t, r]);
|
|
9
|
+
const p = typeof e == "string" || typeof e == "number", m = i && d(e) ? x(e, { disabled: !0 }) : e;
|
|
10
10
|
return /* @__PURE__ */ u(
|
|
11
11
|
"div",
|
|
12
12
|
{
|
|
13
|
-
...
|
|
14
|
-
className:
|
|
15
|
-
|
|
16
|
-
{ [
|
|
17
|
-
|
|
13
|
+
...n,
|
|
14
|
+
className: f(
|
|
15
|
+
o["tedi-input-group__prefix"],
|
|
16
|
+
{ [o["tedi-input-group__prefix--no-inner-div"]]: p },
|
|
17
|
+
s
|
|
18
18
|
),
|
|
19
|
-
"aria-disabled":
|
|
20
|
-
children:
|
|
19
|
+
"aria-disabled": i,
|
|
20
|
+
children: m
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
};
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
E as Prefix
|
|
26
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),c=require("../../../../../../../external/classnames/index.cjs.js"),t=require("react"),p=require("../../input-group.cjs.js"),n=require("../../input-group.module.scss.cjs.js"),l=({children:e,className:s,...o})=>{const{registerSuffix:u,unregisterSuffix:i,disabled:r}=p.useInputGroup();t.useEffect(()=>(u(),()=>i()),[u,i]);const f=typeof e=="string"||typeof e=="number",d=r&&t.isValidElement(e)?t.cloneElement(e,{disabled:!0}):e;return a.jsx("div",{...o,className:c.default(n.default["tedi-input-group__suffix"],{[n.default["tedi-input-group__suffix--no-inner-div"]]:f},s),"aria-disabled":r,children:d})};exports.Suffix=l;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { jsx as p } from "react/jsx-runtime";
|
|
2
2
|
import m from "../../../../../../../external/classnames/index.es.js";
|
|
3
|
-
import { useEffect as
|
|
4
|
-
import { useInputGroup as
|
|
3
|
+
import { useEffect as a, isValidElement as d, cloneElement as x } from "react";
|
|
4
|
+
import { useInputGroup as l } from "../../input-group.es.js";
|
|
5
5
|
import o from "../../input-group.module.scss.es.js";
|
|
6
|
-
const
|
|
7
|
-
const { registerSuffix:
|
|
8
|
-
|
|
9
|
-
const
|
|
6
|
+
const y = ({ children: t, className: s, ...u }) => {
|
|
7
|
+
const { registerSuffix: e, unregisterSuffix: i, disabled: r } = l();
|
|
8
|
+
a(() => (e(), () => i()), [e, i]);
|
|
9
|
+
const f = typeof t == "string" || typeof t == "number", n = r && d(t) ? x(t, { disabled: !0 }) : t;
|
|
10
10
|
return /* @__PURE__ */ p(
|
|
11
11
|
"div",
|
|
12
12
|
{
|
|
13
|
-
...
|
|
13
|
+
...u,
|
|
14
14
|
className: m(
|
|
15
15
|
o["tedi-input-group__suffix"],
|
|
16
|
-
{ [o["tedi-input-group__suffix--no-inner-div"]]:
|
|
17
|
-
|
|
16
|
+
{ [o["tedi-input-group__suffix--no-inner-div"]]: f },
|
|
17
|
+
s
|
|
18
18
|
),
|
|
19
|
-
"aria-disabled":
|
|
20
|
-
children:
|
|
19
|
+
"aria-disabled": r,
|
|
20
|
+
children: n
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
};
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
y as Suffix
|
|
26
26
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),k=require("../../../../../external/classnames/index.cjs.js"),e=require("react"),G=require("../feedback-text/feedback-text.cjs.js"),w=require("../form-label/form-label.cjs.js"),N=require("./components/input/input.cjs.js"),R=require("./components/prefix/prefix.cjs.js"),A=require("./components/suffix/suffix.cjs.js"),t=require("./input-group.module.scss.cjs.js"),c=e.createContext(null),F=()=>{const s=e.useContext(c);if(!s)throw new Error("InputGroupContext missing");return s},T=()=>e.useContext(c),x=e.forwardRef(({className:s,addons:S=!0,helper:r,label:n,children:j,disabled:i,invalid:a,id:q,...P},h)=>{const l=e.useRef(null),v=e.useId(),p=q??v,[f,g]=e.useState(!1),[d,I]=e.useState(!1);e.useImperativeHandle(h,()=>({get root(){return l.current}}));const _=e.useMemo(()=>({hasPrefix:f,hasSuffix:d,disabled:i,invalid:a,hasExternalLabel:!!n,inputId:p,registerPrefix:()=>g(!0),unregisterPrefix:()=>g(!1),registerSuffix:()=>I(!0),unregisterSuffix:()=>I(!1)}),[p,f,d,i,a,n]),b=k.default(t.default["tedi-input-group"],{[t.default["tedi-input-group--addons"]]:S,[t.default["tedi-input-group--has-prefix"]]:f,[t.default["tedi-input-group--has-suffix"]]:d,[t.default["tedi-input-group--disabled"]]:i,[t.default["tedi-input-group--invalid"]]:a},s),y=()=>!r||Array.isArray(r)&&r.length===0?null:u.jsx("div",{className:t.default["tedi-input-group__feedback-wrapper"],children:Array.isArray(r)?r.map((C,m)=>u.jsx(G.FeedbackText,{...C,id:`group-helper-${m}`},m)):u.jsx(G.FeedbackText,{...r,id:"group-helper"})});return u.jsx(c.Provider,{value:_,children:u.jsxs("div",{ref:l,className:b,"data-name":"tedi-input-group","aria-disabled":i,children:[n&&u.jsx(w.FormLabel,{...P,label:n,id:p}),u.jsx("div",{className:t.default["tedi-input-group__row"],children:j}),y()]})})});x.displayName="InputGroup";const o=x;o.Prefix=R.Prefix;o.Suffix=A.Suffix;o.Input=N.Input;exports.InputGroupBase=x;exports.default=o;exports.useInputGroup=F;exports.useOptionalInputGroup=T;
|
|
@@ -36,6 +36,13 @@ export interface InputGroupProps extends FormLabelProps {
|
|
|
36
36
|
* to the input and any interactive prefix/suffix elements.
|
|
37
37
|
*/
|
|
38
38
|
disabled?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Marks the whole group as invalid. Applies the error border to the
|
|
41
|
+
* prefix/suffix addons and propagates `invalid` down to the inner form
|
|
42
|
+
* control, so you don't have to set it on the child as well. Pair with an
|
|
43
|
+
* error `helper` message.
|
|
44
|
+
*/
|
|
45
|
+
invalid?: boolean;
|
|
39
46
|
}
|
|
40
47
|
export interface InputGroupForwardRef {
|
|
41
48
|
root: HTMLDivElement | null;
|
|
@@ -73,6 +80,12 @@ export type InputGroupContextValue = {
|
|
|
73
80
|
* behavior and styling.
|
|
74
81
|
*/
|
|
75
82
|
disabled?: boolean;
|
|
83
|
+
/**
|
|
84
|
+
* Invalid state inherited from InputGroup.
|
|
85
|
+
* Consumed by Input to propagate `invalid` (or `aria-invalid`) to the
|
|
86
|
+
* wrapped form control.
|
|
87
|
+
*/
|
|
88
|
+
invalid?: boolean;
|
|
76
89
|
hasExternalLabel?: boolean;
|
|
77
90
|
inputId?: string;
|
|
78
91
|
};
|
|
@@ -1,62 +1,64 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { FeedbackText as
|
|
5
|
-
import { FormLabel as
|
|
6
|
-
import { Input as
|
|
7
|
-
import { Prefix as
|
|
8
|
-
import { Suffix as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
11
|
-
const u =
|
|
1
|
+
import { jsx as e, jsxs as F } from "react/jsx-runtime";
|
|
2
|
+
import H from "../../../../../external/classnames/index.es.js";
|
|
3
|
+
import l, { forwardRef as j, useContext as S, createContext as E, useState as I, useImperativeHandle as L, useMemo as b } from "react";
|
|
4
|
+
import { FeedbackText as G } from "../feedback-text/feedback-text.es.js";
|
|
5
|
+
import { FormLabel as B } from "../form-label/form-label.es.js";
|
|
6
|
+
import { Input as M } from "./components/input/input.es.js";
|
|
7
|
+
import { Prefix as O } from "./components/prefix/prefix.es.js";
|
|
8
|
+
import { Suffix as T } from "./components/suffix/suffix.es.js";
|
|
9
|
+
import r from "./input-group.module.scss.es.js";
|
|
10
|
+
const f = E(null), W = () => {
|
|
11
|
+
const u = S(f);
|
|
12
12
|
if (!u) throw new Error("InputGroupContext missing");
|
|
13
13
|
return u;
|
|
14
|
-
},
|
|
15
|
-
({ className: u, addons: P = !0, helper:
|
|
16
|
-
const m =
|
|
17
|
-
|
|
14
|
+
}, X = () => S(f), h = j(
|
|
15
|
+
({ className: u, addons: P = !0, helper: t, label: o, children: y, disabled: i, invalid: s, id: N, ..._ }, v) => {
|
|
16
|
+
const m = l.useRef(null), w = l.useId(), n = N ?? w, [p, c] = I(!1), [a, x] = I(!1);
|
|
17
|
+
L(v, () => ({
|
|
18
18
|
get root() {
|
|
19
19
|
return m.current;
|
|
20
20
|
}
|
|
21
21
|
}));
|
|
22
|
-
const
|
|
22
|
+
const C = b(
|
|
23
23
|
() => ({
|
|
24
|
-
hasPrefix:
|
|
25
|
-
hasSuffix:
|
|
26
|
-
disabled:
|
|
24
|
+
hasPrefix: p,
|
|
25
|
+
hasSuffix: a,
|
|
26
|
+
disabled: i,
|
|
27
|
+
invalid: s,
|
|
27
28
|
hasExternalLabel: !!o,
|
|
28
|
-
inputId:
|
|
29
|
-
registerPrefix: () =>
|
|
30
|
-
unregisterPrefix: () =>
|
|
31
|
-
registerSuffix: () =>
|
|
32
|
-
unregisterSuffix: () =>
|
|
29
|
+
inputId: n,
|
|
30
|
+
registerPrefix: () => c(!0),
|
|
31
|
+
unregisterPrefix: () => c(!1),
|
|
32
|
+
registerSuffix: () => x(!0),
|
|
33
|
+
unregisterSuffix: () => x(!1)
|
|
33
34
|
}),
|
|
34
|
-
[
|
|
35
|
-
), A =
|
|
36
|
-
|
|
35
|
+
[n, p, a, i, s, o]
|
|
36
|
+
), A = H(
|
|
37
|
+
r["tedi-input-group"],
|
|
37
38
|
{
|
|
38
|
-
[
|
|
39
|
-
[
|
|
40
|
-
[
|
|
41
|
-
[
|
|
39
|
+
[r["tedi-input-group--addons"]]: P,
|
|
40
|
+
[r["tedi-input-group--has-prefix"]]: p,
|
|
41
|
+
[r["tedi-input-group--has-suffix"]]: a,
|
|
42
|
+
[r["tedi-input-group--disabled"]]: i,
|
|
43
|
+
[r["tedi-input-group--invalid"]]: s
|
|
42
44
|
},
|
|
43
45
|
u
|
|
44
|
-
), R = () => !
|
|
45
|
-
return /* @__PURE__ */
|
|
46
|
-
o && /* @__PURE__ */ e(
|
|
47
|
-
/* @__PURE__ */ e("div", {
|
|
46
|
+
), R = () => !t || Array.isArray(t) && t.length === 0 ? null : /* @__PURE__ */ e("div", { className: r["tedi-input-group__feedback-wrapper"], children: Array.isArray(t) ? t.map((k, g) => /* @__PURE__ */ e(G, { ...k, id: `group-helper-${g}` }, g)) : /* @__PURE__ */ e(G, { ...t, id: "group-helper" }) });
|
|
47
|
+
return /* @__PURE__ */ e(f.Provider, { value: C, children: /* @__PURE__ */ F("div", { ref: m, className: A, "data-name": "tedi-input-group", "aria-disabled": i, children: [
|
|
48
|
+
o && /* @__PURE__ */ e(B, { ..._, label: o, id: n }),
|
|
49
|
+
/* @__PURE__ */ e("div", { className: r["tedi-input-group__row"], children: y }),
|
|
48
50
|
R()
|
|
49
|
-
] });
|
|
51
|
+
] }) });
|
|
50
52
|
}
|
|
51
53
|
);
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
h.displayName = "InputGroup";
|
|
55
|
+
const d = h;
|
|
56
|
+
d.Prefix = O;
|
|
57
|
+
d.Suffix = T;
|
|
58
|
+
d.Input = M;
|
|
57
59
|
export {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
h as InputGroupBase,
|
|
61
|
+
d as default,
|
|
62
|
+
W as useInputGroup,
|
|
63
|
+
X as useOptionalInputGroup
|
|
62
64
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i={"tedi-input-group":"tedi-input-group-3de08ee1","tedi-input-group__prefix":"tedi-input-group__prefix-056c2ccf","tedi-input-group__suffix":"tedi-input-group__suffix-9c330042","tedi-input-group__input":"tedi-input-group__input-5454624d","tedi-input-group__prefix--no-inner-div":"tedi-input-group__prefix--no-inner-div-4bc9b815","tedi-input-group__suffix--no-inner-div":"tedi-input-group__suffix--no-inner-div-283ea370","tedi-input-group--addons":"tedi-input-group--addons-7bd99e72","tedi-input-group--disabled":"tedi-input-group--disabled-f5db06aa","tedi-input-group--has-prefix":"tedi-input-group--has-prefix-e845fcb0","tedi-input-group--has-suffix":"tedi-input-group--has-suffix-994ab888","tedi-input-group__feedback-wrapper":"tedi-input-group__feedback-wrapper-bfbe3cb2"};exports.default=i;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i={"tedi-input-group":"tedi-input-group-3de08ee1","tedi-input-group__row":"tedi-input-group__row-60941c6f","tedi-input-group__prefix":"tedi-input-group__prefix-056c2ccf","tedi-input-group__suffix":"tedi-input-group__suffix-9c330042","tedi-input-group__input":"tedi-input-group__input-5454624d","tedi-input-group__prefix--no-inner-div":"tedi-input-group__prefix--no-inner-div-4bc9b815","tedi-input-group__suffix--no-inner-div":"tedi-input-group__suffix--no-inner-div-283ea370","tedi-input-group--addons":"tedi-input-group--addons-7bd99e72","tedi-input-group--invalid":"tedi-input-group--invalid-de02528b","tedi-input-group--disabled":"tedi-input-group--disabled-f5db06aa","tedi-input-group--has-prefix":"tedi-input-group--has-prefix-e845fcb0","tedi-input-group--has-suffix":"tedi-input-group--has-suffix-994ab888","tedi-input-group__feedback-wrapper":"tedi-input-group__feedback-wrapper-bfbe3cb2"};exports.default=i;
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
const i = {
|
|
2
2
|
"tedi-input-group": "tedi-input-group-3de08ee1",
|
|
3
|
+
"tedi-input-group__row": "tedi-input-group__row-60941c6f",
|
|
3
4
|
"tedi-input-group__prefix": "tedi-input-group__prefix-056c2ccf",
|
|
4
5
|
"tedi-input-group__suffix": "tedi-input-group__suffix-9c330042",
|
|
5
6
|
"tedi-input-group__input": "tedi-input-group__input-5454624d",
|
|
6
7
|
"tedi-input-group__prefix--no-inner-div": "tedi-input-group__prefix--no-inner-div-4bc9b815",
|
|
7
8
|
"tedi-input-group__suffix--no-inner-div": "tedi-input-group__suffix--no-inner-div-283ea370",
|
|
8
9
|
"tedi-input-group--addons": "tedi-input-group--addons-7bd99e72",
|
|
10
|
+
"tedi-input-group--invalid": "tedi-input-group--invalid-de02528b",
|
|
9
11
|
"tedi-input-group--disabled": "tedi-input-group--disabled-f5db06aa",
|
|
10
12
|
"tedi-input-group--has-prefix": "tedi-input-group--has-prefix-e845fcb0",
|
|
11
13
|
"tedi-input-group--has-suffix": "tedi-input-group--has-suffix-994ab888",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const f=require("react/jsx-runtime"),m=require("../../../../../../external/classnames/index.cjs.js"),p=require("react"),o=require("../footer.module.scss.cjs.js"),B=require("../footer-context.cjs.js"),b=require("../../../../helpers/hooks/use-breakpoint-props.cjs.js"),s=require("../../../../helpers/hooks/use-breakpoint.cjs.js"),t=r=>{const{getCurrentBreakpointProps:u}=b.useBreakpointProps(r.defaultServerBreakpoint),{children:a,className:d,columns:e}=u(r),l=s.useBreakpoint(),{mobileBreakpoint:c}=p.useContext(B.FooterContext),i=s.isBreakpointBelow(l,c),n=!i&&typeof e=="number"&&e>0;return f.jsx("div",{"data-name":"footer-body",className:m.default(o.default["tedi-footer-body"],{[o.default["tedi-footer-body--mobile"]]:i,[o.default["tedi-footer-body--grid"]]:n},d),style:n?{gridTemplateColumns:`repeat(${e}, minmax(0, 1fr))`}:void 0,children:a})};t.displayName="Footer.Body";exports.FooterBody=t;exports.default=t;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { BreakpointSupport } from '../../../../helpers';
|
|
3
|
+
type FooterBodyBreakpointProps = {
|
|
4
|
+
/**
|
|
5
|
+
* Number of equal-width columns laid out per row, controllable per breakpoint via the
|
|
6
|
+
* `sm`/`md`/`lg`/`xl`/`xxl` keys. The keys are **mobile-first** — a value applies at that
|
|
7
|
+
* breakpoint and up — so raise the count as the viewport widens
|
|
8
|
+
* (e.g. `columns={2} md={{ columns: 3 }} lg={{ columns: 4 }}`). When set, the body uses a CSS grid
|
|
9
|
+
* of `columns` equal tracks; when omitted, columns are content-sized and spread with
|
|
10
|
+
* `space-between` (the default). Ignored below the footer's `mobileBreakpoint`, where the body
|
|
11
|
+
* always stacks into a single column.
|
|
12
|
+
*/
|
|
13
|
+
columns?: number;
|
|
14
|
+
};
|
|
15
|
+
export interface FooterBodyProps extends BreakpointSupport<FooterBodyBreakpointProps> {
|
|
16
|
+
/**
|
|
17
|
+
* `<Footer.Section>` children. Other nodes render verbatim but won't pick up the
|
|
18
|
+
* mobile-collapse behaviour.
|
|
19
|
+
*/
|
|
20
|
+
children: ReactNode;
|
|
21
|
+
/**
|
|
22
|
+
* Additional class name.
|
|
23
|
+
*/
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const FooterBody: {
|
|
27
|
+
(props: FooterBodyProps): JSX.Element;
|
|
28
|
+
displayName: string;
|
|
29
|
+
};
|
|
30
|
+
export default FooterBody;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import l from "../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { useContext as f } from "react";
|
|
4
|
+
import e from "../footer.module.scss.es.js";
|
|
5
|
+
import { FooterContext as c } from "../footer-context.es.js";
|
|
6
|
+
import { useBreakpointProps as u } from "../../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
7
|
+
import { useBreakpoint as y, isBreakpointBelow as b } from "../../../../helpers/hooks/use-breakpoint.es.js";
|
|
8
|
+
const B = (t) => {
|
|
9
|
+
const { getCurrentBreakpointProps: s } = u(t.defaultServerBreakpoint), { children: m, className: a, columns: o } = s(t), n = y(), { mobileBreakpoint: d } = f(c), r = b(n, d), i = !r && typeof o == "number" && o > 0;
|
|
10
|
+
return /* @__PURE__ */ p(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
"data-name": "footer-body",
|
|
14
|
+
className: l(
|
|
15
|
+
e["tedi-footer-body"],
|
|
16
|
+
{ [e["tedi-footer-body--mobile"]]: r, [e["tedi-footer-body--grid"]]: i },
|
|
17
|
+
a
|
|
18
|
+
),
|
|
19
|
+
style: i ? { gridTemplateColumns: `repeat(${o}, minmax(0, 1fr))` } : void 0,
|
|
20
|
+
children: m
|
|
21
|
+
}
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
B.displayName = "Footer.Body";
|
|
25
|
+
export {
|
|
26
|
+
B as FooterBody,
|
|
27
|
+
B as default
|
|
28
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),p=require("../../../../../../external/classnames/index.cjs.js"),o=require("react"),r=require("../footer.module.scss.cjs.js"),x=require("../footer-context.cjs.js"),d=require("../../../../helpers/hooks/use-breakpoint.cjs.js"),s=({children:a,separator:u=!1,className:m})=>{const c=d.useBreakpoint(),{mobileBreakpoint:f,maxWidth:n}=o.useContext(x.FooterContext),b=d.isBreakpointBelow(c,f),i=u?o.Children.toArray(a).filter(e=>o.isValidElement(e)||e):null;return t.jsx("div",{"data-name":"footer-bottom",className:p.default(r.default["tedi-footer-bottom"],{[r.default["tedi-footer-bottom--mobile"]]:b},m),children:t.jsx("div",{className:r.default["tedi-footer-bottom__inner"],style:n!==void 0?{maxWidth:n}:void 0,children:i?i.map((e,l)=>t.jsxs(o.Fragment,{children:[e,l<i.length-1&&t.jsx("span",{className:r.default["tedi-footer-bottom__dot"],"aria-hidden":"true"})]},l)):a})})};s.displayName="Footer.Bottom";exports.FooterBottom=s;exports.default=s;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface FooterBottomProps {
|
|
3
|
+
/**
|
|
4
|
+
* Bottom-row content — typically a sequence of `<Link>` elements. On mobile the gap shrinks
|
|
5
|
+
* and items wrap to multiple lines.
|
|
6
|
+
*/
|
|
7
|
+
children: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Insert a small dot between items (matches the Figma "with separator" bottom variant). When
|
|
10
|
+
* `false`, items are spaced only by the flex `gap`.
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
separator?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Additional class name on the bottom strip.
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const FooterBottom: {
|
|
20
|
+
({ children, separator, className }: FooterBottomProps): JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export default FooterBottom;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as r, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import c from "../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { useContext as b, Children as u, isValidElement as B, Fragment as h } from "react";
|
|
4
|
+
import t from "../footer.module.scss.es.js";
|
|
5
|
+
import { FooterContext as x } from "../footer-context.es.js";
|
|
6
|
+
import { useBreakpoint as N, isBreakpointBelow as k } from "../../../../helpers/hooks/use-breakpoint.es.js";
|
|
7
|
+
const v = ({ children: i, separator: a = !1, className: n }) => {
|
|
8
|
+
const l = N(), { mobileBreakpoint: d, maxWidth: m } = b(x), f = k(l, d), e = a ? u.toArray(i).filter((o) => B(o) || o) : null;
|
|
9
|
+
return /* @__PURE__ */ r(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
"data-name": "footer-bottom",
|
|
13
|
+
className: c(t["tedi-footer-bottom"], { [t["tedi-footer-bottom--mobile"]]: f }, n),
|
|
14
|
+
children: /* @__PURE__ */ r("div", { className: t["tedi-footer-bottom__inner"], style: m !== void 0 ? { maxWidth: m } : void 0, children: e ? e.map((o, s) => /* @__PURE__ */ p(h, { children: [
|
|
15
|
+
o,
|
|
16
|
+
s < e.length - 1 && /* @__PURE__ */ r("span", { className: t["tedi-footer-bottom__dot"], "aria-hidden": "true" })
|
|
17
|
+
] }, s)) : i })
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
};
|
|
21
|
+
v.displayName = "Footer.Bottom";
|
|
22
|
+
export {
|
|
23
|
+
v as FooterBottom,
|
|
24
|
+
v as default
|
|
25
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),t=e.createContext({mobileBreakpoint:"sm"});exports.FooterContext=t;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Breakpoint } from '../../../helpers';
|
|
2
|
+
export interface FooterContextValue {
|
|
3
|
+
/**
|
|
4
|
+
* Viewport breakpoint at and below which every Footer subcomponent
|
|
5
|
+
* (`Footer.Body`, `Footer.Bottom`, `Footer.Side`, `Footer.Section`)
|
|
6
|
+
* switches to its stacked mobile layout — accordion sections, stacked
|
|
7
|
+
* sides, wrapped bottom strip.
|
|
8
|
+
*
|
|
9
|
+
* Set on `<Footer mobileBreakpoint="…">`. Subcomponents read from this
|
|
10
|
+
* context so all five sites agree on the threshold; without it they'd
|
|
11
|
+
* each hardcode their own value and drift apart on intermediate
|
|
12
|
+
* viewports (e.g. tablet 600–760px).
|
|
13
|
+
*/
|
|
14
|
+
mobileBreakpoint: Breakpoint;
|
|
15
|
+
/**
|
|
16
|
+
* Optional cap for the inner content width (the column row and the bottom
|
|
17
|
+
* strip's content), centered inside the full-bleed backgrounds. Set on
|
|
18
|
+
* `<Footer maxWidth="…">`; subcomponents read it so the body row and the
|
|
19
|
+
* bottom strip align to the same width.
|
|
20
|
+
*/
|
|
21
|
+
maxWidth?: number | string;
|
|
22
|
+
}
|
|
23
|
+
export declare const FooterContext: import('react').Context<FooterContextValue>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),d=require("../../../../../../external/classnames/index.cjs.js"),u=require("react"),g=require("../../../base/icon/icon.cjs.js"),q=require("../../../base/typography/heading/heading.cjs.js"),b=require("../../../buttons/collapse/collapse.cjs.js"),t=require("../footer.module.scss.cjs.js"),v=require("../footer-context.cjs.js"),s=require("../../../../helpers/hooks/use-breakpoint.cjs.js"),i=({heading:o,icon:n,collapsible:f=!1,defaultOpen:p=!1,iconBreakpoint:m="lg",children:r,className:_})=>{const l=s.useBreakpoint(),{mobileBreakpoint:x}=u.useContext(v.FooterContext),c=s.isBreakpointBelow(l,x),j=s.isBreakpointBelow(l,m),a=f&&c,h=u.useId();return e.jsxs("div",{"data-name":"footer-section",className:d.default(t.default["tedi-footer-section"],{[t.default["tedi-footer-section--collapsible"]]:a},_),children:[n&&!j&&e.jsx("span",{className:t.default["tedi-footer-section__icon"],children:e.jsx(g.Icon,{name:n,color:"white",size:24})}),e.jsx("div",{className:d.default(t.default["tedi-footer-section__container"],{[t.default["tedi-footer-section__container--mobile"]]:c}),children:a?e.jsx(b.Collapse,{id:`tedi-footer-section-${h}`,title:e.jsx(q.Heading,{element:"h6",color:"white",children:o}),size:"small",inverted:!0,hideCollapseText:!0,defaultOpen:p,toggleLabel:typeof o=="string"?o:void 0,className:t.default["tedi-footer-section__collapse"],titleRowProps:{gutter:0},children:e.jsx("div",{className:t.default["tedi-footer-section__content-inner"],children:r})}):e.jsxs(e.Fragment,{children:[e.jsx("strong",{className:t.default["tedi-footer-section__heading"],children:o}),e.jsx("div",{className:t.default["tedi-footer-section__content"],children:r})]})})]})};i.displayName="Footer.Section";exports.FooterSection=i;exports.default=i;
|