@adamjanicki/ui 1.1.3 → 1.1.4

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.
@@ -23,5 +23,5 @@ type Props = {
23
23
  */
24
24
  corners?: CornerType;
25
25
  };
26
- declare const Alert: ({ type, className, corners, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
26
+ declare const Alert: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
27
27
  export default Alert;
@@ -21,9 +21,10 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
+ import React from "react";
24
25
  import { classNames } from "../../utils/util";
25
- var Alert = function (_a) {
26
+ var Alert = React.forwardRef(function (_a, ref) {
26
27
  var type = _a.type, className = _a.className, _b = _a.corners, corners = _b === void 0 ? "rounded" : _b, rest = __rest(_a, ["type", "className", "corners"]);
27
- return (_jsx("div", __assign({ className: classNames("ajui-alert content--".concat(type, " corners--").concat(corners), className) }, rest)));
28
- };
28
+ return (_jsx("div", __assign({ className: classNames("ajui-alert content--".concat(type, " corners--").concat(corners), className), ref: ref }, rest)));
29
+ });
29
30
  export default Alert;
@@ -24,5 +24,5 @@ type Props = {
24
24
  */
25
25
  corners?: CornerType;
26
26
  };
27
- declare const Badge: ({ type, className, corners, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
27
+ declare const Badge: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
28
28
  export default Badge;
@@ -21,9 +21,10 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
+ import React from "react";
24
25
  import { classNames } from "../../utils/util";
25
- var Badge = function (_a) {
26
+ var Badge = React.forwardRef(function (_a, ref) {
26
27
  var type = _a.type, className = _a.className, _b = _a.corners, corners = _b === void 0 ? "rounded" : _b, rest = __rest(_a, ["type", "className", "corners"]);
27
- return (_jsx("div", __assign({ className: classNames("ajui-badge content--".concat(type, " corners--").concat(corners), className) }, rest)));
28
- };
28
+ return (_jsx("div", __assign({ className: classNames("ajui-badge content--".concat(type, " corners--").concat(corners), className), ref: ref }, rest)));
29
+ });
29
30
  export default Badge;
@@ -18,5 +18,5 @@ type Props = {
18
18
  */
19
19
  style?: React.CSSProperties;
20
20
  };
21
- declare const Banner: ({ type, className, ...rest }: Props) => import("react/jsx-runtime").JSX.Element;
21
+ declare const Banner: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLDivElement>>;
22
22
  export default Banner;
@@ -21,9 +21,10 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  return t;
22
22
  };
23
23
  import { jsx as _jsx } from "react/jsx-runtime";
24
+ import React from "react";
24
25
  import { classNames } from "../../utils/util";
25
- var Banner = function (_a) {
26
+ var Banner = React.forwardRef(function (_a, ref) {
26
27
  var type = _a.type, className = _a.className, rest = __rest(_a, ["type", "className"]);
27
- return (_jsx("div", __assign({ className: classNames("content--".concat(type, " ajui-banner"), className) }, rest)));
28
- };
28
+ return (_jsx("div", __assign({ className: classNames("content--".concat(type, " ajui-banner"), className), ref: ref }, rest)));
29
+ });
29
30
  export default Banner;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamjanicki/ui",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Basic UI components and hooks for React in TypeScript",
5
5
  "main": "./index.js",
6
6
  "types": "./index.d.ts",
package/style.css CHANGED
@@ -175,6 +175,7 @@ button:not([disabled]):focus-visible {
175
175
  border-width: 1px;
176
176
  font-weight: 600;
177
177
  font-size: 0.875rem;
178
+ width: fit-content;
178
179
  }
179
180
 
180
181
  /* Banner */