@spark-web/box 1.2.0 → 1.2.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.
- package/CHANGELOG.md +13 -0
- package/dist/declarations/src/background-provider.d.ts +1 -1
- package/dist/declarations/src/box.d.ts +6 -6
- package/dist/declarations/src/context.d.ts +2 -2
- package/dist/declarations/src/index.d.ts +5 -5
- package/dist/spark-web-box.cjs.d.ts +1 -0
- package/package.json +4 -4
- package/dist/declarations/src/use-box-props.d.ts +0 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @spark-web/box
|
|
2
2
|
|
|
3
|
+
## 1.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#492](https://github.com/brighte-labs/spark-web/pull/492)
|
|
8
|
+
[`58fc72d`](https://github.com/brighte-labs/spark-web/commit/58fc72d1c8db542a827c0d33344911cfed4e4d16)
|
|
9
|
+
Thanks [@peterp-brighte](https://github.com/peterp-brighte)! - fix reset for
|
|
10
|
+
sup
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
[[`58fc72d`](https://github.com/brighte-labs/spark-web/commit/58fc72d1c8db542a827c0d33344911cfed4e4d16)]:
|
|
14
|
+
- @spark-web/utils@1.3.1
|
|
15
|
+
|
|
3
16
|
## 1.2.0
|
|
4
17
|
|
|
5
18
|
### Minor Changes
|
|
@@ -4,4 +4,4 @@ export declare type BackgroundProviderProps = {
|
|
|
4
4
|
children: ReactElement;
|
|
5
5
|
};
|
|
6
6
|
/** Enforce background "lightness" without applying a background color. */
|
|
7
|
-
export declare const BackgroundProvider: ({ type, children, }: BackgroundProviderProps) => JSX.Element | null;
|
|
7
|
+
export declare const BackgroundProvider: ({ type, children, }: BackgroundProviderProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DataAttributeMap } from '@spark-web/utils/internal';
|
|
2
2
|
import type { ReactNode } from 'react';
|
|
3
|
-
import type { BoxStyleProps } from
|
|
3
|
+
import type { BoxStyleProps } from "./use-box-styles.js";
|
|
4
4
|
export declare type BoxProps = {
|
|
5
5
|
/** Children element to be rendered inside the component. */
|
|
6
6
|
children?: ReactNode;
|
|
@@ -18,9 +18,9 @@ export declare type BoxProps = {
|
|
|
18
18
|
asElement?: keyof HTMLElementTagNameMap;
|
|
19
19
|
} & BoxStyleProps;
|
|
20
20
|
/** Exposes a prop-based API for adding styles to a view, within the constraints of the theme. */
|
|
21
|
-
export declare const Box: <Comp extends import("react").ElementType<any> = "div">(props: {
|
|
21
|
+
export declare const Box: <Comp extends import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> = "div">(props: {
|
|
22
22
|
as?: Comp | undefined;
|
|
23
|
-
ref?: import("react").Ref<Comp extends "symbol" | "
|
|
23
|
+
ref?: import("react").Ref<Comp extends "symbol" | "switch" | "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" | "textPath" | "tspan" | "use" | "view" | keyof HTMLElementTagNameMap ? (HTMLElementTagNameMap & Pick<SVGElementTagNameMap, "symbol" | "switch" | "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" | "textPath" | "tspan" | "use" | "view">)[Comp] : Comp extends new (...args: any) => any ? InstanceType<Comp> : undefined> | undefined;
|
|
24
24
|
} & Omit<import("react").PropsWithoutRef<import("react").ComponentProps<Comp>>, "as"> & {
|
|
25
25
|
/** Children element to be rendered inside the component. */
|
|
26
26
|
children?: ReactNode;
|
|
@@ -37,11 +37,11 @@ export declare const Box: <Comp extends import("react").ElementType<any> = "div"
|
|
|
37
37
|
*/
|
|
38
38
|
asElement?: keyof HTMLElementTagNameMap | undefined;
|
|
39
39
|
} & {
|
|
40
|
-
background?: "
|
|
40
|
+
background?: "infoLight" | "criticalLight" | "positiveLight" | "cautionLight" | "muted" | "disabled" | "backdrop" | "body" | "surface" | "surfaceMuted" | "surfacePressed" | "fieldAccent" | "input" | "inputPressed" | "inputDisabled" | "accent" | "accentMuted" | "neutral" | "neutralLow" | "primary" | "primaryLow" | "primaryMuted" | "secondary" | "secondaryLow" | "secondaryMuted" | "caution" | "cautionLow" | "cautionMuted" | "critical" | "criticalLow" | "criticalMuted" | "info" | "infoLow" | "infoMuted" | "positive" | "positiveLow" | "positiveMuted" | undefined;
|
|
41
41
|
cursor?: "default" | "pointer" | undefined;
|
|
42
42
|
minHeight?: 0 | undefined;
|
|
43
43
|
minWidth?: 0 | undefined;
|
|
44
|
-
overflow?: "
|
|
44
|
+
overflow?: "scroll" | "hidden" | "auto" | "visible" | undefined;
|
|
45
45
|
shadow?: "small" | "large" | "medium" | undefined;
|
|
46
46
|
userSelect?: "none" | undefined;
|
|
47
|
-
} & import("./use-box-styles").ResponsiveBoxProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
47
|
+
} & import("./use-box-styles.js").ResponsiveBoxProps) => import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
|
-
import type { BoxStyleProps } from
|
|
2
|
+
import type { BoxStyleProps } from "./use-box-styles.js";
|
|
3
3
|
export declare type BackgroundVariant = NonNullable<BoxStyleProps['background']> | 'UNKNOWN_DARK' | 'UNKNOWN_LIGHT';
|
|
4
4
|
export declare const InternalBackgroundProvider: import("react").Provider<BackgroundVariant>;
|
|
5
5
|
export declare const useBackground: () => BackgroundVariant;
|
|
6
|
-
export declare function renderBackgroundProvider(background: BackgroundVariant | undefined, element: ReactElement | null): JSX.Element | null;
|
|
6
|
+
export declare function renderBackgroundProvider(background: BackgroundVariant | undefined, element: ReactElement | null): import("react/jsx-runtime").JSX.Element | null;
|
|
7
7
|
export declare const useBackgroundLightness: (backgroundOverride?: ReturnType<typeof useBackground>) => "light" | "dark";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { BackgroundProvider } from
|
|
2
|
-
export { Box } from
|
|
3
|
-
export { useBackground, useBackgroundLightness } from
|
|
4
|
-
export type { BackgroundProviderProps } from
|
|
5
|
-
export type { BoxProps } from
|
|
1
|
+
export { BackgroundProvider } from "./background-provider.js";
|
|
2
|
+
export { Box } from "./box.js";
|
|
3
|
+
export { useBackground, useBackgroundLightness } from "./context.js";
|
|
4
|
+
export type { BackgroundProviderProps } from "./background-provider.js";
|
|
5
|
+
export type { BoxProps } from "./box.js";
|
|
@@ -1 +1,2 @@
|
|
|
1
1
|
export * from "./declarations/src/index";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bhcmstd2ViLWJveC5janMuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4vZGVjbGFyYXRpb25zL3NyYy9pbmRleC5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-web/box",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"homepage": "https://github.com/brighte-labs/spark-web#readme",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"README.md"
|
|
16
16
|
],
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@babel/runtime": "^7.
|
|
19
|
-
"@emotion/css": "^11.
|
|
18
|
+
"@babel/runtime": "^7.25.0",
|
|
19
|
+
"@emotion/css": "^11.11.2",
|
|
20
20
|
"@spark-web/theme": "^3.2.0",
|
|
21
|
-
"@spark-web/utils": "^1.3.
|
|
21
|
+
"@spark-web/utils": "^1.3.1"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/react": "^18.2.0",
|