forstok-ui-lib 1.0.11 → 1.0.13
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 +17 -2
- package/dist/index.js +56 -19
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +56 -19
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
- package/rollup.config.js +3 -1
- package/src/assets/images/icons/arrow-left-blue.svg +10 -0
- package/src/assets/images/icons/check-white.svg +10 -0
- package/src/assets/images/icons/checkmark-tick-grey.svg +10 -0
- package/src/assets/images/icons/checkmark-tick.svg +10 -0
- package/src/assets/images/icons/close-white.svg +9 -0
- package/src/assets/images/icons/close.svg +9 -0
- package/src/assets/images/icons/dotted.svg +5 -0
- package/src/assets/images/icons/search.svg +4 -0
- package/src/assets/images/icons/warning-white.svg +4 -0
- package/src/assets/images/icons/warning.svg +9 -0
- package/src/components/button/button.styles.ts +238 -0
- package/src/components/button/button.tsx +44 -0
- package/src/components/index.ts +2 -1
- package/src/declarations.d.ts +54 -0
- package/tsconfig.json +2 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import e,{useState as r,useEffect as
|
|
1
|
+
import e,{useState as r,useEffect as n,useRef as o}from"react";import t,{css as a}from"styled-components";function i(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 c,l={exports:{}},s={};var p,d,u={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.development.js
|
|
@@ -7,21 +7,21 @@ import e,{useState as r,useEffect as t,useRef as n}from"react";import o,{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===
|
|
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 a(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 i(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 i={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]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var l=i.DetermineComponentFrameRoot(),s=l[0],p=l[1];if(s&&p){var d=s.split("\n"),u=p.split("\n");for(l=c=0;c<d.length&&!d[c].includes("DetermineComponentFrameRoot");)c++;for(;l<u.length&&!u[l].includes("DetermineComponentFrameRoot");)l++;if(c===d.length||l===u.length)for(c=d.length-1,l=u.length-1;1<=c&&0<=l&&d[c]!==u[l];)l--;for(;1<=c&&0<=l;c--,l--)if(d[c]!==u[l]){if(1!==c||1!==l)do{if(c--,0>--l||d[c]!==u[l]){var f="\n"+d[c].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<=c&&0<=l);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:"")?a(d):"","function"==typeof e&&q.set(e,d),d}function c(e){if(null==e)return"";if("function"==typeof e){var r=e.prototype;return i(e,!(!r||!r.isReactComponent))}if("string"==typeof e)return a(e);switch(e){case A:return a("Suspense");case L:return a("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case E:return e=i(e.render,!1);case N:return c(e.type);case F:r=e._payload,e=e._init;try{return c(e(r))}catch(e){}}return""}function l(){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,a,i,c){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(a)if(V(p)){for(a=0;a<p.length;a++)d(p[a],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?a="null":V(e)?a="array":void 0!==e&&e.$$typeof===$?(a="<"+(r(e.type)||"Unknown")+" />",p=" Did you accidentally export a JSX literal instead of a component?"):a=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",a,p);if(B.call(n,"key")){p=r(e);var u=Object.keys(n).filter((function(e){return"key"!==e}));a=0<u.length?"{key: someKey, "+u.join(": ..., ")+": ...}":"{key: someKey}",Y[p+a]||(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} />',a,p,u,p),Y[p+a]=!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,a){return n=a.ref,e={$$typeof:$,type:e,key:r,props:a,_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,c,0,l(),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=l();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!==l()&&(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=c(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?l.exports=function(){if(c)return s;c=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 a in o={},n)"key"!==a&&(o[a]=n[a]);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}():l.exports=f()),l.exports);const h=a`
|
|
11
11
|
overflow: hidden;
|
|
12
12
|
text-overflow: ellipsis;
|
|
13
13
|
white-space: nowrap;
|
|
14
14
|
display: block;
|
|
15
15
|
max-width: 100%;
|
|
16
16
|
width: auto;
|
|
17
|
-
`,
|
|
17
|
+
`,v=t.span`
|
|
18
18
|
display: grid;
|
|
19
19
|
i {
|
|
20
20
|
display: inline-block;
|
|
21
21
|
margin-left: 5px;
|
|
22
22
|
}
|
|
23
|
-
${({$color:e,$elipsis:r})=>{let
|
|
24
|
-
`,
|
|
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=i(e,["children","$color","$elipsis"]);return g.jsx(v,Object.assign({$elipsis:!!o,$color:n},t,{children:r}))};a`
|
|
25
25
|
list-style: none;
|
|
26
26
|
padding: 0;
|
|
27
27
|
margin: 0;
|
|
@@ -72,7 +72,7 @@ import e,{useState as r,useEffect as t,useRef as n}from"react";import o,{css as
|
|
|
72
72
|
font-weight: 600;
|
|
73
73
|
font-size: 13px;
|
|
74
74
|
text-transform: capitalize;
|
|
75
|
-
`;const
|
|
75
|
+
`;const y=a`
|
|
76
76
|
color: var(--pri-clr-lnk);
|
|
77
77
|
&,
|
|
78
78
|
&:hover {
|
|
@@ -81,7 +81,7 @@ import e,{useState as r,useEffect as t,useRef as n}from"react";import o,{css as
|
|
|
81
81
|
&:hover {
|
|
82
82
|
color: var(--pri-clr-lnk__hvr);
|
|
83
83
|
}
|
|
84
|
-
`,
|
|
84
|
+
`,x=a`
|
|
85
85
|
color: var(--pri-clr-lnk);
|
|
86
86
|
&,
|
|
87
87
|
&:hover {
|
|
@@ -90,7 +90,7 @@ import e,{useState as r,useEffect as t,useRef as n}from"react";import o,{css as
|
|
|
90
90
|
&:hover {
|
|
91
91
|
color: var(--sec-clr-lnk__hvr);
|
|
92
92
|
}
|
|
93
|
-
`,
|
|
93
|
+
`,w=a`
|
|
94
94
|
position: relative;
|
|
95
95
|
display: inline-grid;
|
|
96
96
|
padding: 0 16px;
|
|
@@ -104,24 +104,24 @@ import e,{useState as r,useEffect as t,useRef as n}from"react";import o,{css as
|
|
|
104
104
|
&:hover {
|
|
105
105
|
text-decoration: none;
|
|
106
106
|
}
|
|
107
|
-
`,k=({mode:e,$elipsis:r,$activated:
|
|
107
|
+
`,k=({mode:e,$elipsis:r,$activated:n,$shadow:o,disabled:t})=>{let a="";return"clear"===e?a+=y:"clearR"===e?a+=x:"blue"===e?a+="\n &, &:hover {\n color: var(--pri-clr-lnk__hvr);\n text-decoration: none;\n }\n ":"trans"===e?a+=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?a+=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?a+=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?a+=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&&(a+=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&&(a+="\n color: var(--sta-clr);\n font-weight: 400;\n ","clear"!==e&&"clearR"!==e||(a+="\n color: var(--pri-clr-lnk__act);\n font-weight: 600;\n ")),r&&(a+=`\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&&(a+="\n box-shadow: var(--act-shd-bx);\n "),t&&(a+="\n color: #A9A9A9;\n opacity: 0.7;\n pointer-events: none;\n "),a},$=t.a`
|
|
108
108
|
${k}
|
|
109
|
-
`,_=
|
|
109
|
+
`,_=t.span`
|
|
110
110
|
cursor:pointer;
|
|
111
111
|
${k}
|
|
112
|
-
`,j=e=>{var{children:r,mode:
|
|
112
|
+
`,j=e=>{var{children:r,mode:n,$activated:o=!1,href:t,$elipsis:a=!1,$shadow:c=!1,disabled:l=!1}=e,s=i(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:a,$shadow:c,disabled:l,href:t},s,{children:r})):g.jsx(_,Object.assign({className:"_refLink",mode:n,$activated:o,$elipsis:a,$shadow:c,disabled:l,onClick:p},s,{children:r}))},S=a`
|
|
113
113
|
border: 0;
|
|
114
114
|
cursor: pointer;
|
|
115
115
|
font-weight: 400;
|
|
116
116
|
color: var(--sec-clr);
|
|
117
117
|
background-color: var(--act-clr-bg);
|
|
118
|
-
`,
|
|
118
|
+
`,C=t.input`
|
|
119
119
|
&._refQuantitiyInput {
|
|
120
120
|
width: 55px;
|
|
121
121
|
text-align: center;
|
|
122
122
|
}
|
|
123
|
-
${({width:e,height:r,$iconLeft:
|
|
124
|
-
`,
|
|
123
|
+
${({width:e,height:r,$iconLeft:n,$iconRight:o,$isError:t,mode:a,type:i})=>{let c="";return n&&(c+=" \n padding-left: 35px; \n "),o&&(c+=" \n padding-right: 35px; \n "),t&&(c+=" \n border:1px solid var(--err-clr-ln) !important; \n "),r&&(c+=` \n height: ${r}px\n max-height: ${r}px\n `),"search"===a&&(c+=' \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&&(c+=" \n padding-left: 39px; \n ")),"transaction"===a&&(c+="\n padding-left: 45px;\n "),e&&(c+=` \n width: ${e}px \n `),"submit"===i&&(c+=S),c}}
|
|
124
|
+
`,O=e=>{var o,{mode:t,$isError:a,$iconLeft:c,$iconRight:l,reset:s,setReset:p,isForceUpdate:d,setForceUpdate:u,evChange:f,evBlur:h,isField:v,evChangeCustom:b,evEnter:m,evKeyUp:y}=e,x=i(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:a,$iconLeft:c,$iconRight:l,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=a`
|
|
125
125
|
position: absolute;
|
|
126
126
|
opacity: 0;
|
|
127
127
|
cursor: pointer;
|
|
@@ -135,7 +135,7 @@ import e,{useState as r,useEffect as t,useRef as n}from"react";import o,{css as
|
|
|
135
135
|
top: 50%;
|
|
136
136
|
margin-top: -10px;
|
|
137
137
|
}
|
|
138
|
-
`,
|
|
138
|
+
`,A=t.span`
|
|
139
139
|
position: absolute;
|
|
140
140
|
left: 0;
|
|
141
141
|
height: 14px;
|
|
@@ -155,7 +155,7 @@ import e,{useState as r,useEffect as t,useRef as n}from"react";import o,{css as
|
|
|
155
155
|
border-radius: var(--ter-rd);
|
|
156
156
|
}
|
|
157
157
|
${({$isError:e})=>{let r="";return e&&(r+=" \n border:1px solid #fc5c64; \n "),r}}
|
|
158
|
-
`,
|
|
158
|
+
`,L=t.label`
|
|
159
159
|
grid-gap: 6px;
|
|
160
160
|
position: relative;
|
|
161
161
|
cursor: pointer;
|
|
@@ -177,8 +177,8 @@ import e,{useState as r,useEffect as t,useRef as n}from"react";import o,{css as
|
|
|
177
177
|
@media (min-width: 425px) {
|
|
178
178
|
padding-left: 24px;
|
|
179
179
|
}
|
|
180
|
-
${({$flow:e,$iconRight:r,disabled:
|
|
181
|
-
`;
|
|
180
|
+
${({$flow:e,$iconRight:r,disabled:n})=>{let o="";if(n&&(o+="\n cursor: default; \n "),"column"===e)o+="\n display: inline-grid; \n grid-auto-flow: column;\n ";else o+="\n display: grid; \n grid-auto-flow: row;\n ";return r&&(o+=E),o}}
|
|
181
|
+
`;t.input`
|
|
182
182
|
&:disabled {
|
|
183
183
|
cursor: default;
|
|
184
184
|
& + span {
|
|
@@ -187,5 +187,42 @@ import e,{useState as r,useEffect as t,useRef as n}from"react";import o,{css as
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
${R}
|
|
190
|
-
`;const
|
|
190
|
+
`;const N=e=>{var{id:t,name:a,children:c,$flow:l,extendKey:s,extendClass:p,reset:d,setReset:u,isForceUpdate:f,setForceUpdate:h,evChange:v,$isError:b,$iconRight:m}=e,y=i(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:l,$iconRight:m,ref:_,htmlFor:t,disabled:x||!1,children:[c,g.jsx(O,Object.assign({id:t,type:"checkbox",checked:k,name:a,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=a`
|
|
191
|
+
display: inline-block;
|
|
192
|
+
pointer-events: none;
|
|
193
|
+
`,D=t.button`
|
|
194
|
+
> span {
|
|
195
|
+
white-space: nowrap;
|
|
196
|
+
overflow: hidden;
|
|
197
|
+
text-overflow: ellipsis;
|
|
198
|
+
}
|
|
199
|
+
._refLoading {
|
|
200
|
+
position: absolute;
|
|
201
|
+
right: 10px;
|
|
202
|
+
top: 50%;
|
|
203
|
+
margin-top: -8px;
|
|
204
|
+
}
|
|
205
|
+
&._refButtonLoading._refHidden {
|
|
206
|
+
padding-right: 16px !important;
|
|
207
|
+
}
|
|
208
|
+
&._refButtonLoading {
|
|
209
|
+
padding-right: 30px !important;
|
|
210
|
+
|
|
211
|
+
}
|
|
212
|
+
${({$mode:e,$isIndicatorArrow:r,$isShown:n,$isLoading:o,$activated:t,$size:a,disabled:i,$iconLeft:c,$shadow:l})=>{let s="";return n?(l&&(s+="\n box-shadow: var(--act-shd-bx);\n "),a&&("xsmall"===a?s+="\n font-size: 12px;\n height: 20px;\n padding: 0 8px;\n ":"small"===a?s+="\n font-size: 13px;\n height: 28px;\n min-width: 75px;\n ":"medium"===a&&(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 `),i&&(s+="\n &, &:hover {\n background-color: var(--mt-clr-bg__fc) !important;\n cursor: default;\n color: var(--mt-clr);\n }\n "),c&&(s+=" padding-left: 35px; "),r&&(s+=" \n padding-right: 25px; \n "),o&&(s+=" \n padding-right: 30px !important; \n "),s):"display:none;"}}
|
|
213
|
+
|
|
214
|
+
`,P=t.svg`
|
|
215
|
+
display: inline-block;
|
|
216
|
+
fill: currentColor;
|
|
217
|
+
stroke: currentColor;
|
|
218
|
+
stroke-width: 0;
|
|
219
|
+
position: absolute;
|
|
220
|
+
right: 8px;
|
|
221
|
+
top: 50%;
|
|
222
|
+
margin-top: -10px;
|
|
223
|
+
width: 14px;
|
|
224
|
+
height: 14px;
|
|
225
|
+
margin-top: -7px;
|
|
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:a=!0,$shadow:c=!1,$isLoading:l=!1,refContainer:s,$activated:p=!1,$size:d,$iconLeft:u}=e,f=i(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:!!a,$shadow:!!c,disabled:h||l||!1,$isLoading:!!l,ref:s,$activated:!!p,$size:d,$iconLeft:u},f,{children:[r,v]}))};export{z as ButtonComponent,N as CheckboxComponent,O as InputComponent,j as LinkComponent,b as TextComponent};
|
|
191
228
|
//# sourceMappingURL=index.mjs.map
|