@niagads/ui 1.0.0-alpha.0 → 1.0.1-alpha.0
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/dist/Alert.js +2 -0
- package/dist/Alert.js.map +1 -0
- package/dist/Button.js +2 -0
- package/dist/Button.js.map +1 -0
- package/dist/Card.js +2 -0
- package/dist/Card.js.map +1 -0
- package/dist/Checkbox.js +2 -0
- package/dist/Checkbox.js.map +1 -0
- package/dist/Common/dist/utils.js +2 -0
- package/dist/Common/dist/utils.js.map +1 -0
- package/dist/Navigation.js +2 -0
- package/dist/Navigation.js.map +1 -0
- package/dist/RadioButton.js +2 -0
- package/dist/RadioButton.js.map +1 -0
- package/dist/Select.js +2 -0
- package/dist/Select.js.map +1 -0
- package/dist/Skeleton.js +2 -0
- package/dist/Skeleton.js.map +1 -0
- package/dist/TextInput.js +2 -0
- package/dist/TextInput.js.map +1 -0
- package/dist/client/Dropdown.js +2 -0
- package/dist/client/Dropdown.js.map +1 -0
- package/dist/client/HelpIcon.js +2 -0
- package/dist/client/HelpIcon.js.map +1 -0
- package/dist/client/Slider.js +2 -0
- package/dist/client/Slider.js.map +1 -0
- package/dist/client/Tabs.js +2 -0
- package/dist/client/Tabs.js.map +1 -0
- package/dist/client/Tooltip.js +2 -0
- package/dist/client/Tooltip.js.map +1 -0
- package/dist/client/index.d.ts +63 -0
- package/dist/client/index.js +2 -0
- package/dist/client/index.js.map +1 -0
- package/dist/index.d.ts +113 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/layouts/RootLayout.js +2 -0
- package/dist/layouts/RootLayout.js.map +1 -0
- package/dist/layouts/index.d.ts +32 -0
- package/dist/layouts/index.js +2 -0
- package/dist/layouts/index.js.map +1 -0
- package/dist/layouts/utils.js +2 -0
- package/dist/layouts/utils.js.map +1 -0
- package/dist/niagads-ui.css +1643 -0
- package/dist/niagads-ui.css.map +1 -0
- package/package.json +3 -3
package/dist/Alert.js
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
import e from"react";const a=()=>e.createElement("svg",{className:"flex-shrink-0 inline w-4 h-4 me-3 mt-[2px]","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},e.createElement("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"})),t=({variant:t="default",message:l,children:r})=>{const n=`ui-alert ${t}`;return e.createElement("div",{className:n,role:"alert"},a(),e.createElement("span",{className:"sr-only"},"Info"),e.createElement("div",null,e.createElement("span",{className:"font-bold"},l),r&&("string"==typeof r?e.createElement("div",null,r):r)))};export{t as Alert,a as renderInfoIcon};
|
2
|
+
//# sourceMappingURL=Alert.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../src/Alert.tsx"],"sourcesContent":[null],"names":["renderInfoIcon","React","createElement","className","xmlns","fill","viewBox","d","Alert","variant","message","children","classes","role"],"mappings":"qBAUa,MAAAA,EAAiB,IAC1BC,EACIC,cAAA,MAAA,CAAAC,UAAU,2DACE,OACZC,MAAM,6BACNC,KAAK,eACLC,QAAQ,aAERL,EAAAC,cAAA,OAAA,CAAMK,EAAE,kLAIHC,EAAQ,EAAGC,UAAU,UAAWC,UAASC,eAClD,MAAMC,EAAU,YAAYH,IAE5B,OACIR,uBAAKE,UAAWS,EAASC,KAAK,SACzBb,IACDC,EAAMC,cAAA,OAAA,CAAAC,UAAU,WAAqB,QACrCF,EAAAC,cAAA,MAAA,KACID,EAAAC,cAAA,OAAA,CAAMC,UAAU,aAAaO,GAC5BC,IAAiC,iBAAbA,EAAwBV,EAAAC,cAAA,MAAA,KAAMS,GAAkBA"}
|
package/dist/Button.js
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../src/Button.tsx"],"sourcesContent":[null],"names":["Button","variant","size","children","onClick","disabled","classes","React","createElement","className"],"mappings":"2BAaaA,EAAS,EAAGC,UAAU,UAAWC,OAAO,KAAMC,WAAUC,UAASC,YAAW,MACrF,MAAMC,EAAU,aAAaL,KAAWC,IAExC,OACIK,EAAQC,cAAA,SAAA,CAAAH,SAAUA,EAAUI,UAAWH,EAASF,QAASA,GACpDD"}
|
package/dist/Card.js
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
import e from"react";import{Button as a}from"./Button.js";const r=({children:a})=>e.createElement("div",{className:"ui-card-body"},a),c=({children:a})=>e.createElement("h5",{className:"ui-card-header"},a),t=({shadow:r=!1,radius:c="md",href:t,onClick:l,children:n,className:d})=>{const i=`${t||l?"ui-card-link":"ui-card"} ${r?"shadow-sm":""} rounded-${c} ${d}`;return e.createElement("div",{className:i},t?e.createElement("a",{href:t},n):l?e.createElement(a,{onClick:l,variant:"white"},e.createElement("div",{className:"flex col"},n)):e.createElement("div",null,n))};export{t as Card,r as CardBody,c as CardHeader};
|
2
|
+
//# sourceMappingURL=Card.js.map
|
package/dist/Card.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["../src/Card.tsx"],"sourcesContent":[null],"names":["CardBody","children","React","className","CardHeader","Card","shadow","radius","href","onClick","cName","createElement","Button","variant"],"mappings":"gEAqBaA,EAAW,EAAGC,cAChBC,uBAAKC,UAAU,gBAAgBF,GAG7BG,EAAa,EAAGH,cAClBC,sBAAIC,UAAU,kBAAkBF,GAG9BI,EAAO,EAChBC,UAAS,EACTC,SAAS,KACTC,OACAC,UACAR,WACAE,gBAEA,MAAMO,EAAQ,GAAGF,GAAQC,EAAU,eAAiB,aAAaH,EAAS,YAAc,cAAcC,KAAUJ,IAChH,OACID,EAAKS,cAAA,MAAA,CAAAR,UAAWO,GACXF,EACGN,EAAGS,cAAA,IAAA,CAAAH,KAAMA,GAAOP,GAChBQ,EACAP,EAAAS,cAACC,EAAM,CAACH,QAASA,EAASI,QAAQ,SAC9BX,EAAAS,cAAA,MAAA,CAAKR,UAAU,YAAYF,IAG/BC,EAAMS,cAAA,MAAA,KAAAV"}
|
package/dist/Checkbox.js
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
import e from"react";const a=({variant:a="secondary",name:t,value:c,label:l,onChange:n,disabled:d=!1,checked:m=!1,defaultChecked:s=!1,alignCenter:r=!1})=>{const i=`ui-checkbox ${a}`;return e.createElement("div",{className:r?"text-center align-middle":""},s?e.createElement("input",{type:"checkbox",className:i,name:t,onChange:n,disabled:d,value:c,defaultChecked:s}):e.createElement("input",{type:"checkbox",className:i,name:t,onChange:n,disabled:d,checked:m,value:c}),l&&e.createElement("label",{className:"text-sm ml-2"},l))};export{a as Checkbox};
|
2
|
+
//# sourceMappingURL=Checkbox.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sources":["../src/Checkbox.tsx"],"sourcesContent":[null],"names":["Checkbox","variant","name","value","label","onChange","disabled","checked","defaultChecked","alignCenter","className","React","createElement","type"],"mappings":"qBAeO,MAAMA,EAAW,EACpBC,UAAU,YACVC,OACAC,QACAC,QACAC,WACAC,YAAW,EACXC,WAAU,EACVC,kBAAiB,EACjBC,eAAc,MAEd,MAAMC,EAAY,eAAeT,IACjC,OACIU,EAAAC,cAAA,MAAA,CAAKF,UAAWD,EAAc,2BAA6B,IACtDD,EACGG,EACIC,cAAA,QAAA,CAAAC,KAAK,WACLH,UAAWA,EACXR,KAAMA,EACNG,SAAUA,EACVC,SAAUA,EACVH,MAAOA,EACPK,eAAgBA,IAGpBG,EAAAC,cAAA,QAAA,CACIC,KAAK,WACLH,UAAWA,EACXR,KAAMA,EACNG,SAAUA,EACVC,SAAUA,EACVC,QAASA,EACTJ,MAAOA,IAIdC,GAASO,EAAOC,cAAA,QAAA,CAAAF,UAAU,gBAAgBN"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../Common/dist/utils.js"],"sourcesContent":["const e=(e,t)=>void 0!==t&&t.hasOwnProperty(e),t=(t,r,n=null)=>e(t,r)?r[t]:n,r=e=>JSON.parse(JSON.stringify(e)),n=e=>e instanceof Object,s=e=>{try{e=JSON.parse(e)}catch(t){return n(e)&&null!=e}return n(e)&&null!=e},a=(e,t=!1)=>!(!e||\"string\"!=typeof e||![\"NA\",\"N/A\",\"NULL\",\".\",\"\"].includes(e.toUpperCase()))||!!t&&l(e),l=e=>null==e,o=(e,t=2)=>Number.parseFloat(e.toFixed(t)).toString(),u=(e,t=2)=>{const r=Number.parseFloat(e.toString()).toExponential(t||2);let[n,s]=(r+\"\").split(\"e\");return parseInt(s)>3||parseInt(s)<-4?(n=n.endsWith(\"0\")?o(Number.parseFloat(n),t):n,`${n}e${s}`):e};function p(e,t){const r=t.toLowerCase();return e.some((e=>e.toLowerCase().includes(r)))}const c=e=>e.replace(/\\w\\S*/g,(e=>e.charAt(0).toUpperCase()+e.substring(1).toLowerCase()));function i(e){return(e=e.replace(/&/g,\"&\").replace(/</g,\"<\").replace(/>/g,\">\")).replace(/(\"(\\\\u[a-zA-Z0-9]{4}|\\\\[^u]|[^\\\\\"])*\"(\\s*:)?|\\b(true|false|null)\\b|-?\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d+)?)/g,(function(e){var t=\"number\";return/^\"/.test(e)?t=/:$/.test(e)?\"key\":\"string\":/true|false/.test(e)?t=\"boolean\":/null/.test(e)&&(t=\"null\"),'<span class=\"'+t+'\">'+e+\"</span>\"}))}export{r as _deepCopy,t as _get,e as _hasOwnProperty,s as _isJSON,a as _isNA,l as _isNull,n as _isObject,p as caseInsensitiveIncludes,i as jsonSyntaxHighlight,u as toExponential,o as toFixedWithoutZeros,c as toTitleCase};\n//# sourceMappingURL=utils.js.map\n"],"names":["e","t","hasOwnProperty","r","n"],"mappings":"AAAK,MAACA,EAAE,CAACA,EAAEC,SAAI,IAASA,GAAGA,EAAEC,eAAeF,GAAGC,EAAE,CAACA,EAAEE,EAAEC,EAAE,OAAOJ,EAAEC,EAAEE,GAAGA,EAAEF,GAAGG"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import e from"react";import{renderInfoIcon as a}from"./Alert.js";const t=(e,a)=>{if(e.startsWith("http"))return e;return a?`${a}${e.startsWith("/")?e:"/"+e}`:e},n=(a,n,r,l)=>e.createElement("a",{key:l,className:`ui-nav-link ${r}`,href:t(a.href,n),target:a.target},a.label),r=({item:a,index:t,hostUrl:r,variant:l})=>e.createElement("li",{key:`nav-menu-list-item_${t}`},n(a,r,l,`nav-menu-item-link_${t}`)),l=({items:a,hostUrl:t,variant:r})=>e.createElement("div",{className:"ui-nav-mobile"},a&&e.createElement("div",{className:"ui-nav-mobile-menu"},a.map(((e,a)=>n(e,t,r,`nav-mobile-menu-link_${a}`))))),i=({variant:t="light",children:n,config:i,bannerMsg:m})=>{return e.createElement(e.Fragment,null,e.createElement("nav",{className:`ui-nav ${t}`},m&&(s=m,e.createElement("div",{className:"ui-nav-banner"},a()," ",s)),e.createElement("div",{className:"ui-nav-inner-container"},i?((a,{items:t,brand:n,publicHostUrl:i})=>e.createElement(e.Fragment,null,n&&e.createElement("a",{href:n.href,target:n.target,className:"ui-nav-brand"},n.logo&&n.logo,e.createElement("span",{className:`ui-nav-brand-label ${a}`},n.label)),e.createElement("div",{className:"ui-nav-item-container"},t&&e.createElement("ul",{className:"ui-nav-item-list"},t.map(((t,n)=>e.createElement(r,{key:`ui-menu-item-${n}`,index:n,item:t,hostUrl:i,variant:a}))))),e.createElement(l,{items:t,hostUrl:i,variant:a})))(t,i):n)));var s};export{i as Navigation};
|
2
|
+
//# sourceMappingURL=Navigation.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Navigation.js","sources":["../src/Navigation.tsx"],"sourcesContent":[null],"names":["buildRouterLink","url","hostUrl","startsWith","renderMenuLink","item","variant","key","React","createElement","className","href","target","label","MenuItem","index","MobileMenu","items","map","Navigation","children","config","bannerMsg","Fragment","message","renderInfoIcon","brand","publicHostUrl","logo","renderNavigationFromConfig"],"mappings":"iEAkCA,MAAMA,EAAkB,CAACC,EAAaC,KAClC,GAAID,EAAIE,WAAW,QACf,OAAOF,EAIX,OADaC,EAAU,GAAGA,IAAUD,EAAIE,WAAW,KAAOF,EAAM,IAAMA,IAAQA,GAI5EG,EAAiB,CAACC,EAAsBH,EAA6BI,EAAiBC,IACxFC,EAAGC,cAAA,IAAA,CAAAF,IAAKA,EAAKG,UAAW,eAAeJ,IAAWK,KAAMX,EAAgBK,EAAKM,KAAMT,GAAUU,OAAQP,EAAKO,QACrGP,EAAKQ,OAIRC,EAAW,EACbT,OACAU,QACAb,UACAI,aAQIE,sBAAID,IAAK,sBAAsBQ,KAC1BX,EAAeC,EAAMH,EAASI,EAAS,sBAAsBS,MAKpEC,EAAa,EACfC,QACAf,UACAI,aAOIE,EAAKC,cAAA,MAAA,CAAAC,UAAU,iBACVO,GACGT,uBAAKE,UAAU,sBACVO,EAAMC,KAAI,CAACb,EAAMU,IACdX,EAAeC,EAAMH,EAASI,EAAS,wBAAwBS,SA+E1EI,EAAa,EAAGb,UAAU,QAASc,WAAUC,SAAQC,gBAC9D,OACId,EAAAC,cAAAD,EAAAe,SAAA,KACIf,EAAAC,cAAA,MAAA,CAAKC,UAAW,UAAUJ,KACrBgB,IAVKE,EAUqBF,EATvCd,EAAAC,cAAA,MAAA,CAAKC,UAAU,iBACVe,QAAmBD,IASZhB,EAAKC,cAAA,MAAA,CAAAC,UAAU,0BACVW,EAzCc,EAACf,GAAyBW,QAAOS,QAAOC,mBACvEnB,EAAAC,cAAAD,EAAAe,SAAA,KACKG,GACGlB,EAAAC,cAAA,IAAA,CAAGE,KAAMe,EAAMf,KAAMC,OAAQc,EAAMd,OAAQF,UAAU,gBAChDgB,EAAME,MAAQF,EAAME,KACrBpB,EAAMC,cAAA,OAAA,CAAAC,UAAW,sBAAsBJ,KAAYoB,EAAMb,QAIjEL,EAAKC,cAAA,MAAA,CAAAC,UAAU,yBACVO,GACGT,EAAAC,cAAA,KAAA,CAAIC,UAAU,oBACTO,EAAMC,KAAI,CAACb,EAAMU,IACdP,EAACC,cAAAK,GACGP,IAAK,gBAAgBQ,IACrBA,MAAOA,EACPV,KAAMA,EACNH,QAASyB,EACTrB,QAASA,QAO7BE,EAAAC,cAACO,EAAW,CAAAC,MAAOA,EAAOf,QAASyB,EAAerB,QAASA,KAgBrCuB,CAA2BvB,EAASe,GAAUD,KAZvD,IAACI"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import e from"react";const a=({variant:a="default",label:t,onChange:l,disabled:n=!1,checked:c=!1,alignCenter:r=!1})=>{const d=`ui-radio ${a}`;return e.createElement("div",{className:r?"text-center align-middle":""},e.createElement("input",{type:"radio",className:d,onChange:l,checked:c,disabled:n}),t&&e.createElement("label",{className:"text-sm ml-2"},t))};export{a as RadioButton};
|
2
|
+
//# sourceMappingURL=RadioButton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RadioButton.js","sources":["../src/RadioButton.tsx"],"sourcesContent":[null],"names":["RadioButton","variant","label","onChange","disabled","checked","alignCenter","className","React","createElement","type"],"mappings":"qBAIa,MAAAA,EAAc,EACvBC,UAAU,UACVC,QACAC,WACAC,YAAW,EACXC,WAAU,EACVC,eAAc,MAEd,MAAMC,EAAY,YAAYN,IAC9B,OACIO,EAAAC,cAAA,MAAA,CAAKF,UAAWD,EAAc,2BAA6B,IACvDE,EAAAC,cAAA,QAAA,CAAOC,KAAK,QAAQH,UAAWA,EAAWJ,SAAUA,EAAUE,QAASA,EAASD,SAAUA,IACzFF,GAASM,EAAOC,cAAA,QAAA,CAAAF,UAAU,gBAAgBL"}
|
package/dist/Select.js
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
import e from"react";const t=({fields:t,id:l,label:a,name:n,defaultValue:r,inline:m=!1,onChange:i,variant:c="outline"})=>{return e.createElement(e.Fragment,null,e.createElement("div",{className:m?"md:flex md:items-center":""},e.createElement("div",null,e.createElement("label",{htmlFor:l,className:"ui-select-label"},a)),e.createElement("div",null,e.createElement("select",{name:n||l,defaultValue:r,id:l,onChange:i,className:`ui-select ${c}`},Array.isArray(t)?t.map((t=>e.createElement("option",{key:t.toString(),value:t},t))):(s=t,Object.entries(s).map((([t,l])=>e.createElement("option",{key:t,value:l},t))))))));var s};export{t as Select};
|
2
|
+
//# sourceMappingURL=Select.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Select.js","sources":["../src/Select.tsx"],"sourcesContent":[null],"names":["Select","fields","id","label","name","defaultValue","inline","onChange","variant","React","createElement","Fragment","className","htmlFor","Array","isArray","map","v","key","toString","value","fieldMap","Object","entries","k"],"mappings":"qBAaa,MAAAA,EAAS,EAClBC,SACAC,KACAC,QACAC,OACAC,eACAC,UAAS,EACTC,WACAC,UAAU,cAgBV,OACIC,EAAAC,cAAAD,EAAAE,SAAA,KACIF,EAAKC,cAAA,MAAA,CAAAE,UAAWN,EAAS,0BAA4B,IACjDG,EAAAC,cAAA,MAAA,KACID,EAAOC,cAAA,QAAA,CAAAG,QAASX,EAAIU,UAAU,mBACzBT,IAGTM,EAAAC,cAAA,MAAA,KACID,EACIC,cAAA,SAAA,CAAAN,KAAMA,GAAcF,EACpBG,aAAcA,EACdH,GAAIA,EACJK,SAAUA,EACVK,UAAW,aAAaJ,KAEvBM,MAAMC,QAAQd,GAA4BA,EA7BpDe,KAAKC,GACRR,EAAAC,cAAA,SAAA,CAAQQ,IAAKD,EAAEE,WAAYC,MAAOH,GAC7BA,MAIYI,EAuBgEpB,EAtBrFqB,OAAOC,QAAQF,GAAUL,KAAI,EAAEQ,EAAGP,KAC9BR,EAAAC,cAAA,SAAA,CAAQQ,IAAKM,EAAGJ,MAAOH,GAClBO,UAHW,IAACH"}
|
package/dist/Skeleton.js
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
import e from"react";const a=({type:a})=>"default"===a?e.createElement("div",{role:"status",className:"max-w-sm animate-pulse"},e.createElement("div",{className:"h-2.5 bg-gray-200 rounded-full w-48 mb-4"}),e.createElement("div",{className:"h-2 bg-gray-200 rounded-full max-w-[300px] mb-2.5"}),e.createElement("div",{className:"h-2 bg-gray-200 rounded-full max-w-[360px] mb-2.5"}),e.createElement("span",{className:"sr-only"},"Loading...")):"card"===a?e.createElement("div",{role:"status",className:"max-w-sm p-4 border border-gray-200 rounded-sm shadow-sm animate-pulse md:p-6"},e.createElement("div",{className:"flex items-center justify-center h-48 mb-4 bg-gray-300 rounded-sm"},e.createElement("svg",{className:"w-10 h-10 text-gray-200 ","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 16 20"},e.createElement("path",{d:"M14.066 0H7v5a2 2 0 0 1-2 2H0v11a1.97 1.97 0 0 0 1.934 2h12.132A1.97 1.97 0 0 0 16 18V2a1.97 1.97 0 0 0-1.934-2ZM10.5 6a1.5 1.5 0 1 1 0 2.999A1.5 1.5 0 0 1 10.5 6Zm2.221 10.515a1 1 0 0 1-.858.485h-8a1 1 0 0 1-.9-1.43L5.6 10.039a.978.978 0 0 1 .936-.57 1 1 0 0 1 .9.632l1.181 2.981.541-1a.945.945 0 0 1 .883-.522 1 1 0 0 1 .879.529l1.832 3.438a1 1 0 0 1-.031.988Z"}),e.createElement("path",{d:"M5 5V.13a2.96 2.96 0 0 0-1.293.749L.879 3.707A2.98 2.98 0 0 0 .13 5H5Z"}))),e.createElement("div",{className:"h-2.5 bg-gray-200 rounded-full w-48 mb-4"}),e.createElement("div",{className:"h-2 bg-gray-200 rounded-full mb-2.5"}),e.createElement("div",{className:"h-2 bg-gray-200 rounded-full mb-2.5"}),e.createElement("div",{className:"h-2 bg-gray-200 rounded-full"}),e.createElement("div",{className:"flex items-center mt-4"},e.createElement("svg",{className:"w-10 h-10 me-3 text-gray-200 ","aria-hidden":"true",xmlns:"http://www.w3.org/2000/svg",fill:"currentColor",viewBox:"0 0 20 20"},e.createElement("path",{d:"M10 0a10 10 0 1 0 10 10A10.011 10.011 0 0 0 10 0Zm0 5a3 3 0 1 1 0 6 3 3 0 0 1 0-6Zm0 13a8.949 8.949 0 0 1-4.951-1.488A3.987 3.987 0 0 1 9 13h2a3.987 3.987 0 0 1 3.951 3.512A8.949 8.949 0 0 1 10 18Z"})),e.createElement("div",null,e.createElement("div",{className:"h-2.5 bg-gray-200 rounded-full w-32 mb-2"}),e.createElement("div",{className:"w-48 h-2 bg-gray-200 rounded-full "}))),e.createElement("span",{className:"sr-only"},"Loading...")):"table"===a?e.createElement("div",null,e.createElement("div",{role:"status",className:"flex justify-between p-4 border border-gray-200 divide-x space-x-2 divide-gray-200 rounded-sm shadow-sm animate-pulse md:p-6 "},[...Array(5)].map((a=>e.createElement("div",{key:a,className:"flex flex-col divide-y space-y-2 divide-gray-200 pr-2"},e.createElement("div",{className:"h-2.5 bg-gray-300 rounded-full w-24 mb-2.5"}),e.createElement("div",null,e.createElement("div",{className:"h-2.5 bg-gray-200 rounded-full w-24 mb-2.5"}),e.createElement("div",{className:"w-32 h-2 bg-gray-200 rounded-full "})))))),e.createElement("span",{className:"sr-only"},"Loading...")):e.createElement(e.Fragment,null);export{a as Skeleton};
|
2
|
+
//# sourceMappingURL=Skeleton.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Skeleton.js","sources":["../src/Skeleton.tsx"],"sourcesContent":[null],"names":["Skeleton","type","React","createElement","role","className","xmlns","fill","viewBox","d","Array","map","x","key","Fragment"],"mappings":"2BAQaA,EAAW,EAAGC,UACP,YAATA,EACHC,EAAKC,cAAA,MAAA,CAAAC,KAAK,SAASC,UAAU,0BACzBH,EAAKC,cAAA,MAAA,CAAAE,UAAU,6CACfH,EAAKC,cAAA,MAAA,CAAAE,UAAU,sDACfH,EAAKC,cAAA,MAAA,CAAAE,UAAU,sDACfH,EAAMC,cAAA,OAAA,CAAAE,UAAU,WAAS,eAEpB,SAATJ,EACAC,EAAKC,cAAA,MAAA,CAAAC,KAAK,SAASC,UAAU,iFACzBH,EAAKC,cAAA,MAAA,CAAAE,UAAU,qEACXH,EAAAC,cAAA,MAAA,CACIE,UAAU,2BACE,cAAA,OACZC,MAAM,6BACNC,KAAK,eACLC,QAAQ,aAERN,EAAMC,cAAA,OAAA,CAAAM,EAAE,+WACRP,EAAAC,cAAA,OAAA,CAAMM,EAAE,6EAGhBP,EAAKC,cAAA,MAAA,CAAAE,UAAU,6CACfH,EAAKC,cAAA,MAAA,CAAAE,UAAU,wCACfH,EAAKC,cAAA,MAAA,CAAAE,UAAU,wCACfH,EAAKC,cAAA,MAAA,CAAAE,UAAU,iCACfH,EAAKC,cAAA,MAAA,CAAAE,UAAU,0BACXH,EAAAC,cAAA,MAAA,CACIE,UAAU,gCACE,cAAA,OACZC,MAAM,6BACNC,KAAK,eACLC,QAAQ,aAERN,EAAAC,cAAA,OAAA,CAAMM,EAAE,2MAEZP,EAAAC,cAAA,MAAA,KACID,EAAKC,cAAA,MAAA,CAAAE,UAAU,8CACfH,EAAAC,cAAA,MAAA,CAAKE,UAAU,yCAGvBH,EAAAC,cAAA,OAAA,CAAME,UAAU,WAAS,eAEpB,UAATJ,EACAC,EAAAC,cAAA,MAAA,KACID,EAAAC,cAAA,MAAA,CACIC,KAAK,SACLC,UAAU,iIAET,IAAIK,MAAM,IAAIC,KAAKC,GAChBV,EAAKC,cAAA,MAAA,CAAAU,IAAKD,EAAGP,UAAU,yDACnBH,EAAKC,cAAA,MAAA,CAAAE,UAAU,+CACfH,EAAAC,cAAA,MAAA,KACID,EAAKC,cAAA,MAAA,CAAAE,UAAU,+CACfH,EAAKC,cAAA,MAAA,CAAAE,UAAU,4CAK/BH,EAAAC,cAAA,OAAA,CAAME,UAAU,WAAS,eAG7BH,EAAKC,cAAAD,EAAAY,SAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TextInput.js","sources":["../src/TextInput.tsx"],"sourcesContent":[null],"names":["TextInput","value","onChange","placeholder","React","createElement","className","evt","currentTarget","type"],"mappings":"qBASO,MAAMA,EAAY,EAAGC,QAAOC,WAAUC,iBAGrCC,EAAAC,cAAA,QAAA,CACIC,UAAU,gBACVJ,SAJcK,GAA6CL,EAASK,EAAIC,cAAcP,OAKtFE,YAAaA,GAA4B,SACzCM,KAAK,OACLR,MAAOA"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import e,{useState as t}from"react";const n="inline-flex w-full justify-center gap-x-1.5 rounded-md bg-white px-3 py-2 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50",l="absolute right-0 z-10 mt-2 w-56 origin-top-right rounded-md bg-white shadow-lg ring-1 ring-black ring-opacity-5 transition focus:outline-none",i=({options:i,closeOnSelect:a,onSelect:r})=>{const[o,c]=t(!1),[m,s]=t([]);return e.createElement("div",{className:"relative inline-block text-left"},e.createElement("div",{className:n,onClick:()=>c(!o)},0===m.length?"Select...":m.map((e=>e.name)).join(", ")),o?e.createElement("div",{className:l},i.map((t=>e.createElement("div",{onClick:()=>(e=>{let t=[];t=m.find((t=>t.value===e.value))?m.filter((t=>t.value!==e.value)):[...m,e],s(t),r(t.map((e=>e.value))),a&&c(!1)})(t)},t.name)))):e.createElement(e.Fragment,null))};export{i as Dropdown};
|
2
|
+
//# sourceMappingURL=Dropdown.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Dropdown.js","sources":["../../src/client/Dropdown.tsx"],"sourcesContent":[null],"names":["__TAILWIND_CSS","Dropdown","options","closeOnSelect","onSelect","visible","setVisible","useState","selected","setSelected","React","createElement","className","onClick","length","map","o","name","join","option","x","updated","find","value","filter","handleSelect","Fragment"],"mappings":"oCAEA,MAAMA,EAEM,2KAFNA,EAIE,gJAcKC,EAAW,EAAOC,UAASC,gBAAeC,eACnD,MAAOC,EAASC,GAAcC,GAAkB,IACzCC,EAAUC,GAAeF,EAA8B,IAc9D,OACIG,EAAAC,cAAA,MAAA,CAAKC,UAAU,mCACXF,EAAKC,cAAA,MAAA,CAAAC,UAAWZ,EAAuBa,QAAS,IAAMP,GAAYD,IACzC,IAApBG,EAASM,OAAe,YAAcN,EAASO,KAAKC,GAAMA,EAAEC,OAAMC,KAAK,OAE3Eb,EACGK,EAAKC,cAAA,MAAA,CAAAC,UAAWZ,GACXE,EAAQa,KAAKI,GACHT,EAAKC,cAAA,MAAA,CAAAE,QAAS,IApBpB,CAACO,IAClB,IAAIC,EAAU,GAEVA,EADAb,EAASc,MAAMN,GAAMA,EAAEO,QAAUH,EAAEG,QACzBf,EAASgB,QAAQR,GAAMA,EAAEO,QAAUH,EAAEG,QAErC,IAAIf,EAAUY,GAE5BX,EAAYY,GACZjB,EAASiB,EAAQN,KAAKC,GAAMA,EAAEO,SAC9BpB,GAAiBG,GAAW,IAWemB,CAAaN,IAAUA,EAAOF,SAIjEP,EAAKC,cAAAD,EAAAgB,SAAA"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import e from"react";import{InformationCircleIcon as t,QuestionMarkCircleIcon as n,ExclamationCircleIcon as o}from"@heroicons/react/24/outline";import{Tooltip as r}from"./Tooltip.js";import{_get as i}from"../Common/dist/utils.js";import"tslib";import"path";const l=({anchorId:o,message:i,type:l})=>{const m="info"===l?e.createElement(t,{className:"inline-info-bubble"}):e.createElement(n,{className:"inline-info-bubble"});return e.createElement(r,{anchorId:`help-${o}`,content:i},m)},m=(t,n,o="question")=>e.createElement(l,{anchorId:t,message:n,type:o}),s={info:o,question:n,infoOutline:t},a=e=>{const t=i(e,s);if(null===t)throw Error("Error rendering field: invalid icon `"+e+"`");return t},c=(t,n,o,r)=>e.createElement("div",{className:"inline-flex"},t,m(r,o,n));export{l as HelpIcon,a as getIconElement,m as renderHelpIcon,c as renderWithHelpIcon};
|
2
|
+
//# sourceMappingURL=HelpIcon.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"HelpIcon.js","sources":["../../src/client/HelpIcon.tsx"],"sourcesContent":[null],"names":["HelpIcon","anchorId","message","type","icon","React","createElement","InformationCircleIcon","className","QuestionMarkCircleIcon","Tooltip","content","renderHelpIcon","ICONS","info","ExclamationCircleIcon","question","infoOutline","getIconElement","key","_get","Error","renderWithHelpIcon","textElement"],"mappings":"iQAaO,MAAMA,EAAW,EAAGC,WAAUC,UAASC,WAC1C,MAAMC,EACO,SAATD,EACIE,EAAAC,cAACC,EAAqB,CAACC,UAAU,uBAEjCH,EAAAC,cAACG,EAAsB,CAACD,UAAU,uBAG1C,OACIH,EAACC,cAAAI,EAAQ,CAAAT,SAAU,QAAQA,IAAYU,QAAST,GAC3CE,IAKAQ,EAAiB,CAC1BX,EACAC,EACAC,EAA4B,aAErBE,EAACC,cAAAN,EAAS,CAAAC,SAAUA,EAAUC,QAASA,EAASC,KAAMA,IAG3DU,EAAQ,CACVC,KAAMC,EACNC,SAAUP,EACVQ,YAAaV,GAQJW,EAAkBC,IAC3B,MAAMf,EAAOgB,EAAKD,EAAKN,GACvB,GAAa,OAATT,EACA,MAAMiB,MAAM,wCAA0CF,EAAM,KAEhE,OAAOf,GAGEkB,EAAqB,CAC9BC,EACApB,EACAD,EACAD,IAGII,EAAAC,cAAA,MAAA,CAAKE,UAAU,eACVe,EACAX,EAAeX,EAAUC,EAASC"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import e from"react";const a=({variant:a="default",name:t,label:l,value:n,min:r,max:s,step:i,onChange:m})=>{const u=e=>e!==n&&m(e);return e.createElement("div",null,l&&e.createElement("label",{htmlFor:t,className:"ui-slider-label"},l),n.length>1?e.createElement("div",null,e.createElement("input",{id:t,type:"range",onChange:e=>{const a=+e.target.value;a<n[1]&&u([a,n[1]])},value:n[0],min:r,max:s,step:i,className:`ui-slider ${a}`}),e.createElement("input",{id:t,type:"range",onChange:e=>{const a=+e.target.value;a>n[0]&&u([n[0],a])},value:n[1],min:r,max:s,step:i,className:`ui-slider ui-second-thumb ${a}`})):e.createElement("input",{id:t,type:"range",onChange:e=>u([+e.target.value]),value:n[0],min:r,max:s,step:i,className:`ui-slider ${a}`}),e.createElement("span",{className:"ui-slider-range-label start"},r),e.createElement("span",{className:"ui-slider-range-label end"},s))};export{a as Slider};
|
2
|
+
//# sourceMappingURL=Slider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Slider.js","sources":["../../src/client/Slider.tsx"],"sourcesContent":[null],"names":["Slider","variant","name","label","value","min","max","step","onChange","valueChanged","v","React","createElement","htmlFor","className","length","id","type","e","val","target"],"mappings":"qBAea,MAAAA,EAAS,EAAGC,UAAU,UAAWC,OAAMC,QAAOC,QAAOC,MAAKC,MAAKC,OAAMC,eAC9E,MAAMC,EAAgBC,GAAgBA,IAAMN,GAASI,EAASE,GAE9D,OACIC,EAAAC,cAAA,MAAA,KACKT,GACGQ,EAAOC,cAAA,QAAA,CAAAC,QAASX,EAAMY,UAAU,mBAC3BX,GAGRC,EAAMW,OAAS,EACZJ,EAAAC,cAAA,MAAA,KACID,EAAAC,cAAA,QAAA,CACII,GAAId,EACJe,KAAK,QACLT,SAAWU,IACP,MAAMC,GAAOD,EAAEE,OAAOhB,MACtBe,EAAMf,EAAM,IAAMK,EAAa,CAACU,EAAKf,EAAM,MAE/CA,MAAOA,EAAM,GACbC,IAAKA,EACLC,IAAKA,EACLC,KAAMA,EACNO,UAAW,aAAab,MAE5BU,EAAAC,cAAA,QAAA,CACII,GAAId,EACJe,KAAK,QACLT,SAAWU,IACP,MAAMC,GAAOD,EAAEE,OAAOhB,MACtBe,EAAMf,EAAM,IAAMK,EAAa,CAACL,EAAM,GAAIe,KAE9Cf,MAAOA,EAAM,GACbC,IAAKA,EACLC,IAAKA,EACLC,KAAMA,EACNO,UAAW,6BAA6Bb,OAIhDU,EAAAC,cAAA,QAAA,CACII,GAAId,EACJe,KAAK,QACLT,SAAWU,GAAMT,EAAa,EAAES,EAAEE,OAAOhB,QACzCA,MAAOA,EAAM,GACbC,IAAKA,EACLC,IAAKA,EACLC,KAAMA,EACNO,UAAW,aAAab,MAGhCU,EAAAC,cAAA,OAAA,CAAME,UAAU,+BAA+BT,GAC/CM,EAAMC,cAAA,OAAA,CAAAE,UAAU,6BAA6BR"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import e,{useState as t,useEffect as i}from"react";import{renderWithHelpIcon as a}from"./HelpIcon.js";const n=({label:n,id:l,info:c,sectionId:s,isActive:o,onClick:m})=>{const[r,d]=t(!1);i((()=>{d(o)}),[o]);return e.createElement("button",{className:"ui-tab-button "+(r?"ui-active-tab":""),key:l,onClick:()=>{d(!0),m(l)}},c?a(n,"question",c,`${s?s+"_":""}-${l}-info`):n)},l=({sectionId:a,tabs:l,width:c="full"})=>{const[s,o]=t(l[0].id),[m,r]=t(l[0]);i((()=>{const e=l.find((e=>e.id===s));r(e)}),[s]);const d=e=>{o(e)};return m&&e.createElement("div",{className:`w-${c}`},e.createElement("div",{className:"ui-tabs-container"},e.createElement("ul",{className:"ui-tab-list",role:"tablist"},l.map((t=>e.createElement("li",{className:"ui-tab-list-item",key:`li-${t.id}`},e.createElement(n,{key:`button-${t.id}`,label:t.label,sectionId:a,id:t.id,info:t.info,isActive:t.id===m.id,onClick:d}))))),e.createElement("div",{className:"ui-tab-panel",key:m.id},m.content)))};export{l as Tabs};
|
2
|
+
//# sourceMappingURL=Tabs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Tabs.js","sources":["../../src/client/Tabs.tsx"],"sourcesContent":[null],"names":["TabButton","label","id","info","sectionId","isActive","onClick","isSelected","setIsSelected","useState","useEffect","React","createElement","className","key","renderWithHelpIcon","Tabs","tabs","width","selectedKey","setSelectedKey","activeTab","setActiveTab","selectedTab","find","tab","onTabSelect","tabId","role","map","content"],"mappings":"sGAuBA,MAAMA,EAAY,EAAGC,QAAOC,KAAIC,OAAMC,YAAWC,WAAUC,cACvD,MAAOC,EAAYC,GAAiBC,GAAkB,GAEtDC,GAAU,KACNF,EAAcH,KACf,CAACA,IAOJ,OACIM,EAAQC,cAAA,SAAA,CAAAC,UAAW,kBAAiBN,EAAa,gBAAkB,IAAMO,IAAKZ,EAAII,QANrE,KACbE,GAAc,GACdF,EAAQJ,KAKHC,EACKY,EAAmBd,EAAO,WAAYE,EAAM,GAAGC,EAAYA,EAAY,IAAM,MAAMF,UACnFD,IAKLe,EAAO,EAAGZ,YAAWa,OAAMC,QAAQ,WAC5C,MAAOC,EAAaC,GAAkBX,EAAiBQ,EAAK,GAAGf,KACxDmB,EAAWC,GAAgBb,EAAiBQ,EAAK,IAExDP,GAAU,KACN,MAAMa,EAAcN,EAAKO,MAAMC,GAAQA,EAAIvB,KAAOiB,IAClDG,EAAaC,KACd,CAACJ,IAEJ,MAAMO,EAAeC,IACjBP,EAAeO,IAGnB,OACIN,GACIV,uBAAKE,UAAW,KAAKK,KACjBP,EAAKC,cAAA,MAAA,CAAAC,UAAU,qBACXF,EAAAC,cAAA,KAAA,CAAIC,UAAU,cAAce,KAAK,WAC5BX,EAAKY,KAAKJ,GACPd,EAAIC,cAAA,KAAA,CAAAC,UAAU,mBAAmBC,IAAK,MAAMW,EAAIvB,MAC5CS,EAACC,cAAAZ,GACGc,IAAK,UAAUW,EAAIvB,KACnBD,MAAOwB,EAAIxB,MACXG,UAAWA,EACXF,GAAIuB,EAAIvB,GACRC,KAAMsB,EAAItB,KACVE,SAAUoB,EAAIvB,KAAOmB,EAAUnB,GAC/BI,QAASoB,QAKzBf,EAAAC,cAAA,MAAA,CAAKC,UAAU,eAAeC,IAAKO,EAAUnB,IACxCmB,EAAUS"}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import t from"react";import{Tooltip as e}from"react-tooltip";function o({anchorId:o,content:n,children:a,place:r="top",variant:c="dark",openOnClick:l=!1}){const i="tooltip-"+o.replace(" ","_");return t.createElement(t.Fragment,null,t.createElement("div",{"data-tooltip-id":i,"data-tooltip-variant":c},a),t.createElement(e,{className:"font-normal text-xs",id:i,openOnClick:l,place:r},n))}const n=(e,n,a)=>t.createElement(o,{anchorId:e,content:a},n);export{o as Tooltip,n as renderTooltip};
|
2
|
+
//# sourceMappingURL=Tooltip.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../src/client/Tooltip.tsx"],"sourcesContent":[null],"names":["Tooltip","anchorId","content","children","place","variant","openOnClick","friendlyAnchorId","replace","React","createElement","Fragment","ReactTooltip","className","id","renderTooltip","message"],"mappings":"6DAaM,SAAUA,GAAQC,SACpBA,EAAQC,QACRA,EAAOC,SACPA,EAAQC,MACRA,EAAQ,MAAKC,QACbA,EAAU,OAAMC,YAChBA,GAAc,IAEd,MAAMC,EAAmB,WAAaN,EAASO,QAAQ,IAAK,KAC5D,OACIC,EAAAC,cAAAD,EAAAE,SAAA,KACIF,EAAAC,cAAA,MAAA,CAAA,kBAAsBH,EAAgB,uBAAwBF,GACzDF,GAELM,EAACC,cAAAE,GAAaC,UAAU,sBAAsBC,GAAIP,EAAkBD,YAAaA,EAAaF,MAAOA,GAChGF,GAIjB,CAGa,MAAAa,EAAgB,CAACd,EAAkBE,EAAea,IAEvDP,EAAAC,cAACV,EAAO,CAACC,SAAUA,EAAUC,QAASc,GACjCb"}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
import React, { ReactNode } from 'react';
|
2
|
+
import { VariantType, PlacesType } from 'react-tooltip';
|
3
|
+
|
4
|
+
interface DropdownOption<T> {
|
5
|
+
value: T;
|
6
|
+
name: string;
|
7
|
+
}
|
8
|
+
interface DropdownProps<T> {
|
9
|
+
options: DropdownOption<T>[];
|
10
|
+
closeOnSelect: boolean;
|
11
|
+
onSelect: (option: T[]) => void;
|
12
|
+
}
|
13
|
+
declare const Dropdown: <T>({ options, closeOnSelect, onSelect }: DropdownProps<T>) => React.JSX.Element;
|
14
|
+
|
15
|
+
interface HelpIconProps {
|
16
|
+
anchorId: string;
|
17
|
+
message: ReactNode | string;
|
18
|
+
type: "question" | "info";
|
19
|
+
}
|
20
|
+
declare const HelpIcon: ({ anchorId, message, type }: HelpIconProps) => React.JSX.Element;
|
21
|
+
declare const renderHelpIcon: (anchorId: string, message: ReactNode | string, type?: "question" | "info") => React.JSX.Element;
|
22
|
+
declare const getIconElement: (key: string) => any;
|
23
|
+
declare const renderWithHelpIcon: (textElement: ReactNode | string, type: "question" | "info", message: string, anchorId: string) => React.JSX.Element;
|
24
|
+
|
25
|
+
interface TooltipProps {
|
26
|
+
anchorId: string;
|
27
|
+
content: string | ReactNode;
|
28
|
+
children: string | ReactNode;
|
29
|
+
variant?: VariantType;
|
30
|
+
place?: PlacesType;
|
31
|
+
openOnClick?: boolean;
|
32
|
+
}
|
33
|
+
declare function Tooltip({ anchorId, content, children, place, variant, openOnClick, }: TooltipProps): React.JSX.Element;
|
34
|
+
declare const renderTooltip: (anchorId: string, children: any, message: any) => React.JSX.Element;
|
35
|
+
|
36
|
+
interface TabDef {
|
37
|
+
label: string;
|
38
|
+
id: string;
|
39
|
+
info?: string;
|
40
|
+
content: ReactNode;
|
41
|
+
}
|
42
|
+
interface TabsProps {
|
43
|
+
sectionId?: string;
|
44
|
+
tabs: TabDef[];
|
45
|
+
width: string;
|
46
|
+
}
|
47
|
+
declare const Tabs: ({ sectionId, tabs, width }: TabsProps) => React.JSX.Element;
|
48
|
+
|
49
|
+
interface SliderProps {
|
50
|
+
name: string;
|
51
|
+
label?: string;
|
52
|
+
value: number[];
|
53
|
+
min: number;
|
54
|
+
max: number;
|
55
|
+
step: number;
|
56
|
+
variant?: SliderVariants;
|
57
|
+
onChange: (v: number[]) => void;
|
58
|
+
}
|
59
|
+
type SliderVariants = "default" | "primary" | "secondary" | "accent";
|
60
|
+
declare const Slider: ({ variant, name, label, value, min, max, step, onChange }: SliderProps) => React.JSX.Element;
|
61
|
+
|
62
|
+
export { Dropdown, HelpIcon, Slider, Tabs, Tooltip, getIconElement, renderHelpIcon, renderTooltip, renderWithHelpIcon };
|
63
|
+
export type { DropdownOption, TabDef };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,113 @@
|
|
1
|
+
import React, { ReactNode } from 'react';
|
2
|
+
|
3
|
+
type AlertVariants = "info" | "warning" | "danger" | "success" | "default";
|
4
|
+
declare const renderInfoIcon: () => React.JSX.Element;
|
5
|
+
interface Alert {
|
6
|
+
variant?: AlertVariants;
|
7
|
+
message: string;
|
8
|
+
children?: ReactNode | string;
|
9
|
+
}
|
10
|
+
declare const Alert: ({ variant, message, children }: Alert) => React.JSX.Element;
|
11
|
+
|
12
|
+
type ButtonVariants = "default" | "primary" | "secondary" | "white" | "accent";
|
13
|
+
type ButtonSizes = "sm" | "md" | "lg";
|
14
|
+
interface ButtonProps {
|
15
|
+
variant?: ButtonVariants;
|
16
|
+
size?: ButtonSizes;
|
17
|
+
children: ReactNode | string;
|
18
|
+
disabled?: boolean;
|
19
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void | null;
|
20
|
+
}
|
21
|
+
declare const Button: ({ variant, size, children, onClick, disabled }: ButtonProps) => React.JSX.Element;
|
22
|
+
|
23
|
+
type ThemeVariant = "secondary" | "light" | "dark" | "accent";
|
24
|
+
interface StylingProps {
|
25
|
+
colorVariant?: "primary" | "secondary" | "accent" | "default" | "transparent";
|
26
|
+
size?: "sm" | "md" | "lg";
|
27
|
+
className?: string;
|
28
|
+
}
|
29
|
+
|
30
|
+
interface CardBodyProps {
|
31
|
+
children: ReactNode | string;
|
32
|
+
}
|
33
|
+
interface CardHeaderProps {
|
34
|
+
children: ReactNode | string;
|
35
|
+
}
|
36
|
+
interface CardProps {
|
37
|
+
shadow?: boolean;
|
38
|
+
href?: string;
|
39
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void | null;
|
40
|
+
radius?: "none" | "sm" | "md" | "lg" | "xl";
|
41
|
+
children: ReactNode | string;
|
42
|
+
}
|
43
|
+
declare const CardBody: ({ children }: CardBodyProps) => React.JSX.Element;
|
44
|
+
declare const CardHeader: ({ children }: CardHeaderProps) => React.JSX.Element;
|
45
|
+
declare const Card: ({ shadow, radius, href, onClick, children, className, }: CardProps & StylingProps) => React.JSX.Element;
|
46
|
+
|
47
|
+
type CheckboxVariants = "default" | "primary" | "secondary" | "pink" | "accent";
|
48
|
+
interface CheckboxProps {
|
49
|
+
variant?: CheckboxVariants;
|
50
|
+
name: string;
|
51
|
+
label?: string;
|
52
|
+
checked?: boolean;
|
53
|
+
value?: string;
|
54
|
+
defaultChecked?: boolean;
|
55
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void | null;
|
56
|
+
disabled?: boolean;
|
57
|
+
alignCenter?: boolean;
|
58
|
+
}
|
59
|
+
declare const Checkbox: ({ variant, name, value, label, onChange, disabled, checked, defaultChecked, alignCenter, }: CheckboxProps) => React.JSX.Element;
|
60
|
+
|
61
|
+
interface MenuItemConfig {
|
62
|
+
label: string;
|
63
|
+
target?: React.HTMLAttributeAnchorTarget;
|
64
|
+
href: string;
|
65
|
+
}
|
66
|
+
interface BrandItemConfig extends MenuItemConfig {
|
67
|
+
logo?: ReactNode;
|
68
|
+
}
|
69
|
+
interface NavigationConfig {
|
70
|
+
brand: BrandItemConfig;
|
71
|
+
items: MenuItemConfig[];
|
72
|
+
publicHostUrl?: string;
|
73
|
+
}
|
74
|
+
interface NavigationProps {
|
75
|
+
variant?: ThemeVariant;
|
76
|
+
config?: NavigationConfig;
|
77
|
+
children?: ReactNode;
|
78
|
+
bannerMsg?: string;
|
79
|
+
}
|
80
|
+
declare const Navigation: ({ variant, children, config, bannerMsg }: NavigationProps) => React.JSX.Element;
|
81
|
+
|
82
|
+
declare const RadioButton: ({ variant, label, onChange, disabled, checked, alignCenter, }: CheckboxProps) => React.JSX.Element;
|
83
|
+
|
84
|
+
type SkeletonTypes = "default" | "card" | "table";
|
85
|
+
interface SkeletonProps {
|
86
|
+
type: SkeletonTypes;
|
87
|
+
}
|
88
|
+
declare const Skeleton: ({ type }: SkeletonProps) => React.JSX.Element;
|
89
|
+
|
90
|
+
interface SelectProps {
|
91
|
+
fields: string[] | {
|
92
|
+
[key: string]: string;
|
93
|
+
} | number[];
|
94
|
+
id: string;
|
95
|
+
name?: string;
|
96
|
+
label?: string;
|
97
|
+
defaultValue?: string;
|
98
|
+
inline?: boolean;
|
99
|
+
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
100
|
+
variant?: "outline" | "underline" | "plain";
|
101
|
+
}
|
102
|
+
declare const Select: ({ fields, id, label, name, defaultValue, inline, onChange, variant, }: SelectProps) => React.JSX.Element;
|
103
|
+
|
104
|
+
interface TextInputProps {
|
105
|
+
value: string;
|
106
|
+
onChange: (val: string) => void;
|
107
|
+
placeholder?: string;
|
108
|
+
label?: string;
|
109
|
+
}
|
110
|
+
declare const TextInput: ({ value, onChange, placeholder }: TextInputProps) => React.JSX.Element;
|
111
|
+
|
112
|
+
export { Alert, Button, Card, CardBody, CardHeader, Checkbox, Navigation, RadioButton, Select, Skeleton, TextInput, renderInfoIcon };
|
113
|
+
export type { CheckboxProps, CheckboxVariants, MenuItemConfig, NavigationConfig };
|
package/dist/index.js
ADDED
@@ -0,0 +1,2 @@
|
|
1
|
+
export{Alert,renderInfoIcon}from"./Alert.js";export{Button}from"./Button.js";export{Card,CardBody,CardHeader}from"./Card.js";export{Checkbox}from"./Checkbox.js";export{Navigation}from"./Navigation.js";export{RadioButton}from"./RadioButton.js";export{Skeleton}from"./Skeleton.js";export{Select}from"./Select.js";export{TextInput}from"./TextInput.js";
|
2
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
import e from"react";import{Navigation as t}from"../Navigation.js";import{isNavigationConfig as a}from"./utils.js";function n({theme:n="light",children:r,navigationContent:i,fullWidth:l=!1,bannerMsg:m}){return e.createElement("div",{className:"min-h-full"},e.createElement("header",{className:"bg-white shadow-accent shadow-md"},a(i)?e.createElement(t,{variant:n,config:i,bannerMsg:m}):e.createElement(t,{variant:n,bannerMsg:m},i)),e.createElement("main",null,e.createElement("div",{className:"ui-container "+(l?"full":"")},r)))}export{n as RootLayout};
|
2
|
+
//# sourceMappingURL=RootLayout.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"RootLayout.js","sources":["../../src/layouts/RootLayout.tsx"],"sourcesContent":[null],"names":["RootLayout","theme","children","navigationContent","fullWidth","bannerMsg","React","createElement","className","isNavigationConfig","Navigation","variant","config"],"mappings":"4HAkBgBA,GAAWC,MACvBA,EAAQ,QAAOC,SACfA,EAAQC,kBACRA,EAAiBC,UACjBA,GAAY,EAAKC,UACjBA,IAEA,OACIC,EAAAC,cAAA,MAAA,CAAKC,UAAU,cACXF,EAAQC,cAAA,SAAA,CAAAC,UAAU,oCACbC,EAAmBN,GAChBG,EAAAC,cAACG,EAAW,CAAAC,QAASV,EAAOW,OAAQT,EAAmBE,UAAWA,IAElEC,gBAACI,EAAU,CAACC,QAASV,EAAOI,UAAWA,GAClCF,IAIbG,EAAAC,cAAA,OAAA,KACID,EAAAC,cAAA,MAAA,CAAKC,UAAW,iBAAgBJ,EAAY,OAAS,KAAOF,IAI5E"}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
import React, { ReactNode } from 'react';
|
2
|
+
|
3
|
+
type ThemeVariant = "secondary" | "light" | "dark" | "accent";
|
4
|
+
|
5
|
+
interface MenuItemConfig {
|
6
|
+
label: string;
|
7
|
+
target?: React.HTMLAttributeAnchorTarget;
|
8
|
+
href: string;
|
9
|
+
}
|
10
|
+
interface BrandItemConfig extends MenuItemConfig {
|
11
|
+
logo?: ReactNode;
|
12
|
+
}
|
13
|
+
interface NavigationConfig {
|
14
|
+
brand: BrandItemConfig;
|
15
|
+
items: MenuItemConfig[];
|
16
|
+
publicHostUrl?: string;
|
17
|
+
}
|
18
|
+
|
19
|
+
interface LayoutProps {
|
20
|
+
children: ReactNode;
|
21
|
+
bannerMsg?: string;
|
22
|
+
}
|
23
|
+
|
24
|
+
interface RootLayoutProps extends LayoutProps {
|
25
|
+
theme?: ThemeVariant;
|
26
|
+
navigationContent: NavigationConfig | ReactNode;
|
27
|
+
fullWidth?: boolean;
|
28
|
+
}
|
29
|
+
declare function RootLayout({ theme, children, navigationContent, fullWidth, bannerMsg, }: RootLayoutProps): React.JSX.Element;
|
30
|
+
|
31
|
+
export { RootLayout };
|
32
|
+
export type { ThemeVariant };
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/layouts/utils.tsx"],"sourcesContent":[null],"names":["isNavigationConfig","obj","React","isValidElement"],"mappings":"qBAIa,MAAAA,EAAsBC,GACvB,OAARA,GAA+B,iBAARA,IAAqBC,EAAMC,eAAeF"}
|