uplofile 0.1.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.
- package/dist/index.cjs +423 -0
- package/dist/index.d.mts +114 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.d.ts +114 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +413 -0
- package/dist/index.mjs +413 -0
- package/dist/output.css +369 -0
- package/package.json +67 -0
package/dist/output.css
ADDED
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
/*! tailwindcss v4.1.12 | MIT License | https://tailwindcss.com */
|
|
2
|
+
@layer properties;
|
|
3
|
+
@layer theme, base, components, utilities;
|
|
4
|
+
@layer theme {
|
|
5
|
+
:root, :host {
|
|
6
|
+
--font-sans: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
|
|
7
|
+
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
|
8
|
+
--font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,
|
|
9
|
+
"Liberation Mono", "Courier New", monospace;
|
|
10
|
+
--color-gray-200: oklch(0.928 0.006 264.531);
|
|
11
|
+
--color-gray-500: oklch(0.551 0.027 264.364);
|
|
12
|
+
--color-black: #000;
|
|
13
|
+
--color-white: #fff;
|
|
14
|
+
--spacing: 0.25rem;
|
|
15
|
+
--text-xs: 0.75rem;
|
|
16
|
+
--text-xs--line-height: calc(1 / 0.75);
|
|
17
|
+
--radius-xl: 0.75rem;
|
|
18
|
+
--default-font-family: var(--font-sans);
|
|
19
|
+
--default-font-feature-settings: var(--font-sans--font-feature-settings);
|
|
20
|
+
--default-font-variation-settings: var(
|
|
21
|
+
--font-sans--font-variation-settings
|
|
22
|
+
);
|
|
23
|
+
--default-mono-font-family: var(--font-mono);
|
|
24
|
+
--default-mono-font-feature-settings: var(
|
|
25
|
+
--font-mono--font-feature-settings
|
|
26
|
+
);
|
|
27
|
+
--default-mono-font-variation-settings: var(
|
|
28
|
+
--font-mono--font-variation-settings
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
@layer base {
|
|
33
|
+
*, ::after, ::before, ::backdrop, ::file-selector-button {
|
|
34
|
+
box-sizing: border-box;
|
|
35
|
+
margin: 0;
|
|
36
|
+
padding: 0;
|
|
37
|
+
border: 0 solid;
|
|
38
|
+
}
|
|
39
|
+
html, :host {
|
|
40
|
+
line-height: 1.5;
|
|
41
|
+
-webkit-text-size-adjust: 100%;
|
|
42
|
+
tab-size: 4;
|
|
43
|
+
font-family: var( --default-font-family, ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" );
|
|
44
|
+
font-feature-settings: var(--default-font-feature-settings, normal);
|
|
45
|
+
font-variation-settings: var( --default-font-variation-settings, normal );
|
|
46
|
+
-webkit-tap-highlight-color: transparent;
|
|
47
|
+
}
|
|
48
|
+
body {
|
|
49
|
+
line-height: inherit;
|
|
50
|
+
}
|
|
51
|
+
hr {
|
|
52
|
+
height: 0;
|
|
53
|
+
color: inherit;
|
|
54
|
+
border-top-width: 1px;
|
|
55
|
+
}
|
|
56
|
+
abbr:where([title]) {
|
|
57
|
+
-webkit-text-decoration: underline dotted;
|
|
58
|
+
text-decoration: underline dotted;
|
|
59
|
+
}
|
|
60
|
+
h1, h2, h3, h4, h5, h6 {
|
|
61
|
+
font-size: inherit;
|
|
62
|
+
font-weight: inherit;
|
|
63
|
+
}
|
|
64
|
+
a {
|
|
65
|
+
color: inherit;
|
|
66
|
+
-webkit-text-decoration: inherit;
|
|
67
|
+
text-decoration: inherit;
|
|
68
|
+
}
|
|
69
|
+
b, strong {
|
|
70
|
+
font-weight: bolder;
|
|
71
|
+
}
|
|
72
|
+
code, kbd, samp, pre {
|
|
73
|
+
font-family: var( --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace );
|
|
74
|
+
font-feature-settings: var( --default-mono-font-feature-settings, normal );
|
|
75
|
+
font-variation-settings: var( --default-mono-font-variation-settings, normal );
|
|
76
|
+
font-size: 1em;
|
|
77
|
+
}
|
|
78
|
+
small {
|
|
79
|
+
font-size: 80%;
|
|
80
|
+
}
|
|
81
|
+
sub, sup {
|
|
82
|
+
font-size: 75%;
|
|
83
|
+
line-height: 0;
|
|
84
|
+
position: relative;
|
|
85
|
+
vertical-align: baseline;
|
|
86
|
+
}
|
|
87
|
+
sub {
|
|
88
|
+
bottom: -0.25em;
|
|
89
|
+
}
|
|
90
|
+
sup {
|
|
91
|
+
top: -0.5em;
|
|
92
|
+
}
|
|
93
|
+
table {
|
|
94
|
+
text-indent: 0;
|
|
95
|
+
border-color: inherit;
|
|
96
|
+
border-collapse: collapse;
|
|
97
|
+
}
|
|
98
|
+
:-moz-focusring {
|
|
99
|
+
outline: auto;
|
|
100
|
+
}
|
|
101
|
+
progress {
|
|
102
|
+
vertical-align: baseline;
|
|
103
|
+
}
|
|
104
|
+
summary {
|
|
105
|
+
display: list-item;
|
|
106
|
+
}
|
|
107
|
+
ol, ul, menu {
|
|
108
|
+
list-style: none;
|
|
109
|
+
}
|
|
110
|
+
img, svg, video, canvas, audio, iframe, embed, object {
|
|
111
|
+
display: block;
|
|
112
|
+
vertical-align: middle;
|
|
113
|
+
}
|
|
114
|
+
img, video {
|
|
115
|
+
max-width: 100%;
|
|
116
|
+
height: auto;
|
|
117
|
+
}
|
|
118
|
+
button, input, select, optgroup, textarea, ::file-selector-button {
|
|
119
|
+
font: inherit;
|
|
120
|
+
font-feature-settings: inherit;
|
|
121
|
+
font-variation-settings: inherit;
|
|
122
|
+
letter-spacing: inherit;
|
|
123
|
+
color: inherit;
|
|
124
|
+
border-radius: 0;
|
|
125
|
+
background-color: transparent;
|
|
126
|
+
opacity: 1;
|
|
127
|
+
}
|
|
128
|
+
:where(select:is([multiple], [size])) optgroup {
|
|
129
|
+
font-weight: bolder;
|
|
130
|
+
}
|
|
131
|
+
:where(select:is([multiple], [size])) optgroup option {
|
|
132
|
+
padding-inline-start: 20px;
|
|
133
|
+
}
|
|
134
|
+
::file-selector-button {
|
|
135
|
+
margin-inline-end: 4px;
|
|
136
|
+
}
|
|
137
|
+
::placeholder {
|
|
138
|
+
opacity: 1;
|
|
139
|
+
color: currentColor;
|
|
140
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
141
|
+
color: color-mix(in oklab, currentColor 50%, transparent);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
textarea {
|
|
145
|
+
resize: vertical;
|
|
146
|
+
}
|
|
147
|
+
::-webkit-search-decoration {
|
|
148
|
+
-webkit-appearance: none;
|
|
149
|
+
}
|
|
150
|
+
::-webkit-date-and-time-value {
|
|
151
|
+
min-height: 1lh;
|
|
152
|
+
text-align: inherit;
|
|
153
|
+
}
|
|
154
|
+
::-webkit-datetime-edit {
|
|
155
|
+
display: inline-flex;
|
|
156
|
+
}
|
|
157
|
+
::-webkit-datetime-edit-fields-wrapper {
|
|
158
|
+
padding: 0;
|
|
159
|
+
}
|
|
160
|
+
::-webkit-datetime-edit, ::-webkit-datetime-edit-year-field, ::-webkit-datetime-edit-month-field, ::-webkit-datetime-edit-day-field, ::-webkit-datetime-edit-hour-field, ::-webkit-datetime-edit-minute-field, ::-webkit-datetime-edit-second-field, ::-webkit-datetime-edit-millisecond-field, ::-webkit-datetime-edit-meridiem-field {
|
|
161
|
+
padding-block: 0;
|
|
162
|
+
}
|
|
163
|
+
:-moz-ui-invalid {
|
|
164
|
+
box-shadow: none;
|
|
165
|
+
}
|
|
166
|
+
button, input:where([type="button"], [type="reset"], [type="submit"]), ::file-selector-button {
|
|
167
|
+
appearance: button;
|
|
168
|
+
}
|
|
169
|
+
::-webkit-inner-spin-button, ::-webkit-outer-spin-button {
|
|
170
|
+
height: auto;
|
|
171
|
+
}
|
|
172
|
+
[hidden]:where(:not([hidden="until-found"])) {
|
|
173
|
+
display: none !important;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
@layer utilities {
|
|
177
|
+
.absolute {
|
|
178
|
+
position: absolute;
|
|
179
|
+
}
|
|
180
|
+
.relative {
|
|
181
|
+
position: relative;
|
|
182
|
+
}
|
|
183
|
+
.inset-x-0 {
|
|
184
|
+
inset-inline: calc(var(--spacing) * 0);
|
|
185
|
+
}
|
|
186
|
+
.right-0 {
|
|
187
|
+
right: calc(var(--spacing) * 0);
|
|
188
|
+
}
|
|
189
|
+
.bottom-0 {
|
|
190
|
+
bottom: calc(var(--spacing) * 0);
|
|
191
|
+
}
|
|
192
|
+
.left-0 {
|
|
193
|
+
left: calc(var(--spacing) * 0);
|
|
194
|
+
}
|
|
195
|
+
.flex {
|
|
196
|
+
display: flex;
|
|
197
|
+
}
|
|
198
|
+
.grid {
|
|
199
|
+
display: grid;
|
|
200
|
+
}
|
|
201
|
+
.hidden {
|
|
202
|
+
display: none;
|
|
203
|
+
}
|
|
204
|
+
.h-1 {
|
|
205
|
+
height: calc(var(--spacing) * 1);
|
|
206
|
+
}
|
|
207
|
+
.h-32 {
|
|
208
|
+
height: calc(var(--spacing) * 32);
|
|
209
|
+
}
|
|
210
|
+
.h-full {
|
|
211
|
+
height: 100%;
|
|
212
|
+
}
|
|
213
|
+
.w-full {
|
|
214
|
+
width: 100%;
|
|
215
|
+
}
|
|
216
|
+
.grid-cols-2 {
|
|
217
|
+
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
218
|
+
}
|
|
219
|
+
.items-center {
|
|
220
|
+
align-items: center;
|
|
221
|
+
}
|
|
222
|
+
.justify-center {
|
|
223
|
+
justify-content: center;
|
|
224
|
+
}
|
|
225
|
+
.justify-end {
|
|
226
|
+
justify-content: flex-end;
|
|
227
|
+
}
|
|
228
|
+
.gap-2 {
|
|
229
|
+
gap: calc(var(--spacing) * 2);
|
|
230
|
+
}
|
|
231
|
+
.gap-3 {
|
|
232
|
+
gap: calc(var(--spacing) * 3);
|
|
233
|
+
}
|
|
234
|
+
.overflow-hidden {
|
|
235
|
+
overflow: hidden;
|
|
236
|
+
}
|
|
237
|
+
.rounded-xl {
|
|
238
|
+
border-radius: var(--radius-xl);
|
|
239
|
+
}
|
|
240
|
+
.border {
|
|
241
|
+
border-style: var(--tw-border-style);
|
|
242
|
+
border-width: 1px;
|
|
243
|
+
}
|
|
244
|
+
.bg-black\/50 {
|
|
245
|
+
background-color: color-mix(in srgb, #000 50%, transparent);
|
|
246
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
247
|
+
background-color: color-mix(in oklab, var(--color-black) 50%, transparent);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
.bg-black\/80 {
|
|
251
|
+
background-color: color-mix(in srgb, #000 80%, transparent);
|
|
252
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
253
|
+
background-color: color-mix(in oklab, var(--color-black) 80%, transparent);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
.bg-gray-200 {
|
|
257
|
+
background-color: var(--color-gray-200);
|
|
258
|
+
}
|
|
259
|
+
.bg-gradient-to-t {
|
|
260
|
+
--tw-gradient-position: to top in oklab;
|
|
261
|
+
background-image: linear-gradient(var(--tw-gradient-stops));
|
|
262
|
+
}
|
|
263
|
+
.from-black\/60 {
|
|
264
|
+
--tw-gradient-from: color-mix(in srgb, #000 60%, transparent);
|
|
265
|
+
@supports (color: color-mix(in lab, red, red)) {
|
|
266
|
+
--tw-gradient-from: color-mix(in oklab, var(--color-black) 60%, transparent);
|
|
267
|
+
}
|
|
268
|
+
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
269
|
+
}
|
|
270
|
+
.to-transparent {
|
|
271
|
+
--tw-gradient-to: transparent;
|
|
272
|
+
--tw-gradient-stops: var(--tw-gradient-via-stops, var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position));
|
|
273
|
+
}
|
|
274
|
+
.object-cover {
|
|
275
|
+
object-fit: cover;
|
|
276
|
+
}
|
|
277
|
+
.p-2 {
|
|
278
|
+
padding: calc(var(--spacing) * 2);
|
|
279
|
+
}
|
|
280
|
+
.px-2 {
|
|
281
|
+
padding-inline: calc(var(--spacing) * 2);
|
|
282
|
+
}
|
|
283
|
+
.py-1 {
|
|
284
|
+
padding-block: calc(var(--spacing) * 1);
|
|
285
|
+
}
|
|
286
|
+
.text-xs {
|
|
287
|
+
font-size: var(--text-xs);
|
|
288
|
+
line-height: var(--tw-leading, var(--text-xs--line-height));
|
|
289
|
+
}
|
|
290
|
+
.text-gray-500 {
|
|
291
|
+
color: var(--color-gray-500);
|
|
292
|
+
}
|
|
293
|
+
.text-white {
|
|
294
|
+
color: var(--color-white);
|
|
295
|
+
}
|
|
296
|
+
.sm\:grid-cols-3 {
|
|
297
|
+
@media (width >= 40rem) {
|
|
298
|
+
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
.md\:grid-cols-4 {
|
|
302
|
+
@media (width >= 48rem) {
|
|
303
|
+
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
@property --tw-border-style {
|
|
308
|
+
syntax: "*";
|
|
309
|
+
inherits: false;
|
|
310
|
+
initial-value: solid;
|
|
311
|
+
}
|
|
312
|
+
@property --tw-gradient-position {
|
|
313
|
+
syntax: "*";
|
|
314
|
+
inherits: false;
|
|
315
|
+
}
|
|
316
|
+
@property --tw-gradient-from {
|
|
317
|
+
syntax: "<color>";
|
|
318
|
+
inherits: false;
|
|
319
|
+
initial-value: #0000;
|
|
320
|
+
}
|
|
321
|
+
@property --tw-gradient-via {
|
|
322
|
+
syntax: "<color>";
|
|
323
|
+
inherits: false;
|
|
324
|
+
initial-value: #0000;
|
|
325
|
+
}
|
|
326
|
+
@property --tw-gradient-to {
|
|
327
|
+
syntax: "<color>";
|
|
328
|
+
inherits: false;
|
|
329
|
+
initial-value: #0000;
|
|
330
|
+
}
|
|
331
|
+
@property --tw-gradient-stops {
|
|
332
|
+
syntax: "*";
|
|
333
|
+
inherits: false;
|
|
334
|
+
}
|
|
335
|
+
@property --tw-gradient-via-stops {
|
|
336
|
+
syntax: "*";
|
|
337
|
+
inherits: false;
|
|
338
|
+
}
|
|
339
|
+
@property --tw-gradient-from-position {
|
|
340
|
+
syntax: "<length-percentage>";
|
|
341
|
+
inherits: false;
|
|
342
|
+
initial-value: 0%;
|
|
343
|
+
}
|
|
344
|
+
@property --tw-gradient-via-position {
|
|
345
|
+
syntax: "<length-percentage>";
|
|
346
|
+
inherits: false;
|
|
347
|
+
initial-value: 50%;
|
|
348
|
+
}
|
|
349
|
+
@property --tw-gradient-to-position {
|
|
350
|
+
syntax: "<length-percentage>";
|
|
351
|
+
inherits: false;
|
|
352
|
+
initial-value: 100%;
|
|
353
|
+
}
|
|
354
|
+
@layer properties {
|
|
355
|
+
@supports ((-webkit-hyphens: none) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
|
|
356
|
+
*, ::before, ::after, ::backdrop {
|
|
357
|
+
--tw-border-style: solid;
|
|
358
|
+
--tw-gradient-position: initial;
|
|
359
|
+
--tw-gradient-from: #0000;
|
|
360
|
+
--tw-gradient-via: #0000;
|
|
361
|
+
--tw-gradient-to: #0000;
|
|
362
|
+
--tw-gradient-stops: initial;
|
|
363
|
+
--tw-gradient-via-stops: initial;
|
|
364
|
+
--tw-gradient-from-position: 0%;
|
|
365
|
+
--tw-gradient-via-position: 50%;
|
|
366
|
+
--tw-gradient-to-position: 100%;
|
|
367
|
+
}
|
|
368
|
+
}
|
|
369
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "uplofile",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Composable file upload component for React.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "Chris Josh <KristofaJosh>",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git+https://github.com/KristofaJosh/uplofile.git"
|
|
10
|
+
},
|
|
11
|
+
"keywords": [
|
|
12
|
+
"react",
|
|
13
|
+
"file-upload",
|
|
14
|
+
"file-uploader",
|
|
15
|
+
"component",
|
|
16
|
+
"composition"
|
|
17
|
+
],
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "dist/index.cjs",
|
|
20
|
+
"module": "dist/index.mjs",
|
|
21
|
+
"types": "dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": {
|
|
25
|
+
"types": "./dist/index.d.mts",
|
|
26
|
+
"default": "./dist/index.mjs"
|
|
27
|
+
},
|
|
28
|
+
"require": {
|
|
29
|
+
"types": "./dist/index.d.ts",
|
|
30
|
+
"default": "./dist/index.js"
|
|
31
|
+
},
|
|
32
|
+
"default": "./dist/index.js"
|
|
33
|
+
},
|
|
34
|
+
"./output.css": "./dist/output.css"
|
|
35
|
+
},
|
|
36
|
+
"files": [
|
|
37
|
+
"dist"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "bunchee src/index.ts --dts && pnpm run build:css",
|
|
41
|
+
"build:css": "npx @tailwindcss/cli -i ./src/index.css -o ./dist/output.css",
|
|
42
|
+
"clean": "rm -rf dist",
|
|
43
|
+
"prepare": "pnpm run build",
|
|
44
|
+
"prepublishOnly": "pnpm run build",
|
|
45
|
+
"test": "vitest"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@radix-ui/react-slot": "1.1.0"
|
|
49
|
+
},
|
|
50
|
+
"devDependencies": {
|
|
51
|
+
"@testing-library/jest-dom": "6.6.3",
|
|
52
|
+
"@testing-library/react": "16.0.1",
|
|
53
|
+
"@types/react": "18.3.5",
|
|
54
|
+
"@types/react-dom": "18.3.0",
|
|
55
|
+
"bunchee": "6.6.0",
|
|
56
|
+
"prettier": "3.6.0",
|
|
57
|
+
"react": "18.2.0",
|
|
58
|
+
"react-dom": "18.2.0",
|
|
59
|
+
"tailwindcss": "4.0.0",
|
|
60
|
+
"typescript": "5.5.4",
|
|
61
|
+
"vitest": "2.0.5"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"react": ">=16.0.0",
|
|
65
|
+
"react-dom": ">=16.0.0"
|
|
66
|
+
}
|
|
67
|
+
}
|