@uxf/ui 11.20.0 → 11.21.1

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 (111) hide show
  1. package/_file-input-base/file-input-base.js +1 -1
  2. package/_input-with-popover/input-with-popover.d.ts +1 -4
  3. package/_input-with-popover/input-with-popover.js +13 -10
  4. package/alert-bubble/alert-bubble.d.ts +2 -2
  5. package/alert-bubble/alert-bubble.js +1 -1
  6. package/avatar-file-input/avatar-file-input.d.ts +1 -1
  7. package/avatar-file-input/avatar-file-input.js +2 -2
  8. package/calendar/calendar-day-cell.js +2 -2
  9. package/checkbox/checkbox.d.ts +1 -1
  10. package/checkbox-input/checkbox-input.d.ts +1 -1
  11. package/checkbox-input/checkbox-input.js +1 -1
  12. package/combobox/README.md +5 -4
  13. package/combobox/combobox.d.ts +40 -14
  14. package/combobox/combobox.js +64 -13
  15. package/combobox/combobox.stories.d.ts +2 -5
  16. package/combobox/index.d.ts +1 -1
  17. package/css/alert-bubble.css +8 -16
  18. package/css/avatar-file-input.css +13 -24
  19. package/css/avatar.css +1 -5
  20. package/css/badge.css +1 -5
  21. package/css/button-list.css +4 -18
  22. package/css/button.css +21 -89
  23. package/css/calendar.css +23 -41
  24. package/css/checkbox-button.css +54 -55
  25. package/css/checkbox-input.css +2 -4
  26. package/css/checkbox.css +47 -59
  27. package/css/chip.css +80 -140
  28. package/css/color-radio-group.css +2 -5
  29. package/css/color-radio.css +1 -5
  30. package/css/combobox.css +7 -0
  31. package/css/date-picker.css +2 -4
  32. package/css/dialog.css +2 -5
  33. package/css/dropdown.css +54 -40
  34. package/css/dropzone.css +4 -9
  35. package/css/file-input.css +5 -21
  36. package/css/input-with-popover.css +1 -5
  37. package/css/input.css +40 -55
  38. package/css/label.css +1 -5
  39. package/css/list-item.css +10 -13
  40. package/css/loader.css +4 -4
  41. package/css/message.css +2 -8
  42. package/css/multi-combobox.css +81 -56
  43. package/css/multi-select.css +98 -13
  44. package/css/pagination.css +5 -20
  45. package/css/radio-group.css +51 -92
  46. package/css/radio.css +49 -58
  47. package/css/select.css +11 -0
  48. package/css/tabs.css +12 -36
  49. package/css/text-link.css +3 -6
  50. package/css/textarea.css +16 -22
  51. package/css/toggle.css +20 -40
  52. package/dropdown/dropdown.js +1 -1
  53. package/dropzone/dropzone-input.js +2 -2
  54. package/file-input/file-input.js +2 -2
  55. package/flash-messages/flash-messages.js +2 -2
  56. package/icon/icon.d.ts +1 -0
  57. package/icon/icon.js +3 -3
  58. package/icon/index.d.ts +1 -0
  59. package/image-gallery/components/close-button.js +1 -1
  60. package/image-gallery/components/next-button.js +1 -1
  61. package/image-gallery/components/prev-button.js +1 -1
  62. package/input/README.md +1 -1
  63. package/input/index.d.ts +2 -0
  64. package/input/index.js +2 -0
  65. package/input/input-arrow-icon.d.ts +8 -0
  66. package/input/input-arrow-icon.js +16 -0
  67. package/input/input.d.ts +2 -1
  68. package/input/input.js +7 -7
  69. package/input/input.stories.d.ts +1 -0
  70. package/message/message.d.ts +1 -1
  71. package/multi-combobox/README.md +5 -2
  72. package/multi-combobox/multi-combobox.d.ts +2 -2
  73. package/multi-combobox/multi-combobox.js +118 -32
  74. package/multi-combobox/multi-combobox.stories.js +4 -6
  75. package/multi-combobox/types.d.ts +3 -1
  76. package/multi-select/README.md +5 -3
  77. package/multi-select/multi-select.d.ts +2 -2
  78. package/multi-select/multi-select.js +79 -23
  79. package/multi-select/multi-select.stories.js +1 -2
  80. package/multi-select/types.d.ts +3 -1
  81. package/package.json +4 -4
  82. package/radio/radio.d.ts +1 -1
  83. package/radio-group/radio-group.d.ts +2 -2
  84. package/radio-group/radio-group.js +1 -1
  85. package/raster-image/empty-image.d.ts +9 -0
  86. package/raster-image/empty-image.js +13 -0
  87. package/raster-image/img-sources.d.ts +1 -1
  88. package/raster-image/img-sources.js +6 -6
  89. package/raster-image/raster-image.d.ts +16 -12
  90. package/raster-image/raster-image.js +19 -21
  91. package/raster-image/raster-image.stories.d.ts +2 -1
  92. package/raster-image/responsive-img-sources.d.ts +15 -0
  93. package/raster-image/responsive-img-sources.js +20 -0
  94. package/select/README.md +5 -3
  95. package/select/select.d.ts +38 -13
  96. package/select/select.js +91 -13
  97. package/select/select.stories.js +3 -1
  98. package/text-input/text-input.js +2 -2
  99. package/textarea/textarea.js +2 -2
  100. package/toggle/toggle.d.ts +1 -1
  101. package/tooltip/tooltip.js +2 -2
  102. package/utils/files/get-file-icon.d.ts +1 -1
  103. package/_select-base/_select-base.d.ts +0 -58
  104. package/_select-base/_select-base.js +0 -107
  105. package/_select-base/index.d.ts +0 -2
  106. package/_select-base/index.js +0 -5
  107. package/css/select-base.css +0 -50
  108. package/multi-combobox/_multi-combobox-base.d.ts +0 -8
  109. package/multi-combobox/_multi-combobox-base.js +0 -141
  110. package/multi-select/_multi-select-base.d.ts +0 -8
  111. package/multi-select/_multi-select-base.js +0 -78
package/css/radio.css CHANGED
@@ -1,101 +1,92 @@
1
1
  .uxf-radio {
2
- @apply flex shrink-0 items-center justify-center rounded-full border transition focus-visible:ring-2;
2
+ @apply focus-visible:ring-primary flex shrink-0 items-center justify-center rounded-full border border-gray-400
3
+ transition focus-visible:ring-2;
4
+
5
+ :root .dark & {
6
+ @apply focus-visible:ring-primary border-gray-400 focus-visible:ring-offset-gray-900;
7
+ }
3
8
 
4
9
  &__inner {
5
10
  @apply block rounded-full opacity-0 transition;
6
11
  }
7
12
 
8
13
  &.is-selected {
9
- .uxf-radio__inner {
10
- @apply opacity-100;
11
- }
12
- }
14
+ @apply bg-primary border-none;
13
15
 
14
- &--size-default {
15
- @apply h-4 w-4;
16
+ :root .dark & {
17
+ @apply bg-primary border-none;
18
+ }
16
19
 
17
20
  .uxf-radio__inner {
18
- @apply h-1.5 w-1.5;
21
+ @apply bg-white opacity-100;
22
+
23
+ :root .dark & {
24
+ @apply bg-white;
25
+ }
19
26
  }
20
27
  }
21
28
 
22
- &--size-lg {
23
- @apply size-6;
29
+ &.is-disabled {
30
+ @apply pointer-events-none border-gray-200;
24
31
 
25
- .uxf-radio__inner {
26
- @apply h-2.5 w-2.5;
32
+ :root .dark & {
33
+ @apply pointer-events-none border-gray-600;
27
34
  }
28
- }
29
-
30
- :root .light & {
31
- @apply focus-visible:ring-primary border-gray-400;
32
35
 
33
36
  &.is-selected {
34
- @apply bg-primary border-none;
37
+ @apply bg-gray-200;
35
38
 
36
- .uxf-radio__inner {
37
- @apply bg-white;
39
+ :root .dark & {
40
+ @apply bg-gray-600;
38
41
  }
39
42
  }
40
43
 
41
- &.is-disabled {
42
- @apply pointer-events-none border-gray-200;
43
-
44
- &.is-selected {
45
- @apply bg-gray-200;
46
- }
44
+ .uxf-radio__inner {
45
+ @apply bg-gray-400;
47
46
 
48
- .uxf-radio__inner {
49
- @apply bg-gray-400;
47
+ :root .dark & {
48
+ @apply bg-gray-800;
50
49
  }
51
50
  }
51
+ }
52
52
 
53
- &.is-invalid {
53
+ &.is-invalid {
54
+ @apply border-error;
55
+
56
+ :root .dark & {
54
57
  @apply border-error;
58
+ }
55
59
 
56
- &.is-selected {
57
- @apply bg-error;
58
- }
60
+ &.is-selected {
61
+ @apply bg-error;
59
62
 
60
- .uxf-radio__inner {
61
- @apply bg-white;
63
+ :root .dark & {
64
+ @apply bg-error;
62
65
  }
63
66
  }
64
- }
65
-
66
- :root .dark & {
67
- @apply focus-visible:ring-primary border-gray-400 focus-visible:ring-offset-gray-900;
68
67
 
69
- &.is-selected {
70
- @apply bg-primary border-none;
68
+ .uxf-radio__inner {
69
+ @apply bg-white;
71
70
 
72
- .uxf-radio__inner {
71
+ :root .dark & {
73
72
  @apply bg-white;
74
73
  }
75
74
  }
75
+ }
76
76
 
77
- &.is-disabled {
78
- @apply pointer-events-none border-gray-600;
79
-
80
- &.is-selected {
81
- @apply bg-gray-600;
82
- }
77
+ &--size-default {
78
+ @apply size-4;
83
79
 
84
- .uxf-radio__inner {
85
- @apply bg-gray-800;
86
- }
80
+ .uxf-radio__inner {
81
+ @apply size-1.5;
87
82
  }
83
+ }
88
84
 
89
- &.is-invalid {
90
- @apply border-error;
91
-
92
- &.is-selected {
93
- @apply bg-error;
94
- }
85
+ &--size-lg {
86
+ @apply size-6;
95
87
 
96
- .uxf-radio__inner {
97
- @apply bg-white;
98
- }
88
+ .uxf-radio__inner {
89
+ @apply size-2.5;
99
90
  }
100
91
  }
101
92
  }
package/css/select.css ADDED
@@ -0,0 +1,11 @@
1
+ .uxf-select {
2
+ .uxf-input__element {
3
+ align-items: center;
4
+ display: flex;
5
+ min-width: 0;
6
+ }
7
+
8
+ .uxf-input__element-text {
9
+ @apply truncate;
10
+ }
11
+ }
package/css/tabs.css CHANGED
@@ -11,11 +11,8 @@
11
11
  @apply mb-6 w-full overflow-auto;
12
12
 
13
13
  &--default {
14
- @apply relative before:pointer-events-none before:absolute before:bottom-0 before:w-full before:border-b-2;
15
-
16
- :root .light & {
17
- @apply before:border-b-gray-100;
18
- }
14
+ @apply relative before:pointer-events-none before:absolute before:bottom-0 before:w-full before:border-b-2
15
+ before:border-b-gray-100;
19
16
 
20
17
  :root .dark & {
21
18
  @apply before:border-b-gray-800;
@@ -23,11 +20,7 @@
23
20
  }
24
21
 
25
22
  &--segmented {
26
- @apply rounded-lg;
27
-
28
- :root .light & {
29
- @apply bg-gray-100;
30
- }
23
+ @apply rounded-lg bg-gray-100;
31
24
 
32
25
  :root .dark & {
33
26
  @apply bg-gray-700;
@@ -59,12 +52,9 @@
59
52
  transition-colors focus-visible:ring-2 focus-visible:ring-offset-1;
60
53
 
61
54
  &--default {
62
- @apply relative rounded-lg before:absolute before:bottom-[-6px] before:w-full before:border-b-2
63
- before:opacity-0 before:transition;
64
-
65
- :root .light & {
66
- @apply text-lightMedium focus-visible:ring-primary hover:bg-gray-100;
67
- }
55
+ @apply text-lightMedium focus-visible:ring-primary relative rounded-lg before:absolute before:bottom-[-6px]
56
+ before:w-full before:border-b-2
57
+ before:opacity-0 before:transition hover:bg-gray-100;
68
58
 
69
59
  :root .dark & {
70
60
  @apply text-darkMedium focus-visible:ring-primary hover:bg-gray-800
@@ -72,11 +62,7 @@
72
62
  }
73
63
 
74
64
  &.is-active {
75
- @apply before:opacity-100;
76
-
77
- :root .light & {
78
- @apply text-lightHigh before:border-b-primary hover:bg-transparent;
79
- }
65
+ @apply text-lightHigh before:border-b-primary before:opacity-100 hover:bg-transparent;
80
66
 
81
67
  :root .dark & {
82
68
  @apply text-darkHigh before:border-b-primary hover:bg-transparent;
@@ -84,9 +70,7 @@
84
70
  }
85
71
 
86
72
  &.is-disabled {
87
- :root .light & {
88
- @apply text-lightLow;
89
- }
73
+ @apply text-lightLow;
90
74
 
91
75
  :root .dark & {
92
76
  @apply text-darkLow;
@@ -95,12 +79,8 @@
95
79
  }
96
80
 
97
81
  &--segmented {
98
- @apply rounded;
99
-
100
- :root .light & {
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
- }
82
+ @apply text-lightMedium hover:bg-primary-100 hover:text-primary-600 focus-visible:ring-primary rounded
83
+ bg-gray-100 focus-visible:ring-offset-gray-100;
104
84
 
105
85
  :root .dark & {
106
86
  @apply text-darkMedium focus-visible:ring-primary bg-gray-700 hover:bg-gray-800
@@ -108,9 +88,7 @@
108
88
  }
109
89
 
110
90
  &.is-active {
111
- :root .light & {
112
- @apply bg-primary text-white;
113
- }
91
+ @apply bg-primary text-white;
114
92
 
115
93
  :root .dark & {
116
94
  @apply bg-primary text-white;
@@ -118,9 +96,7 @@
118
96
  }
119
97
 
120
98
  &.is-disabled {
121
- :root .light & {
122
- @apply text-gray-400;
123
- }
99
+ @apply text-gray-400;
124
100
 
125
101
  :root .dark & {
126
102
  @apply text-gray-500;
package/css/text-link.css CHANGED
@@ -1,10 +1,7 @@
1
1
  .uxf-text-link {
2
- @apply relative underline outline-none transition before:absolute before:-inset-1
3
- focus-visible:before:rounded-lg focus-visible:before:border-2;
4
-
5
- :root .light & {
6
- @apply text-primary focus-visible:before:border-primary is-hoverable:text-primary-400;
7
- }
2
+ @apply text-primary focus-visible:before:border-primary is-hoverable:text-primary-400 relative underline outline-none
3
+ transition before:absolute
4
+ before:-inset-1 focus-visible:before:rounded-lg focus-visible:before:border-2;
8
5
 
9
6
  :root .dark & {
10
7
  @apply text-primary focus-visible:before:border-primary is-hoverable:text-primary-400;
package/css/textarea.css CHANGED
@@ -1,9 +1,7 @@
1
1
  .uxf-textarea {
2
- :root .light & {
3
- --bg-color: theme("colors.white");
4
- --border-color: theme("colors.gray.200");
5
- --color: theme("colors.gray.900");
6
- }
2
+ --bg-color: theme("colors.white");
3
+ --border-color: theme("colors.gray.200");
4
+ --color: theme("colors.gray.900");
7
5
 
8
6
  :root .dark & {
9
7
  --bg-color: theme("colors.gray.800");
@@ -35,7 +33,8 @@
35
33
  }
36
34
 
37
35
  &.is-focused {
38
- :root .light &,
36
+ --border-color: theme("colors.primary.DEFAULT");
37
+
39
38
  :root .dark & {
40
39
  --border-color: theme("colors.primary.DEFAULT");
41
40
  }
@@ -46,7 +45,9 @@
46
45
  }
47
46
 
48
47
  &.is-invalid {
49
- :root .light &,
48
+ --border-color: var(--color);
49
+ --color: theme("colors.error.DEFAULT");
50
+
50
51
  :root .dark & {
51
52
  --border-color: var(--color);
52
53
  --color: theme("colors.error.DEFAULT");
@@ -54,14 +55,12 @@
54
55
  }
55
56
 
56
57
  &.is-readonly {
58
+ --bg-color: theme("colors.gray.300");
59
+ --border-color: theme("colors.gray.200");
60
+
57
61
  cursor: text;
58
62
  pointer-events: none;
59
63
 
60
- :root .light & {
61
- --bg-color: theme("colors.gray.300");
62
- --border-color: theme("colors.gray.200");
63
- }
64
-
65
64
  :root .dark & {
66
65
  --bg-color: theme("colors.gray.500");
67
66
  --border-color: theme("colors.gray.700");
@@ -73,11 +72,9 @@
73
72
  }
74
73
 
75
74
  &.is-disabled {
76
- cursor: not-allowed;
75
+ --bg-color: theme("colors.gray.300");
77
76
 
78
- :root .light & {
79
- --bg-color: theme("colors.gray.300");
80
- }
77
+ cursor: not-allowed;
81
78
 
82
79
  :root .dark & {
83
80
  --bg-color: theme("colors.gray.600");
@@ -96,14 +93,11 @@
96
93
  &:hover,
97
94
  &:focus {
98
95
  appearance: none;
96
+ background-color: theme("colors.white");
97
+ -webkit-box-shadow: inset 0 0 0 1000px theme("colors.white"); /* stylelint-disable-line property-no-vendor-prefix */
98
+ box-shadow: inset 0 0 0 1000px theme("colors.white");
99
99
  transition: background-color 5000s ease-in-out 0s !important;
100
100
 
101
- :root .light & {
102
- background-color: theme("colors.white");
103
- -webkit-box-shadow: inset 0 0 0 1000px theme("colors.white"); /* stylelint-disable-line property-no-vendor-prefix */
104
- box-shadow: inset 0 0 0 1000px theme("colors.white");
105
- }
106
-
107
101
  :root .dark & {
108
102
  -webkit-text-fill-color: theme("colors.gray.300");
109
103
  background-color: theme("colors.gray.800");
package/css/toggle.css CHANGED
@@ -1,6 +1,10 @@
1
1
  .uxf-toggle {
2
- @apply relative inline-flex h-6 w-12 shrink-0 items-center rounded-full p-0.5 outline-none ring-offset-2
3
- focus-visible:ring-2 [&>*]:active:w-[30px];
2
+ @apply focus-visible:ring-primary relative inline-flex h-6 w-12 shrink-0 items-center rounded-full bg-gray-200 p-0.5
3
+ outline-none ring-offset-2 focus-visible:ring-2 [&>*]:active:w-[30px];
4
+
5
+ :root .dark & {
6
+ @apply focus-visible:ring-primary bg-gray-400 focus-visible:ring-offset-gray-900;
7
+ }
4
8
 
5
9
  &__wrapper {
6
10
  @apply flex items-center justify-between space-x-4 p-4;
@@ -15,11 +19,7 @@
15
19
  }
16
20
 
17
21
  &__label {
18
- @apply w-full;
19
-
20
- :root .light & {
21
- @apply text-lightMedium;
22
- }
22
+ @apply text-lightMedium w-full;
23
23
 
24
24
  :root .dark & {
25
25
  @apply text-darkMedium;
@@ -27,52 +27,32 @@
27
27
  }
28
28
 
29
29
  &__inner {
30
- @apply inline-block h-5 w-5 transform rounded-full bg-white transition-all;
31
- }
30
+ @apply inline-block h-5 w-5 transform rounded-full bg-white bg-white transition-all;
32
31
 
33
- &.is-disabled {
34
- @apply pointer-events-none;
32
+ :root .dark & {
33
+ @apply bg-gray-900;
34
+ }
35
35
  }
36
36
 
37
37
  &.is-selected {
38
- @apply [&>*]:translate-x-6 [&>*]:active:translate-x-[14px];
39
- }
40
-
41
- :root .light & {
42
- @apply focus-visible:ring-primary bg-gray-200;
43
-
44
- &__inner {
45
- @apply bg-white;
46
- }
38
+ @apply bg-primary [&>*]:translate-x-6 [&>*]:active:translate-x-[14px];
47
39
 
48
- &.is-selected {
40
+ :root .dark & {
49
41
  @apply bg-primary;
50
42
  }
51
-
52
- &.is-disabled {
53
- @apply bg-gray-100;
54
-
55
- .uxf-toggle__inner {
56
- @apply bg-gray-400;
57
- }
58
- }
59
43
  }
60
44
 
61
- :root .dark & {
62
- @apply focus-visible:ring-primary bg-gray-400 focus-visible:ring-offset-gray-900;
63
-
64
- &.is-selected {
65
- @apply bg-primary;
66
- }
45
+ &.is-disabled {
46
+ @apply pointer-events-none bg-gray-100;
67
47
 
68
- &__inner {
69
- @apply bg-gray-900;
48
+ :root .dark & {
49
+ @apply bg-gray-700;
70
50
  }
71
51
 
72
- &.is-disabled {
73
- @apply bg-gray-700;
52
+ .uxf-toggle__inner {
53
+ @apply bg-gray-400;
74
54
 
75
- .uxf-toggle__inner {
55
+ :root .dark & {
76
56
  @apply bg-gray-500;
77
57
  }
78
58
  }
@@ -39,7 +39,7 @@ const Item = (0, react_1.forwardRef)((props, ref) => {
39
39
  });
40
40
  Item.displayName = "UxfUiDropdownItem";
41
41
  const Items = (0, react_1.forwardRef)((props, ref) => {
42
- return (react_1.default.createElement("div", { className: (0, cx_1.cx)("uxf-dropdown__items", props.className), ref: ref, role: props.role }, props.children));
42
+ return (react_1.default.createElement("div", { className: (0, cx_1.cx)("uxf-dropdown", props.className), ref: ref, role: props.role }, props.children));
43
43
  });
44
44
  exports.Dropdown = {
45
45
  Item,
@@ -24,8 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.DropzoneInput = void 0;
27
+ const compose_refs_1 = require("@uxf/core-react/utils/compose-refs");
27
28
  const classes_1 = require("@uxf/core/constants/classes");
28
- const composeRefs_1 = require("@uxf/core/utils/composeRefs");
29
29
  const cx_1 = require("@uxf/core/utils/cx");
30
30
  const react_1 = __importStar(require("react"));
31
31
  const react_dropzone_1 = require("react-dropzone");
@@ -128,7 +128,7 @@ exports.DropzoneInput = (0, react_1.forwardRef)((props, ref) => {
128
128
  react_1.default.createElement("label", { ...getRootProps({
129
129
  className: (0, cx_1.cx)("uxf-dropzone__label", props.isInvalid && classes_1.CLASSES.IS_INVALID, props.isDisabled && classes_1.CLASSES.IS_DISABLED, props.noClick && "cursor-auto"),
130
130
  onClick: labelOnCLick,
131
- }), ref: (0, composeRefs_1.composeRefs)(ref, rootRef) },
131
+ }), ref: (0, compose_refs_1.composeRefs)(ref, rootRef) },
132
132
  react_1.default.createElement(icon_1.Icon, { className: "uxf-dropzone__label__icon", name: (_b = props.icon) !== null && _b !== void 0 ? _b : "cloud" }),
133
133
  typeof props.label === "string" ? react_1.default.createElement("span", null, props.label) : props.label,
134
134
  react_1.default.createElement("input", { ...getInputProps({
@@ -25,8 +25,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.FileInput = void 0;
27
27
  const use_input_focus_1 = require("@uxf/core-react/hooks/use-input-focus");
28
+ const compose_refs_1 = require("@uxf/core-react/utils/compose-refs");
28
29
  const classes_1 = require("@uxf/core/constants/classes");
29
- const composeRefs_1 = require("@uxf/core/utils/composeRefs");
30
30
  const cx_1 = require("@uxf/core/utils/cx");
31
31
  const context_1 = require("@uxf/ui/context");
32
32
  const input_1 = require("@uxf/ui/input");
@@ -62,7 +62,7 @@ exports.FileInput = (0, react_1.forwardRef)((props, ref) => {
62
62
  };
63
63
  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, name: props.name },
64
64
  react_1.default.createElement(react_1.default.Fragment, null,
65
- 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, maxFileSize: props.maxFileSize, name: props.name, onBlur: input.onBlur, onChange: onChange, onFocus: input.onFocus, onUploadError: props.onUploadError, onUploadFile: onUploadFile, ref: (0, composeRefs_1.composeRefs)(ref, innerRef), value: props.value }),
65
+ 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, maxFileSize: props.maxFileSize, name: props.name, onBlur: input.onBlur, onChange: onChange, onFocus: input.onFocus, onUploadError: props.onUploadError, onUploadFile: onUploadFile, ref: (0, compose_refs_1.composeRefs)(ref, innerRef), value: props.value }),
66
66
  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 },
67
67
  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" }))),
68
68
  react_1.default.createElement("div", { className: "uxf-file-input__label__wrapper" },
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.FlashMessages = void 0;
27
27
  const react_1 = require("@headlessui/react");
28
- const useClickableProps_1 = require("@uxf/core/hooks/useClickableProps");
28
+ const use_clickable_props_1 = require("@uxf/core-react/hooks/use-clickable-props");
29
29
  const react_2 = __importStar(require("react"));
30
30
  const flash_message_1 = require("./flash-message");
31
31
  exports.FlashMessages = (0, react_2.forwardRef)((props, ref) => {
@@ -82,7 +82,7 @@ exports.FlashMessages = (0, react_2.forwardRef)((props, ref) => {
82
82
  closeAll: innerRef.current.closeAll,
83
83
  open: innerRef.current.open,
84
84
  }), []);
85
- const clickableProps = (0, useClickableProps_1.useClickableProps)({
85
+ const clickableProps = (0, use_clickable_props_1.useClickableProps)({
86
86
  className: `uxf-flash-messages__dismissable ${isCollapsed ? "is-collapsed" : ""}`,
87
87
  onMouseEnter: () => setIsCollapsed(false),
88
88
  onMouseLeave: () => setIsCollapsed(true),
package/icon/icon.d.ts CHANGED
@@ -8,6 +8,7 @@ type NameOrComponentType = {
8
8
  Component: any;
9
9
  };
10
10
  export type IconProps = {
11
+ "aria-label"?: string;
11
12
  className?: string;
12
13
  mode?: "meet" | "slice";
13
14
  size?: number;
package/icon/icon.js CHANGED
@@ -42,17 +42,17 @@ exports.Icon = (0, react_1.forwardRef)((props, ref) => {
42
42
  }
43
43
  : props.style;
44
44
  if (CustomComponent) {
45
- return (react_1.default.createElement(CustomComponent, { className: className, preserveAspectRatio: preserveAspectRatio, ref: ref, role: "img", style: style }));
45
+ return (react_1.default.createElement(CustomComponent, { "aria-label": props["aria-label"], className: className, preserveAspectRatio: preserveAspectRatio, ref: ref, role: "img", style: style }));
46
46
  }
47
47
  if (props.name && props.name in componentContext.iconsConfig) {
48
48
  const icon = componentContext.iconsConfig[props.name];
49
- return (react_1.default.createElement("svg", { className: className, preserveAspectRatio: preserveAspectRatio, ref: ref, role: "img", style: style, viewBox: `0 0 ${icon.w} ${icon.h}` },
49
+ return (react_1.default.createElement("svg", { "aria-label": props["aria-label"], className: className, preserveAspectRatio: preserveAspectRatio, ref: ref, role: "img", style: style, viewBox: `0 0 ${icon.w} ${icon.h}` },
50
50
  react_1.default.createElement("use", { xlinkHref: `${componentContext.spriteFilePath}#icon-sprite--${props.name}` })));
51
51
  }
52
52
  // eslint-disable-next-line no-console
53
53
  console.warn(`Icon "${props.name}" not found.`);
54
54
  return (react_1.default.createElement("span", { title: `icon "${props.name}" not found` },
55
- react_1.default.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 320 512", width: props.size, height: props.size },
55
+ react_1.default.createElement("svg", { "aria-label": props["aria-label"], height: props.size, viewBox: "0 0 320 512", width: props.size, xmlns: "http://www.w3.org/2000/svg" },
56
56
  react_1.default.createElement("path", { d: "M144 416c-17.67 0-32 14.33-32 32s14.33 32.01 32 32.01s32-14.34 32-32.01S161.7 416 144 416zM211.2 32H104C46.66 32 0 78.66 0 136v16C0 165.3 10.75 176 24 176S48 165.3 48 152v-16c0-30.88 25.12-56 56-56h107.2C244.7 80 272 107.3 272 140.8c0 22.66-12.44 43.27-32.5 53.81L167 232.8C137.1 248 120 277.9 120 310.6V328c0 13.25 10.75 24.01 24 24.01S168 341.3 168 328V310.6c0-14.89 8.188-28.47 21.38-35.41l72.47-38.14C297.7 218.2 320 181.3 320 140.8C320 80.81 271.2 32 211.2 32z" }))));
57
57
  });
58
58
  exports.Icon.displayName = "UxfUiIcon";
package/icon/index.d.ts CHANGED
@@ -1,2 +1,3 @@
1
1
  export { Icon } from "./icon";
2
2
  export type { IconProps } from "./icon";
3
+ export type { IconsSet } from "./theme";
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.CloseButton = void 0;
7
+ const icon_1 = require("@uxf/ui/icon");
7
8
  const react_1 = __importDefault(require("react"));
8
- const icon_1 = require("../../icon");
9
9
  const CloseButton = (props) => {
10
10
  var _a, _b;
11
11
  return (react_1.default.createElement("button", { className: "uxf-image-gallery__close-button", onClick: () => props.onClick() },
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.NextButton = void 0;
7
+ const icon_1 = require("@uxf/ui/icon");
7
8
  const react_1 = __importDefault(require("react"));
8
- const icon_1 = require("../../icon");
9
9
  const NextButton = (props) => {
10
10
  var _a;
11
11
  return (react_1.default.createElement("button", { className: "uxf-image-gallery__button uxf-image-gallery__button--next", onClick: props.onClick }, (_a = props.buttonElement) !== null && _a !== void 0 ? _a : react_1.default.createElement(icon_1.Icon, { className: "uxf-image-gallery__button-icon", name: "chevronRight" })));
@@ -4,8 +4,8 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.PrevButton = void 0;
7
+ const icon_1 = require("@uxf/ui/icon");
7
8
  const react_1 = __importDefault(require("react"));
8
- const icon_1 = require("../../icon");
9
9
  const PrevButton = (props) => {
10
10
  var _a;
11
11
  return (react_1.default.createElement("button", { className: "uxf-image-gallery__button uxf-image-gallery__button--prev", onClick: props.onClick }, (_a = props.buttonElement) !== null && _a !== void 0 ? _a : react_1.default.createElement(icon_1.Icon, { className: "uxf-image-gallery__button-icon", name: "chevronLeft" })));
package/input/README.md CHANGED
@@ -5,4 +5,4 @@
5
5
  ```css
6
6
  @import url("@uxf/ui/input/input-basic.css");
7
7
  @import url("@uxf/ui/input/input.css");
8
- ```
8
+ ```
package/input/index.d.ts CHANGED
@@ -1,9 +1,11 @@
1
1
  /// <reference types="react" />
2
+ import { InputArrowIcon } from "./input-arrow-icon";
2
3
  export type { InputProps } from "./input";
3
4
  export type { InputElementProps } from "./input-element";
4
5
  export type { InputRemoveButtonProps } from "./input-remove-button";
5
6
  export type { InputGroupSize, InputGroupVariant } from "./theme";
6
7
  export declare const Input: import("react").ForwardRefExoticComponent<import("./input").InputProps & import("react").RefAttributes<HTMLInputElement>> & {
8
+ ArrowIcon: typeof InputArrowIcon;
7
9
  Element: import("react").ForwardRefExoticComponent<import("./input-element").InputElementProps & import("react").RefAttributes<HTMLInputElement>>;
8
10
  LeftAddon: import("react").FC<import("./input-left-addon").InputLeftAddonProps>;
9
11
  LeftElement: import("react").FC<import("./input-left-element").InputLeftElementProps>;
package/input/index.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Input = void 0;
4
4
  const input_1 = require("./input");
5
+ const input_arrow_icon_1 = require("./input-arrow-icon");
5
6
  const input_element_1 = require("./input-element");
6
7
  const input_left_addon_1 = require("./input-left-addon");
7
8
  const input_left_element_1 = require("./input-left-element");
@@ -9,6 +10,7 @@ const input_remove_button_1 = require("./input-remove-button");
9
10
  const input_right_addon_1 = require("./input-right-addon");
10
11
  const input_right_element_1 = require("./input-right-element");
11
12
  exports.Input = Object.assign(input_1.Input, {
13
+ ArrowIcon: input_arrow_icon_1.InputArrowIcon,
12
14
  Element: input_element_1.InputElement,
13
15
  LeftAddon: input_left_addon_1.InputLeftAddon,
14
16
  LeftElement: input_left_element_1.InputLeftElement,
@@ -0,0 +1,8 @@
1
+ import { IconsSet } from "@uxf/ui/icon";
2
+ import React from "react";
3
+ interface Props {
4
+ iconName?: keyof IconsSet;
5
+ isOpen: boolean;
6
+ }
7
+ export declare function InputArrowIcon(props: Props): React.JSX.Element;
8
+ export {};