@tedi-design-system/react 14.4.0-rc.9 → 15.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.
Files changed (118) hide show
  1. package/bundle-stats.html +1 -1
  2. package/community.cjs.js +1 -1
  3. package/community.es.js +219 -229
  4. package/index.css +1 -1
  5. package/package.json +3 -3
  6. package/src/community/components/accordion/accordion-item-header/accordion-item-header.cjs.js +1 -1
  7. package/src/community/components/accordion/accordion-item-header/accordion-item-header.es.js +2 -2
  8. package/src/community/components/button-content/button-content.cjs.js +1 -1
  9. package/src/community/components/button-content/button-content.d.ts +1 -1
  10. package/src/community/components/button-content/button-content.es.js +39 -33
  11. package/src/community/components/form/select/select.cjs.js +1 -1
  12. package/src/community/components/form/select/select.d.ts +1 -1
  13. package/src/community/components/form/select/select.es.js +33 -33
  14. package/src/community/components/form/text-editor/components/style-button.cjs.js +1 -1
  15. package/src/community/components/form/text-editor/components/style-button.es.js +2 -2
  16. package/src/community/components/form/toggle/toggle.cjs.js +1 -1
  17. package/src/community/components/form/toggle/toggle.es.js +4 -4
  18. package/src/community/components/layout/breadcrumbs/crumb/crumb.cjs.js +1 -1
  19. package/src/community/components/layout/breadcrumbs/crumb/crumb.es.js +9 -9
  20. package/src/community/components/layout/footer/footer.cjs.js +1 -1
  21. package/src/community/components/layout/footer/footer.d.ts +1 -1
  22. package/src/community/components/layout/footer/footer.es.js +23 -23
  23. package/src/community/components/layout/header/components/header-language/header-language.cjs.js +1 -1
  24. package/src/community/components/layout/header/components/header-language/header-language.es.js +8 -8
  25. package/src/community/components/layout/header/components/header-modal/header-modal.cjs.js +1 -1
  26. package/src/community/components/layout/header/components/header-modal/header-modal.es.js +6 -6
  27. package/src/community/components/layout/header/components/header-notification/header-notification.cjs.js +1 -1
  28. package/src/community/components/layout/header/components/header-notification/header-notification.es.js +4 -4
  29. package/src/community/components/layout/header/components/header-role/header-role.cjs.js +1 -1
  30. package/src/community/components/layout/header/components/header-role/header-role.es.js +20 -20
  31. package/src/community/components/layout/header/components/header-settings/header-settings.cjs.js +1 -1
  32. package/src/community/components/layout/header/components/header-settings/header-settings.es.js +1 -1
  33. package/src/community/components/layout/sidenav/sidenav.cjs.js +1 -1
  34. package/src/community/components/layout/sidenav/sidenav.d.ts +1 -1
  35. package/src/community/components/layout/sidenav/sidenav.es.js +39 -34
  36. package/src/community/components/placeholder/placeholder.cjs.js +1 -1
  37. package/src/community/components/placeholder/placeholder.d.ts +1 -1
  38. package/src/community/components/placeholder/placeholder.es.js +21 -20
  39. package/src/community/components/stepper/stepper-nav.cjs.js +1 -1
  40. package/src/community/components/stepper/stepper-nav.es.js +1 -1
  41. package/src/community/components/table/components/helpers.cjs.js +1 -1
  42. package/src/community/components/table/components/helpers.es.js +1 -1
  43. package/src/community/components/table/components/pagination/PaginationNextButton.cjs.js +1 -1
  44. package/src/community/components/table/components/pagination/PaginationNextButton.es.js +1 -1
  45. package/src/community/components/table/components/pagination/pagination.cjs.js +1 -1
  46. package/src/community/components/table/components/pagination/pagination.es.js +4 -4
  47. package/src/community/components/table/components/table-filter/components/table-date-filter.cjs.js +1 -1
  48. package/src/community/components/table/components/table-filter/components/table-date-filter.es.js +1 -1
  49. package/src/community/components/table/components/table-filter/components/table-select-filter.cjs.js +1 -1
  50. package/src/community/components/table/components/table-filter/components/table-select-filter.es.js +5 -5
  51. package/src/community/components/table-of-contents/table-of-contents-item.cjs.js +1 -1
  52. package/src/community/components/table-of-contents/table-of-contents-item.es.js +18 -18
  53. package/src/community/components/table-of-contents/table-of-contents-items.cjs.js +1 -1
  54. package/src/community/components/table-of-contents/table-of-contents-items.es.js +1 -1
  55. package/src/community/components/table-of-contents/table-of-contents-modal.cjs.js +1 -1
  56. package/src/community/components/table-of-contents/table-of-contents-modal.es.js +13 -13
  57. package/src/community/components/toggle-open/toggle-open.d.ts +1 -1
  58. package/src/community/components/tooltip/tooltip-trigger.cjs.js +1 -1
  59. package/src/community/components/tooltip/tooltip-trigger.es.js +1 -1
  60. package/src/community/components/vertical-progress/vertical-progress-item.cjs.js +1 -1
  61. package/src/community/components/vertical-progress/vertical-progress-item.es.js +4 -4
  62. package/src/community/index.d.ts +0 -5
  63. package/src/tedi/components/base/icon/icon.d.ts +1 -1
  64. package/src/tedi/components/base/icon/icon.module.scss.cjs.js +1 -1
  65. package/src/tedi/components/base/icon/icon.module.scss.es.js +1 -0
  66. package/src/tedi/components/buttons/collapse/collapse.cjs.js +1 -1
  67. package/src/tedi/components/buttons/collapse/collapse.d.ts +11 -0
  68. package/src/tedi/components/buttons/collapse/collapse.es.js +68 -67
  69. package/src/tedi/components/content/label/label.d.ts +1 -1
  70. package/src/tedi/components/form/file-upload/file-upload.cjs.js +1 -1
  71. package/src/tedi/components/form/file-upload/file-upload.es.js +109 -90
  72. package/src/tedi/components/form/file-upload/file-upload.module.scss.cjs.js +1 -1
  73. package/src/tedi/components/form/file-upload/file-upload.module.scss.es.js +3 -1
  74. package/src/tedi/components/form/radio/radio.cjs.js +1 -1
  75. package/src/tedi/components/form/radio/radio.es.js +42 -41
  76. package/src/tedi/components/form/textfield/textfield.module.scss.cjs.js +1 -1
  77. package/src/tedi/components/form/textfield/textfield.module.scss.es.js +0 -1
  78. package/src/tedi/components/layout/sidenav/components/sidenav-dropdown/sidenav-dropdown.cjs.js +1 -1
  79. package/src/tedi/components/layout/sidenav/components/sidenav-dropdown/sidenav-dropdown.es.js +58 -45
  80. package/src/tedi/components/layout/sidenav/components/sidenav-item/sidenav-item.cjs.js +1 -1
  81. package/src/tedi/components/layout/sidenav/components/sidenav-item/sidenav-item.es.js +126 -104
  82. package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.cjs.js +1 -1
  83. package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.d.ts +1 -1
  84. package/src/tedi/components/layout/sidenav/components/sidenav-toggle/sidenav-toggle.es.js +20 -17
  85. package/src/tedi/components/layout/sidenav/sidenav.d.ts +1 -9
  86. package/src/tedi/components/misc/scroll-visibility/scroll-visibility.cjs.js +2 -1
  87. package/src/tedi/components/misc/scroll-visibility/scroll-visibility.es.js +44 -32
  88. package/src/tedi/helpers/hooks/use-file-upload.cjs.js +1 -1
  89. package/src/tedi/helpers/hooks/use-file-upload.d.ts +6 -0
  90. package/src/tedi/helpers/hooks/use-file-upload.es.js +67 -50
  91. package/src/tedi/helpers/hooks/use-scroll.cjs.js +1 -1
  92. package/src/tedi/helpers/hooks/use-scroll.d.ts +3 -1
  93. package/src/tedi/helpers/hooks/use-scroll.es.js +19 -19
  94. package/src/tedi/providers/label-provider/labels-map.cjs.js +1 -1
  95. package/src/tedi/providers/label-provider/labels-map.d.ts +44 -0
  96. package/src/tedi/providers/label-provider/labels-map.es.js +37 -2
  97. package/src/community/components/collapse/collapse.cjs.js +0 -1
  98. package/src/community/components/collapse/collapse.d.ts +0 -56
  99. package/src/community/components/collapse/collapse.es.js +0 -67
  100. package/src/community/components/collapse/collapse.module.scss.cjs.js +0 -1
  101. package/src/community/components/collapse/collapse.module.scss.es.js +0 -12
  102. package/src/community/components/ellipsis/ellipsis.cjs.js +0 -1
  103. package/src/community/components/ellipsis/ellipsis.d.ts +0 -19
  104. package/src/community/components/ellipsis/ellipsis.es.js +0 -34
  105. package/src/community/components/ellipsis/ellipsis.module.scss.cjs.js +0 -1
  106. package/src/community/components/ellipsis/ellipsis.module.scss.es.js +0 -9
  107. package/src/community/components/icon/icon.cjs.js +0 -1
  108. package/src/community/components/icon/icon.d.ts +0 -49
  109. package/src/community/components/icon/icon.es.js +0 -47
  110. package/src/community/components/icon/icon.module.scss.cjs.js +0 -1
  111. package/src/community/components/icon/icon.module.scss.es.js +0 -9
  112. package/src/community/components/typography/heading/heading.cjs.js +0 -1
  113. package/src/community/components/typography/heading/heading.d.ts +0 -11
  114. package/src/community/components/typography/heading/heading.es.js +0 -10
  115. package/src/community/components/typography/text/text.cjs.js +0 -1
  116. package/src/community/components/typography/text/text.d.ts +0 -43
  117. package/src/community/components/typography/text/text.es.js +0 -26
  118. package/src/tedi/providers/storybook-provider/storybook-provider.d.ts +0 -10
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),s=require("../../../../../external/classnames/index.cjs.js"),_=require("react"),L=require("../../../../../external/react-animate-height/dist/esm/index.cjs.js"),z=require("../../base/icon/icon.cjs.js"),E=require("../../base/typography/text/text.cjs.js"),K=require("../../misc/print/print.cjs.js"),e=require("./collapse.module.scss.cjs.js"),A=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),F=require("../../../providers/label-provider/use-labels.cjs.js"),G=require("../../../helpers/hooks/use-print.cjs.js"),C=require("../../layout/grid/row.cjs.js"),r=require("../../layout/grid/col.cjs.js"),g=f=>{const{getCurrentBreakpointProps:v}=A.useBreakpointProps(f.defaultServerBreakpoint),{getLabel:m}=F.useLabels(),{id:n,children:x,className:P,openText:k=m("open"),closeText:I=m("close"),hideCollapseText:h=!1,title:w,titleRowProps:N,defaultOpen:$,open:d,onToggle:c,arrowType:i="default",size:o="default",underline:O=!0,...S}=v(f),B=`${n}__trigger`,j=`${n}__label`,u=`${n}__content`,M=`${n}__animate`,[b,R]=_.useState(()=>$),p=G.usePrint(),a=_.useMemo(()=>p||(d!==void 0?d:b),[p,d,b]),T=s.default(e.default["tedi-collapse"],o==="small"&&e.default["tedi-collapse--small"],a&&e.default["tedi-collapse--is-open"],h&&e.default["tedi-collapse--icon-only"],e.default[`tedi-collapse--arrow-${i}`],P),q=()=>{const l=!a;R(l),c==null||c(l)},D=l=>{(l.key==="Enter"||l.key===" ")&&!l.repeat&&(l.preventDefault(),q())},y=_.useMemo(()=>t.jsx("div",{id:u,className:e.default["tedi-collapse__content"],children:x}),[x,u]);return t.jsxs("div",{"data-name":"collapse",...S,className:T,children:[t.jsx("button",{id:B,type:"button","data-name":"collapse-trigger",className:e.default["tedi-collapse__title"],"aria-labelledby":j,"aria-expanded":a,"aria-controls":u,onKeyDown:D,onClick:q,children:t.jsxs(C.Row,{justifyContent:"between",alignItems:"center",wrap:"nowrap",...N,element:"span",children:[w&&t.jsx(r.Col,{"aria-hidden":"true",children:w}),t.jsx(r.Col,{width:"auto",children:t.jsxs(C.Row,{element:"span",alignItems:"center",gutter:0,wrap:"nowrap",children:[t.jsx(K.Print,{visibility:"hide",children:t.jsx(r.Col,{width:"auto",className:s.default({"visually-hidden":h}),children:t.jsx(E.Text,{element:"span",className:s.default(e.default["tedi-collapse__text"],{[e.default["tedi-collapse__text--underline"]]:O}),id:j,children:a?I:k})})}),t.jsx(r.Col,{width:"auto",children:t.jsx("div",{className:s.default(e.default["tedi-collapse__icon-wrapper"],e.default[`tedi-collapse__icon-wrapper--${i}`],o==="small"&&e.default["tedi-collapse__icon-wrapper--small"]),children:t.jsx(z.Icon,{className:s.default(e.default["tedi-collapse__icon"],e.default[`tedi-collapse__icon--${i}`],o==="small"&&e.default["tedi-collapse__icon--small"]),name:"expand_more",size:o==="small"||i==="secondary"?18:24})})})]})})]})}),p?y:t.jsx(L.default,{id:M,duration:300,height:a?"auto":0,"data-testid":"collapse-inner",children:y})]})};exports.Collapse=g;exports.default=g;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),s=require("../../../../../external/classnames/index.cjs.js"),_=require("react"),K=require("../../../../../external/react-animate-height/dist/esm/index.cjs.js"),A=require("../../base/icon/icon.cjs.js"),F=require("../../base/typography/text/text.cjs.js"),G=require("../../misc/print/print.cjs.js"),e=require("./collapse.module.scss.cjs.js"),H=require("../../../helpers/hooks/use-print.cjs.js"),J=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),Q=require("../../../providers/label-provider/use-labels.cjs.js"),v=require("../../layout/grid/row.cjs.js"),i=require("../../layout/grid/col.cjs.js"),N=x=>{const{getCurrentBreakpointProps:P}=J.useBreakpointProps(x.defaultServerBreakpoint),{getLabel:h}=Q.useLabels(),{id:r,children:w,className:k,openText:j=h("open"),closeText:g=h("close"),hideCollapseText:I=!1,title:c,titleRowProps:O,defaultOpen:$,open:d,onToggle:u,arrowType:n="default",size:o="default",underline:S=!0,toggleLabel:y,iconOnly:B=!1,...M}=P(x),p=`${r}__trigger`,f=`${r}__content`,R=`${r}__animate`,[b,T]=_.useState(()=>$),m=H.usePrint(),a=_.useMemo(()=>m||(d!==void 0?d:b),[m,d,b]),L=B===!0&&!c,D=s.default(e.default["tedi-collapse"],o==="small"&&e.default["tedi-collapse--small"],a&&e.default["tedi-collapse--is-open"],L&&e.default["tedi-collapse--icon-only"],e.default[`tedi-collapse--arrow-${n}`],k),q=()=>{const l=!a;T(l),u==null||u(l)},z=l=>{(l.key==="Enter"||l.key===" ")&&!l.repeat&&(l.preventDefault(),q())},E=y||(a?g:j),C=_.useMemo(()=>t.jsx("div",{id:f,role:"region","aria-labelledby":p,className:e.default["tedi-collapse__content"],children:w}),[w,f,p]);return t.jsxs("div",{"data-name":"collapse",...M,className:D,children:[t.jsx("button",{id:p,type:"button","data-name":"collapse-trigger",className:e.default["tedi-collapse__title"],"aria-label":E,"aria-expanded":a,"aria-controls":f,onKeyDown:z,onClick:q,children:t.jsxs(v.Row,{justifyContent:"between",alignItems:"center",wrap:"nowrap",...O,element:"span",children:[c&&t.jsx(i.Col,{"aria-hidden":"true",children:c}),t.jsx(i.Col,{width:"auto",children:t.jsxs(v.Row,{element:"span",alignItems:"center",gutter:0,wrap:"nowrap",children:[t.jsx(G.Print,{visibility:"hide",children:t.jsx(i.Col,{width:"auto",className:s.default({"visually-hidden":I}),children:t.jsx(F.Text,{element:"span",className:s.default(e.default["tedi-collapse__text"],{[e.default["tedi-collapse__text--underline"]]:S}),children:a?g:j})})}),t.jsx(i.Col,{width:"auto",children:t.jsx("div",{className:s.default(e.default["tedi-collapse__icon-wrapper"],e.default[`tedi-collapse__icon-wrapper--${n}`],o==="small"&&e.default["tedi-collapse__icon-wrapper--small"]),children:t.jsx(A.Icon,{className:s.default(e.default["tedi-collapse__icon"],e.default[`tedi-collapse__icon--${n}`],o==="small"&&e.default["tedi-collapse__icon--small"]),name:"expand_more",size:o==="small"||n==="secondary"?18:24})})})]})})]})}),m?C:t.jsx(K.default,{id:R,duration:300,height:a?"auto":0,"data-testid":"collapse-inner",children:C})]})};exports.Collapse=N;exports.default=N;
@@ -34,6 +34,12 @@ type CollapseBreakpointProps = {
34
34
  */
35
35
  size?: 'default' | 'small';
36
36
  underline?: boolean;
37
+ /**
38
+ * Render collapse as icon-only toggle.
39
+ * Icon-only styles are applied ONLY when no title is provided.
40
+ * @default false
41
+ */
42
+ iconOnly?: boolean;
37
43
  };
38
44
  export interface CollapseProps extends BreakpointSupport<CollapseBreakpointProps> {
39
45
  /**
@@ -65,6 +71,11 @@ export interface CollapseProps extends BreakpointSupport<CollapseBreakpointProps
65
71
  * Defaults to the result of `getLabel('close')`.
66
72
  */
67
73
  closeText?: string;
74
+ /**
75
+ * Descriptive label for screen readers (e.g. "Toggle Products submenu")
76
+ * If provided, overrides the default open/close text for the accessible name.
77
+ */
78
+ toggleLabel?: string;
68
79
  }
69
80
  export declare const Collapse: (props: CollapseProps) => JSX.Element;
70
81
  export default Collapse;
@@ -1,97 +1,98 @@
1
- import { jsx as t, jsxs as _ } from "react/jsx-runtime";
1
+ import { jsx as t, jsxs as h } from "react/jsx-runtime";
2
2
  import o from "../../../../../external/classnames/index.es.js";
3
- import u from "react";
4
- import E from "../../../../../external/react-animate-height/dist/esm/index.es.js";
5
- import { Icon as K } from "../../base/icon/icon.es.js";
6
- import { Text as L } from "../../base/typography/text/text.es.js";
7
- import { Print as A } from "../../misc/print/print.es.js";
3
+ import f from "react";
4
+ import A from "../../../../../external/react-animate-height/dist/esm/index.es.js";
5
+ import { Icon as H } from "../../base/icon/icon.es.js";
6
+ import { Text as q } from "../../base/typography/text/text.es.js";
7
+ import { Print as F } from "../../misc/print/print.es.js";
8
8
  import e from "./collapse.module.scss.es.js";
9
- import { useBreakpointProps as H } from "../../../helpers/hooks/use-breakpoint-props.es.js";
10
- import { useLabels as q } from "../../../providers/label-provider/use-labels.es.js";
11
- import { usePrint as F } from "../../../helpers/hooks/use-print.es.js";
12
- import { Row as v } from "../../layout/grid/row.es.js";
13
- import { Col as r } from "../../layout/grid/col.es.js";
14
- const oe = (h) => {
15
- const { getCurrentBreakpointProps: I } = H(h.defaultServerBreakpoint), { getLabel: f } = q(), {
16
- id: n,
17
- children: w,
18
- className: k,
19
- openText: $ = f("open"),
20
- closeText: P = f("close"),
21
- hideCollapseText: y = !1,
22
- title: g,
23
- titleRowProps: O,
24
- defaultOpen: B,
25
- open: c,
26
- onToggle: d,
27
- arrowType: i = "default",
28
- size: s = "default",
29
- underline: S = !0,
30
- ...T
31
- } = I(h), j = `${n}__trigger`, x = `${n}__label`, p = `${n}__content`, D = `${n}__animate`, [b, M] = u.useState(() => B), m = F(), a = u.useMemo(
32
- () => m || (c !== void 0 ? c : b),
33
- [m, c, b]
34
- ), R = o(
9
+ import { usePrint as G } from "../../../helpers/hooks/use-print.es.js";
10
+ import { useBreakpointProps as J } from "../../../helpers/hooks/use-breakpoint-props.es.js";
11
+ import { useLabels as Q } from "../../../providers/label-provider/use-labels.es.js";
12
+ import { Row as k } from "../../layout/grid/row.es.js";
13
+ import { Col as s } from "../../layout/grid/col.es.js";
14
+ const se = (w) => {
15
+ const { getCurrentBreakpointProps: O } = J(w.defaultServerBreakpoint), { getLabel: y } = Q(), {
16
+ id: r,
17
+ children: g,
18
+ className: P,
19
+ openText: b = y("open"),
20
+ closeText: x = y("close"),
21
+ hideCollapseText: $ = !1,
22
+ title: c,
23
+ titleRowProps: B,
24
+ defaultOpen: S,
25
+ open: d,
26
+ onToggle: p,
27
+ arrowType: n = "default",
28
+ size: i = "default",
29
+ underline: T = !0,
30
+ toggleLabel: N,
31
+ iconOnly: j = !1,
32
+ ...D
33
+ } = O(w), m = `${r}__trigger`, u = `${r}__content`, L = `${r}__animate`, [C, M] = f.useState(() => S), _ = G(), a = f.useMemo(
34
+ () => _ || (d !== void 0 ? d : C),
35
+ [_, d, C]
36
+ ), R = j === !0 && !c, z = o(
35
37
  e["tedi-collapse"],
36
- s === "small" && e["tedi-collapse--small"],
38
+ i === "small" && e["tedi-collapse--small"],
37
39
  a && e["tedi-collapse--is-open"],
38
- y && e["tedi-collapse--icon-only"],
39
- e[`tedi-collapse--arrow-${i}`],
40
- k
41
- ), C = () => {
40
+ R && e["tedi-collapse--icon-only"],
41
+ e[`tedi-collapse--arrow-${n}`],
42
+ P
43
+ ), v = () => {
42
44
  const l = !a;
43
- M(l), d == null || d(l);
44
- }, z = (l) => {
45
- (l.key === "Enter" || l.key === " ") && !l.repeat && (l.preventDefault(), C());
46
- }, N = u.useMemo(
47
- () => /* @__PURE__ */ t("div", { id: p, className: e["tedi-collapse__content"], children: w }),
48
- [w, p]
45
+ M(l), p == null || p(l);
46
+ }, E = (l) => {
47
+ (l.key === "Enter" || l.key === " ") && !l.repeat && (l.preventDefault(), v());
48
+ }, K = N || (a ? x : b), I = f.useMemo(
49
+ () => /* @__PURE__ */ t("div", { id: u, role: "region", "aria-labelledby": m, className: e["tedi-collapse__content"], children: g }),
50
+ [g, u, m]
49
51
  );
50
- return /* @__PURE__ */ _("div", { "data-name": "collapse", ...T, className: R, children: [
52
+ return /* @__PURE__ */ h("div", { "data-name": "collapse", ...D, className: z, children: [
51
53
  /* @__PURE__ */ t(
52
54
  "button",
53
55
  {
54
- id: j,
56
+ id: m,
55
57
  type: "button",
56
58
  "data-name": "collapse-trigger",
57
59
  className: e["tedi-collapse__title"],
58
- "aria-labelledby": x,
60
+ "aria-label": K,
59
61
  "aria-expanded": a,
60
- "aria-controls": p,
61
- onKeyDown: z,
62
- onClick: C,
63
- children: /* @__PURE__ */ _(v, { justifyContent: "between", alignItems: "center", wrap: "nowrap", ...O, element: "span", children: [
64
- g && /* @__PURE__ */ t(r, { "aria-hidden": "true", children: g }),
65
- /* @__PURE__ */ t(r, { width: "auto", children: /* @__PURE__ */ _(v, { element: "span", alignItems: "center", gutter: 0, wrap: "nowrap", children: [
66
- /* @__PURE__ */ t(A, { visibility: "hide", children: /* @__PURE__ */ t(r, { width: "auto", className: o({ "visually-hidden": y }), children: /* @__PURE__ */ t(
67
- L,
62
+ "aria-controls": u,
63
+ onKeyDown: E,
64
+ onClick: v,
65
+ children: /* @__PURE__ */ h(k, { justifyContent: "between", alignItems: "center", wrap: "nowrap", ...B, element: "span", children: [
66
+ c && /* @__PURE__ */ t(s, { "aria-hidden": "true", children: c }),
67
+ /* @__PURE__ */ t(s, { width: "auto", children: /* @__PURE__ */ h(k, { element: "span", alignItems: "center", gutter: 0, wrap: "nowrap", children: [
68
+ /* @__PURE__ */ t(F, { visibility: "hide", children: /* @__PURE__ */ t(s, { width: "auto", className: o({ "visually-hidden": $ }), children: /* @__PURE__ */ t(
69
+ q,
68
70
  {
69
71
  element: "span",
70
72
  className: o(e["tedi-collapse__text"], {
71
- [e["tedi-collapse__text--underline"]]: S
73
+ [e["tedi-collapse__text--underline"]]: T
72
74
  }),
73
- id: x,
74
- children: a ? P : $
75
+ children: a ? x : b
75
76
  }
76
77
  ) }) }),
77
- /* @__PURE__ */ t(r, { width: "auto", children: /* @__PURE__ */ t(
78
+ /* @__PURE__ */ t(s, { width: "auto", children: /* @__PURE__ */ t(
78
79
  "div",
79
80
  {
80
81
  className: o(
81
82
  e["tedi-collapse__icon-wrapper"],
82
- e[`tedi-collapse__icon-wrapper--${i}`],
83
- s === "small" && e["tedi-collapse__icon-wrapper--small"]
83
+ e[`tedi-collapse__icon-wrapper--${n}`],
84
+ i === "small" && e["tedi-collapse__icon-wrapper--small"]
84
85
  ),
85
86
  children: /* @__PURE__ */ t(
86
- K,
87
+ H,
87
88
  {
88
89
  className: o(
89
90
  e["tedi-collapse__icon"],
90
- e[`tedi-collapse__icon--${i}`],
91
- s === "small" && e["tedi-collapse__icon--small"]
91
+ e[`tedi-collapse__icon--${n}`],
92
+ i === "small" && e["tedi-collapse__icon--small"]
92
93
  ),
93
94
  name: "expand_more",
94
- size: s === "small" || i === "secondary" ? 18 : 24
95
+ size: i === "small" || n === "secondary" ? 18 : 24
95
96
  }
96
97
  )
97
98
  }
@@ -100,10 +101,10 @@ const oe = (h) => {
100
101
  ] })
101
102
  }
102
103
  ),
103
- m ? N : /* @__PURE__ */ t(E, { id: D, duration: 300, height: a ? "auto" : 0, "data-testid": "collapse-inner", children: N })
104
+ _ ? I : /* @__PURE__ */ t(A, { id: L, duration: 300, height: a ? "auto" : 0, "data-testid": "collapse-inner", children: I })
104
105
  ] });
105
106
  };
106
107
  export {
107
- oe as Collapse,
108
- oe as default
108
+ se as Collapse,
109
+ se as default
109
110
  };
@@ -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<HTMLSpanElement | HTMLLabelElement>>;
35
+ export declare const Label: import('react').ForwardRefExoticComponent<LabelProps & import('react').RefAttributes<HTMLLabelElement | HTMLSpanElement>>;
36
36
  export {};
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),_=require("../../../../../external/classnames/index.cjs.js"),D=require("react"),P=require("../../../helpers/hooks/use-file-upload.cjs.js"),V=require("../../base/typography/text/text.cjs.js"),v=require("../../buttons/button/button.cjs.js"),W=require("../../buttons/closing-button/closing-button.cjs.js"),A=require("../form-label/form-label.cjs.js"),E=require("../../misc/separator/separator.cjs.js"),G=require("../../tags/tag/tag.cjs.js"),q=require("../feedback-text/feedback-text.cjs.js"),l=require("./file-upload.module.scss.cjs.js"),J=require("../../../providers/label-provider/use-labels.cjs.js"),y=require("../../../helpers/hooks/use-breakpoint.cjs.js"),K=require("../../layout/grid/row.cjs.js"),F=require("../../layout/grid/col.cjs.js"),B=C=>{const{getLabel:c}=J.useLabels(),{id:n,name:k,accept:x,multiple:g,onChange:f,className:L,defaultFiles:N,onDelete:T,hasClearButton:U=!0,files:o,readOnly:m,disabled:s=!1,maxSize:w,validateIndividually:M=!1,size:r="default",helper:i,...R}=C,{innerFiles:h,uploadErrorHelper:a,onFileChange:S,onFileRemove:z,handleClear:b}=P.useFileUpload({accept:x,maxSize:w,multiple:g,validateIndividually:M,defaultFiles:N,onChange:f,onDelete:T,files:o}),I=y.useBreakpoint(),O=_.default(l.default["tedi-file-upload"],{[l.default["tedi-file-upload--disabled"]]:s},L),u=i?(i==null?void 0:i.id)??`${n}-helper`:void 0,d=D.useMemo(()=>o&&f?o:h,[o,h,f]),$=(t,p)=>e.jsx("li",{children:e.jsx(G.Tag,{color:t.isValid===!1?"danger":"primary",onClose:!t.isLoading&&!s&&!m?()=>z(t):void 0,isLoading:t.isLoading,children:t.name})},p),j=()=>d.length>1?e.jsx("ul",{className:l.default["tedi-file-upload__items"],children:d.map((t,p)=>$(t,p))}):d.length===1?e.jsx(V.Text,{className:l.default["tedi-file-upload__items"],children:d[0].name}):null;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:l.default["tedi-file-upload__label-wrapper"],children:e.jsx(A.FormLabel,{id:n,...R,renderWithoutLabel:m,className:l.default["tedi-file-upload__label"],size:r})}),m?j():e.jsx("div",{className:_.default(l.default["tedi-file-upload__container"],{[l.default["tedi-file-upload--disabled"]]:s,[l.default["tedi-file-upload--error"]]:((a==null?void 0:a.type)||(i==null?void 0:i.type))==="error",[l.default["tedi-file-upload--valid"]]:((a==null?void 0:a.type)||(i==null?void 0:i.type))==="valid"},{[l.default[`tedi-file-upload__container--${r}`]]:r}),children:e.jsx("div",{className:l.default["tedi-file-upload__content"],children:e.jsxs(K.Row,{children:[e.jsx(F.Col,{className:"display-flex",children:j()}),e.jsx(F.Col,{xs:12,md:"auto",children:e.jsxs("div",{className:O,children:[e.jsx("input",{id:n,type:"file",name:k,accept:x,onChange:S,multiple:g,disabled:s,"aria-invalid":!!a}),U&&d.length>0&&!s&&e.jsxs(e.Fragment,{children:[y.isBreakpointBelow(I,"md")?e.jsx(v.Button,{visualType:"neutral",iconLeft:"close","aria-describedby":u,disabled:s,onClick:b,className:l.default["tedi-file-upload__button"],children:c("clear")}):e.jsx(W.ClosingButton,{onClick:b,size:"medium",title:c("clear")}),e.jsx(E.Separator,{axis:"vertical",height:1.5,spacing:.5,color:"primary"})]}),e.jsx(v.Button,{visualType:"neutral",iconLeft:"file_upload","aria-describedby":u,disabled:s,onClick:()=>{var t;return(t=document.getElementById(n))==null?void 0:t.click()},className:l.default["tedi-file-upload__button"],size:r,children:c("file-upload.add")})]})})]})})}),i?e.jsx(q.FeedbackText,{...i,id:u}):a?e.jsx(q.FeedbackText,{...a,id:u}):null]})};exports.FileUpload=B;exports.default=B;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),f=require("../../../../../external/classnames/index.cjs.js"),P=require("react"),W=require("../../../helpers/hooks/use-file-upload.cjs.js"),A=require("../../base/typography/text/text.cjs.js"),v=require("../../buttons/button/button.cjs.js"),E=require("../../buttons/closing-button/closing-button.cjs.js"),G=require("../form-label/form-label.cjs.js"),J=require("../../misc/separator/separator.cjs.js"),K=require("../../tags/tag/tag.cjs.js"),y=require("../feedback-text/feedback-text.cjs.js"),a=require("./file-upload.module.scss.cjs.js"),Q=require("../../../providers/label-provider/use-labels.cjs.js"),F=require("../../../helpers/hooks/use-breakpoint.cjs.js"),X=require("../../layout/grid/row.cjs.js"),q=require("../../layout/grid/col.cjs.js"),L=B=>{const{getLabel:d}=Q.useLabels(),{id:r,name:C,accept:g,multiple:_,onChange:m,className:N,defaultFiles:k,onDelete:T,hasClearButton:U=!0,files:u,readOnly:p,disabled:s=!1,maxSize:$,validateIndividually:w=!1,size:c="default",helper:i,...M}=B,{innerFiles:b,uploadErrorHelper:t,onFileChange:R,onFileRemove:S,handleClear:h,announcement:z}=W.useFileUpload({accept:g,maxSize:$,multiple:_,validateIndividually:w,defaultFiles:k,onChange:m,onDelete:T,files:u}),I=F.useBreakpoint(),V=f.default(a.default["tedi-file-upload"],{[a.default["tedi-file-upload--disabled"]]:s},N),x=i?(i==null?void 0:i.id)??`${r}-helper`:void 0,n=P.useMemo(()=>u&&m?u:b,[u,b,m]),O=(l,o)=>{const D=l.isValid===!1?`${l.name} (${d("file-upload.failed")})`:l.name;return e.jsx("li",{children:e.jsx(K.Tag,{color:l.isValid===!1?"danger":"primary",onClose:!l.isLoading&&!s&&!p?()=>S(l):void 0,isLoading:l.isLoading,"aria-label":D,children:l.name})},o)},j=()=>{if(n.length>1)return e.jsx("ul",{className:f.default(a.default["tedi-file-upload__items"],a.default["tedi-file-upload__truncate-list"]),children:n.map((l,o)=>O(l,o))});if(n.length===1){const l=n[0],o=l.isValid===!1?`${l.name} (${d("file-upload.failed")})`:l.name;return e.jsx(A.Text,{"aria-label":o,className:f.default(a.default["tedi-file-upload__items"],a.default["tedi-file-upload__truncate"]),children:l.name})}return null};return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:a.default["tedi-file-upload__label-wrapper"],children:e.jsx(G.FormLabel,{id:r,...M,renderWithoutLabel:p,className:a.default["tedi-file-upload__label"],size:c})}),e.jsx("div",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:z}),p?j():e.jsx("div",{className:f.default(a.default["tedi-file-upload__container"],{[a.default["tedi-file-upload--disabled"]]:s,[a.default["tedi-file-upload--error"]]:((t==null?void 0:t.type)||(i==null?void 0:i.type))==="error",[a.default["tedi-file-upload--valid"]]:((t==null?void 0:t.type)||(i==null?void 0:i.type))==="valid"},{[a.default[`tedi-file-upload__container--${c}`]]:c}),children:e.jsx("div",{className:a.default["tedi-file-upload__content"],children:e.jsxs(X.Row,{children:[e.jsx(q.Col,{className:"display-flex",children:j()}),e.jsx(q.Col,{xs:12,md:"auto",children:e.jsxs("div",{className:V,children:[e.jsx("input",{id:r,type:"file",name:C,accept:g,onChange:R,multiple:_,disabled:s,"aria-invalid":!!t&&t.type==="error","aria-describedby":x}),U&&n.length>0&&!s&&e.jsxs(e.Fragment,{children:[F.isBreakpointBelow(I,"md")?e.jsx(v.Button,{visualType:"neutral",iconLeft:"close",disabled:s,onClick:h,className:a.default["tedi-file-upload__button"],children:d("clear")}):e.jsx(E.ClosingButton,{onClick:h,size:"medium",title:d("clear")}),e.jsx(J.Separator,{axis:"vertical",height:1.5,spacing:.5,color:"primary"})]}),e.jsx(v.Button,{visualType:"neutral",iconLeft:"file_upload",disabled:s,onClick:()=>{var l;return(l=document.getElementById(r))==null?void 0:l.click()},className:a.default["tedi-file-upload__button"],size:c,children:d("file-upload.add")})]})})]})})}),i?e.jsx(y.FeedbackText,{...i,id:x}):t?e.jsx(y.FeedbackText,{...t,id:x}):null]})};exports.FileUpload=L;exports.default=L;
@@ -1,134 +1,153 @@
1
- import { jsxs as c, Fragment as F, jsx as e } from "react/jsx-runtime";
2
- import N from "../../../../../external/classnames/index.es.js";
3
- import V from "react";
4
- import { useFileUpload as W } from "../../../helpers/hooks/use-file-upload.es.js";
5
- import { Text as q } from "../../base/typography/text/text.es.js";
1
+ import { jsxs as u, Fragment as N, jsx as i } from "react/jsx-runtime";
2
+ import p from "../../../../../external/classnames/index.es.js";
3
+ import q from "react";
4
+ import { useFileUpload as A } from "../../../helpers/hooks/use-file-upload.es.js";
5
+ import { Text as E } from "../../base/typography/text/text.es.js";
6
6
  import { Button as C } from "../../buttons/button/button.es.js";
7
- import { ClosingButton as A } from "../../buttons/closing-button/closing-button.es.js";
8
- import { FormLabel as E } from "../form-label/form-label.es.js";
9
- import { Separator as G } from "../../misc/separator/separator.es.js";
10
- import { Tag as J } from "../../tags/tag/tag.es.js";
11
- import { FeedbackText as x } from "../feedback-text/feedback-text.es.js";
12
- import i from "./file-upload.module.scss.es.js";
13
- import { useLabels as K } from "../../../providers/label-provider/use-labels.es.js";
14
- import { useBreakpoint as P, isBreakpointBelow as Q } from "../../../helpers/hooks/use-breakpoint.es.js";
15
- import { Row as X } from "../../layout/grid/row.es.js";
16
- import { Col as B } from "../../layout/grid/col.es.js";
17
- const ue = (L) => {
18
- const { getLabel: p } = K(), {
19
- id: r,
7
+ import { ClosingButton as G } from "../../buttons/closing-button/closing-button.es.js";
8
+ import { FormLabel as J } from "../form-label/form-label.es.js";
9
+ import { Separator as K } from "../../misc/separator/separator.es.js";
10
+ import { Tag as P } from "../../tags/tag/tag.es.js";
11
+ import { FeedbackText as L } from "../feedback-text/feedback-text.es.js";
12
+ import l from "./file-upload.module.scss.es.js";
13
+ import { useLabels as Q } from "../../../providers/label-provider/use-labels.es.js";
14
+ import { useBreakpoint as X, isBreakpointBelow as Y } from "../../../helpers/hooks/use-breakpoint.es.js";
15
+ import { Row as Z } from "../../layout/grid/row.es.js";
16
+ import { Col as x } from "../../layout/grid/col.es.js";
17
+ const he = (B) => {
18
+ const { getLabel: n } = Q(), {
19
+ id: s,
20
20
  name: k,
21
- accept: _,
22
- multiple: g,
23
- onChange: u,
24
- className: T,
25
- defaultFiles: w,
26
- onDelete: z,
27
- hasClearButton: I = !0,
28
- files: n,
29
- readOnly: f,
21
+ accept: g,
22
+ multiple: b,
23
+ onChange: f,
24
+ className: $,
25
+ defaultFiles: T,
26
+ onDelete: w,
27
+ hasClearButton: z = !0,
28
+ files: m,
29
+ readOnly: h,
30
30
  disabled: o = !1,
31
- maxSize: R,
32
- validateIndividually: U = !1,
33
- size: s = "default",
34
- helper: l,
35
- ...j
36
- } = L, { innerFiles: b, uploadErrorHelper: t, onFileChange: M, onFileRemove: S, handleClear: y } = W({
37
- accept: _,
38
- maxSize: R,
39
- multiple: g,
40
- validateIndividually: U,
41
- defaultFiles: w,
42
- onChange: u,
43
- onDelete: z,
44
- files: n
45
- }), $ = P(), D = N(i["tedi-file-upload"], { [i["tedi-file-upload--disabled"]]: o }, T), m = l ? (l == null ? void 0 : l.id) ?? `${r}-helper` : void 0, d = V.useMemo(() => n && u ? n : b, [n, b, u]), O = (a, h) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(
46
- J,
47
- {
48
- color: a.isValid === !1 ? "danger" : "primary",
49
- onClose: !a.isLoading && !o && !f ? () => S(a) : void 0,
50
- isLoading: a.isLoading,
51
- children: a.name
31
+ maxSize: I,
32
+ validateIndividually: R = !1,
33
+ size: c = "default",
34
+ helper: a,
35
+ ...U
36
+ } = B, { innerFiles: v, uploadErrorHelper: t, onFileChange: V, onFileRemove: j, handleClear: y, announcement: M } = A({
37
+ accept: g,
38
+ maxSize: I,
39
+ multiple: b,
40
+ validateIndividually: R,
41
+ defaultFiles: T,
42
+ onChange: f,
43
+ onDelete: w,
44
+ files: m
45
+ }), S = X(), D = p(l["tedi-file-upload"], { [l["tedi-file-upload--disabled"]]: o }, $), _ = a ? (a == null ? void 0 : a.id) ?? `${s}-helper` : void 0, d = q.useMemo(() => m && f ? m : v, [m, v, f]), O = (e, r) => {
46
+ const W = e.isValid === !1 ? `${e.name} (${n("file-upload.failed")})` : e.name;
47
+ return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
48
+ P,
49
+ {
50
+ color: e.isValid === !1 ? "danger" : "primary",
51
+ onClose: !e.isLoading && !o && !h ? () => j(e) : void 0,
52
+ isLoading: e.isLoading,
53
+ "aria-label": W,
54
+ children: e.name
55
+ }
56
+ ) }, r);
57
+ }, F = () => {
58
+ if (d.length > 1)
59
+ return /* @__PURE__ */ i("ul", { className: p(l["tedi-file-upload__items"], l["tedi-file-upload__truncate-list"]), children: d.map((e, r) => O(e, r)) });
60
+ if (d.length === 1) {
61
+ const e = d[0], r = e.isValid === !1 ? `${e.name} (${n("file-upload.failed")})` : e.name;
62
+ return /* @__PURE__ */ i(
63
+ E,
64
+ {
65
+ "aria-label": r,
66
+ className: p(l["tedi-file-upload__items"], l["tedi-file-upload__truncate"]),
67
+ children: e.name
68
+ }
69
+ );
52
70
  }
53
- ) }, h), v = () => d.length > 1 ? /* @__PURE__ */ e("ul", { className: i["tedi-file-upload__items"], children: d.map((a, h) => O(a, h)) }) : d.length === 1 ? /* @__PURE__ */ e(q, { className: i["tedi-file-upload__items"], children: d[0].name }) : null;
54
- return /* @__PURE__ */ c(F, { children: [
55
- /* @__PURE__ */ e("div", { className: i["tedi-file-upload__label-wrapper"], children: /* @__PURE__ */ e(
56
- E,
71
+ return null;
72
+ };
73
+ return /* @__PURE__ */ u(N, { children: [
74
+ /* @__PURE__ */ i("div", { className: l["tedi-file-upload__label-wrapper"], children: /* @__PURE__ */ i(
75
+ J,
57
76
  {
58
- id: r,
59
- ...j,
60
- renderWithoutLabel: f,
61
- className: i["tedi-file-upload__label"],
62
- size: s
77
+ id: s,
78
+ ...U,
79
+ renderWithoutLabel: h,
80
+ className: l["tedi-file-upload__label"],
81
+ size: c
63
82
  }
64
83
  ) }),
65
- f ? v() : /* @__PURE__ */ e(
84
+ /* @__PURE__ */ i("div", { "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: M }),
85
+ h ? F() : /* @__PURE__ */ i(
66
86
  "div",
67
87
  {
68
- className: N(
69
- i["tedi-file-upload__container"],
88
+ className: p(
89
+ l["tedi-file-upload__container"],
70
90
  {
71
- [i["tedi-file-upload--disabled"]]: o,
72
- [i["tedi-file-upload--error"]]: ((t == null ? void 0 : t.type) || (l == null ? void 0 : l.type)) === "error",
73
- [i["tedi-file-upload--valid"]]: ((t == null ? void 0 : t.type) || (l == null ? void 0 : l.type)) === "valid"
91
+ [l["tedi-file-upload--disabled"]]: o,
92
+ [l["tedi-file-upload--error"]]: ((t == null ? void 0 : t.type) || (a == null ? void 0 : a.type)) === "error",
93
+ [l["tedi-file-upload--valid"]]: ((t == null ? void 0 : t.type) || (a == null ? void 0 : a.type)) === "valid"
74
94
  },
75
- { [i[`tedi-file-upload__container--${s}`]]: s }
95
+ { [l[`tedi-file-upload__container--${c}`]]: c }
76
96
  ),
77
- children: /* @__PURE__ */ e("div", { className: i["tedi-file-upload__content"], children: /* @__PURE__ */ c(X, { children: [
78
- /* @__PURE__ */ e(B, { className: "display-flex", children: v() }),
79
- /* @__PURE__ */ e(B, { xs: 12, md: "auto", children: /* @__PURE__ */ c("div", { className: D, children: [
80
- /* @__PURE__ */ e(
97
+ children: /* @__PURE__ */ i("div", { className: l["tedi-file-upload__content"], children: /* @__PURE__ */ u(Z, { children: [
98
+ /* @__PURE__ */ i(x, { className: "display-flex", children: F() }),
99
+ /* @__PURE__ */ i(x, { xs: 12, md: "auto", children: /* @__PURE__ */ u("div", { className: D, children: [
100
+ /* @__PURE__ */ i(
81
101
  "input",
82
102
  {
83
- id: r,
103
+ id: s,
84
104
  type: "file",
85
105
  name: k,
86
- accept: _,
87
- onChange: M,
88
- multiple: g,
106
+ accept: g,
107
+ onChange: V,
108
+ multiple: b,
89
109
  disabled: o,
90
- "aria-invalid": !!t
110
+ "aria-invalid": !!t && t.type === "error",
111
+ "aria-describedby": _
91
112
  }
92
113
  ),
93
- I && d.length > 0 && !o && /* @__PURE__ */ c(F, { children: [
94
- Q($, "md") ? /* @__PURE__ */ e(
114
+ z && d.length > 0 && !o && /* @__PURE__ */ u(N, { children: [
115
+ Y(S, "md") ? /* @__PURE__ */ i(
95
116
  C,
96
117
  {
97
118
  visualType: "neutral",
98
119
  iconLeft: "close",
99
- "aria-describedby": m,
100
120
  disabled: o,
101
121
  onClick: y,
102
- className: i["tedi-file-upload__button"],
103
- children: p("clear")
122
+ className: l["tedi-file-upload__button"],
123
+ children: n("clear")
104
124
  }
105
- ) : /* @__PURE__ */ e(A, { onClick: y, size: "medium", title: p("clear") }),
106
- /* @__PURE__ */ e(G, { axis: "vertical", height: 1.5, spacing: 0.5, color: "primary" })
125
+ ) : /* @__PURE__ */ i(G, { onClick: y, size: "medium", title: n("clear") }),
126
+ /* @__PURE__ */ i(K, { axis: "vertical", height: 1.5, spacing: 0.5, color: "primary" })
107
127
  ] }),
108
- /* @__PURE__ */ e(
128
+ /* @__PURE__ */ i(
109
129
  C,
110
130
  {
111
131
  visualType: "neutral",
112
132
  iconLeft: "file_upload",
113
- "aria-describedby": m,
114
133
  disabled: o,
115
134
  onClick: () => {
116
- var a;
117
- return (a = document.getElementById(r)) == null ? void 0 : a.click();
135
+ var e;
136
+ return (e = document.getElementById(s)) == null ? void 0 : e.click();
118
137
  },
119
- className: i["tedi-file-upload__button"],
120
- size: s,
121
- children: p("file-upload.add")
138
+ className: l["tedi-file-upload__button"],
139
+ size: c,
140
+ children: n("file-upload.add")
122
141
  }
123
142
  )
124
143
  ] }) })
125
144
  ] }) })
126
145
  }
127
146
  ),
128
- l ? /* @__PURE__ */ e(x, { ...l, id: m }) : t ? /* @__PURE__ */ e(x, { ...t, id: m }) : null
147
+ a ? /* @__PURE__ */ i(L, { ...a, id: _ }) : t ? /* @__PURE__ */ i(L, { ...t, id: _ }) : null
129
148
  ] });
130
149
  };
131
150
  export {
132
- ue as FileUpload,
133
- ue as default
151
+ he as FileUpload,
152
+ he as default
134
153
  };
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-file-upload":"tedi-file-upload-115f37c2","tedi-file-upload__items":"tedi-file-upload__items-c73c19e5","tedi-file-upload__container":"tedi-file-upload__container-6b0f28a8","tedi-file-upload__container--default":"tedi-file-upload__container--default-56af0d96","tedi-file-upload__button":"tedi-file-upload__button-f37449e6","tedi-file-upload__container--small":"tedi-file-upload__container--small-4d5cd36e","tedi-file-upload--disabled":"tedi-file-upload--disabled-88f4fdcd","tedi-file-upload--error":"tedi-file-upload--error-388cda6f","tedi-file-upload--valid":"tedi-file-upload--valid-28d5eb71","tedi-file-upload__content":"tedi-file-upload__content-8b6bf324"};exports.default=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-file-upload":"tedi-file-upload-115f37c2","tedi-file-upload__items":"tedi-file-upload__items-c73c19e5","tedi-file-upload__container":"tedi-file-upload__container-6b0f28a8","tedi-file-upload__container--default":"tedi-file-upload__container--default-56af0d96","tedi-file-upload__button":"tedi-file-upload__button-f37449e6","tedi-file-upload__container--small":"tedi-file-upload__container--small-4d5cd36e","tedi-file-upload--disabled":"tedi-file-upload--disabled-88f4fdcd","tedi-file-upload--error":"tedi-file-upload--error-388cda6f","tedi-file-upload--valid":"tedi-file-upload--valid-28d5eb71","tedi-file-upload__content":"tedi-file-upload__content-8b6bf324","tedi-file-upload__items--truncate":"tedi-file-upload__items--truncate-5c249a01","tedi-file-upload__tag--truncate":"tedi-file-upload__tag--truncate-4c99cb2b"};exports.default=e;
@@ -8,7 +8,9 @@ const e = {
8
8
  "tedi-file-upload--disabled": "tedi-file-upload--disabled-88f4fdcd",
9
9
  "tedi-file-upload--error": "tedi-file-upload--error-388cda6f",
10
10
  "tedi-file-upload--valid": "tedi-file-upload--valid-28d5eb71",
11
- "tedi-file-upload__content": "tedi-file-upload__content-8b6bf324"
11
+ "tedi-file-upload__content": "tedi-file-upload__content-8b6bf324",
12
+ "tedi-file-upload__items--truncate": "tedi-file-upload__items--truncate-5c249a01",
13
+ "tedi-file-upload__tag--truncate": "tedi-file-upload__tag--truncate-4c99cb2b"
12
14
  };
13
15
  export {
14
16
  e as default
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),c=require("../../../../../external/classnames/index.cjs.js"),n=require("react"),S=require("../feedback-text/feedback-text.cjs.js"),T=require("../form-label/form-label.cjs.js"),a=require("./radio.module.scss.cjs.js"),v=require("../../layout/grid/row.cjs.js"),b=require("../../layout/grid/col.cjs.js"),x=j=>{const{id:r,label:l,value:u,className:k,disabled:f,onChange:t,hideLabel:p,helper:i,checked:o,defaultChecked:g,hover:q,name:C,tooltip:N,size:h="default",invalid:R,...y}=j,[m,w]=n.useState(g||!1),s=n.useRef(null),L=n.useMemo(()=>t&&typeof o<"u"?o:m,[t,m,o]),M=d=>{typeof o>"u"&&w(d==null?void 0:d.target.checked),t==null||t(u,d==null?void 0:d.target.checked)},F=i?(i==null?void 0:i.id)??`${r}-helper`:void 0,_=c.default(a.default["tedi-radio"],{[a.default["tedi-radio--disabled"]]:f});return e.jsxs("div",{"data-name":"radio",...y,children:[e.jsxs(v.Row,{gutter:0,children:[e.jsx(b.Col,{width:"auto",children:e.jsxs("div",{className:a.default["tedi-radio__outer-indicator-wrapper"],children:[e.jsx("input",{id:r,value:u,name:C,type:"radio",disabled:f,checked:L,onChange:M,className:a.default["tedi-radio__input"]}),e.jsx("div",{"aria-hidden":"true",onClick:()=>{var d;return(d=s.current)==null?void 0:d.click()},className:c.default(a.default["tedi-radio__indicator"],{[a.default["tedi-radio__indicator--hover"]]:q},{[a.default[`tedi-radio__indicator--size-${h}`]]:h},{[a.default["tedi-radio__indicator--invalid"]]:R},k),"data-testid":"radio-indicator"})]})}),e.jsx(b.Col,{children:l&&typeof l=="string"?e.jsx(T.FormLabel,{ref:s,className:_,id:r,"data-testid":"radio-label",hideLabel:p,label:l,tooltip:N}):e.jsx("label",{ref:s,htmlFor:r,className:_,"data-testid":"radio-label",children:l})})]}),i&&e.jsx(S.FeedbackText,{id:F,...i,className:c.default(a.default["tedi-radio__helper"],i.className)})]})};exports.Radio=x;exports.default=x;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),c=require("../../../../../external/classnames/index.cjs.js"),n=require("react"),I=require("../feedback-text/feedback-text.cjs.js"),S=require("../form-label/form-label.cjs.js"),a=require("./radio.module.scss.cjs.js"),T=require("../../layout/grid/row.cjs.js"),x=require("../../layout/grid/col.cjs.js"),j=k=>{const{id:i,label:o,value:u,className:g,disabled:f,onChange:t,hideLabel:q,helper:r,checked:l,defaultChecked:C,hover:N,name:R,tooltip:h,size:b="default",invalid:y,...w}=k,[m,L]=n.useState(C||!1),s=n.useRef(null),M=n.useMemo(()=>t&&typeof l<"u"?l:m,[t,m,l]),v=d=>{typeof l>"u"&&L(d==null?void 0:d.target.checked),t==null||t(u,d==null?void 0:d.target.checked)},_=r?r.id??`${i}-helper`:void 0,F=h?`${i}-tooltip`:void 0,p=c.default(a.default["tedi-radio"],{[a.default["tedi-radio--disabled"]]:f});return e.jsxs("div",{"data-name":"radio",...w,children:[e.jsxs(T.Row,{gutter:0,children:[e.jsx(x.Col,{width:"auto",children:e.jsxs("div",{className:a.default["tedi-radio__outer-indicator-wrapper"],children:[e.jsx("input",{id:i,value:u,name:R,type:"radio",disabled:f,checked:M,onChange:v,className:a.default["tedi-radio__input"],"aria-describedby":[_,F].filter(Boolean).join(" ")}),e.jsx("div",{"aria-hidden":"true",onClick:()=>{var d;return(d=s.current)==null?void 0:d.click()},className:c.default(a.default["tedi-radio__indicator"],{[a.default["tedi-radio__indicator--hover"]]:N},{[a.default[`tedi-radio__indicator--size-${b}`]]:b},{[a.default["tedi-radio__indicator--invalid"]]:y},g),"data-testid":"radio-indicator"})]})}),e.jsx(x.Col,{children:o&&typeof o=="string"?e.jsx(S.FormLabel,{ref:s,className:p,id:i,"data-testid":"radio-label",hideLabel:q,label:o,tooltip:h}):e.jsx("label",{ref:s,htmlFor:i,className:p,"data-testid":"radio-label",children:o})})]}),r&&e.jsx(I.FeedbackText,{id:_,...r,className:c.default(a.default["tedi-radio__helper"],r.className)})]})};exports.Radio=j;exports.default=j;