@uxf/ui 11.28.1 → 11.28.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.
- package/avatar-file-input/avatar-file-input.js +2 -2
- package/button/button.d.ts +0 -4
- package/button/button.js +1 -3
- package/button/button.stories.js +3 -3
- package/button-list/button-list.stories.js +1 -1
- package/date-picker/date-picker-month.js +2 -2
- package/date-picker/date-picker-year.js +2 -2
- package/date-range-picker/date-range-picker-month.js +2 -2
- package/date-range-picker/date-range-picker-year.js +2 -2
- package/icons-config.js +0 -20
- package/modal-dialog/modal-dialog.stories.js +4 -4
- package/package.json +1 -1
- package/text-input/text-input.stories.js +1 -1
|
@@ -63,7 +63,7 @@ exports.AvatarFileInput = (0, react_1.forwardRef)((props, ref) => {
|
|
|
63
63
|
onSelectFile,
|
|
64
64
|
onRemoveFile,
|
|
65
65
|
})) : (react_1.default.createElement("div", { className: "uxf-avatar-file-input__controls-buttons" },
|
|
66
|
-
react_1.default.createElement(button_1.Button, { className: "uxf-avatar-file-input__controls-button uxf-avatar-file-input__controls-button--select",
|
|
67
|
-
!!props.value && !props.isDisabled && (react_1.default.createElement(button_1.Button, { className: "uxf-avatar-file-input__controls-button uxf-avatar-file-input__controls-button--remove", color: "negative",
|
|
66
|
+
react_1.default.createElement(button_1.Button, { className: "uxf-avatar-file-input__controls-button uxf-avatar-file-input__controls-button--select", isDisabled: props.isDisabled, onClick: onSelectFile, size: "sm", variant: "secondary" }, (_e = props.selectFileLabel) !== null && _e !== void 0 ? _e : "Upload image"),
|
|
67
|
+
!!props.value && !props.isDisabled && (react_1.default.createElement(button_1.Button, { className: "uxf-avatar-file-input__controls-button uxf-avatar-file-input__controls-button--remove", color: "negative", isDisabled: props.isDisabled, onClick: onRemoveFile, size: "sm", variant: "secondary" }, (_f = props.removeFileLabel) !== null && _f !== void 0 ? _f : "Remove avatar"))))))));
|
|
68
68
|
});
|
|
69
69
|
exports.AvatarFileInput.displayName = "UxfUiAvatarFileInput";
|
package/button/button.d.ts
CHANGED
|
@@ -12,11 +12,7 @@ export interface ButtonProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement
|
|
|
12
12
|
isIconButton?: boolean;
|
|
13
13
|
size?: ButtonSize;
|
|
14
14
|
variant?: ButtonVariant;
|
|
15
|
-
/** @deprecated use isLoading */
|
|
16
|
-
loading?: boolean;
|
|
17
15
|
isLoading?: boolean;
|
|
18
|
-
/** @deprecated use isDisabled */
|
|
19
|
-
disabled?: boolean;
|
|
20
16
|
isDisabled?: boolean;
|
|
21
17
|
}
|
|
22
18
|
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLAnchorElement>>;
|
package/button/button.js
CHANGED
|
@@ -29,10 +29,8 @@ const cx_1 = require("@uxf/core/utils/cx");
|
|
|
29
29
|
const react_1 = __importStar(require("react"));
|
|
30
30
|
exports.Button = (0, react_1.forwardRef)((props, ref) => {
|
|
31
31
|
// eslint-disable-next-line react/destructuring-assignment
|
|
32
|
-
const { as = "a", color, isIconButton, isFullWidth, size, variant, className, ...restProps } = props;
|
|
32
|
+
const { as = "a", color, isIconButton, isFullWidth, size, variant, className, isDisabled, isLoading, ...restProps } = props;
|
|
33
33
|
const Component = as;
|
|
34
|
-
const isDisabled = props.isDisabled || props.disabled;
|
|
35
|
-
const isLoading = props.isLoading || props.loading;
|
|
36
34
|
const anchorProps = (0, use_anchor_props_1.useAnchorProps)({
|
|
37
35
|
...restProps,
|
|
38
36
|
disabled: isDisabled,
|
package/button/button.stories.js
CHANGED
|
@@ -71,11 +71,11 @@ function Default() {
|
|
|
71
71
|
react_1.default.createElement("span", { className: "font-semibold" }, size)),
|
|
72
72
|
react_1.default.createElement("div", { className: "flex flex-row items-start gap-2" },
|
|
73
73
|
react_1.default.createElement(button_1.Button, { color: color, onClick: onClick, size: size, variant: variant }, "Default"),
|
|
74
|
-
react_1.default.createElement(button_1.Button, { color: color,
|
|
75
|
-
react_1.default.createElement(button_1.Button, { color: color,
|
|
74
|
+
react_1.default.createElement(button_1.Button, { color: color, isLoading: true, onClick: onClick, size: size, variant: variant }, "Loading"),
|
|
75
|
+
react_1.default.createElement(button_1.Button, { color: color, isDisabled: true, onClick: onClick, size: size, variant: variant }, "Disabled"),
|
|
76
76
|
react_1.default.createElement(button_1.Button, { color: color, isIconButton: true, onClick: onClick, size: size, variant: variant },
|
|
77
77
|
react_1.default.createElement(icon_1.Icon, { name: "check" })),
|
|
78
|
-
react_1.default.createElement(button_1.Button, { color: color, isIconButton: true, onClick: onClick, size: size, variant: variant,
|
|
78
|
+
react_1.default.createElement(button_1.Button, { color: color, isIconButton: true, onClick: onClick, size: size, variant: variant, isLoading: true },
|
|
79
79
|
react_1.default.createElement(icon_1.Icon, { name: "check" })),
|
|
80
80
|
react_1.default.createElement(button_1.Button, { className: "w-[200px]", color: color, onClick: onClick, size: size, variant: variant }, "Custom width")),
|
|
81
81
|
react_1.default.createElement(button_1.Button, { color: color, isFullWidth: true, onClick: onClick, size: size, variant: variant }, "Full width"),
|
|
@@ -16,7 +16,7 @@ const Default = () => {
|
|
|
16
16
|
{ label: "First item" },
|
|
17
17
|
{ label: "Second item" },
|
|
18
18
|
{ label: "Third item" },
|
|
19
|
-
{ label: "Fourth item",
|
|
19
|
+
{ label: "Fourth item", isDisabled: true },
|
|
20
20
|
{ label: "Fifth item" },
|
|
21
21
|
{ label: "Sixth item" },
|
|
22
22
|
{ label: "Seventh item" },
|
|
@@ -60,11 +60,11 @@ exports.DatePickerMonth = (0, react_1.memo)((props) => {
|
|
|
60
60
|
}, [setViewMode]);
|
|
61
61
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
62
62
|
react_1.default.createElement(calendar_1.CalendarNavigation, { prevButtonProps: {
|
|
63
|
-
|
|
63
|
+
isDisabled: !canGoToPrevMonth,
|
|
64
64
|
onClick: canGoToPrevMonth ? handleGoToPrevMonth : undefined,
|
|
65
65
|
title: "Předchozí měsíc",
|
|
66
66
|
}, nextButtonProps: {
|
|
67
|
-
|
|
67
|
+
isDisabled: !canGoToNextMonth,
|
|
68
68
|
onClick: canGoToNextMonth ? handleGoToNextMonth : undefined,
|
|
69
69
|
title: "Nadcházející měsíc",
|
|
70
70
|
}, selectButtonProps: {
|
|
@@ -62,11 +62,11 @@ exports.DatePickerYear = (0, react_1.memo)((props) => {
|
|
|
62
62
|
}, [canGoToMonth, props]);
|
|
63
63
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
64
64
|
react_1.default.createElement(calendar_1.CalendarNavigation, { prevButtonProps: {
|
|
65
|
-
|
|
65
|
+
isDisabled: !canGoToPrevYear,
|
|
66
66
|
onClick: canGoToPrevYear ? handleGoToPrevYear : undefined,
|
|
67
67
|
title: "Předchozí rok",
|
|
68
68
|
}, nextButtonProps: {
|
|
69
|
-
|
|
69
|
+
isDisabled: !canGoToNextYear,
|
|
70
70
|
onClick: canGoToNextYear ? handleGoToNextYear : undefined,
|
|
71
71
|
title: "Nadcházející rok",
|
|
72
72
|
}, selectButtonProps: {
|
|
@@ -52,11 +52,11 @@ exports.DateRangePickerMonth = (0, react_1.memo)((props) => {
|
|
|
52
52
|
}, [props]);
|
|
53
53
|
return (react_1.default.createElement("div", { className: "uxf-date-range-picker__month" },
|
|
54
54
|
react_1.default.createElement(calendar_1.CalendarNavigation, { prevButtonProps: {
|
|
55
|
-
|
|
55
|
+
isDisabled: !canGoToPrevMonth,
|
|
56
56
|
onClick: canGoToPrevMonth ? handleGoToPrevMonth : undefined,
|
|
57
57
|
title: "Předchozí měsíc",
|
|
58
58
|
}, nextButtonProps: {
|
|
59
|
-
|
|
59
|
+
isDisabled: !canGoToNextMonth,
|
|
60
60
|
onClick: canGoToNextMonth ? handleGoToNextMonth : undefined,
|
|
61
61
|
title: "Nadcházející měsíc",
|
|
62
62
|
}, selectButtonProps: {
|
|
@@ -63,11 +63,11 @@ exports.DateRangePickerYear = (0, react_1.memo)((props) => {
|
|
|
63
63
|
}, [canGoToMonth, props]);
|
|
64
64
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
65
65
|
react_1.default.createElement(calendar_1.CalendarNavigation, { prevButtonProps: {
|
|
66
|
-
|
|
66
|
+
isDisabled: !canGoToPrevYear,
|
|
67
67
|
onClick: canGoToPrevYear ? handleGoToPrevYear : undefined,
|
|
68
68
|
title: "Předchozí rok",
|
|
69
69
|
}, nextButtonProps: {
|
|
70
|
-
|
|
70
|
+
isDisabled: !canGoToNextYear,
|
|
71
71
|
onClick: canGoToNextYear ? handleGoToNextYear : undefined,
|
|
72
72
|
title: "Nadcházející rok",
|
|
73
73
|
}, selectButtonProps: {
|
package/icons-config.js
CHANGED
|
@@ -10,11 +10,6 @@ module.exports = {
|
|
|
10
10
|
height: 512,
|
|
11
11
|
data: `<path fill="currentColor" d="M438.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-160-160c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L338.8 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l306.7 0L233.4 393.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l160-160z"/>`,
|
|
12
12
|
},
|
|
13
|
-
"badge-check-solid": {
|
|
14
|
-
width: 512,
|
|
15
|
-
height: 512,
|
|
16
|
-
data: `<path fill="currentColor" d="M256 0c36.8 0 68.8 20.7 84.9 51.1C373.8 41 411 49 437 75s34 63.3 23.9 96.1C491.3 187.2 512 219.2 512 256s-20.7 68.8-51.1 84.9C471 373.8 463 411 437 437s-63.3 34-96.1 23.9C324.8 491.3 292.8 512 256 512s-68.8-20.7-84.9-51.1C138.2 471 101 463 75 437s-34-63.3-23.9-96.1C20.7 324.8 0 292.8 0 256s20.7-68.8 51.1-84.9C41 138.2 49 101 75 75s63.3-34 96.1-23.9C187.2 20.7 219.2 0 256 0zM369 209c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-111 111-47-47c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l64 64c9.4 9.4 24.6 9.4 33.9 0L369 209z"/>`,
|
|
17
|
-
},
|
|
18
13
|
calendar: {
|
|
19
14
|
width: 448,
|
|
20
15
|
height: 512,
|
|
@@ -80,11 +75,6 @@ module.exports = {
|
|
|
80
75
|
height: 512,
|
|
81
76
|
data: `<path d="M144 480C64.5 480 0 415.5 0 336c0-62.8 40.2-116.2 96.2-135.9-.1-2.7-.2-5.4-.2-8.1 0-88.4 71.6-160 160-160 59.3 0 111 32.2 138.7 80.2C409.9 102 428.3 96 448 96c53 0 96 43 96 96 0 12.2-2.3 23.8-6.4 34.6C596 238.4 640 290.1 640 352c0 70.7-57.3 128-128 128H144zm79-217c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l39-39V392c0 13.3 10.7 24 24 24s24-10.7 24-24V257.9l39 39c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-80-80c-9.4-9.4-24.6-9.4-33.9 0l-80 80z" fill="currentColor"/>`,
|
|
82
77
|
},
|
|
83
|
-
"circle-info-solid": {
|
|
84
|
-
width: 512,
|
|
85
|
-
height: 512,
|
|
86
|
-
data: `<path fill="currentColor" d="M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"/>`,
|
|
87
|
-
},
|
|
88
78
|
copy: {
|
|
89
79
|
width: 512,
|
|
90
80
|
height: 512,
|
|
@@ -120,11 +110,6 @@ module.exports = {
|
|
|
120
110
|
height: 512,
|
|
121
111
|
data: `<path fill="currentColor" d="M248.4 84.3c1.6-2.7 4.5-4.3 7.6-4.3s6 1.6 7.6 4.3L461.9 410c1.4 2.3 2.1 4.9 2.1 7.5c0 8-6.5 14.5-14.5 14.5H62.5c-8 0-14.5-6.5-14.5-14.5c0-2.7 .7-5.3 2.1-7.5L248.4 84.3zm-41-25L9.1 385c-6 9.8-9.1 21-9.1 32.5C0 452 28 480 62.5 480h387c34.5 0 62.5-28 62.5-62.5c0-11.5-3.2-22.7-9.1-32.5L304.6 59.3C294.3 42.4 275.9 32 256 32s-38.3 10.4-48.6 27.3zM288 368a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zm-8-184c0-13.3-10.7-24-24-24s-24 10.7-24 24v96c0 13.3 10.7 24 24 24s24-10.7 24-24V184z"/>`,
|
|
122
112
|
},
|
|
123
|
-
"triangle-exclamation-solid": {
|
|
124
|
-
width: 512,
|
|
125
|
-
height: 512,
|
|
126
|
-
data: `<path d="M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480L40 480c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24l0 112c0 13.3 10.7 24 24 24s24-10.7 24-24l0-112c0-13.3-10.7-24-24-24zm32 224a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z" fill="currentColor"/>`,
|
|
127
|
-
},
|
|
128
113
|
user: {
|
|
129
114
|
width: 448,
|
|
130
115
|
height: 512,
|
|
@@ -140,11 +125,6 @@ module.exports = {
|
|
|
140
125
|
height: 512,
|
|
141
126
|
data: `<path fill="currentColor" d="M345 137c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-119 119L73 103c-9.4-9.4-24.6-9.4-33.9 0s-9.4 24.6 0 33.9l119 119L39 375c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l119-119L311 409c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-119-119L345 137z"/>`,
|
|
142
127
|
},
|
|
143
|
-
"xmark-octagon-solid": {
|
|
144
|
-
width: 512,
|
|
145
|
-
height: 512,
|
|
146
|
-
data: `<path fill="currentColor" d="M140.6 21.2C154.1 7.7 172.4 .1 191.5 .1l129 0c19.1 0 37.4 7.6 50.9 21.1L490.8 140.6c13.5 13.5 21.1 31.8 21.1 50.9l0 129c0 19.1-7.6 37.4-21.1 50.9L371.4 490.8c-13.5 13.5-31.8 21.1-50.9 21.1l-129 0c-19.1 0-37.4-7.6-50.9-21.1L21.2 371.4C7.7 357.9 .1 339.6 .1 320.5l0-129c0-19.1 7.6-37.4 21.1-50.9L140.6 21.2zM175 175c-9.4 9.4-9.4 24.6 0 33.9l47 47-47 47c-9.4 9.4-9.4 24.6 0 33.9s24.6 9.4 33.9 0l47-47 47 47c9.4 9.4 24.6 9.4 33.9 0s9.4-24.6 0-33.9l-47-47 47-47c9.4-9.4 9.4-24.6 0-33.9s-24.6-9.4-33.9 0l-47 47-47-47c-9.4-9.4-24.6-9.4-33.9 0z"/>`,
|
|
147
|
-
},
|
|
148
128
|
xmarkLarge: {
|
|
149
129
|
width: 448,
|
|
150
130
|
height: 512,
|
|
@@ -13,16 +13,16 @@ function Default() {
|
|
|
13
13
|
react_1.default.createElement(modal_dialog_1.ModalDialog, { title: "Default dialog", footer: react_1.default.createElement(react_1.default.Fragment, null,
|
|
14
14
|
react_1.default.createElement(button_1.Button, { variant: "text" }, "Close"),
|
|
15
15
|
react_1.default.createElement(button_1.Button, null, "Button")) }, "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam erat volutpat. Praesent dapibus. Vestibulum fermentum tortor id mi."),
|
|
16
|
-
react_1.default.createElement(modal_dialog_1.ModalDialog, { title: "Warning dialog", icon: react_1.default.createElement(icon_1.Icon, { name: "triangle-exclamation
|
|
16
|
+
react_1.default.createElement(modal_dialog_1.ModalDialog, { title: "Warning dialog", icon: react_1.default.createElement(icon_1.Icon, { name: "triangle-exclamation", color: "warning" }), footer: react_1.default.createElement(react_1.default.Fragment, null,
|
|
17
17
|
react_1.default.createElement(button_1.Button, { variant: "text" }, "Close"),
|
|
18
18
|
react_1.default.createElement(button_1.Button, { color: "warning" }, "Button")) }, "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam erat volutpat. Praesent dapibus. Vestibulum fermentum tortor id mi."),
|
|
19
|
-
react_1.default.createElement(modal_dialog_1.ModalDialog, { title: "Positive dialog asda ksdjahs kjdhakj shdk jahksdjh kajsdh k", icon: react_1.default.createElement(icon_1.Icon, { name: "
|
|
19
|
+
react_1.default.createElement(modal_dialog_1.ModalDialog, { title: "Positive dialog asda ksdjahs kjdhakj shdk jahksdjh kajsdh k", icon: react_1.default.createElement(icon_1.Icon, { name: "youtube", color: "positive" }), footer: react_1.default.createElement(react_1.default.Fragment, null,
|
|
20
20
|
react_1.default.createElement(button_1.Button, { variant: "text" }, "Cancel"),
|
|
21
21
|
react_1.default.createElement(button_1.Button, { color: "positive" }, "Save")) }, "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam erat volutpat. Praesent dapibus. Vestibulum fermentum tortor id mi."),
|
|
22
|
-
react_1.default.createElement(modal_dialog_1.ModalDialog, { title: "Negative dialog", icon: react_1.default.createElement(icon_1.Icon, { name: "xmark
|
|
22
|
+
react_1.default.createElement(modal_dialog_1.ModalDialog, { title: "Negative dialog", icon: react_1.default.createElement(icon_1.Icon, { name: "xmark", color: "negative" }), footer: react_1.default.createElement(react_1.default.Fragment, null,
|
|
23
23
|
react_1.default.createElement(button_1.Button, { variant: "text" }, "Cancel"),
|
|
24
24
|
react_1.default.createElement(button_1.Button, { color: "negative" }, "Save")) }, "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam erat volutpat. Praesent dapibus. Vestibulum fermentum tortor id mi."),
|
|
25
|
-
react_1.default.createElement(modal_dialog_1.ModalDialog, { title: "Info dialog", icon: react_1.default.createElement(icon_1.Icon, { name: "circle-info
|
|
25
|
+
react_1.default.createElement(modal_dialog_1.ModalDialog, { title: "Info dialog", icon: react_1.default.createElement(icon_1.Icon, { name: "circle-info", color: "info" }), footer: react_1.default.createElement(react_1.default.Fragment, null,
|
|
26
26
|
react_1.default.createElement(button_1.Button, { variant: "text" }, "Cancel"),
|
|
27
27
|
react_1.default.createElement(button_1.Button, { color: "info" }, "Save")) }, "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam erat volutpat. Praesent dapibus. Vestibulum fermentum tortor id mi.")));
|
|
28
28
|
}
|
package/package.json
CHANGED
|
@@ -53,7 +53,7 @@ function Default() {
|
|
|
53
53
|
react_1.default.createElement(text_input_1.TextInput, { name: "readOnly", label: "Read only input", value: value, onChange: onChange, helperText: "Error helper text", leftAddon: "https://", rightAddon: ".cz", leftElement: "\uD83C\uDF37", rightElement: "\uD83D\uDD14", placeholder: "Some beautiful placeholder...", isReadOnly: true }),
|
|
54
54
|
react_1.default.createElement(text_input_1.TextInput, { name: "disabled", label: "Disabled input", value: value, onChange: onChange, helperText: "Error helper text", leftAddon: "https://", rightAddon: ".cz", leftElement: "\uD83C\uDF37", rightElement: "\uD83D\uDD14", placeholder: "Some beautiful placeholder...", isDisabled: true }),
|
|
55
55
|
react_1.default.createElement(text_input_1.TextInput, { name: "defaultHtmlTime", label: "Default html time input", value: timeValue, onChange: onTimeChange, placeholder: "Some beautiful placeholder...", type: "time" }),
|
|
56
|
-
react_1.default.createElement(text_input_1.TextInput, { name: "copyToClipboard", label: "Copy to clipboard input", leftAddon: "I can be copied!", onChange: onChange, placeholder: "Some beautiful placeholder...", rightAddon: react_1.default.createElement(button_1.Button, { className: "size-full rounded-l-none border-none",
|
|
56
|
+
react_1.default.createElement(text_input_1.TextInput, { name: "copyToClipboard", label: "Copy to clipboard input", leftAddon: "I can be copied!", onChange: onChange, placeholder: "Some beautiful placeholder...", rightAddon: react_1.default.createElement(button_1.Button, { className: "size-full rounded-l-none border-none", isDisabled: value === "", onClick: onCopy, variant: "secondary" },
|
|
57
57
|
react_1.default.createElement(icon_1.Icon, { className: "w-4", name: "copy" })), value: value })));
|
|
58
58
|
}
|
|
59
59
|
exports.Default = Default;
|