@uxf/ui 11.21.3 → 11.21.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/_file-input-base/file-input-base.d.ts +2 -1
- package/css/radio-group.css +21 -9
- package/dropzone/dropzone-input.d.ts +2 -1
- package/dropzone/dropzone-input.js +1 -0
- package/dropzone/types.d.ts +1 -1
- package/package.json +4 -4
- package/pagination/pagination.d.ts +4 -2
- package/pagination/pagination.js +18 -11
- package/types/file-response.d.ts +0 -7
- package/utils/files/get-file-url.d.ts +1 -1
- package/utils/mocks/upload-file.mock.d.ts +2 -1
- package/utils/mocks/upload-file.mock.js +1 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FileResponse
|
|
1
|
+
import { FileResponse } from "@uxf/core/types";
|
|
2
|
+
import { FormControlProps } from "@uxf/ui/types";
|
|
2
3
|
import React from "react";
|
|
3
4
|
export interface FileInputBaseProps extends FormControlProps<FileResponse | null> {
|
|
4
5
|
"aria-describedby"?: string;
|
package/css/radio-group.css
CHANGED
|
@@ -9,7 +9,8 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
&__option-wrapper {
|
|
12
|
-
|
|
12
|
+
display: flex;
|
|
13
|
+
justify-content: space-between;
|
|
13
14
|
|
|
14
15
|
&.is-selected {
|
|
15
16
|
.uxf-radio-group__option-label {
|
|
@@ -31,7 +32,7 @@
|
|
|
31
32
|
}
|
|
32
33
|
|
|
33
34
|
&__label {
|
|
34
|
-
|
|
35
|
+
margin-bottom: theme("spacing.2");
|
|
35
36
|
}
|
|
36
37
|
}
|
|
37
38
|
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
.uxf-radio-group__option-label {
|
|
60
|
-
|
|
61
|
+
padding-right: theme("spacing.4");
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
|
|
@@ -71,7 +72,9 @@
|
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
.uxf-radio-group__options-wrapper {
|
|
74
|
-
|
|
75
|
+
display: flex;
|
|
76
|
+
flex-wrap: wrap;
|
|
77
|
+
gap: theme("spacing.2");
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
.uxf-radio-group__option-wrapper {
|
|
@@ -92,7 +95,9 @@
|
|
|
92
95
|
}
|
|
93
96
|
|
|
94
97
|
.uxf-radio-group__option-label {
|
|
95
|
-
@apply
|
|
98
|
+
@apply text-sm;
|
|
99
|
+
|
|
100
|
+
padding-top: theme("spacing.4");
|
|
96
101
|
}
|
|
97
102
|
}
|
|
98
103
|
|
|
@@ -107,22 +112,29 @@
|
|
|
107
112
|
}
|
|
108
113
|
|
|
109
114
|
.uxf-radio-group__option-wrapper {
|
|
110
|
-
@apply flex-row-reverse
|
|
115
|
+
@apply flex-row-reverse;
|
|
116
|
+
|
|
117
|
+
align-items: center;
|
|
111
118
|
}
|
|
112
119
|
|
|
113
120
|
.uxf-radio-group__option-label {
|
|
114
|
-
|
|
121
|
+
padding-left: theme("spacing.2");
|
|
115
122
|
}
|
|
116
123
|
}
|
|
117
124
|
|
|
118
125
|
.uxf-radio-group--column {
|
|
119
126
|
.uxf-radio-group__options-wrapper {
|
|
120
|
-
|
|
127
|
+
align-items: start;
|
|
128
|
+
display: flex;
|
|
129
|
+
flex-direction: column;
|
|
130
|
+
gap: theme("spacing.2");
|
|
121
131
|
}
|
|
122
132
|
}
|
|
123
133
|
|
|
124
134
|
.uxf-radio-group--row {
|
|
125
135
|
.uxf-radio-group__options-wrapper {
|
|
126
|
-
|
|
136
|
+
align-items: center;
|
|
137
|
+
display: flex;
|
|
138
|
+
gap: theme("spacing.10");
|
|
127
139
|
}
|
|
128
140
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { FileResponse
|
|
1
|
+
import { FileResponse } from "@uxf/core/types";
|
|
2
|
+
import { FormControlProps, UploadOptions } from "@uxf/ui/types";
|
|
2
3
|
import React, { CSSProperties, ReactNode } from "react";
|
|
3
4
|
import { IconName } from "../icon/types";
|
|
4
5
|
import { Accept, DropzoneFile } from "./types";
|
package/dropzone/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uxf/ui",
|
|
3
|
-
"version": "11.21.
|
|
3
|
+
"version": "11.21.5",
|
|
4
4
|
"description": "",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"dependencies": {
|
|
18
18
|
"@floating-ui/react": "0.26.9",
|
|
19
19
|
"@headlessui/react": "1.7.14",
|
|
20
|
-
"@uxf/core": "11.21.
|
|
21
|
-
"@uxf/core-react": "11.21.
|
|
20
|
+
"@uxf/core": "11.21.5",
|
|
21
|
+
"@uxf/core-react": "11.21.5",
|
|
22
22
|
"@uxf/datepicker": "11.11.3",
|
|
23
|
-
"@uxf/styles": "11.21.
|
|
23
|
+
"@uxf/styles": "11.21.5",
|
|
24
24
|
"color2k": "2.0.3",
|
|
25
25
|
"dayjs": "1.11.10",
|
|
26
26
|
"jump.js": "1.0.2",
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { PaginationSizes } from "@uxf/ui/pagination/theme";
|
|
2
2
|
import { FC } from "react";
|
|
3
3
|
export interface PaginationProps {
|
|
4
|
+
className?: string;
|
|
4
5
|
count: number;
|
|
5
|
-
page: number;
|
|
6
6
|
onPageChange: (index: number) => void;
|
|
7
|
+
page: number;
|
|
8
|
+
showFirstButton?: boolean;
|
|
9
|
+
showLastButton?: boolean;
|
|
7
10
|
size?: keyof PaginationSizes;
|
|
8
|
-
className?: string;
|
|
9
11
|
}
|
|
10
12
|
export declare const Pagination: FC<PaginationProps>;
|
package/pagination/pagination.js
CHANGED
|
@@ -4,6 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Pagination = void 0;
|
|
7
|
+
const show_1 = require("@uxf/core-react/components/show");
|
|
7
8
|
const use_pagination_1 = require("@uxf/core-react/hooks/use-pagination");
|
|
8
9
|
const cx_1 = require("@uxf/core/utils/cx");
|
|
9
10
|
const react_1 = __importDefault(require("react"));
|
|
@@ -16,8 +17,8 @@ const Pagination = (props) => {
|
|
|
16
17
|
const pagination = (0, use_pagination_1.usePagination)({
|
|
17
18
|
count: props.count,
|
|
18
19
|
page: props.page,
|
|
19
|
-
showFirstButton:
|
|
20
|
-
showLastButton:
|
|
20
|
+
showFirstButton: props.showFirstButton,
|
|
21
|
+
showLastButton: props.showFirstButton,
|
|
21
22
|
});
|
|
22
23
|
const onClick = (item) => {
|
|
23
24
|
if (typeof item === "number") {
|
|
@@ -39,15 +40,21 @@ const Pagination = (props) => {
|
|
|
39
40
|
((item === "last" || item === "next") && isCurrentPageLast);
|
|
40
41
|
return (
|
|
41
42
|
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
|
42
|
-
react_1.default.createElement("a", { className: (0, cx_1.cx)("uxf-pagination__button", isDisabled && "is-disabled", (item === "start-ellipsis" || item === "end-ellipsis") && "is-ellipsis", item === props.page && "is-selected", index === 0 && "is-first", index === pagination.length - 1 && "is-last"), key: item, onClick: isDisabled ? undefined : () => onClick(item) },
|
|
43
|
-
react_1.default.createElement(
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
react_1.default.createElement(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
react_1.default.createElement(
|
|
50
|
-
react_1.default.createElement(
|
|
43
|
+
react_1.default.createElement("a", { className: (0, cx_1.cx)("uxf-pagination__button", isDisabled && "is-disabled", (item === "start-ellipsis" || item === "end-ellipsis") && "is-ellipsis", item === props.page && "is-selected", index === 0 && "is-go-to-first", index === pagination.length - 1 && "is-go-to-last", item === "next" && "is-next", item === "previous" && "is-previous", typeof item === "number" && "is-number"), key: item, onClick: isDisabled ? undefined : () => onClick(item) },
|
|
44
|
+
react_1.default.createElement(show_1.Show, { when: item === "first" },
|
|
45
|
+
react_1.default.createElement("span", { className: "uxf-pagination__label" }, "First"),
|
|
46
|
+
react_1.default.createElement(icon_1.Icon, { name: "chevronsLeft", size: 12 })),
|
|
47
|
+
react_1.default.createElement(show_1.Show, { when: item === "previous" },
|
|
48
|
+
react_1.default.createElement("span", { className: "uxf-pagination__label" }, "Previous"),
|
|
49
|
+
react_1.default.createElement(icon_1.Icon, { name: "chevronLeft", size: 12 })),
|
|
50
|
+
react_1.default.createElement(show_1.Show, { when: item === "start-ellipsis" || item === "end-ellipsis" }, "\u2026"),
|
|
51
|
+
react_1.default.createElement(show_1.Show, { when: typeof item === "number" }, item),
|
|
52
|
+
react_1.default.createElement(show_1.Show, { when: item === "next" },
|
|
53
|
+
react_1.default.createElement("span", { className: "uxf-pagination__label" }, "Next"),
|
|
54
|
+
react_1.default.createElement(icon_1.Icon, { name: "chevronRight", size: 12 })),
|
|
55
|
+
react_1.default.createElement(show_1.Show, { when: item === "last" },
|
|
56
|
+
react_1.default.createElement("span", { className: "uxf-pagination__label" }, "Last"),
|
|
57
|
+
react_1.default.createElement(icon_1.Icon, { name: "chevronsRight", size: 12 }))));
|
|
51
58
|
})));
|
|
52
59
|
};
|
|
53
60
|
exports.Pagination = Pagination;
|
package/types/file-response.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
export interface FileResponse {
|
|
2
|
-
extension: string;
|
|
3
|
-
id: number;
|
|
4
|
-
name: string;
|
|
5
|
-
namespace?: string | null;
|
|
6
|
-
uuid: string;
|
|
7
|
-
}
|
|
8
1
|
export interface UploadOptions {
|
|
9
2
|
abortController?: AbortController;
|
|
10
3
|
onUploadProgress?: (progressEvent: UploadProgressEvent) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { FileResponse } from "@uxf/
|
|
1
|
+
import { FileResponse } from "@uxf/core/types";
|
|
2
2
|
export declare function getFileUrl(domain: string, file: FileResponse): string;
|