@consumidor-positivo/aurora 0.0.196 → 0.0.198
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/components/Alert/index.es.js +1 -1
- package/dist/components/Calendar/index.es.js +2 -2
- package/dist/components/CalendarHeader/index.es.js +2 -2
- package/dist/components/Checkbox/index.es.js +1 -1
- package/dist/components/Datepicker/index.es.js +3 -3
- package/dist/components/PortalHolder/index.es.js +1 -1
- package/dist/components/Segment/index.es.js +1 -1
- package/dist/components/SelectField/index.es.js +1 -1
- package/dist/components/Tabs/index.d.ts +3 -2
- package/dist/components/Tabs/index.es.js +23 -32
- package/dist/components/Tabs/index.es.js.map +1 -1
- package/dist/components/Tabs/styles.css +1 -1
- package/dist/components/Tag/index.es.js +1 -1
- package/dist/components/misc/index.d.ts +1 -1
- package/dist/components/misc/index.es.js +4 -2
- package/dist/{index-C8AM9yBn.js → index-BzVR1Tq6.js} +2 -2
- package/dist/{index-C8AM9yBn.js.map → index-BzVR1Tq6.js.map} +1 -1
- package/dist/{index-C1N6rwrZ.js → index-RHj6RFlT.js} +3 -3
- package/dist/{index-C1N6rwrZ.js.map → index-RHj6RFlT.js.map} +1 -1
- package/dist/{index-CL0DrUGQ.js → index-uWXGnhjd.js} +2 -2
- package/dist/{index-CL0DrUGQ.js.map → index-uWXGnhjd.js.map} +1 -1
- package/dist/main.es.js +6 -4
- package/dist/{react-if.esm-Cek6sbNY.js → react-if.esm-BV55Vzhf.js} +4 -2
- package/dist/{react-if.esm-Cek6sbNY.js.map → react-if.esm-BV55Vzhf.js.map} +1 -1
- package/package.json +1 -1
|
@@ -8,9 +8,9 @@ import { IconCheck } from "../icons/IconCheck/index.es.js";
|
|
|
8
8
|
import { IconClock } from "../icons/IconClock/index.es.js";
|
|
9
9
|
import { IconInfo } from "../icons/IconInfo/index.es.js";
|
|
10
10
|
import { IconX } from "../icons/IconX/index.es.js";
|
|
11
|
+
import { d as COLOR_NEUTRAL_70, C as COLOR_SUCCESS_50, b as COLOR_ERROR_50, e as COLOR_WARNING_50, f as COLOR_INFO_50 } from "../../tokens-D_iASp38.js";
|
|
11
12
|
import { Conditional } from "../Conditional/index.es.js";
|
|
12
13
|
import { Text } from "../Text/index.es.js";
|
|
13
|
-
import { d as COLOR_NEUTRAL_70, C as COLOR_SUCCESS_50, b as COLOR_ERROR_50, e as COLOR_WARNING_50, f as COLOR_INFO_50 } from "../../tokens-D_iASp38.js";
|
|
14
14
|
import './styles.css';const Alert = ({
|
|
15
15
|
showIcon = true,
|
|
16
16
|
status = "info",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../index-CweZ_OcN.js";
|
|
3
|
-
import "../../index-
|
|
3
|
+
import "../../index-BzVR1Tq6.js";
|
|
4
4
|
import "../Button/index.es.js";
|
|
5
5
|
import "../PortalHolder/index.es.js";
|
|
6
|
-
import { a } from "../../index-
|
|
6
|
+
import { a } from "../../index-RHj6RFlT.js";
|
|
7
7
|
export {
|
|
8
8
|
a as DatepickerCalendar
|
|
9
9
|
};
|
|
@@ -3,8 +3,8 @@ import "../../index-CweZ_OcN.js";
|
|
|
3
3
|
import "../Icon/index.es.js";
|
|
4
4
|
import "../icons/IconChevronLeft/index.es.js";
|
|
5
5
|
import "../icons/IconChevronRight/index.es.js";
|
|
6
|
-
import "../../index-
|
|
7
|
-
import { C } from "../../index-
|
|
6
|
+
import "../../index-uWXGnhjd.js";
|
|
7
|
+
import { C } from "../../index-BzVR1Tq6.js";
|
|
8
8
|
export {
|
|
9
9
|
C as CalendarHeader
|
|
10
10
|
};
|
|
@@ -3,9 +3,9 @@ import $dbSRa$react__default, { useState, useEffect } from "react";
|
|
|
3
3
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
|
4
4
|
import "../Icon/index.es.js";
|
|
5
5
|
import { IconCheck } from "../icons/IconCheck/index.es.js";
|
|
6
|
+
import { h as COLOR_NEUTRAL_00 } from "../../tokens-D_iASp38.js";
|
|
6
7
|
import { F as Field } from "../../index-ZE6zszxw.js";
|
|
7
8
|
import { Conditional } from "../Conditional/index.es.js";
|
|
8
|
-
import { h as COLOR_NEUTRAL_00 } from "../../tokens-D_iASp38.js";
|
|
9
9
|
import { Text } from "../Text/index.es.js";
|
|
10
10
|
import './styles.css';const CheckboxField = ({
|
|
11
11
|
label,
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
import { B as BREAKPOINT_MD, c as COLOR_NEUTRAL_40 } from "../../tokens-D_iASp38.js";
|
|
2
3
|
import "../../index-CweZ_OcN.js";
|
|
3
4
|
import "../Icon/index.es.js";
|
|
4
5
|
import { IconCalendar } from "../icons/IconCalendar/index.es.js";
|
|
5
6
|
import { InputField } from "../InputField/index.es.js";
|
|
6
|
-
import { g as getDefaultDate, D as DDMMYYYY, a as DatepickerCalendar, A as AUCalendarDate } from "../../index-
|
|
7
|
+
import { g as getDefaultDate, D as DDMMYYYY, a as DatepickerCalendar, A as AUCalendarDate } from "../../index-RHj6RFlT.js";
|
|
7
8
|
import { useRef, useState, useMemo, useEffect } from "react";
|
|
8
9
|
import { a as above } from "../../screen-DfYo7XQ_.js";
|
|
9
|
-
import { u as useOutsideClick } from "../../index-
|
|
10
|
-
import { B as BREAKPOINT_MD, c as COLOR_NEUTRAL_40 } from "../../tokens-D_iASp38.js";
|
|
10
|
+
import { u as useOutsideClick } from "../../index-uWXGnhjd.js";
|
|
11
11
|
import './styles.css';function useDatepicker({
|
|
12
12
|
value,
|
|
13
13
|
defaultValue = "empty",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx, Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { a as above } from "../../screen-DfYo7XQ_.js";
|
|
3
|
-
import { Portal } from "../Portal/index.es.js";
|
|
4
3
|
import { B as BREAKPOINT_MD } from "../../tokens-D_iASp38.js";
|
|
4
|
+
import { Portal } from "../Portal/index.es.js";
|
|
5
5
|
const PortalHolder = ({ withPortal, children }) => {
|
|
6
6
|
const shouldUsePortal = !above(BREAKPOINT_MD) && withPortal;
|
|
7
7
|
if (shouldUsePortal) return /* @__PURE__ */ jsx(Portal, { children });
|
|
@@ -4,7 +4,7 @@ import "../Icon/index.es.js";
|
|
|
4
4
|
import "../icons/IconChevronDown/index.es.js";
|
|
5
5
|
import "../icons/IconChevronLeft/index.es.js";
|
|
6
6
|
import "../icons/IconX/index.es.js";
|
|
7
|
-
import { S } from "../../index-
|
|
7
|
+
import { S } from "../../index-uWXGnhjd.js";
|
|
8
8
|
export {
|
|
9
9
|
S as Segment
|
|
10
10
|
};
|
|
@@ -9,10 +9,10 @@ import { IconSlash } from "../icons/IconSlash/index.es.js";
|
|
|
9
9
|
import { Modal } from "../Modal/index.es.js";
|
|
10
10
|
import { Text } from "../Text/index.es.js";
|
|
11
11
|
import { Conditional } from "../Conditional/index.es.js";
|
|
12
|
+
import { c as COLOR_NEUTRAL_40 } from "../../tokens-D_iASp38.js";
|
|
12
13
|
import { i as isMobile } from "../../isMobile-RyKhTreE.js";
|
|
13
14
|
import { F as Field } from "../../index-ZE6zszxw.js";
|
|
14
15
|
import { useState, useRef, useEffect } from "react";
|
|
15
|
-
import { c as COLOR_NEUTRAL_40 } from "../../tokens-D_iASp38.js";
|
|
16
16
|
import './styles.css';const useSelectField = (options, initialValue, onChange, onBlur, disabled, register, autocomplete = false, fullScreenOptions = false) => {
|
|
17
17
|
var _a;
|
|
18
18
|
const [isDropdownOpen, setIsDropdownOpen] = useState(false);
|
|
@@ -3,7 +3,8 @@ export type TabsProps = {
|
|
|
3
3
|
tabs: TabItemProps[];
|
|
4
4
|
areTabsHidden?: boolean;
|
|
5
5
|
initialTab?: string;
|
|
6
|
-
|
|
6
|
+
headerChildren?: React.ReactNode;
|
|
7
|
+
onClick?: (value: string) => void;
|
|
7
8
|
};
|
|
8
9
|
export type TabItemProps = {
|
|
9
10
|
tab: string;
|
|
@@ -11,5 +12,5 @@ export type TabItemProps = {
|
|
|
11
12
|
children?: React.ReactElement;
|
|
12
13
|
icon?: React.ReactNode;
|
|
13
14
|
};
|
|
14
|
-
export declare const Tabs: ({ tabs, initialTab, onClick, areTabsHidden, }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare const Tabs: ({ tabs, initialTab, onClick, areTabsHidden, headerChildren, }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
15
16
|
export default Tabs;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as classNames } from "../../index-CweZ_OcN.js";
|
|
3
|
-
import {
|
|
3
|
+
import { I as If } from "../../react-if.esm-BV55Vzhf.js";
|
|
4
4
|
import { Button } from "../Button/index.es.js";
|
|
5
5
|
import { useState, useEffect } from "react";
|
|
6
6
|
import './styles.css';const Tabs = ({
|
|
7
7
|
tabs,
|
|
8
8
|
initialTab,
|
|
9
9
|
onClick,
|
|
10
|
-
areTabsHidden
|
|
10
|
+
areTabsHidden,
|
|
11
|
+
headerChildren
|
|
11
12
|
}) => {
|
|
12
13
|
const [isClicked, setIsClicked] = useState(false);
|
|
13
14
|
const [currButton, setCurrButton] = useState(initialTab ?? "");
|
|
@@ -16,7 +17,7 @@ import './styles.css';const Tabs = ({
|
|
|
16
17
|
setActiveTab(initialTab);
|
|
17
18
|
}, [initialTab]);
|
|
18
19
|
const handleClick = (item) => {
|
|
19
|
-
onClick(item.tab);
|
|
20
|
+
onClick && onClick(item.tab);
|
|
20
21
|
setCurrButton(item.tab);
|
|
21
22
|
setActiveTab(item.tab);
|
|
22
23
|
setIsClicked(true);
|
|
@@ -28,40 +29,30 @@ import './styles.css';const Tabs = ({
|
|
|
28
29
|
});
|
|
29
30
|
};
|
|
30
31
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
31
|
-
/* @__PURE__ */ jsx(
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}) }) }),
|
|
50
|
-
renderElse: null
|
|
51
|
-
}
|
|
52
|
-
),
|
|
32
|
+
/* @__PURE__ */ jsx(If, { condition: !areTabsHidden, children: /* @__PURE__ */ jsx("div", { className: "au-tabs", children: /* @__PURE__ */ jsxs("div", { className: "au-tabs__container", children: [
|
|
33
|
+
/* @__PURE__ */ jsx("div", { className: "au-tabs__btns-panel", children: tabs.map((item) => {
|
|
34
|
+
return /* @__PURE__ */ jsxs(
|
|
35
|
+
Button,
|
|
36
|
+
{
|
|
37
|
+
className: buttonClass(item),
|
|
38
|
+
type: "outlined",
|
|
39
|
+
onClick: () => handleClick(item),
|
|
40
|
+
children: [
|
|
41
|
+
item.icon,
|
|
42
|
+
item.title
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
`au-tabs-${item.tab}`
|
|
46
|
+
);
|
|
47
|
+
}) }),
|
|
48
|
+
/* @__PURE__ */ jsx(If, { condition: !!headerChildren, children: headerChildren })
|
|
49
|
+
] }) }) }),
|
|
53
50
|
tabs.map(({ children, tab }) => {
|
|
54
51
|
return /* @__PURE__ */ jsx(
|
|
55
52
|
"div",
|
|
56
53
|
{
|
|
57
54
|
className: `au-tabs__children children-${tab}`,
|
|
58
|
-
children: /* @__PURE__ */ jsx(
|
|
59
|
-
Conditional,
|
|
60
|
-
{
|
|
61
|
-
condition: currButton === tab || activeTab === tab,
|
|
62
|
-
renderIf: children
|
|
63
|
-
}
|
|
64
|
-
)
|
|
55
|
+
children: /* @__PURE__ */ jsx(If, { condition: currButton === tab || activeTab === tab, children })
|
|
65
56
|
},
|
|
66
57
|
`au-tabs-${tab}`
|
|
67
58
|
);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Tabs/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport {
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Tabs/index.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { If } from '@components/misc'\nimport { Button } from '@components/Button'\nimport { useEffect, useState } from 'react'\nimport './styles.scss'\n\nexport type TabsProps = {\n tabs: TabItemProps[]\n areTabsHidden?: boolean\n initialTab?: string\n headerChildren?: React.ReactNode\n onClick?: (value: string) => void\n}\n\nexport type TabItemProps = {\n tab: string\n title: string\n children?: React.ReactElement\n icon?: React.ReactNode\n}\n\nexport const Tabs = ({\n tabs,\n initialTab,\n onClick,\n areTabsHidden,\n headerChildren,\n}: TabsProps) => {\n const [isClicked, setIsClicked] = useState(false)\n const [currButton, setCurrButton] = useState(initialTab ?? '')\n const [activeTab, setActiveTab] = useState(initialTab)\n\n useEffect(() => {\n setActiveTab(initialTab)\n }, [initialTab])\n\n const handleClick = (item: TabItemProps) => {\n onClick && onClick(item.tab)\n setCurrButton(item.tab)\n setActiveTab(item.tab)\n setIsClicked(true)\n }\n\n const buttonClass = (item: TabItemProps) => {\n const isActive =\n (isClicked && item.tab === currButton) || activeTab === item.tab\n return classNames('au-tabs__button', {\n active: isActive,\n })\n }\n\n return (\n <>\n <If condition={!areTabsHidden}>\n <div className=\"au-tabs\">\n <div className=\"au-tabs__container\">\n <div className=\"au-tabs__btns-panel\">\n {tabs.map((item: TabItemProps) => {\n return (\n <Button\n key={`au-tabs-${item.tab}`}\n className={buttonClass(item)}\n type={'outlined'}\n onClick={() => handleClick(item)}>\n {item.icon}\n {item.title}\n </Button>\n )\n })}\n </div>\n <If condition={!!headerChildren}>{headerChildren}</If>\n </div>\n </div>\n </If>\n\n {tabs.map(({ children, tab }: TabItemProps) => {\n return (\n <div\n className={`au-tabs__children children-${tab}`}\n key={`au-tabs-${tab}`}>\n <If condition={currButton === tab || activeTab === tab}>\n {children}\n </If>\n </div>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AAe,gBAAA;AAAA,IAAA,EACnD,CAAA,EACF,CAAA,GACF;AAAA,IAEC,KAAK,IAAI,CAAC,EAAE,UAAU,UAAwB;AAE3C,aAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAW,8BAA8B,GAAG;AAAA,UAE5C,8BAAC,IAAG,EAAA,WAAW,eAAe,OAAO,cAAc,KAChD,UACH;AAAA,QAAA;AAAA,QAHK,WAAW,GAAG;AAAA,MAAA;AAAA,IAIrB,CAEH;AAAA,EACH,EAAA,CAAA;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.au-tabs__container{display:flex;gap:16px;white-space:nowrap;overflow-x:scroll}.au-
|
|
1
|
+
.au-tabs__container{display:flex;flex-direction:column}@media (min-width: 600px){.au-tabs__container{flex-direction:row;align-items:center;justify-content:space-between}}.au-tabs__btns-panel{display:flex;gap:16px;white-space:nowrap;overflow-x:scroll;margin-bottom:20px}.au-tabs__btns-panel::-webkit-scrollbar{display:none}@media (min-width: 600px){.au-tabs__btns-panel{overflow:unset;margin-bottom:0}}.au-tabs__button{font-size:14px;font-weight:600;padding:8px 16px;height:40px;border-color:#e2e4e9;color:#454a54}.au-tabs__button .au-icon svg,.au-tabs__button svg{color:#454a54}.au-tabs__button.active{background-color:#fafbff;border-color:#9abcff;color:#0048db}.au-tabs__button.active .au-icon svg,.au-tabs__button.active svg{color:#0048db}.au-tabs__children{margin-top:24px}@media (min-width: 600px){.au-tabs__children{margin-top:32px}}
|
|
@@ -6,8 +6,8 @@ import { IconAlertTriangle } from "../icons/IconAlertTriangle/index.es.js";
|
|
|
6
6
|
import { IconCheck } from "../icons/IconCheck/index.es.js";
|
|
7
7
|
import { IconInfo } from "../icons/IconInfo/index.es.js";
|
|
8
8
|
import { IconSlash } from "../icons/IconSlash/index.es.js";
|
|
9
|
-
import { Conditional } from "../Conditional/index.es.js";
|
|
10
9
|
import { C as COLOR_SUCCESS_50, b as COLOR_ERROR_50, e as COLOR_WARNING_50, f as COLOR_INFO_50, g as COLOR_BRAND_CYAN_50, d as COLOR_NEUTRAL_70 } from "../../tokens-D_iASp38.js";
|
|
10
|
+
import { Conditional } from "../Conditional/index.es.js";
|
|
11
11
|
import './styles.css';const Tag = ({
|
|
12
12
|
status,
|
|
13
13
|
border = "square",
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Conditional } from "../Conditional/index.es.js";
|
|
2
|
-
import { C, D, I, S } from "../../react-if.esm-
|
|
2
|
+
import { C, D, E, I, S, T } from "../../react-if.esm-BV55Vzhf.js";
|
|
3
3
|
export {
|
|
4
4
|
C as Case,
|
|
5
5
|
Conditional,
|
|
6
6
|
D as Default,
|
|
7
|
+
E as Else,
|
|
7
8
|
I as If,
|
|
8
|
-
S as Switch
|
|
9
|
+
S as Switch,
|
|
10
|
+
T as Then
|
|
9
11
|
};
|
|
10
12
|
//# sourceMappingURL=index.es.js.map
|
|
@@ -3,7 +3,7 @@ import "./index-CweZ_OcN.js";
|
|
|
3
3
|
import "./components/Icon/index.es.js";
|
|
4
4
|
import { IconChevronLeft } from "./components/icons/IconChevronLeft/index.es.js";
|
|
5
5
|
import { IconChevronRight } from "./components/icons/IconChevronRight/index.es.js";
|
|
6
|
-
import { S as Segment } from "./index-
|
|
6
|
+
import { S as Segment } from "./index-uWXGnhjd.js";
|
|
7
7
|
import $dbSRa$react__default, { createContext, useContext, useState, useRef, useCallback, useEffect, useMemo, forwardRef } from "react";
|
|
8
8
|
import "react-dom";
|
|
9
9
|
createContext(null);
|
|
@@ -5686,4 +5686,4 @@ export {
|
|
|
5686
5686
|
$dfd62f934fc76fed$export$e11f8ba65d857bff as e,
|
|
5687
5687
|
$dfd62f934fc76fed$export$5d847498420df57b as f
|
|
5688
5688
|
};
|
|
5689
|
-
//# sourceMappingURL=index-
|
|
5689
|
+
//# sourceMappingURL=index-BzVR1Tq6.js.map
|