@fuf-stack/pixels 0.39.4 → 0.39.6
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/Button/index.cjs +2 -2
- package/dist/Button/index.d.cts +2 -2
- package/dist/Button/index.d.ts +2 -2
- package/dist/Button/index.js +1 -1
- package/dist/{Button-BGekDPvO.d.cts → Button-CZbmfAum.d.cts} +56 -0
- package/dist/{Button-BGekDPvO.d.ts → Button-CZbmfAum.d.ts} +56 -0
- package/dist/Json/index.cjs +3 -3
- package/dist/Json/index.js +2 -2
- package/dist/Popover/index.d.cts +3 -3
- package/dist/Popover/index.d.ts +3 -3
- package/dist/{Popover-BHPrdRy6.d.ts → Popover-BfuSZTJo.d.ts} +1 -1
- package/dist/{Popover-BXyk9y8I.d.cts → Popover-LgiGpAzD.d.cts} +1 -1
- package/dist/{chunk-3JUTQREC.js → chunk-544LZP7D.js} +2 -2
- package/dist/{chunk-ZASS525K.cjs → chunk-7JB6J5LE.cjs} +3 -3
- package/dist/{chunk-ZASS525K.cjs.map → chunk-7JB6J5LE.cjs.map} +1 -1
- package/dist/{chunk-4X43AGXE.cjs → chunk-PADWVM45.cjs} +49 -19
- package/dist/chunk-PADWVM45.cjs.map +1 -0
- package/dist/{chunk-HL5BEHIS.js → chunk-TFKFBSSS.js} +48 -18
- package/dist/chunk-TFKFBSSS.js.map +1 -0
- package/dist/index.cjs +9 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +19 -4
- package/dist/index.d.ts +19 -4
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-4X43AGXE.cjs.map +0 -1
- package/dist/chunk-HL5BEHIS.js.map +0 -1
- /package/dist/{chunk-3JUTQREC.js.map → chunk-544LZP7D.js.map} +0 -0
|
@@ -1,5 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true})
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
var _chunkD4TLDLEXcjs = require('./chunk-D4TLDLEX.cjs');
|
|
4
|
+
|
|
5
|
+
// src/Button/Button.tsx
|
|
2
6
|
var _button = require('@heroui/button');
|
|
7
|
+
var _theme = require('@heroui/theme');
|
|
3
8
|
var _pixelutils = require('@fuf-stack/pixel-utils');
|
|
4
9
|
|
|
5
10
|
// src/Button/subcomponents/LoadingSpinner.tsx
|
|
@@ -40,23 +45,13 @@ var LoadingSpinner_default = () => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
|
40
45
|
var buttonVariants = _pixelutils.tv.call(void 0, {
|
|
41
46
|
base: "",
|
|
42
47
|
variants: {
|
|
43
|
-
color: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
variant: {
|
|
52
|
-
solid: "",
|
|
53
|
-
bordered: "",
|
|
54
|
-
light: "",
|
|
55
|
-
flat: "",
|
|
56
|
-
faded: "",
|
|
57
|
-
shadow: "",
|
|
58
|
-
ghost: ""
|
|
59
|
-
}
|
|
48
|
+
color: _chunkD4TLDLEXcjs.__spreadValues.call(void 0, {
|
|
49
|
+
info: {
|
|
50
|
+
base: "text-info-foreground"
|
|
51
|
+
}
|
|
52
|
+
}, _theme.button.variants.color),
|
|
53
|
+
variant: _chunkD4TLDLEXcjs.__spreadValues.call(void 0, {}, _theme.button.variants.variant),
|
|
54
|
+
size: _chunkD4TLDLEXcjs.__spreadValues.call(void 0, {}, _theme.button.variants.size)
|
|
60
55
|
},
|
|
61
56
|
compoundVariants: [
|
|
62
57
|
// white text on solid / shadow success button
|
|
@@ -70,6 +65,41 @@ var buttonVariants = _pixelutils.tv.call(void 0, {
|
|
|
70
65
|
color: "warning",
|
|
71
66
|
variant: ["solid", "shadow"],
|
|
72
67
|
class: "text-white"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
color: "info",
|
|
71
|
+
variant: "solid",
|
|
72
|
+
class: "bg-info text-primary-foreground"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
color: "info",
|
|
76
|
+
variant: "shadow",
|
|
77
|
+
class: "bg-info text-info-foreground shadow-lg shadow-info-200"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
color: "info",
|
|
81
|
+
variant: "bordered",
|
|
82
|
+
class: "border-medium border-info bg-transparent text-info"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
color: "info",
|
|
86
|
+
variant: "flat",
|
|
87
|
+
class: "bg-info-100 text-info-600"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
color: "info",
|
|
91
|
+
variant: "faded",
|
|
92
|
+
class: "border-default bg-default-100 text-info"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
color: "info",
|
|
96
|
+
variant: "light",
|
|
97
|
+
class: "bg-transparent text-info data-[hover=true]:bg-info-100"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
color: "info",
|
|
101
|
+
variant: "ghost",
|
|
102
|
+
class: "border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground"
|
|
73
103
|
}
|
|
74
104
|
]
|
|
75
105
|
});
|
|
@@ -122,4 +152,4 @@ var Button_default2 = Button_default;
|
|
|
122
152
|
|
|
123
153
|
|
|
124
154
|
exports.buttonVariants = buttonVariants; exports.Button_default = Button_default; exports.Button_default2 = Button_default2;
|
|
125
|
-
//# sourceMappingURL=chunk-
|
|
155
|
+
//# sourceMappingURL=chunk-PADWVM45.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-PADWVM45.cjs","../src/Button/Button.tsx","../src/Button/subcomponents/LoadingSpinner.tsx","../src/Button/index.ts"],"names":["jsxs","jsx","Button_default"],"mappings":"AAAA;AACE;AACF,wDAA6B;AAC7B;AACA;ACAA,wCAAq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AA,EAAmB,KAAA;AAAA,EACnB,KAAA,EAAO,KAAA,CAAA;AAAA,EACP,QAAA,EAAU,KAAA;AAAA,EACV,QAAA,EAAU,KAAA,CAAA;AAAA,EACV,KAAA,EAAO,KAAA,CAAA;AAAA,EACP,OAAA,EAAS,KAAA,CAAA;AAAA,EACT,KAAA,EAAO,KAAA,CAAA;AAAA,EACP,QAAA,EAAU;AACZ,CAAA,EAAA,GAAmB;AACjB,EAAA,uBACEA,8BAAAA;AAAA,IAAC,cAAA;AAAA,IAAA;AAAA,MACC,YAAA,EAAY,SAAA;AAAA,MACZ,SAAA,EAAW,cAAA,CAAe,EAAE,KAAA,EAAO,OAAA,EAAS,UAAU,CAAC,CAAA;AAAA,MACvD,KAAA;AAAA,MACA,aAAA,EAAa,MAAA;AAAA,MACb,gBAAA;AAAA,MACA,aAAA,EAAe,gBAAA;AAAA,MACf,UAAA,EAAY,QAAA;AAAA,MACZ,UAAA,EAAY,CAAC,CAAA,CAAE,KAAA,GAAQ,CAAC,QAAA,CAAA;AAAA,MACxB,SAAA,EAAW,OAAA;AAAA,MACX,OAAA,EAAS,OAAA;AAAA,MACT,IAAA;AAAA,MACA,OAAA,kBAASC,6BAAAA,sBAAC,EAAA,CAAA,CAAe,CAAA;AAAA,MACzB,IAAA;AAAA,MACA,OAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,IAAA;AAAA,QACA;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,CAAA;AAEJ,CAAA;AAEA,IAAO,eAAA,EAAQ,MAAA;ADNf;AACA;AG5IA,IAAOC,gBAAAA,EAAQ,cAAA;AH8If;AACA;AACE;AACA;AACA;AACF,4HAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-PADWVM45.cjs","sourcesContent":[null,"import type { TVProps } from '@fuf-stack/pixel-utils';\nimport type { ButtonProps as HeroButtonProps } from '@heroui/button';\nimport type { ReactNode } from 'react';\n\nimport { Button as HeroButton } from '@heroui/button';\nimport { button as heroButtonVariants } from '@heroui/theme';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport const buttonVariants = tv({\n base: '',\n variants: {\n color: {\n info: {\n base: 'text-info-foreground',\n },\n ...heroButtonVariants.variants.color,\n },\n variant: {\n ...heroButtonVariants.variants.variant,\n },\n size: {\n ...heroButtonVariants.variants.size,\n },\n },\n compoundVariants: [\n // white text on solid / shadow success button\n {\n color: 'success',\n variant: ['solid', 'shadow'],\n class: 'text-white',\n },\n // white text on solid / shadow warning button\n {\n color: 'warning',\n variant: ['solid', 'shadow'],\n class: 'text-white',\n },\n {\n color: 'info',\n variant: 'solid',\n class: 'bg-info text-primary-foreground',\n },\n {\n color: 'info',\n variant: 'shadow',\n class: 'bg-info text-info-foreground shadow-lg shadow-info-200',\n },\n {\n color: 'info',\n variant: 'bordered',\n class: 'border-medium border-info bg-transparent text-info',\n },\n {\n color: 'info',\n variant: 'flat',\n class: 'bg-info-100 text-info-600',\n },\n {\n color: 'info',\n variant: 'faded',\n class: 'border-default bg-default-100 text-info',\n },\n {\n color: 'info',\n variant: 'light',\n class: 'bg-transparent text-info data-[hover=true]:bg-info-100',\n },\n {\n color: 'info',\n variant: 'ghost',\n class:\n 'border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground',\n },\n ],\n});\n\nexport type VariantProps = TVProps<typeof buttonVariants>;\n\nexport interface ButtonProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** hero ui button color */\n color?: HeroButtonProps['color'];\n /** disables function of the button. */\n disabled?: boolean;\n /** disables all button animations */\n disableAnimation?: boolean;\n /** If set loading animation is shown */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** on click event */\n onClick?: HeroButtonProps['onPress'];\n /** 3 size options */\n size?: HeroButtonProps['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 /** hero ui button variants */\n variant?: HeroButtonProps['variant'];\n}\n\n/**\n * Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)\n */\nconst Button = ({\n ariaLabel = undefined,\n children = undefined,\n className = undefined,\n color = 'default',\n disabled = false,\n disableAnimation = 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 <HeroButton\n aria-label={ariaLabel}\n className={buttonVariants({ color, variant, className })}\n color={color}\n data-testid={testId}\n disableAnimation={disableAnimation}\n disableRipple={disableAnimation}\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 </HeroButton>\n );\n};\n\nexport default Button;\n","/**\n * svg loading spinner for button\n * @see https://www.heroui.com//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","import Button, { buttonVariants } from './Button';\n\nexport type { ButtonProps } from './Button';\n\nexport { Button, buttonVariants };\n\nexport default Button;\n"]}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
|
+
import {
|
|
2
|
+
__spreadValues
|
|
3
|
+
} from "./chunk-J7N2552D.js";
|
|
4
|
+
|
|
1
5
|
// src/Button/Button.tsx
|
|
2
6
|
import { Button as HeroButton } from "@heroui/button";
|
|
7
|
+
import { button as heroButtonVariants } from "@heroui/theme";
|
|
3
8
|
import { tv } from "@fuf-stack/pixel-utils";
|
|
4
9
|
|
|
5
10
|
// src/Button/subcomponents/LoadingSpinner.tsx
|
|
@@ -40,23 +45,13 @@ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
40
45
|
var buttonVariants = tv({
|
|
41
46
|
base: "",
|
|
42
47
|
variants: {
|
|
43
|
-
color: {
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
},
|
|
51
|
-
variant: {
|
|
52
|
-
solid: "",
|
|
53
|
-
bordered: "",
|
|
54
|
-
light: "",
|
|
55
|
-
flat: "",
|
|
56
|
-
faded: "",
|
|
57
|
-
shadow: "",
|
|
58
|
-
ghost: ""
|
|
59
|
-
}
|
|
48
|
+
color: __spreadValues({
|
|
49
|
+
info: {
|
|
50
|
+
base: "text-info-foreground"
|
|
51
|
+
}
|
|
52
|
+
}, heroButtonVariants.variants.color),
|
|
53
|
+
variant: __spreadValues({}, heroButtonVariants.variants.variant),
|
|
54
|
+
size: __spreadValues({}, heroButtonVariants.variants.size)
|
|
60
55
|
},
|
|
61
56
|
compoundVariants: [
|
|
62
57
|
// white text on solid / shadow success button
|
|
@@ -70,6 +65,41 @@ var buttonVariants = tv({
|
|
|
70
65
|
color: "warning",
|
|
71
66
|
variant: ["solid", "shadow"],
|
|
72
67
|
class: "text-white"
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
color: "info",
|
|
71
|
+
variant: "solid",
|
|
72
|
+
class: "bg-info text-primary-foreground"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
color: "info",
|
|
76
|
+
variant: "shadow",
|
|
77
|
+
class: "bg-info text-info-foreground shadow-lg shadow-info-200"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
color: "info",
|
|
81
|
+
variant: "bordered",
|
|
82
|
+
class: "border-medium border-info bg-transparent text-info"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
color: "info",
|
|
86
|
+
variant: "flat",
|
|
87
|
+
class: "bg-info-100 text-info-600"
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
color: "info",
|
|
91
|
+
variant: "faded",
|
|
92
|
+
class: "border-default bg-default-100 text-info"
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
color: "info",
|
|
96
|
+
variant: "light",
|
|
97
|
+
class: "bg-transparent text-info data-[hover=true]:bg-info-100"
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
color: "info",
|
|
101
|
+
variant: "ghost",
|
|
102
|
+
class: "border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground"
|
|
73
103
|
}
|
|
74
104
|
]
|
|
75
105
|
});
|
|
@@ -122,4 +152,4 @@ export {
|
|
|
122
152
|
Button_default,
|
|
123
153
|
Button_default2
|
|
124
154
|
};
|
|
125
|
-
//# sourceMappingURL=chunk-
|
|
155
|
+
//# sourceMappingURL=chunk-TFKFBSSS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/Button/Button.tsx","../src/Button/subcomponents/LoadingSpinner.tsx","../src/Button/index.ts"],"sourcesContent":["import type { TVProps } from '@fuf-stack/pixel-utils';\nimport type { ButtonProps as HeroButtonProps } from '@heroui/button';\nimport type { ReactNode } from 'react';\n\nimport { Button as HeroButton } from '@heroui/button';\nimport { button as heroButtonVariants } from '@heroui/theme';\n\nimport { tv } from '@fuf-stack/pixel-utils';\n\nimport LoadingSpinner from './subcomponents/LoadingSpinner';\n\nexport const buttonVariants = tv({\n base: '',\n variants: {\n color: {\n info: {\n base: 'text-info-foreground',\n },\n ...heroButtonVariants.variants.color,\n },\n variant: {\n ...heroButtonVariants.variants.variant,\n },\n size: {\n ...heroButtonVariants.variants.size,\n },\n },\n compoundVariants: [\n // white text on solid / shadow success button\n {\n color: 'success',\n variant: ['solid', 'shadow'],\n class: 'text-white',\n },\n // white text on solid / shadow warning button\n {\n color: 'warning',\n variant: ['solid', 'shadow'],\n class: 'text-white',\n },\n {\n color: 'info',\n variant: 'solid',\n class: 'bg-info text-primary-foreground',\n },\n {\n color: 'info',\n variant: 'shadow',\n class: 'bg-info text-info-foreground shadow-lg shadow-info-200',\n },\n {\n color: 'info',\n variant: 'bordered',\n class: 'border-medium border-info bg-transparent text-info',\n },\n {\n color: 'info',\n variant: 'flat',\n class: 'bg-info-100 text-info-600',\n },\n {\n color: 'info',\n variant: 'faded',\n class: 'border-default bg-default-100 text-info',\n },\n {\n color: 'info',\n variant: 'light',\n class: 'bg-transparent text-info data-[hover=true]:bg-info-100',\n },\n {\n color: 'info',\n variant: 'ghost',\n class:\n 'border-info text-info data-[hover=true]:!bg-info data-[hover=true]:!text-info-foreground',\n },\n ],\n});\n\nexport type VariantProps = TVProps<typeof buttonVariants>;\n\nexport interface ButtonProps extends VariantProps {\n /** sets HTML aria-label attribute */\n ariaLabel?: string;\n /** child components */\n children?: ReactNode;\n /** CSS class name */\n className?: string;\n /** hero ui button color */\n color?: HeroButtonProps['color'];\n /** disables function of the button. */\n disabled?: boolean;\n /** disables all button animations */\n disableAnimation?: boolean;\n /** If set loading animation is shown */\n loading?: boolean;\n /** optional icon */\n icon?: ReactNode;\n /** on click event */\n onClick?: HeroButtonProps['onPress'];\n /** 3 size options */\n size?: HeroButtonProps['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 /** hero ui button variants */\n variant?: HeroButtonProps['variant'];\n}\n\n/**\n * Button component based on [HeroUI Button](https://www.heroui.com//docs/components/button)\n */\nconst Button = ({\n ariaLabel = undefined,\n children = undefined,\n className = undefined,\n color = 'default',\n disabled = false,\n disableAnimation = 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 <HeroButton\n aria-label={ariaLabel}\n className={buttonVariants({ color, variant, className })}\n color={color}\n data-testid={testId}\n disableAnimation={disableAnimation}\n disableRipple={disableAnimation}\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 </HeroButton>\n );\n};\n\nexport default Button;\n","/**\n * svg loading spinner for button\n * @see https://www.heroui.com//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","import Button, { buttonVariants } from './Button';\n\nexport type { ButtonProps } from './Button';\n\nexport { Button, buttonVariants };\n\nexport default Button;\n"],"mappings":";;;;;AAIA,SAAS,UAAU,kBAAkB;AACrC,SAAS,UAAU,0BAA0B;AAE7C,SAAS,UAAU;;;ACFjB,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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,EACV,UAAU;AAAA,EACV,OAAO;AAAA,EACP,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AACZ,MAAmB;AACjB,SACE,gBAAAA;AAAA,IAAC;AAAA;AAAA,MACC,cAAY;AAAA,MACZ,WAAW,eAAe,EAAE,OAAO,SAAS,UAAU,CAAC;AAAA,MACvD;AAAA,MACA,eAAa;AAAA,MACb;AAAA,MACA,eAAe;AAAA,MACf,YAAY;AAAA,MACZ,YAAY,CAAC,EAAE,QAAQ,CAAC;AAAA,MACxB,WAAW;AAAA,MACX,SAAS;AAAA,MACT;AAAA,MACA,SAAS,gBAAAD,KAAC,0BAAe;AAAA,MACzB;AAAA,MACA;AAAA,MAEC;AAAA;AAAA,QACA;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,iBAAQ;;;AEjJf,IAAOE,kBAAQ;","names":["jsx","jsxs","Button_default"]}
|
package/dist/index.cjs
CHANGED
|
@@ -30,7 +30,7 @@ var _chunkMHZAWSFJcjs = require('./chunk-MHZAWSFJ.cjs');
|
|
|
30
30
|
var _chunk7RVUB6I5cjs = require('./chunk-7RVUB6I5.cjs');
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
var
|
|
33
|
+
var _chunk7JB6J5LEcjs = require('./chunk-7JB6J5LE.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
@@ -70,7 +70,7 @@ var _chunkZZOEFQWQcjs = require('./chunk-ZZOEFQWQ.cjs');
|
|
|
70
70
|
|
|
71
71
|
|
|
72
72
|
|
|
73
|
-
var
|
|
73
|
+
var _chunkPADWVM45cjs = require('./chunk-PADWVM45.cjs');
|
|
74
74
|
|
|
75
75
|
|
|
76
76
|
|
|
@@ -145,7 +145,6 @@ var toastVariants = _pixelutils.tv.call(void 0, {
|
|
|
145
145
|
]
|
|
146
146
|
});
|
|
147
147
|
var addToast = ({
|
|
148
|
-
children = void 0,
|
|
149
148
|
className = void 0,
|
|
150
149
|
closeIcon = void 0,
|
|
151
150
|
color = "default",
|
|
@@ -154,11 +153,10 @@ var addToast = ({
|
|
|
154
153
|
icon = void 0,
|
|
155
154
|
loadingIcon = void 0,
|
|
156
155
|
onClose = void 0,
|
|
157
|
-
|
|
156
|
+
promise = void 0,
|
|
158
157
|
shouldShowTimeoutProgress = false,
|
|
159
158
|
showCloseButton = true,
|
|
160
159
|
showIcon = true,
|
|
161
|
-
// testId = undefined,
|
|
162
160
|
timeout = 5e3,
|
|
163
161
|
title = void 0,
|
|
164
162
|
variant = "bordered"
|
|
@@ -175,20 +173,20 @@ var addToast = ({
|
|
|
175
173
|
classNames,
|
|
176
174
|
closeIcon,
|
|
177
175
|
color: isHeroUIColor ? color : void 0,
|
|
178
|
-
// 'data-testid': testId,
|
|
176
|
+
// TODO: 'data-testid': testId,
|
|
179
177
|
// https://github.com/heroui-inc/heroui/issues/5033
|
|
180
178
|
// @ts-expect-error bug in hero-toast: description should be ReactNode
|
|
181
|
-
description
|
|
179
|
+
description,
|
|
182
180
|
endContent,
|
|
183
181
|
hideCloseButton: !showCloseButton,
|
|
184
182
|
hideIcon: !showIcon,
|
|
185
183
|
icon,
|
|
186
184
|
loadingIcon,
|
|
187
185
|
onClose,
|
|
188
|
-
|
|
186
|
+
promise,
|
|
189
187
|
shouldShowTimeoutProgress,
|
|
190
188
|
timeout,
|
|
191
|
-
title
|
|
189
|
+
title,
|
|
192
190
|
variant
|
|
193
191
|
});
|
|
194
192
|
};
|
|
@@ -203,7 +201,7 @@ var ToastProvider = ({
|
|
|
203
201
|
maxVisibleToasts = 5,
|
|
204
202
|
placement = "top-center",
|
|
205
203
|
toastProps = void 0,
|
|
206
|
-
toastOffset =
|
|
204
|
+
toastOffset = 26,
|
|
207
205
|
regionProps = void 0
|
|
208
206
|
}) => {
|
|
209
207
|
const variants = toastVariants({
|
|
@@ -272,5 +270,5 @@ var ToastProvider_default = ToastProvider;
|
|
|
272
270
|
|
|
273
271
|
|
|
274
272
|
|
|
275
|
-
exports.Accordion = _chunk2P5WWVQ6cjs.Accordion_default; exports.Alert = _chunkYVPRFCWIcjs.Alert_default; exports.Avatar = _chunk77J7NZYBcjs.Avatar_default; exports.AvatarGroup = _chunkLIZGYO24cjs.AvatarGroup_default; exports.Badge = _chunkJSANDW3Wcjs.Badge_default; exports.Breadcrumb = _chunkZZOEFQWQcjs.Breadcrumb_default; exports.Button =
|
|
273
|
+
exports.Accordion = _chunk2P5WWVQ6cjs.Accordion_default; exports.Alert = _chunkYVPRFCWIcjs.Alert_default; exports.Avatar = _chunk77J7NZYBcjs.Avatar_default; exports.AvatarGroup = _chunkLIZGYO24cjs.AvatarGroup_default; exports.Badge = _chunkJSANDW3Wcjs.Badge_default; exports.Breadcrumb = _chunkZZOEFQWQcjs.Breadcrumb_default; exports.Button = _chunkPADWVM45cjs.Button_default; exports.ButtonGroup = _chunkY3RSI2KVcjs.ButtonGroup_default; exports.Card = _chunkMHZAWSFJcjs.Card_default; exports.Drawer = _chunk7RVUB6I5cjs.Drawer_default; exports.Json = _chunk7JB6J5LEcjs.Json_default; exports.Label = _chunkPLJWIGRScjs.Label_default; exports.Menu = _chunkXHOAZB2Zcjs.Menu_default; exports.Modal = _chunkPEUUQMJScjs.Modal_default; exports.Popover = _chunkEAX5J2I2cjs.Popover_default; exports.Table = _chunkAJCAIA6Hcjs.Table_default; exports.Tabs = _chunkJUHSESWBcjs.Tabs_default; exports.ToastProvider = ToastProvider_default; exports.Tooltip = _chunk25AJSW5Ecjs.Tooltip_default; exports.accordionVariants = _chunk2P5WWVQ6cjs.accordionVariants; exports.addToast = addToast; exports.alertVariants = _chunkYVPRFCWIcjs.alertVariants; exports.breadcrumbVariants = _chunkZZOEFQWQcjs.breadcrumbVariants; exports.buttonVariants = _chunkPADWVM45cjs.buttonVariants; exports.cardVariants = _chunkMHZAWSFJcjs.cardVariants; exports.drawerBackdrops = _chunk7RVUB6I5cjs.drawerBackdrops; exports.drawerPlacements = _chunk7RVUB6I5cjs.drawerPlacements; exports.drawerRadii = _chunk7RVUB6I5cjs.drawerRadii; exports.drawerSizes = _chunk7RVUB6I5cjs.drawerSizes; exports.drawerVariants = _chunk7RVUB6I5cjs.drawerVariants; exports.labelVariants = _chunkPLJWIGRScjs.labelVariants; exports.modalVariants = _chunkPEUUQMJScjs.modalVariants; exports.tableVariants = _chunkAJCAIA6Hcjs.tableVariants; exports.tabsVariants = _chunkJUHSESWBcjs.tabsVariants; exports.toastVariants = toastVariants; exports.useDebounce = _chunkMWNBYTRNcjs.useDebounce; exports.useLocalStorage = _chunkMWNBYTRNcjs.useLocalStorage;
|
|
276
274
|
//# sourceMappingURL=index.cjs.map
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/index.cjs","../src/Toast/addToast.tsx","../src/Toast/ToastProvider.tsx"],"names":["heroToastVariants","variantsToClassNames"],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;AC1EA,sCAA2C;AAC3C,sCAAyC;AAEzC,oDAAyC;AAElC,IAAM,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AAA,KAAA,EAAA,EAAA,UAAA,CAAY,KAAA,EAAA,GAAS;AAAA,EACvB,CAAA;AACA,EAAA,MAAM,WAAA,EAAaC,8CAAAA;AAAA,IACjB,QAAA;AAAA,IACA,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,SAAA;AAAA,IACZ;AAAA,EACF,CAAA;AACA,EAAA,uBACE,6BAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAA;AAAA,MACA,UAAA,EAAY,6CAAA,8CAAA,CAAA,CAAA,EACP,UAAA,CAAA,EADO;AAAA,QAEV,UAAA;AAAA,QACA,KAAA,EAAO,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;AFoKf;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,w7DAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/index.cjs","sourcesContent":[null,"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 loadingIcon: '',\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 children?: ReactNode;\n className?: ClassName;\n closeIcon?: ReactNode;\n color?: AddToastVariantProps['color'];\n description?: ReactNode;\n endContent?: ReactNode;\n icon?: ReactNode;\n loadingIcon?: ReactNode;\n onClose?: () => void;\n // severity?:\n // | 'default'\n // | 'primary'\n // | 'secondary'\n // | 'success'\n // | 'warning'\n // | 'danger';\n shouldShowTimeoutProgress?: boolean;\n showCloseButton?: boolean;\n showIcon?: boolean;\n // testId?: string;\n timeout?: number;\n title?: ReactNode;\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 children = undefined,\n className = undefined,\n closeIcon = undefined,\n color = 'default',\n description = undefined,\n endContent = undefined,\n icon = undefined,\n loadingIcon = undefined,\n onClose = undefined,\n // severity = 'default',\n shouldShowTimeoutProgress = false,\n showCloseButton = true,\n showIcon = true,\n // testId = undefined,\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 heroAddToast({\n classNames,\n closeIcon,\n color: isHeroUIColor ? (color as HeroToastProps['color']) : undefined,\n // 'data-testid': testId,\n // https://github.com/heroui-inc/heroui/issues/5033\n // @ts-expect-error bug in hero-toast: description should be ReactNode\n description: description || title ? children : undefined,\n endContent,\n hideCloseButton: !showCloseButton,\n hideIcon: !showIcon,\n icon,\n loadingIcon,\n onClose,\n // severity={severity}\n shouldShowTimeoutProgress,\n timeout,\n title: (title || children) as string,\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 = 0,\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"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/index.cjs","../src/Toast/addToast.tsx","../src/Toast/ToastProvider.tsx"],"names":["heroToastVariants","variantsToClassNames"],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACA;AC1EA,sCAA2C;AA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AAS;AAAA,EACvB,CAAA;AACA,EAAA,MAAM,WAAA,EAAaC,8CAAAA;AAAA,IACjB,QAAA;AAAA,IACA,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY,SAAA;AAAA,IACZ;AAAA,EACF,CAAA;AACA,EAAA,uBACE,6BAAA;AAAA,IAAC,oBAAA;AAAA,IAAA;AAAA,MACC,gBAAA;AAAA,MACA,gBAAA;AAAA,MACA,SAAA;AAAA,MACA,WAAA;AAAA,MACA,WAAA;AAAA,MACA,UAAA,EAAY,6CAAA,8CAAA,CAAA,CAAA,EACP,UAAA,CAAA,EADO;AAAA,QAEV,UAAA;AAAA,QACA,KAAA,EAAO,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;AFkKf;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,w7DAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/index.cjs","sourcesContent":[null,"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 loadingIcon: '',\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 /** Icon or animation displayed until promise is resolved */\n loadingIcon?: 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 loadingIcon = 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 heroAddToast({\n classNames,\n closeIcon,\n color: isHeroUIColor ? (color as HeroToastProps['color']) : undefined,\n // TODO: 'data-testid': testId,\n // https://github.com/heroui-inc/heroui/issues/5033\n // @ts-expect-error bug in hero-toast: description should be ReactNode\n description,\n endContent,\n hideCloseButton: !showCloseButton,\n hideIcon: !showIcon,\n icon,\n loadingIcon,\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/index.d.cts
CHANGED
|
@@ -4,7 +4,7 @@ export { A as Avatar, a as AvatarProps } from './Avatar-ylNJ_-dY.cjs';
|
|
|
4
4
|
export { A as AvatarGroup, a as AvatarGroupProps } from './AvatarGroup-CUyQwK3t.cjs';
|
|
5
5
|
export { A as Badge, B as BadgeProps } from './Badge-CvXzljaJ.cjs';
|
|
6
6
|
export { B as Breadcrumb, c as BreadcrumbItemProps, a as BreadcrumbProps, b as breadcrumbVariants } from './Breadcrumb-1cB54eJk.cjs';
|
|
7
|
-
export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-
|
|
7
|
+
export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-CZbmfAum.cjs';
|
|
8
8
|
export { B as ButtonGroup } from './ButtonGroup-CUxpALRo.cjs';
|
|
9
9
|
export { C as Card, a as CardProps, c as cardVariants } from './Card-BdciRqJz.cjs';
|
|
10
10
|
export { D as Drawer, f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from './Drawer-BnV9qxPA.cjs';
|
|
@@ -12,7 +12,7 @@ export { J as Json, a as JsonProps } from './Json-ngM0f9n2.cjs';
|
|
|
12
12
|
export { L as Label, a as LabelProps, l as labelVariants } from './Label-Bp9WZiDB.cjs';
|
|
13
13
|
export { M as Menu, b as MenuItem, a as MenuProps, c as MenuSection } from './Menu-DYi8oagz.cjs';
|
|
14
14
|
export { M as Modal, a as ModalProps, m as modalVariants } from './Modal-DI5ZdS_3.cjs';
|
|
15
|
-
export { _ as Popover, P as PopoverProps } from './Popover-
|
|
15
|
+
export { _ as Popover, P as PopoverProps } from './Popover-LgiGpAzD.cjs';
|
|
16
16
|
export { T as Table, c as TableColumnProps, a as TableProps, b as TableRowProps, V as VariantProps, t as tableVariants } from './Table-D19f5nrd.cjs';
|
|
17
17
|
export { b as TabProps, T as Tabs, a as TabsProps, t as tabsVariants } from './Tabs-xUYwXMX9.cjs';
|
|
18
18
|
import * as tailwind_variants from 'tailwind-variants';
|
|
@@ -269,26 +269,41 @@ declare const toastVariants: tailwind_variants.TVReturnType<{
|
|
|
269
269
|
type AddToastVariantProps = TVProps<typeof toastVariants>;
|
|
270
270
|
type ClassName = TVClassName<typeof toastVariants>;
|
|
271
271
|
interface ToastProps extends AddToastVariantProps {
|
|
272
|
-
|
|
272
|
+
/** CSS class name */
|
|
273
273
|
className?: ClassName;
|
|
274
|
+
/** Icon displayed at the end of the Alert */
|
|
274
275
|
closeIcon?: ReactNode;
|
|
276
|
+
/** Color of the alert */
|
|
275
277
|
color?: AddToastVariantProps['color'];
|
|
278
|
+
/** Content displayed inside the Alert */
|
|
276
279
|
description?: ReactNode;
|
|
280
|
+
/** Content displayed at the end of the Alert */
|
|
277
281
|
endContent?: ReactNode;
|
|
282
|
+
/** Icon displayed at the start of the Alert */
|
|
278
283
|
icon?: ReactNode;
|
|
284
|
+
/** Icon or animation displayed until promise is resolved */
|
|
279
285
|
loadingIcon?: ReactNode;
|
|
286
|
+
/** Callback function called when the toast is closed */
|
|
280
287
|
onClose?: () => void;
|
|
288
|
+
/** Promise based on which the notification will be styled */
|
|
289
|
+
promise?: Promise<void>;
|
|
290
|
+
/** Whether the toast should show a progress bar */
|
|
281
291
|
shouldShowTimeoutProgress?: boolean;
|
|
292
|
+
/** Whether the toast should show a close button */
|
|
282
293
|
showCloseButton?: boolean;
|
|
294
|
+
/** Whether the toast should show an icon */
|
|
283
295
|
showIcon?: boolean;
|
|
296
|
+
/** Time the toast is displayed */
|
|
284
297
|
timeout?: number;
|
|
298
|
+
/** Content displayed at the top of the toast */
|
|
285
299
|
title?: ReactNode;
|
|
300
|
+
/** Variant of the toast */
|
|
286
301
|
variant?: AddToastVariantProps['variant'];
|
|
287
302
|
}
|
|
288
303
|
/**
|
|
289
304
|
* addToast function based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)
|
|
290
305
|
*/
|
|
291
|
-
declare const addToast: ({
|
|
306
|
+
declare const addToast: ({ className, closeIcon, color, description, endContent, icon, loadingIcon, onClose, promise, shouldShowTimeoutProgress, showCloseButton, showIcon, timeout, title, variant, }: ToastProps) => void;
|
|
292
307
|
|
|
293
308
|
type ToastProviderToastProps = Omit<ToastProps, 'description' | 'endContent' | 'title'>;
|
|
294
309
|
interface ToastProviderProps {
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export { A as Avatar, a as AvatarProps } from './Avatar-ylNJ_-dY.js';
|
|
|
4
4
|
export { A as AvatarGroup, a as AvatarGroupProps } from './AvatarGroup-BfOtqfJy.js';
|
|
5
5
|
export { A as Badge, B as BadgeProps } from './Badge-CvXzljaJ.js';
|
|
6
6
|
export { B as Breadcrumb, c as BreadcrumbItemProps, a as BreadcrumbProps, b as breadcrumbVariants } from './Breadcrumb-1cB54eJk.js';
|
|
7
|
-
export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-
|
|
7
|
+
export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-CZbmfAum.js';
|
|
8
8
|
export { B as ButtonGroup } from './ButtonGroup-CUxpALRo.js';
|
|
9
9
|
export { C as Card, a as CardProps, c as cardVariants } from './Card-BdciRqJz.js';
|
|
10
10
|
export { D as Drawer, f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from './Drawer-BnV9qxPA.js';
|
|
@@ -12,7 +12,7 @@ export { J as Json, a as JsonProps } from './Json-ngM0f9n2.js';
|
|
|
12
12
|
export { L as Label, a as LabelProps, l as labelVariants } from './Label-Bp9WZiDB.js';
|
|
13
13
|
export { M as Menu, b as MenuItem, a as MenuProps, c as MenuSection } from './Menu-DYi8oagz.js';
|
|
14
14
|
export { M as Modal, a as ModalProps, m as modalVariants } from './Modal-DI5ZdS_3.js';
|
|
15
|
-
export { _ as Popover, P as PopoverProps } from './Popover-
|
|
15
|
+
export { _ as Popover, P as PopoverProps } from './Popover-BfuSZTJo.js';
|
|
16
16
|
export { T as Table, c as TableColumnProps, a as TableProps, b as TableRowProps, V as VariantProps, t as tableVariants } from './Table-D19f5nrd.js';
|
|
17
17
|
export { b as TabProps, T as Tabs, a as TabsProps, t as tabsVariants } from './Tabs-xUYwXMX9.js';
|
|
18
18
|
import * as tailwind_variants from 'tailwind-variants';
|
|
@@ -269,26 +269,41 @@ declare const toastVariants: tailwind_variants.TVReturnType<{
|
|
|
269
269
|
type AddToastVariantProps = TVProps<typeof toastVariants>;
|
|
270
270
|
type ClassName = TVClassName<typeof toastVariants>;
|
|
271
271
|
interface ToastProps extends AddToastVariantProps {
|
|
272
|
-
|
|
272
|
+
/** CSS class name */
|
|
273
273
|
className?: ClassName;
|
|
274
|
+
/** Icon displayed at the end of the Alert */
|
|
274
275
|
closeIcon?: ReactNode;
|
|
276
|
+
/** Color of the alert */
|
|
275
277
|
color?: AddToastVariantProps['color'];
|
|
278
|
+
/** Content displayed inside the Alert */
|
|
276
279
|
description?: ReactNode;
|
|
280
|
+
/** Content displayed at the end of the Alert */
|
|
277
281
|
endContent?: ReactNode;
|
|
282
|
+
/** Icon displayed at the start of the Alert */
|
|
278
283
|
icon?: ReactNode;
|
|
284
|
+
/** Icon or animation displayed until promise is resolved */
|
|
279
285
|
loadingIcon?: ReactNode;
|
|
286
|
+
/** Callback function called when the toast is closed */
|
|
280
287
|
onClose?: () => void;
|
|
288
|
+
/** Promise based on which the notification will be styled */
|
|
289
|
+
promise?: Promise<void>;
|
|
290
|
+
/** Whether the toast should show a progress bar */
|
|
281
291
|
shouldShowTimeoutProgress?: boolean;
|
|
292
|
+
/** Whether the toast should show a close button */
|
|
282
293
|
showCloseButton?: boolean;
|
|
294
|
+
/** Whether the toast should show an icon */
|
|
283
295
|
showIcon?: boolean;
|
|
296
|
+
/** Time the toast is displayed */
|
|
284
297
|
timeout?: number;
|
|
298
|
+
/** Content displayed at the top of the toast */
|
|
285
299
|
title?: ReactNode;
|
|
300
|
+
/** Variant of the toast */
|
|
286
301
|
variant?: AddToastVariantProps['variant'];
|
|
287
302
|
}
|
|
288
303
|
/**
|
|
289
304
|
* addToast function based on [HeroUI Toast](https://www.heroui.com//docs/components/toast)
|
|
290
305
|
*/
|
|
291
|
-
declare const addToast: ({
|
|
306
|
+
declare const addToast: ({ className, closeIcon, color, description, endContent, icon, loadingIcon, onClose, promise, shouldShowTimeoutProgress, showCloseButton, showIcon, timeout, title, variant, }: ToastProps) => void;
|
|
292
307
|
|
|
293
308
|
type ToastProviderToastProps = Omit<ToastProps, 'description' | 'endContent' | 'title'>;
|
|
294
309
|
interface ToastProviderProps {
|
package/dist/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
} from "./chunk-VBOUHWXM.js";
|
|
31
31
|
import {
|
|
32
32
|
Json_default
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-544LZP7D.js";
|
|
34
34
|
import {
|
|
35
35
|
Label_default,
|
|
36
36
|
labelVariants
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
import {
|
|
71
71
|
Button_default,
|
|
72
72
|
buttonVariants
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-TFKFBSSS.js";
|
|
74
74
|
import {
|
|
75
75
|
__spreadProps,
|
|
76
76
|
__spreadValues
|
|
@@ -145,7 +145,6 @@ var toastVariants = tv({
|
|
|
145
145
|
]
|
|
146
146
|
});
|
|
147
147
|
var addToast = ({
|
|
148
|
-
children = void 0,
|
|
149
148
|
className = void 0,
|
|
150
149
|
closeIcon = void 0,
|
|
151
150
|
color = "default",
|
|
@@ -154,11 +153,10 @@ var addToast = ({
|
|
|
154
153
|
icon = void 0,
|
|
155
154
|
loadingIcon = void 0,
|
|
156
155
|
onClose = void 0,
|
|
157
|
-
|
|
156
|
+
promise = void 0,
|
|
158
157
|
shouldShowTimeoutProgress = false,
|
|
159
158
|
showCloseButton = true,
|
|
160
159
|
showIcon = true,
|
|
161
|
-
// testId = undefined,
|
|
162
160
|
timeout = 5e3,
|
|
163
161
|
title = void 0,
|
|
164
162
|
variant = "bordered"
|
|
@@ -175,20 +173,20 @@ var addToast = ({
|
|
|
175
173
|
classNames,
|
|
176
174
|
closeIcon,
|
|
177
175
|
color: isHeroUIColor ? color : void 0,
|
|
178
|
-
// 'data-testid': testId,
|
|
176
|
+
// TODO: 'data-testid': testId,
|
|
179
177
|
// https://github.com/heroui-inc/heroui/issues/5033
|
|
180
178
|
// @ts-expect-error bug in hero-toast: description should be ReactNode
|
|
181
|
-
description
|
|
179
|
+
description,
|
|
182
180
|
endContent,
|
|
183
181
|
hideCloseButton: !showCloseButton,
|
|
184
182
|
hideIcon: !showIcon,
|
|
185
183
|
icon,
|
|
186
184
|
loadingIcon,
|
|
187
185
|
onClose,
|
|
188
|
-
|
|
186
|
+
promise,
|
|
189
187
|
shouldShowTimeoutProgress,
|
|
190
188
|
timeout,
|
|
191
|
-
title
|
|
189
|
+
title,
|
|
192
190
|
variant
|
|
193
191
|
});
|
|
194
192
|
};
|
|
@@ -203,7 +201,7 @@ var ToastProvider = ({
|
|
|
203
201
|
maxVisibleToasts = 5,
|
|
204
202
|
placement = "top-center",
|
|
205
203
|
toastProps = void 0,
|
|
206
|
-
toastOffset =
|
|
204
|
+
toastOffset = 26,
|
|
207
205
|
regionProps = void 0
|
|
208
206
|
}) => {
|
|
209
207
|
const variants = toastVariants({
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Toast/addToast.tsx","../src/Toast/ToastProvider.tsx"],"sourcesContent":["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 loadingIcon: '',\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
|
|
1
|
+
{"version":3,"sources":["../src/Toast/addToast.tsx","../src/Toast/ToastProvider.tsx"],"sourcesContent":["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 loadingIcon: '',\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 /** Icon or animation displayed until promise is resolved */\n loadingIcon?: 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 loadingIcon = 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 heroAddToast({\n classNames,\n closeIcon,\n color: isHeroUIColor ? (color as HeroToastProps['color']) : undefined,\n // TODO: 'data-testid': testId,\n // https://github.com/heroui-inc/heroui/issues/5033\n // @ts-expect-error bug in hero-toast: description should be ReactNode\n description,\n endContent,\n hideCloseButton: !showCloseButton,\n hideIcon: !showIcon,\n icon,\n loadingIcon,\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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ClE,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;","names":["heroToastVariants","variantsToClassNames","heroToastVariants","variantsToClassNames"]}
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@fuf-stack/pixels",
|
|
3
3
|
"description": "fuf core react component library",
|
|
4
4
|
"author": "Hannes Tiede",
|
|
5
|
-
"version": "0.39.
|
|
5
|
+
"version": "0.39.6",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"main": "./dist/index.cjs",
|
|
8
8
|
"module": "./dist/index.js",
|
|
@@ -178,10 +178,10 @@
|
|
|
178
178
|
"@uiw/react-json-view": "2.0.0-alpha.30",
|
|
179
179
|
"react": "19.0.0",
|
|
180
180
|
"react-dom": "19.0.0",
|
|
181
|
+
"@repo/storybook-config": "0.0.1",
|
|
181
182
|
"@repo/tailwind-config": "0.0.1",
|
|
182
183
|
"@repo/tsup-config": "0.0.1",
|
|
183
|
-
"@repo/vite-config": "0.0.1"
|
|
184
|
-
"@repo/storybook-config": "0.0.1"
|
|
184
|
+
"@repo/vite-config": "0.0.1"
|
|
185
185
|
},
|
|
186
186
|
"scripts": {
|
|
187
187
|
"build": "tsup --config node_modules/@repo/tsup-config/config.ts --dts-resolve",
|