@spark-web/highlight-card 0.0.0-snapshot-release-20260401034720

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 ADDED
@@ -0,0 +1,11 @@
1
+ # @spark-web/highlight-card
2
+
3
+ ## 0.0.0-snapshot-release-20260401034720
4
+
5
+ ### Minor Changes
6
+
7
+ - [#782](https://github.com/brighte-labs/spark-web/pull/782)
8
+ [`b2d2761`](https://github.com/brighte-labs/spark-web/commit/b2d276158c169b9d6913707f231851b0ee16f3e3)
9
+ Thanks [@jacobporci-brighte](https://github.com/jacobporci-brighte)! - **tag,
10
+ overflow-menu, highlight-card, description-list, section-header,
11
+ section-card:** add new accreditation component packages
package/CLAUDE.md ADDED
@@ -0,0 +1,34 @@
1
+ # @spark-web/highlight-card
2
+
3
+ A card with a solid primary-color border and a gradient inner background
4
+ (surface → primaryLow), used to draw attention to important content like results
5
+ or recommendations.
6
+
7
+ ## Usage
8
+
9
+ ```tsx
10
+ import { HighlightCard } from '@spark-web/highlight-card';
11
+
12
+ <HighlightCard title="Your result">
13
+ <Text>Content here</Text>
14
+ </HighlightCard>;
15
+ ```
16
+
17
+ ## Key props
18
+
19
+ | Prop | Type | Default | Notes |
20
+ | ---------------- | ------------------------------------------------------ | ------------- | --------------------------------------------------------- |
21
+ | `children` | `ReactNode` | required | String children are auto-wrapped in `<Text size="small">` |
22
+ | `title` | `string` | — | Displayed above children; omit to suppress |
23
+ | `titleTone` | `ForegroundTone` | `'primary'` | |
24
+ | `titleSize` | `keyof SparkTheme['typography']['text']` | `'xsmall'` | |
25
+ | `titleTransform` | `'uppercase' \| 'lowercase' \| 'capitalize' \| 'none'` | `'uppercase'` | |
26
+ | `contentPadding` | `BoxProps['padding']` | `'large'` | Inner padding |
27
+ | `data` | `DataAttributeMap` | — | Test/analytics attributes |
28
+
29
+ ## Constraints
30
+
31
+ - Border and inner radius are derived from `theme.border.radius.large` and
32
+ `theme.border.width.standard` — do not override with raw pixel values
33
+ - Inner background uses `theme.color.background.surface` →
34
+ `theme.color.background.primaryLow` gradient
package/README.md ADDED
@@ -0,0 +1,14 @@
1
+ # @spark-web/highlight-card
2
+
3
+ A card with a gradient primary-color border, used to draw attention to important
4
+ content like results or recommendations.
5
+
6
+ ## Usage
7
+
8
+ ```tsx
9
+ import { HighlightCard } from '@spark-web/highlight-card';
10
+
11
+ <HighlightCard title="Results">
12
+ The application has been reviewed and meets all requirements.
13
+ </HighlightCard>;
14
+ ```
@@ -0,0 +1,34 @@
1
+ import type { BoxProps } from '@spark-web/box';
2
+ import type { ForegroundTone } from '@spark-web/text';
3
+ import type { SparkTheme } from '@spark-web/theme';
4
+ import type { DataAttributeMap } from '@spark-web/utils/internal';
5
+ import type { ReactNode } from 'react';
6
+ type TextSize = keyof SparkTheme['typography']['text'];
7
+ type SpacingScale = NonNullable<BoxProps['padding']>;
8
+ type TitleTransform = 'uppercase' | 'lowercase' | 'capitalize' | 'none';
9
+ /**
10
+ * HighlightCard
11
+ *
12
+ * A card with a gradient primary-color border, used to draw attention
13
+ * to important content like results or recommendations.
14
+ *
15
+ * @see https://spark.brighte.com.au/package/highlight-card
16
+ */
17
+ export declare function HighlightCard({ children, contentPadding, data, title, titleTone, titleSize, titleTransform, }: HighlightCardProps): import("@emotion/react/jsx-runtime").JSX.Element;
18
+ export type HighlightCardProps = {
19
+ /** The content to display inside the card. */
20
+ children: ReactNode;
21
+ /** Padding around the inner content area. Defaults to 'large'. */
22
+ contentPadding?: SpacingScale;
23
+ /** Sets data attributes on the component. */
24
+ data?: DataAttributeMap;
25
+ /** An optional title displayed above the content. */
26
+ title?: string;
27
+ /** The tone of the title text. Defaults to 'primary'. */
28
+ titleTone?: ForegroundTone;
29
+ /** The size of the title text. Defaults to 'xsmall'. */
30
+ titleSize?: TextSize;
31
+ /** The CSS text-transform applied to the title. Defaults to 'uppercase'. */
32
+ titleTransform?: TitleTransform;
33
+ };
34
+ export {};
@@ -0,0 +1,2 @@
1
+ export { HighlightCard } from "./highlight-card.js";
2
+ export type { HighlightCardProps } from "./highlight-card.js";
@@ -0,0 +1,2 @@
1
+ export * from "./declarations/src/index.js";
2
+ //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3Bhcmstd2ViLWhpZ2hsaWdodC1jYXJkLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi9kZWNsYXJhdGlvbnMvc3JjL2luZGV4LmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEifQ==
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var react = require('@emotion/react');
6
+ var box = require('@spark-web/box');
7
+ var stack = require('@spark-web/stack');
8
+ var text = require('@spark-web/text');
9
+ var theme = require('@spark-web/theme');
10
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
11
+
12
+ /**
13
+ * HighlightCard
14
+ *
15
+ * A card with a gradient primary-color border, used to draw attention
16
+ * to important content like results or recommendations.
17
+ *
18
+ * @see https://spark.brighte.com.au/package/highlight-card
19
+ */
20
+ function HighlightCard(_ref) {
21
+ var children = _ref.children,
22
+ _ref$contentPadding = _ref.contentPadding,
23
+ contentPadding = _ref$contentPadding === void 0 ? 'large' : _ref$contentPadding,
24
+ data = _ref.data,
25
+ title = _ref.title,
26
+ _ref$titleTone = _ref.titleTone,
27
+ titleTone = _ref$titleTone === void 0 ? 'primary' : _ref$titleTone,
28
+ _ref$titleSize = _ref.titleSize,
29
+ titleSize = _ref$titleSize === void 0 ? 'xsmall' : _ref$titleSize,
30
+ _ref$titleTransform = _ref.titleTransform,
31
+ titleTransform = _ref$titleTransform === void 0 ? 'uppercase' : _ref$titleTransform;
32
+ var theme$1 = theme.useTheme();
33
+ var primaryColor = theme$1.color.foreground.primary;
34
+ var surfaceColor = theme$1.color.background.surface;
35
+ var primaryLowColor = theme$1.color.background.primaryLow;
36
+ var outerRadius = theme$1.border.radius.large;
37
+ var borderWidth = theme$1.border.width.standard;
38
+ var outerStyles = react.css({
39
+ background: primaryColor,
40
+ borderRadius: outerRadius,
41
+ padding: borderWidth
42
+ });
43
+ var innerStyles = react.css({
44
+ background: "linear-gradient(to bottom right, ".concat(surfaceColor, ", ").concat(primaryLowColor, ")"),
45
+ borderRadius: outerRadius - borderWidth
46
+ });
47
+ return jsxRuntime.jsx(box.Box, {
48
+ data: data,
49
+ css: outerStyles,
50
+ children: jsxRuntime.jsx(box.Box, {
51
+ css: innerStyles,
52
+ padding: contentPadding,
53
+ children: jsxRuntime.jsxs(stack.Stack, {
54
+ gap: "large",
55
+ children: [title && jsxRuntime.jsx(text.Text, {
56
+ size: titleSize,
57
+ weight: "semibold",
58
+ transform: titleTransform,
59
+ tone: titleTone,
60
+ children: title
61
+ }), typeof children === 'string' ? jsxRuntime.jsx(text.Text, {
62
+ size: "small",
63
+ children: children
64
+ }) : children]
65
+ })
66
+ })
67
+ });
68
+ }
69
+
70
+ exports.HighlightCard = HighlightCard;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ if (process.env.NODE_ENV === "production") {
4
+ module.exports = require("./spark-web-highlight-card.cjs.prod.js");
5
+ } else {
6
+ module.exports = require("./spark-web-highlight-card.cjs.dev.js");
7
+ }
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var react = require('@emotion/react');
6
+ var box = require('@spark-web/box');
7
+ var stack = require('@spark-web/stack');
8
+ var text = require('@spark-web/text');
9
+ var theme = require('@spark-web/theme');
10
+ var jsxRuntime = require('@emotion/react/jsx-runtime');
11
+
12
+ /**
13
+ * HighlightCard
14
+ *
15
+ * A card with a gradient primary-color border, used to draw attention
16
+ * to important content like results or recommendations.
17
+ *
18
+ * @see https://spark.brighte.com.au/package/highlight-card
19
+ */
20
+ function HighlightCard(_ref) {
21
+ var children = _ref.children,
22
+ _ref$contentPadding = _ref.contentPadding,
23
+ contentPadding = _ref$contentPadding === void 0 ? 'large' : _ref$contentPadding,
24
+ data = _ref.data,
25
+ title = _ref.title,
26
+ _ref$titleTone = _ref.titleTone,
27
+ titleTone = _ref$titleTone === void 0 ? 'primary' : _ref$titleTone,
28
+ _ref$titleSize = _ref.titleSize,
29
+ titleSize = _ref$titleSize === void 0 ? 'xsmall' : _ref$titleSize,
30
+ _ref$titleTransform = _ref.titleTransform,
31
+ titleTransform = _ref$titleTransform === void 0 ? 'uppercase' : _ref$titleTransform;
32
+ var theme$1 = theme.useTheme();
33
+ var primaryColor = theme$1.color.foreground.primary;
34
+ var surfaceColor = theme$1.color.background.surface;
35
+ var primaryLowColor = theme$1.color.background.primaryLow;
36
+ var outerRadius = theme$1.border.radius.large;
37
+ var borderWidth = theme$1.border.width.standard;
38
+ var outerStyles = react.css({
39
+ background: primaryColor,
40
+ borderRadius: outerRadius,
41
+ padding: borderWidth
42
+ });
43
+ var innerStyles = react.css({
44
+ background: "linear-gradient(to bottom right, ".concat(surfaceColor, ", ").concat(primaryLowColor, ")"),
45
+ borderRadius: outerRadius - borderWidth
46
+ });
47
+ return jsxRuntime.jsx(box.Box, {
48
+ data: data,
49
+ css: outerStyles,
50
+ children: jsxRuntime.jsx(box.Box, {
51
+ css: innerStyles,
52
+ padding: contentPadding,
53
+ children: jsxRuntime.jsxs(stack.Stack, {
54
+ gap: "large",
55
+ children: [title && jsxRuntime.jsx(text.Text, {
56
+ size: titleSize,
57
+ weight: "semibold",
58
+ transform: titleTransform,
59
+ tone: titleTone,
60
+ children: title
61
+ }), typeof children === 'string' ? jsxRuntime.jsx(text.Text, {
62
+ size: "small",
63
+ children: children
64
+ }) : children]
65
+ })
66
+ })
67
+ });
68
+ }
69
+
70
+ exports.HighlightCard = HighlightCard;
@@ -0,0 +1,66 @@
1
+ import { css } from '@emotion/react';
2
+ import { Box } from '@spark-web/box';
3
+ import { Stack } from '@spark-web/stack';
4
+ import { Text } from '@spark-web/text';
5
+ import { useTheme } from '@spark-web/theme';
6
+ import { jsx, jsxs } from '@emotion/react/jsx-runtime';
7
+
8
+ /**
9
+ * HighlightCard
10
+ *
11
+ * A card with a gradient primary-color border, used to draw attention
12
+ * to important content like results or recommendations.
13
+ *
14
+ * @see https://spark.brighte.com.au/package/highlight-card
15
+ */
16
+ function HighlightCard(_ref) {
17
+ var children = _ref.children,
18
+ _ref$contentPadding = _ref.contentPadding,
19
+ contentPadding = _ref$contentPadding === void 0 ? 'large' : _ref$contentPadding,
20
+ data = _ref.data,
21
+ title = _ref.title,
22
+ _ref$titleTone = _ref.titleTone,
23
+ titleTone = _ref$titleTone === void 0 ? 'primary' : _ref$titleTone,
24
+ _ref$titleSize = _ref.titleSize,
25
+ titleSize = _ref$titleSize === void 0 ? 'xsmall' : _ref$titleSize,
26
+ _ref$titleTransform = _ref.titleTransform,
27
+ titleTransform = _ref$titleTransform === void 0 ? 'uppercase' : _ref$titleTransform;
28
+ var theme = useTheme();
29
+ var primaryColor = theme.color.foreground.primary;
30
+ var surfaceColor = theme.color.background.surface;
31
+ var primaryLowColor = theme.color.background.primaryLow;
32
+ var outerRadius = theme.border.radius.large;
33
+ var borderWidth = theme.border.width.standard;
34
+ var outerStyles = css({
35
+ background: primaryColor,
36
+ borderRadius: outerRadius,
37
+ padding: borderWidth
38
+ });
39
+ var innerStyles = css({
40
+ background: "linear-gradient(to bottom right, ".concat(surfaceColor, ", ").concat(primaryLowColor, ")"),
41
+ borderRadius: outerRadius - borderWidth
42
+ });
43
+ return jsx(Box, {
44
+ data: data,
45
+ css: outerStyles,
46
+ children: jsx(Box, {
47
+ css: innerStyles,
48
+ padding: contentPadding,
49
+ children: jsxs(Stack, {
50
+ gap: "large",
51
+ children: [title && jsx(Text, {
52
+ size: titleSize,
53
+ weight: "semibold",
54
+ transform: titleTransform,
55
+ tone: titleTone,
56
+ children: title
57
+ }), typeof children === 'string' ? jsx(Text, {
58
+ size: "small",
59
+ children: children
60
+ }) : children]
61
+ })
62
+ })
63
+ });
64
+ }
65
+
66
+ export { HighlightCard };
package/package.json ADDED
@@ -0,0 +1,37 @@
1
+ {
2
+ "name": "@spark-web/highlight-card",
3
+ "version": "0.0.0-snapshot-release-20260401034720",
4
+ "homepage": "https://github.com/brighte-labs/spark-web#readme",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/brighte-labs/spark-web.git",
8
+ "directory": "packages/highlight-card"
9
+ },
10
+ "main": "dist/spark-web-highlight-card.cjs.js",
11
+ "module": "dist/spark-web-highlight-card.esm.js",
12
+ "files": [
13
+ "CHANGELOG.md",
14
+ "CLAUDE.md",
15
+ "dist",
16
+ "README.md"
17
+ ],
18
+ "dependencies": {
19
+ "@babel/runtime": "^7.25.0",
20
+ "@emotion/react": "^11.14.0",
21
+ "@spark-web/box": "^6.0.0",
22
+ "@spark-web/stack": "^5.0.0",
23
+ "@spark-web/text": "^5.3.0",
24
+ "@spark-web/theme": "^5.13.0",
25
+ "@spark-web/utils": "^5.1.0"
26
+ },
27
+ "devDependencies": {
28
+ "@types/react": "^19.1.0",
29
+ "react": "^19.1.0"
30
+ },
31
+ "peerDependencies": {
32
+ "react": "^17.0.0 || ^18.0.0 || ^19.0.0"
33
+ },
34
+ "engines": {
35
+ "node": ">=14"
36
+ }
37
+ }