@ilo-org/react 0.28.1 → 0.28.3
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/lib/cjs/_store/Button-chunk-OmVJkQqc.js +1 -0
- package/lib/cjs/_store/{Button-entry-D3W25SBk.js → Button-entry-bZ-SddDM.js} +1 -1
- package/lib/cjs/_store/{Callout-chunk-BdeAvp9z.js → Callout-chunk-XF2yUV-r.js} +1 -1
- package/lib/cjs/_store/{Callout-entry-DfrEmZB7.js → Callout-entry-_4WBT7Vv.js} +1 -1
- package/lib/cjs/_store/{CardGroup-chunk-HDoqytKS.js → CardGroup-chunk-Cn8ewunq.js} +1 -1
- package/lib/cjs/_store/{Cards-entry-DZ1Jw3ZI.js → Cards-entry-I79kpHUb.js} +1 -1
- package/lib/cjs/_store/{Footer-chunk-DvVEyN5x.js → Footer-chunk-Dt1p9vMD.js} +1 -1
- package/lib/cjs/_store/{Footer-entry-lrTkrnhr.js → Footer-entry-l-8RglKj.js} +1 -1
- package/lib/cjs/_store/{MainNav-chunk-C9rtuWNB.js → MainNav-chunk-DIQJwoJV.js} +1 -1
- package/lib/cjs/_store/{Nav-entry-QU2bhLkT.js → Nav-entry-X7AzXGF2.js} +1 -1
- package/lib/cjs/_store/{Notification-chunk-CEm56fOA.js → Notification-chunk-ZNuM-7Xk.js} +1 -1
- package/lib/cjs/_store/{Notification-entry-CHMbRdAy.js → Notification-entry-D2OmZYbJ.js} +1 -1
- package/lib/cjs/_store/SearchField-chunk-DtJTqVM9.js +1 -0
- package/lib/cjs/_store/{SearchField-entry-iEDyX5PR.js → SearchField-entry-Dx4K-UmO.js} +1 -1
- package/lib/cjs/_store/{Video-chunk-CEQmBL6F.js → Video-chunk-D9hf1AKM.js} +14 -14
- package/lib/cjs/_store/{Video-entry-DEabve_J.js → Video-entry-CuwN0TBI.js} +1 -1
- package/lib/cjs/_store/{components-entry-DH0DyJir.js → components-entry-BybNCccy.js} +1 -1
- package/lib/cjs/index.js +1 -1
- package/lib/esm/_store/Button-chunk-BDRDVT-k.js +70 -0
- package/lib/esm/_store/Button-entry-BMRaXX6Z.js +4 -0
- package/lib/esm/_store/{Callout-chunk-Dgxxalpd.js → Callout-chunk-Cqttz2p6.js} +1 -1
- package/lib/esm/_store/Callout-entry-C4leVKrX.js +4 -0
- package/lib/esm/_store/{CardGroup-chunk-DOfpZMbU.js → CardGroup-chunk-BC6J6wy_.js} +1 -1
- package/lib/esm/_store/{Cards-entry-DzEZMOcE.js → Cards-entry-CKWIuymB.js} +1 -1
- package/lib/esm/_store/{Footer-chunk-TA0qQlaw.js → Footer-chunk-BbN845T6.js} +1 -1
- package/lib/esm/_store/Footer-entry-70ZADTJC.js +4 -0
- package/lib/esm/_store/{MainNav-chunk-CmtN7aWA.js → MainNav-chunk-quYHcIUb.js} +1 -1
- package/lib/esm/_store/Nav-entry-CJPTM5sS.js +5 -0
- package/lib/esm/_store/{Notification-chunk-CYe5VThf.js → Notification-chunk-Dcs9w_ap.js} +1 -1
- package/lib/esm/_store/Notification-entry-DxWQuGLy.js +4 -0
- package/lib/esm/_store/SearchField-chunk-CLWIJ2Hh.js +69 -0
- package/lib/esm/_store/SearchField-entry-Diz7Qpbv.js +4 -0
- package/lib/esm/_store/{Video-chunk-q086hHmd.js → Video-chunk-BIkVhXHb.js} +837 -827
- package/lib/esm/_store/Video-entry-CFYEUzvM.js +4 -0
- package/lib/esm/_store/{components-entry-BLXacfCY.js → components-entry-BY0r4sij.js} +8 -8
- package/lib/esm/index.js +8 -8
- package/lib/types/components/SearchField/SearchField.props.d.ts +6 -0
- package/package.json +6 -6
- package/lib/cjs/_store/Button-chunk-DaJZujL8.js +0 -1
- package/lib/cjs/_store/SearchField-chunk-CJ99dGc4.js +0 -1
- package/lib/esm/_store/Button-chunk-CQQX91Rg.js +0 -64
- package/lib/esm/_store/Button-entry-BIEEKQv3.js +0 -4
- package/lib/esm/_store/Callout-entry-Bzgq2szx.js +0 -4
- package/lib/esm/_store/Footer-entry-BoeUqJ4r.js +0 -4
- package/lib/esm/_store/Nav-entry-Dx2uLUdE.js +0 -5
- package/lib/esm/_store/Notification-entry-0QG_RMHv.js +0 -4
- package/lib/esm/_store/SearchField-chunk-Ky0ihQH5.js +0 -68
- package/lib/esm/_store/SearchField-entry-CH96-gn7.js +0 -4
- package/lib/esm/_store/Video-entry-D22SrG1x.js +0 -4
|
@@ -6,16 +6,16 @@ import { I as i } from "./Image-chunk-Dls4dbsF.js";
|
|
|
6
6
|
import { L as n } from "./Loading-chunk-Dv4TiLe1.js";
|
|
7
7
|
import { L } from "./Radio-chunk-DE8dWK4c.js";
|
|
8
8
|
import { T } from "./Tag-chunk-DNiuZc2U.js";
|
|
9
|
-
import { B as c } from "./Button-chunk-
|
|
9
|
+
import { B as c } from "./Button-chunk-BDRDVT-k.js";
|
|
10
10
|
import { C as P } from "./ContextMenu-chunk-CX3zW2yD.js";
|
|
11
11
|
import { F as b } from "./Fieldset-chunk-CQKzjpXe.js";
|
|
12
12
|
import { G as k } from "./GlobalProvider-chunk-dOxjd-fn.js";
|
|
13
13
|
import { G as I } from "./GlobalCtx-chunk-CtSRDnk3.js";
|
|
14
14
|
import { L as D, T as G } from "./TextInput.args-chunk-RWwWDRZ4.js";
|
|
15
|
-
import { N as R } from "./Notification-chunk-
|
|
15
|
+
import { N as R } from "./Notification-chunk-Dcs9w_ap.js";
|
|
16
16
|
import { R as A } from "./ReadMore-chunk-Cv2A7uzo.js";
|
|
17
17
|
import { L as h } from "./Textarea-chunk-CshU7TIs.js";
|
|
18
|
-
import { C as E } from "./Callout-chunk-
|
|
18
|
+
import { C as E } from "./Callout-chunk-Cqttz2p6.js";
|
|
19
19
|
import { L as w } from "./FileUpload-chunk-CcPyoSNs.js";
|
|
20
20
|
import { H as U } from "./Heading-chunk-KETAd3FV.js";
|
|
21
21
|
import { L as q } from "./Link-chunk-DgmjE6xb.js";
|
|
@@ -28,21 +28,21 @@ import { H as ro } from "./Hero-chunk-8XPHDh4M.js";
|
|
|
28
28
|
import { H as eo } from "./HeroCard-chunk-DIoKqIvc.js";
|
|
29
29
|
import { L as so } from "./LinkList-chunk-ClC0P1yc.js";
|
|
30
30
|
import { P as xo } from "./Pagination-chunk-B0RsygyT.js";
|
|
31
|
-
import { S as fo } from "./SearchField-chunk-
|
|
32
|
-
import { V as no } from "./Video-chunk-
|
|
31
|
+
import { S as fo } from "./SearchField-chunk-CLWIJ2Hh.js";
|
|
32
|
+
import { V as no } from "./Video-chunk-BIkVhXHb.js";
|
|
33
33
|
import { L as Lo } from "./Dropdown-chunk-_Rqp45VG.js";
|
|
34
34
|
import { I as To } from "./Icon-chunk-DEroxoA_.js";
|
|
35
35
|
import { List as co } from "./List-entry-BX9gaFfD.js";
|
|
36
36
|
import { P as Po } from "./Profile-chunk-CK4F2KXo.js";
|
|
37
37
|
import { T as bo } from "./TableOfContents-chunk-G6Og9OQI.js";
|
|
38
|
-
import { F as ko } from "./Footer-chunk-
|
|
39
|
-
import { C as Io, b as Mo, D as Do, a as Go, F as No, M as Ro, P as vo, c as Ao, S as Bo, T as ho } from "./CardGroup-chunk-
|
|
38
|
+
import { F as ko } from "./Footer-chunk-BbN845T6.js";
|
|
39
|
+
import { C as Io, b as Mo, D as Do, a as Go, F as No, M as Ro, P as vo, c as Ao, S as Bo, T as ho } from "./CardGroup-chunk-BC6J6wy_.js";
|
|
40
40
|
import { B as Eo } from "./Breadcrumb-chunk-C5nxxjB6.js";
|
|
41
41
|
import { S as wo } from "./Status-chunk-CjagfPq5.js";
|
|
42
42
|
import { T as Uo } from "./Tabs-chunk-DrfQDZZS.js";
|
|
43
43
|
import { A as qo } from "./AudioPlayer-chunk-bXI6JAZ7.js";
|
|
44
44
|
import { L as Jo } from "./LanguageToggle-chunk-C51Ysq9D.js";
|
|
45
|
-
import { M as Qo, S as Wo } from "./MainNav-chunk-
|
|
45
|
+
import { M as Qo, S as Wo } from "./MainNav-chunk-quYHcIUb.js";
|
|
46
46
|
export {
|
|
47
47
|
a as Accordion,
|
|
48
48
|
qo as AudioPlayer,
|
package/lib/esm/index.js
CHANGED
|
@@ -6,16 +6,16 @@ import { I as i } from "./_store/Image-chunk-Dls4dbsF.js";
|
|
|
6
6
|
import { L as u } from "./_store/Loading-chunk-Dv4TiLe1.js";
|
|
7
7
|
import { L as l } from "./_store/Radio-chunk-DE8dWK4c.js";
|
|
8
8
|
import { T as L } from "./_store/Tag-chunk-DNiuZc2U.js";
|
|
9
|
-
import { B as c } from "./_store/Button-chunk-
|
|
9
|
+
import { B as c } from "./_store/Button-chunk-BDRDVT-k.js";
|
|
10
10
|
import { C as P } from "./_store/ContextMenu-chunk-CX3zW2yD.js";
|
|
11
11
|
import { F as b } from "./_store/Fieldset-chunk-CQKzjpXe.js";
|
|
12
12
|
import { G as k } from "./_store/GlobalProvider-chunk-dOxjd-fn.js";
|
|
13
13
|
import { G as H } from "./_store/GlobalCtx-chunk-CtSRDnk3.js";
|
|
14
14
|
import { L as M, T as v } from "./_store/TextInput.args-chunk-RWwWDRZ4.js";
|
|
15
|
-
import { N as D } from "./_store/Notification-chunk-
|
|
15
|
+
import { N as D } from "./_store/Notification-chunk-Dcs9w_ap.js";
|
|
16
16
|
import { R } from "./_store/ReadMore-chunk-Cv2A7uzo.js";
|
|
17
17
|
import { L as h } from "./_store/Textarea-chunk-CshU7TIs.js";
|
|
18
|
-
import { C as E } from "./_store/Callout-chunk-
|
|
18
|
+
import { C as E } from "./_store/Callout-chunk-Cqttz2p6.js";
|
|
19
19
|
import { L as V } from "./_store/FileUpload-chunk-CcPyoSNs.js";
|
|
20
20
|
import { H as U } from "./_store/Heading-chunk-KETAd3FV.js";
|
|
21
21
|
import { L as q } from "./_store/Link-chunk-DgmjE6xb.js";
|
|
@@ -28,21 +28,21 @@ import { H as ro } from "./_store/Hero-chunk-8XPHDh4M.js";
|
|
|
28
28
|
import { H as eo } from "./_store/HeroCard-chunk-DIoKqIvc.js";
|
|
29
29
|
import { L as so } from "./_store/LinkList-chunk-ClC0P1yc.js";
|
|
30
30
|
import { P as xo } from "./_store/Pagination-chunk-B0RsygyT.js";
|
|
31
|
-
import { S as fo } from "./_store/SearchField-chunk-
|
|
32
|
-
import { V as uo } from "./_store/Video-chunk-
|
|
31
|
+
import { S as fo } from "./_store/SearchField-chunk-CLWIJ2Hh.js";
|
|
32
|
+
import { V as uo } from "./_store/Video-chunk-BIkVhXHb.js";
|
|
33
33
|
import { L as lo } from "./_store/Dropdown-chunk-_Rqp45VG.js";
|
|
34
34
|
import { I as Lo } from "./_store/Icon-chunk-DEroxoA_.js";
|
|
35
35
|
import { List as co } from "./_store/List-entry-BX9gaFfD.js";
|
|
36
36
|
import { P as Po } from "./_store/Profile-chunk-CK4F2KXo.js";
|
|
37
37
|
import { T as bo } from "./_store/TableOfContents-chunk-G6Og9OQI.js";
|
|
38
|
-
import { F as ko } from "./_store/Footer-chunk-
|
|
39
|
-
import { C as Ho, b as Io, D as Mo, a as vo, F as Bo, M as Do, P as No, c as Ro, S as Ao, T as ho } from "./_store/CardGroup-chunk-
|
|
38
|
+
import { F as ko } from "./_store/Footer-chunk-BbN845T6.js";
|
|
39
|
+
import { C as Ho, b as Io, D as Mo, a as vo, F as Bo, M as Do, P as No, c as Ro, S as Ao, T as ho } from "./_store/CardGroup-chunk-BC6J6wy_.js";
|
|
40
40
|
import { B as Eo } from "./_store/Breadcrumb-chunk-C5nxxjB6.js";
|
|
41
41
|
import { S as Vo } from "./_store/Status-chunk-CjagfPq5.js";
|
|
42
42
|
import { T as Uo } from "./_store/Tabs-chunk-DrfQDZZS.js";
|
|
43
43
|
import { A as qo } from "./_store/AudioPlayer-chunk-bXI6JAZ7.js";
|
|
44
44
|
import { L as Jo } from "./_store/LanguageToggle-chunk-C51Ysq9D.js";
|
|
45
|
-
import { M as Qo, S as Wo } from "./_store/MainNav-chunk-
|
|
45
|
+
import { M as Qo, S as Wo } from "./_store/MainNav-chunk-quYHcIUb.js";
|
|
46
46
|
import { u as Yo } from "./_store/useGlobalSettings-chunk-BhfWlTcd.js";
|
|
47
47
|
import { u as _o } from "./_store/usePrevious-chunk-BtJVllKj.js";
|
|
48
48
|
import { u as or, a as rr } from "./_store/useOutsideClick-chunk-CWy5z-7S.js";
|
|
@@ -27,4 +27,10 @@ export interface SearchFieldProps {
|
|
|
27
27
|
* Specify the properties of the search field input
|
|
28
28
|
*/
|
|
29
29
|
input?: InputProps;
|
|
30
|
+
/**
|
|
31
|
+
* Callback function triggered on input change for dynamic search.
|
|
32
|
+
* Receives the current search value as the user types, enabling
|
|
33
|
+
* real-time search functionality.
|
|
34
|
+
*/
|
|
35
|
+
onInputChange?: (value: string) => void;
|
|
30
36
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ilo-org/react",
|
|
3
|
-
"version": "0.28.
|
|
3
|
+
"version": "0.28.3",
|
|
4
4
|
"description": "React components for the ILO's Design System",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ui_patterns",
|
|
@@ -74,10 +74,10 @@
|
|
|
74
74
|
"use-breakpoint": "^4.0.6",
|
|
75
75
|
"video.js": "^7.21.2",
|
|
76
76
|
"videojs-youtube": "^3.0.1",
|
|
77
|
-
"@ilo-org/fonts": "2.0.0",
|
|
78
77
|
"@ilo-org/brand-assets": "1.0.1",
|
|
79
|
-
"@ilo-org/
|
|
80
|
-
"@ilo-org/icons-react": "1.0.6"
|
|
78
|
+
"@ilo-org/fonts": "2.0.0",
|
|
79
|
+
"@ilo-org/icons-react": "1.0.6",
|
|
80
|
+
"@ilo-org/styles": "1.11.0"
|
|
81
81
|
},
|
|
82
82
|
"devDependencies": {
|
|
83
83
|
"@chromatic-com/storybook": "3.2.7",
|
|
@@ -114,9 +114,9 @@
|
|
|
114
114
|
"vite-plugin-dts": "^3.9.1",
|
|
115
115
|
"vite-plugin-static-copy": "^1.0.6",
|
|
116
116
|
"vitest": "^2.0.5",
|
|
117
|
-
"@ilo-org/eslint-config": "2.0.0",
|
|
118
117
|
"@ilo-org/prettier-config": "2.0.0",
|
|
119
|
-
"@ilo-org/typescript-config": "2.0.0"
|
|
118
|
+
"@ilo-org/typescript-config": "2.0.0",
|
|
119
|
+
"@ilo-org/eslint-config": "2.0.0"
|
|
120
120
|
},
|
|
121
121
|
"peerDependencies": {
|
|
122
122
|
"react": "18 || 19",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),g=require("react"),p=require("./index-chunk-Cxg31gtu.js"),N=require("./useGlobalSettings-chunk-Cd48T6lS.js"),d=require("./Link-chunk-CP7cvvcX.js"),b=require("./Icon-chunk-DLR0d6ii.js"),I=g.forwardRef(({children:a,className:$,disabled:x=!1,icon:t,size:n="large",type:o="primary",style:u,name:_,link:r,iconPosition:f="left",icononly:l=!1,submit:m=!1,...j},c)=>{const{prefix:q}=N.useGlobalSettings(),s=`${q}--button`,i=p.classNames($,{[s]:!0,[`${s}__${n}`]:n,[`${s}__${o}`]:o,[`${s}--icon ${s}--icon--position__${f}`]:t&&!l,[`${s}--icon ${s}--icon--only`]:t&&l});return r?e.jsxs(d.Link,{ref:c,className:i,target:r.target,url:r.url,label:r.label,style:u,children:[t&&e.jsx(b.Icon,{...t}),a]}):e.jsxs("button",{ref:c,className:i,disabled:x,style:u,name:_,...j,type:m?"submit":"button",children:[t&&e.jsx(b.Icon,{...t}),e.jsx("span",{className:"button__label",children:a})]})});exports.Button=I;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const s=require("react/jsx-runtime"),o=require("react"),I=require("./index-chunk-Cxg31gtu.js"),N=require("./useGlobalSettings-chunk-Cd48T6lS.js"),$=require("./Icon-chunk-DLR0d6ii.js"),v=require("./FormControl-chunk-bBkCVOW6.js"),w=o.forwardRef(({action:m,callback:c,className:b,input:e},x)=>{const[d,t]=o.useState(""),{prefix:r}=N.useGlobalSettings(),l=`${r}--searchfield`,C=`${l}--button`,f=`${l}--clear-button ${d.trim()!==""&&"show"}`,j=o.useId(),h=(e==null?void 0:e.id)||j,S=`${r}--fieldset`,y=a=>{c&&c(a)},i=()=>{t("")},q=a=>{t(a.target.value)},n=!!(e!=null&&e.type);if(!n)throw new Error("SearchField: Input must have type prop");return n?s.jsx("form",{action:m,children:s.jsx(v.FormControl,{fieldId:h,error:!!(e!=null&&e.error),helper:(e==null?void 0:e.helper)||"",label:(e==null?void 0:e.label)||"",style:{width:"100%"},children:s.jsxs("div",{className:I.classNames(b,l),children:[s.jsxs("div",{className:S,children:[s.jsx("input",{className:`${r}--text-input`,id:h,name:e.name,onChange:q,placeholder:e==null?void 0:e.placeholder,value:d,ref:x,disabled:e==null?void 0:e.disabled,type:"search"}),s.jsx("span",{onClick:i,className:f,role:"presentation",children:s.jsx($.Icon,{name:"close",hidden:!0})})]}),s.jsx("button",{className:C,disabled:e==null?void 0:e.disabled,type:"submit",onClick:y})]})})}):null});exports.SearchField=w;
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import { jsxs as p, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as d } from "react";
|
|
3
|
-
import { c as j } from "./index-chunk-CY3PQDr4.js";
|
|
4
|
-
import { u as B } from "./useGlobalSettings-chunk-BhfWlTcd.js";
|
|
5
|
-
import { L as C } from "./Link-chunk-DgmjE6xb.js";
|
|
6
|
-
import { I as b } from "./Icon-chunk-DEroxoA_.js";
|
|
7
|
-
const S = d(
|
|
8
|
-
({
|
|
9
|
-
children: o,
|
|
10
|
-
className: $,
|
|
11
|
-
disabled: c = !1,
|
|
12
|
-
icon: t,
|
|
13
|
-
size: e = "large",
|
|
14
|
-
type: l = "primary",
|
|
15
|
-
style: m,
|
|
16
|
-
name: i,
|
|
17
|
-
link: a,
|
|
18
|
-
iconPosition: _ = "left",
|
|
19
|
-
icononly: f = !1,
|
|
20
|
-
submit: g = !1,
|
|
21
|
-
...x
|
|
22
|
-
}, u) => {
|
|
23
|
-
const { prefix: N } = B(), s = `${N}--button`, n = j($, {
|
|
24
|
-
[s]: !0,
|
|
25
|
-
[`${s}__${e}`]: e,
|
|
26
|
-
[`${s}__${l}`]: l,
|
|
27
|
-
[`${s}--icon ${s}--icon--position__${_}`]: t && !f,
|
|
28
|
-
[`${s}--icon ${s}--icon--only`]: t && f
|
|
29
|
-
});
|
|
30
|
-
return a ? /* @__PURE__ */ p(
|
|
31
|
-
C,
|
|
32
|
-
{
|
|
33
|
-
ref: u,
|
|
34
|
-
className: n,
|
|
35
|
-
target: a.target,
|
|
36
|
-
url: a.url,
|
|
37
|
-
label: a.label,
|
|
38
|
-
style: m,
|
|
39
|
-
children: [
|
|
40
|
-
t && /* @__PURE__ */ r(b, { ...t }),
|
|
41
|
-
o
|
|
42
|
-
]
|
|
43
|
-
}
|
|
44
|
-
) : /* @__PURE__ */ p(
|
|
45
|
-
"button",
|
|
46
|
-
{
|
|
47
|
-
ref: u,
|
|
48
|
-
className: n,
|
|
49
|
-
disabled: c,
|
|
50
|
-
style: m,
|
|
51
|
-
name: i,
|
|
52
|
-
...x,
|
|
53
|
-
type: g ? "submit" : "button",
|
|
54
|
-
children: [
|
|
55
|
-
t && /* @__PURE__ */ r(b, { ...t }),
|
|
56
|
-
/* @__PURE__ */ r("span", { className: "button__label", children: o })
|
|
57
|
-
]
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
export {
|
|
63
|
-
S as B
|
|
64
|
-
};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { jsx as s, jsxs as t } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as w, useState as x, useId as F } from "react";
|
|
3
|
-
import { c as g } from "./index-chunk-CY3PQDr4.js";
|
|
4
|
-
import { u as k } from "./useGlobalSettings-chunk-BhfWlTcd.js";
|
|
5
|
-
import { I as j } from "./Icon-chunk-DEroxoA_.js";
|
|
6
|
-
import { F as B } from "./FormControl-chunk-CA1OQzEu.js";
|
|
7
|
-
const P = w(
|
|
8
|
-
({ action: f, callback: o, className: b, input: e }, C) => {
|
|
9
|
-
const [c, d] = x(""), { prefix: r } = k(), a = `${r}--searchfield`, n = `${a}--button`, y = `${a}--clear-button ${c.trim() !== "" && "show"}`, S = F(), m = (e == null ? void 0 : e.id) || S, I = `${r}--fieldset`, N = (l) => {
|
|
10
|
-
o && o(l);
|
|
11
|
-
}, $ = () => {
|
|
12
|
-
d("");
|
|
13
|
-
}, v = (l) => {
|
|
14
|
-
d(l.target.value);
|
|
15
|
-
}, h = !!(e != null && e.type);
|
|
16
|
-
if (!h)
|
|
17
|
-
throw new Error("SearchField: Input must have type prop");
|
|
18
|
-
return h ? /* @__PURE__ */ s("form", { action: f, children: /* @__PURE__ */ s(
|
|
19
|
-
B,
|
|
20
|
-
{
|
|
21
|
-
fieldId: m,
|
|
22
|
-
error: !!(e != null && e.error),
|
|
23
|
-
helper: (e == null ? void 0 : e.helper) || "",
|
|
24
|
-
label: (e == null ? void 0 : e.label) || "",
|
|
25
|
-
style: { width: "100%" },
|
|
26
|
-
children: /* @__PURE__ */ t("div", { className: g(b, a), children: [
|
|
27
|
-
/* @__PURE__ */ t("div", { className: I, children: [
|
|
28
|
-
/* @__PURE__ */ s(
|
|
29
|
-
"input",
|
|
30
|
-
{
|
|
31
|
-
className: `${r}--text-input`,
|
|
32
|
-
id: m,
|
|
33
|
-
name: e.name,
|
|
34
|
-
onChange: v,
|
|
35
|
-
placeholder: e == null ? void 0 : e.placeholder,
|
|
36
|
-
value: c,
|
|
37
|
-
ref: C,
|
|
38
|
-
disabled: e == null ? void 0 : e.disabled,
|
|
39
|
-
type: "search"
|
|
40
|
-
}
|
|
41
|
-
),
|
|
42
|
-
/* @__PURE__ */ s(
|
|
43
|
-
"span",
|
|
44
|
-
{
|
|
45
|
-
onClick: $,
|
|
46
|
-
className: y,
|
|
47
|
-
role: "presentation",
|
|
48
|
-
children: /* @__PURE__ */ s(j, { name: "close", hidden: !0 })
|
|
49
|
-
}
|
|
50
|
-
)
|
|
51
|
-
] }),
|
|
52
|
-
/* @__PURE__ */ s(
|
|
53
|
-
"button",
|
|
54
|
-
{
|
|
55
|
-
className: n,
|
|
56
|
-
disabled: e == null ? void 0 : e.disabled,
|
|
57
|
-
type: "submit",
|
|
58
|
-
onClick: N
|
|
59
|
-
}
|
|
60
|
-
)
|
|
61
|
-
] })
|
|
62
|
-
}
|
|
63
|
-
) }) : null;
|
|
64
|
-
}
|
|
65
|
-
);
|
|
66
|
-
export {
|
|
67
|
-
P as S
|
|
68
|
-
};
|