@consumidor-positivo/aurora 0.0.194 → 0.0.196
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/Carousel/index.es.js.map +1 -1
- package/dist/components/Checkbox/index.es.js +1 -1
- package/dist/components/Datepicker/index.es.js +3 -3
- package/dist/components/PortalHolder/index.es.js +1 -1
- package/dist/components/Segment/index.es.js +1 -1
- package/dist/components/SelectField/index.es.js +1 -1
- package/dist/components/Tag/index.es.js +1 -1
- package/dist/components/misc/index.d.ts +2 -0
- package/dist/components/misc/index.es.js +6 -1
- package/dist/components/misc/index.es.js.map +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 +1 -0
- package/dist/main.es.js +10 -5
- package/dist/main.es.js.map +1 -1
- package/dist/react-if.esm-Cek6sbNY.js +568 -0
- package/dist/react-if.esm-Cek6sbNY.js.map +1 -0
- package/package.json +2 -1
|
@@ -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;AAAA,EACF;AAEO,SAAA;AAAA,IACL;AAAA,EAAA;AAEJ;AC/BO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AACF,GAAoB;AAClB,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAC5C,QAAA,SAAS,OAAuB,IAAI;AACpC,QAAA,eAAe,OAAsB,IAAI;AAC/C,QAAM,cAAc,QAAQ,KAAK,CAAC,SAAS,KAAK,UAAU,YAAY;AAChE,QAAA,EAAE,mBAAmB,IAAI,gBAAgB;AAAA,IAC7C;AAAA,IACA,YAAY;AAAA,IACZ,eA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,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
package/dist/main.es.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { C, D, I, S } from "./react-if.esm-Cek6sbNY.js";
|
|
1
2
|
import { Button } from "./components/Button/index.es.js";
|
|
2
3
|
import { PureSwitch } from "./components/Pure/index.es.js";
|
|
3
4
|
import { CardSwitch } from "./components/Card/index.es.js";
|
|
@@ -353,8 +354,8 @@ import { IconZapOff } from "./components/icons/IconZapOff/index.es.js";
|
|
|
353
354
|
import { IconZoomIn } from "./components/icons/IconZoomIn/index.es.js";
|
|
354
355
|
import { IconZoomOut } from "./components/icons/IconZoomOut/index.es.js";
|
|
355
356
|
import { IconSocialGoogle } from "./components/icons/IconSocialGoogle/index.es.js";
|
|
356
|
-
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
357
|
import { Carousel } from "./components/Carousel/index.es.js";
|
|
358
|
+
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 as I2, H, g as g2, G, F, E, D as D2, A, z, y, W, V, U, T, S as S2, 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 as C2, 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";
|
|
358
359
|
import './components/main/styles.css';const CardContainer = ({
|
|
359
360
|
direction,
|
|
360
361
|
alignItems,
|
|
@@ -478,13 +479,13 @@ export {
|
|
|
478
479
|
r as COLOR_BRAND_BLUE_60,
|
|
479
480
|
K as COLOR_BRAND_CYAN_10,
|
|
480
481
|
J as COLOR_BRAND_CYAN_20,
|
|
481
|
-
|
|
482
|
+
I2 as COLOR_BRAND_CYAN_30,
|
|
482
483
|
H as COLOR_BRAND_CYAN_40,
|
|
483
484
|
g2 as COLOR_BRAND_CYAN_50,
|
|
484
485
|
G as COLOR_BRAND_CYAN_60,
|
|
485
486
|
F as COLOR_BRAND_EMERALD_10,
|
|
486
487
|
E as COLOR_BRAND_EMERALD_20,
|
|
487
|
-
|
|
488
|
+
D2 as COLOR_BRAND_EMERALD_30,
|
|
488
489
|
A as COLOR_BRAND_EMERALD_40,
|
|
489
490
|
z as COLOR_BRAND_EMERALD_50,
|
|
490
491
|
y as COLOR_BRAND_EMERALD_60,
|
|
@@ -492,7 +493,7 @@ export {
|
|
|
492
493
|
V as COLOR_ERROR_10,
|
|
493
494
|
U as COLOR_ERROR_20,
|
|
494
495
|
T as COLOR_ERROR_30,
|
|
495
|
-
|
|
496
|
+
S2 as COLOR_ERROR_40,
|
|
496
497
|
b2 as COLOR_ERROR_50,
|
|
497
498
|
R as COLOR_ERROR_60,
|
|
498
499
|
a6 as COLOR_INFO_00,
|
|
@@ -515,7 +516,7 @@ export {
|
|
|
515
516
|
O as COLOR_SUCCESS_20,
|
|
516
517
|
N as COLOR_SUCCESS_30,
|
|
517
518
|
M as COLOR_SUCCESS_40,
|
|
518
|
-
|
|
519
|
+
C2 as COLOR_SUCCESS_50,
|
|
519
520
|
L2 as COLOR_SUCCESS_60,
|
|
520
521
|
a0 as COLOR_WARNING_00,
|
|
521
522
|
$ as COLOR_WARNING_10,
|
|
@@ -528,10 +529,12 @@ export {
|
|
|
528
529
|
components as Card,
|
|
529
530
|
CardSwitch,
|
|
530
531
|
Carousel,
|
|
532
|
+
C as Case,
|
|
531
533
|
Checkbox,
|
|
532
534
|
Conditional,
|
|
533
535
|
Container,
|
|
534
536
|
DatepickerField,
|
|
537
|
+
D as Default,
|
|
535
538
|
Drawer,
|
|
536
539
|
EmailField,
|
|
537
540
|
av as FONT_BODY,
|
|
@@ -871,6 +874,7 @@ export {
|
|
|
871
874
|
IconZapOff,
|
|
872
875
|
IconZoomIn,
|
|
873
876
|
IconZoomOut,
|
|
877
|
+
I as If,
|
|
874
878
|
Image,
|
|
875
879
|
InputField,
|
|
876
880
|
LazyImage,
|
|
@@ -922,6 +926,7 @@ export {
|
|
|
922
926
|
SelectField,
|
|
923
927
|
Skeleton,
|
|
924
928
|
Spinner,
|
|
929
|
+
S as Switch,
|
|
925
930
|
Tabs,
|
|
926
931
|
Tag,
|
|
927
932
|
Text,
|
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/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"],"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"],"names":[],"mappings":";;;;;;;;;;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