componenteszw-package 1.0.1 → 1.0.4
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/Blur.d.ts +9 -0
- package/dist/Card.d.ts +7 -0
- package/dist/Modal.d.ts +21 -0
- package/dist/button.d.ts +18 -0
- package/dist/checkbox.d.ts +10 -0
- package/dist/componenteszw-package.umd.js +1 -1
- package/dist/file.d.ts +8 -0
- package/dist/fileItem.d.ts +19 -0
- package/dist/index.d.ts +9 -0
- package/dist/input.d.ts +19 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/textarea.d.ts +16 -0
- package/package.json +4 -3
package/dist/Blur.d.ts
ADDED
package/dist/Card.d.ts
ADDED
package/dist/Modal.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type ModalVariant = "success" | "error" | "question" | "content";
|
|
3
|
+
type ModalProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
variant?: ModalVariant;
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
primaryAction?: {
|
|
11
|
+
text: string;
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
};
|
|
14
|
+
secondaryAction?: {
|
|
15
|
+
text: string;
|
|
16
|
+
onClick: () => void;
|
|
17
|
+
};
|
|
18
|
+
size?: "small" | "medium" | "large";
|
|
19
|
+
};
|
|
20
|
+
export declare const Modal: React.FC<ModalProps>;
|
|
21
|
+
export {};
|
package/dist/button.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type ButtonVariant = "primary" | "secondary" | "tertiary" | "success" | "warning" | "destructive";
|
|
3
|
+
type ButtonSize = "small" | "medium";
|
|
4
|
+
type ButtonState = "default" | "hover" | "focus" | "disabled";
|
|
5
|
+
type ButtonProps = {
|
|
6
|
+
text?: string;
|
|
7
|
+
iconLeft?: React.ReactNode;
|
|
8
|
+
iconRight?: React.ReactNode;
|
|
9
|
+
variant?: ButtonVariant;
|
|
10
|
+
size?: ButtonSize;
|
|
11
|
+
state?: ButtonState;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
onClick?: () => void;
|
|
14
|
+
type?: "button" | "submit" | "reset";
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const Button: ({ text, iconLeft, iconRight, variant, size, state, disabled, onClick, type, className }: ButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type CheckboxProps = {
|
|
2
|
+
label?: string;
|
|
3
|
+
checked?: boolean;
|
|
4
|
+
indeterminate?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
hintText?: string;
|
|
7
|
+
onChange?: (checked: boolean) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare function Checkbox({ label, checked, indeterminate, disabled, hintText, onChange, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`)):typeof define==`function`&&define.amd?define([`exports`,`react`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e
|
|
1
|
+
(function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports,require(`react`)):typeof define==`function`&&define.amd?define([`exports`,`react`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e[`componenteszw-package`]={},e.react))})(this,function(e,t){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var n=Object.create,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,o=Object.getPrototypeOf,s=Object.prototype.hasOwnProperty,c=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),l=(e,t,n,o)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=a(t),l=0,u=c.length,d;l<u;l++)d=c[l],!s.call(e,d)&&d!==n&&r(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(o=i(t,d))||o.enumerable});return e};t=((e,t,i)=>(i=e==null?{}:n(o(e)),l(t||!e||!e.__esModule?r(i,`default`,{value:e,enumerable:!0}):i,e)))(t);var u=c((e=>{var t=require(`react`),n=Symbol.for(`react.element`),r=Symbol.for(`react.fragment`),i=Object.prototype.hasOwnProperty,a=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,t,r){var s,c={},l=null,u=null;for(s in r!==void 0&&(l=``+r),t.key!==void 0&&(l=``+t.key),t.ref!==void 0&&(u=t.ref),t)i.call(t,s)&&!o.hasOwnProperty(s)&&(c[s]=t[s]);if(e&&e.defaultProps)for(s in t=e.defaultProps,t)c[s]===void 0&&(c[s]=t[s]);return{$$typeof:n,type:e,key:l,ref:u,props:c,_owner:a.current}}e.Fragment=r,e.jsx=s,e.jsxs=s})),d=c((e=>{process.env.NODE_ENV!==`production`&&(function(){"use strict";var t=require(`react`),n=Symbol.for(`react.element`),r=Symbol.for(`react.portal`),i=Symbol.for(`react.fragment`),a=Symbol.for(`react.strict_mode`),o=Symbol.for(`react.profiler`),s=Symbol.for(`react.provider`),c=Symbol.for(`react.context`),l=Symbol.for(`react.forward_ref`),u=Symbol.for(`react.suspense`),d=Symbol.for(`react.suspense_list`),f=Symbol.for(`react.memo`),p=Symbol.for(`react.lazy`),m=Symbol.for(`react.offscreen`),h=Symbol.iterator,g=`@@iterator`;function _(e){if(typeof e!=`object`||!e)return null;var t=h&&e[h]||e[g];return typeof t==`function`?t:null}var v=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(e){b(`error`,e,[...arguments].slice(1))}function b(e,t,n){var r=v.ReactDebugCurrentFrame.getStackAddendum();r!==``&&(t+=`%s`,n=n.concat([r]));var i=n.map(function(e){return String(e)});i.unshift(`Warning: `+t),Function.prototype.apply.call(console[e],console,i)}var ee=!1,te=!1,x=!1,ne=!1,S=!1,C=Symbol.for(`react.module.reference`);function w(e){return!!(typeof e==`string`||typeof e==`function`||e===i||e===o||S||e===a||e===u||e===d||ne||e===m||ee||te||x||typeof e==`object`&&e&&(e.$$typeof===p||e.$$typeof===f||e.$$typeof===s||e.$$typeof===c||e.$$typeof===l||e.$$typeof===C||e.getModuleId!==void 0))}function T(e,t,n){var r=e.displayName;if(r)return r;var i=t.displayName||t.name||``;return i===``?n:n+`(`+i+`)`}function E(e){return e.displayName||`Context`}function D(e){if(e==null)return null;if(typeof e.tag==`number`&&y(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),typeof e==`function`)return e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case i:return`Fragment`;case r:return`Portal`;case o:return`Profiler`;case a:return`StrictMode`;case u:return`Suspense`;case d:return`SuspenseList`}if(typeof e==`object`)switch(e.$$typeof){case c:return E(e)+`.Consumer`;case s:return E(e._context)+`.Provider`;case l:return T(e,e.render,`ForwardRef`);case f:var t=e.displayName||null;return t===null?D(e.type)||`Memo`:t;case p:var n=e,m=n._payload,h=n._init;try{return D(h(m))}catch{return null}}return null}var O=Object.assign,k=0,A,j,M,N,P,F,re;function ie(){}ie.__reactDisabledLog=!0;function ae(){if(k===0){A=console.log,j=console.info,M=console.warn,N=console.error,P=console.group,F=console.groupCollapsed,re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:ie,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}k++}function oe(){if(k--,k===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:O({},e,{value:A}),info:O({},e,{value:j}),warn:O({},e,{value:M}),error:O({},e,{value:N}),group:O({},e,{value:P}),groupCollapsed:O({},e,{value:F}),groupEnd:O({},e,{value:re})})}k<0&&y(`disabledDepth fell below zero. This is a bug in React. Please file an issue.`)}var I=v.ReactCurrentDispatcher,L;function R(e,t,n){if(L===void 0)try{throw Error()}catch(e){var r=e.stack.trim().match(/\n( *(at )?)/);L=r&&r[1]||``}return`
|
|
2
2
|
`+L+e}var z=!1,se=new(typeof WeakMap==`function`?WeakMap:Map);function ce(e,t){if(!e||z)return``;var n=se.get(e);if(n!==void 0)return n;var r;z=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var a=I.current;I.current=null,ae();try{if(t){var o=function(){throw Error()};if(Object.defineProperty(o.prototype,`props`,{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(o,[])}catch(e){r=e}Reflect.construct(e,[],o)}else{try{o.call()}catch(e){r=e}e.call(o.prototype)}}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&typeof t.stack==`string`){for(var s=t.stack.split(`
|
|
3
3
|
`),c=r.stack.split(`
|
|
4
4
|
`),l=s.length-1,u=c.length-1;l>=1&&u>=0&&s[l]!==c[u];)u--;for(;l>=1&&u>=0;l--,u--)if(s[l]!==c[u]){if(l!==1||u!==1)do if(l--,u--,u<0||s[l]!==c[u]){var d=`
|
package/dist/file.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type FileUploadProps = {
|
|
2
|
+
multiple?: boolean;
|
|
3
|
+
maxSize?: number;
|
|
4
|
+
acceptedFormats?: string[];
|
|
5
|
+
onChange?: (files: File[]) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function FileUpload({ multiple, maxSize, acceptedFormats, onChange, }: FileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type FileItemState = "default" | "loading";
|
|
3
|
+
type DropdownOption = {
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
onClick?: () => void;
|
|
7
|
+
danger?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type FileItemProps = {
|
|
10
|
+
title: string;
|
|
11
|
+
subtitle: string;
|
|
12
|
+
iconFile?: React.ReactNode;
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
state?: FileItemState;
|
|
15
|
+
dropdownOptions?: DropdownOption[];
|
|
16
|
+
onMenuClick?: () => void;
|
|
17
|
+
};
|
|
18
|
+
export declare const FileItem: React.FC<FileItemProps>;
|
|
19
|
+
export {};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { BackgroundBlur } from './Blur';
|
|
2
|
+
export { Button } from './button';
|
|
3
|
+
export { CardRow } from './Card';
|
|
4
|
+
export { Checkbox } from './checkbox';
|
|
5
|
+
export { FileUpload } from './file';
|
|
6
|
+
export { FileItem } from './fileItem';
|
|
7
|
+
export { Input } from './input';
|
|
8
|
+
export { Modal } from './Modal';
|
|
9
|
+
export { TextArea } from './textarea';
|
package/dist/input.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type InputState = "default" | "error" | "disabled";
|
|
3
|
+
type InputSize = "small" | "medium" | "large";
|
|
4
|
+
type InputProps = {
|
|
5
|
+
label?: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
value?: string;
|
|
8
|
+
hintText?: string;
|
|
9
|
+
required?: boolean;
|
|
10
|
+
state?: InputState;
|
|
11
|
+
size?: InputSize;
|
|
12
|
+
type?: "text" | "date" | "password" | "number";
|
|
13
|
+
iconRight?: React.ReactNode;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
onChange?: (value: string) => void;
|
|
16
|
+
className?: string;
|
|
17
|
+
};
|
|
18
|
+
export declare const Input: ({ label, placeholder, value, hintText, required, state, size, type, iconRight, disabled, onChange, className }: InputProps) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
type TextAreaState = "default" | "error" | "disabled";
|
|
2
|
+
type TextAreaProps = {
|
|
3
|
+
label?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
value?: string;
|
|
6
|
+
hintText?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
state?: TextAreaState;
|
|
9
|
+
maxLength?: number;
|
|
10
|
+
showCounter?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
onChange?: (value: string) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare function TextArea({ label, placeholder, value, hintText, required, state, maxLength, showCounter, disabled, onChange, className, }: TextAreaProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "componenteszw-package",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.4",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"main": "dist/componenteszw-package.umd.js",
|
|
6
|
+
"module": "dist/componenteszw-package.mjs",
|
|
6
7
|
"types": "dist/index.d.ts",
|
|
7
8
|
"files": [
|
|
8
9
|
"dist"
|