dt-shared-front 1.0.16 → 1.0.18

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.
@@ -25,5 +25,5 @@ interface IButtonProps {
25
25
  type?: 'button' | 'submit' | 'reset';
26
26
  onClick?: (e?: MouseEvent<HTMLButtonElement>) => void;
27
27
  }
28
- export declare const Button: ({ variant, size, iconPosition, width, icon: Icon, loading, disabled, children, className, onClick, type, }: PropsWithChildren<IButtonProps>) => JSX.Element;
28
+ export declare const Button: ({ width, icon: Icon, loading, disabled, children, onClick, type, }: PropsWithChildren<IButtonProps>) => JSX.Element;
29
29
  export {};
@@ -54,4 +54,4 @@ export declare const Input: React.ForwardRefExoticComponent<{
54
54
  onPointerUp?: (e: any) => void;
55
55
  onChange?: (value: string, event: ChangeEvent<HTMLInputElement>) => void;
56
56
  onSearch?: ((val: string) => void) | ((val: string) => Promise<void>);
57
- } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "variant" | "size" | "onChange"> & React.RefAttributes<HTMLInputElement>>;
57
+ } & Omit<React.InputHTMLAttributes<HTMLInputElement>, "onChange" | "size" | "variant"> & React.RefAttributes<HTMLInputElement>>;
@@ -25,4 +25,4 @@ export declare const TextArea: React.ForwardRefExoticComponent<{
25
25
  onClear?: () => void;
26
26
  onSearch?: (e: any) => void;
27
27
  onChange?: (value: string, event?: ChangeEvent<HTMLTextAreaElement>) => void;
28
- } & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "variant" | "size" | "onChange"> & React.RefAttributes<HTMLTextAreaElement>>;
28
+ } & Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "onChange" | "size" | "variant"> & React.RefAttributes<HTMLTextAreaElement>>;
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- exports["dt-shared-front"]=function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=3)}([function(t,e){t.exports=require("react")},function(t,e){t.exports={button:"X-qXAjOlRK-MvEYzf+vJhw==",button__smallS:"eulj795QGDKOUqnlkwRcjg==",button__small:"kA9VI1+kphZMg+k4vwaA0A==",withIcon:"J7ifRezUPIpp0n8u5ey6eA==",button__medium:"E71L1YsDYOk9r7JoN8iRtA==",button__large:"PG1dRW1+2uEbSJL4AczvWA==",button__default:"mYOHniHZN+wzW6HIbZsnIg==",button__secondary:"bPOB9hdxMHyvlNMblpaD2w==",button__icon_left:"EzgVgoT-fH3ME93vMPlWkQ==",button__icon_right:"uPFlSZFrv33G6Syy-kE8BQ==",loading:"IZ3gtInjJxgFyjTmoON+MA==",icon:"Gso9o47aQw7gpIb6flgPow==",icon__smallS:"BQwBbNv+45pKaoDXKLrnZQ==",icon__small:"SgRrCfWD7dbhNcWRDLF41w==",icon__medium:"_3L-IQ9YS+6jmHw0pc6ZnCQ==",icon__large:"WSggmWymdxGEd6uWzS8iPA==",icon__default:"MzXx8SzLHp6qmfyu-p4HIA==",icon__secondary:"n0RQniAXmk-2hu5UTGAkCA==",icon__only:"fpWXxEzExVJNFtiBu-YVhA==",loader:"v14UEAGpVOAxK8oK9tZ32g==",loader__medium:"_7pr9vlHwvaNj0kihq3zwcQ==",loader__large:"S4tzpabhSuMX6nxSoa3cxQ==",loader__default:"_5X5UT-TFHZe-BiWWUwq7og=="}},function(t,e){t.exports=require("classnames")},function(t,e,n){"use strict";n.r(e);var o,r,a,i=n(0),l=n.n(i),c=n(2),u=n.n(c);function s(){return(s=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t}).apply(this,arguments)}var d,_,f,m=function(t){return i.createElement("svg",s({width:20,height:20,fill:"none",xmlns:"http://www.w3.org/2000/svg"},t),o||(o=i.createElement("path",{d:"M17 10a7 7 0 11-2.706-5.528c.382.296.379.855.037 1.197-.342.342-.892.335-1.286.054A5.25 5.25 0 1015.25 10H17z",fill:"url(#button-loader_svg__paint0_linear)"},i.createElement("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 10 10",to:"360 10 10",dur:"0.75s",repeatCount:"indefinite"}))),r||(r=i.createElement("path",{d:"M17 10a7 7 0 11-2.706-5.528c.382.296.379.855.037 1.197-.342.342-.892.335-1.286.054A5.25 5.25 0 1015.25 10H17z",fill:"url(#button-loader_svg__paint1_linear)"},i.createElement("animateTransform",{attributeType:"xml",attributeName:"transform",type:"rotate",from:"0 10 10",to:"360 10 10",dur:"0.75s",repeatCount:"indefinite"}))),a||(a=i.createElement("defs",null,i.createElement("linearGradient",{id:"button-loader_svg__paint0_linear",x1:14.5,y1:5.5,x2:16.5,y2:10,gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"currentColor"}),i.createElement("stop",{offset:1,stopColor:"currentColor",stopOpacity:0})),i.createElement("linearGradient",{id:"button-loader_svg__paint1_linear",x1:10,y1:16,x2:17,y2:9.5,gradientUnits:"userSpaceOnUse"},i.createElement("stop",{stopColor:"currentColor"}),i.createElement("stop",{offset:1,stopColor:"currentColor",stopOpacity:0})))))},p=n(1),b=n.n(p);!function(t){t.smallS="smallS",t.small="small",t.medium="medium",t.large="large"}(d||(d={})),function(t){t.default="default",t.secondary="secondary"}(_||(_={})),function(t){t.left="left",t.right="right"}(f||(f={}));var g=function(t){var e=t.variant,n=void 0===e?_.default:e,o=t.size,r=void 0===o?d.medium:o,a=t.iconPosition,c=void 0===a?f.right:a,s=t.width,p=t.icon,g=t.loading,y=t.disabled,v=t.children,h=t.className,O=t.onClick,x=t.type,E=void 0===x?"button":x,w=Object(i.useMemo)((function(){var t;return u()(b.a.button,h,b.a["button__".concat(n)],b.a["button__".concat(r)],b.a["button__icon_".concat(c)],((t={})[b.a.loading]=g,t[b.a.withIcon]=p,t))}),[n,r,g,p,y,h]),S=Object(i.useMemo)((function(){return u()(b.a.loader,b.a["loader__".concat(n)],b.a["loader__".concat(r)])}),[n,r]),j=Object(i.useMemo)((function(){var t;return u()(b.a.icon,b.a["icon__".concat(n)],b.a["icon__".concat(r)],((t={})[b.a.icon__only]=!v,t))}),[n,r,v]),A=Object(i.useCallback)((function(t){y||g||O&&O(t)}),[O,y,g]);return l.a.createElement("button",{type:E,className:w,disabled:y,onClick:A,style:{width:s}},v,p&&l.a.createElement(p,{className:j}),g&&l.a.createElement(m,{className:S}))};n.d(e,"Button",(function(){return g}))}]);
2
- //# sourceMappingURL=index.js.map
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["dt-shared-front"]=t():e["dt-shared-front"]=t()}(this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(e,t){e.exports=require("react")},function(e,t,n){"use strict";n.r(t);var r,o,u,i=n(0),l=n.n(i);!function(e){e.smallS="smallS",e.small="small",e.medium="medium",e.large="large"}(r||(r={})),function(e){e.default="default",e.secondary="secondary"}(o||(o={})),function(e){e.left="left",e.right="right"}(u||(u={}));var f=function(e){var t=e.width,n=e.icon,r=e.loading,o=e.disabled,u=e.children,f=e.onClick,c=e.type,a=void 0===c?"button":c,d=Object(i.useCallback)((function(e){o||r||f&&f(e)}),[f,o,r]);return l.a.createElement("button",{type:a,disabled:o,onClick:d,style:{width:t}},u,n&&l.a.createElement(n,null))};n.d(t,"Button",(function(){return f}))}])}));
2
+ //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["webpack://dt-shared-front/webpack/bootstrap","webpack://dt-shared-front/external \"react\"","webpack://dt-shared-front/./src/components/button/button.module.scss","webpack://dt-shared-front/external \"classnames\"","webpack://dt-shared-front/./src/components/icon/icons/button-loader.svg","webpack://dt-shared-front/./src/components/button/button.tsx","webpack://dt-shared-front/./src/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","require","_path","_path2","_defs","_extends","assign","target","arguments","length","source","apply","this","EButtonSize","EButtonVariant","EButtonIconPosition","props","width","height","fill","xmlns","attributeType","attributeName","type","from","to","dur","repeatCount","id","x1","y1","x2","y2","gradientUnits","stopColor","offset","stopOpacity","Button","variant","size","medium","iconPosition","right","Icon","loading","disabled","children","className","onClick","classNames","button","withIcon","loaderClassNames","loader","iconClassNames","icon","icon__only","_onClick","e","style"],"mappings":"uCACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9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,YACTC,EAAO,UACP,IAAAzB,YAAI,IAAG,WAAQ,EAET0B,EAAa,mBACjB,W,MACE,WACE,IAAOC,OACPH,EACA,IAAO,kBAAWT,IAClB,IAAO,kBAAWC,IAClB,IAAO,uBAAgBE,MAAe,MAEnC,IAAOG,SAAUA,EAClB,EAAC,IAAOO,UAAWR,E,MAGzB,CAACL,EAASC,EAAMK,EAASD,EAAME,EAAUE,IAGrCK,EAAmB,mBACvB,WAAM,WAAW,IAAOC,OAAQ,IAAO,kBAAWf,IAAY,IAAO,kBAAWC,OAChF,CAACD,EAASC,IAGNe,EAAiB,mBACrB,W,MACE,WAAW,IAAOC,KAAM,IAAO,gBAASjB,IAAY,IAAO,gBAASC,MAAO,MAAK,IAAOiB,aAAcV,EAAQ,MAC/G,CAACR,EAASC,EAAMO,IAGZW,EAAW,uBACf,SAACC,GACKb,GAAYD,GAEhBI,GAAWA,EAAQU,KAErB,CAACV,EAASH,EAAUD,IAGtB,OACE,4BAAQrB,KAAMA,EAAMwB,UAAWE,EAAYJ,SAAUA,EAAUG,QAASS,EAAUE,MAAO,CAAE1C,MAAK,IAC7F6B,EACAH,GAAQ,kBAACA,EAAI,CAACI,UAAWO,IACzBV,GAAW,kBAAC,EAAM,CAACG,UAAWK,MCzFrC","file":"index.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 3);\n","module.exports = require(\"react\");","// extracted by mini-css-extract-plugin\nmodule.exports = {\"button\":\"X-qXAjOlRK-MvEYzf+vJhw==\",\"button__smallS\":\"eulj795QGDKOUqnlkwRcjg==\",\"button__small\":\"kA9VI1+kphZMg+k4vwaA0A==\",\"withIcon\":\"J7ifRezUPIpp0n8u5ey6eA==\",\"button__medium\":\"E71L1YsDYOk9r7JoN8iRtA==\",\"button__large\":\"PG1dRW1+2uEbSJL4AczvWA==\",\"button__default\":\"mYOHniHZN+wzW6HIbZsnIg==\",\"button__secondary\":\"bPOB9hdxMHyvlNMblpaD2w==\",\"button__icon_left\":\"EzgVgoT-fH3ME93vMPlWkQ==\",\"button__icon_right\":\"uPFlSZFrv33G6Syy-kE8BQ==\",\"loading\":\"IZ3gtInjJxgFyjTmoON+MA==\",\"icon\":\"Gso9o47aQw7gpIb6flgPow==\",\"icon__smallS\":\"BQwBbNv+45pKaoDXKLrnZQ==\",\"icon__small\":\"SgRrCfWD7dbhNcWRDLF41w==\",\"icon__medium\":\"_3L-IQ9YS+6jmHw0pc6ZnCQ==\",\"icon__large\":\"WSggmWymdxGEd6uWzS8iPA==\",\"icon__default\":\"MzXx8SzLHp6qmfyu-p4HIA==\",\"icon__secondary\":\"n0RQniAXmk-2hu5UTGAkCA==\",\"icon__only\":\"fpWXxEzExVJNFtiBu-YVhA==\",\"loader\":\"v14UEAGpVOAxK8oK9tZ32g==\",\"loader__medium\":\"_7pr9vlHwvaNj0kihq3zwcQ==\",\"loader__large\":\"S4tzpabhSuMX6nxSoa3cxQ==\",\"loader__default\":\"_5X5UT-TFHZe-BiWWUwq7og==\"};","module.exports = require(\"classnames\");","var _path, _path2, _defs;\n\nfunction _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction SvgButtonLoader(props) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n width: 20,\n height: 20,\n fill: \"none\",\n xmlns: \"http://www.w3.org/2000/svg\"\n }, props), _path || (_path = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 10a7 7 0 11-2.706-5.528c.382.296.379.855.037 1.197-.342.342-.892.335-1.286.054A5.25 5.25 0 1015.25 10H17z\",\n fill: \"url(#button-loader_svg__paint0_linear)\"\n }, /*#__PURE__*/React.createElement(\"animateTransform\", {\n attributeType: \"xml\",\n attributeName: \"transform\",\n type: \"rotate\",\n from: \"0 10 10\",\n to: \"360 10 10\",\n dur: \"0.75s\",\n repeatCount: \"indefinite\"\n }))), _path2 || (_path2 = /*#__PURE__*/React.createElement(\"path\", {\n d: \"M17 10a7 7 0 11-2.706-5.528c.382.296.379.855.037 1.197-.342.342-.892.335-1.286.054A5.25 5.25 0 1015.25 10H17z\",\n fill: \"url(#button-loader_svg__paint1_linear)\"\n }, /*#__PURE__*/React.createElement(\"animateTransform\", {\n attributeType: \"xml\",\n attributeName: \"transform\",\n type: \"rotate\",\n from: \"0 10 10\",\n to: \"360 10 10\",\n dur: \"0.75s\",\n repeatCount: \"indefinite\"\n }))), _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"linearGradient\", {\n id: \"button-loader_svg__paint0_linear\",\n x1: 14.5,\n y1: 5.5,\n x2: 16.5,\n y2: 10,\n gradientUnits: \"userSpaceOnUse\"\n }, /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"currentColor\"\n }), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 1,\n stopColor: \"currentColor\",\n stopOpacity: 0\n })), /*#__PURE__*/React.createElement(\"linearGradient\", {\n id: \"button-loader_svg__paint1_linear\",\n x1: 10,\n y1: 16,\n x2: 17,\n y2: 9.5,\n gradientUnits: \"userSpaceOnUse\"\n }, /*#__PURE__*/React.createElement(\"stop\", {\n stopColor: \"currentColor\"\n }), /*#__PURE__*/React.createElement(\"stop\", {\n offset: 1,\n stopColor: \"currentColor\",\n stopOpacity: 0\n })))));\n}\n\nexport default SvgButtonLoader;","import React, { PropsWithChildren, useMemo, MouseEvent, useCallback } from 'react';\nimport classnames from 'classnames';\nimport Loader from '../icon/icons/button-loader.svg';\n\nimport styles from './button.module.scss';\n\nexport enum EButtonSize {\n smallS = 'smallS',\n small = 'small',\n medium = 'medium',\n large = 'large',\n}\n\nexport enum EButtonVariant {\n default = 'default',\n secondary = 'secondary',\n}\n\nexport enum EButtonIconPosition {\n left = 'left',\n right = 'right',\n}\n\ninterface IButtonProps {\n variant?: keyof typeof EButtonVariant;\n size?: keyof typeof EButtonSize;\n icon?: any;\n width?: string;\n iconPosition?: EButtonIconPosition;\n loading?: boolean;\n disabled?: boolean;\n className?: string;\n type?: 'button' | 'submit' | 'reset';\n onClick?: (e?: MouseEvent<HTMLButtonElement>) => void;\n}\n\nexport const Button = ({\n variant = EButtonVariant.default,\n size = EButtonSize.medium,\n iconPosition = EButtonIconPosition.right,\n width,\n icon: Icon,\n loading,\n disabled,\n children,\n className,\n onClick,\n type = 'button',\n}: PropsWithChildren<IButtonProps>) => {\n const classNames = useMemo(\n () =>\n classnames(\n styles.button,\n className,\n styles[`button__${variant}`],\n styles[`button__${size}`],\n styles[`button__icon_${iconPosition}`],\n {\n [styles.loading]: loading,\n [styles.withIcon]: Icon,\n }\n ),\n [variant, size, loading, Icon, disabled, className]\n );\n\n const loaderClassNames = useMemo(\n () => classnames(styles.loader, styles[`loader__${variant}`], styles[`loader__${size}`]),\n [variant, size]\n );\n\n const iconClassNames = useMemo(\n () =>\n classnames(styles.icon, styles[`icon__${variant}`], styles[`icon__${size}`], { [styles.icon__only]: !children }),\n [variant, size, children]\n );\n\n const _onClick = useCallback(\n (e?: MouseEvent<HTMLButtonElement>) => {\n if (disabled || loading) return;\n\n onClick && onClick(e);\n },\n [onClick, disabled, loading]\n );\n\n return (\n <button type={type} className={classNames} disabled={disabled} onClick={_onClick} style={{ width }}>\n {children}\n {Icon && <Icon className={iconClassNames} />}\n {loading && <Loader className={loaderClassNames} />}\n </button>\n );\n};\n","export { Button } from './components/button';\n"],"sourceRoot":""}
1
+ {"version":3,"sources":["webpack://dt-shared-front/webpack/universalModuleDefinition","webpack://dt-shared-front/webpack/bootstrap","webpack://dt-shared-front/external \"react\"","webpack://dt-shared-front/./src/components/button/button.tsx","webpack://dt-shared-front/./src/index.ts"],"names":["root","factory","exports","module","define","amd","this","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","require","EButtonSize","EButtonVariant","EButtonIconPosition","Button","width","Icon","loading","disabled","children","onClick","type","_onClick","e","style"],"mappings":"CAAA,SAA2CA,EAAMC,GAC1B,iBAAZC,SAA0C,iBAAXC,OACxCA,OAAOD,QAAUD,IACQ,mBAAXG,QAAyBA,OAAOC,IAC9CD,OAAO,GAAIH,GACe,iBAAZC,QACdA,QAAQ,mBAAqBD,IAE7BD,EAAK,mBAAqBC,IAR5B,CASGK,MAAM,WACT,O,YCTE,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUP,QAGnC,IAAIC,EAASI,EAAiBE,GAAY,CACzCC,EAAGD,EACHE,GAAG,EACHT,QAAS,IAUV,OANAU,EAAQH,GAAUI,KAAKV,EAAOD,QAASC,EAAQA,EAAOD,QAASM,GAG/DL,EAAOQ,GAAI,EAGJR,EAAOD,QA0Df,OArDAM,EAAoBM,EAAIF,EAGxBJ,EAAoBO,EAAIR,EAGxBC,EAAoBQ,EAAI,SAASd,EAASe,EAAMC,GAC3CV,EAAoBW,EAAEjB,EAASe,IAClCG,OAAOC,eAAenB,EAASe,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEV,EAAoBgB,EAAI,SAAStB,GACX,oBAAXuB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAenB,EAASuB,OAAOC,YAAa,CAAEC,MA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AAWA,EAAQG,KAErB,CAACH,EAASF,EAAUD,IAGtB,OACE,4BAAQI,KAAMA,EAAMH,SAAUA,EAAUE,QAASE,EAAUE,MAAO,CAAET,MAAK,IACtEI,EACAH,GAAQ,kBAACA,EAAI,QCnFpB","file":"index.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"dt-shared-front\"] = factory();\n\telse\n\t\troot[\"dt-shared-front\"] = factory();\n})(this, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1);\n","module.exports = require(\"react\");","import React, { PropsWithChildren, MouseEvent, useCallback } from 'react';\n// import Loader from '../icon/icons/button-loader.svg';\n\n// import styles from './button.module.scss';\n\nexport enum EButtonSize {\n smallS = 'smallS',\n small = 'small',\n medium = 'medium',\n large = 'large',\n}\n\nexport enum EButtonVariant {\n default = 'default',\n secondary = 'secondary',\n}\n\nexport enum EButtonIconPosition {\n left = 'left',\n right = 'right',\n}\n\ninterface IButtonProps {\n variant?: keyof typeof EButtonVariant;\n size?: keyof typeof EButtonSize;\n icon?: any;\n width?: string;\n iconPosition?: EButtonIconPosition;\n loading?: boolean;\n disabled?: boolean;\n className?: string;\n type?: 'button' | 'submit' | 'reset';\n onClick?: (e?: MouseEvent<HTMLButtonElement>) => void;\n}\n\nexport const Button = ({\n width,\n icon: Icon,\n loading,\n disabled,\n children,\n onClick,\n type = 'button',\n}: PropsWithChildren<IButtonProps>) => {\n // const classNames = useMemo(\n // () =>\n // classnames(\n // styles.button,\n // className,\n // styles[`button__${variant}`],\n // styles[`button__${size}`],\n // styles[`button__icon_${iconPosition}`],\n // {\n // [styles.loading]: loading,\n // [styles.withIcon]: Icon,\n // }\n // ),\n // [variant, size, loading, Icon, disabled, className]\n // );\n\n // const loaderClassNames = useMemo(\n // () => classnames(styles.loader, styles[`loader__${variant}`], styles[`loader__${size}`]),\n // [variant, size]\n // );\n\n // const iconClassNames = useMemo(\n // () =>\n // classnames(styles.icon, styles[`icon__${variant}`], styles[`icon__${size}`], { [styles.icon__only]: !children }),\n // [variant, size, children]\n // );\n\n const _onClick = useCallback(\n (e?: MouseEvent<HTMLButtonElement>) => {\n if (disabled || loading) return;\n\n onClick && onClick(e);\n },\n [onClick, disabled, loading]\n );\n\n return (\n <button type={type} disabled={disabled} onClick={_onClick} style={{ width }}>\n {children}\n {Icon && <Icon />}\n {/* {loading && <Loader />} */}\n </button>\n );\n};\n","export { Button } from './components/button';\n"],"sourceRoot":""}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dt-shared-front",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "description": "Shared components",
5
5
  "main": "dist/index.js",
6
6
  "files": [