@nextelco/common-ui 1.3.1 → 1.3.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/dist/index.js +1 -1
- package/dist/types/components/atoms/Button/Button.d.ts +16 -0
- package/dist/types/components/atoms/Button/Button.stories.d.ts +10 -0
- package/dist/types/components/atoms/Light/Light.d.ts +6 -0
- package/dist/types/components/atoms/Light/Light.stories.d.ts +9 -0
- package/dist/types/components/atoms/Stack/Stack.d.ts +8 -0
- package/dist/types/components/atoms/Stack/Stack.stories.d.ts +14 -0
- package/dist/types/index.d.ts +2 -1
- package/package.json +30 -4
- package/dist/types/components/Button/Button.d.ts +0 -8
package/dist/index.js
CHANGED
@@ -1 +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={
|
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={671:(e,t,r)=>{r.d(t,{A:()=>c});var n=r(601),o=r.n(n),a=r(314),i=r.n(a)()(o());i.push([e.id,".Dny3CkTWKp35IrMHcFAg{padding:50px}",""]);const c=i},314:e=>{e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r="",n=void 0!==t[5];return t[4]&&(r+="@supports (".concat(t[4],") {")),t[2]&&(r+="@media ".concat(t[2]," {")),n&&(r+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),r+=e(t),n&&(r+="}"),t[2]&&(r+="}"),t[4]&&(r+="}"),r})).join("")},t.i=function(e,r,n,o,a){"string"==typeof e&&(e=[[null,e,void 0]]);var i={};if(n)for(var c=0;c<this.length;c++){var s=this[c][0];null!=s&&(i[s]=!0)}for(var u=0;u<e.length;u++){var d=[].concat(e[u]);n&&i[d[0]]||(void 0!==a&&(void 0===d[5]||(d[1]="@layer".concat(d[5].length>0?" ".concat(d[5]):""," {").concat(d[1],"}")),d[5]=a),r&&(d[2]?(d[1]="@media ".concat(d[2]," {").concat(d[1],"}"),d[2]=r):d[2]=r),o&&(d[4]?(d[1]="@supports (".concat(d[4],") {").concat(d[1],"}"),d[4]=o):d[4]="".concat(o)),t.push(d))}},t}},601:e=>{e.exports=function(e){return e[1]}},72:e=>{var t=[];function r(e){for(var r=-1,n=0;n<t.length;n++)if(t[n].identifier===e){r=n;break}return r}function n(e,n){for(var a={},i=[],c=0;c<e.length;c++){var s=e[c],u=n.base?s[0]+n.base:s[0],d=a[u]||0,l="".concat(u," ").concat(d);a[u]=d+1;var p=r(l),f={css:s[1],media:s[2],sourceMap:s[3],supports:s[4],layer:s[5]};if(-1!==p)t[p].references++,t[p].updater(f);else{var v=o(f,n);n.byIndex=c,t.splice(c,0,{identifier:l,updater:v,references:1})}i.push(l)}return i}function o(e,t){var r=t.domAPI(t);return r.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;r.update(e=t)}else r.remove()}}e.exports=function(e,o){var a=n(e=e||[],o=o||{});return function(e){e=e||[];for(var i=0;i<a.length;i++){var c=r(a[i]);t[c].references--}for(var s=n(e,o),u=0;u<a.length;u++){var d=r(a[u]);0===t[d].references&&(t[d].updater(),t.splice(d,1))}a=s}}},659:e=>{var t={};e.exports=function(e,r){var n=function(e){if(void 0===t[e]){var r=document.querySelector(e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}(e);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(r)}},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,r)=>{e.exports=function(e){var t=r.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(r){!function(e,t,r){var n="";r.supports&&(n+="@supports (".concat(r.supports,") {")),r.media&&(n+="@media ".concat(r.media," {"));var o=void 0!==r.layer;o&&(n+="@layer".concat(r.layer.length>0?" ".concat(r.layer):""," {")),n+=r.css,o&&(n+="}"),r.media&&(n+="}"),r.supports&&(n+="}");var a=r.sourceMap;a&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(a))))," */")),t.styleTagTransform(n,e,t.options)}(t,e,r)},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}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var a=r[e]={id:e,exports:{}};return t[e](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.nc=void 0;var o={};n.r(o),n.d(o,{Button:()=>T,Light:()=>S});var a=n(155),i=n.n(a),c=n(72),s=n.n(c),u=n(825),d=n.n(u),l=n(659),p=n.n(l),f=n(56),v=n.n(f),m=n(540),y=n.n(m),h=n(113),b=n.n(h),g=n(671),x={};x.styleTagTransform=b(),x.setAttributes=v(),x.insert=p().bind(null,"head"),x.domAPI=d(),x.insertStyleElement=y(),s()(g.A,x);const M=g.A&&g.A.locals?g.A.locals:void 0,T=({children:e,iconTop:t,iconPrev:r,iconNext:n,title:o,srcimage:a,size:c="md",onClick:s,selected:u=!1,variant:d="actions",mode:l})=>(console.log(l),i().createElement("button",{className:M.button,onClick:s})),S=({variant:e="green"})=>{const t={background:e,borderRadius:"50%",width:50,height:50};return i().createElement("div",{style:t})};return o})()));
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
2
|
+
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
3
|
+
type Props = PropsWithChildren<{
|
4
|
+
iconTop?: IconProp;
|
5
|
+
iconPrev?: IconProp;
|
6
|
+
iconNext?: IconProp;
|
7
|
+
title?: string;
|
8
|
+
srcimage?: string;
|
9
|
+
size: 'lg' | 'md' | 'sm';
|
10
|
+
selected?: boolean;
|
11
|
+
mode?: 'add' | 'delete' | 'logout' | 'save_project' | 'delete_project' | 'download_file' | 'delete_file' | 'choose_file' | 'exec_validator' | 'download_excel' | 'project_valid' | 'project_invalid' | 'generate_BoM' | 're_generate_pre_BoM' | 'generate_pre_sinotics' | 'save' | 'cancel' | 'tasks_history' | 'errors_history' | 'login' | 'login_microsoft';
|
12
|
+
variant: 'tabs' | 'actions' | 'filters' | 'user_actions';
|
13
|
+
onClick: () => void;
|
14
|
+
}>;
|
15
|
+
declare const Button: ({ children, iconTop, iconPrev, iconNext, title, srcimage, size, onClick, selected, variant, mode, }: Props) => React.JSX.Element;
|
16
|
+
export default Button;
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import { ComponentProps } from 'react';
|
3
|
+
import Button from './Button';
|
4
|
+
type StoryProps = ComponentProps<typeof Button> & {
|
5
|
+
buttonText: string;
|
6
|
+
};
|
7
|
+
declare const meta: Meta<StoryProps>;
|
8
|
+
export default meta;
|
9
|
+
type Story = StoryObj<typeof meta>;
|
10
|
+
export declare const Adicionar: Story;
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import Light from './Light';
|
3
|
+
declare const meta: Meta<typeof Light>;
|
4
|
+
export default meta;
|
5
|
+
type Story = StoryObj<typeof meta>;
|
6
|
+
export declare const Base: Story;
|
7
|
+
export declare const Yellow: Story;
|
8
|
+
export declare const Red: Story;
|
9
|
+
export declare const Another: Story;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
2
|
+
type Props = PropsWithChildren<{
|
3
|
+
spacing: number;
|
4
|
+
direction: 'row' | 'column';
|
5
|
+
wrap: boolean;
|
6
|
+
}>;
|
7
|
+
declare const Stack: ({ children, spacing, direction, wrap, }: Props) => React.JSX.Element;
|
8
|
+
export default Stack;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import Stack from './Stack';
|
3
|
+
import { ComponentProps } from 'react';
|
4
|
+
type StoryProps = ComponentProps<typeof Stack> & {
|
5
|
+
numberOfElements: number;
|
6
|
+
};
|
7
|
+
declare const meta: Meta<StoryProps>;
|
8
|
+
export default meta;
|
9
|
+
type Story = StoryObj<typeof meta>;
|
10
|
+
export declare const Horizontal: Story;
|
11
|
+
export declare const Vertical: Story;
|
12
|
+
export declare const Wrapped: Story;
|
13
|
+
export declare const Empty: Story;
|
14
|
+
export declare const Tabulador: Story;
|
package/dist/types/index.d.ts
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
export { default as Button } from './components/Button/Button';
|
1
|
+
export { default as Button } from './components/atoms/Button/Button';
|
2
|
+
export { default as Light } from './components/atoms/Light/Light';
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nextelco/common-ui",
|
3
|
-
"version": "1.3.
|
3
|
+
"version": "1.3.3",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/index.js",
|
6
6
|
"types": "dist/types/index.d.ts",
|
@@ -8,23 +8,49 @@
|
|
8
8
|
"dist"
|
9
9
|
],
|
10
10
|
"scripts": {
|
11
|
-
"build": "webpack --mode production"
|
11
|
+
"build": "webpack --mode production",
|
12
|
+
"storybook": "storybook dev -p 6006",
|
13
|
+
"build-storybook": "storybook build",
|
14
|
+
"pub": "publish"
|
12
15
|
},
|
13
16
|
"keywords": [],
|
14
17
|
"author": "",
|
15
18
|
"license": "ISC",
|
16
19
|
"peerDependencies": {
|
17
|
-
"react": "^
|
18
|
-
"react-dom": "^
|
20
|
+
"react": "^18.3.1",
|
21
|
+
"react-dom": "^18.3.1"
|
19
22
|
},
|
20
23
|
"devDependencies": {
|
24
|
+
"@chromatic-com/storybook": "^3.2.4",
|
25
|
+
"@storybook/addon-actions": "^8.5.3",
|
26
|
+
"@storybook/addon-essentials": "^8.5.3",
|
27
|
+
"@storybook/addon-interactions": "^8.5.3",
|
28
|
+
"@storybook/addon-links": "^8.5.3",
|
29
|
+
"@storybook/addon-onboarding": "^8.5.3",
|
30
|
+
"@storybook/addon-webpack5-compiler-swc": "^2.0.0",
|
31
|
+
"@storybook/blocks": "^8.5.3",
|
32
|
+
"@storybook/react": "^8.5.3",
|
33
|
+
"@storybook/react-webpack5": "^8.5.3",
|
34
|
+
"@storybook/test": "^8.5.3",
|
21
35
|
"@types/react": "^19.0.8",
|
22
36
|
"@types/react-dom": "^19.0.3",
|
37
|
+
"@types/storybook__react": "^5.2.1",
|
23
38
|
"css-loader": "^7.1.2",
|
39
|
+
"css-modules-typescript-loader": "^4.0.1",
|
40
|
+
"sass": "^1.84.0",
|
41
|
+
"sass-loader": "^16.0.4",
|
42
|
+
"storybook": "^8.5.3",
|
24
43
|
"style-loader": "^4.0.0",
|
25
44
|
"ts-loader": "^9.5.2",
|
26
45
|
"typescript": "^5.7.3",
|
27
46
|
"webpack": "^5.97.1",
|
28
47
|
"webpack-cli": "^6.0.1"
|
48
|
+
},
|
49
|
+
"dependencies": {
|
50
|
+
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
51
|
+
"@fortawesome/free-brands-svg-icons": "^6.7.2",
|
52
|
+
"@fortawesome/free-regular-svg-icons": "^6.7.2",
|
53
|
+
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
54
|
+
"@fortawesome/react-fontawesome": "^0.2.2"
|
29
55
|
}
|
30
56
|
}
|