@uxf/ui 11.90.0 → 11.91.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/checkbox/checkbox.js +1 -1
- package/chip/chip.js +1 -1
- package/color-radio/color-radio.d.ts +2 -2
- package/color-radio/color-radio.js +1 -1
- package/color-radio-group/color-radio-group.d.ts +2 -2
- package/dropzone/dropzone-list.d.ts +1 -1
- package/dropzone/dropzone-list.js +10 -10
- package/flash-messages/flash-messages.js +1 -1
- package/multi-combobox/types.d.ts +1 -1
- package/package.json +4 -4
- package/radio/radio.js +1 -1
package/checkbox/checkbox.js
CHANGED
|
@@ -49,7 +49,7 @@ exports.Checkbox = (0, react_1.forwardRef)((props, ref) => {
|
|
|
49
49
|
"aria-invalid": props.isInvalid,
|
|
50
50
|
"aria-readonly": props.isReadOnly,
|
|
51
51
|
"aria-required": props.isRequired,
|
|
52
|
-
className: (0, cx_1.cx)("uxf-checkbox", `uxf-checkbox--size-${(_a = props.size) !== null && _a !== void 0 ? _a : "default"}`, props.className, props.indeterminate && classes_1.CLASSES.IS_INDETERMINATE
|
|
52
|
+
className: (0, cx_1.cx)("uxf-checkbox", `uxf-checkbox--size-${(_a = props.size) !== null && _a !== void 0 ? _a : "default"}`, props.className, props.indeterminate && `uxf-checkbox--${classes_1.CLASSES.IS_INDETERMINATE} ${classes_1.CLASSES.IS_INDETERMINATE}`, props.isDisabled && `uxf-checkbox--${classes_1.CLASSES.IS_DISABLED} ${classes_1.CLASSES.IS_DISABLED}`, props.isFocused && `uxf-checkbox--${classes_1.CLASSES.IS_FOCUSED} ${classes_1.CLASSES.IS_FOCUSED}`, props.isInvalid && `uxf-checkbox--${classes_1.CLASSES.IS_INVALID} ${classes_1.CLASSES.IS_INVALID}`, props.isReadOnly && `uxf-checkbox--${classes_1.CLASSES.IS_READONLY} ${classes_1.CLASSES.IS_READONLY}`, props.value && `uxf-checkbox--${classes_1.CLASSES.IS_SELECTED} ${classes_1.CLASSES.IS_SELECTED}`),
|
|
53
53
|
id: props.id,
|
|
54
54
|
onBlur: props.onBlur,
|
|
55
55
|
onClick: onChange,
|
package/chip/chip.js
CHANGED
|
@@ -59,7 +59,7 @@ exports.Chip = (0, react_1.forwardRef)((props, ref) => {
|
|
|
59
59
|
const chipClassName = (0, cx_1.cx)("uxf-chip", `uxf-chip--color-${(_a = props.color) !== null && _a !== void 0 ? _a : "default"}`, `uxf-chip--size-${(_b = props.size) !== null && _b !== void 0 ? _b : "default"}`, `uxf-chip--variant-${(_c = props.variant) !== null && _c !== void 0 ? _c : "default"}`, (0, is_not_nil_1.isNotNil)(onClose) && "has-button", className);
|
|
60
60
|
const Component = as;
|
|
61
61
|
const anchorProps = (0, use_anchor_props_1.useAnchorProps)({
|
|
62
|
-
className:
|
|
62
|
+
className: chipClassName,
|
|
63
63
|
tabIndex: suppressFocus ? -1 : tabIndex,
|
|
64
64
|
...restProps,
|
|
65
65
|
});
|
|
@@ -4,9 +4,9 @@ export interface ColorRadioProps<ValueType = string | number> extends Omit<FormC
|
|
|
4
4
|
checked: boolean;
|
|
5
5
|
className?: string;
|
|
6
6
|
color: HexColor;
|
|
7
|
-
colorLabel:
|
|
7
|
+
colorLabel: ReactNode;
|
|
8
8
|
onChange?: (value: ValueType) => void;
|
|
9
|
-
renderContent?: (className: string, checked: boolean | undefined, colorLabel:
|
|
9
|
+
renderContent?: (className: string, checked: boolean | undefined, colorLabel: ReactNode, value: ValueType) => ReactNode;
|
|
10
10
|
style?: CSSProperties;
|
|
11
11
|
}
|
|
12
12
|
export declare const ColorRadio: React.ForwardRefExoticComponent<ColorRadioProps<string | number> & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -61,7 +61,7 @@ exports.ColorRadio = (0, react_1.forwardRef)((props, ref) => {
|
|
|
61
61
|
"aria-invalid": props.isInvalid,
|
|
62
62
|
"aria-readonly": props.isReadOnly,
|
|
63
63
|
"aria-required": props.isRequired,
|
|
64
|
-
className: (0, cx_1.cx)("uxf-color-radio", props.isDisabled && classes_1.CLASSES.IS_DISABLED
|
|
64
|
+
className: (0, cx_1.cx)("uxf-color-radio", props.isDisabled && `uxf-color-radio--${classes_1.CLASSES.IS_DISABLED} ${classes_1.CLASSES.IS_DISABLED}`, props.isFocused && `uxf-color-radio--${classes_1.CLASSES.IS_FOCUSED} ${classes_1.CLASSES.IS_FOCUSED}`, props.isInvalid && `uxf-color-radio--${classes_1.CLASSES.IS_INVALID} ${classes_1.CLASSES.IS_INVALID}`, props.isReadOnly && `uxf-color-radio--${classes_1.CLASSES.IS_READONLY} ${classes_1.CLASSES.IS_READONLY}`, props.checked && `uxf-color-radio--${classes_1.CLASSES.IS_SELECTED} ${classes_1.CLASSES.IS_SELECTED}`, props.className),
|
|
65
65
|
onBlur: props.onBlur,
|
|
66
66
|
onClick,
|
|
67
67
|
onFocus: props.onFocus,
|
|
@@ -3,7 +3,7 @@ import { FormControlProps, HexColor } from "../types";
|
|
|
3
3
|
export type ColorRadioGroupOptionValue = HexColor;
|
|
4
4
|
export interface ColorRadioGroupOption {
|
|
5
5
|
disabled?: boolean;
|
|
6
|
-
label:
|
|
6
|
+
label: ReactNode;
|
|
7
7
|
value: ColorRadioGroupOptionValue;
|
|
8
8
|
}
|
|
9
9
|
export interface ColorRadioGroupProps extends FormControlProps<ColorRadioGroupOptionValue | null> {
|
|
@@ -11,7 +11,7 @@ export interface ColorRadioGroupProps extends FormControlProps<ColorRadioGroupOp
|
|
|
11
11
|
helperText?: ReactNode;
|
|
12
12
|
hiddenLabel?: boolean;
|
|
13
13
|
id?: string;
|
|
14
|
-
label:
|
|
14
|
+
label: ReactNode;
|
|
15
15
|
options: ColorRadioGroupOption[];
|
|
16
16
|
style?: CSSProperties;
|
|
17
17
|
}
|
|
@@ -6,7 +6,7 @@ export interface DropzoneListProps extends FormControlProps<DropzoneFile[] | und
|
|
|
6
6
|
errorText?: string;
|
|
7
7
|
isDownloadableOnClick?: boolean;
|
|
8
8
|
onRemoveConfirm?: (file: DropzoneFile) => Promise<boolean>;
|
|
9
|
-
renderItem?: (file: DropzoneFile) => ReactNode;
|
|
9
|
+
renderItem?: (file: DropzoneFile, onRemove: (file: DropzoneFile, isUploading: boolean) => void, isUploading: boolean) => ReactNode;
|
|
10
10
|
style?: CSSProperties;
|
|
11
11
|
}
|
|
12
12
|
export declare function DropzoneList(props: DropzoneListProps): React.JSX.Element | null;
|
|
@@ -48,23 +48,23 @@ const get_file_icon_1 = require("../utils/files/get-file-icon");
|
|
|
48
48
|
function DropzoneList(props) {
|
|
49
49
|
var _a, _b, _c;
|
|
50
50
|
const context = (0, react_1.useContext)(context_1.UiContext);
|
|
51
|
-
const handleRemove = (file, value, isUploading) => {
|
|
52
|
-
var _a;
|
|
53
|
-
if (isUploading) {
|
|
54
|
-
(_a = file.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
55
|
-
}
|
|
56
|
-
props.onChange(value.filter((f) => f.id !== file.id));
|
|
57
|
-
};
|
|
58
51
|
const onRemove = (file, isUploading) => () => {
|
|
59
52
|
if (!props.value) {
|
|
60
53
|
return;
|
|
61
54
|
}
|
|
55
|
+
const handleRemove = (value) => {
|
|
56
|
+
var _a;
|
|
57
|
+
if (isUploading) {
|
|
58
|
+
(_a = file.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
59
|
+
}
|
|
60
|
+
props.onChange(value.filter((f) => f.id !== file.id));
|
|
61
|
+
};
|
|
62
62
|
if (!props.onRemoveConfirm) {
|
|
63
|
-
return handleRemove(
|
|
63
|
+
return handleRemove(props.value);
|
|
64
64
|
}
|
|
65
65
|
props.onRemoveConfirm(file).then((canRemove) => {
|
|
66
66
|
if (canRemove && props.value) {
|
|
67
|
-
return handleRemove(
|
|
67
|
+
return handleRemove(props.value);
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
};
|
|
@@ -74,7 +74,7 @@ function DropzoneList(props) {
|
|
|
74
74
|
return (react_1.default.createElement("ul", { className: `uxf-dropzone-list ${(_b = props.className) !== null && _b !== void 0 ? _b : ""}`, style: props.style }, (_c = props.value) === null || _c === void 0 ? void 0 : _c.map((file) => {
|
|
75
75
|
var _a, _b, _c;
|
|
76
76
|
const isUploading = file.id < 0 && !file.error;
|
|
77
|
-
return ((_b = (_a = props.renderItem) === null || _a === void 0 ? void 0 : _a.call(props, file)) !== null && _b !== void 0 ? _b : (react_1.default.createElement("li", { className: "uxf-dropzone-list__item-wrapper", key: file.id },
|
|
77
|
+
return ((_b = (_a = props.renderItem) === null || _a === void 0 ? void 0 : _a.call(props, file, onRemove, isUploading)) !== null && _b !== void 0 ? _b : (react_1.default.createElement("li", { className: "uxf-dropzone-list__item-wrapper", key: file.id },
|
|
78
78
|
react_1.default.createElement("div", { className: (0, cx_1.cx)("uxf-dropzone-list__item", Boolean(file.error) && classes_1.CLASSES.IS_INVALID) },
|
|
79
79
|
react_1.default.createElement("div", { className: "uxf-dropzone-list__item__block" },
|
|
80
80
|
react_1.default.createElement(icon_1.Icon, { className: "uxf-dropzone-list__item__block__icon", name: (0, get_file_icon_1.getIconNameFromFileExtension)(file.extension.toLowerCase()) }),
|
|
@@ -96,7 +96,7 @@ exports.FlashMessages = (0, react_2.forwardRef)((props, ref) => {
|
|
|
96
96
|
}), []);
|
|
97
97
|
const dismissableContainerRef = (0, react_2.useRef)(null);
|
|
98
98
|
const clickableProps = (0, use_clickable_props_1.useClickableProps)({
|
|
99
|
-
className: `uxf-flash-messages__dismissable ${isCollapsed ? "is-collapsed" : "is-expanded"}`,
|
|
99
|
+
className: `uxf-flash-messages__dismissable ${isCollapsed ? "uxf-flash-messages__dismissable--is-collapsed is-collapsed" : "uxf-flash-messages__dismissable--is-expanded is-expanded"}`,
|
|
100
100
|
onMouseEnter: () => setIsCollapsed(false),
|
|
101
101
|
onMouseLeave: () => {
|
|
102
102
|
// scroll back down in case of having too many flash messages and scrolled up
|
|
@@ -28,7 +28,7 @@ export interface MultiComboboxProps<ValueId = MultiComboboxValueId, Option = Mul
|
|
|
28
28
|
id?: string;
|
|
29
29
|
inputArrow?: (open: boolean) => ReactNode;
|
|
30
30
|
keyExtractor?: (option: Option) => string | number;
|
|
31
|
-
label:
|
|
31
|
+
label: ReactNode;
|
|
32
32
|
leftAddon?: ReactNode;
|
|
33
33
|
leftElement?: ReactNode;
|
|
34
34
|
loadOptions?: (query: string) => Promise<Option[]>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/ui",
|
|
3
|
-
"version": "11.
|
|
3
|
+
"version": "11.91.0",
|
|
4
4
|
"description": "",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -23,10 +23,10 @@
|
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@floating-ui/react": "0.27.16",
|
|
25
25
|
"@headlessui/react": "1.7.19",
|
|
26
|
-
"@uxf/core": "11.
|
|
27
|
-
"@uxf/core-react": "11.
|
|
26
|
+
"@uxf/core": "11.91.0",
|
|
27
|
+
"@uxf/core-react": "11.91.0",
|
|
28
28
|
"@uxf/datepicker": "11.90.0",
|
|
29
|
-
"@uxf/styles": "11.
|
|
29
|
+
"@uxf/styles": "11.91.0",
|
|
30
30
|
"color2k": "2.0.3",
|
|
31
31
|
"dayjs": "1.11.19",
|
|
32
32
|
"react-dropzone": "14.3.8"
|
package/radio/radio.js
CHANGED
|
@@ -49,7 +49,7 @@ exports.Radio = (0, react_1.forwardRef)((props, ref) => {
|
|
|
49
49
|
"aria-invalid": props.isInvalid,
|
|
50
50
|
"aria-readonly": props.isReadOnly,
|
|
51
51
|
"aria-required": props.isRequired,
|
|
52
|
-
className: (0, cx_1.cx)("uxf-radio", `uxf-radio--size-${(_a = props.size) !== null && _a !== void 0 ? _a : "default"}`, props.isDisabled && classes_1.CLASSES.IS_DISABLED
|
|
52
|
+
className: (0, cx_1.cx)("uxf-radio", `uxf-radio--size-${(_a = props.size) !== null && _a !== void 0 ? _a : "default"}`, props.isDisabled && `uxf-radio--${classes_1.CLASSES.IS_DISABLED} ${classes_1.CLASSES.IS_DISABLED}`, props.isFocused && `uxf-radio--${classes_1.CLASSES.IS_FOCUSED} ${classes_1.CLASSES.IS_FOCUSED}`, props.isInvalid && `uxf-radio--${classes_1.CLASSES.IS_INVALID} ${classes_1.CLASSES.IS_INVALID}`, props.isReadOnly && `uxf-radio--${classes_1.CLASSES.IS_READONLY} ${classes_1.CLASSES.IS_READONLY}`, props.checked && `uxf-radio--${classes_1.CLASSES.IS_SELECTED} ${classes_1.CLASSES.IS_SELECTED}`, props.className),
|
|
53
53
|
onBlur: props.onBlur,
|
|
54
54
|
onClick,
|
|
55
55
|
onFocus: props.onFocus,
|