{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "card-colorpicker-portal-colors-1",
  "type": "registry:block",
  "title": "Portal colors",
  "description": "Forms & settings card from the overtrue/ui workspace examples. Editable source, scoped styles, and demo interactions.",
  "categories": [
    "cards",
    "forms-settings"
  ],
  "registryDependencies": [
    "https://ui.overtrue.xyz/r/overtrue-card-foundation.json"
  ],
  "files": [
    {
      "path": "src/blocks/registry/colorpicker-portal-colors-1.tsx",
      "type": "registry:component",
      "target": "components/overtrue/blocks/colorpicker-portal-colors-1.tsx",
      "content": "\"use client\";\nimport { BlockFrame } from \"./runtime/blocks/frame\";\nimport \"./runtime/cards.css\";\n// Extracted from src/pages/workspace/colorpicker.tsx:28.\nimport { useState } from \"react\";\nimport { WorkspaceColorpicker } from \"./runtime/components/overtrue/workspace/plugins\";\nimport { SettingsSection } from \"./runtime/registry/overtrue/settings-section\";\nimport { SceneCard, Action } from \"./runtime/components/overtrue/scenes/shared\";\nconst defaults = {\n  primary: \"#4263eb\",\n  secondary: \"#14836b\",\n  surface: \"#f5f7fb\",\n};\nfunction CardExample() {\n  const [colors, setColors] = useState(defaults);\n  const [saved, setSaved] = useState(defaults);\n  const [notice, setNotice] = useState(\"\");\n\n  return (\n    <>\n      <div className=\"overtrue-block-content\" data-workspace-page=\"colorpicker\">\n        <SceneCard title=\"Portal colors\">\n          <form\n            className=\"scene-form\"\n            onSubmit={(e) => {\n              e.preventDefault();\n              setSaved(colors);\n              setNotice(\"Palette saved in this preview.\");\n            }}\n          >\n            {(\n              [\n                {\n                  key: \"primary\",\n                  title: \"Primary accent\",\n                  description: \"Project markers and key actions.\",\n                },\n                {\n                  key: \"secondary\",\n                  title: \"Secondary accent\",\n                  description: \"Supporting labels and categories.\",\n                },\n                {\n                  key: \"surface\",\n                  title: \"Preview surface\",\n                  description: \"The background behind artwork previews.\",\n                },\n              ] as const\n            ).map(({ key, title, description }, i) => (\n              <SettingsSection\n                key={key}\n                title={title}\n                description={description}\n              >\n                <label className=\"scene-field\">\n                  Color value\n                  <WorkspaceColorpicker\n                    id={`brand-color-${i}`}\n                    aria-label={title}\n                    value={colors[key]}\n                    onInput={(e) => {\n                      const value = e.currentTarget.value;\n                      if (CSS.supports(\"color\", value)) {\n                        setColors((items) => ({ ...items, [key]: value }));\n                        setNotice(\"\");\n                      }\n                    }}\n                    onChange={() => {}}\n                  />\n                </label>\n              </SettingsSection>\n            ))}\n            <div className=\"scene-actions\">\n              <Action type=\"submit\" primary>\n                Save palette\n              </Action>\n              <Action\n                onClick={() => {\n                  setColors(saved);\n                  setNotice(\"\");\n                }}\n              >\n                Discard\n              </Action>\n            </div>\n            <p role=\"status\">{notice}</p>\n          </form>\n        </SceneCard>\n      </div>\n    </>\n  );\n}\n\nexport default function Block() { return <BlockFrame><CardExample /></BlockFrame>; }\n"
    }
  ],
  "docs": "Documentation: https://ui.overtrue.xyz/blocks/colorpicker-portal-colors-1. Includes the shared card foundation and hosted demo imagery. Replace sample data and navigation with your application data."
}
