@uxf/ui 10.0.0-beta.76 → 10.0.0-beta.79
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.js +8 -2
- package/avatar/README.md +8 -0
- package/avatar/avatar.stories.js +1 -1
- package/avatar-file-input/README.md +1 -0
- package/badge/README.md +1 -0
- package/button/README.md +68 -0
- package/button/button.stories.js +0 -1
- package/button-group/README.md +1 -0
- package/button-list/README.md +1 -0
- package/calendar/README.md +1 -0
- package/checkbox/README.md +1 -0
- package/checkbox-button/README.md +1 -0
- package/checkbox-input/README.md +1 -0
- package/chip/README.md +1 -0
- package/color-radio/README.md +8 -0
- package/color-radio-group/README.md +9 -0
- package/combobox/README.md +12 -0
- package/config/icons-config.d.ts +1 -1
- package/config/icons-config.js +1 -1
- package/css/avatar.css +1 -1
- package/css/button-list.css +2 -2
- package/css/button.css +8 -8
- package/css/checkbox-button.css +2 -2
- package/css/checkbox.css +4 -4
- package/css/color-radio-group.css +1 -1
- package/css/color-radio.css +1 -1
- package/css/datetime-picker.css +1 -1
- package/css/dropdown.css +1 -1
- package/css/dropzone.css +3 -3
- package/css/error-message.css +1 -1
- package/css/image-gallery.css +1 -1
- package/css/input.css +2 -2
- package/css/layout.css +1 -1
- package/css/list-item.css +2 -2
- package/css/multi-combobox.css +2 -2
- package/css/pagination.css +2 -2
- package/css/paper.css +1 -1
- package/css/radio.css +4 -4
- package/css/tabs.css +8 -8
- package/css/toggle.css +2 -2
- package/css/tooltip.css +2 -2
- package/date-picker/README.md +9 -0
- package/date-picker-input/README.md +11 -0
- package/date-range-picker/README.md +1 -0
- package/date-range-picker-input/README.md +1 -0
- package/datetime-picker/README.md +13 -0
- package/datetime-picker-input/README.md +1 -0
- package/dropdown/README.md +1 -0
- package/dropzone/README.md +8 -0
- package/dropzone/dropzone.stories.js +1 -1
- package/error-message/README.md +7 -0
- package/file-input/README.md +11 -0
- package/file-input/file-input.js +5 -17
- package/flash-messages/README.md +23 -0
- package/form-component/README.md +7 -0
- package/hooks/use-dropdown.d.ts +2 -2
- package/icon/README.md +11 -0
- package/input/README.md +8 -0
- package/label/README.md +7 -0
- package/list-item/README.md +7 -0
- package/loader/README.md +7 -0
- package/message/README.md +1 -0
- package/modal/README.md +24 -0
- package/multi-combobox/README.md +1 -0
- package/multi-select/README.md +1 -0
- package/package.json +1 -1
- package/pagination/README.md +1 -0
- package/paper/README.md +1 -0
- package/radio/README.md +1 -0
- package/radio-group/README.md +1 -0
- package/raster-image/README.md +1 -0
- package/select/README.md +1 -0
- package/tabs/README.md +1 -0
- package/text-input/README.md +1 -0
- package/text-link/README.md +34 -0
- package/textarea/README.md +1 -0
- package/time-picker/README.md +1 -0
- package/time-picker-input/README.md +1 -0
- package/toggle/README.md +1 -0
- package/tooltip/README.md +1 -0
- package/tooltip/use-tooltip.d.ts +4 -4
- package/typography/README.md +1 -0
- package/utils/action.d.ts +2 -1
- package/utils/action.js +2 -2
|
@@ -27,9 +27,15 @@ exports._FileInputBase = void 0;
|
|
|
27
27
|
const react_1 = __importStar(require("react"));
|
|
28
28
|
exports._FileInputBase = (0, react_1.forwardRef)((props, ref) => {
|
|
29
29
|
const onChange = async (e) => {
|
|
30
|
+
var _a;
|
|
30
31
|
if (e.target.files) {
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
try {
|
|
33
|
+
const response = await props.onUploadFile(e.target.files[0]);
|
|
34
|
+
await props.onChange(response, e);
|
|
35
|
+
}
|
|
36
|
+
catch (err) {
|
|
37
|
+
(_a = props.onUploadError) === null || _a === void 0 ? void 0 : _a.call(props, err);
|
|
38
|
+
}
|
|
33
39
|
}
|
|
34
40
|
else {
|
|
35
41
|
props.onChange(null, e);
|
package/avatar/README.md
ADDED
package/avatar/avatar.stories.js
CHANGED
|
@@ -12,7 +12,7 @@ exports.default = {
|
|
|
12
12
|
};
|
|
13
13
|
function Default() {
|
|
14
14
|
const testAvatars = (react_1.default.createElement(react_1.default.Fragment, null,
|
|
15
|
-
react_1.default.createElement(avatar_1.Avatar, { src: "https://
|
|
15
|
+
react_1.default.createElement(avatar_1.Avatar, { src: "https://images.pexels.com/photos/14934612/pexels-photo-14934612.jpeg?auto=compress&cs=tinysrgb&w=100&h=100&dpr=1" }),
|
|
16
16
|
react_1.default.createElement(avatar_1.Avatar, null)));
|
|
17
17
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
18
18
|
react_1.default.createElement("div", { className: "light flex items-center space-x-4 rounded bg-white p-8" }, testAvatars),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# AvatarFileInput
|
package/badge/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Badge
|
package/button/README.md
ADDED
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Button
|
|
2
|
+
|
|
3
|
+
### Props configuration
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
// button.d.ts
|
|
7
|
+
|
|
8
|
+
declare module "@uxf/ui/icon/theme" {
|
|
9
|
+
export interface ButtonVariants {
|
|
10
|
+
default: true;
|
|
11
|
+
outlined: true;
|
|
12
|
+
text: true;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface ButtonSizes {
|
|
16
|
+
xs: true;
|
|
17
|
+
sm: true;
|
|
18
|
+
default: true;
|
|
19
|
+
lg: true;
|
|
20
|
+
xl: true;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface ButtonColors {
|
|
24
|
+
default: true;
|
|
25
|
+
white: true;
|
|
26
|
+
success: true;
|
|
27
|
+
warning: true;
|
|
28
|
+
error: true;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Css
|
|
34
|
+
|
|
35
|
+
```css
|
|
36
|
+
// button.css
|
|
37
|
+
|
|
38
|
+
.uxf-button {
|
|
39
|
+
|
|
40
|
+
&__text {
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.is-disabled {
|
|
45
|
+
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&.is-loading {
|
|
49
|
+
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&--full-width {
|
|
53
|
+
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&--icon-button {
|
|
57
|
+
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&--size-{{ size }} {
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&--variant-{{ variant }} {
|
|
65
|
+
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
package/button/button.stories.js
CHANGED
|
@@ -28,7 +28,6 @@ const button_1 = require("@uxf/ui/button");
|
|
|
28
28
|
const icon_1 = require("@uxf/ui/icon");
|
|
29
29
|
const storybook_config_1 = require("@uxf/ui/utils/storybook-config");
|
|
30
30
|
const react_1 = __importStar(require("react"));
|
|
31
|
-
// import Docs from "./button.docs.mdx";
|
|
32
31
|
exports.default = {
|
|
33
32
|
title: "UI/Button",
|
|
34
33
|
component: button_1.Button,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# ButtonGroup
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# ButtonList
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Calendar
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Checkbox
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# CheckboxButton
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# CheckboxInput
|
package/chip/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Chip
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Combobox
|
|
2
|
+
|
|
3
|
+
## CSS dependencies
|
|
4
|
+
|
|
5
|
+
```css
|
|
6
|
+
@import url("@uxf/ui/label/label.css");
|
|
7
|
+
@import url("@uxf/ui/form-component/form-component.css");
|
|
8
|
+
@import url("@uxf/ui/dropdown/dropdown.css");
|
|
9
|
+
@import url("@uxf/ui/input/input.css");
|
|
10
|
+
@import url("@uxf/ui/_select-base/select-base.css");
|
|
11
|
+
@import url("@uxf/ui/input/input-basic.css");
|
|
12
|
+
```
|
package/config/icons-config.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const ICONS_VERSION = "
|
|
1
|
+
export declare const ICONS_VERSION = "1696711976722";
|
|
2
2
|
export declare const ICON_SPRITE = "/.storybook/static-assets/icons-generated/_icon-sprite.svg";
|
package/config/icons-config.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICON_SPRITE = exports.ICONS_VERSION = void 0;
|
|
4
|
-
exports.ICONS_VERSION = "
|
|
4
|
+
exports.ICONS_VERSION = "1696711976722";
|
|
5
5
|
exports.ICON_SPRITE = "/.storybook/static-assets/icons-generated/_icon-sprite.svg";
|
package/css/avatar.css
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
@apply relative inline-flex h-10 w-10 items-center justify-center rounded-full;
|
|
3
3
|
|
|
4
4
|
&__image {
|
|
5
|
-
@apply absolute left-0 top-0 block h-full w-full
|
|
5
|
+
@apply rounded-inherit absolute left-0 top-0 block h-full w-full object-cover;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
:root .light & {
|
package/css/button-list.css
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
&__menu-items {
|
|
9
|
-
@apply absolute right-0
|
|
9
|
+
@apply z-dropdown absolute right-0 mt-2 w-40 divide-y rounded-md shadow-lg ring-1 focus:outline-none;
|
|
10
10
|
|
|
11
11
|
:root .light & {
|
|
12
12
|
@apply divide-gray-100 bg-white ring-black/5;
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
&__menu-button {
|
|
29
|
-
@apply flex space-x-3 px-3 py-2 text-sm
|
|
29
|
+
@apply is-hoverable:hover:cursor-pointer flex space-x-3 px-3 py-2 text-sm;
|
|
30
30
|
|
|
31
31
|
:root .light & {
|
|
32
32
|
@apply text-black hover:text-gray-800;
|
package/css/button.css
CHANGED
|
@@ -192,11 +192,11 @@
|
|
|
192
192
|
|
|
193
193
|
&.is-disabled {
|
|
194
194
|
:root .light & {
|
|
195
|
-
@apply border-gray-300 bg-gray-300
|
|
195
|
+
@apply text-lightLow border-gray-300 bg-gray-300;
|
|
196
196
|
}
|
|
197
197
|
|
|
198
198
|
:root .dark & {
|
|
199
|
-
@apply border-gray-700 bg-gray-700
|
|
199
|
+
@apply text-darkLow border-gray-700 bg-gray-700;
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
}
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
|
|
222
222
|
&.is-disabled {
|
|
223
223
|
:root .light & {
|
|
224
|
-
@apply bg-gray-300
|
|
224
|
+
@apply text-lightLow bg-gray-300;
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
:root .dark & {
|
|
@@ -243,7 +243,7 @@
|
|
|
243
243
|
|
|
244
244
|
&.is-disabled {
|
|
245
245
|
:root .light & {
|
|
246
|
-
@apply bg-gray-300
|
|
246
|
+
@apply text-lightLow bg-gray-300;
|
|
247
247
|
}
|
|
248
248
|
|
|
249
249
|
:root .dark & {
|
|
@@ -265,7 +265,7 @@
|
|
|
265
265
|
|
|
266
266
|
&.is-disabled {
|
|
267
267
|
:root .light & {
|
|
268
|
-
@apply bg-gray-300
|
|
268
|
+
@apply text-lightLow bg-gray-300;
|
|
269
269
|
}
|
|
270
270
|
|
|
271
271
|
:root .dark & {
|
|
@@ -287,7 +287,7 @@
|
|
|
287
287
|
|
|
288
288
|
&.is-disabled {
|
|
289
289
|
:root .light & {
|
|
290
|
-
@apply bg-gray-300
|
|
290
|
+
@apply text-lightLow bg-gray-300;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
:root .dark & {
|
|
@@ -298,10 +298,10 @@
|
|
|
298
298
|
}
|
|
299
299
|
|
|
300
300
|
&--variant-white {
|
|
301
|
-
@apply
|
|
301
|
+
@apply focus-visible:ring-primary border;
|
|
302
302
|
|
|
303
303
|
:root .light & {
|
|
304
|
-
@apply border-lightBorder
|
|
304
|
+
@apply border-lightBorder text-lightMedium is-hoverable:bg-gray-100 bg-white;
|
|
305
305
|
}
|
|
306
306
|
|
|
307
307
|
:root .dark & {
|
package/css/checkbox-button.css
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
:root .light & {
|
|
12
|
-
@apply
|
|
12
|
+
@apply focus-visible:ring-primary bg-gray-200;
|
|
13
13
|
|
|
14
14
|
.uxf-checkbox-button__icon {
|
|
15
15
|
@apply before:border-gray-600;
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
:root .dark & {
|
|
60
|
-
@apply
|
|
60
|
+
@apply focus-visible:ring-primary bg-gray-800 focus-visible:ring-offset-gray-900;
|
|
61
61
|
|
|
62
62
|
.uxf-checkbox-button__icon {
|
|
63
63
|
@apply before:border-transparent;
|
package/css/checkbox.css
CHANGED
|
@@ -35,10 +35,10 @@
|
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
:root .light & {
|
|
38
|
-
@apply border-gray-400 bg-white
|
|
38
|
+
@apply focus-visible:before:border-primary border-gray-400 bg-white;
|
|
39
39
|
|
|
40
40
|
&.is-selected {
|
|
41
|
-
@apply
|
|
41
|
+
@apply bg-primary is-hoverable:bg-primary-700 border-transparent;
|
|
42
42
|
|
|
43
43
|
.uxf-checkbox__inner {
|
|
44
44
|
@apply text-white;
|
|
@@ -77,10 +77,10 @@
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
:root .dark & {
|
|
80
|
-
@apply border-gray-400 bg-gray-900
|
|
80
|
+
@apply focus-visible:before:border-primary border-gray-400 bg-gray-900;
|
|
81
81
|
|
|
82
82
|
&.is-selected {
|
|
83
|
-
@apply
|
|
83
|
+
@apply bg-primary is-hoverable:bg-primary-300 border-transparent;
|
|
84
84
|
|
|
85
85
|
.uxf-checkbox__inner {
|
|
86
86
|
@apply text-white;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.uxf-color-radio-group {
|
|
2
2
|
&__option {
|
|
3
|
-
@apply rounded-full outline-none focus-visible:ring-2 focus-visible:ring-offset-2
|
|
3
|
+
@apply is-disabled:pointer-events-none rounded-full outline-none focus-visible:ring-2 focus-visible:ring-offset-2;
|
|
4
4
|
|
|
5
5
|
:root .light & {
|
|
6
6
|
@apply focus-visible:ring-[color:var(--option-color)] focus-visible:ring-offset-white;
|
package/css/color-radio.css
CHANGED
package/css/datetime-picker.css
CHANGED
package/css/dropdown.css
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
.uxf-dropdown {
|
|
2
|
-
@apply
|
|
2
|
+
@apply z-dropdown absolute w-full overflow-y-auto rounded-md py-1 text-base shadow-lg ring-1 ring-black
|
|
3
3
|
ring-opacity-5 sm:text-sm;
|
|
4
4
|
|
|
5
5
|
outline: none;
|
package/css/dropzone.css
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
&__label {
|
|
9
|
-
@apply flex cursor-pointer flex-col items-center justify-center space-y-2
|
|
10
|
-
border-
|
|
9
|
+
@apply rounded-inherit border-lightBorder text-lightLow flex cursor-pointer flex-col items-center justify-center space-y-2
|
|
10
|
+
border-2 border-dashed p-4 text-[14px];
|
|
11
11
|
|
|
12
12
|
&__icon {
|
|
13
13
|
@apply h-6;
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
&.is-disabled {
|
|
21
|
-
@apply cursor-not-allowed
|
|
21
|
+
@apply bg-lightBorder/50 cursor-not-allowed;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
package/css/error-message.css
CHANGED
package/css/image-gallery.css
CHANGED
package/css/input.css
CHANGED
|
@@ -234,11 +234,11 @@
|
|
|
234
234
|
|
|
235
235
|
.uxf-input__element {
|
|
236
236
|
:root .light & {
|
|
237
|
-
@apply
|
|
237
|
+
@apply text-error placeholder:text-error border-gray-200;
|
|
238
238
|
}
|
|
239
239
|
|
|
240
240
|
:root .dark & {
|
|
241
|
-
@apply
|
|
241
|
+
@apply text-error placeholder:text-error border-gray-700;
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
}
|
package/css/layout.css
CHANGED
package/css/list-item.css
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.uxf-list-item {
|
|
2
|
-
@apply relative flex min-h-[64px] grow justify-between space-x-3 px-5 py-4
|
|
3
|
-
transition-opacity before:absolute before:inset-0 before:rounded-lg focus-visible:before:border-2
|
|
2
|
+
@apply is-hoverable:opacity-75 relative flex min-h-[64px] grow justify-between space-x-3 px-5 py-4
|
|
3
|
+
outline-none transition-opacity before:absolute before:inset-0 before:rounded-lg focus-visible:before:border-2;
|
|
4
4
|
|
|
5
5
|
&__inner {
|
|
6
6
|
@apply w-full;
|
package/css/multi-combobox.css
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
:root .light & {
|
|
28
|
-
@apply bg-white
|
|
28
|
+
@apply text-lightHigh bg-white before:border-gray-200;
|
|
29
29
|
|
|
30
30
|
.is-empty {
|
|
31
31
|
@apply text-lightLow;
|
|
@@ -33,7 +33,7 @@
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
:root .dark & {
|
|
36
|
-
@apply bg-gray-800
|
|
36
|
+
@apply text-darkHigh bg-gray-800 before:border-gray-700;
|
|
37
37
|
|
|
38
38
|
.is-empty {
|
|
39
39
|
@apply text-darkLow;
|
package/css/pagination.css
CHANGED
|
@@ -16,11 +16,11 @@
|
|
|
16
16
|
@apply z-10;
|
|
17
17
|
|
|
18
18
|
:root .light & {
|
|
19
|
-
@apply border
|
|
19
|
+
@apply border-primary text-primary-600 border bg-indigo-50;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
:root .dark & {
|
|
23
|
-
@apply border
|
|
23
|
+
@apply border-primary-700 text-primary-300 border bg-indigo-900/20;
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
|
package/css/paper.css
CHANGED
package/css/radio.css
CHANGED
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
:root .light & {
|
|
31
|
-
@apply
|
|
31
|
+
@apply focus-visible:ring-primary border-gray-400;
|
|
32
32
|
|
|
33
33
|
&.is-selected {
|
|
34
|
-
@apply border-none
|
|
34
|
+
@apply bg-primary border-none;
|
|
35
35
|
|
|
36
36
|
.uxf-radio__inner {
|
|
37
37
|
@apply bg-white;
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
:root .dark & {
|
|
67
|
-
@apply
|
|
67
|
+
@apply focus-visible:ring-primary border-gray-400 focus-visible:ring-offset-gray-900;
|
|
68
68
|
|
|
69
69
|
&.is-selected {
|
|
70
|
-
@apply border-none
|
|
70
|
+
@apply bg-primary border-none;
|
|
71
71
|
|
|
72
72
|
.uxf-radio__inner {
|
|
73
73
|
@apply bg-white;
|
package/css/tabs.css
CHANGED
|
@@ -54,20 +54,20 @@
|
|
|
54
54
|
}
|
|
55
55
|
|
|
56
56
|
&__tab {
|
|
57
|
-
@apply inline-flex cursor-pointer items-center justify-center overflow-visible whitespace-nowrap px-2
|
|
58
|
-
text-center outline-none
|
|
59
|
-
focus-visible:ring-2 focus-visible:ring-offset-1
|
|
57
|
+
@apply is-disabled:pointer-events-none inline-flex cursor-pointer items-center justify-center overflow-visible whitespace-nowrap px-2
|
|
58
|
+
py-2 text-center outline-none
|
|
59
|
+
transition-colors focus-visible:ring-2 focus-visible:ring-offset-1;
|
|
60
60
|
|
|
61
61
|
&--default {
|
|
62
62
|
@apply relative rounded-lg before:absolute before:bottom-[-6px] before:w-full before:border-b-2
|
|
63
63
|
before:opacity-0 before:transition;
|
|
64
64
|
|
|
65
65
|
:root .light & {
|
|
66
|
-
@apply text-lightMedium hover:bg-gray-100
|
|
66
|
+
@apply text-lightMedium focus-visible:ring-primary hover:bg-gray-100;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
:root .dark & {
|
|
70
|
-
@apply text-darkMedium hover:bg-gray-800
|
|
70
|
+
@apply text-darkMedium focus-visible:ring-primary hover:bg-gray-800
|
|
71
71
|
focus-visible:ring-offset-gray-900;
|
|
72
72
|
}
|
|
73
73
|
|
|
@@ -98,12 +98,12 @@
|
|
|
98
98
|
@apply rounded;
|
|
99
99
|
|
|
100
100
|
:root .light & {
|
|
101
|
-
@apply
|
|
102
|
-
|
|
101
|
+
@apply text-lightMedium hover:bg-primary-100 hover:text-primary-600 focus-visible:ring-primary
|
|
102
|
+
bg-gray-100 focus-visible:ring-offset-gray-100;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
:root .dark & {
|
|
106
|
-
@apply bg-gray-700
|
|
106
|
+
@apply text-darkMedium focus-visible:ring-primary bg-gray-700 hover:bg-gray-800
|
|
107
107
|
focus-visible:ring-offset-gray-700;
|
|
108
108
|
}
|
|
109
109
|
|
package/css/toggle.css
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
:root .light & {
|
|
42
|
-
@apply
|
|
42
|
+
@apply focus-visible:ring-primary bg-gray-200;
|
|
43
43
|
|
|
44
44
|
&__inner {
|
|
45
45
|
@apply bg-white;
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
:root .dark & {
|
|
62
|
-
@apply
|
|
62
|
+
@apply focus-visible:ring-primary bg-gray-400 focus-visible:ring-offset-gray-900;
|
|
63
63
|
|
|
64
64
|
&.is-selected {
|
|
65
65
|
@apply bg-primary;
|
package/css/tooltip.css
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
.uxf-tooltip {
|
|
2
|
-
@apply z-tooltip w-max max-w-[calc(100vw-20px)] rounded-lg
|
|
2
|
+
@apply z-tooltip bg-lightHigh w-max max-w-[calc(100vw-20px)] rounded-lg p-3 text-white;
|
|
3
3
|
|
|
4
4
|
&__arrow {
|
|
5
|
-
@apply z-tooltip rounded-sm
|
|
5
|
+
@apply z-tooltip bg-lightHigh rounded-sm;
|
|
6
6
|
}
|
|
7
7
|
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# DatePickerInput
|
|
2
|
+
|
|
3
|
+
## CSS dependencies
|
|
4
|
+
|
|
5
|
+
```css
|
|
6
|
+
@import url("@uxf/ui/icon/icon.css");
|
|
7
|
+
@import url("@uxf/ui/button/button.css");
|
|
8
|
+
@import url("@uxf/ui/calendar/calendar.css");
|
|
9
|
+
@import url("@uxf/ui/date-picker/date-picker.css");
|
|
10
|
+
@import url("@uxf/ui/_input-with-popover/input-with-popover.css");
|
|
11
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# DateRangePicker
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# DateRangePickerInput
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# DatetimePicker
|
|
2
|
+
|
|
3
|
+
## CSS dependencies
|
|
4
|
+
|
|
5
|
+
```css
|
|
6
|
+
@import url("@uxf/ui/icon/icon.css");
|
|
7
|
+
@import url("@uxf/ui/button/button.css");
|
|
8
|
+
@import url("@uxf/ui/calendar/calendar.css");
|
|
9
|
+
@import url("@uxf/ui/date-picker/date-picker.css");
|
|
10
|
+
@import url("@uxf/ui/tabs/tabs.css");
|
|
11
|
+
@import url("@uxf/ui/time-picker/time-picker.css");
|
|
12
|
+
@import url("@uxf/ui/_input-with-popover/input-with-popover.css");
|
|
13
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# DatetimePickerInput
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Dropdown
|
|
@@ -43,7 +43,7 @@ function Default() {
|
|
|
43
43
|
const onChange = (0, action_1.action)("onChange", setFiles);
|
|
44
44
|
const storyDropzone = (react_1.default.createElement("div", { className: "space-y-2" },
|
|
45
45
|
react_1.default.createElement(index_1.Dropzone, { helperText: "Disabled drag 'n' drop", label: "Use drag and drop or click to upload", noDrag: true, onChange: onChange, onUploadFile: uploadFIle_mock_1.uploadFile, value: files }),
|
|
46
|
-
react_1.default.createElement(index_1.Dropzone, { helperText: "Disabled onClick upload", label: react_1.default.createElement("span", { className: "
|
|
46
|
+
react_1.default.createElement(index_1.Dropzone, { helperText: "Disabled onClick upload", label: react_1.default.createElement("span", { className: "bg-primary-600 rounded-lg px-4 py-2 font-bold text-white" }, "JSX label"), noClick: true, onChange: onChange, onUploadFile: uploadFIle_mock_1.uploadFile, value: files }),
|
|
47
47
|
react_1.default.createElement(index_1.Dropzone, { accept: { "image/*": [] }, label: "Only images upload", onChange: onChange, onUploadFile: uploadFIle_mock_1.uploadFile, value: files }),
|
|
48
48
|
react_1.default.createElement(index_1.Dropzone, { label: "Single file upload", maxFilesCount: 1, onChange: onChange, onUploadFile: uploadFIle_mock_1.uploadFile, value: files }),
|
|
49
49
|
react_1.default.createElement(index_1.Dropzone, { isDisabled: true, label: "Disabled dropzone", onChange: onChange, onUploadFile: uploadFIle_mock_1.uploadFile, value: files }),
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# FileInput
|
|
2
|
+
|
|
3
|
+
## CSS dependencies
|
|
4
|
+
|
|
5
|
+
```css
|
|
6
|
+
@import url("@uxf/ui/input/input-basic.css");
|
|
7
|
+
@import url("@uxf/ui/input/input.css");
|
|
8
|
+
@import url("@uxf/ui/label/label.css");
|
|
9
|
+
@import url("@uxf/ui/form-component/form-component.css");
|
|
10
|
+
@import url("@uxf/ui/file-input/file-input.css");
|
|
11
|
+
```
|
package/file-input/file-input.js
CHANGED
|
@@ -45,27 +45,15 @@ exports.FileInput = (0, react_1.forwardRef)((props, ref) => {
|
|
|
45
45
|
const input = (0, useInputFocus_1.useInputFocus)(innerRef, props.onBlur, props.onFocus);
|
|
46
46
|
const errorId = props.isInvalid && props.id ? `${props.id}--errormessage` : undefined;
|
|
47
47
|
const fileName = props.value ? `${props.value.name}` : props.placeholder || "No file has been selected yet";
|
|
48
|
-
const
|
|
49
|
-
var _a, _b;
|
|
50
|
-
const file = (_a = e === null || e === void 0 ? void 0 : e.target.files) === null || _a === void 0 ? void 0 : _a[0];
|
|
51
|
-
if (!file) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
48
|
+
const onUploadFile = async (file) => {
|
|
54
49
|
setIsUploading(true);
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
catch (err) {
|
|
60
|
-
(_b = props.onUploadError) === null || _b === void 0 ? void 0 : _b.call(props, err);
|
|
61
|
-
}
|
|
62
|
-
finally {
|
|
63
|
-
setIsUploading(false);
|
|
64
|
-
}
|
|
50
|
+
const response = await props.onUploadFile(file);
|
|
51
|
+
setIsUploading(false);
|
|
52
|
+
return response;
|
|
65
53
|
};
|
|
66
54
|
return (react_1.default.createElement(form_component_1.FormComponent, { className: (0, cx_1.cx)(input.focused && classes_1.CLASSES.IS_FOCUSED, props.isDisabled && classes_1.CLASSES.IS_DISABLED, props.isInvalid && classes_1.CLASSES.IS_INVALID, props.isReadOnly && classes_1.CLASSES.IS_READONLY), errorId: errorId, form: props.form, helperText: props.helperText, inputId: id, isRequired: props.isRequired, label: props.label, hiddenLabel: props.hiddenLabel },
|
|
67
55
|
react_1.default.createElement(react_1.default.Fragment, null,
|
|
68
|
-
react_1.default.createElement(_file_input_base_1._FileInputBase, { accept: props.accept, "aria-describedby": errorId, "aria-invalid": props.isInvalid, className: `uxf-file-input__input ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}`, form: props.form, id: id, isDisabled: props.isDisabled || isUploading, isInvalid: props.isInvalid, isReadOnly: props.isReadOnly, isRequired: props.isRequired, name: props.name, onBlur: input.onBlur, onChange: onChange, onFocus: input.onFocus, onUploadError: props.onUploadError, onUploadFile:
|
|
56
|
+
react_1.default.createElement(_file_input_base_1._FileInputBase, { accept: props.accept, "aria-describedby": errorId, "aria-invalid": props.isInvalid, className: `uxf-file-input__input ${(_a = props.className) !== null && _a !== void 0 ? _a : ""}`, form: props.form, id: id, isDisabled: props.isDisabled || isUploading, isInvalid: props.isInvalid, isReadOnly: props.isReadOnly, isRequired: props.isRequired, name: props.name, onBlur: input.onBlur, onChange: props.onChange, onFocus: input.onFocus, onUploadError: props.onUploadError, onUploadFile: onUploadFile, ref: ref, value: props.value }),
|
|
69
57
|
react_1.default.createElement("label", { className: (0, cx_1.cx)("uxf-input", "uxf-file-input__label", input.focused && classes_1.CLASSES.IS_FOCUSED, (props.isDisabled || props.isReadOnly) && classes_1.CLASSES.IS_DISABLED, props.isInvalid && classes_1.CLASSES.IS_INVALID, isUploading && classes_1.CLASSES.IS_LOADING, isUploading && "uxf-file-input__label--has-right-addon", `uxf-input--size-${(_b = props.size) !== null && _b !== void 0 ? _b : "default"}`, `uxf-input--variant-${(_c = props.variant) !== null && _c !== void 0 ? _c : "default"}`), htmlFor: id },
|
|
70
58
|
react_1.default.createElement("div", { className: "uxf-input__left-addon uxf-file-input__label__button" }, !isUploading ? ((_d = props.uploadButtonLabel) !== null && _d !== void 0 ? _d : "Vyberte soubor") : (react_1.default.createElement(loader_1.Loader, { className: "uxf-file-input__label__loader", size: "sm" }))),
|
|
71
59
|
react_1.default.createElement("div", { className: "uxf-file-input__label__wrapper" },
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# FlashMessages
|
|
2
|
+
|
|
3
|
+
## CSS dependencies
|
|
4
|
+
|
|
5
|
+
```css
|
|
6
|
+
@import url("@uxf/ui/flash-messages/flash-messages.css");
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Implementation
|
|
10
|
+
|
|
11
|
+
```tsx
|
|
12
|
+
import {AppProps} from "next/app";
|
|
13
|
+
import {FlashMessages, getFlashMessagesRef} from "@uxf/ui/flash-messages";
|
|
14
|
+
|
|
15
|
+
function App(props: AppProps) {
|
|
16
|
+
return (
|
|
17
|
+
<UiContextProvider value={...}>
|
|
18
|
+
{props.children}
|
|
19
|
+
<FlashMessages ref={getFlashMessagesRef()}/>
|
|
20
|
+
</UiContextProvider>
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
```
|
package/hooks/use-dropdown.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { Placement, Strategy } from "@floating-ui/react";
|
|
|
3
3
|
export declare function useDropdown(placement: Placement, matchWidth?: boolean, strategy?: Strategy): {
|
|
4
4
|
placement: Placement;
|
|
5
5
|
strategy: Strategy;
|
|
6
|
-
middlewareData: import("@floating-ui/
|
|
6
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
7
7
|
x: number;
|
|
8
8
|
y: number;
|
|
9
9
|
update: () => void;
|
|
@@ -12,7 +12,7 @@ export declare function useDropdown(placement: Placement, matchWidth?: boolean,
|
|
|
12
12
|
y: number;
|
|
13
13
|
strategy: Strategy;
|
|
14
14
|
placement: Placement;
|
|
15
|
-
middlewareData: import("@floating-ui/
|
|
15
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
16
16
|
update: () => void;
|
|
17
17
|
isPositioned: boolean;
|
|
18
18
|
floatingStyles: import("react").CSSProperties;
|
package/icon/README.md
ADDED
package/input/README.md
ADDED
package/label/README.md
ADDED
package/loader/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Message
|
package/modal/README.md
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Modal
|
|
2
|
+
|
|
3
|
+
## CSS dependencies
|
|
4
|
+
|
|
5
|
+
```css
|
|
6
|
+
@import url("@uxf/ui/dialog/dialog.css");
|
|
7
|
+
@import url("@uxf/ui/modal/modal.css");
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
## Implementation
|
|
11
|
+
|
|
12
|
+
```tsx
|
|
13
|
+
import {AppProps} from "next/app";
|
|
14
|
+
import {getModalRef, Modal} from "@uxf/ui/modal";
|
|
15
|
+
|
|
16
|
+
function App(props: AppProps) {
|
|
17
|
+
return (
|
|
18
|
+
<UiContextProvider value={...}>
|
|
19
|
+
{props.children}
|
|
20
|
+
<Modal ref={getModalRef()}/>
|
|
21
|
+
</UiContextProvider>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# MultiCombobox
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# MultiSelect
|
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Pagination
|
package/paper/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Paper
|
package/radio/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Radio
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# RadioGroup
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# RasterImage
|
package/select/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Select
|
package/tabs/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Tabs
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# TextInput
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# TextLink
|
|
2
|
+
|
|
3
|
+
### Props configuration
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
// textLink.d.ts
|
|
7
|
+
|
|
8
|
+
declare module "@uxf/ui/icon/theme" {
|
|
9
|
+
export interface TextLinkVariants {
|
|
10
|
+
default: true;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Css
|
|
16
|
+
|
|
17
|
+
```scss
|
|
18
|
+
// textLink.css
|
|
19
|
+
|
|
20
|
+
.uxf-textLink {
|
|
21
|
+
|
|
22
|
+
&.is-disabled {
|
|
23
|
+
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&.is-loading {
|
|
27
|
+
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
&--variant-{{ variant }} {
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Textarea
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# TimePicker
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# TimePickerInput
|
package/toggle/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Toggle
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Tooltip
|
package/tooltip/use-tooltip.d.ts
CHANGED
|
@@ -8,17 +8,17 @@ export interface TooltipOptions {
|
|
|
8
8
|
}
|
|
9
9
|
export declare function useTooltip(options: TooltipOptions): {
|
|
10
10
|
placement: Placement;
|
|
11
|
-
strategy: import("@floating-ui/
|
|
12
|
-
middlewareData: import("@floating-ui/
|
|
11
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
12
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
13
13
|
x: number;
|
|
14
14
|
y: number;
|
|
15
15
|
update: () => void;
|
|
16
16
|
context: {
|
|
17
17
|
x: number;
|
|
18
18
|
y: number;
|
|
19
|
-
strategy: import("@floating-ui/
|
|
19
|
+
strategy: import("@floating-ui/utils").Strategy;
|
|
20
20
|
placement: Placement;
|
|
21
|
-
middlewareData: import("@floating-ui/
|
|
21
|
+
middlewareData: import("@floating-ui/core").MiddlewareData;
|
|
22
22
|
update: () => void;
|
|
23
23
|
isPositioned: boolean;
|
|
24
24
|
floatingStyles: import("react").CSSProperties;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Typography
|
package/utils/action.d.ts
CHANGED
package/utils/action.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.action = void 0;
|
|
4
|
-
const addon_actions_1 = require("@storybook/addon-actions");
|
|
5
4
|
function action(name, handler) {
|
|
6
5
|
return function (...args) {
|
|
7
|
-
|
|
6
|
+
// eslint-disable-next-line no-console
|
|
7
|
+
console.log(name, ...args);
|
|
8
8
|
handler(...args);
|
|
9
9
|
};
|
|
10
10
|
}
|