@uxf/ui 11.20.0 → 11.21.0

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
@@ -1,51 +1,60 @@
1
1
  .uxf-multi-combobox {
2
- @apply relative;
2
+ position: relative;
3
3
 
4
4
  &__button {
5
+ align-items: center;
6
+ background-color: theme("colors.white");
7
+ border-radius: theme("borderRadius.lg");
8
+ box-shadow: theme("boxShadow.sm");
9
+ color: theme("colors.lightHigh");
10
+ cursor: default;
11
+ display: flex;
12
+ flex-flow: row wrap;
5
13
  min-height: theme("inputSize.default");
6
-
7
- @apply relative flex w-full cursor-default flex-row flex-wrap items-center rounded-lg pb-[7px] pl-3 pr-8
8
- text-left shadow-sm outline-none before:pointer-events-none before:absolute before:inset-0
9
- before:rounded-lg before:border;
10
-
11
- &--with-popover {
12
- @apply cursor-text pb-0;
13
- }
14
-
15
- .uxf-icon {
16
- @apply absolute right-3 top-1/2 -translate-y-1/2;
17
-
18
- :root .light & {
19
- @apply text-lightLow;
20
- }
21
-
22
- :root .dark & {
23
- @apply text-darkLow;
24
- }
14
+ outline: none;
15
+ padding-bottom: 7px;
16
+ padding-left: theme("spacing.3");
17
+ padding-right: theme("spacing.8");
18
+ position: relative;
19
+ text-align: left;
20
+ width: 100%;
21
+
22
+ &::before {
23
+ border: 1px solid theme("colors.gray.200");
24
+ border-radius: inherit;
25
+ content: "";
26
+ inset: 0;
27
+ pointer-events: none;
28
+ position: absolute;
25
29
  }
26
30
 
27
- :root .light & {
28
- @apply text-lightHigh bg-white before:border-gray-200;
31
+ :root .dark & {
32
+ background-color: theme("colors.gray.800");
33
+ color: theme("colors.darkHigh");
29
34
 
30
- .is-empty {
31
- @apply text-lightLow;
35
+ &::before {
36
+ border-color: theme("colors.gray.700");
32
37
  }
33
38
  }
34
39
 
35
- :root .dark & {
36
- @apply text-darkHigh bg-gray-800 before:border-gray-700;
40
+ .uxf-input__arrow-icon {
41
+ color: theme("colors.lightLow");
42
+ position: absolute;
43
+ right: theme("spacing.3");
44
+ top: 50%;
45
+ transform: translateY(-50%);
37
46
 
38
- .is-empty {
39
- @apply text-darkLow;
47
+ :root .dark & {
48
+ color: theme("colors.darkLow");
40
49
  }
41
50
  }
42
51
 
43
52
  &.is-focused,
44
53
  &:focus-visible {
45
- @apply ring-2;
54
+ @apply ring-primary ring-2;
46
55
 
47
- :root .light & {
48
- @apply ring-primary before:border-none;
56
+ &::before {
57
+ border-style: none;
49
58
  }
50
59
 
51
60
  :root .dark & {
@@ -54,48 +63,56 @@
54
63
  }
55
64
 
56
65
  &.is-invalid {
57
- @apply ring-1;
66
+ @apply ring-error ring-1;
58
67
 
59
- :root .light & {
60
- @apply text-error ring-error;
68
+ color: theme("colors.error.DEFAULT");
61
69
 
62
- .uxf-combobox__input {
63
- @apply placeholder:text-error;
64
- }
70
+ :root .dark & {
71
+ @apply ring-error;
72
+
73
+ color: theme("colors.error.DEFAULT");
65
74
  }
66
75
 
67
- :root .dark & {
68
- @apply text-error ring-error;
76
+ .uxf-multi-combobox__input {
77
+ color: theme("colors.error.DEFAULT");
69
78
 
70
- .uxf-combobox__input {
71
- @apply placeholder:text-error;
79
+ &::placeholder {
80
+ color: currentcolor;
81
+ }
82
+
83
+ :root .dark & {
84
+ color: theme("colors.error.DEFAULT");
85
+
86
+ &::placeholder {
87
+ color: currentcolor;
88
+ }
72
89
  }
73
90
  }
74
91
  }
75
92
  }
76
93
 
77
94
  &__input {
78
- @apply shrink grow truncate bg-inherit
79
- focus-visible:border-0 focus-visible:outline-none focus-visible:ring-0;
95
+ @apply truncate;
80
96
 
97
+ background-color: inherit;
98
+ flex-grow: 1;
99
+ flex-shrink: 1;
81
100
  margin-top: 7px;
101
+ width: auto;
82
102
 
83
- &-placeholder {
84
- &--with-popover {
85
- @apply text-gray-400;
86
- }
103
+ &::placeholder {
104
+ color: theme("colors.lightLow");
87
105
  }
88
106
 
89
- &--with-popover {
90
- @apply my-1;
107
+ :root .dark & {
108
+ color: theme("colors.darkLow");
91
109
  }
92
110
 
93
- :root .light & {
94
- @apply placeholder:text-lightLow;
95
- }
111
+ &:focus-visible {
112
+ @apply ring-0;
96
113
 
97
- :root .dark & {
98
- @apply placeholder:text-darkLow;
114
+ border-style: none;
115
+ outline: none;
99
116
  }
100
117
  }
101
118
 
@@ -104,7 +121,15 @@
104
121
  margin-top: 7px;
105
122
  }
106
123
 
107
- &__popover-panel {
108
- @apply absolute left-0 top-0 z-10 w-full;
124
+ &__dropdown-item {
125
+ .uxf-checkbox {
126
+ margin-top: theme("spacing.[0.5]");
127
+ }
128
+
129
+ &.is-active {
130
+ .uxf-checkbox-input__label {
131
+ color: theme("colors.white");
132
+ }
133
+ }
109
134
  }
110
135
  }
@@ -1,27 +1,112 @@
1
1
  .uxf-multi-select {
2
- &__input {
3
- @apply overflow-hidden;
2
+ &__button {
3
+ align-items: center;
4
+ background-color: theme("colors.white");
5
+ border-radius: theme("borderRadius.lg");
6
+ box-shadow: theme("boxShadow.sm");
7
+ color: theme("colors.lightHigh");
8
+ cursor: default;
9
+ display: flex;
10
+ flex-flow: row wrap;
11
+ min-height: theme("inputSize.default");
12
+ outline: none;
13
+ padding-bottom: 7px;
14
+ padding-left: theme("spacing.3");
15
+ padding-right: theme("spacing.8");
16
+ position: relative;
17
+ text-align: left;
18
+ width: 100%;
4
19
 
5
- &--is-empty {
6
- @apply mt-[7px] truncate;
20
+ &::before {
21
+ border: 1px solid theme("colors.gray.200");
22
+ border-radius: inherit;
23
+ content: "";
24
+ inset: 0;
25
+ pointer-events: none;
26
+ position: absolute;
27
+ }
28
+
29
+ :root .dark & {
30
+ background-color: theme("colors.gray.800");
31
+ color: theme("colors.darkHigh");
7
32
 
8
- :root .light & {
9
- @apply text-lightLow;
33
+ &::before {
34
+ border-color: theme("colors.gray.700");
10
35
  }
36
+ }
37
+
38
+ .uxf-input__arrow-icon {
39
+ color: theme("colors.lightLow");
40
+ position: absolute;
41
+ right: theme("spacing.3");
42
+ top: 50%;
43
+ transform: translateY(-50%);
11
44
 
12
45
  :root .dark & {
13
- @apply text-darkLow;
46
+ color: theme("colors.darkLow");
14
47
  }
15
48
  }
16
- }
17
49
 
18
- &__dropdown-item {
19
- :root .light & {
20
- @apply hover:bg-primary hover:text-white;
50
+ &.is-focused,
51
+ &:focus-visible {
52
+ @apply ring-primary ring-2;
53
+
54
+ &::before {
55
+ border-style: none;
56
+ }
57
+
58
+ :root .dark & {
59
+ @apply ring-primary;
60
+ }
21
61
  }
22
62
 
23
- :root .dark & {
24
- @apply hover:bg-primary;
63
+ &.is-invalid {
64
+ @apply ring-error ring-1;
65
+
66
+ color: theme("colors.error.DEFAULT");
67
+
68
+ :root .dark & {
69
+ @apply ring-error;
70
+
71
+ color: theme("colors.error.DEFAULT");
72
+ }
73
+
74
+ .uxf-multi-combobox__input {
75
+ color: theme("colors.error.DEFAULT");
76
+
77
+ &::placeholder {
78
+ color: currentcolor;
79
+ }
80
+
81
+ :root .dark & {
82
+ color: theme("colors.error.DEFAULT");
83
+
84
+ &::placeholder {
85
+ color: currentcolor;
86
+ }
87
+ }
88
+ }
89
+ }
90
+ }
91
+
92
+ &__input--is-empty {
93
+ @apply truncate;
94
+
95
+ margin-top: 7px;
96
+ }
97
+
98
+ &__input-chip {
99
+ margin-right: theme("spacing.2");
100
+ margin-top: 7px;
101
+ }
102
+
103
+ &.is-invalid {
104
+ .uxf-multi-select__input--is-empty {
105
+ color: theme("colors.error.DEFAULT");
106
+
107
+ :root .dark & {
108
+ color: theme("colors.error.DEFAULT");
109
+ }
25
110
  }
26
111
  }
27
112
  }
@@ -2,22 +2,15 @@
2
2
  @apply isolate inline-flex -space-x-px rounded-md;
3
3
 
4
4
  &__button {
5
- @apply relative inline-flex cursor-pointer items-center border text-sm font-medium focus:z-10;
6
-
7
- :root .light & {
8
- @apply border-gray-300 bg-white text-gray-500 hover:bg-gray-50;
9
- }
5
+ @apply relative inline-flex cursor-pointer items-center border border-gray-300 bg-white text-sm
6
+ font-medium text-gray-500 hover:bg-gray-50 focus:z-10;
10
7
 
11
8
  :root .dark & {
12
9
  @apply border-gray-600 bg-gray-900 text-gray-200 hover:bg-gray-800;
13
10
  }
14
11
 
15
12
  &.is-selected {
16
- @apply z-10;
17
-
18
- :root .light & {
19
- @apply border-primary text-primary-600 border bg-indigo-50;
20
- }
13
+ @apply border-primary text-primary-600 z-10 border bg-indigo-50;
21
14
 
22
15
  :root .dark & {
23
16
  @apply border-primary-700 text-primary-300 border bg-indigo-900/20;
@@ -33,11 +26,7 @@
33
26
  }
34
27
 
35
28
  &.is-disabled {
36
- @apply cursor-not-allowed;
37
-
38
- :root .light & {
39
- @apply text-neutral-300 hover:bg-white;
40
- }
29
+ @apply cursor-not-allowed text-neutral-300 hover:bg-white;
41
30
 
42
31
  :root .dark & {
43
32
  @apply text-neutral-500 hover:bg-gray-800;
@@ -45,11 +34,7 @@
45
34
  }
46
35
 
47
36
  &.is-ellipsis {
48
- @apply pointer-events-none;
49
-
50
- :root .light & {
51
- @apply text-neutral-300 hover:bg-white;
52
- }
37
+ @apply pointer-events-none text-neutral-300 hover:bg-white;
53
38
 
54
39
  :root .dark & {
55
40
  @apply text-neutral-500 hover:bg-gray-800;
@@ -1,60 +1,55 @@
1
1
  .uxf-radio-group {
2
2
  &__option {
3
- @apply outline-none focus-visible:rounded-lg focus-visible:ring-2 focus-visible:ring-offset-2;
3
+ @apply focus-visible:ring-primary outline-none focus-visible:rounded-lg focus-visible:ring-2
4
+ focus-visible:ring-offset-2 focus-visible:ring-offset-white;
5
+
6
+ :root .dark & {
7
+ @apply focus-visible:ring-primary focus-visible:ring-offset-gray-900;
8
+ }
4
9
  }
5
10
 
6
11
  &__option-wrapper {
7
12
  @apply flex justify-between;
8
- }
9
-
10
- &__option-label {
11
- @apply line-clamp-2;
12
- }
13
-
14
- &__label {
15
- @apply mb-2;
16
- }
17
-
18
- :root .light & {
19
- .uxf-radio-group__option {
20
- @apply focus-visible:ring-primary focus-visible:ring-offset-white;
21
- }
22
13
 
23
- .uxf-radio-group__option-label {
24
- @apply text-gray-600;
25
- }
14
+ &.is-selected {
15
+ .uxf-radio-group__option-label {
16
+ @apply text-gray-900;
26
17
 
27
- .uxf-radio-group__option-wrapper {
28
- &.is-selected {
29
- .uxf-radio-group__option-label {
30
- @apply text-gray-900;
18
+ :root .dark & {
19
+ @apply text-white;
31
20
  }
32
21
  }
33
22
  }
34
23
  }
35
24
 
36
- :root .dark & {
37
- .uxf-radio-group__option {
38
- @apply focus-visible:ring-primary focus-visible:ring-offset-gray-900;
39
- }
25
+ &__option-label {
26
+ @apply line-clamp-2 text-gray-600;
40
27
 
41
- .uxf-radio-group__option-label {
28
+ :root .dark & {
42
29
  @apply text-white/80;
43
30
  }
31
+ }
44
32
 
45
- .uxf-radio-group__option-wrapper {
46
- &.is-selected {
47
- .uxf-radio-group__option-label {
48
- @apply text-white;
49
- }
50
- }
51
- }
33
+ &__label {
34
+ @apply mb-2;
52
35
  }
53
36
  }
54
37
 
55
38
  .uxf-radio-group--list {
39
+ .uxf-radio-group__option {
40
+ @apply focus-visible:ring-primary focus-visible:ring-offset-white;
41
+
42
+ :root .dark & {
43
+ @apply focus-visible:ring-primary focus-visible:ring-offset-gray-900;
44
+ }
45
+ }
46
+
56
47
  .uxf-radio-group__options-wrapper {
57
- @apply divide-y;
48
+ @apply divide-y divide-gray-200;
49
+
50
+ :root .dark & {
51
+ @apply divide-gray-800;
52
+ }
58
53
  }
59
54
 
60
55
  .uxf-radio-group__option-wrapper {
@@ -64,77 +59,53 @@
64
59
  .uxf-radio-group__option-label {
65
60
  @apply pr-4;
66
61
  }
62
+ }
67
63
 
68
- :root .light & {
69
- .uxf-radio-group__options-wrapper {
70
- @apply divide-gray-200;
71
- }
72
-
73
- .uxf-radio-group__option {
74
- @apply focus-visible:ring-primary focus-visible:ring-offset-white;
75
- }
76
- }
77
-
78
- :root .dark & {
79
- .uxf-radio-group__options-wrapper {
80
- @apply divide-gray-800;
81
- }
64
+ .uxf-radio-group--radioButton {
65
+ .uxf-radio-group__option {
66
+ @apply focus-visible:ring-primary;
82
67
 
83
- .uxf-radio-group__option {
68
+ :root .dark & {
84
69
  @apply focus-visible:ring-primary focus-visible:ring-offset-gray-900;
85
70
  }
86
71
  }
87
- }
88
72
 
89
- .uxf-radio-group--radioButton {
90
73
  .uxf-radio-group__options-wrapper {
91
74
  @apply flex flex-wrap gap-2;
92
75
  }
93
76
 
94
77
  .uxf-radio-group__option-wrapper {
95
78
  @apply relative min-w-[112px] flex-col-reverse p-3
96
- before:pointer-events-none before:absolute before:inset-0 before:rounded-lg before:border;
97
-
98
- &.is-selected {
99
- @apply before:border-2;
100
- }
101
- }
79
+ before:pointer-events-none before:absolute before:inset-0 before:rounded-lg before:border before:border-gray-400;
102
80
 
103
- .uxf-radio-group__option-label {
104
- @apply pt-4 text-sm;
105
- }
106
-
107
- :root .light & {
108
- .uxf-radio-group__option {
109
- @apply focus-visible:ring-primary;
81
+ :root .dark & {
82
+ @apply border-gray-400;
110
83
  }
111
84
 
112
- .uxf-radio-group__option-wrapper {
113
- @apply before:border-gray-400;
85
+ &.is-selected {
86
+ @apply before:border-primary before:border-2;
114
87
 
115
- &.is-selected {
88
+ :root .dark & {
116
89
  @apply before:border-primary;
117
90
  }
118
91
  }
119
92
  }
120
93
 
121
- :root .dark & {
122
- .uxf-radio-group__option {
123
- @apply focus-visible:ring-primary focus-visible:ring-offset-gray-900;
124
- }
125
-
126
- .uxf-radio-group__option-wrapper {
127
- @apply border-gray-400;
128
-
129
- &.is-selected {
130
- @apply before:border-primary;
131
- }
132
- }
94
+ .uxf-radio-group__option-label {
95
+ @apply pt-4 text-sm;
133
96
  }
134
97
  }
135
98
 
136
99
  .uxf-radio-group--column,
137
100
  .uxf-radio-group--row {
101
+ .uxf-radio-group__option {
102
+ @apply focus-visible:ring-primary focus-visible:ring-offset-white;
103
+
104
+ :root .dark & {
105
+ @apply focus-visible:ring-primary focus-visible:ring-offset-gray-900;
106
+ }
107
+ }
108
+
138
109
  .uxf-radio-group__option-wrapper {
139
110
  @apply flex-row-reverse items-center;
140
111
  }
@@ -142,18 +113,6 @@
142
113
  .uxf-radio-group__option-label {
143
114
  @apply pl-2;
144
115
  }
145
-
146
- :root .light & {
147
- .uxf-radio-group__option {
148
- @apply focus-visible:ring-primary focus-visible:ring-offset-white;
149
- }
150
- }
151
-
152
- :root .dark & {
153
- .uxf-radio-group__option {
154
- @apply focus-visible:ring-primary focus-visible:ring-offset-gray-900;
155
- }
156
- }
157
116
  }
158
117
 
159
118
  .uxf-radio-group--column {