@paciu/ui 0.0.34 → 0.0.36

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.
@@ -1,7 +1,7 @@
1
1
  import { default as React } from 'react';
2
2
  import { ColorType } from '../../types';
3
- interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
4
- color?: ColorType;
3
+ interface ButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'color'> {
4
+ color?: ColorType | null;
5
5
  text?: boolean | null;
6
6
  icon?: boolean | null;
7
7
  small?: boolean | null;
@@ -1,2 +1,2 @@
1
- export { Button } from './button';
2
- export { Row } from './row';
1
+ export { Button } from './button/button.tsx';
2
+ export { Row } from './row/row.tsx';
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { Size } from '../../types';
3
+ interface RowProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ size?: Size | null;
5
+ }
6
+ export declare const Row: React.FC<RowProps>;
7
+ export {};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- (function(o,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],s):(o=typeof globalThis<"u"?globalThis:o||self,s(o["paciu-ui"]={},o["react/jsx-runtime"],o.react))})(this,function(o,s,c){"use strict";const i={"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 d(){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 f=t=>{const{children:n,className:r,color:e,text:u,icon:m,loading:b,small:y,..._}=t;return s.jsx("button",{className:d(i["paciu-ui-button"],{[i.text]:u,[i.small]:y,[i.icon]:m,[i.loading]:b,...e&&{[i[e]]:e}},r),..._,children:n})},l=({children:t})=>s.jsx("div",{style:{padding:12},children:t}),p=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=f,o.Row=l,o.useEscape=p,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
1
+ (function(r,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("react/jsx-runtime"),require("react")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react"],s):(r=typeof globalThis<"u"?globalThis:r||self,s(r["paciu-ui"]={},r["react/jsx-runtime"],r.react))})(this,function(r,s,l){"use strict";const u={button:"_button_1cbbb_2",small:"_small_1cbbb_17",text:"_text_1cbbb_26","button--error":"_button--error_1cbbb_39"};function c(t){var n,e,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(n=0;n<i;n++)t[n]&&(e=c(t[n]))&&(o&&(o+=" "),o+=e)}else for(e in t)t[e]&&(o&&(o+=" "),o+=e);return o}function a(){for(var t,n,e=0,o="",i=arguments.length;e<i;e++)(t=arguments[e])&&(n=c(t))&&(o&&(o+=" "),o+=n);return o}const f=t=>{const{children:n,className:e,color:o,text:i,icon:p,loading:_,small:y,...x}=t;return s.jsx("button",{className:a(u.button,{[u.text]:i,[u.small]:y,[u.icon]:p,[u.loading]:_,...o&&{[u[`paciu-ui-button--${o}`]]:o}},e),...x,children:n})},b={row:"_row_1ojv4_2"},d=({children:t,className:n,...e})=>s.jsx("div",{className:a(b.row,n),...e,children:t}),m=t=>{l.useEffect(()=>{const n=e=>{e.key==="Escape"&&(e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),t())};return document.addEventListener("keydown",n,!0),()=>document.removeEventListener("keydown",n,!0)},[t])};r.Button=f,r.Row=d,r.useEscape=m,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
@@ -1 +1 @@
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}
1
+ ._button_1cbbb_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}._button_1cbbb_2._small_1cbbb_17{min-height:32px;border-radius:12px;font-size:12px;padding:0 12px}._button_1cbbb_2:hover{background:#242424}._button_1cbbb_2._text_1cbbb_26{color:#333;background:#3333330d}._button_1cbbb_2._text_1cbbb_26:hover{background:#3333331a}._button_1cbbb_2:disabled{background:#f0f0f0;color:#a0a0a0;cursor:default;pointer-events:none}._button--error_1cbbb_39{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}._button--error_1cbbb_39._small_1cbbb_17{min-height:32px;border-radius:12px;font-size:12px;padding:0 12px}._button--error_1cbbb_39:hover{background:#db1118}._button--error_1cbbb_39._text_1cbbb_26{color:#ea2027;background:#ea20270d}._button--error_1cbbb_39._text_1cbbb_26:hover{background:#ea20271a}._button--error_1cbbb_39:disabled{background:#f0f0f0;color:#a0a0a0;cursor:default;pointer-events:none}._row_1ojv4_2{padding:12px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paciu/ui",
3
- "version": "0.0.34",
3
+ "version": "0.0.36",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
package/readme.md CHANGED
@@ -6,13 +6,6 @@ $ npm i @paciu/ui
6
6
 
7
7
  ```typescript
8
8
  import '@paciu/ui/styles'
9
- import { Button, useEscape } from '@paciu/ui'
9
+ import { Button, Row, useEscape } from '@paciu/ui'
10
10
  import type { ColorType } from '@paciu/ui'
11
- ```
12
-
13
- ```typescript
14
- declare module '@paciu/ui/styles' {
15
- const content: Record<string, string>
16
- export default content
17
- }
18
11
  ```
@@ -1,4 +0,0 @@
1
- import { default as React } from 'react';
2
- type RowProps = React.PropsWithChildren;
3
- export declare const Row: React.FC<RowProps>;
4
- export {};