@paciu/ui 0.0.25 → 0.0.27
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/components/button/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/styles/index.css +1 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +3 -2
- package/readme.md +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ColorType } from '../../types';
|
|
3
3
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
-
color?:
|
|
4
|
+
color?: ColorType;
|
|
5
5
|
text?: boolean | null;
|
|
6
6
|
icon?: boolean | null;
|
|
7
7
|
small?: boolean | null;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(e
|
|
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"})});
|
package/dist/styles/index.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._paciu-ui-
|
|
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}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type ColorType = 'error';
|
|
2
|
+
export type Size = 'small' | 'medium' | 'large';
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@paciu/ui",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"files": [
|
|
9
|
-
"dist"
|
|
9
|
+
"dist",
|
|
10
|
+
".d.ts"
|
|
10
11
|
],
|
|
11
12
|
"exports": {
|
|
12
13
|
".": {
|