@processhub-lib/react 1.0.1 → 1.0.3
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/README.md +93 -0
- package/package.json +5 -2
- package/src/scripts/generate-endpoints.ts +184 -0
- package/src/ui/Select/index.tsx +3 -2
- package/src/utils/applyMask.tsx +49 -0
- package/src/utils/formatar.tsx +173 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/isDocumento.tsx +46 -0
- package/dist/context/ThemeContext.d.ts +0 -22
- package/dist/index-DN3Jte8S.cjs +0 -30
- package/dist/index-DRwba4Gg.js +0 -1170
- package/dist/index.cjs.js +0 -1
- package/dist/index.d.ts +0 -4
- package/dist/index.es.js +0 -10
- package/dist/style.css +0 -1
- package/dist/ui/Button/colors.d.ts +0 -162
- package/dist/ui/Button/index.d.ts +0 -3
- package/dist/ui/Button/types/button.d.ts +0 -16
- package/dist/ui/Input/index.d.ts +0 -3
- package/dist/ui/Input/types/input.d.ts +0 -10
- package/dist/ui/Select/index.d.ts +0 -3
- package/dist/ui/Select/types/select.d.ts +0 -16
- package/dist/ui/index.d.ts +0 -3
- package/dist/ui.cjs.js +0 -1
- package/dist/ui.d.ts +0 -1
- package/dist/ui.es.js +0 -6
- package/dist/utils/classnames.d.ts +0 -16
- package/dist/utils/index.d.ts +0 -1
- package/dist/utils.cjs.js +0 -1
- package/dist/utils.d.ts +0 -1
- package/dist/utils.es.js +0 -29
package/dist/index.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-DN3Jte8S.cjs"),s=require("./utils.cjs.js");exports.Button=e.Button;exports.Input=e.Input;exports.ProcessHubProvider=e.ProcessHubProvider;exports.Select=e.Select;exports.useTheme=e.useTheme;exports.classnames=s.classnames;
|
package/dist/index.d.ts
DELETED
package/dist/index.es.js
DELETED
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.18 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-font-weight:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";--font-mono:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;--color-red-500:oklch(63.7% .237 25.331);--color-red-600:oklch(57.7% .245 27.325);--color-red-700:oklch(50.5% .213 27.518);--color-yellow-500:oklch(79.5% .184 86.047);--color-yellow-600:oklch(68.1% .162 75.834);--color-green-500:oklch(72.3% .219 149.579);--color-green-600:oklch(62.7% .194 149.214);--color-blue-500:oklch(62.3% .214 259.815);--color-blue-600:oklch(54.6% .245 262.881);--color-gray-400:oklch(70.7% .022 261.325);--color-black:#000;--color-white:#fff;--spacing:.25rem;--text-sm:.875rem;--text-sm--line-height:calc(1.25/.875);--font-weight-medium:500;--font-weight-bold:700;--radius-lg:.5rem;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.absolute{position:absolute}.relative{position:relative}.static{position:static}.top-full{top:100%}.left-0{left:calc(var(--spacing)*0)}.z-10{z-index:10}.m-0{margin:calc(var(--spacing)*0)}.mt-1{margin-top:calc(var(--spacing)*1)}.mt-2{margin-top:calc(var(--spacing)*2)}.ml-3{margin-left:calc(var(--spacing)*3)}.block{display:block}.flex{display:flex}.max-h-72{max-height:calc(var(--spacing)*72)}.w-\[600px\]{width:600px}.w-auto{width:auto}.w-full{width:100%}.flex-1{flex:1}.transform{transform:var(--tw-rotate-x,)var(--tw-rotate-y,)var(--tw-rotate-z,)var(--tw-skew-x,)var(--tw-skew-y,)}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-start{justify-content:flex-start}.gap-2{gap:calc(var(--spacing)*2)}.overflow-y-auto{overflow-y:auto}.rounded-lg{border-radius:var(--radius-lg)}.border{border-style:var(--tw-border-style);border-width:1px}.border-none{--tw-border-style:none;border-style:none}.border-blue-500{border-color:var(--color-blue-500)}.border-green-500{border-color:var(--color-green-500)}.border-red-500{border-color:var(--color-red-500)}.border-transparent{border-color:#0000}.border-yellow-500{border-color:var(--color-yellow-500)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-gray-400\/40{background-color:#99a1af66}@supports (color:color-mix(in lab,red,red)){.bg-gray-400\/40{background-color:color-mix(in oklab,var(--color-gray-400)40%,transparent)}}.bg-green-500{background-color:var(--color-green-500)}.bg-red-500{background-color:var(--color-red-500)}.bg-transparent{background-color:#0000}.bg-yellow-500{background-color:var(--color-yellow-500)}.p-2{padding:calc(var(--spacing)*2)}.p-2\.5{padding:calc(var(--spacing)*2.5)}.p-3{padding:calc(var(--spacing)*3)}.px-2{padding-inline:calc(var(--spacing)*2)}.px-4{padding-inline:calc(var(--spacing)*4)}.py-2{padding-block:calc(var(--spacing)*2)}.pr-8{padding-right:calc(var(--spacing)*8)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.text-black{color:var(--color-black)}.text-blue-600{color:var(--color-blue-600)}.text-green-600{color:var(--color-green-600)}.text-red-500{color:var(--color-red-500)}.text-red-600{color:var(--color-red-600)}.text-red-700{color:var(--color-red-700)}.text-white{color:var(--color-white)}.text-yellow-600{color:var(--color-yellow-600)}.placeholder-red-500::placeholder{color:var(--color-red-500)}.opacity-50{opacity:.5}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a),0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.first-letter\:uppercase:first-letter{text-transform:uppercase}@media (hover:hover){.hover\:bg-blue-500:hover{background-color:var(--color-blue-500)}.hover\:bg-blue-600:hover{background-color:var(--color-blue-600)}.hover\:bg-green-600:hover{background-color:var(--color-green-600)}.hover\:bg-red-500:hover{background-color:var(--color-red-500)}.hover\:bg-red-600:hover{background-color:var(--color-red-600)}.hover\:bg-yellow-500:hover{background-color:var(--color-yellow-500)}.hover\:bg-yellow-600:hover{background-color:var(--color-yellow-600)}.hover\:text-black:hover{color:var(--color-black)}.hover\:text-white:hover{color:var(--color-white)}}.focus\:border-red-500:focus{border-color:var(--color-red-500)}.focus\:ring-red-500:focus{--tw-ring-color:var(--color-red-500)}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}@media (prefers-color-scheme:dark){.dark\:text-red-500{color:var(--color-red-500)}}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
export declare const COLORS: {
|
|
2
|
-
green: {
|
|
3
|
-
solid: {
|
|
4
|
-
bg: string;
|
|
5
|
-
hover: string;
|
|
6
|
-
text: string;
|
|
7
|
-
border: string;
|
|
8
|
-
};
|
|
9
|
-
outline: {
|
|
10
|
-
bg: string;
|
|
11
|
-
hover: string;
|
|
12
|
-
text: string;
|
|
13
|
-
border: string;
|
|
14
|
-
};
|
|
15
|
-
ghost: {
|
|
16
|
-
bg: string;
|
|
17
|
-
hover: string;
|
|
18
|
-
text: string;
|
|
19
|
-
border: string;
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
blue: {
|
|
23
|
-
solid: {
|
|
24
|
-
bg: string;
|
|
25
|
-
hover: string;
|
|
26
|
-
text: string;
|
|
27
|
-
border: string;
|
|
28
|
-
};
|
|
29
|
-
outline: {
|
|
30
|
-
bg: string;
|
|
31
|
-
hover: string;
|
|
32
|
-
text: string;
|
|
33
|
-
border: string;
|
|
34
|
-
};
|
|
35
|
-
ghost: {
|
|
36
|
-
bg: string;
|
|
37
|
-
hover: string;
|
|
38
|
-
text: string;
|
|
39
|
-
border: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
red: {
|
|
43
|
-
solid: {
|
|
44
|
-
bg: string;
|
|
45
|
-
hover: string;
|
|
46
|
-
text: string;
|
|
47
|
-
border: string;
|
|
48
|
-
};
|
|
49
|
-
outline: {
|
|
50
|
-
bg: string;
|
|
51
|
-
hover: string;
|
|
52
|
-
text: string;
|
|
53
|
-
border: string;
|
|
54
|
-
};
|
|
55
|
-
ghost: {
|
|
56
|
-
bg: string;
|
|
57
|
-
hover: string;
|
|
58
|
-
text: string;
|
|
59
|
-
border: string;
|
|
60
|
-
};
|
|
61
|
-
};
|
|
62
|
-
yellow: {
|
|
63
|
-
solid: {
|
|
64
|
-
bg: string;
|
|
65
|
-
hover: string;
|
|
66
|
-
text: string;
|
|
67
|
-
border: string;
|
|
68
|
-
};
|
|
69
|
-
outline: {
|
|
70
|
-
bg: string;
|
|
71
|
-
hover: string;
|
|
72
|
-
text: string;
|
|
73
|
-
border: string;
|
|
74
|
-
};
|
|
75
|
-
ghost: {
|
|
76
|
-
bg: string;
|
|
77
|
-
hover: string;
|
|
78
|
-
text: string;
|
|
79
|
-
border: string;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
primary: {
|
|
83
|
-
solid: {
|
|
84
|
-
bg: string;
|
|
85
|
-
hover: string;
|
|
86
|
-
text: string;
|
|
87
|
-
border: string;
|
|
88
|
-
};
|
|
89
|
-
outline: {
|
|
90
|
-
bg: string;
|
|
91
|
-
hover: string;
|
|
92
|
-
text: string;
|
|
93
|
-
border: string;
|
|
94
|
-
};
|
|
95
|
-
ghost: {
|
|
96
|
-
bg: string;
|
|
97
|
-
hover: string;
|
|
98
|
-
text: string;
|
|
99
|
-
border: string;
|
|
100
|
-
};
|
|
101
|
-
};
|
|
102
|
-
secondary: {
|
|
103
|
-
solid: {
|
|
104
|
-
bg: string;
|
|
105
|
-
hover: string;
|
|
106
|
-
text: string;
|
|
107
|
-
border: string;
|
|
108
|
-
};
|
|
109
|
-
outline: {
|
|
110
|
-
bg: string;
|
|
111
|
-
hover: string;
|
|
112
|
-
text: string;
|
|
113
|
-
border: string;
|
|
114
|
-
};
|
|
115
|
-
ghost: {
|
|
116
|
-
bg: string;
|
|
117
|
-
hover: string;
|
|
118
|
-
text: string;
|
|
119
|
-
border: string;
|
|
120
|
-
};
|
|
121
|
-
};
|
|
122
|
-
destructive: {
|
|
123
|
-
solid: {
|
|
124
|
-
bg: string;
|
|
125
|
-
hover: string;
|
|
126
|
-
text: string;
|
|
127
|
-
border: string;
|
|
128
|
-
};
|
|
129
|
-
outline: {
|
|
130
|
-
bg: string;
|
|
131
|
-
hover: string;
|
|
132
|
-
text: string;
|
|
133
|
-
border: string;
|
|
134
|
-
};
|
|
135
|
-
ghost: {
|
|
136
|
-
bg: string;
|
|
137
|
-
hover: string;
|
|
138
|
-
text: string;
|
|
139
|
-
border: string;
|
|
140
|
-
};
|
|
141
|
-
};
|
|
142
|
-
card: {
|
|
143
|
-
solid: {
|
|
144
|
-
bg: string;
|
|
145
|
-
hover: string;
|
|
146
|
-
text: string;
|
|
147
|
-
border: string;
|
|
148
|
-
};
|
|
149
|
-
outline: {
|
|
150
|
-
bg: string;
|
|
151
|
-
hover: string;
|
|
152
|
-
text: string;
|
|
153
|
-
border: string;
|
|
154
|
-
};
|
|
155
|
-
ghost: {
|
|
156
|
-
bg: string;
|
|
157
|
-
hover: string;
|
|
158
|
-
text: string;
|
|
159
|
-
border: string;
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { COLORS } from '../colors';
|
|
2
|
-
|
|
3
|
-
export interface ButtonProps {
|
|
4
|
-
onClick?: (e?: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
|
|
5
|
-
title: string;
|
|
6
|
-
icon?: JSX.Element;
|
|
7
|
-
positionIcon?: "left" | "right";
|
|
8
|
-
disable?: boolean;
|
|
9
|
-
className?: string;
|
|
10
|
-
type?: "button" | "submit" | "reset";
|
|
11
|
-
color: Color;
|
|
12
|
-
variant?: "solid" | "outline" | "ghost";
|
|
13
|
-
}
|
|
14
|
-
export interface CustomColors {
|
|
15
|
-
}
|
|
16
|
-
export type Color = keyof typeof COLORS | keyof CustomColors | (string & {});
|
package/dist/ui/Input/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type inputElementsType<T> = {
|
|
2
|
-
mask?: string;
|
|
3
|
-
field: keyof T;
|
|
4
|
-
title: string;
|
|
5
|
-
iconPosition?: "left" | "right";
|
|
6
|
-
icon?: React.JSX.Element;
|
|
7
|
-
} & React.InputHTMLAttributes<HTMLInputElement | HTMLSelectElement>;
|
|
8
|
-
export type InputProps<T> = {
|
|
9
|
-
error?: string;
|
|
10
|
-
} & inputElementsType<T>;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export type SelectProps<T> = {
|
|
2
|
-
title: string;
|
|
3
|
-
id: string;
|
|
4
|
-
placeholder?: string;
|
|
5
|
-
field: keyof T & string;
|
|
6
|
-
value: string;
|
|
7
|
-
options: T[];
|
|
8
|
-
icon?: React.ReactNode;
|
|
9
|
-
iconPosition?: "left" | "right";
|
|
10
|
-
error?: string;
|
|
11
|
-
required?: boolean;
|
|
12
|
-
onChange?: (value: T) => void;
|
|
13
|
-
selected?: T;
|
|
14
|
-
isClearable?: boolean;
|
|
15
|
-
searchable?: boolean;
|
|
16
|
-
};
|
package/dist/ui/index.d.ts
DELETED
package/dist/ui.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index-DN3Jte8S.cjs");exports.Button=t.Button;exports.Input=t.Input;exports.Select=t.Select;
|
package/dist/ui.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ui/index'
|
package/dist/ui.es.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Constrói uma string de classes CSS dinamicamente.
|
|
3
|
-
*
|
|
4
|
-
* Aceita qualquer número de argumentos do tipo string, boolean, null, undefined ou objeto:
|
|
5
|
-
* - Strings são adicionadas diretamente.
|
|
6
|
-
* - Objetos: chaves com valor truthy são incluídas como classes.
|
|
7
|
-
* - Arrays são processados recursivamente.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* classnames("btn", { active: isActive, disabled: false }, ["px-2", null])
|
|
11
|
-
* // Resultado: "btn active px-2"
|
|
12
|
-
*
|
|
13
|
-
* @param {...(string | object | undefined | null | boolean)[]} args - Lista de classes e condições.
|
|
14
|
-
* @returns {string} String final de classes separadas por espaço.
|
|
15
|
-
*/
|
|
16
|
-
export declare function classnames(...args: (string | object | undefined | null | boolean)[]): string;
|
package/dist/utils/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './classnames';
|
package/dist/utils.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s={}.hasOwnProperty;function i(...t){let n="";for(let e=0;e<t.length;e++){const r=t[e];r&&(n=o(n,c(r)))}return n}function c(t){if(typeof t=="string")return t;if(typeof t!="object"||t===null)return"";if(Array.isArray(t))return i(...t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();let n="";for(const e in t)s.call(t,e)&&t[e]&&(n=o(n,e));return n}function o(t,n){return n?t?`${t} ${n}`:n:t}exports.classnames=i;
|
package/dist/utils.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './utils/index'
|
package/dist/utils.es.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
const o = {}.hasOwnProperty;
|
|
2
|
-
function s(...t) {
|
|
3
|
-
let n = "";
|
|
4
|
-
for (let e = 0; e < t.length; e++) {
|
|
5
|
-
const r = t[e];
|
|
6
|
-
r && (n = i(n, c(r)));
|
|
7
|
-
}
|
|
8
|
-
return n;
|
|
9
|
-
}
|
|
10
|
-
function c(t) {
|
|
11
|
-
if (typeof t == "string")
|
|
12
|
-
return t;
|
|
13
|
-
if (typeof t != "object" || t === null)
|
|
14
|
-
return "";
|
|
15
|
-
if (Array.isArray(t))
|
|
16
|
-
return s(...t);
|
|
17
|
-
if (t.toString !== Object.prototype.toString && !t.toString.toString().includes("[native code]"))
|
|
18
|
-
return t.toString();
|
|
19
|
-
let n = "";
|
|
20
|
-
for (const e in t)
|
|
21
|
-
o.call(t, e) && t[e] && (n = i(n, e));
|
|
22
|
-
return n;
|
|
23
|
-
}
|
|
24
|
-
function i(t, n) {
|
|
25
|
-
return n ? t ? `${t} ${n}` : n : t;
|
|
26
|
-
}
|
|
27
|
-
export {
|
|
28
|
-
s as classnames
|
|
29
|
-
};
|