@consumidor-positivo/aurora 0.0.138 → 0.0.139
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/EmailField/index.es.js +5 -4
- package/dist/components/EmailField/index.es.js.map +1 -1
- package/dist/components/PortalHolder/index.es.js +1 -1
- package/dist/components/Segment/index.es.js +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
|
@@ -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 { 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
11
|
import { Conditional } from "../Conditional/index.es.js";
|
|
13
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";
|
|
14
14
|
import './styles.css';const Alert = ({
|
|
15
15
|
status = "info",
|
|
16
16
|
type = 1,
|
|
@@ -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",
|
|
@@ -77,6 +77,7 @@ const EmailField = ({
|
|
|
77
77
|
handleChange,
|
|
78
78
|
handleSuggestionClick
|
|
79
79
|
} = useEmailAutocomplete();
|
|
80
|
+
console.log("nova versão");
|
|
80
81
|
return /* @__PURE__ */ jsxs(
|
|
81
82
|
Field.Root,
|
|
82
83
|
{
|
|
@@ -106,6 +107,9 @@ const EmailField = ({
|
|
|
106
107
|
type: "email",
|
|
107
108
|
inputRef,
|
|
108
109
|
value: inputValue,
|
|
110
|
+
disabled,
|
|
111
|
+
style: inputStyle,
|
|
112
|
+
...props,
|
|
109
113
|
onChange: (e) => {
|
|
110
114
|
console.log(e);
|
|
111
115
|
handleChange(e);
|
|
@@ -113,10 +117,7 @@ const EmailField = ({
|
|
|
113
117
|
if (props.onChange) {
|
|
114
118
|
props.onChange(e);
|
|
115
119
|
}
|
|
116
|
-
}
|
|
117
|
-
disabled,
|
|
118
|
-
style: inputStyle,
|
|
119
|
-
...props
|
|
120
|
+
}
|
|
120
121
|
}
|
|
121
122
|
),
|
|
122
123
|
/* @__PURE__ */ jsx(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":["../../../lib/components/form/EmailField/hook.ts","../../../lib/components/form/EmailField/index.tsx"],"sourcesContent":["import { useState } from 'react'\n\nconst emailDomains = [\n 'gmail.com',\n 'hotmail.com',\n 'yahoo.com',\n 'outlook.com',\n 'yahoo.com.br',\n 'uol.com.br',\n 'ig.com.br',\n 'terra.com.br',\n 'aol.com',\n 'live.com',\n 'msn.com',\n]\n\nexport const useEmailAutocomplete = () => {\n const [inputValue, setInputValue] = useState('')\n const [suggestions, setSuggestions] = useState<string[]>([])\n const [isDropdownOpen, setIsDropdownOpen] = useState(false)\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = e.target.value\n if (inputValue === value) return\n setInputValue(value)\n\n const atIndex = value.indexOf('@')\n if (atIndex > -1) {\n const domainPart = value.slice(atIndex + 1)\n const filteredDomains = emailDomains.filter((domain) =>\n domain.startsWith(domainPart),\n )\n setSuggestions(filteredDomains)\n setIsDropdownOpen(filteredDomains.length > 0)\n } else {\n setSuggestions([])\n setIsDropdownOpen(false)\n }\n }\n\n const handleSuggestionClick = (suggestion: string) => {\n const atIndex = inputValue.indexOf('@')\n if (atIndex > -1) {\n setInputValue(inputValue.slice(0, atIndex + 1) + suggestion)\n }\n setSuggestions([])\n setIsDropdownOpen(false)\n }\n\n return {\n inputValue,\n setInputValue,\n suggestions,\n isDropdownOpen,\n handleChange,\n handleSuggestionClick,\n }\n}\n","import Field from '../Field'\nimport { useEmailAutocomplete } from './hook'\nimport classNames from 'classnames'\nimport './styles.scss'\n\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {\n showOptionalLabel?: boolean\n requiredInput?: boolean\n success?: boolean\n error?: boolean\n errorMessage?: string\n helpMessage?: string\n rightSlot?: React.ReactNode\n label?: string\n inputStyle?: React.CSSProperties\n inputRef?: React.RefObject<HTMLInputElement>\n}\n\nexport const EmailField = ({\n showOptionalLabel,\n requiredInput,\n success,\n error,\n errorMessage,\n helpMessage,\n label,\n id,\n disabled,\n style,\n className,\n inputStyle,\n rightSlot,\n inputRef,\n ...props\n}: InputProps) => {\n const {\n inputValue,\n suggestions,\n isDropdownOpen,\n handleChange,\n handleSuggestionClick,\n } = useEmailAutocomplete()\n\n return (\n <Field.Root\n style={style}\n customclass={className}\n success={success}\n error={error}\n disabled={disabled}>\n <Field.Label\n text={label}\n id={id}\n showOptionalLabel={showOptionalLabel}\n required={requiredInput}\n success={success}\n error={error}\n disabled={disabled}\n />\n <Field.InputHolder rightSideSlot={rightSlot}>\n <Field.Input\n id={id}\n type=\"email\"\n inputRef={inputRef}\n value={inputValue}\n
|
|
1
|
+
{"version":3,"file":"index.es.js","sources":["../../../lib/components/form/EmailField/hook.ts","../../../lib/components/form/EmailField/index.tsx"],"sourcesContent":["import { useState } from 'react'\n\nconst emailDomains = [\n 'gmail.com',\n 'hotmail.com',\n 'yahoo.com',\n 'outlook.com',\n 'yahoo.com.br',\n 'uol.com.br',\n 'ig.com.br',\n 'terra.com.br',\n 'aol.com',\n 'live.com',\n 'msn.com',\n]\n\nexport const useEmailAutocomplete = () => {\n const [inputValue, setInputValue] = useState('')\n const [suggestions, setSuggestions] = useState<string[]>([])\n const [isDropdownOpen, setIsDropdownOpen] = useState(false)\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const value = e.target.value\n if (inputValue === value) return\n setInputValue(value)\n\n const atIndex = value.indexOf('@')\n if (atIndex > -1) {\n const domainPart = value.slice(atIndex + 1)\n const filteredDomains = emailDomains.filter((domain) =>\n domain.startsWith(domainPart),\n )\n setSuggestions(filteredDomains)\n setIsDropdownOpen(filteredDomains.length > 0)\n } else {\n setSuggestions([])\n setIsDropdownOpen(false)\n }\n }\n\n const handleSuggestionClick = (suggestion: string) => {\n const atIndex = inputValue.indexOf('@')\n if (atIndex > -1) {\n setInputValue(inputValue.slice(0, atIndex + 1) + suggestion)\n }\n setSuggestions([])\n setIsDropdownOpen(false)\n }\n\n return {\n inputValue,\n setInputValue,\n suggestions,\n isDropdownOpen,\n handleChange,\n handleSuggestionClick,\n }\n}\n","import Field from '../Field'\nimport { useEmailAutocomplete } from './hook'\nimport classNames from 'classnames'\nimport './styles.scss'\n\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {\n showOptionalLabel?: boolean\n requiredInput?: boolean\n success?: boolean\n error?: boolean\n errorMessage?: string\n helpMessage?: string\n rightSlot?: React.ReactNode\n label?: string\n inputStyle?: React.CSSProperties\n inputRef?: React.RefObject<HTMLInputElement>\n}\n\nexport const EmailField = ({\n showOptionalLabel,\n requiredInput,\n success,\n error,\n errorMessage,\n helpMessage,\n label,\n id,\n disabled,\n style,\n className,\n inputStyle,\n rightSlot,\n inputRef,\n ...props\n}: InputProps) => {\n const {\n inputValue,\n suggestions,\n isDropdownOpen,\n handleChange,\n handleSuggestionClick,\n } = useEmailAutocomplete();\n\n\tconsole.log(\"nova versão\");\n\n return (\n <Field.Root\n style={style}\n customclass={className}\n success={success}\n error={error}\n disabled={disabled}>\n <Field.Label\n text={label}\n id={id}\n showOptionalLabel={showOptionalLabel}\n required={requiredInput}\n success={success}\n error={error}\n disabled={disabled}\n />\n <Field.InputHolder rightSideSlot={rightSlot}>\n <Field.Input\n id={id}\n type=\"email\"\n inputRef={inputRef}\n value={inputValue}\n disabled={disabled}\n style={inputStyle}\n {...props}\n\t\t\t\t\tonChange={(e) => {\n\t\t\t\t\t\tconsole.log(e)\n\t\t\t\t\t\thandleChange(e);\n\t\t\t\t\t\n\t\t\t\t\t\tconsole.log(props.onChange)\n\t\t\t\t\t\tif (props.onChange) {\n\t\t\t\t\t\t\tprops.onChange(e);\n\t\t\t\t\t\t}\n\t\t\t\t\t}}\n />\n <ul\n className={classNames('au-field__input-autocomplete', {\n 'au-field__input-autocomplete--open': isDropdownOpen,\n })}\n tabIndex={-1}\n role=\"listbox\"\n aria-expanded={isDropdownOpen}\n style={{\n overflowY: 'auto',\n }}>\n {suggestions.map((suggestion, index) => (\n <li\n className=\"au-field__input-option\"\n onClick={() => handleSuggestionClick(suggestion)}\n role=\"option\"\n key={index}>\n {suggestion}\n </li>\n ))}\n </ul>\n </Field.InputHolder>\n <Field.Message\n hasError={!!error}\n errorMessage={errorMessage}\n helpMessage={helpMessage}\n />\n </Field.Root>\n )\n}\n"],"names":[],"mappings":";;;;AAEA,MAAM,eAAe;AAAA,EACnB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AAEO,MAAM,uBAAuB,MAAM;AACxC,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,EAAE;AAC/C,QAAM,CAAC,aAAa,cAAc,IAAI,SAAmB,CAAE,CAAA;AAC3D,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAAS,KAAK;AAEpD,QAAA,eAAe,CAAC,MAA2C;AACzD,UAAA,QAAQ,EAAE,OAAO;AACvB,QAAI,eAAe,MAAO;AAC1B,kBAAc,KAAK;AAEb,UAAA,UAAU,MAAM,QAAQ,GAAG;AACjC,QAAI,UAAU,IAAI;AAChB,YAAM,aAAa,MAAM,MAAM,UAAU,CAAC;AAC1C,YAAM,kBAAkB,aAAa;AAAA,QAAO,CAAC,WAC3C,OAAO,WAAW,UAAU;AAAA,MAAA;AAE9B,qBAAe,eAAe;AACZ,wBAAA,gBAAgB,SAAS,CAAC;AAAA,IAAA,OACvC;AACL,qBAAe,CAAE,CAAA;AACjB,wBAAkB,KAAK;AAAA,IACzB;AAAA,EAAA;AAGI,QAAA,wBAAwB,CAAC,eAAuB;AAC9C,UAAA,UAAU,WAAW,QAAQ,GAAG;AACtC,QAAI,UAAU,IAAI;AAChB,oBAAc,WAAW,MAAM,GAAG,UAAU,CAAC,IAAI,UAAU;AA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BACpD,sCAAsC;AAAA,cAAA,CACvC;AAAA,cACD,UAAU;AAAA,cACV,MAAK;AAAA,cACL,iBAAe;AAAA,cACf,OAAO;AAAA,gBACL,WAAW;AAAA,cACb;AAAA,cACC,UAAY,YAAA,IAAI,CAAC,YAAY,UAC5B;AAAA,gBAAC;AAAA,gBAAA;AAAA,kBACC,WAAU;AAAA,kBACV,SAAS,MAAM,sBAAsB,UAAU;AAAA,kBAC/C,MAAK;AAAA,kBAEJ,UAAA;AAAA,gBAAA;AAAA,gBADI;AAAA,cAAA,CAGR;AAAA,YAAA;AAAA,UACH;AAAA,QAAA,GACF;AAAA,QACA;AAAA,UAAC,MAAM;AAAA,UAAN;AAAA,YACC,UAAU,CAAC,CAAC;AAAA,YACZ;AAAA,YACA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -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
|
};
|
|
@@ -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
|