@uxf/ui 1.0.1 → 10.0.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/_select-base/_select-base.js +3 -2
  2. package/chip/chip.d.ts +3 -1
  3. package/chip/chip.js +6 -5
  4. package/chip/chip.stories.js +27 -10
  5. package/chip/theme.d.ts +7 -0
  6. package/css/avatar-file-input.css +82 -0
  7. package/css/avatar.css +15 -0
  8. package/css/badge.css +23 -0
  9. package/css/button-group.css +22 -0
  10. package/css/button-list.css +61 -0
  11. package/css/button.css +335 -0
  12. package/css/calendar.css +215 -0
  13. package/css/checkbox-button.css +98 -0
  14. package/css/checkbox-input.css +24 -0
  15. package/css/checkbox.css +120 -0
  16. package/css/chip.css +591 -0
  17. package/css/color-radio-group.css +21 -0
  18. package/css/color-radio.css +33 -0
  19. package/css/component-structure-analyzer.css +31 -0
  20. package/css/date-picker.css +22 -0
  21. package/css/datetime-picker.css +11 -0
  22. package/css/dropdown.css +70 -0
  23. package/css/dropzone.css +85 -0
  24. package/css/error-message.css +3 -0
  25. package/css/file-input.css +80 -0
  26. package/css/flash-messages.css +28 -0
  27. package/css/form-component.css +7 -0
  28. package/css/icon.css +7 -0
  29. package/css/image-gallery.css +63 -0
  30. package/css/input-basic.css +18 -0
  31. package/css/input-with-popover.css +35 -0
  32. package/css/input.css +270 -0
  33. package/css/label.css +15 -0
  34. package/css/layout.css +47 -0
  35. package/css/list-item.css +29 -0
  36. package/css/loader.css +23 -0
  37. package/css/modal.css +65 -0
  38. package/css/multi-combobox.css +110 -0
  39. package/css/multi-select.css +27 -0
  40. package/css/pagination.css +93 -0
  41. package/css/paper.css +3 -0
  42. package/css/radio-group.css +169 -0
  43. package/css/radio.css +101 -0
  44. package/css/raster-image.css +20 -0
  45. package/css/select-base.css +50 -0
  46. package/css/tabs.css +131 -0
  47. package/css/text-link.css +12 -0
  48. package/css/textarea.css +124 -0
  49. package/css/time-picker.css +32 -0
  50. package/css/toggle.css +80 -0
  51. package/css/tooltip.css +7 -0
  52. package/css/typography.css +51 -0
  53. package/hooks/use-dropdown.d.ts +1 -1
  54. package/image-gallery/components/gallery.d.ts +2 -2
  55. package/image-gallery/components/gallery.js +12 -5
  56. package/image-gallery/image-gallery.d.ts +2 -0
  57. package/image-gallery/image-gallery.js +1 -1
  58. package/multi-combobox/_multi-combobox-base.js +2 -1
  59. package/multi-combobox/types.d.ts +3 -0
  60. package/multi-select/_multi-select-base.js +2 -1
  61. package/multi-select/types.d.ts +3 -2
  62. package/package.json +5 -3
  63. package/tooltip/use-tooltip.d.ts +1 -1
  64. package/tw-tokens/tw-z-index.d.ts +1 -0
  65. package/tw-tokens/tw-z-index.js +1 -0
  66. package/utils/storybook-config.js +1 -1
  67. package/utils/tailwind-config.js +1 -0
  68. package/select/theme.d.ts +0 -5
  69. package/select/theme.js +0 -2
@@ -0,0 +1,215 @@
1
+ .uxf-calendar {
2
+ &__cell-day {
3
+ align-items: center;
4
+ display: flex;
5
+ font-size: 14px;
6
+ font-weight: theme("fontWeight.medium");
7
+ height: 40px;
8
+ justify-content: center;
9
+ line-height: 1;
10
+ outline: none;
11
+ position: relative;
12
+ text-align: center;
13
+
14
+ :root .light & {
15
+ background-color: theme("backgroundColor.white");
16
+ color: theme("colors.lightMedium");
17
+ }
18
+
19
+ :root .dark & {
20
+ background-color: theme("backgroundColor.gray.900");
21
+ color: theme("colors.darkMedium");
22
+ }
23
+
24
+ &:hover {
25
+ :root .light & {
26
+ background-color: theme("backgroundColor.gray.50");
27
+ }
28
+
29
+ :root .dark & {
30
+ background-color: theme("backgroundColor.gray.950");
31
+ }
32
+ }
33
+
34
+ &:focus-visible {
35
+ &::before {
36
+ border: 2px solid theme("colors.primary.500");
37
+ border-radius: 2px;
38
+ content: "";
39
+ inset: 0;
40
+ position: absolute;
41
+ }
42
+ }
43
+
44
+ &.is-disabled{
45
+ cursor: auto;
46
+
47
+ :root .light & {
48
+ background-color: theme("backgroundColor.gray.100");
49
+ }
50
+
51
+ :root .dark & {
52
+ background-color: theme("backgroundColor.gray.800");
53
+ }
54
+ }
55
+
56
+ --compensated-radii: calc(theme("borderRadius.md") - theme("spacing.px"));
57
+
58
+ &:first-child {
59
+ border-top-left-radius: var(--compensated-radii);
60
+ }
61
+
62
+ &:nth-child(7) {
63
+ border-top-right-radius: var(--compensated-radii);
64
+ }
65
+
66
+ &:nth-last-child(7) {
67
+ border-bottom-left-radius: var(--compensated-radii);
68
+ }
69
+
70
+ &:last-child {
71
+ border-bottom-right-radius: var(--compensated-radii);
72
+ }
73
+
74
+ &--selected {
75
+ :root .light & {
76
+ background-color: theme("backgroundColor.primary.500");
77
+ color: theme("colors.white");
78
+ }
79
+
80
+ :root .dark & {
81
+ background-color: theme("backgroundColor.primary.500");
82
+ color: theme("colors.white");
83
+ }
84
+
85
+ &:hover {
86
+ :root .light & {
87
+ background-color: theme("backgroundColor.primary.500");
88
+ }
89
+
90
+ :root .dark & {
91
+ background-color: theme("backgroundColor.primary.500");
92
+ }
93
+ }
94
+ }
95
+
96
+ &--today {
97
+ .uxf-calendar__cell-day__inner {
98
+ align-items: center;
99
+ border-radius: 999px;
100
+ display: inline-flex;
101
+ height: 32px;
102
+ justify-content: center;
103
+ position: relative;
104
+ width: 32px;
105
+
106
+ :root .light & {
107
+ background-color: theme("backgroundColor.lightHigh");
108
+ color: theme("colors.white");
109
+ }
110
+
111
+ :root .dark & {
112
+ background-color: theme("backgroundColor.transparent");
113
+ border: 2px solid theme("colors.darkMedium");
114
+ color: theme("colors.white");
115
+ }
116
+ }
117
+
118
+ &.uxf-calendar__cell-day--selected {
119
+ .uxf-calendar__cell-day__inner {
120
+ background-color: theme("backgroundColor.transparent");
121
+ color: theme("colors.white");
122
+ border: 2px solid theme("colors.darkMedium");
123
+ }
124
+ }
125
+ }
126
+
127
+ &--not-current-month {
128
+ :root .light & {
129
+ background-color: theme("backgroundColor.gray.100");
130
+ color: theme("colors.lightLow");
131
+ }
132
+
133
+ :root .dark & {
134
+ background-color: theme("backgroundColor.gray.800");
135
+ color: theme("colors.darkLow");
136
+ }
137
+ }
138
+ }
139
+
140
+ &__cell-month,
141
+ &__cell-year {
142
+ --compensated-radii: calc(theme("borderRadius.md") - theme("spacing.px"));
143
+
144
+ &:first-child {
145
+ border-top-left-radius: var(--compensated-radii);
146
+ }
147
+
148
+ &:nth-child(3) {
149
+ border-top-right-radius: var(--compensated-radii);
150
+ }
151
+
152
+ &:nth-last-child(3) {
153
+ border-bottom-left-radius: var(--compensated-radii);
154
+ }
155
+
156
+ &:last-child {
157
+ border-bottom-right-radius: var(--compensated-radii);
158
+ }
159
+ }
160
+
161
+ &__weekdays {
162
+ column-gap: 1px;
163
+ display: grid;
164
+ font-size: 10px;
165
+ font-weight: theme("fontWeight.semibold");
166
+ grid-template-columns: repeat(7, minmax(0, 1fr));
167
+ margin-bottom: 6px;
168
+ padding: 0 1px;
169
+ text-align: center;
170
+ text-transform: uppercase;
171
+
172
+ :root .light & {
173
+ color: theme("colors.lightLow");
174
+ }
175
+
176
+ :root .dark & {
177
+ color: theme("colors.darkLow");
178
+ }
179
+ }
180
+
181
+ &__weekday {
182
+ align-items: center;
183
+ display: flex;
184
+ flex-direction: column;
185
+ height: 21px;
186
+ justify-content: center;
187
+ }
188
+
189
+ &__days,
190
+ &__year,
191
+ &__decade {
192
+ border-radius: 6px;
193
+ display: grid;
194
+ gap: 1px;
195
+ padding: 1px;
196
+ text-align: center;
197
+
198
+ :root .light & {
199
+ background-color: theme("backgroundColor.lightBorder");
200
+ }
201
+
202
+ :root .dark & {
203
+ background-color: theme("backgroundColor.darkBorder");
204
+ }
205
+ }
206
+
207
+ &__days {
208
+ grid-template-columns: repeat(7, minmax(0, 1fr));
209
+ }
210
+
211
+ &__year,
212
+ &__decade {
213
+ grid-template-columns: repeat(3, minmax(0, 1fr));
214
+ }
215
+ }
@@ -0,0 +1,98 @@
1
+ .uxf-checkbox-button {
2
+ @apply shrink-0 inline-flex items-center justify-between rounded-lg py-3 px-4 space-x-4 transition outline-none
3
+ relative before:absolute before:inset-0 before:border before:rounded-lg before:border-transparent
4
+ before:transition focus-visible:ring-offset-2 focus-visible:ring-2;
5
+
6
+ &__icon {
7
+ @apply w-5 h-5 p-1 bg-white text-transparent rounded relative before:absolute before:inset-0 before:border
8
+ before:rounded before:transition;
9
+ }
10
+
11
+ :root .light & {
12
+ @apply bg-gray-200 focus-visible:ring-primary;
13
+
14
+ .uxf-checkbox-button__icon {
15
+ @apply before:border-gray-600;
16
+ }
17
+
18
+ .uxf-checkbox-button__label {
19
+ @apply text-gray-600;
20
+ }
21
+
22
+ &.is-selected {
23
+ @apply bg-primary;
24
+
25
+ .uxf-checkbox-button__icon {
26
+ @apply text-primary before:border-transparent;
27
+ }
28
+
29
+ .uxf-checkbox-button__label {
30
+ @apply text-white;
31
+ }
32
+ }
33
+
34
+ &.is-disabled {
35
+ @apply bg-gray-100 pointer-events-none;
36
+
37
+ .uxf-checkbox-button__icon {
38
+ @apply before:border-gray-300;
39
+ }
40
+
41
+ &.is-selected {
42
+ @apply bg-gray-300;
43
+
44
+ .uxf-checkbox-button__icon {
45
+ @apply text-gray-400 before:border-transparent;
46
+ }
47
+
48
+ .uxf-checkbox-button__label {
49
+ @apply text-white;
50
+ }
51
+ }
52
+ }
53
+
54
+ &.is-invalid {
55
+ @apply before:border-error;
56
+ }
57
+ }
58
+
59
+ :root .dark & {
60
+ @apply bg-gray-800 focus-visible:ring-primary focus-visible:ring-offset-gray-900;
61
+
62
+ .uxf-checkbox-button__icon {
63
+ @apply before:border-transparent;
64
+ }
65
+
66
+ .uxf-checkbox-button__label {
67
+ @apply text-gray-400;
68
+ }
69
+
70
+ &.is-selected {
71
+ @apply text-white bg-primary;
72
+
73
+ .uxf-checkbox-button__icon {
74
+ @apply text-primary before:border-transparent;
75
+ }
76
+
77
+ .uxf-checkbox-button__label {
78
+ @apply text-white;
79
+ }
80
+ }
81
+
82
+ &.is-disabled {
83
+ @apply bg-gray-800 pointer-events-none;
84
+
85
+ &.is-selected {
86
+ @apply bg-gray-600;
87
+
88
+ .uxf-checkbox-button__icon {
89
+ @apply text-gray-800;
90
+ }
91
+ }
92
+ }
93
+
94
+ &.is-invalid {
95
+ @apply before:border-error;
96
+ }
97
+ }
98
+ }
@@ -0,0 +1,24 @@
1
+ .uxf-checkbox-input {
2
+ &__wrapper {
3
+ @apply flex items-center justify-between space-x-3;
4
+ }
5
+
6
+ &__label {
7
+ @apply w-full;
8
+
9
+ :root .light & {
10
+ @apply text-gray-600;
11
+ }
12
+
13
+ :root .dark & {
14
+ @apply text-gray-400;
15
+ }
16
+ }
17
+
18
+ &.is-disabled,
19
+ &.is-readonly {
20
+ & + .uxf-checkbox-input__label {
21
+ @apply pointer-events-none;
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,120 @@
1
+ .uxf-checkbox {
2
+ @apply relative shrink-0 flex items-center justify-center rounded transition outline-none border
3
+ focus-visible:before:border-2 focus-visible:before:absolute
4
+ focus-visible:before:inset-[-5px] focus-visible:before:rounded-lg;
5
+
6
+ &__inner {
7
+ @apply hidden;
8
+ }
9
+
10
+ &--size-default {
11
+ @apply h-4 w-4;
12
+
13
+ .uxf-checkbox__inner {
14
+ @apply w-2.5 h-2.5;
15
+ }
16
+ }
17
+
18
+ &--size-lg {
19
+ @apply h-6 w-6;
20
+
21
+ .uxf-checkbox__inner {
22
+ @apply w-4 h-4;
23
+ }
24
+ }
25
+
26
+ &.is-selected {
27
+ .uxf-checkbox__inner {
28
+ @apply block;
29
+ }
30
+ }
31
+
32
+ &.is-disabled,
33
+ &.is-readonly {
34
+ @apply pointer-events-none;
35
+ }
36
+
37
+ :root .light & {
38
+ @apply bg-white border-gray-400 focus-visible:before:border-primary;
39
+
40
+ &.is-selected {
41
+ @apply bg-primary border-transparent is-hoverable:bg-primary-700;
42
+
43
+ .uxf-checkbox__inner {
44
+ @apply text-white;
45
+ }
46
+ }
47
+
48
+ &.is-disabled {
49
+ @apply border-gray-200;
50
+
51
+ &.is-selected {
52
+ @apply bg-gray-200;
53
+ }
54
+
55
+ .uxf-checkbox__inner {
56
+ @apply text-gray-400;
57
+ }
58
+ }
59
+
60
+ &.is-readonly {
61
+ &.is-selected {
62
+ @apply bg-primary/60;
63
+ }
64
+ }
65
+
66
+ &.is-invalid {
67
+ @apply border-error;
68
+
69
+ &.is-selected {
70
+ @apply bg-error;
71
+ }
72
+
73
+ .uxf-checkbox__inner {
74
+ @apply text-white;
75
+ }
76
+ }
77
+ }
78
+
79
+ :root .dark & {
80
+ @apply bg-gray-900 border-gray-400 focus-visible:before:border-primary;
81
+
82
+ &.is-selected {
83
+ @apply bg-primary border-transparent is-hoverable:bg-primary-300;
84
+
85
+ .uxf-checkbox__inner {
86
+ @apply text-white;
87
+ }
88
+ }
89
+
90
+ &.is-disabled {
91
+ @apply border-gray-600;
92
+
93
+ &.is-selected {
94
+ @apply bg-gray-600;
95
+ }
96
+
97
+ .uxf-checkbox__inner {
98
+ @apply text-gray-800;
99
+ }
100
+ }
101
+
102
+ &.is-readonly {
103
+ &.is-selected {
104
+ @apply bg-primary/60;
105
+ }
106
+ }
107
+
108
+ &.is-invalid {
109
+ @apply border-error;
110
+
111
+ &.is-selected {
112
+ @apply bg-error;
113
+ }
114
+
115
+ .uxf-checkbox__inner {
116
+ @apply text-white;
117
+ }
118
+ }
119
+ }
120
+ }