@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.
Files changed (84) hide show
  1. package/_file-input-base/file-input-base.js +8 -2
  2. package/avatar/README.md +8 -0
  3. package/avatar/avatar.stories.js +1 -1
  4. package/avatar-file-input/README.md +1 -0
  5. package/badge/README.md +1 -0
  6. package/button/README.md +68 -0
  7. package/button/button.stories.js +0 -1
  8. package/button-group/README.md +1 -0
  9. package/button-list/README.md +1 -0
  10. package/calendar/README.md +1 -0
  11. package/checkbox/README.md +1 -0
  12. package/checkbox-button/README.md +1 -0
  13. package/checkbox-input/README.md +1 -0
  14. package/chip/README.md +1 -0
  15. package/color-radio/README.md +8 -0
  16. package/color-radio-group/README.md +9 -0
  17. package/combobox/README.md +12 -0
  18. package/config/icons-config.d.ts +1 -1
  19. package/config/icons-config.js +1 -1
  20. package/css/avatar.css +1 -1
  21. package/css/button-list.css +2 -2
  22. package/css/button.css +8 -8
  23. package/css/checkbox-button.css +2 -2
  24. package/css/checkbox.css +4 -4
  25. package/css/color-radio-group.css +1 -1
  26. package/css/color-radio.css +1 -1
  27. package/css/datetime-picker.css +1 -1
  28. package/css/dropdown.css +1 -1
  29. package/css/dropzone.css +3 -3
  30. package/css/error-message.css +1 -1
  31. package/css/image-gallery.css +1 -1
  32. package/css/input.css +2 -2
  33. package/css/layout.css +1 -1
  34. package/css/list-item.css +2 -2
  35. package/css/multi-combobox.css +2 -2
  36. package/css/pagination.css +2 -2
  37. package/css/paper.css +1 -1
  38. package/css/radio.css +4 -4
  39. package/css/tabs.css +8 -8
  40. package/css/toggle.css +2 -2
  41. package/css/tooltip.css +2 -2
  42. package/date-picker/README.md +9 -0
  43. package/date-picker-input/README.md +11 -0
  44. package/date-range-picker/README.md +1 -0
  45. package/date-range-picker-input/README.md +1 -0
  46. package/datetime-picker/README.md +13 -0
  47. package/datetime-picker-input/README.md +1 -0
  48. package/dropdown/README.md +1 -0
  49. package/dropzone/README.md +8 -0
  50. package/dropzone/dropzone.stories.js +1 -1
  51. package/error-message/README.md +7 -0
  52. package/file-input/README.md +11 -0
  53. package/file-input/file-input.js +5 -17
  54. package/flash-messages/README.md +23 -0
  55. package/form-component/README.md +7 -0
  56. package/hooks/use-dropdown.d.ts +2 -2
  57. package/icon/README.md +11 -0
  58. package/input/README.md +8 -0
  59. package/label/README.md +7 -0
  60. package/list-item/README.md +7 -0
  61. package/loader/README.md +7 -0
  62. package/message/README.md +1 -0
  63. package/modal/README.md +24 -0
  64. package/multi-combobox/README.md +1 -0
  65. package/multi-select/README.md +1 -0
  66. package/package.json +1 -1
  67. package/pagination/README.md +1 -0
  68. package/paper/README.md +1 -0
  69. package/radio/README.md +1 -0
  70. package/radio-group/README.md +1 -0
  71. package/raster-image/README.md +1 -0
  72. package/select/README.md +1 -0
  73. package/tabs/README.md +1 -0
  74. package/text-input/README.md +1 -0
  75. package/text-link/README.md +34 -0
  76. package/textarea/README.md +1 -0
  77. package/time-picker/README.md +1 -0
  78. package/time-picker-input/README.md +1 -0
  79. package/toggle/README.md +1 -0
  80. package/tooltip/README.md +1 -0
  81. package/tooltip/use-tooltip.d.ts +4 -4
  82. package/typography/README.md +1 -0
  83. package/utils/action.d.ts +2 -1
  84. 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
- const res = await props.onUploadFile(e.target.files[0]);
32
- props.onChange(res, e);
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);
@@ -0,0 +1,8 @@
1
+ # Avatar
2
+
3
+ ## CSS dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/icon/icon.css");
7
+ @import url("@uxf/ui/avatar/avatar.css");
8
+ ```
@@ -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://i.picsum.photos/id/1062/5092/3395.jpg?hmac=o9m7qeU51uOLfXvepXcTrk2ZPiSBJEkiiOp-Qvxja-k" }),
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
@@ -0,0 +1 @@
1
+ # Badge
@@ -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
+ ```
@@ -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,8 @@
1
+ # ColorRadio
2
+
3
+ ## Css dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/icon/icon.css");
7
+ @import url("@uxf/ui/color-radio/color-radio.css");
8
+ ```
@@ -0,0 +1,9 @@
1
+ # ColorRadioGroup
2
+
3
+ ## CSS dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/icon/icon.css");
7
+ @import url("@uxf/ui/color-radio-group/color-radio-group.css");
8
+ @import url("@uxf/ui/form-component/form-component.css");
9
+ ```
@@ -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
+ ```
@@ -1,2 +1,2 @@
1
- export declare const ICONS_VERSION = "1687765245583";
1
+ export declare const ICONS_VERSION = "1696711976722";
2
2
  export declare const ICON_SPRITE = "/.storybook/static-assets/icons-generated/_icon-sprite.svg";
@@ -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 = "1687765245583";
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 rounded-inherit object-cover;
5
+ @apply rounded-inherit absolute left-0 top-0 block h-full w-full object-cover;
6
6
  }
7
7
 
8
8
  :root .light & {
@@ -6,7 +6,7 @@
6
6
  }
7
7
 
8
8
  &__menu-items {
9
- @apply absolute right-0 z-dropdown mt-2 w-40 divide-y rounded-md shadow-lg ring-1 focus:outline-none;
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 is-hoverable:hover:cursor-pointer;
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 text-lightLow;
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 text-darkLow;
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 text-lightLow;
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 text-lightLow;
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 text-lightLow;
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 text-lightLow;
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 border focus-visible:ring-primary;
301
+ @apply focus-visible:ring-primary border;
302
302
 
303
303
  :root .light & {
304
- @apply border-lightBorder bg-white text-lightMedium is-hoverable:bg-gray-100;
304
+ @apply border-lightBorder text-lightMedium is-hoverable:bg-gray-100 bg-white;
305
305
  }
306
306
 
307
307
  :root .dark & {
@@ -9,7 +9,7 @@
9
9
  }
10
10
 
11
11
  :root .light & {
12
- @apply bg-gray-200 focus-visible:ring-primary;
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 bg-gray-800 focus-visible:ring-primary focus-visible:ring-offset-gray-900;
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 focus-visible:before:border-primary;
38
+ @apply focus-visible:before:border-primary border-gray-400 bg-white;
39
39
 
40
40
  &.is-selected {
41
- @apply border-transparent bg-primary is-hoverable:bg-primary-700;
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 focus-visible:before:border-primary;
80
+ @apply focus-visible:before:border-primary border-gray-400 bg-gray-900;
81
81
 
82
82
  &.is-selected {
83
- @apply border-transparent bg-primary is-hoverable:bg-primary-300;
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 is-disabled:pointer-events-none;
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;
@@ -20,7 +20,7 @@
20
20
  }
21
21
 
22
22
  &.is-disabled {
23
- @apply pointer-events-none after:absolute after:inset-0 after:rounded-inherit;
23
+ @apply after:rounded-inherit pointer-events-none after:absolute after:inset-0;
24
24
 
25
25
  :root .light & {
26
26
  @apply after:bg-white/50;
@@ -4,7 +4,7 @@
4
4
  }
5
5
 
6
6
  &__tab {
7
- @apply px-3 py-0 text-body2;
7
+ @apply text-body2 px-3 py-0;
8
8
 
9
9
  height: theme("inputSize.xs");
10
10
  }
package/css/dropdown.css CHANGED
@@ -1,5 +1,5 @@
1
1
  .uxf-dropdown {
2
- @apply absolute z-dropdown w-full overflow-y-auto rounded-md py-1 text-base shadow-lg ring-1 ring-black
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 rounded-inherit border-2 border-dashed
10
- border-lightBorder p-4 text-[14px] text-lightLow;
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 bg-lightBorder/50;
21
+ @apply bg-lightBorder/50 cursor-not-allowed;
22
22
  }
23
23
  }
24
24
  }
@@ -1,3 +1,3 @@
1
1
  .uxf-error-message {
2
- @apply mt-1 block text-right text-error;
2
+ @apply text-error mt-1 block text-right;
3
3
  }
@@ -1,5 +1,5 @@
1
1
  .uxf-image-gallery {
2
- @apply fixed inset-0 z-imageGallery flex flex-col;
2
+ @apply z-imageGallery fixed inset-0 flex flex-col;
3
3
 
4
4
  &__content {
5
5
  @apply mx-auto max-h-[calc(100%-128px)] grow;
package/css/input.css CHANGED
@@ -234,11 +234,11 @@
234
234
 
235
235
  .uxf-input__element {
236
236
  :root .light & {
237
- @apply border-gray-200 text-error placeholder:text-error;
237
+ @apply text-error placeholder:text-error border-gray-200;
238
238
  }
239
239
 
240
240
  :root .dark & {
241
- @apply border-gray-700 text-error placeholder:text-error;
241
+ @apply text-error placeholder:text-error border-gray-700;
242
242
  }
243
243
  }
244
244
  }
package/css/layout.css CHANGED
@@ -9,7 +9,7 @@ body {
9
9
  }
10
10
 
11
11
  .uxf-app-bar {
12
- @apply fixed left-0 top-0 flex h-14 w-full items-center bg-primary-600;
12
+ @apply bg-primary-600 fixed left-0 top-0 flex h-14 w-full items-center;
13
13
 
14
14
  &__left-container {
15
15
  @apply flex grow items-center;
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 outline-none
3
- transition-opacity before:absolute before:inset-0 before:rounded-lg focus-visible:before:border-2 is-hoverable:opacity-75;
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;
@@ -25,7 +25,7 @@
25
25
  }
26
26
 
27
27
  :root .light & {
28
- @apply bg-white text-lightHigh before:border-gray-200;
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 text-darkHigh before:border-gray-700;
36
+ @apply text-darkHigh bg-gray-800 before:border-gray-700;
37
37
 
38
38
  .is-empty {
39
39
  @apply text-darkLow;
@@ -16,11 +16,11 @@
16
16
  @apply z-10;
17
17
 
18
18
  :root .light & {
19
- @apply border border-primary bg-indigo-50 text-primary-600;
19
+ @apply border-primary text-primary-600 border bg-indigo-50;
20
20
  }
21
21
 
22
22
  :root .dark & {
23
- @apply border border-primary-700 bg-indigo-900/20 text-primary-300;
23
+ @apply border-primary-700 text-primary-300 border bg-indigo-900/20;
24
24
  }
25
25
  }
26
26
 
package/css/paper.css CHANGED
@@ -1,3 +1,3 @@
1
1
  .uxf-paper {
2
- @apply rounded-lg bg-white shadow-paper;
2
+ @apply shadow-paper rounded-lg bg-white;
3
3
  }
package/css/radio.css CHANGED
@@ -28,10 +28,10 @@
28
28
  }
29
29
 
30
30
  :root .light & {
31
- @apply border-gray-400 focus-visible:ring-primary;
31
+ @apply focus-visible:ring-primary border-gray-400;
32
32
 
33
33
  &.is-selected {
34
- @apply border-none bg-primary;
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 border-gray-400 focus-visible:ring-primary focus-visible:ring-offset-gray-900;
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 bg-primary;
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 py-2
58
- text-center outline-none transition-colors
59
- focus-visible:ring-2 focus-visible:ring-offset-1 is-disabled:pointer-events-none;
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 focus-visible:ring-primary;
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 focus-visible:ring-primary
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 bg-gray-100 text-lightMedium hover:bg-primary-100 hover:text-primary-600
102
- focus-visible:ring-primary focus-visible:ring-offset-gray-100;
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 text-darkMedium hover:bg-gray-800 focus-visible:ring-primary
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 bg-gray-200 focus-visible:ring-primary;
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 bg-gray-400 focus-visible:ring-primary focus-visible:ring-offset-gray-900;
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 bg-lightHigh p-3 text-white;
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 bg-lightHigh;
5
+ @apply z-tooltip bg-lightHigh rounded-sm;
6
6
  }
7
7
  }
@@ -0,0 +1,9 @@
1
+ # DatePicker
2
+
3
+ ## CSS dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/button/button.css");
7
+ @import url("@uxf/ui/calendar/calendar.css");
8
+ @import url("@uxf/ui/date-picker/date-picker.css");
9
+ ```
@@ -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
@@ -0,0 +1,8 @@
1
+ # Dropzone
2
+
3
+ ## CSS dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/icon/icon.css");
7
+ @import url("@uxf/ui/dropzone/dropzone.css");
8
+ ```
@@ -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: "rounded-lg bg-primary-600 px-4 py-2 font-bold text-white" }, "JSX label"), noClick: 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: "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,7 @@
1
+ # ErrorMessage
2
+
3
+ ## CSS dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/error-message/error-message.css");
7
+ ```
@@ -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
+ ```
@@ -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 onChange = async (_, e) => {
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
- try {
56
- const response = await props.onUploadFile(file);
57
- await props.onChange(response);
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: props.onUploadFile, ref: ref, value: props.value }),
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
+ ```
@@ -0,0 +1,7 @@
1
+ # FormComponent
2
+
3
+ ## CSS dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/form-component/form-component.css");
7
+ ```
@@ -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/react").MiddlewareData;
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/react").MiddlewareData;
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
@@ -0,0 +1,11 @@
1
+ # Icon
2
+
3
+ ## CSS dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/icon/icon.css");
7
+ ```
8
+
9
+ ## Implementation
10
+
11
+ TODO
@@ -0,0 +1,8 @@
1
+ # Input
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
+ ```
@@ -0,0 +1,7 @@
1
+ # Label
2
+
3
+ ## CSS dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/label/label.css");
7
+ ```
@@ -0,0 +1,7 @@
1
+ # ListItem
2
+
3
+ ## CSS Dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/list-item/list-item.css");
7
+ ```
@@ -0,0 +1,7 @@
1
+ # Loader
2
+
3
+ ## CSS dependencies
4
+
5
+ ```css
6
+ @import url("@uxf/ui/loader/loader.css");
7
+ ```
@@ -0,0 +1 @@
1
+ # Message
@@ -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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/ui",
3
- "version": "10.0.0-beta.76",
3
+ "version": "10.0.0-beta.79",
4
4
  "description": "",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -0,0 +1 @@
1
+ # Pagination
@@ -0,0 +1 @@
1
+ # Paper
@@ -0,0 +1 @@
1
+ # Radio
@@ -0,0 +1 @@
1
+ # RadioGroup
@@ -0,0 +1 @@
1
+ # RasterImage
@@ -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
@@ -0,0 +1 @@
1
+ # Toggle
@@ -0,0 +1 @@
1
+ # Tooltip
@@ -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/react").Strategy;
12
- middlewareData: import("@floating-ui/react").MiddlewareData;
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/react").Strategy;
19
+ strategy: import("@floating-ui/utils").Strategy;
20
20
  placement: Placement;
21
- middlewareData: import("@floating-ui/react").MiddlewareData;
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
@@ -1,2 +1,3 @@
1
- import { HandlerFunction } from "@storybook/addon-actions";
1
+ type HandlerFunction = (...args: any[]) => void;
2
2
  export declare function action(name: string, handler: HandlerFunction): HandlerFunction;
3
+ export {};
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
- (0, addon_actions_1.action)(name)(...args);
6
+ // eslint-disable-next-line no-console
7
+ console.log(name, ...args);
8
8
  handler(...args);
9
9
  };
10
10
  }