@radioactive-labs/plutonium 0.4.2 → 0.4.3
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/package.json +1 -1
- package/src/css/core.css +13 -10
- package/src/css/easymde.css +166 -720
- package/src/css/intl_tel_input.css +259 -0
- package/src/css/plutonium.css +1 -0
- package/src/css/plutonium.entry.css +6 -15
- package/src/css/slim_select.css +244 -246
- package/src/dist/css/plutonium.css +2 -2
- package/src/dist/js/plutonium.js +16 -0
- package/src/dist/js/plutonium.js.map +3 -3
- package/src/dist/js/plutonium.min.js +28 -28
- package/src/dist/js/plutonium.min.js.map +4 -4
- package/src/js/controllers/register_controllers.js +2 -0
- package/src/js/controllers/remote_modal_controller.js +24 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* International Telephone Input - Complete Tailwind v4 Overrides
|
|
3
|
+
* Overrides to match Plutonium form theme using Tailwind colors
|
|
4
|
+
* Import this AFTER the original intl_tel_input.css
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/* Override CSS variables with Tailwind colors */
|
|
8
|
+
:root {
|
|
9
|
+
--iti-hover-color: theme(colors.primary.50);
|
|
10
|
+
--iti-border-color: theme(colors.gray.300);
|
|
11
|
+
--iti-dialcode-color: theme(colors.gray.500);
|
|
12
|
+
--iti-dropdown-bg: theme(colors.white);
|
|
13
|
+
--iti-arrow-color: theme(colors.gray.700);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Dark mode overrides */
|
|
17
|
+
@media (prefers-color-scheme: dark) {
|
|
18
|
+
:root {
|
|
19
|
+
--iti-hover-color: theme(colors.primary.900 / 0.3);
|
|
20
|
+
--iti-border-color: theme(colors.gray.600);
|
|
21
|
+
--iti-dialcode-color: theme(colors.gray.400);
|
|
22
|
+
--iti-dropdown-bg: theme(colors.gray.700);
|
|
23
|
+
--iti-arrow-color: theme(colors.white);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Manual dark mode class support */
|
|
28
|
+
.dark {
|
|
29
|
+
--iti-hover-color: theme(colors.primary.900 / 0.3);
|
|
30
|
+
--iti-border-color: theme(colors.gray.600);
|
|
31
|
+
--iti-dialcode-color: theme(colors.gray.400);
|
|
32
|
+
--iti-dropdown-bg: theme(colors.gray.700);
|
|
33
|
+
--iti-arrow-color: theme(colors.white);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/* ITI wrapper to ensure full width */
|
|
37
|
+
.iti {
|
|
38
|
+
@apply w-full;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* Main container - match form input styling */
|
|
42
|
+
.iti input.iti__tel-input,
|
|
43
|
+
.iti input.iti__tel-input[type=tel],
|
|
44
|
+
.iti input.iti__tel-input[type=text] {
|
|
45
|
+
@apply w-full border border-gray-300 rounded-md shadow-sm font-medium text-sm bg-white text-gray-700 outline-none transition-colors duration-200 focus:ring-2 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400;
|
|
46
|
+
padding: theme(spacing.2);
|
|
47
|
+
padding-left: 52px;
|
|
48
|
+
/* Space for country selector */
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* Country container positioning */
|
|
52
|
+
.iti .iti__country-container {
|
|
53
|
+
@apply absolute top-0 bottom-0 left-0 z-10;
|
|
54
|
+
padding: theme(spacing.2);
|
|
55
|
+
width: 52px;
|
|
56
|
+
/* Fixed width to match input padding */
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/* Selected country button styling */
|
|
60
|
+
.iti .iti__selected-country {
|
|
61
|
+
@apply bg-transparent border-0 text-gray-700 dark:text-white;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/* Selected country primary container */
|
|
65
|
+
.iti .iti__selected-country-primary {
|
|
66
|
+
@apply px-2 text-gray-700 dark:text-white;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/* Arrow styling with Tailwind colors */
|
|
70
|
+
.iti .iti__arrow {
|
|
71
|
+
@apply ml-1;
|
|
72
|
+
border-top-color: theme(colors.gray.700);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.dark .iti .iti__arrow {
|
|
76
|
+
border-top-color: theme(colors.white);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.iti .iti__arrow--up {
|
|
80
|
+
border-bottom-color: theme(colors.gray.700);
|
|
81
|
+
border-top-color: transparent;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.dark .iti .iti__arrow--up {
|
|
85
|
+
border-bottom-color: theme(colors.white);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
/* Dropdown content styling to match form theme */
|
|
89
|
+
.iti .iti__dropdown-content {
|
|
90
|
+
@apply border border-gray-300 bg-white shadow-sm rounded-md dark:bg-gray-700 dark:border-gray-600;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
/* Search input to match form theme */
|
|
94
|
+
.iti .iti__search-input {
|
|
95
|
+
@apply w-full p-2 border border-gray-300 rounded-md shadow-sm font-medium text-sm bg-white text-gray-700 outline-none focus:ring-2 focus:ring-primary-500 focus:border-primary-500 dark:bg-gray-700 dark:border-gray-600 dark:text-white dark:placeholder-gray-400;
|
|
96
|
+
margin: theme(spacing.2);
|
|
97
|
+
width: calc(100% - theme(spacing.4));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
/* Search input border top */
|
|
101
|
+
.iti .iti__search-input+.iti__country-list {
|
|
102
|
+
@apply border-t border-gray-300 dark:border-gray-600;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
/* Country list styling */
|
|
106
|
+
.iti .iti__country-list {
|
|
107
|
+
@apply max-h-48 overflow-y-auto;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/* Individual country styling */
|
|
111
|
+
.iti .iti__country {
|
|
112
|
+
@apply px-2 py-2 text-gray-700 hover:bg-primary-500 hover:text-white dark:text-white dark:hover:bg-primary-500;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/* Country name and flag spacing */
|
|
116
|
+
.iti .iti__country-name,
|
|
117
|
+
.iti .iti__country-list .iti__flag {
|
|
118
|
+
@apply mr-2 dark:mr-2;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/* RTL support */
|
|
122
|
+
[dir="rtl"] .iti .iti__country-name,
|
|
123
|
+
[dir="rtl"] .iti .iti__country-list .iti__flag {
|
|
124
|
+
@apply mr-0 ml-2;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/* Dial code styling */
|
|
128
|
+
.iti .iti__dial-code {
|
|
129
|
+
@apply text-gray-500 dark:text-gray-400;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* Selected dial code */
|
|
133
|
+
.iti .iti__selected-dial-code {
|
|
134
|
+
@apply ml-1 text-gray-500 dark:text-gray-400;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
[dir="rtl"] .iti .iti__selected-dial-code {
|
|
138
|
+
@apply ml-0 mr-1;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
/* Prevent any styling when aria-activedescendant is set (dropdown navigation) */
|
|
142
|
+
.iti .iti__selected-country[aria-activedescendant],
|
|
143
|
+
.iti .iti__selected-country-primary[aria-activedescendant] {
|
|
144
|
+
background-color: transparent !important;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/* Prevent hover styling when dropdown content is being hovered */
|
|
148
|
+
.iti .iti__selected-country:has(+ .iti__dropdown-content:hover),
|
|
149
|
+
.iti .iti__selected-country-primary:has(~ .iti__dropdown-content:hover) {
|
|
150
|
+
background-color: transparent !important;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Remove all hover states from country container completely */
|
|
154
|
+
.iti--allow-dropdown .iti__country-container:hover,
|
|
155
|
+
.iti--allow-dropdown .iti__country-container:hover .iti__selected-country,
|
|
156
|
+
.iti--allow-dropdown .iti__country-container:hover .iti__selected-country-primary {
|
|
157
|
+
background-color: transparent !important;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Ensure flags never get background colors on hover or when aria-activedescendant is set */
|
|
161
|
+
.iti .iti__flag,
|
|
162
|
+
.iti .iti__selected-country[aria-activedescendant] .iti__flag,
|
|
163
|
+
.iti .iti__selected-country-primary[aria-activedescendant] .iti__flag,
|
|
164
|
+
.iti .iti__country-container:hover .iti__flag {
|
|
165
|
+
background-color: transparent !important;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* Globe icon maintains its specific background */
|
|
169
|
+
.iti .iti__flag.iti__globe {
|
|
170
|
+
@apply bg-gray-100 dark:bg-gray-600;
|
|
171
|
+
background-color: theme(colors.gray.100) !important;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.dark .iti .iti__flag.iti__globe {
|
|
175
|
+
background-color: theme(colors.gray.600) !important;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
/* Country highlight state */
|
|
179
|
+
.iti .iti__country.iti__highlight {
|
|
180
|
+
@apply bg-primary-500 text-white;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
/* Fullscreen popup styling for mobile */
|
|
184
|
+
.iti--fullscreen-popup.iti--container {
|
|
185
|
+
@apply bg-black/50;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
.iti--fullscreen-popup .iti__dropdown-content {
|
|
189
|
+
@apply bg-white dark:bg-gray-700;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.iti--fullscreen-popup .iti__country {
|
|
193
|
+
@apply py-3 text-base;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/* Globe icon visibility fix for dark mode */
|
|
197
|
+
.iti .iti__flag.iti__globe {
|
|
198
|
+
@apply bg-gray-100 dark:bg-gray-600;
|
|
199
|
+
background-blend-mode: multiply;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
.dark .iti .iti__flag.iti__globe {
|
|
203
|
+
filter: invert(1) brightness(0.8);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* Validation state overrides */
|
|
207
|
+
.iti.iti-invalid input.iti__tel-input,
|
|
208
|
+
.iti.iti-invalid input.iti__tel-input[type=tel],
|
|
209
|
+
.iti.iti-invalid input.iti__tel-input[type=text] {
|
|
210
|
+
@apply bg-red-50 border-red-500 text-red-900 focus:ring-red-500 focus:border-red-500 dark:border-red-500 dark:text-red-500;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.iti.iti-valid input.iti__tel-input,
|
|
214
|
+
.iti.iti-valid input.iti__tel-input[type=tel],
|
|
215
|
+
.iti.iti-valid input.iti__tel-input[type=text] {
|
|
216
|
+
@apply bg-green-50 border-green-500 text-green-900 focus:ring-green-500 focus:border-green-500 dark:border-green-500 dark:text-green-400;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
/* Validation state arrow colors */
|
|
220
|
+
.iti.iti-invalid .iti__arrow {
|
|
221
|
+
border-top-color: theme(colors.red.500);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.iti.iti-invalid .iti__arrow--up {
|
|
225
|
+
border-bottom-color: theme(colors.red.500);
|
|
226
|
+
border-top-color: transparent;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.iti.iti-valid .iti__arrow {
|
|
230
|
+
border-top-color: theme(colors.green.500);
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.iti.iti-valid .iti__arrow--up {
|
|
234
|
+
border-bottom-color: theme(colors.green.500);
|
|
235
|
+
border-top-color: transparent;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
/* Disabled state */
|
|
239
|
+
.iti input.iti__tel-input:disabled,
|
|
240
|
+
.iti input.iti__tel-input[type=tel]:disabled,
|
|
241
|
+
.iti input.iti__tel-input[type=text]:disabled {
|
|
242
|
+
@apply cursor-not-allowed bg-gray-100 text-gray-500 dark:bg-gray-900 dark:text-gray-400;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.iti input.iti__tel-input:disabled+.iti__country-container {
|
|
246
|
+
@apply cursor-not-allowed;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
.iti input.iti__tel-input:disabled+.iti__country-container .iti__selected-country {
|
|
250
|
+
@apply text-gray-500 dark:text-gray-400;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.iti input.iti__tel-input:disabled+.iti__country-container .iti__arrow {
|
|
254
|
+
border-top-color: theme(colors.gray.400);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
.dark .iti input.iti__tel-input:disabled+.iti__country-container .iti__arrow {
|
|
258
|
+
border-top-color: theme(colors.gray.600);
|
|
259
|
+
}
|
package/src/css/plutonium.css
CHANGED
|
@@ -4,20 +4,11 @@
|
|
|
4
4
|
@config '../../tailwind.config.js';
|
|
5
5
|
|
|
6
6
|
/*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
looks the same as it did with Tailwind CSS v3.
|
|
10
|
-
|
|
11
|
-
If we ever want to remove these styles, we need to add an explicit border
|
|
12
|
-
color utility to any element that depends on these defaults.
|
|
7
|
+
Border color compatibility for Tailwind CSS v4
|
|
8
|
+
The default border color changed from gray-200 to currentColor in v4
|
|
13
9
|
*/
|
|
14
|
-
@layer base {
|
|
15
10
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
::file-selector-button {
|
|
21
|
-
border-color: var(--color-gray-200, currentColor);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
11
|
+
/**
|
|
12
|
+
* File Upload Button Styling
|
|
13
|
+
* Styles for input[type="file"]::file-selector-button
|
|
14
|
+
*/
|