@e1011/es-kit 1.0.108 → 1.0.112
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/src/core/index.js +1 -0
- package/dist/lib/src/core/index.js.map +1 -1
- package/dist/lib/tsconfig.tsbuildinfo +1 -1
- package/dist/types/src/core/index.d.ts +1 -0
- package/dist/types/src/core/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/hooks/esm/index.css +0 -106
- package/dist/hooks/index.css +0 -106
- package/dist/lib/cjs/index.css +0 -106
- package/dist/lib/cjs/node_modules/core-js/modules/es.array.index-of.js +0 -2
- package/dist/lib/cjs/node_modules/core-js/modules/es.array.index-of.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.module.scss.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainer.module.scss.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainerS.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/CollapsibleContainerS.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/FBox.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/FBox.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/Flex.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/Flex.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/Placeholder.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/Placeholder.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/ResizableContainer.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/ResizableContainer.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/container/fbox.module.scss.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/container/fbox.module.scss.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/dividers/DividerLine.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/dividers/DividerLine.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/dividers/divider.module.scss.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/dividers/divider.module.scss.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/field/Field.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/field/Field.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/icon/Icon.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/icon/Icon.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/icon/IconBase.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/icon/IconWC.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/icon/IconWC.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/components/icon/icon.module.scss.js +0 -2
- package/dist/lib/cjs/src/core/ui/components/icon/icon.module.scss.js.map +0 -1
- package/dist/lib/cjs/src/core/ui/utils/style.js +0 -2
- package/dist/lib/cjs/src/core/ui/utils/style.js.map +0 -1
- package/dist/lib/esm/index.css +0 -106
- package/dist/lib/esm/node_modules/core-js/modules/es.array.index-of.js +0 -2
- package/dist/lib/esm/node_modules/core-js/modules/es.array.index-of.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.module.scss.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.module.scss.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainerS.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainerS.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/FBox.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/FBox.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/Flex.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/Flex.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/Placeholder.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/Placeholder.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/ResizableContainer.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/ResizableContainer.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/container/fbox.module.scss.js +0 -2
- package/dist/lib/esm/src/core/ui/components/container/fbox.module.scss.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/dividers/DividerLine.js +0 -2
- package/dist/lib/esm/src/core/ui/components/dividers/DividerLine.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/dividers/divider.module.scss.js +0 -2
- package/dist/lib/esm/src/core/ui/components/dividers/divider.module.scss.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/field/Field.js +0 -2
- package/dist/lib/esm/src/core/ui/components/field/Field.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/icon/Icon.js +0 -2
- package/dist/lib/esm/src/core/ui/components/icon/Icon.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/icon/IconBase.js +0 -2
- package/dist/lib/esm/src/core/ui/components/icon/IconBase.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/icon/IconWC.js +0 -2
- package/dist/lib/esm/src/core/ui/components/icon/IconWC.js.map +0 -1
- package/dist/lib/esm/src/core/ui/components/icon/icon.module.scss.js +0 -2
- package/dist/lib/esm/src/core/ui/components/icon/icon.module.scss.js.map +0 -1
- package/dist/lib/esm/src/core/ui/utils/style.js +0 -2
- package/dist/lib/esm/src/core/ui/utils/style.js.map +0 -1
- package/dist/lib/src/core/ui/components/container/FBox.js +0 -37
- package/dist/lib/src/core/ui/components/container/FBox.js.map +0 -1
- package/dist/types/src/core/ui/components/container/FBox.d.ts +0 -28
- package/dist/types/src/core/ui/components/container/FBox.d.ts.map +0 -1
- package/dist/ui/esm/src/core/ui/components/container/FBox.js +0 -2
- package/dist/ui/esm/src/core/ui/components/container/FBox.js.map +0 -1
- package/dist/ui/esm/src/core/ui/components/container/fbox.module.scss.js +0 -2
- package/dist/ui/esm/src/core/ui/components/container/fbox.module.scss.js.map +0 -1
- package/dist/ui/src/core/ui/components/container/FBox.js +0 -2
- package/dist/ui/src/core/ui/components/container/FBox.js.map +0 -1
- package/dist/ui/src/core/ui/components/container/fbox.module.scss.js +0 -2
- package/dist/ui/src/core/ui/components/container/fbox.module.scss.js.map +0 -1
- package/dist/utils/esm/index.css +0 -106
- package/dist/utils/index.css +0 -106
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconBase.js","sources":["../../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren } from 'react'\n\nimport classes from './icon.module.scss'\n\nexport type IconBaseType = PropsWithChildren<unknown> & {\n id?: string\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n style?: CSSProperties\n}\n\nexport const IconBase: FC<IconBaseType> = memo<IconBaseType>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, style, ...props\n}: IconBaseType) => {\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || size || width || 'auto',\n '--min-height': minHeight || size || height || 'auto',\n '--width': size || width,\n '--height': size || height,\n ...(fontSize ? { fontSize } : {}),\n ...(iconUrl ? { '--icon-url': `url(${iconUrl})` } : {}),\n ...(iconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, iconUrl, color, style])\n\n return (\n <span\n {...props}\n className={`${(classes as any)['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!iconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","_ref$color","color","_ref$className","className","children","style","props","_objectWithoutProperties","objectWithoutProperties","_excluded","styles","useMemo","_objectSpread","objectSpread2","concat","React","createElement","_extends","classes","displayName"],"mappings":"6XAkBaA,EAA6BC,EAAAA,MAAmB,SAAAC,GAGzC,IAFlBC,EAAOD,EAAPC,QAASC,EAAQF,EAARE,SAAUC,EAASH,EAATG,UAAWC,EAAIJ,EAAJI,KAC9BC,EAAQL,EAARK,SAAUC,EAAKN,EAALM,MAAOC,EAAMP,EAANO,OAAMC,EAAAR,EAAES,MAAAA,OAAQ,IAAHD,EAAG,eAAcA,EAAAE,EAAAV,EAAEW,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAEE,EAAQZ,EAARY,SAAUC,EAAKb,EAALa,MAAUC,EAAKC,EAAAC,wBAAAhB,EAAAiB,GAEpFC,EAASC,EAAAA,SAAQ,WAAA,OAAAC,gBAAAA,EAAAA,cAAAA,EAAAC,cAAAD,gBAAA,CAEnB,cAAelB,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,EACnB,WAAYF,GAAQG,GAChBF,EAAW,CAAEA,SAAAA,GAAa,CAAA,GAC1BJ,EAAU,CAAE,aAAY,OAAAqB,OAASrB,EAAO,MAAQ,CAAA,GAChDA,EAAU,CAAE,eAAgBQ,GAAU,CAAE,uBAAwBA,IACjEI,EAEN,GAAE,CAACX,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUJ,EAASQ,EAAOI,IAExE,OACEU,MAAAC,cAAAC,OAAAA,EAAAA,WACMX,EAAK,CACTH,UAAS,GAAAW,OAAMI,EAAO,QAAS,aAAYJ,eAAAA,OAAcX,GACzDE,MAAOK,KAEJjB,GAAWW,GAAaA,EAGjC,IAEAd,EAAS6B,YAAc"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../../../_virtual/_rollupPluginBabelHelpers.js");require("../../../../../node_modules/core-js/modules/es.array.concat.js"),require("../../../../../node_modules/core-js/modules/es.array.map.js"),require("../../../../../node_modules/core-js/modules/es.object.entries.js");var t,i=require("../../../utils/webComponents/webComponent.utils.js"),n=require("./icon.module.scss.js"),s=document.createElement("template");s.innerHTML='<span class="icon-base"></span>';var o=i.ced("icon-base")(t=function(t){e.inherits(r,t);var o=e.createSuper(r);function r(){var t;e.classCallCheck(this,r);for(var i=arguments.length,s=new Array(i),a=0;a<i;a++)s[a]=arguments[a];return(t=o.call.apply(o,[this].concat(s))).content=void 0,t.mainElement=void 0,t.iconUrl=void 0,t.minWidth=void 0,t.minHeight=void 0,t.width=void 0,t.height=void 0,t.size=void 0,t.fontSize=void 0,t.color=void 0,t.render=function(){if(t.mainElement=t.mainElement||t.querySelector(".icon-base"),t.mainElement){t.classList.add(n.default["icon-base-parent"]),t.mainElement.classList.add(n.default["icon-base"]);var i=e.objectSpread2(e.objectSpread2(e.objectSpread2({"--min-width":t.minWidth||t.size||t.width||"auto","--min-height":t.minHeight||t.size||t.height||"auto","--width":t.size||t.width,"--height":t.size||t.height},t.fontSize?{"font-size":t.fontSize||"unset"}:{}),t.iconUrl?{"--icon-url":"url(".concat(t.iconUrl,")")}:{}),t.iconUrl?{"--icon-color":t.color}:{"--icon-content-color":t.color});t.mainElement.innerHTML=t.iconUrl?"":t.content||"",t.mainElement.setAttribute("style",Object.entries(i).map((function(t){var i=e.slicedToArray(t,2),n=i[0],s=i[1];return"".concat(n,": ").concat(s,";")})).join(" "))}},t}return e.createClass(r,[{key:"connectedCallback",value:function(){this.innerHTML&&(this.content=this.content||this.innerHTML||this.getAttribute("content")),this.innerHTML=s.innerHTML,i.resolveAttributes(this,r.observedAttributes),this.render()}},{key:"attributeChangedCallback",value:function(e,t,i){"className"===e&&(this.className=i||"",this.className&&(this.classList.remove(this.className),this.classList.add(this.className))),this[e]=i,this.render()}}],[{key:"observedAttributes",get:function(){return["iconUrl","minWidth","minHeight","width","height","size","fontSize","color","className"]}}]),r}(e.wrapNativeSuper(HTMLElement)))||t,r={IconWC:o};exports.IconWC=o,exports.IconWCBase=r;
|
|
2
|
-
//# sourceMappingURL=IconWC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconWC.js","sources":["../../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import { ced, resolveAttributes } from '../../../utils/webComponents/webComponent.utils'\n\nimport classes from './icon.module.scss'\n\n\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport class IconWC extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes() {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback() {\n if (this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, IconWC.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null) {\n if (attrName === 'className') {\n this.className = (newVal as string) || ''\n if (this.className) {\n this.classList.remove(this.className)\n this.classList.add(this.className)\n }\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[attrName] = newVal\n this.render()\n }\n\n render = () => {\n this.mainElement = this.mainElement || this.querySelector('.icon-base') as HTMLElement\n if (!this.mainElement) {\n return\n }\n this.classList.add(classes['icon-base-parent'])\n this.mainElement.classList.add(classes['icon-base'])\n\n const styles = {\n '--min-width': this.minWidth || this.size || this.width || 'auto',\n '--min-height': this.minHeight || this.size || this.height || 'auto',\n '--width': this.size || this.width,\n '--height': this.size || this.height,\n ...(this.fontSize ? { 'font-size': this.fontSize || 'unset' } : {}),\n ...(this.iconUrl ? { '--icon-url': `url(${this.iconUrl})` } : {}),\n ...(this.iconUrl ? { '--icon-color': this.color } : { '--icon-content-color': this.color }),\n }\n\n this.mainElement.innerHTML = this.iconUrl ? '' : (this.content || '')\n\n this.mainElement.setAttribute('style', Object.entries(styles).map(([key, value]) => `${key}: ${value};`).join(' '))\n }\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'icon-base': any\n }\n }\n}\n\nexport const IconWCBase = {\n IconWC,\n}\n"],"names":["template","document","createElement","innerHTML","IconWC","ced","_dec","_class","_HTMLElement","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","this","concat","content","mainElement","iconUrl","minWidth","minHeight","width","height","size","fontSize","color","render","querySelector","classList","add","classes","styles","_objectSpread","objectSpread2","setAttribute","Object","entries","map","_ref","_ref2","_slicedToArray","key","value","join","_createClass","createClass","getAttribute","resolveAttributes","observedAttributes","attrName","oldVal","newVal","className","remove","get","_wrapNativeSuper","HTMLElement","IconWCBase"],"mappings":"gdAMMA,EAAWC,SAASC,cAAc,YAExCF,EAASG,UAAY,kCAcrB,IACaC,EADZC,MAAI,YAAYC,CAAAC,WAAAC,GAAAC,WAAAL,EAAAI,GAAA,IAAAE,EAAAC,cAAAP,GAAA,SAAAA,IAAA,IAAAQ,EAAAC,sBAAAT,GAAA,IAAA,IAAAU,EAAAC,UAAAC,OAAAC,EAAAC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAAF,EAAAE,GAAAJ,UAAAI,GAyEd,OAzEcP,EAAAF,EAAAU,KAAAC,MAAAX,EAAA,CAAAY,MAAAC,OAA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,YAAAjD,EAAA,CAAA,CAAA6C,IAAA,oBAAAC,MA/CD,WACM5B,KAAKnB,YACPmB,KAAKE,QAAUF,KAAKE,SAAWF,KAAKnB,WAAamB,KAAKgC,aAAa,YAGrEhC,KAAKnB,UAAYH,EAASG,UAE1BoD,EAAAA,kBAAkBjC,KAAMlB,EAAOoD,oBAE/BlC,KAAKY,QACP,GAAC,CAAAe,IAAA,2BAAAC,MAED,SAAyBO,EAAkBC,EAAgCC,GACxD,cAAbF,IACFnC,KAAKsC,UAAaD,GAAqB,GACnCrC,KAAKsC,YACPtC,KAAKc,UAAUyB,OAAOvC,KAAKsC,WAC3BtC,KAAKc,UAAUC,IAAIf,KAAKsC,aAK5BtC,KAAKmC,GAAYE,EACjBrC,KAAKY,QACP,IAAC,CAAA,CAAAe,IAAA,qBAAAa,IA5BD,WACE,MAAO,CAAC,UAAW,WAAY,YAAa,QAAS,SAAU,OAAQ,WAAY,QAAS,YAC9F,KAAC1D,CAAA,EAAA2D,kBAvByBC,gBAAWzD,EAoF1B0D,EAAa,CACxB7D,OAAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"icon.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),require("../../../../node_modules/core-js/modules/es.array.concat.js"),require("../../../../node_modules/core-js/modules/es.object.to-string.js"),require("../../../../node_modules/core-js/modules/es.regexp.to-string.js"),require("../../../../node_modules/core-js/modules/es.string.pad-start.js"),require("../../../../node_modules/core-js/modules/es.regexp.exec.js"),require("../../../../node_modules/core-js/modules/es.string.replace.js"),require("../../../../node_modules/core-js/modules/es.parse-int.js"),require("../../../../node_modules/core-js/modules/es.array.index-of.js"),require("../../../../node_modules/core-js/modules/es.array.map.js"),exports.defaultFontSize=16;var e=function(e){return e/exports.defaultFontSize},r=function(e){return(e=e.toString(16)).padStart(2,"0")},t=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5;0===e.indexOf("#")&&(e=e.substr(1)),0===t.indexOf("#")&&(t=t.substr(1));var s=Math.ceil(parseInt(t.substring(0,2),16)*o+parseInt(e.substring(0,2),16)*(1-o)),n=Math.ceil(parseInt(t.substring(2,4),16)*o+parseInt(e.substring(2,4),16)*(1-o)),c=Math.ceil(parseInt(t.substring(4,6),16)*o+parseInt(e.substring(4,6),16)*(1-o));return"#".concat(r(s)+r(n)+r(c))};exports.calculateColors=function(e,r){for(var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,s=o/(o+1)/o,n=[],c=s;o--;)n.push(c),c+=s;return n.map((function(o){return t(e,r,o)}))},exports.calculatePercColor=t,exports.convertHex=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],s=e.replace("#",""),n=s.substring(0,2),c=s.substring(2,4),u=s.substring(4,6),a=parseInt(n,16),i=parseInt(c,16),d=parseInt(u,16),l=t<=1?t:t/100;return(o?"rgba(".concat(a,",").concat(i,",").concat(d,",").concat(l,")"):"#".concat(n).concat(c).concat(u).concat(r(Math.round(255*(t<=1?t:t/100))))).toLowerCase()},exports.convertRGB=function(e,t,o,s){return"#".concat(r(e)).concat(r(t)).concat(r(o)).concat(r(Math.round(255*(s<=1?s:s/100))))},exports.pxToRem=e,exports.resolveStyleValue=function(r){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rem";return"string"==typeof r?r:"px"===t?"".concat(e(r),"rem"):"".concat(r).concat(t)},exports.setDefaultFontSize=function(e){exports.defaultFontSize=e},exports.toHex=r;
|
|
2
|
-
//# sourceMappingURL=style.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../../../../../src/core/ui/utils/style.ts"],"sourcesContent":["// eslint-disable-next-line import/no-mutable-exports\nexport let defaultFontSize = 16\nexport const setDefaultFontSize = (fontSize: number) => {\n defaultFontSize = fontSize\n}\n\nexport const pxToRem = (px: number): number => px / defaultFontSize\n\nexport const resolveStyleValue = (\n value: string | number,\n units = 'rem',\n): string => {\n if (typeof value === 'string') {\n return value as string\n }\n\n if (units === 'px') {\n return `${pxToRem(value)}rem`\n }\n\n return `${value}${units}`\n}\n\n/* eslint-disable no-param-reassign */\nexport const toHex = (x: number | string): string => {\n x = x.toString(16)\n return x.padStart(2, '0')\n}\n\nexport const convertHex = (hex: string, opacity: number, rgba = false): string => {\n const hexValue = hex.replace('#', '')\n const rValue = hexValue.substring(0, 2)\n const gValue = hexValue.substring(2, 4)\n const bValue = hexValue.substring(4, 6)\n const r = parseInt(rValue, 16)\n const g = parseInt(gValue, 16)\n const b = parseInt(bValue, 16)\n\n const a = opacity <= 1 ? opacity : (opacity / 100)\n\n return (rgba\n ? `rgba(${r},${g},${b},${a})`\n : `#${rValue}${gValue}${bValue}${toHex(Math.round((opacity <= 1 ? opacity : (opacity / 100)) * 255))}`)\n .toLowerCase()\n}\n\nexport const convertRGB = (\n r: number, g: number, b: number, opacity: number,\n): string => `#${toHex(r)}${toHex(g)}${toHex(b)}${toHex(Math.round((opacity <= 1 ? opacity : (opacity / 100)) * 255))}`\n\nexport const calculatePercColor = (startColor: string, endColor: string, ratio = 0.5): string => {\n if (startColor.indexOf('#') === 0) {\n startColor = startColor.substr(1)\n }\n if (endColor.indexOf('#') === 0) {\n endColor = endColor.substr(1)\n }\n\n const r = Math.ceil(parseInt(endColor.substring(0, 2), 16) * ratio\n + parseInt(startColor.substring(0, 2), 16) * (1 - ratio))\n const g = Math.ceil(parseInt(endColor.substring(2, 4), 16) * ratio\n + parseInt(startColor.substring(2, 4), 16) * (1 - ratio))\n const b = Math.ceil(parseInt(endColor.substring(4, 6), 16) * ratio\n + parseInt(startColor.substring(4, 6), 16) * (1 - ratio))\n\n return `#${toHex(r) + toHex(g) + toHex(b)}`\n}\n\nexport const calculateColors = (startColor: string, endColor: string, num = 10): string[] => {\n const ratioIterator = (num / (num + 1)) / num\n const ratios = []\n let ratio = ratioIterator\n\n // eslint-disable-next-line no-plusplus\n while (num--) {\n ratios.push(ratio)\n ratio += ratioIterator\n }\n\n return ratios.map((rat) => calculatePercColor(startColor, endColor, rat))\n}\n"],"names":["defaultFontSize","pxToRem","px","toHex","x","toString","padStart","calculatePercColor","startColor","endColor","ratio","arguments","length","undefined","indexOf","substr","r","Math","ceil","parseInt","substring","g","b","concat","num","ratioIterator","ratios","push","map","rat","hex","opacity","rgba","hexValue","replace","rValue","gValue","bValue","a","round","toLowerCase","value","units","fontSize"],"mappings":"4sBACWA,QAAAA,gBAAkB,OAKhBC,EAAU,SAACC,GAAU,OAAaA,EAAKF,QAAAA,eAAe,EAkBtDG,EAAQ,SAACC,GAEpB,OADAA,EAAIA,EAAEC,SAAS,KACNC,SAAS,EAAG,IACvB,EAuBaC,EAAqB,SAACC,EAAoBC,GAA0C,IAAxBC,EAAKC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GAC/C,IAA5BH,EAAWM,QAAQ,OACrBN,EAAaA,EAAWO,OAAO,IAEH,IAA1BN,EAASK,QAAQ,OACnBL,EAAWA,EAASM,OAAO,IAG7B,IAAMC,EAAIC,KAAKC,KAAKC,SAASV,EAASW,UAAU,EAAG,GAAI,IAAMV,EACzDS,SAASX,EAAWY,UAAU,EAAG,GAAI,KAAO,EAAIV,IAC9CW,EAAIJ,KAAKC,KAAKC,SAASV,EAASW,UAAU,EAAG,GAAI,IAAMV,EACzDS,SAASX,EAAWY,UAAU,EAAG,GAAI,KAAO,EAAIV,IAC9CY,EAAIL,KAAKC,KAAKC,SAASV,EAASW,UAAU,EAAG,GAAI,IAAMV,EACzDS,SAASX,EAAWY,UAAU,EAAG,GAAI,KAAO,EAAIV,IAEpD,MAAA,IAAAa,OAAWpB,EAAMa,GAAKb,EAAMkB,GAAKlB,EAAMmB,GACzC,0BAE+B,SAACd,EAAoBC,GAMlD,IAN2F,IAAvBe,EAAGb,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA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QAAAA,gBAAkB2C,CACpB"}
|
package/dist/lib/esm/index.css
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
.fbox-module_flexible-box__rLJ93 {
|
|
2
|
-
display: flex;
|
|
3
|
-
position: relative;
|
|
4
|
-
flex-direction: row;
|
|
5
|
-
flex: 0;
|
|
6
|
-
flex-grow: 0;
|
|
7
|
-
flex-shrink: 0;
|
|
8
|
-
flex-basis: auto;
|
|
9
|
-
flex-wrap: nowrap;
|
|
10
|
-
gap: 0;
|
|
11
|
-
text-align: left;
|
|
12
|
-
justify-content: flex-start;
|
|
13
|
-
align-items: flex-start;
|
|
14
|
-
align-self: auto;
|
|
15
|
-
margin: 0;
|
|
16
|
-
padding: 0;
|
|
17
|
-
width: auto;
|
|
18
|
-
height: auto;
|
|
19
|
-
max-width: none;
|
|
20
|
-
max-height: none;
|
|
21
|
-
min-width: 0;
|
|
22
|
-
min-height: 0;
|
|
23
|
-
border-radius: initial;
|
|
24
|
-
}
|
|
25
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm {
|
|
26
|
-
transform-origin: 0% 0%;
|
|
27
|
-
opacity: 0;
|
|
28
|
-
overflow: clip;
|
|
29
|
-
}
|
|
30
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN {
|
|
31
|
-
transition: opacity 0.2s ease-in-out, height 0.2s ease-in-out, max-height 0.2s ease-in-out;
|
|
32
|
-
will-change: opacity, height, max-height;
|
|
33
|
-
}
|
|
34
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_collapsed__q8fs8 {
|
|
35
|
-
height: 0;
|
|
36
|
-
max-height: 0;
|
|
37
|
-
opacity: 0;
|
|
38
|
-
}
|
|
39
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_vertical__w7MVN.CollapsibleContainer-module_expanded__O6Vh8 {
|
|
40
|
-
height: var(--prop-value);
|
|
41
|
-
max-height: var(--prop-value);
|
|
42
|
-
opacity: 1;
|
|
43
|
-
}
|
|
44
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI- {
|
|
45
|
-
transition: opacity 0.2s ease-in-out, width 0.2s ease-in-out, max-width 0.2s ease-in-out;
|
|
46
|
-
will-change: opacity, width, max-width;
|
|
47
|
-
}
|
|
48
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_collapsed__q8fs8 {
|
|
49
|
-
width: 0;
|
|
50
|
-
max-width: 0;
|
|
51
|
-
opacity: 0;
|
|
52
|
-
}
|
|
53
|
-
.CollapsibleContainer-module_collapsible-container__u0Jmm.CollapsibleContainer-module_horizontal__QJWI-.CollapsibleContainer-module_expanded__O6Vh8 {
|
|
54
|
-
width: var(--prop-value);
|
|
55
|
-
max-width: var(--prop-value);
|
|
56
|
-
opacity: 1;
|
|
57
|
-
}
|
|
58
|
-
.divider-module_divider-line__6CesR {
|
|
59
|
-
position: relative;
|
|
60
|
-
display: block;
|
|
61
|
-
transition: opacity, width, height 250ms ease-in-out;
|
|
62
|
-
background-color: var(--color);
|
|
63
|
-
opacity: var(--opacity);
|
|
64
|
-
}
|
|
65
|
-
.divider-module_divider-line__6CesR.divider-module_vertical__qSVWD {
|
|
66
|
-
height: var(--length);
|
|
67
|
-
left: var(--left);
|
|
68
|
-
width: var(--width);
|
|
69
|
-
margin: var(--margin);
|
|
70
|
-
}
|
|
71
|
-
.divider-module_divider-line__6CesR.divider-module_horizontal__Gz-Oj {
|
|
72
|
-
width: var(--length);
|
|
73
|
-
left: var(--left);
|
|
74
|
-
height: var(--height);
|
|
75
|
-
margin: var(--margin);
|
|
76
|
-
}
|
|
77
|
-
.icon-module_icon-base-parent__nOMvW {
|
|
78
|
-
line-height: 1px !important;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.icon-module_icon-base__S0tHf {
|
|
82
|
-
min-width: var(--min-width);
|
|
83
|
-
min-height: var(--min-height);
|
|
84
|
-
width: var(--width) !important;
|
|
85
|
-
height: var(--height) !important;
|
|
86
|
-
line-height: var(--height);
|
|
87
|
-
background-color: var(--icon-color);
|
|
88
|
-
color: var(--icon-content-color);
|
|
89
|
-
background-repeat: no-repeat;
|
|
90
|
-
mask-image: var(--icon-url);
|
|
91
|
-
-webkit-mask-image: var(--icon-url);
|
|
92
|
-
mask-repeat: no-repeat;
|
|
93
|
-
-webkit-mask-repeat: no-repeat;
|
|
94
|
-
mask-size: contain;
|
|
95
|
-
-webkit-mask-size: contain;
|
|
96
|
-
mask-position: center;
|
|
97
|
-
-webkit-mask-position: center;
|
|
98
|
-
display: inline-block;
|
|
99
|
-
will-change: transform;
|
|
100
|
-
transform: translate3d(0, 0, 0);
|
|
101
|
-
}
|
|
102
|
-
.icon-module_icon-base__S0tHf svg {
|
|
103
|
-
fill: var(--icon-content-color);
|
|
104
|
-
width: var(--height);
|
|
105
|
-
height: var(--width);
|
|
106
|
-
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as r}from"../internals/export.js";import{f as t}from"../internals/function-uncurry-this-clause.js";import{a as i}from"../internals/array-includes.js";import{a as n}from"../internals/array-method-is-strict.js";var a=r,s=t,e=i.indexOf,o=n,f=s([].indexOf),m=!!f&&1/f([1],1,-0)<0;a({target:"Array",proto:!0,forced:m||!o("indexOf")},{indexOf:function(r){var t=arguments.length>1?arguments[1]:void 0;return m?f(this,r,t)||0:e(this,r,t)}});
|
|
2
|
-
//# sourceMappingURL=es.array.index-of.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"es.array.index-of.js","sources":["../../../../../../node_modules/core-js/modules/es.array.index-of.js"],"sourcesContent":["'use strict';\n/* eslint-disable es/no-array-prototype-indexof -- required for testing */\nvar $ = require('../internals/export');\nvar uncurryThis = require('../internals/function-uncurry-this-clause');\nvar $indexOf = require('../internals/array-includes').indexOf;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar nativeIndexOf = uncurryThis([].indexOf);\n\nvar NEGATIVE_ZERO = !!nativeIndexOf && 1 / nativeIndexOf([1], 1, -0) < 0;\nvar FORCED = NEGATIVE_ZERO || !arrayMethodIsStrict('indexOf');\n\n// `Array.prototype.indexOf` method\n// https://tc39.es/ecma262/#sec-array.prototype.indexof\n$({ target: 'Array', proto: true, forced: FORCED }, {\n indexOf: function indexOf(searchElement /* , fromIndex = 0 */) {\n var fromIndex = arguments.length > 1 ? arguments[1] : undefined;\n return NEGATIVE_ZERO\n // convert -0 to +0\n ? nativeIndexOf(this, searchElement, fromIndex) || 0\n : $indexOf(this, searchElement, fromIndex);\n }\n});\n"],"names":["$","require$$0","uncurryThis","require$$1","$indexOf","require$$2","indexOf","arrayMethodIsStrict","require$$3","nativeIndexOf","NEGATIVE_ZERO","target","proto","forced","searchElement","fromIndex","arguments","length","undefined","this"],"mappings":"0NAEA,IAAIA,EAAIC,EACJC,EAAcC,EACdC,EAAWC,EAAuCC,QAClDC,EAAsBC,EAEtBC,EAAgBP,EAAY,GAAGI,SAE/BI,IAAkBD,GAAiB,EAAIA,EAAc,CAAC,GAAI,GAAI,GAAK,EAKvET,EAAE,CAAEW,OAAQ,QAASC,OAAO,EAAMC,OAJrBH,IAAkBH,EAAoB,YAIC,CAClDD,QAAS,SAAiBQ,GACxB,IAAIC,EAAYC,UAAUC,OAAS,EAAID,UAAU,QAAKE,EACtD,OAAOR,EAEHD,EAAcU,KAAML,EAAeC,IAAc,EACjDX,EAASe,KAAML,EAAeC,EACnC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{objectWithoutProperties as e,slicedToArray as l,objectSpread2 as o}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as a,useRef as r,useState as t,useEffect as n,useLayoutEffect as i,useMemo as c}from"react";import s from"./CollapsibleContainer.module.scss.js";var p=["collapsed","collapseHandler","children","horizontal","className"],d={width:"scrollWidth",height:"scrollHeight"},u=a((function(a){var u=a.collapsed,h=void 0!==u&&u,m=a.collapseHandler,v=a.children,f=a.horizontal,j=void 0!==f&&f,b=a.className,g=void 0===b?"":b,x=e(a,p),w=r(null),y=t(0),C=l(y,2),H=C[0],N=C[1],z=!j;n((function(){null==m||m(h)}),[m,h]),i((function(){if(null!=w&&w.current){var e=z?"height":"width";N(w.current[d[e]])}}),[w,z]);var _=c((function(){return o({"--prop-name":z?"height":"width","--prop-max-name":z?"max-height":"max-width","--prop-value":"".concat(H,"px")},x)}),[z,x,H]),P=c((function(){var e=[z?s.vertical:s.horizontal];return h&&H&&null!=H&&e.push(s.collapsed),!h&&H&&null!=H&&e.push(s.expanded),e.join(" ")}),[h,H,z]);return React.createElement("div",{className:"".concat(s["collapsible-container"]," ").concat(P," ").concat(g," "),ref:w,style:_},v)}));u.displayName="CollapsibleContainer";export{u as CollapsibleContainer};
|
|
2
|
-
//# sourceMappingURL=CollapsibleContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleContainer.js","sources":["../../../../../../../../src/core/ui/components/container/CollapsibleContainer.tsx"],"sourcesContent":["import { FC, useRef, useState, memo, ReactNode, useEffect, useLayoutEffect, useMemo, CSSProperties } from 'react'\n\nimport classes from './CollapsibleContainer.module.scss'\n\nconst elementPropNameMap: Record<string, string> = {\n width: 'scrollWidth',\n height: 'scrollHeight',\n}\n\nexport type CollapsibleContainerProps = {\n collapsed?: boolean\n collapseHandler?: (collapsed: boolean) => void\n children?: ReactNode\n className?: string\n horizontal?: boolean\n} & CSSProperties\n\nexport const CollapsibleContainer: FC<CollapsibleContainerProps> = memo(({\n collapsed = false, collapseHandler, children, horizontal = false, className = '', ...style\n}: CollapsibleContainerProps) => {\n const containerRef = useRef<HTMLDivElement>(null)\n const [contentProp, setContentProp] = useState(0)\n\n const vertical = !horizontal\n\n useEffect(() => {\n collapseHandler?.(collapsed)\n }, [collapseHandler, collapsed])\n\n useLayoutEffect(() => {\n if (containerRef?.current) {\n const propName = vertical ? 'height' : 'width'\n\n setContentProp((containerRef.current as any)[elementPropNameMap[propName]])\n }\n }, [containerRef, vertical])\n\n const styleProps: CSSProperties = useMemo(() => ({\n '--prop-name': vertical ? 'height' : 'width',\n '--prop-max-name': vertical ? 'max-height' : 'max-width',\n '--prop-value': `${contentProp}px`,\n ...style,\n } as CSSProperties), [vertical, style, contentProp])\n\n const classNames = useMemo(() => {\n const classNames = [vertical ? classes.vertical : classes.horizontal]\n\n if (collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.collapsed)\n }\n if (!collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n classNames.push(classes.expanded)\n }\n return classNames.join(' ')\n }, [collapsed, contentProp, vertical])\n\n return (\n <div\n className={`${classes['collapsible-container']} ${classNames} ${className} `}\n ref={containerRef}\n style={styleProps}\n >\n {children}\n </div>\n )\n})\n\nCollapsibleContainer.displayName = 'CollapsibleContainer'\n"],"names":["elementPropNameMap","width","height","CollapsibleContainer","memo","_ref","_ref$collapsed","collapsed","collapseHandler","children","_ref$horizontal","horizontal","_ref$className","className","style","_objectWithoutProperties","_excluded","containerRef","useRef","_useState","useState","_useState2","_slicedToArray","contentProp","setContentProp","vertical","useEffect","useLayoutEffect","current","propName","styleProps","useMemo","_objectSpread","concat","classNames","classes","push","expanded","join","React","createElement","ref","displayName"],"mappings":"mbAIMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAWGC,EAAsDC,GAAK,SAAAC,GAEvC,IAAAC,EAAAD,EAD/BE,UAAAA,OAAY,IAAHD,GAAQA,EAAEE,EAAeH,EAAfG,gBAAiBC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEM,WAAAA,OAAa,IAAHD,GAAQA,EAAAE,EAAAP,EAAEQ,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAKE,EAAKC,EAAAV,EAAAW,GAEpFC,EAAeC,EAAuB,MAC5CC,EAAsCC,EAAS,GAAEC,EAAAC,EAAAH,EAAA,GAA1CI,EAAWF,EAAA,GAAEG,EAAcH,EAAA,GAE5BI,GAAYd,EAElBe,GAAU,WACRlB,SAAAA,EAAkBD,EACpB,GAAG,CAACC,EAAiBD,IAErBoB,GAAgB,WACd,GAAIV,SAAAA,EAAcW,QAAS,CACzB,IAAMC,EAAWJ,EAAW,SAAW,QAEvCD,EAAgBP,EAAaW,QAAgB5B,EAAmB6B,IAClE,CACF,GAAG,CAACZ,EAAcQ,IAElB,IAAMK,EAA4BC,GAAQ,WAAA,OAAAC,EAAA,CACxC,cAAeP,EAAW,SAAW,QACrC,kBAAmBA,EAAW,aAAe,YAC7C,eAAc,GAAAQ,OAAKV,EAAW,OAC3BT,EACc,GAAE,CAACW,EAAUX,EAAOS,IAEjCW,EAAaH,GAAQ,WACzB,IAAMG,EAAa,CAACT,EAAWU,EAAQV,SAAWU,EAAQxB,YAQ1D,OANIJ,GAAagB,GAAbhB,MAA4BgB,GAC9BW,EAAWE,KAAKD,EAAQ5B,YAErBA,GAAagB,GAAd,MAA6BA,GAC/BW,EAAWE,KAAKD,EAAQE,UAEnBH,EAAWI,KAAK,IACxB,GAAE,CAAC/B,EAAWgB,EAAaE,IAE5B,OACEc,MAAAC,cAAA,MAAA,CACE3B,UAASoB,GAAAA,OAAKE,EAAQ,yBAAwBF,KAAAA,OAAIC,EAAU,KAAAD,OAAIpB,EAAa,KAC7E4B,IAAKxB,EACLH,MAAOgB,GAENrB,EAGP,IAEAN,EAAqBuC,YAAc"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var l={"collapsible-container":"CollapsibleContainer-module_collapsible-container__u0Jmm",vertical:"CollapsibleContainer-module_vertical__w7MVN",collapsed:"CollapsibleContainer-module_collapsed__q8fs8",expanded:"CollapsibleContainer-module_expanded__O6Vh8",horizontal:"CollapsibleContainer-module_horizontal__QJWI-"};export{l as default};
|
|
2
|
-
//# sourceMappingURL=CollapsibleContainer.module.scss.js.map
|
package/dist/lib/esm/src/core/ui/components/container/CollapsibleContainer.module.scss.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleContainer.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{objectWithoutProperties as e,slicedToArray as o,extends as n}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import a from"styled-components";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as t,useRef as l,useState as r,useEffect as i}from"react";var c=["collapsed","collapseHandler","children","propName","className","css"],s={width:"scrollWidth",height:"scrollHeight"},p=function(e){return e.propName},d=t(a.div.withConfig({displayName:"CollapsibleContainerS__StyledContainer",componentId:"sc-fj3lnl-0"})(["transform-origin:0% 0%;transition:opacity 0.2s ease-in-out,"," 0.2s ease-in-out,max-"," 0.2s ease-in-out;will-change:opacity,",",max-",";overflow:hidden;opacity:0;&.Collapsible__container__collapsed{",":0;max-",":0;opacity:0;}&.Collapsible__container__expanded{",":",";max-",":",";opacity:1;}"],p,p,p,p,p,p,p,(function(e){var o=e.contentProp;return"".concat(o,"px")}),p,(function(e){var o=e.contentProp;return"".concat(o,"px")}))),m=a(d).withConfig({displayName:"CollapsibleContainerS___StyledStyledContainer",componentId:"sc-fj3lnl-1"})(["",""],(function(e){return e.$_css})),u=t((function(a){var t=a.collapsed,p=void 0!==t&&t,d=a.collapseHandler,u=a.children,_=a.propName,f=void 0===_?"height":_,h=a.className,y=a.css,C=e(a,c),v=l(),x=r(0),N=o(x,2),b=N[0],g=N[1];i((function(){null==d||d(p)}),[d,p]),i((function(){null!=v&&v.current&&g(v.current[s[f]])}),[v,f]);var j="";return p&&b&&null!=b&&(j="Collapsible__container__collapsed"),!p&&b&&null!=b&&(j="Collapsible__container__expanded"),React.createElement(m,n({className:"".concat(h," ").concat(j),ref:v,contentProp:b,propName:f},C,{$_css:y}),u)}));u.displayName="ContainerS";export{u as ContainerS};
|
|
2
|
-
//# sourceMappingURL=CollapsibleContainerS.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"CollapsibleContainerS.js","sources":["../../../../../../../../src/core/ui/components/container/CollapsibleContainerS.tsx"],"sourcesContent":["import { FC, useRef, useState, memo, ReactNode, useEffect } from 'react'\nimport styled from 'styled-components'\n\ntype StyledContainerProps = { propName: string; className: string; [key: string]: any }\n\nconst elementPropNameMap: Record<string, string> = {\n width: 'scrollWidth',\n height: 'scrollHeight',\n}\n\nconst propNameFunc = ({ propName }: { propName: StyledContainerProps['propName']}) => propName\n\nconst StyledContainer: FC<StyledContainerProps> = memo(styled.div<StyledContainerProps>`\n transform-origin: 0% 0%;\n transition: opacity 0.2s ease-in-out, ${propNameFunc} 0.2s ease-in-out, max-${propNameFunc} 0.2s ease-in-out;\n will-change: opacity, ${propNameFunc}, max-${propNameFunc};\n overflow: hidden;\n opacity: 0;\n\n &.Collapsible__container__collapsed {\n ${propNameFunc}: 0;\n max-${propNameFunc}: 0;\n opacity: 0;\n }\n\n &.Collapsible__container__expanded {\n ${propNameFunc}: ${({ contentProp }: Partial<StyledContainerProps>) => `${contentProp}px`};\n max-${propNameFunc}: ${({ contentProp }: Partial<StyledContainerProps>) => `${contentProp}px`};\n opacity: 1;\n }\n`)\n\nexport type ContainerProps = {\n collapsed?: boolean\n collapseHandler?: (collapsed: boolean) => void\n children?: ReactNode\n propName?: string\n className?: string\n css?: string\n}\nexport const ContainerS: FC<ContainerProps> = memo(({\n collapsed = false, collapseHandler, children, propName = 'height', className, css, ...props\n}: ContainerProps) => {\n const containerRef = useRef<HTMLDivElement>()\n const [contentProp, setContentProp] = useState(0)\n\n useEffect(() => {\n collapseHandler?.(collapsed)\n }, [collapseHandler, collapsed])\n\n useEffect(() => {\n if (containerRef?.current) {\n setContentProp((containerRef.current as any)[elementPropNameMap[propName]])\n }\n }, [containerRef, propName])\n\n let resolvedClassName = ''\n\n if (collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n resolvedClassName = 'Collapsible__container__collapsed'\n }\n if (!collapsed && contentProp && contentProp !== undefined && contentProp !== null) {\n resolvedClassName = 'Collapsible__container__expanded'\n }\n\n return (\n <StyledContainer\n className={`${className} ${resolvedClassName}`}\n ref={containerRef}\n contentProp={contentProp}\n propName={propName}\n css={css}\n {...props}\n >\n {children}\n </StyledContainer>\n )\n})\n\nContainerS.displayName = 'ContainerS'\n"],"names":["elementPropNameMap","width","height","propNameFunc","_ref","propName","StyledContainer","memo","styled","div","withConfig","displayName","componentId","_ref2","contentProp","concat","_ref3","_StyledStyledContainer","p","$_css","ContainerS","_ref4","_ref4$collapsed","collapsed","collapseHandler","children","_ref4$propName","className","css","props","_objectWithoutProperties","_excluded","containerRef","useRef","_useState","useState","_useState2","_slicedToArray","setContentProp","useEffect","current","resolvedClassName","React","createElement","_extends","ref"],"mappings":"2XAKMA,EAA6C,CACjDC,MAAO,cACPC,OAAQ,gBAGJC,EAAe,SAAHC,GAAc,OAAAA,EAARC,QAAsE,EAExFC,EAA4CC,EAAKC,EAAOC,IAAGC,WAAA,CAAAC,YAAA,yCAAAC,YAAA,eAAVJ,CAAU,CAAA,8DAAA,yBAAA,yCAAA,QAAA,kEAAA,UAAA,oDAAA,IAAA,QAAA,IAAA,gBAEvBL,EAAsCA,EACtDA,EAAqBA,EAKzCA,EACIA,EAKJA,GAAiB,SAAAU,GAAA,IAAGC,EAAWD,EAAXC,YAAW,MAAAC,GAAAA,OAAyCD,EAAW,KAAA,GAC/EX,GAAiB,SAAAa,GAAA,IAAGF,EAAWE,EAAXF,YAAW,MAAAC,GAAAA,OAAyCD,EAAW,KAAA,KAG3FG,EAAAT,EAAAF,GAAAI,WAAA,CAAAC,YAAA,gDAAAC,YAAA,eAAAJ,CAAA,CAAA,GAAA,KAAA,SAAAU,GAAA,OAAAA,EAAAC,KAAA,IAUWC,EAAiCb,GAAK,SAAAc,GAE7B,IAAAC,EAAAD,EADpBE,UAAAA,OAAY,IAAHD,GAAQA,EAAEE,EAAeH,EAAfG,gBAAiBC,EAAQJ,EAARI,SAAQC,EAAAL,EAAEhB,SAAAA,OAAW,IAAHqB,EAAG,SAAQA,EAAEC,EAASN,EAATM,UAAWC,EAAGP,EAAHO,IAAQC,EAAKC,EAAAT,EAAAU,GAErFC,EAAeC,IACrBC,EAAsCC,EAAS,GAAEC,EAAAC,EAAAH,EAAA,GAA1CpB,EAAWsB,EAAA,GAAEE,EAAcF,EAAA,GAElCG,GAAU,WACRf,SAAAA,EAAkBD,EACpB,GAAG,CAACC,EAAiBD,IAErBgB,GAAU,WACJP,SAAAA,EAAcQ,SAChBF,EAAgBN,EAAaQ,QAAgBxC,EAAmBK,IAEpE,GAAG,CAAC2B,EAAc3B,IAElB,IAAIoC,EAAoB,GASxB,OAPIlB,GAAaT,GAAbS,MAA4BT,IAC9B2B,EAAoB,sCAEjBlB,GAAaT,GAAd,MAA6BA,IAC/B2B,EAAoB,oCAIpBC,MAAAC,cAAA1B,EAAA2B,EAAA,CACEjB,UAAS,GAAAZ,OAAKY,OAASZ,OAAI0B,GAC3BI,IAAKb,EACLlB,YAAaA,EACbT,SAAUA,GAENwB,EAAK,CAAAV,MADJS,IAGJH,EAGP,IAEAL,EAAWT,YAAc"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{objectWithoutProperties as e,slicedToArray as t,objectSpread2 as o,extends as r}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.object.to-string.js";import"../../../../../node_modules/core-js/modules/web.dom-collections.for-each.js";import"../../../../../node_modules/core-js/modules/es.object.entries.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as s,forwardRef as a,useMemo as n}from"react";import l from"./fbox.module.scss.js";var i=["style","children","tabIndex","className"],c={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},d=function(e){return e&&c[e]||e},m=a((function(s,a){var c=s.style,m=s.children,u=s.tabIndex,f=s.className,j=void 0===f?"":f,x=e(s,i),b=n((function(){var e={},o={};return Object.entries(x).forEach((function(r){var s=t(r,2),a=s[0],n=s[1];"data"===a.substr(0,4)?e[a]=n:o[a]=n})),[e,o]}),[x]),p=t(b,2),y=p[0],v=p[1],_=n((function(){return o(o(o(o(o({},v),v.align?{alignItems:d(v.align)}:{}),v.justify?{justifyContent:d(v.justify)}:{}),v.direction?{flexDirection:v.direction}:{}),c)}),[v,c]);return React.createElement("div",r({ref:a,tabIndex:u,className:"".concat(l["flexible-box"]," ").concat(j),style:_},y),m)}));m.displayName="FBoxRefForwarded";var u=s(m);u.displayName="FBox";export{u as FBox};
|
|
2
|
-
//# sourceMappingURL=FBox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FBox.js","sources":["../../../../../../../../src/core/ui/components/container/FBox.tsx"],"sourcesContent":["import { memo, FC, PropsWithChildren, useMemo, CSSProperties, forwardRef, LegacyRef } from 'react'\n\n\nimport classes from './fbox.module.scss'\n\n\nexport type FBoxProps = PropsWithChildren<any> &{\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n style?: CSSProperties\n className?: string\n} & CSSProperties\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\n\nconst FBoxRefForwarded = forwardRef(({\n style, children, tabIndex, className = '', ...props\n}: FBoxProps, ref: LegacyRef<HTMLDivElement> | undefined) => {\n const [restProps, cssProps] = useMemo(() => {\n const restProps: Record<string, unknown> = {}\n const cssProps: Record<string, unknown> = {}\n\n Object.entries(props).forEach(([key, value]) => {\n if (key.substr(0, 4) === 'data') {\n restProps[key] = value\n } else {\n cssProps[key] = value\n }\n })\n return [restProps, cssProps]\n }, [props])\n\n const styles = useMemo(() => (\n {\n ...cssProps,\n ...(cssProps.align ? { alignItems: resolveFlexProps(cssProps.align as string) } : {}),\n ...(cssProps.justify ? { justifyContent: resolveFlexProps(cssProps.justify as string) } : {}),\n ...(cssProps.direction ? { flexDirection: cssProps.direction } : {}),\n ...style,\n }\n ), [cssProps, style])\n\n return (\n <div\n ref={ref}\n tabIndex={tabIndex}\n className={`${(classes as any)['flexible-box']} ${className}`}\n style={styles as CSSProperties}\n {...restProps}\n >\n {children}\n </div>\n )\n})\n\nFBoxRefForwarded.displayName = 'FBoxRefForwarded'\n\nexport const FBox: FC<FBoxProps> = memo<FBoxProps>(FBoxRefForwarded)\n\n\nFBox.displayName = 'FBox'\n\n\n// default flex centralized, 100% width and height\n// export const FlexWrapper = memo(styled(Flex).attrs((props: Partial<FlexProps>) => (\n// {\n// width: props.width || '100%',\n// height: props.height || '100%',\n// justify: props.justify || 'center',\n// align: props.align || 'center',\n// ...props,\n// }\n// ))``)\n\n// export const FlexTight = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// ...props,\n// }))``)\n\n// export const FlexTightStyled = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n// size: 'unset',\n// width: 'initial',\n// style: {\n// text: 'blue',\n// padding: '1rem',\n// border: '1px solid green',\n// },\n// ...props,\n// }))``)\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","FBoxRefForwarded","forwardRef","_ref","ref","style","children","tabIndex","_ref$className","className","props","_objectWithoutProperties","_excluded","_useMemo","useMemo","restProps","cssProps","Object","entries","forEach","_ref2","_ref3","_slicedToArray","key","substr","_useMemo2","styles","_objectSpread","align","alignItems","justify","justifyContent","direction","flexDirection","React","createElement","_extends","concat","classes","displayName","FBox","memo"],"mappings":"klBAgCMA,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
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{objectSpread2 as t}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as n}from"react";import i from"styled-components";var e={start:"flex-start","flex-start":"flex-start",end:"flex-end","flex-end":"flex-end"},r=function(t){return t&&e[t]||t},o=n(i.div.withConfig({displayName:"Flex",componentId:"sc-19vq3db-0"})(["display:flex;position:relative;flex-direction:",";flex:",";flex-grow:",";flex-shrink:",";flex-basis:",";flex-wrap:",";gap:",";text-align:",";justify-content:",";align-items:",";align-self:",";margin:",";padding:",";width:",";height:",";max-width:",";max-height:",";min-width:",";min-height:",";border-radius:",";"],(function(t){return t.direction||"row"}),(function(t){var n=t.flex;return void 0!==n?n:"0"}),(function(t){var n=t.flexGrow;return void 0!==n?n:"0"}),(function(t){var n=t.flexShrink;return void 0!==n?n:"0"}),(function(t){return t.flexBasis||"auto"}),(function(t){return t.flexWrap||"nowrap"}),(function(t){var n=t.gap;return void 0!==n?n:"0"}),(function(t){return t.alignText||"left"}),(function(t){var n=t.justify;return r(n)||"flex-start"}),(function(t){var n=t.align;return r(n)||"flex-start"}),(function(t){return t.alignSelf||"auto"}),(function(t){return t.margin||"0"}),(function(t){return t.padding||"0"}),(function(t){return t.width||"auto"}),(function(t){return t.height||"auto"}),(function(t){return t.maxWidth||"none"}),(function(t){return t.maxHeight||"none"}),(function(t){var n=t.minWidth;return n||"0"===n?n:"0"}),(function(t){return t.minHeight||"0"}),(function(t){return t.borderRadius||"initial"}))),a=n(i(o).attrs((function(n){return t({width:n.width||"100%",height:n.height||"100%",justify:n.justify||"center",align:n.align||"center"},n)})).withConfig({displayName:"Flex__FlexWrapper",componentId:"sc-19vq3db-1"})([""])),u=n(i(o).attrs((function(n){return t({width:"initial"},n)})).withConfig({displayName:"Flex__FlexTight",componentId:"sc-19vq3db-2"})([""])),f=n(i(o).attrs((function(n){return t({width:"initial",style:{text:"blue",padding:"1rem",border:"1px solid green"}},n)})).withConfig({displayName:"Flex__FlexTightStyled",componentId:"sc-19vq3db-3"})([""]));export{o as Flex,u as FlexTight,f as FlexTightStyled,a as FlexWrapper};
|
|
2
|
-
//# sourceMappingURL=Flex.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Flex.js","sources":["../../../../../../../../src/core/ui/components/container/Flex.ts"],"sourcesContent":["import { memo } from 'react'\nimport styled from 'styled-components'\n\nexport type FlexProps = {\n flex?: string\n flexGrow?: string | number\n alignText?: 'center' | 'right' | 'left'\n direction?: string\n flexShrink?: string | number\n flexBasis?: string\n flexWrap?: string\n justify?: string\n align?: string\n alignSelf?: string\n margin?: string\n padding?: string\n width?: string\n height?: string\n maxWidth?: string\n maxHeight?: string\n minWidth?: string\n minHeight?: string\n gap?: string\n css?: string\n borderRadius?: string\n}\n\nconst flexValueMap: Record<string, string> = {\n start: 'flex-start',\n 'flex-start': 'flex-start',\n end: 'flex-end',\n 'flex-end': 'flex-end',\n}\n\nconst resolveFlexProps = (value?: string): string | undefined => (value ? (flexValueMap[value] || value) : value)\n\nexport const Flex = memo(styled.div<FlexProps>`\n display: flex;\n position: relative;\n flex-direction: ${({ direction }: Partial<FlexProps>) => direction || 'row'};\n flex: ${({ flex }: Partial<FlexProps>) => (flex !== undefined ? flex : '0')};\n flex-grow: ${({ flexGrow }: Partial<FlexProps>) => (flexGrow !== undefined ? flexGrow : '0')};\n flex-shrink: ${({ flexShrink }: Partial<FlexProps>) => (flexShrink !== undefined ? flexShrink : '0')};\n flex-basis: ${({ flexBasis }: Partial<FlexProps>) => flexBasis || 'auto'};\n flex-wrap: ${({ flexWrap }: Partial<FlexProps>) => flexWrap || 'nowrap'};\n gap: ${({ gap }: Partial<FlexProps>) => (gap !== undefined ? gap : '0')};\n text-align: ${({ alignText }: Partial<FlexProps>) => alignText || 'left'};\n justify-content: ${({ justify }: Partial<FlexProps>) => resolveFlexProps(justify) || 'flex-start'};\n align-items: ${({ align }: Partial<FlexProps>) => resolveFlexProps(align) || 'flex-start'};\n align-self: ${({ alignSelf }: Partial<FlexProps>) => alignSelf || 'auto'};\n margin: ${({ margin }: Partial<FlexProps>) => margin || '0'};\n padding: ${({ padding }: Partial<FlexProps>) => padding || '0'};\n width: ${({ width }: Partial<FlexProps>) => width || 'auto'};\n height: ${({ height }: Partial<FlexProps>) => height || 'auto'};\n max-width: ${({ maxWidth }: Partial<FlexProps>) => maxWidth || 'none'};\n max-height: ${({ maxHeight }: Partial<FlexProps>) => maxHeight || 'none'};\n min-width: ${({ minWidth }: Partial<FlexProps>) => ((minWidth || minWidth === '0') ? minWidth : '0')};\n min-height: ${({ minHeight }: Partial<FlexProps>) => minHeight || '0'};\n border-radius: ${({ borderRadius }: Partial<FlexProps>) => borderRadius || 'initial'};\n`)\n\n// default flex centralized, 100% width and height\nexport const FlexWrapper = memo(styled(Flex).attrs((props: Partial<FlexProps>) => (\n {\n width: props.width || '100%',\n height: props.height || '100%',\n justify: props.justify || 'center',\n align: props.align || 'center',\n ...props,\n }\n))``)\n\nexport const FlexTight = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n width: 'initial',\n ...props,\n}))``)\n\nexport const FlexTightStyled = memo(styled(Flex).attrs((props: Partial<FlexProps>) => ({\n width: 'initial',\n style: {\n text: 'blue',\n padding: '1rem',\n border: '1px solid green',\n },\n ...props,\n}))``)\n"],"names":["flexValueMap","start","end","resolveFlexProps","value","Flex","memo","styled","div","withConfig","displayName","componentId","_ref","direction","_ref2","flex","undefined","_ref3","flexGrow","_ref4","flexShrink","_ref5","flexBasis","_ref6","flexWrap","_ref7","gap","_ref8","alignText","_ref9","justify","_ref10","align","_ref11","alignSelf","_ref12","margin","_ref13","padding","_ref14","width","_ref15","height","_ref16","maxWidth","_ref17","maxHeight","_ref18","minWidth","_ref19","minHeight","_ref20","borderRadius","FlexWrapper","attrs","props","_objectSpread","FlexTight","FlexTightStyled","style","text","border"],"mappings":"mJA2BA,IAAMA,EAAuC,CAC3CC,MAAO,aACP,aAAc,aACdC,IAAK,WACL,WAAY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M,IACvD,SAAAC,GAAY,OAAAA,EAATC,WAAiD,MAAM,IAC3D,SAAAC,GAAA,IAAGC,EAAQD,EAARC,SAAQ,OAA6BA,GAAyB,MAAbA,EAAoBA,EAAW,GAAG,IACrF,SAAAC,GAAY,OAAAA,EAATC,WAAiD,GAAG,IACpD,SAAAC,GAAe,OAAAA,EAAZC,cAAuD,SAAS,KAIzEC,EAAc/C,EAAKC,EAAOF,GAAMiD,OAAM,SAACC,GAAyB,OAAAC,EAAA,CAEzEhB,MAAOe,EAAMf,OAAS,OACtBE,OAAQa,EAAMb,QAAU,OACxBZ,QAASyB,EAAMzB,SAAW,SAC1BE,MAAOuB,EAAMvB,OAAS,UACnBuB,EAAK,IAEV9C,WAAA,CAAAC,YAAA,oBAAAC,YAAA,gBAR8BJ,CAQ3B,CAAA,MAEQkD,EAAYnD,EAAKC,EAAOF,GAAMiD,OAAM,SAACC,GAAyB,OAAAC,EAAA,CACzEhB,MAAO,WACJe,EAAK,IACP9C,WAAA,CAAAC,YAAA,kBAAAC,YAAA,gBAH2BJ,CAGxB,CAAA,MAEOmD,EAAkBpD,EAAKC,EAAOF,GAAMiD,OAAM,SAACC,GAAyB,OAAAC,EAAA,CAC/EhB,MAAO,UACPmB,MAAO,CACLC,KAAM,OACNtB,QAAS,OACTuB,OAAQ,oBAEPN,EAAK,IACP9C,WAAA,CAAAC,YAAA,wBAAAC,YAAA,gBARiCJ,CAQ9B,CAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{objectWithoutProperties as r,extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import o from"styled-components";import{memo as t}from"react";import{FlexWrapper as c}from"./Flex.js";var n=["title","border","background","onClick","cssProp","children"],l=t((function(o){var t=o.title,c=o.border,l=o.background,i=o.onClick,a=o.cssProp,d=o.children,p=r(o,n);return React.createElement(s,e({onClick:i},p,{$_css:c||"border: 1px solid #999999;",$_css2:l||"background-color: rgba(0, 120, 255, 0.2);",$_css3:a}),t&&React.createElement("h2",null,t),d&&d)}));l.displayName="Placeholder";var s=o(c).withConfig({displayName:"Placeholder___StyledFlexWrapper",componentId:"sc-ozx0bx-0"})([""," "," ",""],(function(r){return r.$_css}),(function(r){return r.$_css2}),(function(r){return r.$_css3}));export{l as Placeholder};
|
|
2
|
-
//# sourceMappingURL=Placeholder.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Placeholder.js","sources":["../../../../../../../../src/core/ui/components/container/Placeholder.tsx"],"sourcesContent":["import { FC, memo, PropsWithChildren } from 'react'\n\nimport { FlexWrapper, FlexProps } from './Flex'\n\nexport type PlaceholderProps = FlexProps & PropsWithChildren<unknown> & {\n title?: string\n cssProp?: string\n background?: string\n border?: string\n onClick?: () => void\n}\n\nexport const Placeholder: FC<PlaceholderProps>\n= memo<PlaceholderProps>(({ title, border, background, onClick, cssProp, children, ...props }: PlaceholderProps) => (\n <FlexWrapper\n css={`\n ${border || 'border: 1px solid #999999;'}\n ${background || 'background-color: rgba(0, 120, 255, 0.2);'}\n ${cssProp}\n `}\n onClick={onClick}\n // eslint-disable-next-line react/jsx-props-no-spreading\n {...props}\n >\n {title && (<h2>{title}</h2>)}\n {children && children}\n </FlexWrapper>\n))\n\nPlaceholder.displayName = 'Placeholder'\n"],"names":["Placeholder","memo","_ref","title","border","background","onClick","cssProp","children","props","_objectWithoutProperties","_excluded","React","createElement","_StyledFlexWrapper","_extends","$_css","$_css2","$_css3","displayName","_styled","FlexWrapper","withConfig","componentId","p"],"mappings":"uRAYaA,EACXC,GAAuB,SAAAC,GAAA,IAAGC,EAAKD,EAALC,MAAOC,EAAMF,EAANE,OAAQC,EAAUH,EAAVG,WAAYC,EAAOJ,EAAPI,QAASC,EAAOL,EAAPK,QAASC,EAAQN,EAARM,SAAaC,EAAKC,EAAAR,EAAAS,GAAA,OACzFC,MAAAC,cAAAC,EAAAC,EAAA,CAMET,QAASA,GAELG,EAAK,CAAAO,MANLZ,GAAU,6BAA4Ba,OACtCZ,GAAc,4CAA2Ca,OACzDX,IAMHJ,GAAUS,MAAAC,cAAA,KAAA,KAAKV,GACfK,GAAYA,EACD,IAGhBR,EAAYmB,YAAc,cAAa,IAAAL,EAAAM,EAAAC,GAAAC,WAAA,CAAAH,YAAA,kCAAAI,YAAA,eAAAH,CAAA,CAAA,GAAA,IAAA,IAAA,KAAA,SAAAI,GAAA,OAAAA,EAAAR,KAAA,IAAA,SAAAQ,GAAA,OAAAA,EAAAP,MAAA,IAAA,SAAAO,GAAA,OAAAA,EAAAN,MAAA"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{objectWithoutProperties as e,slicedToArray as t,extends as i}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import{memo as n,useRef as l,useState as o,useMemo as r,useLayoutEffect as d}from"react";import h from"../../../../../node_modules/lodash-es/debounce.js";import{FBox as u}from"./FBox.js";var c=["children","debounceDelay"],a={main:{position:"absolute",zIndex:111,left:0,pointerEvents:"none"},empty:{pointerEvents:"none"}},v=n((function(n){var v=n.children,s=n.debounceDelay,m=void 0===s?250:s,g=e(n,c),p=l(),w=l({width:0,height:0}),f=o({width:void 0,height:void 0}),b=t(f,2),x=b[0],y=b[1],R=r((function(){return h((function(e){var t,i,n,l,o=e[0].contentRect.width,r=e[0].contentRect.height;(null===(t=w.current)||void 0===t?void 0:t.width)===o&&(null===(i=w.current)||void 0===i?void 0:i.height)===r||(w.current={width:o,height:r},y({width:null==p||null===(n=p.current)||void 0===n?void 0:n.clientWidth,height:null==p||null===(l=p.current)||void 0===l?void 0:l.clientHeight}))}),m)}),[m]);return d((function(){var e,t,i,n;null!=p&&p.current&&(t=null==p?void 0:p.current,(e=new ResizeObserver(R)).observe(t),y({width:null==p||null===(i=p.current)||void 0===i?void 0:i.clientWidth,height:null==p||null===(n=p.current)||void 0===n?void 0:n.clientHeight}));return function(){var i,n;null===(i=e)||void 0===i||null===(n=i.unobserve)||void 0===n||n.call(i,t)}}),[R,p]),React.createElement(u,i({width:"100%",height:"100%",justify:"center",align:"center",direction:"column"},g),React.createElement(u,{style:a.main,width:"100%",height:"100%",ref:p}),!v&&React.createElement(u,{width:"".concat(Math.max((null==x?void 0:x.width)||200,200)||200,"px"),height:"".concat(Math.max((null==x?void 0:x.height)||200,200)||200,"px"),style:a.empty}),v&&(null==v?void 0:v({height:"".concat((null==x?void 0:x.height)||200,"px"),width:"".concat((null==x?void 0:x.width)||200,"px"),measured:!(null==x||!x.height)})))}));v.displayName="ResizableContainer";export{v as ResizableContainer};
|
|
2
|
-
//# sourceMappingURL=ResizableContainer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ResizableContainer.js","sources":["../../../../../../../../src/core/ui/components/container/ResizableContainer.tsx"],"sourcesContent":["import { memo, useState, useRef, useMemo, useLayoutEffect, RefObject, PropsWithChildren } from 'react'\nimport debounce from 'lodash-es/debounce'\n\nimport { FBox, FBoxProps } from './FBox'\n\n\nexport type ResizableContainerProps = FBoxProps & PropsWithChildren<any> & {\n debounceDelay?: number\n}\n\nexport type ResizableContainerRenderProps = {\n width: number | string\n height: number | string\n measured: boolean\n}\n\ntype WrapperSize = {width: undefined | number; height: undefined | number}\n\nconst styles = {\n main: {\n position: 'absolute',\n zIndex: 111,\n left: 0,\n pointerEvents: 'none',\n // backgroundColor: '#FF000040',\n },\n empty: {\n pointerEvents: 'none',\n // background: '#FF000040',\n // border: '1px solid #0000FF40',\n },\n}\n\nexport const ResizableContainer = memo<ResizableContainerProps>(\n ({ children, debounceDelay = 250, ...props }: ResizableContainerProps) => {\n const containerRef = useRef<HTMLDivElement>()\n\n const lastResizeWidthRef = useRef<{ width: number; height: number }>({ width: 0, height: 0 })\n\n const [containerSize, setContainerSize]\n = useState<WrapperSize>({ width: undefined, height: undefined })\n\n const debouncedResizeWrapper = useMemo(() => debounce((entries) => {\n const newResizeWidth = entries[0].contentRect.width\n const newResizeHeight = entries[0].contentRect.height\n\n if (lastResizeWidthRef.current?.width === newResizeWidth\n && lastResizeWidthRef.current?.height === newResizeHeight) {\n return\n }\n lastResizeWidthRef.current = { width: newResizeWidth, height: newResizeHeight }\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }, debounceDelay), [debounceDelay])\n\n useLayoutEffect(() => {\n let resizeObserver: ResizeObserver\n let containerElement: HTMLElement\n\n if (containerRef?.current) {\n containerElement = containerRef?.current\n resizeObserver = new ResizeObserver(debouncedResizeWrapper)\n resizeObserver.observe(containerElement as Element)\n\n setContainerSize({\n width: containerRef?.current?.clientWidth,\n height: containerRef?.current?.clientHeight,\n })\n }\n return () => {\n resizeObserver?.unobserve?.(containerElement as Element)\n }\n }, [debouncedResizeWrapper, containerRef])\n\n // END RESIZING\n\n return (\n <FBox\n width='100%'\n height='100%'\n justify='center'\n align='center'\n direction='column'\n {...props}\n >\n <FBox\n style={styles.main}\n width='100%'\n height='100%'\n ref={containerRef as RefObject<HTMLDivElement>}\n />\n {!children && (<FBox\n width={`${Math.max(containerSize?.width || 200, 200) || 200}px`}\n height={`${Math.max(containerSize?.height || 200, 200) || 200}px`}\n style={styles.empty}\n />)}\n {children && children?.({\n height: `${containerSize?.height || 200}px`,\n width: `${containerSize?.width || 200}px`,\n measured: !!containerSize?.height,\n } as ResizableContainerRenderProps)}\n </FBox>\n )\n },\n)\n\nResizableContainer.displayName = 'ResizableContainer'\n\n"],"names":["styles","main","position","zIndex","left","pointerEvents","empty","ResizableContainer","memo","_ref","children","_ref$debounceDelay","debounceDelay","props","_objectWithoutProperties","_excluded","containerRef","useRef","lastResizeWidthRef","width","height","_useState","useState","undefined","_useState2","_slicedToArray","containerSize","setContainerSize","debouncedResizeWrapper","useMemo","debounce","entries","_lastResizeWidthRef$c","_lastResizeWidthRef$c2","_containerRef$current","_containerRef$current2","newResizeWidth","contentRect","newResizeHeight","current","clientWidth","clientHeight","useLayoutEffect","resizeObserver","containerElement","_containerRef$current3","_containerRef$current4","ResizeObserver","observe","_resizeObserver","_resizeObserver$unobs","unobserve","call","React","createElement","FBox","_extends","justify","align","direction","style","ref","concat","Math","max","measured","displayName"],"mappings":"6VAkBMA,EAAS,CACbC,KAAM,CACJC,SAAU,WACVC,OAAQ,IACRC,KAAM,EACNC,cAAe,QAGjBC,MAAO,CACLD,cAAe,SAMNE,EAAqBC,GAChC,SAAAC,GAA0E,IAAvEC,EAAQD,EAARC,SAAQC,EAAAF,EAAEG,cAAAA,OAAgB,IAAHD,EAAG,IAAGA,EAAKE,EAAKC,EAAAL,EAAAM,GAClCC,EAAeC,IAEfC,EAAqBD,EAA0C,CAAEE,MAAO,EAAGC,OAAQ,IAEzFC,EACEC,EAAsB,CAAEH,WAAOI,EAAWH,YAAQG,IAAYC,EAAAC,EAAAJ,EAAA,GADzDK,EAAaF,EAAA,GAAEG,EAAgBH,EAAA,GAGhCI,EAAyBC,GAAQ,WAAA,OAAMC,GAAS,SAACC,GAAY,IAAAC,EAAAC,EAAAC,EAAAC,EAC3DC,EAAiBL,EAAQ,GAAGM,YAAYlB,MACxCmB,EAAkBP,EAAQ,GAAGM,YAAYjB,QAEjBY,QAA1BA,EAAAd,EAAmBqB,eAAnBP,IAA0BA,OAA1BA,EAAAA,EAA4Bb,SAAUiB,IACb,QAA1BH,EAAAf,EAAmBqB,eAAO,IAAAN,OAAA,EAA1BA,EAA4Bb,UAAWkB,IAG1CpB,EAAmBqB,QAAU,CAAEpB,MAAOiB,EAAgBhB,OAAQkB,GAE9DX,EAAiB,CACfR,MAAOH,SAAqBkB,QAATA,EAAZlB,EAAcuB,eAAdL,IAAqBA,SAArBA,EAAuBM,YAC9BpB,OAAQJ,SAAqB,QAATmB,EAAZnB,EAAcuB,eAAO,IAAAJ,SAArBA,EAAuBM,eAElC,GAAE7B,KAAgB,CAACA,IAuBpB,OArBA8B,GAAgB,WACd,IAAIC,EACAC,EAEuBC,EAAAC,EAAvB9B,SAAAA,EAAcuB,UAChBK,EAAmB5B,aAAAA,EAAAA,EAAcuB,SACjCI,EAAiB,IAAII,eAAenB,IACrBoB,QAAQJ,GAEvBjB,EAAiB,CACfR,MAAOH,SAAqB6B,QAATA,EAAZ7B,EAAcuB,eAAdM,IAAqBA,SAArBA,EAAuBL,YAC9BpB,OAAQJ,SAAqB,QAAT8B,EAAZ9B,EAAcuB,eAAO,IAAAO,SAArBA,EAAuBL,gBAGnC,OAAO,WAAM,IAAAQ,EAAAC,EACG,QAAdD,EAAAN,SAAcO,IAAAD,GAAWC,QAAXA,EAAdD,EAAgBE,qBAASD,GAAzBA,EAAAE,KAAAH,EAA4BL,GAEhC,GAAG,CAAChB,EAAwBZ,IAK1BqC,MAAAC,cAACC,EAAIC,EAAA,CACHrC,MAAM,OACNC,OAAO,OACPqC,QAAQ,SACRC,MAAM,SACNC,UAAU,UACN9C,GAEJwC,MAAAC,cAACC,EAAI,CACHK,MAAO5D,EAAOC,KACdkB,MAAM,OACNC,OAAO,OACPyC,IAAK7C,KAELN,GAAa2C,MAAAC,cAACC,EAAI,CAClBpC,MAAK,GAAA2C,OAAKC,KAAKC,KAAItC,eAAAA,EAAeP,QAAS,IAAK,MAAQ,IAAQ,MAChEC,OAAM,GAAA0C,OAAKC,KAAKC,KAAItC,eAAAA,EAAeN,SAAU,IAAK,MAAQ,IAAQ,MAClEwC,MAAO5D,EAAOM,QAEfI,IAAYA,aAAQ,EAARA,EAAW,CACtBU,OAAM0C,GAAAA,QAAKpC,aAAa,EAAbA,EAAeN,SAAU,IAAO,MAC3CD,MAAK2C,GAAAA,QAAKpC,aAAa,EAAbA,EAAeP,QAAS,IAAO,MACzC8C,WAAYvC,UAAAA,EAAeN,WAInC,IAGFb,EAAmB2D,YAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fbox.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{extends as e}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as t,useMemo as i}from"react";import r from"./divider.module.scss.js";var a=t((function(e){var t=e.orientation,a=e.vertical,o=e.color,n=void 0===o?"#999999":o,l=e.opacity,c=e.length,d=void 0===c?"80%":c,s=e.left,v=void 0===s?"0":s,m=e.width,u=void 0===m?"1px":m,p=e.height,h=void 0===p?"1px":p,f=e.margin,g=e.className,y=void 0===g?"":g,N=i((function(){return"vertical"===t||!0===a}),[t,a]),j=i((function(){return{"--width":u,"--height":h,"--length":d,"--opacity":l,"--color":n,"--left":v,"--margin":f||(N?"auto 0":"0 auto")}}),[u,h,d,l,n,v,f,N]),x=N?r.vertical:r.horizontal;return React.createElement("div",{className:"".concat(r["divider-line"]," ").concat(x," ").concat(y),style:j})}));a.displayName="DividerLine";var o=t((function(t){return React.createElement(a,e({vertical:!0,length:"100%"},t))}));o.displayName="DividerVertical";var n=t((function(t){return React.createElement(a,e({length:"100%"},t))}));n.displayName="DividerHorizontal";export{n as DividerHorizontal,a as DividerLine,o as DividerVertical};
|
|
2
|
-
//# sourceMappingURL=DividerLine.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DividerLine.js","sources":["../../../../../../../../src/core/ui/components/dividers/DividerLine.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\nimport { memo, FC, CSSProperties, useMemo } from 'react'\n\nimport classes from './divider.module.scss'\n\ntype DividerProps = {\n orientation?: string\n margin?: string\n vertical?: boolean\n length?: string\n color?: string\n opacity?: number\n left?: string\n width?: string\n height?: string\n className?: string\n}\n\nexport const DividerLine: FC<DividerProps> = memo<DividerProps>(({\n orientation, vertical,\n color = '#999999',\n opacity,\n length = '80%', left = '0',\n width = '1px', height = '1px',\n margin,\n className = '',\n}: DividerProps) => {\n const isVertical = useMemo(() => orientation === 'vertical' || vertical === true, [orientation, vertical])\n\n const styles = useMemo(() => (\n {\n '--width': width,\n '--height': height,\n '--length': length,\n '--opacity': opacity,\n '--color': color,\n '--left': left,\n '--margin': margin || (isVertical ? 'auto 0' : '0 auto'),\n }\n ), [width, height, length, opacity, color, left, margin, isVertical])\n\n const verHorClass = isVertical ? classes.vertical : classes.horizontal\n\n return (\n <div\n className={`${(classes as any)['divider-line']} ${verHorClass} ${className}`}\n style={styles as CSSProperties}\n />\n )\n})\n\nDividerLine.displayName = 'DividerLine'\n\nexport const DividerVertical: FC<DividerProps>\n = memo((props) => <DividerLine vertical length='100%' {...props} />)\nDividerVertical.displayName = 'DividerVertical'\n\nexport const DividerHorizontal: FC<DividerProps>\n = memo((props) => <DividerLine length='100%' {...props} />)\nDividerHorizontal.displayName = 'DividerHorizontal'\n"],"names":["DividerLine","memo","_ref","orientation","vertical","_ref$color","color","opacity","_ref$length","length","_ref$left","left","_ref$width","width","_ref$height","height","margin","_ref$className","className","isVertical","useMemo","styles","verHorClass","classes","horizontal","React","createElement","concat","style","displayName","DividerVertical","props","_extends","DividerHorizontal"],"mappings":"4OAkBaA,EAAgCC,GAAmB,SAAAC,GAQ5C,IAPlBC,EAAWD,EAAXC,YAAaC,EAAQF,EAARE,SAAQC,EAAAH,EACrBI,MAAAA,OAAQ,IAAHD,EAAG,UAASA,EACjBE,EAAOL,EAAPK,QAAOC,EAAAN,EACPO,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAAAE,EAAAR,EAAES,KAAAA,OAAO,IAAHD,EAAG,IAAGA,EAAAE,EAAAV,EAC1BW,MAAAA,OAAQ,IAAHD,EAAG,MAAKA,EAAAE,EAAAZ,EAAEa,OAAAA,OAAS,IAAHD,EAAG,MAAKA,EAC7BE,EAAMd,EAANc,OAAMC,EAAAf,EACNgB,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAERE,EAAaC,GAAQ,WAAA,MAAsB,aAAhBjB,IAA2C,IAAbC,CAAiB,GAAE,CAACD,EAAaC,IAE1FiB,EAASD,GAAQ,WAAA,MACrB,CACE,UAAWP,EACX,WAAYE,EACZ,WAAYN,EACZ,YAAaF,EACb,UAAWD,EACX,SAAUK,EACV,WAAYK,IAAWG,EAAa,SAAW,UAChD,GACA,CAACN,EAAOE,EAAQN,EAAQF,EAASD,EAAOK,EAAMK,EAAQG,IAEnDG,EAAcH,EAAaI,EAAQnB,SAAWmB,EAAQC,WAE5D,OACEC,MAAAC,cAAA,MAAA,CACER,UAASS,GAAAA,OAAMJ,EAAgB,gBAAeI,KAAAA,OAAIL,EAAW,KAAAK,OAAIT,GACjEU,MAAOP,GAGb,IAEArB,EAAY6B,YAAc,kBAEbC,EACT7B,GAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,EAAA,CAAC5B,UAAQ,EAACK,OAAO,QAAWsB,GAAS,IACrED,EAAgBD,YAAc,sBAEjBI,EACThC,GAAK,SAAC8B,GAAK,OAAKN,MAAAC,cAAC1B,EAAWgC,EAAA,CAACvB,OAAO,QAAWsB,GAAS,IAC5DE,EAAkBJ,YAAc"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"divider.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{objectWithoutProperties as e,extends as t,typeof as n}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import a from"styled-components";import"../../../../../node_modules/core-js/modules/es.array.map.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as o,useCallback as i,useMemo as l}from"react";var c=["options","value","inputRef"],r=["label","name","type","value","defaultValue","placeholder","inputRef","error","disabled","userDisabled","withoutComponent","helpTextInfo","helpText","children","iconLeft","iconRight","addon","className","onChange","onChangeInner","onBlur","onFocus","rightIconClick","leftIconClick","options","css"],s=function(){return"#000000"},p=function(e){s=e},d=o((function(){return React.createElement("span",null)})),u=function(e){d=e},m=a.div.withConfig({displayName:"Field__FieldWrapper",componentId:"sc-i8c0jy-0"})(["opacity:",";pointer-events:",";flex:1 1 auto;width:100%;@media (min-width:400px){flex:1;}.label{font-size:0.8rem !important;font-weight:normal;}.help{text-align:left;}.mainControl{flex:1;border-radius:6px;box-shadow:0 0 6px 1px rgba(0,0,0,0.06);will-change:box-shadow;transition:box-shadow 250ms ease-in-out;&:hover{box-shadow:0 0 8px 2px rgba(0,0,0,0.1);}}button{box-shadow:0 0 8px 2px rgba(0,0,0,0.1);}.select{width:100%;flex:1;&::after{border-color:#000000 !important;}}.icon{&.is-action{cursor:pointer;pointer-events:initial !important;}}input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0;}input[type=number]{-moz-appearance:textfield;}.input[type=date]::-webkit-calendar-picker-indicator{opacity:0;-webkit-appearance:none;position:absolute;left:0;top:0;width:40px;height:100%;margin:0;padding:0;cursor:pointer;}textarea{resize:none;}"],(function(e){var t=e.disabled,n=e.userDisabled;return t||n?.5:1}),(function(e){var t=e.disabled,n=e.userDisabled;return t||n?"none":"auto"})),f=a(m).withConfig({displayName:"Field___StyledFieldWrapper",componentId:"sc-i8c0jy-1"})(["",""],(function(e){return e.$_css})),h=o((function(a){var o=a.options,i=a.value,l=a.inputRef,r=e(a,c);return React.createElement("div",{className:"select"},React.createElement("select",t({},r,{ref:l,defaultValue:i}),null==o?void 0:o.map((function(e){return React.createElement("option",{key:"".concat(JSON.stringify(e)),value:"object"===n(e)?null==e?void 0:e.value:e},"object"===n(e)?null==e?void 0:e.label:e)}))))})),b=a.input.withConfig({displayName:"Field__InputComponent",componentId:"sc-i8c0jy-2"})([""]),g=a.textarea.withConfig({displayName:"Field__TextAreaComponent",componentId:"sc-i8c0jy-3"})([""]),v=a.label.withConfig({displayName:"Field__StyledFieldLabel",componentId:"sc-i8c0jy-4"})(["text-align:left;"]),x=o((function(n){var a=n.label,o=n.name,c=n.type,p=void 0===c?"text":c,u=n.value,m=n.defaultValue,x=n.placeholder,y=n.inputRef,w=n.error,C=n.disabled,R=n.userDisabled,N=n.withoutComponent,_=n.helpTextInfo,E=n.helpText,F=n.children,I=n.iconLeft,j=n.iconRight,k=n.addon,D=n.className,B=n.onChange,T=n.onChangeInner,L=n.onBlur,V=n.onFocus,z=n.rightIconClick,S=n.leftIconClick,W=n.options,K=n.css,P=e(n,r),$=b;F||"textarea"!==p||($=g);var A=i((function(e){var t;R?null==e||null===(t=e.preventDefault)||void 0===t||t.call(e):V&&V(e)}),[R,V]),H=i((function(e){R||(T&&null!=e&&e.target?(e.target.value=T(e.target.value),B&&B(e)):B&&B(e))}),[T,B,R]),J=l((function(){return void 0===u?{defaultValue:m}:{value:u}}),[u,m]);return React.createElement(f,{className:"field ".concat(D),error:w,disabled:C,userDisabled:R,$_css:K},React.createElement(v,{htmlFor:o,className:"label"},a),React.createElement("div",{className:"field ".concat(k?"has-addons":"")},React.createElement("div",{className:"control mainControl ".concat(I&&!N?"has-icons-left":""," ").concat(j?"has-icons-right":"")},!N&&(F||"select"!==p&&!W?!F&&React.createElement($,t({name:o,id:o,ref:y,className:"input ".concat(w?"is-danger":""),type:p,placeholder:x},J,{onChange:H,onBlur:L,onFocus:A,onKeyDown:A,autoComplete:"off",disabled:C},P)):React.createElement(h,t({name:o,id:o,inputRef:y,className:"input ".concat(w?"is-danger":""),type:"select",placeholder:x,value:u,options:W,onChange:B,onBlur:L,onFocus:A,onKeyDown:A,autoComplete:"off",disabled:C},P))),I&&!N&&React.createElement("span",{className:"iconLeft icon is-small is-left ".concat(S?"is-action":""),onClick:S},React.createElement(d,{iconName:I,color:s})),j&&React.createElement("span",{className:"iconRight icon is-small is-right ".concat(z?"is-action":""),onClick:z},React.createElement(d,{iconName:j,color:s})),F&&F),k&&k),_&&React.createElement("p",{className:"help"},_),E&&React.createElement("p",{className:"help ".concat(w?"is-danger":"")},E))}));x.displayName="Field";export{x as Field,m as FieldWrapper,h as Select,p as setIconColor,u as setIconComponent};
|
|
2
|
-
//# sourceMappingURL=Field.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Field.js","sources":["../../../../../../../../src/core/ui/components/field/Field.tsx"],"sourcesContent":["/* eslint-disable react/jsx-props-no-spreading */\n/* eslint-disable jsx-a11y/no-static-element-interactions */\n/* eslint-disable jsx-a11y/click-events-have-key-events */\nimport { FC, ReactNode, memo, useMemo, useCallback, PropsWithChildren } from 'react'\nimport styled from 'styled-components'\n\nimport type { FieldError, IconComponentType } from './types'\n\nlet iconColor: string | (() => string) = () => '#000000'\n\nexport const setIconColor = (color: string | (() => string)): void => {\n iconColor = color\n}\n\nlet IconComponent: IconComponentType = memo(function IconComponent() { return <span /> })\n\nexport const setIconComponent = (component: IconComponentType): void => {\n IconComponent = component\n}\n\nexport type FileWrapperProps = PropsWithChildren<unknown> & {\n className?: string\n error?: boolean\n disabled?: boolean\n userDisabled?: boolean\n css?: string\n}\n\nexport const FieldWrapper: FC<FileWrapperProps> = styled.div<FileWrapperProps>`\n opacity: ${({ disabled, userDisabled }) => (disabled || userDisabled ? 0.5 : 1)};\n pointer-events: ${({ disabled, userDisabled }) => (disabled || userDisabled ? 'none' : 'auto')};\n flex: 1 1 auto;\n width: 100%;\n @media (min-width: 400px) {\n flex: 1;\n }\n .label {\n font-size: 0.8rem !important;\n font-weight: normal;\n }\n\n .help {\n text-align: left;\n }\n\n .mainControl {\n flex: 1;\n border-radius: 6px;\n box-shadow: 0 0 6px 1px rgba(0, 0, 0, 0.06);\n will-change: box-shadow;\n transition: box-shadow 250ms ease-in-out;\n &:hover {\n box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);\n }\n }\n button {\n box-shadow: 0 0 8px 2px rgba(0, 0, 0, 0.1);\n }\n .select {\n width: 100%;\n flex: 1;\n &::after {\n border-color: #000000 !important;\n }\n }\n\n .icon {\n &.is-action {\n cursor: pointer;\n pointer-events: initial !important;\n }\n }\n\n /* Chrome, Safari, Edge, Opera */\n input::-webkit-outer-spin-button,\n input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n }\n\n /* Firefox */\n input[type=number] {\n -moz-appearance: textfield;\n }\n\n .input[type=date]::-webkit-calendar-picker-indicator {\n opacity:0;\n -webkit-appearance: none;\n position: absolute;\n left: 0;\n top: 0;\n width: 40px;\n height: 100%;\n margin: 0;\n padding: 0;\n cursor: pointer;\n }\n\n textarea {\n resize: none;\n }\n`\n\ntype EventType = { target: any; type?: any } & Partial<Event>\nexport interface FieldProps {\n label?: string\n name?: string\n type?: string\n min?: number | string | Date | any\n max?: number | string | Date | any\n value?: string | number | readonly string[] | undefined\n defaultValue?: string | number | readonly string[] | undefined\n placeholder?: string\n inputRef?: ReactHookFormRef\n error?: boolean\n errors?: FieldError\n disabled?: boolean\n userDisabled?: boolean\n helpTextInfo?: string\n helpText?: string\n iconLeft?: string\n iconRight?: string\n withoutComponent?: boolean\n addon?: ReactNode\n children?: ReactNode\n className?: string\n onChange?: (event?: EventType) => unknown\n // TODO, rename... something like changeHandler or valueDecorator\n onChangeInner?: (value: string | number) => string | number\n onBlur?: (event?: EventType) => void\n onFocus?: (event?: EventType | undefined) => void\n rightIconClick?: (event?: EventType) => void\n leftIconClick?: (event?: EventType) => void\n options?: any[] | null\n creatable?: boolean\n async?: boolean\n css?: string\n [key: string]: any\n}\n\ninterface SelectProps extends FieldProps {\n id?: string\n}\n\ntype OptionObj = { label: string | number | undefined; value: string | number | undefined }\ntype Option = OptionObj | string | number\n\nexport const Select: FC<SelectProps>\n= memo<SelectProps>(\n function Select({ options, value, inputRef, ...props }: SelectProps) {\n return (\n <div className='select'>\n <select {...props} ref={inputRef} defaultValue={value}>\n {options?.map((option: Option) => (\n <option\n key={`${JSON.stringify(option)}`}\n value={typeof option === 'object' ? (option as OptionObj)?.value : option}\n >\n {typeof option === 'object' ? (option as OptionObj)?.label : option}\n </option>\n ))}\n </select>\n </div>\n )\n },\n)\n\nconst InputComponent = styled.input``\nconst TextAreaComponent = styled.textarea``\nconst StyledFieldLabel = styled.label`\n text-align: left;\n`\n\nexport const Field: FC<FieldProps> = memo<FieldProps>(({\n label,\n name,\n type = 'text',\n value,\n defaultValue,\n placeholder,\n inputRef,\n error,\n disabled,\n userDisabled,\n withoutComponent,\n helpTextInfo,\n helpText,\n children,\n iconLeft,\n iconRight,\n addon,\n className,\n onChange,\n onChangeInner,\n onBlur,\n onFocus,\n rightIconClick,\n leftIconClick,\n options,\n css,\n ...props\n}: FieldProps) => {\n let Component: FC<any> = InputComponent\n\n if (!children && type === 'textarea') {\n Component = TextAreaComponent\n }\n const handleFocus = useCallback((event: Event | EventType | undefined) => {\n if (userDisabled) {\n event?.preventDefault?.()\n } else {\n onFocus && onFocus(event)\n }\n }, [userDisabled, onFocus])\n\n const handleChange = useCallback((event: { target: { value: string } }) => {\n if (userDisabled) {\n return\n }\n if (onChangeInner && event?.target) {\n // eslint-disable-next-line no-param-reassign\n event.target.value = onChangeInner((event.target.value as string)) as string\n onChange && onChange(event as EventType)\n } else {\n onChange && onChange(event as EventType)\n }\n }, [onChangeInner, onChange, userDisabled])\n\n const valueProps = useMemo(() => {\n if (value === undefined) {\n return { defaultValue }\n }\n return { value }\n }, [value, defaultValue])\n\n return (\n <FieldWrapper\n className={`field ${className}`}\n error={error}\n disabled={disabled}\n userDisabled={userDisabled}\n css={css}\n >\n <StyledFieldLabel htmlFor={name} className='label'>{label}</StyledFieldLabel>\n <div className={`field ${addon ? 'has-addons' : ''}`}>\n <div\n className={`control mainControl ${iconLeft && !withoutComponent\n ? 'has-icons-left' : ''} ${iconRight ? 'has-icons-right' : ''}`}\n >\n {!withoutComponent && ((!children && (type === 'select' || options))\n ? (\n <Select\n name={name}\n id={name}\n inputRef={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type='select'\n placeholder={placeholder}\n value={value}\n options={options}\n // TODO also handle change but value versus event.target.value issue\n onChange={onChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />\n )\n : (\n !children && <Component\n name={name}\n id={name}\n ref={inputRef}\n className={`input ${error ? 'is-danger' : ''}`}\n type={type}\n placeholder={placeholder}\n {...valueProps}\n onChange={handleChange}\n onBlur={onBlur}\n onFocus={handleFocus}\n onKeyDown={handleFocus}\n autoComplete='off'\n disabled={disabled}\n {...props}\n />))}\n\n {iconLeft && !withoutComponent && (\n <span\n className={`iconLeft icon is-small is-left ${leftIconClick ? 'is-action' : ''}`}\n onClick={leftIconClick}\n >\n <IconComponent\n iconName={iconLeft}\n color={iconColor}\n />\n </span>\n )}\n {iconRight && (\n <span\n className={`iconRight icon is-small is-right ${rightIconClick ? 'is-action' : ''}`}\n onClick={rightIconClick}\n >\n <IconComponent\n iconName={iconRight}\n color={iconColor}\n />\n </span>\n )}\n {children && children}\n </div>\n {addon && addon}\n </div>\n {helpTextInfo && <p className='help'>{helpTextInfo}</p>}\n {helpText && <p className={`help ${error ? 'is-danger' : ''}`}>{helpText}</p>}\n </FieldWrapper>\n )\n})\n\nField.displayName = 'Field'\n"],"names":["iconColor","setIconColor","color","IconComponent","memo","React","createElement","setIconComponent","component","FieldWrapper","styled","div","withConfig","displayName","componentId","_ref","disabled","userDisabled","_ref2","_StyledFieldWrapper","p","$_css","Select","_ref3","options","value","inputRef","props","_objectWithoutProperties","_excluded","className","_extends","ref","defaultValue","map","option","key","concat","JSON","stringify","_typeof","label","InputComponent","input","TextAreaComponent","textarea","StyledFieldLabel","Field","_ref4","name","_ref4$type","type","placeholder","error","withoutComponent","helpTextInfo","helpText","children","iconLeft","iconRight","addon","onChange","onChangeInner","onBlur","onFocus","rightIconClick","leftIconClick","css","_excluded2","Component","handleFocus","useCallback","event","_event$preventDefault","preventDefault","call","handleChange","target","valueProps","useMemo","undefined","htmlFor","id","onKeyDown","autoComplete","onClick","iconName"],"mappings":"krBAQIA,EAAqC,WAAA,MAAM,SAAS,EAE3CC,EAAe,SAACC,GAC3BF,EAAYE,CACd,EAEIC,EAAmCC,GAAK,WAA2B,OAAOC,MAAAC,cAAQ,OAAA,KAAC,IAE1EC,EAAmB,SAACC,GAC/BL,EAAgBK,CAClB,EAUaC,EAAqCC,EAAOC,IAAGC,WAAA,CAAAC,YAAA,sBAAAC,YAAA,eAA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CAAGwB,kBAASO,OAAUgB,EAAQ,YAAc,KAAOG,GAGtE,IAEAT,EAAMlC,YAAc"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as a}from"react";var e=a((function(a){var e=a.icon,o=a.className,c=a.color,n=void 0===c?"currentColor":c;return React.createElement("svg",{"aria-hidden":"true",focusable:"false","data-prefix":e.prefix,"data-icon":e.iconName,className:"svg-inline--fa fa-".concat(e.iconName," ").concat(o),role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(e.icon[0]," ").concat(e.icon[1])},React.createElement("path",{fill:n,d:e.icon[4]}))}));e.displayName="Icon";export{e as Icon};
|
|
2
|
-
//# sourceMappingURL=Icon.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../../../../../../src/core/ui/components/icon/Icon.tsx"],"sourcesContent":["import { memo } from 'react'\n\ntype IconType = {\n icon: {\n prefix: string\n iconName: string\n icon: any[]\n }\n className?: string\n color?: string\n}\n\nexport const Icon = memo<IconType>(({ icon, className, color = 'currentColor' }: IconType) => (\n <svg\n aria-hidden='true'\n focusable='false'\n data-prefix={icon.prefix}\n data-icon={icon.iconName}\n className={`svg-inline--fa fa-${icon.iconName} ${className}`}\n role='img'\n xmlns='http://www.w3.org/2000/svg'\n viewBox={`0 0 ${icon.icon[0]} ${icon.icon[1]}`}\n >\n <path\n fill={color}\n d={icon.icon[4]}\n />\n </svg>\n))\n\nIcon.displayName = 'Icon'\n"],"names":["Icon","memo","_ref","icon","className","_ref$color","color","React","createElement","focusable","prefix","iconName","concat","role","xmlns","viewBox","fill","d","displayName"],"mappings":"wGAYaA,EAAOC,GAAe,SAAAC,GAAA,IAAGC,EAAID,EAAJC,KAAMC,EAASF,EAATE,UAASC,EAAAH,EAAEI,MAAAA,OAAQ,IAAHD,EAAG,eAAcA,EAAA,OAC3EE,MAAAC,cAAA,MAAA,CACE,cAAY,OACZC,UAAU,QACV,cAAaN,EAAKO,OAClB,YAAWP,EAAKQ,SAChBP,UAAS,qBAAAQ,OAAuBT,EAAKQ,SAAQC,KAAAA,OAAIR,GACjDS,KAAK,MACLC,MAAM,6BACNC,eAAOH,OAAST,EAAKA,KAAK,GAAE,KAAAS,OAAIT,EAAKA,KAAK,KAE1CI,MAAAC,cAAA,OAAA,CACEQ,KAAMV,EACNW,EAAGd,EAAKA,KAAK,KAEX,IAGRH,EAAKkB,YAAc"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{objectWithoutProperties as o,objectSpread2 as e,extends as t}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import{memo as i,useMemo as n}from"react";import r from"./icon.module.scss.js";var c=["iconUrl","minWidth","minHeight","size","fontSize","width","height","color","className","children","style"],s=i((function(i){var s=i.iconUrl,a=i.minWidth,l=i.minHeight,m=i.size,h=i.fontSize,d=i.width,u=i.height,p=i.color,f=void 0===p?"currentColor":p,g=i.className,j=void 0===g?"":g,b=i.children,v=i.style,y=o(i,c),z=n((function(){return e(e(e(e({"--min-width":a||m||d||"auto","--min-height":l||m||u||"auto","--width":m||d,"--height":m||u},h?{fontSize:h}:{}),s?{"--icon-url":"url(".concat(s,")")}:{}),s?{"--icon-color":f}:{"--icon-content-color":f}),v)}),[a,m,d,l,u,h,s,f,v]);return React.createElement("span",t({},y,{className:"".concat(r["icon-base"]," icon-base ").concat(j),style:z}),!s&&b&&b)}));s.displayName="IconBase";export{s as IconBase};
|
|
2
|
-
//# sourceMappingURL=IconBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconBase.js","sources":["../../../../../../../../src/core/ui/components/icon/IconBase.tsx"],"sourcesContent":["import { CSSProperties, memo, useMemo, FC, PropsWithChildren } from 'react'\n\nimport classes from './icon.module.scss'\n\nexport type IconBaseType = PropsWithChildren<unknown> & {\n id?: string\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n style?: CSSProperties\n}\n\nexport const IconBase: FC<IconBaseType> = memo<IconBaseType>(({\n iconUrl, minWidth, minHeight, size,\n fontSize, width, height, color = 'currentColor', className = '', children, style, ...props\n}: IconBaseType) => {\n const styles = useMemo(() => (\n {\n '--min-width': minWidth || size || width || 'auto',\n '--min-height': minHeight || size || height || 'auto',\n '--width': size || width,\n '--height': size || height,\n ...(fontSize ? { fontSize } : {}),\n ...(iconUrl ? { '--icon-url': `url(${iconUrl})` } : {}),\n ...(iconUrl ? { '--icon-color': color } : { '--icon-content-color': color }),\n ...style,\n }\n ), [minWidth, size, width, minHeight, height, fontSize, iconUrl, color, style])\n\n return (\n <span\n {...props}\n className={`${(classes as any)['icon-base']} icon-base ${className}`}\n style={styles as CSSProperties}\n >\n {(!iconUrl && children) && children}\n </span>\n )\n})\n\nIconBase.displayName = 'IconBase'\n"],"names":["IconBase","memo","_ref","iconUrl","minWidth","minHeight","size","fontSize","width","height","_ref$color","color","_ref$className","className","children","style","props","_objectWithoutProperties","_excluded","styles","useMemo","_objectSpread","concat","React","createElement","_extends","classes","displayName"],"mappings":"wYAkBaA,EAA6BC,GAAmB,SAAAC,GAGzC,IAFlBC,EAAOD,EAAPC,QAASC,EAAQF,EAARE,SAAUC,EAASH,EAATG,UAAWC,EAAIJ,EAAJI,KAC9BC,EAAQL,EAARK,SAAUC,EAAKN,EAALM,MAAOC,EAAMP,EAANO,OAAMC,EAAAR,EAAES,MAAAA,OAAQ,IAAHD,EAAG,eAAcA,EAAAE,EAAAV,EAAEW,UAAAA,OAAY,IAAHD,EAAG,GAAEA,EAAEE,EAAQZ,EAARY,SAAUC,EAAKb,EAALa,MAAUC,EAAKC,EAAAf,EAAAgB,GAEpFC,EAASC,GAAQ,WAAA,OAAAC,EAAAA,EAAAA,EAAAA,EAAA,CAEnB,cAAejB,GAAYE,GAAQE,GAAS,OAC5C,eAAgBH,GAAaC,GAAQG,GAAU,OAC/C,UAAWH,GAAQE,EACnB,WAAYF,GAAQG,GAChBF,EAAW,CAAEA,SAAAA,GAAa,CAAA,GAC1BJ,EAAU,CAAE,aAAY,OAAAmB,OAASnB,EAAO,MAAQ,CAAA,GAChDA,EAAU,CAAE,eAAgBQ,GAAU,CAAE,uBAAwBA,IACjEI,EAEN,GAAE,CAACX,EAAUE,EAAME,EAAOH,EAAWI,EAAQF,EAAUJ,EAASQ,EAAOI,IAExE,OACEQ,MAAAC,cAAAC,OAAAA,KACMT,EAAK,CACTH,UAAS,GAAAS,OAAMI,EAAgB,aAAYJ,eAAAA,OAAcT,GACzDE,MAAOI,KAEJhB,GAAWW,GAAaA,EAGjC,IAEAd,EAAS2B,YAAc"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{inherits as e,createSuper as t,createClass as i,classCallCheck as n,objectSpread2 as s,slicedToArray as o,wrapNativeSuper as r}from"../../../../../_virtual/_rollupPluginBabelHelpers.js";import"../../../../../node_modules/core-js/modules/es.array.concat.js";import"../../../../../node_modules/core-js/modules/es.array.map.js";import"../../../../../node_modules/core-js/modules/es.object.entries.js";import{ced as a,resolveAttributes as c}from"../../../utils/webComponents/webComponent.utils.js";import l from"./icon.module.scss.js";var m,h=document.createElement("template");h.innerHTML='<span class="icon-base"></span>';var d=a("icon-base")(m=function(r){e(m,r);var a=t(m);function m(){var e;n(this,m);for(var t=arguments.length,i=new Array(t),r=0;r<t;r++)i[r]=arguments[r];return(e=a.call.apply(a,[this].concat(i))).content=void 0,e.mainElement=void 0,e.iconUrl=void 0,e.minWidth=void 0,e.minHeight=void 0,e.width=void 0,e.height=void 0,e.size=void 0,e.fontSize=void 0,e.color=void 0,e.render=function(){if(e.mainElement=e.mainElement||e.querySelector(".icon-base"),e.mainElement){e.classList.add(l["icon-base-parent"]),e.mainElement.classList.add(l["icon-base"]);var t=s(s(s({"--min-width":e.minWidth||e.size||e.width||"auto","--min-height":e.minHeight||e.size||e.height||"auto","--width":e.size||e.width,"--height":e.size||e.height},e.fontSize?{"font-size":e.fontSize||"unset"}:{}),e.iconUrl?{"--icon-url":"url(".concat(e.iconUrl,")")}:{}),e.iconUrl?{"--icon-color":e.color}:{"--icon-content-color":e.color});e.mainElement.innerHTML=e.iconUrl?"":e.content||"",e.mainElement.setAttribute("style",Object.entries(t).map((function(e){var t=o(e,2),i=t[0],n=t[1];return"".concat(i,": ").concat(n,";")})).join(" "))}},e}return i(m,[{key:"connectedCallback",value:function(){this.innerHTML&&(this.content=this.content||this.innerHTML||this.getAttribute("content")),this.innerHTML=h.innerHTML,c(this,m.observedAttributes),this.render()}},{key:"attributeChangedCallback",value:function(e,t,i){"className"===e&&(this.className=i||"",this.className&&(this.classList.remove(this.className),this.classList.add(this.className))),this[e]=i,this.render()}}],[{key:"observedAttributes",get:function(){return["iconUrl","minWidth","minHeight","width","height","size","fontSize","color","className"]}}]),m}(r(HTMLElement)))||m,u={IconWC:d};export{d as IconWC,u as IconWCBase};
|
|
2
|
-
//# sourceMappingURL=IconWC.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IconWC.js","sources":["../../../../../../../../src/core/ui/components/icon/IconWC.ts"],"sourcesContent":["import { ced, resolveAttributes } from '../../../utils/webComponents/webComponent.utils'\n\nimport classes from './icon.module.scss'\n\n\n\nconst template = document.createElement('template')\n\ntemplate.innerHTML = '<span class=\"icon-base\"></span>'\n\nexport type IconBaseWCType = {\n iconUrl?: string\n minWidth?: string\n minHeight?: string\n width?: string\n height?: string\n size?: string\n fontSize?: string\n color?: string\n className?: string\n}\n\n@ced('icon-base')\nexport class IconWC extends HTMLElement {\n content: string | null\n\n mainElement: HTMLElement\n\n iconUrl?: string | null\n\n minWidth?: string | null\n\n minHeight?: string | null\n\n width?: string | null\n\n height?: string | null\n\n size?: string | null\n\n fontSize?: string | null\n\n color?: string | null\n\n static get observedAttributes() {\n return ['iconUrl', 'minWidth', 'minHeight', 'width', 'height', 'size', 'fontSize', 'color', 'className']\n }\n\n connectedCallback() {\n if (this.innerHTML) {\n this.content = this.content || this.innerHTML || this.getAttribute('content')\n }\n\n this.innerHTML = template.innerHTML\n\n resolveAttributes(this, IconWC.observedAttributes)\n\n this.render()\n }\n\n attributeChangedCallback(attrName: string, oldVal: string | number | null, newVal: string | number | null) {\n if (attrName === 'className') {\n this.className = (newVal as string) || ''\n if (this.className) {\n this.classList.remove(this.className)\n this.classList.add(this.className)\n }\n }\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore\n this[attrName] = newVal\n this.render()\n }\n\n render = () => {\n this.mainElement = this.mainElement || this.querySelector('.icon-base') as HTMLElement\n if (!this.mainElement) {\n return\n }\n this.classList.add(classes['icon-base-parent'])\n this.mainElement.classList.add(classes['icon-base'])\n\n const styles = {\n '--min-width': this.minWidth || this.size || this.width || 'auto',\n '--min-height': this.minHeight || this.size || this.height || 'auto',\n '--width': this.size || this.width,\n '--height': this.size || this.height,\n ...(this.fontSize ? { 'font-size': this.fontSize || 'unset' } : {}),\n ...(this.iconUrl ? { '--icon-url': `url(${this.iconUrl})` } : {}),\n ...(this.iconUrl ? { '--icon-color': this.color } : { '--icon-content-color': this.color }),\n }\n\n this.mainElement.innerHTML = this.iconUrl ? '' : (this.content || '')\n\n this.mainElement.setAttribute('style', Object.entries(styles).map(([key, value]) => `${key}: ${value};`).join(' '))\n }\n}\n\ndeclare global {\n // eslint-disable-next-line @typescript-eslint/no-namespace\n namespace JSX {\n interface IntrinsicElements {\n 'icon-base': any\n }\n }\n}\n\nexport const IconWCBase = {\n IconWC,\n}\n"],"names":["template","document","createElement","innerHTML","IconWC","ced","_dec","_class","_HTMLElement","_inherits","_super","_createSuper","_this","_classCallCheck","_len","arguments","length","args","Array","_key","call","apply","this","concat","content","mainElement","iconUrl","minWidth","minHeight","width","height","size","fontSize","color","render","querySelector","classList","add","classes","styles","_objectSpread","setAttribute","Object","entries","map","_ref","_ref2","_slicedToArray","key","value","join","_createClass","getAttribute","resolveAttributes","observedAttributes","attrName","oldVal","newVal","className","remove","get","_wrapNativeSuper","HTMLElement","IconWCBase"],"mappings":"giBAMMA,EAAWC,SAASC,cAAc,YAExCF,EAASG,UAAY,kCAcrB,IACaC,EADZC,EAAI,YAAYC,CAAAC,WAAAC,GAAAC,EAAAL,EAAAI,GAAA,IAAAE,EAAAC,EAAAP,GAAA,SAAAA,IAAA,IAAAQ,EAAAC,OAAAT,GAAA,IAAA,IAAAU,EAAAC,UAAAC,OAAAC,EAAAC,IAAAA,MAAAJ,GAAAK,EAAA,EAAAA,EAAAL,EAAAK,IAAAF,EAAAE,GAAAJ,UAAAI,GAyEd,OAzEcP,EAAAF,EAAAU,KAAAC,MAAAX,EAAA,CAAAY,MAAAC,OAAAN,KAEfO,aAAO,EAAAZ,EAEPa,iBAAW,EAAAb,EAEXc,aAAO,EAAAd,EAEPe,cAAQ,EAAAf,EAERgB,eAAS,EAAAhB,EAETiB,WAAK,EAAAjB,EAELkB,YAAM,EAAAlB,EAENmB,UAAI,EAAAnB,EAEJoB,cAAQ,EAAApB,EAERqB,WAAK,EAAArB,EAgCLsB,OAAS,WAEP,GADAtB,EAAKa,YAAcb,EAAKa,aAAeb,EAAKuB,cAAc,cACrDvB,EAAKa,YAAV,CAGAb,EAAKwB,UAAUC,IAAIC,EAAQ,qBAC3B1B,EAAKa,YAAYW,UAAUC,IAAIC,EAAQ,cAEvC,IAAMC,EAAMC,EAAAA,EAAAA,EAAA,CACV,cAAe5B,EAAKe,UAAYf,EAAKmB,MAAQnB,EAAKiB,OAAS,OAC3D,eAAgBjB,EAAKgB,WAAahB,EAAKmB,MAAQnB,EAAKkB,QAAU,OAC9D,UAAWlB,EAAKmB,MAAQnB,EAAKiB,MAC7B,WAAYjB,EAAKmB,MAAQnB,EAAKkB,QAC1BlB,EAAKoB,SAAW,CAAE,YAAapB,EAAKoB,UAAY,SAAY,CAAE,GAC9DpB,EAAKc,QAAU,CAAE,aAAYH,OAAAA,OAASX,EAAKc,Q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ules/es.array.concat.js";import"../../../../node_modules/core-js/modules/es.object.to-string.js";import"../../../../node_modules/core-js/modules/es.regexp.to-string.js";import"../../../../node_modules/core-js/modules/es.string.pad-start.js";import"../../../../node_modules/core-js/modules/es.regexp.exec.js";import"../../../../node_modules/core-js/modules/es.string.replace.js";import"../../../../node_modules/core-js/modules/es.parse-int.js";import"../../../../node_modules/core-js/modules/es.array.index-of.js";import"../../../../node_modules/core-js/modules/es.array.map.js";var e=16,t=function(t){e=t},o=function(t){return t/e},r=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"rem";return"string"==typeof e?e:"px"===t?"".concat(o(e),"rem"):"".concat(e).concat(t)},n=function(e){return(e=e.toString(16)).padStart(2,"0")},s=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=e.replace("#",""),s=r.substring(0,2),c=r.substring(2,4),a=r.substring(4,6),u=parseInt(s,16),i=parseInt(c,16),d=parseInt(a,16),m=t<=1?t:t/100;return(o?"rgba(".concat(u,",").concat(i,",").concat(d,",").concat(m,")"):"#".concat(s).concat(c).concat(a).concat(n(Math.round(255*(t<=1?t:t/100))))).toLowerCase()},c=function(e,t,o,r){return"#".concat(n(e)).concat(n(t)).concat(n(o)).concat(n(Math.round(255*(r<=1?r:r/100))))},a=function(e,t){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:.5;0===e.indexOf("#")&&(e=e.substr(1)),0===t.indexOf("#")&&(t=t.substr(1));var r=Math.ceil(parseInt(t.substring(0,2),16)*o+parseInt(e.substring(0,2),16)*(1-o)),s=Math.ceil(parseInt(t.substring(2,4),16)*o+parseInt(e.substring(2,4),16)*(1-o)),c=Math.ceil(parseInt(t.substring(4,6),16)*o+parseInt(e.substring(4,6),16)*(1-o));return"#".concat(n(r)+n(s)+n(c))},u=function(e,t){for(var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,r=o/(o+1)/o,n=[],s=r;o--;)n.push(s),s+=r;return n.map((function(o){return a(e,t,o)}))};export{u as calculateColors,a as calculatePercColor,s as convertHex,c as convertRGB,e as defaultFontSize,o as pxToRem,r as resolveStyleValue,t as setDefaultFontSize,n as toHex};
|
|
2
|
-
//# sourceMappingURL=style.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../../../../../src/core/ui/utils/style.ts"],"sourcesContent":["// eslint-disable-next-line import/no-mutable-exports\nexport let defaultFontSize = 16\nexport const setDefaultFontSize = (fontSize: number) => {\n defaultFontSize = fontSize\n}\n\nexport const pxToRem = (px: number): number => px / defaultFontSize\n\nexport const resolveStyleValue = (\n value: string | number,\n units = 'rem',\n): string => {\n if (typeof value === 'string') {\n return value as string\n }\n\n if (units === 'px') {\n return `${pxToRem(value)}rem`\n }\n\n return `${value}${units}`\n}\n\n/* eslint-disable no-param-reassign */\nexport const toHex = (x: number | string): string => {\n x = x.toString(16)\n return x.padStart(2, '0')\n}\n\nexport const convertHex = (hex: string, opacity: number, rgba = false): string => {\n const hexValue = hex.replace('#', '')\n const rValue = hexValue.substring(0, 2)\n const gValue = hexValue.substring(2, 4)\n const bValue = hexValue.substring(4, 6)\n const r = parseInt(rValue, 16)\n const g = parseInt(gValue, 16)\n const b = parseInt(bValue, 16)\n\n const a = opacity <= 1 ? opacity : (opacity / 100)\n\n return (rgba\n ? `rgba(${r},${g},${b},${a})`\n : `#${rValue}${gValue}${bValue}${toHex(Math.round((opacity <= 1 ? opacity : (opacity / 100)) * 255))}`)\n .toLowerCase()\n}\n\nexport const convertRGB = (\n r: number, g: number, b: number, opacity: number,\n): string => `#${toHex(r)}${toHex(g)}${toHex(b)}${toHex(Math.round((opacity <= 1 ? opacity : (opacity / 100)) * 255))}`\n\nexport const calculatePercColor = (startColor: string, endColor: string, ratio = 0.5): string => {\n if (startColor.indexOf('#') === 0) {\n startColor = startColor.substr(1)\n }\n if (endColor.indexOf('#') === 0) {\n endColor = endColor.substr(1)\n }\n\n const r = Math.ceil(parseInt(endColor.substring(0, 2), 16) * ratio\n + parseInt(startColor.substring(0, 2), 16) * (1 - ratio))\n const g = Math.ceil(parseInt(endColor.substring(2, 4), 16) * ratio\n + parseInt(startColor.substring(2, 4), 16) * (1 - ratio))\n const b = Math.ceil(parseInt(endColor.substring(4, 6), 16) * ratio\n + parseInt(startColor.substring(4, 6), 16) * (1 - ratio))\n\n return `#${toHex(r) + toHex(g) + toHex(b)}`\n}\n\nexport const calculateColors = (startColor: string, endColor: string, num = 10): string[] => {\n const ratioIterator = (num / (num + 1)) / num\n const ratios = []\n let ratio = ratioIterator\n\n // eslint-disable-next-line no-plusplus\n while (num--) {\n ratios.push(ratio)\n ratio += ratioIterator\n }\n\n return ratios.map((rat) => calculatePercColor(startColor, endColor, rat))\n}\n"],"names":["defaultFontSize","setDefaultFontSize","fontSize","pxToRem","px","resolveStyleValue","value","units","arguments","length","undefined","concat","toHex","x","toString","padStart","convertHex","hex","opacity","rgba","hexValue","replace","rValue","substring","gValue","bValue","r","parseInt","g","b","a","Math","round","toLowerCase","convertRGB","calculatePercColor","startColor","endColor","ratio","indexOf","substr","ceil","calculateColors","num","ratioIterator","ratios","push","map","rat"],"mappings":"6mBACO,IAAIA,EAAkB,GAChBC,EAAqB,SAACC,GACjCF,EAAkBE,CACpB,EAEaC,EAAU,SAACC,GAAU,OAAaA,EAAKJ,CAAe,EAEtDK,EAAoB,SAC/BC,GAEW,IADXC,EAAKC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,MAER,MAAqB,iBAAVF,EACFA,EAGK,OAAVC,EACF,GAAAI,OAAUR,EAAQG,GAAM,OAG1B,GAAAK,OAAUL,GAAKK,OAAGJ,EACpB,EAGaK,EAAQ,SAACC,GAEpB,OADAA,EAAIA,EAAEC,SAAS,KACNC,SAAS,EAAG,IACvB,EAEaC,EAAa,SAACC,EAAaC,GAA0C,IAAzBC,EAAIX,UAAAC,OAAA,QAAAC,IAAAF,UAAA,IAAAA,UAAA,GACrDY,EAAWH,EAAII,QAA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AAU,EAAG,GAAI,KAAO,EAAIe,IAEpD,MAAA,IAAA3B,OAAWC,EAAMc,GAAKd,EAAMgB,GAAKhB,EAAMiB,GACzC,EAEaa,EAAkB,SAACN,EAAoBC,GAMlD,IAN2F,IAAvBM,EAAGnC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAG,GACpEoC,EAAiBD,GAAOA,EAAM,GAAMA,EACpCE,EAAS,GACXP,EAAQM,EAGLD,KACLE,EAAOC,KAAKR,GACZA,GAASM,EAGX,OAAOC,EAAOE,KAAI,SAACC,GAAG,OAAKb,EAAmBC,EAAYC,EAAUW,KACtE"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { memo, useMemo, forwardRef } from 'react';
|
|
3
|
-
import classes from './fbox.module.scss';
|
|
4
|
-
const flexValueMap = {
|
|
5
|
-
start: 'flex-start',
|
|
6
|
-
'flex-start': 'flex-start',
|
|
7
|
-
end: 'flex-end',
|
|
8
|
-
'flex-end': 'flex-end',
|
|
9
|
-
};
|
|
10
|
-
const resolveFlexProps = (value) => (value ? (flexValueMap[value] || value) : value);
|
|
11
|
-
const FBoxRefForwarded = forwardRef(({ style, children, tabIndex, className = '', ...props }, ref) => {
|
|
12
|
-
const [restProps, cssProps] = useMemo(() => {
|
|
13
|
-
const restProps = {};
|
|
14
|
-
const cssProps = {};
|
|
15
|
-
Object.entries(props).forEach(([key, value]) => {
|
|
16
|
-
if (key.substr(0, 4) === 'data') {
|
|
17
|
-
restProps[key] = value;
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
20
|
-
cssProps[key] = value;
|
|
21
|
-
}
|
|
22
|
-
});
|
|
23
|
-
return [restProps, cssProps];
|
|
24
|
-
}, [props]);
|
|
25
|
-
const styles = useMemo(() => ({
|
|
26
|
-
...cssProps,
|
|
27
|
-
...(cssProps.align ? { alignItems: resolveFlexProps(cssProps.align) } : {}),
|
|
28
|
-
...(cssProps.justify ? { justifyContent: resolveFlexProps(cssProps.justify) } : {}),
|
|
29
|
-
...(cssProps.direction ? { flexDirection: cssProps.direction } : {}),
|
|
30
|
-
...style,
|
|
31
|
-
}), [cssProps, style]);
|
|
32
|
-
return (_jsx("div", { ref: ref, tabIndex: tabIndex, className: `${classes['flexible-box']} ${className}`, style: styles, ...restProps, children: children }));
|
|
33
|
-
});
|
|
34
|
-
FBoxRefForwarded.displayName = 'FBoxRefForwarded';
|
|
35
|
-
export const FBox = memo(FBoxRefForwarded);
|
|
36
|
-
FBox.displayName = 'FBox';
|
|
37
|
-
//# sourceMappingURL=FBox.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FBox.js","sourceRoot":"","sources":["../../../../../../../src/core/ui/components/container/FBox.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAyB,OAAO,EAAiB,UAAU,EAAa,MAAM,OAAO,CAAA;AAGlG,OAAO,OAAO,MAAM,oBAAoB,CAAA;AA6BxC,MAAM,YAAY,GAA2B;IAC3C,KAAK,EAAE,YAAY;IACnB,YAAY,EAAE,YAAY;IAC1B,GAAG,EAAE,UAAU;IACf,UAAU,EAAE,UAAU;CACvB,CAAA;AAED,MAAM,gBAAgB,GAAG,CAAC,KAAc,EAAsB,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;AAGjH,MAAM,gBAAgB,GAAG,UAAU,CAAC,CAAC,EACnC,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,SAAS,GAAG,EAAE,EAAE,GAAG,KAAK,EACzC,EAAE,GAA0C,EAAE,EAAE;IAC1D,MAAM,CAAC,SAAS,EAAE,QAAQ,CAAC,GAAG,OAAO,CAAC,GAAG,EAAE;QACzC,MAAM,SAAS,GAA4B,EAAE,CAAA;QAC7C,MAAM,QAAQ,GAA4B,EAAE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