@react95/core 9.6.0 → 9.6.1

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.
@@ -85,7 +85,13 @@ const Restore = Frame.fixedForwardRef(
85
85
  return /* @__PURE__ */ React.createElement(DefaultOption, { ...props, kind: "restore", ref });
86
86
  }
87
87
  );
88
- const TitleBarRenderer = ({ children, title = "UNKNOWN.EXE", icon, active = true, ...rest }, ref) => /* @__PURE__ */ React.createElement(
88
+ const TitleBarRenderer = ({
89
+ children,
90
+ title = "UNKNOWN.EXE",
91
+ icon,
92
+ active = true,
93
+ ...rest
94
+ }, ref) => /* @__PURE__ */ React.createElement(
89
95
  Frame.Frame,
90
96
  {
91
97
  ...rest,
@@ -96,16 +102,13 @@ const TitleBarRenderer = ({ children, title = "UNKNOWN.EXE", icon, active = true
96
102
  /* @__PURE__ */ React.createElement("div", { className: TitleBar_css.title }, title),
97
103
  children
98
104
  );
99
- const TitleBar = Object.assign(
100
- Frame.fixedForwardRef(TitleBarRenderer),
101
- {
102
- Option,
103
- OptionsBox,
104
- Help,
105
- Close,
106
- Maximize,
107
- Minimize,
108
- Restore
109
- }
110
- );
105
+ const TitleBar = Object.assign(Frame.fixedForwardRef(TitleBarRenderer), {
106
+ Option,
107
+ OptionsBox,
108
+ Help,
109
+ Close,
110
+ Maximize,
111
+ Minimize,
112
+ Restore
113
+ });
111
114
  exports.TitleBar = TitleBar;
@@ -83,7 +83,13 @@ const Restore = fixedForwardRef(
83
83
  return /* @__PURE__ */ React.createElement(DefaultOption, { ...props, kind: "restore", ref });
84
84
  }
85
85
  );
86
- const TitleBarRenderer = ({ children, title: title$1 = "UNKNOWN.EXE", icon, active = true, ...rest }, ref) => /* @__PURE__ */ React.createElement(
86
+ const TitleBarRenderer = ({
87
+ children,
88
+ title: title$1 = "UNKNOWN.EXE",
89
+ icon,
90
+ active = true,
91
+ ...rest
92
+ }, ref) => /* @__PURE__ */ React.createElement(
87
93
  Frame,
88
94
  {
89
95
  ...rest,
@@ -94,18 +100,15 @@ const TitleBarRenderer = ({ children, title: title$1 = "UNKNOWN.EXE", icon, acti
94
100
  /* @__PURE__ */ React.createElement("div", { className: title }, title$1),
95
101
  children
96
102
  );
97
- const TitleBar = Object.assign(
98
- fixedForwardRef(TitleBarRenderer),
99
- {
100
- Option,
101
- OptionsBox,
102
- Help,
103
- Close,
104
- Maximize,
105
- Minimize,
106
- Restore
107
- }
108
- );
103
+ const TitleBar = Object.assign(fixedForwardRef(TitleBarRenderer), {
104
+ Option,
105
+ OptionsBox,
106
+ Help,
107
+ Close,
108
+ Maximize,
109
+ Minimize,
110
+ Restore
111
+ });
109
112
  export {
110
113
  TitleBar
111
114
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react95/core",
3
- "version": "9.6.0",
3
+ "version": "9.6.1",
4
4
  "description": "Windows 95 styleguide",
5
5
  "main": "cjs/index.cjs",
6
6
  "type": "module",
@@ -195,7 +195,7 @@
195
195
  "url": "https://github.com/React95/React95/issues"
196
196
  },
197
197
  "homepage": "https://github.com/React95/React95#readme",
198
- "gitHead": "6cc1349c2f972524a3741900c2d284633d4d9abe",
198
+ "gitHead": "f5b381bc45749790e1525f39ff31767e6ac707e0",
199
199
  "module": "esm/index.mjs",
200
200
  "private": false,
201
201
  "types": "types/index.d.ts"
@@ -24,7 +24,7 @@ export type ModalProps = {
24
24
  hasWindowButton?: boolean;
25
25
  buttonsAlignment?: FrameProps<'div'>['justifyContent'];
26
26
  titleBarOptions?: ReactElement<TitleBarOptions> | ReactElement<TitleBarOptions>[];
27
- } & Omit<FrameProps<'div'>, 'as'> & HTMLAttributes<HTMLDivElement> & Pick<TitleBarBackgroundProps, 'title' | 'icon'>;
27
+ } & Omit<FrameProps<'div'>, 'as'> & HTMLAttributes<HTMLDivElement> & Pick<TitleBarBackgroundProps<'div'>, 'title' | 'icon'>;
28
28
  declare const ModalContent: (props: {
29
29
  as?: "div" | undefined;
30
30
  } & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
@@ -2393,8 +2393,9 @@ declare const ModalContent: (props: {
2393
2393
  }> & React.RefAttributes<HTMLDivElement>) => React.ReactNode;
2394
2394
  declare const ModalMinimize: OptionReturnType;
2395
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
- export declare const Modal: ModalProps & typeof ModalRenderer & {
2396
+ type ModalComponent = typeof ModalRenderer & {
2397
2397
  Content: typeof ModalContent;
2398
2398
  Minimize: typeof ModalMinimize;
2399
2399
  };
2400
+ export declare const Modal: ModalComponent;
2400
2401
  export {};
@@ -1,4 +1,4 @@
1
- import type { ButtonHTMLAttributes, ElementRef, ElementType, ForwardedRef, ForwardRefRenderFunction, HTMLAttributes, ReactElement } from 'react';
1
+ import type { ButtonHTMLAttributes, ElementRef, ElementType, ForwardedRef, HTMLAttributes, ReactElement } from 'react';
2
2
  import React from 'react';
3
3
  import { FrameProps } from '../Frame/Frame';
4
4
  declare const OptionsBox: (props: {
@@ -2379,11 +2379,12 @@ declare const Close: OptionReturnType;
2379
2379
  declare const Maximize: OptionReturnType;
2380
2380
  declare const Minimize: OptionReturnType;
2381
2381
  declare const Restore: OptionReturnType;
2382
- export interface TitleBarBackgroundProps extends Omit<HTMLAttributes<HTMLDivElement>, 'color'>, FrameProps<'div'> {
2382
+ export type TitleBarBackgroundProps<TAs extends ElementType> = Omit<HTMLAttributes<HTMLDivElement>, 'color'> & FrameProps<TAs> & {
2383
2383
  active?: boolean;
2384
2384
  icon?: ReactElement;
2385
2385
  title?: string;
2386
- }
2386
+ };
2387
+ export type TitleBarProps<TAs extends ElementType = 'div'> = TitleBarBackgroundProps<TAs>;
2387
2388
  interface TitleBarOptions {
2388
2389
  Option: typeof Option;
2389
2390
  OptionsBox: typeof OptionsBox;
@@ -2393,8 +2394,9 @@ interface TitleBarOptions {
2393
2394
  Minimize: typeof Minimize;
2394
2395
  Restore: typeof Restore;
2395
2396
  }
2396
- export interface TitleBarProps extends TitleBarBackgroundProps, TitleBarOptions, FrameProps<'div'> {
2397
- }
2398
- declare const TitleBarRenderer: ForwardRefRenderFunction<HTMLDivElement, TitleBarBackgroundProps>;
2399
- export declare const TitleBar: TitleBarProps & typeof TitleBarRenderer;
2397
+ type TitleBarComponent = <TAs extends ElementType = 'div'>(props: TitleBarProps<TAs> & {
2398
+ ref?: ForwardedRef<ElementRef<TAs>>;
2399
+ }) => ReactElement;
2400
+ type TitleBarWithStatics = TitleBarComponent & TitleBarOptions;
2401
+ export declare const TitleBar: TitleBarWithStatics;
2400
2402
  export {};