@fuf-stack/pixels 0.0.6 → 0.1.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/Button → Button}/Button.cjs +3 -3
- package/dist/Button/Button.cjs.map +1 -0
- package/dist/Button/Button.js +8 -0
- package/dist/{components/Button → Button}/index.cjs +5 -5
- package/dist/Button/index.cjs.map +1 -0
- package/dist/Button/index.js +11 -0
- package/dist/Button/index.js.map +1 -0
- package/dist/{components/Button → Button}/subcomponents/LoadingSpinner.cjs +1 -1
- package/dist/Button/subcomponents/LoadingSpinner.cjs.map +1 -0
- package/dist/{components/Button → Button}/subcomponents/LoadingSpinner.js +1 -1
- package/dist/{components/Card → Card}/Card.cjs +1 -1
- package/dist/Card/Card.cjs.map +1 -0
- package/dist/{components/Card → Card}/Card.d.cts +3 -3
- package/dist/{components/Card → Card}/Card.d.ts +3 -3
- package/dist/{components/Card → Card}/Card.js +1 -1
- package/dist/{components/Card → Card}/index.cjs +3 -3
- package/dist/Card/index.cjs.map +1 -0
- package/dist/{components/Card → Card}/index.d.cts +1 -1
- package/dist/{components/Card → Card}/index.d.ts +1 -1
- package/dist/Card/index.js +10 -0
- package/dist/Card/index.js.map +1 -0
- package/dist/Label/Label.cjs +58 -0
- package/dist/Label/Label.cjs.map +1 -0
- package/dist/Label/Label.d.cts +24 -0
- package/dist/Label/Label.d.ts +24 -0
- package/dist/Label/Label.js +7 -0
- package/dist/Label/Label.js.map +1 -0
- package/dist/Label/index.cjs +63 -0
- package/dist/Label/index.cjs.map +1 -0
- package/dist/Label/index.d.cts +8 -0
- package/dist/Label/index.d.ts +8 -0
- package/dist/Label/index.js +10 -0
- package/dist/Label/index.js.map +1 -0
- package/dist/Menu/Menu.cjs +97 -0
- package/dist/Menu/Menu.cjs.map +1 -0
- package/dist/Menu/Menu.d.cts +55 -0
- package/dist/Menu/Menu.d.ts +55 -0
- package/dist/Menu/Menu.js +7 -0
- package/dist/Menu/Menu.js.map +1 -0
- package/dist/Menu/index.cjs +102 -0
- package/dist/Menu/index.cjs.map +1 -0
- package/dist/Menu/index.d.cts +7 -0
- package/dist/Menu/index.d.ts +7 -0
- package/dist/Menu/index.js +10 -0
- package/dist/Menu/index.js.map +1 -0
- package/dist/Modal/Modal.cjs +86 -0
- package/dist/Modal/Modal.cjs.map +1 -0
- package/dist/Modal/Modal.d.cts +29 -0
- package/dist/Modal/Modal.d.ts +29 -0
- package/dist/Modal/Modal.js +9 -0
- package/dist/Modal/Modal.js.map +1 -0
- package/dist/Modal/index.cjs +85 -0
- package/dist/Modal/index.cjs.map +1 -0
- package/dist/Modal/index.d.cts +7 -0
- package/dist/Modal/index.d.ts +7 -0
- package/dist/Modal/index.js +10 -0
- package/dist/Modal/index.js.map +1 -0
- package/dist/Popover/Popover.cjs +72 -0
- package/dist/Popover/Popover.cjs.map +1 -0
- package/dist/Popover/Popover.d.cts +31 -0
- package/dist/Popover/Popover.d.ts +31 -0
- package/dist/Popover/Popover.js +7 -0
- package/dist/Popover/Popover.js.map +1 -0
- package/dist/Popover/index.cjs +77 -0
- package/dist/Popover/index.cjs.map +1 -0
- package/dist/Popover/index.d.cts +8 -0
- package/dist/Popover/index.d.ts +8 -0
- package/dist/Popover/index.js +10 -0
- package/dist/Popover/index.js.map +1 -0
- package/dist/Tooltip/Tooltip.cjs +68 -0
- package/dist/Tooltip/Tooltip.cjs.map +1 -0
- package/dist/Tooltip/Tooltip.d.cts +27 -0
- package/dist/Tooltip/Tooltip.d.ts +27 -0
- package/dist/Tooltip/Tooltip.js +9 -0
- package/dist/Tooltip/Tooltip.js.map +1 -0
- package/dist/Tooltip/index.cjs +67 -0
- package/dist/Tooltip/index.cjs.map +1 -0
- package/dist/Tooltip/index.d.cts +7 -0
- package/dist/Tooltip/index.d.ts +7 -0
- package/dist/Tooltip/index.js +10 -0
- package/dist/Tooltip/index.js.map +1 -0
- package/dist/chunk-6ZUWYBMG.js +73 -0
- package/dist/chunk-6ZUWYBMG.js.map +1 -0
- package/dist/chunk-CEUL4NWH.js +28 -0
- package/dist/chunk-CEUL4NWH.js.map +1 -0
- package/dist/chunk-EYUTNORZ.js +58 -0
- package/dist/chunk-EYUTNORZ.js.map +1 -0
- package/dist/chunk-ONXXZTZY.js +34 -0
- package/dist/chunk-ONXXZTZY.js.map +1 -0
- package/dist/chunk-SGAWYTO7.js +42 -0
- package/dist/chunk-SGAWYTO7.js.map +1 -0
- package/dist/{chunk-XWTXH2TR.js → chunk-XPTSDDXG.js} +2 -2
- package/dist/chunk-XPTSDDXG.js.map +1 -0
- package/dist/{chunk-YOPQSZ46.js → chunk-ZFEVTQWW.js} +2 -2
- package/dist/chunk-ZFEVTQWW.js.map +1 -0
- package/dist/{chunk-WQN756O7.js → chunk-ZXTDGCUF.js} +3 -3
- package/dist/chunk-ZXTDGCUF.js.map +1 -0
- package/package.json +3 -5
- package/dist/chunk-WQN756O7.js.map +0 -1
- package/dist/chunk-XWTXH2TR.js.map +0 -1
- package/dist/chunk-YOPQSZ46.js.map +0 -1
- package/dist/components/Button/Button.cjs.map +0 -1
- package/dist/components/Button/Button.js +0 -8
- package/dist/components/Button/index.cjs.map +0 -1
- package/dist/components/Button/index.js +0 -11
- package/dist/components/Button/index.js.map +0 -1
- package/dist/components/Button/subcomponents/LoadingSpinner.cjs.map +0 -1
- package/dist/components/Card/Card.cjs.map +0 -1
- package/dist/components/Card/index.cjs.map +0 -1
- package/dist/components/Card/index.js +0 -10
- package/dist/components/Card/index.js.map +0 -1
- /package/dist/{components/Button → Button}/Button.d.cts +0 -0
- /package/dist/{components/Button → Button}/Button.d.ts +0 -0
- /package/dist/{components/Button → Button}/Button.js.map +0 -0
- /package/dist/{components/Button → Button}/index.d.cts +0 -0
- /package/dist/{components/Button → Button}/index.d.ts +0 -0
- /package/dist/{components/Button → Button}/subcomponents/LoadingSpinner.d.cts +0 -0
- /package/dist/{components/Button → Button}/subcomponents/LoadingSpinner.d.ts +0 -0
- /package/dist/{components/Button → Button}/subcomponents/LoadingSpinner.js.map +0 -0
- /package/dist/{components/Card → Card}/Card.js.map +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Label/Label.tsx"],"sourcesContent":["import type { ChipProps } from '@nextui-org/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as NextLabel } from '@nextui-org/chip';\nimport cn from 'classnames';\n\nexport interface LabelProps {\n /** content of the label */\n children: ReactNode;\n /** CSS class name */\n className?: string;\n /** color of the label */\n color?: ChipProps['color'];\n /** element to be rendered in the right side of the label */\n endContent?: ChipProps['endContent'];\n /** size of the label */\n size?: ChipProps['size'];\n /** element to be rendered in the left side of the label */\n startContent?: ChipProps['startContent'];\n}\n\n/**\n * Label component based on [NextUI Chip](https://nextui.org/docs/components/chip)\n */\nconst Label = ({\n children,\n className = undefined,\n color = 'default',\n endContent = undefined,\n size = 'md',\n startContent = undefined,\n}: LabelProps) => (\n <NextLabel\n className={cn(className)}\n color={color}\n endContent={endContent}\n size={size}\n startContent={startContent}\n >\n {children}\n </NextLabel>\n);\n\nexport default Label;\n"],"mappings":";AAGA,SAAS,QAAQ,iBAAiB;AAClC,OAAO,QAAQ;AA4Bb;AARF,IAAM,QAAQ,CAAC;AAAA,EACb;AAAA,EACA,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,OAAO;AAAA,EACP,eAAe;AACjB,MACE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,SAAS;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IAEC;AAAA;AACH;AAGF,IAAO,gBAAQ;","names":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
// src/Modal/Modal.tsx
|
|
2
|
+
import {
|
|
3
|
+
Modal as NextModal,
|
|
4
|
+
ModalBody as NextModalBody,
|
|
5
|
+
ModalContent as NextModalContent,
|
|
6
|
+
ModalFooter as NextModalFooter,
|
|
7
|
+
ModalHeader as NextModalHeader
|
|
8
|
+
} from "@nextui-org/modal";
|
|
9
|
+
import cn from "classnames";
|
|
10
|
+
import createDebug from "debug";
|
|
11
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
+
var debug = createDebug("component:Modal");
|
|
13
|
+
var ModalSizeOptions = ["sm", "md", "lg"];
|
|
14
|
+
var Modal = ({
|
|
15
|
+
children = null,
|
|
16
|
+
className = void 0,
|
|
17
|
+
footer = void 0,
|
|
18
|
+
isOpen,
|
|
19
|
+
onClose,
|
|
20
|
+
size = "md",
|
|
21
|
+
testId = void 0,
|
|
22
|
+
title = void 0
|
|
23
|
+
}) => {
|
|
24
|
+
debug("Modal", { size });
|
|
25
|
+
return /* @__PURE__ */ jsx("div", { className: cn(className), "data-testid": testId, children: /* @__PURE__ */ jsx(
|
|
26
|
+
NextModal,
|
|
27
|
+
{
|
|
28
|
+
backdrop: "opaque",
|
|
29
|
+
classNames: {
|
|
30
|
+
base: cn(
|
|
31
|
+
{
|
|
32
|
+
"lg:w-11/12": size === "lg",
|
|
33
|
+
"w-2/12": size === "sm",
|
|
34
|
+
"w-6/12": size === "md"
|
|
35
|
+
},
|
|
36
|
+
// overwrite !rounded-none from nextui
|
|
37
|
+
"!rounded-lg"
|
|
38
|
+
)
|
|
39
|
+
},
|
|
40
|
+
isOpen,
|
|
41
|
+
onClose,
|
|
42
|
+
scrollBehavior: "inside",
|
|
43
|
+
size: "full",
|
|
44
|
+
children: /* @__PURE__ */ jsx(NextModalContent, { "data-testid": testId ? `${testId}_modal` : "modal", children: () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45
|
+
title && /* @__PURE__ */ jsx(NextModalHeader, { children: title }),
|
|
46
|
+
/* @__PURE__ */ jsx(NextModalBody, { className: "bg-ex-background", children }),
|
|
47
|
+
footer && /* @__PURE__ */ jsx(NextModalFooter, { children: footer })
|
|
48
|
+
] }) })
|
|
49
|
+
}
|
|
50
|
+
) });
|
|
51
|
+
};
|
|
52
|
+
var Modal_default = Modal;
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
ModalSizeOptions,
|
|
56
|
+
Modal_default
|
|
57
|
+
};
|
|
58
|
+
//# sourceMappingURL=chunk-EYUTNORZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Modal/Modal.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport {\n Modal as NextModal,\n ModalBody as NextModalBody,\n ModalContent as NextModalContent,\n ModalFooter as NextModalFooter,\n ModalHeader as NextModalHeader,\n} from '@nextui-org/modal';\nimport cn from 'classnames';\nimport createDebug from 'debug';\n\nconst debug = createDebug('component:Modal');\n\nexport const ModalSizeOptions = ['sm', 'md', 'lg'] as const;\ntype ModalSize = (typeof ModalSizeOptions)[number];\n\nexport interface ModalProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | string[];\n /** HTML data-testid attribute used in e2e tests */\n footer?: ReactNode;\n /** open state (controlled) */\n isOpen: boolean;\n /** close event handler */\n onClose: () => void;\n /** modal size */\n size?: ModalSize;\n /** e2e test id */\n testId?: string;\n /** modal header */\n title?: ReactNode;\n}\n\n/**\n * Modal component based on [NextUI Modal](https://nextui.org/docs/components/modal)\n */\nconst Modal = ({\n children = null,\n className = undefined,\n footer = undefined,\n isOpen,\n onClose,\n size = 'md',\n testId = undefined,\n title = undefined,\n}: ModalProps) => {\n debug('Modal', { size });\n return (\n <div className={cn(className)} data-testid={testId}>\n <NextModal\n backdrop=\"opaque\"\n classNames={{\n base: cn(\n {\n 'lg:w-11/12': size === 'lg',\n 'w-2/12': size === 'sm',\n 'w-6/12': size === 'md',\n },\n // overwrite !rounded-none from nextui\n '!rounded-lg',\n ),\n }}\n isOpen={isOpen}\n onClose={onClose}\n scrollBehavior=\"inside\"\n size=\"full\"\n >\n <NextModalContent data-testid={testId ? `${testId}_modal` : 'modal'}>\n {() => (\n <>\n {title && <NextModalHeader>{title}</NextModalHeader>}\n <NextModalBody className=\"bg-ex-background\">\n {children}\n </NextModalBody>\n {footer && <NextModalFooter>{footer}</NextModalFooter>}\n </>\n )}\n </NextModalContent>\n </NextModal>\n </div>\n );\n};\n\nexport default Modal;\n"],"mappings":";AAEA;AAAA,EACE,SAAS;AAAA,EACT,aAAa;AAAA,EACb,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,eAAe;AAAA,OACV;AACP,OAAO,QAAQ;AACf,OAAO,iBAAiB;AA8DZ,mBACY,KADZ;AA5DZ,IAAM,QAAQ,YAAY,iBAAiB;AAEpC,IAAM,mBAAmB,CAAC,MAAM,MAAM,IAAI;AAyBjD,IAAM,QAAQ,CAAC;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AACV,MAAkB;AAChB,QAAM,SAAS,EAAE,KAAK,CAAC;AACvB,SACE,oBAAC,SAAI,WAAW,GAAG,SAAS,GAAG,eAAa,QAC1C;AAAA,IAAC;AAAA;AAAA,MACC,UAAS;AAAA,MACT,YAAY;AAAA,QACV,MAAM;AAAA,UACJ;AAAA,YACE,cAAc,SAAS;AAAA,YACvB,UAAU,SAAS;AAAA,YACnB,UAAU,SAAS;AAAA,UACrB;AAAA;AAAA,UAEA;AAAA,QACF;AAAA,MACF;AAAA,MACA;AAAA,MACA;AAAA,MACA,gBAAe;AAAA,MACf,MAAK;AAAA,MAEL,8BAAC,oBAAiB,eAAa,SAAS,GAAG,MAAM,WAAW,SACzD,gBACC,iCACG;AAAA,iBAAS,oBAAC,mBAAiB,iBAAM;AAAA,QAClC,oBAAC,iBAAc,WAAU,oBACtB,UACH;AAAA,QACC,UAAU,oBAAC,mBAAiB,kBAAO;AAAA,SACtC,GAEJ;AAAA;AAAA,EACF,GACF;AAEJ;AAEA,IAAO,gBAAQ;","names":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
// src/Tooltip/Tooltip.tsx
|
|
2
|
+
import { Tooltip as NextTooltip } from "@nextui-org/tooltip";
|
|
3
|
+
import cn from "classnames";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
var PlacementOptions = ["top", "bottom", "left", "right"];
|
|
6
|
+
var Tooltip = ({
|
|
7
|
+
children,
|
|
8
|
+
className = void 0,
|
|
9
|
+
content,
|
|
10
|
+
placement = "top",
|
|
11
|
+
defaultOpen = false,
|
|
12
|
+
onOpenChange = void 0,
|
|
13
|
+
containerPadding = 0
|
|
14
|
+
}) => /* @__PURE__ */ jsx(
|
|
15
|
+
NextTooltip,
|
|
16
|
+
{
|
|
17
|
+
className: cn(className),
|
|
18
|
+
containerPadding,
|
|
19
|
+
content,
|
|
20
|
+
defaultOpen,
|
|
21
|
+
onOpenChange,
|
|
22
|
+
placement,
|
|
23
|
+
shouldFlip: true,
|
|
24
|
+
showArrow: true,
|
|
25
|
+
children: /* @__PURE__ */ jsx("span", { className: "cursor-pointer", children })
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
var Tooltip_default = Tooltip;
|
|
29
|
+
|
|
30
|
+
export {
|
|
31
|
+
PlacementOptions,
|
|
32
|
+
Tooltip_default
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=chunk-ONXXZTZY.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Tooltip/Tooltip.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Tooltip as NextTooltip } from '@nextui-org/tooltip';\nimport cn from 'classnames';\n\nexport const PlacementOptions = ['top', 'bottom', 'left', 'right'] as const;\nexport type Placement = (typeof PlacementOptions)[number];\n\nexport interface TooltipProps {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: string;\n /** placement padding in px */\n containerPadding?: number;\n /** content displayed in the tooltip */\n content: ReactNode;\n /** open overlay initially when uncontrolled */\n defaultOpen?: boolean;\n /** handler that is called when the overlay's open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n /** placement if the tooltip */\n placement?: Placement;\n}\n\n/**\n * Tooltip component based on [NextUI Tooltip](https://nextui.org/docs/components/tooltip)\n */\nconst Tooltip = ({\n children,\n className = undefined,\n content,\n placement = 'top',\n defaultOpen = false,\n onOpenChange = undefined,\n containerPadding = 0,\n}: TooltipProps) => (\n <NextTooltip\n className={cn(className)}\n containerPadding={containerPadding}\n content={content}\n defaultOpen={defaultOpen}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n <span className=\"cursor-pointer\">{children}</span>\n </NextTooltip>\n);\n\nexport default Tooltip;\n"],"mappings":";AAEA,SAAS,WAAW,mBAAmB;AACvC,OAAO,QAAQ;AA4CX;AA1CG,IAAM,mBAAmB,CAAC,OAAO,UAAU,QAAQ,OAAO;AAuBjE,IAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,YAAY;AAAA,EACZ;AAAA,EACA,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,eAAe;AAAA,EACf,mBAAmB;AACrB,MACE;AAAA,EAAC;AAAA;AAAA,IACC,WAAW,GAAG,SAAS;AAAA,IACvB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,YAAU;AAAA,IACV,WAAS;AAAA,IAET,8BAAC,UAAK,WAAU,kBAAkB,UAAS;AAAA;AAC7C;AAGF,IAAO,kBAAQ;","names":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// src/Popover/Popover.tsx
|
|
2
|
+
import { Popover, PopoverContent, PopoverTrigger } from "@nextui-org/popover";
|
|
3
|
+
import cn from "classnames";
|
|
4
|
+
import createDebug from "debug";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
var debug = createDebug("component:Popover");
|
|
7
|
+
var Popover_default = ({
|
|
8
|
+
children = null,
|
|
9
|
+
className = void 0,
|
|
10
|
+
content,
|
|
11
|
+
contentTestId = void 0,
|
|
12
|
+
placement = "top",
|
|
13
|
+
openControlled = void 0,
|
|
14
|
+
testId = void 0,
|
|
15
|
+
title = void 0
|
|
16
|
+
}) => {
|
|
17
|
+
debug("Popover");
|
|
18
|
+
return /* @__PURE__ */ jsxs(
|
|
19
|
+
Popover,
|
|
20
|
+
{
|
|
21
|
+
placement,
|
|
22
|
+
radius: "sm",
|
|
23
|
+
showArrow: true,
|
|
24
|
+
...openControlled ? { isOpen: openControlled.open, onOpenChange: openControlled.setOpen } : {},
|
|
25
|
+
children: [
|
|
26
|
+
/* @__PURE__ */ jsx(PopoverTrigger, { className: cn(className), "data-testid": testId, children: /* @__PURE__ */ jsx("button", { children }) }),
|
|
27
|
+
/* @__PURE__ */ jsx(PopoverContent, { "data-testid": contentTestId, children: /* @__PURE__ */ jsxs("div", { className: "max-h-[80vh] overflow-y-auto", children: [
|
|
28
|
+
title && /* @__PURE__ */ jsxs("div", { children: [
|
|
29
|
+
title,
|
|
30
|
+
/* @__PURE__ */ jsx("hr", {})
|
|
31
|
+
] }),
|
|
32
|
+
content
|
|
33
|
+
] }) })
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export {
|
|
40
|
+
Popover_default
|
|
41
|
+
};
|
|
42
|
+
//# sourceMappingURL=chunk-SGAWYTO7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Popover/Popover.tsx"],"sourcesContent":["import type { PopoverProps as NextPopoverProps } from '@nextui-org/popover';\nimport type { ReactNode } from 'react';\n\nimport { Popover, PopoverContent, PopoverTrigger } from '@nextui-org/popover';\nimport cn from 'classnames';\nimport createDebug from 'debug';\n\nconst debug = createDebug('component:Popover');\n\nexport interface PopoverProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | string[];\n /** content of the popover */\n content: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n contentTestId?: string;\n /** placement of the popover relative to its trigger reference */\n placement?: NextPopoverProps['placement'];\n /** use as controlled component */\n openControlled?: { open: boolean; setOpen: (open: boolean) => void };\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** popover title */\n title?: ReactNode;\n}\n\n/**\n * Popover component based on [NextUI Card](https://nextui.org/docs/components/popover)\n */\nexport default ({\n children = null,\n className = undefined,\n content,\n contentTestId = undefined,\n placement = 'top',\n openControlled = undefined,\n testId = undefined,\n title = undefined,\n}: PopoverProps) => {\n debug('Popover');\n\n return (\n <Popover\n placement={placement}\n radius=\"sm\"\n showArrow\n {...(openControlled\n ? { isOpen: openControlled.open, onOpenChange: openControlled.setOpen }\n : {})}\n >\n <PopoverTrigger className={cn(className)} data-testid={testId}>\n {/* NOTE: type and aria properties are injected by PopoverTrigger */}\n {/* eslint-disable-next-line react/button-has-type */}\n <button>{children}</button>\n </PopoverTrigger>\n <PopoverContent data-testid={contentTestId}>\n <div className=\"max-h-[80vh] overflow-y-auto\">\n {title && (\n <div>\n {title}\n <hr />\n </div>\n )}\n {content}\n </div>\n </PopoverContent>\n </Popover>\n );\n};\n"],"mappings":";AAGA,SAAS,SAAS,gBAAgB,sBAAsB;AACxD,OAAO,QAAQ;AACf,OAAO,iBAAiB;AAkDhB,cAKI,YALJ;AAhDR,IAAM,QAAQ,YAAY,mBAAmB;AAwB7C,IAAO,kBAAQ,CAAC;AAAA,EACd,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,SAAS;AAAA,EACT,QAAQ;AACV,MAAoB;AAClB,QAAM,SAAS;AAEf,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,QAAO;AAAA,MACP,WAAS;AAAA,MACR,GAAI,iBACD,EAAE,QAAQ,eAAe,MAAM,cAAc,eAAe,QAAQ,IACpE,CAAC;AAAA,MAEL;AAAA,4BAAC,kBAAe,WAAW,GAAG,SAAS,GAAG,eAAa,QAGrD,8BAAC,YAAQ,UAAS,GACpB;AAAA,QACA,oBAAC,kBAAe,eAAa,eAC3B,+BAAC,SAAI,WAAU,gCACZ;AAAA,mBACC,qBAAC,SACE;AAAA;AAAA,YACD,oBAAC,QAAG;AAAA,aACN;AAAA,UAED;AAAA,WACH,GACF;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/Card/Card.tsx
|
|
2
2
|
import {
|
|
3
3
|
Card as NextCard,
|
|
4
4
|
CardBody as NextCardBody,
|
|
@@ -105,4 +105,4 @@ export {
|
|
|
105
105
|
cardVariants,
|
|
106
106
|
Card_default
|
|
107
107
|
};
|
|
108
|
-
//# sourceMappingURL=chunk-
|
|
108
|
+
//# sourceMappingURL=chunk-XPTSDDXG.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Card/Card.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { VariantProps } from 'tailwind-variants';\n\nimport {\n Card as NextCard,\n CardBody as NextCardBody,\n CardFooter as NextCardFooter,\n CardHeader as NextCardHeader,\n} from '@nextui-org/card';\nimport { Divider as NextDivider } from '@nextui-org/divider';\nimport createDebug from 'debug';\nimport { tv } from 'tailwind-variants';\n\nconst debug = createDebug('component:Card');\n\n// card styling variants\nexport const cardVariants = tv({\n slots: {\n base: 'border border-slate-300',\n body: '',\n divider: 'my-0 bg-slate-300',\n footer: '',\n header: 'text-base font-semibold',\n },\n});\n\ntype CardVariantProps = VariantProps<typeof cardVariants>;\ntype CardVariantSlots = Partial<\n Record<keyof ReturnType<typeof cardVariants>, string>\n>;\n\nexport interface CardProps extends CardVariantProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | CardVariantSlots;\n /** footer content */\n footer?: ReactNode;\n /** header content */\n header?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * Card component based on [NextUI Card](https://nextui.org/docs/components/card)\n */\nconst Card = ({\n children = null,\n className = undefined,\n testId = undefined,\n header = undefined,\n footer = undefined,\n}: CardProps) => {\n debug('Card', { className, testId });\n const {\n base: baseSlot,\n body: bodySlot,\n divider: dividerSlot,\n footer: footerSlot,\n header: headerSlot,\n } = cardVariants();\n\n return (\n <NextCard\n data-testid={testId && `card_${testId}`}\n className={baseSlot({\n className: typeof className === 'object' ? className.base : className,\n })}\n fullWidth\n radius=\"sm\"\n shadow=\"none\"\n >\n {header && (\n <>\n <NextCardHeader\n data-testid={testId && `card_header_${testId}`}\n className={headerSlot({\n className: typeof className === 'object' && className.header,\n })}\n >\n {header}\n </NextCardHeader>\n <NextDivider\n className={dividerSlot({\n className: typeof className === 'object' && className.divider,\n })}\n />\n </>\n )}\n <NextCardBody\n data-testid={testId && `card_body_${testId}`}\n className={bodySlot({\n className: typeof className === 'object' && className.body,\n })}\n >\n {children}\n </NextCardBody>\n {footer && (\n <>\n <NextDivider\n className={dividerSlot({\n className: typeof className === 'object' && className.divider,\n })}\n />\n <NextCardFooter\n data-testid={testId && `card_footer_${testId}`}\n className={footerSlot({\n className: typeof className === 'object' && className.footer,\n })}\n >\n {footer}\n </NextCardFooter>\n </>\n )}\n </NextCard>\n );\n};\n\nexport default Card;\n"],"mappings":";AAGA;AAAA,EACE,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,cAAc;AAAA,OACT;AACP,SAAS,WAAW,mBAAmB;AACvC,OAAO,iBAAiB;AACxB,SAAS,UAAU;AA+DX,mBACE,KADF;AA7DR,IAAM,QAAQ,YAAY,gBAAgB;AAGnC,IAAM,eAAe,GAAG;AAAA,EAC7B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AACF,CAAC;AAuBD,IAAM,OAAO,CAAC;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,MAAiB;AACf,QAAM,QAAQ,EAAE,WAAW,OAAO,CAAC;AACnC,QAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV,IAAI,aAAa;AAEjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,UAAU,QAAQ,MAAM;AAAA,MACrC,WAAW,SAAS;AAAA,QAClB,WAAW,OAAO,cAAc,WAAW,UAAU,OAAO;AAAA,MAC9D,CAAC;AAAA,MACD,WAAS;AAAA,MACT,QAAO;AAAA,MACP,QAAO;AAAA,MAEN;AAAA,kBACC,iCACE;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,eAAa,UAAU,eAAe,MAAM;AAAA,cAC5C,WAAW,WAAW;AAAA,gBACpB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA,cAEA;AAAA;AAAA,UACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,YAAY;AAAA,gBACrB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA;AAAA,UACH;AAAA,WACF;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC,eAAa,UAAU,aAAa,MAAM;AAAA,YAC1C,WAAW,SAAS;AAAA,cAClB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,YACxD,CAAC;AAAA,YAEA;AAAA;AAAA,QACH;AAAA,QACC,UACC,iCACE;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,YAAY;AAAA,gBACrB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA;AAAA,UACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,eAAa,UAAU,eAAe,MAAM;AAAA,cAC5C,WAAW,WAAW;AAAA,gBACpB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA,cAEA;AAAA;AAAA,UACH;AAAA,WACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,eAAQ;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// src/
|
|
1
|
+
// src/Button/subcomponents/LoadingSpinner.tsx
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
var LoadingSpinner_default = () => /* @__PURE__ */ jsxs(
|
|
4
4
|
"svg",
|
|
@@ -34,4 +34,4 @@ var LoadingSpinner_default = () => /* @__PURE__ */ jsxs(
|
|
|
34
34
|
export {
|
|
35
35
|
LoadingSpinner_default
|
|
36
36
|
};
|
|
37
|
-
//# sourceMappingURL=chunk-
|
|
37
|
+
//# sourceMappingURL=chunk-ZFEVTQWW.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Button/subcomponents/LoadingSpinner.tsx"],"sourcesContent":["/**\n * svg loading spinner for button\n * @see https://nextui.org/docs/components/button#loading\n * */\nexport default () => (\n <svg\n className=\"animate-spin h-5 w-5 text-current\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n"],"mappings":";AAKE,SAME,KANF;AADF,IAAO,yBAAQ,MACb;AAAA,EAAC;AAAA;AAAA,IACC,WAAU;AAAA,IACV,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,IAAG;AAAA,UACH,IAAG;AAAA,UACH,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA;AAAA,MACd;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA,UACF,MAAK;AAAA;AAAA,MACP;AAAA;AAAA;AACF;","names":[]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LoadingSpinner_default
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-ZFEVTQWW.js";
|
|
4
4
|
|
|
5
|
-
// src/
|
|
5
|
+
// src/Button/Button.tsx
|
|
6
6
|
import { Button as NextButton } from "@nextui-org/button";
|
|
7
7
|
import cn from "classnames";
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -47,4 +47,4 @@ var Button_default = Button;
|
|
|
47
47
|
export {
|
|
48
48
|
Button_default
|
|
49
49
|
};
|
|
50
|
-
//# sourceMappingURL=chunk-
|
|
50
|
+
//# sourceMappingURL=chunk-ZXTDGCUF.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Button/Button.tsx"],"sourcesContent":["import type { ButtonProps as NextButtonProps } from '@nextui-org/button';\nimport type { ReactNode } from 'react';\n\nimport { Button as NextButton } from '@nextui-org/button';\nimport cn from 'classnames';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport interface ButtonProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | string[];\n /** next ui button color */\n color?: NextButtonProps['color'];\n /** disables function of the button. */\n disabled?: boolean;\n /** If set loading animation is shown */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** on click event */\n onClick?: NextButtonProps['onPress'];\n /** 3 size options */\n size?: NextButtonProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** sets the button type. */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** next ui button variants */\n variant?: NextButtonProps['variant'];\n}\n\n/**\n * Button component based on [NextUI Button](https://nextui.org/docs/components/button)\n */\nconst Button = ({\n ariaLabel = undefined,\n children = undefined,\n className = undefined,\n color = 'default',\n disabled = false,\n icon = undefined,\n loading = false,\n onClick = undefined,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n}: ButtonProps) => {\n return (\n <NextButton\n aria-label={ariaLabel}\n className={cn(className)}\n color={color}\n data-testid={testId}\n isDisabled={disabled}\n isIconOnly={!!(icon && !children)}\n isLoading={loading}\n onPress={onClick}\n size={size}\n spinner={<LoadingSpinner />}\n type={type}\n variant={variant}\n >\n {icon}\n {children}\n </NextButton>\n );\n};\n\nexport default Button;\n"],"mappings":";;;;;AAGA,SAAS,UAAU,kBAAkB;AACrC,OAAO,QAAQ;AAiDX,SAUW,KAVX;AAfJ,IAAM,SAAS,CAAC;AAAA,EACd,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AACZ,MAAmB;AACjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAY;AAAA,MACZ,WAAW,GAAG,SAAS;AAAA,MACvB;AAAA,MACA,eAAa;AAAA,MACb,YAAY;AAAA,MACZ,YAAY,CAAC,EAAE,QAAQ,CAAC;AAAA,MACxB,WAAW;AAAA,MACX,SAAS;AAAA,MACT;AAAA,MACA,SAAS,oBAAC,0BAAe;AAAA,MACzB;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,iBAAQ;","names":[]}
|
package/package.json
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
"name": "@fuf-stack/pixels",
|
|
3
3
|
"description": "fuf react component library",
|
|
4
4
|
"author": "Hannes Tiede",
|
|
5
|
-
"version": "0.0
|
|
5
|
+
"version": "0.1.0",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"exports": {
|
|
8
|
-
"./": "./dist/"
|
|
9
|
-
"./components/*": "./dist/components/*/index.js"
|
|
8
|
+
"./": "./dist/"
|
|
10
9
|
},
|
|
11
10
|
"typesVersions": {
|
|
12
11
|
"*": {
|
|
@@ -18,7 +17,7 @@
|
|
|
18
17
|
"files": [
|
|
19
18
|
"./dist"
|
|
20
19
|
],
|
|
21
|
-
"homepage": "https://github.com/fuf-stack/
|
|
20
|
+
"homepage": "https://github.com/fuf-stack/uniform/tree/main/packages/pixels",
|
|
22
21
|
"license": "MIT",
|
|
23
22
|
"publishConfig": {
|
|
24
23
|
"access": "public"
|
|
@@ -57,7 +56,6 @@
|
|
|
57
56
|
"@types/debug": "4.1.12",
|
|
58
57
|
"@types/react": "18.2.69",
|
|
59
58
|
"@types/react-dom": "18.2.22",
|
|
60
|
-
"tsup": "8.0.2",
|
|
61
59
|
"storybook-config": "0.0.1",
|
|
62
60
|
"tailwind-config": "0.0.1"
|
|
63
61
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Button/Button.tsx"],"sourcesContent":["import type { ButtonProps as NextButtonProps } from '@nextui-org/button';\nimport type { ReactNode } from 'react';\n\nimport { Button as NextButton } from '@nextui-org/button';\nimport cn from 'classnames';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport interface ButtonProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | string[];\n /** next ui button color */\n color?: NextButtonProps['color'];\n /** disables function of the button. */\n disabled?: boolean;\n /** If set loading animation is shown */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** on click event */\n onClick?: NextButtonProps['onPress'];\n /** 3 size options */\n size?: NextButtonProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** sets the button type. */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** next ui button variants */\n variant?: NextButtonProps['variant'];\n}\n\n/**\n * Button component based on [NextUI Button](https://nextui.org/docs/components/button)\n */\nconst Button = ({\n ariaLabel = undefined,\n children = undefined,\n className = undefined,\n color = 'default',\n disabled = false,\n icon = undefined,\n loading = false,\n onClick = undefined,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n}: ButtonProps) => {\n return (\n <NextButton\n aria-label={ariaLabel}\n className={cn(className)}\n color={color}\n data-testid={testId}\n isDisabled={disabled}\n isIconOnly={!!(icon && !children)}\n isLoading={loading}\n onPress={onClick}\n size={size}\n spinner={<LoadingSpinner />}\n type={type}\n variant={variant}\n >\n {icon}\n {children}\n </NextButton>\n );\n};\n\nexport default Button;\n"],"mappings":";;;;;AAGA,SAAS,UAAU,kBAAkB;AACrC,OAAO,QAAQ;AAiDX,SAUW,KAVX;AAfJ,IAAM,SAAS,CAAC;AAAA,EACd,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AACZ,MAAmB;AACjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAY;AAAA,MACZ,WAAW,GAAG,SAAS;AAAA,MACvB;AAAA,MACA,eAAa;AAAA,MACb,YAAY;AAAA,MACZ,YAAY,CAAC,EAAE,QAAQ,CAAC;AAAA,MACxB,WAAW;AAAA,MACX,SAAS;AAAA,MACT;AAAA,MACA,SAAS,oBAAC,0BAAe;AAAA,MACzB;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,iBAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Card/Card.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { VariantProps } from 'tailwind-variants';\n\nimport {\n Card as NextCard,\n CardBody as NextCardBody,\n CardFooter as NextCardFooter,\n CardHeader as NextCardHeader,\n} from '@nextui-org/card';\nimport { Divider as NextDivider } from '@nextui-org/divider';\nimport createDebug from 'debug';\nimport { tv } from 'tailwind-variants';\n\nconst debug = createDebug('component:Card');\n\n// card styling variants\nexport const cardVariants = tv({\n slots: {\n base: 'border border-slate-300',\n body: '',\n divider: 'my-0 bg-slate-300',\n footer: '',\n header: 'text-base font-semibold',\n },\n});\n\ntype CardVariantProps = VariantProps<typeof cardVariants>;\ntype CardVariantSlots = Partial<\n Record<keyof ReturnType<typeof cardVariants>, string>\n>;\n\nexport interface CardProps extends CardVariantProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | CardVariantSlots;\n /** footer content */\n footer?: ReactNode;\n /** header content */\n header?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * Card component based on [NextUI Card](https://nextui.org/docs/components/card)\n */\nconst Card = ({\n children = null,\n className = undefined,\n testId = undefined,\n header = undefined,\n footer = undefined,\n}: CardProps) => {\n debug('Card', { className, testId });\n const {\n base: baseSlot,\n body: bodySlot,\n divider: dividerSlot,\n footer: footerSlot,\n header: headerSlot,\n } = cardVariants();\n\n return (\n <NextCard\n data-testid={testId && `card_${testId}`}\n className={baseSlot({\n className: typeof className === 'object' ? className.base : className,\n })}\n fullWidth\n radius=\"sm\"\n shadow=\"none\"\n >\n {header && (\n <>\n <NextCardHeader\n data-testid={testId && `card_header_${testId}`}\n className={headerSlot({\n className: typeof className === 'object' && className.header,\n })}\n >\n {header}\n </NextCardHeader>\n <NextDivider\n className={dividerSlot({\n className: typeof className === 'object' && className.divider,\n })}\n />\n </>\n )}\n <NextCardBody\n data-testid={testId && `card_body_${testId}`}\n className={bodySlot({\n className: typeof className === 'object' && className.body,\n })}\n >\n {children}\n </NextCardBody>\n {footer && (\n <>\n <NextDivider\n className={dividerSlot({\n className: typeof className === 'object' && className.divider,\n })}\n />\n <NextCardFooter\n data-testid={testId && `card_footer_${testId}`}\n className={footerSlot({\n className: typeof className === 'object' && className.footer,\n })}\n >\n {footer}\n </NextCardFooter>\n </>\n )}\n </NextCard>\n );\n};\n\nexport default Card;\n"],"mappings":";AAGA;AAAA,EACE,QAAQ;AAAA,EACR,YAAY;AAAA,EACZ,cAAc;AAAA,EACd,cAAc;AAAA,OACT;AACP,SAAS,WAAW,mBAAmB;AACvC,OAAO,iBAAiB;AACxB,SAAS,UAAU;AA+DX,mBACE,KADF;AA7DR,IAAM,QAAQ,YAAY,gBAAgB;AAGnC,IAAM,eAAe,GAAG;AAAA,EAC7B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AACF,CAAC;AAuBD,IAAM,OAAO,CAAC;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,MAAiB;AACf,QAAM,QAAQ,EAAE,WAAW,OAAO,CAAC;AACnC,QAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV,IAAI,aAAa;AAEjB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,eAAa,UAAU,QAAQ,MAAM;AAAA,MACrC,WAAW,SAAS;AAAA,QAClB,WAAW,OAAO,cAAc,WAAW,UAAU,OAAO;AAAA,MAC9D,CAAC;AAAA,MACD,WAAS;AAAA,MACT,QAAO;AAAA,MACP,QAAO;AAAA,MAEN;AAAA,kBACC,iCACE;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,eAAa,UAAU,eAAe,MAAM;AAAA,cAC5C,WAAW,WAAW;AAAA,gBACpB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA,cAEA;AAAA;AAAA,UACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,YAAY;AAAA,gBACrB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA;AAAA,UACH;AAAA,WACF;AAAA,QAEF;AAAA,UAAC;AAAA;AAAA,YACC,eAAa,UAAU,aAAa,MAAM;AAAA,YAC1C,WAAW,SAAS;AAAA,cAClB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,YACxD,CAAC;AAAA,YAEA;AAAA;AAAA,QACH;AAAA,QACC,UACC,iCACE;AAAA;AAAA,YAAC;AAAA;AAAA,cACC,WAAW,YAAY;AAAA,gBACrB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA;AAAA,UACH;AAAA,UACA;AAAA,YAAC;AAAA;AAAA,cACC,eAAa,UAAU,eAAe,MAAM;AAAA,cAC5C,WAAW,WAAW;AAAA,gBACpB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA,cAEA;AAAA;AAAA,UACH;AAAA,WACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,eAAQ;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/Button/subcomponents/LoadingSpinner.tsx"],"sourcesContent":["/**\n * svg loading spinner for button\n * @see https://nextui.org/docs/components/button#loading\n * */\nexport default () => (\n <svg\n className=\"animate-spin h-5 w-5 text-current\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n"],"mappings":";AAKE,SAME,KANF;AADF,IAAO,yBAAQ,MACb;AAAA,EAAC;AAAA;AAAA,IACC,WAAU;AAAA,IACV,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,IAAG;AAAA,UACH,IAAG;AAAA,UACH,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA;AAAA,MACd;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA,UACF,MAAK;AAAA;AAAA,MACP;AAAA;AAAA;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Button/Button.tsx","../../../src/components/Button/subcomponents/LoadingSpinner.tsx"],"sourcesContent":["import type { ButtonProps as NextButtonProps } from '@nextui-org/button';\nimport type { ReactNode } from 'react';\n\nimport { Button as NextButton } from '@nextui-org/button';\nimport cn from 'classnames';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport interface ButtonProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | string[];\n /** next ui button color */\n color?: NextButtonProps['color'];\n /** disables function of the button. */\n disabled?: boolean;\n /** If set loading animation is shown */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** on click event */\n onClick?: NextButtonProps['onPress'];\n /** 3 size options */\n size?: NextButtonProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** sets the button type. */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** next ui button variants */\n variant?: NextButtonProps['variant'];\n}\n\n/**\n * Button component based on [NextUI Button](https://nextui.org/docs/components/button)\n */\nconst Button = ({\n ariaLabel = undefined,\n children = undefined,\n className = undefined,\n color = 'default',\n disabled = false,\n icon = undefined,\n loading = false,\n onClick = undefined,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n}: ButtonProps) => {\n return (\n <NextButton\n aria-label={ariaLabel}\n className={cn(className)}\n color={color}\n data-testid={testId}\n isDisabled={disabled}\n isIconOnly={!!(icon && !children)}\n isLoading={loading}\n onPress={onClick}\n size={size}\n spinner={<LoadingSpinner />}\n type={type}\n variant={variant}\n >\n {icon}\n {children}\n </NextButton>\n );\n};\n\nexport default Button;\n","/**\n * svg loading spinner for button\n * @see https://nextui.org/docs/components/button#loading\n * */\nexport default () => (\n <svg\n className=\"animate-spin h-5 w-5 text-current\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,oBAAqC;AACrC,wBAAe;;;ACCb;AADF,IAAO,yBAAQ,MACb;AAAA,EAAC;AAAA;AAAA,IACC,WAAU;AAAA,IACV,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,IAAG;AAAA,UACH,IAAG;AAAA,UACH,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA;AAAA,MACd;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA,UACF,MAAK;AAAA;AAAA,MACP;AAAA;AAAA;AACF;;;AD6BE,IAAAA,sBAAA;AAfJ,IAAM,SAAS,CAAC;AAAA,EACd,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AACZ,MAAmB;AACjB,SACE;AAAA,IAAC,cAAAC;AAAA,IAAA;AAAA,MACC,cAAY;AAAA,MACZ,eAAW,kBAAAC,SAAG,SAAS;AAAA,MACvB;AAAA,MACA,eAAa;AAAA,MACb,YAAY;AAAA,MACZ,YAAY,CAAC,EAAE,QAAQ,CAAC;AAAA,MACxB,WAAW;AAAA,MACX,SAAS;AAAA,MACT;AAAA,MACA,SAAS,6CAAC,0BAAe;AAAA,MACzB;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,iBAAQ;","names":["import_jsx_runtime","NextButton","cn"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Button/index.ts","../../../src/components/Button/Button.tsx","../../../src/components/Button/subcomponents/LoadingSpinner.tsx"],"sourcesContent":["import type { ButtonProps } from './Button';\n\nimport Button from './Button';\n\nexport default Button;\n\nexport type { ButtonProps };\n","import type { ButtonProps as NextButtonProps } from '@nextui-org/button';\nimport type { ReactNode } from 'react';\n\nimport { Button as NextButton } from '@nextui-org/button';\nimport cn from 'classnames';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport interface ButtonProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | string[];\n /** next ui button color */\n color?: NextButtonProps['color'];\n /** disables function of the button. */\n disabled?: boolean;\n /** If set loading animation is shown */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** on click event */\n onClick?: NextButtonProps['onPress'];\n /** 3 size options */\n size?: NextButtonProps['size'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** sets the button type. */\n type?: 'button' | 'submit' | 'reset' | undefined;\n /** next ui button variants */\n variant?: NextButtonProps['variant'];\n}\n\n/**\n * Button component based on [NextUI Button](https://nextui.org/docs/components/button)\n */\nconst Button = ({\n ariaLabel = undefined,\n children = undefined,\n className = undefined,\n color = 'default',\n disabled = false,\n icon = undefined,\n loading = false,\n onClick = undefined,\n size = undefined,\n testId = undefined,\n type = undefined,\n variant = 'solid',\n}: ButtonProps) => {\n return (\n <NextButton\n aria-label={ariaLabel}\n className={cn(className)}\n color={color}\n data-testid={testId}\n isDisabled={disabled}\n isIconOnly={!!(icon && !children)}\n isLoading={loading}\n onPress={onClick}\n size={size}\n spinner={<LoadingSpinner />}\n type={type}\n variant={variant}\n >\n {icon}\n {children}\n </NextButton>\n );\n};\n\nexport default Button;\n","/**\n * svg loading spinner for button\n * @see https://nextui.org/docs/components/button#loading\n * */\nexport default () => (\n <svg\n className=\"animate-spin h-5 w-5 text-current\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA;AAAA;;;ACGA,oBAAqC;AACrC,wBAAe;;;ACCb;AADF,IAAO,yBAAQ,MACb;AAAA,EAAC;AAAA;AAAA,IACC,WAAU;AAAA,IACV,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,IAAG;AAAA,UACH,IAAG;AAAA,UACH,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA;AAAA,MACd;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA,UACF,MAAK;AAAA;AAAA,MACP;AAAA;AAAA;AACF;;;AD6BE,IAAAC,sBAAA;AAfJ,IAAM,SAAS,CAAC;AAAA,EACd,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AACZ,MAAmB;AACjB,SACE;AAAA,IAAC,cAAAC;AAAA,IAAA;AAAA,MACC,cAAY;AAAA,MACZ,eAAW,kBAAAC,SAAG,SAAS;AAAA,MACvB;AAAA,MACA,eAAa;AAAA,MACb,YAAY;AAAA,MACZ,YAAY,CAAC,EAAE,QAAQ,CAAC;AAAA,MACxB,WAAW;AAAA,MACX,SAAS;AAAA,MACT;AAAA,MACA,SAAS,6CAAC,0BAAe;AAAA,MACzB;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,iBAAQ;;;ADrEf,IAAOC,kBAAQ;","names":["Button_default","import_jsx_runtime","NextButton","cn","Button_default"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Button/index.ts"],"sourcesContent":["import type { ButtonProps } from './Button';\n\nimport Button from './Button';\n\nexport default Button;\n\nexport type { ButtonProps };\n"],"mappings":";;;;;;AAIA,IAAOA,kBAAQ;","names":["Button_default"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/Button/subcomponents/LoadingSpinner.tsx"],"sourcesContent":["/**\n * svg loading spinner for button\n * @see https://nextui.org/docs/components/button#loading\n * */\nexport default () => (\n <svg\n className=\"animate-spin h-5 w-5 text-current\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <circle\n className=\"opacity-25\"\n cx=\"12\"\n cy=\"12\"\n r=\"10\"\n stroke=\"currentColor\"\n strokeWidth=\"4\"\n />\n <path\n className=\"opacity-75\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKE;AADF,IAAO,yBAAQ,MACb;AAAA,EAAC;AAAA;AAAA,IACC,WAAU;AAAA,IACV,MAAK;AAAA,IACL,SAAQ;AAAA,IACR,OAAM;AAAA,IAEN;AAAA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,IAAG;AAAA,UACH,IAAG;AAAA,UACH,GAAE;AAAA,UACF,QAAO;AAAA,UACP,aAAY;AAAA;AAAA,MACd;AAAA,MACA;AAAA,QAAC;AAAA;AAAA,UACC,WAAU;AAAA,UACV,GAAE;AAAA,UACF,MAAK;AAAA;AAAA,MACP;AAAA;AAAA;AACF;","names":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Card/Card.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type { VariantProps } from 'tailwind-variants';\n\nimport {\n Card as NextCard,\n CardBody as NextCardBody,\n CardFooter as NextCardFooter,\n CardHeader as NextCardHeader,\n} from '@nextui-org/card';\nimport { Divider as NextDivider } from '@nextui-org/divider';\nimport createDebug from 'debug';\nimport { tv } from 'tailwind-variants';\n\nconst debug = createDebug('component:Card');\n\n// card styling variants\nexport const cardVariants = tv({\n slots: {\n base: 'border border-slate-300',\n body: '',\n divider: 'my-0 bg-slate-300',\n footer: '',\n header: 'text-base font-semibold',\n },\n});\n\ntype CardVariantProps = VariantProps<typeof cardVariants>;\ntype CardVariantSlots = Partial<\n Record<keyof ReturnType<typeof cardVariants>, string>\n>;\n\nexport interface CardProps extends CardVariantProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | CardVariantSlots;\n /** footer content */\n footer?: ReactNode;\n /** header content */\n header?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * Card component based on [NextUI Card](https://nextui.org/docs/components/card)\n */\nconst Card = ({\n children = null,\n className = undefined,\n testId = undefined,\n header = undefined,\n footer = undefined,\n}: CardProps) => {\n debug('Card', { className, testId });\n const {\n base: baseSlot,\n body: bodySlot,\n divider: dividerSlot,\n footer: footerSlot,\n header: headerSlot,\n } = cardVariants();\n\n return (\n <NextCard\n data-testid={testId && `card_${testId}`}\n className={baseSlot({\n className: typeof className === 'object' ? className.base : className,\n })}\n fullWidth\n radius=\"sm\"\n shadow=\"none\"\n >\n {header && (\n <>\n <NextCardHeader\n data-testid={testId && `card_header_${testId}`}\n className={headerSlot({\n className: typeof className === 'object' && className.header,\n })}\n >\n {header}\n </NextCardHeader>\n <NextDivider\n className={dividerSlot({\n className: typeof className === 'object' && className.divider,\n })}\n />\n </>\n )}\n <NextCardBody\n data-testid={testId && `card_body_${testId}`}\n className={bodySlot({\n className: typeof className === 'object' && className.body,\n })}\n >\n {children}\n </NextCardBody>\n {footer && (\n <>\n <NextDivider\n className={dividerSlot({\n className: typeof className === 'object' && className.divider,\n })}\n />\n <NextCardFooter\n data-testid={testId && `card_footer_${testId}`}\n className={footerSlot({\n className: typeof className === 'object' && className.footer,\n })}\n >\n {footer}\n </NextCardFooter>\n </>\n )}\n </NextCard>\n );\n};\n\nexport default Card;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAKO;AACP,qBAAuC;AACvC,mBAAwB;AACxB,+BAAmB;AA+DX;AA7DR,IAAM,YAAQ,aAAAA,SAAY,gBAAgB;AAGnC,IAAM,mBAAe,6BAAG;AAAA,EAC7B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AACF,CAAC;AAuBD,IAAM,OAAO,CAAC;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,MAAiB;AACf,QAAM,QAAQ,EAAE,WAAW,OAAO,CAAC;AACnC,QAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV,IAAI,aAAa;AAEjB,SACE;AAAA,IAAC,YAAAC;AAAA,IAAA;AAAA,MACC,eAAa,UAAU,QAAQ,MAAM;AAAA,MACrC,WAAW,SAAS;AAAA,QAClB,WAAW,OAAO,cAAc,WAAW,UAAU,OAAO;AAAA,MAC9D,CAAC;AAAA,MACD,WAAS;AAAA,MACT,QAAO;AAAA,MACP,QAAO;AAAA,MAEN;AAAA,kBACC,4EACE;AAAA;AAAA,YAAC,YAAAC;AAAA,YAAA;AAAA,cACC,eAAa,UAAU,eAAe,MAAM;AAAA,cAC5C,WAAW,WAAW;AAAA,gBACpB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA,cAEA;AAAA;AAAA,UACH;AAAA,UACA;AAAA,YAAC,eAAAC;AAAA,YAAA;AAAA,cACC,WAAW,YAAY;AAAA,gBACrB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA;AAAA,UACH;AAAA,WACF;AAAA,QAEF;AAAA,UAAC,YAAAC;AAAA,UAAA;AAAA,YACC,eAAa,UAAU,aAAa,MAAM;AAAA,YAC1C,WAAW,SAAS;AAAA,cAClB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,YACxD,CAAC;AAAA,YAEA;AAAA;AAAA,QACH;AAAA,QACC,UACC,4EACE;AAAA;AAAA,YAAC,eAAAD;AAAA,YAAA;AAAA,cACC,WAAW,YAAY;AAAA,gBACrB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA;AAAA,UACH;AAAA,UACA;AAAA,YAAC,YAAAE;AAAA,YAAA;AAAA,cACC,eAAa,UAAU,eAAe,MAAM;AAAA,cAC5C,WAAW,WAAW;AAAA,gBACpB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA,cAEA;AAAA;AAAA,UACH;AAAA,WACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,eAAQ;","names":["createDebug","NextCard","NextCardHeader","NextDivider","NextCardBody","NextCardFooter"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Card/index.ts","../../../src/components/Card/Card.tsx"],"sourcesContent":["import Card from './Card';\n\nexport default Card;\n","import type { ReactNode } from 'react';\nimport type { VariantProps } from 'tailwind-variants';\n\nimport {\n Card as NextCard,\n CardBody as NextCardBody,\n CardFooter as NextCardFooter,\n CardHeader as NextCardHeader,\n} from '@nextui-org/card';\nimport { Divider as NextDivider } from '@nextui-org/divider';\nimport createDebug from 'debug';\nimport { tv } from 'tailwind-variants';\n\nconst debug = createDebug('component:Card');\n\n// card styling variants\nexport const cardVariants = tv({\n slots: {\n base: 'border border-slate-300',\n body: '',\n divider: 'my-0 bg-slate-300',\n footer: '',\n header: 'text-base font-semibold',\n },\n});\n\ntype CardVariantProps = VariantProps<typeof cardVariants>;\ntype CardVariantSlots = Partial<\n Record<keyof ReturnType<typeof cardVariants>, string>\n>;\n\nexport interface CardProps extends CardVariantProps {\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string | CardVariantSlots;\n /** footer content */\n footer?: ReactNode;\n /** header content */\n header?: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\n/**\n * Card component based on [NextUI Card](https://nextui.org/docs/components/card)\n */\nconst Card = ({\n children = null,\n className = undefined,\n testId = undefined,\n header = undefined,\n footer = undefined,\n}: CardProps) => {\n debug('Card', { className, testId });\n const {\n base: baseSlot,\n body: bodySlot,\n divider: dividerSlot,\n footer: footerSlot,\n header: headerSlot,\n } = cardVariants();\n\n return (\n <NextCard\n data-testid={testId && `card_${testId}`}\n className={baseSlot({\n className: typeof className === 'object' ? className.base : className,\n })}\n fullWidth\n radius=\"sm\"\n shadow=\"none\"\n >\n {header && (\n <>\n <NextCardHeader\n data-testid={testId && `card_header_${testId}`}\n className={headerSlot({\n className: typeof className === 'object' && className.header,\n })}\n >\n {header}\n </NextCardHeader>\n <NextDivider\n className={dividerSlot({\n className: typeof className === 'object' && className.divider,\n })}\n />\n </>\n )}\n <NextCardBody\n data-testid={testId && `card_body_${testId}`}\n className={bodySlot({\n className: typeof className === 'object' && className.body,\n })}\n >\n {children}\n </NextCardBody>\n {footer && (\n <>\n <NextDivider\n className={dividerSlot({\n className: typeof className === 'object' && className.divider,\n })}\n />\n <NextCardFooter\n data-testid={testId && `card_footer_${testId}`}\n className={footerSlot({\n className: typeof className === 'object' && className.footer,\n })}\n >\n {footer}\n </NextCardFooter>\n </>\n )}\n </NextCard>\n );\n};\n\nexport default Card;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA,iBAAAA;AAAA;AAAA;;;ACGA,kBAKO;AACP,qBAAuC;AACvC,mBAAwB;AACxB,+BAAmB;AA+DX;AA7DR,IAAM,YAAQ,aAAAC,SAAY,gBAAgB;AAGnC,IAAM,mBAAe,6BAAG;AAAA,EAC7B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV;AACF,CAAC;AAuBD,IAAM,OAAO,CAAC;AAAA,EACZ,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,SAAS;AAAA,EACT,SAAS;AAAA,EACT,SAAS;AACX,MAAiB;AACf,QAAM,QAAQ,EAAE,WAAW,OAAO,CAAC;AACnC,QAAM;AAAA,IACJ,MAAM;AAAA,IACN,MAAM;AAAA,IACN,SAAS;AAAA,IACT,QAAQ;AAAA,IACR,QAAQ;AAAA,EACV,IAAI,aAAa;AAEjB,SACE;AAAA,IAAC,YAAAC;AAAA,IAAA;AAAA,MACC,eAAa,UAAU,QAAQ,MAAM;AAAA,MACrC,WAAW,SAAS;AAAA,QAClB,WAAW,OAAO,cAAc,WAAW,UAAU,OAAO;AAAA,MAC9D,CAAC;AAAA,MACD,WAAS;AAAA,MACT,QAAO;AAAA,MACP,QAAO;AAAA,MAEN;AAAA,kBACC,4EACE;AAAA;AAAA,YAAC,YAAAC;AAAA,YAAA;AAAA,cACC,eAAa,UAAU,eAAe,MAAM;AAAA,cAC5C,WAAW,WAAW;AAAA,gBACpB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA,cAEA;AAAA;AAAA,UACH;AAAA,UACA;AAAA,YAAC,eAAAC;AAAA,YAAA;AAAA,cACC,WAAW,YAAY;AAAA,gBACrB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA;AAAA,UACH;AAAA,WACF;AAAA,QAEF;AAAA,UAAC,YAAAC;AAAA,UAAA;AAAA,YACC,eAAa,UAAU,aAAa,MAAM;AAAA,YAC1C,WAAW,SAAS;AAAA,cAClB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,YACxD,CAAC;AAAA,YAEA;AAAA;AAAA,QACH;AAAA,QACC,UACC,4EACE;AAAA;AAAA,YAAC,eAAAD;AAAA,YAAA;AAAA,cACC,WAAW,YAAY;AAAA,gBACrB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA;AAAA,UACH;AAAA,UACA;AAAA,YAAC,YAAAE;AAAA,YAAA;AAAA,cACC,eAAa,UAAU,eAAe,MAAM;AAAA,cAC5C,WAAW,WAAW;AAAA,gBACpB,WAAW,OAAO,cAAc,YAAY,UAAU;AAAA,cACxD,CAAC;AAAA,cAEA;AAAA;AAAA,UACH;AAAA,WACF;AAAA;AAAA;AAAA,EAEJ;AAEJ;AAEA,IAAO,eAAQ;;;ADrHf,IAAOC,gBAAQ;","names":["Card_default","createDebug","NextCard","NextCardHeader","NextDivider","NextCardBody","NextCardFooter","Card_default"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/Card/index.ts"],"sourcesContent":["import Card from './Card';\n\nexport default Card;\n"],"mappings":";;;;;AAEA,IAAOA,gBAAQ;","names":["Card_default"]}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|