@consumidor-positivo/aurora 0.0.191 → 0.0.193
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/README.md +29 -0
- package/dist/components/Alert/index.es.js +1 -1
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/Button/index.es.js +12 -0
- 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/Card/Root/index.d.ts +3 -2
- package/dist/components/Carousel/index.es.js +467 -0
- package/dist/components/Carousel/index.es.js.map +1 -0
- package/dist/components/Carousel/styles.css +1 -0
- package/dist/components/Checkbox/index.es.js +1 -1
- package/dist/components/Container/index.d.ts +7 -0
- package/dist/components/Container/index.es.js +3 -19
- package/dist/components/Container/index.es.js.map +1 -1
- package/dist/components/Container/styles.css +1 -0
- package/dist/components/Datepicker/index.es.js +3 -3
- package/dist/components/PortalHolder/index.es.js +1 -1
- package/dist/components/Prototype/Carousel/Pagination.d.ts +7 -0
- package/dist/components/Prototype/Carousel/Scrollbar.d.ts +6 -0
- package/dist/components/Prototype/Carousel/helpers.d.ts +1 -0
- package/dist/components/Prototype/Carousel/index.d.ts +3 -0
- package/dist/components/Prototype/Carousel/types.d.ts +7 -0
- package/dist/components/Prototype/Carousel/useCarouselDrag.d.ts +9 -0
- package/dist/components/Segment/index.es.js +1 -1
- package/dist/components/SelectField/index.es.js +1 -1
- package/dist/components/Tag/index.es.js +1 -1
- package/dist/{index-RHj6RFlT.js → index-C1N6rwrZ.js} +3 -3
- package/dist/{index-RHj6RFlT.js.map → index-C1N6rwrZ.js.map} +1 -1
- package/dist/{index-BzVR1Tq6.js → index-C8AM9yBn.js} +2 -2
- package/dist/{index-BzVR1Tq6.js.map → index-C8AM9yBn.js.map} +1 -1
- package/dist/{index-uWXGnhjd.js → index-CL0DrUGQ.js} +2 -2
- package/dist/{index-uWXGnhjd.js.map → index-CL0DrUGQ.js.map} +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.es.js +28 -4
- package/dist/main.es.js.map +1 -1
- package/package.json +4 -2
|
@@ -5,8 +5,8 @@ import { IconChevronDown } from "./components/icons/IconChevronDown/index.es.js"
|
|
|
5
5
|
import { IconChevronLeft } from "./components/icons/IconChevronLeft/index.es.js";
|
|
6
6
|
import { IconX } from "./components/icons/IconX/index.es.js";
|
|
7
7
|
import { useState, useRef, useEffect } from "react";
|
|
8
|
-
import { B as BREAKPOINT_MD } from "./tokens-D_iASp38.js";
|
|
9
8
|
import { a as above } from "./screen-DfYo7XQ_.js";
|
|
9
|
+
import { B as BREAKPOINT_MD } from "./tokens-D_iASp38.js";
|
|
10
10
|
import './components/index/styles3.css';function useOutsideClick({
|
|
11
11
|
rootEl,
|
|
12
12
|
breakpoint,
|
|
@@ -138,4 +138,4 @@ export {
|
|
|
138
138
|
Segment as S,
|
|
139
139
|
useOutsideClick as u
|
|
140
140
|
};
|
|
141
|
-
//# sourceMappingURL=index-
|
|
141
|
+
//# sourceMappingURL=index-CL0DrUGQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index-
|
|
1
|
+
{"version":3,"file":"index-CL0DrUGQ.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 tabIndex={0}\n className={classNames('au-datepicker__segment', {\n 'au-datepicker__segment--open': isListOpen,\n })}>\n <div className=\"au-datepicker__segment-input\" onClick={openList}>\n {currentItem?.label}\n <IconChevronDown />\n </div>\n <div className=\"au-datepicker__segment-list-holder\">\n <div className=\"au-datepicker__segment-list-header\">\n <div onClick={closeList}>\n <IconChevronLeft />\n </div>\n <h4 className=\"au-datepicker__segment-title\">{mobileTitle}</h4>\n <div onClick={closeList}>\n <IconX />\n </div>\n </div>\n <ul className=\"au-datepicker__segment-list\">\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 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;AACvB,QAAM,CAAC,eAAe,gBAAgB,IAAI,SAAS,KAAK;AAExD,WAAS,qBAAqB;AAC5B,QAAI,cAAc,CAAC,MAAM,UAAU,EAAG;AAC7B,aAAA,iBAAiB,aAAa,eAAe;AACtD,qBAAiB,IAAI;AAAA,EACvB;AAEA,WAAS,6BAA6B;AACpC,QAAI,eAAe;AACR,eAAA,oBAAoB,aAAa,eAAe;AACzD,uBAAiB,KAAK;AAAA,IACxB;AAAA,EACF;AAEA,WAAS,gBAAgB,IAA6B;AAChD,QAAA,CAAC,OAAO,QAAS;AAErB,UAAM,iBAAiB,CAAC,OAAO,QAAQ,SAAS,GAAG,MAAc;AAEjE,QAAI,gBAAgB;AACJ;AACa;IAC7B;AA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AAA,qBAAC,OAAI,EAAA,WAAU,gCAA+B,SAAS,UACpD,UAAA;AAAA,UAAa,2CAAA;AAAA,8BACb,iBAAgB,EAAA;AAAA,QAAA,GACnB;AAAA,QACA,qBAAC,OAAI,EAAA,WAAU,sCACb,UAAA;AAAA,UAAC,qBAAA,OAAA,EAAI,WAAU,sCACb,UAAA;AAAA,YAAA,oBAAC,OAAI,EAAA,SAAS,WACZ,UAAA,oBAAC,kBAAgB,CAAA,GACnB;AAAA,YACC,oBAAA,MAAA,EAAG,WAAU,gCAAgC,UAAY,aAAA;AAAA,gCACzD,OAAI,EAAA,SAAS,WACZ,UAAA,oBAAC,QAAM,CAAA,GACT;AAAA,UAAA,GACF;AAAA,UACA,oBAAC,QAAG,WAAU,+BACX,kBAAQ,IAAI,CAAC,QAAQ,QAAQ;AACtB,kBAAA,iBAAiB,OAAO,UAAU;AAEtC,mBAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBAEC,SAAS,MAAM,iBAAiB,MAAM;AAAA,gBACtC,KAAK,iBAAiB,eAAe;AAAA,gBACrC,WAAW,WAAW,oCAAoC;AAAA,kBACxD,4CAA4C;AAAA,gBAAA,CAC7C;AAAA,gBACA,UAAO,OAAA;AAAA,cAAA;AAAA,cANH,4BAA4B,OAAO,KAAK,IAAI,GAAG;AAAA,YAAA;AAAA,UASzD,CAAA,GACH;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
package/dist/main.d.ts
CHANGED
|
@@ -31,8 +31,10 @@ export { ProgressBar } from './components/ProgressBar';
|
|
|
31
31
|
export { Tag } from './components/Tag';
|
|
32
32
|
export { Modal } from './components/Modal';
|
|
33
33
|
export { Tooltip } from './components/Tooltip';
|
|
34
|
+
export { Container } from './components/Container';
|
|
34
35
|
export { useDrawer } from './components/Drawer/hooks';
|
|
35
36
|
export * from './components/Logo';
|
|
36
37
|
export * from './components/icons';
|
|
37
38
|
export * from './components/misc';
|
|
38
39
|
export * from './core/tokens';
|
|
40
|
+
export { Carousel } from './components/Prototype/Carousel';
|
package/dist/main.es.js
CHANGED
|
@@ -20,10 +20,9 @@ import { TextAreaField } from "./components/TextareaField/index.es.js";
|
|
|
20
20
|
import { Checkbox } from "./components/Checkbox/index.es.js";
|
|
21
21
|
import { Radio } from "./components/Radio/index.es.js";
|
|
22
22
|
import { Alert } from "./components/Alert/index.es.js";
|
|
23
|
-
import { CardContainer } from "./components/Container/index.es.js";
|
|
24
|
-
import { CardEmphasis } from "./components/Emphasis/index.es.js";
|
|
25
23
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
26
24
|
import { c as classNames } from "./index-CweZ_OcN.js";
|
|
25
|
+
import { CardEmphasis } from "./components/Emphasis/index.es.js";
|
|
27
26
|
import { Tabs } from "./components/Tabs/index.es.js";
|
|
28
27
|
import { Skeleton } from "./components/Skeleton/index.es.js";
|
|
29
28
|
import { Spinner } from "./components/Spinner/index.es.js";
|
|
@@ -32,6 +31,7 @@ import { ProgressBar } from "./components/ProgressBar/index.es.js";
|
|
|
32
31
|
import { Tag } from "./components/Tag/index.es.js";
|
|
33
32
|
import { Modal } from "./components/Modal/index.es.js";
|
|
34
33
|
import { Tooltip } from "./components/Tooltip/index.es.js";
|
|
34
|
+
import { Container } from "./components/Container/index.es.js";
|
|
35
35
|
import { useState } from "react";
|
|
36
36
|
import { p, o, q, L, a, b, c, d, e, f, g, h, i, j, k, l, m, n } from "./BadgeWhiteStrokeDefault-DWfsp2x-.js";
|
|
37
37
|
import { IconActivity } from "./components/icons/IconActivity/index.es.js";
|
|
@@ -353,8 +353,28 @@ import { IconZapOff } from "./components/icons/IconZapOff/index.es.js";
|
|
|
353
353
|
import { IconZoomIn } from "./components/icons/IconZoomIn/index.es.js";
|
|
354
354
|
import { IconZoomOut } from "./components/icons/IconZoomOut/index.es.js";
|
|
355
355
|
import { IconSocialGoogle } from "./components/icons/IconSocialGoogle/index.es.js";
|
|
356
|
+
import { Carousel } from "./components/Carousel/index.es.js";
|
|
356
357
|
import { k as k2, j as j2, l as l2, i as i2, a as a2, B, ai, aj, ah, x, w, v, u, t, s, r, K, J, I, H, g as g2, G, F, E, D, A, z, y, W, V, U, T, S, b as b2, R, a6, a5, a4, a3, a2 as a22, f as f2, a1, h as h2, q as q2, p as p2, o as o2, c as c2, n as n2, m as m2, d as d2, Q, P, O, N, M, C, L as L2, a0, $, _, Z, Y, e as e2, X, ak, av, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, au, aw, ay, az, ax, al, am, an, ao, ap, aq, ar, as, at, a7, a8, a9, aa, ab, ac, ad, ae, af, ag } from "./tokens-D_iASp38.js";
|
|
357
|
-
import './components/main/styles.css';const
|
|
358
|
+
import './components/main/styles.css';const CardContainer = ({
|
|
359
|
+
direction,
|
|
360
|
+
alignItems,
|
|
361
|
+
justifyContent,
|
|
362
|
+
gap,
|
|
363
|
+
width,
|
|
364
|
+
children
|
|
365
|
+
}) => {
|
|
366
|
+
const containerClasses = classNames("au-card__container", {
|
|
367
|
+
[`au-card__container--direction-${direction}`]: direction,
|
|
368
|
+
[`au-card__container--align-items-${alignItems}`]: alignItems,
|
|
369
|
+
[`au-card__container--justify-content-${justifyContent}`]: justifyContent
|
|
370
|
+
});
|
|
371
|
+
const containerStyle = {
|
|
372
|
+
gap: `${gap}px`,
|
|
373
|
+
width: `${width}px`
|
|
374
|
+
};
|
|
375
|
+
return /* @__PURE__ */ jsx("div", { style: containerStyle, className: containerClasses, children });
|
|
376
|
+
};
|
|
377
|
+
const CardImage = ({ src, alt, width, height }) => {
|
|
358
378
|
const imageSize = {
|
|
359
379
|
width: `${width}px`,
|
|
360
380
|
height: `${height}px`
|
|
@@ -371,7 +391,8 @@ const CardRoot = ({
|
|
|
371
391
|
hoverShadow,
|
|
372
392
|
paddingLess,
|
|
373
393
|
children,
|
|
374
|
-
className
|
|
394
|
+
className,
|
|
395
|
+
ref
|
|
375
396
|
}) => {
|
|
376
397
|
const rootClasses = classNames("au-card__root", {
|
|
377
398
|
"au-card__root--border-none": !border,
|
|
@@ -389,6 +410,7 @@ const CardRoot = ({
|
|
|
389
410
|
return /* @__PURE__ */ jsx(
|
|
390
411
|
"div",
|
|
391
412
|
{
|
|
413
|
+
ref,
|
|
392
414
|
style: rootSize,
|
|
393
415
|
className: rootClasses,
|
|
394
416
|
children
|
|
@@ -505,8 +527,10 @@ export {
|
|
|
505
527
|
ak as CONTAINER_SIZE,
|
|
506
528
|
components as Card,
|
|
507
529
|
CardSwitch,
|
|
530
|
+
Carousel,
|
|
508
531
|
Checkbox,
|
|
509
532
|
Conditional,
|
|
533
|
+
Container,
|
|
510
534
|
DatepickerField,
|
|
511
535
|
Drawer,
|
|
512
536
|
EmailField,
|
package/dist/main.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.es.js","sources":["../lib/components/Card/Image/index.tsx","../lib/components/Card/Root/index.tsx","../lib/components/Card/Tag/index.tsx","../lib/components/Card/index.tsx","../lib/components/Drawer/hooks.ts"],"sourcesContent":["import { CSSProperties } from 'react'\n\nexport type CardImageProps = {\n src: string\n alt?: string\n width?: number\n height?: number\n}\nexport const CardImage = ({ src, alt, width, height }: CardImageProps) => {\n const imageSize: CSSProperties = {\n width: `${width}px`,\n height: `${height}px`,\n }\n\n return (\n <div>\n <img style={imageSize} src={src} alt={alt} />\n </div>\n )\n}\n","import classNames from 'classnames'\nimport { CSSProperties, ReactNode } 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}\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}: 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 style={rootSize}\n className={rootClasses}>\n {children}\n </div>\n )\n}\n","import classNames from 'classnames'\nimport { ReactNode } from 'react'\n\nexport type CardTagProps = {\n color?: 'primary' | 'secondary'\n icon?: ReactNode\n children: ReactNode\n}\nexport const CardTag = ({\n color = 'primary',\n icon,\n children,\n}: CardTagProps) => {\n const tagClasses = classNames('au-card__tag', {\n 'au-card__tag--primary': color === 'primary',\n 'au-card__tag--secondary': color === 'secondary',\n })\n return (\n <div className={tagClasses}>\n <span>{icon}</span>\n <span>{children}</span>\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":"
|
|
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/Tag/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}\nexport const CardContainer = ({\n direction,\n alignItems,\n justifyContent,\n gap,\n width,\n children,\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}>\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}\nexport const CardImage = ({ src, alt, width, height }: CardImageProps) => {\n const imageSize: CSSProperties = {\n width: `${width}px`,\n height: `${height}px`,\n }\n\n return (\n <div>\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}\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}: 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 {children}\n </div>\n )\n}\n","import classNames from 'classnames'\nimport { ReactNode } from 'react'\n\nexport type CardTagProps = {\n color?: 'primary' | 'secondary'\n icon?: ReactNode\n children: ReactNode\n}\nexport const CardTag = ({\n color = 'primary',\n icon,\n children,\n}: CardTagProps) => {\n const tagClasses = classNames('au-card__tag', {\n 'au-card__tag--primary': color === 'primary',\n 'au-card__tag--secondary': color === 'secondary',\n })\n return (\n <div className={tagClasses}>\n <span>{icon}</span>\n <span>{children}</span>\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"],"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K;AAElE,WAAS,iBAAiB,MAAc;AACtC,kBAAc,CAAC,SAAS;AACf,aAAA;AAAA,QACL,GAAG;AAAA,QACH,CAAC,IAAI,GAAG,CAAC,KAAK,IAAI;AAAA,MAAA;AAAA,IACpB,CACD;AAAA,EACH;AAEO,SAAA;AAAA,IACL;AAAA,IACA;AAAA,EAAA;AAEJ;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@consumidor-positivo/aurora",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.193",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/main.es.js",
|
|
7
7
|
"modules": "./dist/main.es.js",
|
|
@@ -38,7 +38,8 @@
|
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"react": ">=18.0.0",
|
|
41
|
-
"react-dom": ">=18.0.0"
|
|
41
|
+
"react-dom": ">=18.0.0",
|
|
42
|
+
"react-snap-carousel": ">=0.3.0"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"dotenv": "16.4.5",
|
|
@@ -77,6 +78,7 @@
|
|
|
77
78
|
"prettier": "3.3.3",
|
|
78
79
|
"react": ">=18.3.1",
|
|
79
80
|
"react-dom": ">=18.3.1",
|
|
81
|
+
"react-snap-carousel": "0.5.1",
|
|
80
82
|
"rimraf": "6.0.1",
|
|
81
83
|
"rollup-plugin-css-only": "4.5.2",
|
|
82
84
|
"sass": "1.77.8",
|