@uxf/ui 1.0.0-beta.57 → 1.0.0-beta.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_private-utils/get-provider-config.js +2 -1
- package/avatar-file-input/avatar-file-input.d.ts +2 -2
- package/avatar-file-input/avatar-file-input.js +8 -8
- package/avatar-file-input/index.d.ts +1 -1
- package/avatar-file-input/index.js +14 -5
- package/button/button.stories.js +8 -5
- package/button/theme.d.ts +2 -1
- package/checkbox/index.d.ts +1 -1
- package/checkbox/index.js +15 -3
- package/checkbox-input/checkbox-input.d.ts +2 -3
- package/checkbox-input/checkbox-input.js +5 -3
- package/checkbox-input/checkbox-input.stories.d.ts +2 -3
- package/checkbox-input/index.d.ts +1 -1
- package/checkbox-input/index.js +14 -5
- package/chip/chip.d.ts +7 -0
- package/chip/chip.js +14 -0
- package/chip/chip.stories.d.ts +7 -0
- package/chip/chip.stories.js +22 -0
- package/chip/index.d.ts +1 -0
- package/chip/index.js +5 -0
- package/chip/theme.d.ts +5 -0
- package/chip/theme.js +2 -0
- package/color-radio-group/color-radio-group.d.ts +17 -0
- package/color-radio-group/color-radio-group.js +47 -0
- package/color-radio-group/color-radio-group.stories.d.ts +7 -0
- package/color-radio-group/color-radio-group.stories.js +79 -0
- package/color-radio-group/color-radio.d.ts +8 -0
- package/color-radio-group/color-radio.js +28 -0
- package/color-radio-group/index.d.ts +1 -0
- package/color-radio-group/index.js +5 -0
- package/combobox/combobox.d.ts +1 -2
- package/combobox/combobox.js +8 -7
- package/combobox/index.d.ts +1 -1
- package/combobox/index.js +14 -5
- package/config/icons-config.d.ts +2 -0
- package/config/icons-config.js +5 -0
- package/config/icons.d.ts +47 -0
- package/config/icons.js +14 -0
- package/css/button.css +171 -76
- package/css/chip.css +37 -0
- package/css/color-radio-group.css +26 -0
- package/css/color-radio.css +21 -0
- package/css/input.css +123 -68
- package/css/label.css +7 -0
- package/css/radio-group.css +41 -12
- package/css/radio.css +2 -2
- package/css/textarea.css +48 -10
- package/dropdown/dropdown.js +7 -7
- package/dropdown/index.d.ts +1 -1
- package/dropdown/index.js +15 -3
- package/error-message/error-message.d.ts +2 -2
- package/error-message/error-message.js +2 -1
- package/error-message/index.d.ts +1 -1
- package/error-message/index.js +14 -5
- package/form-control/form-control.js +2 -2
- package/hooks/use-dropdown.js +3 -1
- package/icon/icon.d.ts +2 -2
- package/icon/icon.js +11 -7
- package/icon/icon.stories.js +12 -8
- package/icon/index.d.ts +1 -5
- package/icon/index.js +14 -13
- package/icon/theme.d.ts +1 -2
- package/image-gallery/components/close-button.js +3 -3
- package/image-gallery/components/next-button.js +3 -3
- package/image-gallery/components/previous-button.js +3 -3
- package/input/index.d.ts +9 -10
- package/input/index.js +10 -13
- package/input/input-element.d.ts +2 -2
- package/input/input-element.js +5 -5
- package/input/input-left-addon.d.ts +3 -3
- package/input/input-left-addon.js +2 -1
- package/input/input-left-element.d.ts +3 -3
- package/input/input-left-element.js +2 -1
- package/input/input-right-addon.d.ts +2 -3
- package/input/input-right-addon.js +2 -1
- package/input/input-right-element.d.ts +3 -3
- package/input/input-right-element.js +2 -1
- package/input/input.d.ts +2 -2
- package/input/input.js +5 -4
- package/input/input.stories.d.ts +5 -5
- package/input/input.stories.js +13 -3
- package/label/index.d.ts +1 -1
- package/label/index.js +14 -5
- package/label/label.d.ts +1 -2
- package/label/label.js +4 -4
- package/package.json +4 -3
- package/radio/index.d.ts +1 -1
- package/radio/index.js +15 -3
- package/radio-group/index.d.ts +1 -1
- package/radio-group/index.js +15 -3
- package/radio-group/radio-group.js +2 -2
- package/radio-group/radio-group.stories.js +2 -2
- package/raster-image/index.d.ts +1 -1
- package/raster-image/index.js +14 -5
- package/raster-image/raster-image.d.ts +4 -4
- package/raster-image/raster-image.js +7 -5
- package/raster-image/raster-image.stories.d.ts +2 -3
- package/select/index.d.ts +1 -1
- package/select/index.js +14 -5
- package/select/select.d.ts +1 -2
- package/select/select.js +8 -7
- package/text-input/text-input.d.ts +1 -1
- package/text-input/text-input.js +4 -4
- package/text-input/text-input.stories.js +4 -1
- package/textarea/index.d.ts +1 -1
- package/textarea/index.js +14 -5
- package/textarea/textarea.d.ts +1 -2
- package/textarea/textarea.js +8 -8
- package/textarea/textarea.stories.js +32 -20
- package/toggle/index.d.ts +1 -1
- package/toggle/index.js +14 -5
- package/toggle/toggle.d.ts +2 -3
- package/toggle/toggle.js +7 -6
- package/toggle/toggle.stories.d.ts +2 -3
- package/utils/icons-config.js +43 -0
- package/utils/storybook-config.js +1 -1
- package/utils/tailwind-config.js +152 -0
- package/hooks/use-latest.d.ts +0 -2
- package/hooks/use-latest.js +0 -12
- package/icon/camera-icon.d.ts +0 -3
- package/icon/camera-icon.js +0 -11
- package/icon/chevron-down-icon.d.ts +0 -3
- package/icon/chevron-down-icon.js +0 -11
- package/icon/chevron-up-icon.d.ts +0 -3
- package/icon/chevron-up-icon.js +0 -11
- package/icon/pin-icon.d.ts +0 -3
- package/icon/pin-icon.js +0 -11
- package/image-gallery/components/icon-chevron-left.d.ts +0 -3
- package/image-gallery/components/icon-chevron-left.js +0 -11
- package/image-gallery/components/icon-chevron-right.d.ts +0 -3
- package/image-gallery/components/icon-chevron-right.js +0 -11
- package/image-gallery/components/icon-close.d.ts +0 -3
- package/image-gallery/components/icon-close.js +0 -11
- package/utils/cx.d.ts +0 -3
- package/utils/cx.js +0 -54
- package/utils/forward-ref.d.ts +0 -12
- package/utils/forward-ref.js +0 -10
- package/utils/rem.d.ts +0 -1
- package/utils/rem.js +0 -5
- package/utils/sr-only-mixin.d.ts +0 -2
- package/utils/sr-only-mixin.js +0 -14
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare const ICONS: {
|
|
2
|
+
readonly camera: {
|
|
3
|
+
readonly w: 512;
|
|
4
|
+
readonly h: 512;
|
|
5
|
+
};
|
|
6
|
+
readonly caretDown: {
|
|
7
|
+
readonly w: 320;
|
|
8
|
+
readonly h: 512;
|
|
9
|
+
};
|
|
10
|
+
readonly check: {
|
|
11
|
+
readonly w: 512;
|
|
12
|
+
readonly h: 512;
|
|
13
|
+
};
|
|
14
|
+
readonly chevronDown: {
|
|
15
|
+
readonly w: 512;
|
|
16
|
+
readonly h: 512;
|
|
17
|
+
};
|
|
18
|
+
readonly chevronLeft: {
|
|
19
|
+
readonly w: 384;
|
|
20
|
+
readonly h: 512;
|
|
21
|
+
};
|
|
22
|
+
readonly chevronRight: {
|
|
23
|
+
readonly w: 384;
|
|
24
|
+
readonly h: 512;
|
|
25
|
+
};
|
|
26
|
+
readonly chevronUp: {
|
|
27
|
+
readonly w: 512;
|
|
28
|
+
readonly h: 512;
|
|
29
|
+
};
|
|
30
|
+
readonly xmarkLarge: {
|
|
31
|
+
readonly w: 448;
|
|
32
|
+
readonly h: 512;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
export declare type IconsType = keyof typeof ICONS;
|
|
36
|
+
declare module "@uxf/ui/icon/theme" {
|
|
37
|
+
interface IconsSet {
|
|
38
|
+
camera: true;
|
|
39
|
+
caretDown: true;
|
|
40
|
+
check: true;
|
|
41
|
+
chevronDown: true;
|
|
42
|
+
chevronLeft: true;
|
|
43
|
+
chevronRight: true;
|
|
44
|
+
chevronUp: true;
|
|
45
|
+
xmarkLarge: true;
|
|
46
|
+
}
|
|
47
|
+
}
|
package/config/icons.js
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// this file is generated automatically, do not change anything manually in the contents of this file
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ICONS = void 0;
|
|
5
|
+
exports.ICONS = {
|
|
6
|
+
camera: { w: 512, h: 512 },
|
|
7
|
+
caretDown: { w: 320, h: 512 },
|
|
8
|
+
check: { w: 512, h: 512 },
|
|
9
|
+
chevronDown: { w: 512, h: 512 },
|
|
10
|
+
chevronLeft: { w: 384, h: 512 },
|
|
11
|
+
chevronRight: { w: 384, h: 512 },
|
|
12
|
+
chevronUp: { w: 512, h: 512 },
|
|
13
|
+
xmarkLarge: { w: 448, h: 512 },
|
|
14
|
+
};
|
package/css/button.css
CHANGED
|
@@ -1,108 +1,203 @@
|
|
|
1
1
|
@keyframes spinner {
|
|
2
|
-
|
|
2
|
+
to {
|
|
3
|
+
transform: rotate(360deg);
|
|
4
|
+
}
|
|
3
5
|
}
|
|
4
6
|
|
|
5
7
|
.uxf-button {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
&__text {
|
|
9
|
-
@apply truncate;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&--full-width {
|
|
13
|
-
@apply w-full flex flex-row justify-center;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
&.is-disabled {
|
|
17
|
-
@apply opacity-50 pointer-events-none shadow-none;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&.is-loading:after {
|
|
21
|
-
content: '';
|
|
22
|
-
width: 20px;
|
|
23
|
-
height: 20px;
|
|
24
|
-
border-radius: 50%;
|
|
25
|
-
border-top: 2px solid;
|
|
26
|
-
border-right: 2px solid transparent;
|
|
27
|
-
animation: spinner .8s linear infinite;
|
|
28
|
-
margin-left: 8px;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&--size-xs {
|
|
32
|
-
@apply px-2.5 py-1.5 text-xs;
|
|
8
|
+
@apply inline-flex items-center rounded-lg before:rounded-lg font-medium
|
|
9
|
+
focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 relative cursor-pointer transition before:transition;
|
|
33
10
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
height: 14px;
|
|
11
|
+
&__text {
|
|
12
|
+
@apply truncate;
|
|
37
13
|
}
|
|
38
|
-
}
|
|
39
14
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
&.is-loading:after {
|
|
44
|
-
width: 16px;
|
|
45
|
-
height: 16px;
|
|
15
|
+
&--full-width {
|
|
16
|
+
@apply w-full flex flex-row justify-center;
|
|
46
17
|
}
|
|
47
|
-
}
|
|
48
18
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
19
|
+
&.is-disabled {
|
|
20
|
+
@apply pointer-events-none;
|
|
21
|
+
}
|
|
52
22
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
23
|
+
&.is-loading {
|
|
24
|
+
@apply pointer-events-none;
|
|
25
|
+
}
|
|
56
26
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
27
|
+
&.is-loading:after {
|
|
28
|
+
content: '';
|
|
29
|
+
width: 20px;
|
|
30
|
+
height: 20px;
|
|
31
|
+
border-radius: 50%;
|
|
32
|
+
border-top: 2px solid;
|
|
33
|
+
border-right: 2px solid transparent;
|
|
34
|
+
animation: spinner .8s linear infinite;
|
|
35
|
+
margin-left: 8px;
|
|
36
|
+
}
|
|
60
37
|
|
|
61
|
-
|
|
62
|
-
|
|
38
|
+
&--size-xs {
|
|
39
|
+
@apply px-2.5 py-1.5 text-xs;
|
|
63
40
|
|
|
64
|
-
|
|
65
|
-
|
|
41
|
+
&.is-loading:after {
|
|
42
|
+
width: 14px;
|
|
43
|
+
height: 14px;
|
|
44
|
+
}
|
|
66
45
|
}
|
|
67
46
|
|
|
68
|
-
|
|
69
|
-
|
|
47
|
+
&--size-sm {
|
|
48
|
+
@apply px-3 py-2 text-sm leading-4;
|
|
49
|
+
|
|
50
|
+
&.is-loading:after {
|
|
51
|
+
width: 16px;
|
|
52
|
+
height: 16px;
|
|
53
|
+
}
|
|
70
54
|
}
|
|
71
55
|
|
|
72
|
-
|
|
73
|
-
|
|
56
|
+
&--size-default {
|
|
57
|
+
@apply px-4 py-3 text-base;
|
|
74
58
|
}
|
|
75
59
|
|
|
76
|
-
|
|
77
|
-
|
|
60
|
+
&--size-lg {
|
|
61
|
+
@apply px-8 py-5 text-base;
|
|
78
62
|
}
|
|
79
63
|
|
|
80
|
-
|
|
81
|
-
|
|
64
|
+
&--size-xl {
|
|
65
|
+
@apply px-10 py-6 text-base;
|
|
82
66
|
}
|
|
83
|
-
}
|
|
84
67
|
|
|
85
|
-
|
|
86
|
-
|
|
68
|
+
&--variant-outlined {
|
|
69
|
+
@apply before:absolute before:pointer-events-none before:inset-0 before:border hover:before:border-2 bg-transparent;
|
|
87
70
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
71
|
+
:root .light & {
|
|
72
|
+
@apply before:border-gray-300 hover:bg-primary-100 hover:before:border-primary-400 focus-visible:ring-primary-500 focus-visible:ring-offset-white;
|
|
91
73
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
74
|
+
&.is-disabled {
|
|
75
|
+
@apply before:border-gray-100 text-gray-400;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
:root .dark & {
|
|
80
|
+
@apply before:border-gray-300 hover:bg-gray-700 hover:before:border-gray-300 focus-visible:ring-primary-500 focus-visible:ring-offset-gray-900;
|
|
95
81
|
|
|
96
|
-
|
|
97
|
-
|
|
82
|
+
&.is-disabled {
|
|
83
|
+
@apply before:border-gray-700 text-gray-600;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
98
86
|
}
|
|
99
87
|
|
|
100
|
-
|
|
101
|
-
|
|
88
|
+
&--variant-default {
|
|
89
|
+
@apply text-white;
|
|
90
|
+
|
|
91
|
+
&.uxf-button--color-default {
|
|
92
|
+
:root .light & {
|
|
93
|
+
@apply text-white bg-primary-500 hover:bg-primary-400 focus-visible:ring-primary-500;
|
|
94
|
+
|
|
95
|
+
&.is-disabled {
|
|
96
|
+
@apply bg-gray-100 text-gray-400;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:root .dark & {
|
|
101
|
+
@apply text-white bg-primary-500 hover:bg-primary-400 focus-visible:ring-primary-500 focus-visible:ring-offset-gray-900;
|
|
102
|
+
|
|
103
|
+
&.is-disabled {
|
|
104
|
+
@apply bg-gray-700 text-gray-400;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
&.uxf-button--color-white {
|
|
110
|
+
:root .light & {
|
|
111
|
+
@apply bg-white hover:bg-gray-200 focus-visible:ring-gray-200;
|
|
112
|
+
|
|
113
|
+
&.is-disabled {
|
|
114
|
+
@apply bg-gray-100 text-gray-400;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
:root .dark & {
|
|
119
|
+
@apply bg-white hover:bg-gray-200 focus-visible:ring-gray-200;
|
|
120
|
+
|
|
121
|
+
&.is-disabled {
|
|
122
|
+
@apply bg-gray-100 text-gray-400;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@apply bg-gray-50 text-gray-700 hover:bg-gray-100 focus-visible:ring-gray-500;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
&.uxf-button--color-success {
|
|
130
|
+
:root .light & {
|
|
131
|
+
@apply text-white bg-success-500 hover:bg-success-400 focus-visible:ring-success-500;
|
|
132
|
+
|
|
133
|
+
&.is-disabled {
|
|
134
|
+
@apply bg-gray-100 text-gray-400;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
:root .dark & {
|
|
139
|
+
@apply text-white bg-success-500 hover:bg-success-400 focus-visible:ring-success-500 focus-visible:ring-offset-gray-900;
|
|
140
|
+
|
|
141
|
+
&.is-disabled {
|
|
142
|
+
@apply bg-gray-700 text-gray-400;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
&.uxf-button--color-warning {
|
|
148
|
+
:root .light & {
|
|
149
|
+
@apply text-white bg-warning-500 hover:bg-warning-400 focus-visible:ring-warning-500;
|
|
150
|
+
|
|
151
|
+
&.is-disabled {
|
|
152
|
+
@apply bg-gray-100 text-gray-400;
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
:root .dark & {
|
|
157
|
+
@apply text-white bg-warning-500 hover:bg-warning-400 focus-visible:ring-warning-500 focus-visible:ring-offset-gray-900;
|
|
158
|
+
|
|
159
|
+
&.is-disabled {
|
|
160
|
+
@apply bg-gray-700 text-gray-400;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
&.uxf-button--color-error {
|
|
166
|
+
:root .light & {
|
|
167
|
+
@apply text-white bg-error-500 hover:bg-error-400 focus-visible:ring-error-500;
|
|
168
|
+
|
|
169
|
+
&.is-disabled {
|
|
170
|
+
@apply bg-gray-100 text-gray-400;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
:root .dark & {
|
|
175
|
+
@apply text-white bg-error-500 hover:bg-error-400 focus-visible:ring-error-500 focus-visible:ring-offset-gray-900;
|
|
176
|
+
|
|
177
|
+
&.is-disabled {
|
|
178
|
+
@apply bg-gray-700 text-gray-400;
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
102
182
|
}
|
|
103
183
|
|
|
104
|
-
|
|
105
|
-
|
|
184
|
+
&--variant-text {
|
|
185
|
+
@apply before:border-transparent;
|
|
186
|
+
|
|
187
|
+
:root .light & {
|
|
188
|
+
@apply hover:bg-black/10 focus-visible:ring-primary-500 focus-visible:ring-offset-white;
|
|
189
|
+
|
|
190
|
+
&.is-disabled {
|
|
191
|
+
@apply text-gray-400;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
:root .dark & {
|
|
196
|
+
@apply hover:bg-white/10 focus-visible:ring-primary-500 focus-visible:ring-offset-gray-900;
|
|
197
|
+
|
|
198
|
+
&.is-disabled {
|
|
199
|
+
@apply text-gray-600;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
106
202
|
}
|
|
107
|
-
}
|
|
108
203
|
}
|
package/css/chip.css
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
.uxf-chip {
|
|
2
|
+
@apply inline-block rounded-lg py-1 px-2 text-xs;
|
|
3
|
+
|
|
4
|
+
&__text {
|
|
5
|
+
@apply truncate;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&--color-success {
|
|
9
|
+
:root .light & {
|
|
10
|
+
@apply text-success-600 bg-success-100;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
:root .dark & {
|
|
14
|
+
@apply text-white bg-success-700;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&--color-warning {
|
|
19
|
+
:root .light & {
|
|
20
|
+
@apply text-warning-600 bg-warning-100;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
:root .dark & {
|
|
24
|
+
@apply text-white bg-warning-700;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&--color-error {
|
|
29
|
+
:root .light & {
|
|
30
|
+
@apply text-error-600 bg-error-100;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:root .dark & {
|
|
34
|
+
@apply text-white bg-error-700;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
.uxf-color-radio-group {
|
|
2
|
+
&__option {
|
|
3
|
+
@apply rounded-full outline-none focus-visible:ring-offset-2 focus-visible:ring-2;
|
|
4
|
+
|
|
5
|
+
:root .light & {
|
|
6
|
+
@apply focus-visible:ring-[color:var(--option-color)] focus-visible:ring-offset-white;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
:root .dark & {
|
|
10
|
+
@apply focus-visible:ring-[color:var(--option-color)] focus-visible:ring-offset-gray-900;
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
&__label {
|
|
15
|
+
@apply mb-2;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
&__label--hidden {
|
|
19
|
+
@apply sr-only;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__options-wrapper {
|
|
23
|
+
@apply flex flex-wrap gap-3.5;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
.uxf-color-radio {
|
|
2
|
+
@apply shrink-0 inline-flex items-center justify-center rounded-full h-7 w-7 bg-[color:var(--bg-color)];
|
|
3
|
+
|
|
4
|
+
&__label {
|
|
5
|
+
@apply sr-only;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&__icon {
|
|
9
|
+
@apply w-4 h-4 text-white opacity-0 transition-opacity;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&__icon--dark {
|
|
13
|
+
@apply text-gray-900;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&.is-selected {
|
|
17
|
+
.uxf-color-radio__icon {
|
|
18
|
+
@apply opacity-100;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
package/css/input.css
CHANGED
|
@@ -1,98 +1,153 @@
|
|
|
1
1
|
.uxf-input {
|
|
2
|
-
|
|
2
|
+
@apply rounded-lg text-base;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
4
|
+
:root .light & {
|
|
5
|
+
@apply bg-gray-100 text-gray-900;
|
|
6
|
+
}
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
&__right-element {
|
|
13
|
-
@apply ml-2;
|
|
14
|
-
}
|
|
8
|
+
:root .dark & {
|
|
9
|
+
@apply bg-gray-800 text-gray-300;
|
|
10
|
+
}
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
&__element {
|
|
13
|
+
:root .light & {
|
|
14
|
+
@apply placeholder:text-gray-400;
|
|
15
|
+
}
|
|
20
16
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
17
|
+
:root .dark & {
|
|
18
|
+
@apply placeholder:text-gray-400;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
&__left-element {
|
|
23
|
+
@apply mr-2;
|
|
24
|
+
}
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
&__right-element {
|
|
27
|
+
@apply ml-2;
|
|
28
|
+
}
|
|
28
29
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
&__left-addon,
|
|
31
|
+
&__right-addon {
|
|
32
|
+
@apply border px-2;
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
:root .light & {
|
|
35
|
+
@apply border-gray-200;
|
|
36
|
+
}
|
|
36
37
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
:root .dark & {
|
|
39
|
+
@apply border-gray-700;
|
|
40
|
+
}
|
|
40
41
|
}
|
|
41
|
-
}
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
@apply rounded-l-none;
|
|
43
|
+
&__left-addon {
|
|
44
|
+
@apply rounded-l-lg border-r-0;
|
|
46
45
|
}
|
|
47
|
-
}
|
|
48
46
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
@apply border-primary-500 ring-1 ring-inset ring-primary-500 ring-offset-0;
|
|
47
|
+
&__right-addon {
|
|
48
|
+
@apply rounded-r-lg border-l-0;
|
|
52
49
|
}
|
|
53
|
-
}
|
|
54
50
|
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
&__wrapper {
|
|
52
|
+
@apply h-12 rounded-lg border px-4;
|
|
57
53
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
54
|
+
:root .light & {
|
|
55
|
+
@apply border-gray-200;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:root .dark & {
|
|
59
|
+
@apply border-gray-700;
|
|
60
|
+
}
|
|
63
61
|
}
|
|
64
|
-
}
|
|
65
62
|
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
&__element {
|
|
64
|
+
@apply bg-transparent outline-none;
|
|
65
|
+
}
|
|
68
66
|
|
|
69
|
-
|
|
70
|
-
|
|
67
|
+
&--has-right-addon {
|
|
68
|
+
.uxf-input__wrapper {
|
|
69
|
+
@apply rounded-r-none;
|
|
70
|
+
}
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
|
|
74
|
-
|
|
73
|
+
&--has-left-addon {
|
|
74
|
+
.uxf-input__wrapper {
|
|
75
|
+
@apply rounded-l-none;
|
|
76
|
+
}
|
|
75
77
|
}
|
|
76
|
-
}
|
|
77
78
|
|
|
78
|
-
&.is-invalid {
|
|
79
79
|
&.is-focused {
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
80
|
+
.uxf-input__wrapper {
|
|
81
|
+
@apply ring-2 ring-inset ring-offset-0;
|
|
82
|
+
|
|
83
|
+
:root .light & {
|
|
84
|
+
@apply ring-primary-500;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
:root .dark & {
|
|
88
|
+
@apply ring-primary-500;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&.is-disabled {
|
|
94
|
+
@apply cursor-not-allowed;
|
|
95
|
+
|
|
96
|
+
:root .light & {
|
|
97
|
+
@apply bg-gray-300;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
:root .dark & {
|
|
101
|
+
@apply bg-gray-600;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.uxf-input__element {
|
|
105
|
+
@apply cursor-not-allowed;
|
|
106
|
+
}
|
|
83
107
|
}
|
|
84
108
|
|
|
85
|
-
|
|
86
|
-
|
|
109
|
+
&.is-readonly {
|
|
110
|
+
@apply cursor-text;
|
|
111
|
+
|
|
112
|
+
.uxf-input__element {
|
|
113
|
+
@apply cursor-text;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.uxf-input__wrapper {
|
|
117
|
+
@apply ring-0;
|
|
118
|
+
}
|
|
87
119
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
120
|
+
.uxf-input__wrapper,
|
|
121
|
+
.uxf-input__left-addon,
|
|
122
|
+
.uxf-input__right-addon {
|
|
123
|
+
:root .light & {
|
|
124
|
+
@apply border-gray-300;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
:root .dark & {
|
|
128
|
+
@apply border-gray-500;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
92
132
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
133
|
+
&.is-invalid {
|
|
134
|
+
&.is-focused {
|
|
135
|
+
.uxf-input__wrapper {
|
|
136
|
+
@apply ring-1 ring-inset ring-error-500 border-error-500 ring-offset-0;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.uxf-input__wrapper {
|
|
141
|
+
@apply border-error-500 placeholder-error-300;
|
|
142
|
+
|
|
143
|
+
.uxf-input__left-element,
|
|
144
|
+
.uxf-input__right-element {
|
|
145
|
+
@apply text-error-500;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.uxf-input__element {
|
|
149
|
+
@apply text-error-900 placeholder-error-300;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
96
152
|
}
|
|
97
|
-
}
|
|
98
153
|
}
|