@react95/core 9.6.0 → 9.6.2

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.
@@ -57,7 +57,14 @@ const DefaultOption = Frame.fixedForwardRef(
57
57
  (props, ref) => {
58
58
  const { kind, ...rest } = props;
59
59
  const optionType = defaultOptions[kind] || defaultOptions.help;
60
- return /* @__PURE__ */ React.createElement(Option, { ...rest, ref }, /* @__PURE__ */ React.createElement("img", { src: optionType.src, alt: optionType.alt }));
60
+ return /* @__PURE__ */ React.createElement(Option, { ...rest, ref }, /* @__PURE__ */ React.createElement(
61
+ "img",
62
+ {
63
+ src: optionType.src,
64
+ alt: optionType.alt,
65
+ className: TitleBar_css.optionImage
66
+ }
67
+ ));
61
68
  }
62
69
  );
63
70
  const Help = Frame.fixedForwardRef(
@@ -85,7 +92,13 @@ const Restore = Frame.fixedForwardRef(
85
92
  return /* @__PURE__ */ React.createElement(DefaultOption, { ...props, kind: "restore", ref });
86
93
  }
87
94
  );
88
- const TitleBarRenderer = ({ children, title = "UNKNOWN.EXE", icon, active = true, ...rest }, ref) => /* @__PURE__ */ React.createElement(
95
+ const TitleBarRenderer = ({
96
+ children,
97
+ title = "UNKNOWN.EXE",
98
+ icon,
99
+ active = true,
100
+ ...rest
101
+ }, ref) => /* @__PURE__ */ React.createElement(
89
102
  Frame.Frame,
90
103
  {
91
104
  ...rest,
@@ -96,16 +109,13 @@ const TitleBarRenderer = ({ children, title = "UNKNOWN.EXE", icon, active = true
96
109
  /* @__PURE__ */ React.createElement("div", { className: TitleBar_css.title }, title),
97
110
  children
98
111
  );
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
- );
112
+ const TitleBar = Object.assign(Frame.fixedForwardRef(TitleBarRenderer), {
113
+ Option,
114
+ OptionsBox,
115
+ Help,
116
+ Close,
117
+ Maximize,
118
+ Minimize,
119
+ Restore
120
+ });
111
121
  exports.TitleBar = TitleBar;
@@ -6,7 +6,9 @@ var optionsBox = "r95_1kpzw680";
6
6
  var option = "r95_1kpzw681";
7
7
  var titleBarBackground = createRuntimeFn.createRuntimeFn({ defaultClassName: "r95_1kpzw682", variantClassNames: { active: { true: "r95_1kpzw683", false: "r95_1kpzw684" } }, defaultVariants: {}, compoundVariants: [] });
8
8
  var title = "r95_1kpzw685";
9
+ var optionImage = "r95_1kpzw686";
9
10
  exports.option = option;
11
+ exports.optionImage = optionImage;
10
12
  exports.optionsBox = optionsBox;
11
13
  exports.title = title;
12
14
  exports.titleBarBackground = titleBarBackground;
@@ -65,4 +65,7 @@
65
65
  text-shadow: 0.5px 0px white, 1.5px 0px white;
66
66
  color: transparent;
67
67
  letter-spacing: 1px;
68
+ }
69
+ .r95_1kpzw686 {
70
+ max-width: none;
68
71
  }
@@ -1,4 +1,3 @@
1
1
  require('./azureOrange.css.ts.vanilla.css');
2
2
  "use strict";
3
- require("./contract.css.ts.vanilla.css.cjs");
4
3
  /* empty css */
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ require("./contract.css.ts.vanilla.css.cjs");
3
4
  var contract = { space: { "0": "var(--r95-space-0)", "1": "var(--r95-space-1)", "2": "var(--r95-space-2)", "3": "var(--r95-space-3)", "4": "var(--r95-space-4)", "5": "var(--r95-space-5)", "6": "var(--r95-space-6)", "7": "var(--r95-space-7)", "8": "var(--r95-space-8)", "9": "var(--r95-space-9)", "10": "var(--r95-space-10)", "11": "var(--r95-space-11)", "12": "var(--r95-space-12)", "13": "var(--r95-space-13)", "14": "var(--r95-space-14)", "15": "var(--r95-space-15)", "16": "var(--r95-space-16)", "17": "var(--r95-space-17)", "18": "var(--r95-space-18)", "19": "var(--r95-space-19)", "20": "var(--r95-space-20)" }, colors: { anchor: "var(--r95-color-anchor)", anchorVisited: "var(--r95-color-anchorVisited)", borderDark: "var(--r95-color-borderDark)", borderDarkest: "var(--r95-color-borderDarkest)", borderLight: "var(--r95-color-borderLight)", borderLighter: "var(--r95-color-borderLighter)", borderLightest: "var(--r95-color-borderLightest)", canvas: "var(--r95-color-canvas)", canvasText: "var(--r95-color-canvasText)", headerBackground: "var(--r95-color-headerBackground)", headerNotActiveBackground: "var(--r95-color-headerNotActiveBackground)", headerNotActiveText: "var(--r95-color-headerNotActiveText)", headerText: "var(--r95-color-headerText)", material: "var(--r95-color-material)", materialText: "var(--r95-color-materialText)", materialTextDisabled: "var(--r95-color-materialTextDisabled)", materialTextDisabledShadow: "var(--r95-color-materialTextDisabledShadow)", materialTextInvert: "var(--r95-color-materialTextInvert)", progress: "var(--r95-color-progress)", inputBackground: "var(--r95-color-inputBackground)", inputBackgroundDisabled: "var(--r95-color-inputBackgroundDisabled)" }, zIndices: { modal: "var(--r95-zIndex-modal)", tooltip: "var(--r95-zIndex-tooltip)", taskbar: "var(--r95-zIndex-taskbar)" }, shadows: { out: "var(--r95-shadow-out)", "in": "var(--r95-shadow-in)", input: "var(--r95-shadow-input)" } };
4
5
  exports.contract = contract;
@@ -4,8 +4,10 @@ var optionsBox = "r95_1kpzw680";
4
4
  var option = "r95_1kpzw681";
5
5
  var titleBarBackground = createRuntimeFn({ defaultClassName: "r95_1kpzw682", variantClassNames: { active: { true: "r95_1kpzw683", false: "r95_1kpzw684" } }, defaultVariants: {}, compoundVariants: [] });
6
6
  var title = "r95_1kpzw685";
7
+ var optionImage = "r95_1kpzw686";
7
8
  export {
8
9
  option,
10
+ optionImage,
9
11
  optionsBox,
10
12
  title,
11
13
  titleBarBackground
@@ -65,4 +65,7 @@
65
65
  text-shadow: 0.5px 0px white, 1.5px 0px white;
66
66
  color: transparent;
67
67
  letter-spacing: 1px;
68
+ }
69
+ .r95_1kpzw686 {
70
+ max-width: none;
68
71
  }
@@ -7,7 +7,7 @@ import minimize from "./minimize.svg.mjs";
7
7
  import restore from "./restore.svg.mjs";
8
8
  import { fixedForwardRef, Frame } from "../Frame/Frame.mjs";
9
9
  import { button } from "../Button/Button.css.mjs";
10
- import { optionsBox, option, titleBarBackground, title } from "./TitleBar.css.mjs";
10
+ import { optionsBox, option, optionImage, titleBarBackground, title } from "./TitleBar.css.mjs";
11
11
  const defaultOptions = {
12
12
  help: {
13
13
  alt: "help",
@@ -55,7 +55,14 @@ const DefaultOption = fixedForwardRef(
55
55
  (props, ref) => {
56
56
  const { kind, ...rest } = props;
57
57
  const optionType = defaultOptions[kind] || defaultOptions.help;
58
- return /* @__PURE__ */ React.createElement(Option, { ...rest, ref }, /* @__PURE__ */ React.createElement("img", { src: optionType.src, alt: optionType.alt }));
58
+ return /* @__PURE__ */ React.createElement(Option, { ...rest, ref }, /* @__PURE__ */ React.createElement(
59
+ "img",
60
+ {
61
+ src: optionType.src,
62
+ alt: optionType.alt,
63
+ className: optionImage
64
+ }
65
+ ));
59
66
  }
60
67
  );
61
68
  const Help = fixedForwardRef(
@@ -83,7 +90,13 @@ const Restore = fixedForwardRef(
83
90
  return /* @__PURE__ */ React.createElement(DefaultOption, { ...props, kind: "restore", ref });
84
91
  }
85
92
  );
86
- const TitleBarRenderer = ({ children, title: title$1 = "UNKNOWN.EXE", icon, active = true, ...rest }, ref) => /* @__PURE__ */ React.createElement(
93
+ const TitleBarRenderer = ({
94
+ children,
95
+ title: title$1 = "UNKNOWN.EXE",
96
+ icon,
97
+ active = true,
98
+ ...rest
99
+ }, ref) => /* @__PURE__ */ React.createElement(
87
100
  Frame,
88
101
  {
89
102
  ...rest,
@@ -94,18 +107,15 @@ const TitleBarRenderer = ({ children, title: title$1 = "UNKNOWN.EXE", icon, acti
94
107
  /* @__PURE__ */ React.createElement("div", { className: title }, title$1),
95
108
  children
96
109
  );
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
- );
110
+ const TitleBar = Object.assign(fixedForwardRef(TitleBarRenderer), {
111
+ Option,
112
+ OptionsBox,
113
+ Help,
114
+ Close,
115
+ Maximize,
116
+ Minimize,
117
+ Restore
118
+ });
109
119
  export {
110
120
  TitleBar
111
121
  };
@@ -1,3 +1,2 @@
1
1
  import './azureOrange.css.ts.vanilla.css';
2
- import "./contract.css.ts.vanilla.css.mjs";
3
2
  /* empty css */
@@ -1,3 +1,4 @@
1
+ import "./contract.css.ts.vanilla.css.mjs";
1
2
  var contract = { space: { "0": "var(--r95-space-0)", "1": "var(--r95-space-1)", "2": "var(--r95-space-2)", "3": "var(--r95-space-3)", "4": "var(--r95-space-4)", "5": "var(--r95-space-5)", "6": "var(--r95-space-6)", "7": "var(--r95-space-7)", "8": "var(--r95-space-8)", "9": "var(--r95-space-9)", "10": "var(--r95-space-10)", "11": "var(--r95-space-11)", "12": "var(--r95-space-12)", "13": "var(--r95-space-13)", "14": "var(--r95-space-14)", "15": "var(--r95-space-15)", "16": "var(--r95-space-16)", "17": "var(--r95-space-17)", "18": "var(--r95-space-18)", "19": "var(--r95-space-19)", "20": "var(--r95-space-20)" }, colors: { anchor: "var(--r95-color-anchor)", anchorVisited: "var(--r95-color-anchorVisited)", borderDark: "var(--r95-color-borderDark)", borderDarkest: "var(--r95-color-borderDarkest)", borderLight: "var(--r95-color-borderLight)", borderLighter: "var(--r95-color-borderLighter)", borderLightest: "var(--r95-color-borderLightest)", canvas: "var(--r95-color-canvas)", canvasText: "var(--r95-color-canvasText)", headerBackground: "var(--r95-color-headerBackground)", headerNotActiveBackground: "var(--r95-color-headerNotActiveBackground)", headerNotActiveText: "var(--r95-color-headerNotActiveText)", headerText: "var(--r95-color-headerText)", material: "var(--r95-color-material)", materialText: "var(--r95-color-materialText)", materialTextDisabled: "var(--r95-color-materialTextDisabled)", materialTextDisabledShadow: "var(--r95-color-materialTextDisabledShadow)", materialTextInvert: "var(--r95-color-materialTextInvert)", progress: "var(--r95-color-progress)", inputBackground: "var(--r95-color-inputBackground)", inputBackgroundDisabled: "var(--r95-color-inputBackgroundDisabled)" }, zIndices: { modal: "var(--r95-zIndex-modal)", tooltip: "var(--r95-zIndex-tooltip)", taskbar: "var(--r95-zIndex-taskbar)" }, shadows: { out: "var(--r95-shadow-out)", "in": "var(--r95-shadow-in)", input: "var(--r95-shadow-input)" } };
2
3
  export {
3
4
  contract
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@react95/core",
3
- "version": "9.6.0",
3
+ "version": "9.6.2",
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": "fc7734d72c1b9c94e807ae71f154ae5d1ac2f054",
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 {};
@@ -13,3 +13,4 @@ export declare const titleBarBackground: import("@vanilla-extract/recipes").Runt
13
13
  };
14
14
  }>;
15
15
  export declare const title: string;
16
+ export declare const optionImage: string;
@@ -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 {};