@consumidor-positivo/aurora 0.0.59 → 0.0.61
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.
|
@@ -7,7 +7,7 @@ type NotificationsBarWrapProps = {
|
|
|
7
7
|
type NotificationsBarListProps = {
|
|
8
8
|
title: string;
|
|
9
9
|
dataSource: NotificationBarListDataProps[];
|
|
10
|
-
renderItem: (item: NotificationBarListDataProps) => ReactNode | string | JSX.Element | JSX.Element[];
|
|
10
|
+
renderItem: (item: NotificationBarListDataProps, idx?: number) => ReactNode | string | JSX.Element | JSX.Element[];
|
|
11
11
|
};
|
|
12
12
|
type NotificationBarListDataProps = {
|
|
13
13
|
title: string;
|
|
@@ -17,7 +17,7 @@ const NotificationsBarList = ({
|
|
|
17
17
|
}) => {
|
|
18
18
|
return /* @__PURE__ */ jsxs("div", { className: "au-notifications-bar__section", children: [
|
|
19
19
|
/* @__PURE__ */ jsx(Text, { as: "h3", variant: "body-medium", weight: "bold", children: title }),
|
|
20
|
-
/* @__PURE__ */ jsx("div", { className: "au-notifications-bar__list", children: dataSource == null ? void 0 : dataSource.map((item) => renderItem(item)) })
|
|
20
|
+
/* @__PURE__ */ jsx("div", { className: "au-notifications-bar__list", children: dataSource == null ? void 0 : dataSource.map((item, idx) => renderItem(item, idx)) })
|
|
21
21
|
] });
|
|
22
22
|
};
|
|
23
23
|
const NotificationsBarLink = ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../lib/components/NotificationsBar/index.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { Text } from '../Text'\nimport { Conditional } from '../misc'\nimport './styles.scss'\n\ntype NotificationsBarWrapProps = {\n renderRecents?: () => ReactNode | string | JSX.Element | JSX.Element[]\n renderOlds?: () => ReactNode | string | JSX.Element | JSX.Element[]\n}\n\ntype NotificationsBarListProps = {\n title: string\n dataSource: NotificationBarListDataProps[]\n renderItem: (\n item: NotificationBarListDataProps,\n ) => ReactNode | string | JSX.Element | JSX.Element[]\n}\n\ntype NotificationBarListDataProps = {\n title: string\n Icon?: ReactNode | string | JSX.Element | JSX.Element[]\n onClick: () => void\n onDelete?: () => void\n createdAt?: string\n}\n\ntype NotificationsBarLinkProps = {\n title: string\n onClick: () => void\n onDelete?: () => void\n Icon?: ReactNode | string | JSX.Element | JSX.Element[]\n createdAt?: string\n}\n\nexport const NotificationsBarWrap = ({\n renderRecents,\n renderOlds,\n}: NotificationsBarWrapProps) => {\n return (\n <div className=\"au-notifications-bar\">\n {renderRecents && renderRecents()}\n {renderOlds && renderOlds()}\n </div>\n )\n}\n\nexport const NotificationsBarList = ({\n title,\n dataSource,\n renderItem,\n}: NotificationsBarListProps) => {\n return (\n <div className=\"au-notifications-bar__section\">\n <Text as=\"h3\" variant=\"body-medium\" weight=\"bold\">\n {title}\n </Text>\n <div className=\"au-notifications-bar__list\">\n {dataSource?.map((item) => renderItem(item))}\n </div>\n </div>\n )\n}\n\nexport const NotificationsBarLink = ({\n Icon,\n onClick,\n title,\n createdAt,\n onDelete,\n}: NotificationsBarLinkProps) => {\n return (\n <div className=\"au-notifications-bar__item\">\n <Text\n as=\"a\"\n variant=\"body-medium\"\n weight=\"regular\"\n className=\"au-notifications-bar__link\"\n onClick={onClick}>\n <Conditional condition={!!Icon} renderIf={Icon} />\n {title}\n </Text>\n <div className=\"au-notifications-bar__actions\">\n <Text as=\"span\" variant=\"body-small\">\n {createdAt}\n </Text>\n <Conditional\n condition={!!onDelete}\n renderIf={\n <Text\n as=\"a\"\n variant=\"body-small\"\n weight=\"semibold\"\n onClick={onDelete}>\n Excluir\n </Text>\n }\n />\n </div>\n </div>\n )\n}\n\nconst components = {\n Root: NotificationsBarWrap,\n List: NotificationsBarList,\n Link: NotificationsBarLink,\n}\n\nexport { components as NotificationsBar }\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../lib/components/NotificationsBar/index.tsx"],"sourcesContent":["import { ReactNode } from 'react'\nimport { Text } from '../Text'\nimport { Conditional } from '../misc'\nimport './styles.scss'\n\ntype NotificationsBarWrapProps = {\n renderRecents?: () => ReactNode | string | JSX.Element | JSX.Element[]\n renderOlds?: () => ReactNode | string | JSX.Element | JSX.Element[]\n}\n\ntype NotificationsBarListProps = {\n title: string\n dataSource: NotificationBarListDataProps[]\n renderItem: (\n item: NotificationBarListDataProps,\n idx?: number\n ) => ReactNode | string | JSX.Element | JSX.Element[]\n}\n\ntype NotificationBarListDataProps = {\n title: string\n Icon?: ReactNode | string | JSX.Element | JSX.Element[]\n onClick: () => void\n onDelete?: () => void\n createdAt?: string\n}\n\ntype NotificationsBarLinkProps = {\n title: string\n onClick: () => void\n onDelete?: () => void\n Icon?: ReactNode | string | JSX.Element | JSX.Element[]\n createdAt?: string\n}\n\nexport const NotificationsBarWrap = ({\n renderRecents,\n renderOlds,\n}: NotificationsBarWrapProps) => {\n return (\n <div className=\"au-notifications-bar\">\n {renderRecents && renderRecents()}\n {renderOlds && renderOlds()}\n </div>\n )\n}\n\nexport const NotificationsBarList = ({\n title,\n dataSource,\n renderItem,\n}: NotificationsBarListProps) => {\n return (\n <div className=\"au-notifications-bar__section\">\n <Text as=\"h3\" variant=\"body-medium\" weight=\"bold\">\n {title}\n </Text>\n <div className=\"au-notifications-bar__list\">\n {dataSource?.map((item, idx) => renderItem(item, idx))}\n </div>\n </div>\n )\n}\n\nexport const NotificationsBarLink = ({\n Icon,\n onClick,\n title,\n createdAt,\n onDelete,\n}: NotificationsBarLinkProps) => {\n return (\n <div className=\"au-notifications-bar__item\">\n <Text\n as=\"a\"\n variant=\"body-medium\"\n weight=\"regular\"\n className=\"au-notifications-bar__link\"\n onClick={onClick}>\n <Conditional condition={!!Icon} renderIf={Icon} />\n {title}\n </Text>\n <div className=\"au-notifications-bar__actions\">\n <Text as=\"span\" variant=\"body-small\">\n {createdAt}\n </Text>\n <Conditional\n condition={!!onDelete}\n renderIf={\n <Text\n as=\"a\"\n variant=\"body-small\"\n weight=\"semibold\"\n onClick={onDelete}>\n Excluir\n </Text>\n }\n />\n </div>\n </div>\n )\n}\n\nconst components = {\n Root: NotificationsBarWrap,\n List: NotificationsBarList,\n Link: NotificationsBarLink,\n}\n\nexport { components as NotificationsBar }\n"],"names":[],"mappings":";;;AAmCO,MAAM,uBAAuB,CAAC;AAAA,EACnC;AAAA,EACA;AACF,MAAiC;AAE7B,SAAA,qBAAC,OAAI,EAAA,WAAU,wBACZ,UAAA;AAAA,IAAA,iBAAiB,cAAc;AAAA,IAC/B,cAAc,WAAW;AAAA,EAC5B,EAAA,CAAA;AAEJ;AAEO,MAAM,uBAAuB,CAAC;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AACF,MAAiC;AAE7B,SAAA,qBAAC,OAAI,EAAA,WAAU,iCACb,UAAA;AAAA,IAAA,oBAAC,QAAK,IAAG,MAAK,SAAQ,eAAc,QAAO,QACxC,UACH,MAAA,CAAA;AAAA,IACC,oBAAA,OAAA,EAAI,WAAU,8BACZ,UAAY,yCAAA,IAAI,CAAC,MAAM,QAAQ,WAAW,MAAM,GAAG,GACtD,CAAA;AAAA,EACF,EAAA,CAAA;AAEJ;AAEO,MAAM,uBAAuB,CAAC;AAAA,EACnC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAiC;AAE7B,SAAA,qBAAC,OAAI,EAAA,WAAU,8BACb,UAAA;AAAA,IAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,IAAG;AAAA,QACH,SAAQ;AAAA,QACR,QAAO;AAAA,QACP,WAAU;AAAA,QACV;AAAA,QACA,UAAA;AAAA,UAAA,oBAAC,eAAY,WAAW,CAAC,CAAC,MAAM,UAAU,MAAM;AAAA,UAC/C;AAAA,QAAA;AAAA,MAAA;AAAA,IACH;AAAA,IACA,qBAAC,OAAI,EAAA,WAAU,iCACb,UAAA;AAAA,MAAA,oBAAC,MAAK,EAAA,IAAG,QAAO,SAAQ,cACrB,UACH,WAAA;AAAA,MACA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAW,CAAC,CAAC;AAAA,UACb,UACE;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,IAAG;AAAA,cACH,SAAQ;AAAA,cACR,QAAO;AAAA,cACP,SAAS;AAAA,cAAU,UAAA;AAAA,YAAA;AAAA,UAErB;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ;AAEA,MAAM,aAAa;AAAA,EACjB,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.au-field__select{position:relative
|
|
1
|
+
.au-field__select{position:relative}.au-field__select-wrapper{display:flex;align-items:center;justify-content:space-between;width:100%;height:56px;padding:16px;background-color:#fff;border:1px solid #454a54;border-radius:8px;box-sizing:border-box;font-size:16px;line-height:22px}.au-field__select-wrapper:focus-within{border:2px solid #0048db}.au-field__select-icon{transition:transform .2s ease}.au-field__select-options{display:flex;flex-direction:column;width:100%;margin-top:16px;border:1px solid #0048db;background:#fff;border-radius:8px;overflow:hidden;cursor:auto;position:absolute;transform-origin:top left;transform:scaleY(0);opacity:0;visibility:hidden;transition:transform .2s,opacity .2s,visibility 0s .2s;z-index:1;max-height:333px;overflow-y:auto}.au-field__select-options--open{transform:scaleY(1);opacity:1;visibility:visible;transition:transform .2s,opacity .2s}.au-field__select-option{display:flex;justify-content:space-between;padding:16px 24px;cursor:pointer}.au-field__select-option:not(.au-field__select-option--selected):hover,.au-field__select-option--highlighted:not(.au-field__select-option--selected){background-color:#f6f7fa;color:#16181d}.au-field__select-option--selected{background-color:#0048db;color:#fff;font-weight:700}.au-field__select-option--selected .au-icon>svg{color:#fff}.au-field__select-option--disabled{pointer-events:none;cursor:not-allowed;background-color:#e2e4e9;color:#5e6573}.au-field__select-option--disabled .au-icon>svg{color:#5e6573}.au-field__select--open .au-field__select-wrapper{border:2px solid #0048db}.au-field__select--open .au-field__select-wrapper .au-field__select-icon{transform:rotate(180deg)}.au-field__select--disabled{pointer-events:none;cursor:not-allowed}.au-field__select--disabled .au-field__select-wrapper{background-color:#e2e4e9}.au-field__select--disabled .au-field__select-wrapper .au-icon>svg{color:#5e6573}.au-field__select--error .au-field__select-wrapper{background-color:#f5eff0;border-color:#991717}.au-field__select--error .au-field__select-wrapper:focus{border-color:#0048db}.au-field:not(.au-field--error):has(.au-field__select--open) .au-field__header-label{color:#0048db}.au-field:not(.au-field--error):has(.au-field__select--open) .au-field__select-wrapper,.au-field:not(.au-field--error):has(.au-field__select--open) .au-field__select-wrapper:focus-within{border-width:1px}
|