{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "collapsible",
  "title": "Collapsible",
  "description": "One section behind a key that shows and hides it.",
  "dependencies": [
    "@ui-sdk/react@0.1.0-beta.5",
    "lucide-react@1.73.0"
  ],
  "registryDependencies": [
    "https://www.cyberspec.dev/r/cyber.json"
  ],
  "files": [
    {
      "path": "registry/cyber/ui/collapsible.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Collapsible as SdkCollapsible, CollapsiblePanel, CollapsibleTrigger } from \"@ui-sdk/react/collapsible\"\nimport { ChevronRight } from \"lucide-react\"\nimport \"@/registry/cyber/ui/cyber/collapsible.css\"\n\n// One section behind a key. The key runs the full width, with a chevron\n// that steps round to point down while the section is open, and stays lit\n// until it's closed again.\n//\n// - `label` is the key's text.\n// - `summary` is a short readout at the end of the key that's there whether\n//   it's open or not, like \"3 entries\". It's read as part of the key's name.\n// - Everything else goes to the SDK's Collapsible: `open`, `defaultOpen`,\n//   `onOpenChange`, `disabled`, `controller`. `keepMounted` and\n//   `hiddenUntilFound` go to its panel.\nfunction Collapsible({\n  label,\n  summary,\n  keepMounted,\n  hiddenUntilFound,\n  children,\n  ...props\n}: Omit<React.ComponentProps<typeof SdkCollapsible>, \"children\"> & {\n  label: string\n  summary?: string\n  keepMounted?: boolean\n  hiddenUntilFound?: boolean\n  children: React.ReactNode\n}) {\n  return (\n    <SdkCollapsible data-kit=\"collapsible\" {...props}>\n      <CollapsibleTrigger data-kit=\"collapsible-trigger\" data-frame=\"notch br\" data-press-flash=\"\">\n        <span data-kit=\"collapsible-glyph\" aria-hidden>\n          <ChevronRight />\n        </span>\n        <span data-kit=\"collapsible-text\">\n          <span data-kit=\"collapsible-label\">{label}</span>\n          {summary && <span data-kit=\"collapsible-summary\">{summary}</span>}\n        </span>\n      </CollapsibleTrigger>\n      <CollapsiblePanel data-kit=\"collapsible-panel\" keepMounted={keepMounted} hiddenUntilFound={hiddenUntilFound}>\n        <div data-kit=\"collapsible-content\">{children}</div>\n      </CollapsiblePanel>\n    </SdkCollapsible>\n  )\n}\n\nexport { Collapsible }\n",
      "type": "registry:ui",
      "target": "@ui/collapsible.tsx"
    },
    {
      "path": "registry/cyber/ui/cyber/collapsible.css",
      "content": "@layer ui-sdk, cyber.tokens, cyber.base, cyber.ui, cyber.blocks, cyber.fx, cyber.a11y;\n\n@layer cyber.ui {\n  [data-skin=\"cyber\"] [data-kit=\"collapsible\"] {\n    display: grid;\n    width: 100%;\n    min-width: 0;\n    text-align: start;\n  }\n\n  /* The key, in the kit's state language:\n       idle     line 70%, panel fill\n       hover    line 100%, fill 10%\n       open     line 100%, fill 40%, bright ink, chevron down\n       down     flashes to 70% (data-press-flash)\n       disabled hatched, muted */\n  [data-skin=\"cyber\"] [data-kit=\"collapsible-trigger\"] {\n    --frame-cut: var(--cy-cut-sm);\n    --frame-line: var(--cy-line-ctl);\n    --frame-fill: var(--cy-panel-a);\n    /* Frame variables inherit, and a surface behind may have set one. */\n    --frame-image: none;\n    --frame-notch-x: 30px;\n    --frame-notch: 4px;\n\n    display: flex;\n    align-items: center;\n    gap: 8px;\n    width: 100%;\n    min-width: 0;\n    min-height: var(--cy-h);\n    padding-inline: 10px 12px;\n    font-size: var(--cy-text-md);\n    font-weight: 600;\n    line-height: 1.2;\n    letter-spacing: var(--cy-track);\n    text-transform: uppercase;\n    text-align: start;\n    color: var(--cy-ink);\n    cursor: pointer;\n    user-select: none;\n    transition:\n      background-color var(--cy-t-fast) linear,\n      border-color var(--cy-t-fast) linear,\n      color var(--cy-t-fast) linear;\n\n    @media (hover: hover) {\n      &:hover:not([data-disabled]) {\n        --frame-line: var(--cy-line-hot);\n        --frame-fill: var(--cy-fill-hover);\n      }\n    }\n\n    &:is([data-open], :active):not([data-disabled]) {\n      --frame-line: var(--cy-line-hot);\n      --frame-fill: var(--cy-fill-active);\n      color: var(--cy-ink-hi);\n    }\n\n    &[data-disabled] {\n      --frame-line: var(--cy-line-deco);\n      --frame-image: repeating-linear-gradient(135deg, transparent 0 5px, var(--cy-line-deco) 5px 6px);\n      color: var(--cy-ink-mute);\n      cursor: not-allowed;\n    }\n  }\n\n  /* The chevron points along the line while closed and down while open. It\n     turns in steps, like a display redrawing it. */\n  [data-skin=\"cyber\"] [data-kit=\"collapsible-glyph\"] {\n    flex: none;\n    display: grid;\n    place-items: center;\n    width: 16px;\n    height: 16px;\n    transition: rotate var(--cy-t) var(--cy-ease-step);\n\n    & svg {\n      width: 16px;\n      height: 16px;\n    }\n\n    &:dir(rtl) {\n      rotate: 180deg;\n    }\n\n    [data-open] > & {\n      rotate: 90deg;\n    }\n  }\n\n  /* The label and its readout share a line while there's room, and the\n     readout drops under the label when there isn't. */\n  [data-skin=\"cyber\"] [data-kit=\"collapsible-text\"] {\n    flex: 1 1 auto;\n    display: flex;\n    flex-wrap: wrap;\n    align-items: baseline;\n    justify-content: space-between;\n    gap: 2px 10px;\n    min-width: 0;\n    padding-block: 6px;\n  }\n\n  [data-skin=\"cyber\"] [data-kit=\"collapsible-label\"] {\n    min-width: 0;\n    overflow-wrap: break-word;\n  }\n\n  [data-skin=\"cyber\"] [data-kit=\"collapsible-summary\"] {\n    flex: none;\n    font-family: var(--cy-mono);\n    font-size: var(--cy-text-xs);\n    font-weight: 500;\n    letter-spacing: 0.04em;\n    color: var(--cy-signal);\n\n    [data-disabled] & {\n      color: var(--cy-ink-mute);\n    }\n  }\n\n  /* The section. Its height runs between zero and the content's measured\n     height, which the SDK writes to --collapsible-panel-height. */\n  [data-skin=\"cyber\"] [data-kit=\"collapsible-panel\"] {\n    height: var(--collapsible-panel-height);\n    overflow: hidden;\n    transition: height var(--cy-t-slow) var(--cy-ease-snap);\n\n    &:is([data-starting-style], [data-ending-style]) {\n      height: 0;\n    }\n    &[data-ending-style] {\n      transition-duration: var(--cy-t);\n    }\n  }\n\n  /* What was behind the key: set in from it, on a thick rule that ends in\n     a foot. */\n  [data-skin=\"cyber\"] [data-kit=\"collapsible-content\"] {\n    position: relative;\n    display: grid;\n    gap: 8px;\n    margin: 6px 0 2px 4px;\n    padding: 6px 10px 8px 14px;\n    border-inline-start: 2px solid var(--cy-line-hot);\n    font-size: var(--cy-text-sm);\n    line-height: 1.45;\n    color: var(--cy-ink-hi);\n    text-wrap: pretty;\n    transition: opacity var(--cy-t) linear;\n\n    &::after {\n      content: \"\";\n      position: absolute;\n      inset-block-end: 0;\n      inset-inline-start: 0;\n      width: 8px;\n      height: 2px;\n      background: var(--cy-line-hot);\n    }\n\n    :is([data-starting-style], [data-ending-style]) > & {\n      opacity: 0;\n    }\n  }\n}\n",
      "type": "registry:file",
      "target": "@ui/cyber/collapsible.css"
    }
  ],
  "type": "registry:ui"
}
