@react-hive/honey-layout 8.0.0 → 9.0.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.
@@ -1,7 +1,7 @@
1
1
  import { ElementType } from 'react';
2
2
  import { HoneyStyledProps } from '@react-hive/honey-style';
3
- import { HoneyPrefixedCSSProperties, HoneyEffectResultFn } from '../../types';
4
- export type HoneyBoxProps<Element extends ElementType = 'div'> = HoneyStyledProps<Element, HoneyPrefixedCSSProperties & {
3
+ import { Honey$PrefixedCSSProperties, HoneyEffectResultFn } from '../../types';
4
+ export type HoneyBoxProps<Element extends ElementType = 'div'> = HoneyStyledProps<Element, Honey$PrefixedCSSProperties & {
5
5
  effects?: HoneyEffectResultFn<object>[];
6
6
  }>;
7
7
  export declare const HoneyBox: {
@@ -10,7 +10,7 @@ export interface HoneyGridProps extends HoneyGridStyledProps {
10
10
  *
11
11
  * @default true
12
12
  */
13
- isColumnGrowing?: boolean;
13
+ columnsGrowing?: boolean;
14
14
  /**
15
15
  * Specifies the breakpoint at which the max-width should be applied to the columns or disables it if set to `false`.
16
16
  * Can be a breakpoint name.
@@ -19,4 +19,4 @@ export interface HoneyGridProps extends HoneyGridStyledProps {
19
19
  */
20
20
  applyColumnMaxWidth?: HoneyGridColumnStyledProps['applyMaxWidth'];
21
21
  }
22
- export declare const HoneyGrid: ({ ref, children, columns, spacing, isColumnGrowing, applyColumnMaxWidth, ...props }: HoneyGridProps) => import("react/jsx-runtime").JSX.Element;
22
+ export declare const HoneyGrid: ({ ref, children, columns, spacing, columnsGrowing, applyColumnMaxWidth, ...props }: HoneyGridProps) => import("react/jsx-runtime").JSX.Element;
@@ -2,7 +2,7 @@ import { HoneyBreakpointName } from '@react-hive/honey-style';
2
2
  export interface HoneyGridContextProps {
3
3
  columns: number;
4
4
  spacing: number | undefined;
5
- isColumnGrowing: boolean;
5
+ isColumnsGrowing: boolean;
6
6
  applyColumnMaxWidth: HoneyBreakpointName | false;
7
7
  }
8
8
  export declare const HoneyGridContext: import('react').Context<HoneyGridContextProps | undefined>;
@@ -2,16 +2,16 @@ import { FastOmit } from '@react-hive/honey-style';
2
2
  import { HoneyListGenericProps, HoneyListItem } from './HoneyList.types';
3
3
  import { HoneyStatusContentProps } from '../HoneyStatusContent';
4
4
  import { HoneyListStyledProps } from './HoneyListStyled';
5
- export type HoneyListProps<Item extends HoneyListItem> = FastOmit<HoneyListStyledProps, 'children'> & HoneyListGenericProps<Item> & FastOmit<HoneyStatusContentProps, 'isNoContent'>;
5
+ export type HoneyListProps<Item extends HoneyListItem> = FastOmit<HoneyListStyledProps, 'children'> & HoneyListGenericProps<Item> & FastOmit<HoneyStatusContentProps, 'empty'>;
6
6
  /**
7
7
  * A generic and reusable list component that handles different states such as loading, error, or no content,
8
8
  * and dynamically renders a list of items with custom content for each item.
9
9
  *
10
10
  * This component provides a flexible and accessible way to display lists, with built-in support for
11
- * various states to enhance user experience. It accepts a `ref` to access the underlying HTML element
11
+ * various states to enhance the user experience. It accepts a `ref` to access the underlying HTML element
12
12
  * for greater control and customization.
13
13
  *
14
14
  * @template Item - Represents the type of the items to be rendered in the list. This allows the component
15
15
  * to be used with any item type.
16
16
  */
17
- export declare const HoneyList: <Item extends HoneyListItem>({ ref, children, items, itemKey, isLoading, isLoadingOverContent, loadingContent, isError, errorContent, noContent, ...props }: HoneyListProps<Item>) => import("react/jsx-runtime").JSX.Element;
17
+ export declare const HoneyList: <Item extends HoneyListItem>({ ref, children, items, itemKey, loading, loadingOverContent, loadingContent, error, errorContent, emptyContent, ...props }: HoneyListProps<Item>) => import("react/jsx-runtime").JSX.Element;
@@ -9,45 +9,45 @@ export interface HoneyStatusContentProps {
9
9
  *
10
10
  * @default false
11
11
  */
12
- isLoading?: boolean;
12
+ loading?: boolean;
13
13
  /**
14
- * A flag indicating whether the loading content should appear on top of the content.
14
+ * The content to display when the component is in a loading state.
15
15
  *
16
- * @default false
16
+ * @default null
17
17
  */
18
- isLoadingOverContent?: boolean;
18
+ loadingContent?: ReactNode;
19
19
  /**
20
- * A flag indicating whether the component has encountered an error.
20
+ * A flag indicating whether the loading content should appear on top of the content.
21
21
  *
22
22
  * @default false
23
23
  */
24
- isError?: boolean;
24
+ loadingOverContent?: boolean;
25
25
  /**
26
- * A flag indicating whether the component has no content to display.
26
+ * A flag indicating whether the component has encountered an error.
27
27
  *
28
28
  * @default false
29
29
  */
30
- isNoContent?: boolean;
30
+ error?: boolean;
31
31
  /**
32
- * The content to display when the component is in a loading state.
32
+ * The content to display when the component has encountered an error.
33
33
  *
34
34
  * @default null
35
35
  */
36
- loadingContent?: ReactNode;
36
+ errorContent?: ReactNode;
37
37
  /**
38
- * The content to display when the component has encountered an error.
38
+ * A flag indicating whether the component has no content to display.
39
39
  *
40
- * @default null
40
+ * @default false
41
41
  */
42
- errorContent?: ReactNode;
42
+ empty?: boolean;
43
43
  /**
44
44
  * The content to display when the component has no content to display.
45
45
  *
46
46
  * @default null
47
47
  */
48
- noContent?: ReactNode;
48
+ emptyContent?: ReactNode;
49
49
  }
50
50
  /**
51
51
  * A component that conditionally renders blocks based on specified boolean flags.
52
52
  */
53
- export declare const HoneyStatusContent: ({ children, isLoading, isLoadingOverContent, isError, isNoContent, loadingContent, errorContent, noContent, }: PropsWithChildren<HoneyStatusContentProps>) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null;
53
+ export declare const HoneyStatusContent: ({ children, loading, loadingOverContent, error, empty, loadingContent, errorContent, emptyContent, }: PropsWithChildren<HoneyStatusContentProps>) => string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null;
@@ -1,23 +1,8 @@
1
1
  import { HTMLAttributes } from 'react';
2
2
  import { FastOmit, HoneyStyledFunction, HoneyBreakpointName, HoneyBreakpoints, HoneyMediaQueryRule } from '@react-hive/honey-style';
3
- import { HoneyScreenState, HoneyPrefixedCSSProperties } from '../types';
4
- export declare const noop: () => void;
5
- export declare function assert(condition: any, message: string): asserts condition;
3
+ import { HoneyScreenState, Honey$PrefixedCSSProperties } from '../types';
6
4
  export declare const generateUniqueId: () => string;
7
- /**
8
- * Invokes the given input if it is a function, passing the provided arguments.
9
- * Otherwise, returns the input as-is.
10
- *
11
- * @template Args - Tuple of argument types to pass to the function.
12
- * @template Result - Return type of the function or the value.
13
- *
14
- * @param input - A function to invoke with `args`, or a direct value of type `Result`.
15
- * @param args - Arguments to pass if `input` is a function.
16
- *
17
- * @returns The result of invoking the function, or the original value if it's not a function.
18
- */
19
- export declare const invokeIfFunction: <Args extends any[], Result>(input: ((...args: Args) => Result) | Result, ...args: Args) => Result;
20
- export type HoneyStyledBoxProps = HTMLAttributes<HTMLElement> & HoneyPrefixedCSSProperties;
5
+ export type HoneyStyledBoxProps = HTMLAttributes<HTMLElement> & Honey$PrefixedCSSProperties;
21
6
  /**
22
7
  * Generates CSS styles based on the provided breakpoint and properties.
23
8
  * Filters the properties to include only those that match the specified breakpoint.