@tedi-design-system/react 15.0.0-rc.3 → 15.0.0-rc.5
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/community.cjs.js +1 -1
- package/community.es.js +219 -225
- package/index.css +1 -1
- package/package.json +1 -1
- package/src/community/components/accordion/accordion-item-header/accordion-item-header.cjs.js +1 -1
- package/src/community/components/accordion/accordion-item-header/accordion-item-header.es.js +2 -2
- package/src/community/components/button-content/button-content.cjs.js +1 -1
- package/src/community/components/button-content/button-content.d.ts +1 -1
- package/src/community/components/button-content/button-content.es.js +39 -33
- package/src/community/components/form/select/select.cjs.js +1 -1
- package/src/community/components/form/select/select.d.ts +1 -1
- package/src/community/components/form/select/select.es.js +33 -33
- package/src/community/components/form/text-editor/components/style-button.cjs.js +1 -1
- package/src/community/components/form/text-editor/components/style-button.es.js +2 -2
- package/src/community/components/form/toggle/toggle.cjs.js +1 -1
- package/src/community/components/form/toggle/toggle.es.js +4 -4
- package/src/community/components/layout/breadcrumbs/crumb/crumb.cjs.js +1 -1
- package/src/community/components/layout/breadcrumbs/crumb/crumb.es.js +9 -9
- package/src/community/components/layout/footer/footer.cjs.js +1 -1
- package/src/community/components/layout/footer/footer.d.ts +1 -1
- package/src/community/components/layout/footer/footer.es.js +22 -22
- package/src/community/components/layout/header/components/header-language/header-language.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-language/header-language.es.js +8 -8
- package/src/community/components/layout/header/components/header-modal/header-modal.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-modal/header-modal.es.js +6 -6
- package/src/community/components/layout/header/components/header-notification/header-notification.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-notification/header-notification.es.js +4 -4
- package/src/community/components/layout/header/components/header-role/header-role.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-role/header-role.es.js +19 -19
- package/src/community/components/layout/header/components/header-settings/header-settings.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-settings/header-settings.es.js +1 -1
- package/src/community/components/layout/sidenav/sidenav.cjs.js +1 -1
- package/src/community/components/layout/sidenav/sidenav.d.ts +1 -1
- package/src/community/components/layout/sidenav/sidenav.es.js +39 -34
- package/src/community/components/placeholder/placeholder.cjs.js +1 -1
- package/src/community/components/placeholder/placeholder.d.ts +1 -1
- package/src/community/components/placeholder/placeholder.es.js +21 -20
- package/src/community/components/stepper/stepper-nav.cjs.js +1 -1
- package/src/community/components/stepper/stepper-nav.es.js +1 -1
- package/src/community/components/table/components/helpers.cjs.js +1 -1
- package/src/community/components/table/components/helpers.es.js +1 -1
- package/src/community/components/table/components/pagination/PaginationNextButton.cjs.js +1 -1
- package/src/community/components/table/components/pagination/PaginationNextButton.es.js +1 -1
- package/src/community/components/table/components/pagination/pagination.cjs.js +1 -1
- package/src/community/components/table/components/pagination/pagination.es.js +4 -4
- package/src/community/components/table/components/table-filter/components/table-date-filter.cjs.js +1 -1
- package/src/community/components/table/components/table-filter/components/table-date-filter.es.js +1 -1
- package/src/community/components/table/components/table-filter/components/table-select-filter.cjs.js +1 -1
- package/src/community/components/table/components/table-filter/components/table-select-filter.es.js +5 -5
- package/src/community/components/table-of-contents/table-of-contents-item.cjs.js +1 -1
- package/src/community/components/table-of-contents/table-of-contents-item.es.js +18 -18
- package/src/community/components/table-of-contents/table-of-contents-items.cjs.js +1 -1
- package/src/community/components/table-of-contents/table-of-contents-items.es.js +1 -1
- package/src/community/components/table-of-contents/table-of-contents-modal.cjs.js +1 -1
- package/src/community/components/table-of-contents/table-of-contents-modal.es.js +13 -13
- package/src/community/components/toggle-open/toggle-open.d.ts +1 -1
- package/src/community/components/tooltip/tooltip-trigger.cjs.js +1 -1
- package/src/community/components/tooltip/tooltip-trigger.es.js +1 -1
- package/src/community/components/vertical-progress/vertical-progress-item.cjs.js +1 -1
- package/src/community/components/vertical-progress/vertical-progress-item.es.js +4 -4
- package/src/community/index.d.ts +0 -3
- package/src/tedi/components/base/icon/icon.d.ts +1 -1
- package/src/tedi/components/base/icon/icon.module.scss.cjs.js +1 -1
- package/src/tedi/components/base/icon/icon.module.scss.es.js +1 -0
- package/src/tedi/components/content/label/label.d.ts +1 -1
- package/src/community/components/icon/icon.cjs.js +0 -1
- package/src/community/components/icon/icon.d.ts +0 -49
- package/src/community/components/icon/icon.es.js +0 -47
- package/src/community/components/icon/icon.module.scss.cjs.js +0 -1
- package/src/community/components/icon/icon.module.scss.es.js +0 -9
- package/src/community/components/typography/heading/heading.cjs.js +0 -1
- package/src/community/components/typography/heading/heading.d.ts +0 -11
- package/src/community/components/typography/heading/heading.es.js +0 -10
- package/src/community/components/typography/text/text.cjs.js +0 -1
- package/src/community/components/typography/text/text.d.ts +0 -43
- package/src/community/components/typography/text/text.es.js +0 -26
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
|
2
2
|
import g from "react";
|
|
3
|
-
import { Icon as d } from "
|
|
3
|
+
import { Icon as d } from "../../../../../tedi/components/base/icon/icon.es.js";
|
|
4
4
|
import { TableContext as x } from "../../table-context.es.js";
|
|
5
5
|
import a from "./pagination.module.scss.es.js";
|
|
6
6
|
import { useLabels as u } from "../../../../../tedi/providers/label-provider/use-labels.es.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),S=require("../../../../../../external/classnames/index.cjs.js"),h=require("react"),j=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("react/jsx-runtime"),S=require("../../../../../../external/classnames/index.cjs.js"),h=require("react"),j=require("../../../../../tedi/components/base/typography/text/text.cjs.js"),_=require("../../../form/select/select.cjs.js"),m=require("../../table-context.cjs.js"),l=require("./pagination.module.scss.cjs.js"),y=require("./PaginationNextButton.cjs.js"),z=require("./PaginationPageButton.cjs.js"),C=require("./use-pagination.cjs.js"),L=require("../../../../../tedi/providers/label-provider/use-labels.cjs.js"),N=s=>{const{getLabel:i}=L.useLabels(),{table:r,id:u}=h.useContext(m.TableContext),c=i("pagination.results",s.totalRows),{setPageSize:g,getState:d,getPageCount:p}=r,{pageIndex:b,pageSize:n}=d().pagination,o=[{value:"5",label:"5"},{value:"10",label:"10"},{value:"20",label:"20"},{value:"50",label:"50"},{value:"100",label:"100"}],v=Math.ceil(s.totalRows/n),{paginationItems:x}=C.usePagination({page:b+1,count:v}),f=o.find(e=>e.value===String(n))??{value:String(n),label:String(n)},P=e=>{const t=parseInt((e==null?void 0:e.value)||"10");g(t)},q=(e,t)=>e.type==="previous"||e.type==="next"?a.jsx(y.default,{type:e.type},t):e.type==="ellipsis"?a.jsx("li",{className:S.default(l.default.pagination__page),children:"..."},t):a.jsx(z.default,{item:e},t);return a.jsxs("div",{className:l.default.pagination__wrapper,children:[a.jsxs(j.Text,{color:"secondary",modifiers:"small",children:[s.totalRows," ",c]}),p()>1&&a.jsx("nav",{role:"navigation","aria-label":i("pagination.title"),className:l.default.pagination,children:a.jsx("ul",{className:l.default.pagination__pages,children:x.map((e,t)=>q(e,t))})}),a.jsx(_.Select,{id:`page-size-${u}`,label:i("pagination.page-size"),hideLabel:!0,isSearchable:!1,isClearable:!1,onChange:e=>P(e),value:f,size:"small",options:o})]})};exports.default=N;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import _ from "../../../../../../external/classnames/index.es.js";
|
|
3
3
|
import x from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Text as y } from "../../../../../tedi/components/base/typography/text/text.es.js";
|
|
5
|
+
import { Select as z } from "../../../form/select/select.es.js";
|
|
6
6
|
import { TableContext as N } from "../../table-context.es.js";
|
|
7
7
|
import n from "./pagination.module.scss.es.js";
|
|
8
8
|
import C from "./PaginationNextButton.es.js";
|
|
@@ -27,14 +27,14 @@ const D = (i) => {
|
|
|
27
27
|
u(e);
|
|
28
28
|
}, S = (a, e) => a.type === "previous" || a.type === "next" ? /* @__PURE__ */ t(C, { type: a.type }, e) : a.type === "ellipsis" ? /* @__PURE__ */ t("li", { className: _(n.pagination__page), children: "..." }, e) : /* @__PURE__ */ t(w, { item: a }, e);
|
|
29
29
|
return /* @__PURE__ */ r("div", { className: n.pagination__wrapper, children: [
|
|
30
|
-
/* @__PURE__ */ r(
|
|
30
|
+
/* @__PURE__ */ r(y, { color: "secondary", modifiers: "small", children: [
|
|
31
31
|
i.totalRows,
|
|
32
32
|
" ",
|
|
33
33
|
c
|
|
34
34
|
] }),
|
|
35
35
|
f() > 1 && /* @__PURE__ */ t("nav", { role: "navigation", "aria-label": o("pagination.title"), className: n.pagination, children: /* @__PURE__ */ t("ul", { className: n.pagination__pages, children: v.map((a, e) => S(a, e)) }) }),
|
|
36
36
|
/* @__PURE__ */ t(
|
|
37
|
-
|
|
37
|
+
z,
|
|
38
38
|
{
|
|
39
39
|
id: `page-size-${p}`,
|
|
40
40
|
label: o("pagination.page-size"),
|
package/src/community/components/table/components/table-filter/components/table-date-filter.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("dayjs"),_=require("../../../../../../../external/formik/dist/formik.esm.cjs.js"),q=require("react"),c=require("../../../../../../../external/yup/index.esm.cjs.js")
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),n=require("dayjs"),_=require("../../../../../../../external/formik/dist/formik.esm.cjs.js"),q=require("react"),c=require("../../../../../../../external/yup/index.esm.cjs.js"),$=require("../../../../../../tedi/components/base/typography/text/text.cjs.js"),y=require("../../../../button/button.cjs.js"),A=require("../table-filter-context.cjs.js"),C=require("../../../../form/pickers/datepicker/datepicker.cjs.js"),M=require("../../../../../../tedi/providers/label-provider/use-labels.cjs.js"),v=require("../../../../../../tedi/components/layout/vertical-spacing/vertical-spacing.cjs.js"),z=require("../../../../../../tedi/components/layout/grid/row.cjs.js"),D=require("../../../../../../tedi/components/layout/grid/col.cjs.js"),G=()=>{var m,x,j,p,S;const{getLabel:a}=M.useLabels(),{column:t,open:b,setOpen:l,values:f}=q.useContext(A.TableFilterContext),k={dateRangeField:f==null?void 0:f.dateRange},s=(m=t==null?void 0:t.columnDef)==null?void 0:m.meta,T=(s==null?void 0:s.startDatePicker)??{},P=(s==null?void 0:s.endDatePicker)??{},B=a("table.filter"),F=a("table.filter.from"),R=a("table.filter.to"),u=`filter-date-${t==null?void 0:t.id}-from`,L=`filter-date-${t==null?void 0:t.id}-to`,I=a("table.filter.validation.to-before-from"),w=c.object().shape({dateRangeField:c.object().shape({from:c.string().defined().nullable(),to:c.string().defined().nullable().test("to-before-from",I,function(e){const{from:r}=this.parent;return!(e&&r&&n(e).isBefore(n(r),"day"))})})}),{values:i,errors:h,setFieldValue:g,handleReset:V,handleSubmit:E}=_.useFormik({initialValues:k,validationSchema:w,onSubmit:e=>{t==null||t.setFilterValue(e.dateRangeField),l==null||l(!1)},onReset:()=>{t==null||t.setFilterValue(""),l==null||l(!1)}});return q.useEffect(()=>{var e;if(b&&!i.dateRangeField){const r=document.getElementById(u);(e=r==null?void 0:r.focus)==null||e.call(r,{preventScroll:!0})}},[t==null?void 0:t.id,i.dateRangeField,b,u]),o.jsx("form",{onSubmit:E,children:o.jsxs(v.VerticalSpacing,{children:[o.jsx($.Text,{modifiers:"h5",children:B}),o.jsx(C.DatePicker,{id:u,label:F,...T,name:F,value:(x=i.dateRangeField)!=null&&x.from?n(i.dateRangeField.from):null,input:{autoComplete:"off"},onChange:e=>{var r,d;g("dateRangeField.from",(e==null?void 0:e.toISOString())??null),e&&((r=i.dateRangeField)!=null&&r.to)&&n(e).isAfter(n((d=i.dateRangeField)==null?void 0:d.to),"day")&&g("dateRangeField.to",null)}}),o.jsx(C.DatePicker,{id:L,label:R,shouldDisableDate:e=>{var r,d;return!!((r=i.dateRangeField)!=null&&r.from&&n(e).isBefore(n((d=i.dateRangeField)==null?void 0:d.from),"day"))},...P,name:R,value:(j=i.dateRangeField)!=null&&j.to?n((p=i.dateRangeField)==null?void 0:p.to):null,input:{autoComplete:"off"},onChange:e=>g("dateRangeField.to",(e==null?void 0:e.toISOString())??null),helper:(S=h.dateRangeField)!=null&&S.to?{text:h.dateRangeField.to,type:"error"}:void 0}),o.jsxs(z.Row,{gutter:2,justifyContent:"end",children:[o.jsx(D.Col,{width:"auto",children:o.jsx(y.Button,{visualType:"secondary",onClick:V,children:a("clear")})}),o.jsx(D.Col,{width:"auto",children:o.jsx(y.Button,{type:"submit",children:a("table.filter")})})]})]})})};exports.TableDateFilter=G;
|
package/src/community/components/table/components/table-filter/components/table-date-filter.es.js
CHANGED
|
@@ -3,8 +3,8 @@ import a from "dayjs";
|
|
|
3
3
|
import { useFormik as q } from "../../../../../../../external/formik/dist/formik.esm.es.js";
|
|
4
4
|
import D from "react";
|
|
5
5
|
import { object as x, string as T } from "../../../../../../../external/yup/index.esm.es.js";
|
|
6
|
+
import { Text as z } from "../../../../../../tedi/components/base/typography/text/text.es.js";
|
|
6
7
|
import { Button as j } from "../../../../button/button.es.js";
|
|
7
|
-
import { Text as z } from "../../../../typography/text/text.es.js";
|
|
8
8
|
import { TableFilterContext as G } from "../table-filter-context.es.js";
|
|
9
9
|
import { DatePicker as k } from "../../../../form/pickers/datepicker/datepicker.es.js";
|
|
10
10
|
import { useLabels as H } from "../../../../../../tedi/providers/label-provider/use-labels.es.js";
|
package/src/community/components/table/components/table-filter/components/table-select-filter.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),B=require("../../../../../../../external/formik/dist/formik.esm.cjs.js"),G=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),B=require("../../../../../../../external/formik/dist/formik.esm.cjs.js"),G=require("react"),N=require("../../../../../../tedi/components/base/typography/heading/heading.cjs.js"),F=require("../../../../button/button.cjs.js"),z=require("../../../../card/card.cjs.js"),P=require("../../../../card/card-content/card-content.cjs.js"),S=require("../../../table.module.scss.cjs.js"),H=require("../table-filter-context.cjs.js"),I=require("../../../../form/choice-group/choice-group.cjs.js"),M=require("../../../../../../tedi/providers/label-provider/use-labels.cjs.js"),A=require("../../../../../../tedi/components/layout/vertical-spacing/vertical-spacing.cjs.js"),E=require("../../../../../../tedi/components/layout/grid/row.cjs.js"),q=require("../../../../../../tedi/components/layout/grid/col.cjs.js"),y=s=>{var e,o;return(o=(e=s==null?void 0:s.filter(Boolean))==null?void 0:e.filter((i,r,l)=>(l==null?void 0:l.indexOf(i))===r))==null?void 0:o.sort((i,r)=>{var l;return typeof i=="number"&&typeof r=="number"?i-r:typeof i=="string"&&typeof r=="string"?(l=i==null?void 0:i.localeCompare)==null?void 0:l.call(i,r):0})},J=()=>{var m,C,j,x;const{getLabel:s}=M.useLabels(),{column:e,rows:o,setOpen:i,values:r}=G.useContext(H.TableFilterContext),l=s("table.filter"),f=(m=e==null?void 0:e.columnDef)==null?void 0:m.filterFn,c=f==="select"?"selectFilter":"multiSelectFilter",T={inputType:f,selectFilter:r==null?void 0:r.selectField,multiSelectFilter:r==null?void 0:r.multiSelectField},h=(C=e==null?void 0:e.columnDef)==null?void 0:C.meta,u=h==null?void 0:h.filterOptions,p=t=>typeof t=="object"&&t!==null&&"id"in t&&"label"in t&&"value"in t,k=o!=null&&o.length&&typeof((j=e==null?void 0:e.columnDef)==null?void 0:j.id)=="string"?o.map(t=>{var d,a;return(a=t==null?void 0:t.getValue)==null?void 0:a.call(t,(d=e==null?void 0:e.columnDef)==null?void 0:d.id)}):[],b=u!=null&&u.length?p(u[0])?u:y(u):y(k),R=b==null?void 0:b.map((t,d)=>{var a;return p(t)?t:{id:`${(a=e==null?void 0:e.columnDef)==null?void 0:a.id}-choice-${d}`,label:String(t),value:String(t)}}),{values:_,setFieldValue:D,handleReset:L,handleSubmit:$,errors:g}=B.useFormik({initialValues:T,onSubmit:t=>{var d;e==null||e.setFilterValue((d=t[c])!=null&&d.length?t[c]:""),i==null||i(!1)},onReset:()=>{e==null||e.setFilterValue(""),i==null||i(!1)}}),v=t=>D(c,t);return n.jsx("form",{onSubmit:$,children:n.jsxs(A.VerticalSpacing,{children:[n.jsx(N.Heading,{element:"h6",children:s("table.filter")}),n.jsx(z.Card,{className:S.default.filter__content,children:n.jsx(P.CardContent,{children:n.jsx(I.ChoiceGroup,{id:`filter-${c}-${e==null?void 0:e.id}`,name:l,label:l,hideLabel:!0,inputType:f==="select"?"radio":"checkbox",size:"small",value:_[c],indeterminateCheck:!0,indeterminateCheckProps:{indented:!1,className:S.default.filter__indeterminate},items:R,onChange:v,helper:((x=g[c])==null?void 0:x.length)!==0?{text:g[c],type:"error"}:{text:""}})})}),n.jsxs(E.Row,{gutter:2,justifyContent:"end",children:[n.jsx(q.Col,{width:"auto",children:n.jsx(F.Button,{visualType:"secondary",onClick:L,children:s("clear")})}),n.jsx(q.Col,{width:"auto",children:n.jsx(F.Button,{type:"submit",children:s("table.filter")})})]})]})})};exports.TableSelectFilter=J;
|
package/src/community/components/table/components/table-filter/components/table-select-filter.es.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as n, jsxs as y } from "react/jsx-runtime";
|
|
2
2
|
import { useFormik as G } from "../../../../../../../external/formik/dist/formik.esm.es.js";
|
|
3
3
|
import v from "react";
|
|
4
|
+
import { Heading as H } from "../../../../../../tedi/components/base/typography/heading/heading.es.js";
|
|
4
5
|
import { Button as _ } from "../../../../button/button.es.js";
|
|
5
|
-
import { Card as
|
|
6
|
-
import { CardContent as
|
|
7
|
-
import { Heading as P } from "../../../../typography/heading/heading.es.js";
|
|
6
|
+
import { Card as I } from "../../../../card/card.es.js";
|
|
7
|
+
import { CardContent as P } from "../../../../card/card-content/card-content.es.js";
|
|
8
8
|
import k from "../../../table.module.scss.es.js";
|
|
9
9
|
import { TableFilterContext as q } from "../table-filter-context.es.js";
|
|
10
10
|
import { ChoiceGroup as A } from "../../../../form/choice-group/choice-group.es.js";
|
|
@@ -46,8 +46,8 @@ const D = (o) => {
|
|
|
46
46
|
}
|
|
47
47
|
}), B = (t) => $(f, t);
|
|
48
48
|
return /* @__PURE__ */ n("form", { onSubmit: z, children: /* @__PURE__ */ y(J, { children: [
|
|
49
|
-
/* @__PURE__ */ n(
|
|
50
|
-
/* @__PURE__ */ n(
|
|
49
|
+
/* @__PURE__ */ n(H, { element: "h6", children: o("table.filter") }),
|
|
50
|
+
/* @__PURE__ */ n(I, { className: k.filter__content, children: /* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(
|
|
51
51
|
A,
|
|
52
52
|
{
|
|
53
53
|
id: `filter-${f}-${e == null ? void 0 : e.id}`,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),q=require("../../../../external/classnames/index.cjs.js"),g=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),q=require("../../../../external/classnames/index.cjs.js"),g=require("react"),u=require("../../../tedi/components/base/icon/icon.cjs.js"),w=require("../../../tedi/components/base/typography/text/text.cjs.js"),_=require("../../../tedi/components/misc/separator/separator.cjs.js"),O=require("./table-of-contents.cjs.js"),l=require("./table-of-contents.module.scss.cjs.js"),r=require("../../../tedi/components/layout/grid/col.cjs.js"),x=require("../../../tedi/components/layout/grid/row.cjs.js");function f(h){const{children:s,content:o,isValid:c,separator:j,hideIcon:m,id:t,handleCloseModal:a}=h,{openItems:n,showIcons:C}=g.useContext(O.TableOfContentsContext),i=q.default(l.default["table-of-contents__icon"],{[l.default["table-of-contents__icon--hidden"]]:m});return e.jsxs(e.Fragment,{children:[e.jsx(r.Col,{role:"treeitem","aria-expanded":!!(t&&(n!=null&&n.includes(t))),children:e.jsxs(x.Row,{gutter:2,children:[C&&e.jsx(e.Fragment,{children:e.jsx(r.Col,{width:"auto",children:c===!1?e.jsx(u.Icon,{className:i,name:"warning",color:"danger"}):e.jsx(u.Icon,{className:i,name:"check",color:c===!0?"success":"tertiary"})})}),e.jsx(r.Col,{children:e.jsx(w.Text,{element:"div",modifiers:"break-word",children:typeof o=="function"?o==null?void 0:o({closeModal:a}):o})})]})}),t&&(n==null?void 0:n.includes(t))&&(s==null?void 0:s.map((b,d)=>e.jsx(r.Col,{children:e.jsx(x.Row,{role:"treeitem",element:"ul",gutterX:0,gutterY:2,direction:"column",className:l.default["table-of-contents__child"],children:e.jsx(f,{...b,handleCloseModal:a},`${t}-${d}`)})},`${t}-${d}`))),j&&e.jsx(r.Col,{children:e.jsx(_.Separator,{})})]})}exports.TableOfContentsItem=f;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsxs as d, Fragment as f, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import _ from "../../../../external/classnames/index.es.js";
|
|
3
3
|
import { useContext as w } from "react";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { TableOfContentsContext as
|
|
4
|
+
import { Icon as h } from "../../../tedi/components/base/icon/icon.es.js";
|
|
5
|
+
import { Text as N } from "../../../tedi/components/base/typography/text/text.es.js";
|
|
6
|
+
import { Separator as $ } from "../../../tedi/components/misc/separator/separator.es.js";
|
|
7
|
+
import { TableOfContentsContext as y } from "./table-of-contents.es.js";
|
|
8
8
|
import l from "./table-of-contents.module.scss.es.js";
|
|
9
|
-
import { Col as
|
|
10
|
-
import { Row as
|
|
11
|
-
function
|
|
12
|
-
const { children:
|
|
13
|
-
[l["table-of-contents__icon--hidden"]]:
|
|
9
|
+
import { Col as n } from "../../../tedi/components/layout/grid/col.es.js";
|
|
10
|
+
import { Row as u } from "../../../tedi/components/layout/grid/row.es.js";
|
|
11
|
+
function T(p) {
|
|
12
|
+
const { children: i, content: t, isValid: c, separator: x, hideIcon: C, id: o, handleCloseModal: a } = p, { openItems: r, showIcons: b } = w(y), s = _(l["table-of-contents__icon"], {
|
|
13
|
+
[l["table-of-contents__icon--hidden"]]: C
|
|
14
14
|
});
|
|
15
15
|
return /* @__PURE__ */ d(f, { children: [
|
|
16
|
-
/* @__PURE__ */ e(
|
|
17
|
-
|
|
18
|
-
/* @__PURE__ */ e(
|
|
16
|
+
/* @__PURE__ */ e(n, { role: "treeitem", "aria-expanded": !!(o && (r != null && r.includes(o))), children: /* @__PURE__ */ d(u, { gutter: 2, children: [
|
|
17
|
+
b && /* @__PURE__ */ e(f, { children: /* @__PURE__ */ e(n, { width: "auto", children: c === !1 ? /* @__PURE__ */ e(h, { className: s, name: "warning", color: "danger" }) : /* @__PURE__ */ e(h, { className: s, name: "check", color: c === !0 ? "success" : "tertiary" }) }) }),
|
|
18
|
+
/* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(N, { element: "div", modifiers: "break-word", children: typeof t == "function" ? t == null ? void 0 : t({ closeModal: a }) : t }) })
|
|
19
19
|
] }) }),
|
|
20
|
-
o && (
|
|
21
|
-
|
|
20
|
+
o && (r == null ? void 0 : r.includes(o)) && (i == null ? void 0 : i.map((g, m) => /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e(
|
|
21
|
+
u,
|
|
22
22
|
{
|
|
23
23
|
role: "treeitem",
|
|
24
24
|
element: "ul",
|
|
@@ -26,12 +26,12 @@ function j(u) {
|
|
|
26
26
|
gutterY: 2,
|
|
27
27
|
direction: "column",
|
|
28
28
|
className: l["table-of-contents__child"],
|
|
29
|
-
children: /* @__PURE__ */ e(
|
|
29
|
+
children: /* @__PURE__ */ e(T, { ...g, handleCloseModal: a }, `${o}-${m}`)
|
|
30
30
|
}
|
|
31
31
|
) }, `${o}-${m}`))),
|
|
32
|
-
|
|
32
|
+
x && /* @__PURE__ */ e(n, { children: /* @__PURE__ */ e($, {}) })
|
|
33
33
|
] });
|
|
34
34
|
}
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
T as TableOfContentsItem
|
|
37
37
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("react"),q=require("react-dom"),f=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("react"),q=require("react-dom"),f=require("../../../tedi/components/base/typography/heading/heading.cjs.js"),x=require("./table-of-contents-item.cjs.js"),j=require("../modal/modal-provider.cjs.js"),y=require("../../helpers/hooks/use-layout.cjs.js"),C=require("../../../tedi/components/layout/vertical-spacing/vertical-spacing.cjs.js"),I=require("../../../tedi/components/layout/grid/row.cjs.js"),O=s=>{const{items:r,setReturnFocus:e,showIcons:a,heading:l,breakToMobile:c=["mobile"],className:u}=s,d=y.useLayout(c),m=a?!0:!d,{closeModal:n}=i.useContext(j.ModalContext),o=i.useId(),h=()=>{q.flushSync(()=>{e==null||e(!1)}),n==null||n(),e==null||e(!0)};return t.jsxs(C.VerticalSpacing,{size:.5,className:u,children:[m&&t.jsx(f.Heading,{element:"h3",modifiers:"h4",id:o,children:l}),t.jsx("nav",{"aria-labelledby":o,children:t.jsx(I.Row,{role:"tree",element:"ul",direction:"column",gap:2,children:r.map((b,g)=>t.jsx(x.TableOfContentsItem,{handleCloseModal:h,...b},`toc-item-${g}`))})})]})};exports.TableOfContentsItems=O;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as u, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import r from "react";
|
|
3
3
|
import { flushSync as x } from "react-dom";
|
|
4
|
-
import { Heading as C } from "
|
|
4
|
+
import { Heading as C } from "../../../tedi/components/base/typography/heading/heading.es.js";
|
|
5
5
|
import { TableOfContentsItem as g } from "./table-of-contents-item.es.js";
|
|
6
6
|
import { ModalContext as y } from "../modal/modal-provider.es.js";
|
|
7
7
|
import { useLayout as I } from "../../helpers/hooks/use-layout.es.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),H=require("../../../../external/classnames/index.cjs.js"),d=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),H=require("../../../../external/classnames/index.cjs.js"),d=require("react"),h=require("../../../tedi/components/base/icon/icon.cjs.js"),f=require("../../../tedi/components/base/typography/heading/heading.cjs.js"),t=require("../../../tedi/components/base/typography/text/text.cjs.js"),S=require("../button/button.cjs.js"),k=require("../button-content/button-content.cjs.js"),B=require("./table-of-contents.cjs.js"),C=require("./table-of-contents.module.scss.cjs.js"),F=require("./table-of-contents-items.cjs.js"),$=require("../../../tedi/providers/label-provider/use-labels.cjs.js"),r=require("../../../tedi/components/layout/grid/row.cjs.js"),n=require("../../../tedi/components/layout/grid/col.cjs.js"),V=require("../modal/modal-provider.cjs.js"),W=require("../modal/modal-trigger.cjs.js"),z=require("../card/card.cjs.js"),b=require("../card/card-content/card-content.cjs.js"),A=require("../modal/modal.cjs.js"),D=require("../card/card-header/card-header.cjs.js"),E=x=>{const{getLabel:o}=$.useLabels(),{items:l,modalProps:p,modalProviderProps:q,heading:w,open:m,defaultOpen:T,onToggle:i,className:v}=x,a=l.map(s=>s.isValid===!0).filter(Boolean).length,c=l.map(s=>s.isValid===!1).filter(Boolean).length,j=d.useId(),[O,y]=d.useState(!0),[I,R]=d.useState(T),{showIcons:u}=d.useContext(B.TableOfContentsContext),N=i&&typeof m<"u"?m:I,L=o("table-of-contents.valid",`${a} / ${l.length}`),M=o("table-of-contents.valid",a),P=o("table-of-contents.invalid",c),_=s=>{R(s),i==null||i(s)},g=e.jsxs(e.Fragment,{children:[e.jsx(t.Text,{element:"span",modifiers:["normal","bold"],className:H.default({"sr-only":u}),children:w}),u&&c===0?e.jsxs(r.Row,{gutter:1,children:[e.jsx(n.Col,{width:"auto",children:e.jsx(h.Icon,{name:"check",color:"success"})}),e.jsxs(n.Col,{width:"auto",children:[e.jsxs(t.Text,{element:"span","aria-hidden":!0,children:[a," / ",l.length]}),e.jsx(t.Text,{element:"span",className:"sr-only",children:L})]})]}):u?e.jsxs(r.Row,{gutter:3,children:[e.jsx(n.Col,{width:"auto",children:e.jsxs(r.Row,{gutter:1,children:[e.jsx(n.Col,{width:"auto",children:e.jsx(h.Icon,{name:"check",color:"success"})}),e.jsxs(n.Col,{width:"auto",children:[e.jsx(t.Text,{element:"span","aria-hidden":!0,children:a}),e.jsx(t.Text,{element:"span",className:"sr-only",children:M})]})]})}),e.jsx(n.Col,{width:"auto",children:e.jsxs(r.Row,{gutter:1,children:[e.jsx(n.Col,{width:"auto",children:e.jsx(h.Icon,{name:"warning",color:"danger"})}),e.jsxs(n.Col,{width:"auto",children:[e.jsx(t.Text,{element:"span","aria-hidden":!0,children:c}),e.jsx(t.Text,{element:"span",className:"sr-only",children:P})]})]})})]}):null]});return e.jsxs(V.ModalProvider,{open:N,onToggle:_,...q,children:[e.jsx(f.Heading,{element:"h2",modifiers:"normal",className:v,children:e.jsx(W.ModalTrigger,{children:e.jsx(S.Button,{fullWidth:!0,noStyle:!0,className:C.default["table-of-contents__trigger"],children:e.jsx(z.Card,{className:C.default["table-of-contents__trigger-card"],children:e.jsx(b.CardContent,{children:e.jsxs(r.Row,{children:[e.jsx(n.Col,{children:g}),e.jsx(n.Col,{width:"auto","aria-hidden":!0,children:e.jsx(k.default,{as:"span",visualType:"link",iconRight:"expand_more",children:o("open")})})]})})})})})}),e.jsxs(A.Modal,{"aria-labelledby":j,position:"bottom",returnFocus:O,...p,children:[e.jsx(D.CardHeader,{variant:"white",id:j,children:e.jsx(f.Heading,{element:"h2",modifiers:"normal",children:g})}),e.jsx(b.CardContent,{children:e.jsx(F.TableOfContentsItems,{...x,setReturnFocus:y})})]})]})};exports.TableOfContentsModal=E;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs as t, Fragment as H, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import S from "../../../../external/classnames/index.es.js";
|
|
3
3
|
import h, { useContext as j } from "react";
|
|
4
|
+
import { Icon as p } from "../../../tedi/components/base/icon/icon.es.js";
|
|
5
|
+
import { Heading as w } from "../../../tedi/components/base/typography/heading/heading.es.js";
|
|
6
|
+
import { Text as r } from "../../../tedi/components/base/typography/text/text.es.js";
|
|
4
7
|
import { Button as V } from "../button/button.es.js";
|
|
5
8
|
import $ from "../button-content/button-content.es.js";
|
|
6
|
-
import { Icon as p } from "../icon/icon.es.js";
|
|
7
|
-
import { Heading as v } from "../typography/heading/heading.es.js";
|
|
8
|
-
import { Text as r } from "../typography/text/text.es.js";
|
|
9
9
|
import { TableOfContentsContext as W } from "./table-of-contents.es.js";
|
|
10
|
-
import
|
|
10
|
+
import v from "./table-of-contents.module.scss.es.js";
|
|
11
11
|
import { TableOfContentsItems as q } from "./table-of-contents-items.es.js";
|
|
12
12
|
import { useLabels as z } from "../../../tedi/providers/label-provider/use-labels.es.js";
|
|
13
13
|
import { Row as i } from "../../../tedi/components/layout/grid/row.es.js";
|
|
@@ -18,13 +18,13 @@ import { Card as E } from "../card/card.es.js";
|
|
|
18
18
|
import { CardContent as C } from "../card/card-content/card-content.es.js";
|
|
19
19
|
import { Modal as G } from "../modal/modal.es.js";
|
|
20
20
|
import { CardHeader as J } from "../card/card-header/card-header.es.js";
|
|
21
|
-
const
|
|
22
|
-
const { getLabel: l } = z(), { items: a, modalProps: y, modalProviderProps: N, heading: x, open:
|
|
21
|
+
const ue = (u) => {
|
|
22
|
+
const { getLabel: l } = z(), { items: a, modalProps: y, modalProviderProps: N, heading: x, open: f, defaultOpen: I, onToggle: d, className: O } = u, s = a.map((o) => o.isValid === !0).filter(Boolean).length, c = a.map((o) => o.isValid === !1).filter(Boolean).length, g = h.useId(), [T, _] = h.useState(!0), [L, B] = h.useState(I), { showIcons: m } = j(W), M = d && typeof f < "u" ? f : L, P = l("table-of-contents.valid", `${s} / ${a.length}`), R = l("table-of-contents.valid", s), k = l("table-of-contents.invalid", c), F = (o) => {
|
|
23
23
|
B(o), d == null || d(o);
|
|
24
24
|
}, b = /* @__PURE__ */ t(H, { children: [
|
|
25
25
|
/* @__PURE__ */ e(r, { element: "span", modifiers: ["normal", "bold"], className: S({ "sr-only": m }), children: x }),
|
|
26
26
|
m && c === 0 ? /* @__PURE__ */ t(i, { gutter: 1, children: [
|
|
27
|
-
/* @__PURE__ */ e(n, { width: "auto", children: /* @__PURE__ */ e(p, { name: "check", color: "
|
|
27
|
+
/* @__PURE__ */ e(n, { width: "auto", children: /* @__PURE__ */ e(p, { name: "check", color: "success" }) }),
|
|
28
28
|
/* @__PURE__ */ t(n, { width: "auto", children: [
|
|
29
29
|
/* @__PURE__ */ t(r, { element: "span", "aria-hidden": !0, children: [
|
|
30
30
|
s,
|
|
@@ -35,14 +35,14 @@ const fe = (f) => {
|
|
|
35
35
|
] })
|
|
36
36
|
] }) : m ? /* @__PURE__ */ t(i, { gutter: 3, children: [
|
|
37
37
|
/* @__PURE__ */ e(n, { width: "auto", children: /* @__PURE__ */ t(i, { gutter: 1, children: [
|
|
38
|
-
/* @__PURE__ */ e(n, { width: "auto", children: /* @__PURE__ */ e(p, { name: "check", color: "
|
|
38
|
+
/* @__PURE__ */ e(n, { width: "auto", children: /* @__PURE__ */ e(p, { name: "check", color: "success" }) }),
|
|
39
39
|
/* @__PURE__ */ t(n, { width: "auto", children: [
|
|
40
40
|
/* @__PURE__ */ e(r, { element: "span", "aria-hidden": !0, children: s }),
|
|
41
41
|
/* @__PURE__ */ e(r, { element: "span", className: "sr-only", children: R })
|
|
42
42
|
] })
|
|
43
43
|
] }) }),
|
|
44
44
|
/* @__PURE__ */ e(n, { width: "auto", children: /* @__PURE__ */ t(i, { gutter: 1, children: [
|
|
45
|
-
/* @__PURE__ */ e(n, { width: "auto", children: /* @__PURE__ */ e(p, { name: "warning", color: "
|
|
45
|
+
/* @__PURE__ */ e(n, { width: "auto", children: /* @__PURE__ */ e(p, { name: "warning", color: "danger" }) }),
|
|
46
46
|
/* @__PURE__ */ t(n, { width: "auto", children: [
|
|
47
47
|
/* @__PURE__ */ e(r, { element: "span", "aria-hidden": !0, children: c }),
|
|
48
48
|
/* @__PURE__ */ e(r, { element: "span", className: "sr-only", children: k })
|
|
@@ -51,16 +51,16 @@ const fe = (f) => {
|
|
|
51
51
|
] }) : null
|
|
52
52
|
] });
|
|
53
53
|
return /* @__PURE__ */ t(A, { open: M, onToggle: F, ...N, children: [
|
|
54
|
-
/* @__PURE__ */ e(
|
|
54
|
+
/* @__PURE__ */ e(w, { element: "h2", modifiers: "normal", className: O, children: /* @__PURE__ */ e(D, { children: /* @__PURE__ */ e(V, { fullWidth: !0, noStyle: !0, className: v["table-of-contents__trigger"], children: /* @__PURE__ */ e(E, { className: v["table-of-contents__trigger-card"], children: /* @__PURE__ */ e(C, { children: /* @__PURE__ */ t(i, { children: [
|
|
55
55
|
/* @__PURE__ */ e(n, { children: b }),
|
|
56
56
|
/* @__PURE__ */ e(n, { width: "auto", "aria-hidden": !0, children: /* @__PURE__ */ e($, { as: "span", visualType: "link", iconRight: "expand_more", children: l("open") }) })
|
|
57
57
|
] }) }) }) }) }) }),
|
|
58
58
|
/* @__PURE__ */ t(G, { "aria-labelledby": g, position: "bottom", returnFocus: T, ...y, children: [
|
|
59
|
-
/* @__PURE__ */ e(J, { variant: "white", id: g, children: /* @__PURE__ */ e(
|
|
60
|
-
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(q, { ...
|
|
59
|
+
/* @__PURE__ */ e(J, { variant: "white", id: g, children: /* @__PURE__ */ e(w, { element: "h2", modifiers: "normal", children: b }) }),
|
|
60
|
+
/* @__PURE__ */ e(C, { children: /* @__PURE__ */ e(q, { ...u, setReturnFocus: _ }) })
|
|
61
61
|
] })
|
|
62
62
|
] });
|
|
63
63
|
};
|
|
64
64
|
export {
|
|
65
|
-
|
|
65
|
+
ue as TableOfContentsModal
|
|
66
66
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { IconProps } from '../../../tedi/components/base/icon/icon';
|
|
1
2
|
import { ButtonProps } from '../button/button';
|
|
2
|
-
import { IconProps } from '../icon/icon';
|
|
3
3
|
export interface ToggleOpenProps extends Omit<ButtonProps, 'children' | 'iconRight'> {
|
|
4
4
|
/**
|
|
5
5
|
* Name on the button to open the item
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),g=require("../../../../external/classnames/index.cjs.js"),t=require("react"),p=require("
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const a=require("../../../../external/@floating-ui/react/dist/floating-ui.react.cjs.js"),g=require("../../../../external/classnames/index.cjs.js"),t=require("react"),p=require("../../../tedi/components/base/icon/icon.cjs.js"),o=require("./tooltip.module.scss.cjs.js"),d=require("./tooltip-provider.cjs.js"),f=require("../../../tedi/providers/label-provider/use-labels.cjs.js"),r=i=>{const{children:e}=i,{getLabel:l}=f.useLabels(),{getReferenceProps:s,reference:c,openWith:n}=t.useContext(d.TooltipContext),u=a.useMergeRefs([c,e.ref]);return t.cloneElement(e,s({ref:u,tabIndex:0,label:e.type===p.Icon?l("tooltip.icon-trigger"):void 0,...e.props,className:g.default(o.default.tooltip__trigger,{[o.default["tooltip__trigger--click"]]:n==="click"},e.props.className)}))};exports.TooltipTrigger=r;exports.default=r;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMergeRefs as m } from "../../../../external/@floating-ui/react/dist/floating-ui.react.es.js";
|
|
2
2
|
import n from "../../../../external/classnames/index.es.js";
|
|
3
3
|
import o from "react";
|
|
4
|
-
import { Icon as f } from "
|
|
4
|
+
import { Icon as f } from "../../../tedi/components/base/icon/icon.es.js";
|
|
5
5
|
import t from "./tooltip.module.scss.es.js";
|
|
6
6
|
import { TooltipContext as a } from "./tooltip-provider.es.js";
|
|
7
7
|
import { useLabels as g } from "../../../tedi/providers/label-provider/use-labels.es.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),o=require("react"),p=require("../../../tedi/components/base/icon/icon.cjs.js"),j=require("../button/button.cjs.js"),b=require("../tag/tag.cjs.js"),v=require("./vertical-progress.cjs.js"),w=require("../card/card.cjs.js"),i=require("../card/card-content/card-content.cjs.js"),q=require("../../../tedi/providers/label-provider/use-labels.cjs.js"),c=require("../../../tedi/components/layout/grid/row.cjs.js"),n=require("../../../tedi/components/layout/grid/col.cjs.js"),s=o.createContext({index:0,title:null}),a=r=>{const{children:t}=r;return e.jsx(s.Provider,{value:r,children:e.jsx(w.Card,{children:e.jsxs(i.CardContent,{padding:.75,lg:{padding:1.5},children:[e.jsx(I,{}),t&&e.jsx(i.CardContent,{padding:{top:1,right:0,bottom:0,left:0},lg:{padding:{top:2,right:2.5,bottom:0,left:2.5}},children:t})]})})})},I=()=>{const{title:r,state:t,index:l,isToggable:u=!0}=o.useContext(s),{onItemOpen:d}=o.useContext(v.VerticalProgressContext),{getLabel:g}=q.useLabels(),h=u&&!(t==="disabled")&&!(t==="active"),x=()=>{switch(t){case"active":return"primary";case"completed":return"positive";case"error":return"important";default:return"default"}},m=()=>{switch(t){case"active":case"completed":case"error":return"default";default:return"ghost"}},C=()=>{switch(t){case"completed":return"check";case"error":return"exclamation";default:return"chevron_right"}};return e.jsxs(c.Row,{alignItems:"center",justifyContent:"between",children:[e.jsx(n.Col,{width:"auto",children:e.jsxs(c.Row,{gutterX:3,gutterY:0,alignItems:"center",wrap:"nowrap",children:[e.jsx(n.Col,{width:"auto",children:e.jsx(b.Tag,{iconOnly:!0,rounded:!0,color:x(),type:m(),children:e.jsx(p.Icon,{name:C(),size:16,color:"inherit"})})}),e.jsx(n.Col,{width:"auto",children:r})]})}),h&&e.jsx(n.Col,{width:"auto",children:e.jsx(j.Button,{visualType:"link",iconRight:"edit",onClick:()=>d(l),children:g("vertical-progress.edit")})})]})};exports.VerticalProgressItem=a;exports.VerticalProgressItemContext=s;exports.default=a;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as t, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import n from "react";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { Icon as C } from "../../../tedi/components/base/icon/icon.es.js";
|
|
4
|
+
import { Button as v } from "../button/button.es.js";
|
|
5
5
|
import { Tag as w } from "../tag/tag.es.js";
|
|
6
6
|
import { VerticalProgressContext as x } from "./vertical-progress.es.js";
|
|
7
7
|
import { Card as b } from "../card/card.es.js";
|
|
@@ -58,10 +58,10 @@ const s = n.createContext({
|
|
|
58
58
|
};
|
|
59
59
|
return /* @__PURE__ */ i(a, { alignItems: "center", justifyContent: "between", children: [
|
|
60
60
|
/* @__PURE__ */ t(o, { width: "auto", children: /* @__PURE__ */ i(a, { gutterX: 3, gutterY: 0, alignItems: "center", wrap: "nowrap", children: [
|
|
61
|
-
/* @__PURE__ */ t(o, { width: "auto", children: /* @__PURE__ */ t(w, { iconOnly: !0, rounded: !0, color: p(), type: h(), children: /* @__PURE__ */ t(
|
|
61
|
+
/* @__PURE__ */ t(o, { width: "auto", children: /* @__PURE__ */ t(w, { iconOnly: !0, rounded: !0, color: p(), type: h(), children: /* @__PURE__ */ t(C, { name: f(), size: 16, color: "inherit" }) }) }),
|
|
62
62
|
/* @__PURE__ */ t(o, { width: "auto", children: r })
|
|
63
63
|
] }) }),
|
|
64
|
-
g && /* @__PURE__ */ t(o, { width: "auto", children: /* @__PURE__ */ t(
|
|
64
|
+
g && /* @__PURE__ */ t(o, { width: "auto", children: /* @__PURE__ */ t(v, { visualType: "link", iconRight: "edit", onClick: () => m(l), children: u("vertical-progress.edit") }) })
|
|
65
65
|
] });
|
|
66
66
|
};
|
|
67
67
|
export {
|
package/src/community/index.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
export * from './components/commonTypes';
|
|
2
|
-
export * from './components/typography/heading/heading';
|
|
3
|
-
export * from './components/typography/text/text';
|
|
4
2
|
export * from './components/button/button';
|
|
5
3
|
export * from './components/anchor/anchor';
|
|
6
4
|
export * from './components/layout';
|
|
7
5
|
export * from './components/dropdown/dropdown';
|
|
8
6
|
export * from './components/stepper';
|
|
9
7
|
export * from './components/card';
|
|
10
|
-
export * from './components/icon/icon';
|
|
11
8
|
export * from './components/feedback/feedback';
|
|
12
9
|
export * from './components/form/hidden-field/hidden-field';
|
|
13
10
|
export * from './components/form/choice-group';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export type IconSize = 8 | 12 | 16 | 18 | 24 | 36 | 48;
|
|
2
2
|
export type IconType = 'outlined' | 'sharp' | 'rounded';
|
|
3
|
-
export type IconColor = 'primary' | 'secondary' | 'tertiary' | 'brand' | 'brand-dark' | 'success' | 'warning' | 'warning-dark' | 'danger' | 'white';
|
|
3
|
+
export type IconColor = 'primary' | 'secondary' | 'tertiary' | 'brand' | 'brand-dark' | 'success' | 'warning' | 'warning-dark' | 'danger' | 'white' | 'inherit';
|
|
4
4
|
export type IconBackgroundColor = 'primary' | 'secondary' | 'brand-primary' | 'brand-secondary';
|
|
5
5
|
export interface IconSharedProps {
|
|
6
6
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i={"tedi-icon__wrapper":"tedi-icon__wrapper-9ebcd2b9","tedi-icon__wrapper--block":"tedi-icon__wrapper--block-c6569c9a","tedi-icon__wrapper--bg":"tedi-icon__wrapper--bg-eecdf75d","tedi-icon__wrapper--inline":"tedi-icon__wrapper--inline-3b529220","tedi-icon__wrapper--bg-primary":"tedi-icon__wrapper--bg-primary-610f32c0","tedi-icon__wrapper--bg-secondary":"tedi-icon__wrapper--bg-secondary-0162c3f4","tedi-icon__wrapper--bg-brand-primary":"tedi-icon__wrapper--bg-brand-primary-b81804e6","tedi-icon__wrapper--bg-brand-secondary":"tedi-icon__wrapper--bg-brand-secondary-f1e0ad91","tedi-icon__wrapper--size-8":"tedi-icon__wrapper--size-8-9d2b31c8","tedi-icon__wrapper--size-12":"tedi-icon__wrapper--size-12-fbbccf16","tedi-icon__wrapper--size-16":"tedi-icon__wrapper--size-16-79f6d6a4","tedi-icon__wrapper--size-18":"tedi-icon__wrapper--size-18-19e79f0c","tedi-icon__wrapper--size-24":"tedi-icon__wrapper--size-24-dad0e422","tedi-icon__wrapper--size-36":"tedi-icon__wrapper--size-36-5db5f717","tedi-icon__wrapper--size-48":"tedi-icon__wrapper--size-48-72e74510","tedi-icon":"tedi-icon-af01e6fb","tedi-icon--block":"tedi-icon--block-b39b3868","tedi-icon--inline":"tedi-icon--inline-f36dc36f","tedi-icon--color-primary":"tedi-icon--color-primary-007b893c","tedi-icon--color-secondary":"tedi-icon--color-secondary-33a32ecf","tedi-icon--color-tertiary":"tedi-icon--color-tertiary-ca6b8bff","tedi-icon--color-brand":"tedi-icon--color-brand-c34b5f15","tedi-icon--color-brand-dark":"tedi-icon--color-brand-dark-b9a4ebc2","tedi-icon--color-success":"tedi-icon--color-success-12a4bdac","tedi-icon--color-warning":"tedi-icon--color-warning-22d5317b","tedi-icon--color-warning-dark":"tedi-icon--color-warning-dark-57a93663","tedi-icon--color-danger":"tedi-icon--color-danger-22384ab6","tedi-icon--color-white":"tedi-icon--color-white-449bf36d","tedi-icon--size-8":"tedi-icon--size-8-5ae94c2a","tedi-icon--size-12":"tedi-icon--size-12-761e2145","tedi-icon--size-16":"tedi-icon--size-16-1921977d","tedi-icon--size-18":"tedi-icon--size-18-53872167","tedi-icon--size-24":"tedi-icon--size-24-a0bf69ef","tedi-icon--size-36":"tedi-icon--size-36-7ca033a7","tedi-icon--size-48":"tedi-icon--size-48-4839c0a5","tedi-icon--filled":"tedi-icon--filled-acd33902"};exports.default=i;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const i={"tedi-icon__wrapper":"tedi-icon__wrapper-9ebcd2b9","tedi-icon__wrapper--block":"tedi-icon__wrapper--block-c6569c9a","tedi-icon__wrapper--bg":"tedi-icon__wrapper--bg-eecdf75d","tedi-icon__wrapper--inline":"tedi-icon__wrapper--inline-3b529220","tedi-icon__wrapper--bg-primary":"tedi-icon__wrapper--bg-primary-610f32c0","tedi-icon__wrapper--bg-secondary":"tedi-icon__wrapper--bg-secondary-0162c3f4","tedi-icon__wrapper--bg-brand-primary":"tedi-icon__wrapper--bg-brand-primary-b81804e6","tedi-icon__wrapper--bg-brand-secondary":"tedi-icon__wrapper--bg-brand-secondary-f1e0ad91","tedi-icon__wrapper--size-8":"tedi-icon__wrapper--size-8-9d2b31c8","tedi-icon__wrapper--size-12":"tedi-icon__wrapper--size-12-fbbccf16","tedi-icon__wrapper--size-16":"tedi-icon__wrapper--size-16-79f6d6a4","tedi-icon__wrapper--size-18":"tedi-icon__wrapper--size-18-19e79f0c","tedi-icon__wrapper--size-24":"tedi-icon__wrapper--size-24-dad0e422","tedi-icon__wrapper--size-36":"tedi-icon__wrapper--size-36-5db5f717","tedi-icon__wrapper--size-48":"tedi-icon__wrapper--size-48-72e74510","tedi-icon":"tedi-icon-af01e6fb","tedi-icon--block":"tedi-icon--block-b39b3868","tedi-icon--inline":"tedi-icon--inline-f36dc36f","tedi-icon--color-primary":"tedi-icon--color-primary-007b893c","tedi-icon--color-secondary":"tedi-icon--color-secondary-33a32ecf","tedi-icon--color-tertiary":"tedi-icon--color-tertiary-ca6b8bff","tedi-icon--color-brand":"tedi-icon--color-brand-c34b5f15","tedi-icon--color-brand-dark":"tedi-icon--color-brand-dark-b9a4ebc2","tedi-icon--color-success":"tedi-icon--color-success-12a4bdac","tedi-icon--color-warning":"tedi-icon--color-warning-22d5317b","tedi-icon--color-warning-dark":"tedi-icon--color-warning-dark-57a93663","tedi-icon--color-danger":"tedi-icon--color-danger-22384ab6","tedi-icon--color-white":"tedi-icon--color-white-449bf36d","tedi-icon--size-8":"tedi-icon--size-8-5ae94c2a","tedi-icon--size-12":"tedi-icon--size-12-761e2145","tedi-icon--size-16":"tedi-icon--size-16-1921977d","tedi-icon--size-18":"tedi-icon--size-18-53872167","tedi-icon--size-24":"tedi-icon--size-24-a0bf69ef","tedi-icon--size-36":"tedi-icon--size-36-7ca033a7","tedi-icon--size-48":"tedi-icon--size-48-4839c0a5","tedi-icon--color-inherit":"tedi-icon--color-inherit-5cac9c1f","tedi-icon--filled":"tedi-icon--filled-acd33902"};exports.default=i;
|
|
@@ -34,6 +34,7 @@ const i = {
|
|
|
34
34
|
"tedi-icon--size-24": "tedi-icon--size-24-a0bf69ef",
|
|
35
35
|
"tedi-icon--size-36": "tedi-icon--size-36-7ca033a7",
|
|
36
36
|
"tedi-icon--size-48": "tedi-icon--size-48-4839c0a5",
|
|
37
|
+
"tedi-icon--color-inherit": "tedi-icon--color-inherit-5cac9c1f",
|
|
37
38
|
"tedi-icon--filled": "tedi-icon--filled-acd33902"
|
|
38
39
|
};
|
|
39
40
|
export {
|
|
@@ -32,5 +32,5 @@ export interface LabelProps extends BreakpointSupport<LabelBreakpointProps>, Lab
|
|
|
32
32
|
*/
|
|
33
33
|
tooltip?: string;
|
|
34
34
|
}
|
|
35
|
-
export declare const Label: import('react').ForwardRefExoticComponent<LabelProps & import('react').RefAttributes<
|
|
35
|
+
export declare const Label: import('react').ForwardRefExoticComponent<LabelProps & import('react').RefAttributes<HTMLLabelElement | HTMLSpanElement>>;
|
|
36
36
|
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("react/jsx-runtime"),p=require("../../../../external/classnames/index.cjs.js"),q=require("react"),l=require("./icon.module.scss.cjs.js"),e=q.forwardRef((o,r)=>{const{className:s,name:c,filled:d=!1,label:a,type:i="outlined",size:n=24,display:u="block",color:t,...m}=o,f=p.default("notranslate","material-symbols",l.default.icon,l.default[`icon--${u}`],{[`material-symbols--${i}`]:i,[`text-${t}`]:t},s),b={...n?{"--icon-internal-variation-size":`${n/16}rem`}:{},...d?{"--icon-internal-variation-fill":1}:{}};return y.jsx("span",{"data-name":"icon",role:"img","aria-hidden":!a,...m,className:f,style:b,ref:r,"aria-label":a,children:c})});e.displayName="Icon";exports.Icon=e;exports.default=e;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
import { TextColor } from '../typography/text/text';
|
|
3
|
-
export type IconSize = 12 | 14 | 16 | 18 | 24 | 36 | 48;
|
|
4
|
-
export interface IconProps {
|
|
5
|
-
/**
|
|
6
|
-
* Name of material symbols icon.
|
|
7
|
-
* https://fonts.google.com/icons?icon.set=Material+Symbols
|
|
8
|
-
*/
|
|
9
|
-
name: string;
|
|
10
|
-
/**
|
|
11
|
-
* Additional classes.
|
|
12
|
-
*/
|
|
13
|
-
className?: string;
|
|
14
|
-
/**
|
|
15
|
-
* Type of icon.
|
|
16
|
-
* It is recommended to only use one type throughout your app.
|
|
17
|
-
* This ensures that only one icon font is downloaded.
|
|
18
|
-
* @default outlined
|
|
19
|
-
*/
|
|
20
|
-
type?: 'outlined' | 'rounded' | 'sharp';
|
|
21
|
-
/**
|
|
22
|
-
* Render a filled variant of the icon.
|
|
23
|
-
* @default false
|
|
24
|
-
*/
|
|
25
|
-
filled?: boolean;
|
|
26
|
-
/**
|
|
27
|
-
* Size of the icon.
|
|
28
|
-
* @default 24
|
|
29
|
-
*/
|
|
30
|
-
size?: IconSize;
|
|
31
|
-
/**
|
|
32
|
-
* Which color Icon should be.
|
|
33
|
-
* Use 'positive', 'important' or 'warning' with caution, usually they should not be in application UI.
|
|
34
|
-
* @default default
|
|
35
|
-
*/
|
|
36
|
-
color?: TextColor;
|
|
37
|
-
/**
|
|
38
|
-
* Type of display. block by default.
|
|
39
|
-
* @default block
|
|
40
|
-
*/
|
|
41
|
-
display?: 'block' | 'inline';
|
|
42
|
-
/**
|
|
43
|
-
* Icons label for screen-readers.
|
|
44
|
-
* If omitted then the icon is hidden for screen-readers.
|
|
45
|
-
*/
|
|
46
|
-
label?: string;
|
|
47
|
-
}
|
|
48
|
-
export declare const Icon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<HTMLDivElement>>;
|
|
49
|
-
export default Icon;
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
-
import b from "../../../../external/classnames/index.es.js";
|
|
3
|
-
import { forwardRef as N } from "react";
|
|
4
|
-
import l from "./icon.module.scss.es.js";
|
|
5
|
-
const $ = N((n, r) => {
|
|
6
|
-
const {
|
|
7
|
-
className: s,
|
|
8
|
-
name: t,
|
|
9
|
-
filled: m = !1,
|
|
10
|
-
label: a,
|
|
11
|
-
type: o = "outlined",
|
|
12
|
-
size: i = 24,
|
|
13
|
-
display: c = "block",
|
|
14
|
-
color: e,
|
|
15
|
-
...d
|
|
16
|
-
} = n, f = b(
|
|
17
|
-
"notranslate",
|
|
18
|
-
// Added to prevent Google Translate from translating the icon
|
|
19
|
-
"material-symbols",
|
|
20
|
-
l.icon,
|
|
21
|
-
l[`icon--${c}`],
|
|
22
|
-
{ [`material-symbols--${o}`]: o, [`text-${e}`]: e },
|
|
23
|
-
s
|
|
24
|
-
), p = {
|
|
25
|
-
...i ? { "--icon-internal-variation-size": `${i / 16}rem` } : {},
|
|
26
|
-
...m ? { "--icon-internal-variation-fill": 1 } : {}
|
|
27
|
-
};
|
|
28
|
-
return /* @__PURE__ */ y(
|
|
29
|
-
"span",
|
|
30
|
-
{
|
|
31
|
-
"data-name": "icon",
|
|
32
|
-
role: "img",
|
|
33
|
-
"aria-hidden": !a,
|
|
34
|
-
...d,
|
|
35
|
-
className: f,
|
|
36
|
-
style: p,
|
|
37
|
-
ref: r,
|
|
38
|
-
"aria-label": a,
|
|
39
|
-
children: t
|
|
40
|
-
}
|
|
41
|
-
);
|
|
42
|
-
});
|
|
43
|
-
$.displayName = "Icon";
|
|
44
|
-
export {
|
|
45
|
-
$ as Icon,
|
|
46
|
-
$ as default
|
|
47
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e="icon-8081be27",o={icon:e,"icon--block":"icon--block-4aa6379d","icon--inline":"icon--inline-5d045b85"};exports.default=o;exports.icon=e;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const u=require("react/jsx-runtime"),i=require("../text/text.cjs.js"),e=t=>{const{children:r,element:n="h1",...s}=t;return u.jsx(i.Text,{element:n,...s,children:r})};exports.Heading=e;exports.default=e;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { HeadingModifiers, TextProps } from '../text/text';
|
|
2
|
-
export type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
3
|
-
export type HeadingProps = Omit<TextProps, 'element'> & {
|
|
4
|
-
/**
|
|
5
|
-
* Semantic heading tag. h1-h6 are allowed values.
|
|
6
|
-
* @default h1
|
|
7
|
-
*/
|
|
8
|
-
element?: Extract<TextProps['element'], HeadingModifiers>;
|
|
9
|
-
};
|
|
10
|
-
export declare const Heading: (props: HeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export default Heading;
|