@tedi-design-system/react 15.0.0 → 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/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/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/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/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/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
|
@@ -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;
|
|
@@ -2,22 +2,25 @@ import { jsx as n, jsxs as w } from "react/jsx-runtime";
|
|
|
2
2
|
import p from "../../../../../external/classnames/index.es.js";
|
|
3
3
|
import t, { forwardRef as ue } from "react";
|
|
4
4
|
import { Icon as ce } from "../../base/icon/icon.es.js";
|
|
5
|
-
import { ClosingButton as
|
|
6
|
-
import { Separator as
|
|
5
|
+
import { ClosingButton as fe } from "../../buttons/closing-button/closing-button.es.js";
|
|
6
|
+
import { Separator as me } from "../../misc/separator/separator.es.js";
|
|
7
7
|
import { FeedbackText as U } from "../feedback-text/feedback-text.es.js";
|
|
8
8
|
import { FormLabel as pe } from "../form-label/form-label.es.js";
|
|
9
9
|
import a from "./textfield.module.scss.es.js";
|
|
10
10
|
import { useBreakpointProps as xe } from "../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
11
11
|
import { useLabels as be } from "../../../providers/label-provider/use-labels.es.js";
|
|
12
|
-
const ye =
|
|
13
|
-
|
|
12
|
+
const ye = {
|
|
13
|
+
large: 24,
|
|
14
|
+
default: 18
|
|
15
|
+
}, ve = ue((f, G) => {
|
|
16
|
+
const { getCurrentBreakpointProps: J } = xe(f.defaultServerBreakpoint), {
|
|
14
17
|
id: d,
|
|
15
18
|
label: N,
|
|
16
19
|
className: Q,
|
|
17
20
|
inputClassName: B,
|
|
18
21
|
disabled: i,
|
|
19
|
-
required:
|
|
20
|
-
hideLabel:
|
|
22
|
+
required: g,
|
|
23
|
+
hideLabel: h,
|
|
21
24
|
invalid: u,
|
|
22
25
|
readOnly: R,
|
|
23
26
|
icon: c,
|
|
@@ -31,28 +34,28 @@ const ye = ue((m, G) => {
|
|
|
31
34
|
onChangeEvent: y,
|
|
32
35
|
onKeyUp: X,
|
|
33
36
|
onKeyDown: Y,
|
|
34
|
-
onKeyPress:
|
|
37
|
+
onKeyPress: _e,
|
|
35
38
|
defaultValue: Z,
|
|
36
|
-
value:
|
|
39
|
+
value: k,
|
|
37
40
|
onFocus: T,
|
|
38
|
-
onBlur:
|
|
41
|
+
onBlur: z,
|
|
39
42
|
onClick: ee,
|
|
40
43
|
helper: r,
|
|
41
|
-
input:
|
|
42
|
-
name:
|
|
44
|
+
input: S,
|
|
45
|
+
name: V,
|
|
43
46
|
isTextArea: v,
|
|
44
47
|
...re
|
|
45
|
-
} = J(
|
|
48
|
+
} = J(f) || {}, { getLabel: $ } = be(), m = t.useRef(null), L = t.useRef(null), [E, H] = t.useState(k ?? Z ?? ""), _ = t.useMemo(() => {
|
|
46
49
|
var e;
|
|
47
50
|
if (r)
|
|
48
51
|
return Array.isArray(r) ? ((e = r[0]) == null ? void 0 : e.id) ?? `${d}-helper` : r.id ?? `${d}-helper`;
|
|
49
|
-
}, [r, d]), C = t.useMemo(() =>
|
|
52
|
+
}, [r, d]), C = t.useMemo(() => k ?? E, [k, E]), A = P && C;
|
|
50
53
|
t.useImperativeHandle(G, () => ({
|
|
51
54
|
get input() {
|
|
52
|
-
return
|
|
55
|
+
return m.current;
|
|
53
56
|
},
|
|
54
57
|
get inner() {
|
|
55
|
-
return
|
|
58
|
+
return L.current;
|
|
56
59
|
}
|
|
57
60
|
}));
|
|
58
61
|
const I = t.useMemo(() => Array.isArray(r) ? u || r.some((e) => e.type === "error") : u || (r == null ? void 0 : r.type) === "error", [u, r]), te = t.useMemo(() => !r || Array.isArray(r) && r.length === 0 ? !1 : Array.isArray(r) ? !u && r.every((e) => e.type === "valid") : !u && r.type === "valid", [u, r]), ae = s === "large" ? "default" : s, K = t.useCallback(
|
|
@@ -90,61 +93,61 @@ const ye = ue((m, G) => {
|
|
|
90
93
|
[v]
|
|
91
94
|
), ie = t.useMemo(() => {
|
|
92
95
|
const e = {
|
|
93
|
-
|
|
96
|
+
...S,
|
|
94
97
|
id: d,
|
|
95
|
-
name:
|
|
96
|
-
...
|
|
98
|
+
name: V,
|
|
99
|
+
...h ? { "aria-label": N } : {},
|
|
97
100
|
"aria-describedby": _,
|
|
98
101
|
"aria-disabled": i || void 0,
|
|
99
102
|
className: p(a["tedi-textfield__input"], B, {
|
|
100
103
|
[a["tedi-textfield__input--hidden-arrows"]]: F
|
|
101
104
|
}),
|
|
102
105
|
disabled: i,
|
|
103
|
-
required:
|
|
106
|
+
required: g,
|
|
104
107
|
"aria-invalid": I || void 0,
|
|
105
108
|
placeholder: M,
|
|
106
109
|
readOnly: R,
|
|
107
110
|
onChange: W,
|
|
108
111
|
value: C,
|
|
109
|
-
onBlur:
|
|
112
|
+
onBlur: z,
|
|
110
113
|
onFocus: T
|
|
111
114
|
};
|
|
112
|
-
return q(
|
|
115
|
+
return q(f, m) ? /* @__PURE__ */ n("textarea", { ...e, ref: m }) : D(f, m) ? /* @__PURE__ */ n("input", { ...e, ref: m }) : null;
|
|
113
116
|
}, [
|
|
114
|
-
|
|
117
|
+
S,
|
|
115
118
|
d,
|
|
116
|
-
|
|
117
|
-
|
|
119
|
+
V,
|
|
120
|
+
h,
|
|
118
121
|
N,
|
|
119
122
|
_,
|
|
120
123
|
i,
|
|
121
124
|
B,
|
|
122
125
|
F,
|
|
123
|
-
|
|
126
|
+
g,
|
|
124
127
|
I,
|
|
125
128
|
M,
|
|
126
129
|
R,
|
|
127
130
|
W,
|
|
128
131
|
C,
|
|
129
|
-
|
|
132
|
+
z,
|
|
130
133
|
T,
|
|
131
134
|
q,
|
|
132
|
-
|
|
135
|
+
f,
|
|
133
136
|
D
|
|
134
137
|
]), O = t.useMemo(() => {
|
|
135
138
|
const e = {
|
|
136
|
-
|
|
139
|
+
iconSize: ye[s === "large" ? "large" : "default"],
|
|
137
140
|
onClick: i ? () => {
|
|
138
141
|
} : j,
|
|
139
142
|
disabled: i,
|
|
140
143
|
"aria-disabled": i || void 0,
|
|
141
|
-
title: `${
|
|
144
|
+
title: `${$("clear")}`,
|
|
142
145
|
className: p(a["tedi-textfield__clear-button"])
|
|
143
146
|
};
|
|
144
|
-
return /* @__PURE__ */ n(
|
|
145
|
-
}, [j, i,
|
|
147
|
+
return /* @__PURE__ */ n(fe, { ...e });
|
|
148
|
+
}, [j, i, $, s]), le = t.useMemo(() => /* @__PURE__ */ w("div", { className: a["tedi-textfield__right-area"], children: [
|
|
146
149
|
A && O,
|
|
147
|
-
A && c ? /* @__PURE__ */ n(
|
|
150
|
+
A && c ? /* @__PURE__ */ n(me, { color: "primary", axis: "vertical", className: a["tedi-textfield__separator"] }) : null,
|
|
148
151
|
c && K(c)
|
|
149
152
|
] }), [K, c, O, A]), ne = p(
|
|
150
153
|
a["tedi-textfield"],
|
|
@@ -156,7 +159,7 @@ const ye = ue((m, G) => {
|
|
|
156
159
|
Q
|
|
157
160
|
), se = () => !r || Array.isArray(r) && r.length === 0 ? null : /* @__PURE__ */ n("div", { className: a["tedi-textfield__feedback-wrapper"], children: Array.isArray(r) ? r.map((e, l) => /* @__PURE__ */ n(U, { ...e, id: `${_}-${l}` }, l)) : /* @__PURE__ */ n(U, { ...r, id: _ }) });
|
|
158
161
|
return /* @__PURE__ */ w("div", { "data-name": "textfield", ...re, className: ne, children: [
|
|
159
|
-
/* @__PURE__ */ n(pe, { id: d, label: N, required:
|
|
162
|
+
/* @__PURE__ */ n(pe, { id: d, label: N, required: g, hideLabel: h, size: ae }),
|
|
160
163
|
/* @__PURE__ */ w(
|
|
161
164
|
"div",
|
|
162
165
|
{
|
|
@@ -165,7 +168,7 @@ const ye = ue((m, G) => {
|
|
|
165
168
|
onKeyUp: X,
|
|
166
169
|
onClick: ee,
|
|
167
170
|
tabIndex: i ? -1 : 0,
|
|
168
|
-
ref:
|
|
171
|
+
ref: L,
|
|
169
172
|
children: [
|
|
170
173
|
ie,
|
|
171
174
|
P || c ? le : null
|
|
@@ -175,8 +178,8 @@ const ye = ue((m, G) => {
|
|
|
175
178
|
se()
|
|
176
179
|
] });
|
|
177
180
|
});
|
|
178
|
-
|
|
181
|
+
ve.displayName = "TextField";
|
|
179
182
|
export {
|
|
180
|
-
|
|
181
|
-
|
|
183
|
+
ve as TextField,
|
|
184
|
+
ve as default
|
|
182
185
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("react/jsx-runtime"),S=require("../../../../../external/classnames/index.cjs.js"),w=require("react"),C=require("../../base/icon/icon.cjs.js"),M=require("../../base/typography/heading/heading.cjs.js"),N=require("../../buttons/closing-button/closing-button.cjs.js"),t=require("./alert.module.scss.cjs.js"),P=require("../../../helpers/hooks/use-is-mounted.cjs.js"),k=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),y=require("../../layout/vertical-spacing/vertical-spacing.cjs.js"),z=require("../../layout/grid/row.cjs.js"),f=require("../../layout/grid/col.cjs.js"),p=a=>{const{getCurrentBreakpointProps:g}=k.useBreakpointProps(a.defaultServerBreakpoint),{children:s,role:i="alert",title:r,className:m,type:l="info",icon:o,onClose:c,isGlobal:h=!1,noSideBorders:j=!1,titleElement:q="h3",...x}=g(a),v=S.default(t.default["tedi-alert"],t.default[`tedi-alert--${l}`],{[t.default["tedi-alert--global"]]:h,[t.default["tedi-alert--no-side-borders"]]:j},m),_=P.useIsMounted(),b=n=>{const u={size:18},I=typeof n=="string"?{...u,name:n}:{...u,...n};return e.jsx(C.Icon,{...I,className:t.default["tedi-alert__icon"]})},B=i==="alert"?"assertive":i==="status"?"polite":"off",d=w.useId();return _?e.jsx("div",{role:i,"data-name":"alert","aria-label":`${l} alert`,"aria-live":B,"aria-labelledby":r?d:void 0,...x,className:v,children:e.jsxs(y.VerticalSpacing,{size:.25,children:[e.jsxs(z.Row,{gutterX:2,alignItems:r?"center":"start",children:[e.jsxs(f.Col,{grow:1,className:t.default["tedi-alert__content"],children:[o&&b(o),e.jsx("div",{className:"tedi-alert__content-wrapper",children:r?e.jsx(M.Heading,{element:q,id:d,modifiers:["h5"],children:r}):s})]}),c&&e.jsx(f.Col,{width:"auto",children:e.jsx(N.ClosingButton,{onClick:c,iconSize:18})})]}),r&&s&&e.jsx("div",{className:"tedi-alert__content-wrapper",children:s})]})}):null};exports.Alert=p;exports.default=p;
|
|
@@ -2,18 +2,18 @@ import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
|
2
2
|
import k from "../../../../../external/classnames/index.es.js";
|
|
3
3
|
import y from "react";
|
|
4
4
|
import { Icon as P } from "../../base/icon/icon.es.js";
|
|
5
|
-
import { Heading as
|
|
6
|
-
import { ClosingButton as
|
|
5
|
+
import { Heading as S } from "../../base/typography/heading/heading.es.js";
|
|
6
|
+
import { ClosingButton as x } from "../../buttons/closing-button/closing-button.es.js";
|
|
7
7
|
import t from "./alert.module.scss.es.js";
|
|
8
|
-
import { useIsMounted as
|
|
9
|
-
import { useBreakpointProps as
|
|
10
|
-
import { VerticalSpacing as
|
|
8
|
+
import { useIsMounted as z } from "../../../helpers/hooks/use-is-mounted.es.js";
|
|
9
|
+
import { useBreakpointProps as M } from "../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
10
|
+
import { VerticalSpacing as j } from "../../layout/vertical-spacing/vertical-spacing.es.js";
|
|
11
11
|
import { Row as E } from "../../layout/grid/row.es.js";
|
|
12
12
|
import { Col as f } from "../../layout/grid/col.es.js";
|
|
13
13
|
const K = (s) => {
|
|
14
|
-
const { getCurrentBreakpointProps: u } =
|
|
14
|
+
const { getCurrentBreakpointProps: u } = M(s.defaultServerBreakpoint), {
|
|
15
15
|
children: o,
|
|
16
|
-
role:
|
|
16
|
+
role: i = "alert",
|
|
17
17
|
title: r,
|
|
18
18
|
className: h,
|
|
19
19
|
type: n = "info",
|
|
@@ -31,27 +31,27 @@ const K = (s) => {
|
|
|
31
31
|
[t["tedi-alert--no-side-borders"]]: _
|
|
32
32
|
},
|
|
33
33
|
h
|
|
34
|
-
), b =
|
|
35
|
-
const p = { size: 18 }, C = typeof
|
|
34
|
+
), b = z(), B = (a) => {
|
|
35
|
+
const p = { size: 18 }, C = typeof a == "string" ? { ...p, name: a } : { ...p, ...a };
|
|
36
36
|
return /* @__PURE__ */ e(P, { ...C, className: t["tedi-alert__icon"] });
|
|
37
|
-
}, w =
|
|
37
|
+
}, w = i === "alert" ? "assertive" : i === "status" ? "polite" : "off", m = y.useId();
|
|
38
38
|
return b ? /* @__PURE__ */ e(
|
|
39
39
|
"div",
|
|
40
40
|
{
|
|
41
|
-
role:
|
|
41
|
+
role: i,
|
|
42
42
|
"data-name": "alert",
|
|
43
43
|
"aria-label": `${n} alert`,
|
|
44
44
|
"aria-live": w,
|
|
45
45
|
"aria-labelledby": r ? m : void 0,
|
|
46
46
|
...I,
|
|
47
47
|
className: N,
|
|
48
|
-
children: /* @__PURE__ */ l(
|
|
48
|
+
children: /* @__PURE__ */ l(j, { size: 0.25, children: [
|
|
49
49
|
/* @__PURE__ */ l(E, { gutterX: 2, alignItems: r ? "center" : "start", children: [
|
|
50
50
|
/* @__PURE__ */ l(f, { grow: 1, className: t["tedi-alert__content"], children: [
|
|
51
51
|
d && B(d),
|
|
52
|
-
/* @__PURE__ */ e("div", { className: "tedi-alert__content-wrapper", children: r ? /* @__PURE__ */ e(
|
|
52
|
+
/* @__PURE__ */ e("div", { className: "tedi-alert__content-wrapper", children: r ? /* @__PURE__ */ e(S, { element: v, id: m, modifiers: ["h5"], children: r }) : o })
|
|
53
53
|
] }),
|
|
54
|
-
c && /* @__PURE__ */ e(f, { width: "auto", children: /* @__PURE__ */ e(
|
|
54
|
+
c && /* @__PURE__ */ e(f, { width: "auto", children: /* @__PURE__ */ e(x, { onClick: c, iconSize: 18 }) })
|
|
55
55
|
] }),
|
|
56
56
|
r && o && /* @__PURE__ */ e("div", { className: "tedi-alert__content-wrapper", children: o })
|
|
57
57
|
] })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("../../../../../external/classnames/index.cjs.js"),i=require("react"),C=require("../../base/typography/text/text.cjs.js"),q=require("../../buttons/closing-button/closing-button.cjs.js"),y=require("../overlay/overlay.cjs.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),s=require("../../../../../external/classnames/index.cjs.js"),i=require("react"),C=require("../../base/typography/text/text.cjs.js"),q=require("../../buttons/closing-button/closing-button.cjs.js"),y=require("../overlay/overlay.cjs.js"),j=require("../overlay/overlay-content.cjs.js"),o=require("./popover.module.scss.cjs.js"),_=f=>{const{children:r,width:l="small",className:x,title:e,titleProps:d={element:"h4"},close:a,closeProps:n={size:"default"}}=f,{onOpenChange:h}=i.useContext(y.OverlayContext),c=i.useId(),u=!!r,p=i.useId();return t.jsxs(j.OverlayContent,{classNames:{content:s.default(o.default["tedi-popover"],{[o.default[`tedi-popover--${l}`]]:l},x),arrow:o.default["tedi-popover__arrow"]},labelledBy:e?c:void 0,describedBy:u?p:void 0,children:[(e||a)&&t.jsxs("div",{className:s.default(o.default["tedi-popover__header"],{[o.default["tedi-popover__header--no-title"]]:!e}),children:[e&&t.jsx(C.Text,{...d,id:c,className:s.default("align-self-center",d.className),children:e}),a&&t.jsx(q.ClosingButton,{...n,onClick:m=>{var v;h(!1),(v=n.onClick)==null||v.call(n,m)}})]}),u?t.jsx("div",{id:p,children:r}):r]})};exports.PopoverContent=_;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsxs as v, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import s from "../../../../../external/classnames/index.es.js";
|
|
3
3
|
import { useContext as _, useId as f } from "react";
|
|
4
|
-
import { Text as
|
|
5
|
-
import { ClosingButton as
|
|
6
|
-
import { OverlayContext as
|
|
7
|
-
import { OverlayContent as
|
|
4
|
+
import { Text as u } from "../../base/typography/text/text.es.js";
|
|
5
|
+
import { ClosingButton as y } from "../../buttons/closing-button/closing-button.es.js";
|
|
6
|
+
import { OverlayContext as B } from "../overlay/overlay.es.js";
|
|
7
|
+
import { OverlayContent as g } from "../overlay/overlay-content.es.js";
|
|
8
8
|
import o from "./popover.module.scss.es.js";
|
|
9
9
|
const P = (h) => {
|
|
10
10
|
const {
|
|
@@ -14,10 +14,10 @@ const P = (h) => {
|
|
|
14
14
|
title: e,
|
|
15
15
|
titleProps: l = { element: "h4" },
|
|
16
16
|
close: a,
|
|
17
|
-
closeProps: t = { size: "
|
|
18
|
-
} = h, { onOpenChange: x } = _(
|
|
17
|
+
closeProps: t = { size: "default" }
|
|
18
|
+
} = h, { onOpenChange: x } = _(B), d = f(), m = !!r, c = f();
|
|
19
19
|
return /* @__PURE__ */ v(
|
|
20
|
-
|
|
20
|
+
g,
|
|
21
21
|
{
|
|
22
22
|
classNames: {
|
|
23
23
|
content: s(o["tedi-popover"], { [o[`tedi-popover--${n}`]]: n }, C),
|
|
@@ -27,9 +27,9 @@ const P = (h) => {
|
|
|
27
27
|
describedBy: m ? c : void 0,
|
|
28
28
|
children: [
|
|
29
29
|
(e || a) && /* @__PURE__ */ v("div", { className: s(o["tedi-popover__header"], { [o["tedi-popover__header--no-title"]]: !e }), children: [
|
|
30
|
-
e && /* @__PURE__ */ i(
|
|
30
|
+
e && /* @__PURE__ */ i(u, { ...l, id: d, className: s("align-self-center", l.className), children: e }),
|
|
31
31
|
a && /* @__PURE__ */ i(
|
|
32
|
-
|
|
32
|
+
y,
|
|
33
33
|
{
|
|
34
34
|
...t,
|
|
35
35
|
onClick: (N) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("../../../../../external/classnames/index.cjs.js"),g=require("../../base/icon/icon.cjs.js"),p=require("../../buttons/closing-button/closing-button.cjs.js"),f=require("../../loaders/spinner/spinner.cjs.js"),e=require("./tag.module.scss.cjs.js"),_=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),m=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),u=require("../../../../../external/classnames/index.cjs.js"),g=require("../../base/icon/icon.cjs.js"),p=require("../../buttons/closing-button/closing-button.cjs.js"),f=require("../../loaders/spinner/spinner.cjs.js"),e=require("./tag.module.scss.cjs.js"),_=require("../../../helpers/hooks/use-breakpoint-props.cjs.js"),m=s=>{const{getCurrentBreakpointProps:o}=_.useBreakpointProps(s.defaultServerBreakpoint),{children:n,className:l,onClose:a,isLoading:r=!1,color:i="primary",...c}=o(s),d=u.default(e.default["tedi-tag"],i&&e.default[`tedi-tag--color-${i}`],a&&!r&&e.default["tedi-tag__close"],l);return t.jsxs("div",{className:d,role:"status","aria-live":r?"polite":void 0,...c,children:[i==="danger"&&t.jsx("div",{className:e.default["tedi-tag__icon-wrapper"],children:t.jsx(g.Icon,{name:"info",color:"danger",size:16,className:e.default["tedi-tag__icon--error"]})}),t.jsx("div",{className:e.default["tedi-tag__content"],children:n}),r&&!a&&t.jsx("div",{className:e.default["tedi-tag__icon-wrapper"],children:t.jsx(f.Spinner,{className:e.default["tedi-tag__loader"]})}),!r&&a&&t.jsx(p.ClosingButton,{iconSize:18,onClick:a})]})};exports.Tag=m;
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { jsxs as d, jsx as
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import p from "../../../../../external/classnames/index.es.js";
|
|
3
3
|
import { Icon as g } from "../../base/icon/icon.es.js";
|
|
4
4
|
import { ClosingButton as _ } from "../../buttons/closing-button/closing-button.es.js";
|
|
5
5
|
import { Spinner as f } from "../../loaders/spinner/spinner.es.js";
|
|
6
6
|
import e from "./tag.module.scss.es.js";
|
|
7
7
|
import { useBreakpointProps as N } from "../../../helpers/hooks/use-breakpoint-props.es.js";
|
|
8
|
-
const
|
|
9
|
-
const { getCurrentBreakpointProps: s } = N(
|
|
8
|
+
const S = (a) => {
|
|
9
|
+
const { getCurrentBreakpointProps: s } = N(a.defaultServerBreakpoint), {
|
|
10
10
|
children: n,
|
|
11
11
|
className: c,
|
|
12
|
-
onClose:
|
|
12
|
+
onClose: r,
|
|
13
13
|
isLoading: t = !1,
|
|
14
|
-
color:
|
|
14
|
+
color: i = "primary",
|
|
15
15
|
...l
|
|
16
|
-
} = s(
|
|
16
|
+
} = s(a), m = p(
|
|
17
17
|
e["tedi-tag"],
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
i && e[`tedi-tag--color-${i}`],
|
|
19
|
+
r && !t && e["tedi-tag__close"],
|
|
20
20
|
c
|
|
21
21
|
);
|
|
22
22
|
return /* @__PURE__ */ d("div", { className: m, role: "status", "aria-live": t ? "polite" : void 0, ...l, children: [
|
|
23
|
-
|
|
24
|
-
/* @__PURE__ */
|
|
25
|
-
t && !
|
|
26
|
-
!t &&
|
|
23
|
+
i === "danger" && /* @__PURE__ */ o("div", { className: e["tedi-tag__icon-wrapper"], children: /* @__PURE__ */ o(g, { name: "info", color: "danger", size: 16, className: e["tedi-tag__icon--error"] }) }),
|
|
24
|
+
/* @__PURE__ */ o("div", { className: e["tedi-tag__content"], children: n }),
|
|
25
|
+
t && !r && /* @__PURE__ */ o("div", { className: e["tedi-tag__icon-wrapper"], children: /* @__PURE__ */ o(f, { className: e["tedi-tag__loader"] }) }),
|
|
26
|
+
!t && r && /* @__PURE__ */ o(_, { iconSize: 18, onClick: r })
|
|
27
27
|
] });
|
|
28
28
|
};
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
S as Tag
|
|
31
31
|
};
|