@spark-web/box 2.0.0-rc.15 → 2.0.0-rc.16
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
|
@@ -38,7 +38,7 @@ export declare const Box: <Comp extends import("react").ElementType<any, keyof i
|
|
|
38
38
|
*/
|
|
39
39
|
asElement?: keyof HTMLElementTagNameMap | undefined;
|
|
40
40
|
} & {
|
|
41
|
-
background?: "
|
|
41
|
+
background?: "body" | "input" | "infoLight" | "criticalLight" | "positiveLight" | "cautionLight" | "muted" | "disabled" | "backdrop" | "surface" | "surfaceMuted" | "surfacePressed" | "fieldAccent" | "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;
|
|
42
42
|
cursor?: "default" | "pointer" | undefined;
|
|
43
43
|
minHeight?: 0 | undefined;
|
|
44
44
|
minWidth?: 0 | undefined;
|
|
@@ -327,19 +327,14 @@ var Box = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
327
327
|
styles = _useBoxProps.styles,
|
|
328
328
|
attributes = _useBoxProps.attributes;
|
|
329
329
|
var resetStyles = internal.resetElementStyles(asElement !== null && asElement !== void 0 ? asElement : Tag);
|
|
330
|
-
var element = jsxRuntime.jsx(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
id: id
|
|
336
|
-
// css={cx(css(resetStyles), css(styles), css(cssProps))}
|
|
337
|
-
,
|
|
330
|
+
var element = jsxRuntime.jsx(Tag, _objectSpread(_objectSpread({}, data ? internal.buildDataAttributes(data) : undefined), {}, {
|
|
331
|
+
ref: forwardedRef,
|
|
332
|
+
id: id
|
|
333
|
+
// css={cx(css(resetStyles), css(styles), css(cssProps))}
|
|
334
|
+
,
|
|
338
335
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
});
|
|
336
|
+
css: react$1.css(resetStyles, styles, cssProps)
|
|
337
|
+
}, attributes));
|
|
343
338
|
return renderBackgroundProvider(props.background, element);
|
|
344
339
|
});
|
|
345
340
|
|
|
@@ -327,19 +327,14 @@ var Box = ts.forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
327
327
|
styles = _useBoxProps.styles,
|
|
328
328
|
attributes = _useBoxProps.attributes;
|
|
329
329
|
var resetStyles = internal.resetElementStyles(asElement !== null && asElement !== void 0 ? asElement : Tag);
|
|
330
|
-
var element = jsxRuntime.jsx(
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
id: id
|
|
336
|
-
// css={cx(css(resetStyles), css(styles), css(cssProps))}
|
|
337
|
-
,
|
|
330
|
+
var element = jsxRuntime.jsx(Tag, _objectSpread(_objectSpread({}, data ? internal.buildDataAttributes(data) : undefined), {}, {
|
|
331
|
+
ref: forwardedRef,
|
|
332
|
+
id: id
|
|
333
|
+
// css={cx(css(resetStyles), css(styles), css(cssProps))}
|
|
334
|
+
,
|
|
338
335
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
}
|
|
342
|
-
});
|
|
336
|
+
css: react$1.css(resetStyles, styles, cssProps)
|
|
337
|
+
}, attributes));
|
|
343
338
|
return renderBackgroundProvider(props.background, element);
|
|
344
339
|
});
|
|
345
340
|
|
|
@@ -3,7 +3,7 @@ import { createContext, useContext } from 'react';
|
|
|
3
3
|
import { jsx } from '@emotion/react/jsx-runtime';
|
|
4
4
|
import _objectSpread from '@babel/runtime/helpers/esm/objectSpread2';
|
|
5
5
|
import _objectWithoutProperties from '@babel/runtime/helpers/esm/objectWithoutProperties';
|
|
6
|
-
import {
|
|
6
|
+
import { css } from '@emotion/react';
|
|
7
7
|
import { resetElementStyles, buildDataAttributes } from '@spark-web/utils/internal';
|
|
8
8
|
import { forwardRefWithAs } from '@spark-web/utils/ts';
|
|
9
9
|
|
|
@@ -323,19 +323,14 @@ var Box = forwardRefWithAs(function (_ref, forwardedRef) {
|
|
|
323
323
|
styles = _useBoxProps.styles,
|
|
324
324
|
attributes = _useBoxProps.attributes;
|
|
325
325
|
var resetStyles = resetElementStyles(asElement !== null && asElement !== void 0 ? asElement : Tag);
|
|
326
|
-
var element = jsx(
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
id: id
|
|
332
|
-
// css={cx(css(resetStyles), css(styles), css(cssProps))}
|
|
333
|
-
,
|
|
326
|
+
var element = jsx(Tag, _objectSpread(_objectSpread({}, data ? buildDataAttributes(data) : undefined), {}, {
|
|
327
|
+
ref: forwardedRef,
|
|
328
|
+
id: id
|
|
329
|
+
// css={cx(css(resetStyles), css(styles), css(cssProps))}
|
|
330
|
+
,
|
|
334
331
|
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
338
|
-
});
|
|
332
|
+
css: css(resetStyles, styles, cssProps)
|
|
333
|
+
}, attributes));
|
|
339
334
|
return renderBackgroundProvider(props.background, element);
|
|
340
335
|
});
|
|
341
336
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spark-web/box",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.16",
|
|
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": "^4.0.0-rc.
|
|
21
|
-
"@spark-web/utils": "^2.0.0-rc.
|
|
20
|
+
"@spark-web/theme": "^4.0.0-rc.16",
|
|
21
|
+
"@spark-web/utils": "^2.0.0-rc.16"
|
|
22
22
|
},
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"@types/react": "^18.2.0",
|