@luscii-healthtech/web-ui 15.1.1 → 16.0.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/dist/components/Input/Input.d.ts +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.development.js +50 -49
- package/dist/index.development.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/web-ui.esm.js +1 -1
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,6 @@ import { AllowedTextInputTypes } from "../Form/form.types";
|
|
|
3
3
|
import type { IconKey, IconProps } from "../Icons/types/IconProps.type";
|
|
4
4
|
import { FormFieldWidth } from "../Form/form.types";
|
|
5
5
|
import "./Input.css";
|
|
6
|
-
export declare const INPUT_TYPES: Record<string, AllowedTextInputTypes>;
|
|
7
6
|
/**
|
|
8
7
|
* It's very complicated to tap into the onChange events of inputs,
|
|
9
8
|
* so I omit the type it requires and add a easier one to deal with.
|
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export { default as DatePicker } from "./components/Datepicker/Datepicker";
|
|
|
23
23
|
export { default as Dropdown } from "./components/Dropdown/Dropdown";
|
|
24
24
|
export { EmptyListMessage } from "./components/EmptyListMessage/EmptyListMessage";
|
|
25
25
|
export { InfoField } from "./components/InfoField/InfoField";
|
|
26
|
-
export {
|
|
26
|
+
export { default as Input } from "./components/Input/Input";
|
|
27
27
|
export { default as Line } from "./components/Line/Line";
|
|
28
28
|
export { Table, TableProps } from "./components/Table/Table";
|
|
29
29
|
export { TableFieldConfig, TableFieldContent, TableFieldText, TableFieldAction, } from "./components/Table/Table.types";
|
|
@@ -1351,12 +1351,6 @@ const List = (props) => {
|
|
|
1351
1351
|
var css_248z$h = ".input::-ms-clear {\n display: none;\n}";
|
|
1352
1352
|
styleInject(css_248z$h);
|
|
1353
1353
|
|
|
1354
|
-
const INPUT_TYPES = {
|
|
1355
|
-
EMAIL: "email",
|
|
1356
|
-
NUMBER: "number",
|
|
1357
|
-
PASSWORD: "password",
|
|
1358
|
-
TEXT: "text"
|
|
1359
|
-
};
|
|
1360
1354
|
const Input = React__namespace.default.forwardRef((_a, ref) => {
|
|
1361
1355
|
var { withSuffix = "", withPrefix = "", className, clearable = false, type = "text", isDisabled = false, width = "full", icon, name, value = "", onChange, isError, asFormField } = _a, otherProps = __rest(_a, ["withSuffix", "withPrefix", "className", "clearable", "type", "isDisabled", "width", "icon", "name", "value", "onChange", "isError", "asFormField"]);
|
|
1362
1356
|
const hasNoExtraContent = withPrefix === "" && withSuffix === "";
|
|
@@ -1393,54 +1387,62 @@ const Input = React__namespace.default.forwardRef((_a, ref) => {
|
|
|
1393
1387
|
const isClearIconVisible = clearable && innerValue;
|
|
1394
1388
|
return React__namespace.default.createElement(
|
|
1395
1389
|
FlexRow,
|
|
1396
|
-
{ spacing: "none", "data-test-id": "input-component-container",
|
|
1390
|
+
{ spacing: "none", "data-test-id": "input-component-container", stretch: false },
|
|
1397
1391
|
React__namespace.default.createElement("span", { className: classNames__default.default("ui-h-11 ui-border-b ui-border-t ui-border-solid ui-border-input-border", {
|
|
1398
1392
|
"ui-hidden": hasNoExtraContent,
|
|
1399
|
-
"ui-order-1":
|
|
1400
|
-
"ui-order-2": withSuffix !== "",
|
|
1393
|
+
"ui-order-1": withSuffix !== "",
|
|
1401
1394
|
"ui-rounded-l ui-border-l": withPrefix !== "",
|
|
1402
1395
|
"ui-rounded-r ui-border-r": withSuffix !== ""
|
|
1403
1396
|
}, "ui-flex ui-flex-col ui-items-center ui-p-3", "ui-text-sm", "ui-text-slate-500", "ui-bg-main-background") }, withSuffix || withPrefix),
|
|
1404
|
-
icon && React__namespace.default.createElement(
|
|
1405
|
-
"div",
|
|
1406
|
-
{ className: "ui-absolute ui-left-4 ui-top-1/2", style: {
|
|
1407
|
-
transform: "translateY(-50%)"
|
|
1408
|
-
} },
|
|
1409
|
-
React__namespace.default.createElement(IconComponentOrKey, { name: icon, className: "ui-h-6 ui-w-6 ui-text-slate-300" })
|
|
1410
|
-
),
|
|
1411
|
-
React__namespace.default.createElement("input", Object.assign({ "data-test-id": `input-${name}` }, otherProps, { name, value: innerValue, onChange: handleChangeEvent, ref, size: otherProps.maxLength, type, disabled: isDisabled, className: classNames__default.default("input", "ui-block", {
|
|
1412
|
-
"ui-w-16": width === "sm",
|
|
1413
|
-
"ui-w-32": width === "md",
|
|
1414
|
-
"ui-w-56": width === "lg",
|
|
1415
|
-
"ui-w-80": width === "xl",
|
|
1416
|
-
"ui-flex-grow": width === "full"
|
|
1417
|
-
}, { "ui-pl-12": icon, "ui-pr-11": clearable }, {
|
|
1418
|
-
"ui-bg-slate-50 ui-text-slate-400": isDisabled,
|
|
1419
|
-
"ui-text-slate-800": !isDisabled,
|
|
1420
|
-
"ui-border-input-border": !isDisabled && !isError,
|
|
1421
|
-
"hover:ui-border-input-border-dark": !isDisabled,
|
|
1422
|
-
"ui-border-red-700": isError,
|
|
1423
|
-
"focus:ui-outline-negative": isError,
|
|
1424
|
-
"focus:ui-border-blue-800": !isError,
|
|
1425
|
-
"focus:ui-outline-primary": !isError,
|
|
1426
|
-
"ui-bg-white": !isDisabled
|
|
1427
|
-
}, "ui-h-11", "ui-p-2", "ui-border", "ui-text-sm", "ui-placeholder-slate-500", "ui-border-solid", "ui-transition-colors", "ui-duration-300", {
|
|
1428
|
-
"ui-z-10": withSuffix !== "" || withPrefix !== "",
|
|
1429
|
-
"ui-rounded": hasNoExtraContent,
|
|
1430
|
-
"ui-rounded-l": withSuffix !== "",
|
|
1431
|
-
"ui-rounded-r": withPrefix !== "",
|
|
1432
|
-
"ui-order-2": withPrefix !== "",
|
|
1433
|
-
"ui-order-1": withSuffix !== ""
|
|
1434
|
-
}, "ui-shadow-default", className) })),
|
|
1435
1397
|
React__namespace.default.createElement(
|
|
1436
1398
|
"div",
|
|
1437
|
-
{ className: "ui-
|
|
1438
|
-
|
|
1439
|
-
} },
|
|
1440
|
-
React__namespace.default.createElement(
|
|
1441
|
-
"
|
|
1442
|
-
"ui-
|
|
1443
|
-
|
|
1399
|
+
{ className: classNames__default.default("ui-relative", {
|
|
1400
|
+
"ui-flex ui-flex-grow": width === "full"
|
|
1401
|
+
}) },
|
|
1402
|
+
icon && React__namespace.default.createElement(
|
|
1403
|
+
"div",
|
|
1404
|
+
{ className: classNames__default.default("ui-absolute ui-left-4 ui-top-1/2", {
|
|
1405
|
+
"ui-flex-grow": width === "full"
|
|
1406
|
+
}), style: {
|
|
1407
|
+
transform: "translateY(-50%)",
|
|
1408
|
+
zIndex: 20
|
|
1409
|
+
} },
|
|
1410
|
+
React__namespace.default.createElement(IconComponentOrKey, { name: icon, className: "ui-h-6 ui-w-6 ui-text-slate-300" })
|
|
1411
|
+
),
|
|
1412
|
+
React__namespace.default.createElement("input", Object.assign({ "data-test-id": `input-${name}` }, otherProps, { name, value: innerValue, onChange: handleChangeEvent, ref, size: otherProps.maxLength, type, disabled: isDisabled, className: classNames__default.default("input", "ui-block", {
|
|
1413
|
+
"ui-w-16": width === "sm",
|
|
1414
|
+
"ui-w-32": width === "md",
|
|
1415
|
+
"ui-w-56": width === "lg",
|
|
1416
|
+
"ui-w-80": width === "xl",
|
|
1417
|
+
"ui-flex-grow": width === "full"
|
|
1418
|
+
}, { "ui-pl-12": icon, "ui-pr-11": clearable }, {
|
|
1419
|
+
"ui-bg-slate-50 ui-text-slate-400": isDisabled,
|
|
1420
|
+
"ui-text-slate-800": !isDisabled,
|
|
1421
|
+
"ui-border-input-border": !isDisabled && !isError,
|
|
1422
|
+
"hover:ui-border-input-border-dark": !isDisabled,
|
|
1423
|
+
"ui-border-red-700": isError,
|
|
1424
|
+
"focus:ui-outline-negative": isError,
|
|
1425
|
+
"focus:ui-border-blue-800": !isError,
|
|
1426
|
+
"focus:ui-outline-primary": !isError,
|
|
1427
|
+
"ui-bg-white": !isDisabled
|
|
1428
|
+
}, "ui-h-11", "ui-p-2", "ui-border", "ui-text-sm", "ui-placeholder-slate-500", "ui-border-solid", "ui-transition-colors", "ui-duration-300", {
|
|
1429
|
+
"ui-z-10": withSuffix !== "" || withPrefix !== "",
|
|
1430
|
+
"ui-rounded": hasNoExtraContent,
|
|
1431
|
+
"ui-rounded-l": withSuffix !== "",
|
|
1432
|
+
"ui-rounded-r": withPrefix !== "",
|
|
1433
|
+
"ui-order-2": withPrefix !== "",
|
|
1434
|
+
"ui-order-1": withSuffix !== ""
|
|
1435
|
+
}, "ui-shadow-default", className) })),
|
|
1436
|
+
React__namespace.default.createElement(
|
|
1437
|
+
"div",
|
|
1438
|
+
{ className: "ui-absolute ui-right-0 ui-top-1/2", style: {
|
|
1439
|
+
transform: "translateY(-50%)"
|
|
1440
|
+
} },
|
|
1441
|
+
React__namespace.default.createElement(CrossIcon, { className: classNames__default.default("ui-mr-3 ui-h-6 ui-w-6 ui-cursor-pointer ui-text-slate-300", {
|
|
1442
|
+
"ui-block": isClearIconVisible,
|
|
1443
|
+
"ui-hidden": !isClearIconVisible
|
|
1444
|
+
}), onClick: clearField })
|
|
1445
|
+
)
|
|
1444
1446
|
)
|
|
1445
1447
|
);
|
|
1446
1448
|
});
|
|
@@ -1664,7 +1666,7 @@ const AccordionList = (_a) => {
|
|
|
1664
1666
|
"div",
|
|
1665
1667
|
{ className: "ui-flex ui-flex-col ui-space-y-4 ui-border-b ui-border-slate-200 ui-p-6" },
|
|
1666
1668
|
title && React__namespace.default.createElement(Title, { text: title, type: "sm" }),
|
|
1667
|
-
isSearchEnabled && React__namespace.default.createElement(SearchInput, {
|
|
1669
|
+
isSearchEnabled && React__namespace.default.createElement(SearchInput, { width: "full", value: searchString, placeholder: searchPlaceholder, onChange: (e) => {
|
|
1668
1670
|
setSearchString(typeof e === "string" ? e : e.currentTarget.value);
|
|
1669
1671
|
} }),
|
|
1670
1672
|
buttonProps && React__namespace.default.createElement(
|
|
@@ -5642,7 +5644,6 @@ exports.GroupColoredIcon = GroupColoredIcon;
|
|
|
5642
5644
|
exports.GroupIcon = GroupIcon;
|
|
5643
5645
|
exports.HamburgerIcon = HamburgerIcon;
|
|
5644
5646
|
exports.HeartIcon = HeartIcon;
|
|
5645
|
-
exports.INPUT_TYPES = INPUT_TYPES;
|
|
5646
5647
|
exports.Icon = Icon;
|
|
5647
5648
|
exports.Image = Image$1;
|
|
5648
5649
|
exports.ImageIcon = ImageIcon;
|