@tedi-design-system/react 18.1.0-rc.10 → 18.1.0-rc.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundle-stats.html +1 -1
- package/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/index.css +1 -1
- package/package.json +1 -1
- package/src/tedi/components/form/search/search.cjs.js +1 -1
- package/src/tedi/components/form/search/search.es.js +55 -35
- package/src/tedi/components/form/search/search.module.scss.cjs.js +1 -1
- package/src/tedi/components/form/search/search.module.scss.es.js +7 -3
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("react/jsx-runtime"),t=require("../../../../../external/classnames/index.cjs.js"),w=require("react"),j=require("../../buttons/button/button.cjs.js"),L=require("../textfield/textfield.cjs.js"),a=require("./search.module.scss.cjs.js"),k=require("../../../providers/label-provider/use-labels.cjs.js"),u=w.forwardRef(({placeholder:d,isClearable:o=!0,searchIcon:i="search",onSearch:s,onChange:f,button:e,ariaLabel:_,className:h,input:m,...l},p)=>{const{getLabel:r}=k.useLabels(),b=v=>{v.key==="Enter"&&(s==null||s(l.value))},x=()=>{s==null||s(l.value)},n=typeof i=="string"?{name:i}:i,y={color:"secondary",...n,className:t.default(n.className,l.disabled&&a.default["tedi-search__icon--disabled"])},q={...l,ref:p,inputClassName:t.default(a.default["tedi-search__input"],e&&a.default["tedi-search__input--has-button"],h),placeholder:d,isClearable:o,onKeyDown:b,onChange:f,input:{...m,role:"searchbox"},...e?{}:{icon:y}},N=d||r("search"),g=_??N;return c.jsxs("div",{className:t.default(a.default["tedi-search__wrapper"],l.size==="small"&&a.default["tedi-search__wrapper--small"],l.size==="large"&&a.default["tedi-search__wrapper--large"]),role:"search","aria-label":g,children:[c.jsx(L.TextField,{...q}),e&&c.jsx(j.Button,{...e,onClick:x,className:t.default(a.default["tedi-search__button"],!e.children&&a.default["tedi-search__button--icon-only"],e.className),"aria-label":e.children?void 0:r("search"),children:e.children??r("search")})]})});u.displayName="Search";exports.Search=u;
|
|
@@ -1,51 +1,71 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as g, jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import i from "../../../../../external/classnames/index.es.js";
|
|
3
3
|
import { forwardRef as L } from "react";
|
|
4
|
-
import { Button as
|
|
5
|
-
import { TextField as
|
|
4
|
+
import { Button as k } from "../../buttons/button/button.es.js";
|
|
5
|
+
import { TextField as B } from "../textfield/textfield.es.js";
|
|
6
6
|
import a from "./search.module.scss.es.js";
|
|
7
7
|
import { useLabels as C } from "../../../providers/label-provider/use-labels.es.js";
|
|
8
8
|
const j = L(
|
|
9
9
|
({
|
|
10
|
-
placeholder:
|
|
11
|
-
isClearable:
|
|
12
|
-
searchIcon:
|
|
10
|
+
placeholder: o,
|
|
11
|
+
isClearable: m = !0,
|
|
12
|
+
searchIcon: l = "search",
|
|
13
13
|
onSearch: s,
|
|
14
|
-
onChange:
|
|
14
|
+
onChange: n,
|
|
15
15
|
button: e,
|
|
16
16
|
ariaLabel: p,
|
|
17
|
-
className:
|
|
18
|
-
input:
|
|
17
|
+
className: _,
|
|
18
|
+
input: h,
|
|
19
19
|
...r
|
|
20
|
-
},
|
|
21
|
-
const { getLabel:
|
|
20
|
+
}, f) => {
|
|
21
|
+
const { getLabel: c } = C(), u = (v) => {
|
|
22
22
|
v.key === "Enter" && (s == null || s(r.value));
|
|
23
|
-
},
|
|
23
|
+
}, y = () => {
|
|
24
24
|
s == null || s(r.value);
|
|
25
|
-
},
|
|
25
|
+
}, t = typeof l == "string" ? { name: l } : l, N = {
|
|
26
|
+
color: "secondary",
|
|
27
|
+
...t,
|
|
28
|
+
className: i(t.className, r.disabled && a["tedi-search__icon--disabled"])
|
|
29
|
+
}, w = {
|
|
26
30
|
...r,
|
|
27
|
-
ref:
|
|
28
|
-
inputClassName:
|
|
29
|
-
placeholder:
|
|
30
|
-
isClearable:
|
|
31
|
+
ref: f,
|
|
32
|
+
inputClassName: i(a["tedi-search__input"], e && a["tedi-search__input--has-button"], _),
|
|
33
|
+
placeholder: o,
|
|
34
|
+
isClearable: m,
|
|
31
35
|
onKeyDown: u,
|
|
32
|
-
onChange:
|
|
33
|
-
input: { ...
|
|
34
|
-
...e ? {} : { icon:
|
|
35
|
-
},
|
|
36
|
-
return /* @__PURE__ */
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
36
|
+
onChange: n,
|
|
37
|
+
input: { ...h, role: "searchbox" },
|
|
38
|
+
...e ? {} : { icon: N }
|
|
39
|
+
}, x = o || c("search"), b = p ?? x;
|
|
40
|
+
return /* @__PURE__ */ g(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
className: i(
|
|
44
|
+
a["tedi-search__wrapper"],
|
|
45
|
+
r.size === "small" && a["tedi-search__wrapper--small"],
|
|
46
|
+
r.size === "large" && a["tedi-search__wrapper--large"]
|
|
47
|
+
),
|
|
48
|
+
role: "search",
|
|
49
|
+
"aria-label": b,
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ d(B, { ...w }),
|
|
52
|
+
e && /* @__PURE__ */ d(
|
|
53
|
+
k,
|
|
54
|
+
{
|
|
55
|
+
...e,
|
|
56
|
+
onClick: y,
|
|
57
|
+
className: i(
|
|
58
|
+
a["tedi-search__button"],
|
|
59
|
+
!e.children && a["tedi-search__button--icon-only"],
|
|
60
|
+
e.className
|
|
61
|
+
),
|
|
62
|
+
"aria-label": e.children ? void 0 : c("search"),
|
|
63
|
+
children: e.children ?? c("search")
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
);
|
|
49
69
|
}
|
|
50
70
|
);
|
|
51
71
|
j.displayName = "Search";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-search__wrapper":"tedi-search__wrapper-92d6f11f","tedi-search__input":"tedi-search__input-94d53b76","tedi-search__input--has-button":"tedi-search__input--has-button-d8e073e7","tedi-search__button":"tedi-search__button-cbb4df17"};exports.default=e;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e={"tedi-search__wrapper":"tedi-search__wrapper-92d6f11f","tedi-search__input":"tedi-search__input-94d53b76","tedi-search__input--has-button":"tedi-search__input--has-button-d8e073e7","tedi-search__icon--disabled":"tedi-search__icon--disabled-2b492592","tedi-search__button":"tedi-search__button-cbb4df17","tedi-search__wrapper--small":"tedi-search__wrapper--small-7c104c6a","tedi-search__wrapper--large":"tedi-search__wrapper--large-b59e60d7","tedi-search__button--icon-only":"tedi-search__button--icon-only-cf897af5"};exports.default=e;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
const
|
|
1
|
+
const e = {
|
|
2
2
|
"tedi-search__wrapper": "tedi-search__wrapper-92d6f11f",
|
|
3
3
|
"tedi-search__input": "tedi-search__input-94d53b76",
|
|
4
4
|
"tedi-search__input--has-button": "tedi-search__input--has-button-d8e073e7",
|
|
5
|
-
"tedi-
|
|
5
|
+
"tedi-search__icon--disabled": "tedi-search__icon--disabled-2b492592",
|
|
6
|
+
"tedi-search__button": "tedi-search__button-cbb4df17",
|
|
7
|
+
"tedi-search__wrapper--small": "tedi-search__wrapper--small-7c104c6a",
|
|
8
|
+
"tedi-search__wrapper--large": "tedi-search__wrapper--large-b59e60d7",
|
|
9
|
+
"tedi-search__button--icon-only": "tedi-search__button--icon-only-cf897af5"
|
|
6
10
|
};
|
|
7
11
|
export {
|
|
8
|
-
|
|
12
|
+
e as default
|
|
9
13
|
};
|