@stack-spot/portal-components 2.25.0-beta.1 → 2.25.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/CHANGELOG.md CHANGED
@@ -1,11 +1,26 @@
1
1
  # Changelog
2
2
 
3
- ## [2.25.0-beta.1](https://github.com/stack-spot/portal-commons/compare/portal-components-beta@v2.24.1-beta.1...portal-components-beta@v2.25.0-beta.1) (2025-07-11)
3
+ ## [2.25.0](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.24.3...portal-components@v2.25.0) (2025-08-14)
4
4
 
5
5
 
6
6
  ### Features
7
7
 
8
- * accordion component beta ([#1191](https://github.com/stack-spot/portal-commons/issues/1191)) ([b49a388](https://github.com/stack-spot/portal-commons/commit/b49a388660523bab21abcdb17fc92341ffd40570))
8
+ * InfoMaintenanceBanner ([#1404](https://github.com/stack-spot/portal-commons/issues/1404)) ([d36bec1](https://github.com/stack-spot/portal-commons/commit/d36bec16c87882ec6d7fc18bbb9e59e0fb8aad16))
9
+
10
+ ## [2.24.3](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.24.2...portal-components@v2.24.3) (2025-07-22)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * adjusts error messages in Ai ([#1274](https://github.com/stack-spot/portal-commons/issues/1274)) ([09aad8b](https://github.com/stack-spot/portal-commons/commit/09aad8b3cf8538d14455203be201beec03716d51))
16
+
17
+ ## [2.24.2](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.24.1...portal-components@v2.24.2) (2025-07-22)
18
+
19
+
20
+ ### Bug Fixes
21
+
22
+ * Adds Secure attribute to cookies for HTTPS ([#1114](https://github.com/stack-spot/portal-commons/issues/1114)) ([18e06fb](https://github.com/stack-spot/portal-commons/commit/18e06fbe08b1c89e2d554295627298c4723c99c6))
23
+ * reviewing error messages in ai ([#1270](https://github.com/stack-spot/portal-commons/issues/1270)) ([5de8012](https://github.com/stack-spot/portal-commons/commit/5de8012538c22f0fd061233154619afcd4b589a5))
9
24
 
10
25
  ## [2.24.1](https://github.com/stack-spot/portal-commons/compare/portal-components@v2.24.0...portal-components@v2.24.1) (2025-06-16)
11
26
 
@@ -0,0 +1,9 @@
1
+ interface InfoMaintenanceBannerProps {
2
+ date: string;
3
+ year: string;
4
+ initialHour: string;
5
+ endHour: string;
6
+ }
7
+ export declare const InfoMaintenanceBanner: ({ date, year, initialHour, endHour }: InfoMaintenanceBannerProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=InfoMaintenanceBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoMaintenanceBanner.d.ts","sourceRoot":"","sources":["../../src/components/InfoMaintenanceBanner.tsx"],"names":[],"mappings":"AAGA,UAAU,0BAA0B;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,qBAAqB,GAAI,sCAAsC,0BAA0B,4CAGrG,CAAA"}
@@ -0,0 +1,16 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Text } from '@citric/core';
3
+ import { interpolate, useTranslate } from '@stack-spot/portal-translate';
4
+ export const InfoMaintenanceBanner = ({ date, year, initialHour, endHour }) => {
5
+ const t = useTranslate(dictionary);
6
+ return _jsx(Text, { children: interpolate(t.info, [date, year, initialHour, endHour]) });
7
+ };
8
+ const dictionary = {
9
+ en: {
10
+ info: 'We would like to inform you that StackSpot will undergo maintenance on $0, $1, from $2 (GMT-3) to $3. During this period, this web portal will be temporarily unavailable.',
11
+ },
12
+ pt: {
13
+ info: 'Gostaríamos de informar que a StackSpot passará por manutenção no dia $0 de $1, das $2 (GMT-3) às $3. Durante este período, este portal web estará temporariamente indisponível.',
14
+ },
15
+ };
16
+ //# sourceMappingURL=InfoMaintenanceBanner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InfoMaintenanceBanner.js","sourceRoot":"","sources":["../../src/components/InfoMaintenanceBanner.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAA;AASxE,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAA8B,EAAE,EAAE;IACxG,MAAM,CAAC,GAAG,YAAY,CAAC,UAAU,CAAC,CAAA;IAClC,OAAO,KAAC,IAAI,cAAE,WAAW,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,CAAC,CAAC,GAAQ,CAAA;AAC/E,CAAC,CAAA;AAED,MAAM,UAAU,GAAG;IACjB,EAAE,EAAE;QACF,IAAI,EAAE,4KAA4K;KACnL;IACD,EAAE,EAAE;QACF,IAAI,EAAE,kLAAkL;KACzL;CACF,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorFeedback.d.ts","sourceRoot":"","sources":["../../../src/components/error/ErrorFeedback.tsx"],"names":[],"mappings":"AAsBA,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAChD;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsCD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,sGAAkH,gBAAgB,4CA0DnI,CAAA"}
1
+ {"version":3,"file":"ErrorFeedback.d.ts","sourceRoot":"","sources":["../../../src/components/error/ErrorFeedback.tsx"],"names":[],"mappings":"AAsBA,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IAChD;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAsCD;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,GACxB,sGAAkH,gBAAgB,4CAgEnI,CAAA"}
@@ -67,48 +67,44 @@ export const ErrorFeedback = ({ code = 0, message, debug, title, body, image, ac
67
67
  function renderBody() {
68
68
  return typeof body === 'string' ? _jsx(Text, { appearance: "body1", colorScheme: "inverse", className: "description", children: body }) : body;
69
69
  }
70
- return (_jsx(FeedbackBox, { style: style, className: className, children: _jsxs("div", { className: listToClass(['content', direction]), children: [_jsx("div", { className: "image", children: image ?? imageMap[code] ?? _jsx(ServerError, { style: imageStyle }) }), _jsxs("div", { className: "text-content", children: [_jsx(LinkBox, { href: "/", className: "logo", children: _jsx(Logo, { style: { width: '130px', height: '30px' } }) }), _jsxs(Text, { appearance: "h4", mt: 5, colorScheme: "inverse", className: "title", children: [(code && !title) ? `${code}. ` : '', _jsx(Text, { appearance: "h4", as: "span", colorScheme: "light.700", children: title ?? t[`${code}.title`] })] }), body ? renderBody() : (_jsxs(_Fragment, { children: [_jsx(Text, { appearance: "body1", mt: 5, colorScheme: "inverse", className: "description", children: description ?? t[`${code}.description`] }), _jsx(Text, { appearance: "body1", colorScheme: "light.700", className: "help", children: help ?? t[`${code}.help`] })] })), shouldShowButtons && (_jsxs("div", { className: "buttons", children: [action && (_jsx(Button, { colorScheme: "inverse", onClick: action.onClick, children: action.label })), debug && message && (_jsx(Button, { appearance: "outlined", colorScheme: "inverse", onClick: () => setShowDetails(v => !v), children: showDetails ? t.hideDetails : t.showDetails }))] })), showDetails && (_jsx("div", { className: "details", children: _jsx(Text, { appearance: "microtext1", children: message }) }))] })] }) }));
70
+ return (_jsx(FeedbackBox, { style: style, className: className, children: _jsxs("div", { className: listToClass(['content', direction]), children: [_jsx("div", { className: "image", children: image ?? imageMap[code] ?? _jsx(ServerError, { style: imageStyle }) }), _jsxs("div", { className: "text-content", children: [_jsx(LinkBox, { href: "/", className: "logo", children: _jsx(Logo, { style: { width: '130px', height: '30px' } }) }), _jsxs(Text, { appearance: "h4", mt: 5, colorScheme: "inverse", className: "title", children: [(code && !title) ? `${t.errorLabel} ${code}. ` : '', _jsx(Text, { appearance: "h4", as: "span", colorScheme: "light.700", children: title ?? t[`${code}.title`] })] }), body ? renderBody() : (_jsxs(_Fragment, { children: [_jsx(Text, { appearance: "body1", mt: 5, colorScheme: "inverse", className: "description", sx: {
71
+ maxWidth: '70ch',
72
+ whiteSpace: 'normal',
73
+ wordBreak: 'break-word',
74
+ }, children: description ?? t[`${code}.description`] }), _jsx(Text, { appearance: "body1", colorScheme: "light.700", className: "help", children: help ?? t[`${code}.help`] })] })), shouldShowButtons && (_jsxs("div", { className: "buttons", children: [action && (_jsx(Button, { colorScheme: "inverse", onClick: action.onClick, children: action.label })), debug && message && (_jsx(Button, { appearance: "outlined", colorScheme: "inverse", onClick: () => setShowDetails(v => !v), children: showDetails ? t.hideDetails : t.showDetails }))] })), showDetails && (_jsx("div", { className: "details", children: _jsx(Text, { appearance: "microtext1", children: message }) }))] })] }) }));
71
75
  };
72
76
  const dictionary = {
73
77
  en: {
74
78
  altLogo: 'Logo Stackspot',
75
- '0.title': 'Unknown client error',
76
- '0.description': 'An unknown error happened while trying to load the resource.',
77
- '0.help': 'Reload the page and, if it still doesn\'t work, report the error the Stackspot team.',
78
- '401.title': 'Not authorized',
79
- '401.description': 'There was a failure loading credentials for this page.',
80
- '401.help': 'Check if the URL is correct or clear your cache and cookies from your browser and try again.',
81
- '403.title': 'Private access',
82
- '403.description': 'The page you have tried to visit is private.',
83
- '403.help': 'Log in with another account or request access from the person who manages your organization.',
84
- '404.title': 'Resource not found',
85
- '404.description': 'This resource no longer exists.',
86
- '404.help': 'Please try again or request a new URL from the person who manages your organization.',
87
- '500.title': 'Server error',
88
- '500.description': "We have identified a problem with the server, but don't worry. We are already investigating what happened.",
89
- '500.help': 'Please try again after a few minutes.',
79
+ '0.title': 'Something didn’t go as expected',
80
+ '0.description': 'This can happen from time to time. Try refreshing the page. If it still doesn’t work, reach out. We’re here to help.',
81
+ '401.title': 'You need a valid credential',
82
+ '401.description': 'We couldn’t verify your credentials. Check the link or log in with a different account to continue.',
83
+ '403.title': 'Access restricted to your organization',
84
+ '403.help': 'Log in with an account from your organization or request access from your Account Holder.',
85
+ '404.title': 'This resource is no longer available',
86
+ '404.description': 'It may have been moved or removed. You can try again or ask your organization’s Account Holder for a new link.',
87
+ '500.title': 'We\'re making some adjustments',
88
+ '500.description': 'Something unexpected happened on our side. It might just be a momentary glitch. Try refreshing later to pick up where you left off.',
90
89
  showDetails: 'Show Details',
91
90
  hideDetails: 'Hide Details',
91
+ errorLabel: 'Error',
92
92
  },
93
93
  pt: {
94
94
  altLogo: 'Logo Stackspot',
95
- '0.title': 'Erro desconhecido (cliente)',
96
- '0.description': 'Um erro desconhecido aconteceu ao carregar o recurso',
97
- '0.help': 'Recarregue a página e, se ainda não funcionar, reporte o problema para o time da Stackspot.',
98
- '401.title': 'Não autorizado',
99
- '401.description': 'Houve uma falha no carregamento de credenciais dessa página.',
100
- '401.help': 'Verifique se a URL está correta ou limpe o cache e os cookies de seu navegador e tente novamente.',
101
- '403.title': 'Acesso privado',
102
- '403.description': '"A página que você tentou visualizar é particular."',
103
- '403.help': 'Solicite acesso com o administrador da sua organização.',
104
- '404.title': 'Recurso não encontrado',
105
- '404.description': 'Este recurso não existe mais.',
106
- '404.help': 'Tente novamente ou fale com o administrador da sua organização.',
107
- '500.title': 'Erro ao exibir o recurso',
108
- '500.description': 'Mas não se preocupe, já estamos investigando o que aconteceu.',
109
- '500.help': 'Tente novamente após alguns minutos.',
95
+ '0.title': 'Algo saiu diferente do esperado',
96
+ '0.description': 'Isso pode acontecer de vez em quando. Tente recarregar a página. Se ainda não funcionar, chama a gente. Estamos por aqui para ajudar.',
97
+ '401.title': 'Você precisa de uma credencial válida',
98
+ '401.description': 'Não conseguimos confirmar suas credenciais. Verifique o link ou faça login com outra conta para continuar.',
99
+ '403.title': 'Acesso exclusivo da sua organização',
100
+ '403.help': 'Faça login com uma conta da sua organização ou peça acesso ao Account Holder.',
101
+ '404.title': 'Este recurso não está mais disponível',
102
+ '404.description': 'Ele pode ter sido movido ou removido. Você pode tentar de novo ou pedir um novo link ao Account Holder da sua organização.',
103
+ '500.title': 'Estamos ajustando o sistema',
104
+ '500.description': 'Algo inesperado aconteceu do nosso lado. Pode ser só por alguns instantes. Tente recarregar mais tarde para continuar de onde parou.',
110
105
  showDetails: 'Ver Detalhes',
111
106
  hideDetails: 'Esconder Detalhes',
107
+ errorLabel: 'Erro',
112
108
  },
113
109
  };
114
110
  //# sourceMappingURL=ErrorFeedback.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorFeedback.js","sourceRoot":"","sources":["../../../src/components/error/ErrorFeedback.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACpD,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,EAAc,YAAY,EAAE,MAAM,8BAA8B,CAAA;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAA;AAE3D,MAAM,UAAU,GAAwB;IACtC,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,OAAO;CAChB,CAAA;AAED,MAAM,QAAQ,GAAuC;IACnD,GAAG,EAAE,KAAC,eAAe,IAAC,KAAK,EAAE,UAAU,GAAI;IAC3C,GAAG,EAAE,KAAC,SAAS,IAAC,KAAK,EAAE,UAAU,GAAI;IACrC,GAAG,EAAE,KAAC,QAAQ,IAAC,KAAK,EAAE,UAAU,GAAI;CACrC,CAAA;AAiDD,MAAM,WAAW,GAAG,MAAM,CAAC,GAAG,CA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@@ -2,6 +2,7 @@ export { AsyncContent } from './components/AsyncContent.js';
2
2
  export { BannerWarning } from './components/BannerWarning.js';
3
3
  export { ButtonLoading } from './components/ButtonLoading.js';
4
4
  export { ChatBot } from './components/ChatBot.js';
5
+ export { InfoMaintenanceBanner } from './components/InfoMaintenanceBanner.js';
5
6
  export * from './components/Select/index.js';
6
7
  export * from './components/Select/types.js';
7
8
  export { useDateFormatter } from './hooks/date.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,kBAAkB,EAAE,UAAU,IAAI,oBAAoB,EAAE,iCAAiC,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACpJ,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAAoC,CAAA;AAC1E,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,kBAAkB,EAAE,UAAU,IAAI,oBAAoB,EAAE,iCAAiC,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACpJ,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA"}
package/dist/index.js CHANGED
@@ -2,6 +2,7 @@ export { AsyncContent } from './components/AsyncContent.js';
2
2
  export { BannerWarning } from './components/BannerWarning.js';
3
3
  export { ButtonLoading } from './components/ButtonLoading.js';
4
4
  export { ChatBot } from './components/ChatBot.js';
5
+ export { InfoMaintenanceBanner } from './components/InfoMaintenanceBanner.js';
5
6
  export * from './components/Select/index.js';
6
7
  export * from './components/Select/types.js';
7
8
  export { useDateFormatter } from './hooks/date.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,cAAc,qBAAqB,CAAA;AACnC,cAAc,2BAA2B,CAAA;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAA;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAE,kBAAkB,EAAE,UAAU,IAAI,oBAAoB,EAAE,iCAAiC,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AACpJ,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACnD,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AACvD,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAA;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAC9C,OAAO,EAAE,qBAAqB,EAAE,MAAM,oCAA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cookie.d.ts","sourceRoot":"","sources":["../../src/utils/cookie.ts"],"names":[],"mappings":"AAMA;;;GAGG;AACH,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,QAQ/C;AAED;;;GAGG;AACH,wBAAgB,eAAe,WAG9B;AAED;;;GAGG;AACH,wBAAgB,UAAU,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAO/D;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,gBAAgB,GAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAM,QAGlG;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,QAGvC;AAED;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,sBAEpC"}
@@ -10,6 +10,10 @@ export function setupCookies(domainRegex) {
10
10
  const portalUrl = new URL(location.href);
11
11
  cookieDomain = domainRegex.exec(portalUrl.host)?.[0] ?? '';
12
12
  cookieAttributes = { domain: cookieDomain, SameSite: 'Strict' };
13
+ // Add Secure attribute if using HTTPS
14
+ if (portalUrl.protocol === 'https:') {
15
+ cookieAttributes['Secure'] = '';
16
+ }
13
17
  }
14
18
  /**
15
19
  * Retrieves the current domain used for cookies. To change the domain, use `setupCookies(domainRegex)`.
@@ -42,7 +46,7 @@ export function getCookies() {
42
46
  export function setCookie(key, value, customAttributes = {}) {
43
47
  if (isEmpty(cookieAttributes))
44
48
  setupCookies(DEFAULT_DOMAIN_REGEX);
45
- document.cookie = `${key}=${value}; ${objectToCookieString({ ...cookieAttributes, ...customAttributes })}`;
49
+ document.cookie = `${key}=${value};${objectToCookieString({ ...cookieAttributes, ...customAttributes })}`;
46
50
  }
47
51
  /**
48
52
  * Removes a cookie.
@@ -51,7 +55,7 @@ export function setCookie(key, value, customAttributes = {}) {
51
55
  export function removeCookie(key) {
52
56
  if (isEmpty(cookieAttributes))
53
57
  setupCookies(DEFAULT_DOMAIN_REGEX);
54
- document.cookie = `${key}= ; ${objectToCookieString({ ...cookieAttributes, expires: 'Thu, 01 Jan 1970 00:00:00 GMT' })}`;
58
+ document.cookie = `${key}=;${objectToCookieString({ ...cookieAttributes, expires: 'Thu, 01 Jan 1970 00:00:00 GMT' })}`;
55
59
  }
56
60
  /**
57
61
  * Retrieves the value of a cookie given its key/name.
@@ -61,5 +65,5 @@ export function removeCookie(key) {
61
65
  export function getCookie(key) {
62
66
  return getCookies()[key];
63
67
  }
64
- const objectToCookieString = (object) => Object.entries(object).reduce((prev, current) => `${prev} ${current[0]}=${current[1]};`, '');
68
+ const objectToCookieString = (object) => Object.entries(object).reduce((prev, [k, v]) => `${prev} ${k}${v !== '' ? `=${v}` : ''};`, '').trim();
65
69
  //# sourceMappingURL=cookie.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cookie.js","sourceRoot":"","sources":["../../src/utils/cookie.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAA;AAEhC,MAAM,oBAAoB,GAAG,IAAI,MAAM,CAAC,6CAA6C,CAAC,CAAA;AACtF,IAAI,YAAY,GAAG,EAAE,CAAA;AACrB,IAAI,gBAAgB,GAA2B,EAAE,CAAA;AAEjD;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,WAAmB;IAC9C,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;IACxC,YAAY,GAAG,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAA;IAC1D,gBAAgB,GAAG,EAAE,MAAM,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA;AACjE,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI,OAAO,CAAC,gBAAgB,CAAC;QAAE,YAAY,CAAC,oBAAoB,CAAC,C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AE,CAAC,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/portal-components",
3
- "version": "2.25.0-beta.1",
3
+ "version": "2.25.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,14 +27,12 @@
27
27
  "./FadingOverflow": "./dist/components/FadingOverflow.js",
28
28
  "./Table": "./dist/components/Table/index.js",
29
29
  "./ContentValidateFilter": "./dist/components/ContentValidateFilter.js",
30
- "./Form": "./dist/components/form/Form/index.js",
31
- "./Accordion": "./dist/components/Accordion/index.js"
30
+ "./Form": "./dist/components/form/Form/index.js"
32
31
  },
33
32
  "scripts": {
34
- "build": "rimraf dist && tsc && tsc-esm-fix --target='dist' && pnpm cpy-accordion-css",
33
+ "build": "rimraf dist && tsc && tsc-esm-fix --target='dist'",
35
34
  "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
36
- "check-tree-shaking": "agadoo",
37
- "cpy-accordion-css": "cpy src/components/Accordion/accordion.css dist/components/Accordion --flat"
35
+ "check-tree-shaking": "agadoo"
38
36
  },
39
37
  "peerDependencies": {
40
38
  "@citric/core": "^6.5.1",
@@ -53,7 +51,6 @@
53
51
  "@typescript-eslint/eslint-plugin": "^6.10.0",
54
52
  "@typescript-eslint/parser": "^6.10.0",
55
53
  "agadoo": "^3.0.0",
56
- "cpy-cli": "^5.0.0",
57
54
  "eslint": "^8.53.0",
58
55
  "eslint-plugin-filenames": "^1.3.2",
59
56
  "eslint-plugin-import": "^2.29.0",
@@ -0,0 +1,23 @@
1
+ import { Text } from '@citric/core'
2
+ import { interpolate, useTranslate } from '@stack-spot/portal-translate'
3
+
4
+ interface InfoMaintenanceBannerProps {
5
+ date: string,
6
+ year: string,
7
+ initialHour: string,
8
+ endHour: string,
9
+ }
10
+
11
+ export const InfoMaintenanceBanner = ({ date, year, initialHour, endHour }: InfoMaintenanceBannerProps) => {
12
+ const t = useTranslate(dictionary)
13
+ return <Text>{interpolate(t.info, [date, year, initialHour, endHour])}</Text>
14
+ }
15
+
16
+ const dictionary = {
17
+ en: {
18
+ info: 'We would like to inform you that StackSpot will undergo maintenance on $0, $1, from $2 (GMT-3) to $3. During this period, this web portal will be temporarily unavailable.',
19
+ },
20
+ pt: {
21
+ info: 'Gostaríamos de informar que a StackSpot passará por manutenção no dia $0 de $1, das $2 (GMT-3) às $3. Durante este período, este portal web estará temporariamente indisponível.',
22
+ },
23
+ }
@@ -130,14 +130,20 @@ export const ErrorFeedback = (
130
130
  <Logo style={{ width: '130px', height: '30px' }} />
131
131
  </LinkBox>
132
132
  <Text appearance="h4" mt={5} colorScheme="inverse" className="title">
133
- {(code && !title) ? `${code}. ` : ''}
133
+ {(code && !title) ? `${t.errorLabel} ${code}. ` : ''}
134
134
  <Text appearance="h4" as="span" colorScheme="light.700">
135
135
  {title ?? t[`${code}.title`]}
136
136
  </Text>
137
137
  </Text>
138
138
  {body ? renderBody() : (
139
139
  <>
140
- <Text appearance="body1" mt={5} colorScheme="inverse" className="description">
140
+ <Text appearance="body1" mt={5} colorScheme="inverse" className="description"
141
+ sx={{
142
+ maxWidth: '70ch',
143
+ whiteSpace: 'normal',
144
+ wordBreak: 'break-word',
145
+ }}
146
+ >
141
147
  {description ?? t[`${code}.description`]}
142
148
  </Text>
143
149
 
@@ -174,43 +180,38 @@ export const ErrorFeedback = (
174
180
  const dictionary = {
175
181
  en: {
176
182
  altLogo: 'Logo Stackspot',
177
- '0.title': 'Unknown client error',
178
- '0.description': 'An unknown error happened while trying to load the resource.',
179
- '0.help': 'Reload the page and, if it still doesn\'t work, report the error the Stackspot team.',
180
- '401.title': 'Not authorized',
181
- '401.description': 'There was a failure loading credentials for this page.',
182
- '401.help': 'Check if the URL is correct or clear your cache and cookies from your browser and try again.',
183
- '403.title': 'Private access',
184
- '403.description': 'The page you have tried to visit is private.',
185
- '403.help': 'Log in with another account or request access from the person who manages your organization.',
186
- '404.title': 'Resource not found',
187
- '404.description': 'This resource no longer exists.',
188
- '404.help': 'Please try again or request a new URL from the person who manages your organization.',
189
- '500.title': 'Server error',
183
+ '0.title': 'Something didn’t go as expected',
184
+ '0.description': 'This can happen from time to time. Try refreshing the page. If it still doesn’t work, reach out. We’re here to help.',
185
+ '401.title': 'You need a valid credential',
186
+ '401.description': 'We couldn’t verify your credentials. Check the link or log in with a different account to continue.',
187
+ '403.title': 'Access restricted to your organization',
188
+ '403.help': 'Log in with an account from your organization or request access from your Account Holder.',
189
+ '404.title': 'This resource is no longer available',
190
+ '404.description': 'It may have been moved or removed. You can try again or ask your organization’s Account Holder for a new link.',
191
+ '500.title': 'We\'re making some adjustments',
190
192
  '500.description':
191
- "We have identified a problem with the server, but don't worry. We are already investigating what happened.",
192
- '500.help': 'Please try again after a few minutes.',
193
+ 'Something unexpected happened on our side. It might just be a momentary glitch. Try refreshing later to pick up where you left off.',
193
194
  showDetails: 'Show Details',
194
195
  hideDetails: 'Hide Details',
196
+ errorLabel: 'Error',
195
197
  },
196
198
  pt: {
197
199
  altLogo: 'Logo Stackspot',
198
- '0.title': 'Erro desconhecido (cliente)',
199
- '0.description': 'Um erro desconhecido aconteceu ao carregar o recurso',
200
- '0.help': 'Recarregue a página e, se ainda não funcionar, reporte o problema para o time da Stackspot.',
201
- '401.title': 'Não autorizado',
202
- '401.description': 'Houve uma falha no carregamento de credenciais dessa página.',
203
- '401.help': 'Verifique se a URL está correta ou limpe o cache e os cookies de seu navegador e tente novamente.',
204
- '403.title': 'Acesso privado',
205
- '403.description': '"A página que você tentou visualizar é particular."',
206
- '403.help': 'Solicite acesso com o administrador da sua organização.',
207
- '404.title': 'Recurso não encontrado',
208
- '404.description': 'Este recurso não existe mais.',
209
- '404.help': 'Tente novamente ou fale com o administrador da sua organização.',
210
- '500.title': 'Erro ao exibir o recurso',
211
- '500.description': 'Mas não se preocupe, já estamos investigando o que aconteceu.',
212
- '500.help': 'Tente novamente após alguns minutos.',
200
+ '0.title': 'Algo saiu diferente do esperado',
201
+ '0.description':
202
+ 'Isso pode acontecer de vez em quando. Tente recarregar a página. Se ainda não funcionar, chama a gente. Estamos por aqui para ajudar.',
203
+ '401.title': 'Você precisa de uma credencial válida',
204
+ '401.description': 'Não conseguimos confirmar suas credenciais. Verifique o link ou faça login com outra conta para continuar.',
205
+ '403.title': 'Acesso exclusivo da sua organização',
206
+ '403.help': 'Faça login com uma conta da sua organização ou peça acesso ao Account Holder.',
207
+ '404.title': 'Este recurso não está mais disponível',
208
+ '404.description':
209
+ 'Ele pode ter sido movido ou removido. Você pode tentar de novo ou pedir um novo link ao Account Holder da sua organização.',
210
+ '500.title': 'Estamos ajustando o sistema',
211
+ '500.description':
212
+ 'Algo inesperado aconteceu do nosso lado. Pode ser por alguns instantes. Tente recarregar mais tarde para continuar de onde parou.',
213
213
  showDetails: 'Ver Detalhes',
214
214
  hideDetails: 'Esconder Detalhes',
215
+ errorLabel: 'Erro',
215
216
  },
216
217
  } satisfies Dictionary
package/src/index.ts CHANGED
@@ -2,6 +2,7 @@ export { AsyncContent } from './components/AsyncContent'
2
2
  export { BannerWarning } from './components/BannerWarning'
3
3
  export { ButtonLoading } from './components/ButtonLoading'
4
4
  export { ChatBot } from './components/ChatBot'
5
+ export { InfoMaintenanceBanner } from './components/InfoMaintenanceBanner'
5
6
  export * from './components/Select'
6
7
  export * from './components/Select/types'
7
8
  export { useDateFormatter } from './hooks/date'
@@ -15,3 +16,4 @@ export * from './utils/accessibility'
15
16
  export * from './utils/cookie'
16
17
  export { delay } from './utils/promise'
17
18
  export { readFile } from './utils/read-file'
19
+
@@ -12,6 +12,10 @@ export function setupCookies(domainRegex: RegExp) {
12
12
  const portalUrl = new URL(location.href)
13
13
  cookieDomain = domainRegex.exec(portalUrl.host)?.[0] ?? ''
14
14
  cookieAttributes = { domain: cookieDomain, SameSite: 'Strict' }
15
+ // Add Secure attribute if using HTTPS
16
+ if (portalUrl.protocol === 'https:') {
17
+ cookieAttributes['Secure'] = ''
18
+ }
15
19
  }
16
20
 
17
21
  /**
@@ -44,7 +48,7 @@ export function getCookies(): Record<string, string | undefined> {
44
48
  */
45
49
  export function setCookie(key: string, value: string, customAttributes: Record<string, string> = {}) {
46
50
  if (isEmpty(cookieAttributes)) setupCookies(DEFAULT_DOMAIN_REGEX)
47
- document.cookie = `${key}=${value}; ${objectToCookieString({ ...cookieAttributes, ...customAttributes })}`
51
+ document.cookie = `${key}=${value};${objectToCookieString({ ...cookieAttributes, ...customAttributes })}`
48
52
  }
49
53
 
50
54
  /**
@@ -53,7 +57,7 @@ export function setCookie(key: string, value: string, customAttributes: Record<s
53
57
  */
54
58
  export function removeCookie(key: string) {
55
59
  if (isEmpty(cookieAttributes)) setupCookies(DEFAULT_DOMAIN_REGEX)
56
- document.cookie = `${key}= ; ${objectToCookieString({ ...cookieAttributes, expires: 'Thu, 01 Jan 1970 00:00:00 GMT' })}`
60
+ document.cookie = `${key}=;${objectToCookieString({ ...cookieAttributes, expires: 'Thu, 01 Jan 1970 00:00:00 GMT' })}`
57
61
  }
58
62
 
59
63
  /**
@@ -65,4 +69,5 @@ export function getCookie(key: string) {
65
69
  return getCookies()[key]
66
70
  }
67
71
 
68
- const objectToCookieString = (object: Record<string, string>): string => Object.entries(object).reduce((prev, current) => `${prev} ${current[0]}=${current[1]};`, '')
72
+ const objectToCookieString = (object: Record<string, string>): string =>
73
+ Object.entries(object).reduce((prev, [k, v]) => `${prev} ${k}${v !== '' ? `=${v}` : ''};`, '').trim()
@@ -1,32 +0,0 @@
1
- .accordion-chevron {
2
- transition: transform 0.3s ease;
3
- }
4
-
5
- .accordion-chevron[data-state='open'] {
6
- transform: rotate(180deg);
7
- }
8
-
9
- .accordion-content {
10
- max-height: max-content;
11
- height: 0;
12
- overflow: hidden;
13
- transition: all 0.3s ease;
14
- }
15
-
16
- .accordion-content[data-state='open'] {
17
- height: var(--accordion-content-height);
18
- overflow: inherit;
19
- }
20
-
21
- .accordion-content[data-state='closed'] {
22
- padding-top: 0;
23
- padding-bottom: 0;
24
- }
25
-
26
- .accordion-content hr {
27
- visibility: hidden;
28
- }
29
-
30
- .accordion-content[data-state='open'] hr {
31
- visibility: visible;
32
- }