@consumidor-positivo/aurora 0.0.79 → 0.0.80
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/Button/index.d.ts +1 -0
- package/dist/components/Button/index.es.js +13 -1
- package/dist/components/Button/index.es.js.map +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/{index-D1oGcejt.js → index-C8RdzVRj.js} +2 -2
- package/dist/{index-D1oGcejt.js.map → index-C8RdzVRj.js.map} +1 -1
- package/dist/{index-B2qlxNd4.js → index-CK85YRoz.js} +3 -3
- package/dist/{index-B2qlxNd4.js.map → index-CK85YRoz.js.map} +1 -1
- package/dist/{index-CclsoEnK.js → index-CP-KKFUb.js} +2 -2
- package/dist/{index-CclsoEnK.js.map → index-CP-KKFUb.js.map} +1 -1
- package/package.json +1 -1
|
@@ -21,6 +21,7 @@ import './styles.css';const Button = ({
|
|
|
21
21
|
round = false,
|
|
22
22
|
className,
|
|
23
23
|
borderWidth = "medium",
|
|
24
|
+
elementRef,
|
|
24
25
|
...props
|
|
25
26
|
}) => {
|
|
26
27
|
const buttonClasses = classNames("au-btn", {
|
|
@@ -40,7 +41,17 @@ import './styles.css';const Button = ({
|
|
|
40
41
|
if (!disabled && !!onClick) onClick(e);
|
|
41
42
|
}
|
|
42
43
|
if (as === "a") {
|
|
43
|
-
return /* @__PURE__ */ jsx(
|
|
44
|
+
return /* @__PURE__ */ jsx(
|
|
45
|
+
"a",
|
|
46
|
+
{
|
|
47
|
+
className: buttonClasses,
|
|
48
|
+
href,
|
|
49
|
+
target,
|
|
50
|
+
ref: elementRef,
|
|
51
|
+
...props,
|
|
52
|
+
children
|
|
53
|
+
}
|
|
54
|
+
);
|
|
44
55
|
}
|
|
45
56
|
return /* @__PURE__ */ jsx(
|
|
46
57
|
"button",
|
|
@@ -48,6 +59,7 @@ import './styles.css';const Button = ({
|
|
|
48
59
|
className: buttonClasses,
|
|
49
60
|
onClick: handleClick,
|
|
50
61
|
type: htmlType,
|
|
62
|
+
ref: elementRef,
|
|
51
63
|
disabled: disabled || loading,
|
|
52
64
|
...props,
|
|
53
65
|
children: /* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Button/index.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport classNames from 'classnames'\nimport { Conditional } from '../misc/Conditional'\nimport { IconLoader } from '../icons/default'\nimport './styles.scss'\n\ntype ButtonProps = (\n | {\n as: 'a'\n href: string\n }\n | {\n as?: 'button'\n href?: never\n }\n) & {\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void\n children?: ReactNode | string | JSX.Element | JSX.Element[]\n color?: 'default'\n disabled?: boolean\n expand?: 'x'\n htmlType?: 'button' | 'submit' | 'reset'\n loading?: boolean\n size?: 'large' | 'medium'\n type?: 'primary' | 'outlined' | 'ghost'\n target?: string\n negative?: boolean\n btnText?: boolean\n round?: boolean\n className?: string\n borderWidth?: string\n}\n\nexport const Button: React.FC<ButtonProps> = ({\n as,\n children = 'Button component',\n color = 'default',\n disabled = false,\n expand,\n href,\n htmlType = 'button',\n loading = false,\n onClick,\n size = 'medium',\n type = 'primary',\n target,\n negative = false,\n btnText = false,\n round = false,\n className,\n borderWidth = 'medium',\n ...props\n}) => {\n const buttonClasses = classNames('au-btn', {\n [`au-btn--type-${type}`]: !!type,\n [`au-btn--size-${size}`]: !!size,\n [`au-btn--expand-${expand}`]: !!expand,\n [`au-btn--color-${color}`]: !!color,\n 'au-btn--negative': !!negative,\n 'au-btn--disabled': !!disabled,\n 'au-btn--loading': !!loading,\n [`au-btn--round-${size}`]: !!round,\n 'btn-text': !!btnText,\n [`au-btn--border-${borderWidth}`]: !!borderWidth,\n [className ?? '']: typeof className === 'string',\n })\n\n function handleClick(e: React.MouseEvent<HTMLButtonElement, MouseEvent>) {\n if (!disabled && !!onClick) onClick(e)\n }\n\n if (as === 'a') {\n return (\n <a
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../lib/components/Button/index.tsx"],"sourcesContent":["import React, { ReactNode } from 'react'\nimport classNames from 'classnames'\nimport { Conditional } from '../misc/Conditional'\nimport { IconLoader } from '../icons/default'\nimport './styles.scss'\n\ntype ButtonProps = (\n | {\n as: 'a'\n href: string\n }\n | {\n as?: 'button'\n href?: never\n }\n) & {\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void\n children?: ReactNode | string | JSX.Element | JSX.Element[]\n color?: 'default'\n disabled?: boolean\n expand?: 'x'\n htmlType?: 'button' | 'submit' | 'reset'\n loading?: boolean\n size?: 'large' | 'medium'\n type?: 'primary' | 'outlined' | 'ghost'\n target?: string\n negative?: boolean\n btnText?: boolean\n round?: boolean\n className?: string\n borderWidth?: string\n elementRef?: React.RefObject<HTMLButtonElement | HTMLAnchorElement>\n}\n\nexport const Button: React.FC<ButtonProps> = ({\n as,\n children = 'Button component',\n color = 'default',\n disabled = false,\n expand,\n href,\n htmlType = 'button',\n loading = false,\n onClick,\n size = 'medium',\n type = 'primary',\n target,\n negative = false,\n btnText = false,\n round = false,\n className,\n borderWidth = 'medium',\n elementRef,\n ...props\n}) => {\n const buttonClasses = classNames('au-btn', {\n [`au-btn--type-${type}`]: !!type,\n [`au-btn--size-${size}`]: !!size,\n [`au-btn--expand-${expand}`]: !!expand,\n [`au-btn--color-${color}`]: !!color,\n 'au-btn--negative': !!negative,\n 'au-btn--disabled': !!disabled,\n 'au-btn--loading': !!loading,\n [`au-btn--round-${size}`]: !!round,\n 'btn-text': !!btnText,\n [`au-btn--border-${borderWidth}`]: !!borderWidth,\n [className ?? '']: typeof className === 'string',\n })\n\n function handleClick(e: React.MouseEvent<HTMLButtonElement, MouseEvent>) {\n if (!disabled && !!onClick) onClick(e)\n }\n\n if (as === 'a') {\n return (\n <a\n className={buttonClasses}\n href={href}\n target={target}\n ref={elementRef as React.RefObject<HTMLAnchorElement>}\n {...props}>\n {children}\n </a>\n )\n }\n\n return (\n <button\n className={buttonClasses}\n onClick={handleClick}\n type={htmlType}\n ref={elementRef as React.RefObject<HTMLButtonElement>}\n disabled={disabled || loading}\n {...props}>\n <Conditional\n condition={loading}\n renderIf={<IconLoader />}\n renderElse={children}\n />\n </button>\n )\n}\n"],"names":[],"mappings":";;;;;AAkCO,MAAM,SAAgC,CAAC;AAAA,EAC5C;AAAA,EACA,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,WAAW;AAAA,EACX;AAAA,EACA;AAAA,EACA,WAAW;AAAA,EACX,UAAU;AAAA,EACV;AAAA,EACA,OAAO;AAAA,EACP,OAAO;AAAA,EACP;AAAA,EACA,WAAW;AAAA,EACX,UAAU;AAAA,EACV,QAAQ;AAAA,EACR;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA,GAAG;AACL,MAAM;AACE,QAAA,gBAAgB,WAAW,UAAU;AAAA,IACzC,CAAC,gBAAgB,IAAI,EAAE,GAAG,CAAC,CAAC;AAAA,IAC5B,CAAC,gBAAgB,IAAI,EAAE,GAAG,CAAC,CAAC;AAAA,IAC5B,CAAC,kBAAkB,MAAM,EAAE,GAAG,CAAC,CAAC;AAAA,IAChC,CAAC,iBAAiB,KAAK,EAAE,GAAG,CAAC,CAAC;AAAA,IAC9B,oBAAoB,CAAC,CAAC;AAAA,IACtB,oBAAoB,CAAC,CAAC;AAAA,IACtB,mBAAmB,CAAC,CAAC;AAAA,IACrB,CAAC,iBAAiB,IAAI,EAAE,GAAG,CAAC,CAAC;AAAA,IAC7B,YAAY,CAAC,CAAC;AAAA,IACd,CAAC,kBAAkB,WAAW,EAAE,GAAG,CAAC,CAAC;AAAA,IACrC,CAAC,aAAa,EAAE,GAAG,OAAO,cAAc;AAAA,EAAA,CACzC;AAED,WAAS,YAAY,GAAoD;AACvE,QAAI,CAAC,YAAY,CAAC,CAAC,iBAAiB,CAAC;AAAA,EACvC;AAEA,MAAI,OAAO,KAAK;AAEZ,WAAA;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW;AAAA,QACX;AAAA,QACA;AAAA,QACA,KAAK;AAAA,QACJ,GAAG;AAAA,QACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAGP;AAGE,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,KAAK;AAAA,MACL,UAAU,YAAY;AAAA,MACrB,GAAG;AAAA,MACJ,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,WAAW;AAAA,UACX,8BAAW,YAAW,EAAA;AAAA,UACtB,YAAY;AAAA,QAAA;AAAA,MACd;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "react/jsx-runtime";
|
|
2
2
|
import "../../index-CweZ_OcN.js";
|
|
3
|
-
import "../../index-
|
|
3
|
+
import "../../index-C8RdzVRj.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-CK85YRoz.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-CP-KKFUb.js";
|
|
7
|
+
import { C } from "../../index-C8RdzVRj.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 { m as COLOR_NEUTRAL_00 } from "../../tokens-DGTtjw-_.js";
|
|
7
6
|
import { F as Field } from "../../index-DfksciAR.js";
|
|
7
|
+
import { m as COLOR_NEUTRAL_00 } from "../../tokens-DGTtjw-_.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, b as COLOR_NEUTRAL_40 } from "../../tokens-DGTtjw-_.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-CK85YRoz.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-CP-KKFUb.js";
|
|
10
|
+
import { B as BREAKPOINT_MD, b as COLOR_NEUTRAL_40 } from "../../tokens-DGTtjw-_.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-DGTtjw-_.js";
|
|
4
3
|
import { Portal } from "../Portal/index.es.js";
|
|
4
|
+
import { B as BREAKPOINT_MD } from "../../tokens-DGTtjw-_.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-CP-KKFUb.js";
|
|
8
8
|
export {
|
|
9
9
|
S as Segment
|
|
10
10
|
};
|
|
@@ -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-CP-KKFUb.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-C8RdzVRj.js.map
|