@fuf-stack/pixels 1.13.1 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Accordion/Accordion.d.mts +22 -22
- package/dist/Accordion/Accordion.d.mts.map +1 -1
- package/dist/Accordion/Accordion.mjs +3 -2
- package/dist/Accordion/Accordion.mjs.map +1 -1
- package/dist/Alert/Alert.d.mts +42 -42
- package/dist/Alert/Alert.d.mts.map +1 -1
- package/dist/Alert/Alert.mjs +5 -3
- package/dist/Alert/Alert.mjs.map +1 -1
- package/dist/Avatar/Avatar.d.mts +14 -14
- package/dist/Avatar/Avatar.d.mts.map +1 -1
- package/dist/Avatar/Avatar.mjs +3 -1
- package/dist/Avatar/Avatar.mjs.map +1 -1
- package/dist/AvatarGroup/AvatarGroup.d.mts +2 -2
- package/dist/AvatarGroup/AvatarGroup.d.mts.map +1 -1
- package/dist/Badge/Badge.d.mts +3 -3
- package/dist/Badge/Badge.d.mts.map +1 -1
- package/dist/Badge/Badge.mjs +3 -1
- package/dist/Badge/Badge.mjs.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.d.mts +15 -15
- package/dist/Breadcrumb/Breadcrumb.d.mts.map +1 -1
- package/dist/Breadcrumb/Breadcrumb.mjs +2 -1
- package/dist/Breadcrumb/Breadcrumb.mjs.map +1 -1
- package/dist/Button/Button.d.mts +2 -2
- package/dist/Button/Button.d.mts.map +1 -1
- package/dist/Button/Button.mjs +11 -10
- package/dist/Button/Button.mjs.map +1 -1
- package/dist/Card/Card.d.mts +4 -4
- package/dist/Card/Card.d.mts.map +1 -1
- package/dist/Card/Card.mjs +2 -1
- package/dist/Card/Card.mjs.map +1 -1
- package/dist/Drawer/Drawer.d.mts +27 -27
- package/dist/Drawer/Drawer.d.mts.map +1 -1
- package/dist/Drawer/Drawer.mjs +3 -1
- package/dist/Drawer/Drawer.mjs.map +1 -1
- package/dist/Json/Json.d.mts +2 -2
- package/dist/Json/Json.d.mts.map +1 -1
- package/dist/Json/jsonParser.mjs +9 -4
- package/dist/Json/jsonParser.mjs.map +1 -1
- package/dist/Label/Label.d.mts +78 -78
- package/dist/Label/Label.d.mts.map +1 -1
- package/dist/Label/Label.mjs +3 -2
- package/dist/Label/Label.mjs.map +1 -1
- package/dist/Menu/Menu.d.mts +16 -16
- package/dist/Menu/Menu.d.mts.map +1 -1
- package/dist/Menu/Menu.mjs +2 -1
- package/dist/Menu/Menu.mjs.map +1 -1
- package/dist/Modal/Modal.d.mts +12 -12
- package/dist/Modal/Modal.d.mts.map +1 -1
- package/dist/Modal/Modal.mjs +3 -1
- package/dist/Modal/Modal.mjs.map +1 -1
- package/dist/Modal/modalStore.d.mts +4 -5
- package/dist/Modal/modalStore.d.mts.map +1 -1
- package/dist/Popover/Popover.d.mts +19 -19
- package/dist/Popover/Popover.d.mts.map +1 -1
- package/dist/Popover/Popover.mjs +2 -1
- package/dist/Popover/Popover.mjs.map +1 -1
- package/dist/Progress/Progress.d.mts +40 -40
- package/dist/Progress/Progress.d.mts.map +1 -1
- package/dist/Progress/Progress.mjs +2 -1
- package/dist/Progress/Progress.mjs.map +1 -1
- package/dist/ProgressCircular/ProgressCircular.d.mts +42 -42
- package/dist/ProgressCircular/ProgressCircular.d.mts.map +1 -1
- package/dist/ProgressCircular/ProgressCircular.mjs +6 -6
- package/dist/ProgressCircular/ProgressCircular.mjs.map +1 -1
- package/dist/ScrollShadow/ScrollShadow.d.mts +2 -2
- package/dist/ScrollShadow/ScrollShadow.d.mts.map +1 -1
- package/dist/SearchInput/SearchInput.d.mts +4 -4
- package/dist/SearchInput/SearchInput.d.mts.map +1 -1
- package/dist/SearchInput/SearchInput.mjs +2 -1
- package/dist/SearchInput/SearchInput.mjs.map +1 -1
- package/dist/Table/Table.d.mts +6 -6
- package/dist/Table/Table.d.mts.map +1 -1
- package/dist/Table/Table.mjs +3 -1
- package/dist/Table/Table.mjs.map +1 -1
- package/dist/Tabs/Tabs.d.mts +5 -5
- package/dist/Tabs/Tabs.d.mts.map +1 -1
- package/dist/Tabs/Tabs.mjs +3 -1
- package/dist/Tabs/Tabs.mjs.map +1 -1
- package/dist/Toast/Toaster.d.mts +2 -2
- package/dist/Toast/Toaster.d.mts.map +1 -1
- package/dist/Toast/toast.d.mts +3 -3
- package/dist/Toast/toast.d.mts.map +1 -1
- package/dist/Tooltip/Tooltip.d.mts +13 -13
- package/dist/Tooltip/Tooltip.d.mts.map +1 -1
- package/dist/Tooltip/Tooltip.mjs +2 -1
- package/dist/Tooltip/Tooltip.mjs.map +1 -1
- package/dist/_virtual/_rolldown/runtime.mjs +1 -1
- package/dist/hooks/useDebounce/useDebounce.d.mts +1 -2
- package/dist/hooks/useDebounce/useDebounce.d.mts.map +1 -1
- package/dist/hooks/useDebounce/useDebounce.mjs +8 -6
- package/dist/hooks/useDebounce/useDebounce.mjs.map +1 -1
- package/dist/hooks/useIsInitialRenderCycle/useIsInitialRenderCycle.d.mts +1 -2
- package/dist/hooks/useIsInitialRenderCycle/useIsInitialRenderCycle.d.mts.map +1 -1
- package/dist/hooks/useIsInitialRenderCycle/useIsInitialRenderCycle.mjs.map +1 -1
- package/dist/hooks/useLocalStorage/useLocalStorage.d.mts +1 -2
- package/dist/hooks/useLocalStorage/useLocalStorage.d.mts.map +1 -1
- package/dist/hooks/useLocalStorage/useLocalStorage.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/Container.mjs +2 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/Container.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/arrow/TriangleArrow.mjs +8 -7
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/arrow/TriangleArrow.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/comps/Copied.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/comps/KeyValues.mjs +11 -8
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/comps/KeyValues.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/comps/NestedClose.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/comps/NestedOpen.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/comps/Value.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/section/CountInfo.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/section/CountInfoExtra.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/section/Ellipsis.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/section/KeyName.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/section/Row.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/store/Expands.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/store/Section.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/store/ShowTools.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/store/Symbols.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/store/Types.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/store.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/symbol/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/types/index.mjs.map +1 -1
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/utils/useRender.mjs +6 -3
- package/dist/node_modules/.pnpm/@uiw_react-json-view@2.0.0-alpha.43_@babel_runtime@7.29.7_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/@uiw/react-json-view/esm/utils/useRender.mjs.map +1 -1
- package/dist/utils/createWithSuspense/createWithSuspense.d.mts +3 -4
- package/dist/utils/createWithSuspense/createWithSuspense.d.mts.map +1 -1
- package/dist/utils/createWithSuspense/createWithSuspense.mjs +20 -19
- package/dist/utils/createWithSuspense/createWithSuspense.mjs.map +1 -1
- package/package.json +7 -7
package/dist/Table/Table.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TVClassName, TVProps } from "@fuf-stack/pixel-utils";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
//#region src/Table/Table.d.ts
|
|
4
|
-
declare const tableVariants: ((props?: ({
|
|
4
|
+
export declare const tableVariants: ((props?: ({
|
|
5
5
|
separation?: "none" | "divider" | "divider-x" | "divider-y" | "striped-divider-x" | "striped" | undefined;
|
|
6
6
|
} & ({
|
|
7
7
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -525,17 +525,17 @@ declare const tableVariants: ((props?: ({
|
|
|
525
525
|
})))[];
|
|
526
526
|
variantKeys: "separation"[];
|
|
527
527
|
};
|
|
528
|
-
type VariantProps = TVProps<typeof tableVariants>;
|
|
528
|
+
export type VariantProps = TVProps<typeof tableVariants>;
|
|
529
529
|
type ClassName = TVClassName<typeof tableVariants>;
|
|
530
|
-
interface TableColumnProps {
|
|
530
|
+
export interface TableColumnProps {
|
|
531
531
|
key: string;
|
|
532
532
|
label: ReactNode;
|
|
533
533
|
}
|
|
534
|
-
interface TableRowProps {
|
|
534
|
+
export interface TableRowProps {
|
|
535
535
|
key: string | number;
|
|
536
536
|
[key: string | number]: ReactNode;
|
|
537
537
|
}
|
|
538
|
-
interface TableProps extends VariantProps {
|
|
538
|
+
export interface TableProps extends VariantProps {
|
|
539
539
|
/** Aria label for the Table. */
|
|
540
540
|
ariaLabel?: string;
|
|
541
541
|
/** Component to display at the bottom of the Table. */
|
|
@@ -574,5 +574,5 @@ interface TableProps extends VariantProps {
|
|
|
574
574
|
*/
|
|
575
575
|
declare const Table: ({ ariaLabel, bottomContent, className, columns, emptyContent, hasWrapper, hideHeader, loading, loadingContent, maxTableHeight, rowHeight, rows, separation, stickyHeader, testId, virtualized }: TableProps) => import("react").JSX.Element;
|
|
576
576
|
//#endregion
|
|
577
|
-
export {
|
|
577
|
+
export { Table as default };
|
|
578
578
|
//# sourceMappingURL=Table.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.d.mts","names":[],"sources":["../../src/Table/Table.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Table.d.mts","names":[],"sources":["../../src/Table/Table.tsx"],"mappings":";;;qBAgBa,iBAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAwCd,eAAe,eAAe;KACrC,YAAY,mBAAmB;iBAEnB;EACf;EACA,OAAO;;iBAGQ;EACf;GACC,uBAAuB;;iBAGT,mBAAmB;;EAElC;;EAEA,gBAAgB;;EAEhB,YAAY;;EAEZ,SAAS;;EAET,eAAe;;EAEf;;EAEA;;EAEA;;EAEA,iBAAiB;;EAEjB;;EAEA;;EAEA,OAAO;;EAEP;;EAQA;;EAEA;;EAEA;;;;;cAMI,UAAS,WAAA,eAAA,WAAA,SAAA,cAAA,YAAA,YAAA,SAAA,gBAAA,gBAAA,WAAA,MAAA,YAAA,cAAA,QAAA,eAiBZ,+BAAU,IAAA"}
|
package/dist/Table/Table.mjs
CHANGED
|
@@ -37,10 +37,12 @@ const tableVariants = tv({
|
|
|
37
37
|
* Table component based on [HeroUI Table](https://www.heroui.com//docs/components/table)
|
|
38
38
|
*/
|
|
39
39
|
const Table$1 = ({ ariaLabel = void 0, bottomContent = void 0, className = void 0, columns, emptyContent = "No rows to display.", hasWrapper = false, hideHeader = false, loading = false, loadingContent = void 0, maxTableHeight = void 0, rowHeight = void 0, rows = [], separation = "none", stickyHeader = false, testId = void 0, virtualized = false }) => {
|
|
40
|
+
const variants = tableVariants({ separation });
|
|
41
|
+
const classNames = variantsToClassNames(variants, className, "base");
|
|
40
42
|
return /* @__PURE__ */ jsxs(Table, {
|
|
41
43
|
"aria-label": ariaLabel,
|
|
42
44
|
bottomContent,
|
|
43
|
-
classNames
|
|
45
|
+
classNames,
|
|
44
46
|
"data-testid": testId ? slugify(testId) : null,
|
|
45
47
|
hideHeader,
|
|
46
48
|
isHeaderSticky: stickyHeader,
|
package/dist/Table/Table.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.mjs","names":["Table","HeroTable"],"sources":["../../src/Table/Table.tsx"],"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) : null}\n hideHeader={hideHeader}\n isHeaderSticky={stickyHeader}\n isStriped={separation === 'striped' || separation === 'striped-divider-x'}\n isVirtualized={virtualized}\n maxTableHeight={maxTableHeight}\n removeWrapper={virtualized ? false : !hasWrapper} // always show wrapper if virtualized\n rowHeight={rowHeight}\n >\n <TableHeader columns={columns}>\n {(column: TableColumnProps) => {\n return <TableColumn key={column.key}>{column.label}</TableColumn>;\n }}\n </TableHeader>\n <TableBody\n emptyContent={emptyContent}\n isLoading={loading}\n items={rows}\n loadingContent={loadingContent ?? '...'} // TODO: use future spinner/loading component\n >\n {(item: TableRowProps) => {\n return (\n <TableRow\n key={item.key}\n // data-testid={`${slugify(testId || 'table')}_item_${slugify(JSON.stringify(item.testId || item.key))}`}\n >\n {(columnKey) => {\n return <TableCell>{getKeyValue(item, columnKey)}</TableCell>;\n }}\n </TableRow>\n );\n }}\n </TableBody>\n </HeroTable>\n );\n};\n\nexport default Table;\n"],"mappings":";;;;AAgBA,MAAa,gBAAgB,GAAG;CAC9B,OAAO;EACL,MAAM;EACN,SAAS;EACT,OAAO;EACP,OAAO;EACP,OAAO;EACP,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,OAAO;EACP,UAAU;EACV,cAAc;EACd,gBAAgB;CAClB;CACA,UAAU,EACR,YAAY;EACV,SAAS,EACP,IAAI,mHACN;EACA,aAAa,EACX,IAAI,WACN;EACA,aAAa,EACX,IAAI,0GACN;EACA,qBAAqB;GACnB,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,SAAS;GACP,IAAI;GACJ,IAAI;EACN;EACA,MAAM,CAAC;CACT,EACF;AACF,CAAC;;;;AA2DD,MAAMA,WAAS,EACb,YAAY,KAAA,GACZ,gBAAgB,KAAA,GAChB,YAAY,KAAA,GACZ,SACA,eAAe,uBACf,aAAa,OACb,aAAa,OACb,UAAU,OACV,iBAAiB,KAAA,GACjB,iBAAiB,KAAA,GACjB,YAAY,KAAA,GACZ,OAAO,CAAC,GACR,aAAa,QACb,eAAe,OACf,SAAS,KAAA,GACT,cAAc,YACE;
|
|
1
|
+
{"version":3,"file":"Table.mjs","names":["Table","HeroTable"],"sources":["../../src/Table/Table.tsx"],"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) : null}\n hideHeader={hideHeader}\n isHeaderSticky={stickyHeader}\n isStriped={separation === 'striped' || separation === 'striped-divider-x'}\n isVirtualized={virtualized}\n maxTableHeight={maxTableHeight}\n removeWrapper={virtualized ? false : !hasWrapper} // always show wrapper if virtualized\n rowHeight={rowHeight}\n >\n <TableHeader columns={columns}>\n {(column: TableColumnProps) => {\n return <TableColumn key={column.key}>{column.label}</TableColumn>;\n }}\n </TableHeader>\n <TableBody\n emptyContent={emptyContent}\n isLoading={loading}\n items={rows}\n loadingContent={loadingContent ?? '...'} // TODO: use future spinner/loading component\n >\n {(item: TableRowProps) => {\n return (\n <TableRow\n key={item.key}\n // data-testid={`${slugify(testId || 'table')}_item_${slugify(JSON.stringify(item.testId || item.key))}`}\n >\n {(columnKey) => {\n return <TableCell>{getKeyValue(item, columnKey)}</TableCell>;\n }}\n </TableRow>\n );\n }}\n </TableBody>\n </HeroTable>\n );\n};\n\nexport default Table;\n"],"mappings":";;;;AAgBA,MAAa,gBAAgB,GAAG;CAC9B,OAAO;EACL,MAAM;EACN,SAAS;EACT,OAAO;EACP,OAAO;EACP,OAAO;EACP,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,OAAO;EACP,UAAU;EACV,cAAc;EACd,gBAAgB;CAClB;CACA,UAAU,EACR,YAAY;EACV,SAAS,EACP,IAAI,mHACN;EACA,aAAa,EACX,IAAI,WACN;EACA,aAAa,EACX,IAAI,0GACN;EACA,qBAAqB;GACnB,IAAI;GACJ,IAAI;GACJ,IAAI;EACN;EACA,SAAS;GACP,IAAI;GACJ,IAAI;EACN;EACA,MAAM,CAAC;CACT,EACF;AACF,CAAC;;;;AA2DD,MAAMA,WAAS,EACb,YAAY,KAAA,GACZ,gBAAgB,KAAA,GAChB,YAAY,KAAA,GACZ,SACA,eAAe,uBACf,aAAa,OACb,aAAa,OACb,UAAU,OACV,iBAAiB,KAAA,GACjB,iBAAiB,KAAA,GACjB,YAAY,KAAA,GACZ,OAAO,CAAC,GACR,aAAa,QACb,eAAe,OACf,SAAS,KAAA,GACT,cAAc,YACE;CAChB,MAAM,WAAW,cAAc,EAAE,WAAW,CAAC;CAC7C,MAAM,aAAa,qBAAqB,UAAU,WAAW,MAAM;CAEnE,OACE,qBAACC,OAAD;EACE,cAAY;EACG;EACH;EACZ,eAAa,SAAS,QAAQ,MAAM,IAAI;EAC5B;EACZ,gBAAgB;EAChB,WAAW,eAAe,aAAa,eAAe;EACtD,eAAe;EACC;EAChB,eAAe,cAAc,QAAQ,CAAC;EAC3B;EAXb,UAAA,CAaE,oBAAC,aAAD;GAAsB;GAClB,WAAA,WAA6B;IAC7B,OAAO,oBAAC,aAAD,EAAA,UAA+B,OAAO,MAAmB,GAAvC,OAAO,GAAgC;GAClE;EACW,CAAA,GACb,oBAAC,WAAD;GACgB;GACd,WAAW;GACX,OAAO;GACP,gBAAgB,kBAAkB;GAEhC,WAAA,SAAwB;IACxB,OACE,oBAAC,UAAD,EAAA,WAII,cAAc;KACd,OAAO,oBAAC,WAAD,EAAA,UAAY,YAAY,MAAM,SAAS,EAAa,CAAA;IAC7D,EACQ,GANH,KAAK,GAMF;GAEd;EACS,CAAA,CACF;;AAEf"}
|
package/dist/Tabs/Tabs.d.mts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TVClassName, TVProps } from "@fuf-stack/pixel-utils";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
//#region src/Tabs/Tabs.d.ts
|
|
4
|
-
declare const tabsVariants: ((props?: ({
|
|
4
|
+
export declare const tabsVariants: ((props?: ({
|
|
5
5
|
[x: string]: string | number | undefined;
|
|
6
6
|
[x: number]: string | number | undefined;
|
|
7
7
|
} & ({
|
|
@@ -975,12 +975,12 @@ declare const tabsVariants: ((props?: ({
|
|
|
975
975
|
class?: never;
|
|
976
976
|
className?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
977
977
|
}))))[];
|
|
978
|
-
variantKeys: (string | number)[]
|
|
978
|
+
variantKeys: never[] | (string | number)[];
|
|
979
979
|
};
|
|
980
980
|
type VariantProps = TVProps<typeof tabsVariants>;
|
|
981
981
|
type ClassName = TVClassName<typeof tabsVariants>;
|
|
982
982
|
type Key$1 = string | number;
|
|
983
|
-
interface TabProps {
|
|
983
|
+
export interface TabProps {
|
|
984
984
|
/** Content to be displayed in the tab panel */
|
|
985
985
|
content: ReactNode;
|
|
986
986
|
/** Disables the tab so it can not be selected */
|
|
@@ -992,7 +992,7 @@ interface TabProps {
|
|
|
992
992
|
/** HTML data-testid attribute used in e2e tests */
|
|
993
993
|
testId?: string;
|
|
994
994
|
}
|
|
995
|
-
interface TabsProps extends VariantProps {
|
|
995
|
+
export interface TabsProps extends VariantProps {
|
|
996
996
|
/** Accessible label for the tabs component */
|
|
997
997
|
ariaLabel?: string;
|
|
998
998
|
/** CSS class name */
|
|
@@ -1031,5 +1031,5 @@ interface TabsProps extends VariantProps {
|
|
|
1031
1031
|
*/
|
|
1032
1032
|
declare const Tabs: ({ ariaLabel, className, defaultSelectedKey, destroyInactiveTabPanel, disableAnimation, disabledKeys, fullWidth, onSelectionChange, placement, radius, selectedKey, size, tabs, testId, variant, vertical }: TabsProps) => import("react").JSX.Element;
|
|
1033
1033
|
//#endregion
|
|
1034
|
-
export {
|
|
1034
|
+
export { Tabs as default };
|
|
1035
1035
|
//# sourceMappingURL=Tabs.d.mts.map
|
package/dist/Tabs/Tabs.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.mts","names":[],"sources":["../../src/Tabs/Tabs.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Tabs.d.mts","names":[],"sources":["../../src/Tabs/Tabs.tsx"],"mappings":";;;qBAOa,gBAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KAYpB,eAAe,eAAe;KAC9B,YAAY,mBAAmB;KAE/B;iBAEY;;EAEf,SAAS;;EAET;;EAEA,KAAK;;EAEL,OAAO;;EAEP;;iBAGe,kBAAkB;;EAEjC;;EAEA,YAAY;;EAEZ;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA,qBAAqB,KAAK;;EAE1B;;EAEA;;EAEA,cAAc;;EAEd;;EAEA,MAAM;;EAEN;;EAEA;;EAEA;;;;;cAMI,SAAQ,WAAA,WAAA,oBAAA,yBAAA,kBAAA,cAAA,WAAA,mBAAA,WAAA,QAAA,aAAA,MAAA,MAAA,QAAA,SAAA,YAiBX,8BAAS,IAAA"}
|
package/dist/Tabs/Tabs.mjs
CHANGED
|
@@ -15,9 +15,11 @@ const tabsVariants = tv({ slots: {
|
|
|
15
15
|
* Tabs component based on [HeroUI Tabs](https://www.heroui.com//docs/components/tabs)
|
|
16
16
|
*/
|
|
17
17
|
const Tabs$1 = ({ ariaLabel = void 0, className = void 0, defaultSelectedKey = void 0, destroyInactiveTabPanel = true, disableAnimation = false, disabledKeys = void 0, fullWidth = true, onSelectionChange = void 0, placement = void 0, radius = void 0, selectedKey = void 0, size = "md", tabs, testId = "tab", variant = "solid", vertical = false }) => {
|
|
18
|
+
const variants = tabsVariants();
|
|
19
|
+
const classNames = variantsToClassNames(variants, className, "base");
|
|
18
20
|
return /* @__PURE__ */ jsx(Tabs, {
|
|
19
21
|
"aria-label": ariaLabel,
|
|
20
|
-
classNames
|
|
22
|
+
classNames,
|
|
21
23
|
defaultSelectedKey,
|
|
22
24
|
destroyInactiveTabPanel,
|
|
23
25
|
disableAnimation,
|
package/dist/Tabs/Tabs.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.mjs","names":["Tabs","HeroTabs","HeroTab"],"sources":["../../src/Tabs/Tabs.tsx"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { Tab as HeroTab, Tabs as HeroTabs } from '@heroui/tabs';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nexport const tabsVariants = tv({\n slots: {\n base: '',\n cursor: '',\n panel: '',\n tab: 'data-[hover-unselected=true]:opacity-100',\n tabContent: 'text-foreground',\n tabList: '',\n tabWrapper: '',\n },\n});\n\ntype VariantProps = TVProps<typeof tabsVariants>;\ntype ClassName = TVClassName<typeof tabsVariants>;\n\ntype Key = string | number;\n\nexport interface TabProps {\n /** Content to be displayed in the tab panel */\n content: ReactNode;\n /** Disables the tab so it can not be selected */\n disabled?: boolean;\n /** Unique identifier for the tab */\n key: Key;\n /** Label content displayed in the tab button */\n label: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\nexport interface TabsProps extends VariantProps {\n /** Accessible label for the tabs component */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** Key of the tab that should be selected by default */\n defaultSelectedKey?: string | number;\n /** Whether to destroy inactive tab panel DOM nodes */\n destroyInactiveTabPanel?: boolean;\n /** Whether the animation should be disabled. */\n disableAnimation?: boolean;\n /** Array of keys for the tabs to disable */\n disabledKeys?: string[];\n /** Whether tabs should take up full container width */\n fullWidth?: boolean;\n /** Callback fired when tab selection changes */\n onSelectionChange?: (key: Key | null) => void;\n /** Position of the tab list relative to the content */\n placement?: 'top' | 'bottom' | 'start' | 'end' | undefined;\n /** Radius of the tabs */\n radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';\n /** Selected tab key (controlled) */\n selectedKey?: Key;\n /** Size of the tabs */\n size?: 'sm' | 'md' | 'lg';\n /** Array of tab configurations */\n tabs: TabProps[];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Style variant of the tabs */\n variant?: 'bordered' | 'light' | 'solid' | 'underlined';\n /** Whether to display tabs vertically */\n vertical?: boolean;\n}\n\n/**\n * Tabs component based on [HeroUI Tabs](https://www.heroui.com//docs/components/tabs)\n */\nconst Tabs = ({\n ariaLabel = undefined,\n className = undefined,\n defaultSelectedKey = undefined,\n destroyInactiveTabPanel = true,\n disableAnimation = false,\n disabledKeys = undefined,\n fullWidth = true,\n onSelectionChange = undefined,\n placement = undefined,\n radius = undefined,\n selectedKey = undefined,\n size = 'md',\n tabs,\n testId = 'tab',\n variant = 'solid',\n vertical = false,\n}: TabsProps) => {\n const variants = tabsVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n return (\n <HeroTabs\n aria-label={ariaLabel}\n classNames={classNames}\n defaultSelectedKey={defaultSelectedKey}\n destroyInactiveTabPanel={destroyInactiveTabPanel}\n disableAnimation={disableAnimation}\n disabledKeys={disabledKeys}\n fullWidth={fullWidth}\n isVertical={vertical}\n items={tabs || []}\n onSelectionChange={onSelectionChange}\n placement={placement}\n radius={radius}\n selectedKey={selectedKey}\n size={size}\n variant={variant}\n >\n {(item) => {\n return (\n <HeroTab\n key={item.key}\n data-testid={slugify(`${testId}_${item.testId ?? item.key}`)}\n isDisabled={!!item.disabled}\n title={item.label}\n >\n {item.content}\n </HeroTab>\n );\n }}\n </HeroTabs>\n );\n};\n\nexport default Tabs;\n"],"mappings":";;;;AAOA,MAAa,eAAe,GAAG,EAC7B,OAAO;CACL,MAAM;CACN,QAAQ;CACR,OAAO;CACP,KAAK;CACL,YAAY;CACZ,SAAS;CACT,YAAY;AACd,EACF,CAAC;;;;AA0DD,MAAMA,UAAQ,EACZ,YAAY,KAAA,GACZ,YAAY,KAAA,GACZ,qBAAqB,KAAA,GACrB,0BAA0B,MAC1B,mBAAmB,OACnB,eAAe,KAAA,GACf,YAAY,MACZ,oBAAoB,KAAA,GACpB,YAAY,KAAA,GACZ,SAAS,KAAA,GACT,cAAc,KAAA,GACd,OAAO,MACP,MACA,SAAS,OACT,UAAU,SACV,WAAW,YACI;
|
|
1
|
+
{"version":3,"file":"Tabs.mjs","names":["Tabs","HeroTabs","HeroTab"],"sources":["../../src/Tabs/Tabs.tsx"],"sourcesContent":["import type { TVClassName, TVProps } from '@fuf-stack/pixel-utils';\nimport type { ReactNode } from 'react';\n\nimport { Tab as HeroTab, Tabs as HeroTabs } from '@heroui/tabs';\n\nimport { slugify, tv, variantsToClassNames } from '@fuf-stack/pixel-utils';\n\nexport const tabsVariants = tv({\n slots: {\n base: '',\n cursor: '',\n panel: '',\n tab: 'data-[hover-unselected=true]:opacity-100',\n tabContent: 'text-foreground',\n tabList: '',\n tabWrapper: '',\n },\n});\n\ntype VariantProps = TVProps<typeof tabsVariants>;\ntype ClassName = TVClassName<typeof tabsVariants>;\n\ntype Key = string | number;\n\nexport interface TabProps {\n /** Content to be displayed in the tab panel */\n content: ReactNode;\n /** Disables the tab so it can not be selected */\n disabled?: boolean;\n /** Unique identifier for the tab */\n key: Key;\n /** Label content displayed in the tab button */\n label: ReactNode;\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n}\n\nexport interface TabsProps extends VariantProps {\n /** Accessible label for the tabs component */\n ariaLabel?: string;\n /** CSS class name */\n className?: ClassName;\n /** Key of the tab that should be selected by default */\n defaultSelectedKey?: string | number;\n /** Whether to destroy inactive tab panel DOM nodes */\n destroyInactiveTabPanel?: boolean;\n /** Whether the animation should be disabled. */\n disableAnimation?: boolean;\n /** Array of keys for the tabs to disable */\n disabledKeys?: string[];\n /** Whether tabs should take up full container width */\n fullWidth?: boolean;\n /** Callback fired when tab selection changes */\n onSelectionChange?: (key: Key | null) => void;\n /** Position of the tab list relative to the content */\n placement?: 'top' | 'bottom' | 'start' | 'end' | undefined;\n /** Radius of the tabs */\n radius?: 'none' | 'sm' | 'md' | 'lg' | 'full';\n /** Selected tab key (controlled) */\n selectedKey?: Key;\n /** Size of the tabs */\n size?: 'sm' | 'md' | 'lg';\n /** Array of tab configurations */\n tabs: TabProps[];\n /** HTML data-testid attribute used in e2e tests */\n testId?: string;\n /** Style variant of the tabs */\n variant?: 'bordered' | 'light' | 'solid' | 'underlined';\n /** Whether to display tabs vertically */\n vertical?: boolean;\n}\n\n/**\n * Tabs component based on [HeroUI Tabs](https://www.heroui.com//docs/components/tabs)\n */\nconst Tabs = ({\n ariaLabel = undefined,\n className = undefined,\n defaultSelectedKey = undefined,\n destroyInactiveTabPanel = true,\n disableAnimation = false,\n disabledKeys = undefined,\n fullWidth = true,\n onSelectionChange = undefined,\n placement = undefined,\n radius = undefined,\n selectedKey = undefined,\n size = 'md',\n tabs,\n testId = 'tab',\n variant = 'solid',\n vertical = false,\n}: TabsProps) => {\n const variants = tabsVariants();\n const classNames = variantsToClassNames(variants, className, 'base');\n\n return (\n <HeroTabs\n aria-label={ariaLabel}\n classNames={classNames}\n defaultSelectedKey={defaultSelectedKey}\n destroyInactiveTabPanel={destroyInactiveTabPanel}\n disableAnimation={disableAnimation}\n disabledKeys={disabledKeys}\n fullWidth={fullWidth}\n isVertical={vertical}\n items={tabs || []}\n onSelectionChange={onSelectionChange}\n placement={placement}\n radius={radius}\n selectedKey={selectedKey}\n size={size}\n variant={variant}\n >\n {(item) => {\n return (\n <HeroTab\n key={item.key}\n data-testid={slugify(`${testId}_${item.testId ?? item.key}`)}\n isDisabled={!!item.disabled}\n title={item.label}\n >\n {item.content}\n </HeroTab>\n );\n }}\n </HeroTabs>\n );\n};\n\nexport default Tabs;\n"],"mappings":";;;;AAOA,MAAa,eAAe,GAAG,EAC7B,OAAO;CACL,MAAM;CACN,QAAQ;CACR,OAAO;CACP,KAAK;CACL,YAAY;CACZ,SAAS;CACT,YAAY;AACd,EACF,CAAC;;;;AA0DD,MAAMA,UAAQ,EACZ,YAAY,KAAA,GACZ,YAAY,KAAA,GACZ,qBAAqB,KAAA,GACrB,0BAA0B,MAC1B,mBAAmB,OACnB,eAAe,KAAA,GACf,YAAY,MACZ,oBAAoB,KAAA,GACpB,YAAY,KAAA,GACZ,SAAS,KAAA,GACT,cAAc,KAAA,GACd,OAAO,MACP,MACA,SAAS,OACT,UAAU,SACV,WAAW,YACI;CACf,MAAM,WAAW,aAAa;CAC9B,MAAM,aAAa,qBAAqB,UAAU,WAAW,MAAM;CAEnE,OACE,oBAACC,MAAD;EACE,cAAY;EACA;EACQ;EACK;EACP;EACJ;EACH;EACX,YAAY;EACZ,OAAO,QAAQ,CAAC;EACG;EACR;EACH;EACK;EACP;EACG;EAEP,WAAA,SAAS;GACT,OACE,oBAACC,KAAD;IAEE,eAAa,QAAQ,GAAG,OAAO,GAAG,KAAK,UAAU,KAAK,KAAK;IAC3D,YAAY,CAAC,CAAC,KAAK;IACnB,OAAO,KAAK;IAEX,UAAA,KAAK;GACC,GANF,KAAK,GAMH;EAEb;CACQ,CAAA;AAEd"}
|
package/dist/Toast/Toaster.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ComponentProps } from "react";
|
|
2
2
|
import { Toaster } from "sonner";
|
|
3
3
|
//#region src/Toast/Toaster.d.ts
|
|
4
|
-
type ToasterProps = Pick<ComponentProps<typeof Toaster>, 'visibleToasts' | 'position' | 'style' | 'className' | 'toastOptions'>;
|
|
4
|
+
export type ToasterProps = Pick<ComponentProps<typeof Toaster>, 'visibleToasts' | 'position' | 'style' | 'className' | 'toastOptions'>;
|
|
5
5
|
declare const Toaster$1: ({ toastOptions, ...rest }: ToasterProps) => import("react").JSX.Element;
|
|
6
6
|
//#endregion
|
|
7
|
-
export {
|
|
7
|
+
export { Toaster$1 as default };
|
|
8
8
|
//# sourceMappingURL=Toaster.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toaster.d.mts","names":[],"sources":["../../src/Toast/Toaster.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Toaster.d.mts","names":[],"sources":["../../src/Toast/Toaster.tsx"],"mappings":";;;YAQY,eAAe,KACzB,sBAAsB;cAIlB,cAAW,iBAAA,QAA2B,iCAAY,IAAA"}
|
package/dist/Toast/toast.d.mts
CHANGED
|
@@ -5,7 +5,7 @@ import { ExternalToast } from "sonner";
|
|
|
5
5
|
//#region src/Toast/toast.d.ts
|
|
6
6
|
type AlertVariant = NonNullable<AlertProps['variant']>;
|
|
7
7
|
/** Props passed to a custom render function */
|
|
8
|
-
interface ToastRenderProps {
|
|
8
|
+
export interface ToastRenderProps {
|
|
9
9
|
/** Whether the toast can be closed by the user */
|
|
10
10
|
closable?: boolean;
|
|
11
11
|
/** Function to close the toast */
|
|
@@ -22,7 +22,7 @@ interface ToastRenderProps {
|
|
|
22
22
|
title?: ReactNode;
|
|
23
23
|
}
|
|
24
24
|
/** Options passed to each toast method */
|
|
25
|
-
interface ToastOptions {
|
|
25
|
+
export interface ToastOptions {
|
|
26
26
|
/** Whether the toast can be closed by the user */
|
|
27
27
|
closable?: boolean;
|
|
28
28
|
/** Duration in milliseconds before the toast auto-closes */
|
|
@@ -73,5 +73,5 @@ declare const toast$1: {
|
|
|
73
73
|
close: (toastId: string | number) => void;
|
|
74
74
|
};
|
|
75
75
|
//#endregion
|
|
76
|
-
export {
|
|
76
|
+
export { toast$1 as default };
|
|
77
77
|
//# sourceMappingURL=toast.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast.d.mts","names":[],"sources":["../../src/Toast/toast.tsx"],"mappings":";;;;;KAUK,eAAe,YAAY;;
|
|
1
|
+
{"version":3,"file":"toast.d.mts","names":[],"sources":["../../src/Toast/toast.tsx"],"mappings":";;;;;KAUK,eAAe,YAAY;;iBAGf;;EAEf;;EAEA;;EAEA,aAAa;;EAEb,OAAO;;EAEP,SAAS;;EAET,SAAS;;EAET,QAAQ;;;iBAIO;;EAEf;;EAEA;;EAEA,aAAa;;EAEb,OAAO;;EAEP,cAAc;;EAEd,UAAU;;EAEV,WAAW;;EAEX,UAAU,OAAO,qBAAqB;;EAEtC;;;cAyDI;;;;;EAKe,UAAA,SAAA,WAAS,UAAY;;;;;EAOxB,OAAA,SAAA,WAAS,UAAY;;;;;EAOrB,OAAA,SAAA,WAAS,UAAY;;;;;EAWlB,UAAA,SAAA,WAAS,UAAY;;;;;EAOvB,QAAA,SAAA,WAAS,UAAY;;EAQrB,QAAA"}
|
|
@@ -2,7 +2,7 @@ import { TVClassName, TVProps } from "@fuf-stack/pixel-utils";
|
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
import { TooltipPlacement } from "@heroui/tooltip";
|
|
4
4
|
//#region src/Tooltip/Tooltip.d.ts
|
|
5
|
-
declare const tooltipVariants: ((props?: ({
|
|
5
|
+
export declare const tooltipVariants: ((props?: ({
|
|
6
6
|
size?: "sm" | "md" | "lg" | "full" | "xs" | "xl" | "2xl" | "3xl" | undefined;
|
|
7
7
|
} & ({
|
|
8
8
|
class?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
@@ -329,32 +329,32 @@ declare const tooltipVariants: ((props?: ({
|
|
|
329
329
|
} & ({
|
|
330
330
|
class?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
331
331
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
332
|
-
|
|
332
|
+
content?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
333
333
|
body?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
334
334
|
footer?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
335
335
|
header?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
336
|
-
content?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
337
336
|
divider?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
338
337
|
footerWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
339
338
|
headerWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
339
|
+
trigger?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
340
340
|
};
|
|
341
341
|
className?: never;
|
|
342
342
|
} | {
|
|
343
343
|
class?: never;
|
|
344
344
|
className?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
345
345
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
346
|
-
|
|
346
|
+
content?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
347
347
|
body?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
348
348
|
footer?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
349
349
|
header?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
350
|
-
content?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
351
350
|
divider?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
352
351
|
footerWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
353
352
|
headerWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
353
|
+
trigger?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
354
354
|
};
|
|
355
355
|
}))[];
|
|
356
356
|
compoundSlots: ({
|
|
357
|
-
slots: ("base" | "
|
|
357
|
+
slots: ("base" | "content" | "body" | "footer" | "header" | "divider" | "footerWrapper" | "headerWrapper" | "trigger")[];
|
|
358
358
|
} & ({
|
|
359
359
|
size?: "sm" | "md" | "lg" | "full" | "xs" | "xl" | "2xl" | "3xl" | ("sm" | "md" | "lg" | "full" | "xs" | "xl" | "2xl" | "3xl")[] | undefined;
|
|
360
360
|
} & ({
|
|
@@ -428,32 +428,32 @@ declare const tooltipVariants: ((props?: ({
|
|
|
428
428
|
} & ({
|
|
429
429
|
class?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
430
430
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
431
|
-
|
|
431
|
+
content?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
432
432
|
body?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
433
433
|
footer?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
434
434
|
header?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
435
|
-
content?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
436
435
|
divider?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
437
436
|
footerWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
438
437
|
headerWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
438
|
+
trigger?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
439
439
|
};
|
|
440
440
|
className?: never;
|
|
441
441
|
} | {
|
|
442
442
|
class?: never;
|
|
443
443
|
className?: (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined) | {
|
|
444
444
|
base?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
445
|
-
|
|
445
|
+
content?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
446
446
|
body?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
447
447
|
footer?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
448
448
|
header?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
449
|
-
content?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
450
449
|
divider?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
451
450
|
footerWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
452
451
|
headerWrapper?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
452
|
+
trigger?: string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | readonly (string | false | 0 | 0n | /*elided*/ any | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined)[] | null | undefined;
|
|
453
453
|
};
|
|
454
454
|
}))[];
|
|
455
455
|
compoundSlots: ({
|
|
456
|
-
slots: ("base" | "
|
|
456
|
+
slots: ("base" | "content" | "body" | "footer" | "header" | "divider" | "footerWrapper" | "headerWrapper" | "trigger")[];
|
|
457
457
|
} & ({
|
|
458
458
|
size?: "sm" | "md" | "lg" | "full" | "xs" | "xl" | "2xl" | "3xl" | ("sm" | "md" | "lg" | "full" | "xs" | "xl" | "2xl" | "3xl")[] | undefined;
|
|
459
459
|
} & ({
|
|
@@ -468,7 +468,7 @@ declare const tooltipVariants: ((props?: ({
|
|
|
468
468
|
type VariantProps = TVProps<typeof tooltipVariants>;
|
|
469
469
|
type ClassName = TVClassName<typeof tooltipVariants>;
|
|
470
470
|
type TooltipPlacement$1 = TooltipPlacement;
|
|
471
|
-
interface TooltipProps extends VariantProps {
|
|
471
|
+
export interface TooltipProps extends VariantProps {
|
|
472
472
|
/** trigger child components */
|
|
473
473
|
children: ReactNode;
|
|
474
474
|
/** CSS class name */
|
|
@@ -499,5 +499,5 @@ interface TooltipProps extends VariantProps {
|
|
|
499
499
|
*/
|
|
500
500
|
declare const Tooltip$1: ({ children, className: _className, closeDelay, containerPadding, content, defaultOpen, delay, footer, header, onOpenChange, placement, size }: TooltipProps) => import("react").JSX.Element;
|
|
501
501
|
//#endregion
|
|
502
|
-
export { TooltipPlacement$1 as TooltipPlacement,
|
|
502
|
+
export { TooltipPlacement$1 as TooltipPlacement, Tooltip$1 as default };
|
|
503
503
|
//# sourceMappingURL=Tooltip.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.d.mts","names":[],"sources":["../../src/Tooltip/Tooltip.tsx"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"Tooltip.d.mts","names":[],"sources":["../../src/Tooltip/Tooltip.tsx"],"mappings":";;;;qBAWa,mBAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KA6DvB,eAAe,eAAe;KAC9B,YAAY,mBAAmB;KAExB,qBAAmB;iBAEd,qBAAqB;;EAEpC,UAAU;;EAEV,YAAY;;EAEZ;;EAEA;;EAEA,SAAS;;EAET;;EAEA;;EAEA,SAAS;;EAET,SAAS;;EAET,gBAAgB;;EAEhB,YAAY;;EAEZ,OAAO;;;;;cAMH,cAAW,UAAA,WAAA,YAAA,YAAA,kBAAA,SAAA,aAAA,OAAA,QAAA,QAAA,cAAA,WAAA,QAad,iCAAY,IAAA"}
|
package/dist/Tooltip/Tooltip.mjs
CHANGED
|
@@ -58,7 +58,8 @@ const tooltipVariants = tv({
|
|
|
58
58
|
* Tooltip component based on [HeroUI Tooltip](https://www.heroui.com//docs/components/tooltip)
|
|
59
59
|
*/
|
|
60
60
|
const Tooltip$1 = ({ children, className: _className = void 0, closeDelay = 500, containerPadding = 0, content, defaultOpen = false, delay = 0, footer = void 0, header = void 0, onOpenChange = void 0, placement = "top", size = "full" }) => {
|
|
61
|
-
const
|
|
61
|
+
const variants = tooltipVariants({ size });
|
|
62
|
+
const classNames = variantsToClassNames(variants, _className, "base");
|
|
62
63
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
63
64
|
classNames,
|
|
64
65
|
closeDelay,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.mjs","names":["Tooltip","HeroTooltip","ScrollShadow"],"sources":["../../src/Tooltip/Tooltip.tsx"],"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\nimport ScrollShadow from '../ScrollShadow/ScrollShadow';\n\n// tooltip variants\nexport const tooltipVariants = tv({\n slots: {\n base: '',\n body: 'w-full px-4 py-2',\n content: 'flex max-h-[80vh] flex-col p-0',\n divider: 'm-0 w-full border-divider p-0',\n footer: 'w-full px-4 py-2',\n footerWrapper: 'w-full',\n header: 'w-full px-4 pb-1 pt-2 font-semibold',\n headerWrapper: 'w-full',\n trigger: 'cursor-pointer',\n },\n variants: {\n size: {\n xs: {\n // base: 'max-w-xs',\n body: 'max-w-xs',\n footer: 'max-w-xs',\n header: 'max-w-xs',\n },\n sm: {\n // base: 'max-w-sm',\n body: 'max-w-sm',\n footer: 'max-w-sm',\n header: 'max-w-sm',\n },\n md: {\n // base: 'max-w-md',\n body: 'max-w-md',\n footer: 'max-w-md',\n header: 'max-w-md',\n },\n lg: {\n // base: 'max-w-lg',\n body: 'max-w-lg',\n footer: 'max-w-lg',\n header: 'max-w-lg',\n },\n xl: {\n // base: 'max-w-xl',\n body: 'max-w-xl',\n footer: 'max-w-xl',\n header: 'max-w-xl',\n },\n '2xl': {\n // base: 'max-w-2xl',\n body: 'max-w-2xl',\n footer: 'max-w-2xl',\n header: 'max-w-2xl',\n },\n '3xl': {\n // base: 'max-w-3xl',\n body: 'max-w-3xl',\n footer: 'max-w-3xl',\n header: 'max-w-3xl',\n },\n full: { base: '' },\n },\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 /** 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 /** delay in milliseconds before the tooltip opens. */\n delay?: number;\n /** tooltip footer */\n footer?: ReactNode;\n /** tooltip header */\n header?: ReactNode;\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 /** size of the tooltip */\n size?: VariantProps['size'];\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 footer = undefined,\n header = undefined,\n onOpenChange = undefined,\n placement = 'top',\n size = 'full',\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants({ size });\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroTooltip\n classNames={classNames}\n closeDelay={closeDelay}\n containerPadding={containerPadding}\n content={\n <div>\n {header ? (\n <div className={classNames.headerWrapper}>\n <div className={classNames.header}>{header}</div>\n <hr className={classNames.divider} />\n </div>\n ) : null}\n <ScrollShadow className={classNames.body}>{content}</ScrollShadow>\n {footer ? (\n <div className={classNames.footerWrapper}>\n <hr className={classNames.divider} />\n <div className={classNames.footer}>{footer}</div>\n </div>\n ) : null}\n </div>\n }\n defaultOpen={defaultOpen}\n delay={delay}\n onClick={(e) => {\n e.preventDefault();\n }}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n <span className={classNames.trigger}>{children}</span>\n </HeroTooltip>\n );\n};\n\nexport default Tooltip;\n"],"mappings":";;;;;AAWA,MAAa,kBAAkB,GAAG;CAChC,OAAO;EACL,MAAM;EACN,MAAM;EACN,SAAS;EACT,SAAS;EACT,QAAQ;EACR,eAAe;EACf,QAAQ;EACR,eAAe;EACf,SAAS;CACX;CACA,UAAU,EACR,MAAM;EACJ,IAAI;GAEF,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,IAAI;GAEF,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,IAAI;GAEF,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,IAAI;GAEF,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,IAAI;GAEF,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,OAAO;GAEL,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,OAAO;GAEL,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,MAAM,EAAE,MAAM,GAAG;CACnB,EACF;AACF,CAAC;;;;AAqCD,MAAMA,aAAW,EACf,UACA,WAAW,aAAa,KAAA,GACxB,aAAa,KACb,mBAAmB,GACnB,SACA,cAAc,OACd,QAAQ,GACR,SAAS,KAAA,GACT,SAAS,KAAA,GACT,eAAe,KAAA,GACf,YAAY,OACZ,OAAO,aACW;
|
|
1
|
+
{"version":3,"file":"Tooltip.mjs","names":["Tooltip","HeroTooltip","ScrollShadow"],"sources":["../../src/Tooltip/Tooltip.tsx"],"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\nimport ScrollShadow from '../ScrollShadow/ScrollShadow';\n\n// tooltip variants\nexport const tooltipVariants = tv({\n slots: {\n base: '',\n body: 'w-full px-4 py-2',\n content: 'flex max-h-[80vh] flex-col p-0',\n divider: 'm-0 w-full border-divider p-0',\n footer: 'w-full px-4 py-2',\n footerWrapper: 'w-full',\n header: 'w-full px-4 pb-1 pt-2 font-semibold',\n headerWrapper: 'w-full',\n trigger: 'cursor-pointer',\n },\n variants: {\n size: {\n xs: {\n // base: 'max-w-xs',\n body: 'max-w-xs',\n footer: 'max-w-xs',\n header: 'max-w-xs',\n },\n sm: {\n // base: 'max-w-sm',\n body: 'max-w-sm',\n footer: 'max-w-sm',\n header: 'max-w-sm',\n },\n md: {\n // base: 'max-w-md',\n body: 'max-w-md',\n footer: 'max-w-md',\n header: 'max-w-md',\n },\n lg: {\n // base: 'max-w-lg',\n body: 'max-w-lg',\n footer: 'max-w-lg',\n header: 'max-w-lg',\n },\n xl: {\n // base: 'max-w-xl',\n body: 'max-w-xl',\n footer: 'max-w-xl',\n header: 'max-w-xl',\n },\n '2xl': {\n // base: 'max-w-2xl',\n body: 'max-w-2xl',\n footer: 'max-w-2xl',\n header: 'max-w-2xl',\n },\n '3xl': {\n // base: 'max-w-3xl',\n body: 'max-w-3xl',\n footer: 'max-w-3xl',\n header: 'max-w-3xl',\n },\n full: { base: '' },\n },\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 /** 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 /** delay in milliseconds before the tooltip opens. */\n delay?: number;\n /** tooltip footer */\n footer?: ReactNode;\n /** tooltip header */\n header?: ReactNode;\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 /** size of the tooltip */\n size?: VariantProps['size'];\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 footer = undefined,\n header = undefined,\n onOpenChange = undefined,\n placement = 'top',\n size = 'full',\n}: TooltipProps) => {\n // classNames from slots\n const variants = tooltipVariants({ size });\n const classNames = variantsToClassNames(variants, _className, 'base');\n\n return (\n <HeroTooltip\n classNames={classNames}\n closeDelay={closeDelay}\n containerPadding={containerPadding}\n content={\n <div>\n {header ? (\n <div className={classNames.headerWrapper}>\n <div className={classNames.header}>{header}</div>\n <hr className={classNames.divider} />\n </div>\n ) : null}\n <ScrollShadow className={classNames.body}>{content}</ScrollShadow>\n {footer ? (\n <div className={classNames.footerWrapper}>\n <hr className={classNames.divider} />\n <div className={classNames.footer}>{footer}</div>\n </div>\n ) : null}\n </div>\n }\n defaultOpen={defaultOpen}\n delay={delay}\n onClick={(e) => {\n e.preventDefault();\n }}\n onOpenChange={onOpenChange}\n placement={placement}\n shouldFlip\n showArrow\n >\n <span className={classNames.trigger}>{children}</span>\n </HeroTooltip>\n );\n};\n\nexport default Tooltip;\n"],"mappings":";;;;;AAWA,MAAa,kBAAkB,GAAG;CAChC,OAAO;EACL,MAAM;EACN,MAAM;EACN,SAAS;EACT,SAAS;EACT,QAAQ;EACR,eAAe;EACf,QAAQ;EACR,eAAe;EACf,SAAS;CACX;CACA,UAAU,EACR,MAAM;EACJ,IAAI;GAEF,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,IAAI;GAEF,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,IAAI;GAEF,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,IAAI;GAEF,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,IAAI;GAEF,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,OAAO;GAEL,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,OAAO;GAEL,MAAM;GACN,QAAQ;GACR,QAAQ;EACV;EACA,MAAM,EAAE,MAAM,GAAG;CACnB,EACF;AACF,CAAC;;;;AAqCD,MAAMA,aAAW,EACf,UACA,WAAW,aAAa,KAAA,GACxB,aAAa,KACb,mBAAmB,GACnB,SACA,cAAc,OACd,QAAQ,GACR,SAAS,KAAA,GACT,SAAS,KAAA,GACT,eAAe,KAAA,GACf,YAAY,OACZ,OAAO,aACW;CAElB,MAAM,WAAW,gBAAgB,EAAE,KAAK,CAAC;CACzC,MAAM,aAAa,qBAAqB,UAAU,YAAY,MAAM;CAEpE,OACE,oBAACC,SAAD;EACc;EACA;EACM;EAClB,SACE,qBAAC,OAAD,EAAA,UAAA;GACG,SACC,qBAAC,OAAD;IAAK,WAAW,WAAW;IAA3B,UAAA,CACE,oBAAC,OAAD;KAAK,WAAW,WAAW;KAAS,UAAA;IAAY,CAAA,GAChD,oBAAC,MAAD,EAAI,WAAW,WAAW,QAAU,CAAA,CACjC;GACH,CAAA,IAAA;GACJ,oBAACC,sBAAD;IAAc,WAAW,WAAW;IAAO,UAAA;GAAsB,CAAA;GAChE,SACC,qBAAC,OAAD;IAAK,WAAW,WAAW;IAA3B,UAAA,CACE,oBAAC,MAAD,EAAI,WAAW,WAAW,QAAU,CAAA,GACpC,oBAAC,OAAD;KAAK,WAAW,WAAW;KAAS,UAAA;IAAY,CAAA,CAC7C;GACH,CAAA,IAAA;EACD,EAAA,CAAA;EAEM;EACN;EACP,UAAU,MAAM;GACd,EAAE,eAAe;EACnB;EACc;EACH;EACX,YAAA;EACA,WAAA;EAEA,UAAA,oBAAC,QAAD;GAAM,WAAW,WAAW;GAAU;EAAe,CAAA;CAC1C,CAAA;AAEjB"}
|
|
@@ -16,7 +16,7 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
}
|
|
17
17
|
return to;
|
|
18
18
|
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
|
|
19
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
|
|
20
20
|
value: mod,
|
|
21
21
|
enumerable: true
|
|
22
22
|
}) : target, mod));
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
* @param delay - Delay in milliseconds
|
|
6
6
|
* @returns The debounced value
|
|
7
7
|
*/
|
|
8
|
-
declare const useDebounce: <Value>(value: Value, delay: number) => Value;
|
|
8
|
+
export declare const useDebounce: <Value>(value: Value, delay: number) => Value;
|
|
9
9
|
//#endregion
|
|
10
|
-
export { useDebounce };
|
|
11
10
|
//# sourceMappingURL=useDebounce.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDebounce.d.mts","names":[],"sources":["../../../src/hooks/useDebounce/useDebounce.ts"],"mappings":";;;;;;;
|
|
1
|
+
{"version":3,"file":"useDebounce.d.mts","names":[],"sources":["../../../src/hooks/useDebounce/useDebounce.ts"],"mappings":";;;;;;;qBAYa,cAAe,OAAO,OAAO,OAAO,kBAAa"}
|
|
@@ -8,6 +8,7 @@ import { useEffect, useRef, useState } from "react";
|
|
|
8
8
|
* @returns The debounced value
|
|
9
9
|
*/
|
|
10
10
|
const useDebounce = (value, delay) => {
|
|
11
|
+
const skipDebounce = isTestEnvironment();
|
|
11
12
|
const [debouncedValue, setDebouncedValue] = useState(value);
|
|
12
13
|
const isMountedRef = useRef(true);
|
|
13
14
|
useEffect(() => {
|
|
@@ -17,18 +18,19 @@ const useDebounce = (value, delay) => {
|
|
|
17
18
|
};
|
|
18
19
|
}, []);
|
|
19
20
|
useEffect(() => {
|
|
20
|
-
if (
|
|
21
|
-
setDebouncedValue(value);
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
21
|
+
if (skipDebounce) return;
|
|
24
22
|
const handler = setTimeout(() => {
|
|
25
23
|
if (isMountedRef.current) setDebouncedValue(value);
|
|
26
24
|
}, delay);
|
|
27
25
|
return () => {
|
|
28
26
|
clearTimeout(handler);
|
|
29
27
|
};
|
|
30
|
-
}, [
|
|
31
|
-
|
|
28
|
+
}, [
|
|
29
|
+
value,
|
|
30
|
+
delay,
|
|
31
|
+
skipDebounce
|
|
32
|
+
]);
|
|
33
|
+
return skipDebounce ? value : debouncedValue;
|
|
32
34
|
};
|
|
33
35
|
//#endregion
|
|
34
36
|
export { useDebounce };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDebounce.mjs","names":[],"sources":["../../../src/hooks/useDebounce/useDebounce.ts"],"sourcesContent":["/* eslint-disable import-x/prefer-default-export */\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { isTestEnvironment } from '@fuf-stack/pixel-utils';\n\n/**\n * Hook that debounces a value\n * @param value - The value to debounce\n * @param delay - Delay in milliseconds\n * @returns The debounced value\n */\nexport const useDebounce = <Value>(value: Value, delay: number) => {\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState(value);\n // Track if component is mounted to prevent setState on unmounted component\n const isMountedRef = useRef(true);\n\n useEffect(() => {\n // Mark as mounted\n isMountedRef.current = true;\n return () => {\n // Mark as unmounted on cleanup\n isMountedRef.current = false;\n };\n }, []);\n\n useEffect(\n () => {\n // In test environments, skip debouncing for immediate snapshots\n if (
|
|
1
|
+
{"version":3,"file":"useDebounce.mjs","names":[],"sources":["../../../src/hooks/useDebounce/useDebounce.ts"],"sourcesContent":["/* eslint-disable import-x/prefer-default-export */\n\nimport { useEffect, useRef, useState } from 'react';\n\nimport { isTestEnvironment } from '@fuf-stack/pixel-utils';\n\n/**\n * Hook that debounces a value\n * @param value - The value to debounce\n * @param delay - Delay in milliseconds\n * @returns The debounced value\n */\nexport const useDebounce = <Value>(value: Value, delay: number) => {\n const skipDebounce = isTestEnvironment();\n // State and setters for debounced value\n const [debouncedValue, setDebouncedValue] = useState(value);\n // Track if component is mounted to prevent setState on unmounted component\n const isMountedRef = useRef(true);\n\n useEffect(() => {\n // Mark as mounted\n isMountedRef.current = true;\n return () => {\n // Mark as unmounted on cleanup\n isMountedRef.current = false;\n };\n }, []);\n\n useEffect(\n () => {\n // In test environments, skip debouncing for immediate snapshots\n if (skipDebounce) {\n return undefined;\n }\n\n // Update debounced value after delay\n const handler = setTimeout(() => {\n // Only update state if component is still mounted\n if (isMountedRef.current) {\n setDebouncedValue(value);\n }\n }, delay);\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler);\n };\n },\n [value, delay, skipDebounce], // Only re-call effect if value or delay changes\n );\n\n return skipDebounce ? value : debouncedValue;\n};\n"],"mappings":";;;;;;;;;AAYA,MAAa,eAAsB,OAAc,UAAkB;CACjE,MAAM,eAAe,kBAAkB;CAEvC,MAAM,CAAC,gBAAgB,qBAAqB,SAAS,KAAK;CAE1D,MAAM,eAAe,OAAO,IAAI;CAEhC,gBAAgB;EAEd,aAAa,UAAU;EACvB,aAAa;GAEX,aAAa,UAAU;EACzB;CACF,GAAG,CAAC,CAAC;CAEL,gBACQ;EAEJ,IAAI,cACF;EAIF,MAAM,UAAU,iBAAiB;GAE/B,IAAI,aAAa,SACf,kBAAkB,KAAK;EAE3B,GAAG,KAAK;EAKR,aAAa;GACX,aAAa,OAAO;EACtB;CACF,GACA;EAAC;EAAO;EAAO;CAAY,CAC7B;CAEA,OAAO,eAAe,QAAQ;AAChC"}
|
|
@@ -4,7 +4,6 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @returns {boolean} - True on initial render, false afterward
|
|
6
6
|
*/
|
|
7
|
-
declare const useIsInitialRenderCycle: () => boolean;
|
|
7
|
+
export declare const useIsInitialRenderCycle: () => boolean;
|
|
8
8
|
//#endregion
|
|
9
|
-
export { useIsInitialRenderCycle };
|
|
10
9
|
//# sourceMappingURL=useIsInitialRenderCycle.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsInitialRenderCycle.d.mts","names":[],"sources":["../../../src/hooks/useIsInitialRenderCycle/useIsInitialRenderCycle.ts"],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"useIsInitialRenderCycle.d.mts","names":[],"sources":["../../../src/hooks/useIsInitialRenderCycle/useIsInitialRenderCycle.ts"],"mappings":";;;;;;qBASa"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIsInitialRenderCycle.mjs","names":[],"sources":["../../../src/hooks/useIsInitialRenderCycle/useIsInitialRenderCycle.ts"],"sourcesContent":["/* eslint-disable import-x/prefer-default-export */\n\nimport { useEffect, useRef } from 'react';\n\n/**\n * A hook that returns true on initial render and false afterward.\n *\n * @returns {boolean} - True on initial render, false afterward\n */\nexport const useIsInitialRenderCycle = (): boolean => {\n // Use ref to avoid re-renders\n const isInitialRender = useRef(true);\n\n // Update ref after first render\n useEffect(() => {\n // Set to false after component mounts\n isInitialRender.current = false;\n\n // No cleanup needed for this effect\n }, []);\n\n return isInitialRender.current;\n};\n"],"mappings":";;;;;;;AASA,MAAa,gCAAyC;CAEpD,MAAM,kBAAkB,OAAO,IAAI;CAGnC,gBAAgB;EAEd,gBAAgB,UAAU;CAG5B,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"useIsInitialRenderCycle.mjs","names":[],"sources":["../../../src/hooks/useIsInitialRenderCycle/useIsInitialRenderCycle.ts"],"sourcesContent":["/* eslint-disable import-x/prefer-default-export */\n\nimport { useEffect, useRef } from 'react';\n\n/**\n * A hook that returns true on initial render and false afterward.\n *\n * @returns {boolean} - True on initial render, false afterward\n */\nexport const useIsInitialRenderCycle = (): boolean => {\n // Use ref to avoid re-renders\n const isInitialRender = useRef(true);\n\n // Update ref after first render\n useEffect(() => {\n // Set to false after component mounts\n isInitialRender.current = false;\n\n // No cleanup needed for this effect\n }, []);\n\n // Reading this mount marker is the purpose of the hook; it never drives a\n // mutation during render and changes only after the initial commit.\n // eslint-disable-next-line react-hooks/refs\n return isInitialRender.current;\n};\n"],"mappings":";;;;;;;AASA,MAAa,gCAAyC;CAEpD,MAAM,kBAAkB,OAAO,IAAI;CAGnC,gBAAgB;EAEd,gBAAgB,UAAU;CAG5B,GAAG,CAAC,CAAC;CAKL,OAAO,gBAAgB;AACzB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Dispatch, SetStateAction } from "react";
|
|
2
2
|
//#region src/hooks/useLocalStorage/useLocalStorage.d.ts
|
|
3
|
-
declare const useLocalStorage: <T>(key: string, initialValue: T | (() => T)) => [T, Dispatch<SetStateAction<T>>];
|
|
3
|
+
export declare const useLocalStorage: <T>(key: string, initialValue: T | (() => T)) => [T, Dispatch<SetStateAction<T>>];
|
|
4
4
|
//#endregion
|
|
5
|
-
export { useLocalStorage };
|
|
6
5
|
//# sourceMappingURL=useLocalStorage.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocalStorage.d.mts","names":[],"sources":["../../../src/hooks/useLocalStorage/useLocalStorage.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"useLocalStorage.d.mts","names":[],"sources":["../../../src/hooks/useLocalStorage/useLocalStorage.ts"],"mappings":";;qBAMa,kBAAmB,GAC9B,aACA,cAAc,WAAW,QACvB,GAAG,SAAS,eAAe"}
|