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.d.ts
CHANGED
|
@@ -76,4 +76,11 @@ type TButton = ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
|
76
76
|
};
|
|
77
77
|
declare const ButtonComponent: ({ children, $mode, $isIndicatorArrow, isIndicatorArrowColor, $isShown, $shadow, $isLoading, refContainer, $activated, $size, $iconLeft, ...props }: TButton) => react_jsx_runtime.JSX.Element;
|
|
78
78
|
|
|
79
|
-
|
|
79
|
+
type TLabel = HTMLAttributes<HTMLSpanElement> & {
|
|
80
|
+
children: ReactNode;
|
|
81
|
+
$mode?: string;
|
|
82
|
+
$position?: string;
|
|
83
|
+
};
|
|
84
|
+
declare const LabelComponent: ({ children, $mode, $position, ...props }: TLabel) => react_jsx_runtime.JSX.Element;
|
|
85
|
+
|
|
86
|
+
export { ButtonComponent, CheckboxComponent, InputComponent, LabelComponent, LinkComponent, TextComponent };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var e=require("react"),r=require("styled-components");function n(e){return e&&e.__esModule?e:{default:e}}var
|
|
1
|
+
"use strict";var e=require("react"),r=require("styled-components");function n(e){return e&&e.__esModule?e:{default:e}}var t=n(e),o=n(r);function a(e,r){var n={};for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&r.indexOf(t)<0&&(n[t]=e[t]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(t=Object.getOwnPropertySymbols(e);o<t.length;o++)r.indexOf(t[o])<0&&Object.prototype.propertyIsEnumerable.call(e,t[o])&&(n[t[o]]=e[t[o]])}return n}"function"==typeof SuppressedError&&SuppressedError;var i,l={exports:{}},c={};var s,p,d={};
|
|
2
2
|
/**
|
|
3
3
|
* @license React
|
|
4
4
|
* react-jsx-runtime.development.js
|
|
@@ -7,14 +7,14 @@
|
|
|
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 u(){return s||(s=1,"production"!==process.env.NODE_ENV&&function(){function e(r){if(null==r)return null;if("function"==typeof r)return r.$$typeof===z?null:r.displayName||r.name||null;if("string"==typeof r)return r;switch(r){case j:return"Fragment";case _:return"Portal";case C:return"Profiler";case S:return"StrictMode";case L:return"Suspense";case A:return"SuspenseList"}if("object"==typeof r)switch("number"==typeof r.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case R:return(r.displayName||"Context")+".Provider";case O:return(r._context.displayName||"Context")+".Consumer";case E:var n=r.render;return(r=r.displayName)||(r=""!==(r=n.displayName||n.name||"")?"ForwardRef("+r+")":"ForwardRef"),r;case N:return null!==(n=r.displayName||null)?n:e(r.type)||"Memo";case F:n=r._payload,r=r._init;try{return e(r(n))}catch(e){}}return null}function r(e){return""+e}function n(e){try{r(e);var n=!1}catch(e){n=!0}if(n){var
|
|
10
|
+
*/function u(){return s||(s=1,"production"!==process.env.NODE_ENV&&function(){function e(r){if(null==r)return null;if("function"==typeof r)return r.$$typeof===z?null:r.displayName||r.name||null;if("string"==typeof r)return r;switch(r){case j:return"Fragment";case _:return"Portal";case C:return"Profiler";case S:return"StrictMode";case L:return"Suspense";case A:return"SuspenseList"}if("object"==typeof r)switch("number"==typeof r.tag&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),r.$$typeof){case R:return(r.displayName||"Context")+".Provider";case O:return(r._context.displayName||"Context")+".Consumer";case E:var n=r.render;return(r=r.displayName)||(r=""!==(r=n.displayName||n.name||"")?"ForwardRef("+r+")":"ForwardRef"),r;case N:return null!==(n=r.displayName||null)?n:e(r.type)||"Memo";case F:n=r._payload,r=r._init;try{return e(r(n))}catch(e){}}return null}function r(e){return""+e}function n(e){try{r(e);var n=!1}catch(e){n=!0}if(n){var t=(n=console).error,o="function"==typeof Symbol&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(n,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",o),r(e)}}function o(){}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||H)return"";var n=W.get(e);if(void 0!==n)return n;H=!0,n=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var t;t=I.H,I.H=null,function(){if(0===V){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:o,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}V++}();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 t=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){t=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){t=e}(n=e())&&"function"==typeof n.catch&&n.catch((function(){}))}}catch(e){if(e&&t&&"string"==typeof e.stack)return[e.stack,t.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var l=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,"name");l&&l.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var c=i.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&&W.set(e,f),f}}while(1<=l&&0<=c);break}}}finally{H=!1,I.H=t,function(){if(0==--V){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>V&&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&&W.set(e,d),d}function l(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 L:return a("Suspense");case A:return a("SuspenseList")}if("object"==typeof e)switch(e.$$typeof){case E:return e=i(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 r=e(this.type);return X[r]||(X[r]=!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!==(r=this.props.ref)?r:null}function p(r,t,o,a,i,l){if("string"==typeof r||"function"==typeof r||r===j||r===C||r===S||r===L||r===A||r===D||"object"==typeof r&&null!==r&&(r.$$typeof===F||r.$$typeof===N||r.$$typeof===R||r.$$typeof===O||r.$$typeof===E||r.$$typeof===U||void 0!==r.getModuleId)){var p=t.children;if(void 0!==p)if(a)if(M(p)){for(a=0;a<p.length;a++)u(p[a],r);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 u(p,r)}else p="",(void 0===r||"object"==typeof r&&null!==r&&0===Object.keys(r).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===r?a="null":M(r)?a="array":void 0!==r&&r.$$typeof===$?(a="<"+(e(r.type)||"Unknown")+" />",p=" Did you accidentally export a JSX literal instead of a component?"):a=typeof r,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(t,"key")){p=e(r);var d=Object.keys(t).filter((function(e){return"key"!==e}));a=0<d.length?"{key: someKey, "+d.join(": ..., ")+": ...}":"{key: someKey}",Y[p+a]||(d=0<d.length?"{"+d.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,d,p),Y[p+a]=!0)}if(p=null,void 0!==o&&(n(o),p=""+o),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}(t)&&(n(t.key),p=""+t.key),"key"in t)for(var f in o={},t)"key"!==f&&(o[f]=t[f]);else o=t;return p&&function(e,r){function n(){q||(q=!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})}(o,"function"==typeof r?r.displayName||r.name||"Unknown":r),function(e,r,n,t,o,a){return n=a.ref,e={$$typeof:$,type:e,key:r,props:a,_owner:o},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}(r,p,l,0,c(),o)}function u(e,r){if("object"==typeof e&&e&&e.$$typeof!==J)if(M(e))for(var n=0;n<e.length;n++){var t=e[n];f(t)&&g(t,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(r,n){if(r._store&&!r._store.validated&&null==r.key&&(r._store.validated=1,n=function(r){var n="",t=c();return t&&(t=e(t.type))&&(n="\n\nCheck the render method of `"+t+"`."),n||(r=e(r))&&(n="\n\nCheck the top-level render call using <"+r+">."),n}(n),!Q[n])){Q[n]=!0;var t="";r&&null!=r._owner&&r._owner!==c()&&(t=null,"number"==typeof r._owner.tag?t=e(r._owner.type):"string"==typeof r._owner.name&&(t=r._owner.name),t=" It was passed a child from "+t+".");var o=I.getCurrentStack;I.getCurrentStack=function(){var e=l(r.type);return o&&(e+=o()||""),e},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,t),I.getCurrentStack=o}}var h,v,b,m,y,x,w,k=t.default,$=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"),L=Symbol.for("react.suspense"),A=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"),M=Array.isArray,V=0;o.__reactDisabledLog=!0;var K,G,q,H=!1,W=new("function"==typeof WeakMap?WeakMap:Map),J=Symbol.for("react.client.reference"),X={},Y={},Q={};d.Fragment=j,d.jsx=function(e,r,n,t,o){return p(e,r,n,!1,0,o)},d.jsxs=function(e,r,n,t,o){return p(e,r,n,!0,0,o)}}()),d}var f=(p||(p=1,"production"===process.env.NODE_ENV?l.exports=function(){if(i)return c;i=1;var e=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function n(r,n,t){var o=null;if(void 0!==t&&(o=""+t),void 0!==n.key&&(o=""+n.key),"key"in n)for(var a in t={},n)"key"!==a&&(t[a]=n[a]);else t=n;return n=t.ref,{$$typeof:e,type:r,key:o,ref:void 0!==n?n:null,props:t}}return c.Fragment=r,c.jsx=n,c.jsxs=n,c}():l.exports=u()),l.exports);const g=r.css`
|
|
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
|
-
`,h=
|
|
17
|
+
`,h=o.default.span`
|
|
18
18
|
display: grid;
|
|
19
19
|
i {
|
|
20
20
|
display: inline-block;
|
|
@@ -104,9 +104,9 @@
|
|
|
104
104
|
&:hover {
|
|
105
105
|
text-decoration: none;
|
|
106
106
|
}
|
|
107
|
-
`,x=({mode:e,$elipsis:r,$activated:n,$shadow:
|
|
107
|
+
`,x=({mode:e,$elipsis:r,$activated:n,$shadow:t,disabled:o})=>{let a="";return"clear"===e?a+=b:"clearR"===e?a+=m:"blue"===e?a+="\n &, &:hover {\n color: var(--pri-clr-lnk__hvr);\n text-decoration: none;\n }\n ":"trans"===e?a+=y+"\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+=y+"\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+=y+"\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+=y+"\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+=y+"\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 ${v}\n `),t&&(a+="\n box-shadow: var(--act-shd-bx);\n "),o&&(a+="\n color: #A9A9A9;\n opacity: 0.7;\n pointer-events: none;\n "),a},w=o.default.a`
|
|
108
108
|
${x}
|
|
109
|
-
`,k=
|
|
109
|
+
`,k=o.default.span`
|
|
110
110
|
cursor:pointer;
|
|
111
111
|
${x}
|
|
112
112
|
`,$=r.css`
|
|
@@ -115,13 +115,13 @@
|
|
|
115
115
|
font-weight: 400;
|
|
116
116
|
color: var(--sec-clr);
|
|
117
117
|
background-color: var(--act-clr-bg);
|
|
118
|
-
`,_=
|
|
118
|
+
`,_=o.default.input`
|
|
119
119
|
&._refQuantitiyInput {
|
|
120
120
|
width: 55px;
|
|
121
121
|
text-align: center;
|
|
122
122
|
}
|
|
123
|
-
${({width:e,height:r,$iconLeft:n,$iconRight:
|
|
124
|
-
`,j=r=>{var n,{mode:
|
|
123
|
+
${({width:e,height:r,$iconLeft:n,$iconRight:t,$isError:o,mode:a,type:i})=>{let l="";return n&&(l+=" \n padding-left: 35px; \n "),t&&(l+=" \n padding-right: 35px; \n "),o&&(l+=" \n border:1px solid var(--err-clr-ln) !important; \n "),r&&(l+=` \n height: ${r}px\n max-height: ${r}px\n `),"search"===a&&(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"===a&&(l+="\n padding-left: 45px;\n "),e&&(l+=` \n width: ${e}px \n `),"submit"===i&&(l+=$),l}}
|
|
124
|
+
`,j=r=>{var n,{mode:t,$isError:o,$iconLeft:i,$iconRight:l,reset:c,setReset:s,isForceUpdate:p,setForceUpdate:d,evChange:u,evBlur:g,isField:h,evChangeCustom:v,evEnter:b,evKeyUp:m}=r,y=a(r,["mode","$isError","$iconLeft","$iconRight","reset","setReset","isForceUpdate","setForceUpdate","evChange","evBlur","isField","evChangeCustom","evEnter","evKeyUp"]);const{type:x,name:w,defaultValue:k,defaultChecked:$}=y,j=null!==(n=null==k?void 0:k.toString())&&void 0!==n?n:"",[S,C]=e.useState(j),[O,R]=e.useState($||!1);e.useEffect((()=>{var e;if(p){const r=null!==(e=null==k?void 0:k.toString())&&void 0!==e?e:"";C(r),R($||!1),d&&d(!1)}c&&(C(""),R(!1),s&&s(!1))}),[p,d,c,s,k,$,R,t]);const E=e=>{const r=e.target.value;C(r)};let L=Object.assign({},y);delete L.defaultValue,delete L.defaultChecked;const A=f.jsx(_,Object.assign({mode:t,$isError:o,$iconLeft:i,$iconRight:l,checked:O,value:S,onChange:e=>{E(e),u&&u(e)},onBlur:e=>{E(e),(e=>{if(g&&g(e),h&&b&&b(e),h&&w){const r="number"===x?parseInt(e.target.value):e.target.value.trim();v&&v(w,r)}})(e)},onKeyUp:e=>{m&&m(e),(e=>{"Enter"===e.key&&(e.preventDefault(),h&&b&&b(e))})(e)}},"number"===x&&{onKeyPress:e=>("number"===x&&(isNaN(Number(e.key))||void 0===e.key||""===e.key)&&e.preventDefault(),!0)},"number"===x&&{onPaste:e=>{const r=(e.clipboardData||window.clipboardData).getData("text").replace(/[^0-9]/g,"");e.preventDefault(),document.execCommand("insertText",!1,r)}},"number"===x&&{onFocus:e=>e.target.addEventListener("wheel",(function(e){e.preventDefault()}),{passive:!1})},"number"===x&&{min:"0"},L));return A},S=r.css`
|
|
125
125
|
position: absolute;
|
|
126
126
|
opacity: 0;
|
|
127
127
|
cursor: pointer;
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
top: 50%;
|
|
136
136
|
margin-top: -10px;
|
|
137
137
|
}
|
|
138
|
-
`,O=
|
|
138
|
+
`,O=o.default.span`
|
|
139
139
|
position: absolute;
|
|
140
140
|
left: 0;
|
|
141
141
|
height: 14px;
|
|
@@ -155,7 +155,7 @@
|
|
|
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
|
-
`,R=
|
|
158
|
+
`,R=o.default.label`
|
|
159
159
|
grid-gap: 6px;
|
|
160
160
|
position: relative;
|
|
161
161
|
cursor: pointer;
|
|
@@ -177,8 +177,8 @@
|
|
|
177
177
|
@media (min-width: 425px) {
|
|
178
178
|
padding-left: 24px;
|
|
179
179
|
}
|
|
180
|
-
${({$flow:e,$iconRight:r,disabled:n})=>{let
|
|
181
|
-
`;
|
|
180
|
+
${({$flow:e,$iconRight:r,disabled:n})=>{let t="";if(n&&(t+="\n cursor: default; \n "),"column"===e)t+="\n display: inline-grid; \n grid-auto-flow: column;\n ";else t+="\n display: grid; \n grid-auto-flow: row;\n ";return r&&(t+=C),t}}
|
|
181
|
+
`;o.default.input`
|
|
182
182
|
&:disabled {
|
|
183
183
|
cursor: default;
|
|
184
184
|
& + span {
|
|
@@ -190,7 +190,7 @@
|
|
|
190
190
|
`;const E=r.css`
|
|
191
191
|
display: inline-block;
|
|
192
192
|
pointer-events: none;
|
|
193
|
-
`,L=
|
|
193
|
+
`,L=o.default.button`
|
|
194
194
|
> span {
|
|
195
195
|
white-space: nowrap;
|
|
196
196
|
overflow: hidden;
|
|
@@ -209,9 +209,9 @@
|
|
|
209
209
|
padding-right: 30px !important;
|
|
210
210
|
|
|
211
211
|
}
|
|
212
|
-
${({$mode:e,$isIndicatorArrow:r,$isShown:n,$isLoading:
|
|
212
|
+
${({$mode:e,$isIndicatorArrow:r,$isShown:n,$isLoading:t,$activated:o,$size:a,disabled:i,$iconLeft:l,$shadow:c})=>{let s="";return n?(c&&(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 & ${A} {\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 & ${A} {\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 & ${A} {\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 ",o&&(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 ${E}\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 ${E}\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 ${E}\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 & ${A} {\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 "),l&&(s+=" padding-left: 35px; "),r&&(s+=" \n padding-right: 25px; \n "),t&&(s+=" \n padding-right: 30px !important; \n "),s):"display:none;"}}
|
|
213
213
|
|
|
214
|
-
`,A=
|
|
214
|
+
`,A=o.default.svg`
|
|
215
215
|
display: inline-block;
|
|
216
216
|
fill: currentColor;
|
|
217
217
|
stroke: currentColor;
|
|
@@ -224,5 +224,17 @@
|
|
|
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
|
-
|
|
227
|
+
`,N=r.css`
|
|
228
|
+
display: block;
|
|
229
|
+
margin: 8px 0;
|
|
230
|
+
`,F=r.css`
|
|
231
|
+
display: block;
|
|
232
|
+
text-align: center;
|
|
233
|
+
align-items: center;
|
|
234
|
+
margin: 30px;
|
|
235
|
+
color: var(--mt-clr);
|
|
236
|
+
font-size: 14px;
|
|
237
|
+
`,D=o.default.span`
|
|
238
|
+
${({$mode:e,$position:r})=>{let n="";return"block"===e?n+=N:"empty"===e?n+=F:"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
|
+
`;exports.ButtonComponent=e=>{var{children:r,$mode:n,$isIndicatorArrow:t=!1,isIndicatorArrowColor:o="initial",$isShown:i=!0,$shadow:l=!1,$isLoading:c=!1,refContainer:s,$activated:p=!1,$size:d,$iconLeft:u}=e,g=a(e,["children","$mode","$isIndicatorArrow","isIndicatorArrowColor","$isShown","$shadow","$isLoading","refContainer","$activated","$size","$iconLeft"]);const{disabled:h}=g,v=t?f.jsx(A,{color:o,height:"20",width:"20",viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",children:f.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 f.jsxs(L,Object.assign({$mode:n,$isIndicatorArrow:!!t,$isShown:!!i,$shadow:!!l,disabled:h||c||!1,$isLoading:!!c,ref:s,$activated:!!p,$size:d,$iconLeft:u},g,{children:[r,v]}))},exports.CheckboxComponent=r=>{var{id:n,name:t,children:o,$flow:i,extendKey:l,extendClass:c,reset:s,setReset:p,isForceUpdate:d,setForceUpdate:u,evChange:g,$isError:h,$iconRight:v}=r,b=a(r,["id","name","children","$flow","extendKey","extendClass","reset","setReset","isForceUpdate","setForceUpdate","evChange","$isError","$iconRight"]);const{disabled:m,defaultChecked:y}=b,[x,w]=e.useState(y||!1),k=e.useRef(null);e.useEffect((()=>{d&&(w(y||!1),u&&u(!1)),s&&(w(!1),p&&p(!1))}),[s,p,d,u,y]);return delete Object.assign({},b).defaultChecked,f.jsxs(R,{$flow:i,$iconRight:v,ref:k,htmlFor:n,disabled:m||!1,children:[o,f.jsx(j,Object.assign({id:n,type:"checkbox",checked:x,name:t,evChange:e=>{w(e.target.checked),g&&g(e)}},c&&{className:c},""!==l&&{"data-key":l},b)),f.jsx(O,Object.assign({$isError:h},b["data-qa-id"]&&{"data-qa-id":b["data-qa-id"]}))]})},exports.InputComponent=j,exports.LabelComponent=e=>{var{children:r,$mode:n,$position:t}=e,o=a(e,["children","$mode","$position"]);return f.jsx(D,Object.assign({$mode:n,$position:t},o,{children:r}))},exports.LinkComponent=e=>{var{children:r,mode:n,$activated:t=!1,href:o,$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 o?f.jsx(w,Object.assign({className:"_refLink",mode:n,$activated:t,$elipsis:i,$shadow:l,disabled:c,href:o},s,{children:r})):f.jsx(k,Object.assign({className:"_refLink",mode:n,$activated:t,$elipsis:i,$shadow:l,disabled:c,onClick:p},s,{children:r}))},exports.TextComponent=e=>{var{children:r,$color:n,$elipsis:t=!0}=e,o=a(e,["children","$color","$elipsis"]);return f.jsx(h,Object.assign({$elipsis:!!t,$color:n},o,{children:r}))};
|
|
228
240
|
//# sourceMappingURL=index.js.map
|