ui-lab-registry 0.1.2 → 0.1.4
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/categories.d.ts +1 -1
- package/dist/categories.d.ts.map +1 -1
- package/dist/component-dependencies.d.ts +27 -0
- package/dist/component-dependencies.d.ts.map +1 -0
- package/dist/component-dependencies.js +80 -0
- package/dist/component-dependencies.js.map +1 -0
- package/dist/examples/gallery/gallery-basic.d.ts +2 -0
- package/dist/examples/gallery/gallery-basic.d.ts.map +1 -0
- package/dist/examples/gallery/gallery-basic.js +51 -0
- package/dist/examples/gallery/gallery-basic.js.map +1 -0
- package/dist/examples/gallery/gallery-product.d.ts +2 -0
- package/dist/examples/gallery/gallery-product.d.ts.map +1 -0
- package/dist/examples/gallery/gallery-product.js +87 -0
- package/dist/examples/gallery/gallery-product.js.map +1 -0
- package/dist/examples/gallery/gallery-stream.d.ts +2 -0
- package/dist/examples/gallery/gallery-stream.d.ts.map +1 -0
- package/dist/examples/gallery/gallery-stream.js +102 -0
- package/dist/examples/gallery/gallery-stream.js.map +1 -0
- package/dist/examples/gallery/gallery-video.d.ts +2 -0
- package/dist/examples/gallery/gallery-video.d.ts.map +1 -0
- package/dist/examples/gallery/gallery-video.js +65 -0
- package/dist/examples/gallery/gallery-video.js.map +1 -0
- package/dist/generated-data.d.ts +5 -1
- package/dist/generated-data.d.ts.map +1 -1
- package/dist/generated-data.js +3586 -3
- package/dist/generated-data.js.map +1 -1
- package/dist/helpers.d.ts +1 -1
- package/dist/helpers.d.ts.map +1 -1
- package/dist/helpers.js +2 -2
- package/dist/helpers.js.map +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -4
- package/dist/index.js.map +1 -1
- package/dist/registry.d.ts +2 -2
- package/dist/registry.d.ts.map +1 -1
- package/dist/registry.js +22 -0
- package/dist/registry.js.map +1 -1
- package/dist/types.d.ts +11 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +5 -2
- package/src/categories.ts +1 -1
- package/src/component-dependencies.ts +89 -0
- package/src/generated-data.ts +3591 -4
- package/src/helpers.ts +3 -3
- package/src/index.ts +37 -6
- package/src/registry.ts +24 -1
- package/src/types.ts +13 -0
package/dist/categories.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CategoryDefinition, ComponentCategory } from './types';
|
|
1
|
+
import type { CategoryDefinition, ComponentCategory } from './types.js';
|
|
2
2
|
export declare const categories: CategoryDefinition[];
|
|
3
3
|
export declare const categoryMap: Record<ComponentCategory, CategoryDefinition>;
|
|
4
4
|
export declare const categoryOrder: ComponentCategory[];
|
package/dist/categories.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../src/categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"categories.d.ts","sourceRoot":"","sources":["../src/categories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAExE,eAAO,MAAM,UAAU,EAAE,kBAAkB,EAgE1C,CAAC;AAEF,eAAO,MAAM,WAAW,+CAG+B,CAAC;AAExD,eAAO,MAAM,aAAa,EAAE,iBAAiB,EAU5C,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ComponentDeps } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Component dependency metadata
|
|
4
|
+
* Specifies which npm packages and internal components each component requires
|
|
5
|
+
*/
|
|
6
|
+
export declare const componentDependencies: Record<string, ComponentDeps>;
|
|
7
|
+
/**
|
|
8
|
+
* Core npm dependencies required by all components
|
|
9
|
+
* These are installed regardless of which components are chosen
|
|
10
|
+
*/
|
|
11
|
+
export declare const coreNpmDependencies: readonly ["react-aria", "clsx", "class-variance-authority"];
|
|
12
|
+
/**
|
|
13
|
+
* Peer dependencies required by the project
|
|
14
|
+
*/
|
|
15
|
+
export declare const corePeerDependencies: readonly ["react", "react-dom"];
|
|
16
|
+
export declare function getComponentDeps(componentId: string): ComponentDeps | undefined;
|
|
17
|
+
export declare function getAllComponentIds(): string[];
|
|
18
|
+
/**
|
|
19
|
+
* Build a reverse mapping from npm packages to the components that use them
|
|
20
|
+
* Used for annotating npm packages in installation plans
|
|
21
|
+
*/
|
|
22
|
+
export declare function buildNpmPackageComponentMap(): Record<string, string[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Get the components that depend on a specific npm package
|
|
25
|
+
*/
|
|
26
|
+
export declare function getComponentsForNpmPackage(npmPackage: string): string[];
|
|
27
|
+
//# sourceMappingURL=component-dependencies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-dependencies.d.ts","sourceRoot":"","sources":["../src/component-dependencies.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C;;;GAGG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CA8B/D,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,6DAItB,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,oBAAoB,iCAGvB,CAAA;AAEV,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS,CAE/E;AAED,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAED;;;GAGG;AACH,wBAAgB,2BAA2B,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAatE;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAEvE"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Component dependency metadata
|
|
3
|
+
* Specifies which npm packages and internal components each component requires
|
|
4
|
+
*/
|
|
5
|
+
export const componentDependencies = {
|
|
6
|
+
'badge': { npm: [], internal: [] },
|
|
7
|
+
'breadcrumbs': { npm: [], internal: [] },
|
|
8
|
+
'button': { npm: [], internal: [] },
|
|
9
|
+
'card': { npm: [], internal: [] },
|
|
10
|
+
'checkbox': { npm: [], internal: ['label'] },
|
|
11
|
+
'command-palette': { npm: ['cmdk'], internal: ['card', 'badge', 'divider'] },
|
|
12
|
+
'confirm': { npm: [], internal: ['modal', 'button', 'card'] },
|
|
13
|
+
'divider': { npm: [], internal: [] },
|
|
14
|
+
'flex': { npm: [], internal: [] },
|
|
15
|
+
'fold': { npm: ['gsap', '@gsap/react'], internal: [] },
|
|
16
|
+
'form': { npm: [], internal: ['input', 'label'] },
|
|
17
|
+
'gallery': { npm: [], internal: ['card'] },
|
|
18
|
+
'grid': { npm: [], internal: [] },
|
|
19
|
+
'group': { npm: [], internal: ['button', 'input', 'select'] },
|
|
20
|
+
'input': { npm: [], internal: ['label'] },
|
|
21
|
+
'label': { npm: [], internal: [] },
|
|
22
|
+
'menu': { npm: ['@floating-ui/react-dom'], internal: [] },
|
|
23
|
+
'modal': { npm: [], internal: ['card', 'button'] },
|
|
24
|
+
'popover': { npm: ['@floating-ui/react-dom'], internal: [] },
|
|
25
|
+
'progress': { npm: [], internal: [] },
|
|
26
|
+
'radio': { npm: [], internal: ['label'] },
|
|
27
|
+
'select': { npm: ['@floating-ui/react-dom'], internal: [] },
|
|
28
|
+
'slider': { npm: ['@react-stately/slider'], internal: [] },
|
|
29
|
+
'switch': { npm: ['@react-stately/toggle'], internal: [] },
|
|
30
|
+
'table': { npm: [], internal: ['card'] },
|
|
31
|
+
'tabs': { npm: [], internal: [] },
|
|
32
|
+
'textarea': { npm: [], internal: ['label'] },
|
|
33
|
+
'toast': { npm: [], internal: [] },
|
|
34
|
+
'tooltip': { npm: ['@floating-ui/react-dom'], internal: [] },
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Core npm dependencies required by all components
|
|
38
|
+
* These are installed regardless of which components are chosen
|
|
39
|
+
*/
|
|
40
|
+
export const coreNpmDependencies = [
|
|
41
|
+
'react-aria',
|
|
42
|
+
'clsx',
|
|
43
|
+
'class-variance-authority',
|
|
44
|
+
];
|
|
45
|
+
/**
|
|
46
|
+
* Peer dependencies required by the project
|
|
47
|
+
*/
|
|
48
|
+
export const corePeerDependencies = [
|
|
49
|
+
'react',
|
|
50
|
+
'react-dom',
|
|
51
|
+
];
|
|
52
|
+
export function getComponentDeps(componentId) {
|
|
53
|
+
return componentDependencies[componentId];
|
|
54
|
+
}
|
|
55
|
+
export function getAllComponentIds() {
|
|
56
|
+
return Object.keys(componentDependencies);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Build a reverse mapping from npm packages to the components that use them
|
|
60
|
+
* Used for annotating npm packages in installation plans
|
|
61
|
+
*/
|
|
62
|
+
export function buildNpmPackageComponentMap() {
|
|
63
|
+
const map = {};
|
|
64
|
+
Object.entries(componentDependencies).forEach(([componentId, deps]) => {
|
|
65
|
+
deps.npm.forEach(npmPackage => {
|
|
66
|
+
if (!map[npmPackage]) {
|
|
67
|
+
map[npmPackage] = [];
|
|
68
|
+
}
|
|
69
|
+
map[npmPackage].push(componentId);
|
|
70
|
+
});
|
|
71
|
+
});
|
|
72
|
+
return map;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Get the components that depend on a specific npm package
|
|
76
|
+
*/
|
|
77
|
+
export function getComponentsForNpmPackage(npmPackage) {
|
|
78
|
+
return buildNpmPackageComponentMap()[npmPackage] ?? [];
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=component-dependencies.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"component-dependencies.js","sourceRoot":"","sources":["../src/component-dependencies.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAkC;IAClE,OA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|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Gallery } from "ui-lab-components";
|
|
4
|
+
const items = [
|
|
5
|
+
{
|
|
6
|
+
id: 1,
|
|
7
|
+
title: "Mountain Landscape",
|
|
8
|
+
description: "Beautiful mountain scenery at sunset",
|
|
9
|
+
image: "https://images.unsplash.com/photo-1506905925346-21bda4d32df4?w=800&h=450&fit=crop",
|
|
10
|
+
href: "#mountain",
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: 2,
|
|
14
|
+
title: "Ocean Waves",
|
|
15
|
+
description: "Powerful waves crashing on the shore",
|
|
16
|
+
image: "https://images.unsplash.com/photo-1505118380757-91f5f5632de0?w=800&h=450&fit=crop",
|
|
17
|
+
href: "#ocean",
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
id: 3,
|
|
21
|
+
title: "Forest Path",
|
|
22
|
+
description: "A peaceful trail through the woods",
|
|
23
|
+
image: "https://images.unsplash.com/photo-1441974231531-c6227db76b6e?w=800&h=450&fit=crop",
|
|
24
|
+
href: "#forest",
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 4,
|
|
28
|
+
title: "City Skyline",
|
|
29
|
+
description: "Urban architecture at twilight",
|
|
30
|
+
image: "https://images.unsplash.com/photo-1480714378408-67cf0d13bc1b?w=800&h=450&fit=crop",
|
|
31
|
+
href: "#city",
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: 5,
|
|
35
|
+
title: "Desert Dunes",
|
|
36
|
+
description: "Golden sand dunes in the Sahara",
|
|
37
|
+
image: "https://images.unsplash.com/photo-1509316785289-025f5b846b35?w=800&h=450&fit=crop",
|
|
38
|
+
href: "#desert",
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
id: 6,
|
|
42
|
+
title: "Northern Lights",
|
|
43
|
+
description: "Aurora borealis dancing in the sky",
|
|
44
|
+
image: "https://images.unsplash.com/photo-1531366936337-7c912a4589a7?w=800&h=450&fit=crop",
|
|
45
|
+
href: "#aurora",
|
|
46
|
+
},
|
|
47
|
+
];
|
|
48
|
+
export default function GalleryBasic() {
|
|
49
|
+
return (_jsx(Gallery, { columns: 3, children: items.map((item) => (_jsxs(Gallery.Item, { href: item.href, children: [_jsx(Gallery.View, { aspectRatio: "16/9", children: _jsx("img", { src: item.image, alt: item.title }) }), _jsxs(Gallery.Body, { children: [_jsx("h3", { children: item.title }), _jsx("p", { children: item.description })] })] }, item.id))) }));
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=gallery-basic.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-basic.js","sourceRoot":"","sources":["../../../src/examples/gallery/gallery-basic.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C,MAAM,KAAK,GAAG;IACZ;QACE,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,oBAAoB;QAC3B,WAAW,EAAE,sCAAsC;QACnD,KAAK,EAAE,mFAAmF;QAC1F,IAAI,EAAE,WAAW;KAClB;IACD;QACE,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,sCAAsC;QACnD,KAAK,EAAE,mFAAmF;QAC1F,IAAI,EAAE,QAAQ;KACf;IACD;QACE,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,aAAa;QACpB,WAAW,EAAE,oCAAoC;QACjD,KAAK,EAAE,mFAAmF;QAC1F,IAAI,EAAE,SAAS;KAChB;IACD;QACE,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,gCAAgC;QAC7C,KAAK,EAAE,mFAAmF;QAC1F,IAAI,EAAE,OAAO;KACd;IACD;QACE,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,cAAc;QACrB,WAAW,EAAE,iCAAiC;QAC9C,KAAK,EAAE,mFAAmF;QAC1F,IAAI,EAAE,SAAS;KAChB;IACD;QACE,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,oCAAoC;QACjD,KAAK,EAAE,mFAAmF;QAC1F,IAAI,EAAE,SAAS;KAChB;CACF,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,YAAY;IAClC,OAAO,CACL,KAAC,OAAO,IAAC,OAAO,EAAE,CAAC,YAChB,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,MAAC,OAAO,CAAC,IAAI,IAAe,IAAI,EAAE,IAAI,CAAC,IAAI,aACzC,KAAC,OAAO,CAAC,IAAI,IAAC,WAAW,EAAC,MAAM,YAC9B,cAAK,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,IAAI,CAAC,KAAK,GAAI,GAC5B,EACf,MAAC,OAAO,CAAC,IAAI,eACX,uBAAK,IAAI,CAAC,KAAK,GAAM,EACrB,sBAAI,IAAI,CAAC,WAAW,GAAK,IACZ,KAPE,IAAI,CAAC,EAAE,CAQX,CAChB,CAAC,GACM,CACX,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-product.d.ts","sourceRoot":"","sources":["../../../src/examples/gallery/gallery-product.tsx"],"names":[],"mappings":"AAoFA,MAAM,CAAC,OAAO,UAAU,cAAc,4CA0DrC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Gallery } from "ui-lab-components";
|
|
4
|
+
const products = [
|
|
5
|
+
{
|
|
6
|
+
id: 1,
|
|
7
|
+
name: "Wireless Headphones",
|
|
8
|
+
price: 149.99,
|
|
9
|
+
originalPrice: 199.99,
|
|
10
|
+
rating: 4.5,
|
|
11
|
+
reviews: 2847,
|
|
12
|
+
image: "https://images.unsplash.com/photo-1505740420928-5e560c06d30e?w=800&h=800&fit=crop",
|
|
13
|
+
href: "#product-1",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: 2,
|
|
17
|
+
name: "Smart Watch Pro",
|
|
18
|
+
price: 299.99,
|
|
19
|
+
rating: 4.8,
|
|
20
|
+
reviews: 1234,
|
|
21
|
+
image: "https://images.unsplash.com/photo-1523275335684-37898b6baf30?w=800&h=800&fit=crop",
|
|
22
|
+
href: "#product-2",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 3,
|
|
26
|
+
name: "Portable Speaker",
|
|
27
|
+
price: 79.99,
|
|
28
|
+
originalPrice: 99.99,
|
|
29
|
+
rating: 4.2,
|
|
30
|
+
reviews: 567,
|
|
31
|
+
image: "https://images.unsplash.com/photo-1608043152269-423dbba4e7e1?w=800&h=800&fit=crop",
|
|
32
|
+
href: "#product-3",
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 4,
|
|
36
|
+
name: "Minimalist Backpack",
|
|
37
|
+
price: 89.99,
|
|
38
|
+
rating: 4.7,
|
|
39
|
+
reviews: 892,
|
|
40
|
+
image: "https://images.unsplash.com/photo-1553062407-98eeb64c6a62?w=800&h=800&fit=crop",
|
|
41
|
+
href: "#product-4",
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 5,
|
|
45
|
+
name: "Mechanical Keyboard",
|
|
46
|
+
price: 159.99,
|
|
47
|
+
originalPrice: 189.99,
|
|
48
|
+
rating: 4.6,
|
|
49
|
+
reviews: 3421,
|
|
50
|
+
image: "https://images.unsplash.com/photo-1511467687858-23d96c32e4ae?w=800&h=800&fit=crop",
|
|
51
|
+
href: "#product-5",
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
id: 6,
|
|
55
|
+
name: "USB-C Hub",
|
|
56
|
+
price: 49.99,
|
|
57
|
+
rating: 4.3,
|
|
58
|
+
reviews: 756,
|
|
59
|
+
image: "https://images.unsplash.com/photo-1625723044792-44de16ccb4e9?w=800&h=800&fit=crop",
|
|
60
|
+
href: "#product-6",
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
function StarRating({ rating }) {
|
|
64
|
+
return (_jsx("span", { style: { display: "flex", alignItems: "center", gap: "2px" }, children: [1, 2, 3, 4, 5].map((star) => (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: star <= Math.floor(rating) ? "#fbbf24" : "none", stroke: "#fbbf24", strokeWidth: "2", children: _jsx("polygon", { points: "12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2" }) }, star))) }));
|
|
65
|
+
}
|
|
66
|
+
export default function GalleryProduct() {
|
|
67
|
+
return (_jsx(Gallery, { columns: { base: 2, md: 3, lg: 4 }, children: products.map((product) => (_jsxs(Gallery.Item, { href: product.href, children: [_jsxs(Gallery.View, { aspectRatio: "1/1", children: [_jsx("img", { src: product.image, alt: product.name }), product.originalPrice && (_jsxs("span", { style: {
|
|
68
|
+
position: "absolute",
|
|
69
|
+
top: "8px",
|
|
70
|
+
right: "8px",
|
|
71
|
+
background: "#ef4444",
|
|
72
|
+
color: "white",
|
|
73
|
+
padding: "4px 8px",
|
|
74
|
+
borderRadius: "4px",
|
|
75
|
+
fontSize: "12px",
|
|
76
|
+
fontWeight: 600,
|
|
77
|
+
}, children: [Math.round((1 - product.price / product.originalPrice) * 100), "% OFF"] }))] }), _jsxs(Gallery.Body, { children: [_jsx("h3", { style: {
|
|
78
|
+
overflow: "hidden",
|
|
79
|
+
textOverflow: "ellipsis",
|
|
80
|
+
whiteSpace: "nowrap",
|
|
81
|
+
}, children: product.name }), _jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [_jsxs("span", { style: { fontWeight: 600, color: "var(--foreground-50)" }, children: ["$", product.price.toFixed(2)] }), product.originalPrice && (_jsxs("span", { style: {
|
|
82
|
+
textDecoration: "line-through",
|
|
83
|
+
fontSize: "12px",
|
|
84
|
+
color: "var(--foreground-500)",
|
|
85
|
+
}, children: ["$", product.originalPrice.toFixed(2)] }))] }), _jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px", fontSize: "12px" }, children: [_jsx(StarRating, { rating: product.rating }), _jsxs("span", { style: { color: "var(--foreground-400)" }, children: ["(", product.reviews.toLocaleString(), ")"] })] })] })] }, product.id))) }));
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=gallery-product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-product.js","sourceRoot":"","sources":["../../../src/examples/gallery/gallery-product.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C,MAAM,QAAQ,GAAG;IACf;QACE,EAAE,EAAE,CAAC;QACL,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,MAAM;QACb,aAAa,EAAE,MAAM;QACrB,MAAM,EAAE,GAAG;QACX,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,mFAAmF;QAC1F,IAAI,EAAE,YAAY;KACnB;IACD;QACE,EAAE,EAAE,CAAC;QACL,IAAI,EAAE,iBAAiB;QACvB,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,GAAG;QACX,OAAO,EAAE,IAAI;QACb,KAAK,EAAE,mFAAmF;QAC1F,IAAI,EAAE,YAAY;KACnB;IACD;QACE,EAAE,EAAE,CAAC;QACL,IAAI,EAAE,kBAAkB;QACxB,KAAK,EAAE,KAAK;QACZ,aAAa,EAAE,KAAK;QACpB,MAAM,EAAE,GAAG;QACX,OAAO,EAAE,GAAG;QACZ,KAAK,EAAE,mFAAmF;QAC1F,IAAI,EAAE,YAAY;KACnB;IACD;QACE,EAAE,EAAE,CAAC;QACL,IAAI,EAAE,qBAAqB;QAC3B,KAAK,EAAE,KAAK;QACZ,MAAM,EAAE,GAAG;QACX,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AE,uBAAuB;qCAC/B,kBACG,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,IAC7B,CACR,IACG,EACN,eAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,aACjF,KAAC,UAAU,IAAC,MAAM,EAAE,OAAO,CAAC,MAAM,GAAI,EACtC,gBAAM,KAAK,EAAE,EAAE,KAAK,EAAE,uBAAuB,EAAE,kBAC3C,OAAO,CAAC,OAAO,CAAC,cAAc,EAAE,SAC7B,IACH,IACO,KAjDE,OAAO,CAAC,EAAE,CAkDd,CAChB,CAAC,GACM,CACX,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-stream.d.ts","sourceRoot":"","sources":["../../../src/examples/gallery/gallery-stream.tsx"],"names":[],"mappings":"AA0EA,MAAM,CAAC,OAAO,UAAU,aAAa,4CA6DpC"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Gallery } from "ui-lab-components";
|
|
4
|
+
const streams = [
|
|
5
|
+
{
|
|
6
|
+
id: 1,
|
|
7
|
+
title: "Ranked Grind to Diamond!",
|
|
8
|
+
streamer: "ProGamer123",
|
|
9
|
+
game: "League of Legends",
|
|
10
|
+
viewers: 12453,
|
|
11
|
+
isLive: true,
|
|
12
|
+
thumbnail: "https://images.unsplash.com/photo-1542751371-adc38448a05e?w=800&h=450&fit=crop",
|
|
13
|
+
href: "#stream-1",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: 2,
|
|
17
|
+
title: "Chill Building Stream",
|
|
18
|
+
streamer: "CreativeBuilder",
|
|
19
|
+
game: "Minecraft",
|
|
20
|
+
viewers: 8234,
|
|
21
|
+
isLive: true,
|
|
22
|
+
thumbnail: "https://images.unsplash.com/photo-1493711662062-fa541f7f3d24?w=800&h=450&fit=crop",
|
|
23
|
+
href: "#stream-2",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 3,
|
|
27
|
+
title: "First Playthrough! No Spoilers",
|
|
28
|
+
streamer: "GamerGirl_TV",
|
|
29
|
+
game: "Elden Ring",
|
|
30
|
+
viewers: 25891,
|
|
31
|
+
isLive: true,
|
|
32
|
+
thumbnail: "https://images.unsplash.com/photo-1511512578047-dfb367046420?w=800&h=450&fit=crop",
|
|
33
|
+
href: "#stream-3",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 4,
|
|
37
|
+
title: "Speedrun Attempts - WR Pace",
|
|
38
|
+
streamer: "SpeedDemon",
|
|
39
|
+
game: "Super Mario 64",
|
|
40
|
+
viewers: 4521,
|
|
41
|
+
isLive: true,
|
|
42
|
+
thumbnail: "https://images.unsplash.com/photo-1550745165-9bc0b252726f?w=800&h=450&fit=crop",
|
|
43
|
+
href: "#stream-4",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
id: 5,
|
|
47
|
+
title: "Tournament Finals Live",
|
|
48
|
+
streamer: "ESportsChannel",
|
|
49
|
+
game: "Valorant",
|
|
50
|
+
viewers: 89234,
|
|
51
|
+
isLive: true,
|
|
52
|
+
thumbnail: "https://images.unsplash.com/photo-1560253023-3ec5d502959f?w=800&h=450&fit=crop",
|
|
53
|
+
href: "#stream-5",
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
id: 6,
|
|
57
|
+
title: "Late Night Variety",
|
|
58
|
+
streamer: "NightOwl",
|
|
59
|
+
game: "Just Chatting",
|
|
60
|
+
viewers: 1872,
|
|
61
|
+
isLive: true,
|
|
62
|
+
thumbnail: "https://images.unsplash.com/photo-1598550476439-6847785fcea6?w=800&h=450&fit=crop",
|
|
63
|
+
href: "#stream-6",
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
function formatViewers(count) {
|
|
67
|
+
if (count >= 1000) {
|
|
68
|
+
return `${(count / 1000).toFixed(1)}K`;
|
|
69
|
+
}
|
|
70
|
+
return count.toString();
|
|
71
|
+
}
|
|
72
|
+
export default function GalleryStream() {
|
|
73
|
+
return (_jsx(Gallery, { columns: { base: 1, sm: 2, lg: 3 }, children: streams.map((stream) => (_jsxs(Gallery.Item, { href: stream.href, children: [_jsxs(Gallery.View, { aspectRatio: "16/9", children: [_jsx("img", { src: stream.thumbnail, alt: stream.title }), stream.isLive && (_jsx("span", { style: {
|
|
74
|
+
position: "absolute",
|
|
75
|
+
top: "8px",
|
|
76
|
+
left: "8px",
|
|
77
|
+
background: "#e91916",
|
|
78
|
+
color: "white",
|
|
79
|
+
padding: "2px 8px",
|
|
80
|
+
borderRadius: "4px",
|
|
81
|
+
fontSize: "12px",
|
|
82
|
+
fontWeight: 600,
|
|
83
|
+
textTransform: "uppercase",
|
|
84
|
+
}, children: "Live" })), _jsxs("span", { style: {
|
|
85
|
+
position: "absolute",
|
|
86
|
+
bottom: "8px",
|
|
87
|
+
left: "8px",
|
|
88
|
+
background: "rgba(0, 0, 0, 0.7)",
|
|
89
|
+
color: "white",
|
|
90
|
+
padding: "2px 6px",
|
|
91
|
+
borderRadius: "4px",
|
|
92
|
+
fontSize: "12px",
|
|
93
|
+
display: "flex",
|
|
94
|
+
alignItems: "center",
|
|
95
|
+
gap: "4px",
|
|
96
|
+
}, children: [_jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "currentColor", children: _jsx("path", { d: "M12 4.5C7 4.5 2.73 7.61 1 12c1.73 4.39 6 7.5 11 7.5s9.27-3.11 11-7.5c-1.73-4.39-6-7.5-11-7.5zM12 17c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5zm0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3z" }) }), formatViewers(stream.viewers)] })] }), _jsxs(Gallery.Body, { children: [_jsx("h3", { style: {
|
|
97
|
+
overflow: "hidden",
|
|
98
|
+
textOverflow: "ellipsis",
|
|
99
|
+
whiteSpace: "nowrap",
|
|
100
|
+
}, children: stream.title }), _jsx("p", { children: stream.streamer }), _jsx("p", { style: { fontSize: "12px" }, children: stream.game })] })] }, stream.id))) }));
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=gallery-stream.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-stream.js","sourceRoot":"","sources":["../../../src/examples/gallery/gallery-stream.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C,MAAM,OAAO,GAAG;IACd;QACE,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,0BAA0B;QACjC,QAAQ,EAAE,aAAa;QACvB,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,gFAAgF;QAC3F,IAAI,EAAE,WAAW;KAClB;IACD;QACE,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,uBAAuB;QAC9B,QAAQ,EAAE,iBAAiB;QAC3B,IAAI,EAAE,WAAW;QACjB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,mFAAmF;QAC9F,IAAI,EAAE,WAAW;KAClB;IACD;QACE,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,gCAAgC;QACvC,QAAQ,EAAE,cAAc;QACxB,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,KAAK;QACd,MAAM,EAAE,IAAI;QACZ,SAAS,EAAE,mFAAmF;QAC9F,IAAI,EAAE,WAAW;KAClB;IACD;QACE,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,6BAA6B;QACpC,QAAQ,EAAE,YAAY;QACtB,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,IAAI;QAC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,EAAE,KAAK;gCACV,IAAI,EAAE,KAAK;gCACX,UAAU,EAAE,SAAS;gCACrB,KAAK,EAAE,OAAO;gCACd,OAAO,EAAE,SAAS;gCAClB,YAAY,EAAE,KAAK;gCACnB,QAAQ,EAAE,MAAM;gCAChB,UAAU,EAAE,GAAG;gCACf,aAAa,EAAE,WAAW;6BAC3B,qBAGI,CACR,EACD,gBACE,KAAK,EAAE;gCACL,QAAQ,EAAE,UAAU;gCACpB,MAAM,EAAE,KAAK;gCACb,IAAI,EAAE,KAAK;gCACX,UAAU,EAAE,oBAAoB;gCAChC,KAAK,EAAE,OAAO;gCACd,OAAO,EAAE,SAAS;gCAClB,YAAY,EAAE,KAAK;gCACnB,QAAQ,EAAE,MAAM;gCAChB,OAAO,EAAE,MAAM;gCACf,UAAU,EAAE,QAAQ;gCACpB,GAAG,EAAE,KAAK;6BACX,aAED,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,cAAc,YACjE,eAAM,CAAC,EAAC,mNAAmN,GAAE,GACzN,EACL,aAAa,CAAC,MAAM,CAAC,OAAO,CAAC,IACzB,IACM,EACf,MAAC,OAAO,CAAC,IAAI,eACX,aAAI,KAAK,EAAE;gCACT,QAAQ,EAAE,QAAQ;gCAClB,YAAY,EAAE,UAAU;gCACxB,UAAU,EAAE,QAAQ;6BACrB,YACE,MAAM,CAAC,KAAK,GACV,EACL,sBAAI,MAAM,CAAC,QAAQ,GAAK,EACxB,YAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,YAAG,MAAM,CAAC,IAAI,GAAK,IACpC,KApDE,MAAM,CAAC,EAAE,CAqDb,CAChB,CAAC,GACM,CACX,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-video.d.ts","sourceRoot":"","sources":["../../../src/examples/gallery/gallery-video.tsx"],"names":[],"mappings":"AA+CA,MAAM,CAAC,OAAO,UAAU,YAAY,4CA0CnC"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Gallery } from "ui-lab-components";
|
|
4
|
+
const videos = [
|
|
5
|
+
{
|
|
6
|
+
id: 1,
|
|
7
|
+
title: "Learn React in 30 Minutes",
|
|
8
|
+
channel: "Code Academy",
|
|
9
|
+
views: "1.2M views",
|
|
10
|
+
uploaded: "2 weeks ago",
|
|
11
|
+
duration: "32:15",
|
|
12
|
+
thumbnail: "https://images.unsplash.com/photo-1633356122544-f134324a6cee?w=800&h=450&fit=crop",
|
|
13
|
+
href: "#video-1",
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
id: 2,
|
|
17
|
+
title: "Building Modern UIs with Tailwind CSS",
|
|
18
|
+
channel: "Design Systems",
|
|
19
|
+
views: "856K views",
|
|
20
|
+
uploaded: "1 month ago",
|
|
21
|
+
duration: "45:30",
|
|
22
|
+
thumbnail: "https://images.unsplash.com/photo-1555066931-4365d14bab8c?w=800&h=450&fit=crop",
|
|
23
|
+
href: "#video-2",
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
id: 3,
|
|
27
|
+
title: "TypeScript Tips & Tricks",
|
|
28
|
+
channel: "Dev Mastery",
|
|
29
|
+
views: "432K views",
|
|
30
|
+
uploaded: "3 days ago",
|
|
31
|
+
duration: "18:42",
|
|
32
|
+
thumbnail: "https://images.unsplash.com/photo-1516116216624-53e697fedbea?w=800&h=450&fit=crop",
|
|
33
|
+
href: "#video-3",
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
id: 4,
|
|
37
|
+
title: "CSS Grid Complete Guide",
|
|
38
|
+
channel: "Layout Pro",
|
|
39
|
+
views: "2.1M views",
|
|
40
|
+
uploaded: "6 months ago",
|
|
41
|
+
duration: "1:12:05",
|
|
42
|
+
thumbnail: "https://images.unsplash.com/photo-1507003211169-0a1dd7228f2d?w=800&h=450&fit=crop",
|
|
43
|
+
href: "#video-4",
|
|
44
|
+
},
|
|
45
|
+
];
|
|
46
|
+
export default function GalleryVideo() {
|
|
47
|
+
return (_jsx(Gallery, { columns: { base: 1, sm: 2, lg: 3, xl: 4 }, children: videos.map((video) => (_jsxs(Gallery.Item, { href: video.href, children: [_jsxs(Gallery.View, { aspectRatio: "16/9", children: [_jsx("img", { src: video.thumbnail, alt: video.title }), _jsx("span", { style: {
|
|
48
|
+
position: "absolute",
|
|
49
|
+
bottom: "8px",
|
|
50
|
+
right: "8px",
|
|
51
|
+
background: "rgba(0, 0, 0, 0.8)",
|
|
52
|
+
color: "white",
|
|
53
|
+
padding: "2px 6px",
|
|
54
|
+
borderRadius: "4px",
|
|
55
|
+
fontSize: "12px",
|
|
56
|
+
fontWeight: 500,
|
|
57
|
+
}, children: video.duration })] }), _jsxs(Gallery.Body, { children: [_jsx("h3", { style: {
|
|
58
|
+
overflow: "hidden",
|
|
59
|
+
textOverflow: "ellipsis",
|
|
60
|
+
display: "-webkit-box",
|
|
61
|
+
WebkitLineClamp: 2,
|
|
62
|
+
WebkitBoxOrient: "vertical",
|
|
63
|
+
}, children: video.title }), _jsx("p", { children: video.channel }), _jsxs("p", { style: { fontSize: "12px" }, children: [video.views, " \u2022 ", video.uploaded] })] })] }, video.id))) }));
|
|
64
|
+
}
|
|
65
|
+
//# sourceMappingURL=gallery-video.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"gallery-video.js","sourceRoot":"","sources":["../../../src/examples/gallery/gallery-video.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3C,MAAM,MAAM,GAAG;IACb;QACE,EAAE,EAAE,CAAC;QACL,KAAK,EAAE,2BAA2B;QAClC,OAAO,EAAE,cAAc;QACvB,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,aAAa;QACvB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AAM,EAAE,KAAK;gCACb,KAAK,EAAE,KAAK;gCACZ,UAAU,EAAE,oBAAoB;gCAChC,KAAK,EAAE,OAAO;gCACd,OAAO,EAAE,SAAS;gCAClB,YAAY,EAAE,KAAK;gCACnB,QAAQ,EAAE,MAAM;gCAChB,UAAU,EAAE,GAAG;6BAChB,YAEA,KAAK,CAAC,QAAQ,GACV,IACM,EACf,MAAC,OAAO,CAAC,IAAI,eACX,aAAI,KAAK,EAAE;gCACT,QAAQ,EAAE,QAAQ;gCAClB,YAAY,EAAE,UAAU;gCACxB,OAAO,EAAE,aAAa;gCACtB,eAAe,EAAE,CAAC;gCAClB,eAAe,EAAE,UAAU;6BAC5B,YACE,KAAK,CAAC,KAAK,GACT,EACL,sBAAI,KAAK,CAAC,OAAO,GAAK,EACtB,aAAG,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,aAC3B,KAAK,CAAC,KAAK,cAAK,KAAK,CAAC,QAAQ,IAC7B,IACS,KAjCE,KAAK,CAAC,EAAE,CAkCZ,CAChB,CAAC,GACM,CACX,CAAA;AACH,CAAC"}
|
package/dist/generated-data.d.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import type { ComponentAPI, ComponentStyles } from './types';
|
|
1
|
+
import type { ComponentAPI, ComponentStyles, ComponentSourceCode, ComponentDeps } from './types';
|
|
2
2
|
export declare const generatedAPI: Record<string, ComponentAPI>;
|
|
3
3
|
export declare const generatedStyles: Record<string, ComponentStyles>;
|
|
4
|
+
export declare const generatedSourceCode: Record<string, ComponentSourceCode>;
|
|
4
5
|
export declare const reactAriaUrls: Record<string, string>;
|
|
6
|
+
export declare const generatedComponentDependencies: Record<string, ComponentDeps>;
|
|
7
|
+
export declare const generatedCoreNpmDependencies: string[];
|
|
8
|
+
export declare const generatedCorePeerDependencies: string[];
|
|
5
9
|
//# sourceMappingURL=generated-data.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generated-data.d.ts","sourceRoot":"","sources":["../src/generated-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"generated-data.d.ts","sourceRoot":"","sources":["../src/generated-data.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,mBAAmB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAEjG,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAm5DrD,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAmxC3D,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CA6InE,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA6BhD,CAAC;AAEF,eAAO,MAAM,8BAA8B,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAoKxE,CAAC;AAEF,eAAO,MAAM,4BAA4B,UAIxC,CAAC;AAEF,eAAO,MAAM,6BAA6B,UAGzC,CAAC"}
|