@spark-web/badge 0.0.3 → 0.1.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 ADDED
@@ -0,0 +1,99 @@
1
+ # @spark-web/badge
2
+
3
+ ## 0.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#382](https://github.com/brighte-labs/spark-web/pull/382)
8
+ [`955bf5d`](https://github.com/brighte-labs/spark-web/commit/955bf5d7698bfdf45e7f317aa3e726c81d3444c0)
9
+ Thanks [@dilipt-brighte](https://github.com/dilipt-brighte)! - Updates React
10
+ version to latest (18.2.0)
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+ [[`955bf5d`](https://github.com/brighte-labs/spark-web/commit/955bf5d7698bfdf45e7f317aa3e726c81d3444c0)]:
16
+ - @spark-web/box@1.2.0
17
+ - @spark-web/text@1.2.0
18
+ - @spark-web/theme@3.2.0
19
+ - @spark-web/utils@1.3.0
20
+
21
+ ## 0.0.4
22
+
23
+ ### Patch Changes
24
+
25
+ - [#218](https://github.com/brighte-labs/spark-web/pull/218)
26
+ [`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5)
27
+ Thanks [@nderkim](https://github.com/nderkim)! - Rename files to kebab case
28
+
29
+ - [#222](https://github.com/brighte-labs/spark-web/pull/222)
30
+ [`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b)
31
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update
32
+ dependencies
33
+
34
+ - [#242](https://github.com/brighte-labs/spark-web/pull/242)
35
+ [`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)
36
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - - Add homepage
37
+ and repository keys to package.json
38
+ - Add CHANGELOG and README to files key in package.json
39
+ - Updated dependencies
40
+ [[`adc5e9e`](https://github.com/brighte-labs/spark-web/commit/adc5e9e6c99acd117f3261edcefdb5573132441b),
41
+ [`de99b9c`](https://github.com/brighte-labs/spark-web/commit/de99b9c7f72373bd1902cf67f5cfec9a1e1db01c),
42
+ [`6fc8d1b`](https://github.com/brighte-labs/spark-web/commit/6fc8d1bc37e25d0cd622bc37f68a1d92eb5961b5),
43
+ [`7f93c45`](https://github.com/brighte-labs/spark-web/commit/7f93c45bbae8c765e10df9d0dd7615473797749b),
44
+ [`62f7de8`](https://github.com/brighte-labs/spark-web/commit/62f7de8a2e1df5ae088c093d3acdaa868d3f61fe),
45
+ [`6df05f7`](https://github.com/brighte-labs/spark-web/commit/6df05f764e4181c140d6547d6b897d0210468f6a)]:
46
+ - @spark-web/box@1.1.0
47
+ - @spark-web/text@1.1.2
48
+ - @spark-web/theme@3.1.0
49
+ - @spark-web/utils@1.2.3
50
+
51
+ ## 0.0.3
52
+
53
+ ### Patch Changes
54
+
55
+ - [#208](https://github.com/brighte-labs/spark-web/pull/208)
56
+ [`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)
57
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - Lower required
58
+ node version
59
+
60
+ - Updated dependencies
61
+ [[`1ea26ef`](https://github.com/brighte-labs/spark-web/commit/1ea26ef04a3b45875ed0dd2326eeab1fbe1e4bc5)]:
62
+ - @spark-web/box@1.0.9
63
+ - @spark-web/text@1.1.1
64
+ - @spark-web/theme@3.0.6
65
+ - @spark-web/utils@1.2.2
66
+
67
+ ## 0.0.2
68
+
69
+ ### Patch Changes
70
+
71
+ - [#197](https://github.com/brighte-labs/spark-web/pull/197)
72
+ [`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)
73
+ Thanks [@lukebennett88](https://github.com/lukebennett88)! - Update packages
74
+
75
+ - Updated dependencies
76
+ [[`9ff0c4b`](https://github.com/brighte-labs/spark-web/commit/9ff0c4b4cc83e0e1ab609d0bcdb01458b654263e),
77
+ [`94016d8`](https://github.com/brighte-labs/spark-web/commit/94016d84e26bbe55833bbcbab847a2cce6041538)]:
78
+ - @spark-web/text@1.1.0
79
+ - @spark-web/box@1.0.8
80
+ - @spark-web/theme@3.0.5
81
+ - @spark-web/utils@1.2.1
82
+
83
+ ## 0.0.1
84
+
85
+ ### Patch Changes
86
+
87
+ - [#187](https://github.com/brighte-labs/spark-web/pull/187)
88
+ [`7b0cfdf`](https://github.com/brighte-labs/spark-web/commit/7b0cfdf6fb4d32b86e00050d8869ac2b9787cf41)
89
+ Thanks [@tamm](https://github.com/tamm)! - Introduce status colours, as
90
+ different to foreground or background colours.
91
+
92
+ * [#187](https://github.com/brighte-labs/spark-web/pull/187)
93
+ [`7b0cfdf`](https://github.com/brighte-labs/spark-web/commit/7b0cfdf6fb4d32b86e00050d8869ac2b9787cf41)
94
+ Thanks [@tamm](https://github.com/tamm)! - Initial release of the badge
95
+ component
96
+
97
+ * Updated dependencies
98
+ [[`7b0cfdf`](https://github.com/brighte-labs/spark-web/commit/7b0cfdf6fb4d32b86e00050d8869ac2b9787cf41)]:
99
+ - @spark-web/theme@3.0.4
package/README.md CHANGED
@@ -32,19 +32,11 @@ return (
32
32
 
33
33
  ### Badge
34
34
 
35
- | Prop | Type | Default | Description |
36
- | -------- | ------------------------------------------------------------------------ | ------- | -------------------------------------- |
37
- | children | string \|number | | The label of the badge. |
38
- | data? | [DataAttributeMap][data-attribute-map] | | Sets data attributes on the component. |
39
- | tone? | "accent" \| "caution" \| "critical" \| "info" \| "neutral" \| "positive" | | The tone of the badge. |
35
+ <PropsTable displayName="Badge" />
40
36
 
41
37
  ### IndicatorDot
42
38
 
43
- | Prop | Type | Default | Description |
44
- | ------ | ------------------------------------------------------------------------ | ------- | ------------------------------------------------------------------------------------------------- |
45
- | data? | [DataAttributeMap][data-attribute-map] | | Sets data attributes on the component. |
46
- | label? | string | | When the intent isn't provided by text, you must supply an "aria-label" for assistive tech users. |
47
- | tone? | "accent" \| "caution" \| "critical" \| "info" \| "neutral" \| "positive" | | The tone of the badge. |
39
+ <PropsTable displayName="IndicatorDot" />
48
40
 
49
41
  [data-attribute-map]:
50
42
  https://github.com/brighte-labs/spark-web/blob/e7f6f4285b4cfd876312cc89fbdd094039aa239a/packages/utils/src/internal/buildDataAttributes.ts#L1
@@ -10,7 +10,7 @@ export declare function Badge({ children, data, tone }: BadgeProps): JSX.Element
10
10
  export declare type BadgeProps = {
11
11
  /** The label of the badge. */
12
12
  children: string | number;
13
- /** Map of data attributes. */
13
+ /** Sets data attributes on the component. */
14
14
  data?: DataAttributeMap;
15
15
  /** The tone of the badge. */
16
16
  tone?: BadgeTones;
@@ -22,12 +22,9 @@ export declare type BadgeProps = {
22
22
  */
23
23
  export declare function IndicatorDot({ data, label, tone }: IndicatorDotProps): JSX.Element;
24
24
  export declare type IndicatorDotProps = {
25
- /** Map of data attributes. */
25
+ /** Sets data attributes on the component. */
26
26
  data?: DataAttributeMap;
27
- /**
28
- * When the intent isn't provided by text, you must supply an "aria-label" for
29
- * assistive tech users.
30
- */
27
+ /** When the intent isn't provided by text, you must supply an "aria-label" for assistive tech users. */
31
28
  label?: string;
32
29
  /** The tone of the indicator dot. */
33
30
  tone: BadgeTones;
@@ -1,2 +1,2 @@
1
- export { Badge, IndicatorDot } from './Badge';
2
- export type { BadgeProps, IndicatorDotProps } from './Badge';
1
+ export { Badge, IndicatorDot } from './badge';
2
+ export type { BadgeProps, IndicatorDotProps } from './badge';
@@ -19,12 +19,13 @@ var jsxRuntime = require('react/jsx-runtime');
19
19
  */
20
20
  function Badge(_ref) {
21
21
  var children = _ref.children,
22
- data = _ref.data,
23
- _ref$tone = _ref.tone,
24
- tone = _ref$tone === void 0 ? 'neutral' : _ref$tone;
22
+ data = _ref.data,
23
+ _ref$tone = _ref.tone,
24
+ tone = _ref$tone === void 0 ? 'neutral' : _ref$tone;
25
25
  var textSize = 'xsmall';
26
26
  return /*#__PURE__*/jsxRuntime.jsxs(box.Box, {
27
- data: data // Styles
27
+ data: data
28
+ // Styles
28
29
  ,
29
30
  display: "inline-flex",
30
31
  alignItems: "center",
@@ -55,8 +56,8 @@ function Badge(_ref) {
55
56
  */
56
57
  function IndicatorDot(_ref2) {
57
58
  var data = _ref2.data,
58
- label = _ref2.label,
59
- tone = _ref2.tone;
59
+ label = _ref2.label,
60
+ tone = _ref2.tone;
60
61
  var theme$1 = theme.useTheme();
61
62
  var dotSize = 8;
62
63
  return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, label ? {
@@ -73,7 +74,6 @@ function IndicatorDot(_ref2) {
73
74
  })
74
75
  }));
75
76
  }
76
-
77
77
  ////////////////////////////////////////////////////////////////////////////////
78
78
 
79
79
  /**
@@ -84,12 +84,12 @@ function IndicatorDot(_ref2) {
84
84
  */
85
85
  function IndicatorContainer(_ref3) {
86
86
  var children = _ref3.children,
87
- _ref3$size = _ref3.size,
88
- size = _ref3$size === void 0 ? 'standard' : _ref3$size;
87
+ _ref3$size = _ref3.size,
88
+ size = _ref3$size === void 0 ? 'standard' : _ref3$size;
89
89
  var theme$1 = theme.useTheme();
90
90
  var _theme$typography$tex = theme$1.typography.text[size],
91
- mobile = _theme$typography$tex.mobile,
92
- tablet = _theme$typography$tex.tablet;
91
+ mobile = _theme$typography$tex.mobile,
92
+ tablet = _theme$typography$tex.tablet;
93
93
  var responsiveHeight = theme$1.utils.responsiveStyles({
94
94
  mobile: {
95
95
  height: mobile.capHeight
@@ -19,12 +19,13 @@ var jsxRuntime = require('react/jsx-runtime');
19
19
  */
20
20
  function Badge(_ref) {
21
21
  var children = _ref.children,
22
- data = _ref.data,
23
- _ref$tone = _ref.tone,
24
- tone = _ref$tone === void 0 ? 'neutral' : _ref$tone;
22
+ data = _ref.data,
23
+ _ref$tone = _ref.tone,
24
+ tone = _ref$tone === void 0 ? 'neutral' : _ref$tone;
25
25
  var textSize = 'xsmall';
26
26
  return /*#__PURE__*/jsxRuntime.jsxs(box.Box, {
27
- data: data // Styles
27
+ data: data
28
+ // Styles
28
29
  ,
29
30
  display: "inline-flex",
30
31
  alignItems: "center",
@@ -55,8 +56,8 @@ function Badge(_ref) {
55
56
  */
56
57
  function IndicatorDot(_ref2) {
57
58
  var data = _ref2.data,
58
- label = _ref2.label,
59
- tone = _ref2.tone;
59
+ label = _ref2.label,
60
+ tone = _ref2.tone;
60
61
  var theme$1 = theme.useTheme();
61
62
  var dotSize = 8;
62
63
  return /*#__PURE__*/jsxRuntime.jsx(box.Box, _objectSpread(_objectSpread({}, label ? {
@@ -73,7 +74,6 @@ function IndicatorDot(_ref2) {
73
74
  })
74
75
  }));
75
76
  }
76
-
77
77
  ////////////////////////////////////////////////////////////////////////////////
78
78
 
79
79
  /**
@@ -84,12 +84,12 @@ function IndicatorDot(_ref2) {
84
84
  */
85
85
  function IndicatorContainer(_ref3) {
86
86
  var children = _ref3.children,
87
- _ref3$size = _ref3.size,
88
- size = _ref3$size === void 0 ? 'standard' : _ref3$size;
87
+ _ref3$size = _ref3.size,
88
+ size = _ref3$size === void 0 ? 'standard' : _ref3$size;
89
89
  var theme$1 = theme.useTheme();
90
90
  var _theme$typography$tex = theme$1.typography.text[size],
91
- mobile = _theme$typography$tex.mobile,
92
- tablet = _theme$typography$tex.tablet;
91
+ mobile = _theme$typography$tex.mobile,
92
+ tablet = _theme$typography$tex.tablet;
93
93
  var responsiveHeight = theme$1.utils.responsiveStyles({
94
94
  mobile: {
95
95
  height: mobile.capHeight
@@ -15,12 +15,13 @@ import { jsxs, jsx } from 'react/jsx-runtime';
15
15
  */
16
16
  function Badge(_ref) {
17
17
  var children = _ref.children,
18
- data = _ref.data,
19
- _ref$tone = _ref.tone,
20
- tone = _ref$tone === void 0 ? 'neutral' : _ref$tone;
18
+ data = _ref.data,
19
+ _ref$tone = _ref.tone,
20
+ tone = _ref$tone === void 0 ? 'neutral' : _ref$tone;
21
21
  var textSize = 'xsmall';
22
22
  return /*#__PURE__*/jsxs(Box, {
23
- data: data // Styles
23
+ data: data
24
+ // Styles
24
25
  ,
25
26
  display: "inline-flex",
26
27
  alignItems: "center",
@@ -51,8 +52,8 @@ function Badge(_ref) {
51
52
  */
52
53
  function IndicatorDot(_ref2) {
53
54
  var data = _ref2.data,
54
- label = _ref2.label,
55
- tone = _ref2.tone;
55
+ label = _ref2.label,
56
+ tone = _ref2.tone;
56
57
  var theme = useTheme();
57
58
  var dotSize = 8;
58
59
  return /*#__PURE__*/jsx(Box, _objectSpread(_objectSpread({}, label ? {
@@ -69,7 +70,6 @@ function IndicatorDot(_ref2) {
69
70
  })
70
71
  }));
71
72
  }
72
-
73
73
  ////////////////////////////////////////////////////////////////////////////////
74
74
 
75
75
  /**
@@ -80,12 +80,12 @@ function IndicatorDot(_ref2) {
80
80
  */
81
81
  function IndicatorContainer(_ref3) {
82
82
  var children = _ref3.children,
83
- _ref3$size = _ref3.size,
84
- size = _ref3$size === void 0 ? 'standard' : _ref3$size;
83
+ _ref3$size = _ref3.size,
84
+ size = _ref3$size === void 0 ? 'standard' : _ref3$size;
85
85
  var theme = useTheme();
86
86
  var _theme$typography$tex = theme.typography.text[size],
87
- mobile = _theme$typography$tex.mobile,
88
- tablet = _theme$typography$tex.tablet;
87
+ mobile = _theme$typography$tex.mobile,
88
+ tablet = _theme$typography$tex.tablet;
89
89
  var responsiveHeight = theme.utils.responsiveStyles({
90
90
  mobile: {
91
91
  height: mobile.capHeight
package/package.json CHANGED
@@ -1,23 +1,30 @@
1
1
  {
2
2
  "name": "@spark-web/badge",
3
- "version": "0.0.3",
4
- "license": "MIT",
3
+ "version": "0.1.0",
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/badge"
9
+ },
5
10
  "main": "dist/spark-web-badge.cjs.js",
6
11
  "module": "dist/spark-web-badge.esm.js",
7
12
  "files": [
8
- "dist"
13
+ "CHANGELOG.md",
14
+ "dist",
15
+ "README.md"
9
16
  ],
10
17
  "dependencies": {
11
- "@babel/runtime": "^7.18.9",
18
+ "@babel/runtime": "^7.19.0",
12
19
  "@emotion/css": "^11.9.0",
13
- "@spark-web/box": "^1.0.9",
14
- "@spark-web/text": "^1.1.1",
15
- "@spark-web/theme": "^3.0.6",
16
- "@spark-web/utils": "^1.2.2"
20
+ "@spark-web/box": "^1.2.0",
21
+ "@spark-web/text": "^1.2.0",
22
+ "@spark-web/theme": "^3.2.0",
23
+ "@spark-web/utils": "^1.3.0"
17
24
  },
18
25
  "devDependencies": {
19
- "@types/react": "^17.0.12",
20
- "react": "^17.0.2"
26
+ "@types/react": "^18.2.0",
27
+ "react": "^18.2.0"
21
28
  },
22
29
  "peerDependencies": {
23
30
  "react": ">=17.0.2"