fis-component 0.0.21 → 0.0.23
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/cjs/index.js +1188 -81
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/src/assets/icons/DecreIcon.d.ts +3 -0
- package/dist/cjs/types/src/assets/icons/DotIcon.d.ts +3 -0
- package/dist/cjs/types/src/assets/icons/HomeIcon.d.ts +3 -0
- package/dist/cjs/types/src/assets/icons/IncreIcon.d.ts +3 -0
- package/dist/cjs/types/src/assets/icons/ResizeIcon.d.ts +3 -0
- package/dist/cjs/types/src/assets/icons/SeparatorIcon.d.ts +3 -0
- package/dist/cjs/types/src/assets/icons/index.d.ts +6 -0
- package/dist/cjs/types/src/components/Avatar/Avatar.stories.d.ts +4 -0
- package/dist/cjs/types/src/components/Avatar/index.d.ts +19 -0
- package/dist/cjs/types/src/components/Avatar/styles.d.ts +13 -0
- package/dist/cjs/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts +14 -0
- package/dist/cjs/types/src/components/Breadcrumb/index.d.ts +14 -0
- package/dist/cjs/types/src/components/Breadcrumb/styles.d.ts +7 -0
- package/dist/cjs/types/src/components/Button/Button.stories.d.ts +1 -1
- package/dist/cjs/types/src/components/Button/index.d.ts +1 -1
- package/dist/cjs/types/src/components/Button/styles.d.ts +1 -1
- package/dist/cjs/types/src/components/{GroupButton/GroupButton.stories.d.ts → ButtonGroup/ButtonGroup.stories.d.ts} +2 -2
- package/dist/{esm/types/src/components/GroupButton → cjs/types/src/components/ButtonGroup}/index.d.ts +4 -2
- package/dist/cjs/types/src/components/Input/InputField/InputField.stories.d.ts +2 -1
- package/dist/cjs/types/src/components/Input/InputField/index.d.ts +4 -4
- package/dist/cjs/types/src/components/Input/InputLabel/index.d.ts +1 -1
- package/dist/cjs/types/src/components/Input/InputLabel/styles.d.ts +1 -1
- package/dist/cjs/types/src/components/Input/InputStepper/InputStepper.stories.d.ts +5 -0
- package/dist/cjs/types/src/components/Input/InputStepper/index.d.ts +20 -0
- package/dist/cjs/types/src/components/Input/InputStepper/styles.d.ts +5 -0
- package/dist/cjs/types/src/components/Input/InputText/index.d.ts +3 -11
- package/dist/cjs/types/src/components/Input/TextArea/TextArea.stories.d.ts +5 -0
- package/dist/cjs/types/src/components/Input/TextArea/index.d.ts +33 -0
- package/dist/cjs/types/src/components/Input/TextArea/styles.d.ts +9 -0
- package/dist/cjs/types/src/components/{GroupRadio → RadioGroup}/index.d.ts +2 -2
- package/dist/cjs/types/src/index.d.ts +7 -1
- package/dist/esm/index.js +1172 -71
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/src/assets/icons/DecreIcon.d.ts +3 -0
- package/dist/esm/types/src/assets/icons/DotIcon.d.ts +3 -0
- package/dist/esm/types/src/assets/icons/HomeIcon.d.ts +3 -0
- package/dist/esm/types/src/assets/icons/IncreIcon.d.ts +3 -0
- package/dist/esm/types/src/assets/icons/ResizeIcon.d.ts +3 -0
- package/dist/esm/types/src/assets/icons/SeparatorIcon.d.ts +3 -0
- package/dist/esm/types/src/assets/icons/index.d.ts +6 -0
- package/dist/esm/types/src/components/Avatar/Avatar.stories.d.ts +4 -0
- package/dist/esm/types/src/components/Avatar/index.d.ts +19 -0
- package/dist/esm/types/src/components/Avatar/styles.d.ts +13 -0
- package/dist/esm/types/src/components/Breadcrumb/Breadcrumb.stories.d.ts +14 -0
- package/dist/esm/types/src/components/Breadcrumb/index.d.ts +14 -0
- package/dist/esm/types/src/components/Breadcrumb/styles.d.ts +7 -0
- package/dist/esm/types/src/components/Button/Button.stories.d.ts +1 -1
- package/dist/esm/types/src/components/Button/index.d.ts +1 -1
- package/dist/esm/types/src/components/Button/styles.d.ts +1 -1
- package/dist/esm/types/src/components/{GroupButton/GroupButton.stories.d.ts → ButtonGroup/ButtonGroup.stories.d.ts} +2 -2
- package/dist/{cjs/types/src/components/GroupButton → esm/types/src/components/ButtonGroup}/index.d.ts +4 -2
- package/dist/esm/types/src/components/Input/InputField/InputField.stories.d.ts +2 -1
- package/dist/esm/types/src/components/Input/InputField/index.d.ts +4 -4
- package/dist/esm/types/src/components/Input/InputLabel/index.d.ts +1 -1
- package/dist/esm/types/src/components/Input/InputLabel/styles.d.ts +1 -1
- package/dist/esm/types/src/components/Input/InputStepper/InputStepper.stories.d.ts +5 -0
- package/dist/esm/types/src/components/Input/InputStepper/index.d.ts +20 -0
- package/dist/esm/types/src/components/Input/InputStepper/styles.d.ts +5 -0
- package/dist/esm/types/src/components/Input/InputText/index.d.ts +3 -11
- package/dist/esm/types/src/components/Input/TextArea/TextArea.stories.d.ts +5 -0
- package/dist/esm/types/src/components/Input/TextArea/index.d.ts +33 -0
- package/dist/esm/types/src/components/Input/TextArea/styles.d.ts +9 -0
- package/dist/esm/types/src/components/{GroupRadio → RadioGroup}/index.d.ts +2 -2
- package/dist/esm/types/src/index.d.ts +7 -1
- package/dist/index.d.ts +135 -21
- package/package.json +1 -1
- /package/dist/cjs/types/src/components/{GroupButton → ButtonGroup}/styles.d.ts +0 -0
- /package/dist/cjs/types/src/components/{GroupCheckbox/GroupCheckbox.stories.d.ts → CheckboxGroup/CheckboxGroup.stories.d.ts} +0 -0
- /package/dist/cjs/types/src/components/{GroupCheckbox → CheckboxGroup}/index.d.ts +0 -0
- /package/dist/cjs/types/src/components/{GroupCheckbox → CheckboxGroup}/styles.d.ts +0 -0
- /package/dist/cjs/types/src/components/{GroupRadio/GroupRadio.stories.d.ts → RadioGroup/RadioGroup.stories.d.ts} +0 -0
- /package/dist/cjs/types/src/components/{GroupRadio → RadioGroup}/styles.d.ts +0 -0
- /package/dist/esm/types/src/components/{GroupButton → ButtonGroup}/styles.d.ts +0 -0
- /package/dist/esm/types/src/components/{GroupCheckbox/GroupCheckbox.stories.d.ts → CheckboxGroup/CheckboxGroup.stories.d.ts} +0 -0
- /package/dist/esm/types/src/components/{GroupCheckbox → CheckboxGroup}/index.d.ts +0 -0
- /package/dist/esm/types/src/components/{GroupCheckbox → CheckboxGroup}/styles.d.ts +0 -0
- /package/dist/esm/types/src/components/{GroupRadio/GroupRadio.stories.d.ts → RadioGroup/RadioGroup.stories.d.ts} +0 -0
- /package/dist/esm/types/src/components/{GroupRadio → RadioGroup}/styles.d.ts +0 -0
package/dist/cjs/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var React = require('react');
|
|
5
5
|
|
|
6
6
|
/******************************************************************************
|
|
7
7
|
Copyright (c) Microsoft Corporation.
|
|
@@ -923,7 +923,7 @@ var unitlessKeys = {
|
|
|
923
923
|
strokeWidth: 1
|
|
924
924
|
};
|
|
925
925
|
|
|
926
|
-
var f="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",m="active",y="data-styled-version",v="6.1.15",g="/*!sc*/\n",S="undefined"!=typeof window&&"HTMLElement"in window,w=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),E=/invalid hook call/i,N=new Set,P=function(t,n){if("production"!==process.env.NODE_ENV){var r$1=n?' with the id of "'.concat(n,'"'):"",s="The component ".concat(t).concat(r$1," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];E.test(t)?(a=!1,N.delete(s)):i.apply(void 0,__spreadArray([t],n,!1));},r.useRef(),a&&!N.has(s)&&(console.warn(s),N.add(s));}catch(e){E.test(e.message)&&N.delete(s);}finally{console.error=i;}}},_=Object.freeze([]),C=Object.freeze({});function I(e,t,n){return void 0===n&&(n=C),e.theme!==n.theme&&e.theme||t||n.theme}var A=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),O=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,D=/(^-|-$)/g;function R(e){return e.replace(O,"-").replace(D,"")}var T=/(a)(d)/gi,k=52,j=function(e){return String.fromCharCode(e+(e>25?39:97))};function x(e){var t,n="";for(t=Math.abs(e);t>k;t=t/k|0)n=j(t%k)+n;return (j(t%k)+n).replace(T,"$1-$2")}var V,F=5381,M=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},z=function(e){return M(F,e)};function $(e){return x(z(e)>>>0)}function B(e){return "production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function L(e){return "string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var G="function"==typeof Symbol&&Symbol.for,Y=G?Symbol.for("react.memo"):60115,q=G?Symbol.for("react.forward_ref"):60112,W={childContextTypes:true,contextType:true,contextTypes:true,defaultProps:true,displayName:true,getDefaultProps:true,getDerivedStateFromError:true,getDerivedStateFromProps:true,mixins:true,propTypes:true,type:true},H={name:true,length:true,prototype:true,caller:true,callee:true,arguments:true,arity:true},U={$$typeof:true,compare:true,defaultProps:true,displayName:true,propTypes:true,type:true},J=((V={})[q]={$$typeof:true,render:true,defaultProps:true,displayName:true,propTypes:true},V[Y]=U,V);function X(e){return ("type"in(t=e)&&t.type.$$typeof)===Y?U:"$$typeof"in e?J[e.$$typeof]:W;var t;}var Z=Object.defineProperty,K=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,ee=Object.getOwnPropertyDescriptor,te=Object.getPrototypeOf,ne=Object.prototype;function re(e,t,n){if("string"!=typeof t){if(ne){var r=te(t);r&&r!==ne&&re(e,r,n);}var o=K(t);Q&&(o=o.concat(Q(t)));for(var s=X(e),i=X(t),a=0;a<o.length;++a){var c=o[a];if(!(c in H||n&&n[c]||i&&c in i||s&&c in s)){var l=ee(t,c);try{Z(e,c,l);}catch(e){}}}}return e}function oe(e){return "function"==typeof e}function se(e){return "object"==typeof e&&"styledComponentId"in e}function ie(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ae(e,t){if(0===e.length)return "";for(var n=e[0],r=1;r<e.length;r++)n+=e[r];return n}function ce(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function le(e,t,n){if(void 0===n&&(n=false),!n&&!ce(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=le(e[r],t[r]);else if(ce(t))for(var r in t)e[r]=le(e[r],t[r]);return e}function ue(e,t){Object.defineProperty(e,"toString",{value:t});}var pe="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach(function(e){n=n.replace(/%[a-z]/,e);}),n}function he(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return "production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(de.apply(void 0,__spreadArray([pe[t]],n,false)).trim())}var fe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw he(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0;}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++);},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n);}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+="".concat(this.tag.getRule(s)).concat(g);return t},e}(),me=1<<30,ye=new Map,ve=new Map,ge=1,Se=function(e){if(ye.has(e))return ye.get(e);for(;ve.has(ge);)ge++;var t=ge++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>me))throw he(16,"".concat(t));return ye.set(e,t),ve.set(t,e),t},we=function(e,t){ge=t+1,ye.set(e,t),ve.set(t,e);},be="style[".concat(f,"][").concat(y,'="').concat(v,'"]'),Ee=new RegExp("^".concat(f,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Ne=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r);},Pe=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(g),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(Ee);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(we(u,l),Ne(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0;}else o.push(a);}}},_e=function(e){for(var t=document.querySelectorAll(be),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(f)!==m&&(Pe(e,o),o.parentNode&&o.parentNode.removeChild(o));}};function Ce(){return "undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ie=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(f,"]")));return t[t.length-1]}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(f,m),r.setAttribute(y,v);var i=Ce();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},Ae=function(){function e(e){this.element=Ie(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw he(17)}(this.element),this.length=0;}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return false}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--;},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Oe=function(){function e(e){this.element=Ie(e),this.nodes=this.element.childNodes,this.length=0;}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,true}return false},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),De=function(){function e(e){this.rules=[],this.length=0;}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,true)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--;},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Re=S,Te={isServer:!S,useCSSOMInjection:!w},ke=function(){function e(e,n,r){ void 0===e&&(e=C),void 0===n&&(n={});var o=this;this.options=__assign(__assign({},Te),e),this.gs=n,this.names=new Map(r),this.server=!!e.isServer,!this.server&&S&&Re&&(Re=false,_e(this)),ue(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return ve.get(e)}(n);if(void 0===o)return "continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||!s.size||0===i.length)return "continue";var a="".concat(f,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","));}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat(g);},s=0;s<n;s++)o(s);return r}(o)});}return e.registerId=function(e){return Se(e)},e.prototype.rehydrate=function(){!this.server&&S&&_e(this);},e.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=true),new e(__assign(__assign({},this.options),n),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new De(n):t?new Ae(n):new Oe(n)}(this.options),new fe(e)));var e;},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(Se(e),this.names.has(e))this.names.get(e).add(t);else {var n=new Set;n.add(t),this.names.set(e,n);}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(Se(e),n);},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear();},e.prototype.clearRules=function(e){this.getTag().clearGroup(Se(e)),this.clearNames(e);},e.prototype.clearTag=function(){this.tag=void 0;},e}(),je=/&/g,xe=/^\s*\/\/.*$/gm;function Ve(e,t){return e.map(function(e){return "rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return "".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=Ve(e.children,t)),e})}function Fe(e){var t,n,r,o=C,s=o.options,i=void 0===s?C:s,a=o.plugins,c=void 0===a?_:a,l=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=c.slice();u.push(function(e){e.type===RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(je,n).replace(r,l));}),i.prefix&&u.push(prefixer),u.push(stringify);var p=function(e,o,s,a){ void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(xe,""),l=compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);i.namespace&&(l=Ve(l,i.namespace));var p=[];return serialize(l,middleware(u.concat(rulesheet(function(e){return p.push(e)})))),p};return p.hash=c.length?c.reduce(function(e,t){return t.name||he(15),M(e,t.name)},F).toString():"",p}var Me=new ke,ze=Fe(),$e=r.createContext({shouldForwardProp:void 0,styleSheet:Me,stylis:ze});$e.Consumer;r.createContext(void 0);function Ge(){return r.useContext($e)}var qe=function(){function e(e,t){var n=this;this.inject=function(e,t){ void 0===t&&(t=ze);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"));},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,ue(this,function(){throw he(12,String(n.name))});}return e.prototype.getName=function(e){return void 0===e&&(e=ze),this.name+e.hash},e}(),We=function(e){return e>="A"&&e<="Z"};function He(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;We(r)?t+="-"+r.toLowerCase():t+=r;}return t.startsWith("ms-")?"-"+t:t}var Ue=function(e){return null==e||false===e||""===e},Je=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!Ue(i)&&(Array.isArray(i)&&i.isCss||oe(i)?o.push("".concat(He(s),":"),i,";"):ce(i)?o.push.apply(o,__spreadArray(__spreadArray(["".concat(s," {")],Je(i),false),["}"],false)):o.push("".concat(He(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in unitlessKeys||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")));}return o};function Xe(e,t,n,r){if(Ue(e))return [];if(se(e))return [".".concat(e.styledComponentId)];if(oe(e)){if(!oe(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return [e];var o=e(t);return "production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof qe||ce(o)||null===o||console.error("".concat(B(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Xe(o,t,n,r)}var s;return e instanceof qe?n?(e.inject(n,r),[e.getName(r)]):[e]:ce(e)?Je(e):Array.isArray(e)?Array.prototype.concat.apply(_,e.map(function(e){return Xe(e,t,n,r)})):[e.toString()]}function Ze(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(oe(n)&&!se(n))return false}return true}var Ke=z(v),Qe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ze(e),this.componentId=t,this.baseHash=M(Ke,t),this.baseStyle=n,ke.registerId(t);}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=ie(r,this.staticRulesId);else {var o=ae(Xe(this.rules,e,t,n)),s=x(M(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i);}r=ie(r,s),this.staticRulesId=s;}else {for(var a=M(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=M(a,u));else if(u){var p=ae(Xe(u,e,t,n));a=M(a,p+l),c+=p;}}if(c){var d=x(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=ie(r,d);}}return r},e}(),et=r.createContext(void 0);et.Consumer;function rt(e){var n=r.useContext(et),o=r.useMemo(function(){return function(e,n){if(!e)throw he(14);if(oe(e)){var r=e(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw he(7);return r}if(Array.isArray(e)||"object"!=typeof e)throw he(8);return n?__assign(__assign({},n),e):e}(e.theme,n)},[e.theme,n]);return e.children?r.createElement(et.Provider,{value:o},e.children):null}var ot={},st=new Set;function it(e,o,s){var i=se(e),a=e,c=!L(e),p=o.attrs,d=void 0===p?_:p,h=o.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":R(e);ot[n]=(ot[n]||0)+1;var r="".concat(n,"-").concat($(v+n+ot[n]));return t?"".concat(t,"-").concat(r):r}(o.displayName,o.parentComponentId):h,m=o.displayName,y=void 0===m?function(e){return L(e)?"styled.".concat(e):"Styled(".concat(B(e),")")}(e):m,g=o.displayName&&o.componentId?"".concat(R(o.displayName),"-").concat(o.componentId):o.componentId||f,S=i&&a.attrs?a.attrs.concat(d).filter(Boolean):d,w=o.shouldForwardProp;if(i&&a.shouldForwardProp){var b=a.shouldForwardProp;if(o.shouldForwardProp){var E=o.shouldForwardProp;w=function(e,t){return b(e,t)&&E(e,t)};}else w=b;}var N=new Qe(s,g,i?a.componentStyle:void 0);function O(e,o){return function(e,o,s){var i=e.attrs,a=e.componentStyle,c=e.defaultProps,p=e.foldedComponentIds,d=e.styledComponentId,h=e.target,f=r.useContext(et),m=Ge(),y=e.shouldForwardProp||m.shouldForwardProp;"production"!==process.env.NODE_ENV&&r.useDebugValue(d);var v=I(o,f,c)||C,g=function(e,n,r){for(var o,s=__assign(__assign({},n),{className:void 0,theme:r}),i=0;i<e.length;i+=1){var a=oe(o=e[i])?o(s):o;for(var c in a)s[c]="className"===c?ie(s[c],a[c]):"style"===c?__assign(__assign({},s[c]),a[c]):a[c];}return n.className&&(s.className=ie(s.className,n.className)),s}(i,o,v),S=g.as||h,w={};for(var b in g) void 0===g[b]||"$"===b[0]||"as"===b||"theme"===b&&g.theme===v||("forwardedAs"===b?w.as=g.forwardedAs:y&&!y(b,S)||(w[b]=g[b],y||"development"!==process.env.NODE_ENV||isPropValid(b)||st.has(b)||!A.has(S)||(st.add(b),console.warn('styled-components: it looks like an unknown prop "'.concat(b,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var E=function(e,t){var n=Ge(),r$1=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return "production"!==process.env.NODE_ENV&&r.useDebugValue(r$1),r$1}(a,g);"production"!==process.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(E);var N=ie(p,d);return E&&(N+=" "+E),g.className&&(N+=" "+g.className),w[L(S)&&!A.has(S)?"class":"className"]=N,s&&(w.ref=s),r.createElement(S,w)}(D,e,o)}O.displayName=y;var D=r.forwardRef(O);return D.attrs=S,D.componentStyle=N,D.displayName=y,D.shouldForwardProp=w,D.foldedComponentIds=i?ie(a.foldedComponentIds,a.styledComponentId):"",D.styledComponentId=g,D.target=i?a.target:e,Object.defineProperty(D,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)le(e,o[r],true);return e}({},a.defaultProps,e):e;}}),"production"!==process.env.NODE_ENV&&(P(y,g),D.warnTooManyClasses=function(e,t){var n={},r=false;return function(o){if(!r&&(n[o]=true,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=true,n={};}}}(y,g)),ue(D,function(){return ".".concat(D.styledComponentId)}),c&&re(D,e,{attrs:true,componentStyle:true,displayName:true,foldedComponentIds:true,shouldForwardProp:true,styledComponentId:true,target:true}),D}function at(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var ct=function(e){return Object.assign(e,{isCss:true})};function lt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(oe(t)||ce(t))return ct(Xe(at(_,__spreadArray([t],n,true))));var o=t;return 0===n.length&&1===o.length&&"string"==typeof o[0]?Xe(o):ct(Xe(at(o,n)))}function ut(n,r,o){if(void 0===o&&(o=C),!r)throw he(1,r);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(r,o,lt.apply(void 0,__spreadArray([t],s,false)))};return s.attrs=function(e){return ut(n,r,__assign(__assign({},o),{attrs:Array.prototype.concat(o.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ut(n,r,__assign(__assign({},o),e))},s}var pt=function(e){return ut(it,e)},dt=pt;A.forEach(function(e){dt[e]=pt(e);});function mt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=ae(lt.apply(void 0,__spreadArray([t],n,false))),s=$(o);return new qe(s,o)}"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var wt="__sc-".concat(f,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[wt]||(window[wt]=0),1===window[wt]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window[wt]+=1);
|
|
926
|
+
var f="undefined"!=typeof process&&void 0!==process.env&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",m="active",y="data-styled-version",v="6.1.15",g="/*!sc*/\n",S="undefined"!=typeof window&&"HTMLElement"in window,w=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&""!==process.env.REACT_APP_SC_DISABLE_SPEEDY?"false"!==process.env.REACT_APP_SC_DISABLE_SPEEDY&&process.env.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!==process.env&&void 0!==process.env.SC_DISABLE_SPEEDY&&""!==process.env.SC_DISABLE_SPEEDY?"false"!==process.env.SC_DISABLE_SPEEDY&&process.env.SC_DISABLE_SPEEDY:"production"!==process.env.NODE_ENV),E=/invalid hook call/i,N=new Set,P=function(t,n){if("production"!==process.env.NODE_ENV){var r=n?' with the id of "'.concat(n,'"'):"",s="The component ".concat(t).concat(r," has been created dynamically.\n")+"You may see this warning because you've called styled inside another component.\nTo resolve this only create new StyledComponents outside of any render method and function component.",i=console.error;try{var a=!0;console.error=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];E.test(t)?(a=!1,N.delete(s)):i.apply(void 0,__spreadArray([t],n,!1));},React.useRef(),a&&!N.has(s)&&(console.warn(s),N.add(s));}catch(e){E.test(e.message)&&N.delete(s);}finally{console.error=i;}}},_=Object.freeze([]),C=Object.freeze({});function I(e,t,n){return void 0===n&&(n=C),e.theme!==n.theme&&e.theme||t||n.theme}var A=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),O=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,D=/(^-|-$)/g;function R(e){return e.replace(O,"-").replace(D,"")}var T=/(a)(d)/gi,k=52,j=function(e){return String.fromCharCode(e+(e>25?39:97))};function x(e){var t,n="";for(t=Math.abs(e);t>k;t=t/k|0)n=j(t%k)+n;return (j(t%k)+n).replace(T,"$1-$2")}var V,F=5381,M=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},z=function(e){return M(F,e)};function $(e){return x(z(e)>>>0)}function B(e){return "production"!==process.env.NODE_ENV&&"string"==typeof e&&e||e.displayName||e.name||"Component"}function L(e){return "string"==typeof e&&("production"===process.env.NODE_ENV||e.charAt(0)===e.charAt(0).toLowerCase())}var G="function"==typeof Symbol&&Symbol.for,Y=G?Symbol.for("react.memo"):60115,q=G?Symbol.for("react.forward_ref"):60112,W={childContextTypes:true,contextType:true,contextTypes:true,defaultProps:true,displayName:true,getDefaultProps:true,getDerivedStateFromError:true,getDerivedStateFromProps:true,mixins:true,propTypes:true,type:true},H={name:true,length:true,prototype:true,caller:true,callee:true,arguments:true,arity:true},U={$$typeof:true,compare:true,defaultProps:true,displayName:true,propTypes:true,type:true},J=((V={})[q]={$$typeof:true,render:true,defaultProps:true,displayName:true,propTypes:true},V[Y]=U,V);function X(e){return ("type"in(t=e)&&t.type.$$typeof)===Y?U:"$$typeof"in e?J[e.$$typeof]:W;var t;}var Z=Object.defineProperty,K=Object.getOwnPropertyNames,Q=Object.getOwnPropertySymbols,ee=Object.getOwnPropertyDescriptor,te=Object.getPrototypeOf,ne=Object.prototype;function re(e,t,n){if("string"!=typeof t){if(ne){var r=te(t);r&&r!==ne&&re(e,r,n);}var o=K(t);Q&&(o=o.concat(Q(t)));for(var s=X(e),i=X(t),a=0;a<o.length;++a){var c=o[a];if(!(c in H||n&&n[c]||i&&c in i||s&&c in s)){var l=ee(t,c);try{Z(e,c,l);}catch(e){}}}}return e}function oe(e){return "function"==typeof e}function se(e){return "object"==typeof e&&"styledComponentId"in e}function ie(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function ae(e,t){if(0===e.length)return "";for(var n=e[0],r=1;r<e.length;r++)n+=e[r];return n}function ce(e){return null!==e&&"object"==typeof e&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function le(e,t,n){if(void 0===n&&(n=false),!n&&!ce(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var r=0;r<t.length;r++)e[r]=le(e[r],t[r]);else if(ce(t))for(var r in t)e[r]=le(e[r],t[r]);return e}function ue(e,t){Object.defineProperty(e,"toString",{value:t});}var pe="production"!==process.env.NODE_ENV?{1:"Cannot create styled-component for component: %s.\n\n",2:"Can't collect styles once you've consumed a `ServerStyleSheet`'s styles! `ServerStyleSheet` is a one off instance for each server-side render cycle.\n\n- Are you trying to reuse it across renders?\n- Are you accidentally calling collectStyles twice?\n\n",3:"Streaming SSR is only supported in a Node.js environment; Please do not try to call this method in the browser.\n\n",4:"The `StyleSheetManager` expects a valid target or sheet prop!\n\n- Does this error occur on the client and is your target falsy?\n- Does this error occur on the server and is the sheet falsy?\n\n",5:"The clone method cannot be used on the client!\n\n- Are you running in a client-like environment on the server?\n- Are you trying to run SSR on the client?\n\n",6:"Trying to insert a new style tag, but the given Node is unmounted!\n\n- Are you using a custom target that isn't mounted?\n- Does your document not have a valid head element?\n- Have you accidentally removed a style tag manually?\n\n",7:'ThemeProvider: Please return an object from your "theme" prop function, e.g.\n\n```js\ntheme={() => ({})}\n```\n\n',8:'ThemeProvider: Please make your "theme" prop an object.\n\n',9:"Missing document `<head>`\n\n",10:"Cannot find a StyleSheet instance. Usually this happens if there are multiple copies of styled-components loaded at once. Check out this issue for how to troubleshoot and fix the common cases where this situation can happen: https://github.com/styled-components/styled-components/issues/1941#issuecomment-417862021\n\n",11:"_This error was replaced with a dev-time warning, it will be deleted for v4 final._ [createGlobalStyle] received children which will not be rendered. Please use the component without passing children elements.\n\n",12:"It seems you are interpolating a keyframe declaration (%s) into an untagged string. This was supported in styled-components v3, but is not longer supported in v4 as keyframes are now injected on-demand. Please wrap your string in the css\\`\\` helper which ensures the styles are injected correctly. See https://www.styled-components.com/docs/api#css\n\n",13:"%s is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.\n\n",14:'ThemeProvider: "theme" prop is required.\n\n',15:"A stylis plugin has been supplied that is not named. We need a name for each plugin to be able to prevent styling collisions between different stylis configurations within the same app. Before you pass your plugin to `<StyleSheetManager stylisPlugins={[]}>`, please make sure each plugin is uniquely-named, e.g.\n\n```js\nObject.defineProperty(importedPlugin, 'name', { value: 'some-unique-name' });\n```\n\n",16:"Reached the limit of how many styled components may be created at group %s.\nYou may only create up to 1,073,741,824 components. If you're creating components dynamically,\nas for instance in your render method then you may be running into this limitation.\n\n",17:"CSSStyleSheet could not be found on HTMLStyleElement.\nHas styled-components' style tag been unmounted or altered by another script?\n",18:"ThemeProvider: Please make sure your useTheme hook is within a `<ThemeProvider>`"}:{};function de(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];for(var n=e[0],r=[],o=1,s=e.length;o<s;o+=1)r.push(e[o]);return r.forEach(function(e){n=n.replace(/%[a-z]/,e);}),n}function he(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];return "production"===process.env.NODE_ENV?new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(t," for more information.").concat(n.length>0?" Args: ".concat(n.join(", ")):"")):new Error(de.apply(void 0,__spreadArray([pe[t]],n,false)).trim())}var fe=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e;}return e.prototype.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},e.prototype.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)if((o<<=1)<0)throw he(16,"".concat(e));this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var s=r;s<o;s++)this.groupSizes[s]=0;}for(var i=this.indexOfGroup(e+1),a=(s=0,t.length);s<a;s++)this.tag.insertRule(i,t[s])&&(this.groupSizes[e]++,i++);},e.prototype.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n);}},e.prototype.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,s=r;s<o;s++)t+="".concat(this.tag.getRule(s)).concat(g);return t},e}(),me=1<<30,ye=new Map,ve=new Map,ge=1,Se=function(e){if(ye.has(e))return ye.get(e);for(;ve.has(ge);)ge++;var t=ge++;if("production"!==process.env.NODE_ENV&&((0|t)<0||t>me))throw he(16,"".concat(t));return ye.set(e,t),ve.set(t,e),t},we=function(e,t){ge=t+1,ye.set(e,t),ve.set(t,e);},be="style[".concat(f,"][").concat(y,'="').concat(v,'"]'),Ee=new RegExp("^".concat(f,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),Ne=function(e,t,n){for(var r,o=n.split(","),s=0,i=o.length;s<i;s++)(r=o[s])&&e.registerName(t,r);},Pe=function(e,t){for(var n,r=(null!==(n=t.textContent)&&void 0!==n?n:"").split(g),o=[],s=0,i=r.length;s<i;s++){var a=r[s].trim();if(a){var c=a.match(Ee);if(c){var l=0|parseInt(c[1],10),u=c[2];0!==l&&(we(u,l),Ne(e,u,c[3]),e.getTag().insertRules(l,o)),o.length=0;}else o.push(a);}}},_e=function(e){for(var t=document.querySelectorAll(be),n=0,r=t.length;n<r;n++){var o=t[n];o&&o.getAttribute(f)!==m&&(Pe(e,o),o.parentNode&&o.parentNode.removeChild(o));}};function Ce(){return "undefined"!=typeof __webpack_nonce__?__webpack_nonce__:null}var Ie=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){var t=Array.from(e.querySelectorAll("style[".concat(f,"]")));return t[t.length-1]}(n),s=void 0!==o?o.nextSibling:null;r.setAttribute(f,m),r.setAttribute(y,v);var i=Ce();return i&&r.setAttribute("nonce",i),n.insertBefore(r,s),r},Ae=function(){function e(e){this.element=Ie(e),this.element.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}throw he(17)}(this.element),this.length=0;}return e.prototype.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return false}},e.prototype.deleteRule=function(e){this.sheet.deleteRule(e),this.length--;},e.prototype.getRule=function(e){var t=this.sheet.cssRules[e];return t&&t.cssText?t.cssText:""},e}(),Oe=function(){function e(e){this.element=Ie(e),this.nodes=this.element.childNodes,this.length=0;}return e.prototype.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t);return this.element.insertBefore(n,this.nodes[e]||null),this.length++,true}return false},e.prototype.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--;},e.prototype.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),De=function(){function e(e){this.rules=[],this.length=0;}return e.prototype.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,true)},e.prototype.deleteRule=function(e){this.rules.splice(e,1),this.length--;},e.prototype.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),Re=S,Te={isServer:!S,useCSSOMInjection:!w},ke=function(){function e(e,n,r){ void 0===e&&(e=C),void 0===n&&(n={});var o=this;this.options=__assign(__assign({},Te),e),this.gs=n,this.names=new Map(r),this.server=!!e.isServer,!this.server&&S&&Re&&(Re=false,_e(this)),ue(this,function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=function(n){var o=function(e){return ve.get(e)}(n);if(void 0===o)return "continue";var s=e.names.get(o),i=t.getGroup(n);if(void 0===s||!s.size||0===i.length)return "continue";var a="".concat(f,".g").concat(n,'[id="').concat(o,'"]'),c="";void 0!==s&&s.forEach(function(e){e.length>0&&(c+="".concat(e,","));}),r+="".concat(i).concat(a,'{content:"').concat(c,'"}').concat(g);},s=0;s<n;s++)o(s);return r}(o)});}return e.registerId=function(e){return Se(e)},e.prototype.rehydrate=function(){!this.server&&S&&_e(this);},e.prototype.reconstructWithOptions=function(n,r){return void 0===r&&(r=true),new e(__assign(__assign({},this.options),n),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(e=function(e){var t=e.useCSSOMInjection,n=e.target;return e.isServer?new De(n):t?new Ae(n):new Oe(n)}(this.options),new fe(e)));var e;},e.prototype.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},e.prototype.registerName=function(e,t){if(Se(e),this.names.has(e))this.names.get(e).add(t);else {var n=new Set;n.add(t),this.names.set(e,n);}},e.prototype.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(Se(e),n);},e.prototype.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear();},e.prototype.clearRules=function(e){this.getTag().clearGroup(Se(e)),this.clearNames(e);},e.prototype.clearTag=function(){this.tag=void 0;},e}(),je=/&/g,xe=/^\s*\/\/.*$/gm;function Ve(e,t){return e.map(function(e){return "rule"===e.type&&(e.value="".concat(t," ").concat(e.value),e.value=e.value.replaceAll(",",",".concat(t," ")),e.props=e.props.map(function(e){return "".concat(t," ").concat(e)})),Array.isArray(e.children)&&"@keyframes"!==e.type&&(e.children=Ve(e.children,t)),e})}function Fe(e){var t,n,r,o=C,s=o.options,i=void 0===s?C:s,a=o.plugins,c=void 0===a?_:a,l=function(e,r,o){return o.startsWith(n)&&o.endsWith(n)&&o.replaceAll(n,"").length>0?".".concat(t):e},u=c.slice();u.push(function(e){e.type===RULESET&&e.value.includes("&")&&(e.props[0]=e.props[0].replace(je,n).replace(r,l));}),i.prefix&&u.push(prefixer),u.push(stringify);var p=function(e,o,s,a){ void 0===o&&(o=""),void 0===s&&(s=""),void 0===a&&(a="&"),t=a,n=o,r=new RegExp("\\".concat(n,"\\b"),"g");var c=e.replace(xe,""),l=compile(s||o?"".concat(s," ").concat(o," { ").concat(c," }"):c);i.namespace&&(l=Ve(l,i.namespace));var p=[];return serialize(l,middleware(u.concat(rulesheet(function(e){return p.push(e)})))),p};return p.hash=c.length?c.reduce(function(e,t){return t.name||he(15),M(e,t.name)},F).toString():"",p}var Me=new ke,ze=Fe(),$e=React.createContext({shouldForwardProp:void 0,styleSheet:Me,stylis:ze});$e.Consumer;React.createContext(void 0);function Ge(){return React.useContext($e)}var qe=function(){function e(e,t){var n=this;this.inject=function(e,t){ void 0===t&&(t=ze);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"));},this.name=e,this.id="sc-keyframes-".concat(e),this.rules=t,ue(this,function(){throw he(12,String(n.name))});}return e.prototype.getName=function(e){return void 0===e&&(e=ze),this.name+e.hash},e}(),We=function(e){return e>="A"&&e<="Z"};function He(e){for(var t="",n=0;n<e.length;n++){var r=e[n];if(1===n&&"-"===r&&"-"===e[0])return e;We(r)?t+="-"+r.toLowerCase():t+=r;}return t.startsWith("ms-")?"-"+t:t}var Ue=function(e){return null==e||false===e||""===e},Je=function(t){var n,r,o=[];for(var s in t){var i=t[s];t.hasOwnProperty(s)&&!Ue(i)&&(Array.isArray(i)&&i.isCss||oe(i)?o.push("".concat(He(s),":"),i,";"):ce(i)?o.push.apply(o,__spreadArray(__spreadArray(["".concat(s," {")],Je(i),false),["}"],false)):o.push("".concat(He(s),": ").concat((n=s,null==(r=i)||"boolean"==typeof r||""===r?"":"number"!=typeof r||0===r||n in unitlessKeys||n.startsWith("--")?String(r).trim():"".concat(r,"px")),";")));}return o};function Xe(e,t,n,r){if(Ue(e))return [];if(se(e))return [".".concat(e.styledComponentId)];if(oe(e)){if(!oe(s=e)||s.prototype&&s.prototype.isReactComponent||!t)return [e];var o=e(t);return "production"===process.env.NODE_ENV||"object"!=typeof o||Array.isArray(o)||o instanceof qe||ce(o)||null===o||console.error("".concat(B(e)," is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details.")),Xe(o,t,n,r)}var s;return e instanceof qe?n?(e.inject(n,r),[e.getName(r)]):[e]:ce(e)?Je(e):Array.isArray(e)?Array.prototype.concat.apply(_,e.map(function(e){return Xe(e,t,n,r)})):[e.toString()]}function Ze(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(oe(n)&&!se(n))return false}return true}var Ke=z(v),Qe=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic="production"===process.env.NODE_ENV&&(void 0===n||n.isStatic)&&Ze(e),this.componentId=t,this.baseHash=M(Ke,t),this.baseStyle=n,ke.registerId(t);}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.baseStyle?this.baseStyle.generateAndInjectStyles(e,t,n):"";if(this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(this.componentId,this.staticRulesId))r=ie(r,this.staticRulesId);else {var o=ae(Xe(this.rules,e,t,n)),s=x(M(this.baseHash,o)>>>0);if(!t.hasNameForId(this.componentId,s)){var i=n(o,".".concat(s),void 0,this.componentId);t.insertRules(this.componentId,s,i);}r=ie(r,s),this.staticRulesId=s;}else {for(var a=M(this.baseHash,n.hash),c="",l=0;l<this.rules.length;l++){var u=this.rules[l];if("string"==typeof u)c+=u,"production"!==process.env.NODE_ENV&&(a=M(a,u));else if(u){var p=ae(Xe(u,e,t,n));a=M(a,p+l),c+=p;}}if(c){var d=x(a>>>0);t.hasNameForId(this.componentId,d)||t.insertRules(this.componentId,d,n(c,".".concat(d),void 0,this.componentId)),r=ie(r,d);}}return r},e}(),et=React.createContext(void 0);et.Consumer;function rt(e){var n=React.useContext(et),o=React.useMemo(function(){return function(e,n){if(!e)throw he(14);if(oe(e)){var r=e(n);if("production"!==process.env.NODE_ENV&&(null===r||Array.isArray(r)||"object"!=typeof r))throw he(7);return r}if(Array.isArray(e)||"object"!=typeof e)throw he(8);return n?__assign(__assign({},n),e):e}(e.theme,n)},[e.theme,n]);return e.children?React.createElement(et.Provider,{value:o},e.children):null}var ot={},st=new Set;function it(e,o,s){var i=se(e),a=e,c=!L(e),p=o.attrs,d=void 0===p?_:p,h=o.componentId,f=void 0===h?function(e,t){var n="string"!=typeof e?"sc":R(e);ot[n]=(ot[n]||0)+1;var r="".concat(n,"-").concat($(v+n+ot[n]));return t?"".concat(t,"-").concat(r):r}(o.displayName,o.parentComponentId):h,m=o.displayName,y=void 0===m?function(e){return L(e)?"styled.".concat(e):"Styled(".concat(B(e),")")}(e):m,g=o.displayName&&o.componentId?"".concat(R(o.displayName),"-").concat(o.componentId):o.componentId||f,S=i&&a.attrs?a.attrs.concat(d).filter(Boolean):d,w=o.shouldForwardProp;if(i&&a.shouldForwardProp){var b=a.shouldForwardProp;if(o.shouldForwardProp){var E=o.shouldForwardProp;w=function(e,t){return b(e,t)&&E(e,t)};}else w=b;}var N=new Qe(s,g,i?a.componentStyle:void 0);function O(e,o){return function(e,o,s){var i=e.attrs,a=e.componentStyle,c=e.defaultProps,p=e.foldedComponentIds,d=e.styledComponentId,h=e.target,f=React.useContext(et),m=Ge(),y=e.shouldForwardProp||m.shouldForwardProp;"production"!==process.env.NODE_ENV&&React.useDebugValue(d);var v=I(o,f,c)||C,g=function(e,n,r){for(var o,s=__assign(__assign({},n),{className:void 0,theme:r}),i=0;i<e.length;i+=1){var a=oe(o=e[i])?o(s):o;for(var c in a)s[c]="className"===c?ie(s[c],a[c]):"style"===c?__assign(__assign({},s[c]),a[c]):a[c];}return n.className&&(s.className=ie(s.className,n.className)),s}(i,o,v),S=g.as||h,w={};for(var b in g) void 0===g[b]||"$"===b[0]||"as"===b||"theme"===b&&g.theme===v||("forwardedAs"===b?w.as=g.forwardedAs:y&&!y(b,S)||(w[b]=g[b],y||"development"!==process.env.NODE_ENV||isPropValid(b)||st.has(b)||!A.has(S)||(st.add(b),console.warn('styled-components: it looks like an unknown prop "'.concat(b,'" is being sent through to the DOM, which will likely trigger a React console error. If you would like automatic filtering of unknown props, you can opt-into that behavior via `<StyleSheetManager shouldForwardProp={...}>` (connect an API like `@emotion/is-prop-valid`) or consider using transient props (`$` prefix for automatic filtering.)')))));var E=function(e,t){var n=Ge(),r=e.generateAndInjectStyles(t,n.styleSheet,n.stylis);return "production"!==process.env.NODE_ENV&&React.useDebugValue(r),r}(a,g);"production"!==process.env.NODE_ENV&&e.warnTooManyClasses&&e.warnTooManyClasses(E);var N=ie(p,d);return E&&(N+=" "+E),g.className&&(N+=" "+g.className),w[L(S)&&!A.has(S)?"class":"className"]=N,s&&(w.ref=s),React.createElement(S,w)}(D,e,o)}O.displayName=y;var D=React.forwardRef(O);return D.attrs=S,D.componentStyle=N,D.displayName=y,D.shouldForwardProp=w,D.foldedComponentIds=i?ie(a.foldedComponentIds,a.styledComponentId):"",D.styledComponentId=g,D.target=i?a.target:e,Object.defineProperty(D,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(e){this._foldedDefaultProps=i?function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];for(var r=0,o=t;r<o.length;r++)le(e,o[r],true);return e}({},a.defaultProps,e):e;}}),"production"!==process.env.NODE_ENV&&(P(y,g),D.warnTooManyClasses=function(e,t){var n={},r=false;return function(o){if(!r&&(n[o]=true,Object.keys(n).length>=200)){var s=t?' with the id of "'.concat(t,'"'):"";console.warn("Over ".concat(200," classes were generated for component ").concat(e).concat(s,".\n")+"Consider using the attrs method, together with a style object for frequently changed styles.\nExample:\n const Component = styled.div.attrs(props => ({\n style: {\n background: props.background,\n },\n }))`width: 100%;`\n\n <Component />"),r=true,n={};}}}(y,g)),ue(D,function(){return ".".concat(D.styledComponentId)}),c&&re(D,e,{attrs:true,componentStyle:true,displayName:true,foldedComponentIds:true,shouldForwardProp:true,styledComponentId:true,target:true}),D}function at(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n}var ct=function(e){return Object.assign(e,{isCss:true})};function lt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];if(oe(t)||ce(t))return ct(Xe(at(_,__spreadArray([t],n,true))));var o=t;return 0===n.length&&1===o.length&&"string"==typeof o[0]?Xe(o):ct(Xe(at(o,n)))}function ut(n,r,o){if(void 0===o&&(o=C),!r)throw he(1,r);var s=function(t){for(var s=[],i=1;i<arguments.length;i++)s[i-1]=arguments[i];return n(r,o,lt.apply(void 0,__spreadArray([t],s,false)))};return s.attrs=function(e){return ut(n,r,__assign(__assign({},o),{attrs:Array.prototype.concat(o.attrs,e).filter(Boolean)}))},s.withConfig=function(e){return ut(n,r,__assign(__assign({},o),e))},s}var pt=function(e){return ut(it,e)},dt=pt;A.forEach(function(e){dt[e]=pt(e);});function mt(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("`keyframes` cannot be used on ReactNative, only on the web. To do animation in ReactNative please use Animated.");var o=ae(lt.apply(void 0,__spreadArray([t],n,false))),s=$(o);return new qe(s,o)}"production"!==process.env.NODE_ENV&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product&&console.warn("It looks like you've imported 'styled-components' on React Native.\nPerhaps you're looking to import 'styled-components/native'?\nRead more about this at https://www.styled-components.com/docs/basics#react-native");var wt="__sc-".concat(f,"__");"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&"undefined"!=typeof window&&(window[wt]||(window[wt]=0),1===window[wt]&&console.warn("It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.\n\nSee https://s-c.sh/2BAXzed for more info."),window[wt]+=1);
|
|
927
927
|
|
|
928
928
|
var theme = {
|
|
929
929
|
"com/breadcrumbs/module/horizontal-gap": "4px",
|
|
@@ -3663,6 +3663,26 @@ const FISThemeProvider = ({ theme: theme$1 = theme, children, }) => jsxRuntime.j
|
|
|
3663
3663
|
|
|
3664
3664
|
const getTheme = (key) => (props) => props.theme[key];
|
|
3665
3665
|
|
|
3666
|
+
function IncreIcon(props) {
|
|
3667
|
+
const { width = 16, height = 16, ...rest } = props;
|
|
3668
|
+
return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M7.99992 3.33331V12.6666M3.33325 7.99998H12.6666", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
|
|
3669
|
+
}
|
|
3670
|
+
|
|
3671
|
+
function DecreIcon(props) {
|
|
3672
|
+
const { width = 16, height = 16, ...rest } = props;
|
|
3673
|
+
return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M3.33325 8H12.6666", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
|
|
3674
|
+
}
|
|
3675
|
+
|
|
3676
|
+
function DotIcon(props) {
|
|
3677
|
+
const { width = 16, height = 16, ...rest } = props;
|
|
3678
|
+
return (jsxRuntime.jsxs("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: [jsxRuntime.jsx("path", { d: "M7.99999 8.66667C8.36818 8.66667 8.66666 8.36819 8.66666 8C8.66666 7.63181 8.36818 7.33334 7.99999 7.33334C7.6318 7.33334 7.33332 7.63181 7.33332 8C7.33332 8.36819 7.6318 8.66667 7.99999 8.66667Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M12.6667 8.66667C13.0348 8.66667 13.3333 8.36819 13.3333 8C13.3333 7.63181 13.0348 7.33334 12.6667 7.33334C12.2985 7.33334 12 7.63181 12 8C12 8.36819 12.2985 8.66667 12.6667 8.66667Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" }), jsxRuntime.jsx("path", { d: "M3.33332 8.66667C3.70151 8.66667 3.99999 8.36819 3.99999 8C3.99999 7.63181 3.70151 7.33334 3.33332 7.33334C2.96513 7.33334 2.66666 7.63181 2.66666 8C2.66666 8.36819 2.96513 8.66667 3.33332 8.66667Z", stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round" })] }));
|
|
3679
|
+
}
|
|
3680
|
+
|
|
3681
|
+
function SeparatorIcon(props) {
|
|
3682
|
+
const { width = 12, height = 12, ...rest } = props;
|
|
3683
|
+
return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M3.5 11L8.5 1", stroke: "currentColor", strokeWidth: "1.3", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
3684
|
+
}
|
|
3685
|
+
|
|
3666
3686
|
function DropdownIcon(props) {
|
|
3667
3687
|
const { width = 16, height = 16, ...rest } = props;
|
|
3668
3688
|
return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M4 6L8 10L12 6", stroke: "currentColor", "stroke-linecap": "round", "stroke-linejoin": "round" }) }));
|
|
@@ -3692,6 +3712,11 @@ function RequestButtonLoadingIcon(props) {
|
|
|
3692
3712
|
} }) }) }) }), jsxRuntime.jsx("path", { d: "m17.294 8.7879c-0.5367 0.17067-1.1132-0.11679-1.2876-0.64204-0.3494-1.0524-0.9894-1.9897-1.8492-2.7083-0.8598-0.71864-1.906-1.1906-3.0228-1.3637s-2.2607-0.0406-3.3054 0.38286c-1.0447 0.42345-1.9493 1.1214-2.6139 2.0166-0.66463 0.89521-1.0633 1.9528-1.152 3.056-0.08872 1.1032 0.13602 2.2088 0.64936 3.1946 0.51334 0.986 1.2953 1.8138 2.2594 2.3919 0.9641 0.5782 2.0728 0.8842 3.2035 0.8842 0.5644 0 1.0219 0.4477 1.0219 1s-0.4575 1-1.0219 1c-1.5076 0-2.9859-0.408-4.2714-1.1789s-2.3281-1.8746-3.0125-3.1892c-0.68445-1.3145-0.9841-2.7887-0.86581-4.2596 0.11829-1.4708 0.6499-2.881 1.5361-4.0746 0.88616-1.1936 2.0924-2.1242 3.4852-2.6888 1.3929-0.56461 2.9182-0.74127 4.4072-0.51047 1.4891 0.2308 2.884 0.86007 4.0304 1.8183 1.1464 0.95818 1.9997 2.2079 2.4656 3.6111 0.1744 0.52525-0.1193 1.0894-0.6561 1.2601z", clipRule: "evenodd", fillRule: "evenodd", "data-figma-gradient-fill": '{"type":"GRADIENT_ANGULAR","stops":[{"color":{"r":0.20392157137393951,"g":0.23921568691730499,"b":0.25490197539329529,"a":1.0},"position":0.69999998807907104},{"color":{"r":0.015686275437474251,"g":0.31764706969261169,"b":0.47058823704719543,"a":0.052999999374151230},"position":0.99000000953674316}],"stopsVar":[{"color":{"r":0.20392157137393951,"g":0.23921568691730499,"b":0.25490197539329529,"a":1.0},"position":0.69999998807907104},{"color":{"r":0.015686275437474251,"g":0.31764706969261169,"b":0.47058823704719543,"a":0.052999999374151230},"position":0.99000000953674316}],"transform":{"m00":2.1799759864807129,"m01":-17.439807891845703,"m02":17.804824829101562,"m10":17.066665649414062,"m11":2.1333332061767578,"m12":0.40000331401824951},"opacity":1.0,"blendMode":"NORMAL","visible":true}' }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "a", children: jsxRuntime.jsx("path", { d: "m17.294 8.7879c-0.5367 0.17067-1.1132-0.11679-1.2876-0.64204-0.3494-1.0524-0.9894-1.9897-1.8492-2.7083-0.8598-0.71864-1.906-1.1906-3.0228-1.3637s-2.2607-0.0406-3.3054 0.38286c-1.0447 0.42345-1.9493 1.1214-2.6139 2.0166-0.66463 0.89521-1.0633 1.9528-1.152 3.056-0.08872 1.1032 0.13602 2.2088 0.64936 3.1946 0.51334 0.986 1.2953 1.8138 2.2594 2.3919 0.9641 0.5782 2.0728 0.8842 3.2035 0.8842 0.5644 0 1.0219 0.4477 1.0219 1s-0.4575 1-1.0219 1c-1.5076 0-2.9859-0.408-4.2714-1.1789s-2.3281-1.8746-3.0125-3.1892c-0.68445-1.3145-0.9841-2.7887-0.86581-4.2596 0.11829-1.4708 0.6499-2.881 1.5361-4.0746 0.88616-1.1936 2.0924-2.1242 3.4852-2.6888 1.3929-0.56461 2.9182-0.74127 4.4072-0.51047 1.4891 0.2308 2.884 0.86007 4.0304 1.8183 1.1464 0.95818 1.9997 2.2079 2.4656 3.6111 0.1744 0.52525-0.1193 1.0894-0.6561 1.2601z", clipRule: "evenodd", fillRule: "evenodd" }) }) })] }));
|
|
3693
3713
|
}
|
|
3694
3714
|
|
|
3715
|
+
function ResizeIcon(props) {
|
|
3716
|
+
const { width = 20, height = 20, ...rest } = props;
|
|
3717
|
+
return (jsxRuntime.jsx("svg", { width: width, height: height, viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...rest, children: jsxRuntime.jsx("path", { d: "M12 14L14 12M7 14L14 7", stroke: "currentColor", "stroke-linecap": "round" }) }));
|
|
3718
|
+
}
|
|
3719
|
+
|
|
3695
3720
|
const ButtonSC = dt.button `
|
|
3696
3721
|
display: flex;
|
|
3697
3722
|
justify-content: center;
|
|
@@ -3721,7 +3746,7 @@ const ButtonSC = dt.button `
|
|
|
3721
3746
|
}
|
|
3722
3747
|
|
|
3723
3748
|
.button-content {
|
|
3724
|
-
visibility: ${(props) => (props.$
|
|
3749
|
+
visibility: ${(props) => (props.$loading ? "hidden" : "visible")};
|
|
3725
3750
|
}
|
|
3726
3751
|
|
|
3727
3752
|
// size of the button
|
|
@@ -3834,8 +3859,6 @@ const ButtonSC = dt.button `
|
|
|
3834
3859
|
${SpanIconSC} {
|
|
3835
3860
|
color: ${getTheme("com/button/primary/icon/color-icon/pressed")};
|
|
3836
3861
|
}
|
|
3837
|
-
outline: none;
|
|
3838
|
-
box-shadow: none;
|
|
3839
3862
|
}
|
|
3840
3863
|
|
|
3841
3864
|
${props.$active &&
|
|
@@ -3858,7 +3881,7 @@ const ButtonSC = dt.button `
|
|
|
3858
3881
|
}
|
|
3859
3882
|
}
|
|
3860
3883
|
|
|
3861
|
-
${props.$
|
|
3884
|
+
${props.$loading &&
|
|
3862
3885
|
lt `
|
|
3863
3886
|
background-color: ${getTheme("com/button/loading/background-color")} !important;
|
|
3864
3887
|
`}
|
|
@@ -3918,7 +3941,7 @@ const ButtonSC = dt.button `
|
|
|
3918
3941
|
}
|
|
3919
3942
|
}
|
|
3920
3943
|
|
|
3921
|
-
${props.$
|
|
3944
|
+
${props.$loading &&
|
|
3922
3945
|
lt `
|
|
3923
3946
|
background-color: ${getTheme("com/button/loading/background-color")} !important;
|
|
3924
3947
|
border-color: ${getTheme("com/button/loading/stroke-color")} !important;
|
|
@@ -3979,7 +4002,7 @@ const ButtonSC = dt.button `
|
|
|
3979
4002
|
}
|
|
3980
4003
|
}
|
|
3981
4004
|
|
|
3982
|
-
${props.$
|
|
4005
|
+
${props.$loading &&
|
|
3983
4006
|
lt `
|
|
3984
4007
|
background-color: ${getTheme("com/button/loading/background-color")} !important;
|
|
3985
4008
|
border-color: ${getTheme("com/button/loading/stroke-color")} !important;
|
|
@@ -4033,7 +4056,7 @@ const ButtonSC = dt.button `
|
|
|
4033
4056
|
}
|
|
4034
4057
|
}
|
|
4035
4058
|
|
|
4036
|
-
${props.$
|
|
4059
|
+
${props.$loading &&
|
|
4037
4060
|
lt `
|
|
4038
4061
|
background-color: ${getTheme("com/button/loading/background-color")} !important;
|
|
4039
4062
|
`}
|
|
@@ -4093,7 +4116,7 @@ const ButtonSC = dt.button `
|
|
|
4093
4116
|
}
|
|
4094
4117
|
}
|
|
4095
4118
|
|
|
4096
|
-
${props.$
|
|
4119
|
+
${props.$loading &&
|
|
4097
4120
|
lt `
|
|
4098
4121
|
background-color: ${getTheme("com/button/loading/background-color")} !important;
|
|
4099
4122
|
border-color: ${getTheme("com/button/loading/stroke-color")};
|
|
@@ -4147,7 +4170,7 @@ const ButtonSC = dt.button `
|
|
|
4147
4170
|
}
|
|
4148
4171
|
}
|
|
4149
4172
|
|
|
4150
|
-
${props.$
|
|
4173
|
+
${props.$loading &&
|
|
4151
4174
|
lt `
|
|
4152
4175
|
background-color: ${getTheme("com/button/loading-invert/solid-background-color")} !important;
|
|
4153
4176
|
`}
|
|
@@ -4209,7 +4232,7 @@ const ButtonSC = dt.button `
|
|
|
4209
4232
|
}
|
|
4210
4233
|
}
|
|
4211
4234
|
|
|
4212
|
-
${props.$
|
|
4235
|
+
${props.$loading &&
|
|
4213
4236
|
lt `
|
|
4214
4237
|
background-color: ${getTheme("com/button/disable-invert/background-color-transparent")} !important;
|
|
4215
4238
|
border-color: ${getTheme("com/button/disable-invert/stroke-color")} !important;
|
|
@@ -4244,13 +4267,14 @@ const SvgSpinningIconSC = dt(RequestButtonLoadingIcon) `
|
|
|
4244
4267
|
animation: ${spin} 0.9s linear infinite;
|
|
4245
4268
|
`;
|
|
4246
4269
|
|
|
4247
|
-
const FISButton =
|
|
4248
|
-
const { active, type, children, size = "md", variant = "primary",
|
|
4249
|
-
const startIcon = startIconProp &&
|
|
4250
|
-
const endIcon = endIconProp &&
|
|
4251
|
-
return (jsxRuntime.jsxs(ButtonSC, { ...rest, ref: ref, "$variant": variant, "$size": size, "$active": active, "$
|
|
4270
|
+
const FISButton = React.forwardRef((props, ref) => {
|
|
4271
|
+
const { active, type, children, size = "md", variant = "primary", loading, disabled = false, startIcon: startIconProp, endIcon: endIconProp, ...rest } = props;
|
|
4272
|
+
const startIcon = startIconProp && jsxRuntime.jsx(SpanIconSC, { children: startIconProp });
|
|
4273
|
+
const endIcon = endIconProp && jsxRuntime.jsx(SpanIconSC, { children: endIconProp });
|
|
4274
|
+
return (jsxRuntime.jsxs(ButtonSC, { ...rest, ref: ref, "$variant": variant, "$size": size, "$active": active, "$loading": loading, disabled: disabled || loading, children: [loading &&
|
|
4252
4275
|
(variant === "primary-white" || variant === "secondary-white" ? (jsxRuntime.jsx(SvgSpinningWhiteIconSC, {})) : (jsxRuntime.jsx(SvgSpinningIconSC, {}))), startIcon, jsxRuntime.jsx("span", { className: "button-content", children: children }), endIcon] }));
|
|
4253
4276
|
});
|
|
4277
|
+
FISButton.displayName = "FISButton";
|
|
4254
4278
|
|
|
4255
4279
|
const LinkButtonStyled = dt.button `
|
|
4256
4280
|
display: flex;
|
|
@@ -4485,12 +4509,13 @@ const IconStyled$1 = dt.span `
|
|
|
4485
4509
|
align-items: center;
|
|
4486
4510
|
`;
|
|
4487
4511
|
|
|
4488
|
-
const FISLinkButton =
|
|
4512
|
+
const FISLinkButton = React.forwardRef((props, ref) => {
|
|
4489
4513
|
const { type, children, size = "sm", variant = "default", underline, startIcon: startIconProp, endIcon: endIconProp, ...rest } = props;
|
|
4490
4514
|
const startIcon = startIconProp && (jsxRuntime.jsx(IconStyled$1, { className: "button-icon", children: startIconProp }));
|
|
4491
4515
|
const endIcon = endIconProp && (jsxRuntime.jsx(IconStyled$1, { className: "button-icon", children: endIconProp }));
|
|
4492
4516
|
return (jsxRuntime.jsxs(LinkButtonStyled, { ...rest, ref: ref, "$variant": variant, "$size": size, "$underline": underline, children: [startIcon, jsxRuntime.jsx("span", { className: "button-content", children: children }), endIcon] }));
|
|
4493
4517
|
});
|
|
4518
|
+
FISLinkButton.displayName = "FISLinkButton";
|
|
4494
4519
|
|
|
4495
4520
|
const ButtonStyled = dt.button `
|
|
4496
4521
|
display: flex;
|
|
@@ -4919,10 +4944,11 @@ const ButtonStyled = dt.button `
|
|
|
4919
4944
|
}}
|
|
4920
4945
|
`;
|
|
4921
4946
|
|
|
4922
|
-
const FISIconButton =
|
|
4947
|
+
const FISIconButton = React.forwardRef((props, ref) => {
|
|
4923
4948
|
const { type, children, active = false, size = "md", variant = "primary", icon: iconProp, ...rest } = props;
|
|
4924
4949
|
return (jsxRuntime.jsx(ButtonStyled, { ...rest, ref: ref, "$variant": variant, "$size": size, "$active": active, children: iconProp }));
|
|
4925
4950
|
});
|
|
4951
|
+
FISIconButton.displayName = "FISIconButton";
|
|
4926
4952
|
|
|
4927
4953
|
const GroupButtonContainerStyled = dt.div `
|
|
4928
4954
|
overflow: hidden;
|
|
@@ -5193,8 +5219,8 @@ const IconStyled = dt.span `
|
|
|
5193
5219
|
align-items: center;
|
|
5194
5220
|
`;
|
|
5195
5221
|
|
|
5196
|
-
const
|
|
5197
|
-
return (jsxRuntime.jsx(GroupButtonContainerStyled, { children: options.map((option, index) => (
|
|
5222
|
+
const FISButtonGroup = ({ className, size = "md", disabled = false, options, variant, }) => {
|
|
5223
|
+
return (jsxRuntime.jsx(GroupButtonContainerStyled, { className: className, children: options.map((option, index) => (React.createElement(Button, { ...option, key: index, disabledContainer: disabled, size: size, variant: variant }))) }));
|
|
5198
5224
|
};
|
|
5199
5225
|
const Button = ({ disabledContainer, startIcon: startIconProp, endIcon: endIconProp, size = "md", variant = "default", label, disabled, ...rest }) => {
|
|
5200
5226
|
const onlyIcon = Boolean(!label &&
|
|
@@ -5204,6 +5230,90 @@ const Button = ({ disabledContainer, startIcon: startIconProp, endIcon: endIconP
|
|
|
5204
5230
|
return (jsxRuntime.jsxs(ButtonItemStyled, { ...rest, disabled: disabledContainer || disabled, "$onlyIcon": onlyIcon, "$size": size, "$variant": variant, children: [startIcon, label && jsxRuntime.jsx("span", { className: "button-content", children: label }), endIcon] }));
|
|
5205
5231
|
};
|
|
5206
5232
|
|
|
5233
|
+
const DivContainerSC$4 = dt.div `
|
|
5234
|
+
display: flex;
|
|
5235
|
+
align-items: center;
|
|
5236
|
+
`;
|
|
5237
|
+
const DivIconSC$2 = dt.div `
|
|
5238
|
+
display: flex;
|
|
5239
|
+
align-items: center;
|
|
5240
|
+
`;
|
|
5241
|
+
const SpanLabelSC$1 = dt.span `
|
|
5242
|
+
${getTheme("Label/XS")};
|
|
5243
|
+
color: ${getTheme("com/breadcrumbs/module/non-current/label/color-text/default")};
|
|
5244
|
+
`;
|
|
5245
|
+
const ButtonItemSC = dt.button `
|
|
5246
|
+
all: unset;
|
|
5247
|
+
display: flex;
|
|
5248
|
+
align-items: center;
|
|
5249
|
+
cursor: pointer;
|
|
5250
|
+
|
|
5251
|
+
${getTheme("Label/XS")}
|
|
5252
|
+
color: ${getTheme("com/breadcrumbs/module/non-current/label/color-text/default")};
|
|
5253
|
+
padding-top: ${getTheme("com/breadcrumbs/module/vertical-padding")};
|
|
5254
|
+
padding-bottom: ${getTheme("com/breadcrumbs/module/vertical-padding")};
|
|
5255
|
+
padding-right: ${getTheme("com/breadcrumbs/module/horizontal-padding")};
|
|
5256
|
+
padding-left: ${getTheme("com/breadcrumbs/module/horizontal-padding")};
|
|
5257
|
+
border-radius: ${getTheme("sem/dimension/radius/component/sm")};
|
|
5258
|
+
gap: ${getTheme("com/breadcrumbs/module/horizontal-gap")};
|
|
5259
|
+
|
|
5260
|
+
&:hover {
|
|
5261
|
+
background-color: ${getTheme("sem/color/background/neutral/canvas/hover")};
|
|
5262
|
+
${SpanLabelSC$1} {
|
|
5263
|
+
color: ${getTheme("com/breadcrumbs/module/non-current/label/color-text/hover")};
|
|
5264
|
+
}
|
|
5265
|
+
|
|
5266
|
+
${DivIconSC$2} {
|
|
5267
|
+
color: ${getTheme("com/breadcrumbs/module/non-current/icon/color-icon/hover")};
|
|
5268
|
+
}
|
|
5269
|
+
}
|
|
5270
|
+
|
|
5271
|
+
${(props) => props.$active &&
|
|
5272
|
+
lt `
|
|
5273
|
+
background-color: ${getTheme("sem/color/background/neutral/canvas/active")};
|
|
5274
|
+
outline: ${getTheme("com/actived-mark/gap-spacing")} solid
|
|
5275
|
+
${getTheme("com/actived-mark/color-gap-spacing")};
|
|
5276
|
+
|
|
5277
|
+
${SpanLabelSC$1} {
|
|
5278
|
+
color: ${getTheme("com/breadcrumbs/module/non-current/label/color-text/active")};
|
|
5279
|
+
}
|
|
5280
|
+
|
|
5281
|
+
${DivIconSC$2} {
|
|
5282
|
+
color: ${getTheme("com/breadcrumbs/module/non-current/icon/color-icon/active")};
|
|
5283
|
+
}
|
|
5284
|
+
`}
|
|
5285
|
+
|
|
5286
|
+
&:focus-visible {
|
|
5287
|
+
background-color: ${getTheme("com/focus-mark/background-color")};
|
|
5288
|
+
box-shadow: 0 0 0 ${getTheme("sem/dimension/stroke-width/divider/lg")}
|
|
5289
|
+
${getTheme("com/focus-mark/color-gap-spacing")},
|
|
5290
|
+
0 0 0 4px ${getTheme("com/focus-mark/color-stroke")};
|
|
5291
|
+
}
|
|
5292
|
+
`;
|
|
5293
|
+
const DivIconDotSC = dt.div `
|
|
5294
|
+
display: flex;
|
|
5295
|
+
align-items: center;
|
|
5296
|
+
justify-items: center;
|
|
5297
|
+
padding-top: ${getTheme("com/breadcrumbs/module/vertical-padding")};
|
|
5298
|
+
padding-bottom: ${getTheme("com/breadcrumbs/module/vertical-padding")};
|
|
5299
|
+
padding-right: ${getTheme("com/breadcrumbs/module/horizontal-padding")};
|
|
5300
|
+
padding-left: ${getTheme("com/breadcrumbs/module/horizontal-padding")};
|
|
5301
|
+
gap: ${getTheme("com/breadcrumbs/module/horizontal-gap")};
|
|
5302
|
+
border-radius: ${getTheme("com/breadcrumbs/module/corner-radius")};
|
|
5303
|
+
`;
|
|
5304
|
+
|
|
5305
|
+
const MAX_VISIBLE_ITEMS = 4;
|
|
5306
|
+
const BreadcrumbItem = React.forwardRef(({ label, icon, active, onClick, ...rest }, ref) => {
|
|
5307
|
+
return (jsxRuntime.jsxs(ButtonItemSC, { ...rest, ref: ref, onClick: onClick, "$active": active, children: [icon && jsxRuntime.jsx(DivIconSC$2, { children: icon }), label && jsxRuntime.jsx(SpanLabelSC$1, { children: label })] }));
|
|
5308
|
+
});
|
|
5309
|
+
const BreadcrumbEllipsis = () => (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(DivIconDotSC, { children: jsxRuntime.jsx(DotIcon, {}) }), jsxRuntime.jsx(SeparatorIcon, {})] }));
|
|
5310
|
+
const FISBreadcrumb = ({ items, className }) => {
|
|
5311
|
+
if (items.length === 0)
|
|
5312
|
+
return null;
|
|
5313
|
+
return (jsxRuntime.jsxs(DivContainerSC$4, { className: className, children: [items?.[0]?.icon && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(FISIconButton, { size: "xs", icon: items?.[0]?.icon, variant: "tertiary-invisible", onClick: items[0].onClick }), jsxRuntime.jsx(SeparatorIcon, {})] })), items.length > MAX_VISIBLE_ITEMS ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [items.slice(1, 2).map((item, index) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(BreadcrumbItem, { ...item }), jsxRuntime.jsx(SeparatorIcon, {})] }, index))), jsxRuntime.jsx(BreadcrumbEllipsis, {}), items.slice(-2).map((item, index) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(BreadcrumbItem, { ...item }), jsxRuntime.jsx(SeparatorIcon, {})] }, `end-${index}`)))] })) : (jsxRuntime.jsx(jsxRuntime.Fragment, { children: items.slice(1).map((item, index) => (jsxRuntime.jsxs(React.Fragment, { children: [jsxRuntime.jsx(BreadcrumbItem, { ...item }), jsxRuntime.jsx(SeparatorIcon, {})] }, index))) }))] }));
|
|
5314
|
+
};
|
|
5315
|
+
FISBreadcrumb.displayName = "FISBreadcrumb";
|
|
5316
|
+
|
|
5207
5317
|
const SpanRadioControlSC = dt.span `
|
|
5208
5318
|
display: inline-flex;
|
|
5209
5319
|
align-items: center;
|
|
@@ -5384,10 +5494,44 @@ const LabelRadioContainerSC = dt.label `
|
|
|
5384
5494
|
}}
|
|
5385
5495
|
`;
|
|
5386
5496
|
|
|
5387
|
-
const FISRadio =
|
|
5388
|
-
const radioId = `radio-${
|
|
5497
|
+
const FISRadio = React.forwardRef(({ className, children, subLabel, checked = false, disabled = false, size = "md", variant = "primary", inputRef, "aria-label": ariaLabel, ...rest }, forwardedRef) => {
|
|
5498
|
+
const radioId = `radio-${React.useId()}`;
|
|
5389
5499
|
return (jsxRuntime.jsxs(LabelRadioContainerSC, { ref: forwardedRef, className: className, "$checked": checked, "$disabled": disabled, "$size": size, "$variant": variant, children: [jsxRuntime.jsxs(SpanRadioControlSC, { tabIndex: disabled ? -1 : 0, children: [jsxRuntime.jsx(InputVisuallyHiddenSC, { ...rest, ref: inputRef, type: "radio", checked: checked, disabled: disabled, "aria-label": ariaLabel, "aria-labelledby": children ? radioId : undefined }), checked && jsxRuntime.jsx(SpanRadioControlInnerSC, {})] }), (children || subLabel) && (jsxRuntime.jsxs(SpanLabelContainerSC, { children: [children && jsxRuntime.jsx(SpanLabelSC, { id: radioId, children: children }), subLabel && jsxRuntime.jsx(SpanSubLabelSC, { children: subLabel })] }))] }));
|
|
5390
5500
|
});
|
|
5501
|
+
FISRadio.displayName = "FISRadio";
|
|
5502
|
+
|
|
5503
|
+
const DivContainerSC$3 = dt.div `
|
|
5504
|
+
display: flex;
|
|
5505
|
+
flex-wrap: wrap;
|
|
5506
|
+
gap: 20px;
|
|
5507
|
+
|
|
5508
|
+
${(props) => props.$direction === "row"
|
|
5509
|
+
? lt `
|
|
5510
|
+
flex-direction: row;
|
|
5511
|
+
`
|
|
5512
|
+
: lt `
|
|
5513
|
+
flex-direction: column;
|
|
5514
|
+
`}
|
|
5515
|
+
`;
|
|
5516
|
+
const DivScreenReaderLabelSC$1 = dt.div `
|
|
5517
|
+
position: absolute;
|
|
5518
|
+
width: 1px;
|
|
5519
|
+
height: 1px;
|
|
5520
|
+
padding: 0;
|
|
5521
|
+
margin: -1px;
|
|
5522
|
+
overflow: hidden;
|
|
5523
|
+
clip: rect(0, 0, 0, 0);
|
|
5524
|
+
white-space: nowrap;
|
|
5525
|
+
border: 0;
|
|
5526
|
+
`;
|
|
5527
|
+
|
|
5528
|
+
function FISRadioGroup({ className, groupLabel, options, name, value, direction = "row", disabled, getOptionDisabled, onChange, onFocus, onBlur, }) {
|
|
5529
|
+
const groupId = "radio-group-" + React.useId();
|
|
5530
|
+
const handleChange = (option) => {
|
|
5531
|
+
onChange(option.value);
|
|
5532
|
+
};
|
|
5533
|
+
return (jsxRuntime.jsxs(DivContainerSC$3, { role: "radiogroup", className: className, "aria-labelledby": groupId, "$direction": direction, children: [jsxRuntime.jsx(DivScreenReaderLabelSC$1, { id: groupId, children: groupLabel }), options.map((option) => (jsxRuntime.jsx(FISRadio, { value: option.value, name: name, disabled: getOptionDisabled?.(option) ?? disabled, checked: option.value === value, onChange: () => handleChange(option), onFocus: onFocus, onBlur: onBlur, children: option.label }, option.value)))] }));
|
|
5534
|
+
}
|
|
5391
5535
|
|
|
5392
5536
|
const CheckboxControlStyled = dt.span `
|
|
5393
5537
|
display: inline-flex;
|
|
@@ -5578,10 +5722,41 @@ const CheckboxContainerStyled = dt.label `
|
|
|
5578
5722
|
`;
|
|
5579
5723
|
|
|
5580
5724
|
// Main Component
|
|
5581
|
-
const FISCheckbox =
|
|
5582
|
-
const checkboxId = `checkbox-${
|
|
5725
|
+
const FISCheckbox = React.forwardRef(({ className, children, subLabel, checked = false, indeterminate = false, disabled = false, size = "md", variant = "primary", inputRef, ...rest }, forwardedRef) => {
|
|
5726
|
+
const checkboxId = `checkbox-${React.useId()}`;
|
|
5583
5727
|
return (jsxRuntime.jsxs(CheckboxContainerStyled, { ref: forwardedRef, className: className, "$checked": checked, "$indeterminate": indeterminate, "$disabled": disabled, "$size": size, "$variant": variant, children: [jsxRuntime.jsxs(CheckboxControlStyled, { tabIndex: disabled ? -1 : 0, children: [jsxRuntime.jsx(VisuallyHiddenStyled, { ...rest, ref: inputRef, type: "checkbox", checked: checked, disabled: disabled, "aria-labelledby": children ? checkboxId : undefined }), checked ? jsxRuntime.jsx(checkedIcon, {}) : null, !checked && indeterminate ? jsxRuntime.jsx(IndeterminateIcon, {}) : null] }), (children || subLabel) && (jsxRuntime.jsxs(LabelContainerStyled, { children: [children && jsxRuntime.jsx(LabelStyled, { id: checkboxId, children: children }), subLabel && jsxRuntime.jsx(SubLabelStyled, { children: subLabel })] }))] }));
|
|
5584
5728
|
});
|
|
5729
|
+
FISCheckbox.displayName = "FISCheckbox";
|
|
5730
|
+
|
|
5731
|
+
const DivGroupContainerSC = dt.div `
|
|
5732
|
+
display: flex;
|
|
5733
|
+
flex-wrap: wrap;
|
|
5734
|
+
gap: 20px;
|
|
5735
|
+
flex-direction: ${props => props.$direction};
|
|
5736
|
+
`;
|
|
5737
|
+
const DivScreenReaderLabelSC = dt.div `
|
|
5738
|
+
position: absolute;
|
|
5739
|
+
width: 1px;
|
|
5740
|
+
height: 1px;
|
|
5741
|
+
padding: 0;
|
|
5742
|
+
margin: -1px;
|
|
5743
|
+
overflow: hidden;
|
|
5744
|
+
clip: rect(0, 0, 0, 0);
|
|
5745
|
+
white-space: nowrap;
|
|
5746
|
+
border: 0;
|
|
5747
|
+
`;
|
|
5748
|
+
|
|
5749
|
+
function FISCheckboxGroup({ className, groupLabel, options, value = [], direction = "row", disabled, getOptionDisabled, onChange, onFocus, onBlur, }) {
|
|
5750
|
+
const groupId = "checkbox-group-" + React.useId();
|
|
5751
|
+
const validValue = value.filter((v) => options.some((option) => option.value === v));
|
|
5752
|
+
const handleChange = (option) => {
|
|
5753
|
+
const nextValue = validValue.includes(option.value)
|
|
5754
|
+
? validValue.filter((v) => v !== option.value)
|
|
5755
|
+
: [...validValue, option.value];
|
|
5756
|
+
onChange(nextValue);
|
|
5757
|
+
};
|
|
5758
|
+
return (jsxRuntime.jsxs(DivGroupContainerSC, { role: "group", className: className, "$direction": direction, "aria-labelledby": groupId, children: [jsxRuntime.jsx(DivScreenReaderLabelSC, { id: groupId, children: groupLabel }), options.map((option) => (jsxRuntime.jsx(FISCheckbox, { value: option.value, disabled: getOptionDisabled?.(option) ?? disabled, checked: value.includes(option.value), onChange: () => handleChange(option), onFocus: onFocus, onBlur: onBlur, children: option.label }, option.value)))] }));
|
|
5759
|
+
}
|
|
5585
5760
|
|
|
5586
5761
|
var classnames = {exports: {}};
|
|
5587
5762
|
|
|
@@ -5663,12 +5838,13 @@ var classnames = {exports: {}};
|
|
|
5663
5838
|
var classnamesExports = classnames.exports;
|
|
5664
5839
|
var classNames = /*@__PURE__*/getDefaultExportFromCjs(classnamesExports);
|
|
5665
5840
|
|
|
5666
|
-
const InputSC = dt.input `
|
|
5841
|
+
const InputSC$1 = dt.input `
|
|
5667
5842
|
width: 100%;
|
|
5668
5843
|
${getTheme("Paragraph/Sm")}
|
|
5669
5844
|
color: ${getTheme("com/input/field/default/label/color-text/inputed")};
|
|
5670
5845
|
padding-right: ${getTheme("com/input/field/size-md/label/sub-spacing")};
|
|
5671
5846
|
padding-left: ${getTheme("com/input/field/size-md/label/sub-spacing")};
|
|
5847
|
+
caret-color: ${getTheme("com/typing-cursor/default")};
|
|
5672
5848
|
border: none;
|
|
5673
5849
|
background: transparent;
|
|
5674
5850
|
outline: none;
|
|
@@ -5682,11 +5858,11 @@ const InputSC = dt.input `
|
|
|
5682
5858
|
color: ${getTheme("com/input/field/disable/label-color")};
|
|
5683
5859
|
}
|
|
5684
5860
|
}
|
|
5685
|
-
&.
|
|
5861
|
+
&.negative {
|
|
5686
5862
|
color: ${getTheme("com/input/field/negative/label/color-text/inputed")};
|
|
5687
5863
|
}
|
|
5688
5864
|
`;
|
|
5689
|
-
const DivIconSC = dt.div `
|
|
5865
|
+
const DivIconSC$1 = dt.div `
|
|
5690
5866
|
display: flex;
|
|
5691
5867
|
flex-shrink: 0;
|
|
5692
5868
|
align-items: center;
|
|
@@ -5750,19 +5926,24 @@ const DivDropdownSC = dt.div `
|
|
|
5750
5926
|
}
|
|
5751
5927
|
|
|
5752
5928
|
&:focus {
|
|
5753
|
-
box-shadow:
|
|
5929
|
+
box-shadow:
|
|
5930
|
+
0 0 0 ${getTheme("com/focus-mark/gap-spacing")}
|
|
5754
5931
|
${getTheme("com/focus-mark/color-gap-spacing")},
|
|
5755
5932
|
0 0 0 4px ${getTheme("com/focus-mark/color-stroke")};
|
|
5756
5933
|
border-radius: ${getTheme("com/input/field/size-md/corner-radius")};
|
|
5757
5934
|
border-left: none;
|
|
5758
5935
|
}
|
|
5759
5936
|
|
|
5760
|
-
&.
|
|
5937
|
+
&.actived {
|
|
5761
5938
|
background-color: ${getTheme("com/input/dropdown/background/actived")};
|
|
5762
5939
|
outline: ${getTheme("com/actived-mark/gap-spacing")} solid
|
|
5763
5940
|
${getTheme("com/actived-mark/color-gap-spacing")};
|
|
5764
5941
|
border-left: none;
|
|
5765
5942
|
}
|
|
5943
|
+
|
|
5944
|
+
&.disabled {
|
|
5945
|
+
cursor: not-allowed;
|
|
5946
|
+
}
|
|
5766
5947
|
`;
|
|
5767
5948
|
const DivSuffixSC = dt.div `
|
|
5768
5949
|
display: flex;
|
|
@@ -5775,12 +5956,17 @@ const DivSuffixSC = dt.div `
|
|
|
5775
5956
|
${getTheme("com/input/suffix/divider/color-stroke")};
|
|
5776
5957
|
height: 100%;
|
|
5777
5958
|
cursor: pointer;
|
|
5959
|
+
|
|
5960
|
+
&.disabled {
|
|
5961
|
+
cursor: not-allowed;
|
|
5962
|
+
}
|
|
5778
5963
|
`;
|
|
5779
5964
|
const SpanTextSC = dt.span `
|
|
5780
5965
|
${getTheme("Paragraph/XS")};
|
|
5781
5966
|
color: ${getTheme("com/input/suffix/label/color-text")};
|
|
5782
5967
|
`;
|
|
5783
|
-
const DivContainerSC$
|
|
5968
|
+
const DivContainerSC$2 = dt.div `
|
|
5969
|
+
width: fit-content;
|
|
5784
5970
|
height: ${getTheme("com/input/field/size-md/height")};
|
|
5785
5971
|
min-height: ${getTheme("com/input/field/size-md/height")};
|
|
5786
5972
|
max-height: ${getTheme("com/input/field/size-md/height")};
|
|
@@ -5794,7 +5980,7 @@ const DivContainerSC$1 = dt.div `
|
|
|
5794
5980
|
display: flex;
|
|
5795
5981
|
align-items: center;
|
|
5796
5982
|
|
|
5797
|
-
&.
|
|
5983
|
+
&.dropdown {
|
|
5798
5984
|
padding-right: 0;
|
|
5799
5985
|
}
|
|
5800
5986
|
.icon-suffix {
|
|
@@ -5802,7 +5988,7 @@ const DivContainerSC$1 = dt.div `
|
|
|
5802
5988
|
color: ${getTheme("com/button/tertiary/icon/color-icon/default")};
|
|
5803
5989
|
}
|
|
5804
5990
|
|
|
5805
|
-
&.
|
|
5991
|
+
&.negative {
|
|
5806
5992
|
color: ${getTheme("com/input/character-limit/label/over-limit/color-text")};
|
|
5807
5993
|
}
|
|
5808
5994
|
|
|
@@ -5813,12 +5999,12 @@ const DivContainerSC$1 = dt.div `
|
|
|
5813
5999
|
border-radius: ${getTheme("com/input/field/size-lg/corner-radius")};
|
|
5814
6000
|
}
|
|
5815
6001
|
|
|
5816
|
-
&:has(${InputSC}:disabled) {
|
|
6002
|
+
&:has(${InputSC$1}:disabled) {
|
|
5817
6003
|
border-color: ${getTheme("com/input/field/disable/stroke-color")};
|
|
5818
6004
|
background-color: ${getTheme("com/input/field/disable/background-color")};
|
|
5819
6005
|
cursor: not-allowed;
|
|
5820
6006
|
|
|
5821
|
-
${DivIconSC} {
|
|
6007
|
+
${DivIconSC$1} {
|
|
5822
6008
|
color: ${getTheme("com/input/field/disable/icon-color")};
|
|
5823
6009
|
}
|
|
5824
6010
|
${DivIconSuffixSC} {
|
|
@@ -5842,25 +6028,25 @@ const DivContainerSC$1 = dt.div `
|
|
|
5842
6028
|
border-color: ${getTheme("com/input/field/default/border/hover")};
|
|
5843
6029
|
background-color: ${getTheme("com/input/field/default/background/hover")};
|
|
5844
6030
|
|
|
5845
|
-
${DivIconSC} {
|
|
6031
|
+
${DivIconSC$1} {
|
|
5846
6032
|
color: ${getTheme("com/input/field/default/icon/color-icon/hover")};
|
|
5847
6033
|
}
|
|
5848
6034
|
}
|
|
5849
|
-
&:has(${InputSC}:focus) {
|
|
6035
|
+
&:has(${InputSC$1}:focus) {
|
|
5850
6036
|
border-color: ${getTheme("com/input/field/default/border/active")};
|
|
5851
6037
|
background-color: ${getTheme("com/input/field/default/background/active")};
|
|
5852
6038
|
outline: ${getTheme("com/actived-mark/gap-spacing")} solid
|
|
5853
6039
|
${getTheme("com/actived-mark/color-gap-spacing")};
|
|
5854
6040
|
|
|
5855
|
-
${DivIconSC} {
|
|
6041
|
+
${DivIconSC$1} {
|
|
5856
6042
|
color: ${getTheme("com/input/field/default/icon/color-icon/active")};
|
|
5857
6043
|
}
|
|
5858
6044
|
}
|
|
5859
|
-
&.
|
|
6045
|
+
&.negative {
|
|
5860
6046
|
border-color: ${getTheme("com/input/field/negative/border/default")};
|
|
5861
6047
|
background-color: ${getTheme("com/input/field/negative/background/default")};
|
|
5862
6048
|
|
|
5863
|
-
${DivIconSC} {
|
|
6049
|
+
${DivIconSC$1} {
|
|
5864
6050
|
color: ${getTheme("com/input/field/negative/icon/color-icon/default")};
|
|
5865
6051
|
}
|
|
5866
6052
|
|
|
@@ -5868,33 +6054,45 @@ const DivContainerSC$1 = dt.div `
|
|
|
5868
6054
|
border-color: ${getTheme("com/input/field/negative/border/hover")};
|
|
5869
6055
|
background-color: ${getTheme("com/input/field/negative/background/hover")};
|
|
5870
6056
|
|
|
5871
|
-
${DivIconSC} {
|
|
6057
|
+
${DivIconSC$1} {
|
|
5872
6058
|
color: ${getTheme("com/input/field/negative/icon/color-icon/hover")};
|
|
5873
6059
|
}
|
|
5874
6060
|
}
|
|
5875
6061
|
|
|
6062
|
+
&:has(${InputSC$1}:focus) {
|
|
6063
|
+
border-color: ${getTheme("com/input/field/negative/border/active")};
|
|
6064
|
+
background-color: ${getTheme("com/input/field/negative/background/active")};
|
|
6065
|
+
outline: ${getTheme("com/actived-mark/gap-spacing")} solid
|
|
6066
|
+
${getTheme("com/actived-mark/color-gap-spacing")};
|
|
6067
|
+
|
|
6068
|
+
${DivIconSC$1} {
|
|
6069
|
+
color: ${getTheme("com/input/field/negative/icon/color-icon/active")};
|
|
6070
|
+
}
|
|
6071
|
+
}
|
|
6072
|
+
|
|
5876
6073
|
&::placeholder {
|
|
5877
6074
|
color: ${getTheme("com/input/field/negative/label/color-text/placeholder")};
|
|
5878
6075
|
}
|
|
5879
6076
|
}
|
|
5880
6077
|
`;
|
|
5881
6078
|
|
|
5882
|
-
const FISInputField =
|
|
5883
|
-
const { sizeInput = "md", iconPrefix, iconSuffix, labelSuffix, typeSuffix,
|
|
5884
|
-
return (jsxRuntime.jsxs(DivContainerSC$
|
|
6079
|
+
const FISInputField = React.forwardRef(({ onClickSuffix, ...props }, ref) => {
|
|
6080
|
+
const { sizeInput = "md", iconPrefix, iconSuffix, labelSuffix, typeSuffix, disabled = true, negative, actived, ...rest } = props;
|
|
6081
|
+
return (jsxRuntime.jsxs(DivContainerSC$2, { className: classNames({
|
|
5885
6082
|
"input-text-lg": sizeInput === "lg",
|
|
5886
|
-
|
|
5887
|
-
|
|
5888
|
-
}), children: [iconPrefix && jsxRuntime.jsx(DivIconSC, { children: iconPrefix }), jsxRuntime.jsx(InputSC, { ...rest, ref: ref, className: classNames({
|
|
5889
|
-
|
|
5890
|
-
}) }), typeSuffix === "icon" && iconSuffix && (jsxRuntime.jsx(FISIconButton, { size: "sm", icon: iconSuffix, variant: "tertiary-invisible", className: "icon-suffix", onClick: onClickSuffix })), typeSuffix === "suffix" && (jsxRuntime.jsxs(DivSuffixSC, { onClick: onClickSuffix, children: [iconSuffix && jsxRuntime.jsx(DivIconSuffixSC, { children: iconSuffix }), labelSuffix && jsxRuntime.jsx(SpanTextSC, { children: labelSuffix })] })), typeSuffix === "dropdown" && (jsxRuntime.jsxs(DivDropdownSC, { className: classNames({
|
|
6083
|
+
negative: negative,
|
|
6084
|
+
dropdown: typeSuffix === "dropdown",
|
|
6085
|
+
}), children: [iconPrefix && jsxRuntime.jsx(DivIconSC$1, { children: iconPrefix }), jsxRuntime.jsx(InputSC$1, { ...rest, ref: ref, disabled: disabled, className: classNames({
|
|
6086
|
+
negative: negative,
|
|
6087
|
+
}) }), typeSuffix === "icon" && iconSuffix && (jsxRuntime.jsx(FISIconButton, { size: "sm", icon: iconSuffix, variant: "tertiary-invisible", className: "icon-suffix", onClick: onClickSuffix, disabled: disabled })), typeSuffix === "suffix" && (jsxRuntime.jsxs(DivSuffixSC, { onClick: onClickSuffix, className: classNames({ disabled: disabled }), children: [iconSuffix && jsxRuntime.jsx(DivIconSuffixSC, { children: iconSuffix }), labelSuffix && jsxRuntime.jsx(SpanTextSC, { children: labelSuffix })] })), typeSuffix === "dropdown" && (jsxRuntime.jsxs(DivDropdownSC, { className: classNames({ actived: actived, disabled: disabled }), onClick: onClickSuffix, children: [iconSuffix && jsxRuntime.jsx(DivIconDropSC, { children: iconSuffix }), labelSuffix && jsxRuntime.jsx(SpanTextDropSC, { children: labelSuffix }), jsxRuntime.jsx(DivIconSuffixSC, { children: jsxRuntime.jsx(DropdownIcon, {}) })] }))] }));
|
|
5891
6088
|
});
|
|
5892
6089
|
FISInputField.displayName = "FISInputField";
|
|
5893
6090
|
|
|
5894
|
-
const DivContainerSC = dt.div `
|
|
6091
|
+
const DivContainerSC$1 = dt.div `
|
|
5895
6092
|
display: flex;
|
|
5896
6093
|
flex-direction: column;
|
|
5897
6094
|
gap: ${getTheme("com/input/vertical-gap")};
|
|
6095
|
+
width: fit-content;
|
|
5898
6096
|
`;
|
|
5899
6097
|
const SpanCountSC = dt.span `
|
|
5900
6098
|
${getTheme("Subheading/XS")}
|
|
@@ -5902,7 +6100,7 @@ const SpanCountSC = dt.span `
|
|
|
5902
6100
|
padding-right: ${getTheme("com/input/character-limit/horizontal-padding")};
|
|
5903
6101
|
padding-left: ${getTheme("com/input/character-limit/horizontal-padding")};
|
|
5904
6102
|
|
|
5905
|
-
&.
|
|
6103
|
+
&.negative {
|
|
5906
6104
|
color: ${getTheme("com/input/character-limit/label/over-limit/color-text")};
|
|
5907
6105
|
}
|
|
5908
6106
|
`;
|
|
@@ -5910,25 +6108,25 @@ const DivHintWrapperSC = dt.div `
|
|
|
5910
6108
|
display: flex;
|
|
5911
6109
|
justify-content: space-between;
|
|
5912
6110
|
`;
|
|
5913
|
-
const SpanHintSC = dt.span `
|
|
6111
|
+
const SpanHintSC$2 = dt.span `
|
|
5914
6112
|
${getTheme("Paragraph/XS")}
|
|
5915
6113
|
color: ${getTheme("com/input/hint/neutral/label/color-text")};
|
|
5916
6114
|
padding-top: ${getTheme("com/input/hint/top-padding")};
|
|
5917
6115
|
|
|
5918
|
-
&.
|
|
6116
|
+
&.negative {
|
|
5919
6117
|
color: ${getTheme("com/input/hint/negative/label/color-text")};
|
|
5920
6118
|
}
|
|
5921
6119
|
|
|
5922
|
-
&.
|
|
6120
|
+
&.positive {
|
|
5923
6121
|
color: ${getTheme("com/input/hint/positive/label/color-text")};
|
|
5924
6122
|
}
|
|
5925
6123
|
|
|
5926
|
-
&.disabled
|
|
6124
|
+
&.disabled {
|
|
5927
6125
|
color: ${getTheme("com/input/hint/disable/label/color-text")};
|
|
5928
6126
|
}
|
|
5929
6127
|
`;
|
|
5930
6128
|
|
|
5931
|
-
const
|
|
6129
|
+
const DivLabelSC = dt.div `
|
|
5932
6130
|
width: 100%;
|
|
5933
6131
|
display: flex;
|
|
5934
6132
|
align-items: center;
|
|
@@ -5942,23 +6140,24 @@ const SpanRequiredSC = dt.span `
|
|
|
5942
6140
|
color: ${getTheme("com/input/label/required-mark/color-text")};
|
|
5943
6141
|
`;
|
|
5944
6142
|
|
|
5945
|
-
const FISInputLabel =
|
|
5946
|
-
const { textLabel,
|
|
5947
|
-
return (jsxRuntime.jsxs(
|
|
6143
|
+
const FISInputLabel = React.forwardRef((props) => {
|
|
6144
|
+
const { textLabel, required, iconLabel, onClickIconLabel } = props;
|
|
6145
|
+
return (jsxRuntime.jsxs(DivLabelSC, { children: [jsxRuntime.jsxs(LabelTextSC, { children: [textLabel, required && jsxRuntime.jsx(SpanRequiredSC, { children: "\u00A0*" })] }), iconLabel && (jsxRuntime.jsx(FISIconButton, { size: "xs", variant: "tertiary-invisible", icon: iconLabel, onClick: onClickIconLabel }))] }));
|
|
5948
6146
|
});
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
const
|
|
5953
|
-
const
|
|
5954
|
-
const
|
|
5955
|
-
const
|
|
6147
|
+
FISInputLabel.displayName = "FISInputLabel";
|
|
6148
|
+
|
|
6149
|
+
const FISInputText = React.forwardRef((props, ref) => {
|
|
6150
|
+
const { className, typeSuffix, textLabel = "", iconLabel, required, iconPrefix, sizeInput, showCount, message, negative, positive, maxLength = 500, value, disabled, onChange, onEnter, onBlur, onKeyDown, onClickIconLabel, onClickSuffix, autoFocus, ...rest } = props;
|
|
6151
|
+
const [internalValue, setInternalValue] = React.useState("");
|
|
6152
|
+
const isEdited = React.useRef(false);
|
|
6153
|
+
const inputRef = React.useRef(null);
|
|
6154
|
+
const handleChange = React.useCallback((event) => {
|
|
5956
6155
|
setInternalValue(event.target.value);
|
|
5957
6156
|
if (onChange) {
|
|
5958
6157
|
onChange(event.target.value);
|
|
5959
6158
|
}
|
|
5960
6159
|
}, [onChange]);
|
|
5961
|
-
const handleKeyPress =
|
|
6160
|
+
const handleKeyPress = React.useCallback((event) => {
|
|
5962
6161
|
if (!event)
|
|
5963
6162
|
return;
|
|
5964
6163
|
if (event.key === "Enter") {
|
|
@@ -5967,17 +6166,17 @@ const FISInputText = r.forwardRef((props, ref) => {
|
|
|
5967
6166
|
}
|
|
5968
6167
|
}
|
|
5969
6168
|
}, [onEnter]);
|
|
5970
|
-
const handleKeyDown =
|
|
6169
|
+
const handleKeyDown = React.useCallback((event) => {
|
|
5971
6170
|
if (onKeyDown) {
|
|
5972
6171
|
onKeyDown(event);
|
|
5973
6172
|
}
|
|
5974
6173
|
}, [onKeyDown]);
|
|
5975
|
-
const handleBlur =
|
|
6174
|
+
const handleBlur = React.useCallback((event) => {
|
|
5976
6175
|
if (typeof onBlur === "function") {
|
|
5977
6176
|
onBlur(event.currentTarget.value);
|
|
5978
6177
|
}
|
|
5979
6178
|
}, [onBlur]);
|
|
5980
|
-
|
|
6179
|
+
React.useEffect(() => {
|
|
5981
6180
|
if (value) {
|
|
5982
6181
|
setInternalValue(value);
|
|
5983
6182
|
}
|
|
@@ -5986,12 +6185,12 @@ const FISInputText = r.forwardRef((props, ref) => {
|
|
|
5986
6185
|
}
|
|
5987
6186
|
isEdited.current = true;
|
|
5988
6187
|
}, [value]);
|
|
5989
|
-
|
|
6188
|
+
React.useEffect(() => {
|
|
5990
6189
|
if (autoFocus && inputRef.current) {
|
|
5991
6190
|
inputRef.current.focus();
|
|
5992
6191
|
}
|
|
5993
6192
|
}, [autoFocus]);
|
|
5994
|
-
|
|
6193
|
+
React.useImperativeHandle(ref, () => {
|
|
5995
6194
|
const inputElement = inputRef.current;
|
|
5996
6195
|
return {
|
|
5997
6196
|
...inputElement,
|
|
@@ -6013,26 +6212,934 @@ const FISInputText = r.forwardRef((props, ref) => {
|
|
|
6013
6212
|
},
|
|
6014
6213
|
};
|
|
6015
6214
|
});
|
|
6016
|
-
return (jsxRuntime.jsxs(DivContainerSC, { children: [
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
}), children:
|
|
6021
|
-
|
|
6022
|
-
}), children: isHintText ? hintText : "" })), showCount && maxLength > 0 && (jsxRuntime.jsxs(SpanCountSC, { className: classNames({
|
|
6023
|
-
"is-error": internalValue.length > maxLength,
|
|
6215
|
+
return (jsxRuntime.jsxs(DivContainerSC$1, { className: className, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsx(FISInputField, { ...rest, typeSuffix: typeSuffix, sizeInput: sizeInput, value: internalValue, iconPrefix: iconPrefix, onChange: handleChange, onKeyPress: handleKeyPress, onKeyDown: handleKeyDown, onBlur: handleBlur, disabled: disabled, ref: inputRef, negative: negative, onClickSuffix: onClickSuffix }), jsxRuntime.jsxs(DivHintWrapperSC, { children: [jsxRuntime.jsx(SpanHintSC$2, { className: classNames({
|
|
6216
|
+
disabled: disabled,
|
|
6217
|
+
negative: negative,
|
|
6218
|
+
positive: positive,
|
|
6219
|
+
}), children: message ? message : "" }), showCount && maxLength > 0 && (jsxRuntime.jsxs(SpanCountSC, { className: classNames({
|
|
6220
|
+
negative: internalValue.length > maxLength,
|
|
6024
6221
|
}), children: [internalValue.length, "/", maxLength] }))] })] }));
|
|
6025
6222
|
});
|
|
6026
6223
|
FISInputText.displayName = "FISInputText";
|
|
6027
6224
|
|
|
6225
|
+
const DivContainer = dt.div `
|
|
6226
|
+
position: relative;
|
|
6227
|
+
display: flex;
|
|
6228
|
+
align-items: center;
|
|
6229
|
+
justify-content: center;
|
|
6230
|
+
|
|
6231
|
+
${(props) => {
|
|
6232
|
+
switch (props.$size) {
|
|
6233
|
+
case "2xs":
|
|
6234
|
+
return lt `
|
|
6235
|
+
border: ${getTheme("com/avatar/size-2xs/stroke-width")} solid
|
|
6236
|
+
${getTheme("com/avatar/theme/color-stroke/neutral")};
|
|
6237
|
+
`;
|
|
6238
|
+
case "xs":
|
|
6239
|
+
return lt `
|
|
6240
|
+
border: ${getTheme("com/avatar/size-xs/stroke-width")} solid
|
|
6241
|
+
${getTheme("com/avatar/theme/color-stroke/neutral")};
|
|
6242
|
+
`;
|
|
6243
|
+
case "sm":
|
|
6244
|
+
return lt `
|
|
6245
|
+
border: ${getTheme("com/avatar/size-sm/stroke-width")} solid
|
|
6246
|
+
${getTheme("com/avatar/theme/color-stroke/neutral")};
|
|
6247
|
+
`;
|
|
6248
|
+
case "md":
|
|
6249
|
+
return lt `
|
|
6250
|
+
border: ${getTheme("com/avatar/size-md/stroke-width")} solid
|
|
6251
|
+
${getTheme("com/avatar/theme/color-stroke/neutral")};
|
|
6252
|
+
`;
|
|
6253
|
+
case "lg":
|
|
6254
|
+
return lt `
|
|
6255
|
+
border: ${getTheme("com/avatar/size-lg/stroke-width")} solid
|
|
6256
|
+
${getTheme("com/avatar/theme/color-stroke/neutral")};
|
|
6257
|
+
`;
|
|
6258
|
+
case "xl":
|
|
6259
|
+
return lt `
|
|
6260
|
+
border: ${getTheme("com/avatar/size-xl/stroke-width")} solid
|
|
6261
|
+
${getTheme("com/avatar/theme/color-stroke/neutral")};
|
|
6262
|
+
`;
|
|
6263
|
+
}
|
|
6264
|
+
}}
|
|
6265
|
+
${(props) => {
|
|
6266
|
+
switch (props.$color) {
|
|
6267
|
+
case "neutral":
|
|
6268
|
+
return lt `
|
|
6269
|
+
border-color: ${getTheme("com/avatar/theme/color-stroke/neutral")};
|
|
6270
|
+
background-color: ${getTheme("com/avatar/theme/background-color/neutral")};
|
|
6271
|
+
`;
|
|
6272
|
+
case "orange":
|
|
6273
|
+
return lt `
|
|
6274
|
+
border-color: ${getTheme("com/avatar/theme/color-stroke/orange")};
|
|
6275
|
+
background-color: ${getTheme("com/avatar/theme/background-color/orange")};
|
|
6276
|
+
`;
|
|
6277
|
+
case "yellow":
|
|
6278
|
+
return lt `
|
|
6279
|
+
border-color: ${getTheme("com/avatar/theme/color-stroke/yellow")};
|
|
6280
|
+
background-color: ${getTheme("com/avatar/theme/background-color/yellow")};
|
|
6281
|
+
`;
|
|
6282
|
+
case "lime":
|
|
6283
|
+
return lt `
|
|
6284
|
+
border-color: ${getTheme("com/avatar/theme/color-stroke/lime")};
|
|
6285
|
+
background-color: ${getTheme("com/avatar/theme/background-color/lime")};
|
|
6286
|
+
`;
|
|
6287
|
+
case "green":
|
|
6288
|
+
return lt `
|
|
6289
|
+
border-color: ${getTheme("com/avatar/theme/color-stroke/green")};
|
|
6290
|
+
background-color: ${getTheme("com/avatar/theme/background-color/green")};
|
|
6291
|
+
`;
|
|
6292
|
+
case "ocean":
|
|
6293
|
+
return lt `
|
|
6294
|
+
border-color: ${getTheme("com/avatar/theme/color-stroke/ocean")};
|
|
6295
|
+
background-color: ${getTheme("com/avatar/theme/background-color/ocean")};
|
|
6296
|
+
`;
|
|
6297
|
+
case "blue":
|
|
6298
|
+
return lt `
|
|
6299
|
+
border-color: ${getTheme("com/avatar/theme/color-stroke/blue")};
|
|
6300
|
+
background-color: ${getTheme("com/avatar/theme/background-color/blue")};
|
|
6301
|
+
`;
|
|
6302
|
+
case "indigo":
|
|
6303
|
+
return lt `
|
|
6304
|
+
border-color: ${getTheme("com/avatar/theme/color-stroke/indigo")};
|
|
6305
|
+
background-color: ${getTheme("com/avatar/theme/background-color/indigo")};
|
|
6306
|
+
`;
|
|
6307
|
+
case "violet":
|
|
6308
|
+
return lt `
|
|
6309
|
+
border-color: ${getTheme("com/avatar/theme/color-stroke/violet")};
|
|
6310
|
+
background-color: ${getTheme("com/avatar/theme/background-color/violet")};
|
|
6311
|
+
`;
|
|
6312
|
+
case "pink":
|
|
6313
|
+
return lt `
|
|
6314
|
+
border-color: ${getTheme("com/avatar/theme/color-stroke/pink")};
|
|
6315
|
+
background-color: ${getTheme("com/avatar/theme/background-color/pink")};
|
|
6316
|
+
`;
|
|
6317
|
+
case "disable":
|
|
6318
|
+
return lt `
|
|
6319
|
+
border-color: ${getTheme("com/avatar/disable/color-stroke")};
|
|
6320
|
+
background-color: ${getTheme("com/avatar/disable/background-color")};
|
|
6321
|
+
`;
|
|
6322
|
+
}
|
|
6323
|
+
}}
|
|
6324
|
+
// size of the avatar
|
|
6325
|
+
${(props) => {
|
|
6326
|
+
switch (props.$size) {
|
|
6327
|
+
case "2xs":
|
|
6328
|
+
return lt `
|
|
6329
|
+
width: ${getTheme("com/avatar/size-2xs/width")};
|
|
6330
|
+
height: ${getTheme("com/avatar/size-2xs/height")};
|
|
6331
|
+
min-width: ${getTheme("com/avatar/size-2xs/width")};
|
|
6332
|
+
max-width: ${getTheme("com/avatar/size-2xs/width")};
|
|
6333
|
+
min-height: ${getTheme("com/avatar/size-2xs/height")};
|
|
6334
|
+
max-height: ${getTheme("com/avatar/size-2xs/height")};
|
|
6335
|
+
`;
|
|
6336
|
+
case "xs":
|
|
6337
|
+
return lt `
|
|
6338
|
+
width: ${getTheme("com/avatar/size-xs/width")};
|
|
6339
|
+
height: ${getTheme("com/avatar/size-xs/height")};
|
|
6340
|
+
min-width: ${getTheme("com/avatar/size-xs/width")};
|
|
6341
|
+
max-width: ${getTheme("com/avatar/size-xs/width")};
|
|
6342
|
+
min-height: ${getTheme("com/avatar/size-xs/height")};
|
|
6343
|
+
max-height: ${getTheme("com/avatar/size-xs/height")};
|
|
6344
|
+
`;
|
|
6345
|
+
case "sm":
|
|
6346
|
+
return lt `
|
|
6347
|
+
width: ${getTheme("com/avatar/size-sm/width")};
|
|
6348
|
+
height: ${getTheme("com/avatar/size-sm/height")};
|
|
6349
|
+
min-width: ${getTheme("com/avatar/size-sm/width")};
|
|
6350
|
+
max-width: ${getTheme("com/avatar/size-sm/width")};
|
|
6351
|
+
min-height: ${getTheme("com/avatar/size-sm/height")};
|
|
6352
|
+
max-height: ${getTheme("com/avatar/size-sm/height")};
|
|
6353
|
+
`;
|
|
6354
|
+
case "md":
|
|
6355
|
+
return lt `
|
|
6356
|
+
width: ${getTheme("com/avatar/size-md/width")};
|
|
6357
|
+
height: ${getTheme("com/avatar/size-md/height")};
|
|
6358
|
+
min-width: ${getTheme("com/avatar/size-md/width")};
|
|
6359
|
+
max-width: ${getTheme("com/avatar/size-md/width")};
|
|
6360
|
+
min-height: ${getTheme("com/avatar/size-md/height")};
|
|
6361
|
+
max-height: ${getTheme("com/avatar/size-md/height")};
|
|
6362
|
+
`;
|
|
6363
|
+
case "lg":
|
|
6364
|
+
return lt `
|
|
6365
|
+
width: ${getTheme("com/avatar/size-lg/width")};
|
|
6366
|
+
height: ${getTheme("com/avatar/size-lg/height")};
|
|
6367
|
+
min-width: ${getTheme("com/avatar/size-lg/width")};
|
|
6368
|
+
max-width: ${getTheme("com/avatar/size-lg/width")};
|
|
6369
|
+
min-height: ${getTheme("com/avatar/size-lg/height")};
|
|
6370
|
+
max-height: ${getTheme("com/avatar/size-lg/height")};
|
|
6371
|
+
`;
|
|
6372
|
+
case "xl":
|
|
6373
|
+
return lt `
|
|
6374
|
+
width: ${getTheme("com/avatar/size-xl/width")};
|
|
6375
|
+
height: ${getTheme("com/avatar/size-xl/height")};
|
|
6376
|
+
min-width: ${getTheme("com/avatar/size-xl/width")};
|
|
6377
|
+
max-width: ${getTheme("com/avatar/size-xl/width")};
|
|
6378
|
+
min-height: ${getTheme("com/avatar/size-xl/height")};
|
|
6379
|
+
max-height: ${getTheme("com/avatar/size-xl/height")};
|
|
6380
|
+
`;
|
|
6381
|
+
}
|
|
6382
|
+
}}
|
|
6383
|
+
${(props) => {
|
|
6384
|
+
switch (props.$badge) {
|
|
6385
|
+
case "rounded":
|
|
6386
|
+
return lt `
|
|
6387
|
+
border-radius: ${getTheme("com/avatar/corner-radius-rounded")};
|
|
6388
|
+
`;
|
|
6389
|
+
case "square":
|
|
6390
|
+
return lt `
|
|
6391
|
+
border-radius: ${getTheme("com/avatar/size-xl/corner-radius")};
|
|
6392
|
+
`;
|
|
6393
|
+
}
|
|
6394
|
+
}};
|
|
6395
|
+
`;
|
|
6396
|
+
const ImgAvatar = dt.img `
|
|
6397
|
+
object-fit: cover;
|
|
6398
|
+
display: flex;
|
|
6399
|
+
align-items: center;
|
|
6400
|
+
justify-content: center;
|
|
6401
|
+
width: 100%;
|
|
6402
|
+
height: 100%;
|
|
6403
|
+
|
|
6404
|
+
// badge of the avatar
|
|
6405
|
+
${(props) => {
|
|
6406
|
+
switch (props.$badge) {
|
|
6407
|
+
case "rounded":
|
|
6408
|
+
return lt `
|
|
6409
|
+
border-radius: ${getTheme("com/avatar/corner-radius-rounded")};
|
|
6410
|
+
`;
|
|
6411
|
+
case "square":
|
|
6412
|
+
return lt `
|
|
6413
|
+
border-radius: ${getTheme("com/avatar/size-xl/corner-radius")};
|
|
6414
|
+
`;
|
|
6415
|
+
}
|
|
6416
|
+
}}
|
|
6417
|
+
`;
|
|
6418
|
+
const DivIcon = dt.div `
|
|
6419
|
+
object-fit: cover;
|
|
6420
|
+
display: flex;
|
|
6421
|
+
align-items: center;
|
|
6422
|
+
justify-content: center;
|
|
6423
|
+
|
|
6424
|
+
${(props) => {
|
|
6425
|
+
switch (props.$size) {
|
|
6426
|
+
case "2xs":
|
|
6427
|
+
return lt `
|
|
6428
|
+
width: ${getTheme("com/avatar/size-2xs/size-icon")};
|
|
6429
|
+
height: ${getTheme("com/avatar/size-2xs/size-icon")};
|
|
6430
|
+
`;
|
|
6431
|
+
case "xs":
|
|
6432
|
+
return lt `
|
|
6433
|
+
width: ${getTheme("com/avatar/size-xs/size-icon")};
|
|
6434
|
+
height: ${getTheme("com/avatar/size-xs/size-icon")};
|
|
6435
|
+
`;
|
|
6436
|
+
case "sm":
|
|
6437
|
+
return lt `
|
|
6438
|
+
width: ${getTheme("com/avatar/size-sm/size-icon")};
|
|
6439
|
+
height: ${getTheme("com/avatar/size-sm/size-icon")};
|
|
6440
|
+
`;
|
|
6441
|
+
case "md":
|
|
6442
|
+
return lt `
|
|
6443
|
+
width: ${getTheme("com/avatar/size-md/size-icon")};
|
|
6444
|
+
height: ${getTheme("com/avatar/size-md/size-icon")};
|
|
6445
|
+
`;
|
|
6446
|
+
case "lg":
|
|
6447
|
+
return lt `
|
|
6448
|
+
width: ${getTheme("com/avatar/size-lg/size-icon")};
|
|
6449
|
+
height: ${getTheme("com/avatar/size-lg/size-icon")};
|
|
6450
|
+
`;
|
|
6451
|
+
case "xl":
|
|
6452
|
+
return lt `
|
|
6453
|
+
width: ${getTheme("com/avatar/size-xl/size-icon")};
|
|
6454
|
+
height: ${getTheme("com/avatar/size-xl/size-icon")};
|
|
6455
|
+
`;
|
|
6456
|
+
}
|
|
6457
|
+
}}
|
|
6458
|
+
// badge of the avatar
|
|
6459
|
+
${(props) => {
|
|
6460
|
+
switch (props.$badge) {
|
|
6461
|
+
case "rounded":
|
|
6462
|
+
return lt `
|
|
6463
|
+
border-radius: ${getTheme("com/avatar/corner-radius-rounded")};
|
|
6464
|
+
`;
|
|
6465
|
+
case "square":
|
|
6466
|
+
return lt `
|
|
6467
|
+
border-radius: ${getTheme("com/avatar/size-xl/corner-radius")};
|
|
6468
|
+
`;
|
|
6469
|
+
}
|
|
6470
|
+
}}
|
|
6471
|
+
`;
|
|
6472
|
+
const SpanLetter = dt.span `
|
|
6473
|
+
object-fit: cover;
|
|
6474
|
+
display: flex;
|
|
6475
|
+
align-items: center;
|
|
6476
|
+
justify-content: center;
|
|
6477
|
+
width: 100%;
|
|
6478
|
+
height: 100%;
|
|
6479
|
+
text-transform: uppercase;
|
|
6480
|
+
|
|
6481
|
+
${(props) => {
|
|
6482
|
+
switch (props.$size) {
|
|
6483
|
+
case "2xs":
|
|
6484
|
+
return lt `
|
|
6485
|
+
font-size: 8px;
|
|
6486
|
+
font: ${getTheme("sem/typo/subheading/font")};
|
|
6487
|
+
font-weight: ${getTheme("sem/typo/subheading/weight")};
|
|
6488
|
+
font-size: 8px;
|
|
6489
|
+
line-height: ${getTheme("sem/typo/subheading/line-height/xs")};
|
|
6490
|
+
letter-spacing: ${getTheme("sem/typo/subheading/letter-spacing/xs")};
|
|
6491
|
+
text-align: center;
|
|
6492
|
+
`;
|
|
6493
|
+
case "xs":
|
|
6494
|
+
return lt `
|
|
6495
|
+
font-size: 8px;
|
|
6496
|
+
font: ${getTheme("sem/typo/subheading/font")};
|
|
6497
|
+
font-weight: ${getTheme("sem/typo/subheading/weight")};
|
|
6498
|
+
font-size: 8px;
|
|
6499
|
+
line-height: ${getTheme("sem/typo/subheading/line-height/xs")};
|
|
6500
|
+
letter-spacing: ${getTheme("sem/typo/subheading/letter-spacing/xs")};
|
|
6501
|
+
text-align: center;
|
|
6502
|
+
`;
|
|
6503
|
+
case "sm":
|
|
6504
|
+
return lt `
|
|
6505
|
+
${getTheme("Subheading/XS")};
|
|
6506
|
+
`;
|
|
6507
|
+
case "md":
|
|
6508
|
+
return lt `
|
|
6509
|
+
${getTheme("Subheading/Sm")};
|
|
6510
|
+
`;
|
|
6511
|
+
case "lg":
|
|
6512
|
+
return lt `
|
|
6513
|
+
${getTheme("Subheading/Md")};
|
|
6514
|
+
`;
|
|
6515
|
+
case "xl":
|
|
6516
|
+
return lt `
|
|
6517
|
+
${getTheme("Subheading/Lg")};
|
|
6518
|
+
`;
|
|
6519
|
+
}
|
|
6520
|
+
}}
|
|
6521
|
+
|
|
6522
|
+
${(props) => {
|
|
6523
|
+
switch (props.$color) {
|
|
6524
|
+
case "neutral":
|
|
6525
|
+
return lt `
|
|
6526
|
+
color: ${getTheme("com/avatar/theme/label/color-text/neutral")};
|
|
6527
|
+
`;
|
|
6528
|
+
case "orange":
|
|
6529
|
+
return lt `
|
|
6530
|
+
color: ${getTheme("com/avatar/theme/label/color-text/orange")};
|
|
6531
|
+
`;
|
|
6532
|
+
case "yellow":
|
|
6533
|
+
return lt `
|
|
6534
|
+
color: ${getTheme("com/avatar/theme/label/color-text/yellow")};
|
|
6535
|
+
`;
|
|
6536
|
+
case "lime":
|
|
6537
|
+
return lt `
|
|
6538
|
+
color: ${getTheme("com/avatar/theme/label/color-text/lime")};
|
|
6539
|
+
`;
|
|
6540
|
+
case "green":
|
|
6541
|
+
return lt `
|
|
6542
|
+
color: ${getTheme("com/avatar/theme/label/color-text/green")};
|
|
6543
|
+
`;
|
|
6544
|
+
case "ocean":
|
|
6545
|
+
return lt `
|
|
6546
|
+
color: ${getTheme("com/avatar/theme/label/color-text/ocean")};
|
|
6547
|
+
`;
|
|
6548
|
+
case "blue":
|
|
6549
|
+
return lt `
|
|
6550
|
+
color: ${getTheme("com/avatar/theme/label/color-text/blue")};
|
|
6551
|
+
`;
|
|
6552
|
+
case "indigo":
|
|
6553
|
+
return lt `
|
|
6554
|
+
color: ${getTheme("com/avatar/theme/label/color-text/indigo")};
|
|
6555
|
+
`;
|
|
6556
|
+
case "violet":
|
|
6557
|
+
return lt `
|
|
6558
|
+
color: ${getTheme("com/avatar/theme/label/color-text/violet")};
|
|
6559
|
+
`;
|
|
6560
|
+
case "pink":
|
|
6561
|
+
return lt `
|
|
6562
|
+
color: ${getTheme("com/avatar/theme/label/color-text/pink")};
|
|
6563
|
+
`;
|
|
6564
|
+
case "disable":
|
|
6565
|
+
return lt `
|
|
6566
|
+
color: ${getTheme("com/avatar/disable/color-text")};
|
|
6567
|
+
`;
|
|
6568
|
+
}
|
|
6569
|
+
}}
|
|
6570
|
+
|
|
6571
|
+
// badge of the avatar
|
|
6572
|
+
${(props) => {
|
|
6573
|
+
switch (props.$badge) {
|
|
6574
|
+
case "rounded":
|
|
6575
|
+
return lt `
|
|
6576
|
+
border-radius: ${getTheme("com/avatar/corner-radius-rounded")};
|
|
6577
|
+
`;
|
|
6578
|
+
case "square":
|
|
6579
|
+
return lt `
|
|
6580
|
+
border-radius: ${getTheme("com/avatar/size-xl/corner-radius")};
|
|
6581
|
+
`;
|
|
6582
|
+
}
|
|
6583
|
+
}}
|
|
6584
|
+
`;
|
|
6585
|
+
const DivBadge = dt.div `
|
|
6586
|
+
position: absolute;
|
|
6587
|
+
bottom: -2px;
|
|
6588
|
+
right: -2px;
|
|
6589
|
+
border: ${getTheme("com/avatar/status-badge/size-lg/stroke-width")} solid
|
|
6590
|
+
${getTheme("com/avatar/status-badge/color-stroke")};
|
|
6591
|
+
border-radius: ${getTheme("sem/dimension/radius/component/round")};
|
|
6592
|
+
|
|
6593
|
+
${(props) => {
|
|
6594
|
+
switch (props.$size) {
|
|
6595
|
+
case "xl":
|
|
6596
|
+
return lt `
|
|
6597
|
+
width: 10px;
|
|
6598
|
+
height: 10px;
|
|
6599
|
+
min-width: 10px;
|
|
6600
|
+
max-width: 10px;
|
|
6601
|
+
min-height: 10px;
|
|
6602
|
+
max-height: 10px;
|
|
6603
|
+
`;
|
|
6604
|
+
case "lg":
|
|
6605
|
+
return lt `
|
|
6606
|
+
width: 8px;
|
|
6607
|
+
height: 8px;
|
|
6608
|
+
min-width: 8px;
|
|
6609
|
+
max-width: 8px;
|
|
6610
|
+
min-height: 8px;
|
|
6611
|
+
max-height: 8px;
|
|
6612
|
+
`;
|
|
6613
|
+
case "md":
|
|
6614
|
+
return lt `
|
|
6615
|
+
width: 8px;
|
|
6616
|
+
height: 8px;
|
|
6617
|
+
min-width: 8px;
|
|
6618
|
+
max-width: 8px;
|
|
6619
|
+
min-height: 8px;
|
|
6620
|
+
max-height: 8px;
|
|
6621
|
+
`;
|
|
6622
|
+
case "sm":
|
|
6623
|
+
return lt `
|
|
6624
|
+
width: 6px;
|
|
6625
|
+
height: 6px;
|
|
6626
|
+
min-width: 6px;
|
|
6627
|
+
max-width: 6px;
|
|
6628
|
+
min-height: 6px;
|
|
6629
|
+
max-height: 6px;
|
|
6630
|
+
`;
|
|
6631
|
+
case "xs":
|
|
6632
|
+
return lt `
|
|
6633
|
+
width: 6px;
|
|
6634
|
+
height: 6px;
|
|
6635
|
+
min-width: 6px;
|
|
6636
|
+
max-width: 6px;
|
|
6637
|
+
min-height: 6px;
|
|
6638
|
+
max-height: 6px;
|
|
6639
|
+
`;
|
|
6640
|
+
case "2xs":
|
|
6641
|
+
return lt `
|
|
6642
|
+
width: 4px;
|
|
6643
|
+
height: 4px;
|
|
6644
|
+
min-width: 4px;
|
|
6645
|
+
max-width: 4px;
|
|
6646
|
+
min-height: 4px;
|
|
6647
|
+
max-height: 4px;
|
|
6648
|
+
`;
|
|
6649
|
+
}
|
|
6650
|
+
}}
|
|
6651
|
+
${(props) => {
|
|
6652
|
+
switch (props.$status) {
|
|
6653
|
+
case "green":
|
|
6654
|
+
return lt `
|
|
6655
|
+
background-color: ${getTheme("com/avatar/status-badge/theme/green")};
|
|
6656
|
+
`;
|
|
6657
|
+
case "red":
|
|
6658
|
+
return lt `
|
|
6659
|
+
background-color: ${getTheme("com/avatar/status-badge/theme/red")};
|
|
6660
|
+
`;
|
|
6661
|
+
case "yellow":
|
|
6662
|
+
return lt `
|
|
6663
|
+
background-color: ${getTheme("com/avatar/status-badge/theme/yellow")};
|
|
6664
|
+
`;
|
|
6665
|
+
case "blue":
|
|
6666
|
+
return lt `
|
|
6667
|
+
background-color: ${getTheme("com/avatar/status-badge/theme/blue")};
|
|
6668
|
+
`;
|
|
6669
|
+
case "neutral":
|
|
6670
|
+
return lt `
|
|
6671
|
+
background-color: ${getTheme("com/avatar/status-badge/theme/neutral")};
|
|
6672
|
+
`;
|
|
6673
|
+
}
|
|
6674
|
+
}}
|
|
6675
|
+
`;
|
|
6676
|
+
|
|
6677
|
+
const FISAvatar = ({ className, src, alt = "Avatar", badge = "rounded", size = "xl", icon, status = "green", color = "neutral", letter, isBadgeDot = true, }) => {
|
|
6678
|
+
return (jsxRuntime.jsxs(DivContainer, { className: className, "$size": size, "$badge": badge, "$color": color, children: [src ? (jsxRuntime.jsx(ImgAvatar, { "$size": size, "$badge": badge, src: src, alt: alt })) : icon ? (jsxRuntime.jsx(DivIcon, { "$size": size, "$badge": badge, children: icon })) : (jsxRuntime.jsx(SpanLetter, { "$size": size, "$badge": badge, "$color": color, children: letter?.slice(0, 2) })), isBadgeDot && jsxRuntime.jsx(DivBadge, { "$size": size, "$status": status })] }));
|
|
6679
|
+
};
|
|
6680
|
+
FISAvatar.displayName = "FISAvatar";
|
|
6681
|
+
|
|
6682
|
+
const DicContainerSC = dt.div `
|
|
6683
|
+
display: flex;
|
|
6684
|
+
flex-direction: column;
|
|
6685
|
+
gap: ${getTheme("sem/dimension/gap/xs")};
|
|
6686
|
+
width: fit-content;
|
|
6687
|
+
`;
|
|
6688
|
+
const DivResizeSC = dt.div `
|
|
6689
|
+
position: absolute;
|
|
6690
|
+
bottom: -2px;
|
|
6691
|
+
right: -2px;
|
|
6692
|
+
cursor: nwse-resize;
|
|
6693
|
+
display: flex;
|
|
6694
|
+
align-items: center;
|
|
6695
|
+
justify-content: center;
|
|
6696
|
+
user-select: none;
|
|
6697
|
+
`;
|
|
6698
|
+
const DivIconSC = dt.div `
|
|
6699
|
+
width: ${getTheme("com/button/size-sm/height")};
|
|
6700
|
+
height: ${getTheme("com/button/size-sm/height")};
|
|
6701
|
+
min-width: ${getTheme("com/button/size-sm/height")};
|
|
6702
|
+
max-width: ${getTheme("com/button/size-sm/height")};
|
|
6703
|
+
min-height: ${getTheme("com/button/size-sm/height")};
|
|
6704
|
+
max-height: ${getTheme("com/button/size-sm/height")};
|
|
6705
|
+
border-radius: ${getTheme("com/button/size-xs/corner-radius")};
|
|
6706
|
+
border-width: ${getTheme("com/button/secondary/border/stroke-width/default")};
|
|
6707
|
+
gap: ${getTheme("com/button/size-sm/horizontal-gap")};
|
|
6708
|
+
position: absolute;
|
|
6709
|
+
bottom: ${getTheme("sem/dimension/padding/2xs")};
|
|
6710
|
+
top: ${getTheme("sem/dimension/padding/2xs")};
|
|
6711
|
+
right: ${getTheme("com/input/field/right-padding")};
|
|
6712
|
+
display: flex;
|
|
6713
|
+
align-items: center;
|
|
6714
|
+
justify-content: center;
|
|
6715
|
+
`;
|
|
6716
|
+
const TextAreaSC = dt.textarea `
|
|
6717
|
+
font-family: inherit;
|
|
6718
|
+
outline: none;
|
|
6719
|
+
border: none;
|
|
6720
|
+
${getTheme("Paragraph/Sm")};
|
|
6721
|
+
padding-top: ${getTheme("com/input/field/size-md/label/vertical-padding")};
|
|
6722
|
+
padding-right: ${getTheme("com/input/field/size-md/label/horizontal-padding")};
|
|
6723
|
+
padding-bottom: ${getTheme("com/input/field/size-md/label/vertical-padding")};
|
|
6724
|
+
padding-left: ${getTheme("com/input/field/size-md/label/horizontal-padding")};
|
|
6725
|
+
background-color: inherit;
|
|
6726
|
+
resize: none;
|
|
6727
|
+
|
|
6728
|
+
&::placeholder {
|
|
6729
|
+
${getTheme("Paragraph/Sm")}
|
|
6730
|
+
color: ${getTheme("com/input/field/default/label/color-text/placeholder")};
|
|
6731
|
+
}
|
|
6732
|
+
|
|
6733
|
+
&:focus::placeholder {
|
|
6734
|
+
color: transparent;
|
|
6735
|
+
}
|
|
6736
|
+
|
|
6737
|
+
&.input-area-lg {
|
|
6738
|
+
padding-top: ${getTheme("com/input/field/size-lg/label/vertical-padding")};
|
|
6739
|
+
padding-right: ${getTheme("com/input/field/size-lg/label/horizontal-padding")};
|
|
6740
|
+
padding-bottom: ${getTheme("com/input/field/size-lg/label/vertical-padding")};
|
|
6741
|
+
padding-left: ${getTheme("com/input/field/size-lg/label/horizontal-padding")};
|
|
6742
|
+
}
|
|
6743
|
+
|
|
6744
|
+
&.input-area-icon {
|
|
6745
|
+
margin-right: calc(
|
|
6746
|
+
${getTheme("com/input/field/size-md/label/horizontal-padding")} +
|
|
6747
|
+
${getTheme("com/button/size-sm/height")}
|
|
6748
|
+
);
|
|
6749
|
+
//cheat margin để khắc phục giới hạn của variable trên figma không có khả năng thêm toán tử tính toán (yêu cầu từ anh KhoiNQ3)
|
|
6750
|
+
}
|
|
6751
|
+
`;
|
|
6752
|
+
const DivAreaFieldSC = dt.div `
|
|
6753
|
+
position: relative;
|
|
6754
|
+
display: flex;
|
|
6755
|
+
height: inherit;
|
|
6756
|
+
min-height: ${getTheme("com/input/field/size-md/height")};
|
|
6757
|
+
border: ${getTheme("com/input/field/stroke-width")} solid
|
|
6758
|
+
${getTheme("com/input/field/default/border/default")};
|
|
6759
|
+
padding-right: ${getTheme("com/input/field/right-padding")};
|
|
6760
|
+
padding-left: ${getTheme("com/input/field/left-padding")};
|
|
6761
|
+
border-radius: ${getTheme("com/input/field/size-md/corner-radius")};
|
|
6762
|
+
background-color: ${getTheme("com/input/field/default/background/default")};
|
|
6763
|
+
|
|
6764
|
+
&.input-area-icon {
|
|
6765
|
+
padding-right: 0;
|
|
6766
|
+
}
|
|
6767
|
+
|
|
6768
|
+
&.negative {
|
|
6769
|
+
border-color: ${getTheme("com/input/field/negative/border/default")};
|
|
6770
|
+
background-color: ${getTheme("com/input/field/negative/background/default")};
|
|
6771
|
+
|
|
6772
|
+
&:hover {
|
|
6773
|
+
border-color: ${getTheme("com/input/field/negative/border/hover")};
|
|
6774
|
+
background-color: ${getTheme("com/input/field/negative/background/hover")};
|
|
6775
|
+
}
|
|
6776
|
+
|
|
6777
|
+
&:focus-within {
|
|
6778
|
+
border-color: ${getTheme("com/input/field/negative/border/active")};
|
|
6779
|
+
background-color: ${getTheme("com/input/field/negative/background/active")};
|
|
6780
|
+
outline: ${getTheme("com/actived-mark/gap-spacing")} solid
|
|
6781
|
+
${getTheme("com/actived-mark/color-gap-spacing")};
|
|
6782
|
+
}
|
|
6783
|
+
|
|
6784
|
+
&::placeholder {
|
|
6785
|
+
color: ${getTheme("com/input/field/negative/label/color-text/placeholder")};
|
|
6786
|
+
}
|
|
6787
|
+
}
|
|
6788
|
+
|
|
6789
|
+
&:hover {
|
|
6790
|
+
border-color: ${getTheme("com/input/field/default/border/hover")};
|
|
6791
|
+
background-color: ${getTheme("com/input/field/default/background/hover")};
|
|
6792
|
+
}
|
|
6793
|
+
|
|
6794
|
+
&:focus-within {
|
|
6795
|
+
border-color: ${getTheme("com/input/field/default/border/active")};
|
|
6796
|
+
background-color: ${getTheme("com/input/field/default/background/active")};
|
|
6797
|
+
outline: ${getTheme("com/actived-mark/gap-spacing")} solid
|
|
6798
|
+
${getTheme("com/actived-mark/color-gap-spacing")};
|
|
6799
|
+
}
|
|
6800
|
+
|
|
6801
|
+
&:has(${TextAreaSC}:disabled),
|
|
6802
|
+
&:has(${TextAreaSC}:read-only) {
|
|
6803
|
+
border-color: ${getTheme("com/input/field/disable/stroke-color")};
|
|
6804
|
+
background-color: ${getTheme("com/input/field/disable/background-color")};
|
|
6805
|
+
cursor: not-allowed;
|
|
6806
|
+
|
|
6807
|
+
&::placeholder {
|
|
6808
|
+
color: ${getTheme("com/input/field/disable/label-color")};
|
|
6809
|
+
}
|
|
6810
|
+
|
|
6811
|
+
${DivIconSC}, ${DivResizeSC} {
|
|
6812
|
+
display: none;
|
|
6813
|
+
}
|
|
6814
|
+
}
|
|
6815
|
+
|
|
6816
|
+
&.input-area-lg {
|
|
6817
|
+
min-height: ${getTheme("com/input/field/size-lg/height")};
|
|
6818
|
+
border-radius: ${getTheme("com/input/field/size-lg/corner-radius")};
|
|
6819
|
+
}
|
|
6820
|
+
`;
|
|
6821
|
+
const DivCountSC = dt.div `
|
|
6822
|
+
display: flex;
|
|
6823
|
+
justify-content: flex-end;
|
|
6824
|
+
${getTheme("Subheading/XS")}
|
|
6825
|
+
color: ${getTheme("com/input/character-limit/label/default/color-text")};
|
|
6826
|
+
|
|
6827
|
+
span.negative { {
|
|
6828
|
+
color: ${getTheme("com/input/character-limit/label/over-limit/color-text")};
|
|
6829
|
+
}
|
|
6830
|
+
padding-left: ${getTheme("com/input/character-limit/horizontal-padding")};
|
|
6831
|
+
padding-right: ${getTheme("com/input/character-limit/horizontal-padding")};
|
|
6832
|
+
`;
|
|
6833
|
+
const SpanHintSC$1 = dt.span `
|
|
6834
|
+
${getTheme("Paragraph/XS")}
|
|
6835
|
+
color: ${getTheme("com/input/hint/neutral/label/color-text")};
|
|
6836
|
+
padding-top: ${getTheme("com/input/hint/top-padding")};
|
|
6837
|
+
|
|
6838
|
+
&.negative {
|
|
6839
|
+
color: ${getTheme("com/input/hint/negative/label/color-text")};
|
|
6840
|
+
}
|
|
6841
|
+
|
|
6842
|
+
&.positive {
|
|
6843
|
+
color: ${getTheme("com/input/hint/positive/label/color-text")};
|
|
6844
|
+
}
|
|
6845
|
+
|
|
6846
|
+
&.disabled {
|
|
6847
|
+
color: ${getTheme("com/input/hint/disable/label/color-text")};
|
|
6848
|
+
}
|
|
6849
|
+
`;
|
|
6850
|
+
const DivBottomSC = dt.div `
|
|
6851
|
+
display: flex;
|
|
6852
|
+
justify-content: space-between;
|
|
6853
|
+
`;
|
|
6854
|
+
dt.div `
|
|
6855
|
+
${getTheme("Paragraph/XS")};
|
|
6856
|
+
color: ${getTheme("com/input/hint/neutral/label/color-text")};
|
|
6857
|
+
`;
|
|
6858
|
+
|
|
6859
|
+
const FISTextArea = React.forwardRef((props, ref) => {
|
|
6860
|
+
const { className, required = false, textLabel = "", iconLabel, iconSuffix, placeholder, disabled = false, readOnly = true, negative, message, positive, maxLength = 50, showCount, size = "md", fixedWidth, value, onClickIconLabel, onClickIconSuffix, onChange, onEnter, onBlur, ...rest } = props;
|
|
6861
|
+
const [internalValue, setInternalValue] = React.useState("");
|
|
6862
|
+
const inputRef = React.useRef(null);
|
|
6863
|
+
const handleChange = React.useCallback((event) => {
|
|
6864
|
+
const newValue = event.target.value;
|
|
6865
|
+
if (newValue !== internalValue) {
|
|
6866
|
+
setInternalValue(newValue);
|
|
6867
|
+
onChange?.(newValue);
|
|
6868
|
+
}
|
|
6869
|
+
}, [internalValue, onChange]);
|
|
6870
|
+
const handleKeyPress = React.useCallback((event) => {
|
|
6871
|
+
if (event.key === "Enter") {
|
|
6872
|
+
if (typeof onEnter === "function") {
|
|
6873
|
+
onEnter(event.currentTarget.value);
|
|
6874
|
+
}
|
|
6875
|
+
}
|
|
6876
|
+
}, [onEnter]);
|
|
6877
|
+
const handleBlur = React.useCallback((event) => {
|
|
6878
|
+
const value = event.target.value;
|
|
6879
|
+
if (typeof onBlur === "function") {
|
|
6880
|
+
onBlur(value);
|
|
6881
|
+
}
|
|
6882
|
+
}, [onBlur]);
|
|
6883
|
+
React.useEffect(() => {
|
|
6884
|
+
if (value !== undefined && value !== null) {
|
|
6885
|
+
setInternalValue(value);
|
|
6886
|
+
}
|
|
6887
|
+
}, [value]);
|
|
6888
|
+
React.useImperativeHandle(ref, () => {
|
|
6889
|
+
const inputElement = inputRef.current;
|
|
6890
|
+
return {
|
|
6891
|
+
...inputElement,
|
|
6892
|
+
focus: () => {
|
|
6893
|
+
if (inputRef.current) {
|
|
6894
|
+
inputRef.current.focus();
|
|
6895
|
+
}
|
|
6896
|
+
},
|
|
6897
|
+
blur: () => {
|
|
6898
|
+
if (inputRef.current) {
|
|
6899
|
+
inputRef.current.blur();
|
|
6900
|
+
}
|
|
6901
|
+
},
|
|
6902
|
+
clear: () => {
|
|
6903
|
+
if (inputRef.current) {
|
|
6904
|
+
inputRef.current.value = "";
|
|
6905
|
+
setInternalValue("");
|
|
6906
|
+
}
|
|
6907
|
+
},
|
|
6908
|
+
};
|
|
6909
|
+
});
|
|
6910
|
+
const handleResize = (e) => {
|
|
6911
|
+
e.preventDefault();
|
|
6912
|
+
e.stopPropagation();
|
|
6913
|
+
const textArea = inputRef.current;
|
|
6914
|
+
if (!textArea)
|
|
6915
|
+
return;
|
|
6916
|
+
const rect = textArea.getBoundingClientRect();
|
|
6917
|
+
const startX = e.clientX;
|
|
6918
|
+
const startY = e.clientY;
|
|
6919
|
+
const startWidth = rect.width;
|
|
6920
|
+
const startHeight = rect.height;
|
|
6921
|
+
const doResize = (event) => {
|
|
6922
|
+
event.preventDefault();
|
|
6923
|
+
const resizeHandle = document.getElementById("resizeHandle");
|
|
6924
|
+
const handleSize = resizeHandle ? resizeHandle.offsetWidth : 10;
|
|
6925
|
+
const themeValue = getTheme("sem/typo/paragraph/line-height/sm");
|
|
6926
|
+
const minHeight = themeValue
|
|
6927
|
+
? parseInt(themeValue.toString(), 10) || 20
|
|
6928
|
+
: 20;
|
|
6929
|
+
const newWidth = Math.max(startWidth + (event.clientX - startX) - handleSize);
|
|
6930
|
+
const newHeight = Math.max(minHeight, startHeight + (event.clientY - startY) - handleSize);
|
|
6931
|
+
textArea.style.width = `${newWidth}px`;
|
|
6932
|
+
textArea.style.height = `${newHeight}px`;
|
|
6933
|
+
if (resizeHandle) {
|
|
6934
|
+
resizeHandle.style.right = "-2px";
|
|
6935
|
+
resizeHandle.style.bottom = "-2px";
|
|
6936
|
+
}
|
|
6937
|
+
};
|
|
6938
|
+
const stopResize = () => {
|
|
6939
|
+
document.body.style.cursor = "";
|
|
6940
|
+
document.removeEventListener("mousemove", doResize);
|
|
6941
|
+
document.removeEventListener("mouseup", stopResize);
|
|
6942
|
+
};
|
|
6943
|
+
document.addEventListener("mousemove", doResize);
|
|
6944
|
+
document.addEventListener("mouseup", stopResize);
|
|
6945
|
+
};
|
|
6946
|
+
return (jsxRuntime.jsxs(DicContainerSC, { className: className, children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: required, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsxs(DivAreaFieldSC, { className: classNames({
|
|
6947
|
+
"input-area-lg": size === "lg",
|
|
6948
|
+
"input-area-icon": iconSuffix,
|
|
6949
|
+
negative,
|
|
6950
|
+
}), style: { width: fixedWidth ? `${fixedWidth}px` : "auto" }, children: [jsxRuntime.jsx(TextAreaSC, { ...rest, value: internalValue, onChange: handleChange, onKeyDown: handleKeyPress, onBlur: handleBlur, ref: inputRef, placeholder: placeholder, disabled: disabled, readOnly: readOnly, className: classNames({
|
|
6951
|
+
"input-area-lg": size === "lg",
|
|
6952
|
+
"input-area-icon": iconSuffix,
|
|
6953
|
+
}) }), iconSuffix && (jsxRuntime.jsx(DivIconSC, { children: jsxRuntime.jsx(FISIconButton, { variant: "tertiary-invisible", size: "sm", icon: iconSuffix, onClick: onClickIconSuffix }) })), jsxRuntime.jsx(DivResizeSC, { id: "resizeHandle", onMouseDown: handleResize, children: jsxRuntime.jsx(ResizeIcon, {}) })] }), jsxRuntime.jsxs(DivBottomSC, { children: [jsxRuntime.jsx(SpanHintSC$1, { className: classNames({
|
|
6954
|
+
disabled,
|
|
6955
|
+
negative,
|
|
6956
|
+
positive,
|
|
6957
|
+
}), children: message ? message : "" }), jsxRuntime.jsx(DivCountSC, { children: showCount && maxLength > 0 && (jsxRuntime.jsxs("span", { className: classNames("text-area__count", {
|
|
6958
|
+
negative: internalValue.length > maxLength,
|
|
6959
|
+
}), children: [internalValue?.replaceAll("\n", "")?.length, "/", maxLength] })) })] })] }));
|
|
6960
|
+
});
|
|
6961
|
+
FISTextArea.displayName = "FISTextArea";
|
|
6962
|
+
|
|
6963
|
+
const InputSC = dt.input `
|
|
6964
|
+
all: unset;
|
|
6965
|
+
text-align: center;
|
|
6966
|
+
caret-color: ${getTheme("com/typing-cursor/default")};
|
|
6967
|
+
${getTheme("Paragraph/Md")}
|
|
6968
|
+
&::-webkit-outer-spin-button,
|
|
6969
|
+
&::-webkit-inner-spin-button {
|
|
6970
|
+
-webkit-appearance: none;
|
|
6971
|
+
margin: 0;
|
|
6972
|
+
}
|
|
6973
|
+
-moz-appearance: textfield;
|
|
6974
|
+
|
|
6975
|
+
::placeholder {
|
|
6976
|
+
color: ${getTheme("com/input/field/default/label/color-text/placeholder")};
|
|
6977
|
+
}
|
|
6978
|
+
|
|
6979
|
+
&:disabled,
|
|
6980
|
+
&:read-only {
|
|
6981
|
+
text-align: left;
|
|
6982
|
+
&::placeholder {
|
|
6983
|
+
color: ${getTheme("com/input/field/disable/label-color")};
|
|
6984
|
+
}
|
|
6985
|
+
}
|
|
6986
|
+
|
|
6987
|
+
&.negative {
|
|
6988
|
+
color: ${getTheme("com/input/field/negative/label/color-text/inputed")};
|
|
6989
|
+
}
|
|
6990
|
+
`;
|
|
6991
|
+
const DivContainerSC = dt.div `
|
|
6992
|
+
display: flex;
|
|
6993
|
+
align-items: center;
|
|
6994
|
+
justify-content: space-between;
|
|
6995
|
+
width: fit-content;
|
|
6996
|
+
background-color: ${getTheme("com/input/field/default/background/default")};
|
|
6997
|
+
height: ${getTheme("com/input/field/size-md/height")};
|
|
6998
|
+
min-width: ${getTheme("com/input/field/size-md/number/min-width")};
|
|
6999
|
+
min-height: ${getTheme("com/input/field/size-md/height")};
|
|
7000
|
+
max-height: ${getTheme("com/input/field/size-md/height")};
|
|
7001
|
+
border-radius: ${getTheme("com/input/field/size-md/corner-radius")};
|
|
7002
|
+
border: ${getTheme("com/input/field/stroke-width")} solid
|
|
7003
|
+
${getTheme("com/input/field/default/border/default")};
|
|
7004
|
+
padding-right: ${getTheme("com/input/field/right-padding")};
|
|
7005
|
+
padding-left: ${getTheme("com/input/field/left-padding")};
|
|
7006
|
+
|
|
7007
|
+
.decrement,
|
|
7008
|
+
.increment {
|
|
7009
|
+
flex-shrink: 0;
|
|
7010
|
+
}
|
|
7011
|
+
|
|
7012
|
+
.disabled-button {
|
|
7013
|
+
display: none;
|
|
7014
|
+
}
|
|
7015
|
+
|
|
7016
|
+
&.input-text-lg {
|
|
7017
|
+
height: ${getTheme("com/input/field/size-lg/height")};
|
|
7018
|
+
min-width: ${getTheme("com/input/field/size-lg/number/min-width")};
|
|
7019
|
+
min-height: ${getTheme("com/input/field/size-lg/height")};
|
|
7020
|
+
max-height: ${getTheme("com/input/field/size-lg/height")};
|
|
7021
|
+
border-radius: ${getTheme("com/input/field/size-lg/corner-radius")};
|
|
7022
|
+
}
|
|
7023
|
+
|
|
7024
|
+
&:hover {
|
|
7025
|
+
border-color: ${getTheme("com/input/field/default/border/hover")};
|
|
7026
|
+
background-color: ${getTheme("com/input/field/default/background/hover")};
|
|
7027
|
+
}
|
|
7028
|
+
|
|
7029
|
+
&:has(${InputSC}:focus) {
|
|
7030
|
+
border-color: ${getTheme("com/input/field/default/border/active")};
|
|
7031
|
+
background-color: ${getTheme("com/input/field/default/background/active")};
|
|
7032
|
+
outline: ${getTheme("com/actived-mark/gap-spacing")} solid
|
|
7033
|
+
${getTheme("com/actived-mark/color-gap-spacing")};
|
|
7034
|
+
}
|
|
7035
|
+
|
|
7036
|
+
&:has(${InputSC}:disabled),
|
|
7037
|
+
&:has(${InputSC}:read-only) {
|
|
7038
|
+
cursor: not-allowed;
|
|
7039
|
+
border-color: ${getTheme("com/input/field/disable/stroke-color")};
|
|
7040
|
+
background-color: ${getTheme("com/input/field/disable/background-color")};
|
|
7041
|
+
}
|
|
7042
|
+
|
|
7043
|
+
&.negative {
|
|
7044
|
+
border-color: ${getTheme("com/input/field/negative/border/default")};
|
|
7045
|
+
background-color: ${getTheme("com/input/field/negative/background/default")};
|
|
7046
|
+
|
|
7047
|
+
&:hover {
|
|
7048
|
+
border-color: ${getTheme("com/input/field/negative/border/hover")};
|
|
7049
|
+
background-color: ${getTheme("com/input/field/negative/background/hover")};
|
|
7050
|
+
}
|
|
7051
|
+
|
|
7052
|
+
&:has(${InputSC}:focus) {
|
|
7053
|
+
border-color: ${getTheme("com/input/field/negative/border/active")};
|
|
7054
|
+
background-color: ${getTheme("com/input/field/negative/background/active")};
|
|
7055
|
+
outline: ${getTheme("com/actived-mark/gap-spacing")} solid
|
|
7056
|
+
${getTheme("com/actived-mark/color-gap-spacing")};
|
|
7057
|
+
}
|
|
7058
|
+
}
|
|
7059
|
+
`;
|
|
7060
|
+
const DivHintSC = dt.div `
|
|
7061
|
+
display: flex;
|
|
7062
|
+
justify-content: space-between;
|
|
7063
|
+
`;
|
|
7064
|
+
const SpanHintSC = dt.span `
|
|
7065
|
+
${getTheme("Paragraph/XS")}
|
|
7066
|
+
color: ${getTheme("com/input/hint/neutral/label/color-text")};
|
|
7067
|
+
padding-top: ${getTheme("com/input/hint/top-padding")};
|
|
7068
|
+
|
|
7069
|
+
&.negative {
|
|
7070
|
+
color: ${getTheme("com/input/hint/negative/label/color-text")};
|
|
7071
|
+
}
|
|
7072
|
+
|
|
7073
|
+
&.positive {
|
|
7074
|
+
color: ${getTheme("com/input/hint/positive/label/color-text")};
|
|
7075
|
+
}
|
|
7076
|
+
|
|
7077
|
+
&.disabled {
|
|
7078
|
+
color: ${getTheme("com/input/hint/disable/label/color-text")};
|
|
7079
|
+
}
|
|
7080
|
+
`;
|
|
7081
|
+
const DivWrapperSC = dt.div `
|
|
7082
|
+
display: flex;
|
|
7083
|
+
flex-direction: column;
|
|
7084
|
+
gap: ${getTheme("com/input/vertical-gap")};
|
|
7085
|
+
`;
|
|
7086
|
+
|
|
7087
|
+
const FISInputStepper = React.forwardRef((props) => {
|
|
7088
|
+
const { min, max, step = 1, defaultValue, sizeInput = "md", StartIcon, EndIcon, negative, positive, message, iconLabel, textLabel = "", onClickIconLabel, disabled, readOnly, onChange, ...rest } = props;
|
|
7089
|
+
const [count, setCount] = React.useState(defaultValue !== undefined ? defaultValue : undefined);
|
|
7090
|
+
const handleIncrement = () => {
|
|
7091
|
+
setCount((prev) => {
|
|
7092
|
+
const newValue = (prev ?? min ?? 0) + step;
|
|
7093
|
+
return max !== undefined && newValue > max ? max : newValue;
|
|
7094
|
+
});
|
|
7095
|
+
};
|
|
7096
|
+
const handleDecrement = () => {
|
|
7097
|
+
setCount((prev) => {
|
|
7098
|
+
const newValue = (prev ?? min ?? 0) - step;
|
|
7099
|
+
return min !== undefined && newValue < min ? min : newValue;
|
|
7100
|
+
});
|
|
7101
|
+
};
|
|
7102
|
+
const handleChange = (e) => {
|
|
7103
|
+
const newValue = e.target.value
|
|
7104
|
+
? parseInt(e.target.value, 10)
|
|
7105
|
+
: undefined;
|
|
7106
|
+
if (!isNaN(newValue)) {
|
|
7107
|
+
setCount(newValue);
|
|
7108
|
+
onChange?.(newValue);
|
|
7109
|
+
}
|
|
7110
|
+
else {
|
|
7111
|
+
setCount(undefined);
|
|
7112
|
+
}
|
|
7113
|
+
};
|
|
7114
|
+
return (jsxRuntime.jsxs(DivWrapperSC, { children: [(textLabel || iconLabel) && (jsxRuntime.jsx(FISInputLabel, { textLabel: textLabel, required: true, iconLabel: iconLabel, onClickIconLabel: onClickIconLabel })), jsxRuntime.jsxs(DivContainerSC, { className: classNames({
|
|
7115
|
+
negative: negative,
|
|
7116
|
+
"input-text-lg": sizeInput === "lg",
|
|
7117
|
+
}), children: [jsxRuntime.jsx(FISIconButton, { icon: StartIcon ? StartIcon : jsxRuntime.jsx(DecreIcon, {}), size: sizeInput === "lg" ? "md" : "sm", variant: "tertiary-invisible", onClick: handleDecrement, disabled: min !== undefined && count !== undefined && count <= min, className: classNames("decrement", {
|
|
7118
|
+
"disabled-button": disabled || readOnly,
|
|
7119
|
+
}) }), jsxRuntime.jsx(InputSC, { ...rest, disabled: disabled, readOnly: readOnly, type: "number", value: count !== undefined ? count : "", className: classNames({ negative: negative }), onChange: handleChange }), jsxRuntime.jsx(FISIconButton, { icon: EndIcon ? EndIcon : jsxRuntime.jsx(IncreIcon, {}), size: sizeInput === "lg" ? "md" : "sm", variant: "tertiary-invisible", onClick: handleIncrement, disabled: max !== undefined && count !== undefined && count >= max, className: classNames("increment", {
|
|
7120
|
+
"disabled-button": disabled || readOnly,
|
|
7121
|
+
}) })] }), jsxRuntime.jsx(DivHintSC, { children: jsxRuntime.jsx(SpanHintSC, { className: classNames({
|
|
7122
|
+
disabled: disabled,
|
|
7123
|
+
negative: negative,
|
|
7124
|
+
positive: positive,
|
|
7125
|
+
}), children: message ? message : "" }) })] }));
|
|
7126
|
+
});
|
|
7127
|
+
FISInputStepper.displayName = "FISInputStepper";
|
|
7128
|
+
|
|
7129
|
+
exports.FISAvatar = FISAvatar;
|
|
7130
|
+
exports.FISBreadcrumb = FISBreadcrumb;
|
|
6028
7131
|
exports.FISButton = FISButton;
|
|
7132
|
+
exports.FISButtonGroup = FISButtonGroup;
|
|
6029
7133
|
exports.FISCheckbox = FISCheckbox;
|
|
6030
|
-
exports.
|
|
7134
|
+
exports.FISCheckboxGroup = FISCheckboxGroup;
|
|
6031
7135
|
exports.FISIconButton = FISIconButton;
|
|
6032
7136
|
exports.FISInputField = FISInputField;
|
|
6033
7137
|
exports.FISInputLabel = FISInputLabel;
|
|
7138
|
+
exports.FISInputStepper = FISInputStepper;
|
|
6034
7139
|
exports.FISInputText = FISInputText;
|
|
6035
7140
|
exports.FISLinkButton = FISLinkButton;
|
|
6036
7141
|
exports.FISRadio = FISRadio;
|
|
7142
|
+
exports.FISRadioGroup = FISRadioGroup;
|
|
7143
|
+
exports.FISTextArea = FISTextArea;
|
|
6037
7144
|
exports.FISThemeProvider = FISThemeProvider;
|
|
6038
7145
|
//# sourceMappingURL=index.js.map
|