@paciu/ui 0.0.30 → 0.0.31

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t["paciu-ui"]={},t["react/jsx-runtime"],t.react))})(this,function(t,e,u){"use strict";const i={"paciu-ui-button":"_paciu-ui-button_1a5tg_2",hint:"_hint_1a5tg_17",icon:"_icon_1a5tg_22",small:"_small_1a5tg_33",loading:"_loading_1a5tg_43",text:"_text_1a5tg_54",error:"_error_1a5tg_71"},d=o=>{const{children:r,className:n,color:c,text:p,icon:f,small:_,loading:m,hint:a,...h}=o,s=[i["paciu-ui-button"]];return p&&s.push(i.text),f&&s.push(i.icons),_&&s.push(i.small),c&&s.push(i[c]),n&&s.push(n),e.jsxs("button",{className:s.join(" "),...h,children:[r,a&&e.jsx("div",{className:i.hint,children:a}),m&&e.jsx("div",{className:"loading",children:"Загрузка ..."})]})},l=o=>{u.useEffect(()=>{const r=n=>{n.key==="Escape"&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),o())};return document.addEventListener("keydown",r,!0),()=>document.removeEventListener("keydown",r,!0)},[o])};t.Button=d,t.useEscape=l,Object.defineProperty(t,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,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 +1 @@
1
- ._paciu-ui-button_1a5tg_2{position:relative;overflow:hidden;font:inherit;font-weight:600;width:100%;border:none;border-radius:16px;padding:0 15px;min-height:42px;cursor:pointer;background:#333;color:#fff;transition:.2s}._paciu-ui-button_1a5tg_2 ._hint_1a5tg_17{font-size:12px;opacity:.5;line-height:1}._paciu-ui-button_1a5tg_2._icon_1a5tg_22{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_1a5tg_2._icon_1a5tg_22._small_1a5tg_33{min-height:32px;min-width:32px;height:32px;width:32px;border-radius:32px}._paciu-ui-button_1a5tg_2:hover{background:#292929}._paciu-ui-button_1a5tg_2 ._loading_1a5tg_43{width:100%;height:100%;background:#333;position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center}._paciu-ui-button_1a5tg_2._text_1a5tg_54{color:#333;background:#3333330d}._paciu-ui-button_1a5tg_2._text_1a5tg_54:hover{background:#3333331a}._paciu-ui-button_1a5tg_2._text_1a5tg_54 ._loading_1a5tg_43{color:#333;background:#fff}._paciu-ui-button_1a5tg_2:disabled{opacity:.3;cursor:default;pointer-events:none}._paciu-ui-button_1a5tg_2._error_1a5tg_71{position:relative;overflow:hidden;font:inherit;font-weight:600;width:100%;border:none;border-radius:16px;padding:0 15px;min-height:42px;cursor:pointer;background:#ea2027;color:#fff;transition:.2s}._paciu-ui-button_1a5tg_2._error_1a5tg_71 ._hint_1a5tg_17{font-size:12px;opacity:.5;line-height:1}._paciu-ui-button_1a5tg_2._error_1a5tg_71._icon_1a5tg_22{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_1a5tg_2._error_1a5tg_71._icon_1a5tg_22._small_1a5tg_33{min-height:32px;min-width:32px;height:32px;width:32px;border-radius:32px}._paciu-ui-button_1a5tg_2._error_1a5tg_71:hover{background:#e0161d}._paciu-ui-button_1a5tg_2._error_1a5tg_71 ._loading_1a5tg_43{width:100%;height:100%;background:#ea2027;position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center}._paciu-ui-button_1a5tg_2._error_1a5tg_71._text_1a5tg_54{color:#ea2027;background:#ea20270d}._paciu-ui-button_1a5tg_2._error_1a5tg_71._text_1a5tg_54:hover{background:#ea20271a}._paciu-ui-button_1a5tg_2._error_1a5tg_71._text_1a5tg_54 ._loading_1a5tg_43{color:#ea2027;background:#fff}._paciu-ui-button_1a5tg_2._error_1a5tg_71:disabled{opacity:.3;cursor:default;pointer-events:none}
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}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paciu/ui",
3
- "version": "0.0.30",
3
+ "version": "0.0.31",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -28,7 +28,8 @@
28
28
  },
29
29
  "peerDependencies": {
30
30
  "react": "^19.0.0",
31
- "react-dom": "^19.0.0"
31
+ "react-dom": "^19.0.0",
32
+ "clsx": "^2.1.1"
32
33
  },
33
34
  "devDependencies": {
34
35
  "@eslint/js": "^9.22.0",