@nextelco/common-ui 1.1.10 → 1.3.0

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/index.js ADDED
@@ -0,0 +1 @@
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define(["react"],t):"object"==typeof exports?exports.MyReactLibrary=t(require("react")):e.MyReactLibrary=t(e.react)}(this,(e=>(()=>{"use strict";var t={129:(e,t,n)=>{n.d(t,{A:()=>i});var r=n(601),o=n.n(r),a=n(314),c=n.n(a)()(o());c.push([e.id,"/* src/components/Button/Button.css */\n.custom-button {\n background-color: blue;\n color: white;\n padding: 10px 20px;\n border: none;\n border-radius: 5px;\n cursor: pointer;\n}\n",""]);const i=c},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var c={};if(r)for(var i=0;i<this.length;i++){var s=this[i][0];null!=s&&(c[s]=!0)}for(var u=0;u<e.length;u++){var p=[].concat(e[u]);r&&c[p[0]]||(void 0!==a&&(void 0===p[5]||(p[1]="@layer".concat(p[5].length>0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=a),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),o&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=o):p[4]="".concat(o)),t.push(p))}},t}},601:e=>{e.exports=function(e){return e[1]}},72:e=>{var t=[];function n(e){for(var n=-1,r=0;r<t.length;r++)if(t[r].identifier===e){n=r;break}return n}function r(e,r){for(var a={},c=[],i=0;i<e.length;i++){var s=e[i],u=r.base?s[0]+r.base:s[0],p=a[u]||0,d="".concat(u," ").concat(p);a[u]=p+1;var l=n(d),f={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==l)t[l].references++,t[l].updater(f);else{var v=o(f,r);r.byIndex=i,t.splice(i,0,{identifier:d,updater:v,references:1})}c.push(d)}return c}function o(e,t){var n=t.domAPI(t);return n.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;n.update(e=t)}else n.remove()}}e.exports=function(e,o){var a=r(e=e||[],o=o||{});return function(e){e=e||[];for(var c=0;c<a.length;c++){var i=n(a[c]);t[i].references--}for(var s=r(e,o),u=0;u<a.length;u++){var p=n(a[u]);0===t[p].references&&(t[p].updater(),t.splice(p,1))}a=s}}},659:e=>{var t={};e.exports=function(e,n){var r=function(e){if(void 0===t[e]){var n=document.querySelector(e);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}t[e]=n}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:e=>{e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},56:(e,t,n)=>{e.exports=function(e){var t=n.nc;t&&e.setAttribute("nonce",t)}},825:e=>{e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(n){!function(e,t,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,o&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var a=n.sourceMap;a&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113:e=>{e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},155:t=>{t.exports=e}},n={};function r(e){var o=n[e];if(void 0!==o)return o.exports;var a=n[e]={id:e,exports:{}};return t[e](a,a.exports,r),a.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.nc=void 0;var o={};r.r(o),r.d(o,{Button:()=>M});var a=r(155),c=r.n(a),i=r(72),s=r.n(i),u=r(825),p=r.n(u),d=r(659),l=r.n(d),f=r(56),v=r.n(f),m=r(540),y=r.n(m),h=r(113),b=r.n(h),g=r(129),x={};x.styleTagTransform=b(),x.setAttributes=v(),x.insert=l().bind(null,"head"),x.domAPI=p(),x.insertStyleElement=y(),s()(g.A,x),g.A&&g.A.locals&&g.A.locals;const M=({children:e,onClick:t})=>c().createElement("button",{className:"custom-button",onClick:t},e);return o})()));
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import './Button.css';
3
+ interface ButtonProps {
4
+ children: React.ReactNode;
5
+ onClick: () => void;
6
+ }
7
+ declare const Button: React.FC<ButtonProps>;
8
+ export default Button;
@@ -0,0 +1 @@
1
+ export { default as Button } from './components/Button/Button';
package/package.json CHANGED
@@ -1,76 +1,26 @@
1
- {
2
- "name": "@nextelco/common-ui",
3
- "private": false,
4
- "version": "1.1.10",
5
- "type": "module",
6
- "main": "dist/common-ui.umd.js",
7
- "module": "dist/common-ui.es.js",
8
- "types": "dist/common-ui.d.ts",
9
- "files": [
10
- "dist"
11
- ],
12
- "exports": {
13
- ".": {
14
- "import": "./dist/common-ui.es.js",
15
- "require": "./dist/common-ui.umd.js",
16
- "types": "./dist/common-ui.d.ts"
17
- }
18
- },
19
- "peerDependencies": {
20
- "react": "^18.0.0",
21
- "react-dom": "^18.0.0"
22
- },
23
- "scripts": {
24
- "dev": "vite",
25
- "build": "tsc -b && vite build",
26
- "lint": "eslint .",
27
- "preview": "vite preview",
28
- "storybook": "storybook dev -p 6006",
29
- "build-storybook": "storybook build",
30
- "prepublishOnly": "npm run build",
31
- "pub": "git add . && git commit -m \"update\" && git push && npm version patch && npm run build && npm publish --access public"
32
- },
33
- "dependencies": {
34
- "@fortawesome/fontawesome-free": "^6.7.2",
35
- "@fortawesome/fontawesome-svg-core": "^6.7.2",
36
- "@fortawesome/free-brands-svg-icons": "^6.7.2",
37
- "@fortawesome/free-regular-svg-icons": "^6.7.2",
38
- "@fortawesome/free-solid-svg-icons": "^6.7.2",
39
- "@fortawesome/react-fontawesome": "^0.2.2"
40
- },
41
- "devDependencies": {
42
- "@chromatic-com/storybook": "^3.2.4",
43
- "@eslint/js": "^9.17.0",
44
- "@storybook/addon-a11y": "^8.5.3",
45
- "@storybook/addon-essentials": "^8.5.3",
46
- "@storybook/addon-interactions": "^8.5.3",
47
- "@storybook/addon-onboarding": "^8.5.3",
48
- "@storybook/blocks": "^8.5.3",
49
- "@storybook/react": "^8.5.3",
50
- "@storybook/react-vite": "^8.5.3",
51
- "@storybook/test": "^8.5.3",
52
- "@types/node": "^22.13.1",
53
- "@types/react": "^18.3.18",
54
- "@types/react-dom": "^18.3.5",
55
- "@vitejs/plugin-react": "^4.3.4",
56
- "eslint": "^9.17.0",
57
- "eslint-plugin-react-hooks": "^5.0.0",
58
- "eslint-plugin-react-refresh": "^0.4.16",
59
- "eslint-plugin-storybook": "^0.11.2",
60
- "globals": "^15.14.0",
61
- "rollup-plugin-dts": "^6.1.1",
62
- "sass": "^1.83.4",
63
- "sass-embedded": "^1.83.4",
64
- "storybook": "^8.5.3",
65
- "storybook-addon-designs": "^6.3.1",
66
- "typescript": "~5.6.2",
67
- "typescript-eslint": "^8.18.2",
68
- "vite": "^6.1.0",
69
- "vite-plugin-dts": "^4.5.0"
70
- },
71
- "eslintConfig": {
72
- "extends": [
73
- "plugin:storybook/recommended"
74
- ]
75
- }
76
- }
1
+ {
2
+ "name": "@nextelco/common-ui",
3
+ "version": "1.3.0",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "build": "webpack --mode production"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "peerDependencies": {
13
+ "react": "^19.0.0",
14
+ "react-dom": "^19.0.0"
15
+ },
16
+ "devDependencies": {
17
+ "@types/react": "^19.0.8",
18
+ "@types/react-dom": "^19.0.3",
19
+ "css-loader": "^7.1.2",
20
+ "style-loader": "^4.0.0",
21
+ "ts-loader": "^9.5.2",
22
+ "typescript": "^5.7.3",
23
+ "webpack": "^5.97.1",
24
+ "webpack-cli": "^6.0.1"
25
+ }
26
+ }
@@ -0,0 +1,9 @@
1
+ /* src/components/Button/Button.css */
2
+ .custom-button {
3
+ background-color: blue;
4
+ color: white;
5
+ padding: 10px 20px;
6
+ border: none;
7
+ border-radius: 5px;
8
+ cursor: pointer;
9
+ }
@@ -0,0 +1,18 @@
1
+ // src/components/Button/Button.tsx
2
+ import React from 'react'
3
+ import './Button.css'
4
+
5
+ interface ButtonProps {
6
+ children: React.ReactNode
7
+ onClick: () => void
8
+ }
9
+
10
+ const Button: React.FC<ButtonProps> = ({ children, onClick }) => {
11
+ return (
12
+ <button className="custom-button" onClick={onClick}>
13
+ {children}
14
+ </button>
15
+ )
16
+ }
17
+
18
+ export default Button
package/src/index.ts ADDED
@@ -0,0 +1 @@
1
+ export { default as Button } from './components/Button/Button'
package/tsconfig.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "compilerOptions": {
3
+ "outDir": "./dist",
4
+ "module": "ESNext",
5
+ "target": "ES6",
6
+ "lib": ["DOM", "DOM.Iterable", "ESNext"],
7
+ "declaration": true,
8
+ "declarationDir": "./dist/types",
9
+ "jsx": "react",
10
+ "strict": true,
11
+ "esModuleInterop": true,
12
+ "skipLibCheck": true,
13
+ "forceConsistentCasingInFileNames": true,
14
+ "moduleResolution": "node"
15
+ },
16
+ "include": ["src"],
17
+ "exclude": ["node_modules"]
18
+ }
@@ -0,0 +1,32 @@
1
+ const path = require('path')
2
+
3
+ module.exports = {
4
+ entry: './src/index.ts',
5
+ output: {
6
+ path: path.resolve(__dirname, 'dist'),
7
+ filename: 'index.js',
8
+ library: 'MyReactLibrary',
9
+ libraryTarget: 'umd',
10
+ globalObject: 'this',
11
+ },
12
+ resolve: {
13
+ extensions: ['.ts', '.tsx', '.js'],
14
+ },
15
+ module: {
16
+ rules: [
17
+ {
18
+ test: /\.tsx?$/,
19
+ exclude: /node_modules/,
20
+ use: 'ts-loader',
21
+ },
22
+ {
23
+ test: /\.css$/,
24
+ use: ['style-loader', 'css-loader'],
25
+ },
26
+ ],
27
+ },
28
+ externals: {
29
+ react: 'react',
30
+ 'react-dom': 'react-dom',
31
+ },
32
+ }
@@ -1 +0,0 @@
1
- ._button_eaulr_1{border:none;font-weight:700;cursor:pointer;transition:background-color .2s ease-in-out}._button_eaulr_1:hover{opacity:.9}._actions_eaulr_13{display:flex;border-radius:5vw;align-items:center;justify-content:center}._actions_eaulr_13 ._md_eaulr_21{width:11rem;height:2rem;padding:.6rem;font-size:.9rem;font-weight:600;line-height:.9rem}._actions_eaulr_13 ._sm_eaulr_30{width:8.9rem;height:1.2rem;padding:.6rem;font-size:.9rem;font-weight:600;line-height:.9rem}._actions_eaulr_13 ._lg_eaulr_39{width:20rem;height:5.2rem;padding:.6rem;font-size:.9rem;font-weight:600;line-height:.9rem}._actions_eaulr_13 ._icon_eaulr_48{border-radius:50%;width:1.3rem;height:1.3rem;margin-right:.5rem}._actions_eaulr_13 ._img_eaulr_55{width:1.3rem;height:1.3rem;margin-right:.5rem}._actions_eaulr_13._add_eaulr_62{background-color:var(--bright-blue);color:var(--almost-white)}._actions_eaulr_13._add_eaulr_62 ._icon_eaulr_48{color:var(--almost-white);background-color:var(--bright-blue)}._actions_eaulr_13._add_eaulr_62:hover{background-color:var(--approved)}._actions_eaulr_13._choose_file_eaulr_77{background-color:var(--bright-blue);color:var(--almost-white)}._actions_eaulr_13._choose_file_eaulr_77 ._icon_eaulr_48{color:var(--almost-white);margin-top:.6rem;margin-bottom:.6rem}._actions_eaulr_13._choose_file_eaulr_77:hover{background-color:var(--medium-blue)}._actions_eaulr_13._download_file_eaulr_93{background-color:var(--medium-gray-01);color:var(--almost-white)}._actions_eaulr_13._download_file_eaulr_93 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._download_file_eaulr_93:hover{background-color:var(--dark-gray)}._actions_eaulr_13._exec_validator_eaulr_107{width:13rem;background-color:var(--medium-gray-01);color:var(--almost-white)}._actions_eaulr_13._exec_validator_eaulr_107 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._exec_validator_eaulr_107:hover{background-color:var(--dark-gray)}._actions_eaulr_13._project_valid_eaulr_122{width:13rem;background-color:var(--approved);color:var(--almost-white)}._actions_eaulr_13._project_valid_eaulr_122 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._project_valid_eaulr_122:hover{background-color:var(--approved);color:var(--almost-white);opacity:1}._actions_eaulr_13._project_invalid_eaulr_139{width:13rem;background-color:var(--rejected);color:var(--almost-white)}._actions_eaulr_13._project_invalid_eaulr_139 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._project_invalid_eaulr_139:hover{background-color:var(--rejected);color:var(--almost-white);opacity:1}._actions_eaulr_13._generate_BoM_eaulr_156{width:13rem;background-color:var(--medium-gray-01);color:var(--almost-white)}._actions_eaulr_13._generate_BoM_eaulr_156 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._generate_BoM_eaulr_156:hover{background-color:var(--dark-gray)}._actions_eaulr_13._re_generate_pre_BoM_eaulr_171{width:13rem;background-color:var(--medium-gray-01);color:var(--almost-white)}._actions_eaulr_13._re_generate_pre_BoM_eaulr_171 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._re_generate_pre_BoM_eaulr_171:hover{background-color:var(--dark-gray)}._actions_eaulr_13._generate_pre_sinotics_eaulr_186{width:13rem;background-color:var(--medium-gray-01);color:var(--almost-white)}._actions_eaulr_13._generate_pre_sinotics_eaulr_186 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._generate_pre_sinotics_eaulr_186:hover{background-color:var(--dark-gray)}._actions_eaulr_13._save_eaulr_201{padding:.6rem;font-size:.9rem;font-weight:600;line-height:.9rem;background-color:var(--medium-gray-01);color:var(--almost-white)}._actions_eaulr_13._save_eaulr_201 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._save_eaulr_201:hover{background-color:var(--dark-gray)}._actions_eaulr_13._cancel_eaulr_219{padding:.6rem;font-size:.9rem;font-weight:600;line-height:.9rem;background-color:var(--medium-gray-01);color:var(--almost-white)}._actions_eaulr_13._cancel_eaulr_219 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._cancel_eaulr_219:hover{background-color:var(--dark-gray)}._actions_eaulr_13._tasks_history_eaulr_237{padding:.6rem;font-size:.9rem;font-weight:600;line-height:.9rem;background-color:var(--light-gray-01);color:var(--dark-blue)}._actions_eaulr_13._tasks_history_eaulr_237 ._icon_eaulr_48{color:var(--dark-blue)}._actions_eaulr_13._tasks_history_eaulr_237:hover{background-color:var(--medium-gray-01)}._actions_eaulr_13._errors_history_eaulr_255{padding:.6rem;font-size:.9rem;font-weight:600;line-height:.9rem;background-color:var(--light-gray-01);color:var(--dark-blue)}._actions_eaulr_13._errors_history_eaulr_255 ._icon_eaulr_48{color:var(--dark-blue)}._actions_eaulr_13._errors_history_eaulr_255:hover{background-color:var(--medium-gray-01)}._actions_eaulr_13._download_excel_eaulr_273{width:13rem;background-color:var(--medium-gray-01);color:var(--almost-white)}._actions_eaulr_13._download_excel_eaulr_273 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._download_excel_eaulr_273:hover{background-color:var(--dark-gray)}._actions_eaulr_13._delete_file_eaulr_288{color:var(--almost-white);background-color:var(--medium-gray-01)}._actions_eaulr_13._delete_file_eaulr_288 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._delete_file_eaulr_288:hover{background-color:var(--rejected)}._actions_eaulr_13._delete_eaulr_288{color:var(--almost-white);background-color:var(--medium-gray-01)}._actions_eaulr_13._delete_eaulr_288 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._delete_eaulr_288:hover{background-color:var(--rejected)}._actions_eaulr_13._save_project_eaulr_316{padding:.6rem;font-size:.9rem;font-weight:600;line-height:.9rem}._actions_eaulr_13._save_project_eaulr_316{color:var(--almost-white);background-color:var(--medium-green)}._actions_eaulr_13._save_project_eaulr_316 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._save_project_eaulr_316:hover{background-color:var(--approved)}._actions_eaulr_13._delete_project_eaulr_337{padding:.6rem;font-size:.9rem;font-weight:600;line-height:.9rem}._actions_eaulr_13._delete_project_eaulr_337{color:var(--almost-white);background-color:var(--medium-gray-01)}._actions_eaulr_13._delete_project_eaulr_337 ._icon_eaulr_48{color:var(--almost-white)}._actions_eaulr_13._delete_project_eaulr_337:hover{background-color:var(--rejected)}._user_actions_eaulr_358{display:flex;border-radius:2.5rem;align-items:center;justify-content:center}._user_actions_eaulr_358._logout_eaulr_365 ._icon_eaulr_48{transform:rotate(180deg);border-radius:50%;width:1.3rem;height:1.3rem;margin-right:.5rem}._user_actions_eaulr_358 ._lg_eaulr_39{width:16rem;height:2.5rem;padding:.6rem;font-size:1.25rem;font-weight:600;line-height:.9rem}._user_actions_eaulr_358._logout_eaulr_365{background-color:var(--almost-white);color:var(--dark-blue)}._user_actions_eaulr_358._logout_eaulr_365 ._icon_eaulr_48{color:var(--dark-blue)}._user_actions_eaulr_358._logout_eaulr_365:hover{background-color:var(--dark-gray)}._user_actions_eaulr_358._login_eaulr_396 ._icon_eaulr_48{border-radius:50%;width:1.3rem;height:1.3rem;margin-right:.5rem}._user_actions_eaulr_358._login_eaulr_396{background-color:var(--almost-white);color:var(--dark-blue)}._user_actions_eaulr_358._login_eaulr_396 ._icon_eaulr_48{color:var(--dark-blue)}._user_actions_eaulr_358._login_eaulr_396:hover{background-color:var(--dark-gray)}._user_actions_eaulr_358._login_microsoft_eaulr_417 ._icon_eaulr_48{border-radius:50%;width:1.3rem;height:1.3rem;margin-right:.5rem}._user_actions_eaulr_358._login_microsoft_eaulr_417{background-color:var(--almost-white);color:var(--dark-blue)}._user_actions_eaulr_358._login_microsoft_eaulr_417 ._icon_eaulr_48{color:var(--dark-blue)}._user_actions_eaulr_358._login_microsoft_eaulr_417:hover{background-color:var(--dark-gray)}._content_eaulr_438{white-space:nowrap;display:flex;align-items:center;justify-content:center}._choose_file_eaulr_77{border-radius:1.5rem}._sublinhado_eaulr_449{border-bottom:3px solid red}