@fuf-stack/pixels 0.39.3 → 0.39.4
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/Avatar/index.d.cts +2 -2
- package/dist/Avatar/index.d.ts +2 -2
- package/dist/AvatarGroup/index.d.cts +3 -3
- package/dist/AvatarGroup/index.d.ts +3 -3
- package/dist/{AvatarGroup-BMKOfE_a.d.ts → AvatarGroup-BfOtqfJy.d.ts} +1 -1
- package/dist/{AvatarGroup-2Lmu_V2d.d.cts → AvatarGroup-CUyQwK3t.d.cts} +1 -1
- package/dist/Drawer/index.d.cts +2 -2
- package/dist/Drawer/index.d.ts +2 -2
- package/dist/Label/index.cjs +4 -2
- package/dist/Label/index.cjs.map +1 -1
- package/dist/Label/index.d.cts +2 -2
- package/dist/Label/index.d.ts +2 -2
- package/dist/Label/index.js +5 -3
- package/dist/{Label-DwxfVdeO.d.cts → Label-Bp9WZiDB.d.cts} +1 -1
- package/dist/{Label-DwxfVdeO.d.ts → Label-Bp9WZiDB.d.ts} +1 -1
- package/dist/{chunk-2ZZQMA67.js → chunk-KIRRQFSZ.js} +2 -1
- package/dist/{chunk-2ZZQMA67.js.map → chunk-KIRRQFSZ.js.map} +1 -1
- package/dist/{chunk-PEAL73DH.cjs → chunk-PLJWIGRS.cjs} +3 -2
- package/dist/chunk-PLJWIGRS.cjs.map +1 -0
- package/dist/index.cjs +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +8 -6
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
- package/dist/chunk-PEAL73DH.cjs.map +0 -1
- package/dist/{Avatar-B8lVnLpp.d.cts → Avatar-ylNJ_-dY.d.cts} +5 -5
- package/dist/{Avatar-B8lVnLpp.d.ts → Avatar-ylNJ_-dY.d.ts} +5 -5
- package/dist/{Drawer-DmwcvuKe.d.cts → Drawer-BnV9qxPA.d.cts} +5 -5
- package/dist/{Drawer-DmwcvuKe.d.ts → Drawer-BnV9qxPA.d.ts} +5 -5
package/dist/Avatar/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Avatar } from '../Avatar-
|
|
2
|
-
export { a as AvatarProps } from '../Avatar-
|
|
1
|
+
import { A as Avatar } from '../Avatar-ylNJ_-dY.cjs';
|
|
2
|
+
export { a as AvatarProps } from '../Avatar-ylNJ_-dY.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
package/dist/Avatar/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { A as Avatar } from '../Avatar-
|
|
2
|
-
export { a as AvatarProps } from '../Avatar-
|
|
1
|
+
import { A as Avatar } from '../Avatar-ylNJ_-dY.js';
|
|
2
|
+
export { a as AvatarProps } from '../Avatar-ylNJ_-dY.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as AvatarGroup } from '../AvatarGroup-
|
|
2
|
-
export { a as AvatarGroupProps } from '../AvatarGroup-
|
|
1
|
+
import { A as AvatarGroup } from '../AvatarGroup-CUyQwK3t.cjs';
|
|
2
|
+
export { a as AvatarGroupProps } from '../AvatarGroup-CUyQwK3t.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../Avatar-
|
|
5
|
+
import '../Avatar-ylNJ_-dY.cjs';
|
|
6
6
|
import 'tailwind-variants/dist/config.js';
|
|
7
7
|
import 'tailwind-variants';
|
|
8
8
|
import '@fuf-stack/pixel-utils';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as AvatarGroup } from '../AvatarGroup-
|
|
2
|
-
export { a as AvatarGroupProps } from '../AvatarGroup-
|
|
1
|
+
import { A as AvatarGroup } from '../AvatarGroup-BfOtqfJy.js';
|
|
2
|
+
export { a as AvatarGroupProps } from '../AvatarGroup-BfOtqfJy.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'react';
|
|
5
|
-
import '../Avatar-
|
|
5
|
+
import '../Avatar-ylNJ_-dY.js';
|
|
6
6
|
import 'tailwind-variants/dist/config.js';
|
|
7
7
|
import 'tailwind-variants';
|
|
8
8
|
import '@fuf-stack/pixel-utils';
|
package/dist/Drawer/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as Drawer } from '../Drawer-
|
|
2
|
-
export { f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from '../Drawer-
|
|
1
|
+
import { D as Drawer } from '../Drawer-BnV9qxPA.cjs';
|
|
2
|
+
export { f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from '../Drawer-BnV9qxPA.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
package/dist/Drawer/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as Drawer } from '../Drawer-
|
|
2
|
-
export { f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from '../Drawer-
|
|
1
|
+
import { D as Drawer } from '../Drawer-BnV9qxPA.js';
|
|
2
|
+
export { f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from '../Drawer-BnV9qxPA.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants/dist/config.js';
|
|
5
5
|
import 'tailwind-variants';
|
package/dist/Label/index.cjs
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
|
|
5
|
+
var _chunkPLJWIGRScjs = require('../chunk-PLJWIGRS.cjs');
|
|
5
6
|
require('../chunk-D4TLDLEX.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
|
|
11
|
+
exports.Label = _chunkPLJWIGRScjs.Label_default; exports.default = _chunkPLJWIGRScjs.Label_default2; exports.labelVariants = _chunkPLJWIGRScjs.labelVariants;
|
|
10
12
|
//# sourceMappingURL=index.cjs.map
|
package/dist/Label/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/Label/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACF,
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/Label/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACF,6JAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/Label/index.cjs"}
|
package/dist/Label/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as Label } from '../Label-
|
|
2
|
-
export { a as LabelProps } from '../Label-
|
|
1
|
+
import { L as Label } from '../Label-Bp9WZiDB.cjs';
|
|
2
|
+
export { a as LabelProps, l as labelVariants } from '../Label-Bp9WZiDB.cjs';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants';
|
|
5
5
|
import 'tailwind-variants/dist/config.js';
|
package/dist/Label/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { L as Label } from '../Label-
|
|
2
|
-
export { a as LabelProps } from '../Label-
|
|
1
|
+
import { L as Label } from '../Label-Bp9WZiDB.js';
|
|
2
|
+
export { a as LabelProps, l as labelVariants } from '../Label-Bp9WZiDB.js';
|
|
3
3
|
import 'react/jsx-runtime';
|
|
4
4
|
import 'tailwind-variants';
|
|
5
5
|
import 'tailwind-variants/dist/config.js';
|
package/dist/Label/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Label_default,
|
|
3
|
-
Label_default2
|
|
4
|
-
|
|
3
|
+
Label_default2,
|
|
4
|
+
labelVariants
|
|
5
|
+
} from "../chunk-KIRRQFSZ.js";
|
|
5
6
|
import "../chunk-J7N2552D.js";
|
|
6
7
|
export {
|
|
7
8
|
Label_default as Label,
|
|
8
|
-
Label_default2 as default
|
|
9
|
+
Label_default2 as default,
|
|
10
|
+
labelVariants
|
|
9
11
|
};
|
|
10
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -149,4 +149,4 @@ interface LabelProps extends VariantProps {
|
|
|
149
149
|
*/
|
|
150
150
|
declare const Label: ({ children, className: _className, color, endContent, icon, onClose, radius, size, variant, }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
151
151
|
|
|
152
|
-
export { Label as L, type LabelProps as a };
|
|
152
|
+
export { Label as L, type LabelProps as a, labelVariants as l };
|
|
@@ -149,4 +149,4 @@ interface LabelProps extends VariantProps {
|
|
|
149
149
|
*/
|
|
150
150
|
declare const Label: ({ children, className: _className, color, endContent, icon, onClose, radius, size, variant, }: LabelProps) => react_jsx_runtime.JSX.Element;
|
|
151
151
|
|
|
152
|
-
export { Label as L, type LabelProps as a };
|
|
152
|
+
export { Label as L, type LabelProps as a, labelVariants as l };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/Label/Label.tsx","../src/Label/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChipProps } from '@heroui/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as HeroLabel } from '@heroui/chip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// label variants\nexport const labelVariants = tv({\n slots: {\n base: '',\n closeButton: '',\n content: '',\n dot: '',\n icon: '',\n },\n variants: {\n isIconOnly: {\n true: {\n content: 'px-1',\n },\n false: {\n content: 'flex items-center gap-2',\n },\n },\n hasEndContent: {\n true: {\n base: 'pr-2',\n },\n },\n },\n});\n\ntype VariantProps = TVProps<typeof labelVariants>;\ntype ClassName = TVClassName<typeof labelVariants>;\n\nexport interface LabelProps extends VariantProps {\n /** content of the label */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** color of the label */\n color?: ChipProps['color'];\n /** element to be rendered in the right side of the label */\n endContent?: ChipProps['endContent'];\n /** optional label icon, when only icon provided without children and endContent */\n icon?: ReactNode;\n /** add close button to endContent */\n onClose?: ChipProps['onClose'];\n /** radius of the label */\n radius?: ChipProps['radius'];\n /** size of the label */\n size?: ChipProps['size'];\n /** style variant of the label */\n variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';\n}\n\n/**\n * Label component based on [HeroUI Chip](https://www.heroui.com//docs/components/chip)\n */\nconst Label = ({\n children = undefined,\n className: _className = undefined,\n color = 'default',\n endContent = undefined,\n icon = undefined,\n onClose = undefined,\n radius = 'full',\n size = 'md',\n variant = 'solid',\n}: LabelProps) => {\n // determine variants based on props\n const isIconOnly = !!icon && !children && !endContent;\n const hasEndContent = !!endContent;\n\n // classNames from slots\n const variants = labelVariants({ isIconOnly, hasEndContent });\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroLabel\n classNames={classNames}\n color={color}\n endContent={endContent}\n radius={radius}\n onClose={onClose}\n size={size}\n variant={variant}\n >\n {icon && <span className={classNames.icon}>{icon}</span>}\n {children}\n </HeroLabel>\n );\n};\n\nexport default Label;\n","import Label from './Label';\n\nexport type { LabelProps } from './Label';\n\nexport { Label };\n\nexport default Label;\n"],"mappings":";AAIA,SAAS,QAAQ,iBAAiB;AAElC,SAAS,IAAI,4BAA4B;AA2ErC,SASW,KATX;AAxEG,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,IACT,KAAK;AAAA,IACL,MAAM;AAAA,EACR;AAAA,EACA,UAAU;AAAA,IACR,YAAY;AAAA,MACV,MAAM;AAAA,QACJ,SAAS;AAAA,MACX;AAAA,MACA,OAAO;AAAA,QACL,SAAS;AAAA,MACX;AAAA,IACF;AAAA,IACA,eAAe;AAAA,MACb,MAAM;AAAA,QACJ,MAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF,CAAC;AA6BD,IAAM,QAAQ,CAAC;AAAA,EACb,WAAW;AAAA,EACX,WAAW,aAAa;AAAA,EACxB,QAAQ;AAAA,EACR,aAAa;AAAA,EACb,OAAO;AAAA,EACP,UAAU;AAAA,EACV,SAAS;AAAA,EACT,OAAO;AAAA,EACP,UAAU;AACZ,MAAkB;AAEhB,QAAM,aAAa,CAAC,CAAC,QAAQ,CAAC,YAAY,CAAC;AAC3C,QAAM,gBAAgB,CAAC,CAAC;AAGxB,QAAM,WAAW,cAAc,EAAE,YAAY,cAAc,CAAC;AAC5D,QAAM,aAAa,qBAAqB,UAAU,YAAY,MAAM;AAEpE,SACE;AAAA,IAAC;AAAA;AAAA,MACC;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MAEC;AAAA,gBAAQ,oBAAC,UAAK,WAAW,WAAW,MAAO,gBAAK;AAAA,QAChD;AAAA;AAAA;AAAA,EACH;AAEJ;AAEA,IAAO,gBAAQ;;;AC1Ff,IAAOA,iBAAQ;","names":["Label_default"]}
|
|
1
|
+
{"version":3,"sources":["../src/Label/Label.tsx","../src/Label/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChipProps } from '@heroui/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as HeroLabel } from '@heroui/chip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// label variants\nexport const labelVariants = tv({\n slots: {\n base: '',\n closeButton: '',\n content: '',\n dot: '',\n icon: '',\n },\n variants: {\n isIconOnly: {\n true: {\n content: 'px-1',\n },\n false: {\n content: 'flex items-center gap-2',\n },\n },\n hasEndContent: {\n true: {\n base: 'pr-2',\n },\n },\n },\n});\n\ntype VariantProps = TVProps<typeof labelVariants>;\ntype ClassName = TVClassName<typeof labelVariants>;\n\nexport interface LabelProps extends VariantProps {\n /** content of the label */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** color of the label */\n color?: ChipProps['color'];\n /** element to be rendered in the right side of the label */\n endContent?: ChipProps['endContent'];\n /** optional label icon, when only icon provided without children and endContent */\n icon?: ReactNode;\n /** add close button to endContent */\n onClose?: ChipProps['onClose'];\n /** radius of the label */\n radius?: ChipProps['radius'];\n /** size of the label */\n size?: ChipProps['size'];\n /** style variant of the label */\n variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';\n}\n\n/**\n * Label component based on [HeroUI Chip](https://www.heroui.com//docs/components/chip)\n */\nconst Label = ({\n children = undefined,\n className: _className = undefined,\n color = 'default',\n endContent = undefined,\n icon = undefined,\n onClose = undefined,\n radius = 'full',\n size = 'md',\n variant = 'solid',\n}: LabelProps) => {\n // determine variants based on props\n const isIconOnly = !!icon && !children && !endContent;\n const hasEndContent = !!endContent;\n\n // classNames from slots\n const variants = labelVariants({ isIconOnly, hasEndContent });\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroLabel\n classNames={classNames}\n color={color}\n endContent={endContent}\n radius={radius}\n onClose={onClose}\n size={size}\n variant={variant}\n >\n {icon && <span className={classNames.icon}>{icon}</span>}\n {children}\n </HeroLabel>\n );\n};\n\nexport default Label;\n","import Label, { labelVariants } from './Label';\n\nexport type { LabelProps } from './Label';\n\nexport { Label, labelVariants };\n\nexport default Label;\n"],"mappings":";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ports.labelVariants = labelVariants; exports.Label_default = Label_default; exports.Label_default2 = Label_default2;
|
|
71
|
+
//# sourceMappingURL=chunk-PLJWIGRS.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-PLJWIGRS.cjs","../src/Label/Label.tsx","../src/Label/index.ts"],"names":["Label_default"],"mappings":"AAAA;ACIA,oCAAkC;AAElC,oDAAyC;AA2ErC,+CAAA;AAxEG,IAAM,cAAA,EAAgB,4BAAA;AAAG,EAC9B,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,EAAA;AAAA,IACN,WAAA,EAAa,EAAA;AAAA,IACb,OAAA,EAAS,EAAA;AAAA,IACT,GAAA,EAAK,EAAA;AAAA,IACL,IAAA,EAAM;AAAA,EACR,CAAA;AAAA,EACA,QAAA,EAAU;AAAA,IACR,UAAA,EAAY;AAAA,MACV,IAAA,EAAM;AAAA,QACJ,OAAA,EAAS;AAAA,MACX,CAAA;AAAA,MACA,KAAA,EAAO;AAAA,QACL,OAAA,EAAS;AAAA,MACX;AAAA,IACF,CAAA;AAAA,IACA,aAAA,EAAe;AAAA,MACb,IAAA,EAAM;AAAA,QACJ,IAAA,EAAM;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACF,CAAC,CAAA;AA6BD,IAAM,MAAA,EAAQ,CAAC;AAAA,EACb,SAAA,EAAW,KAAA,CAAA;AAAA,EACX,SAAA,EAAW,WAAA,EAAa,KAAA,CAAA;AAAA,EACxB,MAAA,EAAQ,SAAA;AAAA,EACR,WAAA,EAAa,KAAA,CAAA;AAAA,EACb,KAAA,EAAO,KAAA,CAAA;AAAA,EACP,QAAA,EAAU,KAAA,CAAA;AAAA,EACV,OAAA,EAAS,MAAA;AAAA,EACT,KAAA,EAAO,IAAA;AAAA,EACP,QAAA,EAAU;AACZ,CAAA,EAAA,GAAkB;AAEhB,EAAA,MAAM,WAAA,EAAa,CAAC,CAAC,KAAA,GAAQ,CAAC,SAAA,GAAY,CAAC,UAAA;AAC3C,EAAA,MAAM,cAAA,EAAgB,CAAC,CAAC,UAAA;AAGxB,EAAA,MAAM,SAAA,EAAW,aAAA,CAAc,EAAE,UAAA,EAAY,cAAc,CAAC,CAAA;AAC5D,EAAA,MAAM,WAAA,EAAa,8CAAA,QAAqB,EAAU,UAAA,EAAY,MAAM,CAAA;AAEpE,EAAA,uBACE,8BAAA;AAAA,IAAC,UAAA;AAAA,IAAA;AAAA,MACC,UAAA;AAAA,MACA,KAAA;AAAA,MACA,UAAA;AAAA,MACA,MAAA;AAAA,MACA,OAAA;AAAA,MACA,IAAA;AAAA,MACA,OAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,KAAA,mBAAQ,6BAAA,MAAC,EAAA,EAAK,SAAA,EAAW,UAAA,CAAW,IAAA,EAAO,QAAA,EAAA,KAAA,CAAK,CAAA;AAAA,QAChD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,CAAA;AAEJ,CAAA;AAEA,IAAO,cAAA,EAAQ,KAAA;ADnCf;AACA;AExDA,IAAOA,eAAAA,EAAQ,aAAA;AF0Df;AACA;AACE;AACA;AACA;AACF,sHAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-PLJWIGRS.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChipProps } from '@heroui/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as HeroLabel } from '@heroui/chip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// label variants\nexport const labelVariants = tv({\n slots: {\n base: '',\n closeButton: '',\n content: '',\n dot: '',\n icon: '',\n },\n variants: {\n isIconOnly: {\n true: {\n content: 'px-1',\n },\n false: {\n content: 'flex items-center gap-2',\n },\n },\n hasEndContent: {\n true: {\n base: 'pr-2',\n },\n },\n },\n});\n\ntype VariantProps = TVProps<typeof labelVariants>;\ntype ClassName = TVClassName<typeof labelVariants>;\n\nexport interface LabelProps extends VariantProps {\n /** content of the label */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** color of the label */\n color?: ChipProps['color'];\n /** element to be rendered in the right side of the label */\n endContent?: ChipProps['endContent'];\n /** optional label icon, when only icon provided without children and endContent */\n icon?: ReactNode;\n /** add close button to endContent */\n onClose?: ChipProps['onClose'];\n /** radius of the label */\n radius?: ChipProps['radius'];\n /** size of the label */\n size?: ChipProps['size'];\n /** style variant of the label */\n variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';\n}\n\n/**\n * Label component based on [HeroUI Chip](https://www.heroui.com//docs/components/chip)\n */\nconst Label = ({\n children = undefined,\n className: _className = undefined,\n color = 'default',\n endContent = undefined,\n icon = undefined,\n onClose = undefined,\n radius = 'full',\n size = 'md',\n variant = 'solid',\n}: LabelProps) => {\n // determine variants based on props\n const isIconOnly = !!icon && !children && !endContent;\n const hasEndContent = !!endContent;\n\n // classNames from slots\n const variants = labelVariants({ isIconOnly, hasEndContent });\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroLabel\n classNames={classNames}\n color={color}\n endContent={endContent}\n radius={radius}\n onClose={onClose}\n size={size}\n variant={variant}\n >\n {icon && <span className={classNames.icon}>{icon}</span>}\n {children}\n </HeroLabel>\n );\n};\n\nexport default Label;\n","import Label, { labelVariants } from './Label';\n\nexport type { LabelProps } from './Label';\n\nexport { Label, labelVariants };\n\nexport default Label;\n"]}
|
package/dist/index.cjs
CHANGED
|
@@ -33,7 +33,8 @@ var _chunk7RVUB6I5cjs = require('./chunk-7RVUB6I5.cjs');
|
|
|
33
33
|
var _chunkZASS525Kcjs = require('./chunk-ZASS525K.cjs');
|
|
34
34
|
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
|
|
37
|
+
var _chunkPLJWIGRScjs = require('./chunk-PLJWIGRS.cjs');
|
|
37
38
|
|
|
38
39
|
|
|
39
40
|
var _chunkXHOAZB2Zcjs = require('./chunk-XHOAZB2Z.cjs');
|
|
@@ -48,11 +49,11 @@ require('./chunk-TX2VP4J7.cjs');
|
|
|
48
49
|
|
|
49
50
|
|
|
50
51
|
|
|
51
|
-
var
|
|
52
|
+
var _chunk2P5WWVQ6cjs = require('./chunk-2P5WWVQ6.cjs');
|
|
52
53
|
|
|
53
54
|
|
|
54
55
|
|
|
55
|
-
var
|
|
56
|
+
var _chunkYVPRFCWIcjs = require('./chunk-YVPRFCWI.cjs');
|
|
56
57
|
|
|
57
58
|
|
|
58
59
|
var _chunkLIZGYO24cjs = require('./chunk-LIZGYO24.cjs');
|
|
@@ -270,5 +271,6 @@ var ToastProvider_default = ToastProvider;
|
|
|
270
271
|
|
|
271
272
|
|
|
272
273
|
|
|
273
|
-
|
|
274
|
+
|
|
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 = _chunk4X43AGXEcjs.Button_default; exports.ButtonGroup = _chunkY3RSI2KVcjs.ButtonGroup_default; exports.Card = _chunkMHZAWSFJcjs.Card_default; exports.Drawer = _chunk7RVUB6I5cjs.Drawer_default; exports.Json = _chunkZASS525Kcjs.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 = _chunk4X43AGXEcjs.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;
|
|
274
276
|
//# 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;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;AAC7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AAA,EAAS,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY;AAAA,EACvB,CAAC,CAAA;AACD,EAAA,MAAM,cAAA,EAAgB,MAAA,CAAO,IAAA,CAAKA,YAAAA,CAAkB,QAAA,CAAS,KAAK,CAAA,CAAE,QAAA;AAAA,IAAA,CAClE,WAAA,GAAA,KAAA,EAAA,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;AFmKf;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;AACF,+3DAAC","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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AAA,UAAA,CAAY,KAAA;AAAA,IACnB,OAAA,EAAS,WAAA,GAAA,KAAA,EAAA,KAAA,EAAA,EAAA,UAAA,CAAY;AAAA,EACvB,CAAC,CAAA;AACD,EAAA,MAAM,cAAA,EAAgB,MAAA,CAAO,IAAA,CAAKA,YAAAA,CAAkB,QAAA,CAAS,KAAK,CAAA,CAAE,QAAA;AAAA,IAAA,CAClE,WAAA,GAAA,KAAA,EAAA,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"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export { A as Accordion, c as AccordionItemProps, b as AccordionProps, a as accordionVariants } from './Accordion-rA715N0Z.cjs';
|
|
2
2
|
export { A as Alert, b as AlertProps, a as alertVariants } from './Alert-DELD9ZWe.cjs';
|
|
3
|
-
export { A as Avatar, a as AvatarProps } from './Avatar-
|
|
4
|
-
export { A as AvatarGroup, a as AvatarGroupProps } from './AvatarGroup-
|
|
3
|
+
export { A as Avatar, a as AvatarProps } from './Avatar-ylNJ_-dY.cjs';
|
|
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
7
|
export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-BGekDPvO.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
|
-
export { D as Drawer, f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from './Drawer-
|
|
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';
|
|
11
11
|
export { J as Json, a as JsonProps } from './Json-ngM0f9n2.cjs';
|
|
12
|
-
export { L as Label, a as LabelProps } from './Label-
|
|
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
15
|
export { _ as Popover, P as PopoverProps } from './Popover-BXyk9y8I.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export { A as Accordion, c as AccordionItemProps, b as AccordionProps, a as accordionVariants } from './Accordion-rA715N0Z.js';
|
|
2
2
|
export { A as Alert, b as AlertProps, a as alertVariants } from './Alert-DELD9ZWe.js';
|
|
3
|
-
export { A as Avatar, a as AvatarProps } from './Avatar-
|
|
4
|
-
export { A as AvatarGroup, a as AvatarGroupProps } from './AvatarGroup-
|
|
3
|
+
export { A as Avatar, a as AvatarProps } from './Avatar-ylNJ_-dY.js';
|
|
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
7
|
export { B as Button, a as ButtonProps, b as buttonVariants } from './Button-BGekDPvO.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
|
-
export { D as Drawer, f as DrawerProps, d as drawerBackdrops, a as drawerPlacements, b as drawerRadii, c as drawerSizes, e as drawerVariants } from './Drawer-
|
|
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';
|
|
11
11
|
export { J as Json, a as JsonProps } from './Json-ngM0f9n2.js';
|
|
12
|
-
export { L as Label, a as LabelProps } from './Label-
|
|
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
15
|
export { _ as Popover, P as PopoverProps } from './Popover-BHPrdRy6.js';
|
package/dist/index.js
CHANGED
|
@@ -32,8 +32,9 @@ import {
|
|
|
32
32
|
Json_default
|
|
33
33
|
} from "./chunk-3JUTQREC.js";
|
|
34
34
|
import {
|
|
35
|
-
Label_default
|
|
36
|
-
|
|
35
|
+
Label_default,
|
|
36
|
+
labelVariants
|
|
37
|
+
} from "./chunk-KIRRQFSZ.js";
|
|
37
38
|
import {
|
|
38
39
|
Menu_default
|
|
39
40
|
} from "./chunk-OP5W7BXY.js";
|
|
@@ -45,14 +46,14 @@ import {
|
|
|
45
46
|
Popover_default
|
|
46
47
|
} from "./chunk-5TOE75VE.js";
|
|
47
48
|
import "./chunk-EQVC4PJE.js";
|
|
48
|
-
import {
|
|
49
|
-
Alert_default,
|
|
50
|
-
alertVariants
|
|
51
|
-
} from "./chunk-MG3PTEMK.js";
|
|
52
49
|
import {
|
|
53
50
|
Accordion_default,
|
|
54
51
|
accordionVariants
|
|
55
52
|
} from "./chunk-NHEC3GYW.js";
|
|
53
|
+
import {
|
|
54
|
+
Alert_default,
|
|
55
|
+
alertVariants
|
|
56
|
+
} from "./chunk-MG3PTEMK.js";
|
|
56
57
|
import {
|
|
57
58
|
AvatarGroup_default
|
|
58
59
|
} from "./chunk-3QICKBFS.js";
|
|
@@ -264,6 +265,7 @@ export {
|
|
|
264
265
|
drawerRadii,
|
|
265
266
|
drawerSizes,
|
|
266
267
|
drawerVariants,
|
|
268
|
+
labelVariants,
|
|
267
269
|
modalVariants,
|
|
268
270
|
tableVariants,
|
|
269
271
|
tabsVariants,
|
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 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"],"mappings":"
|
|
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 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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAY;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.4",
|
|
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",
|
|
182
181
|
"@repo/tailwind-config": "0.0.1",
|
|
182
|
+
"@repo/tsup-config": "0.0.1",
|
|
183
183
|
"@repo/vite-config": "0.0.1",
|
|
184
|
-
"@repo/
|
|
184
|
+
"@repo/storybook-config": "0.0.1"
|
|
185
185
|
},
|
|
186
186
|
"scripts": {
|
|
187
187
|
"build": "tsup --config node_modules/@repo/tsup-config/config.ts --dts-resolve",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-PEAL73DH.cjs","../src/Label/Label.tsx","../src/Label/index.ts"],"names":["Label_default"],"mappings":"AAAA;ACIA,oCAAkC;AAElC,oDAAyC;AA2ErC,+CAAA;AAxEG,IAAM,cAAA,EAAgB,4BAAA;AAAG,EAC9B,KAAA,EAAO;AAAA,IACL,IAAA,EA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,MACA,IAAA;AAAA,MACA,OAAA;AAAA,MAEC,QAAA,EAAA;AAAA,QAAA,KAAA,mBAAQ,6BAAA,MAAC,EAAA,EAAK,SAAA,EAAW,UAAA,CAAW,IAAA,EAAO,QAAA,EAAA,KAAA,CAAK,CAAA;AAAA,QAChD;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,CAAA;AAEJ,CAAA;AAEA,IAAO,cAAA,EAAQ,KAAA;ADnCf;AACA;AExDA,IAAOA,eAAAA,EAAQ,aAAA;AF0Df;AACA;AACE;AACA;AACF,+EAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-PEAL73DH.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ChipProps } from '@heroui/chip';\nimport type { ReactNode } from 'react';\n\nimport { Chip as HeroLabel } from '@heroui/chip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// label variants\nexport const labelVariants = tv({\n slots: {\n base: '',\n closeButton: '',\n content: '',\n dot: '',\n icon: '',\n },\n variants: {\n isIconOnly: {\n true: {\n content: 'px-1',\n },\n false: {\n content: 'flex items-center gap-2',\n },\n },\n hasEndContent: {\n true: {\n base: 'pr-2',\n },\n },\n },\n});\n\ntype VariantProps = TVProps<typeof labelVariants>;\ntype ClassName = TVClassName<typeof labelVariants>;\n\nexport interface LabelProps extends VariantProps {\n /** content of the label */\n children?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** color of the label */\n color?: ChipProps['color'];\n /** element to be rendered in the right side of the label */\n endContent?: ChipProps['endContent'];\n /** optional label icon, when only icon provided without children and endContent */\n icon?: ReactNode;\n /** add close button to endContent */\n onClose?: ChipProps['onClose'];\n /** radius of the label */\n radius?: ChipProps['radius'];\n /** size of the label */\n size?: ChipProps['size'];\n /** style variant of the label */\n variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'dot';\n}\n\n/**\n * Label component based on [HeroUI Chip](https://www.heroui.com//docs/components/chip)\n */\nconst Label = ({\n children = undefined,\n className: _className = undefined,\n color = 'default',\n endContent = undefined,\n icon = undefined,\n onClose = undefined,\n radius = 'full',\n size = 'md',\n variant = 'solid',\n}: LabelProps) => {\n // determine variants based on props\n const isIconOnly = !!icon && !children && !endContent;\n const hasEndContent = !!endContent;\n\n // classNames from slots\n const variants = labelVariants({ isIconOnly, hasEndContent });\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroLabel\n classNames={classNames}\n color={color}\n endContent={endContent}\n radius={radius}\n onClose={onClose}\n size={size}\n variant={variant}\n >\n {icon && <span className={classNames.icon}>{icon}</span>}\n {children}\n </HeroLabel>\n );\n};\n\nexport default Label;\n","import Label from './Label';\n\nexport type { LabelProps } from './Label';\n\nexport { Label };\n\nexport default Label;\n"]}
|
|
@@ -8,9 +8,9 @@ declare const avatarVariants: tailwind_variants.TVReturnType<{
|
|
|
8
8
|
[key: string]: {
|
|
9
9
|
[key: string]: tailwind_variants.ClassValue | {
|
|
10
10
|
base?: tailwind_variants.ClassValue;
|
|
11
|
-
icon?: tailwind_variants.ClassValue;
|
|
12
11
|
img?: tailwind_variants.ClassValue;
|
|
13
12
|
name?: tailwind_variants.ClassValue;
|
|
13
|
+
icon?: tailwind_variants.ClassValue;
|
|
14
14
|
fallback?: tailwind_variants.ClassValue;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
@@ -18,9 +18,9 @@ declare const avatarVariants: tailwind_variants.TVReturnType<{
|
|
|
18
18
|
[x: string]: {
|
|
19
19
|
[x: string]: tailwind_variants.ClassValue | {
|
|
20
20
|
base?: tailwind_variants.ClassValue;
|
|
21
|
-
icon?: tailwind_variants.ClassValue;
|
|
22
21
|
img?: tailwind_variants.ClassValue;
|
|
23
22
|
name?: tailwind_variants.ClassValue;
|
|
23
|
+
icon?: tailwind_variants.ClassValue;
|
|
24
24
|
fallback?: tailwind_variants.ClassValue;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -34,9 +34,9 @@ declare const avatarVariants: tailwind_variants.TVReturnType<{
|
|
|
34
34
|
[key: string]: {
|
|
35
35
|
[key: string]: tailwind_variants.ClassValue | {
|
|
36
36
|
base?: tailwind_variants.ClassValue;
|
|
37
|
-
icon?: tailwind_variants.ClassValue;
|
|
38
37
|
img?: tailwind_variants.ClassValue;
|
|
39
38
|
name?: tailwind_variants.ClassValue;
|
|
39
|
+
icon?: tailwind_variants.ClassValue;
|
|
40
40
|
fallback?: tailwind_variants.ClassValue;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
@@ -44,9 +44,9 @@ declare const avatarVariants: tailwind_variants.TVReturnType<{
|
|
|
44
44
|
[key: string]: {
|
|
45
45
|
[key: string]: tailwind_variants.ClassValue | {
|
|
46
46
|
base?: tailwind_variants.ClassValue;
|
|
47
|
-
icon?: tailwind_variants.ClassValue;
|
|
48
47
|
img?: tailwind_variants.ClassValue;
|
|
49
48
|
name?: tailwind_variants.ClassValue;
|
|
49
|
+
icon?: tailwind_variants.ClassValue;
|
|
50
50
|
fallback?: tailwind_variants.ClassValue;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
@@ -66,9 +66,9 @@ declare const avatarVariants: tailwind_variants.TVReturnType<{
|
|
|
66
66
|
[key: string]: {
|
|
67
67
|
[key: string]: tailwind_variants.ClassValue | {
|
|
68
68
|
base?: tailwind_variants.ClassValue;
|
|
69
|
-
icon?: tailwind_variants.ClassValue;
|
|
70
69
|
img?: tailwind_variants.ClassValue;
|
|
71
70
|
name?: tailwind_variants.ClassValue;
|
|
71
|
+
icon?: tailwind_variants.ClassValue;
|
|
72
72
|
fallback?: tailwind_variants.ClassValue;
|
|
73
73
|
};
|
|
74
74
|
};
|
|
@@ -8,9 +8,9 @@ declare const avatarVariants: tailwind_variants.TVReturnType<{
|
|
|
8
8
|
[key: string]: {
|
|
9
9
|
[key: string]: tailwind_variants.ClassValue | {
|
|
10
10
|
base?: tailwind_variants.ClassValue;
|
|
11
|
-
icon?: tailwind_variants.ClassValue;
|
|
12
11
|
img?: tailwind_variants.ClassValue;
|
|
13
12
|
name?: tailwind_variants.ClassValue;
|
|
13
|
+
icon?: tailwind_variants.ClassValue;
|
|
14
14
|
fallback?: tailwind_variants.ClassValue;
|
|
15
15
|
};
|
|
16
16
|
};
|
|
@@ -18,9 +18,9 @@ declare const avatarVariants: tailwind_variants.TVReturnType<{
|
|
|
18
18
|
[x: string]: {
|
|
19
19
|
[x: string]: tailwind_variants.ClassValue | {
|
|
20
20
|
base?: tailwind_variants.ClassValue;
|
|
21
|
-
icon?: tailwind_variants.ClassValue;
|
|
22
21
|
img?: tailwind_variants.ClassValue;
|
|
23
22
|
name?: tailwind_variants.ClassValue;
|
|
23
|
+
icon?: tailwind_variants.ClassValue;
|
|
24
24
|
fallback?: tailwind_variants.ClassValue;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
@@ -34,9 +34,9 @@ declare const avatarVariants: tailwind_variants.TVReturnType<{
|
|
|
34
34
|
[key: string]: {
|
|
35
35
|
[key: string]: tailwind_variants.ClassValue | {
|
|
36
36
|
base?: tailwind_variants.ClassValue;
|
|
37
|
-
icon?: tailwind_variants.ClassValue;
|
|
38
37
|
img?: tailwind_variants.ClassValue;
|
|
39
38
|
name?: tailwind_variants.ClassValue;
|
|
39
|
+
icon?: tailwind_variants.ClassValue;
|
|
40
40
|
fallback?: tailwind_variants.ClassValue;
|
|
41
41
|
};
|
|
42
42
|
};
|
|
@@ -44,9 +44,9 @@ declare const avatarVariants: tailwind_variants.TVReturnType<{
|
|
|
44
44
|
[key: string]: {
|
|
45
45
|
[key: string]: tailwind_variants.ClassValue | {
|
|
46
46
|
base?: tailwind_variants.ClassValue;
|
|
47
|
-
icon?: tailwind_variants.ClassValue;
|
|
48
47
|
img?: tailwind_variants.ClassValue;
|
|
49
48
|
name?: tailwind_variants.ClassValue;
|
|
49
|
+
icon?: tailwind_variants.ClassValue;
|
|
50
50
|
fallback?: tailwind_variants.ClassValue;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
@@ -66,9 +66,9 @@ declare const avatarVariants: tailwind_variants.TVReturnType<{
|
|
|
66
66
|
[key: string]: {
|
|
67
67
|
[key: string]: tailwind_variants.ClassValue | {
|
|
68
68
|
base?: tailwind_variants.ClassValue;
|
|
69
|
-
icon?: tailwind_variants.ClassValue;
|
|
70
69
|
img?: tailwind_variants.ClassValue;
|
|
71
70
|
name?: tailwind_variants.ClassValue;
|
|
71
|
+
icon?: tailwind_variants.ClassValue;
|
|
72
72
|
fallback?: tailwind_variants.ClassValue;
|
|
73
73
|
};
|
|
74
74
|
};
|
|
@@ -9,11 +9,11 @@ declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
|
9
9
|
[key: string]: {
|
|
10
10
|
[key: string]: tailwind_variants.ClassValue | {
|
|
11
11
|
base?: tailwind_variants.ClassValue;
|
|
12
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
13
12
|
wrapper?: tailwind_variants.ClassValue;
|
|
14
13
|
body?: tailwind_variants.ClassValue;
|
|
15
14
|
footer?: tailwind_variants.ClassValue;
|
|
16
15
|
header?: tailwind_variants.ClassValue;
|
|
16
|
+
closeButton?: tailwind_variants.ClassValue;
|
|
17
17
|
backdrop?: tailwind_variants.ClassValue;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -21,11 +21,11 @@ declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
|
21
21
|
[x: string]: {
|
|
22
22
|
[x: string]: tailwind_variants.ClassValue | {
|
|
23
23
|
base?: tailwind_variants.ClassValue;
|
|
24
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
25
24
|
wrapper?: tailwind_variants.ClassValue;
|
|
26
25
|
body?: tailwind_variants.ClassValue;
|
|
27
26
|
footer?: tailwind_variants.ClassValue;
|
|
28
27
|
header?: tailwind_variants.ClassValue;
|
|
28
|
+
closeButton?: tailwind_variants.ClassValue;
|
|
29
29
|
backdrop?: tailwind_variants.ClassValue;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -41,11 +41,11 @@ declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
|
41
41
|
[key: string]: {
|
|
42
42
|
[key: string]: tailwind_variants.ClassValue | {
|
|
43
43
|
base?: tailwind_variants.ClassValue;
|
|
44
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
45
44
|
wrapper?: tailwind_variants.ClassValue;
|
|
46
45
|
body?: tailwind_variants.ClassValue;
|
|
47
46
|
footer?: tailwind_variants.ClassValue;
|
|
48
47
|
header?: tailwind_variants.ClassValue;
|
|
48
|
+
closeButton?: tailwind_variants.ClassValue;
|
|
49
49
|
backdrop?: tailwind_variants.ClassValue;
|
|
50
50
|
};
|
|
51
51
|
};
|
|
@@ -53,11 +53,11 @@ declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
|
53
53
|
[key: string]: {
|
|
54
54
|
[key: string]: tailwind_variants.ClassValue | {
|
|
55
55
|
base?: tailwind_variants.ClassValue;
|
|
56
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
57
56
|
wrapper?: tailwind_variants.ClassValue;
|
|
58
57
|
body?: tailwind_variants.ClassValue;
|
|
59
58
|
footer?: tailwind_variants.ClassValue;
|
|
60
59
|
header?: tailwind_variants.ClassValue;
|
|
60
|
+
closeButton?: tailwind_variants.ClassValue;
|
|
61
61
|
backdrop?: tailwind_variants.ClassValue;
|
|
62
62
|
};
|
|
63
63
|
};
|
|
@@ -81,11 +81,11 @@ declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
|
81
81
|
[key: string]: {
|
|
82
82
|
[key: string]: tailwind_variants.ClassValue | {
|
|
83
83
|
base?: tailwind_variants.ClassValue;
|
|
84
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
85
84
|
wrapper?: tailwind_variants.ClassValue;
|
|
86
85
|
body?: tailwind_variants.ClassValue;
|
|
87
86
|
footer?: tailwind_variants.ClassValue;
|
|
88
87
|
header?: tailwind_variants.ClassValue;
|
|
88
|
+
closeButton?: tailwind_variants.ClassValue;
|
|
89
89
|
backdrop?: tailwind_variants.ClassValue;
|
|
90
90
|
};
|
|
91
91
|
};
|
|
@@ -9,11 +9,11 @@ declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
|
9
9
|
[key: string]: {
|
|
10
10
|
[key: string]: tailwind_variants.ClassValue | {
|
|
11
11
|
base?: tailwind_variants.ClassValue;
|
|
12
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
13
12
|
wrapper?: tailwind_variants.ClassValue;
|
|
14
13
|
body?: tailwind_variants.ClassValue;
|
|
15
14
|
footer?: tailwind_variants.ClassValue;
|
|
16
15
|
header?: tailwind_variants.ClassValue;
|
|
16
|
+
closeButton?: tailwind_variants.ClassValue;
|
|
17
17
|
backdrop?: tailwind_variants.ClassValue;
|
|
18
18
|
};
|
|
19
19
|
};
|
|
@@ -21,11 +21,11 @@ declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
|
21
21
|
[x: string]: {
|
|
22
22
|
[x: string]: tailwind_variants.ClassValue | {
|
|
23
23
|
base?: tailwind_variants.ClassValue;
|
|
24
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
25
24
|
wrapper?: tailwind_variants.ClassValue;
|
|
26
25
|
body?: tailwind_variants.ClassValue;
|
|
27
26
|
footer?: tailwind_variants.ClassValue;
|
|
28
27
|
header?: tailwind_variants.ClassValue;
|
|
28
|
+
closeButton?: tailwind_variants.ClassValue;
|
|
29
29
|
backdrop?: tailwind_variants.ClassValue;
|
|
30
30
|
};
|
|
31
31
|
};
|
|
@@ -41,11 +41,11 @@ declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
|
41
41
|
[key: string]: {
|
|
42
42
|
[key: string]: tailwind_variants.ClassValue | {
|
|
43
43
|
base?: tailwind_variants.ClassValue;
|
|
44
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
45
44
|
wrapper?: tailwind_variants.ClassValue;
|
|
46
45
|
body?: tailwind_variants.ClassValue;
|
|
47
46
|
footer?: tailwind_variants.ClassValue;
|
|
48
47
|
header?: tailwind_variants.ClassValue;
|
|
48
|
+
closeButton?: tailwind_variants.ClassValue;
|
|
49
49
|
backdrop?: tailwind_variants.ClassValue;
|
|
50
50
|
};
|
|
51
51
|
};
|
|
@@ -53,11 +53,11 @@ declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
|
53
53
|
[key: string]: {
|
|
54
54
|
[key: string]: tailwind_variants.ClassValue | {
|
|
55
55
|
base?: tailwind_variants.ClassValue;
|
|
56
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
57
56
|
wrapper?: tailwind_variants.ClassValue;
|
|
58
57
|
body?: tailwind_variants.ClassValue;
|
|
59
58
|
footer?: tailwind_variants.ClassValue;
|
|
60
59
|
header?: tailwind_variants.ClassValue;
|
|
60
|
+
closeButton?: tailwind_variants.ClassValue;
|
|
61
61
|
backdrop?: tailwind_variants.ClassValue;
|
|
62
62
|
};
|
|
63
63
|
};
|
|
@@ -81,11 +81,11 @@ declare const drawerVariants: tailwind_variants.TVReturnType<{
|
|
|
81
81
|
[key: string]: {
|
|
82
82
|
[key: string]: tailwind_variants.ClassValue | {
|
|
83
83
|
base?: tailwind_variants.ClassValue;
|
|
84
|
-
closeButton?: tailwind_variants.ClassValue;
|
|
85
84
|
wrapper?: tailwind_variants.ClassValue;
|
|
86
85
|
body?: tailwind_variants.ClassValue;
|
|
87
86
|
footer?: tailwind_variants.ClassValue;
|
|
88
87
|
header?: tailwind_variants.ClassValue;
|
|
88
|
+
closeButton?: tailwind_variants.ClassValue;
|
|
89
89
|
backdrop?: tailwind_variants.ClassValue;
|
|
90
90
|
};
|
|
91
91
|
};
|