aplance-ui 1.1.1 → 1.2.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/package.json +1 -1
- package/registry/components/primitives/infinite-scroll/infinite-scroll-context.ts +32 -0
- package/registry/components/primitives/infinite-scroll/infinite-scroll.module.css +118 -0
- package/registry/components/primitives/infinite-scroll/infinite-scroll.tsx +386 -0
- package/registry/components/primitives/slider/slider-context.ts +50 -0
- package/registry/components/primitives/slider/slider.module.css +300 -0
- package/registry/components/primitives/slider/slider.tsx +1174 -0
- package/registry/components/primitives/slider/types.ts +140 -0
- package/registry/components/primitives/slider/utils.ts +88 -0
- package/registry/components/ui/breadcrumbs/breadcrumbs.module.css +144 -0
- package/registry/components/ui/breadcrumbs/breadcrumbs.tsx +236 -0
- package/registry/components/ui/chart/chart.module.css +86 -70
- package/registry/components/ui/chart/chart.tsx +117 -31
- package/registry/components/ui/input-fields/media-input/media-input.module.css +12 -0
- package/registry/components/ui/input-fields/media-input/media-input.tsx +10 -9
- package/registry/components/ui/input-fields/media-input/useMediaUpload.tsx +19 -5
- package/registry/components/ui/input-fields/media-input/utils.ts +13 -5
- package/registry/registry.json +64 -1
|
@@ -138,9 +138,17 @@ export const validateIncomingFiles = (
|
|
|
138
138
|
const rejected: MediaRejection[] = [];
|
|
139
139
|
|
|
140
140
|
const seen = new Set(options.existing.map((f) => fileFingerprint(f.file)));
|
|
141
|
+
const maxFiles =
|
|
142
|
+
typeof options.maxFiles === "number" && Number.isFinite(options.maxFiles)
|
|
143
|
+
? Math.max(0, Math.floor(options.maxFiles))
|
|
144
|
+
: undefined;
|
|
145
|
+
const maxSize =
|
|
146
|
+
typeof options.maxSize === "number" && Number.isFinite(options.maxSize)
|
|
147
|
+
? Math.max(0, options.maxSize)
|
|
148
|
+
: undefined;
|
|
141
149
|
const remainingCapacity = options.multiple
|
|
142
|
-
?
|
|
143
|
-
? Math.max(0,
|
|
150
|
+
? maxFiles !== undefined
|
|
151
|
+
? Math.max(0, maxFiles - options.existing.length)
|
|
144
152
|
: Number.POSITIVE_INFINITY
|
|
145
153
|
: 1;
|
|
146
154
|
|
|
@@ -153,11 +161,11 @@ export const validateIncomingFiles = (
|
|
|
153
161
|
});
|
|
154
162
|
continue;
|
|
155
163
|
}
|
|
156
|
-
if (
|
|
164
|
+
if (maxSize !== undefined && file.size > maxSize) {
|
|
157
165
|
rejected.push({
|
|
158
166
|
file,
|
|
159
167
|
code: "file-too-large",
|
|
160
|
-
message: rejectionMessage("file-too-large", { maxSize
|
|
168
|
+
message: rejectionMessage("file-too-large", { maxSize }),
|
|
161
169
|
});
|
|
162
170
|
continue;
|
|
163
171
|
}
|
|
@@ -174,7 +182,7 @@ export const validateIncomingFiles = (
|
|
|
174
182
|
rejected.push({
|
|
175
183
|
file,
|
|
176
184
|
code: "too-many-files",
|
|
177
|
-
message: rejectionMessage("too-many-files", { maxFiles
|
|
185
|
+
message: rejectionMessage("too-many-files", { maxFiles }),
|
|
178
186
|
});
|
|
179
187
|
continue;
|
|
180
188
|
}
|
package/registry/registry.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://ui.aplance.com/registry.schema.json",
|
|
3
3
|
"version": 4,
|
|
4
|
-
"generated": "2026-05-
|
|
4
|
+
"generated": "2026-05-15T11:50:32.790Z",
|
|
5
5
|
"units": [
|
|
6
6
|
{
|
|
7
7
|
"name": "accordion",
|
|
@@ -53,6 +53,24 @@
|
|
|
53
53
|
"clsx"
|
|
54
54
|
]
|
|
55
55
|
},
|
|
56
|
+
{
|
|
57
|
+
"name": "breadcrumbs",
|
|
58
|
+
"kind": "component",
|
|
59
|
+
"group": "ui",
|
|
60
|
+
"files": [
|
|
61
|
+
"components/ui/breadcrumbs/breadcrumbs.module.css",
|
|
62
|
+
"components/ui/breadcrumbs/breadcrumbs.tsx"
|
|
63
|
+
],
|
|
64
|
+
"clientFiles": [
|
|
65
|
+
"components/ui/breadcrumbs/breadcrumbs.tsx"
|
|
66
|
+
],
|
|
67
|
+
"deps": [],
|
|
68
|
+
"externalDeps": [
|
|
69
|
+
"@tabler/icons-react",
|
|
70
|
+
"clsx",
|
|
71
|
+
"react"
|
|
72
|
+
]
|
|
73
|
+
},
|
|
56
74
|
{
|
|
57
75
|
"name": "button",
|
|
58
76
|
"kind": "component",
|
|
@@ -353,6 +371,27 @@
|
|
|
353
371
|
"react"
|
|
354
372
|
]
|
|
355
373
|
},
|
|
374
|
+
{
|
|
375
|
+
"name": "infinite-scroll",
|
|
376
|
+
"kind": "component",
|
|
377
|
+
"group": "primitives",
|
|
378
|
+
"files": [
|
|
379
|
+
"components/primitives/infinite-scroll/infinite-scroll-context.ts",
|
|
380
|
+
"components/primitives/infinite-scroll/infinite-scroll.module.css",
|
|
381
|
+
"components/primitives/infinite-scroll/infinite-scroll.tsx"
|
|
382
|
+
],
|
|
383
|
+
"clientFiles": [
|
|
384
|
+
"components/primitives/infinite-scroll/infinite-scroll-context.ts",
|
|
385
|
+
"components/primitives/infinite-scroll/infinite-scroll.tsx"
|
|
386
|
+
],
|
|
387
|
+
"deps": [
|
|
388
|
+
"useResizeObserver"
|
|
389
|
+
],
|
|
390
|
+
"externalDeps": [
|
|
391
|
+
"clsx",
|
|
392
|
+
"react"
|
|
393
|
+
]
|
|
394
|
+
},
|
|
356
395
|
{
|
|
357
396
|
"name": "input",
|
|
358
397
|
"kind": "component",
|
|
@@ -565,6 +604,30 @@
|
|
|
565
604
|
"react"
|
|
566
605
|
]
|
|
567
606
|
},
|
|
607
|
+
{
|
|
608
|
+
"name": "slider",
|
|
609
|
+
"kind": "component",
|
|
610
|
+
"group": "primitives",
|
|
611
|
+
"files": [
|
|
612
|
+
"components/primitives/slider/slider-context.ts",
|
|
613
|
+
"components/primitives/slider/slider.module.css",
|
|
614
|
+
"components/primitives/slider/slider.tsx",
|
|
615
|
+
"components/primitives/slider/types.ts",
|
|
616
|
+
"components/primitives/slider/utils.ts"
|
|
617
|
+
],
|
|
618
|
+
"clientFiles": [
|
|
619
|
+
"components/primitives/slider/slider-context.ts",
|
|
620
|
+
"components/primitives/slider/slider.tsx"
|
|
621
|
+
],
|
|
622
|
+
"deps": [
|
|
623
|
+
"useResizeObserver"
|
|
624
|
+
],
|
|
625
|
+
"externalDeps": [
|
|
626
|
+
"@tabler/icons-react",
|
|
627
|
+
"clsx",
|
|
628
|
+
"react"
|
|
629
|
+
]
|
|
630
|
+
},
|
|
568
631
|
{
|
|
569
632
|
"name": "stepper",
|
|
570
633
|
"kind": "component",
|