groovinads-ui 1.0.5 → 1.0.7
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/.yarn/install-state.gz +0 -0
- package/dist/index.es.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +3 -1
- package/rollup.config.mjs +3 -1
- package/src/components/Button/Button.jsx +9 -9
package/.yarn/install-state.gz
CHANGED
|
Binary file
|
package/dist/index.es.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import e from"react";const n=({variant:n,size:
|
|
1
|
+
import e from"react";const n=({variant:n,size:t,onClick:a,children:l,icon:r,iconPosition:s,className:i,style:c,processing:m})=>{let o=`btn ${i}`;"default"!==n&&(o+=` btn-${n}`),"md"!==t&&(o+=` btn-${t}`),"default"!==c&&(o+=` btn-${c}`),m&&(o+=" btn-processing");const d=m?e.createElement(e.Fragment,null,e.createElement("i",{className:"fa-solid fa-spinner-third fa-spin","aria-hidden":"true"}),l&&e.createElement("span",null,l,"…")):r?"end"===s?e.createElement(e.Fragment,null,l&&e.createElement("span",null,l),e.createElement("i",{className:`fa-solid ${r}`,"aria-hidden":"true"})):e.createElement(e.Fragment,null,e.createElement("i",{className:`fa-solid ${r}`,"aria-hidden":"true"}),l&&e.createElement("span",null,l)):l&&e.createElement("span",null,l);return e.createElement("button",{className:o,onClick:a},d)};n.propTypes={},n.defaultProps={variant:"primary",size:"md",onClick:null,icon:null,iconPosition:"start",className:"",style:"default",processing:!1};export{n as Button};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e=require("react");const n=({variant:n,size:t,onClick:a,children:
|
|
1
|
+
"use strict";var e=require("react");const n=({variant:n,size:t,onClick:a,children:l,icon:r,iconPosition:s,className:i,style:c,processing:o})=>{let m=`btn ${i}`;"default"!==n&&(m+=` btn-${n}`),"md"!==t&&(m+=` btn-${t}`),"default"!==c&&(m+=` btn-${c}`),o&&(m+=" btn-processing");const u=o?e.createElement(e.Fragment,null,e.createElement("i",{className:"fa-solid fa-spinner-third fa-spin","aria-hidden":"true"}),l&&e.createElement("span",null,l,"…")):r?"end"===s?e.createElement(e.Fragment,null,l&&e.createElement("span",null,l),e.createElement("i",{className:`fa-solid ${r}`,"aria-hidden":"true"})):e.createElement(e.Fragment,null,e.createElement("i",{className:`fa-solid ${r}`,"aria-hidden":"true"}),l&&e.createElement("span",null,l)):l&&e.createElement("span",null,l);return e.createElement("button",{className:m,onClick:a},u)};n.propTypes={},n.defaultProps={variant:"primary",size:"md",onClick:null,icon:null,iconPosition:"start",className:"",style:"default",processing:!1},exports.Button=n;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "groovinads-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.es.js",
|
|
6
6
|
"repository": "git@bitbucket.org:groovinads/react-components.git",
|
|
@@ -29,8 +29,10 @@
|
|
|
29
29
|
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
30
30
|
"rollup-plugin-postcss": "^4.0.2",
|
|
31
31
|
"rollup-plugin-terser": "^7.0.2",
|
|
32
|
+
"rollup-plugin-typescript2": "^0.36.0",
|
|
32
33
|
"sass": "^1.72.0",
|
|
33
34
|
"storybook": "^8.0.4",
|
|
35
|
+
"typescript": "^5.4.4",
|
|
34
36
|
"vite": "^5.2.2"
|
|
35
37
|
},
|
|
36
38
|
"peerDependencies": {
|
package/rollup.config.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import resolve from '@rollup/plugin-node-resolve';
|
|
|
3
3
|
import external from 'rollup-plugin-peer-deps-external';
|
|
4
4
|
import { terser } from 'rollup-plugin-terser';
|
|
5
5
|
import postcss from 'rollup-plugin-postcss';
|
|
6
|
+
// import typescript from 'rollup-plugin-typescript2';
|
|
6
7
|
|
|
7
8
|
export default [
|
|
8
9
|
{
|
|
@@ -28,7 +29,8 @@ export default [
|
|
|
28
29
|
presets: ['@babel/preset-react']
|
|
29
30
|
}),
|
|
30
31
|
external(),
|
|
31
|
-
|
|
32
|
+
// typescript(), // Añade esto para procesar archivos TypeScript
|
|
33
|
+
resolve({extensions: ['.mjs', '.js', '.jsx', '.ts', '.tsx', '.json']}),
|
|
32
34
|
terser(),
|
|
33
35
|
]
|
|
34
36
|
}
|
|
@@ -64,15 +64,15 @@ const Button = ({
|
|
|
64
64
|
};
|
|
65
65
|
|
|
66
66
|
Button.propTypes = {
|
|
67
|
-
variant: PropTypes.oneOf(['primary', 'secondary', 'terciary', 'outline']),
|
|
68
|
-
size: PropTypes.oneOf(['xs', 'md', 'lg']),
|
|
69
|
-
onClick: PropTypes.func,
|
|
70
|
-
children: PropTypes.node,
|
|
71
|
-
icon: PropTypes.node,
|
|
72
|
-
iconPosition: PropTypes.oneOf(['start', 'end']),
|
|
73
|
-
className: PropTypes.string,
|
|
74
|
-
style: PropTypes.oneOf(['default', 'success', 'danger', 'warning', 'link']),
|
|
75
|
-
processing: PropTypes.bool,
|
|
67
|
+
// variant: PropTypes.oneOf(['primary', 'secondary', 'terciary', 'outline']),
|
|
68
|
+
// size: PropTypes.oneOf(['xs', 'md', 'lg']),
|
|
69
|
+
// onClick: PropTypes.func,
|
|
70
|
+
// children: PropTypes.node,
|
|
71
|
+
// icon: PropTypes.node,
|
|
72
|
+
// iconPosition: PropTypes.oneOf(['start', 'end']),
|
|
73
|
+
// className: PropTypes.string,
|
|
74
|
+
// style: PropTypes.oneOf(['default', 'success', 'danger', 'warning', 'link']),
|
|
75
|
+
// processing: PropTypes.bool,
|
|
76
76
|
};
|
|
77
77
|
|
|
78
78
|
Button.defaultProps = {
|