@adamjanicki/ui 1.3.4 → 1.3.5
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/components/Alert/Alert.d.ts +1 -1
- package/components/Alert/Alert.js +1 -1
- package/components/Animated/Animated.js +1 -1
- package/components/Badge/Badge.d.ts +1 -1
- package/components/Badge/Badge.js +1 -1
- package/components/Banner/Banner.d.ts +1 -1
- package/components/Banner/Banner.js +1 -1
- package/components/Button/Button.d.ts +1 -1
- package/components/Button/Button.js +1 -1
- package/components/Input/IconInput.d.ts +1 -1
- package/components/Input/IconInput.js +1 -1
- package/components/Input/Input.d.ts +1 -1
- package/components/Input/Input.js +1 -1
- package/components/Input/TextArea.d.ts +1 -1
- package/components/Input/TextArea.js +1 -1
- package/components/Layer/Layer.js +1 -1
- package/components/Link/Link.js +1 -1
- package/components/Select/Select.d.ts +1 -1
- package/components/Select/Select.js +1 -1
- package/components/Spinner/Spinner.js +1 -1
- package/functions/classNames.d.ts +7 -0
- package/{utils/util.js → functions/classNames.js} +2 -2
- package/functions/index.d.ts +2 -0
- package/functions/index.js +2 -0
- package/package.json +1 -1
- package/style.css +2 -1
- package/utils/util.d.ts +0 -7
- /package/{utils/types.d.ts → types/index.d.ts} +0 -0
- /package/{utils/types.js → types/index.js} +0 -0
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import React from "react";
|
|
25
|
-
import
|
|
25
|
+
import classNames from "../../functions/classNames";
|
|
26
26
|
var Alert = React.forwardRef(function (_a, ref) {
|
|
27
27
|
var type = _a.type, className = _a.className, _b = _a.corners, corners = _b === void 0 ? "rounded" : _b, rest = __rest(_a, ["type", "className", "corners"]);
|
|
28
28
|
return (_jsx("div", __assign({ className: classNames("ajui-alert content--".concat(type, " corners--").concat(corners), className), ref: ref }, rest)));
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { useState, useEffect } from "react";
|
|
14
|
-
import
|
|
14
|
+
import classNames from "../../functions/classNames";
|
|
15
15
|
var Animated = function (_a) {
|
|
16
16
|
var visible = _a.visible, _b = _a.duration, duration = _b === void 0 ? 250 : _b, _c = _a.keepMountedOnExit, keepMountedOnExit = _c === void 0 ? false : _c, enter = _a.enter, exit = _a.exit, children = _a.children, className = _a.className, style = _a.style;
|
|
17
17
|
var _d = useState(visible), shouldRender = _d[0], setShouldRender = _d[1];
|
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import React from "react";
|
|
25
|
-
import
|
|
25
|
+
import classNames from "../../functions/classNames";
|
|
26
26
|
var Badge = React.forwardRef(function (_a, ref) {
|
|
27
27
|
var type = _a.type, className = _a.className, _b = _a.corners, corners = _b === void 0 ? "rounded" : _b, rest = __rest(_a, ["type", "className", "corners"]);
|
|
28
28
|
return (_jsx("div", __assign({ className: classNames("ajui-badge content--".concat(type, " corners--").concat(corners), className), ref: ref }, rest)));
|
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import React from "react";
|
|
25
|
-
import
|
|
25
|
+
import classNames from "../../functions/classNames";
|
|
26
26
|
var Banner = React.forwardRef(function (_a, ref) {
|
|
27
27
|
var type = _a.type, className = _a.className, rest = __rest(_a, ["type", "className"]);
|
|
28
28
|
return (_jsx("div", __assign({ className: classNames("content--".concat(type, " ajui-banner"), className), ref: ref }, rest)));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { CustomLinkElement } from "../Link/Link";
|
|
3
|
-
import { CornerType } from "../../
|
|
3
|
+
import { CornerType } from "../../types";
|
|
4
4
|
type DefaultButtonProps = React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> & {
|
|
5
5
|
/**
|
|
6
6
|
* [Optional] This can be used as a link if the `to` prop is provided
|
|
@@ -23,7 +23,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import { forwardRef } from "react";
|
|
25
25
|
import { UnstyledLink } from "../Link/Link";
|
|
26
|
-
import
|
|
26
|
+
import classNames from "../../functions/classNames";
|
|
27
27
|
export var UnstyledButton = forwardRef(function (_a, ref) {
|
|
28
28
|
var to = _a.to, LinkElement = _a.LinkElement, className = _a.className, props = __rest(_a, ["to", "LinkElement", "className"]);
|
|
29
29
|
className = classNames("ajui-button-base", className);
|
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
};
|
|
12
12
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
13
|
import { forwardRef } from "react";
|
|
14
|
-
import
|
|
14
|
+
import classNames from "../../functions/classNames";
|
|
15
15
|
var IconInput = forwardRef(function (_a, ref) {
|
|
16
16
|
var startIcon = _a.startIcon, endIcon = _a.endIcon, className = _a.className, style = _a.style, _b = _a.corners, corners = _b === void 0 ? "rounded" : _b, inputProps = _a.inputProps;
|
|
17
17
|
return (_jsxs("div", { className: classNames("ajui-input-default ajui-icon-input corners--".concat(corners), className), style: style, ref: ref, children: [startIcon || null, _jsx("input", __assign({}, inputProps, { className: classNames("ajui-input-base corners--".concat(corners), inputProps === null || inputProps === void 0 ? void 0 : inputProps.className) })), endIcon || null] }));
|
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import { forwardRef } from "react";
|
|
25
|
-
import
|
|
25
|
+
import classNames from "../../functions/classNames";
|
|
26
26
|
var Input = forwardRef(function (_a, ref) {
|
|
27
27
|
var className = _a.className, _b = _a.corners, corners = _b === void 0 ? "rounded" : _b, props = __rest(_a, ["className", "corners"]);
|
|
28
28
|
return (_jsx("input", __assign({}, props, { ref: ref, className: classNames("ajui-input-base ajui-input-default corners--".concat(corners), className) })));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CornerType } from "../../
|
|
2
|
+
import { CornerType } from "../../types";
|
|
3
3
|
type TextAreaProps = React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement> & {
|
|
4
4
|
/**
|
|
5
5
|
* Type of corners on the text area
|
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import { forwardRef } from "react";
|
|
25
|
-
import
|
|
25
|
+
import classNames from "../../functions/classNames";
|
|
26
26
|
var TextArea = forwardRef(function (_a, ref) {
|
|
27
27
|
var className = _a.className, _b = _a.rows, rows = _b === void 0 ? 3 : _b, _c = _a.corners, corners = _c === void 0 ? "rounded" : _c, props = __rest(_a, ["className", "rows", "corners"]);
|
|
28
28
|
return (_jsx("textarea", __assign({}, props, { ref: ref, className: classNames("ajui-input-base ajui-input-default corners--".concat(corners), className), rows: rows })));
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import React, { useEffect } from "react";
|
|
14
14
|
import { useFocusTrap, useScrollLock } from "../../hooks";
|
|
15
|
-
import
|
|
15
|
+
import classNames from "../../functions/classNames";
|
|
16
16
|
var BaseLayer = function (_a) {
|
|
17
17
|
var onClose = _a.onClose, children = _a.children, style = _a.style, className = _a.className, _b = _a.disableEscape, disableEscape = _b === void 0 ? false : _b, visible = _a.visible;
|
|
18
18
|
var focusRef = useFocusTrap(visible);
|
package/components/Link/Link.js
CHANGED
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
24
|
import { forwardRef } from "react";
|
|
25
|
-
import
|
|
25
|
+
import classNames from "../../functions/classNames";
|
|
26
26
|
var DefaultLinkElement = forwardRef(function (_a, ref) {
|
|
27
27
|
var to = _a.to, props = __rest(_a, ["to"]);
|
|
28
28
|
return _jsx("a", __assign({}, props, { href: to, ref: ref }));
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { CornerType } from "../../
|
|
2
|
+
import { CornerType } from "../../types";
|
|
3
3
|
type Props = Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "aria-label"> & {
|
|
4
4
|
/**
|
|
5
5
|
* Array of options to display in the select
|
|
@@ -22,7 +22,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
22
22
|
};
|
|
23
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
24
|
import { forwardRef } from "react";
|
|
25
|
-
import
|
|
25
|
+
import classNames from "../../functions/classNames";
|
|
26
26
|
var identity = function (x) { return x; };
|
|
27
27
|
var Select = function (_a, ref) {
|
|
28
28
|
var className = _a.className, options = _a.options, _b = _a.getOptionValue, getOptionValue = _b === void 0 ? identity : _b, _c = _a.getOptionLabel, getOptionLabel = _c === void 0 ? identity : _c, _d = _a.corners, corners = _d === void 0 ? "rounded" : _d, style = _a.style, innerStyle = _a.innerStyle, innerClassName = _a.innerClassName, disabled = _a.disabled, props = __rest(_a, ["className", "options", "getOptionValue", "getOptionLabel", "corners", "style", "innerStyle", "innerClassName", "disabled"]);
|
|
@@ -21,7 +21,7 @@ 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
|
|
24
|
+
import classNames from "../../functions/classNames";
|
|
25
25
|
var Spinner = function (_a) {
|
|
26
26
|
var className = _a.className, props = __rest(_a, ["className"]);
|
|
27
27
|
return (
|
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* Reduce a list of classnames into one string
|
|
3
3
|
*
|
|
4
4
|
* @param classNames list of class names to concatenate
|
|
5
|
-
* @returns
|
|
5
|
+
* @returns single aggregated string of classnames
|
|
6
6
|
*/
|
|
7
|
-
export function classNames() {
|
|
7
|
+
export default function classNames() {
|
|
8
8
|
var classNames = [];
|
|
9
9
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
10
10
|
classNames[_i] = arguments[_i];
|
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -302,7 +302,7 @@ a {
|
|
|
302
302
|
|
|
303
303
|
.ajui-select-disabled {
|
|
304
304
|
opacity: var(--ajui-disabled-opacity);
|
|
305
|
-
cursor: not-allowed;
|
|
305
|
+
cursor: not-allowed !important;
|
|
306
306
|
}
|
|
307
307
|
|
|
308
308
|
.ajui-select-base {
|
|
@@ -310,6 +310,7 @@ a {
|
|
|
310
310
|
color: inherit;
|
|
311
311
|
outline: 0px solid transparent;
|
|
312
312
|
border: none;
|
|
313
|
+
cursor: pointer;
|
|
313
314
|
background-color: inherit;
|
|
314
315
|
padding: 0.75rem 1.75rem 0.75rem 0.5rem;
|
|
315
316
|
font-size: 1rem;
|
package/utils/util.d.ts
DELETED
|
File without changes
|
|
File without changes
|