@tedi-design-system/react 18.2.0-rc.4 → 19.0.0-rc.10
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/README.md +27 -1
- package/_virtual/index.es13.js +2 -2
- package/_virtual/index.es14.js +2 -2
- 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/external/react-is/index.cjs.js +1 -1
- package/external/react-is/index.es.js +1 -1
- package/external/toposort/index.cjs.js +1 -1
- package/external/toposort/index.es.js +1 -1
- package/fonts/material-symbols-outlined.woff2 +0 -0
- package/fonts/material-symbols-rounded.woff2 +0 -0
- package/fonts/material-symbols-sharp.woff2 +0 -0
- package/index.css +1 -1
- package/package.json +6 -4
- package/src/tedi/components/content/calendar/calendar.cjs.js +1 -1
- package/src/tedi/components/content/calendar/calendar.d.ts +12 -0
- package/src/tedi/components/content/calendar/calendar.es.js +39 -35
- package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.cjs.js +1 -1
- package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.d.ts +13 -1
- package/src/tedi/components/content/calendar/components/calendar-header/calendar-header.es.js +40 -35
- package/src/tedi/components/content/table/table.cjs.js +1 -1
- package/src/tedi/components/content/table/table.d.ts +6 -0
- package/src/tedi/components/content/table/table.es.js +431 -413
- package/src/tedi/components/content/table/table.module.scss.cjs.js +1 -1
- package/src/tedi/components/content/table/table.module.scss.es.js +3 -0
- package/src/tedi/components/form/date-field/date-field.cjs.js +1 -1
- package/src/tedi/components/form/date-field/date-field.d.ts +10 -0
- package/src/tedi/components/form/date-field/date-field.es.js +176 -170
- package/src/tedi/components/form/date-field/date-picker-modal/date-picker-modal.cjs.js +1 -1
- package/src/tedi/components/form/date-field/date-picker-modal/date-picker-modal.d.ts +4 -0
- package/src/tedi/components/form/date-field/date-picker-modal/date-picker-modal.es.js +47 -43
- package/src/tedi/components/form/date-time-field/date-time-field.cjs.js +1 -1
- package/src/tedi/components/form/date-time-field/date-time-field.d.ts +10 -0
- package/src/tedi/components/form/date-time-field/date-time-field.es.js +92 -88
- package/src/tedi/components/form/file-upload/file-upload.cjs.js +1 -1
- package/src/tedi/components/form/file-upload/file-upload.es.js +11 -11
- package/src/tedi/components/form/select/components/select-multi-option.cjs.js +1 -1
- package/src/tedi/components/form/select/components/select-multi-option.es.js +24 -23
- package/src/tedi/components/form/select/components/select-single-option.cjs.js +1 -1
- package/src/tedi/components/form/select/components/select-single-option.es.js +11 -10
- package/src/tedi/components/form/select/select.module.scss.cjs.js +1 -1
- package/src/tedi/components/form/select/select.module.scss.es.js +2 -1
- package/src/tedi/components/form/textarea/textarea.cjs.js +1 -1
- package/src/tedi/components/form/textarea/textarea.d.ts +3 -3
- package/src/tedi/components/form/textarea/textarea.es.js +12 -12
- package/src/tedi/components/misc/ellipsis/ellipsis.cjs.js +1 -1
- package/src/tedi/components/misc/ellipsis/ellipsis.es.js +20 -19
- package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.d.ts +23 -0
- package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.es.js +12 -0
- package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.d.ts +34 -0
- package/src/tedi/components/misc/timeline/components/timeline-item/timeline-item.es.js +63 -0
- package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.d.ts +24 -0
- package/src/tedi/components/misc/timeline/components/timeline-title/timeline-title.es.js +8 -0
- package/src/tedi/components/misc/timeline/index.d.ts +4 -0
- package/src/tedi/components/misc/timeline/timeline.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/timeline.d.ts +48 -0
- package/src/tedi/components/misc/timeline/timeline.es.js +38 -0
- package/src/tedi/components/misc/timeline/timeline.module.scss.cjs.js +1 -0
- package/src/tedi/components/misc/timeline/timeline.module.scss.es.js +18 -0
- package/src/tedi/components/navigation/breadcrumbs/breadcrumbs.cjs.js +1 -1
- package/src/tedi/components/navigation/breadcrumbs/breadcrumbs.es.js +35 -32
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.d.ts +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-collapsible/table-of-contents-collapsible.es.js +33 -33
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-item/table-of-contents-item.d.ts +0 -10
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-list/table-of-contents-list.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-list/table-of-contents-list.es.js +27 -18
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-row/table-of-contents-row.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/components/table-of-contents-row/table-of-contents-row.es.js +21 -35
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.d.ts +17 -10
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.es.js +51 -52
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.cjs.js +1 -1
- package/src/tedi/components/navigation/table-of-contents/table-of-contents.module.scss.es.js +0 -1
- package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.cjs.js +1 -1
- package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.d.ts +8 -4
- package/src/tedi/components/overlays/dropdown/dropdown-item/dropdown-item.es.js +85 -54
- package/src/tedi/components/overlays/overlay/overlay-content.cjs.js +1 -1
- package/src/tedi/components/overlays/overlay/overlay-content.d.ts +6 -1
- package/src/tedi/components/overlays/overlay/overlay-content.es.js +28 -27
- package/src/tedi/components/overlays/popover/popover-content.cjs.js +1 -1
- package/src/tedi/components/overlays/popover/popover-content.d.ts +7 -0
- package/src/tedi/components/overlays/popover/popover-content.es.js +47 -36
- package/src/tedi/index.d.ts +1 -0
- package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
- package/src/tedi/providers/label-provider/labels-map.d.ts +0 -21
- package/src/tedi/providers/label-provider/labels-map.es.js +2 -23
- package/tedi.cjs.js +1 -1
- package/tedi.es.js +90 -82
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("../../../../../external/classnames/index.cjs.js"),p=require("react"),de=require("../../../helpers/hooks/use-file-upload.cjs.js"),re=require("../../base/typography/text/text.cjs.js"),S=require("../../buttons/button/button.cjs.js"),ce=require("../../buttons/closing-button/closing-button.cjs.js"),ue=require("../form-label/form-label.cjs.js"),fe=require("../../misc/separator/separator.cjs.js"),pe=require("../../tags/tag/tag.cjs.js"),z=require("../feedback-text/feedback-text.cjs.js"),g=require("../input-group/input-group.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),j=require("../../../../../external/classnames/index.cjs.js"),p=require("react"),de=require("../../../helpers/hooks/use-file-upload.cjs.js"),re=require("../../base/typography/text/text.cjs.js"),S=require("../../buttons/button/button.cjs.js"),ce=require("../../buttons/closing-button/closing-button.cjs.js"),ue=require("../form-label/form-label.cjs.js"),fe=require("../../misc/separator/separator.cjs.js"),pe=require("../../tags/tag/tag.cjs.js"),z=require("../feedback-text/feedback-text.cjs.js"),g=require("../input-group/input-group.cjs.js"),t=require("./file-upload.module.scss.cjs.js"),me=require("../../../providers/label-provider/use-labels.cjs.js"),M=require("../../../helpers/hooks/use-breakpoint.cjs.js"),xe=require("../../layout/grid/row.cjs.js"),O=require("../../layout/grid/col.cjs.js"),A=P=>{var U;const{getLabel:n}=me.useLabels(),{id:V,name:$,label:v,accept:y,multiple:F,onChange:m,className:D,wrapperClassName:W,defaultFiles:H,onDelete:J,hasClearButton:K=!0,files:c,readOnly:x,disabled:s=!1,maxSize:Q,validateIndividually:X=!1,showRestrictions:Y,size:u="default",helper:i,...Z}=P,{innerFiles:_,uploadErrorHelper:a,onFileChange:E,onFileRemove:G,handleClear:ee,announcement:le}=de.useFileUpload({accept:y,maxSize:Q,multiple:F,validateIndividually:X,defaultFiles:H,onChange:m,onDelete:J,files:c,showRestrictions:Y}),te=M.default(),ae=p.useId(),o=(U=g.useOptionalInputGroup)==null?void 0:U.call(g),ie=o==null?void 0:o.hasExternalLabel,f=V??(o==null?void 0:o.inputId)??ae,q=p.useRef(null),N=p.useRef(null),se=j.default(t.default["tedi-file-upload"],{[t.default["tedi-file-upload--disabled"]]:s},D),B=(a==null?void 0:a.type)==="error",h=i??(B?void 0:a),b=B?a:void 0,C=h?(i==null?void 0:i.id)??`${f}-helper`:void 0,L=b?`${f}-error`:void 0,k=[C,L].filter(Boolean).join(" ")||void 0,d=p.useMemo(()=>c&&m?c:_,[c,_,m]),R=()=>{var l;return(l=N.current)==null?void 0:l.focus()},ne=l=>{G(l),R()},I=()=>{ee(),R()},oe=(l,r)=>{const w=l.isValid===!1;return e.jsx("li",{children:e.jsxs(pe.Tag,{role:"presentation",color:w?"danger":"primary",onClose:!l.isLoading&&!s&&!x?()=>ne(l):void 0,isLoading:l.isLoading,closeButtonProps:{title:`${n("remove")} ${l.name}`},children:[l.name,w&&e.jsxs("span",{className:"sr-only",children:[" (",n("file-upload.failed"),")"]})]})},l.id??r)},T=()=>{if(d.length>1)return e.jsx("ul",{className:t.default["tedi-file-upload__items"],children:d.map((l,r)=>oe(l,r))});if(d.length===1){const l=d[0],r=l.isValid===!1;return e.jsxs(re.Text,{className:j.default(t.default["tedi-file-upload__items"],t.default["tedi-file-upload__items--truncate"]),children:[l.name,r&&e.jsxs("span",{className:"sr-only",children:[" (",n("file-upload.failed"),")"]})]})}return null};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:t.default["tedi-file-upload__label-wrapper"],children:!ie&&v&&e.jsx(ue.FormLabel,{id:f,label:v??"",...Z,renderWithoutLabel:x,className:t.default["tedi-file-upload__label"],size:u})}),e.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:le}),x?T():e.jsx("div",{className:j.default(t.default["tedi-file-upload__container"],{[t.default["tedi-file-upload--disabled"]]:s,[t.default["tedi-file-upload--error"]]:((a==null?void 0:a.type)||(i==null?void 0:i.type))==="error",[t.default["tedi-file-upload--valid"]]:((a==null?void 0:a.type)||(i==null?void 0:i.type))==="valid"},{[t.default[`tedi-file-upload__container--${u}`]]:u},W),children:e.jsx("div",{className:t.default["tedi-file-upload__content"],children:e.jsxs(xe.Row,{children:[e.jsx(O.Col,{className:"flex",children:T()}),e.jsx(O.Col,{xs:12,md:"auto",children:e.jsxs("div",{className:se,children:[e.jsx("input",{ref:q,id:f,type:"file",name:$,accept:y,onChange:E,multiple:F,disabled:s,"aria-invalid":!!a&&a.type==="error","aria-describedby":k}),K&&d.length>0&&!s&&e.jsxs(e.Fragment,{children:[M.isBreakpointBelow(te,"md")?e.jsx(S.Button,{visualType:"neutral",iconLeft:"close",disabled:s,onClick:I,className:t.default["tedi-file-upload__button"],children:n("clear")}):e.jsx(ce.ClosingButton,{onClick:I,iconSize:18,title:n("clear")}),e.jsx(fe.Separator,{axis:"vertical",height:1.5,spacing:.5,color:"primary"})]}),e.jsx(S.Button,{ref:N,visualType:"neutral",iconLeft:"file_upload",disabled:s,onClick:()=>{var l;return(l=q.current)==null?void 0:l.click()},className:t.default["tedi-file-upload__button"],size:u,"aria-describedby":k,children:n("file-upload.add")})]})})]})})}),h&&e.jsx(z.FeedbackText,{...h,id:C}),b&&e.jsx(z.FeedbackText,{...b,id:L})]})};A.displayName="FileUpload";exports.FileUpload=A;
|
|
@@ -7,9 +7,9 @@ import { Button as S } from "../../buttons/button/button.es.js";
|
|
|
7
7
|
import { ClosingButton as de } from "../../buttons/closing-button/closing-button.es.js";
|
|
8
8
|
import { FormLabel as ce } from "../form-label/form-label.es.js";
|
|
9
9
|
import { Separator as me } from "../../misc/separator/separator.es.js";
|
|
10
|
-
import { Tag as
|
|
10
|
+
import { Tag as ue } from "../../tags/tag/tag.es.js";
|
|
11
11
|
import { FeedbackText as A } from "../feedback-text/feedback-text.es.js";
|
|
12
|
-
import { useOptionalInputGroup as
|
|
12
|
+
import { useOptionalInputGroup as pe } from "../input-group/input-group.es.js";
|
|
13
13
|
import l from "./file-upload.module.scss.es.js";
|
|
14
14
|
import { useLabels as fe } from "../../../providers/label-provider/use-labels.es.js";
|
|
15
15
|
import he, { isBreakpointBelow as ve } from "../../../helpers/hooks/use-breakpoint.es.js";
|
|
@@ -35,7 +35,7 @@ const _e = (O) => {
|
|
|
35
35
|
maxSize: K,
|
|
36
36
|
validateIndividually: Q = !1,
|
|
37
37
|
showRestrictions: X,
|
|
38
|
-
size:
|
|
38
|
+
size: u = "default",
|
|
39
39
|
helper: o,
|
|
40
40
|
...Y
|
|
41
41
|
} = O, { innerFiles: B, uploadErrorHelper: a, onFileChange: Z, onFileRemove: E, handleClear: G, announcement: ee } = ne({
|
|
@@ -48,7 +48,7 @@ const _e = (O) => {
|
|
|
48
48
|
onDelete: H,
|
|
49
49
|
files: m,
|
|
50
50
|
showRestrictions: X
|
|
51
|
-
}), ie = he(), le = f.useId(), r = ($ =
|
|
51
|
+
}), ie = he(), le = f.useId(), r = ($ = pe) == null ? void 0 : $(), ae = r == null ? void 0 : r.hasExternalLabel, p = V ?? (r == null ? void 0 : r.inputId) ?? le, C = f.useRef(null), L = f.useRef(null), oe = y(l["tedi-file-upload"], { [l["tedi-file-upload--disabled"]]: s }, P), x = (a == null ? void 0 : a.type) === "error", b = o ?? (x ? void 0 : a), _ = x ? a : void 0, R = b ? (o == null ? void 0 : o.id) ?? `${p}-helper` : void 0, k = _ ? `${p}-error` : void 0, I = [R, k].filter(Boolean).join(" ") || void 0, d = f.useMemo(() => m && h ? m : B, [m, B, h]), w = () => {
|
|
52
52
|
var e;
|
|
53
53
|
return (e = L.current) == null ? void 0 : e.focus();
|
|
54
54
|
}, te = (e) => {
|
|
@@ -58,7 +58,7 @@ const _e = (O) => {
|
|
|
58
58
|
}, se = (e, c) => {
|
|
59
59
|
const j = e.isValid === !1;
|
|
60
60
|
return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ t(
|
|
61
|
-
|
|
61
|
+
ue,
|
|
62
62
|
{
|
|
63
63
|
role: "presentation",
|
|
64
64
|
color: j ? "danger" : "primary",
|
|
@@ -95,12 +95,12 @@ const _e = (O) => {
|
|
|
95
95
|
/* @__PURE__ */ i("div", { className: l["tedi-file-upload__label-wrapper"], children: !ae && g && /* @__PURE__ */ i(
|
|
96
96
|
ce,
|
|
97
97
|
{
|
|
98
|
-
id:
|
|
98
|
+
id: p,
|
|
99
99
|
label: g ?? "",
|
|
100
100
|
...Y,
|
|
101
101
|
renderWithoutLabel: v,
|
|
102
102
|
className: l["tedi-file-upload__label"],
|
|
103
|
-
size:
|
|
103
|
+
size: u
|
|
104
104
|
}
|
|
105
105
|
) }),
|
|
106
106
|
/* @__PURE__ */ i("div", { role: "status", "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: ee }),
|
|
@@ -114,17 +114,17 @@ const _e = (O) => {
|
|
|
114
114
|
[l["tedi-file-upload--error"]]: ((a == null ? void 0 : a.type) || (o == null ? void 0 : o.type)) === "error",
|
|
115
115
|
[l["tedi-file-upload--valid"]]: ((a == null ? void 0 : a.type) || (o == null ? void 0 : o.type)) === "valid"
|
|
116
116
|
},
|
|
117
|
-
{ [l[`tedi-file-upload__container--${
|
|
117
|
+
{ [l[`tedi-file-upload__container--${u}`]]: u },
|
|
118
118
|
W
|
|
119
119
|
),
|
|
120
120
|
children: /* @__PURE__ */ i("div", { className: l["tedi-file-upload__content"], children: /* @__PURE__ */ t(be, { children: [
|
|
121
|
-
/* @__PURE__ */ i(M, { className: "
|
|
121
|
+
/* @__PURE__ */ i(M, { className: "flex", children: U() }),
|
|
122
122
|
/* @__PURE__ */ i(M, { xs: 12, md: "auto", children: /* @__PURE__ */ t("div", { className: oe, children: [
|
|
123
123
|
/* @__PURE__ */ i(
|
|
124
124
|
"input",
|
|
125
125
|
{
|
|
126
126
|
ref: C,
|
|
127
|
-
id:
|
|
127
|
+
id: p,
|
|
128
128
|
type: "file",
|
|
129
129
|
name: D,
|
|
130
130
|
accept: F,
|
|
@@ -161,7 +161,7 @@ const _e = (O) => {
|
|
|
161
161
|
return (e = C.current) == null ? void 0 : e.click();
|
|
162
162
|
},
|
|
163
163
|
className: l["tedi-file-upload__button"],
|
|
164
|
-
size:
|
|
164
|
+
size: u,
|
|
165
165
|
"aria-describedby": I,
|
|
166
166
|
children: n("file-upload.add")
|
|
167
167
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),I=require("../../../../../../external/classnames/index.cjs.js"),E=require("../../../misc/option-content/option-content.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("react/jsx-runtime"),I=require("../../../../../../external/classnames/index.cjs.js"),E=require("../../../misc/option-content/option-content.cjs.js"),i=require("../select.module.scss.cjs.js"),t=require("./select-bulk-helpers.cjs.js"),O=require("../../../../../../external/react-select/dist/index-641ee5b8.esm.cjs.js"),g=({renderOption:f,...e})=>{var L;const c=e.data.value===t.SELECT_ALL_VALUE,u=t.isGroupSentinel(e.data),S=!!((L=e.data.customData)!=null&&L.__tediInGroup);let a=e.isSelected,r=!1;if(c){const l=t.getEnabledOptions(e.options).filter(s=>s.value!==t.SELECT_ALL_VALUE),n=(e.getValue()??[]).filter(s=>s.value!==t.SELECT_ALL_VALUE);a=t.areAllSelected(n,l),r=t.isIndeterminate(n,l)}else if(u){const l=e.options,b=l.findIndex(o=>o.value===e.data.value),n=[];for(let o=b+1;o<l.length;o++){const d=l[o];if(!d||typeof d.value=="string"&&(d.value.startsWith(t.GROUP_OPTION_PREFIX)||d.value===t.SELECT_ALL_VALUE))break;d.isDisabled||n.push(d)}const s=e.getValue()??[];a=t.areAllSelected(s,n),r=t.isIndeterminate(s,n)}const m=I.default(i.default["tedi-select__option"],i.default["tedi-select__option--control"],{[i.default["tedi-select__option--disabled"]]:e.isDisabled},{[i.default["tedi-select__option--focused"]]:e.isFocused},{[i.default["tedi-select__option--select-all"]]:c},{[i.default["tedi-select__option--group"]]:u},{[i.default["tedi-select__option--indented"]]:S}),{tabIndex:A,...x}=e.innerProps;return _.jsx(O.c.Option,{...e,innerProps:{...x,tabIndex:A,role:"option","aria-selected":a},className:m,children:f&&!c&&!u?f(e):_.jsx(E.OptionContent,{type:"checkbox",indicatorSemantics:"control",selected:a,indeterminate:r,disabled:e.isDisabled,children:_.jsx(E.OptionContent.Label,{children:e.children})})})};exports.SelectMultiOption=g;
|
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import E from "../../../../../../external/classnames/index.es.js";
|
|
3
3
|
import { OptionContent as h } from "../../../misc/option-content/option-content.es.js";
|
|
4
|
-
import
|
|
5
|
-
import { SELECT_ALL_VALUE as c, isGroupSentinel as P, getEnabledOptions as
|
|
6
|
-
import { c as
|
|
7
|
-
const V = ({ renderOption:
|
|
8
|
-
var
|
|
9
|
-
const d = e.data.value === c, r = P(e.data), S = !!((
|
|
4
|
+
import t from "../select.module.scss.es.js";
|
|
5
|
+
import { SELECT_ALL_VALUE as c, isGroupSentinel as P, getEnabledOptions as p, areAllSelected as I, isIndeterminate as v, GROUP_OPTION_PREFIX as y } from "./select-bulk-helpers.es.js";
|
|
6
|
+
import { c as G } from "../../../../../../external/react-select/dist/index-641ee5b8.esm.es.js";
|
|
7
|
+
const V = ({ renderOption: _, ...e }) => {
|
|
8
|
+
var f;
|
|
9
|
+
const d = e.data.value === c, r = P(e.data), S = !!((f = e.data.customData) != null && f.__tediInGroup);
|
|
10
10
|
let a = e.isSelected, u = !1;
|
|
11
11
|
if (d) {
|
|
12
|
-
const
|
|
13
|
-
a = I(
|
|
12
|
+
const i = p(e.options).filter((n) => n.value !== c), l = (e.getValue() ?? []).filter((n) => n.value !== c);
|
|
13
|
+
a = I(l, i), u = v(l, i);
|
|
14
14
|
} else if (r) {
|
|
15
|
-
const
|
|
16
|
-
for (let
|
|
17
|
-
const
|
|
18
|
-
if (!
|
|
15
|
+
const i = e.options, b = i.findIndex((s) => s.value === e.data.value), l = [];
|
|
16
|
+
for (let s = b + 1; s < i.length; s++) {
|
|
17
|
+
const o = i[s];
|
|
18
|
+
if (!o || typeof o.value == "string" && (o.value.startsWith(y) || o.value === c))
|
|
19
19
|
break;
|
|
20
|
-
|
|
20
|
+
o.isDisabled || l.push(o);
|
|
21
21
|
}
|
|
22
|
-
const
|
|
23
|
-
a = I(
|
|
22
|
+
const n = e.getValue() ?? [];
|
|
23
|
+
a = I(n, l), u = v(n, l);
|
|
24
24
|
}
|
|
25
25
|
const g = E(
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{ [
|
|
29
|
-
{ [
|
|
30
|
-
{ [
|
|
31
|
-
{ [
|
|
26
|
+
t["tedi-select__option"],
|
|
27
|
+
t["tedi-select__option--control"],
|
|
28
|
+
{ [t["tedi-select__option--disabled"]]: e.isDisabled },
|
|
29
|
+
{ [t["tedi-select__option--focused"]]: e.isFocused },
|
|
30
|
+
{ [t["tedi-select__option--select-all"]]: d },
|
|
31
|
+
{ [t["tedi-select__option--group"]]: r },
|
|
32
|
+
{ [t["tedi-select__option--indented"]]: S }
|
|
32
33
|
), { tabIndex: O, ...x } = e.innerProps;
|
|
33
34
|
return /* @__PURE__ */ m(
|
|
34
|
-
|
|
35
|
+
G.Option,
|
|
35
36
|
{
|
|
36
37
|
...e,
|
|
37
38
|
innerProps: { ...x, tabIndex: O, role: "option", "aria-selected": a },
|
|
38
39
|
className: g,
|
|
39
|
-
children:
|
|
40
|
+
children: _ && !d && !r ? _(e) : /* @__PURE__ */ m(
|
|
40
41
|
h,
|
|
41
42
|
{
|
|
42
43
|
type: "checkbox",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),o=require("../../../../../../external/classnames/index.cjs.js"),d=require("../../../misc/option-content/option-content.cjs.js"),t=require("../select.module.scss.cjs.js"),s=require("../../../../../../external/react-select/dist/index-641ee5b8.esm.cjs.js"),a=({showRadioButtons:i,renderOption:l,...e})=>{const c=o.default(t.default["tedi-select__option"],{[t.default["tedi-select__option--control"]]:i},{[t.default["tedi-select__option--disabled"]]:e.isDisabled},{[t.default["tedi-select__option--selected"]]:e.isSelected&&!i},{[t.default["tedi-select__option--focused"]]:e.isFocused});return n.jsx(s.c.Option,{...e,innerProps:{role:"option","aria-selected":e.isSelected,"aria-disabled":e.isDisabled,...e.innerProps},className:c,children:i?n.jsx(d.OptionContent,{type:"radio",indicatorSemantics:"control",selected:e.isSelected,disabled:e.isDisabled,children:n.jsx(d.OptionContent.Label,{children:e.children})}):l?l(e):e.children})};exports.SelectSingleOption=a;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import o from "../../../../../../external/classnames/index.es.js";
|
|
3
|
-
import { OptionContent as
|
|
3
|
+
import { OptionContent as n } from "../../../misc/option-content/option-content.es.js";
|
|
4
4
|
import i from "../select.module.scss.es.js";
|
|
5
5
|
import { c as s } from "../../../../../../external/react-select/dist/index-641ee5b8.esm.es.js";
|
|
6
|
-
const f = ({ showRadioButtons:
|
|
7
|
-
const
|
|
6
|
+
const f = ({ showRadioButtons: t, renderOption: c, ...e }) => {
|
|
7
|
+
const d = o(
|
|
8
8
|
i["tedi-select__option"],
|
|
9
|
+
{ [i["tedi-select__option--control"]]: t },
|
|
9
10
|
{ [i["tedi-select__option--disabled"]]: e.isDisabled },
|
|
10
|
-
{ [i["tedi-select__option--selected"]]: e.isSelected && !
|
|
11
|
+
{ [i["tedi-select__option--selected"]]: e.isSelected && !t },
|
|
11
12
|
{ [i["tedi-select__option--focused"]]: e.isFocused }
|
|
12
13
|
);
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ l(
|
|
14
15
|
s.Option,
|
|
15
16
|
{
|
|
16
17
|
...e,
|
|
@@ -20,15 +21,15 @@ const f = ({ showRadioButtons: l, renderOption: c, ...e }) => {
|
|
|
20
21
|
"aria-disabled": e.isDisabled,
|
|
21
22
|
...e.innerProps
|
|
22
23
|
},
|
|
23
|
-
className:
|
|
24
|
-
children:
|
|
25
|
-
|
|
24
|
+
className: d,
|
|
25
|
+
children: t ? /* @__PURE__ */ l(
|
|
26
|
+
n,
|
|
26
27
|
{
|
|
27
28
|
type: "radio",
|
|
28
29
|
indicatorSemantics: "control",
|
|
29
30
|
selected: e.isSelected,
|
|
30
31
|
disabled: e.isDisabled,
|
|
31
|
-
children: /* @__PURE__ */
|
|
32
|
+
children: /* @__PURE__ */ l(n.Label, { children: e.children })
|
|
32
33
|
}
|
|
33
34
|
) : c ? c(e) : e.children
|
|
34
35
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-select__control":"tedi-select__control-dbce8bb7","tedi-select__value-container":"tedi-select__value-container-253d079a","tedi-select__indicators-container":"tedi-select__indicators-container-0fc8fa2a","tedi-select__input":"tedi-select__input-5525b622","tedi-select":"tedi-select-8b014852","tedi-select--disabled":"tedi-select--disabled-2d4b8ddd","tedi-select--invalid":"tedi-select--invalid-3901c89c","tedi-select--valid":"tedi-select--valid-969c0297","tedi-select__control--focused":"tedi-select__control--focused-0e632efe","tedi-select__arrow":"tedi-select__arrow-94b5ef4a","tedi-select__loading-indicator":"tedi-select__loading-indicator-a35a63ca","tedi-select__dropdown-indicator":"tedi-select__dropdown-indicator-5a948baa","tedi-select__clear-indicator":"tedi-select__clear-indicator-68b60b12","tedi-select__menu-portal":"tedi-select__menu-portal-d5349f37","tedi-select__menu":"tedi-select__menu-bf54b75b","tedi-select__menu-list--grid":"tedi-select__menu-list--grid-393f3232","tedi-select__menu-list":"tedi-select__menu-list-0aa06e24","tedi-select__menu-list-inner":"tedi-select__menu-list-inner-471e5cf8","tedi-select__menu-list-footer":"tedi-select__menu-list-footer-eb1d3bbc","tedi-select__option":"tedi-select__option-6f811381","tedi-select__option--disabled":"tedi-select__option--disabled-d3aff112","tedi-select__option--focused":"tedi-select__option--focused-1d972ff1","tedi-select__option--
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-select__control":"tedi-select__control-dbce8bb7","tedi-select__value-container":"tedi-select__value-container-253d079a","tedi-select__indicators-container":"tedi-select__indicators-container-0fc8fa2a","tedi-select__input":"tedi-select__input-5525b622","tedi-select":"tedi-select-8b014852","tedi-select--disabled":"tedi-select--disabled-2d4b8ddd","tedi-select--invalid":"tedi-select--invalid-3901c89c","tedi-select--valid":"tedi-select--valid-969c0297","tedi-select__control--focused":"tedi-select__control--focused-0e632efe","tedi-select__arrow":"tedi-select__arrow-94b5ef4a","tedi-select__loading-indicator":"tedi-select__loading-indicator-a35a63ca","tedi-select__dropdown-indicator":"tedi-select__dropdown-indicator-5a948baa","tedi-select__clear-indicator":"tedi-select__clear-indicator-68b60b12","tedi-select__menu-portal":"tedi-select__menu-portal-d5349f37","tedi-select__menu":"tedi-select__menu-bf54b75b","tedi-select__menu-list--grid":"tedi-select__menu-list--grid-393f3232","tedi-select__menu-list":"tedi-select__menu-list-0aa06e24","tedi-select__menu-list-inner":"tedi-select__menu-list-inner-471e5cf8","tedi-select__menu-list-footer":"tedi-select__menu-list-footer-eb1d3bbc","tedi-select__option":"tedi-select__option-6f811381","tedi-select__option--disabled":"tedi-select__option--disabled-d3aff112","tedi-select__option--selected":"tedi-select__option--selected-a93e5fb0","tedi-select__option--focused":"tedi-select__option--focused-1d972ff1","tedi-select__option--control":"tedi-select__option--control-f69f3f48","tedi-select--small":"tedi-select--small-2659608b","tedi-select__multi-value-item":"tedi-select__multi-value-item-b8ec59ae","tedi-select__multi-value--ellipsis":"tedi-select__multi-value--ellipsis-1d821ed7","tedi-select__group":"tedi-select__group-b275e954","tedi-select__group-heading":"tedi-select__group-heading-02b3d9bc","tedi-select__group-heading--selectable":"tedi-select__group-heading--selectable-c84cd617","tedi-select__option--indented":"tedi-select__option--indented-bf4a1661","tedi-select__multi-value-clear":"tedi-select__multi-value-clear-d231f7de","tedi-select--tags-row":"tedi-select--tags-row-c9f33e4b","tedi-select__overflow-tag":"tedi-select__overflow-tag-c0391df2","tedi-select__menu-list--keyboard":"tedi-select__menu-list--keyboard-3d066942","tedi-select__select-all":"tedi-select__select-all-12c3e7f1","tedi-select__group-heading-toggle":"tedi-select__group-heading-toggle-34296a63","tedi-select--tags-stack":"tedi-select--tags-stack-ddb929a9","tedi-select__separator":"tedi-select__separator-b1045f3f","tedi-select--searchable":"tedi-select--searchable-d56eb325"};exports.default=e;
|
|
@@ -20,8 +20,9 @@ const e = {
|
|
|
20
20
|
"tedi-select__menu-list-footer": "tedi-select__menu-list-footer-eb1d3bbc",
|
|
21
21
|
"tedi-select__option": "tedi-select__option-6f811381",
|
|
22
22
|
"tedi-select__option--disabled": "tedi-select__option--disabled-d3aff112",
|
|
23
|
-
"tedi-select__option--focused": "tedi-select__option--focused-1d972ff1",
|
|
24
23
|
"tedi-select__option--selected": "tedi-select__option--selected-a93e5fb0",
|
|
24
|
+
"tedi-select__option--focused": "tedi-select__option--focused-1d972ff1",
|
|
25
|
+
"tedi-select__option--control": "tedi-select__option--control-f69f3f48",
|
|
25
26
|
"tedi-select--small": "tedi-select--small-2659608b",
|
|
26
27
|
"tedi-select__multi-value-item": "tedi-select__multi-value-item-b8ec59ae",
|
|
27
28
|
"tedi-select__multi-value--ellipsis": "tedi-select__multi-value--ellipsis-1d821ed7",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react/jsx-runtime"),w=require("../../../../../external/classnames/index.cjs.js"),a=require("react"),O=require("../textfield/textfield.cjs.js"),d=require("./textarea.module.scss.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("react/jsx-runtime"),w=require("../../../../../external/classnames/index.cjs.js"),a=require("react"),O=require("../textfield/textfield.cjs.js"),d=require("./textarea.module.scss.cjs.js"),N=a.forwardRef((_,o)=>{const{className:b,helper:p=[],characterLimit:s,onChange:n,onChangeEvent:g,value:l,defaultValue:q,autoGrow:t=!1,minRows:u=3,maxRows:y=12,height:H="7.5rem",maxHeight:i,...F}=_,[T,A]=a.useState(q??""),c=a.useRef(null),[v,E]=a.useState("auto"),j=a.useCallback(e=>{!l&&!(n||g)&&A(e),n==null||n(e)},[l,n,g]),m=a.useMemo(()=>l??T,[l,T]),r=a.useCallback(()=>{if(!t||!c.current)return;const e=c.current,$=e.style.overflow;e.style.overflow="hidden";const f=window.getComputedStyle(e);let h=parseFloat(f.lineHeight);isNaN(h)&&(h=(parseFloat(f.fontSize)||16)*1.5);const S=parseFloat(f.paddingTop),R=parseFloat(f.paddingBottom),B=e.scrollHeight-S-R;let x=Math.ceil(B/h);x=Math.min(Math.max(x,u),y);const M=`${x*h+S+R}px`;e.style.height=M,E(M),e.style.overflow=$,e.style.overflowY=e.scrollHeight>e.clientHeight?"auto":"hidden"},[t,u,y]);a.useEffect(()=>{t&&requestAnimationFrame(()=>{r()})},[m,t,r]),a.useEffect(()=>{t&&c.current&&r()},[t,r]);const k=a.useCallback(e=>{o&&(typeof o=="function"?o(e):o.current=e),e!=null&&e.input&&e.input instanceof HTMLTextAreaElement&&(c.current=e.input,t&&setTimeout(r,0))},[o,t,r]),z=a.useMemo(()=>t?{rows:u,style:{...i?{maxHeight:i}:{},overflow:"hidden",height:v}}:{style:{height:H,...i?{maxHeight:i}:{},overflow:"auto"}},[t,u,i,H,v]),C=m.length,I=s?`${C}/${s}`:"",V=[...Array.isArray(p)?p:[p],...s?[{type:C>s?"error":"hint",text:I,position:"right",className:w.default(d.default["tedi-textarea__character-count"])}]:[]];return L.jsx(O.TextField,{...F,ref:k,"data-name":"textarea",inputClassName:w.default(d.default["tedi-textarea__input"],{[d.default["tedi-textarea__input--auto-grow"]]:t}),isTextArea:!0,className:w.default(d.default["tedi-textarea"],b),value:m,onChange:j,onChangeEvent:g,helper:V,input:z})});N.displayName="Textarea";exports.Textarea=N;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { TextFieldForwardRef, TextFieldProps } from '../textfield/textfield';
|
|
3
|
-
export interface
|
|
3
|
+
export interface TextareaProps extends Omit<TextFieldProps, 'icon' | 'isClearable' | 'onClear'> {
|
|
4
4
|
/**
|
|
5
5
|
* Maximum number of characters allowed in the textarea.
|
|
6
6
|
*/
|
|
@@ -35,5 +35,5 @@ export interface TextAreaProps extends TextFieldProps {
|
|
|
35
35
|
*/
|
|
36
36
|
maxHeight?: string | number;
|
|
37
37
|
}
|
|
38
|
-
export declare const
|
|
39
|
-
export default
|
|
38
|
+
export declare const Textarea: React.ForwardRefExoticComponent<TextareaProps & React.RefAttributes<TextFieldForwardRef>>;
|
|
39
|
+
export default Textarea;
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { jsx as q } from "react/jsx-runtime";
|
|
2
2
|
import w from "../../../../../external/classnames/index.es.js";
|
|
3
|
-
import a, { forwardRef as G, useRef as O, useEffect as
|
|
3
|
+
import a, { forwardRef as G, useRef as O, useEffect as S } from "react";
|
|
4
4
|
import { TextField as P } from "../textfield/textfield.es.js";
|
|
5
5
|
import p from "./textarea.module.scss.es.js";
|
|
6
|
-
const Y = G((
|
|
6
|
+
const Y = G((F, r) => {
|
|
7
7
|
const {
|
|
8
|
-
className:
|
|
8
|
+
className: M,
|
|
9
9
|
helper: f = [],
|
|
10
10
|
characterLimit: i,
|
|
11
11
|
onChange: s,
|
|
12
12
|
onChangeEvent: g,
|
|
13
13
|
value: l,
|
|
14
|
-
defaultValue:
|
|
14
|
+
defaultValue: A,
|
|
15
15
|
autoGrow: e = !1,
|
|
16
16
|
minRows: c = 3,
|
|
17
17
|
maxRows: H = 12,
|
|
18
18
|
height: y = "7.5rem",
|
|
19
19
|
maxHeight: n,
|
|
20
20
|
...b
|
|
21
|
-
} =
|
|
21
|
+
} = F, [v, k] = a.useState(A ?? ""), u = O(null), [C, z] = a.useState("auto"), E = a.useCallback(
|
|
22
22
|
(t) => {
|
|
23
23
|
!l && !(s || g) && k(t), s == null || s(t);
|
|
24
24
|
},
|
|
@@ -33,14 +33,14 @@ const Y = G((S, r) => {
|
|
|
33
33
|
const N = parseFloat(h.paddingTop), _ = parseFloat(h.paddingBottom), j = t.scrollHeight - N - _;
|
|
34
34
|
let d = Math.ceil(j / m);
|
|
35
35
|
d = Math.min(Math.max(d, c), H);
|
|
36
|
-
const
|
|
37
|
-
t.style.height =
|
|
36
|
+
const R = `${d * m + N + _}px`;
|
|
37
|
+
t.style.height = R, z(R), t.style.overflow = L, t.style.overflowY = t.scrollHeight > t.clientHeight ? "auto" : "hidden";
|
|
38
38
|
}, [e, c, H]);
|
|
39
|
-
|
|
39
|
+
S(() => {
|
|
40
40
|
e && requestAnimationFrame(() => {
|
|
41
41
|
o();
|
|
42
42
|
});
|
|
43
|
-
}, [x, e, o]),
|
|
43
|
+
}, [x, e, o]), S(() => {
|
|
44
44
|
e && u.current && o();
|
|
45
45
|
}, [e, o]);
|
|
46
46
|
const I = a.useCallback(
|
|
@@ -82,7 +82,7 @@ const Y = G((S, r) => {
|
|
|
82
82
|
[p["tedi-textarea__input--auto-grow"]]: e
|
|
83
83
|
}),
|
|
84
84
|
isTextArea: !0,
|
|
85
|
-
className: w(p["tedi-textarea"],
|
|
85
|
+
className: w(p["tedi-textarea"], M),
|
|
86
86
|
value: x,
|
|
87
87
|
onChange: E,
|
|
88
88
|
onChangeEvent: g,
|
|
@@ -91,7 +91,7 @@ const Y = G((S, r) => {
|
|
|
91
91
|
}
|
|
92
92
|
);
|
|
93
93
|
});
|
|
94
|
-
Y.displayName = "
|
|
94
|
+
Y.displayName = "Textarea";
|
|
95
95
|
export {
|
|
96
|
-
Y as
|
|
96
|
+
Y as Textarea
|
|
97
97
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("../../../../../external/classnames/index.cjs.js"),o=require("react"),a=require("../../overlays/popover/popover.cjs.js"),i=require("./ellipsis.module.scss.cjs.js"),g=require("../../../helpers/hooks/use-element-size.cjs.js"),E=p=>{const{children:l,lineClamp:r=2,position:s="end",popover:u=!0,className:m,...f}=p,n=o.useRef(null),[v,h]=o.useState(!1),j=g.useElementSize(n);o.useEffect(()=>{const t=n.current;t&&h(s==="start"?t.scrollWidth>t.clientWidth:t.scrollHeight>t.clientHeight)},[j,s,r]);const c=v&&u,d=e.jsx("div",{"data-name":"ellipsis",...f,ref:n,role:c?"button":void 0,className:x.default(i.default["tedi-ellipsis"],{[i.default["tedi-ellipsis--start"]]:s==="start"},m),style:s==="end"?{lineClamp:r,WebkitLineClamp:r}:void 0,children:s==="start"?e.jsx("span",{className:i.default["tedi-ellipsis__inner"],children:l}):l});return c?e.jsxs(a.Popover,{openWith:"hover",focusManager:{modal:!1},children:[e.jsx(a.Popover.Trigger,{children:d}),e.jsx(a.Popover.Content,{children:e.jsx("span",{className:i.default["tedi-ellipsis__overlay"],children:l})})]}):d};exports.Ellipsis=E;
|
|
@@ -1,37 +1,38 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import { jsx as t, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import E from "../../../../../external/classnames/index.es.js";
|
|
3
|
+
import n from "react";
|
|
4
4
|
import { Popover as a } from "../../overlays/popover/popover.es.js";
|
|
5
5
|
import i from "./ellipsis.module.scss.es.js";
|
|
6
|
-
import { useElementSize as
|
|
7
|
-
const
|
|
8
|
-
const { children: l, lineClamp: r = 2, position: e = "end", popover:
|
|
9
|
-
|
|
10
|
-
const s =
|
|
11
|
-
s &&
|
|
6
|
+
import { useElementSize as N } from "../../../helpers/hooks/use-element-size.es.js";
|
|
7
|
+
const b = (m) => {
|
|
8
|
+
const { children: l, lineClamp: r = 2, position: e = "end", popover: d = !0, className: f, ...h } = m, o = n.useRef(null), [u, v] = n.useState(!1), _ = N(o);
|
|
9
|
+
n.useEffect(() => {
|
|
10
|
+
const s = o.current;
|
|
11
|
+
s && v(
|
|
12
12
|
e === "start" ? s.scrollWidth > s.clientWidth : s.scrollHeight > s.clientHeight
|
|
13
13
|
);
|
|
14
|
-
}, [
|
|
15
|
-
const c = /* @__PURE__ */ t(
|
|
14
|
+
}, [_, e, r]);
|
|
15
|
+
const c = u && d, p = /* @__PURE__ */ t(
|
|
16
16
|
"div",
|
|
17
17
|
{
|
|
18
18
|
"data-name": "ellipsis",
|
|
19
|
-
...
|
|
20
|
-
ref:
|
|
21
|
-
|
|
19
|
+
...h,
|
|
20
|
+
ref: o,
|
|
21
|
+
role: c ? "button" : void 0,
|
|
22
|
+
className: E(
|
|
22
23
|
i["tedi-ellipsis"],
|
|
23
24
|
{ [i["tedi-ellipsis--start"]]: e === "start" },
|
|
24
|
-
|
|
25
|
+
f
|
|
25
26
|
),
|
|
26
27
|
style: e === "end" ? { lineClamp: r, WebkitLineClamp: r } : void 0,
|
|
27
28
|
children: e === "start" ? /* @__PURE__ */ t("span", { className: i["tedi-ellipsis__inner"], children: l }) : l
|
|
28
29
|
}
|
|
29
30
|
);
|
|
30
|
-
return
|
|
31
|
-
/* @__PURE__ */ t(a.Trigger, { children:
|
|
31
|
+
return c ? /* @__PURE__ */ g(a, { openWith: "hover", focusManager: { modal: !1 }, children: [
|
|
32
|
+
/* @__PURE__ */ t(a.Trigger, { children: p }),
|
|
32
33
|
/* @__PURE__ */ t(a.Content, { children: /* @__PURE__ */ t("span", { className: i["tedi-ellipsis__overlay"], children: l }) })
|
|
33
|
-
] }) :
|
|
34
|
+
] }) : p;
|
|
34
35
|
};
|
|
35
36
|
export {
|
|
36
|
-
|
|
37
|
+
b as Ellipsis
|
|
37
38
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),s=require("../../../../../../../external/classnames/index.cjs.js"),l=require("../../timeline.module.scss.cjs.js"),i=({children:t,color:e="tertiary",className:n})=>r.jsx("div",{className:s.default(l.default["tedi-timeline-description"],{[`tedi-text--${e}`]:e!=="inherit"},n),children:t});i.displayName="TimelineDescription";exports.TimelineDescription=i;
|
package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.d.ts
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TextColor } from '../../../../base/typography/text/text';
|
|
3
|
+
export interface TimelineDescriptionProps {
|
|
4
|
+
/**
|
|
5
|
+
* Description content, shown below the title in a muted style.
|
|
6
|
+
*/
|
|
7
|
+
children?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* Text color, using the shared typography colors. Defaults to `tertiary`.
|
|
10
|
+
* Pass `'inherit'` to inherit the surrounding color instead.
|
|
11
|
+
* @default tertiary
|
|
12
|
+
*/
|
|
13
|
+
color?: TextColor | 'inherit';
|
|
14
|
+
/**
|
|
15
|
+
* Additional class name.
|
|
16
|
+
*/
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
export declare const TimelineDescription: {
|
|
20
|
+
({ children, color, className, }: TimelineDescriptionProps): JSX.Element;
|
|
21
|
+
displayName: string;
|
|
22
|
+
};
|
|
23
|
+
export default TimelineDescription;
|
package/src/tedi/components/misc/timeline/components/timeline-description/timeline-description.es.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import m from "../../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import r from "../../timeline.module.scss.es.js";
|
|
4
|
+
const o = ({
|
|
5
|
+
children: e,
|
|
6
|
+
color: i = "tertiary",
|
|
7
|
+
className: t
|
|
8
|
+
}) => /* @__PURE__ */ s("div", { className: m(r["tedi-timeline-description"], { [`tedi-text--${i}`]: i !== "inherit" }, t), children: e });
|
|
9
|
+
o.displayName = "TimelineDescription";
|
|
10
|
+
export {
|
|
11
|
+
o as TimelineDescription
|
|
12
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),u=require("../../../../../../../external/classnames/index.cjs.js"),f=require("react"),p=require("../../../../../helpers/hooks/use-breakpoint.cjs.js"),_=require("../../../separator/separator.cjs.js"),t=require("../../timeline.module.scss.cjs.js"),x=require("../timeline-description/timeline-description.cjs.js"),T=require("../timeline-title/timeline-title.cjs.js"),j=({children:y,timings:h=[],timingsBottom:l,state:n="future",isLast:v=!1})=>{const N=p.default(),s=p.isBreakpointBelow(N,"lg"),o=f.Children.toArray(y),r=(e,a)=>f.isValidElement(e)&&e.type===a,q=o.find(e=>r(e,T.TimelineTitle)),b=o.find(e=>r(e,x.TimelineDescription)),d=o.filter(e=>!r(e,T.TimelineTitle)&&!r(e,x.TimelineDescription)),g=n==="future"?"secondary":"accent",S=n==="past"?"accent":"secondary",c=l!=null&&typeof l!="boolean",m=c&&i.jsx("div",{className:t.default["tedi-timeline__timings-bottom"],children:l});return i.jsxs("div",{className:u.default(t.default["tedi-timeline-item"],{[t.default["tedi-timeline__item--has-bottom"]]:s&&c}),children:[i.jsxs("div",{className:t.default["tedi-timeline__timings"],children:[h.map((e,a)=>i.jsx("span",{className:t.default["tedi-timeline__time"],children:e},`${e}-${a}`)),!s&&m]}),i.jsxs("div",{className:u.default(t.default["tedi-timeline__marker"],{[t.default["tedi-timeline__marker--large"]]:n==="current"}),children:[i.jsx(_.Separator,{variant:"dot-only",color:g,dotSize:n==="current"?"large":"medium",dotStyle:n==="future"?"outlined":"filled"}),!v&&i.jsx(_.Separator,{axis:"vertical",color:S})]}),i.jsxs("div",{className:t.default["tedi-timeline__info"],children:[i.jsxs("div",{children:[q,b]}),d.length>0&&i.jsx("div",{className:t.default["tedi-timeline__content"],children:d})]}),s&&m]})};j.displayName="TimelineItem";exports.TimelineItem=j;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TimelineItemState } from '../../timeline';
|
|
3
|
+
export interface TimelineItemProps {
|
|
4
|
+
/**
|
|
5
|
+
* Item content. `Timeline.Title` and `Timeline.Description` are rendered in the
|
|
6
|
+
* info area; any other content is rendered below them.
|
|
7
|
+
*/
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Timing labels shown before the item (e.g. `['2024', '16. detsember']`). On desktop
|
|
11
|
+
* they stack in the left column (first line larger); on mobile they sit inline.
|
|
12
|
+
*/
|
|
13
|
+
timings?: string[];
|
|
14
|
+
/**
|
|
15
|
+
* Content pinned to the bottom of the timings column on desktop and rendered after the
|
|
16
|
+
* item content on mobile — e.g. a "last modified" note.
|
|
17
|
+
*/
|
|
18
|
+
timingsBottom?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* Current / past / future state. Injected by `Timeline` from its `activeIndex`.
|
|
21
|
+
* @internal
|
|
22
|
+
*/
|
|
23
|
+
state?: TimelineItemState;
|
|
24
|
+
/**
|
|
25
|
+
* Whether this is the last item (hides the connecting line). Injected by `Timeline`.
|
|
26
|
+
* @internal
|
|
27
|
+
*/
|
|
28
|
+
isLast?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export declare const TimelineItem: {
|
|
31
|
+
({ children, timings, timingsBottom, state, isLast, }: TimelineItemProps): JSX.Element;
|
|
32
|
+
displayName: string;
|
|
33
|
+
};
|
|
34
|
+
export default TimelineItem;
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsxs as o, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import f from "../../../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { Children as B, isValidElement as C } from "react";
|
|
4
|
+
import S, { isBreakpointBelow as j } from "../../../../../helpers/hooks/use-breakpoint.es.js";
|
|
5
|
+
import { Separator as _ } from "../../../separator/separator.es.js";
|
|
6
|
+
import i from "../../timeline.module.scss.es.js";
|
|
7
|
+
import { TimelineDescription as u } from "../timeline-description/timeline-description.es.js";
|
|
8
|
+
import { TimelineTitle as h } from "../timeline-title/timeline-title.es.js";
|
|
9
|
+
const A = ({
|
|
10
|
+
children: y,
|
|
11
|
+
timings: v = [],
|
|
12
|
+
timingsBottom: r,
|
|
13
|
+
state: t = "future",
|
|
14
|
+
isLast: N = !1
|
|
15
|
+
}) => {
|
|
16
|
+
const T = S(), m = j(T, "lg"), s = B.toArray(y), l = (e, c) => C(e) && e.type === c, k = s.find((e) => l(e, h)), b = s.find((e) => l(e, u)), a = s.filter((e) => !l(e, h) && !l(e, u)), g = t === "future" ? "secondary" : "accent", x = t === "past" ? "accent" : "secondary", d = r != null && typeof r != "boolean", p = d && /* @__PURE__ */ n("div", { className: i["tedi-timeline__timings-bottom"], children: r });
|
|
17
|
+
return /* @__PURE__ */ o(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
className: f(i["tedi-timeline-item"], {
|
|
21
|
+
[i["tedi-timeline__item--has-bottom"]]: m && d
|
|
22
|
+
}),
|
|
23
|
+
children: [
|
|
24
|
+
/* @__PURE__ */ o("div", { className: i["tedi-timeline__timings"], children: [
|
|
25
|
+
v.map((e, c) => /* @__PURE__ */ n("span", { className: i["tedi-timeline__time"], children: e }, `${e}-${c}`)),
|
|
26
|
+
!m && p
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ o(
|
|
29
|
+
"div",
|
|
30
|
+
{
|
|
31
|
+
className: f(i["tedi-timeline__marker"], {
|
|
32
|
+
[i["tedi-timeline__marker--large"]]: t === "current"
|
|
33
|
+
}),
|
|
34
|
+
children: [
|
|
35
|
+
/* @__PURE__ */ n(
|
|
36
|
+
_,
|
|
37
|
+
{
|
|
38
|
+
variant: "dot-only",
|
|
39
|
+
color: g,
|
|
40
|
+
dotSize: t === "current" ? "large" : "medium",
|
|
41
|
+
dotStyle: t === "future" ? "outlined" : "filled"
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
!N && /* @__PURE__ */ n(_, { axis: "vertical", color: x })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ o("div", { className: i["tedi-timeline__info"], children: [
|
|
49
|
+
/* @__PURE__ */ o("div", { children: [
|
|
50
|
+
k,
|
|
51
|
+
b
|
|
52
|
+
] }),
|
|
53
|
+
a.length > 0 && /* @__PURE__ */ n("div", { className: i["tedi-timeline__content"], children: a })
|
|
54
|
+
] }),
|
|
55
|
+
m && p
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
);
|
|
59
|
+
};
|
|
60
|
+
A.displayName = "TimelineItem";
|
|
61
|
+
export {
|
|
62
|
+
A as TimelineItem
|
|
63
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),s=require("../../../../../../../external/classnames/index.cjs.js"),d=require("../../timeline.module.scss.cjs.js"),i=({children:t,color:e="secondary",className:l})=>n.jsx("div",{className:s.default(d.default["tedi-timeline-title"],{[`tedi-text--${e}`]:e!=="inherit"},l),children:t});i.displayName="TimelineTitle";exports.TimelineTitle=i;
|