{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "notice-solid",
  "title": "Notice (Solid)",
  "description": "A calm callout for info, success, a warning or an error, with optional actions and Dismiss.",
  "dependencies": [
    "@kind-ui/agent-ui@0.9.0",
    "@ui-sdk/core@0.1.0-beta.17",
    "@ui-sdk/solid@0.1.0-beta.17"
  ],
  "registryDependencies": [
    "@kind-ui/agent-ui-setup"
  ],
  "files": [
    {
      "path": "packages/agent-ui/src/solid/notice.tsx",
      "content": "import { noticePrimitive } from \"@kind-ui/agent-ui/core\";\nimport type { ComponentProps, JSX } from \"@solidjs/web\";\nimport { createParts } from \"@ui-sdk/solid/primitive\";\nimport { omit } from \"solid-js\";\n\nconst parts = createParts(noticePrimitive, {\n  root: \"div\",\n  icon: \"span\",\n  title: \"p\",\n  description: \"div\",\n  reset: \"p\",\n  actions: \"div\",\n  dismiss: \"button\",\n});\n\nexport type NoticeProps = Omit<ComponentProps<typeof parts.Root>, \"children\"> & {\n  /** The notice's text. */\n  children?: JSX.Element;\n  /** Buttons that act on the notice, like \"Retry\". */\n  actions?: JSX.Element;\n};\n\n/**\n * A calm callout: its mark, its `label` as the title, the reset line with `resetsAt`, `children` as its text, then\n * `actions` and Dismiss while `onDismiss` is set and it's `dismissible`. To arrange the parts yourself, use\n * `NoticeRoot`.\n */\nexport function Notice(props: NoticeProps) {\n  const rest = omit(props, \"children\", \"actions\");\n  return (\n    <parts.Root {...rest}>\n      <NoticeIcon />\n      <NoticeTitle />\n      <NoticeReset />\n      <NoticeDescription>{props.children}</NoticeDescription>\n      <NoticeActions>{props.actions}</NoticeActions>\n      <NoticeDismiss />\n    </parts.Root>\n  );\n}\n\n/** The bare root, for arranging the parts yourself. */\nexport const NoticeRoot = parts.Root;\nexport const NoticeIcon = parts.Icon;\nexport const NoticeDescription = parts.Description;\nexport const NoticeActions = parts.Actions;\nexport const NoticeDismiss = parts.Dismiss;\n\nexport type NoticeTitleProps = ComponentProps<typeof parts.Title>;\n\n/** The `label`, unless you pass children. Rendered only with a `label`. */\nexport function NoticeTitle(props: NoticeTitleProps) {\n  return <parts.Title {...props}>{props.children ?? ((state) => state.label)}</parts.Title>;\n}\n\nexport type NoticeResetProps = ComponentProps<typeof parts.Reset>;\n\n/** When the limit resets, like \"Resets Tuesday at 9:00 AM.\", unless you pass children. Rendered only with `resetsAt`. */\nexport function NoticeReset(props: NoticeResetProps) {\n  return <parts.Reset {...props}>{props.children ?? ((state) => state.text)}</parts.Reset>;\n}\n",
      "type": "registry:ui",
      "target": "@ui/solid/notice.tsx"
    }
  ],
  "meta": {
    "layer": "solid"
  },
  "type": "registry:ui"
}
