naria-ui 0.1.41 → 0.1.43
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/lib/components/Select/Select.d.ts +5 -0
- package/dist/naria-ui.cjs.js +9 -8
- package/dist/naria-ui.es.js +190 -184
- package/package.json +1 -1
|
@@ -18,6 +18,11 @@ export interface props {
|
|
|
18
18
|
pagination?: Pagination;
|
|
19
19
|
optionFilterLabel?: string;
|
|
20
20
|
hasSearch?: boolean;
|
|
21
|
+
classNames?: {
|
|
22
|
+
wrapper: string;
|
|
23
|
+
label?: string;
|
|
24
|
+
title?: string;
|
|
25
|
+
};
|
|
21
26
|
onSelectChange?: any;
|
|
22
27
|
}
|
|
23
28
|
export declare const Select: FC<props>;
|
package/dist/naria-ui.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react");function oe(t){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const d=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(s,o,d.get?d:{enumerable:!0,get:()=>t[o]})}}return s.default=t,Object.freeze(s)}const $=oe(l);var V={exports:{}},U={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var K;function ce(){if(K)return U;K=1;var t=Symbol.for("react.transitional.element"),
|
|
9
|
+
*/var K;function ce(){if(K)return U;K=1;var t=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function o(d,c,u){var w=null;if(u!==void 0&&(w=""+u),c.key!==void 0&&(w=""+c.key),"key"in c){u={};for(var g in c)g!=="key"&&(u[g]=c[g])}else u=c;return c=u.ref,{$$typeof:t,type:d,key:w,ref:c!==void 0?c:null,props:u}}return U.Fragment=s,U.jsx=o,U.jsxs=o,U}var H={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,13 +14,14 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var ee;function ie(){return ee||(ee=1,process.env.NODE_ENV!=="production"&&function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===
|
|
17
|
+
*/var ee;function ie(){return ee||(ee=1,process.env.NODE_ENV!=="production"&&function(){function t(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===_?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case S:return"Fragment";case C:return"Profiler";case q:return"StrictMode";case f:return"Suspense";case M:return"SuspenseList";case B:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case z:return"Portal";case G:return(e.displayName||"Context")+".Provider";case L:return(e._context.displayName||"Context")+".Consumer";case W:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case T:return n=e.displayName||null,n!==null?n:t(e.type)||"Memo";case k:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function s(e){return""+e}function o(e){try{s(e);var n=!1}catch{n=!0}if(n){n=console;var i=n.error,r=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return i.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",r),s(e)}}function d(e){if(e===S)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===k)return"<...>";try{var n=t(e);return n?"<"+n+">":"<...>"}catch{return"<...>"}}function c(){var e=v.A;return e===null?null:e.getOwner()}function u(){return Error("react-stack-top-frame")}function w(e){if(Y.call(e,"key")){var n=Object.getOwnPropertyDescriptor(e,"key").get;if(n&&n.isReactWarning)return!1}return e.key!==void 0}function g(e,n){function i(){y||(y=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",n))}i.isReactWarning=!0,Object.defineProperty(e,"key",{get:i,configurable:!0})}function E(){var e=t(this.type);return D[e]||(D[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function h(e,n,i,r,b,p,X,Z){return i=p.ref,e={$$typeof:I,type:e,key:n,props:p,_owner:b},(i!==void 0?i:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:E}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:X}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Z}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function N(e,n,i,r,b,p,X,Z){var m=n.children;if(m!==void 0)if(r)if(R(m)){for(r=0;r<m.length;r++)x(m[r]);Object.freeze&&Object.freeze(m)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else x(m);if(Y.call(n,"key")){m=t(e);var P=Object.keys(n).filter(function(se){return se!=="key"});r=0<P.length?"{key: someKey, "+P.join(": ..., ")+": ...}":"{key: someKey}",J[m+r]||(P=0<P.length?"{"+P.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
18
18
|
let props = %s;
|
|
19
19
|
<%s {...props} />
|
|
20
20
|
React keys must be passed directly to JSX without using spread:
|
|
21
21
|
let props = %s;
|
|
22
|
-
<%s key={someKey} {...props} />`,
|
|
23
|
-
${
|
|
24
|
-
|
|
25
|
-
${o&&"!border-danger-100 focus:border-danger-100 outline-danger-100"}`,
|
|
26
|
-
${o&&"!border-danger-100 focus:border-danger-100 outline-danger-100"}`,
|
|
22
|
+
<%s key={someKey} {...props} />`,r,m,P,m),J[m+r]=!0)}if(m=null,i!==void 0&&(o(i),m=""+i),w(n)&&(o(n.key),m=""+n.key),"key"in n){i={};for(var Q in n)Q!=="key"&&(i[Q]=n[Q])}else i=n;return m&&g(i,typeof e=="function"?e.displayName||e.name||"Unknown":e),h(e,m,p,b,c(),i,X,Z)}function x(e){typeof e=="object"&&e!==null&&e.$$typeof===I&&e._store&&(e._store.validated=1)}var j=l,I=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),L=Symbol.for("react.consumer"),G=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),T=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),_=Symbol.for("react.client.reference"),v=j.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=Object.prototype.hasOwnProperty,R=Array.isArray,O=console.createTask?console.createTask:function(){return null};j={"react-stack-bottom-frame":function(e){return e()}};var y,D={},A=j["react-stack-bottom-frame"].bind(j,u)(),F=O(d(u)),J={};H.Fragment=S,H.jsx=function(e,n,i,r,b){var p=1e4>v.recentlyCreatedOwnerStacks++;return N(e,n,i,!1,r,b,p?Error("react-stack-top-frame"):A,p?O(d(e)):F)},H.jsxs=function(e,n,i,r,b){var p=1e4>v.recentlyCreatedOwnerStacks++;return N(e,n,i,!0,r,b,p?Error("react-stack-top-frame"):A,p?O(d(e)):F)}}()),H}var re;function le(){return re||(re=1,process.env.NODE_ENV==="production"?V.exports=ce():V.exports=ie()),V.exports}var a=le();const ue=({type:t="button",value:s})=>a.jsx("button",{type:t,children:s}),fe=({type:t="text",placeholder:s,wrapperClass:o="",labelClass:d="",inputClass:c="",errorClass:u="",label:w,hasError:g,register:E,name:h,isDisabled:N=!1,autocomplete:x=!1,...j})=>a.jsxs("div",{className:o,children:[a.jsxs("label",{htmlFor:h,className:`${d} ${g&&"error"}`,children:[w,a.jsx("input",{disabled:N,autoComplete:x?"on":"off",id:h,...E,...j,type:t,name:h,className:`${c} ${g&&"error"} ${u}`,placeholder:s})]}),g&&a.jsx("p",{className:u,children:g})]}),te=t=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",...t},$.createElement("path",{fill:"currentColor",d:"M209.5 369c-9.4 9.4-24.6 9.4-33.9 0L15.5 209c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l143 143 143-143c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-160 160z"})),de=t=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"currentColor",...t},$.createElement("path",{fill:"currentColor",d:"M7.5 105c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l151 151 151-151c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-151 151 151 151c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-151-151-151 151c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l151-151-151-151z"})),ne=t=>$.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"currentColor",...t},$.createElement("path",{fill:"currentColor",d:"M368 208a160 160 0 1 0 -320 0 160 160 0 1 0 320 0zM337.1 371.1C301.7 399.2 256.8 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208c0 48.8-16.8 93.7-44.9 129.1L505 471c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L337.1 371.1z"})),ge=()=>{const[t,s]=l.useState(typeof window<"u"?window.innerWidth:0),o=()=>s(typeof window<"u"?window.innerWidth:0);return l.useEffect(()=>(window.addEventListener("resize",o),()=>window.removeEventListener("resize",o)),[t]),t},ae=({classNames:t={wrapper:"",color:""}})=>a.jsxs("svg",{className:`nariaLoading ${t.wrapper}`,viewBox:"0 0 64 64",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[a.jsx("path",{d:"M32 3C35.8083 3 39.5794 3.75011 43.0978 5.20749C46.6163 6.66488 49.8132 8.80101 52.5061 11.4939C55.199 14.1868 57.3351 17.3837 58.7925 20.9022C60.2499 24.4206 61 28.1917 61 32C61 35.8083 60.2499 39.5794 58.7925 43.0978C57.3351 46.6163 55.199 49.8132 52.5061 52.5061C49.8132 55.199 46.6163 57.3351 43.0978 58.7925C39.5794 60.2499 35.8083 61 32 61C28.1917 61 24.4206 60.2499 20.9022 58.7925C17.3837 57.3351 14.1868 55.199 11.4939 52.5061C8.801 49.8132 6.66487 46.6163 5.20749 43.0978C3.7501 39.5794 3 35.8083 3 32C3 28.1917 3.75011 24.4206 5.2075 20.9022C6.66489 17.3837 8.80101 14.1868 11.4939 11.4939C14.1868 8.80099 17.3838 6.66487 20.9022 5.20749C24.4206 3.7501 28.1917 3 32 3L32 3Z",stroke:"currentColor",strokeWidth:"6",strokeLinecap:"round",strokeLinejoin:"round"}),a.jsx("path",{d:"M32 3C36.5778 3 41.0906 4.08374 45.1692 6.16256C49.2477 8.24138 52.7762 11.2562 55.466 14.9605C58.1558 18.6647 59.9304 22.9531 60.6448 27.4748C61.3591 31.9965 60.9928 36.6232 59.5759 40.9762",stroke:"currentColor",strokeWidth:"6",strokeLinecap:"round",strokeLinejoin:"round",className:t.color})]}),me=()=>{const t=`${window.location.pathname}${window.location.search}`;window.history.replaceState(null,"",t)},he=t=>{window.location.hash=t},pe=t=>{const[s,o]=l.useState(!1);return l.useEffect(()=>{const d=c=>{window.location.hash!==t?o(!0):o(!1)};return window.addEventListener("hashchange",d),()=>{window.removeEventListener("hashchange",d)}},[]),s},we=(t,s,o)=>{l.useEffect(()=>{function d(c){s.current&&!s.current.contains(c.target)&&t?.current&&!t?.current.contains(c.target)&&o()}return document.addEventListener("mousedown",d),()=>{document.removeEventListener("mousedown",d)}},[t,o])},ve=({options:t,label:s,hasError:o,title:d,value:c,api:u,selected:w,placeholder:g,disabled:E=!1,pagination:h,optionFilterLabel:N,hasSearch:x=!1,classNames:j={wrapper:"",label:"",title:""},onSelectChange:I})=>{let z=!0;const S=ge(),q=pe("#select"),[C,L]=l.useState(!1),[G,W]=l.useState(!0),[f,M]=l.useState(null),[T,k]=l.useState(null),[B,_]=l.useState(""),[v,Y]=l.useState({page:1,pageLabel:"page",size:20,sizeLabel:"size",isLoading:!1}),R=l.useRef(void 0),O=l.useRef(void 0),y=l.useRef(void 0),D=async()=>{if(R?.current)try{const r=await fetch(R?.current);if(!r.ok)throw new Error(`Response status: ${r.status}`);return await r.json()}catch(r){console.error(r.message)}};l.useEffect(()=>()=>{z=!1},[]),l.useEffect(()=>{if(u?.length){if(R.current=u,R.current.includes(h?.pageLabel||"page")){const r=new URL(u);r.searchParams.set(h?.pageLabel||"page",(h?.page||v.page).toString()),r.searchParams.set(h?.sizeLabel||"size",(h?.size||v.size).toString()),R.current=r.href}W(!0),D().then(r=>{z&&(W(!1),k(r))})}},[u,h]),l.useEffect(()=>{if(v.isLoading){if(R.current.includes(h?.pageLabel||"page")){const r=new URL(R.current);r.searchParams.set(h?.pageLabel||"page",v.page.toString()),R.current=r.href}D().then(r=>{z&&(W(!1),Y({...v,isLoading:!1}),k([...T,...r]))})}},[v]),l.useEffect(()=>{S<768&&(C?(he("select"),document.body.style.overflow="hidden",y.current?.focus()):(window.location.hash&&!document.referrer.includes("#")&&me(),document.body.style.overflow="auto"))},[C]),l.useEffect(()=>{w&&t?.length&&(t?.find(r=>r[s]===w)?M(t?.find(r=>r[s]===w)):M(w))},[w]),l.useEffect(()=>{f&&x&&(c?.length&&T?.find(r=>r[s]===f[s])?_(T?.find(r=>r[s]===f[s])[c]||""):_(f))},[f]),l.useEffect(()=>{q&&L(!1)},[q]),l.useEffect(()=>{t?.length&&k(t)},[t]);const A=()=>{x&&k(t),L(r=>!r)},F=()=>{x&&(k(t),_(typeof f=="string"?f:f?f[c]:"")),L(!1)},J=r=>{x&&(c?.length?_(r[c]):_(r)),M(r),A(),I&&I(r)},e=r=>{if(!f)return"";if(s?.length&&r[s]===f[s]||r===f)return"bg-grey-100"},n=r=>{u?.length&&T?.length&&!v.isLoading&&r.target.offsetHeight+r.target.scrollTop>=r.target.scrollHeight-100&&Y({page:v.page+1,isLoading:!0})},i=r=>{const b=r?.target?.value?.length?t.filter(p=>typeof p=="object"?p[N?.length?N:c].includes(r?.target?.value):p.includes(r?.target?.value)):t;k(b),_(r?.target?.value),C||L(!0)};return we(O,y,F),a.jsxs("div",{className:`nariaSelect ${E?"nariaSelect-disabled":""} ${j?.wrapper}`,children:[a.jsxs("label",{className:`cursor-pointer
|
|
23
|
+
${j?.label}
|
|
24
|
+
${o&&"!text-danger-100"}`,children:[a.jsx("span",{className:j?.title,children:d}),x?a.jsxs("div",{className:"nariaSearchInput",children:[a.jsx("input",{ref:y,placeholder:g?.length?g:"Select",className:`${f?"text-dark-100":"text-grey-300"}
|
|
25
|
+
${o&&"!border-danger-100 focus:border-danger-100 outline-danger-100"}`,value:B,disabled:E,type:"text",onClick:A,onChange:i}),C?a.jsx(ne,{className:"nariaSearchIcon"}):a.jsx(te,{className:`nariaArrowIcon ${C?"nariaArrowIcon-rotate-180":""}`})]}):a.jsxs("button",{type:"button",ref:y,disabled:E,className:`nariaHandler ${f?"text-dark-100":"text-grey-300"}
|
|
26
|
+
${o&&"!border-danger-100 focus:border-danger-100 outline-danger-100"}`,onClick:A,children:[f?c?.length?f[c]:f:g?.length?g:"Select"," ",a.jsx(te,{className:`nariaArrowIcon ${C?"nariaArrowIcon-rotate-180":""}`})]})]}),C?a.jsxs("div",{className:`nariaListWrapper ${S<768?"nariaListWrapper-mobile":""}`,ref:O,children:[x&&S<768?a.jsxs("div",{className:"nariaSearchInput",children:[a.jsx("input",{ref:y,placeholder:g?.length?g:"Select",className:`${f?"text-dark-100":"text-grey-300"}
|
|
27
|
+
${o&&"!border-danger-100 focus:border-danger-100 outline-danger-100"}`,value:B,disabled:E,type:"text",onChange:i}),a.jsx(ne,{className:"nariaSearchIcon"})]}):void 0,a.jsx("div",{className:`nariaList ${S<768?"nariaList-mobile":"nariaList-desktop"}`,onScroll:n,children:u&&G?a.jsx("div",{className:"nariaLoadingWrapper",children:a.jsx(ae,{})}):a.jsxs(a.Fragment,{children:[S<768?a.jsx("div",{className:"sticky top-0 text-left",children:a.jsx("button",{className:"p-3",onClick:F,disabled:E,children:a.jsx(de,{className:"w-6"})})}):void 0,T?.length?a.jsx(a.Fragment,{children:T?.map((r,b)=>a.jsx("button",{type:"button",onClick:()=>J(r),disabled:E,className:`text-right py-2.5 px-4 text-base hover:bg-grey-100 rounded-lg ${e(r)}`,children:c?.length?r[c]:r},b.toString()))}):a.jsx("div",{children:"No Data"}),v.isLoading?a.jsx("div",{className:"nariaLoadingMoreWrapper",children:a.jsx(ae,{})}):void 0]})})]}):void 0,o&&a.jsx("p",{className:"text-xs mt-1 text-danger-100",children:o})]})};function be(t){return t.charAt(0).toUpperCase()+t.slice(1)}exports.Button=ue;exports.Input=fe;exports.Select=ve;exports.capitalize=be;
|
package/dist/naria-ui.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import ie, { useState as
|
|
1
|
+
import * as I from "react";
|
|
2
|
+
import ie, { useState as L, useEffect as b, useRef as ee } from "react";
|
|
3
3
|
var G = { exports: {} }, H = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
@@ -14,10 +14,10 @@ var re;
|
|
|
14
14
|
function le() {
|
|
15
15
|
if (re) return H;
|
|
16
16
|
re = 1;
|
|
17
|
-
var t = Symbol.for("react.transitional.element"),
|
|
18
|
-
function
|
|
19
|
-
var
|
|
20
|
-
if (l !== void 0 && (
|
|
17
|
+
var t = Symbol.for("react.transitional.element"), c = Symbol.for("react.fragment");
|
|
18
|
+
function i(g, o, l) {
|
|
19
|
+
var p = null;
|
|
20
|
+
if (l !== void 0 && (p = "" + l), o.key !== void 0 && (p = "" + o.key), "key" in o) {
|
|
21
21
|
l = {};
|
|
22
22
|
for (var d in o)
|
|
23
23
|
d !== "key" && (l[d] = o[d]);
|
|
@@ -25,12 +25,12 @@ function le() {
|
|
|
25
25
|
return o = l.ref, {
|
|
26
26
|
$$typeof: t,
|
|
27
27
|
type: g,
|
|
28
|
-
key:
|
|
28
|
+
key: p,
|
|
29
29
|
ref: o !== void 0 ? o : null,
|
|
30
30
|
props: l
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return H.Fragment =
|
|
33
|
+
return H.Fragment = c, H.jsx = i, H.jsxs = i, H;
|
|
34
34
|
}
|
|
35
35
|
var J = {};
|
|
36
36
|
/**
|
|
@@ -48,38 +48,38 @@ function ue() {
|
|
|
48
48
|
function t(e) {
|
|
49
49
|
if (e == null) return null;
|
|
50
50
|
if (typeof e == "function")
|
|
51
|
-
return e.$$typeof ===
|
|
51
|
+
return e.$$typeof === S ? null : e.displayName || e.name || null;
|
|
52
52
|
if (typeof e == "string") return e;
|
|
53
53
|
switch (e) {
|
|
54
|
-
case
|
|
54
|
+
case C:
|
|
55
55
|
return "Fragment";
|
|
56
|
-
case
|
|
56
|
+
case k:
|
|
57
57
|
return "Profiler";
|
|
58
|
-
case
|
|
58
|
+
case q:
|
|
59
59
|
return "StrictMode";
|
|
60
|
-
case
|
|
60
|
+
case u:
|
|
61
61
|
return "Suspense";
|
|
62
|
-
case
|
|
62
|
+
case M:
|
|
63
63
|
return "SuspenseList";
|
|
64
|
-
case
|
|
64
|
+
case B:
|
|
65
65
|
return "Activity";
|
|
66
66
|
}
|
|
67
67
|
if (typeof e == "object")
|
|
68
68
|
switch (typeof e.tag == "number" && console.error(
|
|
69
69
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
70
|
), e.$$typeof) {
|
|
71
|
-
case
|
|
71
|
+
case W:
|
|
72
72
|
return "Portal";
|
|
73
|
-
case Y:
|
|
74
|
-
return (e.displayName || "Context") + ".Provider";
|
|
75
73
|
case X:
|
|
74
|
+
return (e.displayName || "Context") + ".Provider";
|
|
75
|
+
case A:
|
|
76
76
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
77
|
-
case
|
|
77
|
+
case Y:
|
|
78
78
|
var n = e.render;
|
|
79
79
|
return e = e.displayName, e || (e = n.displayName || n.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
80
80
|
case T:
|
|
81
81
|
return n = e.displayName || null, n !== null ? n : t(e.type) || "Memo";
|
|
82
|
-
case
|
|
82
|
+
case _:
|
|
83
83
|
n = e._payload, e = e._init;
|
|
84
84
|
try {
|
|
85
85
|
return t(e(n));
|
|
@@ -88,29 +88,29 @@ function ue() {
|
|
|
88
88
|
}
|
|
89
89
|
return null;
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function c(e) {
|
|
92
92
|
return "" + e;
|
|
93
93
|
}
|
|
94
|
-
function
|
|
94
|
+
function i(e) {
|
|
95
95
|
try {
|
|
96
|
-
|
|
96
|
+
c(e);
|
|
97
97
|
var n = !1;
|
|
98
98
|
} catch {
|
|
99
99
|
n = !0;
|
|
100
100
|
}
|
|
101
101
|
if (n) {
|
|
102
102
|
n = console;
|
|
103
|
-
var
|
|
104
|
-
return
|
|
103
|
+
var s = n.error, r = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
104
|
+
return s.call(
|
|
105
105
|
n,
|
|
106
106
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
107
|
-
|
|
108
|
-
),
|
|
107
|
+
r
|
|
108
|
+
), c(e);
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
111
|
function g(e) {
|
|
112
|
-
if (e ===
|
|
113
|
-
if (typeof e == "object" && e !== null && e.$$typeof ===
|
|
112
|
+
if (e === C) return "<>";
|
|
113
|
+
if (typeof e == "object" && e !== null && e.$$typeof === _)
|
|
114
114
|
return "<...>";
|
|
115
115
|
try {
|
|
116
116
|
var n = t(e);
|
|
@@ -120,45 +120,45 @@ function ue() {
|
|
|
120
120
|
}
|
|
121
121
|
}
|
|
122
122
|
function o() {
|
|
123
|
-
var e =
|
|
123
|
+
var e = w.A;
|
|
124
124
|
return e === null ? null : e.getOwner();
|
|
125
125
|
}
|
|
126
126
|
function l() {
|
|
127
127
|
return Error("react-stack-top-frame");
|
|
128
128
|
}
|
|
129
|
-
function
|
|
130
|
-
if (
|
|
129
|
+
function p(e) {
|
|
130
|
+
if (D.call(e, "key")) {
|
|
131
131
|
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
132
132
|
if (n && n.isReactWarning) return !1;
|
|
133
133
|
}
|
|
134
134
|
return e.key !== void 0;
|
|
135
135
|
}
|
|
136
136
|
function d(e, n) {
|
|
137
|
-
function
|
|
138
|
-
|
|
137
|
+
function s() {
|
|
138
|
+
N || (N = !0, console.error(
|
|
139
139
|
"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
|
|
140
140
|
n
|
|
141
141
|
));
|
|
142
142
|
}
|
|
143
|
-
|
|
144
|
-
get:
|
|
143
|
+
s.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
144
|
+
get: s,
|
|
145
145
|
configurable: !0
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
148
|
function E() {
|
|
149
149
|
var e = t(this.type);
|
|
150
|
-
return
|
|
150
|
+
return F[e] || (F[e] = !0, console.error(
|
|
151
151
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
152
152
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
153
153
|
}
|
|
154
|
-
function m(e, n,
|
|
155
|
-
return
|
|
156
|
-
$$typeof:
|
|
154
|
+
function m(e, n, s, r, v, h, Z, Q) {
|
|
155
|
+
return s = h.ref, e = {
|
|
156
|
+
$$typeof: z,
|
|
157
157
|
type: e,
|
|
158
158
|
key: n,
|
|
159
|
-
props:
|
|
160
|
-
_owner:
|
|
161
|
-
}, (
|
|
159
|
+
props: h,
|
|
160
|
+
_owner: v
|
|
161
|
+
}, (s !== void 0 ? s : null) !== null ? Object.defineProperty(e, "ref", {
|
|
162
162
|
enumerable: !1,
|
|
163
163
|
get: E
|
|
164
164
|
}) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
|
|
@@ -183,94 +183,94 @@ function ue() {
|
|
|
183
183
|
value: Q
|
|
184
184
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function y(e, n, s, r, v, h, Z, Q) {
|
|
187
187
|
var f = n.children;
|
|
188
188
|
if (f !== void 0)
|
|
189
|
-
if (
|
|
190
|
-
if (
|
|
191
|
-
for (
|
|
192
|
-
|
|
189
|
+
if (r)
|
|
190
|
+
if (j(f)) {
|
|
191
|
+
for (r = 0; r < f.length; r++)
|
|
192
|
+
x(f[r]);
|
|
193
193
|
Object.freeze && Object.freeze(f);
|
|
194
194
|
} else
|
|
195
195
|
console.error(
|
|
196
196
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
197
197
|
);
|
|
198
|
-
else
|
|
199
|
-
if (
|
|
198
|
+
else x(f);
|
|
199
|
+
if (D.call(n, "key")) {
|
|
200
200
|
f = t(e);
|
|
201
|
-
var
|
|
201
|
+
var $ = Object.keys(n).filter(function(ce) {
|
|
202
202
|
return ce !== "key";
|
|
203
203
|
});
|
|
204
|
-
|
|
204
|
+
r = 0 < $.length ? "{key: someKey, " + $.join(": ..., ") + ": ...}" : "{key: someKey}", V[f + r] || ($ = 0 < $.length ? "{" + $.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
205
205
|
`A props object containing a "key" prop is being spread into JSX:
|
|
206
206
|
let props = %s;
|
|
207
207
|
<%s {...props} />
|
|
208
208
|
React keys must be passed directly to JSX without using spread:
|
|
209
209
|
let props = %s;
|
|
210
210
|
<%s key={someKey} {...props} />`,
|
|
211
|
-
|
|
211
|
+
r,
|
|
212
212
|
f,
|
|
213
|
-
|
|
213
|
+
$,
|
|
214
214
|
f
|
|
215
|
-
), V[f +
|
|
215
|
+
), V[f + r] = !0);
|
|
216
216
|
}
|
|
217
|
-
if (f = null,
|
|
218
|
-
|
|
217
|
+
if (f = null, s !== void 0 && (i(s), f = "" + s), p(n) && (i(n.key), f = "" + n.key), "key" in n) {
|
|
218
|
+
s = {};
|
|
219
219
|
for (var K in n)
|
|
220
|
-
K !== "key" && (
|
|
221
|
-
} else
|
|
220
|
+
K !== "key" && (s[K] = n[K]);
|
|
221
|
+
} else s = n;
|
|
222
222
|
return f && d(
|
|
223
|
-
|
|
223
|
+
s,
|
|
224
224
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
225
225
|
), m(
|
|
226
226
|
e,
|
|
227
227
|
f,
|
|
228
|
-
|
|
229
|
-
|
|
228
|
+
h,
|
|
229
|
+
v,
|
|
230
230
|
o(),
|
|
231
|
-
|
|
231
|
+
s,
|
|
232
232
|
Z,
|
|
233
233
|
Q
|
|
234
234
|
);
|
|
235
235
|
}
|
|
236
|
-
function
|
|
237
|
-
typeof e == "object" && e !== null && e.$$typeof ===
|
|
236
|
+
function x(e) {
|
|
237
|
+
typeof e == "object" && e !== null && e.$$typeof === z && e._store && (e._store.validated = 1);
|
|
238
238
|
}
|
|
239
|
-
var
|
|
239
|
+
var R = ie, z = Symbol.for("react.transitional.element"), W = Symbol.for("react.portal"), C = Symbol.for("react.fragment"), q = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), A = Symbol.for("react.consumer"), X = Symbol.for("react.context"), Y = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), M = Symbol.for("react.suspense_list"), T = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), B = Symbol.for("react.activity"), S = Symbol.for("react.client.reference"), w = R.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, D = Object.prototype.hasOwnProperty, j = Array.isArray, O = console.createTask ? console.createTask : function() {
|
|
240
240
|
return null;
|
|
241
241
|
};
|
|
242
|
-
|
|
242
|
+
R = {
|
|
243
243
|
"react-stack-bottom-frame": function(e) {
|
|
244
244
|
return e();
|
|
245
245
|
}
|
|
246
246
|
};
|
|
247
|
-
var
|
|
248
|
-
|
|
247
|
+
var N, F = {}, P = R["react-stack-bottom-frame"].bind(
|
|
248
|
+
R,
|
|
249
249
|
l
|
|
250
|
-
)(),
|
|
251
|
-
J.Fragment =
|
|
252
|
-
var
|
|
253
|
-
return
|
|
250
|
+
)(), U = O(g(l)), V = {};
|
|
251
|
+
J.Fragment = C, J.jsx = function(e, n, s, r, v) {
|
|
252
|
+
var h = 1e4 > w.recentlyCreatedOwnerStacks++;
|
|
253
|
+
return y(
|
|
254
254
|
e,
|
|
255
255
|
n,
|
|
256
|
-
|
|
256
|
+
s,
|
|
257
257
|
!1,
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
258
|
+
r,
|
|
259
|
+
v,
|
|
260
|
+
h ? Error("react-stack-top-frame") : P,
|
|
261
|
+
h ? O(g(e)) : U
|
|
262
262
|
);
|
|
263
|
-
}, J.jsxs = function(e, n,
|
|
264
|
-
var
|
|
265
|
-
return
|
|
263
|
+
}, J.jsxs = function(e, n, s, r, v) {
|
|
264
|
+
var h = 1e4 > w.recentlyCreatedOwnerStacks++;
|
|
265
|
+
return y(
|
|
266
266
|
e,
|
|
267
267
|
n,
|
|
268
|
-
|
|
268
|
+
s,
|
|
269
269
|
!0,
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
r,
|
|
271
|
+
v,
|
|
272
|
+
h ? Error("react-stack-top-frame") : P,
|
|
273
|
+
h ? O(g(e)) : U
|
|
274
274
|
);
|
|
275
275
|
};
|
|
276
276
|
}()), J;
|
|
@@ -280,49 +280,49 @@ function de() {
|
|
|
280
280
|
return ne || (ne = 1, process.env.NODE_ENV === "production" ? G.exports = le() : G.exports = ue()), G.exports;
|
|
281
281
|
}
|
|
282
282
|
var a = de();
|
|
283
|
-
const xe = ({ type: t = "button", value:
|
|
283
|
+
const xe = ({ type: t = "button", value: c }) => /* @__PURE__ */ a.jsx("button", { type: t, children: c }), be = ({
|
|
284
284
|
type: t = "text",
|
|
285
|
-
placeholder:
|
|
286
|
-
wrapperClass:
|
|
285
|
+
placeholder: c,
|
|
286
|
+
wrapperClass: i = "",
|
|
287
287
|
labelClass: g = "",
|
|
288
288
|
inputClass: o = "",
|
|
289
289
|
errorClass: l = "",
|
|
290
|
-
label:
|
|
290
|
+
label: p,
|
|
291
291
|
hasError: d,
|
|
292
292
|
register: E,
|
|
293
293
|
name: m,
|
|
294
|
-
isDisabled:
|
|
295
|
-
autocomplete:
|
|
296
|
-
...
|
|
297
|
-
}) => /* @__PURE__ */ a.jsxs("div", { className:
|
|
294
|
+
isDisabled: y = !1,
|
|
295
|
+
autocomplete: x = !1,
|
|
296
|
+
...R
|
|
297
|
+
}) => /* @__PURE__ */ a.jsxs("div", { className: i, children: [
|
|
298
298
|
/* @__PURE__ */ a.jsxs(
|
|
299
299
|
"label",
|
|
300
300
|
{
|
|
301
301
|
htmlFor: m,
|
|
302
302
|
className: `${g} ${d && "error"}`,
|
|
303
303
|
children: [
|
|
304
|
-
|
|
304
|
+
p,
|
|
305
305
|
/* @__PURE__ */ a.jsx(
|
|
306
306
|
"input",
|
|
307
307
|
{
|
|
308
|
-
disabled:
|
|
309
|
-
autoComplete:
|
|
308
|
+
disabled: y,
|
|
309
|
+
autoComplete: x ? "on" : "off",
|
|
310
310
|
id: m,
|
|
311
311
|
...E,
|
|
312
|
-
...
|
|
312
|
+
...R,
|
|
313
313
|
type: t,
|
|
314
314
|
name: m,
|
|
315
315
|
className: `${o} ${d && "error"} ${l}`,
|
|
316
|
-
placeholder:
|
|
316
|
+
placeholder: c
|
|
317
317
|
}
|
|
318
318
|
)
|
|
319
319
|
]
|
|
320
320
|
}
|
|
321
321
|
),
|
|
322
322
|
d && /* @__PURE__ */ a.jsx("p", { className: l, children: d })
|
|
323
|
-
] }), ae = (t) => /* @__PURE__ */
|
|
324
|
-
const [t,
|
|
325
|
-
return b(() => (window.addEventListener("resize",
|
|
323
|
+
] }), ae = (t) => /* @__PURE__ */ I.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", fill: "currentColor", ...t }, /* @__PURE__ */ I.createElement("path", { fill: "currentColor", d: "M209.5 369c-9.4 9.4-24.6 9.4-33.9 0L15.5 209c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l143 143 143-143c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-160 160z" })), fe = (t) => /* @__PURE__ */ I.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 384 512", fill: "currentColor", ...t }, /* @__PURE__ */ I.createElement("path", { fill: "currentColor", d: "M7.5 105c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l151 151 151-151c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-151 151 151 151c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-151-151-151 151c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l151-151-151-151z" })), oe = (t) => /* @__PURE__ */ I.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 512 512", fill: "currentColor", ...t }, /* @__PURE__ */ I.createElement("path", { fill: "currentColor", d: "M368 208a160 160 0 1 0 -320 0 160 160 0 1 0 320 0zM337.1 371.1C301.7 399.2 256.8 416 208 416 93.1 416 0 322.9 0 208S93.1 0 208 0 416 93.1 416 208c0 48.8-16.8 93.7-44.9 129.1L505 471c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L337.1 371.1z" })), ge = () => {
|
|
324
|
+
const [t, c] = L(typeof window < "u" ? window.innerWidth : 0), i = () => c(typeof window < "u" ? window.innerWidth : 0);
|
|
325
|
+
return b(() => (window.addEventListener("resize", i), () => window.removeEventListener("resize", i)), [t]), t;
|
|
326
326
|
}, se = ({
|
|
327
327
|
classNames: t = {
|
|
328
328
|
wrapper: "",
|
|
@@ -365,50 +365,55 @@ const xe = ({ type: t = "button", value: s }) => /* @__PURE__ */ a.jsx("button",
|
|
|
365
365
|
}, he = (t) => {
|
|
366
366
|
window.location.hash = t;
|
|
367
367
|
}, pe = (t) => {
|
|
368
|
-
const [
|
|
368
|
+
const [c, i] = L(!1);
|
|
369
369
|
return b(() => {
|
|
370
370
|
const g = (o) => {
|
|
371
|
-
window.location.hash !== t ?
|
|
371
|
+
window.location.hash !== t ? i(!0) : i(!1);
|
|
372
372
|
};
|
|
373
373
|
return window.addEventListener("hashchange", g), () => {
|
|
374
374
|
window.removeEventListener("hashchange", g);
|
|
375
375
|
};
|
|
376
|
-
}, []),
|
|
377
|
-
}, we = (t,
|
|
376
|
+
}, []), c;
|
|
377
|
+
}, we = (t, c, i) => {
|
|
378
378
|
b(() => {
|
|
379
379
|
function g(o) {
|
|
380
|
-
|
|
380
|
+
c.current && !c.current.contains(o.target) && t?.current && !t?.current.contains(o.target) && i();
|
|
381
381
|
}
|
|
382
382
|
return document.addEventListener("mousedown", g), () => {
|
|
383
383
|
document.removeEventListener("mousedown", g);
|
|
384
384
|
};
|
|
385
|
-
}, [t,
|
|
385
|
+
}, [t, i]);
|
|
386
386
|
}, Ee = ({
|
|
387
387
|
options: t,
|
|
388
|
-
label:
|
|
389
|
-
hasError:
|
|
388
|
+
label: c,
|
|
389
|
+
hasError: i,
|
|
390
390
|
title: g,
|
|
391
391
|
value: o,
|
|
392
392
|
api: l,
|
|
393
|
-
selected:
|
|
393
|
+
selected: p,
|
|
394
394
|
placeholder: d,
|
|
395
395
|
disabled: E = !1,
|
|
396
396
|
pagination: m,
|
|
397
|
-
optionFilterLabel:
|
|
398
|
-
hasSearch:
|
|
399
|
-
|
|
397
|
+
optionFilterLabel: y,
|
|
398
|
+
hasSearch: x = !1,
|
|
399
|
+
classNames: R = {
|
|
400
|
+
wrapper: "",
|
|
401
|
+
label: "",
|
|
402
|
+
title: ""
|
|
403
|
+
},
|
|
404
|
+
onSelectChange: z
|
|
400
405
|
}) => {
|
|
401
|
-
let
|
|
402
|
-
const
|
|
406
|
+
let W = !0;
|
|
407
|
+
const C = ge(), q = pe("#select"), [k, A] = L(!1), [X, Y] = L(!0), [u, M] = L(null), [T, _] = L(null), [B, S] = L(""), [w, D] = L({
|
|
403
408
|
page: 1,
|
|
404
409
|
pageLabel: "page",
|
|
405
410
|
size: 20,
|
|
406
411
|
sizeLabel: "size",
|
|
407
412
|
isLoading: !1
|
|
408
|
-
}),
|
|
409
|
-
if (
|
|
413
|
+
}), j = ee(void 0), O = ee(void 0), N = ee(void 0), F = async () => {
|
|
414
|
+
if (j?.current)
|
|
410
415
|
try {
|
|
411
|
-
const r = await fetch(
|
|
416
|
+
const r = await fetch(j?.current);
|
|
412
417
|
if (!r.ok)
|
|
413
418
|
throw new Error(`Response status: ${r.status}`);
|
|
414
419
|
return await r.json();
|
|
@@ -417,88 +422,89 @@ const xe = ({ type: t = "button", value: s }) => /* @__PURE__ */ a.jsx("button",
|
|
|
417
422
|
}
|
|
418
423
|
};
|
|
419
424
|
b(() => () => {
|
|
420
|
-
|
|
425
|
+
W = !1;
|
|
421
426
|
}, []), b(() => {
|
|
422
427
|
if (l?.length) {
|
|
423
|
-
if (
|
|
428
|
+
if (j.current = l, j.current.includes(m?.pageLabel || "page")) {
|
|
424
429
|
const r = new URL(l);
|
|
425
|
-
r.searchParams.set(m?.pageLabel || "page", (m?.page ||
|
|
430
|
+
r.searchParams.set(m?.pageLabel || "page", (m?.page || w.page).toString()), r.searchParams.set(m?.sizeLabel || "size", (m?.size || w.size).toString()), j.current = r.href;
|
|
426
431
|
}
|
|
427
432
|
Y(!0), F().then((r) => {
|
|
428
|
-
|
|
433
|
+
W && (Y(!1), _(r));
|
|
429
434
|
});
|
|
430
435
|
}
|
|
431
436
|
}, [l, m]), b(() => {
|
|
432
|
-
if (
|
|
433
|
-
if (
|
|
434
|
-
const r = new URL(
|
|
435
|
-
r.searchParams.set(m?.pageLabel || "page",
|
|
437
|
+
if (w.isLoading) {
|
|
438
|
+
if (j.current.includes(m?.pageLabel || "page")) {
|
|
439
|
+
const r = new URL(j.current);
|
|
440
|
+
r.searchParams.set(m?.pageLabel || "page", w.page.toString()), j.current = r.href;
|
|
436
441
|
}
|
|
437
442
|
F().then((r) => {
|
|
438
|
-
|
|
439
|
-
...
|
|
443
|
+
W && (Y(!1), D({
|
|
444
|
+
...w,
|
|
440
445
|
isLoading: !1
|
|
441
|
-
}),
|
|
442
|
-
...
|
|
446
|
+
}), _([
|
|
447
|
+
...T,
|
|
443
448
|
...r
|
|
444
449
|
]));
|
|
445
450
|
});
|
|
446
451
|
}
|
|
447
|
-
}, [
|
|
448
|
-
|
|
449
|
-
}, [
|
|
450
|
-
|
|
451
|
-
}, [
|
|
452
|
-
u &&
|
|
452
|
+
}, [w]), b(() => {
|
|
453
|
+
C < 768 && (k ? (he("select"), document.body.style.overflow = "hidden", N.current?.focus()) : (window.location.hash && !document.referrer.includes("#") && me(), document.body.style.overflow = "auto"));
|
|
454
|
+
}, [k]), b(() => {
|
|
455
|
+
p && t?.length && (t?.find((r) => r[c] === p) ? M(t?.find((r) => r[c] === p)) : M(p));
|
|
456
|
+
}, [p]), b(() => {
|
|
457
|
+
u && x && (o?.length && T?.find((r) => r[c] === u[c]) ? S(T?.find((r) => r[c] === u[c])[o] || "") : S(u));
|
|
453
458
|
}, [u]), b(() => {
|
|
454
|
-
|
|
455
|
-
}, [
|
|
456
|
-
t?.length &&
|
|
459
|
+
q && A(!1);
|
|
460
|
+
}, [q]), b(() => {
|
|
461
|
+
t?.length && _(t);
|
|
457
462
|
}, [t]);
|
|
458
|
-
const
|
|
459
|
-
|
|
463
|
+
const P = () => {
|
|
464
|
+
x && _(t), A((r) => !r);
|
|
460
465
|
}, U = () => {
|
|
461
|
-
|
|
462
|
-
}, B = (r) => {
|
|
463
|
-
w && (o?.length ? k(r[o]) : k(r)), M(r), I(), j && j(r);
|
|
466
|
+
x && (_(t), S(typeof u == "string" ? u : u ? u[o] : "")), A(!1);
|
|
464
467
|
}, V = (r) => {
|
|
468
|
+
x && (o?.length ? S(r[o]) : S(r)), M(r), P(), z && z(r);
|
|
469
|
+
}, e = (r) => {
|
|
465
470
|
if (!u)
|
|
466
471
|
return "";
|
|
467
|
-
if (
|
|
472
|
+
if (c?.length && r[c] === u[c] || r === u)
|
|
468
473
|
return "bg-grey-100";
|
|
469
|
-
},
|
|
470
|
-
l?.length &&
|
|
471
|
-
page:
|
|
474
|
+
}, n = (r) => {
|
|
475
|
+
l?.length && T?.length && !w.isLoading && r.target.offsetHeight + r.target.scrollTop >= r.target.scrollHeight - 100 && D({
|
|
476
|
+
page: w.page + 1,
|
|
472
477
|
isLoading: !0
|
|
473
478
|
});
|
|
474
|
-
},
|
|
475
|
-
const
|
|
476
|
-
|
|
479
|
+
}, s = (r) => {
|
|
480
|
+
const v = r?.target?.value?.length ? t.filter((h) => typeof h == "object" ? h[y?.length ? y : o].includes(r?.target?.value) : h.includes(r?.target?.value)) : t;
|
|
481
|
+
_(v), S(r?.target?.value), k || A(!0);
|
|
477
482
|
};
|
|
478
|
-
return we(
|
|
483
|
+
return we(O, N, U), /* @__PURE__ */ a.jsxs("div", { className: `nariaSelect ${E ? "nariaSelect-disabled" : ""} ${R?.wrapper}`, children: [
|
|
479
484
|
/* @__PURE__ */ a.jsxs(
|
|
480
485
|
"label",
|
|
481
486
|
{
|
|
482
487
|
className: `cursor-pointer
|
|
483
|
-
${
|
|
488
|
+
${R?.label}
|
|
489
|
+
${i && "!text-danger-100"}`,
|
|
484
490
|
children: [
|
|
485
|
-
/* @__PURE__ */ a.jsx("span", { className:
|
|
486
|
-
|
|
491
|
+
/* @__PURE__ */ a.jsx("span", { className: R?.title, children: g }),
|
|
492
|
+
x ? /* @__PURE__ */ a.jsxs("div", { className: "nariaSearchInput", children: [
|
|
487
493
|
/* @__PURE__ */ a.jsx(
|
|
488
494
|
"input",
|
|
489
495
|
{
|
|
490
|
-
ref:
|
|
496
|
+
ref: N,
|
|
491
497
|
placeholder: d?.length ? d : "Select",
|
|
492
498
|
className: `${u ? "text-dark-100" : "text-grey-300"}
|
|
493
|
-
${
|
|
494
|
-
value:
|
|
499
|
+
${i && "!border-danger-100 focus:border-danger-100 outline-danger-100"}`,
|
|
500
|
+
value: B,
|
|
495
501
|
disabled: E,
|
|
496
502
|
type: "text",
|
|
497
|
-
onClick:
|
|
498
|
-
onChange:
|
|
503
|
+
onClick: P,
|
|
504
|
+
onChange: s
|
|
499
505
|
}
|
|
500
506
|
),
|
|
501
|
-
|
|
507
|
+
k ? /* @__PURE__ */ a.jsx(
|
|
502
508
|
oe,
|
|
503
509
|
{
|
|
504
510
|
className: "nariaSearchIcon"
|
|
@@ -506,25 +512,25 @@ const xe = ({ type: t = "button", value: s }) => /* @__PURE__ */ a.jsx("button",
|
|
|
506
512
|
) : /* @__PURE__ */ a.jsx(
|
|
507
513
|
ae,
|
|
508
514
|
{
|
|
509
|
-
className: `nariaArrowIcon ${
|
|
515
|
+
className: `nariaArrowIcon ${k ? "nariaArrowIcon-rotate-180" : ""}`
|
|
510
516
|
}
|
|
511
517
|
)
|
|
512
518
|
] }) : /* @__PURE__ */ a.jsxs(
|
|
513
519
|
"button",
|
|
514
520
|
{
|
|
515
521
|
type: "button",
|
|
516
|
-
ref:
|
|
522
|
+
ref: N,
|
|
517
523
|
disabled: E,
|
|
518
524
|
className: `nariaHandler ${u ? "text-dark-100" : "text-grey-300"}
|
|
519
|
-
${
|
|
520
|
-
onClick:
|
|
525
|
+
${i && "!border-danger-100 focus:border-danger-100 outline-danger-100"}`,
|
|
526
|
+
onClick: P,
|
|
521
527
|
children: [
|
|
522
528
|
u ? o?.length ? u[o] : u : d?.length ? d : "Select",
|
|
523
529
|
" ",
|
|
524
530
|
/* @__PURE__ */ a.jsx(
|
|
525
531
|
ae,
|
|
526
532
|
{
|
|
527
|
-
className: `nariaArrowIcon ${
|
|
533
|
+
className: `nariaArrowIcon ${k ? "nariaArrowIcon-rotate-180" : ""}`
|
|
528
534
|
}
|
|
529
535
|
)
|
|
530
536
|
]
|
|
@@ -533,24 +539,24 @@ const xe = ({ type: t = "button", value: s }) => /* @__PURE__ */ a.jsx("button",
|
|
|
533
539
|
]
|
|
534
540
|
}
|
|
535
541
|
),
|
|
536
|
-
|
|
542
|
+
k ? /* @__PURE__ */ a.jsxs(
|
|
537
543
|
"div",
|
|
538
544
|
{
|
|
539
|
-
className: `nariaListWrapper ${
|
|
540
|
-
ref:
|
|
545
|
+
className: `nariaListWrapper ${C < 768 ? "nariaListWrapper-mobile" : ""}`,
|
|
546
|
+
ref: O,
|
|
541
547
|
children: [
|
|
542
|
-
|
|
548
|
+
x && C < 768 ? /* @__PURE__ */ a.jsxs("div", { className: "nariaSearchInput", children: [
|
|
543
549
|
/* @__PURE__ */ a.jsx(
|
|
544
550
|
"input",
|
|
545
551
|
{
|
|
546
|
-
ref:
|
|
552
|
+
ref: N,
|
|
547
553
|
placeholder: d?.length ? d : "Select",
|
|
548
554
|
className: `${u ? "text-dark-100" : "text-grey-300"}
|
|
549
|
-
${
|
|
550
|
-
value:
|
|
555
|
+
${i && "!border-danger-100 focus:border-danger-100 outline-danger-100"}`,
|
|
556
|
+
value: B,
|
|
551
557
|
disabled: E,
|
|
552
558
|
type: "text",
|
|
553
|
-
onChange:
|
|
559
|
+
onChange: s
|
|
554
560
|
}
|
|
555
561
|
),
|
|
556
562
|
/* @__PURE__ */ a.jsx(
|
|
@@ -563,29 +569,29 @@ const xe = ({ type: t = "button", value: s }) => /* @__PURE__ */ a.jsx("button",
|
|
|
563
569
|
/* @__PURE__ */ a.jsx(
|
|
564
570
|
"div",
|
|
565
571
|
{
|
|
566
|
-
className: `nariaList ${
|
|
567
|
-
onScroll:
|
|
572
|
+
className: `nariaList ${C < 768 ? "nariaList-mobile" : "nariaList-desktop"}`,
|
|
573
|
+
onScroll: n,
|
|
568
574
|
children: l && X ? /* @__PURE__ */ a.jsx("div", { className: "nariaLoadingWrapper", children: /* @__PURE__ */ a.jsx(se, {}) }) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
569
|
-
|
|
570
|
-
|
|
575
|
+
C < 768 ? /* @__PURE__ */ a.jsx("div", { className: "sticky top-0 text-left", children: /* @__PURE__ */ a.jsx("button", { className: "p-3", onClick: U, disabled: E, children: /* @__PURE__ */ a.jsx(fe, { className: "w-6" }) }) }) : void 0,
|
|
576
|
+
T?.length ? /* @__PURE__ */ a.jsx(a.Fragment, { children: T?.map((r, v) => /* @__PURE__ */ a.jsx(
|
|
571
577
|
"button",
|
|
572
578
|
{
|
|
573
579
|
type: "button",
|
|
574
|
-
onClick: () =>
|
|
580
|
+
onClick: () => V(r),
|
|
575
581
|
disabled: E,
|
|
576
|
-
className: `text-right py-2.5 px-4 text-base hover:bg-grey-100 rounded-lg ${
|
|
582
|
+
className: `text-right py-2.5 px-4 text-base hover:bg-grey-100 rounded-lg ${e(r)}`,
|
|
577
583
|
children: o?.length ? r[o] : r
|
|
578
584
|
},
|
|
579
|
-
|
|
585
|
+
v.toString()
|
|
580
586
|
)) }) : /* @__PURE__ */ a.jsx("div", { children: "No Data" }),
|
|
581
|
-
|
|
587
|
+
w.isLoading ? /* @__PURE__ */ a.jsx("div", { className: "nariaLoadingMoreWrapper", children: /* @__PURE__ */ a.jsx(se, {}) }) : void 0
|
|
582
588
|
] })
|
|
583
589
|
}
|
|
584
590
|
)
|
|
585
591
|
]
|
|
586
592
|
}
|
|
587
593
|
) : void 0,
|
|
588
|
-
|
|
594
|
+
i && /* @__PURE__ */ a.jsx("p", { className: "text-xs mt-1 text-danger-100", children: i })
|
|
589
595
|
] });
|
|
590
596
|
};
|
|
591
597
|
function Re(t) {
|