@fuf-stack/pixels 0.36.0 → 0.37.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,11 +2,11 @@
2
2
 
3
3
 
4
4
 
5
- var _chunk2DCJPDZLcjs = require('../chunk-2DCJPDZL.cjs');
5
+ var _chunkA4MJ5V64cjs = require('../chunk-A4MJ5V64.cjs');
6
6
  require('../chunk-D4TLDLEX.cjs');
7
7
 
8
8
 
9
9
 
10
10
 
11
- exports.Table = _chunk2DCJPDZLcjs.Table_default; exports.default = _chunk2DCJPDZLcjs.Table_default2; exports.tableVariants = _chunk2DCJPDZLcjs.tableVariants;
11
+ exports.Table = _chunkA4MJ5V64cjs.Table_default; exports.default = _chunkA4MJ5V64cjs.Table_default2; exports.tableVariants = _chunkA4MJ5V64cjs.tableVariants;
12
12
  //# sourceMappingURL=index.cjs.map
@@ -1,5 +1,5 @@
1
- import { T as Table } from '../Table-ClTZfWXT.cjs';
2
- export { c as TableColumnProps, a as TableProps, b as TableRowProps, V as VariantProps, t as tableVariants } from '../Table-ClTZfWXT.cjs';
1
+ import { T as Table } from '../Table-D19f5nrd.cjs';
2
+ export { c as TableColumnProps, a as TableProps, b as TableRowProps, V as VariantProps, t as tableVariants } from '../Table-D19f5nrd.cjs';
3
3
  import 'react/jsx-runtime';
4
4
  import 'tailwind-variants';
5
5
  import 'tailwind-variants/dist/config.js';
@@ -1,5 +1,5 @@
1
- import { T as Table } from '../Table-ClTZfWXT.js';
2
- export { c as TableColumnProps, a as TableProps, b as TableRowProps, V as VariantProps, t as tableVariants } from '../Table-ClTZfWXT.js';
1
+ import { T as Table } from '../Table-D19f5nrd.js';
2
+ export { c as TableColumnProps, a as TableProps, b as TableRowProps, V as VariantProps, t as tableVariants } from '../Table-D19f5nrd.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'tailwind-variants';
5
5
  import 'tailwind-variants/dist/config.js';
@@ -2,7 +2,7 @@ import {
2
2
  Table_default,
3
3
  Table_default2,
4
4
  tableVariants
5
- } from "../chunk-PACHM4GL.js";
5
+ } from "../chunk-QMYSCJEJ.js";
6
6
  import "../chunk-J7N2552D.js";
7
7
  export {
8
8
  Table_default as Table,
@@ -227,6 +227,10 @@ interface TableProps extends VariantProps {
227
227
  loading?: boolean;
228
228
  /** Loading animation component. */
229
229
  loadingContent?: ReactNode;
230
+ /** The maximum height of the table in pixels. Required when using virtualization. */
231
+ maxTableHeight?: number;
232
+ /** The fixed height of each row item in pixels. Required when using virtualization. */
233
+ rowHeight?: number;
230
234
  /** Items displayed as rows in the Table. Should have key-value pair for each column. */
231
235
  rows?: TableRowProps[];
232
236
  /** Separation style for the rows & columns. */
@@ -241,6 +245,6 @@ interface TableProps extends VariantProps {
241
245
  /**
242
246
  * Table component based on [HeroUI Table](https://www.heroui.com//docs/components/table)
243
247
  */
244
- declare const Table: ({ ariaLabel, bottomContent, className, columns, emptyContent, hasWrapper, hideHeader, loading, loadingContent, rows, separation, stickyHeader, testId, virtualized, }: TableProps) => react_jsx_runtime.JSX.Element;
248
+ declare const Table: ({ ariaLabel, bottomContent, className, columns, emptyContent, hasWrapper, hideHeader, loading, loadingContent, maxTableHeight, rowHeight, rows, separation, stickyHeader, testId, virtualized, }: TableProps) => react_jsx_runtime.JSX.Element;
245
249
 
246
250
  export { Table as T, type VariantProps as V, type TableProps as a, type TableRowProps as b, type TableColumnProps as c, tableVariants as t };
@@ -227,6 +227,10 @@ interface TableProps extends VariantProps {
227
227
  loading?: boolean;
228
228
  /** Loading animation component. */
229
229
  loadingContent?: ReactNode;
230
+ /** The maximum height of the table in pixels. Required when using virtualization. */
231
+ maxTableHeight?: number;
232
+ /** The fixed height of each row item in pixels. Required when using virtualization. */
233
+ rowHeight?: number;
230
234
  /** Items displayed as rows in the Table. Should have key-value pair for each column. */
231
235
  rows?: TableRowProps[];
232
236
  /** Separation style for the rows & columns. */
@@ -241,6 +245,6 @@ interface TableProps extends VariantProps {
241
245
  /**
242
246
  * Table component based on [HeroUI Table](https://www.heroui.com//docs/components/table)
243
247
  */
244
- declare const Table: ({ ariaLabel, bottomContent, className, columns, emptyContent, hasWrapper, hideHeader, loading, loadingContent, rows, separation, stickyHeader, testId, virtualized, }: TableProps) => react_jsx_runtime.JSX.Element;
248
+ declare const Table: ({ ariaLabel, bottomContent, className, columns, emptyContent, hasWrapper, hideHeader, loading, loadingContent, maxTableHeight, rowHeight, rows, separation, stickyHeader, testId, virtualized, }: TableProps) => react_jsx_runtime.JSX.Element;
245
249
 
246
250
  export { Table as T, type VariantProps as V, type TableProps as a, type TableRowProps as b, type TableColumnProps as c, tableVariants as t };
@@ -1,12 +1,10 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
-
5
- var _chunkD6LCMOKNcjs = require('../chunk-D6LCMOKN.cjs');
4
+ var _chunkSBR6FZ6Lcjs = require('../chunk-SBR6FZ6L.cjs');
6
5
  require('../chunk-D4TLDLEX.cjs');
7
6
 
8
7
 
9
8
 
10
-
11
- exports.Tooltip = _chunkD6LCMOKNcjs.Tooltip_default; exports.default = _chunkD6LCMOKNcjs.Tooltip_default2; exports.tooltipPlacementOptions = _chunkD6LCMOKNcjs.tooltipPlacementOptions;
9
+ exports.Tooltip = _chunkSBR6FZ6Lcjs.Tooltip_default; exports.default = _chunkSBR6FZ6Lcjs.Tooltip_default2;
12
10
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/Tooltip/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACA;AACF,uLAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/Tooltip/index.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/Tooltip/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,yDAA8B;AAC9B,iCAA8B;AAC9B;AACE;AACA;AACF,0GAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/Tooltip/index.cjs"}
@@ -1,9 +1,10 @@
1
- import { T as Tooltip } from '../Tooltip-Bsq7nJLh.cjs';
2
- export { a as TooltipProps, t as tooltipPlacementOptions } from '../Tooltip-Bsq7nJLh.cjs';
1
+ import { T as Tooltip } from '../Tooltip-B5wJQZUi.cjs';
2
+ export { a as TooltipProps } from '../Tooltip-B5wJQZUi.cjs';
3
3
  import 'react/jsx-runtime';
4
4
  import 'tailwind-variants/dist/config.js';
5
5
  import 'tailwind-variants';
6
6
  import '@fuf-stack/pixel-utils';
7
+ import '@heroui/tooltip';
7
8
  import 'react';
8
9
 
9
10
 
@@ -1,9 +1,10 @@
1
- import { T as Tooltip } from '../Tooltip-Bsq7nJLh.js';
2
- export { a as TooltipProps, t as tooltipPlacementOptions } from '../Tooltip-Bsq7nJLh.js';
1
+ import { T as Tooltip } from '../Tooltip-B5wJQZUi.js';
2
+ export { a as TooltipProps } from '../Tooltip-B5wJQZUi.js';
3
3
  import 'react/jsx-runtime';
4
4
  import 'tailwind-variants/dist/config.js';
5
5
  import 'tailwind-variants';
6
6
  import '@fuf-stack/pixel-utils';
7
+ import '@heroui/tooltip';
7
8
  import 'react';
8
9
 
9
10
 
@@ -1,12 +1,10 @@
1
1
  import {
2
2
  Tooltip_default,
3
- Tooltip_default2,
4
- tooltipPlacementOptions
5
- } from "../chunk-VZJTWG7U.js";
3
+ Tooltip_default2
4
+ } from "../chunk-R6SBWVCU.js";
6
5
  import "../chunk-J7N2552D.js";
7
6
  export {
8
7
  Tooltip_default as Tooltip,
9
- Tooltip_default2 as default,
10
- tooltipPlacementOptions
8
+ Tooltip_default2 as default
11
9
  };
12
10
  //# sourceMappingURL=index.js.map
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
3
3
  import * as tailwind_variants from 'tailwind-variants';
4
4
  import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
5
+ import { TooltipPlacement as TooltipPlacement$1 } from '@heroui/tooltip';
5
6
  import { ReactNode } from 'react';
6
7
 
7
8
  declare const tooltipVariants: tailwind_variants.TVReturnType<{
@@ -59,8 +60,7 @@ declare const tooltipVariants: tailwind_variants.TVReturnType<{
59
60
  } | {}>, unknown, unknown, undefined>>;
60
61
  type VariantProps = TVProps<typeof tooltipVariants>;
61
62
  type ClassName = TVClassName<typeof tooltipVariants>;
62
- declare const tooltipPlacementOptions: readonly ["top", "bottom", "left", "right"];
63
- type TooltipPlacement = (typeof tooltipPlacementOptions)[number];
63
+ type TooltipPlacement = TooltipPlacement$1;
64
64
  interface TooltipProps extends VariantProps {
65
65
  /** trigger child components */
66
66
  children: ReactNode;
@@ -86,4 +86,4 @@ interface TooltipProps extends VariantProps {
86
86
  */
87
87
  declare const Tooltip: ({ children, className: _className, closeDelay, containerPadding, content, defaultOpen, delay, onOpenChange, placement, }: TooltipProps) => react_jsx_runtime.JSX.Element;
88
88
 
89
- export { Tooltip as T, type TooltipProps as a, tooltipPlacementOptions as t };
89
+ export { Tooltip as T, type TooltipProps as a };
@@ -2,6 +2,7 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as tailwind_variants_dist_config_js from 'tailwind-variants/dist/config.js';
3
3
  import * as tailwind_variants from 'tailwind-variants';
4
4
  import { TVProps, TVClassName } from '@fuf-stack/pixel-utils';
5
+ import { TooltipPlacement as TooltipPlacement$1 } from '@heroui/tooltip';
5
6
  import { ReactNode } from 'react';
6
7
 
7
8
  declare const tooltipVariants: tailwind_variants.TVReturnType<{
@@ -59,8 +60,7 @@ declare const tooltipVariants: tailwind_variants.TVReturnType<{
59
60
  } | {}>, unknown, unknown, undefined>>;
60
61
  type VariantProps = TVProps<typeof tooltipVariants>;
61
62
  type ClassName = TVClassName<typeof tooltipVariants>;
62
- declare const tooltipPlacementOptions: readonly ["top", "bottom", "left", "right"];
63
- type TooltipPlacement = (typeof tooltipPlacementOptions)[number];
63
+ type TooltipPlacement = TooltipPlacement$1;
64
64
  interface TooltipProps extends VariantProps {
65
65
  /** trigger child components */
66
66
  children: ReactNode;
@@ -86,4 +86,4 @@ interface TooltipProps extends VariantProps {
86
86
  */
87
87
  declare const Tooltip: ({ children, className: _className, closeDelay, containerPadding, content, defaultOpen, delay, onOpenChange, placement, }: TooltipProps) => react_jsx_runtime.JSX.Element;
88
88
 
89
- export { Tooltip as T, type TooltipProps as a, tooltipPlacementOptions as t };
89
+ export { Tooltip as T, type TooltipProps as a };
@@ -59,6 +59,8 @@ var Table = ({
59
59
  hideHeader = false,
60
60
  loading = false,
61
61
  loadingContent = void 0,
62
+ maxTableHeight = void 0,
63
+ rowHeight = void 0,
62
64
  rows = [],
63
65
  separation = "none",
64
66
  stickyHeader = false,
@@ -78,7 +80,9 @@ var Table = ({
78
80
  isHeaderSticky: stickyHeader,
79
81
  isStriped: separation === "striped" || separation === "striped-divider-x",
80
82
  isVirtualized: virtualized,
83
+ maxTableHeight,
81
84
  removeWrapper: !hasWrapper,
85
+ rowHeight,
82
86
  children: [
83
87
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _table.TableHeader, { columns, children: (column) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _table.TableColumn, { children: column.label }, column.key) }),
84
88
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -111,4 +115,4 @@ var Table_default2 = Table_default;
111
115
 
112
116
 
113
117
  exports.tableVariants = tableVariants; exports.Table_default = Table_default; exports.Table_default2 = Table_default2;
114
- //# sourceMappingURL=chunk-2DCJPDZL.cjs.map
118
+ //# sourceMappingURL=chunk-A4MJ5V64.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-A4MJ5V64.cjs","../src/Table/Table.tsx","../src/Table/index.ts"],"names":["Table_default"],"mappings":"AAAA;ACGA;AACE;AACA;AACA;AACA;A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AAA,EAAO,IAAA;AAAA,YAEN,QAAA,EAAA,CAAC,IAAA,EAAA,mBACA,6BAAA;AAAA,cAAC,eAAA;AAAA,cAAA;AAAA,gBAIE,QAAA,EAAA,CAAC,SAAA,EAAA,mBACA,6BAAA,gBAAC,EAAA,EAAW,QAAA,EAAA,gCAAA,IAAY,EAAM,SAAS,EAAA,CAAE;AAAA,cAAA,CAAA;AAAA,cAJtC,IAAA,CAAK;AAAA,YAMZ;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,CAAA;AAEJ,CAAA;AAEA,IAAO,cAAA,EAAQ,KAAA;ADlEf;AACA;AElGA,IAAOA,eAAAA,EAAQ,aAAA;AFoGf;AACA;AACE;AACA;AACA;AACF,sHAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-A4MJ5V64.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport {\n getKeyValue,\n Table as HeroTable,\n TableBody,\n TableCell,\n TableColumn,\n TableHeader,\n TableRow,\n} from '@heroui/table';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// table styling variants\nexport const tableVariants = tv({\n slots: {\n base: '',\n wrapper: '',\n table: '',\n thead: '',\n tbody: '',\n tr: '',\n th: 'bg-content2',\n td: '',\n tfoot: '',\n sortIcon: '',\n emptyWrapper: '',\n loadingWrapper: '',\n },\n variants: {\n separation: {\n divider: {\n tr: 'divide-x rounded-lg border-b data-[last=true]:border-none [&:first-child:not([data-first=\"true\"])]:border-none',\n },\n 'divider-x': {\n tr: 'divide-x',\n },\n 'divider-y': {\n tr: 'rounded-lg border-b data-[last=true]:border-none [&:first-child:not([data-first=\"true\"])]:border-none',\n },\n 'striped-divider-x': {\n tr: 'divide-x',\n th: 'border-divider',\n td: 'border-divider first:rounded-s-lg last:rounded-e-lg group-data-[odd=true]:bg-content2',\n },\n striped: {\n tr: '',\n td: 'first:rounded-s-lg last:rounded-e-lg group-data-[odd=true]:bg-content2',\n },\n none: {},\n },\n },\n});\n\nexport type VariantProps = TVProps<typeof tableVariants>;\ntype ClassName = TVClassName<typeof tableVariants>;\n\nexport interface TableColumnProps {\n key: string;\n label: ReactNode;\n}\n\nexport interface TableRowProps {\n key: string | number;\n [key: string | number]: ReactNode;\n}\n\nexport interface TableProps extends VariantProps {\n /** Aria label for the Table. */\n ariaLabel?: string;\n /** Component to display at the bottom of the Table. */\n bottomContent?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Objects with table data */\n columns: TableColumnProps[];\n /** Component to display if there are no rows! */\n emptyContent?: ReactNode;\n /** Determine if the Table should have a card like wrapper. */\n hasWrapper?: boolean;\n /** remove header */\n hideHeader?: boolean;\n /** Tells the Table to show the loading component. */\n loading?: boolean;\n /** Loading animation component. */\n loadingContent?: ReactNode;\n /** The maximum height of the table in pixels. Required when using virtualization. */\n maxTableHeight?: number;\n /** The fixed height of each row item in pixels. Required when using virtualization. */\n rowHeight?: number;\n /** Items displayed as rows in the Table. Should have key-value pair for each column. */\n rows?: TableRowProps[];\n /** Separation style for the rows & columns. */\n separation?:\n | 'none'\n | 'striped'\n | 'striped-divider-x'\n | 'divider-x'\n | 'divider-y'\n | 'divider';\n /** Keeps the header of the Table in view while scrolling a height limited Table. */\n stickyHeader?: boolean;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Virtualize allows efficient rendering of large lists by only rendering items that are visible in the viewport. */\n virtualized?: boolean;\n}\n\n/**\n * Table component based on [HeroUI Table](https://www.heroui.com//docs/components/table)\n */\nconst Table = ({\n ariaLabel = undefined,\n bottomContent = undefined,\n className = undefined,\n columns,\n emptyContent = 'No rows to display.',\n hasWrapper = false,\n hideHeader = false,\n loading = false,\n loadingContent = undefined,\n maxTableHeight = undefined,\n rowHeight = undefined,\n rows = [],\n separation = 'none',\n stickyHeader = false,\n testId = undefined,\n virtualized = false,\n}: TableProps) => {\n const variants = tableVariants({ separation });\n const classNames = variantsToClassNames(variants, className, 'base');\n\n return (\n <HeroTable\n aria-label={ariaLabel}\n bottomContent={bottomContent}\n classNames={classNames}\n data-testid={testId && slugify(testId)}\n hideHeader={hideHeader}\n isHeaderSticky={stickyHeader}\n isStriped={separation === 'striped' || separation === 'striped-divider-x'}\n isVirtualized={virtualized}\n maxTableHeight={maxTableHeight}\n removeWrapper={!hasWrapper}\n rowHeight={rowHeight}\n >\n <TableHeader columns={columns}>\n {(column: TableColumnProps) => (\n <TableColumn key={column.key}>{column.label}</TableColumn>\n )}\n </TableHeader>\n <TableBody\n isLoading={loading}\n loadingContent={loadingContent || '...'} // TODO: use future spinner/loading component\n emptyContent={emptyContent}\n items={rows}\n >\n {(item: TableRowProps) => (\n <TableRow\n key={item.key}\n // data-testid={`${slugify(testId || 'table')}_item_${slugify(JSON.stringify(item.testId || item.key))}`}\n >\n {(columnKey) => (\n <TableCell>{getKeyValue(item, columnKey)}</TableCell>\n )}\n </TableRow>\n )}\n </TableBody>\n </HeroTable>\n );\n};\n\nexport default Table;\n","import Table, { tableVariants } from './Table';\n\nexport type {\n TableProps,\n TableRowProps,\n TableColumnProps,\n VariantProps,\n} from './Table';\n\nexport { Table, tableVariants };\n\nexport default Table;\n"]}
@@ -59,6 +59,8 @@ var Table = ({
59
59
  hideHeader = false,
60
60
  loading = false,
61
61
  loadingContent = void 0,
62
+ maxTableHeight = void 0,
63
+ rowHeight = void 0,
62
64
  rows = [],
63
65
  separation = "none",
64
66
  stickyHeader = false,
@@ -78,7 +80,9 @@ var Table = ({
78
80
  isHeaderSticky: stickyHeader,
79
81
  isStriped: separation === "striped" || separation === "striped-divider-x",
80
82
  isVirtualized: virtualized,
83
+ maxTableHeight,
81
84
  removeWrapper: !hasWrapper,
85
+ rowHeight,
82
86
  children: [
83
87
  /* @__PURE__ */ jsx(TableHeader, { columns, children: (column) => /* @__PURE__ */ jsx(TableColumn, { children: column.label }, column.key) }),
84
88
  /* @__PURE__ */ jsx(
@@ -111,4 +115,4 @@ export {
111
115
  Table_default,
112
116
  Table_default2
113
117
  };
114
- //# sourceMappingURL=chunk-PACHM4GL.js.map
118
+ //# sourceMappingURL=chunk-QMYSCJEJ.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Table/Table.tsx","../src/Table/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport {\n getKeyValue,\n Table as HeroTable,\n TableBody,\n TableCell,\n TableColumn,\n TableHeader,\n TableRow,\n} from '@heroui/table';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// table styling variants\nexport const tableVariants = tv({\n slots: {\n base: '',\n wrapper: '',\n table: '',\n thead: '',\n tbody: '',\n tr: '',\n th: 'bg-content2',\n td: '',\n tfoot: '',\n sortIcon: '',\n emptyWrapper: '',\n loadingWrapper: '',\n },\n variants: {\n separation: {\n divider: {\n tr: 'divide-x rounded-lg border-b data-[last=true]:border-none [&:first-child:not([data-first=\"true\"])]:border-none',\n },\n 'divider-x': {\n tr: 'divide-x',\n },\n 'divider-y': {\n tr: 'rounded-lg border-b data-[last=true]:border-none [&:first-child:not([data-first=\"true\"])]:border-none',\n },\n 'striped-divider-x': {\n tr: 'divide-x',\n th: 'border-divider',\n td: 'border-divider first:rounded-s-lg last:rounded-e-lg group-data-[odd=true]:bg-content2',\n },\n striped: {\n tr: '',\n td: 'first:rounded-s-lg last:rounded-e-lg group-data-[odd=true]:bg-content2',\n },\n none: {},\n },\n },\n});\n\nexport type VariantProps = TVProps<typeof tableVariants>;\ntype ClassName = TVClassName<typeof tableVariants>;\n\nexport interface TableColumnProps {\n key: string;\n label: ReactNode;\n}\n\nexport interface TableRowProps {\n key: string | number;\n [key: string | number]: ReactNode;\n}\n\nexport interface TableProps extends VariantProps {\n /** Aria label for the Table. */\n ariaLabel?: string;\n /** Component to display at the bottom of the Table. */\n bottomContent?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Objects with table data */\n columns: TableColumnProps[];\n /** Component to display if there are no rows! */\n emptyContent?: ReactNode;\n /** Determine if the Table should have a card like wrapper. */\n hasWrapper?: boolean;\n /** remove header */\n hideHeader?: boolean;\n /** Tells the Table to show the loading component. */\n loading?: boolean;\n /** Loading animation component. */\n loadingContent?: ReactNode;\n /** The maximum height of the table in pixels. Required when using virtualization. */\n maxTableHeight?: number;\n /** The fixed height of each row item in pixels. Required when using virtualization. */\n rowHeight?: number;\n /** Items displayed as rows in the Table. Should have key-value pair for each column. */\n rows?: TableRowProps[];\n /** Separation style for the rows & columns. */\n separation?:\n | 'none'\n | 'striped'\n | 'striped-divider-x'\n | 'divider-x'\n | 'divider-y'\n | 'divider';\n /** Keeps the header of the Table in view while scrolling a height limited Table. */\n stickyHeader?: boolean;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Virtualize allows efficient rendering of large lists by only rendering items that are visible in the viewport. */\n virtualized?: boolean;\n}\n\n/**\n * Table component based on [HeroUI Table](https://www.heroui.com//docs/components/table)\n */\nconst Table = ({\n ariaLabel = undefined,\n bottomContent = undefined,\n className = undefined,\n columns,\n emptyContent = 'No rows to display.',\n hasWrapper = false,\n hideHeader = false,\n loading = false,\n loadingContent = undefined,\n maxTableHeight = undefined,\n rowHeight = undefined,\n rows = [],\n separation = 'none',\n stickyHeader = false,\n testId = undefined,\n virtualized = false,\n}: TableProps) => {\n const variants = tableVariants({ separation });\n const classNames = variantsToClassNames(variants, className, 'base');\n\n return (\n <HeroTable\n aria-label={ariaLabel}\n bottomContent={bottomContent}\n classNames={classNames}\n data-testid={testId && slugify(testId)}\n hideHeader={hideHeader}\n isHeaderSticky={stickyHeader}\n isStriped={separation === 'striped' || separation === 'striped-divider-x'}\n isVirtualized={virtualized}\n maxTableHeight={maxTableHeight}\n removeWrapper={!hasWrapper}\n rowHeight={rowHeight}\n >\n <TableHeader columns={columns}>\n {(column: TableColumnProps) => (\n <TableColumn key={column.key}>{column.label}</TableColumn>\n )}\n </TableHeader>\n <TableBody\n isLoading={loading}\n loadingContent={loadingContent || '...'} // TODO: use future spinner/loading component\n emptyContent={emptyContent}\n items={rows}\n >\n {(item: TableRowProps) => (\n <TableRow\n key={item.key}\n // data-testid={`${slugify(testId || 'table')}_item_${slugify(JSON.stringify(item.testId || item.key))}`}\n >\n {(columnKey) => (\n <TableCell>{getKeyValue(item, columnKey)}</TableCell>\n )}\n </TableRow>\n )}\n </TableBody>\n </HeroTable>\n );\n};\n\nexport default Table;\n","import Table, { tableVariants } from './Table';\n\nexport type {\n TableProps,\n TableRowProps,\n TableColumnProps,\n VariantProps,\n} from './Table';\n\nexport { Table, tableVariants };\n\nexport default Table;\n"],"mappings":";AAGA;AAAA,EACE;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,SAAS,IAAI,4BAA4B;AA0H9C,SAeM,KAfN;AAvHG,IAAM,gBAAgB,GAAG;AAAA,EAC9B,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,IACP,OAAO;AAAA,IACP,OAAO;AAAA,IACP,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,IAAI;AAAA,IACJ,OAAO;AAAA,IACP,UAAU;AAAA,IACV,cAAc;AAAA,IACd,gBAAgB;AAAA,EAClB;AAAA,EACA,UAAU;AAAA,IACR,YAAY;AAAA,MACV,SAAS;AAAA,QACP,IAAI;AAAA,MACN;AAAA,MACA,aAAa;AAAA,QACX,IAAI;AAAA,MACN;AAAA,MACA,aAAa;AAAA,QACX,IAAI;AAAA,MACN;AAAA,MACA,qBAAqB;AAAA,QACnB,IAAI;AAAA,QACJ,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,SAAS;AAAA,QACP,IAAI;AAAA,QACJ,IAAI;AAAA,MACN;AAAA,MACA,MAAM,CAAC;AAAA,IACT;AAAA,EACF;AACF,CAAC;AA2DD,IAAM,QAAQ,CAAC;AAAA,EACb,YAAY;AAAA,EACZ,gBAAgB;AAAA,EAChB,YAAY;AAAA,EACZ;AAAA,EACA,eAAe;AAAA,EACf,aAAa;AAAA,EACb,aAAa;AAAA,EACb,UAAU;AAAA,EACV,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,YAAY;AAAA,EACZ,OAAO,CAAC;AAAA,EACR,aAAa;AAAA,EACb,eAAe;AAAA,EACf,SAAS;AAAA,EACT,cAAc;AAChB,MAAkB;AAChB,QAAM,WAAW,cAAc,EAAE,WAAW,CAAC;AAC7C,QAAM,aAAa,qBAAqB,UAAU,WAAW,MAAM;AAEnE,SACE;AAAA,IAAC;AAAA;AAAA,MACC,cAAY;AAAA,MACZ;AAAA,MACA;AAAA,MACA,eAAa,UAAU,QAAQ,MAAM;AAAA,MACrC;AAAA,MACA,gBAAgB;AAAA,MAChB,WAAW,eAAe,aAAa,eAAe;AAAA,MACtD,eAAe;AAAA,MACf;AAAA,MACA,eAAe,CAAC;AAAA,MAChB;AAAA,MAEA;AAAA,4BAAC,eAAY,SACV,WAAC,WACA,oBAAC,eAA8B,iBAAO,SAApB,OAAO,GAAmB,GAEhD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,YACX,gBAAgB,kBAAkB;AAAA,YAClC;AAAA,YACA,OAAO;AAAA,YAEN,WAAC,SACA;AAAA,cAAC;AAAA;AAAA,gBAIE,WAAC,cACA,oBAAC,aAAW,sBAAY,MAAM,SAAS,GAAE;AAAA;AAAA,cAJtC,KAAK;AAAA,YAMZ;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ;;;ACnKf,IAAOA,iBAAQ;","names":["Table_default"]}
@@ -9,12 +9,6 @@ var tooltipVariants = tv({
9
9
  wrapper: "cursor-pointer"
10
10
  }
11
11
  });
12
- var tooltipPlacementOptions = [
13
- "top",
14
- "bottom",
15
- "left",
16
- "right"
17
- ];
18
12
  var Tooltip = ({
19
13
  children,
20
14
  className: _className = void 0,
@@ -52,8 +46,7 @@ var Tooltip_default = Tooltip;
52
46
  var Tooltip_default2 = Tooltip_default;
53
47
 
54
48
  export {
55
- tooltipPlacementOptions,
56
49
  Tooltip_default,
57
50
  Tooltip_default2
58
51
  };
59
- //# sourceMappingURL=chunk-VZJTWG7U.js.map
52
+ //# sourceMappingURL=chunk-R6SBWVCU.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { TooltipPlacement as HeroTooltipPlacement } from '@heroui/tooltip';\nimport type { ReactNode } from 'react';\n\nimport { Tooltip as HeroTooltip } from '@heroui/tooltip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// tooltip variants\nexport const tooltipVariants = tv({\n slots: {\n base: '',\n content: '',\n wrapper: 'cursor-pointer',\n },\n});\n\ntype VariantProps = TVProps<typeof tooltipVariants>;\ntype ClassName = TVClassName<typeof tooltipVariants>;\n\nexport type TooltipPlacement = HeroTooltipPlacement;\n\nexport interface TooltipProps extends VariantProps {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** delay in milliseconds before the tooltip opens. */\n closeDelay?: number;\n /** delay in milliseconds before the tooltip opens. */\n delay?: number;\n /** placement padding in px */\n containerPadding?: number;\n /** content displayed in the tooltip */\n content: ReactNode;\n /** open overlay initially when uncontrolled */\n defaultOpen?: boolean;\n /** handler that is called when the overlay's open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n /** placement if the tooltip */\n placement?: TooltipPlacement;\n}\n\n/**\n * Tooltip component based on [HeroUI Tooltip](https://www.heroui.com//docs/components/tooltip)\n */\nconst Tooltip = ({\n children,\n className: _className = undefined,\n closeDelay = 500,\n containerPadding = 0,\n content,\n defaultOpen = false,\n delay = 0,\n onOpenChange = undefined,\n placement = 'top',\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroTooltip\n classNames={classNames}\n closeDelay={closeDelay}\n containerPadding={containerPadding}\n content={content}\n defaultOpen={defaultOpen}\n delay={delay}\n onClick={(e) => e.preventDefault()}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n <span className={classNames.wrapper}>{children}</span>\n </HeroTooltip>\n );\n};\n\nexport default Tooltip;\n","import Tooltip from './Tooltip';\n\nexport type { TooltipProps } from './Tooltip';\n\nexport { Tooltip };\n\nexport default Tooltip;\n"],"mappings":";AAIA,SAAS,WAAW,mBAAmB;AAEvC,SAAS,IAAI,4BAA4B;AAqEnC;AAlEC,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AACF,CAAC;AA+BD,IAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,WAAW,aAAa;AAAA,EACxB,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB;AAAA,EACA,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,YAAY;AACd,MAAoB;AAElB,QAAM,WAAW,gBAAgB;AACjC,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,SAAS,CAAC,MAAM,EAAE,eAAe;AAAA,MACjC;AAAA,MACA;AAAA,MACA,YAAU;AAAA,MACV,WAAS;AAAA,MAET,8BAAC,UAAK,WAAW,WAAW,SAAU,UAAS;AAAA;AAAA,EACjD;AAEJ;AAEA,IAAO,kBAAQ;;;AC1Ef,IAAOA,mBAAQ;","names":["Tooltip_default"]}
@@ -9,12 +9,6 @@ var tooltipVariants = _pixelutils.tv.call(void 0, {
9
9
  wrapper: "cursor-pointer"
10
10
  }
11
11
  });
12
- var tooltipPlacementOptions = [
13
- "top",
14
- "bottom",
15
- "left",
16
- "right"
17
- ];
18
12
  var Tooltip = ({
19
13
  children,
20
14
  className: _className = void 0,
@@ -54,6 +48,5 @@ var Tooltip_default2 = Tooltip_default;
54
48
 
55
49
 
56
50
 
57
-
58
- exports.tooltipPlacementOptions = tooltipPlacementOptions; exports.Tooltip_default = Tooltip_default; exports.Tooltip_default2 = Tooltip_default2;
59
- //# sourceMappingURL=chunk-D6LCMOKN.cjs.map
51
+ exports.Tooltip_default = Tooltip_default; exports.Tooltip_default2 = Tooltip_default2;
52
+ //# sourceMappingURL=chunk-SBR6FZ6L.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-SBR6FZ6L.cjs","../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"names":["Tooltip_default"],"mappings":"AAAA;ACIA,0CAAuC;AAEvC,oDAAyC;AAqEnC,+CAAA;AAlEC,IAAM,gBAAA,EAAkB,4BAAA;AAAG,EAChC,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,EAAA;AAAA,IACN,OAAA,EAAS,EAAA;AAAA,IACT,OAAA,EAAS;AAAA,EACX;AACF,CAAC,CAAA;AA+BD,IAAM,QAAA,EAAU,CAAC;AAAA,EACf,QAAA;AAAA,EACA,SAAA,EAAW,WAAA,EAAa,KAAA,CAAA;AAAA,EACxB,WAAA,EAAa,GAAA;AAAA,EACb,iBAAA,EAAmB,CAAA;AAAA,EACnB,OAAA;AAAA,EACA,YAAA,EAAc,KAAA;AAAA,EACd,MAAA,EAAQ,CAAA;AAAA,EACR,aAAA,EAAe,KAAA,CAAA;AAAA,EACf,UAAA,EAAY;AACd,CAAA,EAAA,GAAoB;AAElB,EAAA,MAAM,SAAA,EAAW,eAAA,CAAgB,CAAA;AACjC,EAAA,MAAM,WAAA,EAAa,8CAAA,QAAqB,EAAU,UAAA,EAAY,MAAM,CAAA;AAEpE,EAAA,uBACE,6BAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,UAAA;AAAA,MACA,UAAA;AAAA,MACA,gBAAA;AAAA,MACA,OAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,OAAA,EAAS,CAAC,CAAA,EAAA,GAAM,CAAA,CAAE,cAAA,CAAe,CAAA;AAAA,MACjC,YAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAS,IAAA;AAAA,MAET,QAAA,kBAAA,6BAAA,MAAC,EAAA,EAAK,SAAA,EAAW,UAAA,CAAW,OAAA,EAAU,SAAA,CAAS;AAAA,IAAA;AAAA,EACjD,CAAA;AAEJ,CAAA;AAEA,IAAO,gBAAA,EAAQ,OAAA;ADrCf;AACA;AEtCA,IAAOA,iBAAAA,EAAQ,eAAA;AFwCf;AACA;AACE;AACA;AACF,uFAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-SBR6FZ6L.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { TooltipPlacement as HeroTooltipPlacement } from '@heroui/tooltip';\nimport type { ReactNode } from 'react';\n\nimport { Tooltip as HeroTooltip } from '@heroui/tooltip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// tooltip variants\nexport const tooltipVariants = tv({\n slots: {\n base: '',\n content: '',\n wrapper: 'cursor-pointer',\n },\n});\n\ntype VariantProps = TVProps<typeof tooltipVariants>;\ntype ClassName = TVClassName<typeof tooltipVariants>;\n\nexport type TooltipPlacement = HeroTooltipPlacement;\n\nexport interface TooltipProps extends VariantProps {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** delay in milliseconds before the tooltip opens. */\n closeDelay?: number;\n /** delay in milliseconds before the tooltip opens. */\n delay?: number;\n /** placement padding in px */\n containerPadding?: number;\n /** content displayed in the tooltip */\n content: ReactNode;\n /** open overlay initially when uncontrolled */\n defaultOpen?: boolean;\n /** handler that is called when the overlay's open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n /** placement if the tooltip */\n placement?: TooltipPlacement;\n}\n\n/**\n * Tooltip component based on [HeroUI Tooltip](https://www.heroui.com//docs/components/tooltip)\n */\nconst Tooltip = ({\n children,\n className: _className = undefined,\n closeDelay = 500,\n containerPadding = 0,\n content,\n defaultOpen = false,\n delay = 0,\n onOpenChange = undefined,\n placement = 'top',\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroTooltip\n classNames={classNames}\n closeDelay={closeDelay}\n containerPadding={containerPadding}\n content={content}\n defaultOpen={defaultOpen}\n delay={delay}\n onClick={(e) => e.preventDefault()}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n <span className={classNames.wrapper}>{children}</span>\n </HeroTooltip>\n );\n};\n\nexport default Tooltip;\n","import Tooltip from './Tooltip';\n\nexport type { TooltipProps } from './Tooltip';\n\nexport { Tooltip };\n\nexport default Tooltip;\n"]}
package/dist/index.cjs CHANGED
@@ -1,15 +1,14 @@
1
1
  "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
2
 
3
3
 
4
- var _chunk2DCJPDZLcjs = require('./chunk-2DCJPDZL.cjs');
4
+ var _chunkA4MJ5V64cjs = require('./chunk-A4MJ5V64.cjs');
5
5
 
6
6
 
7
7
 
8
8
  var _chunkJUHSESWBcjs = require('./chunk-JUHSESWB.cjs');
9
9
 
10
10
 
11
-
12
- var _chunkD6LCMOKNcjs = require('./chunk-D6LCMOKN.cjs');
11
+ var _chunkSBR6FZ6Lcjs = require('./chunk-SBR6FZ6L.cjs');
13
12
 
14
13
 
15
14
 
@@ -106,6 +105,5 @@ require('./chunk-D4TLDLEX.cjs');
106
105
 
107
106
 
108
107
 
109
-
110
- exports.Accordion = _chunk2P5WWVQ6cjs.Accordion_default; exports.Alert = _chunk33S6NRVIcjs.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 = _chunk2XYKRMUNcjs.Label_default; exports.Menu = _chunkKBYU4ZF2cjs.Menu_default; exports.Modal = _chunkPEUUQMJScjs.Modal_default; exports.Popover = _chunkC4H5ZCTVcjs.Popover_default; exports.Table = _chunk2DCJPDZLcjs.Table_default; exports.Tabs = _chunkJUHSESWBcjs.Tabs_default; exports.Tooltip = _chunkD6LCMOKNcjs.Tooltip_default; exports.accordionVariants = _chunk2P5WWVQ6cjs.accordionVariants; exports.alertVariants = _chunk33S6NRVIcjs.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.modalVariants = _chunkPEUUQMJScjs.modalVariants; exports.tableVariants = _chunk2DCJPDZLcjs.tableVariants; exports.tabsVariants = _chunkJUHSESWBcjs.tabsVariants; exports.tooltipPlacementOptions = _chunkD6LCMOKNcjs.tooltipPlacementOptions; exports.useDebounce = _chunkMWNBYTRNcjs.useDebounce; exports.useLocalStorage = _chunkMWNBYTRNcjs.useLocalStorage;
108
+ exports.Accordion = _chunk2P5WWVQ6cjs.Accordion_default; exports.Alert = _chunk33S6NRVIcjs.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 = _chunk2XYKRMUNcjs.Label_default; exports.Menu = _chunkKBYU4ZF2cjs.Menu_default; exports.Modal = _chunkPEUUQMJScjs.Modal_default; exports.Popover = _chunkC4H5ZCTVcjs.Popover_default; exports.Table = _chunkA4MJ5V64cjs.Table_default; exports.Tabs = _chunkJUHSESWBcjs.Tabs_default; exports.Tooltip = _chunkSBR6FZ6Lcjs.Tooltip_default; exports.accordionVariants = _chunk2P5WWVQ6cjs.accordionVariants; exports.alertVariants = _chunk33S6NRVIcjs.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.modalVariants = _chunkPEUUQMJScjs.modalVariants; exports.tableVariants = _chunkA4MJ5V64cjs.tableVariants; exports.tabsVariants = _chunkJUHSESWBcjs.tabsVariants; exports.useDebounce = _chunkMWNBYTRNcjs.useDebounce; exports.useLocalStorage = _chunkMWNBYTRNcjs.useLocalStorage;
111
109
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/index.cjs"],"names":[],"mappings":"AAAA;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;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;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;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;AACF,y1DAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/index.cjs"}
1
+ {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/index.cjs"],"names":[],"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;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B;AACE;AACA;AACF,wDAA6B;AAC7B,gCAA6B;AAC7B;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;AACF,4wDAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/index.cjs"}
package/dist/index.d.cts CHANGED
@@ -13,9 +13,9 @@ export { L as Label, a as LabelProps } from './Label-BH0taC2T.cjs';
13
13
  export { M as Menu, b as MenuItem, a as MenuProps, c as MenuSection } from './Menu-C7lpY7pY.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-Db9vCWrz.cjs';
16
- export { T as Table, c as TableColumnProps, a as TableProps, b as TableRowProps, V as VariantProps, t as tableVariants } from './Table-ClTZfWXT.cjs';
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
- export { T as Tooltip, a as TooltipProps, t as tooltipPlacementOptions } from './Tooltip-Bsq7nJLh.cjs';
18
+ export { T as Tooltip, a as TooltipProps } from './Tooltip-B5wJQZUi.cjs';
19
19
  export { useDebounce, useLocalStorage } from './hooks/index.cjs';
20
20
  export { ButtonGroupProps } from '@heroui/button';
21
21
  import 'react/jsx-runtime';
@@ -30,3 +30,4 @@ import '@heroui/drawer';
30
30
  import '@heroui/chip';
31
31
  import '@heroui/modal';
32
32
  import '@heroui/popover';
33
+ import '@heroui/tooltip';
package/dist/index.d.ts CHANGED
@@ -13,9 +13,9 @@ export { L as Label, a as LabelProps } from './Label-BH0taC2T.js';
13
13
  export { M as Menu, b as MenuItem, a as MenuProps, c as MenuSection } from './Menu-C7lpY7pY.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-Db9vCWrz.js';
16
- export { T as Table, c as TableColumnProps, a as TableProps, b as TableRowProps, V as VariantProps, t as tableVariants } from './Table-ClTZfWXT.js';
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
- export { T as Tooltip, a as TooltipProps, t as tooltipPlacementOptions } from './Tooltip-Bsq7nJLh.js';
18
+ export { T as Tooltip, a as TooltipProps } from './Tooltip-B5wJQZUi.js';
19
19
  export { useDebounce, useLocalStorage } from './hooks/index.js';
20
20
  export { ButtonGroupProps } from '@heroui/button';
21
21
  import 'react/jsx-runtime';
@@ -30,3 +30,4 @@ import '@heroui/drawer';
30
30
  import '@heroui/chip';
31
31
  import '@heroui/modal';
32
32
  import '@heroui/popover';
33
+ import '@heroui/tooltip';
package/dist/index.js CHANGED
@@ -1,15 +1,14 @@
1
1
  import {
2
2
  Table_default,
3
3
  tableVariants
4
- } from "./chunk-PACHM4GL.js";
4
+ } from "./chunk-QMYSCJEJ.js";
5
5
  import {
6
6
  Tabs_default,
7
7
  tabsVariants
8
8
  } from "./chunk-JZHEG3SM.js";
9
9
  import {
10
- Tooltip_default,
11
- tooltipPlacementOptions
12
- } from "./chunk-VZJTWG7U.js";
10
+ Tooltip_default
11
+ } from "./chunk-R6SBWVCU.js";
13
12
  import {
14
13
  useDebounce,
15
14
  useLocalStorage
@@ -104,7 +103,6 @@ export {
104
103
  modalVariants,
105
104
  tableVariants,
106
105
  tabsVariants,
107
- tooltipPlacementOptions,
108
106
  useDebounce,
109
107
  useLocalStorage
110
108
  };
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.36.0",
5
+ "version": "0.37.0",
6
6
  "type": "module",
7
7
  "main": "./dist/index.cjs",
8
8
  "module": "./dist/index.js",
@@ -165,7 +165,7 @@
165
165
  "@heroui/theme": "2.4.11",
166
166
  "@heroui/tabs": "2.2.12",
167
167
  "@heroui/tooltip": "2.2.12",
168
- "framer-motion": "12.4.10",
168
+ "framer-motion": "12.4.11",
169
169
  "next-themes": "0.4.5",
170
170
  "react-icons": "5.5.0",
171
171
  "@fuf-stack/pixel-utils": "0.5.1"
@@ -177,10 +177,10 @@
177
177
  "@uiw/react-json-view": "2.0.0-alpha.30",
178
178
  "react": "19.0.0",
179
179
  "react-dom": "19.0.0",
180
- "@repo/tailwind-config": "0.0.1",
180
+ "@repo/storybook-config": "0.0.1",
181
181
  "@repo/tsup-config": "0.0.1",
182
- "@repo/vite-config": "0.0.1",
183
- "@repo/storybook-config": "0.0.1"
182
+ "@repo/tailwind-config": "0.0.1",
183
+ "@repo/vite-config": "0.0.1"
184
184
  },
185
185
  "scripts": {
186
186
  "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-2DCJPDZL.cjs","../src/Table/Table.tsx","../src/Table/index.ts"],"names":["Table_default"],"mappings":"AAAA;ACGA;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AA;AAAA,cAAA;AAAA,gBAIE,QAAA,EAAA,CAAC,SAAA,EAAA,mBACA,6BAAA,gBAAC,EAAA,EAAW,QAAA,EAAA,gCAAA,IAAY,EAAM,SAAS,EAAA,CAAE;AAAA,cAAA,CAAA;AAAA,cAJtC,IAAA,CAAK;AAAA,YAMZ;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,CAAA;AAEJ,CAAA;AAEA,IAAO,cAAA,EAAQ,KAAA;AD9Df;AACA;AE9FA,IAAOA,eAAAA,EAAQ,aAAA;AFgGf;AACA;AACE;AACA;AACA;AACF,sHAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-2DCJPDZL.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport {\n getKeyValue,\n Table as HeroTable,\n TableBody,\n TableCell,\n TableColumn,\n TableHeader,\n TableRow,\n} from '@heroui/table';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// table styling variants\nexport const tableVariants = tv({\n slots: {\n base: '',\n wrapper: '',\n table: '',\n thead: '',\n tbody: '',\n tr: '',\n th: 'bg-content2',\n td: '',\n tfoot: '',\n sortIcon: '',\n emptyWrapper: '',\n loadingWrapper: '',\n },\n variants: {\n separation: {\n divider: {\n tr: 'divide-x rounded-lg border-b data-[last=true]:border-none [&:first-child:not([data-first=\"true\"])]:border-none',\n },\n 'divider-x': {\n tr: 'divide-x',\n },\n 'divider-y': {\n tr: 'rounded-lg border-b data-[last=true]:border-none [&:first-child:not([data-first=\"true\"])]:border-none',\n },\n 'striped-divider-x': {\n tr: 'divide-x',\n th: 'border-divider',\n td: 'border-divider first:rounded-s-lg last:rounded-e-lg group-data-[odd=true]:bg-content2',\n },\n striped: {\n tr: '',\n td: 'first:rounded-s-lg last:rounded-e-lg group-data-[odd=true]:bg-content2',\n },\n none: {},\n },\n },\n});\n\nexport type VariantProps = TVProps<typeof tableVariants>;\ntype ClassName = TVClassName<typeof tableVariants>;\n\nexport interface TableColumnProps {\n key: string;\n label: ReactNode;\n}\n\nexport interface TableRowProps {\n key: string | number;\n [key: string | number]: ReactNode;\n}\n\nexport interface TableProps extends VariantProps {\n /** Aria label for the Table. */\n ariaLabel?: string;\n /** Component to display at the bottom of the Table. */\n bottomContent?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Objects with table data */\n columns: TableColumnProps[];\n /** Component to display if there are no rows! */\n emptyContent?: ReactNode;\n /** Determine if the Table should have a card like wrapper. */\n hasWrapper?: boolean;\n /** remove header */\n hideHeader?: boolean;\n /** Tells the Table to show the loading component. */\n loading?: boolean;\n /** Loading animation component. */\n loadingContent?: ReactNode;\n /** Items displayed as rows in the Table. Should have key-value pair for each column. */\n rows?: TableRowProps[];\n /** Separation style for the rows & columns. */\n separation?:\n | 'none'\n | 'striped'\n | 'striped-divider-x'\n | 'divider-x'\n | 'divider-y'\n | 'divider';\n /** Keeps the header of the Table in view while scrolling a height limited Table. */\n stickyHeader?: boolean;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Virtualize allows efficient rendering of large lists by only rendering items that are visible in the viewport. */\n virtualized?: boolean;\n}\n\n/**\n * Table component based on [HeroUI Table](https://www.heroui.com//docs/components/table)\n */\nconst Table = ({\n ariaLabel = undefined,\n bottomContent = undefined,\n className = undefined,\n columns,\n emptyContent = 'No rows to display.',\n hasWrapper = false,\n hideHeader = false,\n loading = false,\n loadingContent = undefined,\n rows = [],\n separation = 'none',\n stickyHeader = false,\n testId = undefined,\n virtualized = false,\n}: TableProps) => {\n const variants = tableVariants({ separation });\n const classNames = variantsToClassNames(variants, className, 'base');\n\n return (\n <HeroTable\n aria-label={ariaLabel}\n bottomContent={bottomContent}\n classNames={classNames}\n data-testid={testId && slugify(testId)}\n hideHeader={hideHeader}\n isHeaderSticky={stickyHeader}\n isStriped={separation === 'striped' || separation === 'striped-divider-x'}\n isVirtualized={virtualized}\n removeWrapper={!hasWrapper}\n >\n <TableHeader columns={columns}>\n {(column: TableColumnProps) => (\n <TableColumn key={column.key}>{column.label}</TableColumn>\n )}\n </TableHeader>\n <TableBody\n isLoading={loading}\n loadingContent={loadingContent || '...'} // TODO: use future spinner/loading component\n emptyContent={emptyContent}\n items={rows}\n >\n {(item: TableRowProps) => (\n <TableRow\n key={item.key}\n // data-testid={`${slugify(testId || 'table')}_item_${slugify(JSON.stringify(item.testId || item.key))}`}\n >\n {(columnKey) => (\n <TableCell>{getKeyValue(item, columnKey)}</TableCell>\n )}\n </TableRow>\n )}\n </TableBody>\n </HeroTable>\n );\n};\n\nexport default Table;\n","import Table, { tableVariants } from './Table';\n\nexport type {\n TableProps,\n TableRowProps,\n TableColumnProps,\n VariantProps,\n} from './Table';\n\nexport { Table, tableVariants };\n\nexport default Table;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-D6LCMOKN.cjs","../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"names":["Tooltip_default"],"mappings":"AAAA;ACGA,0CAAuC;AAEvC,oDAAyC;AA2EnC,+CAAA;AAxEC,IAAM,gBAAA,EAAkB,4BAAA;AAAG,EAChC,KAAA,EAAO;AAAA,IACL,IAAA,EAAM,EAAA;AAAA,IACN,OAAA,EAAS,EAAA;AAAA,IACT,OAAA,EAAS;AAAA,EACX;AACF,CAAC,CAAA;AAKM,IAAM,wBAAA,EAA0B;AAAA,EACrC,KAAA;AAAA,EACA,QAAA;AAAA,EACA,MAAA;AAAA,EACA;AACF,CAAA;AA2BA,IAAM,QAAA,EAAU,CAAC;AAAA,EACf,QAAA;AAAA,EACA,SAAA,EAAW,WAAA,EAAa,KAAA,CAAA;AAAA,EACxB,WAAA,EAAa,GAAA;AAAA,EACb,iBAAA,EAAmB,CAAA;AAAA,EACnB,OAAA;AAAA,EACA,YAAA,EAAc,KAAA;AAAA,EACd,MAAA,EAAQ,CAAA;AAAA,EACR,aAAA,EAAe,KAAA,CAAA;AAAA,EACf,UAAA,EAAY;AACd,CAAA,EAAA,GAAoB;AAElB,EAAA,MAAM,SAAA,EAAW,eAAA,CAAgB,CAAA;AACjC,EAAA,MAAM,WAAA,EAAa,8CAAA,QAAqB,EAAU,UAAA,EAAY,MAAM,CAAA;AAEpE,EAAA,uBACE,6BAAA;AAAA,IAAC,gBAAA;AAAA,IAAA;AAAA,MACC,UAAA;AAAA,MACA,UAAA;AAAA,MACA,gBAAA;AAAA,MACA,OAAA;AAAA,MACA,WAAA;AAAA,MACA,KAAA;AAAA,MACA,OAAA,EAAS,CAAC,CAAA,EAAA,GAAM,CAAA,CAAE,cAAA,CAAe,CAAA;AAAA,MACjC,YAAA;AAAA,MACA,SAAA;AAAA,MACA,UAAA,EAAU,IAAA;AAAA,MACV,SAAA,EAAS,IAAA;AAAA,MAET,QAAA,kBAAA,6BAAA,MAAC,EAAA,EAAK,SAAA,EAAW,UAAA,CAAW,OAAA,EAAU,SAAA,CAAS;AAAA,IAAA;AAAA,EACjD,CAAA;AAEJ,CAAA;AAEA,IAAO,gBAAA,EAAQ,OAAA;ADpCf;AACA;AE5CA,IAAOA,iBAAAA,EAAQ,eAAA;AF8Cf;AACA;AACE;AACA;AACA;AACF,kJAAC","file":"/home/runner/work/pixels/pixels/packages/pixels/dist/chunk-D6LCMOKN.cjs","sourcesContent":[null,"import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { Tooltip as HeroTooltip } from '@heroui/tooltip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// tooltip variants\nexport const tooltipVariants = tv({\n slots: {\n base: '',\n content: '',\n wrapper: 'cursor-pointer',\n },\n});\n\ntype VariantProps = TVProps<typeof tooltipVariants>;\ntype ClassName = TVClassName<typeof tooltipVariants>;\n\nexport const tooltipPlacementOptions = [\n 'top',\n 'bottom',\n 'left',\n 'right',\n] as const;\nexport type TooltipPlacement = (typeof tooltipPlacementOptions)[number];\n\nexport interface TooltipProps extends VariantProps {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** delay in milliseconds before the tooltip opens. */\n closeDelay?: number;\n /** delay in milliseconds before the tooltip opens. */\n delay?: number;\n /** placement padding in px */\n containerPadding?: number;\n /** content displayed in the tooltip */\n content: ReactNode;\n /** open overlay initially when uncontrolled */\n defaultOpen?: boolean;\n /** handler that is called when the overlay's open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n /** placement if the tooltip */\n placement?: TooltipPlacement;\n}\n\n/**\n * Tooltip component based on [HeroUI Tooltip](https://www.heroui.com//docs/components/tooltip)\n */\nconst Tooltip = ({\n children,\n className: _className = undefined,\n closeDelay = 500,\n containerPadding = 0,\n content,\n defaultOpen = false,\n delay = 0,\n onOpenChange = undefined,\n placement = 'top',\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroTooltip\n classNames={classNames}\n closeDelay={closeDelay}\n containerPadding={containerPadding}\n content={content}\n defaultOpen={defaultOpen}\n delay={delay}\n onClick={(e) => e.preventDefault()}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n <span className={classNames.wrapper}>{children}</span>\n </HeroTooltip>\n );\n};\n\nexport default Tooltip;\n","import Tooltip, { tooltipPlacementOptions } from './Tooltip';\n\nexport type { TooltipProps } from './Tooltip';\n\nexport { Tooltip, tooltipPlacementOptions };\n\nexport default Tooltip;\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Table/Table.tsx","../src/Table/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport {\n getKeyValue,\n Table as HeroTable,\n TableBody,\n TableCell,\n TableColumn,\n TableHeader,\n TableRow,\n} from '@heroui/table';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// table styling variants\nexport const tableVariants = tv({\n slots: {\n base: '',\n wrapper: '',\n table: '',\n thead: '',\n tbody: '',\n tr: '',\n th: 'bg-content2',\n td: '',\n tfoot: '',\n sortIcon: '',\n emptyWrapper: '',\n loadingWrapper: '',\n },\n variants: {\n separation: {\n divider: {\n tr: 'divide-x rounded-lg border-b data-[last=true]:border-none [&:first-child:not([data-first=\"true\"])]:border-none',\n },\n 'divider-x': {\n tr: 'divide-x',\n },\n 'divider-y': {\n tr: 'rounded-lg border-b data-[last=true]:border-none [&:first-child:not([data-first=\"true\"])]:border-none',\n },\n 'striped-divider-x': {\n tr: 'divide-x',\n th: 'border-divider',\n td: 'border-divider first:rounded-s-lg last:rounded-e-lg group-data-[odd=true]:bg-content2',\n },\n striped: {\n tr: '',\n td: 'first:rounded-s-lg last:rounded-e-lg group-data-[odd=true]:bg-content2',\n },\n none: {},\n },\n },\n});\n\nexport type VariantProps = TVProps<typeof tableVariants>;\ntype ClassName = TVClassName<typeof tableVariants>;\n\nexport interface TableColumnProps {\n key: string;\n label: ReactNode;\n}\n\nexport interface TableRowProps {\n key: string | number;\n [key: string | number]: ReactNode;\n}\n\nexport interface TableProps extends VariantProps {\n /** Aria label for the Table. */\n ariaLabel?: string;\n /** Component to display at the bottom of the Table. */\n bottomContent?: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** Objects with table data */\n columns: TableColumnProps[];\n /** Component to display if there are no rows! */\n emptyContent?: ReactNode;\n /** Determine if the Table should have a card like wrapper. */\n hasWrapper?: boolean;\n /** remove header */\n hideHeader?: boolean;\n /** Tells the Table to show the loading component. */\n loading?: boolean;\n /** Loading animation component. */\n loadingContent?: ReactNode;\n /** Items displayed as rows in the Table. Should have key-value pair for each column. */\n rows?: TableRowProps[];\n /** Separation style for the rows & columns. */\n separation?:\n | 'none'\n | 'striped'\n | 'striped-divider-x'\n | 'divider-x'\n | 'divider-y'\n | 'divider';\n /** Keeps the header of the Table in view while scrolling a height limited Table. */\n stickyHeader?: boolean;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Virtualize allows efficient rendering of large lists by only rendering items that are visible in the viewport. */\n virtualized?: boolean;\n}\n\n/**\n * Table component based on [HeroUI Table](https://www.heroui.com//docs/components/table)\n */\nconst Table = ({\n ariaLabel = undefined,\n bottomContent = undefined,\n className = undefined,\n columns,\n emptyContent = 'No rows to display.',\n hasWrapper = false,\n hideHeader = false,\n loading = false,\n loadingContent = undefined,\n rows = [],\n separation = 'none',\n stickyHeader = false,\n testId = undefined,\n virtualized = false,\n}: TableProps) => {\n const variants = tableVariants({ separation });\n const classNames = variantsToClassNames(variants, className, 'base');\n\n return (\n <HeroTable\n aria-label={ariaLabel}\n bottomContent={bottomContent}\n classNames={classNames}\n data-testid={testId && slugify(testId)}\n hideHeader={hideHeader}\n isHeaderSticky={stickyHeader}\n isStriped={separation === 'striped' || separation === 'striped-divider-x'}\n isVirtualized={virtualized}\n removeWrapper={!hasWrapper}\n >\n <TableHeader columns={columns}>\n {(column: TableColumnProps) => (\n <TableColumn key={column.key}>{column.label}</TableColumn>\n )}\n </TableHeader>\n <TableBody\n isLoading={loading}\n loadingContent={loadingContent || '...'} // TODO: use future spinner/loading component\n emptyContent={emptyContent}\n items={rows}\n >\n {(item: TableRowProps) => (\n <TableRow\n key={item.key}\n // data-testid={`${slugify(testId || 'table')}_item_${slugify(JSON.stringify(item.testId || item.key))}`}\n >\n {(columnKey) => (\n <TableCell>{getKeyValue(item, columnKey)}</TableCell>\n )}\n </TableRow>\n )}\n </TableBody>\n </HeroTable>\n );\n};\n\nexport default Table;\n","import Table, { tableVariants } from './Table';\n\nexport type {\n TableProps,\n TableRowProps,\n TableColumnProps,\n VariantProps,\n} from './Table';\n\nexport { Table, tableVariants };\n\nexport default Table;\n"],"mappings":";AAGA;AAAA,EACE;AAAA,EACA,SAAS;AAAA,EACT;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AAEP,SAAS,SAAS,IAAI,4B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,MACf,eAAe,CAAC;AAAA,MAEhB;AAAA,4BAAC,eAAY,SACV,WAAC,WACA,oBAAC,eAA8B,iBAAO,SAApB,OAAO,GAAmB,GAEhD;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,YACX,gBAAgB,kBAAkB;AAAA,YAClC;AAAA,YACA,OAAO;AAAA,YAEN,WAAC,SACA;AAAA,cAAC;AAAA;AAAA,gBAIE,WAAC,cACA,oBAAC,aAAW,sBAAY,MAAM,SAAS,GAAE;AAAA;AAAA,cAJtC,KAAK;AAAA,YAMZ;AAAA;AAAA,QAEJ;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,IAAO,gBAAQ;;;AC3Jf,IAAOA,iBAAQ;","names":["Table_default"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/Tooltip/Tooltip.tsx","../src/Tooltip/index.ts"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { Tooltip as HeroTooltip } from '@heroui/tooltip';\n\nimport { tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\n// tooltip variants\nexport const tooltipVariants = tv({\n slots: {\n base: '',\n content: '',\n wrapper: 'cursor-pointer',\n },\n});\n\ntype VariantProps = TVProps<typeof tooltipVariants>;\ntype ClassName = TVClassName<typeof tooltipVariants>;\n\nexport const tooltipPlacementOptions = [\n 'top',\n 'bottom',\n 'left',\n 'right',\n] as const;\nexport type TooltipPlacement = (typeof tooltipPlacementOptions)[number];\n\nexport interface TooltipProps extends VariantProps {\n /** trigger child components */\n children: ReactNode;\n /** CSS class name */\n className?: ClassName;\n /** delay in milliseconds before the tooltip opens. */\n closeDelay?: number;\n /** delay in milliseconds before the tooltip opens. */\n delay?: number;\n /** placement padding in px */\n containerPadding?: number;\n /** content displayed in the tooltip */\n content: ReactNode;\n /** open overlay initially when uncontrolled */\n defaultOpen?: boolean;\n /** handler that is called when the overlay's open state changes */\n onOpenChange?: (isOpen: boolean) => void;\n /** placement if the tooltip */\n placement?: TooltipPlacement;\n}\n\n/**\n * Tooltip component based on [HeroUI Tooltip](https://www.heroui.com//docs/components/tooltip)\n */\nconst Tooltip = ({\n children,\n className: _className = undefined,\n closeDelay = 500,\n containerPadding = 0,\n content,\n defaultOpen = false,\n delay = 0,\n onOpenChange = undefined,\n placement = 'top',\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants();\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroTooltip\n classNames={classNames}\n closeDelay={closeDelay}\n containerPadding={containerPadding}\n content={content}\n defaultOpen={defaultOpen}\n delay={delay}\n onClick={(e) => e.preventDefault()}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n <span className={classNames.wrapper}>{children}</span>\n </HeroTooltip>\n );\n};\n\nexport default Tooltip;\n","import Tooltip, { tooltipPlacementOptions } from './Tooltip';\n\nexport type { TooltipProps } from './Tooltip';\n\nexport { Tooltip, tooltipPlacementOptions };\n\nexport default Tooltip;\n"],"mappings":";AAGA,SAAS,WAAW,mBAAmB;AAEvC,SAAS,IAAI,4BAA4B;AA2EnC;AAxEC,IAAM,kBAAkB,GAAG;AAAA,EAChC,OAAO;AAAA,IACL,MAAM;AAAA,IACN,SAAS;AAAA,IACT,SAAS;AAAA,EACX;AACF,CAAC;AAKM,IAAM,0BAA0B;AAAA,EACrC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;AA2BA,IAAM,UAAU,CAAC;AAAA,EACf;AAAA,EACA,WAAW,aAAa;AAAA,EACxB,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB;AAAA,EACA,cAAc;AAAA,EACd,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,YAAY;AACd,MAAoB;AAElB,QAAM,WAAW,gBAAgB;AACjC,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,SAAS,CAAC,MAAM,EAAE,eAAe;AAAA,MACjC;AAAA,MACA;AAAA,MACA,YAAU;AAAA,MACV,WAAS;AAAA,MAET,8BAAC,UAAK,WAAW,WAAW,SAAU,UAAS;AAAA;AAAA,EACjD;AAEJ;AAEA,IAAO,kBAAQ;;;AC/Ef,IAAOA,mBAAQ;","names":["Tooltip_default"]}