@react95/core 9.6.2 → 9.6.3-alpha.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.
Files changed (39) hide show
  1. package/cjs/Button/Button.cjs +12 -13
  2. package/cjs/Frame/Frame.cjs +4 -4
  3. package/cjs/List/List.cjs +4 -2
  4. package/cjs/List/ListDivider.cjs +12 -2
  5. package/cjs/List/ListItem.cjs +14 -3
  6. package/cjs/TitleBar/TitleBar.cjs +44 -54
  7. package/cjs/Video/Video.cjs +0 -1
  8. package/esm/Button/Button.mjs +12 -13
  9. package/esm/Frame/Frame.mjs +5 -5
  10. package/esm/List/List.mjs +6 -4
  11. package/esm/List/ListDivider.mjs +14 -4
  12. package/esm/List/ListItem.mjs +16 -5
  13. package/esm/TitleBar/TitleBar.mjs +44 -54
  14. package/esm/Video/Video.mjs +0 -1
  15. package/package.json +3 -2
  16. package/types/Alert/Alert.d.ts +2374 -1
  17. package/types/Avatar/Avatar.d.ts +2 -2
  18. package/types/Button/Button.d.ts +3 -3
  19. package/types/Dropdown/Dropdown.d.ts +1 -1
  20. package/types/Fieldset/Fieldset.d.ts +1 -1
  21. package/types/Frame/Frame.d.ts +11 -2370
  22. package/types/GlobalStyle/GlobalStyle.css.d.ts +1 -0
  23. package/types/GlobalStyle/index.d.ts +1 -0
  24. package/types/GlobalStyle/utils.d.ts +15 -0
  25. package/types/Input/Input.d.ts +2364 -3
  26. package/types/List/List.d.ts +10 -7
  27. package/types/List/ListDivider.d.ts +6 -4
  28. package/types/List/ListItem.d.ts +9 -7
  29. package/types/Modal/Modal.d.ts +7 -10
  30. package/types/ProgressBar/ProgressBar.d.ts +2 -2
  31. package/types/Range/Range.d.ts +2364 -3
  32. package/types/Tabs/Tab.d.ts +2369 -3
  33. package/types/Tabs/Tabs.d.ts +2368 -3
  34. package/types/TaskBar/TaskBar.d.ts +2366 -3
  35. package/types/TextArea/TextArea.d.ts +2364 -3
  36. package/types/TitleBar/TitleBar.d.ts +7 -2372
  37. package/types/Tree/Node.d.ts +2 -2
  38. package/types/Tree/Tree.d.ts +3 -3
  39. package/types/Video/Video.d.ts +2367 -2
@@ -1,12 +1,15 @@
1
- import React from 'react';
1
+ import type { ElementRef, ElementType, ForwardedRef, HTMLAttributes, ReactElement } from 'react';
2
2
  import { ListItem } from './ListItem';
3
3
  import { Divider } from './ListDivider';
4
- import { FrameProps } from '../Frame/Frame';
5
- export type ListProps = Omit<FrameProps<'ul'>, 'as'>;
6
- declare const ListRenderer: React.ForwardRefExoticComponent<Omit<ListProps, "ref"> & React.RefAttributes<HTMLUListElement>>;
7
- export type IListProps = typeof ListRenderer & {
4
+ import { FrameProps, Polymorphic } from '../Frame/Frame';
5
+ export type ListProps<TAs extends ElementType = 'ul'> = HTMLAttributes<HTMLUListElement> & Polymorphic<TAs, FrameProps>;
6
+ type ListReturnType = <TAs extends ElementType = 'ul'>(props: ListProps<TAs> & {
7
+ ref?: ForwardedRef<ElementRef<TAs>>;
8
+ }) => ReactElement;
9
+ interface ListStatics {
8
10
  Item: typeof ListItem;
9
11
  Divider: typeof Divider;
10
- };
11
- export declare const List: IListProps;
12
+ }
13
+ type ListWithStatics = ListReturnType & ListStatics;
14
+ export declare const List: ListWithStatics;
12
15
  export {};
@@ -1,4 +1,6 @@
1
- import React from 'react';
2
- import { FrameProps } from '../Frame/Frame';
3
- export type DividerProps = Omit<FrameProps<'li'>, 'as'>;
4
- export declare const Divider: React.ForwardRefExoticComponent<Omit<DividerProps, "ref"> & React.RefAttributes<HTMLLIElement>>;
1
+ import type { ElementRef, ElementType, ForwardedRef, LiHTMLAttributes, ReactElement } from 'react';
2
+ import { FrameProps, Polymorphic } from '../Frame/Frame';
3
+ export type DividerProps<TAs extends ElementType = 'li'> = LiHTMLAttributes<HTMLLIElement> & Polymorphic<TAs, FrameProps>;
4
+ export declare const Divider: <TAs extends ElementType = "li">(props: DividerProps<TAs> & {
5
+ ref?: ForwardedRef<ElementRef<TAs>>;
6
+ }) => ReactElement;
@@ -1,8 +1,10 @@
1
- import React from 'react';
2
- import type { ReactElement, HtmlHTMLAttributes } from 'react';
3
- export type ListItemProps = {
1
+ import type { ElementRef, ElementType, ForwardedRef, LiHTMLAttributes, ReactElement } from 'react';
2
+ import { FrameProps, Polymorphic } from '../Frame/Frame';
3
+ type ItemProps<TAs extends ElementType = 'li'> = LiHTMLAttributes<HTMLLIElement> & Polymorphic<TAs, FrameProps>;
4
+ export type ListItemProps<TAs extends ElementType = 'li'> = {
4
5
  icon?: ReactElement;
5
- } & HtmlHTMLAttributes<HTMLLIElement>;
6
- export declare const ListItem: React.ForwardRefExoticComponent<{
7
- icon?: ReactElement;
8
- } & React.HtmlHTMLAttributes<HTMLLIElement> & React.RefAttributes<HTMLLIElement>>;
6
+ } & ItemProps<TAs>;
7
+ export declare const ListItem: <TAs extends ElementType = "li">(props: ListItemProps<TAs> & {
8
+ ref?: ForwardedRef<ElementRef<TAs>>;
9
+ }) => ReactElement;
10
+ export {};
@@ -1,4 +1,4 @@
1
- import React, { HTMLAttributes, MouseEvent, ReactElement, Ref } from 'react';
1
+ import React, { ForwardedRef, HTMLAttributes, MouseEvent, ReactElement } from 'react';
2
2
  import { DragOptions } from '@neodrag/react';
3
3
  import { FrameProps } from '../Frame/Frame';
4
4
  import { List } from '../List/List';
@@ -22,14 +22,10 @@ export type ModalProps = {
22
22
  menu?: Array<ModalMenu>;
23
23
  dragOptions?: Omit<DragOptions, 'handle'>;
24
24
  hasWindowButton?: boolean;
25
- buttonsAlignment?: FrameProps<'div'>['justifyContent'];
25
+ buttonsAlignment?: FrameProps['justifyContent'];
26
26
  titleBarOptions?: ReactElement<TitleBarOptions> | ReactElement<TitleBarOptions>[];
27
- } & Omit<FrameProps<'div'>, 'as'> & HTMLAttributes<HTMLDivElement> & Pick<TitleBarBackgroundProps<'div'>, 'title' | 'icon'>;
28
- declare const ModalContent: (props: {
29
- as?: "div" | undefined;
30
- } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
31
- ref?: ((instance: HTMLDivElement | null) => void | React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES[keyof React.DO_NOT_USE_OR_YOU_WILL_BE_FIRED_CALLBACK_REF_RETURN_VALUES]) | React.RefObject<HTMLDivElement> | null | undefined;
32
- }, "as"> & import("rainbow-sprinkles/dist/declarations/src/types").ChildSprinkles<{
27
+ } & Omit<FrameProps, 'as'> & HTMLAttributes<HTMLDivElement> & Pick<TitleBarBackgroundProps, 'title' | 'icon'>;
28
+ declare const ModalContent: (props: React.HTMLAttributes<HTMLDivElement> & import("rainbow-sprinkles/dist/declarations/src/types").ChildSprinkles<{
33
29
  readonly backgroundColor: {
34
30
  dynamic: {
35
31
  default: string;
@@ -2392,8 +2388,9 @@ declare const ModalContent: (props: {
2392
2388
  };
2393
2389
  }> & React.RefAttributes<HTMLDivElement>) => React.ReactNode;
2394
2390
  declare const ModalMinimize: OptionReturnType;
2395
- declare const ModalRenderer: ({ id: providedId, hasWindowButton: hasButton, buttons, buttonsAlignment, children, icon, menu, title, dragOptions, titleBarOptions, className, ...rest }: ModalProps, ref: Ref<HTMLDivElement | null>) => React.JSX.Element;
2396
- type ModalComponent = typeof ModalRenderer & {
2391
+ type ModalComponent = ((props: ModalProps & {
2392
+ ref?: ForwardedRef<HTMLDivElement>;
2393
+ }) => ReactElement) & {
2397
2394
  Content: typeof ModalContent;
2398
2395
  Minimize: typeof ModalMinimize;
2399
2396
  };
@@ -1,8 +1,8 @@
1
1
  import type { ElementType, ReactElement, ElementRef, ForwardedRef } from 'react';
2
- import { FrameProps } from '../Frame/Frame';
2
+ import { FrameProps, Polymorphic } from '../Frame/Frame';
3
3
  export type ProgressBarProps<TAs extends ElementType> = {
4
4
  percent?: number;
5
- } & FrameProps<TAs>;
5
+ } & Polymorphic<TAs, FrameProps>;
6
6
  export declare const ProgressBar: <TAs extends ElementType = "div">(props: ProgressBarProps<TAs> & {
7
7
  ref?: ForwardedRef<ElementRef<TAs>>;
8
8
  }) => ReactElement;