@consumidor-positivo/aurora 0.12.0 → 1.0.0
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 +6 -1
- package/dist/components/Alert/index.es.js +10 -1
- package/dist/components/Alert/index.es.js.map +1 -1
- package/dist/components/Alert/styles.css +1 -1
- package/dist/components/BadgeInfo/index.d.ts +0 -4
- package/dist/components/BadgeInfo/index.es.js +2 -1
- package/dist/components/BadgeInfo/index.es.js.map +1 -1
- package/dist/components/BadgeState/index.es.js +2 -1
- package/dist/components/BadgeState/index.es.js.map +1 -1
- package/dist/components/Button/index.d.ts +9 -0
- package/dist/components/Button/index.es.js.map +1 -1
- package/dist/components/Button/styles.css +1 -1
- package/dist/components/Calendar/index.es.js +2 -2
- package/dist/components/CalendarHeader/index.es.js +3 -2
- package/dist/components/CalendarHeader/index.es.js.map +1 -1
- package/dist/components/Checkbox/index.es.js +1 -1
- package/dist/components/Chip/index.es.js +1 -0
- package/dist/components/Chip/index.es.js.map +1 -1
- package/dist/components/Datepicker/index.es.js +4 -4
- package/dist/components/Drawer/index.d.ts +7 -1
- package/dist/components/Drawer/index.es.js +4 -1
- package/dist/components/Drawer/index.es.js.map +1 -1
- package/dist/components/Drawer/styles.css +1 -1
- package/dist/components/Footer/index.es.js +1 -0
- package/dist/components/Footer/index.es.js.map +1 -1
- package/dist/components/Header/index.es.js +1 -1
- package/dist/components/Icon/index.es.js +14 -2
- package/dist/components/Icon/index.es.js.map +1 -1
- package/dist/components/Image/index.es.js +1 -1
- package/dist/components/Label/index.es.js +2 -1
- package/dist/components/Label/index.es.js.map +1 -1
- package/dist/components/LinkButton/index.d.ts +27 -0
- package/dist/components/LinkButton/index.es.js +56 -0
- package/dist/components/LinkButton/index.es.js.map +1 -0
- package/dist/components/LinkButton/styles.css +1 -0
- package/dist/components/Modal/index.d.ts +3 -1
- package/dist/components/Modal/index.es.js +8 -0
- package/dist/components/Modal/index.es.js.map +1 -1
- package/dist/components/PortalHolder/index.es.js +1 -1
- package/dist/components/Segment/index.es.js +2 -1
- package/dist/components/Segment/index.es.js.map +1 -1
- package/dist/components/SelectField/index.es.js +1 -1
- package/dist/components/SpecialButton/SpecialButton.test.d.ts +1 -0
- package/dist/components/SpecialButton/index.d.ts +38 -0
- package/dist/components/SpecialButton/index.es.js +193 -0
- package/dist/components/SpecialButton/index.es.js.map +1 -0
- package/dist/components/SpecialButton/styles.css +1 -0
- package/dist/components/Spinner/index.d.ts +9 -5
- package/dist/components/Spinner/index.es.js +25 -15
- package/dist/components/Spinner/index.es.js.map +1 -1
- package/dist/components/SubHeader/index.es.js +1 -0
- package/dist/components/SubHeader/index.es.js.map +1 -1
- package/dist/components/Tabs/index.d.ts +3 -4
- package/dist/components/Tabs/index.es.js +80 -84
- 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 +8 -86
- package/dist/components/Tag/index.es.js.map +1 -1
- package/dist/components/TextareaField/index.es.js.map +1 -1
- package/dist/components/form/SelectField/types.d.ts +1 -0
- package/dist/components/form/TextareaField/index.d.ts +1 -0
- package/dist/components/icons/Icon.test/index.es.js +23 -5
- package/dist/components/icons/Icon.test/index.es.js.map +1 -1
- package/dist/{index-Dws33tXs.js → index-BgBOcVUP.js} +3 -3
- package/dist/{index-Dws33tXs.js.map → index-BgBOcVUP.js.map} +1 -1
- package/dist/{index-CnXw6SB7.js → index-DHwXRotU.js} +3 -3
- package/dist/{index-CnXw6SB7.js.map → index-DHwXRotU.js.map} +1 -1
- package/dist/{index-fyDB87KK.js → index-DnQGzfVW.js} +3 -3
- package/dist/{index-fyDB87KK.js.map → index-DnQGzfVW.js.map} +1 -1
- package/dist/main.d.ts +3 -1
- package/dist/main.es.js +21 -33
- package/dist/main.es.js.map +1 -1
- package/dist/{tokens-CKZdIZ5O.js → tokens-C4yCunfz.js} +15 -15
- package/dist/{tokens-CKZdIZ5O.js.map → tokens-C4yCunfz.js.map} +1 -1
- package/package.json +3 -3
- package/dist/components/Tag/index.d.ts +0 -22
- package/dist/components/Tag/styles.css +0 -1
- /package/dist/components/{Tag/Tag.test.d.ts → LinkButton/LinkButton.test.d.ts} +0 -0
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { c as classNames } from "./index-C6Q03EyZ.js";
|
|
3
|
-
import { $ as $2aaf608024c21ca1$export$99faa760c7908e4f, a as $6f9a1820b787aac7$export$e1aef45b828286de, C as CalendarHeader, b as $6f9a1820b787aac7$export$5bd780d491cfc46c, c as $6f9a1820b787aac7$export$22e2d15eaa4d2377, d as $6f9a1820b787aac7$export$ad2135cac3a11b3d, e as $6f9a1820b787aac7$export$e11f8ba65d857bff, f as $6f9a1820b787aac7$export$5d847498420df57b } from "./index-
|
|
3
|
+
import { $ as $2aaf608024c21ca1$export$99faa760c7908e4f, a as $6f9a1820b787aac7$export$e1aef45b828286de, C as CalendarHeader, b as $6f9a1820b787aac7$export$5bd780d491cfc46c, c as $6f9a1820b787aac7$export$22e2d15eaa4d2377, d as $6f9a1820b787aac7$export$ad2135cac3a11b3d, e as $6f9a1820b787aac7$export$e11f8ba65d857bff, f as $6f9a1820b787aac7$export$5d847498420df57b } from "./index-BgBOcVUP.js";
|
|
4
4
|
import { Button } from "./components/Button/index.es.js";
|
|
5
5
|
import { PortalHolder } from "./components/PortalHolder/index.es.js";
|
|
6
6
|
import { useRef, useState, useEffect } from "react";
|
|
7
|
+
import { B as BREAKPOINT_MD } from "./tokens-C4yCunfz.js";
|
|
7
8
|
import { a as above } from "./screen-DfYo7XQ_.js";
|
|
8
|
-
import { B as BREAKPOINT_MD } from "./tokens-CKZdIZ5O.js";
|
|
9
9
|
import './components/index/styles2.css';const DDMMYYYY = {
|
|
10
10
|
placeholder: "DD/MM/YYYY",
|
|
11
11
|
/** Apply DD/MM/YYYY to a field text while typing */
|
|
@@ -238,4 +238,4 @@ export {
|
|
|
238
238
|
DatepickerCalendar as a,
|
|
239
239
|
getDefaultDate as g
|
|
240
240
|
};
|
|
241
|
-
//# sourceMappingURL=index-
|
|
241
|
+
//# sourceMappingURL=index-DHwXRotU.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-CnXw6SB7.js","sources":["../lib/components/form/Datepicker/helpers.ts","../lib/components/form/Datepicker/Calendar/hook.ts","../lib/components/form/Datepicker/Calendar/index.tsx"],"sourcesContent":["import { AUCalendarDateShape, DefaultValue, FormatAdapter } from './types'\n\n/**\n * This adapter Handle the input format and convert to a more\n * universal structure, that can be used accross all subcomponents in the datepicker.\n * if we need to support another format like dd-mm-yyyy, we only need to create another adapter\n * following this model\n */\nexport const DDMMYYYY: FormatAdapter = {\n placeholder: 'DD/MM/YYYY',\n /** Apply DD/MM/YYYY to a field text while typing */\n maskDate(dateStr) {\n let fmtInputDate = dateStr\n fmtInputDate = fmtInputDate.replace(/\\D/g, '') // Remove non-numeric characters\n\n if (fmtInputDate.length > 2) {\n fmtInputDate = `${fmtInputDate.slice(0, 2)}/${fmtInputDate.slice(2)}`\n }\n if (fmtInputDate.length > 5) {\n fmtInputDate = `${fmtInputDate.slice(0, 5)}/${fmtInputDate.slice(5)}`\n }\n return fmtInputDate\n },\n /** Check if a string is on DD/MM/YYYY Format */\n validateFormat(dateStr) {\n const pattern = /^\\d{2}\\/\\d{2}\\/\\d{4}$/\n return pattern.test(dateStr)\n },\n /** Covert a DD/MM/YYYY to the datepicker date structure */\n toCalendarDate(dateStr): AUCalendarDateShape {\n const [day, month, year] = dateStr.split('/').map(Number)\n return AUCalendarDate(day, month, year)\n },\n /** Covert a Date in the datepicker structure into a DD/MM/YYYY string */\n toString(dateObj: AUCalendarDateShape): string {\n const fmtNumber = (digit: number) =>\n String(digit).length === 1 ? `0${digit}` : String(digit)\n const { day, month, year } = dateObj\n\n return `${fmtNumber(day)}/${fmtNumber(month)}/${year}`\n },\n /** Check if a DD/MM/YYYY is a valid date */\n validate(dateStr, minValue, maxValue): boolean {\n const [day, month, year] = dateStr.split('/').map(Number)\n const date = new Date(year, month - 1, day)\n const isOlderThanMinDate =\n !!minValue &&\n date < new Date(minValue.year, minValue.month - 1, minValue.day)\n\n const exceedsMaxDate =\n !!maxValue &&\n date > new Date(maxValue.year, maxValue.month - 1, maxValue.day)\n\n return (\n date.getDate() === day &&\n date.getMonth() + 1 === month &&\n date.getFullYear() === year &&\n !isOlderThanMinDate &&\n !exceedsMaxDate\n )\n },\n}\n\nexport function AUCalendarDate(\n day: number,\n month: number,\n year: number,\n): AUCalendarDateShape {\n return {\n day,\n month,\n year,\n }\n}\n\nexport function getDefaultDate(\n defaultDateProp: DefaultValue,\n): AUCalendarDateShape | null {\n if (defaultDateProp == 'empty') return null\n if (defaultDateProp === 'now') {\n const now = new Date()\n return AUCalendarDate(now.getDate(), now.getMonth() + 1, now.getFullYear())\n }\n\n return defaultDateProp\n}\n","import { useEffect, useRef, useState } from 'react'\nimport { CalendarDate } from '@internationalized/date'\nimport { BREAKPOINT_MD } from '@core/tokens'\nimport { above } from '@core/utils/screen'\nimport { AUCalendarDate } from '../helpers'\nimport { AUCalendarDateShape } from '../types'\n\ntype UseCalendarProps = {\n minValue: AUCalendarDateShape\n maxValue: AUCalendarDateShape\n value?: AUCalendarDateShape | null\n isVisible: boolean\n onClose: () => void\n onChange: (date: AUCalendarDateShape) => void\n}\n\nexport function useCalendar({\n onChange,\n onClose,\n minValue,\n maxValue,\n value,\n isVisible,\n}: UseCalendarProps) {\n const rootEl = useRef<HTMLDivElement>(null)\n const [enteredAnimation, setEnteredAnimation] = useState(false)\n const [calendarInternalState, setCalendarInternalState] =\n useState<CalendarDate>()\n\n const [delayedIsVisible, setDelayedIsVisible] = useState(false)\n\n const usedMinValue = new CalendarDate(\n minValue.year,\n minValue.month,\n minValue.day,\n )\n const usedMaxValue = new CalendarDate(\n maxValue.year,\n maxValue.month,\n maxValue.day,\n )\n\n useEffect(() => {\n if (!value) return\n const { day, month, year } = value\n setCalendarInternalState(new CalendarDate(year, month, day))\n }, [value])\n\n useEffect(() => {\n if (isVisible) {\n setDelayedIsVisible(true)\n return delayComponentMount()\n } else {\n return delayComponentUnmount()\n }\n }, [isVisible])\n\n function delayComponentMount(delayTime = 100) {\n const t = setTimeout(() => {\n setEnteredAnimation(true)\n }, delayTime)\n\n return () => {\n clearTimeout(t)\n }\n }\n\n function delayComponentUnmount(delayTime = 200) {\n setEnteredAnimation(false)\n const timoutToUnmount = setTimeout(() => {\n setDelayedIsVisible(false)\n }, delayTime)\n\n return () => {\n clearTimeout(timoutToUnmount)\n }\n }\n\n function fmtWeekday(day: string) {\n const capitalized = `${day.charAt(0).toUpperCase()}${day.slice(1)}`\n return capitalized.replace('.', '')\n }\n\n function triggerChange(date: CalendarDate) {\n const { day, month, year } = date\n onChange(AUCalendarDate(day, month, year))\n onClose()\n }\n\n function calendarChange(date: CalendarDate) {\n setCalendarInternalState(date)\n if (!above(BREAKPOINT_MD)) return\n triggerChange(date)\n }\n\n function actionChange() {\n if (calendarInternalState) {\n triggerChange(calendarInternalState)\n }\n }\n\n return {\n actionChange,\n calendarChange,\n fmtWeekday,\n usedMaxValue,\n usedMinValue,\n rootEl,\n calendarInternalState,\n enteredAnimation,\n delayedIsVisible,\n }\n}\n","import classNames from 'classnames'\nimport {\n Calendar,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHeader,\n CalendarHeaderCell,\n} from 'react-aria-components'\nimport { Button } from '@components/Button'\nimport { CalendarHeader } from '../CalendarHeader'\nimport { PortalHolder } from '../PortalHolder'\n\n\nimport { AUCalendarDateShape } from '../types'\nimport { useCalendar } from './hook'\nimport './styles.scss'\n\ntype DatepickerCalendarProps = {\n withPortal?: boolean\n minValue: AUCalendarDateShape\n maxValue: AUCalendarDateShape\n value?: AUCalendarDateShape | null\n onClose: () => void\n onChange: (date: AUCalendarDateShape) => void\n isVisible: boolean\n}\n\nexport const DatepickerCalendar = ({\n onClose,\n withPortal,\n minValue,\n maxValue,\n value,\n onChange,\n isVisible,\n}: DatepickerCalendarProps) => {\n const {\n rootEl,\n usedMaxValue,\n usedMinValue,\n calendarInternalState,\n calendarChange,\n fmtWeekday,\n actionChange,\n enteredAnimation,\n delayedIsVisible,\n } = useCalendar({\n onChange,\n onClose,\n minValue,\n maxValue,\n value,\n isVisible,\n })\n\n const componentClass = classNames('au-datepicker__calendar', {\n 'au-datepicker__calendar--visible': enteredAnimation,\n })\n\n if (!delayedIsVisible) return\n\n return (\n <PortalHolder withPortal={withPortal}>\n <div className={componentClass} ref={rootEl}>\n <div className=\"au-datepicker__calendar-backdrop\" onClick={onClose} />\n <div className=\"au-datepicker__calendar-card\">\n <Calendar\n autoFocus\n className=\"au-datepicker__calendar-base\"\n minValue={usedMinValue}\n maxValue={usedMaxValue}\n value={calendarInternalState}\n onChange={calendarChange}>\n <CalendarHeader defaultFocusDate={calendarInternalState} />\n <CalendarGrid\n className=\"au-datepicker__calendar-grid\"\n weekdayStyle=\"short\">\n <CalendarGridHeader>\n {(day) => (\n <CalendarHeaderCell className=\"au-datepicker__calendar-weekday\">\n {fmtWeekday(day)}\n </CalendarHeaderCell>\n )}\n </CalendarGridHeader>\n <CalendarGridBody>\n {(date) => (\n <CalendarCell\n className=\"au-datepicker__calendar-day\"\n date={date}\n />\n )}\n </CalendarGridBody>\n </CalendarGrid>\n </Calendar>\n <div className=\"au-datepicker__calendar-actions-dock\">\n <Button\n type=\"outlined\"\n className=\"au-datepicker__calendar-cancel\"\n expand=\"x\"\n onClick={onClose}>\n Cancelar\n </Button>\n <Button\n disabled={!calendarInternalState}\n onClick={actionChange}\n expand=\"x\">\n Confirmar\n </Button>\n </div>\n </div>\n </div>\n </PortalHolder>\n )\n}\n"],"names":["CalendarDate","Calendar","CalendarGrid","CalendarGridHeader","CalendarHeaderCell","CalendarGridBody","CalendarCell"],"mappings":";;;;;;;;AAQO,MAAM,WAA0B;AAAA,EACrC,aAAa;AAAA;AAAA,EAEb,S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AAA,YACC,UAAU,CAAC;AAAA,YACX,SAAS;AAAA,YACT,QAAO;AAAA,YAAI,UAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAEb,EAAA,CACF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"index-DHwXRotU.js","sources":["../lib/components/form/Datepicker/helpers.ts","../lib/components/form/Datepicker/Calendar/hook.ts","../lib/components/form/Datepicker/Calendar/index.tsx"],"sourcesContent":["import { AUCalendarDateShape, DefaultValue, FormatAdapter } from './types'\n\n/**\n * This adapter Handle the input format and convert to a more\n * universal structure, that can be used accross all subcomponents in the datepicker.\n * if we need to support another format like dd-mm-yyyy, we only need to create another adapter\n * following this model\n */\nexport const DDMMYYYY: FormatAdapter = {\n placeholder: 'DD/MM/YYYY',\n /** Apply DD/MM/YYYY to a field text while typing */\n maskDate(dateStr) {\n let fmtInputDate = dateStr\n fmtInputDate = fmtInputDate.replace(/\\D/g, '') // Remove non-numeric characters\n\n if (fmtInputDate.length > 2) {\n fmtInputDate = `${fmtInputDate.slice(0, 2)}/${fmtInputDate.slice(2)}`\n }\n if (fmtInputDate.length > 5) {\n fmtInputDate = `${fmtInputDate.slice(0, 5)}/${fmtInputDate.slice(5)}`\n }\n return fmtInputDate\n },\n /** Check if a string is on DD/MM/YYYY Format */\n validateFormat(dateStr) {\n const pattern = /^\\d{2}\\/\\d{2}\\/\\d{4}$/\n return pattern.test(dateStr)\n },\n /** Covert a DD/MM/YYYY to the datepicker date structure */\n toCalendarDate(dateStr): AUCalendarDateShape {\n const [day, month, year] = dateStr.split('/').map(Number)\n return AUCalendarDate(day, month, year)\n },\n /** Covert a Date in the datepicker structure into a DD/MM/YYYY string */\n toString(dateObj: AUCalendarDateShape): string {\n const fmtNumber = (digit: number) =>\n String(digit).length === 1 ? `0${digit}` : String(digit)\n const { day, month, year } = dateObj\n\n return `${fmtNumber(day)}/${fmtNumber(month)}/${year}`\n },\n /** Check if a DD/MM/YYYY is a valid date */\n validate(dateStr, minValue, maxValue): boolean {\n const [day, month, year] = dateStr.split('/').map(Number)\n const date = new Date(year, month - 1, day)\n const isOlderThanMinDate =\n !!minValue &&\n date < new Date(minValue.year, minValue.month - 1, minValue.day)\n\n const exceedsMaxDate =\n !!maxValue &&\n date > new Date(maxValue.year, maxValue.month - 1, maxValue.day)\n\n return (\n date.getDate() === day &&\n date.getMonth() + 1 === month &&\n date.getFullYear() === year &&\n !isOlderThanMinDate &&\n !exceedsMaxDate\n )\n },\n}\n\nexport function AUCalendarDate(\n day: number,\n month: number,\n year: number,\n): AUCalendarDateShape {\n return {\n day,\n month,\n year,\n }\n}\n\nexport function getDefaultDate(\n defaultDateProp: DefaultValue,\n): AUCalendarDateShape | null {\n if (defaultDateProp == 'empty') return null\n if (defaultDateProp === 'now') {\n const now = new Date()\n return AUCalendarDate(now.getDate(), now.getMonth() + 1, now.getFullYear())\n }\n\n return defaultDateProp\n}\n","import { useEffect, useRef, useState } from 'react'\nimport { CalendarDate } from '@internationalized/date'\nimport { BREAKPOINT_MD } from '@core/tokens'\nimport { above } from '@core/utils/screen'\nimport { AUCalendarDate } from '../helpers'\nimport { AUCalendarDateShape } from '../types'\n\ntype UseCalendarProps = {\n minValue: AUCalendarDateShape\n maxValue: AUCalendarDateShape\n value?: AUCalendarDateShape | null\n isVisible: boolean\n onClose: () => void\n onChange: (date: AUCalendarDateShape) => void\n}\n\nexport function useCalendar({\n onChange,\n onClose,\n minValue,\n maxValue,\n value,\n isVisible,\n}: UseCalendarProps) {\n const rootEl = useRef<HTMLDivElement>(null)\n const [enteredAnimation, setEnteredAnimation] = useState(false)\n const [calendarInternalState, setCalendarInternalState] =\n useState<CalendarDate>()\n\n const [delayedIsVisible, setDelayedIsVisible] = useState(false)\n\n const usedMinValue = new CalendarDate(\n minValue.year,\n minValue.month,\n minValue.day,\n )\n const usedMaxValue = new CalendarDate(\n maxValue.year,\n maxValue.month,\n maxValue.day,\n )\n\n useEffect(() => {\n if (!value) return\n const { day, month, year } = value\n setCalendarInternalState(new CalendarDate(year, month, day))\n }, [value])\n\n useEffect(() => {\n if (isVisible) {\n setDelayedIsVisible(true)\n return delayComponentMount()\n } else {\n return delayComponentUnmount()\n }\n }, [isVisible])\n\n function delayComponentMount(delayTime = 100) {\n const t = setTimeout(() => {\n setEnteredAnimation(true)\n }, delayTime)\n\n return () => {\n clearTimeout(t)\n }\n }\n\n function delayComponentUnmount(delayTime = 200) {\n setEnteredAnimation(false)\n const timoutToUnmount = setTimeout(() => {\n setDelayedIsVisible(false)\n }, delayTime)\n\n return () => {\n clearTimeout(timoutToUnmount)\n }\n }\n\n function fmtWeekday(day: string) {\n const capitalized = `${day.charAt(0).toUpperCase()}${day.slice(1)}`\n return capitalized.replace('.', '')\n }\n\n function triggerChange(date: CalendarDate) {\n const { day, month, year } = date\n onChange(AUCalendarDate(day, month, year))\n onClose()\n }\n\n function calendarChange(date: CalendarDate) {\n setCalendarInternalState(date)\n if (!above(BREAKPOINT_MD)) return\n triggerChange(date)\n }\n\n function actionChange() {\n if (calendarInternalState) {\n triggerChange(calendarInternalState)\n }\n }\n\n return {\n actionChange,\n calendarChange,\n fmtWeekday,\n usedMaxValue,\n usedMinValue,\n rootEl,\n calendarInternalState,\n enteredAnimation,\n delayedIsVisible,\n }\n}\n","import classNames from 'classnames'\nimport {\n Calendar,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n CalendarGridHeader,\n CalendarHeaderCell,\n} from 'react-aria-components'\nimport { Button } from '@components/Button'\nimport { CalendarHeader } from '../CalendarHeader'\nimport { PortalHolder } from '../PortalHolder'\n\n\nimport { AUCalendarDateShape } from '../types'\nimport { useCalendar } from './hook'\nimport './styles.scss'\n\ntype DatepickerCalendarProps = {\n withPortal?: boolean\n minValue: AUCalendarDateShape\n maxValue: AUCalendarDateShape\n value?: AUCalendarDateShape | null\n onClose: () => void\n onChange: (date: AUCalendarDateShape) => void\n isVisible: boolean\n}\n\nexport const DatepickerCalendar = ({\n onClose,\n withPortal,\n minValue,\n maxValue,\n value,\n onChange,\n isVisible,\n}: DatepickerCalendarProps) => {\n const {\n rootEl,\n usedMaxValue,\n usedMinValue,\n calendarInternalState,\n calendarChange,\n fmtWeekday,\n actionChange,\n enteredAnimation,\n delayedIsVisible,\n } = useCalendar({\n onChange,\n onClose,\n minValue,\n maxValue,\n value,\n isVisible,\n })\n\n const componentClass = classNames('au-datepicker__calendar', {\n 'au-datepicker__calendar--visible': enteredAnimation,\n })\n\n if (!delayedIsVisible) return\n\n return (\n <PortalHolder withPortal={withPortal}>\n <div className={componentClass} ref={rootEl}>\n <div className=\"au-datepicker__calendar-backdrop\" onClick={onClose} />\n <div className=\"au-datepicker__calendar-card\">\n <Calendar\n autoFocus\n className=\"au-datepicker__calendar-base\"\n minValue={usedMinValue}\n maxValue={usedMaxValue}\n value={calendarInternalState}\n onChange={calendarChange}>\n <CalendarHeader defaultFocusDate={calendarInternalState} />\n <CalendarGrid\n className=\"au-datepicker__calendar-grid\"\n weekdayStyle=\"short\">\n <CalendarGridHeader>\n {(day) => (\n <CalendarHeaderCell className=\"au-datepicker__calendar-weekday\">\n {fmtWeekday(day)}\n </CalendarHeaderCell>\n )}\n </CalendarGridHeader>\n <CalendarGridBody>\n {(date) => (\n <CalendarCell\n className=\"au-datepicker__calendar-day\"\n date={date}\n />\n )}\n </CalendarGridBody>\n </CalendarGrid>\n </Calendar>\n <div className=\"au-datepicker__calendar-actions-dock\">\n <Button\n type=\"outlined\"\n className=\"au-datepicker__calendar-cancel\"\n expand=\"x\"\n onClick={onClose}>\n Cancelar\n </Button>\n <Button\n disabled={!calendarInternalState}\n onClick={actionChange}\n expand=\"x\">\n Confirmar\n </Button>\n </div>\n </div>\n </div>\n </PortalHolder>\n )\n}\n"],"names":["CalendarDate","Calendar","CalendarGrid","CalendarGridHeader","CalendarHeaderCell","CalendarGridBody","CalendarCell"],"mappings":";;;;;;;;AAQO,MAAM,WAA0B;AAAA,EACrC,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AAAA,UAAC;AAAA,UAAA;AAAA,YACC,UAAU,CAAC;AAAA,YACX,SAAS;AAAA,YACT,QAAO;AAAA,YAAI,UAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAEb,EAAA,CACF;AAAA,IAAA,EAAA,CACF;AAAA,EAAA,EAAA,CACF,EAAA,CACF;AAEJ;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
2
|
import { c as classNames } from "./index-C6Q03EyZ.js";
|
|
3
|
+
import { useState, useRef, useEffect } from "react";
|
|
3
4
|
import "./components/Icon/index.es.js";
|
|
4
5
|
import { IconChevronDown } from "./components/icons/IconChevronDown/index.es.js";
|
|
5
6
|
import { IconChevronLeft } from "./components/icons/IconChevronLeft/index.es.js";
|
|
6
7
|
import { IconX } from "./components/icons/IconX/index.es.js";
|
|
7
|
-
import {
|
|
8
|
+
import { B as BREAKPOINT_MD } from "./tokens-C4yCunfz.js";
|
|
8
9
|
import { a as above } from "./screen-DfYo7XQ_.js";
|
|
9
|
-
import { B as BREAKPOINT_MD } from "./tokens-CKZdIZ5O.js";
|
|
10
10
|
import './components/index/styles3.css';function useOutsideClick({
|
|
11
11
|
rootEl,
|
|
12
12
|
breakpoint,
|
|
@@ -150,4 +150,4 @@ export {
|
|
|
150
150
|
Segment as S,
|
|
151
151
|
useOutsideClick as u
|
|
152
152
|
};
|
|
153
|
-
//# sourceMappingURL=index-
|
|
153
|
+
//# sourceMappingURL=index-DnQGzfVW.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-DnQGzfVW.js","sources":["../lib/core/hooks/useOutsideClick.ts","../lib/components/form/Datepicker/Segment/hook.ts","../lib/components/form/Datepicker/Segment/index.tsx"],"sourcesContent":["import { useState } from 'react'\nimport { above } from '../utils/screen'\n\ntype UseOutsideClickProps = {\n rootEl: React.RefObject<HTMLDivElement>\n breakpoint?: string\n onLoseFocusCB: () => void\n}\n\nexport function useOutsideClick({\n rootEl,\n breakpoint,\n onLoseFocusCB,\n}: UseOutsideClickProps) {\n const [setupListener, setSetupListener] = useState(false)\n\n function listenOutsideClick() {\n if (breakpoint && !above(breakpoint)) return\n document.addEventListener('mousedown', handleLoseFocus)\n setSetupListener(true)\n }\n\n function clearOutsideClickListenner() {\n if (setupListener) {\n document.removeEventListener('mousedown', handleLoseFocus)\n setSetupListener(false)\n }\n }\n\n function handleLoseFocus(ev: MouseEvent | FocusEvent) {\n if (!rootEl.current) return\n\n const clickedOutside = !rootEl.current.contains(ev.target as Node)\n\n if (clickedOutside) {\n onLoseFocusCB()\n clearOutsideClickListenner()\n }\n }\n\n return {\n listenOutsideClick,\n }\n}\n","import { useEffect, useRef, useState } from 'react'\nimport { BREAKPOINT_MD } from '@core/tokens'\nimport { useOutsideClick } from '@core/hooks/useOutsideClick'\n\nimport { SegmentItem } from '../types'\n\ntype UseSegmentProps = {\n options: SegmentItem[]\n currentValue: string | number\n onSelect: (option: SegmentItem) => void\n}\n\nexport function useSegment({\n options,\n currentValue,\n onSelect,\n}: UseSegmentProps) {\n const [isListOpen, setIsListOpen] = useState(false)\n const rootEl = useRef<HTMLDivElement>(null)\n const selectedItem = useRef<HTMLLIElement>(null)\n const currentItem = options.find((item) => item.value === currentValue)\n const { listenOutsideClick } = useOutsideClick({\n rootEl,\n breakpoint: BREAKPOINT_MD,\n onLoseFocusCB: closeList,\n })\n\n useEffect(() => {\n if (selectedItem.current && isListOpen) {\n selectedItem.current.scrollIntoView({ block: 'center', inline: 'center' })\n }\n }, [isListOpen])\n\n function openList() {\n setIsListOpen(true)\n listenOutsideClick()\n }\n\n function closeList() {\n setIsListOpen(false)\n }\n\n function handleSelectItem(option: SegmentItem) {\n onSelect(option)\n setIsListOpen(false)\n }\n\n return {\n openList,\n closeList,\n isListOpen,\n rootEl,\n currentItem,\n handleSelectItem,\n selectedItem,\n }\n}\n","import classNames from 'classnames'\nimport { IconChevronDown, IconChevronLeft, IconX } from '@components/icons'\n\nimport { useSegment } from './hook'\nimport { SegmentItem } from '../types'\nimport './styles.scss'\n\ntype SegmentProps = {\n mobileTitle: string\n options: SegmentItem[]\n onSelect: (option: SegmentItem) => void\n currentValue: string | number\n minValue?: Date\n maxValue?: Date\n}\n\nexport const Segment = ({\n currentValue,\n options,\n mobileTitle,\n onSelect,\n}: SegmentProps) => {\n const {\n rootEl,\n isListOpen,\n openList,\n closeList,\n currentItem,\n handleSelectItem,\n selectedItem,\n } = useSegment({\n options,\n currentValue,\n onSelect,\n })\n\n return (\n <div\n ref={rootEl}\n className={classNames('au-datepicker__segment', {\n 'au-datepicker__segment--open': isListOpen,\n })}>\n <button\n type=\"button\"\n className=\"au-datepicker__segment-input\"\n onClick={openList}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={isListOpen}>\n {currentItem?.label}\n <IconChevronDown aria-hidden=\"true\" />\n </button>\n <div className=\"au-datepicker__segment-list-holder\">\n <div className=\"au-datepicker__segment-list-header\">\n <button type=\"button\" onClick={closeList} aria-label=\"Voltar\">\n <IconChevronLeft aria-hidden=\"true\" />\n </button>\n <h4 className=\"au-datepicker__segment-title\">{mobileTitle}</h4>\n <button type=\"button\" onClick={closeList} aria-label=\"Fechar\">\n <IconX aria-hidden=\"true\" />\n </button>\n </div>\n <ul className=\"au-datepicker__segment-list\" role=\"listbox\">\n {options.map((option, idx) => {\n const isSelectedItem = option.value === currentValue\n return (\n <li\n key={`au-datepicker-segment-li-${option.value}-${idx}`}\n onClick={() => handleSelectItem(option)}\n ref={isSelectedItem ? selectedItem : null}\n role=\"option\"\n aria-selected={isSelectedItem}\n className={classNames('au-datepicker__segment-list-item', {\n 'au-datepicker__segment-list-item--active': isSelectedItem,\n })}>\n {option.label}\n </li>\n )\n })}\n </ul>\n </div>\n </div>\n )\n}\n"],"names":[],"mappings":";;;;;;;;;AASO,SAAS,gBAAgB;AAAA,EAC9B;AAAA,EACA;AAAA,EACA;AACF,GAAyB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Q;AAC5B,kBAAM,iBAAiB,OAAO,UAAU;AACxC,mBACE;AAAA,cAAC;AAAA,cAAA;AAAA,gBAEC,SAAS,MAAM,iBAAiB,MAAM;AAAA,gBACtC,KAAK,iBAAiB,eAAe;AAAA,gBACrC,MAAK;AAAA,gBACL,iBAAe;AAAA,gBACf,WAAW,WAAW,oCAAoC;AAAA,kBACxD,4CAA4C;AAAA,gBAAA,CAC7C;AAAA,gBACA,UAAA,OAAO;AAAA,cAAA;AAAA,cARH,4BAA4B,OAAO,KAAK,IAAI,GAAG;AAAA,YAAA;AAAA,UAW1D,CAAC,EAAA,CACH;AAAA,QAAA,EAAA,CACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/dist/main.d.ts
CHANGED
|
@@ -28,7 +28,6 @@ export { Skeleton } from './components/Skeleton';
|
|
|
28
28
|
export { Spinner } from './components/Spinner';
|
|
29
29
|
export { Image } from '../../../../../../lib/components/Image';
|
|
30
30
|
export { ProgressBar } from './components/ProgressBar';
|
|
31
|
-
export { Tag } from './components/Tag';
|
|
32
31
|
export { Modal } from './components/Modal';
|
|
33
32
|
export { Tooltip } from './components/Tooltip';
|
|
34
33
|
export { Container } from './components/Container';
|
|
@@ -40,6 +39,9 @@ export { AdBox } from './components/AdBox';
|
|
|
40
39
|
export { ChipBanner } from './components/ChipBanner';
|
|
41
40
|
export { PartnerBanner, type PartnerBannerProps } from './components/PartnerBanner';
|
|
42
41
|
export { Transition, type TransitionProps } from './components/Transition';
|
|
42
|
+
export { SpecialButton, type SpecialButtonProps } from './components/SpecialButton';
|
|
43
|
+
export { LinkButton, type LinkButtonProps } from './components/LinkButton';
|
|
44
|
+
export type { SpinnerProps } from './components/Spinner';
|
|
43
45
|
export { useDrawer } from './components/Drawer/hooks';
|
|
44
46
|
export * from './components/Logo';
|
|
45
47
|
export * from './components/icons';
|
package/dist/main.es.js
CHANGED
|
@@ -21,15 +21,15 @@ import { TextAreaField } from "./components/TextareaField/index.es.js";
|
|
|
21
21
|
import { Checkbox } from "./components/Checkbox/index.es.js";
|
|
22
22
|
import { Radio } from "./components/Radio/index.es.js";
|
|
23
23
|
import { Alert } from "./components/Alert/index.es.js";
|
|
24
|
-
import { jsx
|
|
24
|
+
import { jsx } from "react/jsx-runtime";
|
|
25
25
|
import { c as classNames } from "./index-C6Q03EyZ.js";
|
|
26
26
|
import { CardEmphasis } from "./components/Emphasis/index.es.js";
|
|
27
|
+
import { CardTag } from "./components/Tag/index.es.js";
|
|
27
28
|
import { Tabs } from "./components/Tabs/index.es.js";
|
|
28
29
|
import { Skeleton } from "./components/Skeleton/index.es.js";
|
|
29
30
|
import { Spinner } from "./components/Spinner/index.es.js";
|
|
30
31
|
import { Image } from "./components/Image/index.es.js";
|
|
31
32
|
import { ProgressBar } from "./components/ProgressBar/index.es.js";
|
|
32
|
-
import { Tag } from "./components/Tag/index.es.js";
|
|
33
33
|
import { Modal } from "./components/Modal/index.es.js";
|
|
34
34
|
import { Tooltip } from "./components/Tooltip/index.es.js";
|
|
35
35
|
import { Container } from "./components/Container/index.es.js";
|
|
@@ -41,6 +41,8 @@ import { AdBox } from "./components/AdBox/index.es.js";
|
|
|
41
41
|
import { ChipBanner } from "./components/ChipBanner/index.es.js";
|
|
42
42
|
import { PartnerBanner } from "./components/PartnerBanner/index.es.js";
|
|
43
43
|
import { Transition } from "./components/Transition/index.es.js";
|
|
44
|
+
import { SpecialButton } from "./components/SpecialButton/index.es.js";
|
|
45
|
+
import { LinkButton } from "./components/LinkButton/index.es.js";
|
|
44
46
|
import { useState } from "react";
|
|
45
47
|
import { L, a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s } from "./BadgeWhite-CkZPPGmT.js";
|
|
46
48
|
import { IconActivity } from "./components/icons/IconActivity/index.es.js";
|
|
@@ -371,8 +373,8 @@ import { IconZoomIn } from "./components/icons/IconZoomIn/index.es.js";
|
|
|
371
373
|
import { IconZoomOut } from "./components/icons/IconZoomOut/index.es.js";
|
|
372
374
|
import { IconSocialGoogle } from "./components/icons/IconSocialGoogle/index.es.js";
|
|
373
375
|
import { C, D, E, W, I, S, T } from "./react-if.esm-Cozt8l48.js";
|
|
376
|
+
import { k as k2, l as l2, m as m2, n as n2, a as a2, B, o as o2, p as p2, q as q2, r as r2, s as s2, t, u, j as j2, v, w, x, y, z, A, g as g2, D as D2, E as E2, F, G, H, I as I2, J, K, L as L2, M, N, O, b as b2, P, Q, R, S as S2, T as T2, U, h as h2, V, i as i2, W as W2, X, Y, c as c2, Z, f as f2, d as d2, _, $, a0, a1, a2 as a22, C as C2, a3, a4, a5, a6, a7, a8, e as e2, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ } from "./tokens-C4yCunfz.js";
|
|
374
377
|
import { Carousel } from "./components/Carousel/index.es.js";
|
|
375
|
-
import { j as j2, k as k2, l as l2, m as m2, a as a2, B, n as n2, o as o2, p as p2, q as q2, r as r2, s as s2, t, u, v, w, x, y, z, A, g as g2, D as D2, E as E2, F, G, H, I as I2, J, K, L as L2, M, N, O, b as b2, P, Q, R, S as S2, T as T2, U, f as f2, V, i as i2, W as W2, X, Y, c as c2, Z, h as h2, d as d2, _, $, a0, a1, a2 as a22, C as C2, a3, a4, a5, a6, a7, a8, e as e2, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am, an, ao, ap, aq, ar, as, at, au, av, aw, ax, ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ } from "./tokens-CKZdIZ5O.js";
|
|
376
378
|
import './components/main/styles.css';const CardContainer = ({
|
|
377
379
|
direction,
|
|
378
380
|
alignItems,
|
|
@@ -444,21 +446,6 @@ const CardRoot = ({
|
|
|
444
446
|
}
|
|
445
447
|
);
|
|
446
448
|
};
|
|
447
|
-
const CardTag = ({
|
|
448
|
-
color = "primary",
|
|
449
|
-
icon,
|
|
450
|
-
children,
|
|
451
|
-
"data-testid": dataTestId
|
|
452
|
-
}) => {
|
|
453
|
-
const tagClasses = classNames("au-card__tag", {
|
|
454
|
-
"au-card__tag--primary": color === "primary",
|
|
455
|
-
"au-card__tag--secondary": color === "secondary"
|
|
456
|
-
});
|
|
457
|
-
return /* @__PURE__ */ jsxs("div", { className: tagClasses, "data-testid": dataTestId, children: [
|
|
458
|
-
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: icon }),
|
|
459
|
-
/* @__PURE__ */ jsx("span", { children })
|
|
460
|
-
] });
|
|
461
|
-
};
|
|
462
449
|
const components = {
|
|
463
450
|
Root: CardRoot,
|
|
464
451
|
Container: CardContainer,
|
|
@@ -488,23 +475,23 @@ function useDrawer(props) {
|
|
|
488
475
|
export {
|
|
489
476
|
AdBox,
|
|
490
477
|
Alert,
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
478
|
+
k2 as BORDER_RADIUS_BIG,
|
|
479
|
+
l2 as BORDER_RADIUS_MEDIUM,
|
|
480
|
+
m2 as BORDER_RADIUS_PILL,
|
|
481
|
+
n2 as BORDER_RADIUS_SMALL,
|
|
495
482
|
a2 as BREAKPOINT_LG,
|
|
496
483
|
B as BREAKPOINT_MD,
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
484
|
+
o2 as BREAKPOINT_SM,
|
|
485
|
+
p2 as BREAKPOINT_XLG,
|
|
486
|
+
q2 as BREAKPOINT_XSM,
|
|
500
487
|
BadgeInfo,
|
|
501
488
|
BadgeState,
|
|
502
489
|
Button,
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
490
|
+
r2 as COLOR_BRAND_BLUE_00,
|
|
491
|
+
s2 as COLOR_BRAND_BLUE_10,
|
|
492
|
+
t as COLOR_BRAND_BLUE_20,
|
|
493
|
+
u as COLOR_BRAND_BLUE_30,
|
|
494
|
+
j2 as COLOR_BRAND_BLUE_40,
|
|
508
495
|
v as COLOR_BRAND_BLUE_50,
|
|
509
496
|
w as COLOR_BRAND_BLUE_60,
|
|
510
497
|
x as COLOR_BRAND_CYAN_10,
|
|
@@ -531,7 +518,7 @@ export {
|
|
|
531
518
|
S2 as COLOR_INFO_20,
|
|
532
519
|
T2 as COLOR_INFO_30,
|
|
533
520
|
U as COLOR_INFO_40,
|
|
534
|
-
|
|
521
|
+
h2 as COLOR_INFO_50,
|
|
535
522
|
V as COLOR_INFO_60,
|
|
536
523
|
i2 as COLOR_NEUTRAL_00,
|
|
537
524
|
W2 as COLOR_NEUTRAL_10,
|
|
@@ -539,7 +526,7 @@ export {
|
|
|
539
526
|
Y as COLOR_NEUTRAL_30,
|
|
540
527
|
c2 as COLOR_NEUTRAL_40,
|
|
541
528
|
Z as COLOR_NEUTRAL_50,
|
|
542
|
-
|
|
529
|
+
f2 as COLOR_NEUTRAL_60,
|
|
543
530
|
d2 as COLOR_NEUTRAL_70,
|
|
544
531
|
_ as COLOR_SUCCESS_00,
|
|
545
532
|
$ as COLOR_SUCCESS_10,
|
|
@@ -921,6 +908,7 @@ export {
|
|
|
921
908
|
Image,
|
|
922
909
|
InputField,
|
|
923
910
|
LazyImage,
|
|
911
|
+
LinkButton,
|
|
924
912
|
L as LogoBadgeFullWhiteAC,
|
|
925
913
|
a as LogoBadgeWhiteAC,
|
|
926
914
|
b as LogoBadgeWhiteStrokeAC,
|
|
@@ -971,11 +959,11 @@ export {
|
|
|
971
959
|
aJ as SPACING_900,
|
|
972
960
|
SelectField,
|
|
973
961
|
Skeleton,
|
|
962
|
+
SpecialButton,
|
|
974
963
|
Spinner,
|
|
975
964
|
SubHeader,
|
|
976
965
|
S as Switch,
|
|
977
966
|
Tabs,
|
|
978
|
-
Tag,
|
|
979
967
|
Text,
|
|
980
968
|
TextAreaField,
|
|
981
969
|
T as Then,
|
package/dist/main.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.es.js","sources":["../lib/components/Card/Container/index.tsx","../lib/components/Card/Image/index.tsx","../lib/components/Card/Root/index.tsx","../lib/components/Card/
|
|
1
|
+
{"version":3,"file":"main.es.js","sources":["../lib/components/Card/Container/index.tsx","../lib/components/Card/Image/index.tsx","../lib/components/Card/Root/index.tsx","../lib/components/Card/index.tsx","../lib/components/Drawer/hooks.ts"],"sourcesContent":["import classNames from 'classnames'\nimport { CSSProperties, ReactNode } from 'react'\n\nexport type CardContainerProps = {\n direction?: 'column' | 'row'\n alignItems?: 'center' | 'start'\n justifyContent?: 'center' | 'space-between'\n gap?: number\n width?: number\n children: ReactNode\n 'data-testid'?: string\n}\nexport const CardContainer = ({\n direction,\n alignItems,\n justifyContent,\n gap,\n width,\n children,\n 'data-testid': dataTestId,\n}: CardContainerProps) => {\n const containerClasses = classNames('au-card__container', {\n [`au-card__container--direction-${direction}`]: direction,\n [`au-card__container--align-items-${alignItems}`]: alignItems,\n [`au-card__container--justify-content-${justifyContent}`]: justifyContent,\n })\n\n const containerStyle: CSSProperties = {\n gap: `${gap}px`,\n width: `${width}px`\n }\n return (\n <div style={containerStyle} className={containerClasses} data-testid={dataTestId}>\n {children}\n </div>\n )\n}\n","import { CSSProperties } from 'react'\n\nexport type CardImageProps = {\n src: string\n alt?: string\n width?: number\n height?: number\n 'data-testid'?: string\n}\nexport const CardImage = ({\n src,\n alt,\n width,\n height,\n 'data-testid': dataTestId,\n}: CardImageProps) => {\n const imageSize: CSSProperties = {\n width: `${width}px`,\n height: `${height}px`,\n }\n\n return (\n <div data-testid={dataTestId}>\n <img style={imageSize} src={src} alt={alt} />\n </div>\n )\n}\n","import classNames from 'classnames'\nimport { CSSProperties, ReactNode, Ref } from 'react'\n\nexport type CardRootProps = {\n border?: boolean\n color?: 'primary' | 'secondary'\n width?: number\n height?: number\n maxWidth?: number\n maxHeight?: number\n paddingLess?: boolean;\n hoverShadow?: boolean\n className?: string;\n children: ReactNode\n ref?: Ref<HTMLDivElement>\n 'data-testid'?: string\n}\nexport const CardRoot = ({\n border = true,\n color = 'primary',\n width,\n height,\n maxWidth,\n maxHeight,\n hoverShadow,\n paddingLess,\n children,\n className,\n ref,\n 'data-testid': dataTestId,\n}: CardRootProps) => {\n const rootClasses = classNames('au-card__root', {\n 'au-card__root--border-none': !border,\n 'au-card__root--color-secondary': color === 'secondary',\n 'au-card__root--with-hover-shadow': !!hoverShadow,\n 'au-card__root--paddingless': !!paddingLess,\n [String(className)]: !!className\n })\n const rootSize: CSSProperties = {\n width: `${width}px`,\n height: `${height}px`,\n maxWidth: `${maxWidth}px`,\n maxHeight: `${maxHeight}px`\n }\n\n return (\n <div\n ref={ref}\n style={rootSize}\n className={rootClasses}\n data-testid={dataTestId}>\n {children}\n </div>\n )\n}\n","import { CardContainer, CardContainerProps } from './Container'\nimport { CardEmphasis, CardEmphasisProps } from './Emphasis'\nimport { CardImage, CardImageProps } from './Image'\nimport { CardRoot, CardRootProps } from './Root'\nimport { CardTag, CardTagProps } from './Tag'\nimport './styles.scss'\n\ntype Components = {\n Root: React.FC<CardRootProps>\n Container: React.FC<CardContainerProps>\n Emphasis: React.FC<CardEmphasisProps>\n Image: React.FC<CardImageProps>\n Tag: React.FC<CardTagProps>\n}\n\nconst components: Components = {\n Root: CardRoot,\n Container: CardContainer,\n Emphasis: CardEmphasis,\n Image: CardImage,\n Tag: CardTag,\n}\n\nObject.keys(components).forEach((key) => {\n const component = components[key as keyof Components]\n component.displayName = `Card.${key}`\n})\n\nexport { components as Card }\n","import { useState } from 'react'\n\ntype UseDrawerProps = Record<string, boolean>\n\nexport function useDrawer(props: UseDrawerProps) {\n const [drawerOpen, setDrawerOpen] = useState<UseDrawerProps>(props)\n\n function handleOpenDrawer(name: string) {\n setDrawerOpen((prev) => {\n return {\n ...prev,\n [name]: !prev[name],\n }\n })\n }\n\n return {\n handleOpenDrawer,\n drawerOpen,\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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,
|
|
179
179
|
COLOR_NEUTRAL_70 as d,
|
|
180
180
|
COLOR_WARNING_50 as e,
|
|
181
|
-
|
|
181
|
+
COLOR_NEUTRAL_60 as f,
|
|
182
182
|
COLOR_BRAND_CYAN_50 as g,
|
|
183
|
-
|
|
183
|
+
COLOR_INFO_50 as h,
|
|
184
184
|
COLOR_NEUTRAL_00 as i,
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
185
|
+
COLOR_BRAND_BLUE_40 as j,
|
|
186
|
+
BORDER_RADIUS_BIG as k,
|
|
187
|
+
BORDER_RADIUS_MEDIUM as l,
|
|
188
|
+
BORDER_RADIUS_PILL as m,
|
|
189
|
+
BORDER_RADIUS_SMALL as n,
|
|
190
|
+
BREAKPOINT_SM as o,
|
|
191
|
+
BREAKPOINT_XLG as p,
|
|
192
|
+
BREAKPOINT_XSM as q,
|
|
193
|
+
COLOR_BRAND_BLUE_00 as r,
|
|
194
|
+
COLOR_BRAND_BLUE_10 as s,
|
|
195
|
+
COLOR_BRAND_BLUE_20 as t,
|
|
196
|
+
COLOR_BRAND_BLUE_30 as u,
|
|
197
197
|
COLOR_BRAND_BLUE_50 as v,
|
|
198
198
|
COLOR_BRAND_BLUE_60 as w,
|
|
199
199
|
COLOR_BRAND_CYAN_10 as x,
|
|
200
200
|
COLOR_BRAND_CYAN_20 as y,
|
|
201
201
|
COLOR_BRAND_CYAN_30 as z
|
|
202
202
|
};
|
|
203
|
-
//# sourceMappingURL=tokens-
|
|
203
|
+
//# sourceMappingURL=tokens-C4yCunfz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens-
|
|
1
|
+
{"version":3,"file":"tokens-C4yCunfz.js","sources":["../lib/core/tokens/.cache/tokens.ts"],"sourcesContent":["export const BORDER_RADIUS_SMALL = \"4px\";\nexport const BORDER_RADIUS_MEDIUM = \"8px\";\nexport const BORDER_RADIUS_BIG = \"16px\";\nexport const BORDER_RADIUS_PILL = \"999px\";\nexport const COLOR_NEUTRAL_70 = \"#16181d\";\nexport const COLOR_NEUTRAL_60 = \"#313131\";\nexport const COLOR_NEUTRAL_50 = \"#454a54\";\nexport const COLOR_NEUTRAL_40 = \"#5e6573\";\nexport const COLOR_NEUTRAL_30 = \"#c4c9d4\";\nexport const COLOR_NEUTRAL_20 = \"#e2e4e9\";\nexport const COLOR_NEUTRAL_10 = \"#f6f7fa\";\nexport const COLOR_NEUTRAL_00 = \"#ffffff\";\nexport const COLOR_BRAND_BLUE_60 = \"#18256c\";\nexport const COLOR_BRAND_BLUE_50 = \"#1737a4\";\nexport const COLOR_BRAND_BLUE_40 = \"#0048db\";\nexport const COLOR_BRAND_BLUE_30 = \"#9abcff\";\nexport const COLOR_BRAND_BLUE_20 = \"#dce8ff\";\nexport const COLOR_BRAND_BLUE_10 = \"#fafbff\";\nexport const COLOR_BRAND_BLUE_00 = \"#F2F5FC\";\nexport const COLOR_BRAND_EMERALD_60 = \"#013220\";\nexport const COLOR_BRAND_EMERALD_50 = \"#026441\";\nexport const COLOR_BRAND_EMERALD_40 = \"#04d98c\";\nexport const COLOR_BRAND_EMERALD_30 = \"#95f0cf\";\nexport const COLOR_BRAND_EMERALD_20 = \"#ccf2e4\";\nexport const COLOR_BRAND_EMERALD_10 = \"#edfef7\";\nexport const COLOR_BRAND_CYAN_60 = \"#004155\";\nexport const COLOR_BRAND_CYAN_50 = \"#005c77\";\nexport const COLOR_BRAND_CYAN_40 = \"#02bedf\";\nexport const COLOR_BRAND_CYAN_30 = \"#3edcff\";\nexport const COLOR_BRAND_CYAN_20 = \"#ccf3ff\";\nexport const COLOR_BRAND_CYAN_10 = \"#f1fcff\";\nexport const COLOR_SUCCESS_60 = \"#08331a\";\nexport const COLOR_SUCCESS_50 = \"#10593b\";\nexport const COLOR_SUCCESS_40 = \"#138040\";\nexport const COLOR_SUCCESS_30 = \"#66cc90\";\nexport const COLOR_SUCCESS_20 = \"#a1e5bd\";\nexport const COLOR_SUCCESS_10 = \"#e5fff0\";\nexport const COLOR_SUCCESS_00 = \"#f0fcf5\";\nexport const COLOR_ERROR_60 = \"#731111\";\nexport const COLOR_ERROR_50 = \"#991717\";\nexport const COLOR_ERROR_40 = \"#e52222\";\nexport const COLOR_ERROR_30 = \"#ff8080\";\nexport const COLOR_ERROR_20 = \"#ffbfbf\";\nexport const COLOR_ERROR_10 = \"#ffe5e5\";\nexport const COLOR_ERROR_00 = \"#f5eff0\";\nexport const COLOR_WARNING_60 = \"#803500\";\nexport const COLOR_WARNING_50 = \"#a64a08\";\nexport const COLOR_WARNING_40 = \"#fa822c\";\nexport const COLOR_WARNING_30 = \"#ffc59c\";\nexport const COLOR_WARNING_20 = \"#ffdabf\";\nexport const COLOR_WARNING_10 = \"#fff0e6\";\nexport const COLOR_WARNING_00 = \"#fcf4f0\";\nexport const COLOR_INFO_60 = \"#46008c\";\nexport const COLOR_INFO_50 = \"#510cb2\";\nexport const COLOR_INFO_40 = \"#6728e5\";\nexport const COLOR_INFO_30 = \"#bd9cff\";\nexport const COLOR_INFO_20 = \"#d4bfff\";\nexport const COLOR_INFO_10 = \"#eee6ff\";\nexport const COLOR_INFO_00 = \"#f3f0fc\";\nexport const SPACING_050 = \"4px\";\nexport const SPACING_100 = \"8px\";\nexport const SPACING_200 = \"16px\";\nexport const SPACING_300 = \"24px\";\nexport const SPACING_400 = \"32px\";\nexport const SPACING_500 = \"40px\";\nexport const SPACING_600 = \"48px\";\nexport const SPACING_700 = \"56px\";\nexport const SPACING_800 = \"64px\";\nexport const SPACING_900 = \"72px\";\nexport const BREAKPOINT_XSM = \"0px\";\nexport const BREAKPOINT_SM = \"320px\";\nexport const BREAKPOINT_MD = \"600px\";\nexport const BREAKPOINT_LG = \"1024px\";\nexport const BREAKPOINT_XLG = \"1920px\";\nexport const CONTAINER_SIZE = \"1232px\";\nexport const OPACITY_00 = \"0.05\";\nexport const OPACITY_10 = \"0.2\";\nexport const OPACITY_20 = \"0.4\";\nexport const OPACITY_30 = \"0.6\";\nexport const OPACITY_40 = \"0.8\";\nexport const SHADOW_01 = \"0px 2px 8px 0px rgba(169, 177, 197, 0.08), 0px 4px 4px 0px rgba(0, 72, 219, 0.04)\";\nexport const SHADOW_02 = \"0px 8px 24px 0px rgba(118, 134, 173, 0.08), 0px 4px 4px 0px rgba(0, 72, 219, 0.04)\";\nexport const SHADOW_03 = \"0px 16px 40px 0px rgba(118, 134, 173, 0.08), 0px 8px 8px 0px rgba(0, 72, 219, 0.04)\";\nexport const SHADOW_04 = \"0px 24px 56px 0px rgba(118, 134, 173, 0.08), 0px 12px 12px 0px rgba(0, 72, 219, 0.04)\";\nexport const FONT_TITLE = \"'Lexend Deca', sans-serif\";\nexport const FONT_BODY = \"'Source Sans 3', sans-serif\";\nexport const FONT_WEIGHT_BOLD = \"700\";\nexport const FONT_WEIGHT_SEMIBOLD = \"600\";\nexport const FONT_WEIGHT_MEDIUM = \"500\";\nexport const FONT_WEIGHT_REGULAR = \"400\";\nexport const FONT_SIZE_H1 = \"56px\";\nexport const FONT_SIZE_H2 = \"48px\";\nexport const FONT_SIZE_H3 = \"40px\";\nexport const FONT_SIZE_H4 = \"32px\";\nexport const FONT_SIZE_H5 = \"28px\";\nexport const FONT_SIZE_H6 = \"24px\";\nexport const FONT_SIZE_P1 = \"20px\";\nexport const FONT_SIZE_P2 = \"16px\";\nexport const FONT_SIZE_P3 = \"14px\";\nexport const FONT_SIZE_P4 = \"12px\";"],"names":[],"mappings":"AAAO,MAAM,sBAAsB;AAC5B,MAAM,uBAAuB;AAC7B,MAAM,oBAAoB;AAC1B,MAAM,qBAAqB;AAC3B,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAAM,mBAAmB;AACzB,MAA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AgB;AACtB,MAAM,gBAAgB;AACtB,MAAM,iBAAiB;AACvB,MAAM,iBAAiB;AACvB,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,aAAa;AACnB,MAAM,YAAY;AAClB,MAAM,YAAY;AAClB,MAAM,YAAY;AAClB,MAAM,YAAY;AAClB,MAAM,aAAa;AACnB,MAAM,YAAY;AAClB,MAAM,mBAAmB;AACzB,MAAM,uBAAuB;AAC7B,MAAM,qBAAqB;AAC3B,MAAM,sBAAsB;AAC5B,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;AACrB,MAAM,eAAe;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@consumidor-positivo/aurora",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "1.0.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/AcordoCertoBR/aurora"
|
|
@@ -51,8 +51,7 @@
|
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"dotenv": "16.6.1",
|
|
53
53
|
"react-aria-components": "1.17.0",
|
|
54
|
-
"react-if": "4.1.6"
|
|
55
|
-
"vite-plugin-dts": "4.5.4"
|
|
54
|
+
"react-if": "4.1.6"
|
|
56
55
|
},
|
|
57
56
|
"devDependencies": {
|
|
58
57
|
"@chromatic-com/storybook": "1.9.0",
|
|
@@ -102,6 +101,7 @@
|
|
|
102
101
|
"typescript": "5.2.2",
|
|
103
102
|
"terser": "5.46.2",
|
|
104
103
|
"vite": "6.4.2",
|
|
104
|
+
"vite-plugin-dts": "5.0.3",
|
|
105
105
|
"vite-plugin-lib-inject-css": "2.2.2",
|
|
106
106
|
"vite-plugin-static-copy": "2.3.2",
|
|
107
107
|
"vitest": "3.2.4"
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export type TagProps = {
|
|
2
|
-
status: 'info' | 'success' | 'error' | 'warning' | 'support' | 'neutral';
|
|
3
|
-
border?: 'rounded' | 'square';
|
|
4
|
-
type?: 'read-only' | 'badge';
|
|
5
|
-
color?: 'primary' | 'secondary';
|
|
6
|
-
size?: 'small' | 'medium' | 'large';
|
|
7
|
-
text: string;
|
|
8
|
-
children?: React.ReactNode;
|
|
9
|
-
customIcon?: string | JSX.Element;
|
|
10
|
-
fullWidth?: boolean;
|
|
11
|
-
actionButton?: {
|
|
12
|
-
content?: string;
|
|
13
|
-
onClick?: () => void;
|
|
14
|
-
};
|
|
15
|
-
'data-testid'?: string;
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* @deprecated Use `BadgeInfo` or `BadgeState` instead. `Tag` will be removed in a future major release.
|
|
19
|
-
* - `BadgeInfo`: informational badge with icon + text, supports `actionButton`, `customIcon`, `color`.
|
|
20
|
-
* - `BadgeState`: compact status indicator, supports `iconOnly`, `isNumberBadge`, `variant`.
|
|
21
|
-
*/
|
|
22
|
-
export declare const Tag: ({ status, border, size, type, color, customIcon, text, children, fullWidth, actionButton, "data-testid": dataTestId, }: TagProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.au-tag{font-family:"Source Sans 3",sans-serif;display:flex;justify-content:center;border-radius:8px;padding:8px;width:fit-content}.au-tag__content{display:flex;gap:8px;justify-content:center;align-items:center}.au-tag__content-icon .au-icon,.au-tag__content-icon .au-icon>svg{width:16px;height:16px}.au-tag__content-support-text{color:#16181d;font-size:12px;font-weight:600;line-height:18px}.au-tag--size-small{height:26px;padding:4px 8px}.au-tag--size-medium{height:36px}.au-tag--size-large{height:38px}.au-tag--size-large-support-text{font-size:14px;line-height:22px}.au-tag--border-rounded{border-radius:500px}.au-tag--color-primary.au-tag--info{background-color:#eee6ff}.au-tag--color-primary.au-tag--success{background-color:#e5fff0}.au-tag--color-primary.au-tag--error{background-color:#ffe5e5}.au-tag--color-primary.au-tag--warning{background-color:#fff0e6}.au-tag--color-primary.au-tag--support{background-color:#f1fcff}.au-tag--color-primary.au-tag--neutral{background-color:#e2e4e9}.au-tag--color-secondary.au-tag--info{background-color:#d4bfff}.au-tag--color-secondary.au-tag--success{background-color:#a1e5bd}.au-tag--color-secondary.au-tag--error{background-color:#ffbfbf}.au-tag--color-secondary.au-tag--warning{background-color:#ffdabf}.au-tag--color-secondary.au-tag--support{background-color:#ccf3ff}.au-tag--color-secondary.au-tag--neutral{background-color:#c4c9d4}.au-tag--type-badge.au-tag--info p{color:#46008c}.au-tag--type-badge.au-tag--error p{color:#731111}.au-tag--type-badge.au-tag--success p{color:#08331a}.au-tag--type-badge.au-tag--warning p{color:#803500}.au-tag--type-badge.au-tag--support p{color:#004155}.au-tag--type-badge.au-tag--size-large{height:36px;font-size:12px;line-height:18px}.au-tag--full-width{width:100%}.au-tag__action-btn{font-family:"Source Sans 3",sans-serif;background-color:transparent;border:none;color:#0048db;cursor:pointer;font-size:12px;font-weight:600;line-height:19px}
|
|
File without changes
|