@tedi-design-system/react 15.0.0-rc.9 → 16.0.0-rc.1
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/_virtual/index.cjs10.js +1 -1
- package/_virtual/index.cjs11.js +1 -1
- package/_virtual/index.cjs12.js +1 -1
- package/_virtual/index.cjs13.js +1 -1
- package/_virtual/index.cjs5.js +1 -1
- package/_virtual/index.cjs6.js +1 -1
- package/_virtual/index.cjs7.js +1 -1
- package/_virtual/index.cjs8.js +1 -1
- package/_virtual/index.cjs9.js +1 -1
- package/_virtual/index.es10.js +1 -1
- package/_virtual/index.es11.js +1 -1
- package/_virtual/index.es12.js +1 -1
- package/_virtual/index.es13.js +4 -2
- package/_virtual/index.es5.js +2 -4
- package/_virtual/index.es6.js +1 -1
- package/_virtual/index.es7.js +1 -1
- package/_virtual/index.es8.js +1 -1
- package/_virtual/index.es9.js +1 -1
- package/bundle-stats.html +1 -1
- package/external/@mui/system/colorManipulator.cjs.js +1 -1
- package/external/@mui/system/colorManipulator.es.js +2 -2
- package/external/@mui/system/createStyled.cjs.js +1 -1
- package/external/@mui/system/createStyled.es.js +6 -6
- package/external/@mui/system/useThemeWithoutDefault.cjs.js +1 -1
- package/external/@mui/system/useThemeWithoutDefault.es.js +1 -1
- package/external/toposort/index.cjs.js +1 -1
- package/external/toposort/index.es.js +1 -1
- package/index.css +1 -1
- package/package.json +1 -1
- package/src/community/components/layout/header/components/header-modal/header-modal.cjs.js +1 -1
- package/src/community/components/layout/header/components/header-modal/header-modal.es.js +7 -7
- package/src/community/components/map-components/directions/direction-item.cjs.js +1 -1
- package/src/community/components/map-components/directions/direction-item.es.js +16 -15
- package/src/community/components/map-components/right-panel/right-panel.cjs.js +1 -1
- package/src/community/components/map-components/right-panel/right-panel.es.js +24 -24
- package/src/community/components/map-components/sheet/sheet.cjs.js +1 -1
- package/src/community/components/map-components/sheet/sheet.es.js +10 -10
- package/src/community/components/modal/modal.cjs.js +1 -1
- package/src/community/components/modal/modal.es.js +5 -5
- package/src/tedi/components/buttons/button-content/button-content.cjs.js +1 -1
- package/src/tedi/components/buttons/button-content/button-content.d.ts +6 -1
- package/src/tedi/components/buttons/button-content/button-content.es.js +81 -72
- package/src/tedi/components/buttons/closing-button/closing-button.cjs.js +1 -1
- package/src/tedi/components/buttons/closing-button/closing-button.d.ts +4 -2
- package/src/tedi/components/buttons/closing-button/closing-button.es.js +15 -15
- package/src/tedi/components/buttons/closing-button/closing-button.module.scss.cjs.js +1 -1
- package/src/tedi/components/buttons/closing-button/closing-button.module.scss.es.js +2 -2
- package/src/tedi/components/content/text-group/text-group.cjs.js +1 -1
- package/src/tedi/components/content/text-group/text-group.d.ts +25 -5
- package/src/tedi/components/content/text-group/text-group.es.js +15 -14
- package/src/tedi/components/content/text-group/text-group.module.scss.cjs.js +1 -1
- package/src/tedi/components/content/text-group/text-group.module.scss.es.js +3 -1
- package/src/tedi/components/form/file-dropzone/file-dropzone.cjs.js +1 -1
- package/src/tedi/components/form/file-dropzone/file-dropzone.es.js +16 -9
- package/src/tedi/components/form/file-upload/file-upload.cjs.js +1 -1
- package/src/tedi/components/form/file-upload/file-upload.es.js +15 -15
- package/src/tedi/components/form/select/components/select-clear-indicator.cjs.js +1 -1
- package/src/tedi/components/form/select/components/select-clear-indicator.es.js +8 -8
- package/src/tedi/components/form/select/components/select-multi-value-remove.cjs.js +1 -1
- package/src/tedi/components/form/select/components/select-multi-value-remove.es.js +1 -0
- package/src/tedi/components/form/textfield/textfield.cjs.js +1 -1
- package/src/tedi/components/form/textfield/textfield.es.js +40 -37
- package/src/tedi/components/layout/sidenav/components/sidenav-item/sidenav-item.cjs.js +1 -1
- package/src/tedi/components/layout/sidenav/components/sidenav-item/sidenav-item.es.js +1 -1
- package/src/tedi/components/layout/sidenav/components/sidenav-mobile/sidenav-mobile.cjs.js +1 -1
- package/src/tedi/components/layout/sidenav/components/sidenav-mobile/sidenav-mobile.es.js +46 -42
- package/src/tedi/components/notifications/alert/alert.cjs.js +1 -1
- package/src/tedi/components/notifications/alert/alert.es.js +14 -14
- package/src/tedi/components/overlays/popover/popover-content.cjs.js +1 -1
- package/src/tedi/components/overlays/popover/popover-content.es.js +9 -9
- package/src/tedi/components/tags/tag/tag.cjs.js +1 -1
- package/src/tedi/components/tags/tag/tag.es.js +13 -13
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { MouseEventHandler, ButtonHTMLAttributes } from 'react';
|
|
2
|
-
type ClosingButtonSize = '
|
|
2
|
+
export type ClosingButtonSize = 'default' | 'small';
|
|
3
|
+
export type ClosingButtonIconSize = 18 | 24;
|
|
3
4
|
export interface ClosingButtonProps extends ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
5
|
/**
|
|
5
6
|
* Additional classes to apply custom styles to the ClosingButton.
|
|
@@ -7,7 +8,7 @@ export interface ClosingButtonProps extends ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
7
8
|
className?: string;
|
|
8
9
|
/**
|
|
9
10
|
* Size of the ClosingButton
|
|
10
|
-
* @default '
|
|
11
|
+
* @default 'default'
|
|
11
12
|
*/
|
|
12
13
|
size?: ClosingButtonSize;
|
|
13
14
|
/**
|
|
@@ -15,6 +16,7 @@ export interface ClosingButtonProps extends ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
15
16
|
*/
|
|
16
17
|
onClick?: MouseEventHandler<HTMLButtonElement>;
|
|
17
18
|
title?: string;
|
|
19
|
+
iconSize?: ClosingButtonIconSize;
|
|
18
20
|
}
|
|
19
21
|
export declare const ClosingButton: (props: ClosingButtonProps) => JSX.Element;
|
|
20
22
|
export default ClosingButton;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
3
|
-
import { Icon as
|
|
4
|
-
import
|
|
5
|
-
import { useLabels as
|
|
6
|
-
const
|
|
7
|
-
const { getLabel: i } =
|
|
8
|
-
|
|
2
|
+
import b from "../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { Icon as d } from "../../base/icon/icon.es.js";
|
|
4
|
+
import n from "./closing-button.module.scss.es.js";
|
|
5
|
+
import { useLabels as f } from "../../../providers/label-provider/use-labels.es.js";
|
|
6
|
+
const I = (l) => {
|
|
7
|
+
const { getLabel: i } = f(), { title: o = i("close"), onClick: a, size: c = "default", iconSize: t = 24, className: r, ...m } = l, e = t === 18 ? "small" : c, u = b(
|
|
8
|
+
n["tedi-closing-button"],
|
|
9
9
|
{
|
|
10
|
-
[
|
|
10
|
+
[n[`tedi-closing-button--${e}`]]: e
|
|
11
11
|
},
|
|
12
|
-
|
|
12
|
+
r
|
|
13
13
|
);
|
|
14
14
|
return /* @__PURE__ */ s(
|
|
15
15
|
"button",
|
|
16
16
|
{
|
|
17
17
|
"data-name": "closing-button",
|
|
18
18
|
type: "button",
|
|
19
|
-
...
|
|
20
|
-
className:
|
|
21
|
-
onClick:
|
|
19
|
+
...m,
|
|
20
|
+
className: u,
|
|
21
|
+
onClick: a,
|
|
22
22
|
title: o,
|
|
23
23
|
"aria-label": o,
|
|
24
|
-
children: /* @__PURE__ */ s(
|
|
24
|
+
children: /* @__PURE__ */ s(d, { name: "close", size: t ?? 24 })
|
|
25
25
|
}
|
|
26
26
|
);
|
|
27
27
|
};
|
|
28
28
|
export {
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
I as ClosingButton,
|
|
30
|
+
I as default
|
|
31
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-closing-button":"tedi-closing-button-358111e2","tedi-closing-button--
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-closing-button":"tedi-closing-button-358111e2","tedi-closing-button--default":"tedi-closing-button--default-22ed12be","tedi-closing-button--small":"tedi-closing-button--small-0e85c3e2"};exports.default=t;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const t = {
|
|
2
2
|
"tedi-closing-button": "tedi-closing-button-358111e2",
|
|
3
|
-
"tedi-closing-button--
|
|
4
|
-
"tedi-closing-button--
|
|
3
|
+
"tedi-closing-button--default": "tedi-closing-button--default-22ed12be",
|
|
4
|
+
"tedi-closing-button--small": "tedi-closing-button--small-0e85c3e2"
|
|
5
5
|
};
|
|
6
6
|
export {
|
|
7
7
|
t as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),a=require("../../../../../external/classnames/index.cjs.js"),x=require("../label/label.cjs.js"),e=require("./text-group.module.scss.cjs.js"),f=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),b=u=>{const{getCurrentBreakpointProps:o}=f.useBreakpointProps(u.defaultServerBreakpoint),{label:l,value:s,labelWidth:r="auto",className:i,type:d="vertical",labelAlign:n="left"}=o(u),c=a.default(e.default["tedi-text-group"],e.default[`tedi-text-group--${d}`],i),p=typeof r=="number"?`${r}%`:r;return t.jsxs("dl",{className:c,style:{"--label-width":p},children:[t.jsx("dt",{className:a.default(e.default["tedi-text-group__label"],e.default[`tedi-text-group--align-${n}`]),children:typeof l=="string"?t.jsx(x.Label,{children:l}):l}),t.jsx("dd",{className:a.default(e.default["tedi-text-group__value"]),children:s})]})};exports.TextGroup=b;
|
|
@@ -1,22 +1,42 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { BreakpointSupport } from '../../../helpers';
|
|
3
|
-
type
|
|
3
|
+
type TextAlign = 'left' | 'right';
|
|
4
4
|
type TextGroupBreakpointProps = {
|
|
5
5
|
/**
|
|
6
6
|
* Type of text group layout
|
|
7
7
|
*/
|
|
8
|
-
type?:
|
|
8
|
+
type?: 'horizontal';
|
|
9
|
+
/**
|
|
10
|
+
* Alignment for the label text
|
|
11
|
+
* @default 'left'
|
|
12
|
+
*/
|
|
13
|
+
labelAlign?: TextAlign;
|
|
14
|
+
/**
|
|
15
|
+
* Width for the label (e.g., '200px', '30%', etc.)
|
|
16
|
+
* @default 'auto'
|
|
17
|
+
*/
|
|
18
|
+
labelWidth?: string | number;
|
|
19
|
+
} | {
|
|
20
|
+
/**
|
|
21
|
+
* Type of text group layout
|
|
22
|
+
*/
|
|
23
|
+
type: 'vertical';
|
|
24
|
+
/**
|
|
25
|
+
* Alignment for the label text
|
|
26
|
+
* @default 'left'
|
|
27
|
+
*/
|
|
28
|
+
labelAlign?: 'left';
|
|
9
29
|
/**
|
|
10
30
|
* Width for the label (e.g., '200px', '30%', etc.)
|
|
11
31
|
* @default 'auto'
|
|
12
32
|
*/
|
|
13
33
|
labelWidth?: string | number;
|
|
14
34
|
};
|
|
15
|
-
export
|
|
35
|
+
export type TextGroupProps = BreakpointSupport<TextGroupBreakpointProps> & {
|
|
16
36
|
/**
|
|
17
37
|
* Label for the text group
|
|
18
38
|
*/
|
|
19
|
-
label:
|
|
39
|
+
label: React.ReactNode;
|
|
20
40
|
/**
|
|
21
41
|
* Value displayed alongside the label
|
|
22
42
|
*/
|
|
@@ -25,6 +45,6 @@ export interface TextGroupProps extends BreakpointSupport<TextGroupBreakpointPro
|
|
|
25
45
|
* Additional class name(s) to apply to the element
|
|
26
46
|
*/
|
|
27
47
|
className?: string;
|
|
28
|
-
}
|
|
48
|
+
};
|
|
29
49
|
export declare const TextGroup: (props: TextGroupProps) => JSX.Element;
|
|
30
50
|
export {};
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { Label as
|
|
1
|
+
import { jsxs as u, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import o from "../../../../../external/classnames/index.es.js";
|
|
3
|
+
import { Label as x } from "../label/label.es.js";
|
|
4
4
|
import e from "./text-group.module.scss.es.js";
|
|
5
|
-
import { useBreakpointProps as
|
|
6
|
-
const
|
|
7
|
-
const { getCurrentBreakpointProps:
|
|
8
|
-
label:
|
|
5
|
+
import { useBreakpointProps as f } from "../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
6
|
+
const v = (a) => {
|
|
7
|
+
const { getCurrentBreakpointProps: s } = f(a.defaultServerBreakpoint), {
|
|
8
|
+
label: t,
|
|
9
9
|
value: i,
|
|
10
|
-
labelWidth:
|
|
10
|
+
labelWidth: r = "auto",
|
|
11
11
|
className: p,
|
|
12
|
-
type:
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
/* @__PURE__ */
|
|
12
|
+
type: n = "vertical",
|
|
13
|
+
labelAlign: d = "left"
|
|
14
|
+
} = s(a), m = o(e["tedi-text-group"], e[`tedi-text-group--${n}`], p), c = typeof r == "number" ? `${r}%` : r;
|
|
15
|
+
return /* @__PURE__ */ u("dl", { className: m, style: { "--label-width": c }, children: [
|
|
16
|
+
/* @__PURE__ */ l("dt", { className: o(e["tedi-text-group__label"], e[`tedi-text-group--align-${d}`]), children: typeof t == "string" ? /* @__PURE__ */ l(x, { children: t }) : t }),
|
|
17
|
+
/* @__PURE__ */ l("dd", { className: o(e["tedi-text-group__value"]), children: i })
|
|
17
18
|
] });
|
|
18
19
|
};
|
|
19
20
|
export {
|
|
20
|
-
|
|
21
|
+
v as TextGroup
|
|
21
22
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-text-group":"tedi-text-group-be3b15d8","tedi-text-group--horizontal":"tedi-text-group--horizontal-9d91c910","tedi-text-group__label":"tedi-text-group__label-a8904597","tedi-text-group__value":"tedi-text-group__value-4bbf1a22"};exports.default=t;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t={"tedi-text-group":"tedi-text-group-be3b15d8","tedi-text-group--horizontal":"tedi-text-group--horizontal-9d91c910","tedi-text-group__label":"tedi-text-group__label-a8904597","tedi-text-group__value":"tedi-text-group__value-4bbf1a22","tedi-text-group--align-left":"tedi-text-group--align-left-cc82fd31","tedi-text-group--align-right":"tedi-text-group--align-right-0eebe973"};exports.default=t;
|
|
@@ -2,7 +2,9 @@ const t = {
|
|
|
2
2
|
"tedi-text-group": "tedi-text-group-be3b15d8",
|
|
3
3
|
"tedi-text-group--horizontal": "tedi-text-group--horizontal-9d91c910",
|
|
4
4
|
"tedi-text-group__label": "tedi-text-group__label-a8904597",
|
|
5
|
-
"tedi-text-group__value": "tedi-text-group__value-4bbf1a22"
|
|
5
|
+
"tedi-text-group__value": "tedi-text-group__value-4bbf1a22",
|
|
6
|
+
"tedi-text-group--align-left": "tedi-text-group--align-left-cc82fd31",
|
|
7
|
+
"tedi-text-group--align-right": "tedi-text-group--align-right-0eebe973"
|
|
6
8
|
};
|
|
7
9
|
export {
|
|
8
10
|
t as default
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),y=require("../../../../../external/classnames/index.cjs.js"),F=require("../../../../../external/react-dropzone/dist/es/index.cjs.js"),C=require("../../../helpers/hooks/use-file-upload.cjs.js"),u=require("../../base/icon/icon.cjs.js"),N=require("../../buttons/closing-button/closing-button.cjs.js"),f=require("../feedback-text/feedback-text.cjs.js"),D=require("../form-label/form-label.cjs.js"),t=require("./file-dropzone.module.scss.cjs.js"),I=require("../../cards/card/card.cjs.js"),L=require("../../cards/card/card-content/card-content.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),y=require("../../../../../external/classnames/index.cjs.js"),F=require("../../../../../external/react-dropzone/dist/es/index.cjs.js"),C=require("../../../helpers/hooks/use-file-upload.cjs.js"),u=require("../../base/icon/icon.cjs.js"),N=require("../../buttons/closing-button/closing-button.cjs.js"),f=require("../feedback-text/feedback-text.cjs.js"),D=require("../form-label/form-label.cjs.js"),t=require("./file-dropzone.module.scss.cjs.js"),I=require("../../cards/card/card.cjs.js"),L=require("../../cards/card/card-content/card-content.cjs.js"),S=require("../../../providers/label-provider/use-labels.cjs.js"),m=require("../../content/list/list.cjs.js"),k=require("../../layout/grid/row.cjs.js"),x=require("../../layout/grid/col.cjs.js"),p=o=>{const{getLabel:s}=S.useLabels(),{label:z=s("file-dropzone.label"),className:b,disabled:a=!1,helper:i,id:c}=o,{innerFiles:d,uploadErrorHelper:n,onFileChange:j,onFileRemove:g}=C.useFileUpload(o),{getRootProps:v,getInputProps:_,isDragActive:q}=F.useDropzone({disabled:a,accept:o.accept?{"application/*":[o.accept]}:void 0,multiple:o.multiple,maxSize:o.maxSize?o.maxSize*1024**2:void 0,onDrop:l=>{if(a)return;j({target:{files:l}})}}),h=y.default(t.default["tedi-file-dropzone"],{[t.default["tedi-file-dropzone--disabled"]]:a},{[t.default["tedi-file-dropzone--invalid"]]:((n==null?void 0:n.type)||(i==null?void 0:i.type))==="error"},{[t.default["tedi-file-dropzone--valid"]]:((n==null?void 0:n.type)||(i==null?void 0:i.type))==="valid"},{[t.default["tedi-file-dropzone--drop-over"]]:q},b),r=i?(i==null?void 0:i.id)??`${c}-helper`:void 0;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{...v({tabIndex:a?-1:0,"aria-disabled":a,"aria-describedby":r}),className:h,children:[e.jsx("input",{..._(),disabled:a}),e.jsxs("div",{className:t.default["tedi-file-dropzone__label-wrapper"],children:[e.jsx(u.Icon,{color:a?"tertiary":"secondary",size:24,name:"attach_file"}),e.jsx(D.FormLabel,{id:c,label:z,className:t.default["tedi-file-dropzone__label"]})]})]}),i?e.jsx(f.FeedbackText,{...i,id:r}):n?e.jsx(f.FeedbackText,{...n,id:r}):null,!!d.length&&e.jsx(m.List,{className:t.default["tedi-file-dropzone__file-list"],style:"none","aria-label":s("file-dropzone.selected-files"),children:d.map(l=>e.jsx(m.List.Item,{className:t.default["tedi-file-dropzone__file-list-item"],children:e.jsx(I.Card,{background:l.isValid===!1?"danger-primary":"tertiary",borderless:!0,className:t.default["tedi-file-dropzone__file-item"],children:e.jsx(L.CardContent,{padding:.5,children:e.jsxs(k.Row,{alignItems:"center",children:[e.jsxs(x.Col,{className:t.default["tedi-file-dropzone__file-name"],children:[l.name," ",l.isValid===!1&&e.jsx(u.Icon,{name:"info",color:"danger",display:"inline",size:18})]}),e.jsx(x.Col,{width:"auto",children:e.jsx(N.ClosingButton,{iconSize:18,title:s("remove")+" "+l.name,onClick:()=>g(l)})})]})})})},l.id||l.name))}),e.jsx("div",{className:"sr-only",role:"status","aria-live":"polite","aria-atomic":"true",children:d.length===0?s("file-dropzone.no-file"):s("file-dropzone.files-selected",d.length)})]})};exports.FileDropzone=p;exports.default=p;
|
|
@@ -5,16 +5,16 @@ import { useFileUpload as D } from "../../../helpers/hooks/use-file-upload.es.js
|
|
|
5
5
|
import { Icon as f } from "../../base/icon/icon.es.js";
|
|
6
6
|
import { ClosingButton as L } from "../../buttons/closing-button/closing-button.es.js";
|
|
7
7
|
import { FeedbackText as p } from "../feedback-text/feedback-text.es.js";
|
|
8
|
-
import { FormLabel as
|
|
8
|
+
import { FormLabel as S } from "../form-label/form-label.es.js";
|
|
9
9
|
import o from "./file-dropzone.module.scss.es.js";
|
|
10
|
-
import { Card as
|
|
11
|
-
import { CardContent as
|
|
12
|
-
import { useLabels as
|
|
10
|
+
import { Card as k } from "../../cards/card/card.es.js";
|
|
11
|
+
import { CardContent as w } from "../../cards/card/card-content/card-content.es.js";
|
|
12
|
+
import { useLabels as R } from "../../../providers/label-provider/use-labels.es.js";
|
|
13
13
|
import { List as z } from "../../content/list/list.es.js";
|
|
14
14
|
import { Row as j } from "../../layout/grid/row.es.js";
|
|
15
15
|
import { Col as b } from "../../layout/grid/col.es.js";
|
|
16
16
|
const Y = (a) => {
|
|
17
|
-
const { getLabel: n } =
|
|
17
|
+
const { getLabel: n } = R(), { label: g = n("file-dropzone.label"), className: v, disabled: r = !1, helper: i, id: c } = a, { innerFiles: s, uploadErrorHelper: l, onFileChange: h, onFileRemove: u } = D(a), { getRootProps: y, getInputProps: _, isDragActive: N } = I({
|
|
18
18
|
disabled: r,
|
|
19
19
|
accept: a.accept ? { "application/*": [a.accept] } : void 0,
|
|
20
20
|
multiple: a.multiple,
|
|
@@ -47,7 +47,7 @@ const Y = (a) => {
|
|
|
47
47
|
/* @__PURE__ */ e("input", { ..._(), disabled: r }),
|
|
48
48
|
/* @__PURE__ */ d("div", { className: o["tedi-file-dropzone__label-wrapper"], children: [
|
|
49
49
|
/* @__PURE__ */ e(f, { color: r ? "tertiary" : "secondary", size: 24, name: "attach_file" }),
|
|
50
|
-
/* @__PURE__ */ e(
|
|
50
|
+
/* @__PURE__ */ e(S, { id: c, label: g, className: o["tedi-file-dropzone__label"] })
|
|
51
51
|
] })
|
|
52
52
|
]
|
|
53
53
|
}
|
|
@@ -60,18 +60,25 @@ const Y = (a) => {
|
|
|
60
60
|
style: "none",
|
|
61
61
|
"aria-label": n("file-dropzone.selected-files"),
|
|
62
62
|
children: s.map((t) => /* @__PURE__ */ e(z.Item, { className: o["tedi-file-dropzone__file-list-item"], children: /* @__PURE__ */ e(
|
|
63
|
-
|
|
63
|
+
k,
|
|
64
64
|
{
|
|
65
65
|
background: t.isValid === !1 ? "danger-primary" : "tertiary",
|
|
66
66
|
borderless: !0,
|
|
67
67
|
className: o["tedi-file-dropzone__file-item"],
|
|
68
|
-
children: /* @__PURE__ */ e(
|
|
68
|
+
children: /* @__PURE__ */ e(w, { padding: 0.5, children: /* @__PURE__ */ d(j, { alignItems: "center", children: [
|
|
69
69
|
/* @__PURE__ */ d(b, { className: o["tedi-file-dropzone__file-name"], children: [
|
|
70
70
|
t.name,
|
|
71
71
|
" ",
|
|
72
72
|
t.isValid === !1 && /* @__PURE__ */ e(f, { name: "info", color: "danger", display: "inline", size: 18 })
|
|
73
73
|
] }),
|
|
74
|
-
/* @__PURE__ */ e(b, { width: "auto", children: /* @__PURE__ */ e(
|
|
74
|
+
/* @__PURE__ */ e(b, { width: "auto", children: /* @__PURE__ */ e(
|
|
75
|
+
L,
|
|
76
|
+
{
|
|
77
|
+
iconSize: 18,
|
|
78
|
+
title: n("remove") + " " + t.name,
|
|
79
|
+
onClick: () => u(t)
|
|
80
|
+
}
|
|
81
|
+
) })
|
|
75
82
|
] }) })
|
|
76
83
|
}
|
|
77
84
|
) }, t.id || t.name))
|
|
@@ -1 +1 @@
|
|
|
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:
|
|
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:n}=Q.useLabels(),{id:r,name:C,accept:g,multiple:_,onChange:p,className:N,defaultFiles:k,onDelete:T,hasClearButton:U=!0,files:u,readOnly:m,disabled:s=!1,maxSize:$,validateIndividually:w=!1,size:c="default",helper:i,...S}=B,{innerFiles:b,uploadErrorHelper:t,onFileChange:M,onFileRemove:R,handleClear:h,announcement:z}=W.useFileUpload({accept:g,maxSize:$,multiple:_,validateIndividually:w,defaultFiles:k,onChange:p,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,d=P.useMemo(()=>u&&p?u:b,[u,b,p]),O=(l,o)=>{const D=l.isValid===!1?`${l.name} (${n("file-upload.failed")})`:l.name;return e.jsx("li",{children:e.jsx(K.Tag,{color:l.isValid===!1?"danger":"primary",onClose:!l.isLoading&&!s&&!m?()=>R(l):void 0,isLoading:l.isLoading,"aria-label":D,children:l.name})},o)},j=()=>{if(d.length>1)return e.jsx("ul",{className:f.default(a.default["tedi-file-upload__items"],a.default["tedi-file-upload__truncate-list"]),children:d.map((l,o)=>O(l,o))});if(d.length===1){const l=d[0],o=l.isValid===!1?`${l.name} (${n("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,...S,renderWithoutLabel:m,className:a.default["tedi-file-upload__label"],size:c})}),e.jsx("div",{"aria-live":"polite","aria-atomic":"true",className:"sr-only",children:z}),m?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:M,multiple:_,disabled:s,"aria-invalid":!!t&&t.type==="error","aria-describedby":x}),U&&d.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:n("clear")}):e.jsx(E.ClosingButton,{onClick:h,iconSize:18,title:n("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:n("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;
|
|
@@ -25,15 +25,15 @@ const he = (B) => {
|
|
|
25
25
|
defaultFiles: T,
|
|
26
26
|
onDelete: w,
|
|
27
27
|
hasClearButton: z = !0,
|
|
28
|
-
files:
|
|
28
|
+
files: c,
|
|
29
29
|
readOnly: h,
|
|
30
30
|
disabled: o = !1,
|
|
31
31
|
maxSize: I,
|
|
32
32
|
validateIndividually: R = !1,
|
|
33
|
-
size:
|
|
33
|
+
size: m = "default",
|
|
34
34
|
helper: a,
|
|
35
|
-
...
|
|
36
|
-
} = B, { innerFiles: v, uploadErrorHelper: t, onFileChange:
|
|
35
|
+
...S
|
|
36
|
+
} = B, { innerFiles: v, uploadErrorHelper: t, onFileChange: U, onFileRemove: V, handleClear: y, announcement: j } = A({
|
|
37
37
|
accept: g,
|
|
38
38
|
maxSize: I,
|
|
39
39
|
multiple: b,
|
|
@@ -41,14 +41,14 @@ const he = (B) => {
|
|
|
41
41
|
defaultFiles: T,
|
|
42
42
|
onChange: f,
|
|
43
43
|
onDelete: w,
|
|
44
|
-
files:
|
|
45
|
-
}),
|
|
44
|
+
files: c
|
|
45
|
+
}), M = 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(() => c && f ? c : v, [c, v, f]), O = (e, r) => {
|
|
46
46
|
const W = e.isValid === !1 ? `${e.name} (${n("file-upload.failed")})` : e.name;
|
|
47
47
|
return /* @__PURE__ */ i("li", { children: /* @__PURE__ */ i(
|
|
48
48
|
P,
|
|
49
49
|
{
|
|
50
50
|
color: e.isValid === !1 ? "danger" : "primary",
|
|
51
|
-
onClose: !e.isLoading && !o && !h ? () =>
|
|
51
|
+
onClose: !e.isLoading && !o && !h ? () => V(e) : void 0,
|
|
52
52
|
isLoading: e.isLoading,
|
|
53
53
|
"aria-label": W,
|
|
54
54
|
children: e.name
|
|
@@ -75,13 +75,13 @@ const he = (B) => {
|
|
|
75
75
|
J,
|
|
76
76
|
{
|
|
77
77
|
id: s,
|
|
78
|
-
...
|
|
78
|
+
...S,
|
|
79
79
|
renderWithoutLabel: h,
|
|
80
80
|
className: l["tedi-file-upload__label"],
|
|
81
|
-
size:
|
|
81
|
+
size: m
|
|
82
82
|
}
|
|
83
83
|
) }),
|
|
84
|
-
/* @__PURE__ */ i("div", { "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children:
|
|
84
|
+
/* @__PURE__ */ i("div", { "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: j }),
|
|
85
85
|
h ? F() : /* @__PURE__ */ i(
|
|
86
86
|
"div",
|
|
87
87
|
{
|
|
@@ -92,7 +92,7 @@ const he = (B) => {
|
|
|
92
92
|
[l["tedi-file-upload--error"]]: ((t == null ? void 0 : t.type) || (a == null ? void 0 : a.type)) === "error",
|
|
93
93
|
[l["tedi-file-upload--valid"]]: ((t == null ? void 0 : t.type) || (a == null ? void 0 : a.type)) === "valid"
|
|
94
94
|
},
|
|
95
|
-
{ [l[`tedi-file-upload__container--${
|
|
95
|
+
{ [l[`tedi-file-upload__container--${m}`]]: m }
|
|
96
96
|
),
|
|
97
97
|
children: /* @__PURE__ */ i("div", { className: l["tedi-file-upload__content"], children: /* @__PURE__ */ u(Z, { children: [
|
|
98
98
|
/* @__PURE__ */ i(x, { className: "display-flex", children: F() }),
|
|
@@ -104,7 +104,7 @@ const he = (B) => {
|
|
|
104
104
|
type: "file",
|
|
105
105
|
name: k,
|
|
106
106
|
accept: g,
|
|
107
|
-
onChange:
|
|
107
|
+
onChange: U,
|
|
108
108
|
multiple: b,
|
|
109
109
|
disabled: o,
|
|
110
110
|
"aria-invalid": !!t && t.type === "error",
|
|
@@ -112,7 +112,7 @@ const he = (B) => {
|
|
|
112
112
|
}
|
|
113
113
|
),
|
|
114
114
|
z && d.length > 0 && !o && /* @__PURE__ */ u(N, { children: [
|
|
115
|
-
Y(
|
|
115
|
+
Y(M, "md") ? /* @__PURE__ */ i(
|
|
116
116
|
C,
|
|
117
117
|
{
|
|
118
118
|
visualType: "neutral",
|
|
@@ -122,7 +122,7 @@ const he = (B) => {
|
|
|
122
122
|
className: l["tedi-file-upload__button"],
|
|
123
123
|
children: n("clear")
|
|
124
124
|
}
|
|
125
|
-
) : /* @__PURE__ */ i(G, { onClick: y,
|
|
125
|
+
) : /* @__PURE__ */ i(G, { onClick: y, iconSize: 18, title: n("clear") }),
|
|
126
126
|
/* @__PURE__ */ i(K, { axis: "vertical", height: 1.5, spacing: 0.5, color: "primary" })
|
|
127
127
|
] }),
|
|
128
128
|
/* @__PURE__ */ i(
|
|
@@ -136,7 +136,7 @@ const he = (B) => {
|
|
|
136
136
|
return (e = document.getElementById(s)) == null ? void 0 : e.click();
|
|
137
137
|
},
|
|
138
138
|
className: l["tedi-file-upload__button"],
|
|
139
|
-
size:
|
|
139
|
+
size: m,
|
|
140
140
|
children: n("file-upload.add")
|
|
141
141
|
}
|
|
142
142
|
)
|
|
@@ -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"),o=require("../../../buttons/closing-button/closing-button.cjs.js"),a=require("../../../misc/separator/separator.cjs.js"),l=require("../select.module.scss.cjs.js"),c=require("../../../../providers/label-provider/use-labels.cjs.js"),i=({isClearIndicatorVisible:r,innerProps:{ref:t,...s}})=>{const{getLabel:n}=c.useLabels();return r?e.jsxs(e.Fragment,{children:[e.jsx(o.ClosingButton,{tabIndex:0,ref:t,iconSize:18,...s,children:n("clear")}),e.jsx(a.Separator,{color:"primary",axis:"vertical",className:l.default["tedi-select__separator"]})]}):null};exports.SelectClearIndicator=i;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { ClosingButton as
|
|
3
|
-
import { Separator as
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as i, Fragment as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { ClosingButton as l } from "../../../buttons/closing-button/closing-button.es.js";
|
|
3
|
+
import { Separator as n } from "../../../misc/separator/separator.es.js";
|
|
4
|
+
import m from "../select.module.scss.es.js";
|
|
5
5
|
import { useLabels as c } from "../../../../providers/label-provider/use-labels.es.js";
|
|
6
6
|
const b = ({
|
|
7
7
|
isClearIndicatorVisible: e,
|
|
8
|
-
innerProps: { ref:
|
|
8
|
+
innerProps: { ref: o, ...t }
|
|
9
9
|
}) => {
|
|
10
10
|
const { getLabel: a } = c();
|
|
11
|
-
return e ? /* @__PURE__ */ s
|
|
12
|
-
/* @__PURE__ */ r(
|
|
13
|
-
/* @__PURE__ */ r(
|
|
11
|
+
return e ? /* @__PURE__ */ i(s, { children: [
|
|
12
|
+
/* @__PURE__ */ r(l, { tabIndex: 0, ref: o, iconSize: 18, ...t, children: a("clear") }),
|
|
13
|
+
/* @__PURE__ */ r(n, { color: "primary", axis: "vertical", className: m["tedi-select__separator"] })
|
|
14
14
|
] }) : null;
|
|
15
15
|
};
|
|
16
16
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("../../../buttons/closing-button/closing-button.cjs.js"),n=require("../../../misc/separator/separator.cjs.js"),s=require("../select.module.scss.cjs.js"),u=require("../../../../providers/label-provider/use-labels.cjs.js"),d=({innerProps:l,data:a})=>{const{getLabel:r}=u.useLabels(),o=e=>{l.onClick&&l.onClick(e)},c=e=>{(e.key==="Enter"||e.key===" ")&&o(e)};return t.jsxs(t.Fragment,{children:[t.jsx(i.ClosingButton,{onMouseDown:e=>e.stopPropagation(),onClick:o,onKeyDown:c,className:s.default["tedi-select__multi-value-clear"],title:`${r("clear")} ${a.label}`}),t.jsx(n.Separator,{color:"primary",axis:"vertical",className:s.default["tedi-select__separator"]})]})};exports.SelectMultiValueRemove=d;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),i=require("../../../buttons/closing-button/closing-button.cjs.js"),n=require("../../../misc/separator/separator.cjs.js"),s=require("../select.module.scss.cjs.js"),u=require("../../../../providers/label-provider/use-labels.cjs.js"),d=({innerProps:l,data:a})=>{const{getLabel:r}=u.useLabels(),o=e=>{l.onClick&&l.onClick(e)},c=e=>{(e.key==="Enter"||e.key===" ")&&o(e)};return t.jsxs(t.Fragment,{children:[t.jsx(i.ClosingButton,{onMouseDown:e=>e.stopPropagation(),onClick:o,onKeyDown:c,className:s.default["tedi-select__multi-value-clear"],iconSize:18,title:`${r("clear")} ${a.label}`}),t.jsx(n.Separator,{color:"primary",axis:"vertical",className:s.default["tedi-select__separator"]})]})};exports.SelectMultiValueRemove=d;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),p=require("../../../../../external/classnames/index.cjs.js"),r=require("react"),ce=require("../../base/icon/icon.cjs.js"),fe=require("../../buttons/closing-button/closing-button.cjs.js"),xe=require("../../misc/separator/separator.cjs.js"),U=require("../feedback-text/feedback-text.cjs.js"),pe=require("../form-label/form-label.cjs.js"),a=require("./textfield.module.scss.cjs.js"),me=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),be=require("../../../providers/label-provider/use-labels.cjs.js"),I=r.forwardRef((f,G)=>{const{getCurrentBreakpointProps:J}=me.useBreakpointProps(f.defaultServerBreakpoint),{id:u,label:
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("react/jsx-runtime"),p=require("../../../../../external/classnames/index.cjs.js"),r=require("react"),ce=require("../../base/icon/icon.cjs.js"),fe=require("../../buttons/closing-button/closing-button.cjs.js"),xe=require("../../misc/separator/separator.cjs.js"),U=require("../feedback-text/feedback-text.cjs.js"),pe=require("../form-label/form-label.cjs.js"),a=require("./textfield.module.scss.cjs.js"),me=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),be=require("../../../providers/label-provider/use-labels.cjs.js"),ye={large:24,default:18},I=r.forwardRef((f,G)=>{const{getCurrentBreakpointProps:J}=me.useBreakpointProps(f.defaultServerBreakpoint),{id:u,label:k,className:Q,inputClassName:q,disabled:i,required:A,hideLabel:h,invalid:o,readOnly:B,icon:c,onIconClick:m,size:n,placeholder:T,isArrowsHidden:M=!0,isClearable:R,onClear:b,onChange:d,onChangeEvent:y,onKeyUp:X,onKeyDown:Y,onKeyPress:ve,defaultValue:Z,value:j,onFocus:w,onBlur:F,onClick:ee,helper:t,input:P,name:S,isTextArea:v,...te}=J(f)||{},{getLabel:$}=be.useLabels(),x=r.useRef(null),z=r.useRef(null),[L,V]=r.useState(j??Z??""),_=r.useMemo(()=>{var e;if(t)return Array.isArray(t)?((e=t[0])==null?void 0:e.id)??`${u}-helper`:t.id??`${u}-helper`},[t,u]),N=r.useMemo(()=>j??L,[j,L]),g=R&&N;r.useImperativeHandle(G,()=>({get input(){return x.current},get inner(){return z.current}}));const C=r.useMemo(()=>Array.isArray(t)?o||t.some(e=>e.type==="error"):o||(t==null?void 0:t.type)==="error",[o,t]),re=r.useMemo(()=>!t||Array.isArray(t)&&t.length===0?!1:Array.isArray(t)?!o&&t.every(e=>e.type==="valid"):!o&&t.type==="valid",[o,t]),ae=n==="large"?"default":n,H=r.useCallback(e=>{const s={size:n==="large"?24:n==="small"?16:18,className:p.default(a.default["tedi-textfield__icon"])},de=typeof e=="string"?{...s,name:e}:{...s,...e,className:p.default(s.className,e==null?void 0:e.className)},ue=l.jsx(ce.Icon,{...de}),oe=m?"button":"div";return l.jsx(oe,{className:a.default["tedi-textfield__icon-wrapper"],type:m?"button":void 0,onClick:i?void 0:m,disabled:i,tabIndex:i?-1:0,children:ue})},[i,m,n]),K=r.useCallback(e=>{const s=e.currentTarget.value;V(s),d==null||d(s),y==null||y(e)},[d,y]),E=r.useCallback(()=>{V(""),d==null||d(""),b==null||b()},[d,b]),O=r.useCallback((e,s)=>!!v,[v]),W=r.useCallback((e,s)=>!v,[v]),le=r.useMemo(()=>{const e={...P,id:u,name:S,...h?{"aria-label":k}:{},"aria-describedby":_,"aria-disabled":i||void 0,className:p.default(a.default["tedi-textfield__input"],q,{[a.default["tedi-textfield__input--hidden-arrows"]]:M}),disabled:i,required:A,"aria-invalid":C||void 0,placeholder:T,readOnly:B,onChange:K,value:N,onBlur:F,onFocus:w};return O(f,x)?l.jsx("textarea",{...e,ref:x}):W(f,x)?l.jsx("input",{...e,ref:x}):null},[P,u,S,h,k,_,i,q,M,A,C,T,B,K,N,F,w,O,f,W]),D=r.useMemo(()=>{const e={iconSize:ye[n==="large"?"large":"default"],onClick:i?()=>{}:E,disabled:i,"aria-disabled":i||void 0,title:`${$("clear")}`,className:p.default(a.default["tedi-textfield__clear-button"])};return l.jsx(fe.ClosingButton,{...e})},[E,i,$,n]),ie=r.useMemo(()=>l.jsxs("div",{className:a.default["tedi-textfield__right-area"],children:[g&&D,g&&c?l.jsx(xe.Separator,{color:"primary",axis:"vertical",className:a.default["tedi-textfield__separator"]}):null,c&&H(c)]}),[H,c,D,g]),se=p.default(a.default["tedi-textfield"],{[a.default[`tedi-textfield--${n}`]]:n},{[a.default["tedi-textfield--with-icon"]]:c},{[a.default["tedi-textfield--invalid"]]:C},{[a.default["tedi-textfield--valid"]]:re},{[a.default["tedi-textfield--clearable"]]:g},Q),ne=()=>!t||Array.isArray(t)&&t.length===0?null:l.jsx("div",{className:a.default["tedi-textfield__feedback-wrapper"],children:Array.isArray(t)?t.map((e,s)=>l.jsx(U.FeedbackText,{...e,id:`${_}-${s}`},s)):l.jsx(U.FeedbackText,{...t,id:_})});return l.jsxs("div",{"data-name":"textfield",...te,className:se,children:[l.jsx(pe.FormLabel,{id:u,label:k,required:A,hideLabel:h,size:ae}),l.jsxs("div",{className:a.default["tedi-textfield__inner"],onKeyDown:Y,onKeyUp:X,onClick:ee,tabIndex:i?-1:0,ref:z,children:[le,R||c?ie:null]}),ne()]})});I.displayName="TextField";exports.TextField=I;exports.default=I;
|