{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "side-tabs",
  "title": "Side tabs",
  "description": "Icon keys stacked down the edge, with a panel beside them.",
  "dependencies": [
    "@ui-sdk/react@0.1.0-beta.5"
  ],
  "registryDependencies": [
    "https://www.cyberspec.dev/r/cyber.json"
  ],
  "files": [
    {
      "path": "registry/cyber/ui/side-tabs.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Tabs as SdkTabs, TabsIndicator, TabsList, TabsPanel, TabsTab, TabsTabIcon } from \"@ui-sdk/react/tabs\"\nimport \"@/registry/cyber/ui/cyber/side-tabs.css\"\n\ntype SideTabSpec = {\n  value: string\n  /** The key's name: its aria-label always, and printed beside its icon when there's room. */\n  label: string\n  icon: React.ReactNode\n  disabled?: boolean\n  content: React.ReactNode\n}\n\nconst two = (n: number) => String(n).padStart(2, \"0\")\n\n// The sections of a database, as icon keys stacked down the leading edge\n// with the open section's record beside them. Up and Down move between keys.\n//\n// A key is named by its `label` whether or not the label shows: in a narrow\n// column the keys are icons only, and from about 420px wide each prints its\n// name too. The record repeats the name as its heading either way, so the\n// open section is never told by an icon alone.\nfunction SideTabs({\n  label,\n  tabs,\n  code = \"ARCHIVE\",\n  ...props\n}: Omit<React.ComponentProps<typeof SdkTabs>, \"children\" | \"orientation\"> & {\n  label: string\n  tabs: SideTabSpec[]\n  /** The word that leads the line of micro-print over each record. */\n  code?: string\n}) {\n  return (\n    <SdkTabs data-kit=\"side-tabs\" orientation=\"vertical\" {...props}>\n      <TabsList data-kit=\"side-tabs-list\" aria-label={label}>\n        {tabs.map((tab) => (\n          <TabsTab\n            key={tab.value}\n            value={tab.value}\n            disabled={tab.disabled}\n            aria-label={tab.label}\n            data-kit=\"side-tabs-tab\"\n            data-frame=\"tl br\"\n            data-press-flash=\"\"\n          >\n            <TabsTabIcon data-kit=\"side-tabs-icon\">{tab.icon}</TabsTabIcon>\n            <span data-kit=\"side-tabs-name\">{tab.label}</span>\n          </TabsTab>\n        ))}\n        <TabsIndicator data-kit=\"side-tabs-indicator\" />\n      </TabsList>\n      <div data-kit=\"side-tabs-body\" data-frame=\"br\">\n        {tabs.map((tab, index) => (\n          <TabsPanel key={tab.value} value={tab.value} data-kit=\"side-tabs-panel\">\n            <span data-micro aria-hidden>\n              {code} // REC {two(index + 1)}/{two(tabs.length)}\n            </span>\n            {/* The panel is already named by its tab, so this copy of the\n                name is for the eye only. */}\n            <div data-kit=\"side-tabs-title\" aria-hidden>\n              {tab.label}\n            </div>\n            <div data-kit=\"side-tabs-content\">{tab.content}</div>\n          </TabsPanel>\n        ))}\n      </div>\n    </SdkTabs>\n  )\n}\n\nexport { SideTabs }\nexport type { SideTabSpec }\n",
      "type": "registry:ui",
      "target": "@ui/side-tabs.tsx"
    },
    {
      "path": "registry/cyber/ui/cyber/side-tabs.css",
      "content": "@layer ui-sdk, cyber.tokens, cyber.base, cyber.ui, cyber.blocks, cyber.fx, cyber.a11y;\n\n@layer cyber.ui {\n  /* Keys down the leading edge, the record beside them. The record is at\n     least as tall as the stack of keys, so short sections don't make the\n     frame jump. */\n  [data-skin=\"cyber\"] [data-kit=\"side-tabs\"] {\n    container: side-tabs / inline-size;\n    display: grid;\n    grid-template-columns: auto minmax(0, 1fr);\n    align-items: stretch;\n    width: 100%;\n    min-width: 0;\n    text-align: start;\n  }\n\n  /* The stack. The gap on its trailing side is the track the marker runs\n     in, between the keys and the record. */\n  [data-skin=\"cyber\"] [data-kit=\"side-tabs-list\"] {\n    position: relative;\n    display: flex;\n    flex-direction: column;\n    gap: 4px;\n    padding-inline-end: 9px;\n  }\n\n  /* A key, in the kit's state language: idle an outline, hover the line at\n     full and a 10% fill, open the 40% fill. */\n  [data-skin=\"cyber\"] [data-kit=\"side-tabs-tab\"] {\n    --frame-cut: var(--cy-cut-sm);\n    --frame-line: var(--cy-line-ctl);\n    --frame-fill: var(--cy-panel-a);\n\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    gap: 8px;\n    width: var(--cy-h);\n    height: var(--cy-h);\n    padding: 0;\n    font-size: var(--cy-text-sm);\n    font-weight: 600;\n    line-height: 1;\n    letter-spacing: var(--cy-track);\n    text-transform: uppercase;\n    white-space: nowrap;\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], [data-selected]) {\n        --frame-line: var(--cy-line-hot);\n        --frame-fill: var(--cy-fill-hover);\n      }\n    }\n\n    &[data-selected] {\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  [data-skin=\"cyber\"] [data-kit=\"side-tabs-icon\"] {\n    display: grid;\n    place-items: center;\n\n    & svg {\n      width: 16px;\n      height: 16px;\n    }\n\n    &[data-mirror]:dir(rtl) {\n      scale: -1 1;\n    }\n  }\n\n  /* The key's name. In a narrow column the key is its icon and the name\n     lives in aria-label and the record's heading. */\n  [data-skin=\"cyber\"] [data-kit=\"side-tabs-name\"] {\n    display: none;\n  }\n\n  /* With room, each key prints its name. */\n  @container side-tabs (min-width: 420px) {\n    [data-skin=\"cyber\"] [data-kit=\"side-tabs-tab\"] {\n      justify-content: flex-start;\n      width: auto;\n      min-width: 132px;\n      padding-inline: 10px 16px;\n    }\n\n    [data-skin=\"cyber\"] [data-kit=\"side-tabs-name\"] {\n      display: inline;\n    }\n  }\n\n  /* The marker beside the open key: a signal bar in the track, which steps\n     to its key the way a display redraws, not a slide. */\n  [data-skin=\"cyber\"] [data-kit=\"side-tabs-indicator\"] {\n    position: absolute;\n    inset-block-start: 0;\n    inset-inline-end: 3px;\n    width: 0;\n    height: var(--active-tab-height);\n    border-inline-start: 3px solid var(--cy-signal);\n    translate: 0 var(--active-tab-top);\n    filter: drop-shadow(0 0 calc(4px * var(--cy-fx)) var(--cy-signal));\n    pointer-events: none;\n    transition: translate var(--cy-t) var(--cy-ease-step);\n\n    /* Its first placement isn't a move. */\n    &[data-activation-direction=\"none\"] {\n      transition: none;\n    }\n  }\n\n  /* The record's frame holds still; what's in it changes. */\n  [data-skin=\"cyber\"] [data-kit=\"side-tabs-body\"] {\n    --frame-cut: var(--cy-cut);\n    --frame-line: var(--cy-line-deco);\n    --frame-fill: var(--cy-panel-a);\n\n    min-width: 0;\n    padding: 10px 14px 14px;\n  }\n\n  [data-skin=\"cyber\"] [data-kit=\"side-tabs-panel\"] {\n    display: grid;\n    gap: 4px;\n    align-content: start;\n    min-width: 0;\n\n    /* A record that was chosen tears in. The one open on arrival is simply\n       there. */\n    &[data-selected]:not([data-activation-direction=\"none\"]) {\n      animation: var(--cy-fx-in) 240ms var(--cy-ease-snap) backwards;\n    }\n  }\n\n  [data-skin=\"cyber\"] [data-kit=\"side-tabs-title\"] {\n    padding-block-end: 6px;\n    border-block-end: 1px solid var(--cy-line-deco);\n    font-size: var(--cy-text-lg);\n    font-weight: 600;\n    line-height: 1.2;\n    letter-spacing: var(--cy-track);\n    text-transform: uppercase;\n    color: var(--cy-ink);\n  }\n\n  [data-skin=\"cyber\"] [data-kit=\"side-tabs-content\"] {\n    display: grid;\n    gap: 8px;\n    padding-block-start: 6px;\n    color: var(--cy-ink-hi);\n    text-wrap: pretty;\n  }\n}\n",
      "type": "registry:file",
      "target": "@ui/cyber/side-tabs.css"
    }
  ],
  "type": "registry:ui"
}
