@react-hive/honey-layout 1.0.0-beta

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.
Files changed (35) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +9 -0
  3. package/dist/components/HoneyBox.d.ts +6 -0
  4. package/dist/components/HoneyGrid/HoneyGrid.d.ts +22 -0
  5. package/dist/components/HoneyGrid/HoneyGrid.styled.d.ts +859 -0
  6. package/dist/components/HoneyGrid/hooks/index.d.ts +1 -0
  7. package/dist/components/HoneyGrid/hooks/useCurrentHoneyGrid.d.ts +5 -0
  8. package/dist/components/HoneyGrid/index.d.ts +2 -0
  9. package/dist/components/HoneyGridColumn/HoneyGridColumn.d.ts +3 -0
  10. package/dist/components/HoneyGridColumn/HoneyGridColumn.styled.d.ts +866 -0
  11. package/dist/components/HoneyGridColumn/HoneyGridColumn.types.d.ts +2 -0
  12. package/dist/components/HoneyGridColumn/index.d.ts +3 -0
  13. package/dist/components/HoneyLazyContent.d.ts +30 -0
  14. package/dist/components/HoneyList/HoneyList.d.ts +12 -0
  15. package/dist/components/HoneyList/HoneyList.helpers.d.ts +2 -0
  16. package/dist/components/HoneyList/HoneyList.types.d.ts +3 -0
  17. package/dist/components/HoneyList/index.d.ts +3 -0
  18. package/dist/components/HoneyLoopingList/HoneyLoopingList.d.ts +12 -0
  19. package/dist/components/HoneyLoopingList/index.d.ts +1 -0
  20. package/dist/components/HoneyStatusContent.d.ts +6 -0
  21. package/dist/components/index.d.ts +7 -0
  22. package/dist/constants.d.ts +5 -0
  23. package/dist/helpers.d.ts +905 -0
  24. package/dist/hooks/index.d.ts +4 -0
  25. package/dist/hooks/use-honey-drag.d.ts +71 -0
  26. package/dist/hooks/use-honey-infinite-scroll.d.ts +7 -0
  27. package/dist/hooks/use-honey-media-query.d.ts +18 -0
  28. package/dist/hooks/use-honey-synthetic-scrollable-container.d.ts +23 -0
  29. package/dist/index.d.ts +6 -0
  30. package/dist/index.js +1826 -0
  31. package/dist/providers/HoneyThemeProvider.d.ts +14 -0
  32. package/dist/providers/index.d.ts +1 -0
  33. package/dist/types.d.ts +419 -0
  34. package/dist/utils.d.ts +121 -0
  35. package/package.json +84 -0
@@ -0,0 +1,2 @@
1
+ import { HoneyGridColumnStyledProps } from './HoneyGridColumn.styled';
2
+ export type HoneyGridColumnProps = Omit<HoneyGridColumnStyledProps, 'columns' | 'spacing' | 'totalColumns' | 'totalTakeColumns'> & {};
@@ -0,0 +1,3 @@
1
+ export * from './HoneyGridColumn.types';
2
+ export * from './HoneyGridColumn.styled';
3
+ export * from './HoneyGridColumn';
@@ -0,0 +1,30 @@
1
+ import { PropsWithChildren } from 'react';
2
+ type HoneyLazyContentProps = {
3
+ /**
4
+ * Determines whether the content should be mounted or unmounted.
5
+ */
6
+ mount: boolean;
7
+ /**
8
+ * The delay in milliseconds before unmounting the content when `mount` is set to `false`.
9
+ */
10
+ unmountDelay: number;
11
+ /**
12
+ * Determines whether the content should always remain mounted, regardless of the value of `mount`.
13
+ * If `true`, the content will never be unmounted.
14
+ *
15
+ * @default false
16
+ */
17
+ alwaysMounted?: boolean;
18
+ /**
19
+ * Determines whether the content should remain mounted after the first mount.
20
+ * If `true`, the content will not be unmounted after the first time it's mounted.
21
+ *
22
+ * @default false
23
+ */
24
+ keepAfterMount?: boolean;
25
+ };
26
+ /**
27
+ * Component for lazy loading/unloading content based on a mount/unmount state.
28
+ */
29
+ export declare const HoneyLazyContent: ({ children, mount, unmountDelay, alwaysMounted, keepAfterMount, }: PropsWithChildren<HoneyLazyContentProps>) => import('react').ReactNode;
30
+ export {};
@@ -0,0 +1,12 @@
1
+ import { ReactNode } from 'react';
2
+ import { ComponentWithAs, HoneyStatusContentOptions } from '../../types';
3
+ import { HoneyListItem, HoneyListItemKey } from './HoneyList.types';
4
+ import { HoneyBoxProps } from '../HoneyBox';
5
+ export type HoneyListGenericProps<Item extends HoneyListItem, T = unknown> = Omit<HoneyBoxProps<HTMLElement>, 'children'> & {
6
+ children: (item: Item, itemIndex: number, thisItems: Item[]) => ReactNode;
7
+ items: Item[] | undefined;
8
+ itemKey?: HoneyListItemKey<Item>;
9
+ } & T;
10
+ type HoneyListProps<Item extends HoneyListItem> = HoneyListGenericProps<Item, Omit<HoneyStatusContentOptions, 'isNoContent'>>;
11
+ export declare const HoneyList: <Item extends HoneyListItem>({ children, items, itemKey, isLoading, loadingContent, isError, errorContent, noContent, ...boxProps }: ComponentWithAs<HoneyListProps<Item>>) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,2 @@
1
+ import { HoneyListItem, HoneyListItemId, HoneyListItemKey } from './HoneyList.types';
2
+ export declare const getHoneyListItemId: <Item extends HoneyListItem>(item: Item, itemKey: HoneyListItemKey<Item> | undefined, itemIndex: number) => HoneyListItemId<Item>;
@@ -0,0 +1,3 @@
1
+ export type HoneyListItem = object | string | number;
2
+ export type HoneyListItemKey<Item extends HoneyListItem> = ((item: Item) => string) | keyof Item;
3
+ export type HoneyListItemId<Item extends HoneyListItem> = Item[keyof Item] | string | number;
@@ -0,0 +1,3 @@
1
+ export * from './HoneyList.types';
2
+ export * from './HoneyList.helpers';
3
+ export * from './HoneyList';
@@ -0,0 +1,12 @@
1
+ import { ComponentWithAs } from '../../types';
2
+ import { HoneyListItem, HoneyListGenericProps } from '../HoneyList';
3
+ type HoneyLoopingListDirection = 'vertical' | 'horizontal';
4
+ export declare const HoneyLoopingListStyled: import('styled-components').StyledComponent<"div", import('styled-components').DefaultTheme, import('../HoneyBox').HoneyBoxProps<HTMLDivElement>, never>;
5
+ export declare const HoneyLoopingListItemStyled: import('styled-components').StyledComponent<"div", import('styled-components').DefaultTheme, {}, never>;
6
+ type HoneyLoopingListProps<Item extends HoneyListItem> = HoneyListGenericProps<Item, {
7
+ activeItemIndex: number;
8
+ direction?: HoneyLoopingListDirection;
9
+ }>;
10
+ export declare const HoneyLoopingList: <Item extends HoneyListItem>({ children, items: originalItems, itemKey, activeItemIndex, direction, ...props }: ComponentWithAs<HoneyLoopingListProps<Item>>) => import("react/jsx-runtime").JSX.Element;
11
+ export declare const HoneyLoopingListExample: () => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1 @@
1
+ export * from './HoneyLoopingList';
@@ -0,0 +1,6 @@
1
+ import { PropsWithChildren } from 'react';
2
+ import { HoneyStatusContentOptions } from '../types';
3
+ /**
4
+ * A component that conditionally renders blocks based on specified boolean flags.
5
+ */
6
+ export declare const HoneyStatusContent: ({ children, isLoading, isError, isNoContent, loadingContent, errorContent, noContent, }: PropsWithChildren<HoneyStatusContentOptions>) => import('react').ReactNode;
@@ -0,0 +1,7 @@
1
+ export * from './HoneyBox';
2
+ export * from './HoneyGrid';
3
+ export * from './HoneyGridColumn';
4
+ export * from './HoneyList';
5
+ export * from './HoneyLoopingList';
6
+ export * from './HoneyStatusContent';
7
+ export * from './HoneyLazyContent';
@@ -0,0 +1,5 @@
1
+ import { HTMLAttributes } from 'react';
2
+ import { HoneyCSSColorProperty, HoneyCSSDimensionProperty } from './types';
3
+ export declare const HTML_ATTRIBUTES: (keyof HTMLAttributes<HTMLElement>)[];
4
+ export declare const CSS_DIMENSION_PROPERTIES: HoneyCSSDimensionProperty[];
5
+ export declare const CSS_COLOR_PROPERTIES: HoneyCSSColorProperty[];