@consumidor-positivo/aurora 0.0.119 → 0.0.121
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.d.ts +4 -2
- package/dist/components/Alert/index.es.js +35 -5
- package/dist/components/Alert/index.es.js.map +1 -1
- package/dist/components/Alert/styles.css +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/Spinner/index.es.js +3 -3
- package/dist/components/Spinner/index.es.js.map +1 -1
- package/dist/{index-Cn20y-Ji.js → index-B9cLhrrb.js} +2 -2
- package/dist/{index-Cn20y-Ji.js.map → index-B9cLhrrb.js.map} +1 -1
- package/dist/{index-CXayTd35.js → index-BDy8i79S.js} +2 -2
- package/dist/{index-CXayTd35.js.map → index-BDy8i79S.js.map} +1 -1
- package/dist/{index-piVJ4mle.js → index-C9HFx59f.js} +3 -3
- package/dist/{index-piVJ4mle.js.map → index-C9HFx59f.js.map} +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
export type AlertProps = {
|
|
3
|
-
status?: 'success' | 'error' | 'warning' | 'info';
|
|
3
|
+
status?: 'success' | 'error' | 'warning' | 'info' | 'timer';
|
|
4
4
|
type?: 1 | 2;
|
|
5
5
|
orientation?: 'horizontal' | 'vertical';
|
|
6
6
|
title?: {
|
|
@@ -14,5 +14,7 @@ export type AlertProps = {
|
|
|
14
14
|
};
|
|
15
15
|
closeButton?: boolean;
|
|
16
16
|
children?: React.ReactNode;
|
|
17
|
+
countdown?: number;
|
|
18
|
+
onCountdownEnd?: () => void;
|
|
17
19
|
};
|
|
18
|
-
export declare const Alert: ({ status, type, orientation, title, text, actionButton, closeButton, children, }: AlertProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
20
|
+
export declare const Alert: ({ status, type, orientation, title, text, actionButton, closeButton, children, countdown, onCountdownEnd, }: AlertProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useState } from "react";
|
|
2
|
+
import { 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 { IconAlertOctagon } from "../icons/IconAlertOctagon/index.es.js";
|
|
6
6
|
import { IconAlertTriangle } from "../icons/IconAlertTriangle/index.es.js";
|
|
7
7
|
import { IconCheck } from "../icons/IconCheck/index.es.js";
|
|
8
|
+
import { IconClock } from "../icons/IconClock/index.es.js";
|
|
8
9
|
import { IconInfo } from "../icons/IconInfo/index.es.js";
|
|
9
10
|
import { IconX } from "../icons/IconX/index.es.js";
|
|
10
|
-
import { h as COLOR_NEUTRAL_70, C as COLOR_SUCCESS_50, b as COLOR_ERROR_50, W as COLOR_WARNING_50, a1 as COLOR_INFO_50 } from "../../tokens-BwvPtuyb.js";
|
|
11
11
|
import { Conditional } from "../Conditional/index.es.js";
|
|
12
|
+
import { Text } from "../Text/index.es.js";
|
|
13
|
+
import { h as COLOR_NEUTRAL_70, C as COLOR_SUCCESS_50, b as COLOR_ERROR_50, W as COLOR_WARNING_50, a1 as COLOR_INFO_50 } from "../../tokens-BwvPtuyb.js";
|
|
12
14
|
import './styles.css';const Alert = ({
|
|
13
15
|
status = "info",
|
|
14
16
|
type = 1,
|
|
@@ -17,9 +19,27 @@ import './styles.css';const Alert = ({
|
|
|
17
19
|
text,
|
|
18
20
|
actionButton,
|
|
19
21
|
closeButton = false,
|
|
20
|
-
children
|
|
22
|
+
children,
|
|
23
|
+
countdown = 59,
|
|
24
|
+
onCountdownEnd
|
|
21
25
|
}) => {
|
|
22
26
|
const [isClosed, setIsClosed] = useState(false);
|
|
27
|
+
const [timeLeft, setTimeLeft] = useState(countdown);
|
|
28
|
+
const [isCountdownFinished, setIsCountdownFinished] = useState(false);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
if (status !== "timer" || timeLeft <= 0) return;
|
|
31
|
+
const timer = setInterval(() => {
|
|
32
|
+
setTimeLeft((prev) => {
|
|
33
|
+
if (prev <= 1) {
|
|
34
|
+
clearInterval(timer);
|
|
35
|
+
setIsCountdownFinished(true);
|
|
36
|
+
if (onCountdownEnd) onCountdownEnd();
|
|
37
|
+
}
|
|
38
|
+
return prev - 1;
|
|
39
|
+
});
|
|
40
|
+
}, 1e3);
|
|
41
|
+
return () => clearInterval(timer);
|
|
42
|
+
}, [status, timeLeft, onCountdownEnd]);
|
|
23
43
|
const statusMap = {
|
|
24
44
|
success: {
|
|
25
45
|
option: "success",
|
|
@@ -33,7 +53,17 @@ import './styles.css';const Alert = ({
|
|
|
33
53
|
option: "warning",
|
|
34
54
|
icon: /* @__PURE__ */ jsx(IconAlertTriangle, { rawColor: COLOR_WARNING_50 })
|
|
35
55
|
},
|
|
36
|
-
info: { option: "info", icon: /* @__PURE__ */ jsx(IconInfo, { rawColor: COLOR_INFO_50 }) }
|
|
56
|
+
info: { option: "info", icon: /* @__PURE__ */ jsx(IconInfo, { rawColor: COLOR_INFO_50 }) },
|
|
57
|
+
timer: {
|
|
58
|
+
option: "timer",
|
|
59
|
+
icon: /* @__PURE__ */ jsxs("div", { className: "au-alert__timer", children: [
|
|
60
|
+
/* @__PURE__ */ jsx(IconClock, { rawColor: COLOR_WARNING_50 }),
|
|
61
|
+
!isCountdownFinished && /* @__PURE__ */ jsxs(Text, { className: "au-alert__countdown", variant: "body-small", weight: "bold", children: [
|
|
62
|
+
timeLeft,
|
|
63
|
+
"s"
|
|
64
|
+
] })
|
|
65
|
+
] })
|
|
66
|
+
}
|
|
37
67
|
};
|
|
38
68
|
const alertClasses = classNames("au-alert", {
|
|
39
69
|
[`au-alert--${statusMap[status].option}--type-${type}`]: statusMap[status].option
|
|
@@ -51,7 +81,7 @@ import './styles.css';const Alert = ({
|
|
|
51
81
|
/* @__PURE__ */ jsx(
|
|
52
82
|
Conditional,
|
|
53
83
|
{
|
|
54
|
-
condition: !!actionButton,
|
|
84
|
+
condition: !!actionButton && (status !== "timer" || isCountdownFinished),
|
|
55
85
|
renderIf: /* @__PURE__ */ jsx(
|
|
56
86
|
"button",
|
|
57
87
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Alert/index.tsx"],"sourcesContent":["import { useState } from 'react'\nimport classNames from 'classnames'\nimport {\n IconAlertOctagon,\n IconAlertTriangle,\n IconCheck,\n IconInfo,\n IconX,\n} from '@components/icons'\nimport {\n COLOR_ERROR_50,\n COLOR_INFO_50,\n COLOR_NEUTRAL_70,\n COLOR_SUCCESS_50,\n COLOR_WARNING_50,\n} from '@core/tokens'\nimport { Conditional } from '@components/misc'\nimport './styles.scss'\n\nexport type AlertProps = {\n status?: 'success' | 'error' | 'warning' | 'info'\n type?: 1 | 2\n orientation?: 'horizontal' | 'vertical'\n title?: { content?: string; weight?: 'bold' | 'normal' }\n text?: string\n actionButton?: { content?: string; onClick?: () => void }\n closeButton?: boolean\n children?: React.ReactNode\n}\n\nexport const Alert = ({\n status = 'info',\n type = 1,\n orientation = 'horizontal',\n title,\n text,\n actionButton,\n closeButton = false,\n children,\n}: AlertProps) => {\n const [isClosed, setIsClosed] = useState(false)\n\n const statusMap = {\n success: {\n option: 'success',\n icon: <IconCheck rawColor={COLOR_SUCCESS_50} />,\n },\n error: {\n option: 'error',\n icon: <IconAlertOctagon rawColor={COLOR_ERROR_50} />,\n },\n warning: {\n option: 'warning',\n icon: <IconAlertTriangle rawColor={COLOR_WARNING_50} />,\n },\n info: { option: 'info', icon: <IconInfo rawColor={COLOR_INFO_50} /> },\n }\n\n const alertClasses = classNames('au-alert', {\n [`au-alert--${statusMap[status].option}--type-${type}`]:\n statusMap[status].option,\n })\n\n if (isClosed) return null\n\n return (\n <div className={alertClasses}>\n <div className=\"au-alert__content\">\n {statusMap[status].icon}\n <div className={`au-alert__container--${orientation}`}>\n <div>\n <h4 className={`au-alert__title au-alert__title--${title?.weight}`}>\n {title?.content}\n </h4>\n <p className={`au-alert__support-text`}>{text}</p>\n </div>\n {children}\n <Conditional\n condition={!!actionButton}\n renderIf={\n <button\n className=\"au-alert__action-btn\"\n onClick={actionButton?.onClick}>\n {actionButton?.content}\n </button>\n }\n />\n </div>\n </div>\n\n <Conditional\n condition={closeButton}\n renderIf={\n <button className=\"au-alert__close-btn\">\n <IconX\n rawColor={COLOR_NEUTRAL_70}\n onClick={() => setIsClosed(true)}\n />\n </button>\n }\n />\n </div>\n )\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Alert/index.tsx"],"sourcesContent":["import { useState, useEffect } from 'react'\nimport classNames from 'classnames'\nimport {\n IconAlertOctagon,\n IconAlertTriangle,\n IconCheck,\n IconInfo,\n IconX,\n IconClock,\n} from '@components/icons'\nimport {\n COLOR_ERROR_50,\n COLOR_INFO_50,\n COLOR_NEUTRAL_70,\n COLOR_SUCCESS_50,\n COLOR_WARNING_50,\n} from '@core/tokens'\nimport { Conditional } from '@components/misc'\nimport { Text } from '@components/Text'\nimport './styles.scss'\n\nexport type AlertProps = {\n status?: 'success' | 'error' | 'warning' | 'info' | 'timer'\n type?: 1 | 2\n orientation?: 'horizontal' | 'vertical'\n title?: { content?: string; weight?: 'bold' | 'normal' }\n text?: string\n actionButton?: { content?: string; onClick?: () => void }\n closeButton?: boolean\n children?: React.ReactNode\n countdown?: number\n onCountdownEnd?: () => void\n}\n\nexport const Alert = ({\n status = 'info',\n type = 1,\n orientation = 'horizontal',\n title,\n text,\n actionButton,\n closeButton = false,\n children,\n countdown = 59,\n onCountdownEnd,\n}: AlertProps) => {\n const [isClosed, setIsClosed] = useState(false)\n const [timeLeft, setTimeLeft] = useState(countdown)\n const [isCountdownFinished, setIsCountdownFinished] = useState(false)\n\n useEffect(() => {\n if (status !== 'timer' || timeLeft <= 0) return\n\n const timer = setInterval(() => {\n setTimeLeft((prev) => {\n if (prev <= 1) {\n clearInterval(timer)\n setIsCountdownFinished(true)\n if (onCountdownEnd) onCountdownEnd()\n }\n return prev - 1\n })\n }, 1000)\n\n return () => clearInterval(timer)\n }, [status, timeLeft, onCountdownEnd])\n\n const statusMap = {\n success: {\n option: 'success',\n icon: <IconCheck rawColor={COLOR_SUCCESS_50} />,\n },\n error: {\n option: 'error',\n icon: <IconAlertOctagon rawColor={COLOR_ERROR_50} />,\n },\n warning: {\n option: 'warning',\n icon: <IconAlertTriangle rawColor={COLOR_WARNING_50} />,\n },\n info: { option: 'info', icon: <IconInfo rawColor={COLOR_INFO_50} /> },\n timer: {\n option: 'timer',\n icon: (\n <div className=\"au-alert__timer\">\n <IconClock rawColor={COLOR_WARNING_50} />\n {!isCountdownFinished && (\n <Text className=\"au-alert__countdown\" variant=\"body-small\" weight=\"bold\">{timeLeft}s</Text>\n )}\n </div>\n ),\n },\n }\n\n const alertClasses = classNames('au-alert', {\n [`au-alert--${statusMap[status].option}--type-${type}`]:\n statusMap[status].option,\n })\n\n if (isClosed) return null\n\n return (\n <div className={alertClasses}>\n <div className=\"au-alert__content\">\n {statusMap[status].icon}\n <div className={`au-alert__container--${orientation}`}>\n <div>\n <h4 className={`au-alert__title au-alert__title--${title?.weight}`}>\n {title?.content}\n </h4>\n <p className={`au-alert__support-text`}>{text}</p>\n </div>\n {children}\n <Conditional\n condition={!!actionButton && (status !== 'timer' || isCountdownFinished)}\n renderIf={\n <button\n className=\"au-alert__action-btn\"\n onClick={actionButton?.onClick}>\n {actionButton?.content}\n </button>\n }\n />\n </div>\n </div>\n\n <Conditional\n condition={closeButton}\n renderIf={\n <button className=\"au-alert__close-btn\">\n <IconX\n rawColor={COLOR_NEUTRAL_70}\n onClick={() => setIsClosed(true)}\n />\n </button>\n }\n />\n </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AA,UAAA;AAAA,QAAA,GAEnC;AAAA,MAAA;AAAA,IAEJ;AAAA,EACF,EAAA,CAAA;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.au-alert{font-family:"Source Sans 3",sans-serif;border-radius:16px;display:flex;justify-content:space-between;gap:16px;padding:16px}.au-alert__content{display:flex;gap:16px;flex:1}.au-alert__container--horizontal .au-alert__action-btn{margin-top:8px}.au-alert__container--vertical{display:flex;gap:16px;flex-direction:row;justify-content:space-between;width:100%}.au-alert__title{color:#16181d;font-size:16px;font-weight:400;line-height:24px}.au-alert__title--bold{font-weight:600}.au-alert__support-text{color:#454a54;font-size:14px;line-height:21px}.au-alert__action-btn{background-color:transparent;border:none;color:#0048db;cursor:pointer;font-size:16px;font-weight:600;line-height:24px}.au-alert__close-btn{cursor:pointer;background:transparent;border:none;display:flex}.au-alert--info--type-1{background-color:#f3f0fc;border:1px solid #510cb2}.au-alert--info--type-2{background-color:#eee6ff;border:none}.au-alert--success--type-1{background-color:#f0fcf5;border:1px solid #10593b}.au-alert--success--type-2{background-color:#e5fff0;border:none}.au-alert--warning--type-1{background-color:#fcf4f0;border:1px solid #a64a08}.au-alert--warning--type-2{background-color:#fff0e6;border:none}.au-alert--error--type-1{background-color:#f5eff0;border:1px solid #991717}.au-alert--error--type-2{background-color:#ffe5e5;border:none}
|
|
1
|
+
.au-alert{font-family:"Source Sans 3",sans-serif;border-radius:16px;display:flex;justify-content:space-between;gap:16px;padding:16px}.au-alert__content{display:flex;gap:16px;flex:1}.au-alert__container--horizontal .au-alert__action-btn{margin-top:8px}.au-alert__container--vertical{display:flex;gap:16px;flex-direction:row;justify-content:space-between;width:100%}.au-alert__title{color:#16181d;font-size:16px;font-weight:400;line-height:24px}.au-alert__title--bold{font-weight:600}.au-alert__support-text{color:#454a54;font-size:14px;line-height:21px}.au-alert__action-btn{background-color:transparent;border:none;color:#0048db;cursor:pointer;font-size:16px;font-weight:600;line-height:24px}.au-alert__close-btn{cursor:pointer;background:transparent;border:none;display:flex}.au-alert__timer{text-align:center}.au-alert__countdown{color:#a64a08}.au-alert--info--type-1{background-color:#f3f0fc;border:1px solid #510cb2}.au-alert--info--type-2{background-color:#eee6ff;border:none}.au-alert--success--type-1{background-color:#f0fcf5;border:1px solid #10593b}.au-alert--success--type-2{background-color:#e5fff0;border:none}.au-alert--warning--type-1,.au-alert--timer--type-1{background-color:#fcf4f0;border:1px solid #a64a08}.au-alert--warning--type-2,.au-alert--timer--type-2{background-color:#fff0e6;border:none}.au-alert--timer--type-1 .au-alert__content,.au-alert--timer--type-2 .au-alert__content{align-items:center}.au-alert--error--type-1{background-color:#f5eff0;border:1px solid #991717}.au-alert--error--type-2{background-color:#ffe5e5;border:none}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../index-CweZ_OcN.js";
|
|
3
|
-
import "../../index-
|
|
3
|
+
import "../../index-B9cLhrrb.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-C9HFx59f.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-BDy8i79S.js";
|
|
7
|
+
import { C } from "../../index-B9cLhrrb.js";
|
|
8
8
|
export {
|
|
9
9
|
C as CalendarHeader
|
|
10
10
|
};
|
|
@@ -3,8 +3,8 @@ 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 { n as COLOR_NEUTRAL_00 } from "../../tokens-BwvPtuyb.js";
|
|
7
6
|
import { F as Field } from "../../index-ZE6zszxw.js";
|
|
7
|
+
import { n as COLOR_NEUTRAL_00 } from "../../tokens-BwvPtuyb.js";
|
|
8
8
|
import { Conditional } from "../Conditional/index.es.js";
|
|
9
9
|
import { Text } from "../Text/index.es.js";
|
|
10
10
|
import './styles.css';const CheckboxField = ({
|
|
@@ -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-BwvPtuyb.js";
|
|
3
2
|
import "../../index-CweZ_OcN.js";
|
|
4
3
|
import "../Icon/index.es.js";
|
|
5
4
|
import { IconCalendar } from "../icons/IconCalendar/index.es.js";
|
|
6
5
|
import { InputField } from "../InputField/index.es.js";
|
|
7
|
-
import { g as getDefaultDate, D as DDMMYYYY, a as DatepickerCalendar, A as AUCalendarDate } from "../../index-
|
|
6
|
+
import { g as getDefaultDate, D as DDMMYYYY, a as DatepickerCalendar, A as AUCalendarDate } from "../../index-C9HFx59f.js";
|
|
8
7
|
import { useRef, useState, useMemo, useEffect } from "react";
|
|
9
8
|
import { a as above } from "../../screen-DfYo7XQ_.js";
|
|
10
|
-
import { u as useOutsideClick } from "../../index-
|
|
9
|
+
import { u as useOutsideClick } from "../../index-BDy8i79S.js";
|
|
10
|
+
import { B as BREAKPOINT_MD, c as COLOR_NEUTRAL_40 } from "../../tokens-BwvPtuyb.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 { B as BREAKPOINT_MD } from "../../tokens-BwvPtuyb.js";
|
|
4
3
|
import { Portal } from "../Portal/index.es.js";
|
|
4
|
+
import { B as BREAKPOINT_MD } from "../../tokens-BwvPtuyb.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-BDy8i79S.js";
|
|
8
8
|
export {
|
|
9
9
|
S as Segment
|
|
10
10
|
};
|
|
@@ -19,12 +19,12 @@ import './styles.css';const Spinner = ({ size, color }) => {
|
|
|
19
19
|
x2: "90%",
|
|
20
20
|
y2: "10%",
|
|
21
21
|
children: [
|
|
22
|
-
/* @__PURE__ */ jsx("stop", { offset: "0",
|
|
23
|
-
/* @__PURE__ */ jsx("stop", { offset: "1",
|
|
22
|
+
/* @__PURE__ */ jsx("stop", { offset: "0", stopColor: color, stopOpacity: "1" }),
|
|
23
|
+
/* @__PURE__ */ jsx("stop", { offset: "1", stopColor: color, stopOpacity: "0" })
|
|
24
24
|
]
|
|
25
25
|
}
|
|
26
26
|
) }),
|
|
27
|
-
/* @__PURE__ */ jsxs("g", {
|
|
27
|
+
/* @__PURE__ */ jsxs("g", { strokeWidth: "7", strokeLinecap: "round", fill: "none", children: [
|
|
28
28
|
/* @__PURE__ */ jsx("path", { stroke: color, d: "M60,32 A28,28 0 1 1 4,32" }),
|
|
29
29
|
/* @__PURE__ */ jsx(
|
|
30
30
|
"path",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Spinner/index.tsx"],"sourcesContent":["import './styles.scss'\n\ntype SpinnerProps = {\n size: number\n color: string\n}\n\nexport const Spinner: React.FC<SpinnerProps> = ({ size, color }) => {\n return (\n <div className=\"au-spinner\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 64 64\"\n width={size}\n height={size}\n color={color}>\n <defs>\n <linearGradient\n id={`au-loading-${color}`}\n gradientUnits=\"objectBoundingBox\"\n x1=\"10%\"\n y1=\"0%\"\n x2=\"90%\"\n y2=\"10%\">\n <stop offset=\"0\"
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Spinner/index.tsx"],"sourcesContent":["import './styles.scss'\n\ntype SpinnerProps = {\n size: number\n color: string\n}\n\nexport const Spinner: React.FC<SpinnerProps> = ({ size, color }) => {\n return (\n <div className=\"au-spinner\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 64 64\"\n width={size}\n height={size}\n color={color}>\n <defs>\n <linearGradient\n id={`au-loading-${color}`}\n gradientUnits=\"objectBoundingBox\"\n x1=\"10%\"\n y1=\"0%\"\n x2=\"90%\"\n y2=\"10%\">\n <stop offset=\"0\" stopColor={color} stopOpacity=\"1\" />\n <stop offset=\"1\" stopColor={color} stopOpacity=\"0\" />\n </linearGradient>\n </defs>\n <g strokeWidth=\"7\" strokeLinecap=\"round\" fill=\"none\">\n <path stroke={color} d=\"M60,32 A28,28 0 1 1 4,32\" />\n\n <path\n d=\"M60,32 A28,28.5 0 1 0 4,32\"\n stroke={`url(#au-loading-${color})`}\n />\n </g>\n </svg>\n </div>\n )\n}\n"],"names":[],"mappings":";AAOO,MAAM,UAAkC,CAAC,EAAE,MAAM,YAAY;AAEhE,SAAA,oBAAC,OAAI,EAAA,WAAU,cACb,UAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAM;AAAA,MACN,SAAQ;AAAA,MACR,OAAO;AAAA,MACP,QAAQ;AAAA,MACR;AAAA,MACA,UAAA;AAAA,QAAA,oBAAC,QACC,EAAA,UAAA;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAI,cAAc,KAAK;AAAA,YACvB,eAAc;AAAA,YACd,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH,IAAG;AAAA,YACH,UAAA;AAAA,cAAA,oBAAC,UAAK,QAAO,KAAI,WAAW,OAAO,aAAY,KAAI;AAAA,kCAClD,QAAK,EAAA,QAAO,KAAI,WAAW,OAAO,aAAY,KAAI;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA,GAEvD;AAAA,6BACC,KAAE,EAAA,aAAY,KAAI,eAAc,SAAQ,MAAK,QAC5C,UAAA;AAAA,UAAA,oBAAC,QAAK,EAAA,QAAQ,OAAO,GAAE,4BAA2B;AAAA,UAElD;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,GAAE;AAAA,cACF,QAAQ,mBAAmB,KAAK;AAAA,YAAA;AAAA,UAClC;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
|
@@ -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-BDy8i79S.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-B9cLhrrb.js.map
|