@paciu/ui 0.0.31 → 0.0.33

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.
@@ -6,7 +6,6 @@ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
6
6
  icon?: boolean | null;
7
7
  small?: boolean | null;
8
8
  loading?: boolean | null;
9
- hint?: string | null;
10
9
  }
11
10
  export declare const Button: React.FC<ButtonProps>;
12
11
  export {};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(o,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],i):(o=typeof globalThis<"u"?globalThis:o||self,i(o["paciu-ui"]={},o["react/jsx-runtime"],o.react))})(this,function(o,i,u){"use strict";const s={"paciu-ui-button":"_paciu-ui-button_3xrll_2",hint:"_hint_3xrll_16",small:"_small_3xrll_21",icon:"_icon_3xrll_24",loading:"_loading_3xrll_45",text:"_text_3xrll_56",error:"_error_3xrll_73"};function l(t){var r,n,e="";if(typeof t=="string"||typeof t=="number")e+=t;else if(typeof t=="object")if(Array.isArray(t)){var c=t.length;for(r=0;r<c;r++)t[r]&&(n=l(t[r]))&&(e&&(e+=" "),e+=n)}else for(n in t)t[n]&&(e&&(e+=" "),e+=n);return e}function d(){for(var t,r,n=0,e="",c=arguments.length;n<c;n++)(t=arguments[n])&&(r=l(t))&&(e&&(e+=" "),e+=r);return e}const f=t=>{const{children:r,className:n,color:e,text:c,icon:p,small:_,loading:x,hint:a,...h}=t;return i.jsxs("button",{className:d(s["paciu-ui-button"],{[s.text]:c,[s.small]:_,[s.icon]:p,...e&&{[s[e]]:e}},n),...h,children:[r,a&&i.jsx("div",{className:s.hint,children:a}),x&&i.jsx("div",{className:"loading",children:"Загрузка ..."})]})},m=t=>{u.useEffect(()=>{const r=n=>{n.key==="Escape"&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),t())};return document.addEventListener("keydown",r,!0),()=>document.removeEventListener("keydown",r,!0)},[t])};o.Button=f,o.useEscape=m,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
1
+ (function(o,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],i):(o=typeof globalThis<"u"?globalThis:o||self,i(o["paciu-ui"]={},o["react/jsx-runtime"],o.react))})(this,function(o,i,c){"use strict";const s={"paciu-ui-button":"_paciu-ui-button_bb2dv_2",small:"_small_bb2dv_17",text:"_text_bb2dv_26",error:"_error_bb2dv_40"};function a(t){var n,r,e="";if(typeof t=="string"||typeof t=="number")e+=t;else if(typeof t=="object")if(Array.isArray(t)){var u=t.length;for(n=0;n<u;n++)t[n]&&(r=a(t[n]))&&(e&&(e+=" "),e+=r)}else for(r in t)t[r]&&(e&&(e+=" "),e+=r);return e}function f(){for(var t,n,r=0,e="",u=arguments.length;r<u;r++)(t=arguments[r])&&(n=a(t))&&(e&&(e+=" "),e+=n);return e}const d=t=>{const{children:n,className:r,color:e,text:u,icon:m,loading:p,small:b,...y}=t;return i.jsx("button",{className:f(s["paciu-ui-button"],{[s.text]:u,[s.small]:b,[s.icon]:m,[s.loading]:p,...e&&{[s[e]]:e}},r),...y,children:n})},l=t=>{c.useEffect(()=>{const n=r=>{r.key==="Escape"&&(r.preventDefault(),r.stopPropagation(),r.stopImmediatePropagation(),t())};return document.addEventListener("keydown",n,!0),()=>document.removeEventListener("keydown",n,!0)},[t])};o.Button=d,o.useEscape=l,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
@@ -1 +1 @@
1
- ._paciu-ui-button_3xrll_2{position:relative;overflow:hidden;font:inherit;font-weight:600;border:none;border-radius:16px;padding:0 16px;min-height:42px;cursor:pointer;background:#333;color:#fff;transition:.2s}._paciu-ui-button_3xrll_2 ._hint_3xrll_16{font-size:12px;opacity:.5;line-height:1}._paciu-ui-button_3xrll_2._small_3xrll_21{min-height:32px}._paciu-ui-button_3xrll_2._icon_3xrll_24{padding:0;min-height:42px;min-width:42px;height:42px;width:42px;border-radius:36px;display:flex;justify-content:center;align-items:center}._paciu-ui-button_3xrll_2._icon_3xrll_24._small_3xrll_21{min-height:32px;min-width:32px;height:32px;width:32px;border-radius:32px}._paciu-ui-button_3xrll_2:hover{background:#292929}._paciu-ui-button_3xrll_2 ._loading_3xrll_45{width:100%;height:100%;background:#333;position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center}._paciu-ui-button_3xrll_2._text_3xrll_56{color:#333;background:#3333330d}._paciu-ui-button_3xrll_2._text_3xrll_56:hover{background:#3333331a}._paciu-ui-button_3xrll_2._text_3xrll_56 ._loading_3xrll_45{color:#333;background:#fff}._paciu-ui-button_3xrll_2:disabled{opacity:.3;cursor:default;pointer-events:none}._paciu-ui-button_3xrll_2._error_3xrll_73{position:relative;overflow:hidden;font:inherit;font-weight:600;border:none;border-radius:16px;padding:0 16px;min-height:42px;cursor:pointer;background:#ea2027;color:#fff;transition:.2s}._paciu-ui-button_3xrll_2._error_3xrll_73 ._hint_3xrll_16{font-size:12px;opacity:.5;line-height:1}._paciu-ui-button_3xrll_2._error_3xrll_73._small_3xrll_21{min-height:32px}._paciu-ui-button_3xrll_2._error_3xrll_73._icon_3xrll_24{padding:0;min-height:42px;min-width:42px;height:42px;width:42px;border-radius:36px;display:flex;justify-content:center;align-items:center}._paciu-ui-button_3xrll_2._error_3xrll_73._icon_3xrll_24._small_3xrll_21{min-height:32px;min-width:32px;height:32px;width:32px;border-radius:32px}._paciu-ui-button_3xrll_2._error_3xrll_73:hover{background:#e0161d}._paciu-ui-button_3xrll_2._error_3xrll_73 ._loading_3xrll_45{width:100%;height:100%;background:#ea2027;position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center}._paciu-ui-button_3xrll_2._error_3xrll_73._text_3xrll_56{color:#ea2027;background:#ea20270d}._paciu-ui-button_3xrll_2._error_3xrll_73._text_3xrll_56:hover{background:#ea20271a}._paciu-ui-button_3xrll_2._error_3xrll_73._text_3xrll_56 ._loading_3xrll_45{color:#ea2027;background:#fff}._paciu-ui-button_3xrll_2._error_3xrll_73:disabled{opacity:.3;cursor:default;pointer-events:none}
1
+ ._paciu-ui-button_bb2dv_2{position:relative;overflow:hidden;font:inherit;font-weight:600;border:none;cursor:pointer;background:#333;color:#fff;font-size:16px;border-radius:16px;padding:0 16px;min-height:40px;transition:.2s}._paciu-ui-button_bb2dv_2._small_bb2dv_17{min-height:32px;border-radius:12px;font-size:12px;padding:0 12px}._paciu-ui-button_bb2dv_2:hover{background:#242424}._paciu-ui-button_bb2dv_2._text_bb2dv_26{color:#333;background:#3333330d}._paciu-ui-button_bb2dv_2._text_bb2dv_26:hover{background:#3333331a}._paciu-ui-button_bb2dv_2:disabled{background:#f0f0f0;color:#a0a0a0;cursor:default;pointer-events:none}._paciu-ui-button_bb2dv_2._error_bb2dv_40{position:relative;overflow:hidden;font:inherit;font-weight:600;border:none;cursor:pointer;background:#ea2027;color:#fff;font-size:16px;border-radius:16px;padding:0 16px;min-height:40px;transition:.2s}._paciu-ui-button_bb2dv_2._error_bb2dv_40._small_bb2dv_17{min-height:32px;border-radius:12px;font-size:12px;padding:0 12px}._paciu-ui-button_bb2dv_2._error_bb2dv_40:hover{background:#db1118}._paciu-ui-button_bb2dv_2._error_bb2dv_40._text_bb2dv_26{color:#ea2027;background:#ea20270d}._paciu-ui-button_bb2dv_2._error_bb2dv_40._text_bb2dv_26:hover{background:#ea20271a}._paciu-ui-button_bb2dv_2._error_bb2dv_40:disabled{background:#f0f0f0;color:#a0a0a0;cursor:default;pointer-events:none}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paciu/ui",
3
- "version": "0.0.31",
3
+ "version": "0.0.33",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",