@veracity/vui 2.6.2 → 2.6.3

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.
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/badge/badge.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG1C;;;;GAIG;AAEH,eAAO,MAAM,KAAK,oDAmBhB,CAAA;AAEF,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/badge/badge.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG1C;;;;GAIG;AAEH,eAAO,MAAM,KAAK,oDAoBhB,CAAA;AAEF,eAAe,KAAK,CAAA"}
@@ -24,12 +24,12 @@ const theme_1 = __importDefault(require("./theme"));
24
24
  *
25
25
  * These components are used for displaying information only; they might be used as a “counter” for push notifications.
26
26
  */
27
- exports.Badge = (0, core_1.vui)(props => {
27
+ exports.Badge = (0, core_1.vui)((props, ref) => {
28
28
  var _a;
29
29
  const _b = props, { variant } = _b, rest = __rest(_b, ["variant"]);
30
30
  const { variants } = (_a = theme_1.default) !== null && _a !== void 0 ? _a : {};
31
31
  const bg = variants[variant !== null && variant !== void 0 ? variant : 'subtleSandstone'].container.bg;
32
32
  const color = variants[variant !== null && variant !== void 0 ? variant : 'subtleSandstone'].container.color;
33
- return (react_1.default.createElement(tag_1.Tag, Object.assign({ bg: bg, className: "vui-badge", color: color, isInteractive: false, isRound: true, minW: "20px" }, rest, { onDelete: undefined })));
33
+ return (react_1.default.createElement(tag_1.Tag, Object.assign({ bg: bg, className: "vui-badge", color: color, isInteractive: false, isRound: true, minW: "20px", ref: ref }, rest, { onDelete: undefined })));
34
34
  });
35
35
  exports.default = exports.Badge;
@@ -1 +1 @@
1
- {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/badge/badge.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG1C;;;;GAIG;AAEH,eAAO,MAAM,KAAK,oDAmBhB,CAAA;AAEF,eAAe,KAAK,CAAA"}
1
+ {"version":3,"file":"badge.d.ts","sourceRoot":"","sources":["../../../src/badge/badge.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAG1C;;;;GAIG;AAEH,eAAO,MAAM,KAAK,oDAoBhB,CAAA;AAEF,eAAe,KAAK,CAAA"}
@@ -7,11 +7,11 @@ import theme from './theme';
7
7
  *
8
8
  * These components are used for displaying information only; they might be used as a “counter” for push notifications.
9
9
  */
10
- export const Badge = vui(props => {
10
+ export const Badge = vui((props, ref) => {
11
11
  const { variant, ...rest } = props;
12
12
  const { variants } = theme ?? {};
13
13
  const bg = variants[variant ?? 'subtleSandstone'].container.bg;
14
14
  const color = variants[variant ?? 'subtleSandstone'].container.color;
15
- return (React.createElement(Tag, { bg: bg, className: "vui-badge", color: color, isInteractive: false, isRound: true, minW: "20px", ...rest, onDelete: undefined }));
15
+ return (React.createElement(Tag, { bg: bg, className: "vui-badge", color: color, isInteractive: false, isRound: true, minW: "20px", ref: ref, ...rest, onDelete: undefined }));
16
16
  });
17
17
  export default Badge;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veracity/vui",
3
- "version": "2.6.2",
3
+ "version": "2.6.3",
4
4
  "description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
5
5
  "module": "./dist/esm/index.js",
6
6
  "main": "./dist/cjs/index.js",
@@ -12,7 +12,7 @@ import theme from './theme'
12
12
  * These components are used for displaying information only; they might be used as a “counter” for push notifications.
13
13
  */
14
14
 
15
- export const Badge = vui<'span', BadgeProps>(props => {
15
+ export const Badge = vui<'span', BadgeProps>((props, ref) => {
16
16
  const { variant, ...rest } = props as TagProps
17
17
  const { variants } = (theme as Dict) ?? {}
18
18
 
@@ -27,6 +27,7 @@ export const Badge = vui<'span', BadgeProps>(props => {
27
27
  isInteractive={false}
28
28
  isRound
29
29
  minW="20px"
30
+ ref={ref}
30
31
  {...rest}
31
32
  onDelete={undefined}
32
33
  />