@fuf-stack/pixels 1.7.4 → 1.9.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/Alert/index.cjs +2 -2
- package/dist/Alert/index.d.cts +2 -2
- package/dist/Alert/index.d.ts +2 -2
- package/dist/Alert/index.js +1 -1
- package/dist/{Alert-Dc0RSQaB.d.cts → Alert-CWjAMyih.d.cts} +45 -69
- package/dist/{Alert-Dc0RSQaB.d.ts → Alert-CWjAMyih.d.ts} +45 -69
- package/dist/Avatar/index.d.cts +3 -2
- package/dist/Avatar/index.d.ts +3 -2
- package/dist/{Avatar-DjZ3H25h.d.cts → Avatar-DTg6mH8E.d.cts} +19 -18
- package/dist/{Avatar-DjZ3H25h.d.ts → Avatar-DTg6mH8E.d.ts} +19 -18
- package/dist/AvatarGroup/index.d.cts +4 -3
- package/dist/AvatarGroup/index.d.ts +4 -3
- package/dist/{AvatarGroup-B1Tdw57Q.d.ts → AvatarGroup-9wz1iZH4.d.ts} +1 -1
- package/dist/{AvatarGroup-BujXZ7Vy.d.cts → AvatarGroup-BYAaERBV.d.cts} +1 -1
- package/dist/Badge/index.d.cts +3 -2
- package/dist/Badge/index.d.ts +3 -2
- package/dist/{Badge-L8r9mgSs.d.cts → Badge-DkO-EJif.d.cts} +10 -9
- package/dist/{Badge-L8r9mgSs.d.ts → Badge-DkO-EJif.d.ts} +10 -9
- package/dist/Breadcrumb/index.d.cts +3 -2
- package/dist/Breadcrumb/index.d.ts +3 -2
- package/dist/{Breadcrumb-Cvt5Xa5D.d.cts → Breadcrumb-CW1qsIoL.d.cts} +22 -21
- package/dist/{Breadcrumb-Cvt5Xa5D.d.ts → Breadcrumb-CW1qsIoL.d.ts} +22 -21
- package/dist/Card/index.d.cts +3 -2
- package/dist/Card/index.d.ts +3 -2
- package/dist/{Card-OBRZ-ssX.d.cts → Card-2AwIQqnR.d.cts} +19 -18
- package/dist/{Card-OBRZ-ssX.d.ts → Card-2AwIQqnR.d.ts} +19 -18
- package/dist/Drawer/index.d.cts +3 -2
- package/dist/Drawer/index.d.ts +3 -2
- package/dist/{Drawer-JpihbwKl.d.cts → Drawer-Bd7lsUl9.d.cts} +25 -24
- package/dist/{Drawer-JpihbwKl.d.ts → Drawer-Bd7lsUl9.d.ts} +25 -24
- package/dist/Menu/index.d.cts +3 -2
- package/dist/Menu/index.d.ts +3 -2
- package/dist/{Menu-CS28E7nM.d.cts → Menu-C9M_q1Z6.d.cts} +10 -9
- package/dist/{Menu-CS28E7nM.d.ts → Menu-C9M_q1Z6.d.ts} +10 -9
- package/dist/Popover/index.d.cts +3 -2
- package/dist/Popover/index.d.ts +3 -2
- package/dist/{Popover-Bf192yqn.d.cts → Popover-DKzS6RUP.d.cts} +28 -27
- package/dist/{Popover-Bf192yqn.d.ts → Popover-DKzS6RUP.d.ts} +28 -27
- package/dist/SearchInput/index.d.cts +16 -15
- package/dist/SearchInput/index.d.ts +16 -15
- package/dist/Tabs/index.d.cts +3 -2
- package/dist/Tabs/index.d.ts +3 -2
- package/dist/{Tabs-BjMJs02F.d.cts → Tabs-BM4tl_1j.d.cts} +25 -24
- package/dist/{Tabs-BjMJs02F.d.ts → Tabs-BM4tl_1j.d.ts} +25 -24
- package/dist/Toast/index.cjs +3 -6
- package/dist/Toast/index.cjs.map +1 -1
- package/dist/Toast/index.d.cts +6 -5
- package/dist/Toast/index.d.ts +6 -5
- package/dist/Toast/index.js +7 -10
- package/dist/Toaster-BtcILj3f.d.ts +79 -0
- package/dist/Toaster-D28PKRWz.d.cts +79 -0
- package/dist/chunk-I5QMH3J5.cjs +96 -0
- package/dist/chunk-I5QMH3J5.cjs.map +1 -0
- package/dist/chunk-SDZX5VJZ.js +96 -0
- package/dist/chunk-SDZX5VJZ.js.map +1 -0
- package/dist/chunk-VD7VRLYO.js +112 -0
- package/dist/chunk-VD7VRLYO.js.map +1 -0
- package/dist/chunk-YWEUUA52.cjs +112 -0
- package/dist/chunk-YWEUUA52.cjs.map +1 -0
- package/dist/index.cjs +3 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +13 -12
- package/dist/index.d.ts +13 -12
- package/dist/index.js +6 -10
- package/package.json +9 -8
- package/dist/ToastProvider-BaynjNgq.d.cts +0 -182
- package/dist/ToastProvider-BaynjNgq.d.ts +0 -182
- package/dist/chunk-565TFIAK.js +0 -135
- package/dist/chunk-565TFIAK.js.map +0 -1
- package/dist/chunk-56CIU4EG.cjs +0 -174
- package/dist/chunk-56CIU4EG.cjs.map +0 -1
- package/dist/chunk-7IFOMPCK.js +0 -174
- package/dist/chunk-7IFOMPCK.js.map +0 -1
- package/dist/chunk-K25U4BJO.cjs +0 -135
- package/dist/chunk-K25U4BJO.cjs.map +0 -1
package/dist/chunk-565TFIAK.js
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__spreadValues
|
|
3
|
-
} from "./chunk-OAIRL2FN.js";
|
|
4
|
-
|
|
5
|
-
// src/Alert/Alert.tsx
|
|
6
|
-
import { Alert as HeroAlert } from "@heroui/alert";
|
|
7
|
-
import { alert as heroAlertVariants } from "@heroui/theme";
|
|
8
|
-
import { tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
var alertVariants = tv({
|
|
11
|
-
slots: {
|
|
12
|
-
base: "",
|
|
13
|
-
title: "",
|
|
14
|
-
description: "",
|
|
15
|
-
mainWrapper: "",
|
|
16
|
-
closeButton: "",
|
|
17
|
-
iconWrapper: "",
|
|
18
|
-
alertIcon: ""
|
|
19
|
-
},
|
|
20
|
-
variants: {
|
|
21
|
-
// see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/alert.ts
|
|
22
|
-
color: __spreadValues({
|
|
23
|
-
info: {
|
|
24
|
-
mainWrapper: "text-inherit",
|
|
25
|
-
title: "text-inherit",
|
|
26
|
-
description: "text-inherit"
|
|
27
|
-
}
|
|
28
|
-
}, heroAlertVariants.variants.color),
|
|
29
|
-
variant: __spreadValues({}, heroAlertVariants.variants.variant),
|
|
30
|
-
sizeLimit: {
|
|
31
|
-
height: {
|
|
32
|
-
base: "max-h-[150px] overflow-y-auto overflow-x-hidden"
|
|
33
|
-
},
|
|
34
|
-
width: {
|
|
35
|
-
base: "max-w-[480px] overflow-x-auto overflow-y-hidden"
|
|
36
|
-
},
|
|
37
|
-
both: {
|
|
38
|
-
base: "max-h-[150px] max-w-[480px] overflow-y-auto overflow-x-hidden"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
compoundVariants: [
|
|
43
|
-
...heroAlertVariants.compoundVariants,
|
|
44
|
-
{
|
|
45
|
-
color: "info",
|
|
46
|
-
variant: "solid",
|
|
47
|
-
className: {
|
|
48
|
-
base: "bg-info text-info-foreground",
|
|
49
|
-
alertIcon: "text-info-foreground",
|
|
50
|
-
closeButton: "text-inherit"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
color: "info",
|
|
55
|
-
variant: "flat",
|
|
56
|
-
className: {
|
|
57
|
-
alertIcon: "fill-current",
|
|
58
|
-
base: "dark:bg-info-50/50 bg-info-50 text-info-600",
|
|
59
|
-
closeButton: "text-info-500 data-[hover]:bg-info-200",
|
|
60
|
-
iconWrapper: "border-info-100 bg-info-50 dark:bg-info-100"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
color: "info",
|
|
65
|
-
variant: "faded",
|
|
66
|
-
className: {
|
|
67
|
-
alertIcon: "fill-current",
|
|
68
|
-
base: "dark:bg-info-50/50 border-small border-info-200 bg-info-50 text-info-600 dark:border-info-100",
|
|
69
|
-
closeButton: "text-info-500 data-[hover]:bg-info-200",
|
|
70
|
-
iconWrapper: "border-info-100 bg-info-50 dark:bg-info-100"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
color: "info",
|
|
75
|
-
variant: "bordered",
|
|
76
|
-
className: {
|
|
77
|
-
alertIcon: "fill-current",
|
|
78
|
-
base: "border-small border-info text-info",
|
|
79
|
-
closeButton: "text-info-500 data-[hover]:bg-info-200",
|
|
80
|
-
iconWrapper: "bg-info-100 dark:bg-info-50"
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
});
|
|
85
|
-
var Alert = ({
|
|
86
|
-
children = void 0,
|
|
87
|
-
className = void 0,
|
|
88
|
-
color = "primary",
|
|
89
|
-
endContent = void 0,
|
|
90
|
-
icon = void 0,
|
|
91
|
-
isClosable = false,
|
|
92
|
-
onClose = void 0,
|
|
93
|
-
sizeLimit = void 0,
|
|
94
|
-
showIcon = true,
|
|
95
|
-
testId = void 0,
|
|
96
|
-
title = void 0,
|
|
97
|
-
variant = "solid"
|
|
98
|
-
}) => {
|
|
99
|
-
const variants = alertVariants({
|
|
100
|
-
color,
|
|
101
|
-
variant,
|
|
102
|
-
sizeLimit
|
|
103
|
-
});
|
|
104
|
-
const classNames = variantsToClassNames(variants, className, "base");
|
|
105
|
-
const heroColor = Object.keys(heroAlertVariants.variants.color).includes(
|
|
106
|
-
color
|
|
107
|
-
) ? color : void 0;
|
|
108
|
-
return /* @__PURE__ */ jsx(
|
|
109
|
-
HeroAlert,
|
|
110
|
-
{
|
|
111
|
-
classNames,
|
|
112
|
-
color: heroColor,
|
|
113
|
-
"data-testid": testId,
|
|
114
|
-
description: title ? children : void 0,
|
|
115
|
-
endContent,
|
|
116
|
-
hideIcon: !showIcon,
|
|
117
|
-
icon,
|
|
118
|
-
isClosable,
|
|
119
|
-
onClose,
|
|
120
|
-
title: title != null ? title : children,
|
|
121
|
-
variant
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
};
|
|
125
|
-
var Alert_default = Alert;
|
|
126
|
-
|
|
127
|
-
// src/Alert/index.ts
|
|
128
|
-
var Alert_default2 = Alert_default;
|
|
129
|
-
|
|
130
|
-
export {
|
|
131
|
-
alertVariants,
|
|
132
|
-
Alert_default,
|
|
133
|
-
Alert_default2
|
|
134
|
-
};
|
|
135
|
-
//# sourceMappingURL=chunk-565TFIAK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Alert/Alert.tsx","../src/Alert/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { AlertProps as HeroAlertProps } from '@heroui/alert';\nimport type { ReactNode } from 'react';\n\nimport { Alert as HeroAlert } from '@heroui/alert';\nimport { alert as heroAlertVariants } from '@heroui/theme';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nexport const alertVariants = tv({\n slots: {\n base: '',\n title: '',\n description: '',\n mainWrapper: '',\n closeButton: '',\n iconWrapper: '',\n alertIcon: '',\n },\n variants: {\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/alert.ts\n color: {\n info: {\n mainWrapper: 'text-inherit',\n title: 'text-inherit',\n description: 'text-inherit',\n },\n ...heroAlertVariants.variants.color,\n },\n variant: {\n ...heroAlertVariants.variants.variant,\n },\n sizeLimit: {\n height: {\n base: 'max-h-[150px] overflow-y-auto overflow-x-hidden',\n },\n width: {\n base: 'max-w-[480px] overflow-x-auto overflow-y-hidden',\n },\n both: {\n base: 'max-h-[150px] max-w-[480px] overflow-y-auto overflow-x-hidden',\n },\n },\n },\n compoundVariants: [\n ...heroAlertVariants.compoundVariants,\n {\n color: 'info',\n variant: 'solid',\n className: {\n base: 'bg-info text-info-foreground',\n alertIcon: 'text-info-foreground',\n closeButton: 'text-inherit',\n },\n },\n {\n color: 'info',\n variant: 'flat',\n className: {\n alertIcon: 'fill-current',\n base: 'dark:bg-info-50/50 bg-info-50 text-info-600',\n closeButton: 'text-info-500 data-[hover]:bg-info-200',\n iconWrapper: 'border-info-100 bg-info-50 dark:bg-info-100',\n },\n },\n {\n color: 'info',\n variant: 'faded',\n className: {\n alertIcon: 'fill-current',\n base: 'dark:bg-info-50/50 border-small border-info-200 bg-info-50 text-info-600 dark:border-info-100',\n closeButton: 'text-info-500 data-[hover]:bg-info-200',\n iconWrapper: 'border-info-100 bg-info-50 dark:bg-info-100',\n },\n },\n {\n color: 'info',\n variant: 'bordered',\n className: {\n alertIcon: 'fill-current',\n base: 'border-small border-info text-info',\n closeButton: 'text-info-500 data-[hover]:bg-info-200',\n iconWrapper: 'bg-info-100 dark:bg-info-50',\n },\n },\n ],\n});\n\nexport type VariantProps = TVProps<typeof alertVariants>;\ntype ClassName = TVClassName<typeof alertVariants>;\n\nexport interface AlertProps extends VariantProps {\n /** Content displayed inside the Alert if no description is given! */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Color scheme of the Alert */\n color?: VariantProps['color'];\n /** Content displayed at the end of the Alert */\n endContent?: ReactNode;\n /** Icon displayed at the start of the Alert */\n icon?: ReactNode;\n /** Whether the Alert can be closed */\n isClosable?: boolean;\n /** Callback fired when the close button is clicked */\n onClose?: () => void;\n /** Whether to show the icon at the start */\n showIcon?: boolean;\n /** limit height to 150px or width to 480px or both */\n sizeLimit?: VariantProps['sizeLimit'];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Title displayed in the Alert above the content */\n title?: ReactNode;\n /** Style variant of the Alert */\n variant?: VariantProps['variant'];\n}\n\n/**\n * Alert component based on [HeroUI Alert](https://www.heroui.com//docs/components/alert)\n */\nconst Alert = ({\n children = undefined,\n className = undefined,\n color = 'primary',\n endContent = undefined,\n icon = undefined,\n isClosable = false,\n onClose = undefined,\n sizeLimit = undefined,\n showIcon = true,\n testId = undefined,\n title = undefined,\n variant = 'solid',\n}: AlertProps) => {\n const variants = alertVariants({\n color,\n variant,\n sizeLimit,\n });\n const classNames = variantsToClassNames(variants, className, 'base');\n\n // pass color prop for heroui colors\n const heroColor = Object.keys(heroAlertVariants.variants.color).includes(\n color,\n )\n ? (color as HeroAlertProps['color'])\n : undefined;\n\n return (\n <HeroAlert\n classNames={classNames}\n color={heroColor}\n data-testid={testId}\n description={title ? children : undefined}\n endContent={endContent}\n hideIcon={!showIcon}\n icon={icon}\n isClosable={isClosable}\n onClose={onClose}\n title={(title ?? children) as string}\n variant={variant}\n />\n );\n};\n\nexport default Alert;\n","import Alert, { alertVariants } from './Alert';\n\nexport type { AlertProps } from './Alert';\n\nexport { Alert, alertVariants };\n\nexport default Alert;\n"],"mappings":";;;;;AAIA,SAAS,SAAS,iBAAiB;AACnC,SAAS,SAAS,yBAAyB;AAE3C,SAAS,IAAI,4BAA4B;AA+IrC;AA7IG,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,aAAa;AAAA,IACb,aAAa;AAAA,IACb,aAAa;AAAA,IACb,WAAW;AAAA,EACb;AAAA,EACA,UAAU;AAAA;AAAA,IAER,OAAO;AAAA,MACL,MAAM;AAAA,QACJ,aAAa;AAAA,QACb,OAAO;AAAA,QACP,aAAa;AAAA,MACf;AAAA,OACG,kBAAkB,SAAS;AAAA,IAEhC,SAAS,mBACJ,kBAAkB,SAAS;AAAA,IAEhC,WAAW;AAAA,MACT,QAAQ;AAAA,QACN,MAAM;AAAA,MACR;AAAA,MACA,OAAO;AAAA,QACL,MAAM;AAAA,MACR;AAAA,MACA,MAAM;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAAA,EACA,kBAAkB;AAAA,IAChB,GAAG,kBAAkB;AAAA,IACrB;AAAA,MACE,OAAO;AAAA,MACP,SAAS;AAAA,MACT,WAAW;AAAA,QACT,MAAM;AAAA,QACN,WAAW;AAAA,QACX,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,SAAS;AAAA,MACT,WAAW;AAAA,QACT,WAAW;AAAA,QACX,MAAM;AAAA,QACN,aAAa;AAAA,QACb,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,SAAS;AAAA,MACT,WAAW;AAAA,QACT,WAAW;AAAA,QACX,MAAM;AAAA,QACN,aAAa;AAAA,QACb,aAAa;AAAA,MACf;AAAA,IACF;AAAA,IACA;AAAA,MACE,OAAO;AAAA,MACP,SAAS;AAAA,MACT,WAAW;AAAA,QACT,WAAW;AAAA,QACX,MAAM;AAAA,QACN,aAAa;AAAA,QACb,aAAa;AAAA,MACf;AAAA,IACF;AAAA,EACF;AACF,CAAC;AAmCD,IAAM,QAAQ,CAAC;AAAA,EACb,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,OAAO;AAAA,EACP,aAAa;AAAA,EACb,UAAU;AAAA,EACV,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,UAAU;AACZ,MAAkB;AAChB,QAAM,WAAW,cAAc;AAAA,IAC7B;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACD,QAAM,aAAa,qBAAqB,UAAU,WAAW,MAAM;AAGnE,QAAM,YAAY,OAAO,KAAK,kBAAkB,SAAS,KAAK,EAAE;AAAA,IAC9D;AAAA,EACF,IACK,QACD;AAEJ,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA,OAAO;AAAA,MACP,eAAa;AAAA,MACb,aAAa,QAAQ,WAAW;AAAA,MAChC;AAAA,MACA,UAAU,CAAC;AAAA,MACX;AAAA,MACA;AAAA,MACA;AAAA,MACA,OAAQ,wBAAS;AAAA,MACjB;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ;;;AChKf,IAAOA,iBAAQ;","names":["Alert_default"]}
|
package/dist/chunk-56CIU4EG.cjs
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkAHEA4IJVcjs = require('./chunk-AHEA4IJV.cjs');
|
|
5
|
-
|
|
6
|
-
// src/Toast/index.ts
|
|
7
|
-
var _toast = require('@heroui/toast');
|
|
8
|
-
|
|
9
|
-
// src/Toast/addToast.tsx
|
|
10
|
-
var _theme = require('@heroui/theme');
|
|
11
|
-
|
|
12
|
-
var _pixelutils = require('@fuf-stack/pixel-utils');
|
|
13
|
-
var toastVariants = _pixelutils.tv.call(void 0, {
|
|
14
|
-
slots: {
|
|
15
|
-
base: "",
|
|
16
|
-
title: "",
|
|
17
|
-
description: "",
|
|
18
|
-
icon: "",
|
|
19
|
-
loadingComponent: "",
|
|
20
|
-
content: "",
|
|
21
|
-
motionDiv: "",
|
|
22
|
-
progressTrack: "",
|
|
23
|
-
progressIndicator: "",
|
|
24
|
-
closeButton: "",
|
|
25
|
-
closeIcon: ""
|
|
26
|
-
},
|
|
27
|
-
variants: {
|
|
28
|
-
// see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/toast.ts
|
|
29
|
-
color: _chunkAHEA4IJVcjs.__spreadValues.call(void 0, {
|
|
30
|
-
info: {}
|
|
31
|
-
}, _theme.toast.variants.color),
|
|
32
|
-
variant: _chunkAHEA4IJVcjs.__spreadValues.call(void 0, {}, _theme.toast.variants.variant)
|
|
33
|
-
},
|
|
34
|
-
compoundVariants: [
|
|
35
|
-
..._theme.toast.compoundVariants,
|
|
36
|
-
{
|
|
37
|
-
variant: "solid",
|
|
38
|
-
color: "info",
|
|
39
|
-
className: {
|
|
40
|
-
base: "bg-info text-info-foreground",
|
|
41
|
-
title: "text-info-foreground",
|
|
42
|
-
description: "text-info-foreground",
|
|
43
|
-
icon: "text-info-foreground",
|
|
44
|
-
closeIcon: "border-info-400 bg-info-100",
|
|
45
|
-
closeButton: "text-info-400 hover:text-info-600",
|
|
46
|
-
progressIndicator: "bg-info-400"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
color: "info",
|
|
51
|
-
variant: "flat",
|
|
52
|
-
className: {
|
|
53
|
-
base: "dark:bg-info-50/50 bg-info-50 text-info-600",
|
|
54
|
-
title: "text-info-600",
|
|
55
|
-
description: "text-info-500",
|
|
56
|
-
icon: "text-info-600",
|
|
57
|
-
closeIcon: "border-info-400 bg-info-100",
|
|
58
|
-
closeButton: "text-info-400 hover:text-info-600",
|
|
59
|
-
progressIndicator: "bg-info-400"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
color: "info",
|
|
64
|
-
variant: "bordered",
|
|
65
|
-
className: {
|
|
66
|
-
base: "border-small border-info text-info-600",
|
|
67
|
-
title: "text-info-600",
|
|
68
|
-
description: "text-info-500",
|
|
69
|
-
icon: "text-info-600",
|
|
70
|
-
closeIcon: "border-info-400 bg-info-100",
|
|
71
|
-
closeButton: "text-info-400 hover:text-info-600",
|
|
72
|
-
progressIndicator: "bg-info-400"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
});
|
|
77
|
-
var addToast = ({
|
|
78
|
-
className = void 0,
|
|
79
|
-
closeIcon = void 0,
|
|
80
|
-
color = "default",
|
|
81
|
-
description = void 0,
|
|
82
|
-
endContent = void 0,
|
|
83
|
-
icon = void 0,
|
|
84
|
-
loadingComponent = void 0,
|
|
85
|
-
onClose = void 0,
|
|
86
|
-
promise = void 0,
|
|
87
|
-
shouldShowTimeoutProgress = false,
|
|
88
|
-
showCloseButton = true,
|
|
89
|
-
showIcon = true,
|
|
90
|
-
timeout = 5e3,
|
|
91
|
-
title = void 0,
|
|
92
|
-
variant = "bordered"
|
|
93
|
-
}) => {
|
|
94
|
-
const variants = toastVariants({
|
|
95
|
-
color,
|
|
96
|
-
variant
|
|
97
|
-
});
|
|
98
|
-
const isHeroUIColor = Object.keys(_theme.toast.variants.color).includes(
|
|
99
|
-
color
|
|
100
|
-
);
|
|
101
|
-
const classNames = _pixelutils.variantsToClassNames.call(void 0, variants, className, "base");
|
|
102
|
-
_toast.addToast.call(void 0, {
|
|
103
|
-
classNames,
|
|
104
|
-
closeIcon,
|
|
105
|
-
color: isHeroUIColor ? color : void 0,
|
|
106
|
-
// TODO: 'data-testid': testId,
|
|
107
|
-
description,
|
|
108
|
-
endContent,
|
|
109
|
-
hideCloseButton: !showCloseButton,
|
|
110
|
-
hideIcon: !showIcon,
|
|
111
|
-
icon,
|
|
112
|
-
loadingComponent,
|
|
113
|
-
onClose,
|
|
114
|
-
promise,
|
|
115
|
-
shouldShowTimeoutProgress,
|
|
116
|
-
timeout,
|
|
117
|
-
title,
|
|
118
|
-
variant
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
// src/Toast/ToastProvider.tsx
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
127
|
-
var ToastProvider = ({
|
|
128
|
-
disableAnimation = false,
|
|
129
|
-
maxVisibleToasts = 5,
|
|
130
|
-
placement = "top-center",
|
|
131
|
-
toastProps = void 0,
|
|
132
|
-
toastOffset = 26,
|
|
133
|
-
regionProps = void 0
|
|
134
|
-
}) => {
|
|
135
|
-
const variants = toastVariants({
|
|
136
|
-
color: toastProps == null ? void 0 : toastProps.color,
|
|
137
|
-
variant: toastProps == null ? void 0 : toastProps.variant
|
|
138
|
-
});
|
|
139
|
-
const isHeroUIColor = Object.keys(_theme.toast.variants.color).includes(
|
|
140
|
-
(toastProps == null ? void 0 : toastProps.color) || ""
|
|
141
|
-
);
|
|
142
|
-
const classNames = _pixelutils.variantsToClassNames.call(void 0,
|
|
143
|
-
variants,
|
|
144
|
-
toastProps == null ? void 0 : toastProps.className,
|
|
145
|
-
"base"
|
|
146
|
-
);
|
|
147
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
148
|
-
_toast.ToastProvider,
|
|
149
|
-
{
|
|
150
|
-
disableAnimation,
|
|
151
|
-
maxVisibleToasts,
|
|
152
|
-
placement,
|
|
153
|
-
regionProps,
|
|
154
|
-
toastOffset,
|
|
155
|
-
toastProps: _chunkAHEA4IJVcjs.__spreadProps.call(void 0, _chunkAHEA4IJVcjs.__spreadValues.call(void 0, {}, toastProps), {
|
|
156
|
-
classNames,
|
|
157
|
-
color: isHeroUIColor ? toastProps == null ? void 0 : toastProps.color : void 0
|
|
158
|
-
})
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
};
|
|
162
|
-
var ToastProvider_default = ToastProvider;
|
|
163
|
-
|
|
164
|
-
// src/Toast/index.ts
|
|
165
|
-
var Toast_default = addToast;
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
exports.toastVariants = toastVariants; exports.addToast = addToast; exports.ToastProvider_default = ToastProvider_default; exports.Toast = _toast.Toast; exports.Toast_default = Toast_default;
|
|
174
|
-
//# sourceMappingURL=chunk-56CIU4EG.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-56CIU4EG.cjs","../src/Toast/index.ts","../src/Toast/addToast.tsx","../src/Toast/ToastProvider.tsx"],"names":["heroToastVariants","variantsToClassNames"],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;ACLA,sCAAsB;ADOtB;AACA;AEJA,sCAA2C;AAC3C;AAEA,oDAAyC;AAElC,IAAM,cAAA,EAAgB,4BAAA;AAAG,EAC9B,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,EAAA;AAAA,IACN,KAAA,EAAO,EAAA;AAAA,IACP,WAAA,EAAa,EAAA;AAAA,IACb,IAAA,EAAM,EAAA;AAAA,IACN,gBAAA,EAAkB,EAAA;AAAA,IAClB,OAAA,EAAS,EAAA;AAAA,IACT,SAAA,EAAW,EAAA;AAAA,IACX,aAAA,EAAe,EAAA;AAAA,IACf,iBAAA,EAAmB,EAAA;AAAA,IACnB,WAAA,EAAa,EAAA;AAAA,IACb,SAAA,EAAW;AAAA,EACb,CAAA;AAAA,EAC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cAAA,EACF,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,MAAA,EACb,KAAA;AAAA,MACN,CAAA;AAAA,IAAA;AAAA,EACF,CAAA;AAEJ,CAAA;AAEA,IAAO,sBAAA,EAAQ,aAAA;AH0Ff;AACA;ACzJA,IAAO,cAAA,EAAQ,QAAA;AD2Jf;AACA;AACE;AACA;AACA;AACA;AACA;AACF,+LAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-56CIU4EG.cjs","sourcesContent":[null,"import { Toast } from '@heroui/toast';\n\nimport { addToast, toastVariants } from './addToast';\nimport ToastProvider from './ToastProvider';\n\nexport type { ToastProps, AddToastVariantProps } from './addToast';\nexport type { ToastProviderProps } from './ToastProvider';\n\nexport { addToast, Toast, ToastProvider, toastVariants };\n\nexport default addToast;\n","import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ToastProps as HeroToastProps } from '@heroui/toast';\nimport type { ReactNode } from 'react';\n\nimport { toast as heroToastVariants } from '@heroui/theme';\nimport { addToast as heroAddToast } from '@heroui/toast';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nexport const toastVariants = tv({\n slots: {\n base: '',\n title: '',\n description: '',\n icon: '',\n loadingComponent: '',\n content: '',\n motionDiv: '',\n progressTrack: '',\n progressIndicator: '',\n closeButton: '',\n closeIcon: '',\n },\n variants: {\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/toast.ts\n color: {\n info: {},\n ...heroToastVariants.variants.color,\n },\n variant: {\n ...heroToastVariants.variants.variant,\n },\n },\n compoundVariants: [\n ...heroToastVariants.compoundVariants,\n {\n variant: 'solid',\n color: 'info',\n className: {\n base: 'bg-info text-info-foreground',\n title: 'text-info-foreground',\n description: 'text-info-foreground',\n icon: 'text-info-foreground',\n closeIcon: 'border-info-400 bg-info-100',\n closeButton: 'text-info-400 hover:text-info-600',\n progressIndicator: 'bg-info-400',\n },\n },\n {\n color: 'info',\n variant: 'flat',\n className: {\n base: 'dark:bg-info-50/50 bg-info-50 text-info-600',\n title: 'text-info-600',\n description: 'text-info-500',\n icon: 'text-info-600',\n closeIcon: 'border-info-400 bg-info-100',\n closeButton: 'text-info-400 hover:text-info-600',\n progressIndicator: 'bg-info-400',\n },\n },\n\n {\n color: 'info',\n variant: 'bordered',\n className: {\n base: 'border-small border-info text-info-600',\n title: 'text-info-600',\n description: 'text-info-500',\n icon: 'text-info-600',\n closeIcon: 'border-info-400 bg-info-100',\n closeButton: 'text-info-400 hover:text-info-600',\n progressIndicator: 'bg-info-400',\n },\n },\n ],\n});\n\nexport type AddToastVariantProps = TVProps<typeof toastVariants>;\ntype ClassName = TVClassName<typeof toastVariants>;\n\nexport interface ToastProps extends AddToastVariantProps {\n /** CSS class name */\n className?: ClassName;\n /** Icon displayed at the end of the Alert */\n closeIcon?: ReactNode;\n /** Color of the alert */\n color?: AddToastVariantProps['color'];\n /** Content displayed inside the Alert */\n description?: ReactNode;\n /** Content displayed at the end of the Alert */\n endContent?: ReactNode;\n /** Icon displayed at the start of the Alert */\n icon?: ReactNode;\n /** Component displayed until promise is resolved */\n loadingComponent?: ReactNode;\n /** Callback function called when the toast is closed */\n onClose?: () => void;\n /** Promise based on which the notification will be styled */\n promise?: Promise<void>;\n /** Whether the toast should show a progress bar */\n shouldShowTimeoutProgress?: boolean;\n /** Whether the toast should show a close button */\n showCloseButton?: boolean;\n /** Whether the toast should show an icon */\n showIcon?: boolean;\n /** Time the toast is displayed */\n timeout?: number;\n /** Content displayed at the top of the toast */\n title?: ReactNode;\n /** Variant of the toast */\n variant?: AddToastVariantProps['variant'];\n}\n\n/**\n * addToast function based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)\n */\nexport const addToast = ({\n className = undefined,\n closeIcon = undefined,\n color = 'default',\n description = undefined,\n endContent = undefined,\n icon = undefined,\n loadingComponent = undefined,\n onClose = undefined,\n promise = undefined,\n shouldShowTimeoutProgress = false,\n showCloseButton = true,\n showIcon = true,\n timeout = 5000,\n title = undefined,\n variant = 'bordered',\n}: ToastProps) => {\n const variants = toastVariants({\n color,\n variant,\n });\n const isHeroUIColor = Object.keys(heroToastVariants.variants.color).includes(\n color,\n );\n const classNames = variantsToClassNames(variants, className, 'base');\n\n heroAddToast({\n classNames,\n closeIcon,\n color: isHeroUIColor ? (color as HeroToastProps['color']) : undefined,\n // TODO: 'data-testid': testId,\n description,\n endContent,\n hideCloseButton: !showCloseButton,\n hideIcon: !showIcon,\n icon,\n loadingComponent,\n onClose,\n promise,\n shouldShowTimeoutProgress,\n timeout,\n title,\n variant,\n });\n};\n\nexport default addToast;\n","import type { ToastProps as HeroToastProps } from '@heroui/toast';\nimport type { ToastProps } from './addToast';\n\nimport { toast as heroToastVariants } from '@heroui/theme';\nimport { ToastProvider as HeroToastProvider } from '@heroui/toast';\n\nimport { variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { toastVariants } from './addToast';\n\nexport type ToastProviderToastProps = Omit<\n ToastProps,\n 'description' | 'endContent' | 'title'\n>;\n\nexport interface ToastProviderProps {\n disableAnimation?: boolean;\n maxVisibleToasts?: number;\n placement?:\n | 'bottom-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'top-right'\n | 'top-left'\n | 'top-center';\n\n toastProps?: ToastProviderToastProps;\n toastOffset?: number;\n regionProps?: { classNames?: Record<'base', string> };\n}\n\n/**\n * ToastProvider component based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)\n */\nconst ToastProvider = ({\n disableAnimation = false,\n maxVisibleToasts = 5,\n placement = 'top-center',\n toastProps = undefined,\n toastOffset = 26,\n regionProps = undefined,\n}: ToastProviderProps) => {\n const variants = toastVariants({\n color: toastProps?.color,\n variant: toastProps?.variant,\n });\n const isHeroUIColor = Object.keys(heroToastVariants.variants.color).includes(\n toastProps?.color || '',\n );\n const classNames = variantsToClassNames(\n variants,\n toastProps?.className,\n 'base',\n );\n return (\n <HeroToastProvider\n disableAnimation={disableAnimation}\n maxVisibleToasts={maxVisibleToasts}\n placement={placement}\n regionProps={regionProps}\n toastOffset={toastOffset}\n toastProps={{\n ...toastProps,\n classNames,\n color: isHeroUIColor\n ? (toastProps?.color as HeroToastProps['color'])\n : undefined,\n }}\n />\n );\n};\n\nexport default ToastProvider;\n"]}
|
package/dist/chunk-7IFOMPCK.js
DELETED
|
@@ -1,174 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__spreadProps,
|
|
3
|
-
__spreadValues
|
|
4
|
-
} from "./chunk-OAIRL2FN.js";
|
|
5
|
-
|
|
6
|
-
// src/Toast/index.ts
|
|
7
|
-
import { Toast } from "@heroui/toast";
|
|
8
|
-
|
|
9
|
-
// src/Toast/addToast.tsx
|
|
10
|
-
import { toast as heroToastVariants } from "@heroui/theme";
|
|
11
|
-
import { addToast as heroAddToast } from "@heroui/toast";
|
|
12
|
-
import { tv, variantsToClassNames } from "@fuf-stack/pixel-utils";
|
|
13
|
-
var toastVariants = tv({
|
|
14
|
-
slots: {
|
|
15
|
-
base: "",
|
|
16
|
-
title: "",
|
|
17
|
-
description: "",
|
|
18
|
-
icon: "",
|
|
19
|
-
loadingComponent: "",
|
|
20
|
-
content: "",
|
|
21
|
-
motionDiv: "",
|
|
22
|
-
progressTrack: "",
|
|
23
|
-
progressIndicator: "",
|
|
24
|
-
closeButton: "",
|
|
25
|
-
closeIcon: ""
|
|
26
|
-
},
|
|
27
|
-
variants: {
|
|
28
|
-
// see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/toast.ts
|
|
29
|
-
color: __spreadValues({
|
|
30
|
-
info: {}
|
|
31
|
-
}, heroToastVariants.variants.color),
|
|
32
|
-
variant: __spreadValues({}, heroToastVariants.variants.variant)
|
|
33
|
-
},
|
|
34
|
-
compoundVariants: [
|
|
35
|
-
...heroToastVariants.compoundVariants,
|
|
36
|
-
{
|
|
37
|
-
variant: "solid",
|
|
38
|
-
color: "info",
|
|
39
|
-
className: {
|
|
40
|
-
base: "bg-info text-info-foreground",
|
|
41
|
-
title: "text-info-foreground",
|
|
42
|
-
description: "text-info-foreground",
|
|
43
|
-
icon: "text-info-foreground",
|
|
44
|
-
closeIcon: "border-info-400 bg-info-100",
|
|
45
|
-
closeButton: "text-info-400 hover:text-info-600",
|
|
46
|
-
progressIndicator: "bg-info-400"
|
|
47
|
-
}
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
color: "info",
|
|
51
|
-
variant: "flat",
|
|
52
|
-
className: {
|
|
53
|
-
base: "dark:bg-info-50/50 bg-info-50 text-info-600",
|
|
54
|
-
title: "text-info-600",
|
|
55
|
-
description: "text-info-500",
|
|
56
|
-
icon: "text-info-600",
|
|
57
|
-
closeIcon: "border-info-400 bg-info-100",
|
|
58
|
-
closeButton: "text-info-400 hover:text-info-600",
|
|
59
|
-
progressIndicator: "bg-info-400"
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
{
|
|
63
|
-
color: "info",
|
|
64
|
-
variant: "bordered",
|
|
65
|
-
className: {
|
|
66
|
-
base: "border-small border-info text-info-600",
|
|
67
|
-
title: "text-info-600",
|
|
68
|
-
description: "text-info-500",
|
|
69
|
-
icon: "text-info-600",
|
|
70
|
-
closeIcon: "border-info-400 bg-info-100",
|
|
71
|
-
closeButton: "text-info-400 hover:text-info-600",
|
|
72
|
-
progressIndicator: "bg-info-400"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
]
|
|
76
|
-
});
|
|
77
|
-
var addToast = ({
|
|
78
|
-
className = void 0,
|
|
79
|
-
closeIcon = void 0,
|
|
80
|
-
color = "default",
|
|
81
|
-
description = void 0,
|
|
82
|
-
endContent = void 0,
|
|
83
|
-
icon = void 0,
|
|
84
|
-
loadingComponent = void 0,
|
|
85
|
-
onClose = void 0,
|
|
86
|
-
promise = void 0,
|
|
87
|
-
shouldShowTimeoutProgress = false,
|
|
88
|
-
showCloseButton = true,
|
|
89
|
-
showIcon = true,
|
|
90
|
-
timeout = 5e3,
|
|
91
|
-
title = void 0,
|
|
92
|
-
variant = "bordered"
|
|
93
|
-
}) => {
|
|
94
|
-
const variants = toastVariants({
|
|
95
|
-
color,
|
|
96
|
-
variant
|
|
97
|
-
});
|
|
98
|
-
const isHeroUIColor = Object.keys(heroToastVariants.variants.color).includes(
|
|
99
|
-
color
|
|
100
|
-
);
|
|
101
|
-
const classNames = variantsToClassNames(variants, className, "base");
|
|
102
|
-
heroAddToast({
|
|
103
|
-
classNames,
|
|
104
|
-
closeIcon,
|
|
105
|
-
color: isHeroUIColor ? color : void 0,
|
|
106
|
-
// TODO: 'data-testid': testId,
|
|
107
|
-
description,
|
|
108
|
-
endContent,
|
|
109
|
-
hideCloseButton: !showCloseButton,
|
|
110
|
-
hideIcon: !showIcon,
|
|
111
|
-
icon,
|
|
112
|
-
loadingComponent,
|
|
113
|
-
onClose,
|
|
114
|
-
promise,
|
|
115
|
-
shouldShowTimeoutProgress,
|
|
116
|
-
timeout,
|
|
117
|
-
title,
|
|
118
|
-
variant
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
|
|
122
|
-
// src/Toast/ToastProvider.tsx
|
|
123
|
-
import { toast as heroToastVariants2 } from "@heroui/theme";
|
|
124
|
-
import { ToastProvider as HeroToastProvider } from "@heroui/toast";
|
|
125
|
-
import { variantsToClassNames as variantsToClassNames2 } from "@fuf-stack/pixel-utils";
|
|
126
|
-
import { jsx } from "react/jsx-runtime";
|
|
127
|
-
var ToastProvider = ({
|
|
128
|
-
disableAnimation = false,
|
|
129
|
-
maxVisibleToasts = 5,
|
|
130
|
-
placement = "top-center",
|
|
131
|
-
toastProps = void 0,
|
|
132
|
-
toastOffset = 26,
|
|
133
|
-
regionProps = void 0
|
|
134
|
-
}) => {
|
|
135
|
-
const variants = toastVariants({
|
|
136
|
-
color: toastProps == null ? void 0 : toastProps.color,
|
|
137
|
-
variant: toastProps == null ? void 0 : toastProps.variant
|
|
138
|
-
});
|
|
139
|
-
const isHeroUIColor = Object.keys(heroToastVariants2.variants.color).includes(
|
|
140
|
-
(toastProps == null ? void 0 : toastProps.color) || ""
|
|
141
|
-
);
|
|
142
|
-
const classNames = variantsToClassNames2(
|
|
143
|
-
variants,
|
|
144
|
-
toastProps == null ? void 0 : toastProps.className,
|
|
145
|
-
"base"
|
|
146
|
-
);
|
|
147
|
-
return /* @__PURE__ */ jsx(
|
|
148
|
-
HeroToastProvider,
|
|
149
|
-
{
|
|
150
|
-
disableAnimation,
|
|
151
|
-
maxVisibleToasts,
|
|
152
|
-
placement,
|
|
153
|
-
regionProps,
|
|
154
|
-
toastOffset,
|
|
155
|
-
toastProps: __spreadProps(__spreadValues({}, toastProps), {
|
|
156
|
-
classNames,
|
|
157
|
-
color: isHeroUIColor ? toastProps == null ? void 0 : toastProps.color : void 0
|
|
158
|
-
})
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
};
|
|
162
|
-
var ToastProvider_default = ToastProvider;
|
|
163
|
-
|
|
164
|
-
// src/Toast/index.ts
|
|
165
|
-
var Toast_default = addToast;
|
|
166
|
-
|
|
167
|
-
export {
|
|
168
|
-
toastVariants,
|
|
169
|
-
addToast,
|
|
170
|
-
ToastProvider_default,
|
|
171
|
-
Toast,
|
|
172
|
-
Toast_default
|
|
173
|
-
};
|
|
174
|
-
//# sourceMappingURL=chunk-7IFOMPCK.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Toast/index.ts","../src/Toast/addToast.tsx","../src/Toast/ToastProvider.tsx"],"sourcesContent":["import { Toast } from '@heroui/toast';\n\nimport { addToast, toastVariants } from './addToast';\nimport ToastProvider from './ToastProvider';\n\nexport type { ToastProps, AddToastVariantProps } from './addToast';\nexport type { ToastProviderProps } from './ToastProvider';\n\nexport { addToast, Toast, ToastProvider, toastVariants };\n\nexport default addToast;\n","import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ToastProps as HeroToastProps } from '@heroui/toast';\nimport type { ReactNode } from 'react';\n\nimport { toast as heroToastVariants } from '@heroui/theme';\nimport { addToast as heroAddToast } from '@heroui/toast';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nexport const toastVariants = tv({\n slots: {\n base: '',\n title: '',\n description: '',\n icon: '',\n loadingComponent: '',\n content: '',\n motionDiv: '',\n progressTrack: '',\n progressIndicator: '',\n closeButton: '',\n closeIcon: '',\n },\n variants: {\n // see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/toast.ts\n color: {\n info: {},\n ...heroToastVariants.variants.color,\n },\n variant: {\n ...heroToastVariants.variants.variant,\n },\n },\n compoundVariants: [\n ...heroToastVariants.compoundVariants,\n {\n variant: 'solid',\n color: 'info',\n className: {\n base: 'bg-info text-info-foreground',\n title: 'text-info-foreground',\n description: 'text-info-foreground',\n icon: 'text-info-foreground',\n closeIcon: 'border-info-400 bg-info-100',\n closeButton: 'text-info-400 hover:text-info-600',\n progressIndicator: 'bg-info-400',\n },\n },\n {\n color: 'info',\n variant: 'flat',\n className: {\n base: 'dark:bg-info-50/50 bg-info-50 text-info-600',\n title: 'text-info-600',\n description: 'text-info-500',\n icon: 'text-info-600',\n closeIcon: 'border-info-400 bg-info-100',\n closeButton: 'text-info-400 hover:text-info-600',\n progressIndicator: 'bg-info-400',\n },\n },\n\n {\n color: 'info',\n variant: 'bordered',\n className: {\n base: 'border-small border-info text-info-600',\n title: 'text-info-600',\n description: 'text-info-500',\n icon: 'text-info-600',\n closeIcon: 'border-info-400 bg-info-100',\n closeButton: 'text-info-400 hover:text-info-600',\n progressIndicator: 'bg-info-400',\n },\n },\n ],\n});\n\nexport type AddToastVariantProps = TVProps<typeof toastVariants>;\ntype ClassName = TVClassName<typeof toastVariants>;\n\nexport interface ToastProps extends AddToastVariantProps {\n /** CSS class name */\n className?: ClassName;\n /** Icon displayed at the end of the Alert */\n closeIcon?: ReactNode;\n /** Color of the alert */\n color?: AddToastVariantProps['color'];\n /** Content displayed inside the Alert */\n description?: ReactNode;\n /** Content displayed at the end of the Alert */\n endContent?: ReactNode;\n /** Icon displayed at the start of the Alert */\n icon?: ReactNode;\n /** Component displayed until promise is resolved */\n loadingComponent?: ReactNode;\n /** Callback function called when the toast is closed */\n onClose?: () => void;\n /** Promise based on which the notification will be styled */\n promise?: Promise<void>;\n /** Whether the toast should show a progress bar */\n shouldShowTimeoutProgress?: boolean;\n /** Whether the toast should show a close button */\n showCloseButton?: boolean;\n /** Whether the toast should show an icon */\n showIcon?: boolean;\n /** Time the toast is displayed */\n timeout?: number;\n /** Content displayed at the top of the toast */\n title?: ReactNode;\n /** Variant of the toast */\n variant?: AddToastVariantProps['variant'];\n}\n\n/**\n * addToast function based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)\n */\nexport const addToast = ({\n className = undefined,\n closeIcon = undefined,\n color = 'default',\n description = undefined,\n endContent = undefined,\n icon = undefined,\n loadingComponent = undefined,\n onClose = undefined,\n promise = undefined,\n shouldShowTimeoutProgress = false,\n showCloseButton = true,\n showIcon = true,\n timeout = 5000,\n title = undefined,\n variant = 'bordered',\n}: ToastProps) => {\n const variants = toastVariants({\n color,\n variant,\n });\n const isHeroUIColor = Object.keys(heroToastVariants.variants.color).includes(\n color,\n );\n const classNames = variantsToClassNames(variants, className, 'base');\n\n heroAddToast({\n classNames,\n closeIcon,\n color: isHeroUIColor ? (color as HeroToastProps['color']) : undefined,\n // TODO: 'data-testid': testId,\n description,\n endContent,\n hideCloseButton: !showCloseButton,\n hideIcon: !showIcon,\n icon,\n loadingComponent,\n onClose,\n promise,\n shouldShowTimeoutProgress,\n timeout,\n title,\n variant,\n });\n};\n\nexport default addToast;\n","import type { ToastProps as HeroToastProps } from '@heroui/toast';\nimport type { ToastProps } from './addToast';\n\nimport { toast as heroToastVariants } from '@heroui/theme';\nimport { ToastProvider as HeroToastProvider } from '@heroui/toast';\n\nimport { variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nimport { toastVariants } from './addToast';\n\nexport type ToastProviderToastProps = Omit<\n ToastProps,\n 'description' | 'endContent' | 'title'\n>;\n\nexport interface ToastProviderProps {\n disableAnimation?: boolean;\n maxVisibleToasts?: number;\n placement?:\n | 'bottom-right'\n | 'bottom-left'\n | 'bottom-center'\n | 'top-right'\n | 'top-left'\n | 'top-center';\n\n toastProps?: ToastProviderToastProps;\n toastOffset?: number;\n regionProps?: { classNames?: Record<'base', string> };\n}\n\n/**\n * ToastProvider component based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)\n */\nconst ToastProvider = ({\n disableAnimation = false,\n maxVisibleToasts = 5,\n placement = 'top-center',\n toastProps = undefined,\n toastOffset = 26,\n regionProps = undefined,\n}: ToastProviderProps) => {\n const variants = toastVariants({\n color: toastProps?.color,\n variant: toastProps?.variant,\n });\n const isHeroUIColor = Object.keys(heroToastVariants.variants.color).includes(\n toastProps?.color || '',\n );\n const classNames = variantsToClassNames(\n variants,\n toastProps?.className,\n 'base',\n );\n return (\n <HeroToastProvider\n disableAnimation={disableAnimation}\n maxVisibleToasts={maxVisibleToasts}\n placement={placement}\n regionProps={regionProps}\n toastOffset={toastOffset}\n toastProps={{\n ...toastProps,\n classNames,\n color: isHeroUIColor\n ? (toastProps?.color as HeroToastProps['color'])\n : undefined,\n }}\n />\n );\n};\n\nexport default ToastProvider;\n"],"mappings":";;;;;;AAAA,SAAS,aAAa;;;ACItB,SAAS,SAAS,yBAAyB;AAC3C,SAAS,YAAY,oBAAoB;AAEzC,SAAS,IAAI,4BAA4B;AAElC,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAM;AAAA,IACN,kBAAkB;AAAA,IAClB,SAAS;AAAA,IACT,WAAW;AAAA,IACX,eAAe;AAAA,IACf,mBAAmB;AAAA,IACnB,aAAa;AAAA,IACb,WAAW;AAAA,EACb;AAAA,EACA,UAAU;AAAA;AAAA,IAER,OAAO;AAAA,MACL,MAAM,CAAC;AAAA,OACJ,kBAAkB,SAAS;AAAA,IAEh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AAa;AAAA,IACX;AAAA,IACA;AAAA,IACA,OAAO,gBAAiB,QAAoC;AAAA;AAAA,IAE5D;AAAA,IACA;AAAA,IACA,iBAAiB,CAAC;AAAA,IAClB,UAAU,CAAC;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;;;AC9JA,SAAS,SAASA,0BAAyB;AAC3C,SAAS,iBAAiB,yBAAyB;AAEnD,SAAS,wBAAAC,6BAA4B;AAiDjC;AArBJ,IAAM,gBAAgB,CAAC;AAAA,EACrB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,cAAc;AAAA,EACd,cAAc;AAChB,MAA0B;AACxB,QAAM,WAAW,cAAc;AAAA,IAC7B,OAAO,yCAAY;AAAA,IACnB,SAAS,yCAAY;AAAA,EACvB,CAAC;AACD,QAAM,gBAAgB,OAAO,KAAKC,mBAAkB,SAAS,KAAK,EAAE;AAAA,KAClE,yCAAY,UAAS;AAAA,EACvB;AACA,QAAM,aAAaC;AAAA,IACjB;AAAA,IACA,yCAAY;AAAA,IACZ;AAAA,EACF;AACA,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,YAAY,iCACP,aADO;AAAA,QAEV;AAAA,QACA,OAAO,gBACF,yCAAY,QACb;AAAA,MACN;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,wBAAQ;;;AF9Df,IAAO,gBAAQ;","names":["heroToastVariants","variantsToClassNames","heroToastVariants","variantsToClassNames"]}
|
package/dist/chunk-K25U4BJO.cjs
DELETED
|
@@ -1,135 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
-
|
|
3
|
-
var _chunkAHEA4IJVcjs = require('./chunk-AHEA4IJV.cjs');
|
|
4
|
-
|
|
5
|
-
// src/Alert/Alert.tsx
|
|
6
|
-
var _alert = require('@heroui/alert');
|
|
7
|
-
var _theme = require('@heroui/theme');
|
|
8
|
-
var _pixelutils = require('@fuf-stack/pixel-utils');
|
|
9
|
-
var _jsxruntime = require('react/jsx-runtime');
|
|
10
|
-
var alertVariants = _pixelutils.tv.call(void 0, {
|
|
11
|
-
slots: {
|
|
12
|
-
base: "",
|
|
13
|
-
title: "",
|
|
14
|
-
description: "",
|
|
15
|
-
mainWrapper: "",
|
|
16
|
-
closeButton: "",
|
|
17
|
-
iconWrapper: "",
|
|
18
|
-
alertIcon: ""
|
|
19
|
-
},
|
|
20
|
-
variants: {
|
|
21
|
-
// see: https://github.com/heroui-inc/heroui/blob/canary/packages/core/theme/src/components/alert.ts
|
|
22
|
-
color: _chunkAHEA4IJVcjs.__spreadValues.call(void 0, {
|
|
23
|
-
info: {
|
|
24
|
-
mainWrapper: "text-inherit",
|
|
25
|
-
title: "text-inherit",
|
|
26
|
-
description: "text-inherit"
|
|
27
|
-
}
|
|
28
|
-
}, _theme.alert.variants.color),
|
|
29
|
-
variant: _chunkAHEA4IJVcjs.__spreadValues.call(void 0, {}, _theme.alert.variants.variant),
|
|
30
|
-
sizeLimit: {
|
|
31
|
-
height: {
|
|
32
|
-
base: "max-h-[150px] overflow-y-auto overflow-x-hidden"
|
|
33
|
-
},
|
|
34
|
-
width: {
|
|
35
|
-
base: "max-w-[480px] overflow-x-auto overflow-y-hidden"
|
|
36
|
-
},
|
|
37
|
-
both: {
|
|
38
|
-
base: "max-h-[150px] max-w-[480px] overflow-y-auto overflow-x-hidden"
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
compoundVariants: [
|
|
43
|
-
..._theme.alert.compoundVariants,
|
|
44
|
-
{
|
|
45
|
-
color: "info",
|
|
46
|
-
variant: "solid",
|
|
47
|
-
className: {
|
|
48
|
-
base: "bg-info text-info-foreground",
|
|
49
|
-
alertIcon: "text-info-foreground",
|
|
50
|
-
closeButton: "text-inherit"
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
color: "info",
|
|
55
|
-
variant: "flat",
|
|
56
|
-
className: {
|
|
57
|
-
alertIcon: "fill-current",
|
|
58
|
-
base: "dark:bg-info-50/50 bg-info-50 text-info-600",
|
|
59
|
-
closeButton: "text-info-500 data-[hover]:bg-info-200",
|
|
60
|
-
iconWrapper: "border-info-100 bg-info-50 dark:bg-info-100"
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
color: "info",
|
|
65
|
-
variant: "faded",
|
|
66
|
-
className: {
|
|
67
|
-
alertIcon: "fill-current",
|
|
68
|
-
base: "dark:bg-info-50/50 border-small border-info-200 bg-info-50 text-info-600 dark:border-info-100",
|
|
69
|
-
closeButton: "text-info-500 data-[hover]:bg-info-200",
|
|
70
|
-
iconWrapper: "border-info-100 bg-info-50 dark:bg-info-100"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
color: "info",
|
|
75
|
-
variant: "bordered",
|
|
76
|
-
className: {
|
|
77
|
-
alertIcon: "fill-current",
|
|
78
|
-
base: "border-small border-info text-info",
|
|
79
|
-
closeButton: "text-info-500 data-[hover]:bg-info-200",
|
|
80
|
-
iconWrapper: "bg-info-100 dark:bg-info-50"
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
]
|
|
84
|
-
});
|
|
85
|
-
var Alert = ({
|
|
86
|
-
children = void 0,
|
|
87
|
-
className = void 0,
|
|
88
|
-
color = "primary",
|
|
89
|
-
endContent = void 0,
|
|
90
|
-
icon = void 0,
|
|
91
|
-
isClosable = false,
|
|
92
|
-
onClose = void 0,
|
|
93
|
-
sizeLimit = void 0,
|
|
94
|
-
showIcon = true,
|
|
95
|
-
testId = void 0,
|
|
96
|
-
title = void 0,
|
|
97
|
-
variant = "solid"
|
|
98
|
-
}) => {
|
|
99
|
-
const variants = alertVariants({
|
|
100
|
-
color,
|
|
101
|
-
variant,
|
|
102
|
-
sizeLimit
|
|
103
|
-
});
|
|
104
|
-
const classNames = _pixelutils.variantsToClassNames.call(void 0, variants, className, "base");
|
|
105
|
-
const heroColor = Object.keys(_theme.alert.variants.color).includes(
|
|
106
|
-
color
|
|
107
|
-
) ? color : void 0;
|
|
108
|
-
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
109
|
-
_alert.Alert,
|
|
110
|
-
{
|
|
111
|
-
classNames,
|
|
112
|
-
color: heroColor,
|
|
113
|
-
"data-testid": testId,
|
|
114
|
-
description: title ? children : void 0,
|
|
115
|
-
endContent,
|
|
116
|
-
hideIcon: !showIcon,
|
|
117
|
-
icon,
|
|
118
|
-
isClosable,
|
|
119
|
-
onClose,
|
|
120
|
-
title: title != null ? title : children,
|
|
121
|
-
variant
|
|
122
|
-
}
|
|
123
|
-
);
|
|
124
|
-
};
|
|
125
|
-
var Alert_default = Alert;
|
|
126
|
-
|
|
127
|
-
// src/Alert/index.ts
|
|
128
|
-
var Alert_default2 = Alert_default;
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
exports.alertVariants = alertVariants; exports.Alert_default = Alert_default; exports.Alert_default2 = Alert_default2;
|
|
135
|
-
//# sourceMappingURL=chunk-K25U4BJO.cjs.map
|