@paciu/ui 0.0.21 → 0.0.25
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.d.ts +3 -0
- package/dist/index.js +1 -1
- package/dist/styles/index.css +1 -1
- package/package.json +2 -5
- package/readme.md +11 -5
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e["paciu-ui"]={},e["react/jsx-runtime"],e.react))})(this,function(e,t,a){"use strict";const i={"paciu-ui-button":"_paciu-ui-button_jedc1_2",hint:"_hint_jedc1_17",icon:"_icon_jedc1_22",small:"_small_jedc1_33",loading:"_loading_jedc1_43",text:"_text_jedc1_54",error:"_error_jedc1_71"},d=o=>{const{children:c,className:n,color:r,text:p,icon:f,small:_,loading:m,hint:u,...h}=o,s=[i["paciu-ui-button"]];return p&&s.push(i.text),f&&s.push(i.icons),_&&s.push(i.small),r&&s.push(i[r]),n&&s.push(n),t.jsxs("button",{className:s.join(" "),...h,children:[c,u&&t.jsx("div",{className:i.hint,children:u}),m&&t.jsx("div",{className:"loading",children:"Загрузка ..."})]})},l=o=>{a.useEffect(()=>{const c=n=>{n.key==="Escape"&&(n.preventDefault(),n.stopPropagation(),n.stopImmediatePropagation(),o())};return document.addEventListener("keydown",c,!0),()=>document.removeEventListener("keydown",c,!0)},[o])};e.Button=d,e.useEscape=l,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})});
|
package/dist/styles/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._paciu-ui-button_jedc1_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_jedc1_2 ._hint_jedc1_17{font-size:12px;opacity:.5;line-height:1}._paciu-ui-button_jedc1_2._icon_jedc1_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_jedc1_2._icon_jedc1_22._small_jedc1_33{min-height:32px;min-width:32px;height:32px;width:32px;border-radius:32px}._paciu-ui-button_jedc1_2:hover{background:#292929}._paciu-ui-button_jedc1_2 ._loading_jedc1_43{width:100%;height:100%;background:#333;position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center}._paciu-ui-button_jedc1_2._text_jedc1_54{color:#333;background:#3333330d}._paciu-ui-button_jedc1_2._text_jedc1_54:hover{background:#3333331a}._paciu-ui-button_jedc1_2._text_jedc1_54 ._loading_jedc1_43{color:#333;background:#fff}._paciu-ui-button_jedc1_2:disabled{opacity:.3;cursor:default;pointer-events:none}._paciu-ui-button_jedc1_2._error_jedc1_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_jedc1_2._error_jedc1_71 ._hint_jedc1_17{font-size:12px;opacity:.5;line-height:1}._paciu-ui-button_jedc1_2._error_jedc1_71._icon_jedc1_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_jedc1_2._error_jedc1_71._icon_jedc1_22._small_jedc1_33{min-height:32px;min-width:32px;height:32px;width:32px;border-radius:32px}._paciu-ui-button_jedc1_2._error_jedc1_71:hover{background:#e0161d}._paciu-ui-button_jedc1_2._error_jedc1_71 ._loading_jedc1_43{width:100%;height:100%;background:#ea2027;position:absolute;top:0;left:0;display:flex;justify-content:center;align-items:center}._paciu-ui-button_jedc1_2._error_jedc1_71._text_jedc1_54{color:#ea2027;background:#ea20270d}._paciu-ui-button_jedc1_2._error_jedc1_71._text_jedc1_54:hover{background:#ea20271a}._paciu-ui-button_jedc1_2._error_jedc1_71._text_jedc1_54 ._loading_jedc1_43{color:#ea2027;background:#fff}._paciu-ui-button_jedc1_2._error_jedc1_71: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.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -13,10 +13,7 @@
|
|
|
13
13
|
"import": "./dist/index.js",
|
|
14
14
|
"require": "./dist/index.js"
|
|
15
15
|
},
|
|
16
|
-
"./styles": "./dist/styles/index.css"
|
|
17
|
-
"./types": "./dist/types/index.d.ts",
|
|
18
|
-
"./components": "./dist/components/index.d.ts",
|
|
19
|
-
"./hooks": "./dist/hooks/index.d.ts"
|
|
16
|
+
"./styles": "./dist/styles/index.css"
|
|
20
17
|
},
|
|
21
18
|
"keywords": [
|
|
22
19
|
"paciu"
|
package/readme.md
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
1
|
# @paciu/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
```
|
|
4
|
+
$ npm i @paciu/ui
|
|
5
|
+
```
|
|
4
6
|
|
|
5
7
|
```typescript
|
|
6
8
|
import '@paciu/ui/styles'
|
|
9
|
+
import { Button, useEscape } from '@paciu/ui'
|
|
10
|
+
import type { ColorTye } from '@paciu/ui'
|
|
11
|
+
```
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
13
|
+
```typescript
|
|
14
|
+
declare module '@paciu/ui/styles' {
|
|
15
|
+
const content: Record<string, string>
|
|
16
|
+
export default content
|
|
17
|
+
}
|
|
12
18
|
```
|