@uibot/registry 0.18.1 → 0.20.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/README.md +59 -0
- package/dist/component-replacement.d.ts +10 -0
- package/dist/distribution-snapshot.d.ts +22 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +11 -11
- package/dist/resource-query.d.ts +4 -0
- package/dist/resources.d.ts +4 -0
- package/dist/resources.js +3 -3
- package/dist/shadcn/r/admin-apps.json +61 -0
- package/dist/shadcn/r/admin-chats.json +54 -0
- package/dist/shadcn/r/admin-error-401.json +54 -0
- package/dist/shadcn/r/admin-error-403.json +54 -0
- package/dist/shadcn/r/admin-error-404.json +54 -0
- package/dist/shadcn/r/admin-error-500.json +54 -0
- package/dist/shadcn/r/admin-error-503.json +54 -0
- package/dist/shadcn/r/admin-forgot-password.json +59 -0
- package/dist/shadcn/r/admin-help.json +53 -0
- package/dist/shadcn/r/admin-otp.json +59 -0
- package/dist/shadcn/r/admin-overview.json +62 -0
- package/dist/shadcn/r/admin-settings-account.json +61 -0
- package/dist/shadcn/r/admin-settings-appearance.json +61 -0
- package/dist/shadcn/r/admin-settings-display.json +61 -0
- package/dist/shadcn/r/admin-settings-notifications.json +61 -0
- package/dist/shadcn/r/admin-settings-profile.json +61 -0
- package/dist/shadcn/r/admin-settings.json +65 -0
- package/dist/shadcn/r/admin-shell.json +25 -6
- package/dist/shadcn/r/admin-sign-in-2.json +67 -0
- package/dist/shadcn/r/admin-sign-in.json +59 -0
- package/dist/shadcn/r/admin-sign-up.json +59 -0
- package/dist/shadcn/r/admin-tasks.json +66 -0
- package/dist/shadcn/r/admin-users.json +66 -0
- package/dist/shadcn/r/auth-01.json +24 -0
- package/dist/shadcn/r/auth-02.json +24 -0
- package/dist/shadcn/r/auth-03.json +24 -0
- package/dist/shadcn/r/auth-04.json +24 -0
- package/dist/shadcn/r/auth-05.json +24 -0
- package/dist/shadcn/r/auth-centered.json +61 -0
- package/dist/shadcn/r/auth-enterprise.json +61 -0
- package/dist/shadcn/r/auth-primitives.json +58 -0
- package/dist/shadcn/r/auth-recovery.json +64 -0
- package/dist/shadcn/r/auth-registration.json +63 -0
- package/dist/shadcn/r/auth-split.json +67 -0
- package/dist/shadcn/r/auth.json +13 -13
- package/dist/shadcn/r/charts.json +45 -18
- package/dist/shadcn/r/chat-artifact.json +49 -0
- package/dist/shadcn/r/chat-focused.json +49 -0
- package/dist/shadcn/r/chat-history.json +49 -0
- package/dist/shadcn/r/chat-knowledge.json +49 -0
- package/dist/shadcn/r/chat-support.json +49 -0
- package/dist/shadcn/r/chat-workspace.json +136 -0
- package/dist/shadcn/r/collection-cell-editor.json +6 -6
- package/dist/shadcn/r/collection-panel-drawer.json +2 -2
- package/dist/shadcn/r/collection-record-menu.json +2 -2
- package/dist/shadcn/r/collection-shared.json +2 -2
- package/dist/shadcn/r/commerce-workspace.json +69 -0
- package/dist/shadcn/r/console-billing.json +68 -0
- package/dist/shadcn/r/console-page.json +289 -0
- package/dist/shadcn/r/console-shell.json +29 -0
- package/dist/shadcn/r/content.json +1 -1
- package/dist/shadcn/r/creation-html-generation.json +3 -3
- package/dist/shadcn/r/creation-reference-generation.json +3 -3
- package/dist/shadcn/r/creation-revision-export.json +3 -3
- package/dist/shadcn/r/creation-shared.json +3 -3
- package/dist/shadcn/r/creation-variant-compare.json +4 -4
- package/dist/shadcn/r/creation-workspace.json +4 -4
- package/dist/shadcn/r/crm-workspace.json +73 -0
- package/dist/shadcn/r/dashboard-01.json +78 -0
- package/dist/shadcn/r/dashboard.json +114 -4
- package/dist/shadcn/r/data-studio.json +1 -1
- package/dist/shadcn/r/data-table.json +138 -10
- package/dist/shadcn/r/data.json +88 -11
- package/dist/shadcn/r/document-assistant.json +54 -0
- package/dist/shadcn/r/document-library.json +49 -0
- package/dist/shadcn/r/document-reading.json +49 -0
- package/dist/shadcn/r/document-workspace.json +164 -0
- package/dist/shadcn/r/document-writing.json +49 -0
- package/dist/shadcn/r/drilldown-menu.json +233 -0
- package/dist/shadcn/r/education-workspace.json +82 -0
- package/dist/shadcn/r/feedback.json +19 -6
- package/dist/shadcn/r/field.json +1 -1
- package/dist/shadcn/r/form.json +12 -12
- package/dist/shadcn/r/grid.json +1 -1
- package/dist/shadcn/r/interactive.json +1 -1
- package/dist/shadcn/r/item-grid.json +219 -0
- package/dist/shadcn/r/kanban.json +1 -1
- package/dist/shadcn/r/layout.json +217 -18
- package/dist/shadcn/r/marketing.json +1 -1
- package/dist/shadcn/r/nav.json +39 -11
- package/dist/shadcn/r/presentation.json +1 -1
- package/dist/shadcn/r/preview-device-frame.json +2 -2
- package/dist/shadcn/r/primitives.json +2 -2
- package/dist/shadcn/r/sections.json +1 -1
- package/dist/shadcn/r/shadcn-admin-shell.json +1 -1
- package/dist/shadcn/r/shadcn-admin.json +23 -22
- package/dist/shadcn/r/sidebar-01.json +42 -0
- package/dist/shadcn/r/sidebar-02.json +42 -0
- package/dist/shadcn/r/sidebar-03.json +30 -0
- package/dist/shadcn/r/sidebar-04.json +30 -0
- package/dist/shadcn/r/sidebar-05.json +36 -0
- package/dist/shadcn/r/sidebar-06.json +42 -0
- package/dist/shadcn/r/sidebar-07.json +54 -0
- package/dist/shadcn/r/sidebar-08.json +54 -0
- package/dist/shadcn/r/sidebar-09.json +36 -0
- package/dist/shadcn/r/sidebar-10.json +66 -0
- package/dist/shadcn/r/sidebar-11.json +30 -0
- package/dist/shadcn/r/sidebar-12.json +48 -0
- package/dist/shadcn/r/sidebar-13.json +30 -0
- package/dist/shadcn/r/sidebar-14.json +30 -0
- package/dist/shadcn/r/sidebar-15.json +84 -0
- package/dist/shadcn/r/sidebar-16.json +66 -0
- package/dist/shadcn/r/sidebar-drilldown.json +29 -0
- package/dist/shadcn/r/sidebar-primitives.json +155 -0
- package/dist/shadcn/r/uibot-base.json +3 -3
- package/dist/shadcn/r/workspace.json +11 -4
- package/dist/shadcn/registry.json +1016 -176
- package/dist/shadcn.d.ts +0 -39
- package/dist/solution-composition.d.ts +45 -0
- package/dist/solution-regions.d.ts +3 -0
- package/dist/solution-spec.d.ts +7 -0
- package/dist/template-source.d.ts +2 -0
- package/package.json +2 -2
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "registry:ui",
|
|
5
5
|
"description": "Responsive 2–4 column pricing grid of hairline cards. The `highlighted` plan gets an amber border + 'Popular' badge + solid amber CTA; others use an outline CTA. Features list with amber check glyphs. CTAs are {label, href} anchors.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"react"
|
|
7
|
+
"react@19.3.0"
|
|
8
8
|
],
|
|
9
9
|
"registryDependencies": [
|
|
10
10
|
"@uibot/uibot-base"
|
package/dist/shadcn/r/nav.json
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
"type": "registry:ui",
|
|
5
5
|
"description": "Vertical sidebar navigation. Place MenuLink or MenuGroup blocks as children. Usually placed in the PageLayout sidebar slot.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"react"
|
|
7
|
+
"react@19.3.0",
|
|
8
|
+
"radix-ui@1.4.3"
|
|
8
9
|
],
|
|
9
10
|
"registryDependencies": [
|
|
10
11
|
"@uibot/uibot-base"
|
|
@@ -13,13 +14,31 @@
|
|
|
13
14
|
{
|
|
14
15
|
"path": "components/uibot/nav.tsx",
|
|
15
16
|
"target": "components/uibot/nav.tsx",
|
|
16
|
-
"content": "import type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\n\n/**\n * Resolve the visual class for a Link `variant`. Exported so a host that\n * overrides the `Link` renderer (e.g. a router-aware SPA bridge) can reuse the\n * exact same chrome without re-declaring it.\n *\n * - `button` — filled primary button styling (CTA).\n * - `outline` — bordered secondary button styling (CTA pair).\n * - `muted` — muted inline link (header actions).\n * - default — primary inline hyperlink.\n */\nexport function linkVariantClass(variant: unknown): string {\n if (variant === \"button\") {\n return \"inline-flex items-center rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:bg-primary/90\";\n }\n if (variant === \"outline\") {\n return \"inline-flex items-center rounded-md border border-border bg-background px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent\";\n }\n if (variant === \"muted\") {\n return \"text-muted-foreground hover:text-foreground underline-offset-4 hover:underline\";\n }\n return \"text-primary underline-offset-4 hover:underline\";\n}\n\n/** Sidebar navigation menu */\nexport const PageSiderMenu: RendererComponent = (props, ctx) => (\n <nav\n className=\"uibot-sider-menu flex h-full w-full flex-col bg-muted/30\"\n data-uibot-type=\"PageSiderMenu\"\n aria-label={\n typeof props[\"label\"] === \"string\"\n ? props[\"label\"]\n : typeof props.title === \"string\"\n ? props.title\n : \"Sidebar\"\n }\n >\n {ctx.slots[\"header\"] && (\n <div className=\"shrink-0 border-b px-3 py-3\">{ctx.slots[\"header\"] as ReactNode[]}</div>\n )}\n {typeof props[\"title\"] === \"string\" && (\n <div className=\"uibot-sider-title shrink-0 border-b px-4 py-4\">\n <span className=\"uibot-sider-full-title text-sm font-semibold tracking-tight\">\n {props[\"title\"]}\n </span>\n <span className=\"uibot-sider-abbreviation hidden text-sm font-semibold\" aria-hidden=\"true\">\n {Array.from(props.title.trim())[0] || \"•\"}\n </span>\n </div>\n )}\n <
|
|
17
|
+
"content": "import type { RendererComponent } from \"@/lib/uibot-renderer\";\nimport type { ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport { ScrollArea } from \"./scroll-area\";\nimport { Icon } from \"./icons\";\nimport { emit } from \"./interaction\";\n\n/**\n * Resolve the visual class for a Link `variant`. Exported so a host that\n * overrides the `Link` renderer (e.g. a router-aware SPA bridge) can reuse the\n * exact same chrome without re-declaring it.\n *\n * - `button` — filled primary button styling (CTA).\n * - `outline` — bordered secondary button styling (CTA pair).\n * - `muted` — muted inline link (header actions).\n * - default — primary inline hyperlink.\n */\nexport function linkVariantClass(variant: unknown): string {\n if (variant === \"button\") {\n return \"inline-flex items-center rounded-md bg-primary px-3 py-1.5 text-sm font-medium text-primary-foreground hover:bg-primary/90\";\n }\n if (variant === \"outline\") {\n return \"inline-flex items-center rounded-md border border-border bg-background px-3 py-1.5 text-sm font-medium text-foreground hover:bg-accent\";\n }\n if (variant === \"muted\") {\n return \"text-muted-foreground hover:text-foreground underline-offset-4 hover:underline\";\n }\n return \"text-primary underline-offset-4 hover:underline\";\n}\n\n/** Sidebar navigation menu */\nexport const PageSiderMenu: RendererComponent = (props, ctx) => (\n <nav\n className=\"uibot-sider-menu flex h-full w-full flex-col bg-muted/30\"\n data-uibot-type=\"PageSiderMenu\"\n aria-label={\n typeof props[\"label\"] === \"string\"\n ? props[\"label\"]\n : typeof props.title === \"string\"\n ? props.title\n : \"Sidebar\"\n }\n >\n {ctx.slots[\"header\"] && (\n <div className=\"shrink-0 border-b px-3 py-3\">{ctx.slots[\"header\"] as ReactNode[]}</div>\n )}\n {typeof props[\"title\"] === \"string\" && (\n <div className=\"uibot-sider-title shrink-0 border-b px-4 py-4\">\n <span className=\"uibot-sider-full-title text-sm font-semibold tracking-tight\">\n {props[\"title\"]}\n </span>\n <span className=\"uibot-sider-abbreviation hidden text-sm font-semibold\" aria-hidden=\"true\">\n {Array.from(props.title.trim())[0] || \"•\"}\n </span>\n </div>\n )}\n <ScrollArea\n className=\"uibot-menu-scroll flex-1\"\n fillContent\n viewportProps={{ \"aria-label\": \"Menu links\" }}\n >\n <ul className=\"py-2\" role=\"list\">\n {ctx.children as ReactNode[]}\n </ul>\n </ScrollArea>\n {ctx.slots[\"footer\"] && (\n <div className=\"uibot-sider-footer shrink-0 border-t px-3 py-3\">\n {ctx.slots[\"footer\"] as ReactNode[]}\n </div>\n )}\n </nav>\n);\n\n/** Labeled group of MenuLink items inside PageSiderMenu */\nexport const MenuGroup: RendererComponent = (props, ctx) => (\n <li className=\"uibot-menu-group list-none\" data-uibot-type=\"MenuGroup\">\n {typeof props[\"title\"] === \"string\" && (\n <div className=\"uibot-menu-group-title px-4 pb-1 pt-3 text-[11px] font-semibold uppercase tracking-wide text-muted-foreground\">\n {props[\"title\"]}\n </div>\n )}\n <ul className=\"space-y-0.5\" role=\"list\">\n {ctx.children as ReactNode[]}\n </ul>\n </li>\n);\n\n/** Single navigation menu item */\nexport const MenuLink: RendererComponent = (props, ctx) => {\n const active = props[\"active\"] === true;\n const icon = typeof props.icon === \"string\" && props.icon.trim() ? props.icon : null;\n const label = typeof props.label === \"string\" ? props.label : \"Link\";\n const iconName =\n typeof props.iconName === \"string\" && props.iconName.trim() ? props.iconName : null;\n const action = !!ctx.element?.events?.onClick?.length;\n const Tag = action ? \"button\" : \"a\";\n\n return (\n <li>\n <Tag\n {...(action\n ? { type: \"button\" as const, onClick: () => emit(ctx, \"onClick\") }\n : { href: typeof props.href === \"string\" ? props.href : \"#\" })}\n className={cn(\n \"uibot-menu-link mx-2 flex items-center gap-2.5 rounded-md px-3 py-2 text-start text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\",\n action && \"w-[calc(100%-1rem)]\",\n active\n ? \"bg-accent text-accent-foreground\"\n : \"text-muted-foreground hover:bg-accent/50 hover:text-foreground\",\n )}\n data-uibot-type=\"MenuLink\"\n aria-current={active ? \"page\" : undefined}\n aria-label={label}\n title={label}\n >\n {iconName && <Icon name={iconName} size={18} />}\n {!iconName && icon && (\n <span className=\"text-base leading-none\" aria-hidden=\"true\">\n {icon}\n </span>\n )}\n {!iconName && !icon && (\n <span className=\"uibot-menu-fallback hidden text-base leading-none\" aria-hidden=\"true\">\n {Array.from(label.trim())[0] || \"•\"}\n </span>\n )}\n <span className=\"uibot-menu-label\">{label}</span>\n {props[\"badge\"] !== undefined && (\n <span className=\"uibot-menu-badge ml-auto rounded-full bg-primary px-1.5 py-0.5 text-[10px] font-medium text-primary-foreground\">\n {String(props[\"badge\"])}\n </span>\n )}\n </Tag>\n </li>\n );\n};\n\n/** Inline hyperlink */\nexport const Link: RendererComponent = (props, ctx) => {\n const children = ctx.children as ReactNode[];\n\n return (\n <a\n href={typeof props[\"href\"] === \"string\" ? props[\"href\"] : \"#\"}\n target={typeof props[\"target\"] === \"string\" ? props[\"target\"] : \"_self\"}\n className={cn(\n \"uibot-link transition-colors\",\n linkVariantClass(props[\"variant\"]),\n typeof props[\"className\"] === \"string\" ? props[\"className\"] : undefined,\n )}\n data-uibot-type=\"Link\"\n >\n {children.length > 0\n ? children\n : typeof props[\"label\"] === \"string\"\n ? props[\"label\"]\n : \"Link\"}\n </a>\n );\n};\n\n/** Parse breadcrumb items — accepts Array<{label,href}> or JSON string */\nfunction parseBreadcrumbItems(raw: unknown): Array<{ label: string; href?: string }> {\n if (Array.isArray(raw)) return raw as Array<{ label: string; href?: string }>;\n if (typeof raw === \"string\") {\n try {\n const parsed = JSON.parse(raw) as unknown;\n if (Array.isArray(parsed)) return parsed as Array<{ label: string; href?: string }>;\n } catch {\n /* ignore */\n }\n }\n return [];\n}\n\n/** Breadcrumb navigation trail */\nexport const Breadcrumb: RendererComponent = (props) => {\n const items = parseBreadcrumbItems(props[\"items\"]);\n\n return (\n <nav aria-label=\"Breadcrumb\" className=\"uibot-breadcrumb\" data-uibot-type=\"Breadcrumb\">\n <ol className=\"flex flex-wrap items-center gap-1 text-sm text-muted-foreground\">\n {items.map((item, i) => (\n <li key={i} className=\"flex items-center gap-1\">\n {i > 0 && (\n <svg\n aria-hidden=\"true\"\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 14 14\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n className=\"shrink-0 opacity-50\"\n >\n <polyline points=\"4 2 10 7 4 12\" />\n </svg>\n )}\n {item.href ? (\n <a\n href={item.href}\n className=\"transition-colors hover:text-foreground hover:underline underline-offset-4\"\n >\n {item.label}\n </a>\n ) : (\n <span aria-current=\"page\" className=\"font-medium text-foreground\">\n {item.label}\n </span>\n )}\n </li>\n ))}\n </ol>\n </nav>\n );\n};\n",
|
|
18
|
+
"type": "registry:ui"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "components/uibot/scroll-area.tsx",
|
|
22
|
+
"target": "components/uibot/scroll-area.tsx",
|
|
23
|
+
"content": "// Adapted from shadcn/ui Scroll Area (MIT).\nimport type { ComponentProps } from \"react\";\nimport { ScrollArea as Primitive } from \"radix-ui\";\n\nconst styles = `\n.uibot-scroll-area{position:relative;min-width:0;min-height:0;overflow:hidden}\n.uibot-scroll-viewport{width:100%;height:100%;max-height:inherit;border-radius:inherit;outline:none}\n.uibot-scroll-viewport:focus-visible{outline:2px solid var(--ring,#94a3b8);outline-offset:-2px}\n.uibot-scroll-viewport>div{display:block!important;min-width:100%}\n.uibot-scroll-area[data-fill-content=true]>.uibot-scroll-viewport>div{display:flex!important;flex-direction:column;min-height:100%}\n.uibot-scroll-area[data-scrollbars=horizontal]>.uibot-scroll-viewport{height:auto}\n.uibot-scrollbar{display:flex;touch-action:none;user-select:none;padding:1px;z-index:20}\n.uibot-scrollbar[data-orientation=vertical]{width:10px;border-inline-start:1px solid transparent}\n.uibot-scrollbar[data-orientation=horizontal]{height:10px;flex-direction:column;border-top:1px solid transparent}\n.uibot-scroll-thumb{position:relative;flex:1;border-radius:9999px;background:var(--nui-border,var(--border,#d4d4d8))}\n.uibot-scroll-thumb:hover,.uibot-scrollbar[data-state=visible]:active .uibot-scroll-thumb{background:var(--muted-foreground,#71717a)}\n`;\n\n/** Shared presentation primitive; refs and scroll events belong to the actual viewport. */\nexport function ScrollArea({\n children,\n className,\n scrollbars = \"vertical\",\n viewportProps,\n fillContent = false,\n ...props\n}: ComponentProps<typeof Primitive.Root> & {\n scrollbars?: \"vertical\" | \"horizontal\" | \"both\";\n viewportProps?: ComponentProps<typeof Primitive.Viewport>;\n fillContent?: boolean;\n}) {\n const { className: viewportClassName, ...viewportRest } = viewportProps ?? {};\n return (\n <Primitive.Root\n data-slot=\"scroll-area\"\n data-scrollbars={scrollbars}\n data-fill-content={fillContent}\n className={`uibot-scroll-area ${className ?? \"\"}`}\n type=\"auto\"\n {...props}\n >\n <style>{styles}</style>\n <Primitive.Viewport\n data-slot=\"scroll-area-viewport\"\n className={`uibot-scroll-viewport ${viewportClassName ?? \"\"}`}\n tabIndex={0}\n {...viewportRest}\n >\n {children}\n </Primitive.Viewport>\n {scrollbars !== \"horizontal\" && <ScrollBar />}\n {scrollbars !== \"vertical\" && <ScrollBar orientation=\"horizontal\" />}\n <Primitive.Corner />\n </Primitive.Root>\n );\n}\n\nexport function ScrollBar({\n className,\n orientation = \"vertical\",\n ...props\n}: ComponentProps<typeof Primitive.Scrollbar>) {\n return (\n <Primitive.Scrollbar\n data-slot=\"scroll-area-scrollbar\"\n orientation={orientation}\n className={`uibot-scrollbar ${className ?? \"\"}`}\n {...props}\n >\n <Primitive.Thumb data-slot=\"scroll-area-thumb\" className=\"uibot-scroll-thumb\" />\n </Primitive.Scrollbar>\n );\n}\n",
|
|
24
|
+
"type": "registry:ui"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "components/uibot/icons.tsx",
|
|
28
|
+
"target": "components/uibot/icons.tsx",
|
|
29
|
+
"content": "/*\nISC License\n\nCopyright (c) 2026 Lucide Icons and Contributors\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted, provided that the above\ncopyright notice and this permission notice appear in all copies.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES\nWITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF\nMERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR\nANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES\nWHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN\nACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF\nOR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.\n\n---\n\nThe following Lucide icons are derived from the Feather project:\n\nairplay, alert-circle, alert-octagon, alert-triangle, aperture, arrow-down-circle, arrow-down-left, arrow-down-right, arrow-down, arrow-left-circle, arrow-left, arrow-right-circle, arrow-right, arrow-up-circle, arrow-up-left, arrow-up-right, arrow-up, at-sign, calendar, cast, check, chevron-down, chevron-left, chevron-right, chevron-up, chevrons-down, chevrons-left, chevrons-right, chevrons-up, circle, clipboard, clock, code, columns, command, compass, corner-down-left, corner-down-right, corner-left-down, corner-left-up, corner-right-down, corner-right-up, corner-up-left, corner-up-right, crosshair, database, divide-circle, divide-square, dollar-sign, download, external-link, feather, frown, hash, headphones, help-circle, info, italic, key, layout, life-buoy, link-2, link, loader, lock, log-in, log-out, maximize, meh, minimize, minimize-2, minus-circle, minus-square, minus, monitor, moon, more-horizontal, more-vertical, move, music, navigation-2, navigation, octagon, pause-circle, percent, plus-circle, plus-square, plus, power, radio, rss, search, server, share, shopping-bag, sidebar, smartphone, smile, square, table-2, tablet, target, terminal, trash-2, trash, triangle, tv, type, upload, x-circle, x-octagon, x-square, x, zoom-in, zoom-out\n\nThe MIT License (MIT) (for the icons listed above)\n\nCopyright (c) 2013-present Cole Bemis\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n*/\n// Icon paths from lucide-react 1.8.0 (ISC); see docs/shadcn-admin-attribution.md.\nimport { createElement } from \"react\";\nconst paths: Record<string, [string, Record<string, string>][]> = {\n \"panel-left\": [\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"3\", rx: \"2\", key: \"afitv7\" }],\n [\"path\", { d: \"M9 3v18\", key: \"fh3hqa\" }],\n ],\n \"layout-dashboard\": [\n [\"rect\", { width: \"7\", height: \"9\", x: \"3\", y: \"3\", rx: \"1\", key: \"10lvy0\" }],\n [\"rect\", { width: \"7\", height: \"5\", x: \"14\", y: \"3\", rx: \"1\", key: \"16une8\" }],\n [\"rect\", { width: \"7\", height: \"9\", x: \"14\", y: \"12\", rx: \"1\", key: \"1hutg5\" }],\n [\"rect\", { width: \"7\", height: \"5\", x: \"3\", y: \"16\", rx: \"1\", key: \"ldoo1y\" }],\n ],\n \"list-todo\": [\n [\"path\", { d: \"M13 5h8\", key: \"a7qcls\" }],\n [\"path\", { d: \"M13 12h8\", key: \"h98zly\" }],\n [\"path\", { d: \"M13 19h8\", key: \"c3s6r1\" }],\n [\"path\", { d: \"m3 17 2 2 4-4\", key: \"1jhpwq\" }],\n [\"rect\", { x: \"3\", y: \"4\", width: \"6\", height: \"6\", rx: \"1\", key: \"cif1o7\" }],\n ],\n users: [\n [\"path\", { d: \"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2\", key: \"1yyitq\" }],\n [\"path\", { d: \"M16 3.128a4 4 0 0 1 0 7.744\", key: \"16gr8j\" }],\n [\"path\", { d: \"M22 21v-2a4 4 0 0 0-3-3.87\", key: \"kshegd\" }],\n [\"circle\", { cx: \"9\", cy: \"7\", r: \"4\", key: \"nufk8\" }],\n ],\n settings: [\n [\n \"path\",\n {\n d: \"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915\",\n key: \"1i5ecw\",\n },\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }],\n ],\n \"message-circle\": [\n [\n \"path\",\n {\n d: \"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719\",\n key: \"1sd12s\",\n },\n ],\n ],\n command: [\n [\n \"path\",\n {\n d: \"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3\",\n key: \"11bfej\",\n },\n ],\n ],\n search: [\n [\"path\", { d: \"m21 21-4.34-4.34\", key: \"14j7rj\" }],\n [\"circle\", { cx: \"11\", cy: \"11\", r: \"8\", key: \"4ej97u\" }],\n ],\n sun: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"4\", key: \"4exip2\" }],\n [\"path\", { d: \"M12 2v2\", key: \"tus03m\" }],\n [\"path\", { d: \"M12 20v2\", key: \"1lh1kg\" }],\n [\"path\", { d: \"m4.93 4.93 1.41 1.41\", key: \"149t6j\" }],\n [\"path\", { d: \"m17.66 17.66 1.41 1.41\", key: \"ptbguv\" }],\n [\"path\", { d: \"M2 12h2\", key: \"1t8f8n\" }],\n [\"path\", { d: \"M20 12h2\", key: \"1q8mjw\" }],\n [\"path\", { d: \"m6.34 17.66-1.41 1.41\", key: \"1m8zz5\" }],\n [\"path\", { d: \"m19.07 4.93-1.41 1.41\", key: \"1shlcs\" }],\n ],\n moon: [\n [\n \"path\",\n {\n d: \"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401\",\n key: \"kfwtm\",\n },\n ],\n ],\n \"chevron-down\": [[\"path\", { d: \"m6 9 6 6 6-6\", key: \"qrunsl\" }]],\n \"chevron-right\": [[\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]],\n \"chevrons-up-down\": [\n [\"path\", { d: \"m7 15 5 5 5-5\", key: \"1hf1tw\" }],\n [\"path\", { d: \"m7 9 5-5 5 5\", key: \"sgt6xg\" }],\n ],\n plus: [\n [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }],\n ],\n download: [\n [\"path\", { d: \"M12 15V3\", key: \"m9g1x1\" }],\n [\"path\", { d: \"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4\", key: \"ih7n3h\" }],\n [\"path\", { d: \"m7 10 5 5 5-5\", key: \"brsn70\" }],\n ],\n \"sliders-horizontal\": [\n [\"path\", { d: \"M10 5H3\", key: \"1qgfaw\" }],\n [\"path\", { d: \"M12 19H3\", key: \"yhmn1j\" }],\n [\"path\", { d: \"M14 3v4\", key: \"1sua03\" }],\n [\"path\", { d: \"M16 17v4\", key: \"1q0r14\" }],\n [\"path\", { d: \"M21 12h-9\", key: \"1o4lsq\" }],\n [\"path\", { d: \"M21 19h-5\", key: \"1rlt1p\" }],\n [\"path\", { d: \"M21 5h-7\", key: \"1oszz2\" }],\n [\"path\", { d: \"M8 10v4\", key: \"tgpxqk\" }],\n [\"path\", { d: \"M8 12H3\", key: \"a7s4jb\" }],\n ],\n shield: [\n [\n \"path\",\n {\n d: \"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z\",\n key: \"oel41y\",\n },\n ],\n ],\n \"log-out\": [\n [\"path\", { d: \"m16 17 5-5-5-5\", key: \"1bji2h\" }],\n [\"path\", { d: \"M21 12H9\", key: \"dn1m92\" }],\n [\"path\", { d: \"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4\", key: \"1uf3rs\" }],\n ],\n boxes: [\n [\n \"path\",\n {\n d: \"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z\",\n key: \"lc1i9w\",\n },\n ],\n [\"path\", { d: \"m7 16.5-4.74-2.85\", key: \"1o9zyk\" }],\n [\"path\", { d: \"m7 16.5 5-3\", key: \"va8pkn\" }],\n [\"path\", { d: \"M7 16.5v5.17\", key: \"jnp8gn\" }],\n [\n \"path\",\n {\n d: \"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z\",\n key: \"8zsnat\",\n },\n ],\n [\"path\", { d: \"m17 16.5-5-3\", key: \"8arw3v\" }],\n [\"path\", { d: \"m17 16.5 4.74-2.85\", key: \"8rfmw\" }],\n [\"path\", { d: \"M17 16.5v5.17\", key: \"k6z78m\" }],\n [\n \"path\",\n {\n d: \"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z\",\n key: \"1xygjf\",\n },\n ],\n [\"path\", { d: \"M12 8 7.26 5.15\", key: \"1vbdud\" }],\n [\"path\", { d: \"m12 8 4.74-2.85\", key: \"3rx089\" }],\n [\"path\", { d: \"M12 13.5V8\", key: \"1io7kd\" }],\n ],\n \"chart-no-axes-column\": [\n [\"path\", { d: \"M5 21v-6\", key: \"1hz6c0\" }],\n [\"path\", { d: \"M12 21V3\", key: \"1lcnhd\" }],\n [\"path\", { d: \"M19 21V9\", key: \"unv183\" }],\n ],\n ellipsis: [\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"1\", key: \"41hilf\" }],\n [\"circle\", { cx: \"19\", cy: \"12\", r: \"1\", key: \"1wjl8i\" }],\n [\"circle\", { cx: \"5\", cy: \"12\", r: \"1\", key: \"1pcz8c\" }],\n ],\n \"arrow-up\": [\n [\"path\", { d: \"m5 12 7-7 7 7\", key: \"hav0vg\" }],\n [\"path\", { d: \"M12 19V5\", key: \"x0mq9r\" }],\n ],\n \"arrow-down\": [\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }],\n [\"path\", { d: \"m19 12-7 7-7-7\", key: \"1idqje\" }],\n ],\n x: [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }],\n ],\n check: [[\"path\", { d: \"M20 6 9 17l-5-5\", key: \"1gmf2c\" }]],\n send: [\n [\n \"path\",\n {\n d: \"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z\",\n key: \"1ffxy3\",\n },\n ],\n [\"path\", { d: \"m21.854 2.147-10.94 10.939\", key: \"12cjpa\" }],\n ],\n mail: [\n [\"path\", { d: \"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7\", key: \"132q7q\" }],\n [\"rect\", { x: \"2\", y: \"4\", width: \"20\", height: \"16\", rx: \"2\", key: \"izxlao\" }],\n ],\n calendar: [\n [\"path\", { d: \"M8 2v4\", key: \"1cmpym\" }],\n [\"path\", { d: \"M16 2v4\", key: \"4m81vk\" }],\n [\"rect\", { width: \"18\", height: \"18\", x: \"3\", y: \"4\", rx: \"2\", key: \"1hopcy\" }],\n [\"path\", { d: \"M3 10h18\", key: \"8toen8\" }],\n ],\n eye: [\n [\n \"path\",\n {\n d: \"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0\",\n key: \"1nclc0\",\n },\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"3\", key: \"1v7zrd\" }],\n ],\n \"eye-off\": [\n [\n \"path\",\n {\n d: \"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49\",\n key: \"ct8e1f\",\n },\n ],\n [\"path\", { d: \"M14.084 14.158a3 3 0 0 1-4.242-4.242\", key: \"151rxh\" }],\n [\n \"path\",\n {\n d: \"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143\",\n key: \"13bj9a\",\n },\n ],\n [\"path\", { d: \"m2 2 20 20\", key: \"1ooewy\" }],\n ],\n};\nexport function Icon({ name, size = 18 }: { name: string; size?: number }) {\n const nodes = paths[name] ?? paths.boxes ?? [];\n return (\n <svg\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"1.75\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n aria-hidden=\"true\"\n style={{ flexShrink: 0 }}\n >\n {nodes.map(([tag, attributes]) => createElement(tag, attributes))}\n </svg>\n );\n}\n",
|
|
30
|
+
"type": "registry:ui"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "components/uibot/interaction.ts",
|
|
34
|
+
"target": "components/uibot/interaction.ts",
|
|
35
|
+
"content": "import type { RendererComponent } from \"@/lib/uibot-renderer\";\nexport type BlockContext = Parameters<RendererComponent>[1];\nexport type Chain = Parameters<NonNullable<BlockContext[\"dispatch\"]>>[0];\nexport type EventValue = string | number | boolean | null;\nexport function emit(\n ctx: BlockContext,\n name: string,\n values: Record<string, EventValue | EventValue[]> = {},\n value?: EventValue,\n): void {\n const element = ctx.element as { events?: Record<string, Chain> };\n const chain = element.events?.[name];\n if (chain?.length)\n void ctx.dispatch?.(chain, {\n event: { type: name, values, ...(value !== undefined ? { value } : {}) },\n });\n}\nexport function text(value: unknown, fallback = \"\"): string {\n return value == null ? fallback : String(value);\n}\nexport function records(value: unknown): Record<string, unknown>[] {\n return Array.isArray(value)\n ? value.filter(\n (v): v is Record<string, unknown> => !!v && typeof v === \"object\" && !Array.isArray(v),\n )\n : [];\n}\n\nconst submissions = new WeakMap<object, { payload: string; key: string }>();\n/** A new owner represents a new user intent; an unchanged failed submission keeps its key. */\nexport function submissionKey(owner: object, values: unknown): string {\n const payload = JSON.stringify(values);\n const previous = submissions.get(owner);\n if (previous?.payload === payload) return previous.key;\n const key = crypto.randomUUID();\n submissions.set(owner, { payload, key });\n return key;\n}\n",
|
|
17
36
|
"type": "registry:ui"
|
|
18
37
|
},
|
|
19
38
|
{
|
|
20
39
|
"path": "components/uibot/nav.uibot.json",
|
|
21
40
|
"target": "components/uibot/nav.uibot.json",
|
|
22
|
-
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"nav\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"Breadcrumb\",\n \"export\": \"Breadcrumb\",\n \"module\": \"nav.tsx\",\n \"catalog\": {\n \"name\": \"Breadcrumb\",\n \"description\": \"Hierarchical page path trail. Pass an items array of {label, href?}.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"breadcrumb\",\n \"nav\"\n ],\n \"props\": {\n \"items\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"href\": {\n \"type\": \"string\"\n }\n }\n },\n \"description\": \"Path segments\"\n }\n },\n \"usageScenarios\": [\n \"Page location context in an admin CRUD view\",\n \"Multi-step wizard progress\"\n ],\n \"constraints\": []\n }\n },\n {\n \"name\": \"Link\",\n \"export\": \"Link\",\n \"module\": \"nav.tsx\",\n \"catalog\": {\n \"name\": \"Link\",\n \"description\": \"Inline hyperlink. Variants: default (blue underline), muted (gray), button (filled CTA), outline (bordered CTA).\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"link\"\n ],\n \"props\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"href\": {\n \"type\": \"string\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"enum\": [\n \"default\",\n \"muted\",\n \"button\",\n \"outline\"\n ],\n \"default\": \"default\"\n },\n \"target\": {\n \"type\": \"string\",\n \"enum\": [\n \"_self\",\n \"_blank\"\n ],\n \"default\": \"_self\"\n },\n \"className\": {\n \"type\": \"string\",\n \"description\": \"
|
|
41
|
+
"content": "{\n \"schema\": \"uibot.registry.item.v1\",\n \"item\": \"nav\",\n \"channel\": \"public\",\n \"components\": [\n {\n \"name\": \"Breadcrumb\",\n \"export\": \"Breadcrumb\",\n \"module\": \"nav.tsx\",\n \"catalog\": {\n \"name\": \"Breadcrumb\",\n \"description\": \"Hierarchical page path trail. Pass an items array of {label, href?}.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"breadcrumb\",\n \"nav\"\n ],\n \"props\": {\n \"items\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"href\": {\n \"type\": \"string\"\n }\n }\n },\n \"description\": \"Path segments\"\n }\n },\n \"usageScenarios\": [\n \"Page location context in an admin CRUD view\",\n \"Multi-step wizard progress\"\n ],\n \"constraints\": []\n }\n },\n {\n \"name\": \"Link\",\n \"export\": \"Link\",\n \"module\": \"nav.tsx\",\n \"catalog\": {\n \"name\": \"Link\",\n \"description\": \"Inline hyperlink. Variants: default (blue underline), muted (gray), button (filled CTA), outline (bordered CTA).\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"link\"\n ],\n \"props\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"href\": {\n \"type\": \"string\"\n },\n \"variant\": {\n \"type\": \"string\",\n \"enum\": [\n \"default\",\n \"muted\",\n \"button\",\n \"outline\"\n ],\n \"default\": \"default\"\n },\n \"target\": {\n \"type\": \"string\",\n \"enum\": [\n \"_self\",\n \"_blank\"\n ],\n \"default\": \"_self\"\n },\n \"className\": {\n \"type\": \"string\",\n \"description\": \"Additional utility classes\"\n }\n },\n \"usageScenarios\": [\n \"Inline 'Read more' link in a paragraph\",\n \"CTA button-style link in a hero section\"\n ],\n \"constraints\": []\n }\n },\n {\n \"name\": \"MenuGroup\",\n \"export\": \"MenuGroup\",\n \"module\": \"nav.tsx\",\n \"catalog\": {\n \"name\": \"MenuGroup\",\n \"description\": \"Labeled group of MenuLink items inside PageSiderMenu.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"sidebar\",\n \"nav\"\n ],\n \"props\": {\n \"title\": {\n \"type\": \"string\",\n \"description\": \"Group heading shown above the links\"\n }\n },\n \"usageScenarios\": [\n \"Platform vs Workspace nav groups\",\n \"Settings section grouping\"\n ],\n \"constraints\": [\n \"Child of PageSiderMenu\"\n ]\n }\n },\n {\n \"name\": \"MenuLink\",\n \"export\": \"MenuLink\",\n \"module\": \"nav.tsx\",\n \"catalog\": {\n \"name\": \"MenuLink\",\n \"description\": \"Sidebar link with icon/badge. An onClick chain renders an action button.\",\n \"category\": \"primitive\",\n \"level\": \"L1\",\n \"tags\": [\n \"nav\",\n \"link\"\n ],\n \"props\": {\n \"label\": {\n \"type\": \"string\"\n },\n \"href\": {\n \"type\": \"string\"\n },\n \"icon\": {\n \"type\": \"string\",\n \"description\": \"Emoji or Unicode glyph\"\n },\n \"iconName\": {\n \"type\": \"string\",\n \"description\": \"Lucide name\"\n },\n \"badge\": {\n \"type\": \"string\",\n \"description\": \"Trailing count/label\"\n },\n \"active\": {\n \"type\": \"boolean\",\n \"default\": false\n }\n },\n \"usageScenarios\": [\n \"Dashboard menu item\",\n \"Settings section link with unread badge\"\n ],\n \"constraints\": [\n \"Child of PageSiderMenu/MenuGroup\"\n ],\n \"events\": {\n \"onClick\": {\n \"description\": \"Renders a button; ignores href\"\n }\n }\n }\n },\n {\n \"name\": \"PageSiderMenu\",\n \"export\": \"PageSiderMenu\",\n \"module\": \"nav.tsx\",\n \"catalog\": {\n \"name\": \"PageSiderMenu\",\n \"description\": \"Vertical sidebar navigation. Place MenuLink or MenuGroup blocks as children. Usually placed in the PageLayout sidebar slot.\",\n \"category\": \"composite\",\n \"level\": \"L2\",\n \"tags\": [\n \"sidebar\",\n \"nav\"\n ],\n \"props\": {\n \"title\": {\n \"type\": \"string\",\n \"description\": \"Section heading above menu items\"\n }\n },\n \"slots\": {\n \"header\": {\n \"description\": \"Workspace switcher or brand above the menu list\"\n },\n \"footer\": {\n \"description\": \"User card or secondary links below the menu list\"\n }\n },\n \"usageScenarios\": [\n \"Admin left nav (Dashboard, Users, Settings)\",\n \"Docs section navigation\"\n ],\n \"constraints\": [\n \"Use in the PageLayout sidebar slot, not main content\"\n ]\n }\n }\n ]\n}\n",
|
|
23
42
|
"type": "registry:ui"
|
|
24
43
|
}
|
|
25
44
|
],
|
|
@@ -45,7 +64,7 @@
|
|
|
45
64
|
"Docs section navigation"
|
|
46
65
|
],
|
|
47
66
|
"constraints": [
|
|
48
|
-
"
|
|
67
|
+
"Use in the PageLayout sidebar slot, not main content"
|
|
49
68
|
],
|
|
50
69
|
"provides": [
|
|
51
70
|
"PageSiderMenu",
|
|
@@ -135,7 +154,7 @@
|
|
|
135
154
|
},
|
|
136
155
|
"className": {
|
|
137
156
|
"type": "string",
|
|
138
|
-
"description": "
|
|
157
|
+
"description": "Additional utility classes"
|
|
139
158
|
}
|
|
140
159
|
},
|
|
141
160
|
"usageScenarios": [
|
|
@@ -169,7 +188,7 @@
|
|
|
169
188
|
"Settings section grouping"
|
|
170
189
|
],
|
|
171
190
|
"constraints": [
|
|
172
|
-
"
|
|
191
|
+
"Child of PageSiderMenu"
|
|
173
192
|
]
|
|
174
193
|
}
|
|
175
194
|
},
|
|
@@ -179,7 +198,7 @@
|
|
|
179
198
|
"module": "nav.tsx",
|
|
180
199
|
"catalog": {
|
|
181
200
|
"name": "MenuLink",
|
|
182
|
-
"description": "
|
|
201
|
+
"description": "Sidebar link with icon/badge. An onClick chain renders an action button.",
|
|
183
202
|
"category": "primitive",
|
|
184
203
|
"level": "L1",
|
|
185
204
|
"tags": [
|
|
@@ -197,9 +216,13 @@
|
|
|
197
216
|
"type": "string",
|
|
198
217
|
"description": "Emoji or Unicode glyph"
|
|
199
218
|
},
|
|
219
|
+
"iconName": {
|
|
220
|
+
"type": "string",
|
|
221
|
+
"description": "Lucide name"
|
|
222
|
+
},
|
|
200
223
|
"badge": {
|
|
201
224
|
"type": "string",
|
|
202
|
-
"description": "
|
|
225
|
+
"description": "Trailing count/label"
|
|
203
226
|
},
|
|
204
227
|
"active": {
|
|
205
228
|
"type": "boolean",
|
|
@@ -211,8 +234,13 @@
|
|
|
211
234
|
"Settings section link with unread badge"
|
|
212
235
|
],
|
|
213
236
|
"constraints": [
|
|
214
|
-
"
|
|
215
|
-
]
|
|
237
|
+
"Child of PageSiderMenu/MenuGroup"
|
|
238
|
+
],
|
|
239
|
+
"events": {
|
|
240
|
+
"onClick": {
|
|
241
|
+
"description": "Renders a button; ignores href"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
216
244
|
}
|
|
217
245
|
},
|
|
218
246
|
{
|
|
@@ -247,7 +275,7 @@
|
|
|
247
275
|
"Docs section navigation"
|
|
248
276
|
],
|
|
249
277
|
"constraints": [
|
|
250
|
-
"
|
|
278
|
+
"Use in the PageLayout sidebar slot, not main content"
|
|
251
279
|
]
|
|
252
280
|
}
|
|
253
281
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "registry:ui",
|
|
5
5
|
"description": "Asymmetric editorial hero: serif display title (with optional italic emphasis word), mono eyebrow with amber dot, warm radial-glow + blueprint dot-grid backdrop, grain overlay, staggered reveal, and primary/secondary CTAs. An optional right-side visual renders via the `aside` slot or children.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"react"
|
|
7
|
+
"react@19.3.0"
|
|
8
8
|
],
|
|
9
9
|
"registryDependencies": [
|
|
10
10
|
"@uibot/uibot-base"
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"type": "registry:block",
|
|
5
5
|
"description": "CSS-only preview shell with a phone / tablet / desktop width switch (no nested iframe).",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"react",
|
|
8
|
-
"lucide-react"
|
|
7
|
+
"react@19.3.0",
|
|
8
|
+
"lucide-react@1.56.0"
|
|
9
9
|
],
|
|
10
10
|
"registryDependencies": [
|
|
11
11
|
"button"
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "registry:ui",
|
|
5
5
|
"description": "Section title with optional eyebrow, description and an `actions` slot for buttons or links.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"react"
|
|
7
|
+
"react@19.3.0"
|
|
8
8
|
],
|
|
9
9
|
"registryDependencies": [
|
|
10
10
|
"@uibot/uibot-base"
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
{
|
|
14
14
|
"path": "components/uibot/primitives.tsx",
|
|
15
15
|
"target": "components/uibot/primitives.tsx",
|
|
16
|
-
"content": "import React from \"react\";\nimport type { Fragment, ReactElement, ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\n\nfunction str(value: unknown): string {\n return typeof value === \"string\" ? value : typeof value === \"number\" ? String(value) : \"\";\n}\n\ntype ActionChain = Parameters<NonNullable<Parameters<RendererComponent>[1][\"dispatch\"]>>[0];\n\nfunction eventChain(ctx: Parameters<RendererComponent>[1], name: string): ActionChain {\n return (ctx.element as { events?: Record<string, ActionChain> }).events?.[name] ?? [];\n}\n\n/** `{ _bindState: \"path\" }` declared on a prop, if any. */\nfunction bindStatePath(ctx: Parameters<RendererComponent>[1], prop: string): string | undefined {\n const value = (ctx.element as { props?: Record<string, unknown> }).props?.[prop];\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return undefined;\n const path = (value as Record<string, unknown>)[\"_bindState\"];\n return typeof path === \"string\" ? path : undefined;\n}\n\n// ── PanelHeader ─────────────────────────────────────────────────────────────\n\n/**\n * Section/panel title with optional eyebrow, description and an actions slot. */\nexport const PanelHeader: RendererComponent = (props, ctx) => {\n const eyebrow = str(props[\"eyebrow\"]);\n const description = str(props[\"description\"]);\n const actions = (ctx.slots[\"actions\"] ?? []) as ReactNode[];\n return (\n <header\n className=\"uibot-panel-header flex flex-wrap items-start justify-between gap-3\"\n data-uibot-type=\"PanelHeader\"\n >\n <div className=\"min-w-0 space-y-1\">\n {eyebrow && (\n <div className=\"text-xs font-medium uppercase tracking-wide text-muted-foreground\">\n {eyebrow}\n </div>\n )}\n <h2 className=\"text-lg font-semibold tracking-tight text-foreground\">\n {str(props[\"title\"])}\n </h2>\n {description && <p className=\"text-sm text-muted-foreground\">{description}</p>}\n </div>\n {actions.length > 0 && <div className=\"flex shrink-0 items-center gap-2\">{actions}</div>}\n </header>\n );\n};\n\n// ── EmptyState ────────────────────────────────────────────────────────────────\n\n/** Empty / recoverable status panel with an optional action button. */\nexport const EmptyState: RendererComponent = (props, ctx) => {\n const message = str(props[\"message\"]) || str(props[\"description\"]);\n const actionLabel = str(props[\"actionLabel\"]) || str(props[\"action\"]);\n const onClick = eventChain(ctx, \"onClick\");\n const onAction = eventChain(ctx, \"onAction\");\n const chain = onClick.length > 0 ? onClick : onAction;\n return (\n <div\n role=\"status\"\n className=\"uibot-empty-state flex flex-col items-center gap-2 rounded-lg border border-dashed border-border bg-background px-6 py-10 text-center\"\n data-uibot-type=\"EmptyState\"\n >\n <h3 className=\"text-sm font-semibold text-foreground\">{str(props[\"title\"])}</h3>\n {message && <p className=\"max-w-md text-sm text-muted-foreground\">{message}</p>}\n {actionLabel && (\n <button\n type=\"button\"\n className=\"mt-2 inline-flex h-8 items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50\"\n onClick={\n chain.length > 0\n ? () => void ctx.dispatch?.(chain, { event: { type: \"click\" } })\n : undefined\n }\n >\n {actionLabel}\n </button>\n )}\n </div>\n );\n};\n\n// ── FactList / FactRow ────────────────────────────────────────────────────────\n\ninterface FactData {\n label: string;\n value: string;\n code: boolean;\n href: string;\n}\n\nfunction readFact(record: Record<string, unknown>): FactData {\n const hrefSection = str(record[\"hrefSection\"]);\n return {\n label: str(record[\"label\"]),\n value: str(record[\"value\"]),\n code: record[\"code\"] === true,\n href: str(record[\"href\"]) || (hrefSection ? `#${hrefSection}` : \"\"),\n };\n}\n\nfunction renderFactRow(fact: FactData, onActivate?: () => void): ReactElement {\n const valueClass = cn(\"text-sm text-foreground break-words\", fact.code && \"font-mono text-xs\");\n const interactive = fact.href !== \"\" || onActivate !== undefined;\n const linkClass =\n \"rounded-sm text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50\";\n let value: ReactNode = fact.value;\n if (fact.href) {\n value = (\n <a href={fact.href} className={linkClass} onClick={onActivate}>\n {fact.value}\n </a>\n );\n } else if (onActivate) {\n value = (\n <button type=\"button\" className={linkClass} onClick={onActivate}>\n {fact.value}\n </button>\n );\n }\n return (\n <div\n className=\"uibot-fact-row grid grid-cols-[minmax(6rem,1fr)_2fr] items-baseline gap-3 border-b border-border py-2 last:border-b-0\"\n data-uibot-type=\"FactRow\"\n data-interactive={interactive ? \"true\" : undefined}\n >\n <dt className=\"text-sm text-muted-foreground\">{fact.label}</dt>\n <dd className={valueClass}>{value}</dd>\n </div>\n );\n}\n\n/** Single key/value fact row. Use inside FactList (renders `dt`/`dd`). */\nexport const FactRow: RendererComponent = (props, ctx) => {\n const onClick = eventChain(ctx, \"onClick\");\n return renderFactRow(\n readFact(props),\n onClick.length > 0\n ? () => void ctx.dispatch?.(onClick, { event: { type: \"click\" } })\n : undefined,\n );\n};\n\n/** Key/value fact list. Accepts `items` and/or FactRow children. */\nexport const FactList: RendererComponent = (props, ctx) => {\n const items = Array.isArray(props[\"items\"]) ? (props[\"items\"] as unknown[]) : [];\n const children = ctx.children as ReactNode[];\n return (\n <dl className=\"uibot-fact-list m-0 w-full\" data-uibot-type=\"FactList\">\n {items.map((item, index) => {\n const record = item && typeof item === \"object\" ? (item as Record<string, unknown>) : {};\n const fact = readFact(record);\n return (\n <Fragment key={`${fact.label}:${index}`}>{renderFactRow(fact)}</Fragment>\n );\n })}\n {children}\n </dl>\n );\n};\n\n// ── Alert ─────────────────────────────────────────────────────────────────────\n\nconst ALERT_VARIANTS: Record<string, { box: string; icon: string; label: string }> = {\n default: { box: \"border-border bg-background text-foreground\", icon: \"ℹ\", label: \"Info\" },\n destructive: {\n box: \"border-destructive/50 bg-destructive/5 text-destructive\",\n icon: \"✕\",\n label: \"Error\",\n },\n warning: {\n box: \"border-yellow-500/50 bg-yellow-500/10 text-yellow-900 dark:text-yellow-200\",\n icon: \"⚠\",\n label: \"Warning\",\n },\n success: {\n box: \"border-green-500/50 bg-green-500/10 text-green-900 dark:text-green-200\",\n icon: \"✓\",\n label: \"Success\",\n },\n};\n\n/** Inline alert. `destructive` uses role=alert, other variants role=status. */\nexport const Alert: RendererComponent = (props) => {\n const requested = str(props[\"variant\"]);\n const variant = ALERT_VARIANTS[requested] ? requested : \"default\";\n const v = ALERT_VARIANTS[variant]!;\n const title = str(props[\"title\"]);\n const description = str(props[\"description\"]) || str(props[\"message\"]);\n return (\n <div\n role={variant === \"destructive\" ? \"alert\" : \"status\"}\n className={cn(\"uibot-alert flex items-start gap-3 rounded-lg border p-4 text-sm\", v.box)}\n data-uibot-type=\"Alert\"\n data-variant={variant}\n >\n <span className=\"mt-0.5 shrink-0 leading-none\" aria-hidden=\"true\">\n {v.icon}\n </span>\n <div className=\"min-w-0 flex-1 space-y-1\">\n <span className=\"sr-only\">{v.label}: </span>\n {title && <p className=\"font-medium leading-none tracking-tight\">{title}</p>}\n {description && <p className=\"opacity-90\">{description}</p>}\n </div>\n </div>\n );\n};\n\n// ── Badge ─────────────────────────────────────────────────────────────────────\n\nconst BADGE_VARIANTS: Record<string, string> = {\n default: \"border-transparent bg-primary text-primary-foreground\",\n secondary: \"border-transparent bg-muted text-foreground\",\n outline: \"border-border text-foreground\",\n success: \"border-green-500/40 bg-green-500/10 text-green-800 dark:text-green-300\",\n warning: \"border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-300\",\n destructive: \"border-transparent bg-destructive text-white\",\n};\n\n/** Small status label. The text is the status; colour only reinforces it. */\nexport const Badge: RendererComponent = (props, ctx) => {\n const requested = str(props[\"variant\"]);\n const variant = BADGE_VARIANTS[requested] ? requested : \"default\";\n const children = ctx.children as ReactNode[];\n return (\n <span\n className={cn(\n \"uibot-badge inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap\",\n BADGE_VARIANTS[variant],\n )}\n data-uibot-type=\"Badge\"\n data-variant={variant}\n >\n {children.length > 0 ? children : str(props[\"label\"]) || str(props[\"text\"])}\n </span>\n );\n};\n\n// ── Switch ────────────────────────────────────────────────────────────────────\n\n/** Controlled boolean switch (`role=switch`). Supports `_bindState` on `checked`. */\nexport const Switch: RendererComponent = (props, ctx) => {\n const checked = props[\"checked\"] === true;\n const disabled = props[\"disabled\"] === true;\n const label = str(props[\"label\"]);\n const onChange = eventChain(ctx, \"onChange\");\n const path = bindStatePath(ctx, \"checked\");\n const toggle = () => {\n if (disabled) return;\n const next = !checked;\n const write = path ? [{ action: \"SetState\", params: { path, value: next } }] : [];\n const chain = [...write, ...onChange] as ActionChain;\n if (chain.length > 0) {\n void ctx.dispatch?.(chain, { event: { type: \"change\", checked: next } });\n }\n };\n return (\n <label\n className={cn(\n \"uibot-switch inline-flex items-center gap-2 text-sm\",\n disabled && \"opacity-50\",\n )}\n data-uibot-type=\"Switch\"\n >\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={checked}\n aria-label={\n label || (typeof props[\"ariaLabel\"] === \"string\" ? props[\"ariaLabel\"] : \"Switch\")\n }\n disabled={disabled}\n data-state={checked ? \"checked\" : \"unchecked\"}\n className={cn(\n \"relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed\",\n checked ? \"bg-primary\" : \"bg-input\",\n )}\n onClick={toggle}\n >\n <span\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none block size-4 rounded-full bg-background shadow transition-transform\",\n checked ? \"translate-x-4\" : \"translate-x-0.5\",\n )}\n />\n </button>\n {label && <span className=\"text-foreground\">{label}</span>}\n </label>\n );\n};\n",
|
|
16
|
+
"content": "import React from \"react\";\nimport type { ReactElement, ReactNode } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport type { RendererComponent } from \"@/lib/uibot-renderer\";\n\nfunction str(value: unknown): string {\n return typeof value === \"string\" ? value : typeof value === \"number\" ? String(value) : \"\";\n}\n\ntype ActionChain = Parameters<NonNullable<Parameters<RendererComponent>[1][\"dispatch\"]>>[0];\n\nfunction eventChain(ctx: Parameters<RendererComponent>[1], name: string): ActionChain {\n return (ctx.element as { events?: Record<string, ActionChain> }).events?.[name] ?? [];\n}\n\n/** `{ _bindState: \"path\" }` declared on a prop, if any. */\nfunction bindStatePath(ctx: Parameters<RendererComponent>[1], prop: string): string | undefined {\n const value = (ctx.element as { props?: Record<string, unknown> }).props?.[prop];\n if (!value || typeof value !== \"object\" || Array.isArray(value)) return undefined;\n const path = (value as Record<string, unknown>)[\"_bindState\"];\n return typeof path === \"string\" ? path : undefined;\n}\n\n// ── PanelHeader ─────────────────────────────────────────────────────────────\n\n/**\n * Section/panel title with optional eyebrow, description and an actions slot. */\nexport const PanelHeader: RendererComponent = (props, ctx) => {\n const eyebrow = str(props[\"eyebrow\"]);\n const description = str(props[\"description\"]);\n const actions = (ctx.slots[\"actions\"] ?? []) as ReactNode[];\n return (\n <header\n className=\"uibot-panel-header flex flex-wrap items-start justify-between gap-3\"\n data-uibot-type=\"PanelHeader\"\n >\n <div className=\"min-w-0 space-y-1\">\n {eyebrow && (\n <div className=\"text-xs font-medium uppercase tracking-wide text-muted-foreground\">\n {eyebrow}\n </div>\n )}\n <h2 className=\"text-lg font-semibold tracking-tight text-foreground\">\n {str(props[\"title\"])}\n </h2>\n {description && <p className=\"text-sm text-muted-foreground\">{description}</p>}\n </div>\n {actions.length > 0 && <div className=\"flex shrink-0 items-center gap-2\">{actions}</div>}\n </header>\n );\n};\n\n// ── EmptyState ────────────────────────────────────────────────────────────────\n\n/** Empty / recoverable status panel with an optional action button. */\nexport const EmptyState: RendererComponent = (props, ctx) => {\n const message = str(props[\"message\"]) || str(props[\"description\"]);\n const actionLabel = str(props[\"actionLabel\"]) || str(props[\"action\"]);\n const onClick = eventChain(ctx, \"onClick\");\n const onAction = eventChain(ctx, \"onAction\");\n const chain = onClick.length > 0 ? onClick : onAction;\n return (\n <div\n role=\"status\"\n className=\"uibot-empty-state flex flex-col items-center gap-2 rounded-lg border border-dashed border-border bg-background px-6 py-10 text-center\"\n data-uibot-type=\"EmptyState\"\n >\n <h3 className=\"text-sm font-semibold text-foreground\">{str(props[\"title\"])}</h3>\n {message && <p className=\"max-w-md text-sm text-muted-foreground\">{message}</p>}\n {actionLabel && (\n <button\n type=\"button\"\n className=\"mt-2 inline-flex h-8 items-center justify-center rounded-md border border-input bg-background px-3 text-sm font-medium shadow-sm transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50\"\n onClick={\n chain.length > 0\n ? () => void ctx.dispatch?.(chain, { event: { type: \"click\" } })\n : undefined\n }\n >\n {actionLabel}\n </button>\n )}\n </div>\n );\n};\n\n// ── FactList / FactRow ────────────────────────────────────────────────────────\n\ninterface FactData {\n label: string;\n value: string;\n code: boolean;\n href: string;\n}\n\nfunction readFact(record: Record<string, unknown>): FactData {\n const hrefSection = str(record[\"hrefSection\"]);\n return {\n label: str(record[\"label\"]),\n value: str(record[\"value\"]),\n code: record[\"code\"] === true,\n href: str(record[\"href\"]) || (hrefSection ? `#${hrefSection}` : \"\"),\n };\n}\n\nfunction renderFactRow(fact: FactData, onActivate?: () => void): ReactElement {\n const valueClass = cn(\"text-sm text-foreground break-words\", fact.code && \"font-mono text-xs\");\n const interactive = fact.href !== \"\" || onActivate !== undefined;\n const linkClass =\n \"rounded-sm text-primary underline-offset-4 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50\";\n let value: ReactNode = fact.value;\n if (fact.href) {\n value = (\n <a href={fact.href} className={linkClass} onClick={onActivate}>\n {fact.value}\n </a>\n );\n } else if (onActivate) {\n value = (\n <button type=\"button\" className={linkClass} onClick={onActivate}>\n {fact.value}\n </button>\n );\n }\n return (\n <div\n className=\"uibot-fact-row grid grid-cols-[minmax(6rem,1fr)_2fr] items-baseline gap-3 border-b border-border py-2 last:border-b-0\"\n data-uibot-type=\"FactRow\"\n data-interactive={interactive ? \"true\" : undefined}\n >\n <dt className=\"text-sm text-muted-foreground\">{fact.label}</dt>\n <dd className={valueClass}>{value}</dd>\n </div>\n );\n}\n\n/** Single key/value fact row. Use inside FactList (renders `dt`/`dd`). */\nexport const FactRow: RendererComponent = (props, ctx) => {\n const onClick = eventChain(ctx, \"onClick\");\n return renderFactRow(\n readFact(props),\n onClick.length > 0\n ? () => void ctx.dispatch?.(onClick, { event: { type: \"click\" } })\n : undefined,\n );\n};\n\n/** Key/value fact list. Accepts `items` and/or FactRow children. */\nexport const FactList: RendererComponent = (props, ctx) => {\n const items = Array.isArray(props[\"items\"]) ? (props[\"items\"] as unknown[]) : [];\n const children = ctx.children as ReactNode[];\n return (\n <dl className=\"uibot-fact-list m-0 w-full\" data-uibot-type=\"FactList\">\n {items.map((item, index) => {\n const record = item && typeof item === \"object\" ? (item as Record<string, unknown>) : {};\n const fact = readFact(record);\n return (\n <React.Fragment key={`${fact.label}:${index}`}>{renderFactRow(fact)}</React.Fragment>\n );\n })}\n {children}\n </dl>\n );\n};\n\n// ── Alert ─────────────────────────────────────────────────────────────────────\n\nconst ALERT_VARIANTS: Record<string, { box: string; icon: string; label: string }> = {\n default: { box: \"border-border bg-background text-foreground\", icon: \"ℹ\", label: \"Info\" },\n destructive: {\n box: \"border-destructive/50 bg-destructive/5 text-destructive\",\n icon: \"✕\",\n label: \"Error\",\n },\n warning: {\n box: \"border-yellow-500/50 bg-yellow-500/10 text-yellow-900 dark:text-yellow-200\",\n icon: \"⚠\",\n label: \"Warning\",\n },\n success: {\n box: \"border-green-500/50 bg-green-500/10 text-green-900 dark:text-green-200\",\n icon: \"✓\",\n label: \"Success\",\n },\n};\n\n/** Inline alert. `destructive` uses role=alert, other variants role=status. */\nexport const Alert: RendererComponent = (props) => {\n const requested = str(props[\"variant\"]);\n const variant = ALERT_VARIANTS[requested] ? requested : \"default\";\n const v = ALERT_VARIANTS[variant]!;\n const title = str(props[\"title\"]);\n const description = str(props[\"description\"]) || str(props[\"message\"]);\n return (\n <div\n role={variant === \"destructive\" ? \"alert\" : \"status\"}\n className={cn(\"uibot-alert flex items-start gap-3 rounded-lg border p-4 text-sm\", v.box)}\n data-uibot-type=\"Alert\"\n data-variant={variant}\n >\n <span className=\"mt-0.5 shrink-0 leading-none\" aria-hidden=\"true\">\n {v.icon}\n </span>\n <div className=\"min-w-0 flex-1 space-y-1\">\n <span className=\"sr-only\">{v.label}: </span>\n {title && <p className=\"font-medium leading-none tracking-tight\">{title}</p>}\n {description && <p className=\"opacity-90\">{description}</p>}\n </div>\n </div>\n );\n};\n\n// ── Badge ─────────────────────────────────────────────────────────────────────\n\nconst BADGE_VARIANTS: Record<string, string> = {\n default: \"border-transparent bg-primary text-primary-foreground\",\n secondary: \"border-transparent bg-muted text-foreground\",\n outline: \"border-border text-foreground\",\n success: \"border-green-500/40 bg-green-500/10 text-green-800 dark:text-green-300\",\n warning: \"border-yellow-500/40 bg-yellow-500/10 text-yellow-900 dark:text-yellow-300\",\n destructive: \"border-transparent bg-destructive text-white\",\n};\n\n/** Small status label. The text is the status; colour only reinforces it. */\nexport const Badge: RendererComponent = (props, ctx) => {\n const requested = str(props[\"variant\"]);\n const variant = BADGE_VARIANTS[requested] ? requested : \"default\";\n const children = ctx.children as ReactNode[];\n return (\n <span\n className={cn(\n \"uibot-badge inline-flex items-center rounded-md border px-2 py-0.5 text-xs font-medium whitespace-nowrap\",\n BADGE_VARIANTS[variant],\n )}\n data-uibot-type=\"Badge\"\n data-variant={variant}\n >\n {children.length > 0 ? children : str(props[\"label\"]) || str(props[\"text\"])}\n </span>\n );\n};\n\n// ── Switch ────────────────────────────────────────────────────────────────────\n\n/** Controlled boolean switch (`role=switch`). Supports `_bindState` on `checked`. */\nexport const Switch: RendererComponent = (props, ctx) => {\n const checked = props[\"checked\"] === true;\n const disabled = props[\"disabled\"] === true;\n const label = str(props[\"label\"]);\n const onChange = eventChain(ctx, \"onChange\");\n const path = bindStatePath(ctx, \"checked\");\n const toggle = () => {\n if (disabled) return;\n const next = !checked;\n const write = path ? [{ action: \"SetState\", params: { path, value: next } }] : [];\n const chain = [...write, ...onChange] as ActionChain;\n if (chain.length > 0) {\n void ctx.dispatch?.(chain, { event: { type: \"change\", checked: next } });\n }\n };\n return (\n <label\n className={cn(\n \"uibot-switch inline-flex items-center gap-2 text-sm\",\n disabled && \"opacity-50\",\n )}\n data-uibot-type=\"Switch\"\n >\n <button\n type=\"button\"\n role=\"switch\"\n aria-checked={checked}\n aria-label={\n label || (typeof props[\"ariaLabel\"] === \"string\" ? props[\"ariaLabel\"] : \"Switch\")\n }\n disabled={disabled}\n data-state={checked ? \"checked\" : \"unchecked\"}\n className={cn(\n \"relative inline-flex h-5 w-9 shrink-0 items-center rounded-full border border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 disabled:cursor-not-allowed\",\n checked ? \"bg-primary\" : \"bg-input\",\n )}\n onClick={toggle}\n >\n <span\n aria-hidden=\"true\"\n className={cn(\n \"pointer-events-none block size-4 rounded-full bg-background shadow transition-transform\",\n checked ? \"translate-x-4\" : \"translate-x-0.5\",\n )}\n />\n </button>\n {label && <span className=\"text-foreground\">{label}</span>}\n </label>\n );\n};\n",
|
|
17
17
|
"type": "registry:ui"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "registry:ui",
|
|
5
5
|
"description": "Slim full-width announcement bar: optional icon + message, an inline CTA link and a decorative dismiss '×'. `tone` picks one of the four brand accents; `solid` fills the strip with the accent instead of a soft tint.",
|
|
6
6
|
"dependencies": [
|
|
7
|
-
"react"
|
|
7
|
+
"react@19.3.0"
|
|
8
8
|
],
|
|
9
9
|
"registryDependencies": [
|
|
10
10
|
"@uibot/uibot-base"
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
{
|
|
12
12
|
"path": "lib/uibot/templates/shadcn-admin-shell.uibot.yaml",
|
|
13
13
|
"target": "lib/uibot/templates/shadcn-admin-shell.uibot.yaml",
|
|
14
|
-
"content": "
|
|
14
|
+
"content": "# Generated by scripts/build-public-resources.ts. Edit packages/blocks-shadcn/src/solutions instead.\nversion: \"2.0\"\npages:\n - id: shadcn-admin-shell\n state:\n currentPath: /\n direction: ltr\n font: Inter\n theme: light\n path: /\n blocks:\n - type: PageLayout\n props:\n appearance: admin\n routes:\n - label: Dashboard\n href: /\n icon: layout-dashboard\n - label: Tasks\n href: /tasks\n icon: list-todo\n - label: Apps\n href: /apps\n icon: boxes\n - label: Chats\n href: /chats\n icon: message-circle\n badge: \"3\"\n - label: Users\n href: /users\n icon: users\n - label: Auth\n href: /sign-in\n icon: shield\n - label: Errors\n href: /errors/500\n icon: circle-help\n - label: Settings\n href: /settings/profile\n icon: settings\n - label: Help Center\n href: /help-center\n icon: circle-help\n - label: Account\n href: /settings/account\n - label: Appearance\n href: /settings/appearance\n - label: Notifications\n href: /settings/notifications\n - label: Display\n href: /settings/display\n headerLinks:\n - label: Overview\n href: /\n - label: Customers\n href: /users\n - label: Products\n href: /apps\n - label: Settings\n href: /settings/profile\n font:\n _state: font\n theme:\n _state: theme\n direction:\n _state: direction\n slots:\n sidebar:\n - type: AppNavigation\n props:\n brand: UiBot Admin\n subtitle: Vite + ShadcnUI\n groups:\n - label: General\n items:\n - label: Dashboard\n href: /\n icon: layout-dashboard\n - label: Tasks\n href: /tasks\n icon: list-todo\n - label: Apps\n href: /apps\n icon: boxes\n - label: Chats\n href: /chats\n icon: message-circle\n badge: \"3\"\n - label: Users\n href: /users\n icon: users\n - label: Pages\n items:\n - label: Auth\n href: /sign-in\n icon: shield\n children:\n - label: Sign in\n href: /sign-in\n - label: Sign in (split)\n href: /sign-in-2\n - label: Sign up\n href: /sign-up\n - label: Forgot password\n href: /forgot-password\n - label: OTP\n href: /otp\n - label: Errors\n href: /errors/500\n icon: circle-help\n children:\n - label: \"401\"\n href: /errors/401\n - label: \"403\"\n href: /errors/403\n - label: \"404\"\n href: /errors/404\n - label: \"500\"\n href: /errors/500\n - label: \"503\"\n href: /errors/503\n - label: Other\n items:\n - label: Settings\n href: /settings/profile\n icon: settings\n children:\n - label: Profile\n href: /settings/profile\n - label: Account\n href: /settings/account\n - label: Appearance\n href: /settings/appearance\n - label: Notifications\n href: /settings/notifications\n - label: Display\n href: /settings/display\n - label: Help Center\n href: /help-center\n icon: circle-help\n activePath:\n _state: currentPath\n userName: satnaing\n email: satnaingdev@gmail.com\n initials: SN\n workspaces:\n - label: Personal workspace\n href: /\n - label: Team workspace\n href: /users\n events:\n onThemeChange:\n - action: SetState\n params:\n path: theme\n value:\n _event: value\n",
|
|
15
15
|
"type": "registry:lib"
|
|
16
16
|
},
|
|
17
17
|
{
|