@hanzo/ui 4.5.2 → 4.5.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/mcp/enhanced-server.js +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/registry/api.js +1 -2
- package/dist/registry/index.d.ts +348 -4
- package/package.json +5 -5
- package/tsconfig.json +9 -4
- package/dist/blocks/components/accordian-block.d.ts +0 -4
- package/dist/blocks/components/accordian-block.jsx +0 -25
- package/dist/blocks/components/block-component-props.d.ts +0 -7
- package/dist/blocks/components/block-component-props.js +0 -1
- package/dist/blocks/components/bullet-cards-block.d.ts +0 -4
- package/dist/blocks/components/bullet-cards-block.jsx +0 -25
- package/dist/blocks/components/card-block/index.d.ts +0 -6
- package/dist/blocks/components/card-block/index.jsx +0 -87
- package/dist/blocks/components/card-block/link-out-button.d.ts +0 -6
- package/dist/blocks/components/card-block/link-out-button.jsx +0 -4
- package/dist/blocks/components/card-block/util.d.ts +0 -4
- package/dist/blocks/components/card-block/util.js +0 -6
- package/dist/blocks/components/carte-blanche-block/index.d.ts +0 -4
- package/dist/blocks/components/carte-blanche-block/index.jsx +0 -82
- package/dist/blocks/components/carte-blanche-block/variant-content-left.d.ts +0 -10
- package/dist/blocks/components/carte-blanche-block/variant-content-left.jsx +0 -23
- package/dist/blocks/components/content.d.ts +0 -10
- package/dist/blocks/components/content.jsx +0 -47
- package/dist/blocks/components/cta-block.d.ts +0 -12
- package/dist/blocks/components/cta-block.jsx +0 -69
- package/dist/blocks/components/enh-heading-block.d.ts +0 -7
- package/dist/blocks/components/enh-heading-block.jsx +0 -142
- package/dist/blocks/components/grid-block/grid-block-mutator.d.ts +0 -5
- package/dist/blocks/components/grid-block/grid-block-mutator.js +0 -1
- package/dist/blocks/components/grid-block/index.d.ts +0 -9
- package/dist/blocks/components/grid-block/index.jsx +0 -56
- package/dist/blocks/components/grid-block/mutator-registry.d.ts +0 -3
- package/dist/blocks/components/grid-block/mutator-registry.js +0 -5
- package/dist/blocks/components/grid-block/table-borders.mutator.d.ts +0 -3
- package/dist/blocks/components/grid-block/table-borders.mutator.js +0 -36
- package/dist/blocks/components/group-block.d.ts +0 -7
- package/dist/blocks/components/group-block.jsx +0 -61
- package/dist/blocks/components/heading-block.d.ts +0 -4
- package/dist/blocks/components/heading-block.jsx +0 -99
- package/dist/blocks/components/image-block.d.ts +0 -7
- package/dist/blocks/components/image-block.jsx +0 -69
- package/dist/blocks/components/index.d.ts +0 -14
- package/dist/blocks/components/index.js +0 -13
- package/dist/blocks/components/screenful-block/content.d.ts +0 -8
- package/dist/blocks/components/screenful-block/content.jsx +0 -71
- package/dist/blocks/components/screenful-block/index.d.ts +0 -12
- package/dist/blocks/components/screenful-block/index.jsx +0 -57
- package/dist/blocks/components/screenful-block/poster-background.d.ts +0 -7
- package/dist/blocks/components/screenful-block/poster-background.jsx +0 -14
- package/dist/blocks/components/screenful-block/video-background.d.ts +0 -8
- package/dist/blocks/components/screenful-block/video-background.jsx +0 -20
- package/dist/blocks/components/space-block.d.ts +0 -4
- package/dist/blocks/components/space-block.jsx +0 -42
- package/dist/blocks/components/video-block.d.ts +0 -9
- package/dist/blocks/components/video-block.jsx +0 -83
- package/dist/blocks/def/accordian-block.d.ts +0 -10
- package/dist/blocks/def/accordian-block.js +0 -2
- package/dist/blocks/def/block.d.ts +0 -4
- package/dist/blocks/def/block.js +0 -1
- package/dist/blocks/def/bullet-cards-block.d.ts +0 -17
- package/dist/blocks/def/bullet-cards-block.js +0 -1
- package/dist/blocks/def/card-block.d.ts +0 -17
- package/dist/blocks/def/card-block.js +0 -2
- package/dist/blocks/def/carte-blanche-block.d.ts +0 -12
- package/dist/blocks/def/carte-blanche-block.js +0 -1
- package/dist/blocks/def/cta-block.d.ts +0 -8
- package/dist/blocks/def/cta-block.js +0 -1
- package/dist/blocks/def/element-block.d.ts +0 -7
- package/dist/blocks/def/element-block.js +0 -2
- package/dist/blocks/def/enh-heading-block.d.ts +0 -22
- package/dist/blocks/def/enh-heading-block.js +0 -1
- package/dist/blocks/def/grid-block.d.ts +0 -12
- package/dist/blocks/def/grid-block.js +0 -1
- package/dist/blocks/def/group-block.d.ts +0 -7
- package/dist/blocks/def/group-block.js +0 -1
- package/dist/blocks/def/heading-block.d.ts +0 -11
- package/dist/blocks/def/heading-block.js +0 -1
- package/dist/blocks/def/image-block.d.ts +0 -26
- package/dist/blocks/def/image-block.js +0 -1
- package/dist/blocks/def/index.d.ts +0 -17
- package/dist/blocks/def/index.js +0 -2
- package/dist/blocks/def/screenful-block.d.ts +0 -41
- package/dist/blocks/def/screenful-block.js +0 -1
- package/dist/blocks/def/space-block.d.ts +0 -47
- package/dist/blocks/def/space-block.js +0 -8
- package/dist/blocks/def/video-block.d.ts +0 -5
- package/dist/blocks/def/video-block.js +0 -1
- package/dist/blocks/index.d.ts +0 -2
- package/dist/blocks/index.js +0 -2
- package/dist/primitives/accordion.d.ts +0 -10
- package/dist/primitives/accordion.jsx +0 -21
- package/dist/primitives/action-button.d.ts +0 -9
- package/dist/primitives/action-button.jsx +0 -16
- package/dist/primitives/apply-typography.d.ts +0 -7
- package/dist/primitives/apply-typography.jsx +0 -38
- package/dist/primitives/aspect-ratio.d.ts +0 -3
- package/dist/primitives/aspect-ratio.jsx +0 -4
- package/dist/primitives/avatar.d.ts +0 -6
- package/dist/primitives/avatar.jsx +0 -11
- package/dist/primitives/badge.d.ts +0 -9
- package/dist/primitives/badge.jsx +0 -18
- package/dist/primitives/breadcrumb.d.ts +0 -19
- package/dist/primitives/breadcrumb.jsx +0 -27
- package/dist/primitives/breakpoint-indicator.d.ts +0 -3
- package/dist/primitives/breakpoint-indicator.jsx +0 -14
- package/dist/primitives/button.d.ts +0 -12
- package/dist/primitives/button.jsx +0 -55
- package/dist/primitives/calendar.d.ts +0 -8
- package/dist/primitives/calendar.jsx +0 -40
- package/dist/primitives/card.d.ts +0 -8
- package/dist/primitives/card.jsx +0 -18
- package/dist/primitives/carousel.d.ts +0 -18
- package/dist/primitives/carousel.jsx +0 -106
- package/dist/primitives/checkbox.d.ts +0 -4
- package/dist/primitives/checkbox.jsx +0 -15
- package/dist/primitives/combobox.d.ts +0 -41
- package/dist/primitives/combobox.jsx +0 -77
- package/dist/primitives/command.d.ts +0 -17
- package/dist/primitives/command.jsx +0 -38
- package/dist/primitives/context-menu.d.ts +0 -27
- package/dist/primitives/context-menu.jsx +0 -57
- package/dist/primitives/dialog-video-controller.d.ts +0 -3
- package/dist/primitives/dialog-video-controller.jsx +0 -24
- package/dist/primitives/dialog.d.ts +0 -28
- package/dist/primitives/dialog.jsx +0 -37
- package/dist/primitives/drawer.d.ts +0 -29
- package/dist/primitives/drawer.jsx +0 -34
- package/dist/primitives/form.d.ts +0 -12
- package/dist/primitives/form.jsx +0 -69
- package/dist/primitives/icons/github.d.ts +0 -4
- package/dist/primitives/icons/github.jsx +0 -6
- package/dist/primitives/icons/index.d.ts +0 -4
- package/dist/primitives/icons/index.js +0 -4
- package/dist/primitives/icons/youtube-logo.d.ts +0 -4
- package/dist/primitives/icons/youtube-logo.jsx +0 -39
- package/dist/primitives/index-common.d.ts +0 -47
- package/dist/primitives/index-common.js +0 -46
- package/dist/primitives/index-next.d.ts +0 -2
- package/dist/primitives/index-next.js +0 -2
- package/dist/primitives/input-otp.d.ts +0 -7
- package/dist/primitives/input-otp.jsx +0 -24
- package/dist/primitives/input.d.ts +0 -5
- package/dist/primitives/input.jsx +0 -11
- package/dist/primitives/label.d.ts +0 -5
- package/dist/primitives/label.jsx +0 -11
- package/dist/primitives/list-adaptor.d.ts +0 -9
- package/dist/primitives/list-adaptor.js +0 -1
- package/dist/primitives/list-box.d.ts +0 -10
- package/dist/primitives/list-box.jsx +0 -14
- package/dist/primitives/loading-spinner.d.ts +0 -5
- package/dist/primitives/loading-spinner.jsx +0 -8
- package/dist/primitives/navigation-menu.d.ts +0 -12
- package/dist/primitives/navigation-menu.jsx +0 -38
- package/dist/primitives/next/image.d.ts +0 -11
- package/dist/primitives/next/image.jsx +0 -42
- package/dist/primitives/next/index.d.ts +0 -7
- package/dist/primitives/next/index.js +0 -7
- package/dist/primitives/next/inline-icon.d.ts +0 -13
- package/dist/primitives/next/inline-icon.jsx +0 -15
- package/dist/primitives/next/link-element.d.ts +0 -23
- package/dist/primitives/next/link-element.jsx +0 -56
- package/dist/primitives/next/mdx-link.d.ts +0 -3
- package/dist/primitives/next/mdx-link.jsx +0 -12
- package/dist/primitives/next/media-stack.d.ts +0 -8
- package/dist/primitives/next/media-stack.jsx +0 -28
- package/dist/primitives/next/nav-items.d.ts +0 -10
- package/dist/primitives/next/nav-items.jsx +0 -24
- package/dist/primitives/next/youtube-embed.d.ts +0 -11
- package/dist/primitives/next/youtube-embed.jsx +0 -23
- package/dist/primitives/popover.d.ts +0 -9
- package/dist/primitives/popover.jsx +0 -18
- package/dist/primitives/progress.d.ts +0 -4
- package/dist/primitives/progress.jsx +0 -9
- package/dist/primitives/radio-group.d.ts +0 -7
- package/dist/primitives/radio-group.jsx +0 -18
- package/dist/primitives/scroll-area.d.ts +0 -5
- package/dist/primitives/scroll-area.jsx +0 -19
- package/dist/primitives/select.d.ts +0 -13
- package/dist/primitives/select.jsx +0 -62
- package/dist/primitives/separator.d.ts +0 -4
- package/dist/primitives/separator.jsx +0 -7
- package/dist/primitives/sheet.d.ts +0 -30
- package/dist/primitives/sheet.jsx +0 -56
- package/dist/primitives/skeleton.d.ts +0 -4
- package/dist/primitives/skeleton.jsx +0 -3
- package/dist/primitives/slider.d.ts +0 -9
- package/dist/primitives/slider.jsx +0 -30
- package/dist/primitives/sonner.d.ts +0 -5
- package/dist/primitives/sonner.jsx +0 -16
- package/dist/primitives/step-indicator.d.ts +0 -9
- package/dist/primitives/step-indicator.jsx +0 -23
- package/dist/primitives/switch.d.ts +0 -6
- package/dist/primitives/switch.jsx +0 -14
- package/dist/primitives/table.d.ts +0 -10
- package/dist/primitives/table.jsx +0 -21
- package/dist/primitives/tabs.d.ts +0 -7
- package/dist/primitives/tabs.jsx +0 -18
- package/dist/primitives/text-area.d.ts +0 -5
- package/dist/primitives/text-area.jsx +0 -9
- package/dist/primitives/toggle-group.d.ts +0 -14
- package/dist/primitives/toggle-group.jsx +0 -28
- package/dist/primitives/toggle.d.ts +0 -14
- package/dist/primitives/toggle.jsx +0 -52
- package/dist/primitives/tooltip.d.ts +0 -11
- package/dist/primitives/tooltip.jsx +0 -18
- package/dist/primitives/video-player.d.ts +0 -6
- package/dist/primitives/video-player.jsx +0 -8
- package/dist/style/theme-provider.d.ts +0 -4
- package/dist/style/theme-provider.jsx +0 -11
- package/dist/tailwind/fontFamily.tailwind.d.ts +0 -8
- package/dist/tailwind/fontFamily.tailwind.js +0 -7
- package/dist/tailwind/fontSize.tailwind.d.ts +0 -36
- package/dist/tailwind/fontSize.tailwind.js +0 -13
- package/dist/tailwind/index.d.ts +0 -3
- package/dist/tailwind/index.js +0 -2
- package/dist/tailwind/screens.tailwind.d.ts +0 -9
- package/dist/tailwind/screens.tailwind.js +0 -8
- package/dist/tailwind/tw-font-desc.d.ts +0 -6
- package/dist/tailwind/tw-font-desc.js +0 -6
- package/dist/types/animation-def.d.ts +0 -2
- package/dist/types/animation-def.js +0 -1
- package/dist/types/breakpoints.d.ts +0 -4
- package/dist/types/breakpoints.js +0 -4
- package/dist/types/bullet-item.d.ts +0 -6
- package/dist/types/bullet-item.js +0 -2
- package/dist/types/button-def.d.ts +0 -29
- package/dist/types/button-def.js +0 -2
- package/dist/types/dimensions.d.ts +0 -5
- package/dist/types/dimensions.js +0 -1
- package/dist/types/grid-def.d.ts +0 -36
- package/dist/types/grid-def.js +0 -33
- package/dist/types/image-def.d.ts +0 -27
- package/dist/types/image-def.js +0 -1
- package/dist/types/index.d.ts +0 -13
- package/dist/types/index.js +0 -2
- package/dist/types/link-def.d.ts +0 -44
- package/dist/types/link-def.js +0 -1
- package/dist/types/media-stack-def.d.ts +0 -25
- package/dist/types/media-stack-def.js +0 -1
- package/dist/types/t-shirt-size.d.ts +0 -2
- package/dist/types/t-shirt-size.js +0 -1
- package/dist/types/tshirt-dimensions.d.ts +0 -12
- package/dist/types/tshirt-dimensions.js +0 -1
- package/dist/types/video-def.d.ts +0 -9
- package/dist/types/video-def.js +0 -1
- package/dist/util/format-and-abbreviate-as-currency.d.ts +0 -11
- package/dist/util/format-and-abbreviate-as-currency.js +0 -91
- package/dist/util/format-to-max-char.d.ts +0 -5
- package/dist/util/format-to-max-char.js +0 -57
- package/dist/util/index-client.d.ts +0 -2
- package/dist/util/index-client.js +0 -3
- package/dist/util/index.d.ts +0 -17
- package/dist/util/index.js +0 -41
- package/dist/util/number-abbreviate.d.ts +0 -9
- package/dist/util/number-abbreviate.js +0 -30
- package/dist/util/specifier.d.ts +0 -7
- package/dist/util/specifier.js +0 -31
- package/dist/util/spread-to-transform.d.ts +0 -7
- package/dist/util/spread-to-transform.js +0 -18
- package/dist/util/step-animation.d.ts +0 -5
- package/dist/util/step-animation.js +0 -60
- package/dist/util/two-way-map.d.ts +0 -8
- package/dist/util/two-way-map.js +0 -16
- /package/{mcp → src/mcp}/README.md +0 -0
- /package/{mcp → src/mcp}/enhanced-server.ts +0 -0
- /package/{mcp → src/mcp}/index.ts +0 -0
- /package/{mcp → src/mcp}/package.json +0 -0
- /package/{registry → src/registry}/api.ts +0 -0
- /package/{registry → src/registry}/index.ts +0 -0
- /package/{registry → src/registry}/package.json +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registrySchema
|
|
1
|
+
import { registrySchema } from "../registry";
|
|
2
2
|
import { fetchRegistry, getRegistryItem, getRegistryItemUrl } from "../registry/api";
|
|
3
3
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
4
4
|
import { CallToolRequestSchema, ListToolsRequestSchema, ListResourcesRequestSchema, ReadResourceRequestSchema, ListPromptsRequestSchema, GetPromptRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
package/dist/mcp/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { registrySchema
|
|
1
|
+
import { registrySchema } from "../registry";
|
|
2
2
|
import { fetchRegistry, getRegistryItem, getRegistryItemUrl } from "../registry/api";
|
|
3
3
|
import { Server } from "@modelcontextprotocol/sdk/server/index.js";
|
|
4
4
|
import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
|
package/dist/registry/api.js
CHANGED
package/dist/registry/index.d.ts
CHANGED
|
@@ -1,8 +1,352 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
export declare const fileSchema:
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
export declare const fileSchema: z.ZodObject<{
|
|
3
|
+
path: z.ZodString;
|
|
4
|
+
content: z.ZodOptional<z.ZodString>;
|
|
5
|
+
type: z.ZodString;
|
|
6
|
+
target: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
path: string;
|
|
9
|
+
type: string;
|
|
10
|
+
content?: string | undefined;
|
|
11
|
+
target?: string | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
path: string;
|
|
14
|
+
type: string;
|
|
15
|
+
content?: string | undefined;
|
|
16
|
+
target?: string | undefined;
|
|
17
|
+
}>;
|
|
18
|
+
export declare const registryItemSchema: z.ZodObject<{
|
|
19
|
+
name: z.ZodString;
|
|
20
|
+
type: z.ZodString;
|
|
21
|
+
description: z.ZodOptional<z.ZodString>;
|
|
22
|
+
author: z.ZodOptional<z.ZodString>;
|
|
23
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
24
|
+
devDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
25
|
+
registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
26
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
|
+
path: z.ZodString;
|
|
28
|
+
content: z.ZodOptional<z.ZodString>;
|
|
29
|
+
type: z.ZodString;
|
|
30
|
+
target: z.ZodOptional<z.ZodString>;
|
|
31
|
+
}, "strip", z.ZodTypeAny, {
|
|
32
|
+
path: string;
|
|
33
|
+
type: string;
|
|
34
|
+
content?: string | undefined;
|
|
35
|
+
target?: string | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
path: string;
|
|
38
|
+
type: string;
|
|
39
|
+
content?: string | undefined;
|
|
40
|
+
target?: string | undefined;
|
|
41
|
+
}>, "many">>;
|
|
42
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
43
|
+
title: z.ZodOptional<z.ZodString>;
|
|
44
|
+
cssVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
45
|
+
tailwind: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
46
|
+
category: z.ZodOptional<z.ZodString>;
|
|
47
|
+
subcategory: z.ZodOptional<z.ZodString>;
|
|
48
|
+
}, "strip", z.ZodTypeAny, {
|
|
49
|
+
type: string;
|
|
50
|
+
name: string;
|
|
51
|
+
description?: string | undefined;
|
|
52
|
+
author?: string | undefined;
|
|
53
|
+
dependencies?: string[] | undefined;
|
|
54
|
+
devDependencies?: string[] | undefined;
|
|
55
|
+
registryDependencies?: string[] | undefined;
|
|
56
|
+
files?: {
|
|
57
|
+
path: string;
|
|
58
|
+
type: string;
|
|
59
|
+
content?: string | undefined;
|
|
60
|
+
target?: string | undefined;
|
|
61
|
+
}[] | undefined;
|
|
62
|
+
meta?: Record<string, any> | undefined;
|
|
63
|
+
title?: string | undefined;
|
|
64
|
+
cssVars?: Record<string, any> | undefined;
|
|
65
|
+
tailwind?: Record<string, any> | undefined;
|
|
66
|
+
category?: string | undefined;
|
|
67
|
+
subcategory?: string | undefined;
|
|
68
|
+
}, {
|
|
69
|
+
type: string;
|
|
70
|
+
name: string;
|
|
71
|
+
description?: string | undefined;
|
|
72
|
+
author?: string | undefined;
|
|
73
|
+
dependencies?: string[] | undefined;
|
|
74
|
+
devDependencies?: string[] | undefined;
|
|
75
|
+
registryDependencies?: string[] | undefined;
|
|
76
|
+
files?: {
|
|
77
|
+
path: string;
|
|
78
|
+
type: string;
|
|
79
|
+
content?: string | undefined;
|
|
80
|
+
target?: string | undefined;
|
|
81
|
+
}[] | undefined;
|
|
82
|
+
meta?: Record<string, any> | undefined;
|
|
83
|
+
title?: string | undefined;
|
|
84
|
+
cssVars?: Record<string, any> | undefined;
|
|
85
|
+
tailwind?: Record<string, any> | undefined;
|
|
86
|
+
category?: string | undefined;
|
|
87
|
+
subcategory?: string | undefined;
|
|
88
|
+
}>;
|
|
89
|
+
export declare const registrySchema: z.ZodObject<{
|
|
90
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
91
|
+
name: z.ZodString;
|
|
92
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
93
|
+
style: z.ZodOptional<z.ZodString>;
|
|
94
|
+
items: z.ZodArray<z.ZodObject<{
|
|
95
|
+
name: z.ZodString;
|
|
96
|
+
type: z.ZodString;
|
|
97
|
+
description: z.ZodOptional<z.ZodString>;
|
|
98
|
+
author: z.ZodOptional<z.ZodString>;
|
|
99
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
100
|
+
devDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
101
|
+
registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
102
|
+
files: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
103
|
+
path: z.ZodString;
|
|
104
|
+
content: z.ZodOptional<z.ZodString>;
|
|
105
|
+
type: z.ZodString;
|
|
106
|
+
target: z.ZodOptional<z.ZodString>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
path: string;
|
|
109
|
+
type: string;
|
|
110
|
+
content?: string | undefined;
|
|
111
|
+
target?: string | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
path: string;
|
|
114
|
+
type: string;
|
|
115
|
+
content?: string | undefined;
|
|
116
|
+
target?: string | undefined;
|
|
117
|
+
}>, "many">>;
|
|
118
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
119
|
+
title: z.ZodOptional<z.ZodString>;
|
|
120
|
+
cssVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
121
|
+
tailwind: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
122
|
+
category: z.ZodOptional<z.ZodString>;
|
|
123
|
+
subcategory: z.ZodOptional<z.ZodString>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
type: string;
|
|
126
|
+
name: string;
|
|
127
|
+
description?: string | undefined;
|
|
128
|
+
author?: string | undefined;
|
|
129
|
+
dependencies?: string[] | undefined;
|
|
130
|
+
devDependencies?: string[] | undefined;
|
|
131
|
+
registryDependencies?: string[] | undefined;
|
|
132
|
+
files?: {
|
|
133
|
+
path: string;
|
|
134
|
+
type: string;
|
|
135
|
+
content?: string | undefined;
|
|
136
|
+
target?: string | undefined;
|
|
137
|
+
}[] | undefined;
|
|
138
|
+
meta?: Record<string, any> | undefined;
|
|
139
|
+
title?: string | undefined;
|
|
140
|
+
cssVars?: Record<string, any> | undefined;
|
|
141
|
+
tailwind?: Record<string, any> | undefined;
|
|
142
|
+
category?: string | undefined;
|
|
143
|
+
subcategory?: string | undefined;
|
|
144
|
+
}, {
|
|
145
|
+
type: string;
|
|
146
|
+
name: string;
|
|
147
|
+
description?: string | undefined;
|
|
148
|
+
author?: string | undefined;
|
|
149
|
+
dependencies?: string[] | undefined;
|
|
150
|
+
devDependencies?: string[] | undefined;
|
|
151
|
+
registryDependencies?: string[] | undefined;
|
|
152
|
+
files?: {
|
|
153
|
+
path: string;
|
|
154
|
+
type: string;
|
|
155
|
+
content?: string | undefined;
|
|
156
|
+
target?: string | undefined;
|
|
157
|
+
}[] | undefined;
|
|
158
|
+
meta?: Record<string, any> | undefined;
|
|
159
|
+
title?: string | undefined;
|
|
160
|
+
cssVars?: Record<string, any> | undefined;
|
|
161
|
+
tailwind?: Record<string, any> | undefined;
|
|
162
|
+
category?: string | undefined;
|
|
163
|
+
subcategory?: string | undefined;
|
|
164
|
+
}>, "many">;
|
|
165
|
+
}, "strip", z.ZodTypeAny, {
|
|
166
|
+
name: string;
|
|
167
|
+
items: {
|
|
168
|
+
type: string;
|
|
169
|
+
name: string;
|
|
170
|
+
description?: string | undefined;
|
|
171
|
+
author?: string | undefined;
|
|
172
|
+
dependencies?: string[] | undefined;
|
|
173
|
+
devDependencies?: string[] | undefined;
|
|
174
|
+
registryDependencies?: string[] | undefined;
|
|
175
|
+
files?: {
|
|
176
|
+
path: string;
|
|
177
|
+
type: string;
|
|
178
|
+
content?: string | undefined;
|
|
179
|
+
target?: string | undefined;
|
|
180
|
+
}[] | undefined;
|
|
181
|
+
meta?: Record<string, any> | undefined;
|
|
182
|
+
title?: string | undefined;
|
|
183
|
+
cssVars?: Record<string, any> | undefined;
|
|
184
|
+
tailwind?: Record<string, any> | undefined;
|
|
185
|
+
category?: string | undefined;
|
|
186
|
+
subcategory?: string | undefined;
|
|
187
|
+
}[];
|
|
188
|
+
$schema?: string | undefined;
|
|
189
|
+
homepage?: string | undefined;
|
|
190
|
+
style?: string | undefined;
|
|
191
|
+
}, {
|
|
192
|
+
name: string;
|
|
193
|
+
items: {
|
|
194
|
+
type: string;
|
|
195
|
+
name: string;
|
|
196
|
+
description?: string | undefined;
|
|
197
|
+
author?: string | undefined;
|
|
198
|
+
dependencies?: string[] | undefined;
|
|
199
|
+
devDependencies?: string[] | undefined;
|
|
200
|
+
registryDependencies?: string[] | undefined;
|
|
201
|
+
files?: {
|
|
202
|
+
path: string;
|
|
203
|
+
type: string;
|
|
204
|
+
content?: string | undefined;
|
|
205
|
+
target?: string | undefined;
|
|
206
|
+
}[] | undefined;
|
|
207
|
+
meta?: Record<string, any> | undefined;
|
|
208
|
+
title?: string | undefined;
|
|
209
|
+
cssVars?: Record<string, any> | undefined;
|
|
210
|
+
tailwind?: Record<string, any> | undefined;
|
|
211
|
+
category?: string | undefined;
|
|
212
|
+
subcategory?: string | undefined;
|
|
213
|
+
}[];
|
|
214
|
+
$schema?: string | undefined;
|
|
215
|
+
homepage?: string | undefined;
|
|
216
|
+
style?: string | undefined;
|
|
217
|
+
}>;
|
|
218
|
+
export declare const registryWithContentSchema: z.ZodObject<{
|
|
219
|
+
$schema: z.ZodOptional<z.ZodString>;
|
|
220
|
+
name: z.ZodString;
|
|
221
|
+
homepage: z.ZodOptional<z.ZodString>;
|
|
222
|
+
style: z.ZodOptional<z.ZodString>;
|
|
223
|
+
} & {
|
|
224
|
+
items: z.ZodArray<z.ZodObject<{
|
|
225
|
+
name: z.ZodString;
|
|
226
|
+
type: z.ZodString;
|
|
227
|
+
description: z.ZodOptional<z.ZodString>;
|
|
228
|
+
author: z.ZodOptional<z.ZodString>;
|
|
229
|
+
dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
230
|
+
devDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
231
|
+
registryDependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
232
|
+
meta: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
233
|
+
title: z.ZodOptional<z.ZodString>;
|
|
234
|
+
cssVars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
235
|
+
tailwind: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
236
|
+
category: z.ZodOptional<z.ZodString>;
|
|
237
|
+
subcategory: z.ZodOptional<z.ZodString>;
|
|
238
|
+
} & {
|
|
239
|
+
files: z.ZodArray<z.ZodObject<{
|
|
240
|
+
path: z.ZodString;
|
|
241
|
+
type: z.ZodString;
|
|
242
|
+
target: z.ZodOptional<z.ZodString>;
|
|
243
|
+
} & {
|
|
244
|
+
content: z.ZodString;
|
|
245
|
+
}, "strip", z.ZodTypeAny, {
|
|
246
|
+
path: string;
|
|
247
|
+
content: string;
|
|
248
|
+
type: string;
|
|
249
|
+
target?: string | undefined;
|
|
250
|
+
}, {
|
|
251
|
+
path: string;
|
|
252
|
+
content: string;
|
|
253
|
+
type: string;
|
|
254
|
+
target?: string | undefined;
|
|
255
|
+
}>, "many">;
|
|
256
|
+
}, "strip", z.ZodTypeAny, {
|
|
257
|
+
type: string;
|
|
258
|
+
name: string;
|
|
259
|
+
files: {
|
|
260
|
+
path: string;
|
|
261
|
+
content: string;
|
|
262
|
+
type: string;
|
|
263
|
+
target?: string | undefined;
|
|
264
|
+
}[];
|
|
265
|
+
description?: string | undefined;
|
|
266
|
+
author?: string | undefined;
|
|
267
|
+
dependencies?: string[] | undefined;
|
|
268
|
+
devDependencies?: string[] | undefined;
|
|
269
|
+
registryDependencies?: string[] | undefined;
|
|
270
|
+
meta?: Record<string, any> | undefined;
|
|
271
|
+
title?: string | undefined;
|
|
272
|
+
cssVars?: Record<string, any> | undefined;
|
|
273
|
+
tailwind?: Record<string, any> | undefined;
|
|
274
|
+
category?: string | undefined;
|
|
275
|
+
subcategory?: string | undefined;
|
|
276
|
+
}, {
|
|
277
|
+
type: string;
|
|
278
|
+
name: string;
|
|
279
|
+
files: {
|
|
280
|
+
path: string;
|
|
281
|
+
content: string;
|
|
282
|
+
type: string;
|
|
283
|
+
target?: string | undefined;
|
|
284
|
+
}[];
|
|
285
|
+
description?: string | undefined;
|
|
286
|
+
author?: string | undefined;
|
|
287
|
+
dependencies?: string[] | undefined;
|
|
288
|
+
devDependencies?: string[] | undefined;
|
|
289
|
+
registryDependencies?: string[] | undefined;
|
|
290
|
+
meta?: Record<string, any> | undefined;
|
|
291
|
+
title?: string | undefined;
|
|
292
|
+
cssVars?: Record<string, any> | undefined;
|
|
293
|
+
tailwind?: Record<string, any> | undefined;
|
|
294
|
+
category?: string | undefined;
|
|
295
|
+
subcategory?: string | undefined;
|
|
296
|
+
}>, "many">;
|
|
297
|
+
}, "strip", z.ZodTypeAny, {
|
|
298
|
+
name: string;
|
|
299
|
+
items: {
|
|
300
|
+
type: string;
|
|
301
|
+
name: string;
|
|
302
|
+
files: {
|
|
303
|
+
path: string;
|
|
304
|
+
content: string;
|
|
305
|
+
type: string;
|
|
306
|
+
target?: string | undefined;
|
|
307
|
+
}[];
|
|
308
|
+
description?: string | undefined;
|
|
309
|
+
author?: string | undefined;
|
|
310
|
+
dependencies?: string[] | undefined;
|
|
311
|
+
devDependencies?: string[] | undefined;
|
|
312
|
+
registryDependencies?: string[] | undefined;
|
|
313
|
+
meta?: Record<string, any> | undefined;
|
|
314
|
+
title?: string | undefined;
|
|
315
|
+
cssVars?: Record<string, any> | undefined;
|
|
316
|
+
tailwind?: Record<string, any> | undefined;
|
|
317
|
+
category?: string | undefined;
|
|
318
|
+
subcategory?: string | undefined;
|
|
319
|
+
}[];
|
|
320
|
+
$schema?: string | undefined;
|
|
321
|
+
homepage?: string | undefined;
|
|
322
|
+
style?: string | undefined;
|
|
323
|
+
}, {
|
|
324
|
+
name: string;
|
|
325
|
+
items: {
|
|
326
|
+
type: string;
|
|
327
|
+
name: string;
|
|
328
|
+
files: {
|
|
329
|
+
path: string;
|
|
330
|
+
content: string;
|
|
331
|
+
type: string;
|
|
332
|
+
target?: string | undefined;
|
|
333
|
+
}[];
|
|
334
|
+
description?: string | undefined;
|
|
335
|
+
author?: string | undefined;
|
|
336
|
+
dependencies?: string[] | undefined;
|
|
337
|
+
devDependencies?: string[] | undefined;
|
|
338
|
+
registryDependencies?: string[] | undefined;
|
|
339
|
+
meta?: Record<string, any> | undefined;
|
|
340
|
+
title?: string | undefined;
|
|
341
|
+
cssVars?: Record<string, any> | undefined;
|
|
342
|
+
tailwind?: Record<string, any> | undefined;
|
|
343
|
+
category?: string | undefined;
|
|
344
|
+
subcategory?: string | undefined;
|
|
345
|
+
}[];
|
|
346
|
+
$schema?: string | undefined;
|
|
347
|
+
homepage?: string | undefined;
|
|
348
|
+
style?: string | undefined;
|
|
349
|
+
}>;
|
|
6
350
|
export type RegistryItem = z.infer<typeof registryItemSchema>;
|
|
7
351
|
export type Registry = z.infer<typeof registrySchema>;
|
|
8
352
|
export type RegistryWithContent = z.infer<typeof registryWithContentSchema>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/ui",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.4",
|
|
4
4
|
"description": "Library that contains shared UI primitives, support for a common design system, and other boilerplate support.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -105,7 +105,9 @@
|
|
|
105
105
|
"sonner": "^1.4.41",
|
|
106
106
|
"tailwind-merge": "^2.3.0",
|
|
107
107
|
"tailwindcss-animate": "^1.0.7",
|
|
108
|
-
"tailwindcss-interaction-media": "^0.1.0"
|
|
108
|
+
"tailwindcss-interaction-media": "^0.1.0",
|
|
109
|
+
"zod": "^3.23.8",
|
|
110
|
+
"zod-to-json-schema": "^3.23.2"
|
|
109
111
|
},
|
|
110
112
|
"peerDependencies": {
|
|
111
113
|
"@hookform/resolvers": "^3.3.2",
|
|
@@ -117,9 +119,7 @@
|
|
|
117
119
|
"react": "18.3.1",
|
|
118
120
|
"react-dom": "18.3.1",
|
|
119
121
|
"react-hook-form": "7.51.4",
|
|
120
|
-
"validator": "^13.11.0"
|
|
121
|
-
"zod": "3.23.8",
|
|
122
|
-
"zod-to-json-schema": "^3.24.5"
|
|
122
|
+
"validator": "^13.11.0"
|
|
123
123
|
},
|
|
124
124
|
"devDependencies": {
|
|
125
125
|
"@mdx-js/loader": "^3.0.0",
|
package/tsconfig.json
CHANGED
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "../tsconfig.hanzo.base.json",
|
|
3
3
|
"include": [
|
|
4
|
-
"
|
|
5
|
-
"
|
|
4
|
+
"src/**/*.ts",
|
|
5
|
+
"src/**/*.tsx"
|
|
6
6
|
],
|
|
7
7
|
"exclude": [
|
|
8
8
|
"node_modules",
|
|
9
9
|
"dist",
|
|
10
|
-
"
|
|
10
|
+
"bin",
|
|
11
|
+
"test"
|
|
11
12
|
],
|
|
12
13
|
"compilerOptions": {
|
|
13
14
|
"noEmit": false,
|
|
14
15
|
"declaration": true,
|
|
15
|
-
"outDir": "./dist"
|
|
16
|
+
"outDir": "./dist",
|
|
17
|
+
"skipLibCheck": true,
|
|
18
|
+
"rootDir": "./src",
|
|
19
|
+
"types": ["node"],
|
|
20
|
+
"verbatimModuleSyntax": false
|
|
16
21
|
}
|
|
17
22
|
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ApplyTypography } from '../../primitives/index-common';
|
|
3
|
-
import { cn } from '../../util';
|
|
4
|
-
const AccordianBlockComponent = ({ block, className = '' }) => {
|
|
5
|
-
if (block.blockType !== 'accordian') {
|
|
6
|
-
return <>accordian block required</>;
|
|
7
|
-
}
|
|
8
|
-
const accordian = block;
|
|
9
|
-
return (<Accordion type="single" collapsible className={cn('w-full border rounded-xl overflow-hidden', className)}>
|
|
10
|
-
{accordian.items.map((item, index) => (<AccordionItem className='border-b last:border-0 overflow-hidden' value={`value-${index}`} key={index}>
|
|
11
|
-
<AccordionTrigger className='px-3 md:px-4 lg:px-6 hover:no-underline hover:bg-level-3'>
|
|
12
|
-
<ApplyTypography>
|
|
13
|
-
{/* styles specific to accordion. From old site */}
|
|
14
|
-
<h6 className='leading-[1.2] text-[1.05rem] font-semibold '>{item.trigger}</h6>
|
|
15
|
-
</ApplyTypography>
|
|
16
|
-
</AccordionTrigger>
|
|
17
|
-
<AccordionContent className='p-4 border-t bg-level-1'>
|
|
18
|
-
<ApplyTypography className='flex flex-col justify-start items-start '>
|
|
19
|
-
{(typeof item.content === 'string') ? (<p>{item.content}</p>) : item.content}
|
|
20
|
-
</ApplyTypography>
|
|
21
|
-
</AccordionContent>
|
|
22
|
-
</AccordionItem>))}
|
|
23
|
-
</Accordion>);
|
|
24
|
-
};
|
|
25
|
-
export default AccordianBlockComponent;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { containsToken, cn } from '../../util';
|
|
3
|
-
import InlineIcon from '../../primitives/next/inline-icon';
|
|
4
|
-
import GridBlockComponent from './grid-block';
|
|
5
|
-
const BulletCardsBlockComponent = ({ block, className = '', agent }) => {
|
|
6
|
-
if (block.blockType !== 'bullet-cards') {
|
|
7
|
-
return <>bullet cards block required</>;
|
|
8
|
-
}
|
|
9
|
-
const b = block;
|
|
10
|
-
const specified = (s) => (containsToken(b.specifiers, s));
|
|
11
|
-
const noBorder = specified('no-card-border') ? 'border-0' : 'md:border';
|
|
12
|
-
const mobileTextXs = specified('mobile-small-text') ? 'text-xs' : 'text-sm';
|
|
13
|
-
const borderclx = specified('border-muted-3') ?
|
|
14
|
-
'md:border-muted-3'
|
|
15
|
-
:
|
|
16
|
-
(specified('border-muted-1') ? 'md:border-muted-1' : 'md:border-muted-2');
|
|
17
|
-
return (<GridBlockComponent block={{ blockType: 'grid', grid: b.grid }} className={className} agent={agent}>
|
|
18
|
-
{b.cards.map((card, index) => (<div key={index} className={cn('px-0 sm:px-4 py-1 md:py-4 rounded-lg ' +
|
|
19
|
-
'flex flex-row justify-start items-center not-typography text-foreground', noBorder, borderclx)}>
|
|
20
|
-
<InlineIcon icon={card.icon} size={b.iconSize ?? 28} agent={agent} className='shrink-0 mr-2 md:mr-4 '/>
|
|
21
|
-
<p className={cn('m-0 sm:text-base', mobileTextXs)}>{card.text}</p>
|
|
22
|
-
</div>))}
|
|
23
|
-
</GridBlockComponent>);
|
|
24
|
-
};
|
|
25
|
-
export default BulletCardsBlockComponent;
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { ApplyTypography, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '../../../primitives/index-common';
|
|
3
|
-
import ImageBlockComponent from '../image-block';
|
|
4
|
-
import VideoBlockComponent from '../video-block';
|
|
5
|
-
import CTABlockComponent from '../cta-block';
|
|
6
|
-
import { cn } from '../../../util';
|
|
7
|
-
import { getTypographySize } from './util';
|
|
8
|
-
import LinkOutButton from './link-out-button';
|
|
9
|
-
const CardBlockComponent = ({ block, className = '', contentClassName = '' }) => {
|
|
10
|
-
if (block.blockType !== 'card') {
|
|
11
|
-
return <>card block required</>;
|
|
12
|
-
}
|
|
13
|
-
const card = block;
|
|
14
|
-
const has = (s) => (card.specifiers?.includes(s));
|
|
15
|
-
const ghost = has('ghost'); // no outer padding, no borders, larger title, all left-aligned bg is same (default)
|
|
16
|
-
const contentclx = (has('content-left') ? 'items-start ' : ' items-center ') + (has('content-top') ? '!justify-start' : '') + contentClassName;
|
|
17
|
-
const disabledBorder = (has('appear-disabled') ? ' border-muted-4' : ' border-muted-3');
|
|
18
|
-
const outerBorder = ((has('no-outer-border') || ghost) ? ' border-0' : '');
|
|
19
|
-
const innerBorder = (ghost ? ' border-0' : '');
|
|
20
|
-
const paddingclx = ghost ? ' px-0 py-0' : ' px-6 py-3';
|
|
21
|
-
const mainGap = ghost ? ' gap-2' : '';
|
|
22
|
-
const disabledText = (has('appear-disabled') ? ' text-muted-2' : '');
|
|
23
|
-
const disabledTypoText = (has('appear-disabled') ? ' typography-p:text-muted-2' : '');
|
|
24
|
-
const bgclx = (has('bg-card') ? ' bg-level-1' : '');
|
|
25
|
-
const titleclx = (has('heading-style-title') ? ' font-heading text-base leading-tight' : '') +
|
|
26
|
-
(ghost ? ' text-left md:text-xl' : '');
|
|
27
|
-
const typoSize = (card.specifiers) ? getTypographySize(card.specifiers) : 'responsive';
|
|
28
|
-
const typoclx = (typoSize === 'sm') ? 'typography-sm typography-p:text-sm ' : (typoSize === 'lg') ? 'typography-lg ' : '';
|
|
29
|
-
const contentBefore = has('content-before');
|
|
30
|
-
const iconInline = has('icon-inline');
|
|
31
|
-
const contentOnHover = has('reveal-content-on-hover');
|
|
32
|
-
//const smallIconDim = (contentOnHover && card.specifiers) ? getSmallIconDim(card.specifiers) : undefined
|
|
33
|
-
const Header = ({ inContent = false, className = '' }) => ((card.title || card.byline || card.icon) ? (<CardHeader className={'not-typography' + ' text-accent' + disabledText + paddingclx + innerBorder + className}>
|
|
34
|
-
<div className={(iconInline || inContent) ? 'flex flex-row justify-start items-end my-3' : ''}>
|
|
35
|
-
{(card.icon && !card.iconAfter) && (<div className={iconInline ? 'mr-1' : 'mb-2'}>{card.icon}</div>)}
|
|
36
|
-
{card.title && (<CardTitle className={'text-center text-lg font-medium' + titleclx + (iconInline ? ' md:text-xl/none' : '')}>
|
|
37
|
-
{card.title}
|
|
38
|
-
</CardTitle>)}
|
|
39
|
-
{(card.icon && card.iconAfter) && (<div className={iconInline ? 'ml-1' : 'my-1'}>{card.icon}</div>)}
|
|
40
|
-
</div>
|
|
41
|
-
{card.byline && (<CardDescription>{card.byline}</CardDescription>)}
|
|
42
|
-
</CardHeader>) : null);
|
|
43
|
-
const MediaAndContent = ({ className = '' }) => (has('media-left') ? (
|
|
44
|
-
// media left layout
|
|
45
|
-
<CardContent className={'flex flex-row justify-start items-stretch p-0 grow ' + disabledBorder + bgclx + contentclx + className}>
|
|
46
|
-
{card.media && (<div className={'box-content grow-0 not-typography' + paddingclx} style={{
|
|
47
|
-
// If this layout has been specified, assume media is video, and that the 'sm' dim exists.
|
|
48
|
-
width: card.media.dim.sm.w
|
|
49
|
-
}}>
|
|
50
|
-
<VideoBlockComponent block={card.media} usePoster={has('video-use-poster')} size='sm' className={has('appear-disabled') ? 'opacity-[0.6]' : ''}/>
|
|
51
|
-
</div>)}
|
|
52
|
-
{card.content && (<ApplyTypography className={'grow border-l flex flex-col justify-center ' + disabledTypoText + paddingclx + disabledBorder + contentclx} size={typoSize}>
|
|
53
|
-
{(typeof card.content === 'string') ? (<p>{card.content}</p>) : card.content}
|
|
54
|
-
</ApplyTypography>)}
|
|
55
|
-
</CardContent>) : ( // default layout
|
|
56
|
-
<CardContent className={'grow typography flex flex-col justify-center ' +
|
|
57
|
-
typoclx + disabledTypoText + bgclx + paddingclx + contentclx + (has('full-width') ? ' p-0 ' : ' ') +
|
|
58
|
-
className}>
|
|
59
|
-
{contentOnHover && (<Header inContent/>)}
|
|
60
|
-
{card.content && contentBefore && ((typeof card.content === 'string') ? (<p>{card.content}</p>) : card.content)}
|
|
61
|
-
{card.media && (card.media.blockType === 'image' ? (<ImageBlockComponent block={card.media}/>) : (<VideoBlockComponent block={card.media}/>))}
|
|
62
|
-
{card.content && !contentBefore && ((typeof card.content === 'string') ? (<p>{card.content}</p>) : card.content)}
|
|
63
|
-
</CardContent>));
|
|
64
|
-
const Footer = () => (!card.cta ? null : (has('links-w-arrow') ? (
|
|
65
|
-
// links w arrow
|
|
66
|
-
<CardFooter className={'typography typography-a:text-muted-2 typography-a:hover:text-muted-1 typography-a:text-xs typography-a:no-underline typography-a:hover:underline ' +
|
|
67
|
-
'flex flex-col justify-start items-stretch ' + paddingclx}>
|
|
68
|
-
<CTABlockComponent block={card.cta} renderLink={(def, key) => (<LinkOutButton def={def} key={key}/>)}/>
|
|
69
|
-
</CardFooter>) : ( // default
|
|
70
|
-
<CardFooter className={'grid grid-cols-1 gap-2 md:flex md:flex-row md:justify-center ' + paddingclx}>
|
|
71
|
-
<CTABlockComponent block={card.cta}/>
|
|
72
|
-
</CardFooter>)));
|
|
73
|
-
return (<Card className={cn('flex flex-col self-stretch ' +
|
|
74
|
-
(contentOnHover ? 'group relative' : '') +
|
|
75
|
-
disabledBorder +
|
|
76
|
-
outerBorder +
|
|
77
|
-
bgclx +
|
|
78
|
-
mainGap, className)}>
|
|
79
|
-
<Header className={(contentOnHover ? ' absolute top-[0px] left-[0px] w-full hidden ' : '')}/>
|
|
80
|
-
<MediaAndContent className={(contentOnHover ?
|
|
81
|
-
' bg-gradient-to-t from-secondary to-65%' +
|
|
82
|
-
' items-start justify-start rounded-lg p-4' +
|
|
83
|
-
' transition-opacity duration-500 ease-out opacity-100 ' : '')}/>
|
|
84
|
-
<Footer />
|
|
85
|
-
</Card>);
|
|
86
|
-
};
|
|
87
|
-
export default CardBlockComponent;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { LinkElement, Icons } from '../../../primitives/index-next';
|
|
3
|
-
const ArrowLinkElement = ({ def }) => (<LinkElement def={def} className='justify-between' variant='link' icon={<Icons.linkOut className='w-[18px] h-[18px]'/>} iconAfter/>);
|
|
4
|
-
export default ArrowLinkElement;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Dimensions } from '../../../types';
|
|
2
|
-
import type { TypographySize } from '../../../primitives/index-common';
|
|
3
|
-
export declare const getTypographySize: (s: string) => TypographySize;
|
|
4
|
-
export declare const getSmallIconDim: (s: string) => Dimensions | undefined;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { getSpecifierData, getPrimaryStartingWith, getDim, } from '../../../util/specifier';
|
|
2
|
-
export const getTypographySize = (s) => getSpecifierData(s, (s) => (getPrimaryStartingWith(s, 'typography')), (s) => {
|
|
3
|
-
const subTokenArray = s.split('-');
|
|
4
|
-
return subTokenArray[subTokenArray.length - 1];
|
|
5
|
-
}, 'responsive');
|
|
6
|
-
export const getSmallIconDim = (s) => (getSpecifierData(s, (s) => (getPrimaryStartingWith(s, 'small-icon')), getDim));
|