@adamjanicki/ui 1.1.2 → 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.2",
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
@@ -103,8 +103,12 @@
103
103
  --ajui-link-color: #009ef3;
104
104
  }
105
105
 
106
- a:not([disabled]):is(:focus-visible),
107
- button:not([disabled]):is(:focus-visible) {
106
+ a:focus:not(:focus-visible) {
107
+ outline: none;
108
+ }
109
+
110
+ a:not([disabled]):focus-visible,
111
+ button:not([disabled]):focus-visible {
108
112
  outline: 3px solid var(--ajui-link-color);
109
113
  outline-offset: 0;
110
114
  }
@@ -171,6 +175,7 @@ button:not([disabled]):is(:focus-visible) {
171
175
  border-width: 1px;
172
176
  font-weight: 600;
173
177
  font-size: 0.875rem;
178
+ width: fit-content;
174
179
  }
175
180
 
176
181
  /* Banner */