@luscii-healthtech/web-ui 2.31.0 → 2.32.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/Form/form.types.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +2 -0
- package/dist/components/Select/SelectV2.d.ts +2 -0
- package/dist/web-ui-tailwind.css +12 -0
- package/dist/web-ui.cjs.development.js +22 -5
- package/dist/web-ui.cjs.development.js.map +1 -1
- package/dist/web-ui.cjs.production.min.js +1 -1
- package/dist/web-ui.cjs.production.min.js.map +1 -1
- package/dist/web-ui.esm.js +22 -5
- package/dist/web-ui.esm.js.map +1 -1
- package/package.json +1 -1
|
@@ -6,6 +6,7 @@ import { SelectProps } from "../Select/SelectV2";
|
|
|
6
6
|
import { ImagePickerProps } from "../ImagePicker/ImagePicker";
|
|
7
7
|
import { PartialProperties } from "../../types/general.types";
|
|
8
8
|
export declare type AllowedTextInputTypes = Extract<HTMLInputTypeAttribute, "email" | "number" | "password" | "text">;
|
|
9
|
+
export declare type FormFieldWidth = "sm" | "md" | "lg" | "xl" | "full";
|
|
9
10
|
export interface GenericFormProps<TFieldValues extends FieldValues> {
|
|
10
11
|
fields: FormFieldProps<TFieldValues>[];
|
|
11
12
|
onValid: SubmitHandler<TFieldValues>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { AllowedTextInputTypes } from "../Form/form.types";
|
|
3
3
|
import { IconProps } from "../Icons/types/IconProps.type";
|
|
4
|
+
import { FormFieldWidth } from "../Form/form.types";
|
|
4
5
|
import "./Input.css";
|
|
5
6
|
export declare const INPUT_TYPES: Record<string, AllowedTextInputTypes>;
|
|
6
7
|
/**
|
|
@@ -27,6 +28,7 @@ export interface InputProps extends CustomHTMLInputProps {
|
|
|
27
28
|
withPrefix?: string;
|
|
28
29
|
withSuffix?: string;
|
|
29
30
|
icon?: React.VoidFunctionComponent<IconProps>;
|
|
31
|
+
width?: FormFieldWidth;
|
|
30
32
|
/**
|
|
31
33
|
* Check the `asFormField` prop of this component to understand why this signature.
|
|
32
34
|
*/
|
|
@@ -8,12 +8,14 @@ import React from "react";
|
|
|
8
8
|
* bundle the svg assets used here, and we end up with some broken style.
|
|
9
9
|
*/
|
|
10
10
|
import "./Select.scss";
|
|
11
|
+
import { FormFieldWidth } from "../Form/form.types";
|
|
11
12
|
interface OptionMinimal {
|
|
12
13
|
value: any;
|
|
13
14
|
label?: string;
|
|
14
15
|
}
|
|
15
16
|
export interface SelectProps<Option extends OptionMinimal = OptionMinimal, IsMulti extends boolean = any, Group extends GroupBase<Option> = GroupBase<Option>> extends Props<Option, IsMulti, Group> {
|
|
16
17
|
isError?: boolean;
|
|
18
|
+
width?: FormFieldWidth;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* A wrapper around react-select to style it according to our design specification.
|
package/dist/web-ui-tailwind.css
CHANGED
|
@@ -2182,14 +2182,26 @@ video {
|
|
|
2182
2182
|
width: 3rem;
|
|
2183
2183
|
}
|
|
2184
2184
|
|
|
2185
|
+
.w-16 {
|
|
2186
|
+
width: 4rem;
|
|
2187
|
+
}
|
|
2188
|
+
|
|
2185
2189
|
.w-24 {
|
|
2186
2190
|
width: 6rem;
|
|
2187
2191
|
}
|
|
2188
2192
|
|
|
2193
|
+
.w-32 {
|
|
2194
|
+
width: 8rem;
|
|
2195
|
+
}
|
|
2196
|
+
|
|
2189
2197
|
.w-36 {
|
|
2190
2198
|
width: 9rem;
|
|
2191
2199
|
}
|
|
2192
2200
|
|
|
2201
|
+
.w-56 {
|
|
2202
|
+
width: 14rem;
|
|
2203
|
+
}
|
|
2204
|
+
|
|
2193
2205
|
.w-60 {
|
|
2194
2206
|
width: 15rem;
|
|
2195
2207
|
}
|
|
@@ -1358,7 +1358,7 @@ var SearchIcon = function SearchIcon(props) {
|
|
|
1358
1358
|
var css_248z$5 = ".input::-ms-clear {\n display: none;\n}";
|
|
1359
1359
|
styleInject(css_248z$5);
|
|
1360
1360
|
|
|
1361
|
-
var _excluded$3 = ["withSuffix", "withPrefix", "className", "clearable", "type", "isDisabled", "icon", "name", "value", "onChange", "isError", "asFormField"];
|
|
1361
|
+
var _excluded$3 = ["withSuffix", "withPrefix", "className", "clearable", "type", "isDisabled", "width", "icon", "name", "value", "onChange", "isError", "asFormField"];
|
|
1362
1362
|
// Don't know why yet but it can be fixed later.
|
|
1363
1363
|
|
|
1364
1364
|
var INPUT_TYPES = {
|
|
@@ -1379,6 +1379,8 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
1379
1379
|
type = _ref$type === void 0 ? "text" : _ref$type,
|
|
1380
1380
|
_ref$isDisabled = _ref.isDisabled,
|
|
1381
1381
|
isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled,
|
|
1382
|
+
_ref$width = _ref.width,
|
|
1383
|
+
width = _ref$width === void 0 ? "full" : _ref$width,
|
|
1382
1384
|
icon = _ref.icon,
|
|
1383
1385
|
name = _ref.name,
|
|
1384
1386
|
_ref$value = _ref.value,
|
|
@@ -1457,7 +1459,13 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (_ref, ref) {
|
|
|
1457
1459
|
size: otherProps.maxLength,
|
|
1458
1460
|
type: type,
|
|
1459
1461
|
disabled: isDisabled,
|
|
1460
|
-
className: classNames("input", "block",
|
|
1462
|
+
className: classNames("input", "block", {
|
|
1463
|
+
"w-16": width === "sm",
|
|
1464
|
+
"w-32": width === "md",
|
|
1465
|
+
"w-56": width === "lg",
|
|
1466
|
+
"w-80": width === "xl",
|
|
1467
|
+
"flex-grow": width === "full"
|
|
1468
|
+
}, {
|
|
1461
1469
|
"pl-12": icon,
|
|
1462
1470
|
"pr-11": clearable
|
|
1463
1471
|
}, {
|
|
@@ -1496,6 +1504,7 @@ var SearchInput = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
1496
1504
|
return /*#__PURE__*/React__default.createElement(Input, _extends({}, props, {
|
|
1497
1505
|
icon: SearchIcon,
|
|
1498
1506
|
type: "text",
|
|
1507
|
+
width: "xl",
|
|
1499
1508
|
clearable: true,
|
|
1500
1509
|
ref: ref
|
|
1501
1510
|
}));
|
|
@@ -5404,7 +5413,7 @@ function SectionItemWithContent(props) {
|
|
|
5404
5413
|
}));
|
|
5405
5414
|
}
|
|
5406
5415
|
|
|
5407
|
-
var _excluded$j = ["isError", "styles", "options", "onChange", "value", "isMulti", "className"];
|
|
5416
|
+
var _excluded$j = ["isError", "styles", "options", "onChange", "value", "width", "isMulti", "className"];
|
|
5408
5417
|
|
|
5409
5418
|
function generateCustomStyles$1(hasError, isIE11) {
|
|
5410
5419
|
return {
|
|
@@ -5452,7 +5461,7 @@ function generateCustomStyles$1(hasError, isIE11) {
|
|
|
5452
5461
|
"&:hover": {
|
|
5453
5462
|
borderColor: "#9CA3AF",
|
|
5454
5463
|
// selector for the chevron
|
|
5455
|
-
|
|
5464
|
+
'> [class*="IndicatorsContainer"]': {
|
|
5456
5465
|
opacity: 1
|
|
5457
5466
|
}
|
|
5458
5467
|
}
|
|
@@ -5507,6 +5516,8 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef) {
|
|
|
5507
5516
|
options = _ref.options,
|
|
5508
5517
|
onChange = _ref.onChange,
|
|
5509
5518
|
value = _ref.value,
|
|
5519
|
+
_ref$width = _ref.width,
|
|
5520
|
+
width = _ref$width === void 0 ? "full" : _ref$width,
|
|
5510
5521
|
isMulti = _ref.isMulti,
|
|
5511
5522
|
className = _ref.className,
|
|
5512
5523
|
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$j);
|
|
@@ -5544,7 +5555,13 @@ var Select = /*#__PURE__*/React__default.forwardRef(function (_ref, innerRef) {
|
|
|
5544
5555
|
onChange: onChangeWrapped,
|
|
5545
5556
|
value: valueWrapped,
|
|
5546
5557
|
isMulti: isMulti,
|
|
5547
|
-
className: classNames("customized-select", className
|
|
5558
|
+
className: classNames("customized-select", className, {
|
|
5559
|
+
"w-16": width === "sm",
|
|
5560
|
+
"w-32": width === "md",
|
|
5561
|
+
"w-56": width === "lg",
|
|
5562
|
+
"w-80": width === "xl",
|
|
5563
|
+
"flex-grow": width === "full"
|
|
5564
|
+
})
|
|
5548
5565
|
}));
|
|
5549
5566
|
});
|
|
5550
5567
|
|