frst-components 0.22.72 → 0.22.73

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 CHANGED
@@ -2143,7 +2143,7 @@ const AvatarImg$1 = styled__default["default"].img `
2143
2143
  height: ${(props) => props.size || '120px'};
2144
2144
  border-radius: 50%;
2145
2145
  object-fit: cover;
2146
- background-image: url('https://cdn-images.frstfalconi.cloud/Avatar_default.png');
2146
+ background-image: url(' https://cdn-images.frstfalconi.cloud/path582.svg');
2147
2147
  background-size: cover;
2148
2148
 
2149
2149
  ${({ disabled }) => disabled === true &&
@@ -2158,7 +2158,13 @@ const AvatarWrapper = styled__default["default"].div `
2158
2158
  `;
2159
2159
 
2160
2160
  function Avatar({ size, src, alt, className, disabled, onClick, isActiveClick, id, style }) {
2161
- return (jsxRuntime.jsx(styled.ThemeProvider, { theme: FRSTTheme, children: jsxRuntime.jsx(AvatarWrapper, { size: size, className: className, onClick: onClick, isActiveClick: isActiveClick, id: id, style: style, children: jsxRuntime.jsx(AvatarImg$1, { src: src, size: size, disabled: disabled }) }) }));
2161
+ const [isImage, setIsImage] = React.useState(!!src); // Assume que a imagem está presente inicialmente
2162
+ const defaultImg = 'https://cdn-images.frstfalconi.cloud/path582.svg';
2163
+ React.useEffect(() => {
2164
+ setIsImage(!!src);
2165
+ }, [src]);
2166
+ return (jsxRuntime.jsxs(styled.ThemeProvider, { theme: FRSTTheme, children: [" ", jsxRuntime.jsx(AvatarWrapper, { size: size, className: className, onClick: onClick, isActiveClick: isActiveClick, id: id, style: style, children: isImage ? ( // Renderize a imagem apenas se houver uma URL válida
2167
+ jsxRuntime.jsx(AvatarImg$1, { src: src, size: size, disabled: disabled, onError: () => setIsImage(false) })) : (jsxRuntime.jsx(AvatarImg$1, { src: defaultImg, size: size, disabled: disabled })) })] }));
2162
2168
  }
2163
2169
 
2164
2170
  ///-----------------------------------------
@@ -7405,7 +7411,7 @@ function CardDefinicaoFase(props) {
7405
7411
  return jsxRuntime.jsx(FaseUm, {});
7406
7412
  }
7407
7413
  }
7408
- return (jsxRuntime.jsxs("div", { className: style$5.container, children: [jsxRuntime.jsxs("div", { className: style$5.headerContainer, children: [jsxRuntime.jsx("div", { className: style$5.titleFrase, children: props.titleFase ? props.titleFase : 'Definição do objetivo' }), props.fase ? handleFase() : jsxRuntime.jsx(FaseUm, {})] }), jsxRuntime.jsxs("div", { className: style$5.descriptionContainer, children: [jsxRuntime.jsxs("div", { className: style$5.titleAndMenu, children: [jsxRuntime.jsxs("span", { className: style$5.titleDescription, children: [" ", props.cardTitle] }), jsxRuntime.jsx(MenuMore, { options: props.optionsMenuMore })] }), jsxRuntime.jsxs("span", { className: style$5.description, children: [" ", props.cardDescription] })] }), props.fase === 'finalizado' ? (jsxRuntime.jsx("div", { className: style$5.buttonFinalizado, children: jsxRuntime.jsx(Button$4, { variant: "link", label: props.textButtonVisualizar ? props.textButtonVisualizar : 'Visualizar', handleClick: props.handleToView }) })) : (jsxRuntime.jsx("div", { className: style$5.buttonFinalizado, children: jsxRuntime.jsx(Button$4, { variant: "link", label: props.textButtonContinue ? props.textButtonContinue : 'Continuar', handleClick: props.handleClickContinue }) }))] }));
7414
+ return (jsxRuntime.jsxs("div", { className: style$5.container, children: [jsxRuntime.jsxs("div", { className: style$5.headerContainer, children: [jsxRuntime.jsx("div", { className: style$5.titleFrase, children: props.titleFase ? props.titleFase : 'Definição do objetivo' }), props.fase ? handleFase() : jsxRuntime.jsx(FaseUm, {})] }), jsxRuntime.jsxs("div", { className: style$5.descriptionContainer, children: [jsxRuntime.jsxs("div", { className: style$5.titleAndMenu, children: [jsxRuntime.jsxs("span", { className: style$5.titleDescription, children: [" ", props.cardTitle] }), jsxRuntime.jsx(MenuMore, { options: props.optionsMenuMore })] }), jsxRuntime.jsxs("span", { className: style$5.description, children: [" ", props.cardDescription] })] }), props.fase === 'finalizado' ? (jsxRuntime.jsx("div", { className: style$5.buttonFinalizado, children: jsxRuntime.jsx(Button$4, { variant: "link", label: props.textButtonVisualizar ? props.textButtonVisualizar : 'Visualizar', handleClick: props.handleToView }) })) : (jsxRuntime.jsxs("div", { className: style$5.buttonContainer, children: [jsxRuntime.jsx(Button$4, { variant: "link", label: props.textButtonVisualizar ? props.textButtonVisualizar : 'Visualizar', handleClick: props.handleToView }), jsxRuntime.jsx("div", { className: style$5.divisoria }), jsxRuntime.jsx(Button$4, { variant: "link", label: props.textButtonContinue ? props.textButtonContinue : 'Continuar', handleClick: props.handleClickContinue })] }))] }));
7409
7415
  }
7410
7416
 
7411
7417
  var css_248z$b = ".cardResultConquista-module_container__39blw {\n display: flex;\n justify-content: flex-start;\n align-items: center;\n flex-direction: column;\n position: relative;\n\n width: 343px;\n height: 265px;\n padding: 24px;\n border: 1px solid #BDBDBD;\n border-radius: 8px;\n font-family: 'work sans';\n word-wrap: break-word;\n}\n\n.cardResultConquista-module_container__39blw:hover {\n box-shadow: 0px 0px 20px -7px #BDBDBD;\n}\n\n.cardResultConquista-module_container__39blw:active {\n box-shadow: 0px 0px 20px -7px #BDBDBD;\n background-color: #FF4D0D;\n}\n\n.cardResultConquista-module_cardAvatar__mEUL0 {\n display: flex;\n justify-content: center;\n align-items: center;\n flex-direction: row;\n}\n\n.cardResultConquista-module_description__rgSn5 {\n max-height: 100px !important;\n width: 300px;\n text-overflow: ellipsis;\n overflow: hidden;\n display: -webkit-box;\n -webkit-line-clamp: 4; /** número de linhas que você quer exibir */\n -webkit-box-orient: vertical;\n word-wrap: break-word;\n}\n\n.cardResultConquista-module_verMais__8mtfe {\n position:absolute;\n color: #0645AD;\n font-weight: 700;\n right: 0;\n bottom: 0;\n margin-right: 20px;\n margin-bottom: 12px;\n}";
@@ -14086,7 +14092,7 @@ const ContentDescription = styled__default["default"].div `
14086
14092
  gap: 16px;
14087
14093
  `;
14088
14094
 
14089
- const modalNewFeatures = ({ title = 'Novidades', open, onClose, onFinish, steps, Exit = 'X' }) => {
14095
+ const modalNewFeatures = ({ title = 'Novidades', open, onClose, onFinish, steps, Exit = 'X', onNext }) => {
14090
14096
  const [numberCurrentStep, setNumberCurrentStep] = React.useState(0);
14091
14097
  const [currentTopic, setCurrentTopic] = React.useState(steps[numberCurrentStep]);
14092
14098
  const isLastStep = currentTopic === steps[steps.length - 1];
@@ -14101,6 +14107,8 @@ const modalNewFeatures = ({ title = 'Novidades', open, onClose, onFinish, steps,
14101
14107
  else {
14102
14108
  setCurrentTopic(steps[numberCurrentStep + 1]);
14103
14109
  setNumberCurrentStep((prev) => prev + 1);
14110
+ if (onNext)
14111
+ onNext();
14104
14112
  }
14105
14113
  };
14106
14114
  const handleClickTopic = (id) => {
@@ -10,11 +10,12 @@ type TopicsNewFeatues = {
10
10
  type ModalNewFeaturesProps = {
11
11
  title: string;
12
12
  open: boolean;
13
- Exit: string;
13
+ Exit?: string;
14
14
  onClose: () => void;
15
15
  onFinish: () => void;
16
+ onNext: () => void;
16
17
  steps: TopicsNewFeatues[];
17
18
  };
18
- declare const modalNewFeatures: ({ title, open, onClose, onFinish, steps, Exit }: ModalNewFeaturesProps) => JSX.Element;
19
+ declare const modalNewFeatures: ({ title, open, onClose, onFinish, steps, Exit, onNext }: ModalNewFeaturesProps) => JSX.Element;
19
20
  export default modalNewFeatures;
20
21
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/modalNewFeatures/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAA;IACrC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,CAAA;CACrC,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAC,MAAM,CAAA;IACX,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,gBAAgB,oDAAuE,qBAAqB,gBAyGjH,CAAA;AAED,eAAe,gBAAgB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/LXP/modalNewFeatures/index.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAA;AAIlD,KAAK,gBAAgB,GAAG;IACtB,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,KAAK,CAAC,SAAS,GAAG,MAAM,CAAA;IACrC,UAAU,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,KAAK,GAAG,OAAO,GAAG,OAAO,CAAA;CACrC,CAAA;AAED,KAAK,qBAAqB,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,CAAC,EAAC,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,IAAI,CAAA;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,KAAK,EAAE,gBAAgB,EAAE,CAAA;CAC1B,CAAA;AAED,QAAA,MAAM,gBAAgB,4DAA+E,qBAAqB,gBA0GzH,CAAA;AAED,eAAe,gBAAgB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/index.tsx"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAA;AAIhC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGlC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,eASjH"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/avatar/index.tsx"],"names":[],"mappings":";AAAA,OAAO,yBAAyB,CAAA;AAIhC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGlC,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,OAAO,eAqBjH"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/cards/cardDefinicaoFase/index.tsx"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAMnC,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,eAAe,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,YAAY,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;IACjD,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eAwDtE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/cards/cardDefinicaoFase/index.tsx"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAA;AAMnC,UAAU,sBAAsB;IAC9B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAA;IAChC,YAAY,CAAC,EAAE,MAAM,IAAI,CAAA;IACzB,eAAe,CAAC,EAAE,GAAG,GAAG,GAAG,EAAE,CAAA;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,YAAY,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;IACjD,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAC7B,kBAAkB,CAAC,EAAE,MAAM,CAAA;CAC5B;AAED,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,eA8DtE"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "frst-components",
3
3
  "homepage": "http://FRST-Falconi.github.io/storybook.frstfalconi.com",
4
- "version": "0.22.72",
4
+ "version": "0.22.73",
5
5
  "private": false,
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",