@spark-web/box 5.0.0-rc.29 → 5.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,68 @@
1
1
  # @spark-web/box
2
2
 
3
+ ## 5.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - This release of spark-web standardises the version across all packages to be
8
+ **`v5`**, primarily signifying the switch from `@emotion/css` to
9
+ `@emotion/react` as one of the key dependencies of the entire library, in
10
+ order to support server-side rendering / SSR.
11
+
12
+ This release also introduces support for theming, to allow for more co-branded
13
+ experiences across our web applications. It also supports component-level
14
+ theming for `<Button />`, `<ButtonLink />`, and `<Checkbox />`, which provides
15
+ the capability to override the global theme available inside an application.
16
+
17
+ To use this in an application, you can wrap the affected areas with a
18
+ `ThemeProvider`:
19
+
20
+ ```
21
+ <ThemeProvider theme="pantheon">
22
+ <Input type="text" />
23
+ <Button type="submit" />
24
+ </ThemeProvider>
25
+ ```
26
+
27
+ Part of the theming capabilities includes a new theme for `spark-web` called
28
+ "pantheon", which should map with our co-branding efforts in the Pantheon
29
+ project. It currently includes a small set of colors and its corresponding
30
+ font family.
31
+
32
+ ### Patch Changes
33
+
34
+ - [#532](https://github.com/brighte-labs/spark-web/pull/532)
35
+ [`631573c`](https://github.com/brighte-labs/spark-web/commit/631573cb72981d99b9afa4ad559123f44e47b2a9)
36
+ Thanks [@ralcoriza-brighte](https://github.com/ralcoriza-brighte)! - Fix
37
+ type-related issues
38
+
39
+ - Updated dependencies
40
+ [[`631573c`](https://github.com/brighte-labs/spark-web/commit/631573cb72981d99b9afa4ad559123f44e47b2a9)]:
41
+ - @spark-web/theme@5.0.0
42
+ - @spark-web/utils@5.0.0
43
+
44
+ ## 5.0.0-rc.31
45
+
46
+ ### Patch Changes
47
+
48
+ - Fix type-related issues
49
+
50
+ - Updated dependencies []:
51
+ - @spark-web/theme@5.0.0-rc.31
52
+ - @spark-web/utils@5.0.0-rc.31
53
+
54
+ ## 5.0.0-rc.30
55
+
56
+ ### Minor Changes
57
+
58
+ - Adopt latest changes from stable main branch
59
+
60
+ ### Patch Changes
61
+
62
+ - Updated dependencies []:
63
+ - @spark-web/theme@5.0.0-rc.30
64
+ - @spark-web/utils@5.0.0-rc.30
65
+
3
66
  ## 5.0.0-rc.29
4
67
 
5
68
  ### Minor Changes
@@ -1,5 +1,5 @@
1
1
  /** @jsxImportSource @emotion/react */
2
- import { type SerializedStyles } from '@emotion/react';
2
+ import type { CSSObject } from '@emotion/react';
3
3
  import type { DataAttributeMap } from '@spark-web/utils/internal';
4
4
  import type { ReactNode } from 'react';
5
5
  import type { BoxStyleProps } from "./use-box-styles.js";
@@ -11,7 +11,7 @@ export declare type BoxProps = {
11
11
  /** An identifier which must be unique in the whole document. */
12
12
  id?: string;
13
13
  /** Custom css styles. */
14
- css?: SerializedStyles;
14
+ css?: CSSObject;
15
15
  /**
16
16
  * When providing a component using the "as" prop, optionally tell the system
17
17
  * what the underlying element will be. Used internally to manage reset
@@ -22,7 +22,7 @@ export declare type BoxProps = {
22
22
  /** Exposes a prop-based API for adding styles to a view, within the constraints of the theme. */
23
23
  export declare const Box: <Comp extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "div">(props: {
24
24
  as?: Comp | undefined;
25
- ref?: import("react").Ref<Comp extends "symbol" | "text" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "text" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "textPath" | "tspan" | "use" | "view">)[Comp] : Comp extends new (...args: any) => any ? InstanceType<Comp> : undefined> | undefined;
25
+ ref?: import("react").Ref<Comp extends "symbol" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "svg" | "animate" | "animateMotion" | "animateTransform" | "circle" | "clipPath" | "defs" | "desc" | "ellipse" | "feBlend" | "feColorMatrix" | "feComponentTransfer" | "feComposite" | "feConvolveMatrix" | "feDiffuseLighting" | "feDisplacementMap" | "feDistantLight" | "feDropShadow" | "feFlood" | "feFuncA" | "feFuncB" | "feFuncG" | "feFuncR" | "feGaussianBlur" | "feImage" | "feMerge" | "feMergeNode" | "feMorphology" | "feOffset" | "fePointLight" | "feSpecularLighting" | "feSpotLight" | "feTile" | "feTurbulence" | "filter" | "foreignObject" | "g" | "image" | "line" | "linearGradient" | "marker" | "mask" | "metadata" | "mpath" | "path" | "pattern" | "polygon" | "polyline" | "radialGradient" | "rect" | "set" | "stop" | "switch" | "text" | "textPath" | "tspan" | "use" | "view">)[Comp] : Comp extends new (...args: any) => any ? InstanceType<Comp> : undefined> | undefined;
26
26
  } & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<Comp>>, "as"> & {
27
27
  /** Children element to be rendered inside the component. */
28
28
  children?: ReactNode;
@@ -31,7 +31,7 @@ export declare const Box: <Comp extends import("react").ElementType<any, keyof i
31
31
  /** An identifier which must be unique in the whole document. */
32
32
  id?: string | undefined;
33
33
  /** Custom css styles. */
34
- css?: SerializedStyles | undefined;
34
+ css?: CSSObject | undefined;
35
35
  /**
36
36
  * When providing a component using the "as" prop, optionally tell the system
37
37
  * what the underlying element will be. Used internally to manage reset
@@ -43,7 +43,7 @@ export declare const Box: <Comp extends import("react").ElementType<any, keyof i
43
43
  cursor?: "default" | "pointer" | undefined;
44
44
  minHeight?: 0 | undefined;
45
45
  minWidth?: 0 | undefined;
46
- overflow?: "auto" | "hidden" | "scroll" | "visible" | undefined;
46
+ overflow?: "hidden" | "scroll" | "auto" | "visible" | undefined;
47
47
  shadow?: "small" | "medium" | "large" | undefined;
48
48
  userSelect?: "none" | undefined;
49
49
  } & import("./use-box-styles.js").ResponsiveBoxProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spark-web/box",
3
- "version": "5.0.0-rc.29",
3
+ "version": "5.0.0",
4
4
  "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,8 +17,8 @@
17
17
  "dependencies": {
18
18
  "@babel/runtime": "^7.25.0",
19
19
  "@emotion/react": "^11.14.0",
20
- "@spark-web/theme": "^5.0.0-rc.29",
21
- "@spark-web/utils": "^5.0.0-rc.29"
20
+ "@spark-web/theme": "^5.0.0",
21
+ "@spark-web/utils": "^5.0.0"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/react": "^18.2.0",