forstok-ui-lib 1.0.13 → 1.0.14
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/index.d.ts +8 -1
- package/dist/index.js +28 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -22
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/index.ts +2 -1
- package/src/components/label/label.styles.ts +53 -0
- package/src/components/label/label.tsx +12 -0
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
1
|
+
import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as i}from"styled-components";function a(e,r){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&r.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var t=0;for(o=Object.getOwnPropertySymbols(e);t<o.length;t++)r.indexOf(o[t])<0&&Object.prototype.propertyIsEnumerable.call(e,o[t])&&(n[o[t]]=e[o[t]])}return n}"function"==typeof SuppressedError&&SuppressedError;var l,c={exports:{}},s={};var p,d,u={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.development.js
|
|
@@ -7,7 +7,7 @@ import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
|
7
7
|
*
|
|
8
8
|
* This source code is licensed under the MIT license found in the
|
|
9
9
|
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/function f(){return p||(p=1,"production"!==process.env.NODE_ENV&&function(){function r(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===z?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case j:return"Fragment";case _:return"Portal";case C:return"Profiler";case S:return"StrictMode";case A:return"Suspense";case L:return"SuspenseList"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case R:return(e.displayName||"Context")+".Provider";case O:return(e._context.displayName||"Context")+".Consumer";case E:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(n=e.displayName||null)?n:r(e.type)||"Memo";case F:n=e._payload,e=e._init;try{return r(e(n))}catch(e){}}return null}function n(e){return""+e}function o(e){try{n(e);var r=!1}catch(e){r=!0}if(r){var o=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),n(e)}}function t(){}function
|
|
10
|
+
*/function f(){return p||(p=1,"production"!==process.env.NODE_ENV&&function(){function r(e){if(null==e)return null;if("function"==typeof e)return e.$$typeof===z?null:e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case j:return"Fragment";case _:return"Portal";case C:return"Profiler";case S:return"StrictMode";case A:return"Suspense";case L:return"SuspenseList"}if("object"==typeof e)switch("number"==typeof e.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case R:return(e.displayName||"Context")+".Provider";case O:return(e._context.displayName||"Context")+".Consumer";case E:var n=e.render;return(e=e.displayName)||(e=""!==(e=n.displayName||n.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case N:return null!==(n=e.displayName||null)?n:r(e.type)||"Memo";case F:n=e._payload,e=e._init;try{return r(e(n))}catch(e){}}return null}function n(e){return""+e}function o(e){try{n(e);var r=!1}catch(e){r=!0}if(r){var o=(r=console).error,t="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",t),n(e)}}function t(){}function i(e){if(void 0===K)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);K=r&&r[1]||"",G=-1<e.stack.indexOf("\n at")?" (<anonymous>)":-1<e.stack.indexOf("@")?"@unknown:0:0":""}return"\n"+K+e+G}function a(e,r){if(!e||W)return"";var n=q.get(e);if(void 0!==n)return n;W=!0,n=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var o;o=I.H,I.H=null,function(){if(0===M){h=console.log,v=console.info,b=console.warn,m=console.error,y=console.group,x=console.groupCollapsed,w=console.groupEnd;var e={configurable:!0,enumerable:!0,value:t,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}M++}();try{var a={DetermineComponentFrameRoot:function(){try{if(r){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var o=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){o=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){o=e}(n=e())&&"function"==typeof n.catch&&n.catch((function(){}))}}catch(e){if(e&&o&&"string"==typeof e.stack)return[e.stack,o.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=a.DetermineComponentFrameRoot(),s=c[0],p=c[1];if(s&&p){var d=s.split("\n"),u=p.split("\n");for(c=l=0;l<d.length&&!d[l].includes("DetermineComponentFrameRoot");)l++;for(;c<u.length&&!u[c].includes("DetermineComponentFrameRoot");)c++;if(l===d.length||c===u.length)for(l=d.length-1,c=u.length-1;1<=l&&0<=c&&d[l]!==u[c];)c--;for(;1<=l&&0<=c;l--,c--)if(d[l]!==u[c]){if(1!==l||1!==c)do{if(l--,0>--c||d[l]!==u[c]){var f="\n"+d[l].replace(" at new "," at ");return e.displayName&&f.includes("<anonymous>")&&(f=f.replace("<anonymous>",e.displayName)),"function"==typeof e&&q.set(e,f),f}}while(1<=l&&0<=c);break}}}finally{W=!1,I.H=o,function(){if(0==--M){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:T({},e,{value:h}),info:T({},e,{value:v}),warn:T({},e,{value:b}),error:T({},e,{value:m}),group:T({},e,{value:y}),groupCollapsed:T({},e,{value:x}),groupEnd:T({},e,{value:w})})}0>M&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}(),Error.prepareStackTrace=n}return d=(d=e?e.displayName||e.name:"")?i(d):"","function"==typeof e&&q.set(e,d),d}function l(e){if(null==e)return"";if("function"==typeof e){var r=e.prototype;return a(e,!(!r||!r.isReactComponent))}if("string"==typeof e)return i(e);switch(e){case A:return i("Suspense");case L:return i("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case E:return e=a(e.render,!1);case N:return l(e.type);case F:r=e._payload,e=e._init;try{return l(e(r))}catch(e){}}return""}function c(){var e=I.A;return null===e?null:e.getOwner()}function s(){var e=r(this.type);return X[e]||(X[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.")),void 0!==(e=this.props.ref)?e:null}function p(e,n,t,i,a,l){if("string"==typeof e||"function"==typeof e||e===j||e===C||e===S||e===A||e===L||e===D||"object"==typeof e&&null!==e&&(e.$$typeof===F||e.$$typeof===N||e.$$typeof===R||e.$$typeof===O||e.$$typeof===E||e.$$typeof===U||void 0!==e.getModuleId)){var p=n.children;if(void 0!==p)if(i)if(V(p)){for(i=0;i<p.length;i++)d(p[i],e);Object.freeze&&Object.freeze(p)}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 d(p,e)}else p="",(void 0===e||"object"==typeof e&&null!==e&&0===Object.keys(e).length)&&(p+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),null===e?i="null":V(e)?i="array":void 0!==e&&e.$$typeof===$?(i="<"+(r(e.type)||"Unknown")+" />",p=" Did you accidentally export a JSX literal instead of a component?"):i=typeof e,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",i,p);if(B.call(n,"key")){p=r(e);var u=Object.keys(n).filter((function(e){return"key"!==e}));i=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",Y[p+i]||(u=0<u.length?"{"+u.join(": ..., ")+": ...}":"{}",console.error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',i,p,u,p),Y[p+i]=!0)}if(p=null,void 0!==t&&(o(t),p=""+t),function(e){if(B.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return void 0!==e.key}(n)&&(o(n.key),p=""+n.key),"key"in n)for(var f in t={},n)"key"!==f&&(t[f]=n[f]);else t=n;return p&&function(e,r){function n(){H||(H=!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)",r))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}(t,"function"==typeof e?e.displayName||e.name||"Unknown":e),function(e,r,n,o,t,i){return n=i.ref,e={$$typeof:$,type:e,key:r,props:i,_owner:t},null!==(void 0!==n?n:null)?Object.defineProperty(e,"ref",{enumerable:!1,get:s}):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.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}(e,p,l,0,c(),t)}function d(e,r){if("object"==typeof e&&e&&e.$$typeof!==J)if(V(e))for(var n=0;n<e.length;n++){var o=e[n];f(o)&&g(o,r)}else if(f(e))e._store&&(e._store.validated=1);else if(null===e||"object"!=typeof e?n=null:n="function"==typeof(n=P&&e[P]||e["@@iterator"])?n:null,"function"==typeof n&&n!==e.entries&&(n=n.call(e))!==e)for(;!(e=n.next()).done;)f(e.value)&&g(e.value,r)}function f(e){return"object"==typeof e&&null!==e&&e.$$typeof===$}function g(e,n){if(e._store&&!e._store.validated&&null==e.key&&(e._store.validated=1,n=function(e){var n="",o=c();return o&&(o=r(o.type))&&(n="\n\nCheck the render method of `"+o+"`."),n||(e=r(e))&&(n="\n\nCheck the top-level render call using <"+e+">."),n}(n),!Q[n])){Q[n]=!0;var o="";e&&null!=e._owner&&e._owner!==c()&&(o=null,"number"==typeof e._owner.tag?o=r(e._owner.type):"string"==typeof e._owner.name&&(o=e._owner.name),o=" It was passed a child from "+o+".");var t=I.getCurrentStack;I.getCurrentStack=function(){var r=l(e.type);return t&&(r+=t()||""),r},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',n,o),I.getCurrentStack=t}}var h,v,b,m,y,x,w,k=e,$=Symbol.for("react.transitional.element"),_=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),R=Symbol.for("react.context"),E=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),N=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),P=Symbol.iterator,z=Symbol.for("react.client.reference"),I=k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=Object.prototype.hasOwnProperty,T=Object.assign,U=Symbol.for("react.client.reference"),V=Array.isArray,M=0;t.__reactDisabledLog=!0;var K,G,H,W=!1,q=new("function"==typeof WeakMap?WeakMap:Map),J=Symbol.for("react.client.reference"),X={},Y={},Q={};u.Fragment=j,u.jsx=function(e,r,n,o,t){return p(e,r,n,!1,0,t)},u.jsxs=function(e,r,n,o,t){return p(e,r,n,!0,0,t)}}()),u}var g=(d||(d=1,"production"===process.env.NODE_ENV?c.exports=function(){if(l)return s;l=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(r,n,o){var t=null;if(void 0!==o&&(t=""+o),void 0!==n.key&&(t=""+n.key),"key"in n)for(var i in o={},n)"key"!==i&&(o[i]=n[i]);else o=n;return n=o.ref,{$$typeof:e,type:r,key:t,ref:void 0!==n?n:null,props:o}}return s.Fragment=r,s.jsx=n,s.jsxs=n,s}():c.exports=f()),c.exports);const h=i`
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
text-overflow: ellipsis;
|
|
13
13
|
white-space: nowrap;
|
|
@@ -21,20 +21,20 @@ import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
|
21
21
|
margin-left: 5px;
|
|
22
22
|
}
|
|
23
23
|
${({$color:e,$elipsis:r})=>{let n="";return"mute"===e?n+="\n color: var(--mt-clr);\n ":"blue"===e?n+="\n color: var(--pri-clr-lnk__hvr);\n ":"green"===e?n+="\n color: green;\n ":"red"===e?n+="\n color: var(--sta-clr);\n ":"grey"===e||"darkgrey"===e?n+="\n color: var(--mt-clr);\n ":"supergrey"===e?n+="\n color: #929291;\n ":"orange"===e?n+="\n color: orange;\n ":"black"===e?n+="\n color: #000000;\n ":"lightgreen"===e?n+="\n color: #21BA45;\n ":"mate"===e?n+="\n color: #495057;\n ":"initial"===e&&(n+="\n color: var(--pri-clr);\n "),r&&(n+=h),n}}
|
|
24
|
-
`,b=e=>{var{children:r,$color:n,$elipsis:o=!0}=e,t=
|
|
24
|
+
`,b=e=>{var{children:r,$color:n,$elipsis:o=!0}=e,t=a(e,["children","$color","$elipsis"]);return g.jsx(v,Object.assign({$elipsis:!!o,$color:n},t,{children:r}))};i`
|
|
25
25
|
list-style: none;
|
|
26
26
|
padding: 0;
|
|
27
27
|
margin: 0;
|
|
28
|
-
`,
|
|
28
|
+
`,i`
|
|
29
29
|
width: 100%;
|
|
30
|
-
`,
|
|
30
|
+
`,i`
|
|
31
31
|
overflow: hidden;
|
|
32
32
|
text-overflow: ellipsis;
|
|
33
33
|
white-space: nowrap;
|
|
34
34
|
display: block;
|
|
35
35
|
max-width: 100%;
|
|
36
36
|
width: auto;
|
|
37
|
-
`;const m=
|
|
37
|
+
`;const m=i`
|
|
38
38
|
display: -webkit-box !important;
|
|
39
39
|
-webkit-line-clamp: 2;
|
|
40
40
|
-webkit-box-orient: vertical;
|
|
@@ -43,7 +43,7 @@ import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
|
43
43
|
overflow-wrap: anywhere;
|
|
44
44
|
word-break: break-all;
|
|
45
45
|
line-height: 16px;
|
|
46
|
-
`;
|
|
46
|
+
`;i`
|
|
47
47
|
display: -webkit-box !important;
|
|
48
48
|
-webkit-line-clamp: 3 !important;
|
|
49
49
|
-webkit-box-orient: vertical !important;
|
|
@@ -52,27 +52,27 @@ import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
|
52
52
|
overflow-wrap: anywhere !important;
|
|
53
53
|
word-break: break-word !important;
|
|
54
54
|
line-height: 16px;
|
|
55
|
-
`,
|
|
55
|
+
`,i`
|
|
56
56
|
background-color: var(--pri-clr-bg);
|
|
57
57
|
box-shadow: var(--pri-shd-bx);
|
|
58
58
|
border-radius: var(--pri-rd);
|
|
59
59
|
border: 1px solid var(--lay-clr-ln);
|
|
60
|
-
`,
|
|
60
|
+
`,i`
|
|
61
61
|
background-color: var(--pri-clr-bg);
|
|
62
62
|
border: 1px solid var(--sec-clr-ln);
|
|
63
63
|
box-shadow: var(--sec-shd-bx);
|
|
64
64
|
border-radius: var(--sec-rd);
|
|
65
|
-
`,
|
|
65
|
+
`,i`
|
|
66
66
|
font-size: 12px;
|
|
67
67
|
font-weight: 600;
|
|
68
68
|
letter-spacing: 0.3px;
|
|
69
69
|
text-transform: capitalize;
|
|
70
|
-
`,
|
|
70
|
+
`,i`
|
|
71
71
|
color: var(--hd-clr);
|
|
72
72
|
font-weight: 600;
|
|
73
73
|
font-size: 13px;
|
|
74
74
|
text-transform: capitalize;
|
|
75
|
-
`;const y=
|
|
75
|
+
`;const y=i`
|
|
76
76
|
color: var(--pri-clr-lnk);
|
|
77
77
|
&,
|
|
78
78
|
&:hover {
|
|
@@ -81,7 +81,7 @@ import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
|
81
81
|
&:hover {
|
|
82
82
|
color: var(--pri-clr-lnk__hvr);
|
|
83
83
|
}
|
|
84
|
-
`,x=
|
|
84
|
+
`,x=i`
|
|
85
85
|
color: var(--pri-clr-lnk);
|
|
86
86
|
&,
|
|
87
87
|
&:hover {
|
|
@@ -90,7 +90,7 @@ import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
|
90
90
|
&:hover {
|
|
91
91
|
color: var(--sec-clr-lnk__hvr);
|
|
92
92
|
}
|
|
93
|
-
`,w=
|
|
93
|
+
`,w=i`
|
|
94
94
|
position: relative;
|
|
95
95
|
display: inline-grid;
|
|
96
96
|
padding: 0 16px;
|
|
@@ -104,12 +104,12 @@ import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
|
104
104
|
&:hover {
|
|
105
105
|
text-decoration: none;
|
|
106
106
|
}
|
|
107
|
-
`,k=({mode:e,$elipsis:r,$activated:n,$shadow:o,disabled:t})=>{let
|
|
107
|
+
`,k=({mode:e,$elipsis:r,$activated:n,$shadow:o,disabled:t})=>{let i="";return"clear"===e?i+=y:"clearR"===e?i+=x:"blue"===e?i+="\n &, &:hover {\n color: var(--pri-clr-lnk__hvr);\n text-decoration: none;\n }\n ":"trans"===e?i+=w+"\n height: auto;\n padding: 0;\n opacity: 1;\n &, \n &:hover { \n color: var(--pri-clr-lnk__hvr);\n text-decoration: none;\n } \n &:hover {\n opacity: .9; \n }\n ":"hover"===e?i+=w+"\n height: auto;\n width: max-content;\n padding: 3px 6px;\n position: relative;\n left: -6px;\n color: initial;\n grid-gap: 4px;\n &:hover { \n border-radius: var(--ter-rd);\n box-shadow: 1px 1px var(--pri-clr-ln);\n background-color: var(--mt-clr-bg__fc);\n text-decoration: none;\n }\n ":"whiteB"===e?i+=w+"\n color: var(--ter-clr);\n background-color: var(--cl-clr-bg);\n border: 1px solid var(--sec-clr-ln);\n &, \n &:hover { \n background-color: var(--cl-clr-bg__hvr);\n } \n ":"redB"===e?i+=w+"\n color: var(--act-clr);\n background-color: var(--act-clr-bg);\n &:hover {\n background-color: var(--act-clr-bg__hvr);\n } \n ":"greyB"===e&&(i+=w+"\n color: var(--act-clr);\n background-color: var(--mt-clr-bg__fc);\n &:hover {\n background-color: var(--cl-clr-bg__hvr);\n } \n "),n&&(i+="\n color: var(--sta-clr);\n font-weight: 400;\n ","clear"!==e&&"clearR"!==e||(i+="\n color: var(--pri-clr-lnk__act);\n font-weight: 600;\n ")),r&&(i+=`\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n display: block;\n max-width: 100%;\n width: auto;\n ${m}\n `),o&&(i+="\n box-shadow: var(--act-shd-bx);\n "),t&&(i+="\n color: #A9A9A9;\n opacity: 0.7;\n pointer-events: none;\n "),i},$=t.a`
|
|
108
108
|
${k}
|
|
109
109
|
`,_=t.span`
|
|
110
110
|
cursor:pointer;
|
|
111
111
|
${k}
|
|
112
|
-
`,j=e=>{var{children:r,mode:n,$activated:o=!1,href:t,$elipsis:
|
|
112
|
+
`,j=e=>{var{children:r,mode:n,$activated:o=!1,href:t,$elipsis:i=!1,$shadow:l=!1,disabled:c=!1}=e,s=a(e,["children","mode","$activated","href","$elipsis","$shadow","disabled"]);const{onClick:p}=s;return t?g.jsx($,Object.assign({className:"_refLink",mode:n,$activated:o,$elipsis:i,$shadow:l,disabled:c,href:t},s,{children:r})):g.jsx(_,Object.assign({className:"_refLink",mode:n,$activated:o,$elipsis:i,$shadow:l,disabled:c,onClick:p},s,{children:r}))},S=i`
|
|
113
113
|
border: 0;
|
|
114
114
|
cursor: pointer;
|
|
115
115
|
font-weight: 400;
|
|
@@ -120,14 +120,14 @@ import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
|
120
120
|
width: 55px;
|
|
121
121
|
text-align: center;
|
|
122
122
|
}
|
|
123
|
-
${({width:e,height:r,$iconLeft:n,$iconRight:o,$isError:t,mode:
|
|
124
|
-
`,O=e=>{var o,{mode:t,$isError:
|
|
123
|
+
${({width:e,height:r,$iconLeft:n,$iconRight:o,$isError:t,mode:i,type:a})=>{let l="";return n&&(l+=" \n padding-left: 35px; \n "),o&&(l+=" \n padding-right: 35px; \n "),t&&(l+=" \n border:1px solid var(--err-clr-ln) !important; \n "),r&&(l+=` \n height: ${r}px\n max-height: ${r}px\n `),"search"===i&&(l+=' \n background-color: transparent;\n &, &:not([type="submit"]):focus, &:active, &:active:focus {\n border: 1px solid transparent !important;\n outline: none !important;\n box-shadow: none !important;\n }\n ',n&&(l+=" \n padding-left: 39px; \n ")),"transaction"===i&&(l+="\n padding-left: 45px;\n "),e&&(l+=` \n width: ${e}px \n `),"submit"===a&&(l+=S),l}}
|
|
124
|
+
`,O=e=>{var o,{mode:t,$isError:i,$iconLeft:l,$iconRight:c,reset:s,setReset:p,isForceUpdate:d,setForceUpdate:u,evChange:f,evBlur:h,isField:v,evChangeCustom:b,evEnter:m,evKeyUp:y}=e,x=a(e,["mode","$isError","$iconLeft","$iconRight","reset","setReset","isForceUpdate","setForceUpdate","evChange","evBlur","isField","evChangeCustom","evEnter","evKeyUp"]);const{type:w,name:k,defaultValue:$,defaultChecked:_}=x,j=null!==(o=null==$?void 0:$.toString())&&void 0!==o?o:"",[S,O]=r(j),[R,E]=r(_||!1);n((()=>{var e;if(d){const r=null!==(e=null==$?void 0:$.toString())&&void 0!==e?e:"";O(r),E(_||!1),u&&u(!1)}s&&(O(""),E(!1),p&&p(!1))}),[d,u,s,p,$,_,E,t]);const A=e=>{const r=e.target.value;O(r)};let L=Object.assign({},x);delete L.defaultValue,delete L.defaultChecked;const N=g.jsx(C,Object.assign({mode:t,$isError:i,$iconLeft:l,$iconRight:c,checked:R,value:S,onChange:e=>{A(e),f&&f(e)},onBlur:e=>{A(e),(e=>{if(h&&h(e),v&&m&&m(e),v&&k){const r="number"===w?parseInt(e.target.value):e.target.value.trim();b&&b(k,r)}})(e)},onKeyUp:e=>{y&&y(e),(e=>{"Enter"===e.key&&(e.preventDefault(),v&&m&&m(e))})(e)}},"number"===w&&{onKeyPress:e=>("number"===w&&(isNaN(Number(e.key))||void 0===e.key||""===e.key)&&e.preventDefault(),!0)},"number"===w&&{onPaste:e=>{const r=(e.clipboardData||window.clipboardData).getData("text").replace(/[^0-9]/g,"");e.preventDefault(),document.execCommand("insertText",!1,r)}},"number"===w&&{onFocus:e=>e.target.addEventListener("wheel",(function(e){e.preventDefault()}),{passive:!1})},"number"===w&&{min:"0"},L));return N},R=i`
|
|
125
125
|
position: absolute;
|
|
126
126
|
opacity: 0;
|
|
127
127
|
cursor: pointer;
|
|
128
128
|
height: 0;
|
|
129
129
|
width: 0;
|
|
130
|
-
`,E=
|
|
130
|
+
`,E=i`
|
|
131
131
|
padding-right: 18px;
|
|
132
132
|
i {
|
|
133
133
|
position: absolute;
|
|
@@ -187,7 +187,7 @@ import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
${R}
|
|
190
|
-
`;const N=e=>{var{id:t,name:
|
|
190
|
+
`;const N=e=>{var{id:t,name:i,children:l,$flow:c,extendKey:s,extendClass:p,reset:d,setReset:u,isForceUpdate:f,setForceUpdate:h,evChange:v,$isError:b,$iconRight:m}=e,y=a(e,["id","name","children","$flow","extendKey","extendClass","reset","setReset","isForceUpdate","setForceUpdate","evChange","$isError","$iconRight"]);const{disabled:x,defaultChecked:w}=y,[k,$]=r(w||!1),_=o(null);n((()=>{f&&($(w||!1),h&&h(!1)),d&&($(!1),u&&u(!1))}),[d,u,f,h,w]);return delete Object.assign({},y).defaultChecked,g.jsxs(L,{$flow:c,$iconRight:m,ref:_,htmlFor:t,disabled:x||!1,children:[l,g.jsx(O,Object.assign({id:t,type:"checkbox",checked:k,name:i,evChange:e=>{$(e.target.checked),v&&v(e)}},p&&{className:p},""!==s&&{"data-key":s},y)),g.jsx(A,Object.assign({$isError:b},y["data-qa-id"]&&{"data-qa-id":y["data-qa-id"]}))]})};const F=i`
|
|
191
191
|
display: inline-block;
|
|
192
192
|
pointer-events: none;
|
|
193
193
|
`,D=t.button`
|
|
@@ -209,7 +209,7 @@ import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
|
209
209
|
padding-right: 30px !important;
|
|
210
210
|
|
|
211
211
|
}
|
|
212
|
-
${({$mode:e,$isIndicatorArrow:r,$isShown:n,$isLoading:o,$activated:t,$size:
|
|
212
|
+
${({$mode:e,$isIndicatorArrow:r,$isShown:n,$isLoading:o,$activated:t,$size:i,disabled:a,$iconLeft:l,$shadow:c})=>{let s="";return n?(c&&(s+="\n box-shadow: var(--act-shd-bx);\n "),i&&("xsmall"===i?s+="\n font-size: 12px;\n height: 20px;\n padding: 0 8px;\n ":"small"===i?s+="\n font-size: 13px;\n height: 28px;\n min-width: 75px;\n ":"medium"===i&&(s+="\n height: 32px;\n ")),"red"===e?s+=`\n color: var(--act-clr);\n background-color: var(--act-clr-bg);\n &:hover {\n background-color: var(--act-clr-bg__hvr);\n }\n & ${P} {\n fill: #ffffff;\n stroke: #ffffff;\n }\n `:"white"===e?s+="\n color: var(--mt-clr);\n background-color: var(--cl-clr-bg);\n border: 1px solid var(--sec-clr-ln);\n &:hover { \n background-color: var(--cl-clr-bg__hvr);\n } \n ":"blue"===e?s+=`\n &, &:hover {\n background-color: var(--ck-clr-bg__act);\n color: var(--act-clr);\n }\n & ${P} {\n fill: #ffffff;\n stroke: #ffffff;\n }\n `:"nude"===e?s+="\n &, &:hover { \n background-color: var(--ter-clr-bg); \n } \n ":"clearL"===e?s+="\n width: auto;\n height: auto;\n color: var(--pri-clr-lnk__hvr);\n text-decoration: none;\n padding: 0;\n margin: 0;\n &, &:hover { \n background-color: transparent; \n }\n &:hover {\n opacity: .9;\n }\n ":"clearB"===e?s+=`\n background-color: var(--cl-clr-bg);\n color: var(--pri-clr-lnk__hvr);\n svg {\n fill: var(--pri-clr-lnk__hvr);\n stroke: var(--pri-clr-lnk__hvr);\n }\n & ${P} {\n width: 14px;\n height: 14px;\n margin-top: -7px;\n }\n &:disabled {\n span {color: var(--mt-clr);}\n }\n `:"clear"===e?(s+="\n box-shadow: none !important;\n &, &:hover { \n background-color: transparent; \n }\n ",t&&(s+="\n color: var(--pri-clr) !important;\n font-weight: 600;\n ")):"more"===e?s+=`\n padding: 8px;\n background-color: var(--mt-clr-bg__fc);\n &:before { \n content: url(data:image/svg+xml,%3csvg width='3' height='13' viewBox='0 0 3 13' fill='none' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='1.5' cy='1.5' r='1.5' fill='%235A5A5A'/%3e%3ccircle cx='1.5' cy='6.5' r='1.5' fill='%235A5A5A'/%3e%3ccircle cx='1.5' cy='11.5' r='1.5' fill='%235A5A5A'/%3e%3c/svg%3e);\n height: 14px;\n width: 14px;\n ${F}\n }\n `:"round-close"===e?s+=`\n background-color: transparent;\n &:before { \n content: url(data:image/svg+xml,%3c%3fxml version='1.0' encoding='iso-8859-1'%3f%3e%3c!-- Generator: Adobe Illustrator 18.1.1%2c SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e%3csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 212.982 212.982' style='enable-background:new 0 0 212.982 212.982%3b fill: rgb(72%2c72%2c72)' xml:space='preserve'%3e %3cpath style='fill-rule:evenodd%3bclip-rule:evenodd%3b' d='M131.804%2c106.491l75.936-75.936c6.99-6.99%2c6.99-18.323%2c0-25.312 c-6.99-6.99-18.322-6.99-25.312%2c0l-75.937%2c75.937L30.554%2c5.242c-6.99-6.99-18.322-6.99-25.312%2c0c-6.989%2c6.99-6.989%2c18.323%2c0%2c25.312 l75.937%2c75.936L5.242%2c182.427c-6.989%2c6.99-6.989%2c18.323%2c0%2c25.312c6.99%2c6.99%2c18.322%2c6.99%2c25.312%2c0l75.937-75.937l75.937%2c75.937 c6.989%2c6.99%2c18.322%2c6.99%2c25.312%2c0c6.99-6.99%2c6.99-18.322%2c0-25.312L131.804%2c106.491z'/%3e%3c/svg%3e);\n width: 12px;\n ${F}\n } \n `:"small-white-round-close"===e?s+=`\n background-color: transparent;\n &:before { \n content: url(data:image/svg+xml,%3c%3fxml version='1.0' encoding='iso-8859-1'%3f%3e%3c!-- Generator: Adobe Illustrator 18.1.1%2c SVG Export Plug-In . SVG Version: 6.00 Build 0) --%3e%3csvg version='1.1' id='Capa_1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' x='0px' y='0px' viewBox='0 0 212.982 212.982' style='enable-background:new 0 0 212.982 212.982%3b fill: white' xml:space='preserve'%3e %3cpath style='fill-rule:evenodd%3bclip-rule:evenodd%3b' d='M131.804%2c106.491l75.936-75.936c6.99-6.99%2c6.99-18.323%2c0-25.312 c-6.99-6.99-18.322-6.99-25.312%2c0l-75.937%2c75.937L30.554%2c5.242c-6.99-6.99-18.322-6.99-25.312%2c0c-6.989%2c6.99-6.989%2c18.323%2c0%2c25.312 l75.937%2c75.936L5.242%2c182.427c-6.989%2c6.99-6.989%2c18.323%2c0%2c25.312c6.99%2c6.99%2c18.322%2c6.99%2c25.312%2c0l75.937-75.937l75.937%2c75.937 c6.989%2c6.99%2c18.322%2c6.99%2c25.312%2c0c6.99-6.99%2c6.99-18.322%2c0-25.312L131.804%2c106.491z'/%3e%3c/svg%3e);\n width: 8px;\n ${F}\n } \n `:"page-option"===e&&(s+=`\n border: 1px solid var(--ck-clr-ln);\n background-color: transparent;\n font-weight: 600;\n cursor: pointer;\n border-radius: var(--ter-rd);\n padding: 6px 12px;\n height: 28px;\n & ${P} {\n width: 14px;\n height: 14px;\n margin-top: -7px;\n }\n `),a&&(s+="\n &, &:hover {\n background-color: var(--mt-clr-bg__fc) !important;\n cursor: default;\n color: var(--mt-clr);\n }\n "),l&&(s+=" padding-left: 35px; "),r&&(s+=" \n padding-right: 25px; \n "),o&&(s+=" \n padding-right: 30px !important; \n "),s):"display:none;"}}
|
|
213
213
|
|
|
214
214
|
`,P=t.svg`
|
|
215
215
|
display: inline-block;
|
|
@@ -224,5 +224,17 @@ import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as
|
|
|
224
224
|
height: 14px;
|
|
225
225
|
margin-top: -7px;
|
|
226
226
|
${({color:e})=>{let r="";return e&&"initial"!==e&&(r+=`\n fill: ${e};\n stroke: ${e};\n `),r}}
|
|
227
|
-
`,z=e=>{var{children:r,$mode:n,$isIndicatorArrow:o=!1,isIndicatorArrowColor:t="initial",$isShown:
|
|
227
|
+
`,z=e=>{var{children:r,$mode:n,$isIndicatorArrow:o=!1,isIndicatorArrowColor:t="initial",$isShown:i=!0,$shadow:l=!1,$isLoading:c=!1,refContainer:s,$activated:p=!1,$size:d,$iconLeft:u}=e,f=a(e,["children","$mode","$isIndicatorArrow","isIndicatorArrowColor","$isShown","$shadow","$isLoading","refContainer","$activated","$size","$iconLeft"]);const{disabled:h}=f,v=o?g.jsx(P,{color:t,height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:g.jsx("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})}):null;return g.jsxs(D,Object.assign({$mode:n,$isIndicatorArrow:!!o,$isShown:!!i,$shadow:!!l,disabled:h||c||!1,$isLoading:!!c,ref:s,$activated:!!p,$size:d,$iconLeft:u},f,{children:[r,v]}))},I=i`
|
|
228
|
+
display: block;
|
|
229
|
+
margin: 8px 0;
|
|
230
|
+
`,B=i`
|
|
231
|
+
display: block;
|
|
232
|
+
text-align: center;
|
|
233
|
+
align-items: center;
|
|
234
|
+
margin: 30px;
|
|
235
|
+
color: var(--mt-clr);
|
|
236
|
+
font-size: 14px;
|
|
237
|
+
`,T=t.span`
|
|
238
|
+
${({$mode:e,$position:r})=>{let n="";return"block"===e?n+=I:"empty"===e?n+=B:"indi"===e&&(n+='\n padding: 20px 0;\n text-align: left;\n display: block;\n color: var(--mt-clr);\n &[aria-label="error"] {\n color: var(--err-clr);\n }\n '),r&&("left"===r?n+="\n text-align: left;\n align-items: left;\n margin-left: 15px;\n ":"right"===r&&(n+="\n text-align: right;\n align-items: right;\n margin-right: 15px;\n ")),n}}
|
|
239
|
+
`,U=e=>{var{children:r,$mode:n,$position:o}=e,t=a(e,["children","$mode","$position"]);return g.jsx(T,Object.assign({$mode:n,$position:o},t,{children:r}))};export{z as ButtonComponent,N as CheckboxComponent,O as InputComponent,U as LabelComponent,j as LinkComponent,b as TextComponent};
|
|
228
240
|
//# sourceMappingURL=index.mjs.map
|