{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button-set",
  "type": "registry:ui",
  "title": "<ui-button-set>",
  "description": "Carbon `ButtonSet`: buttons side by side (or `stacked`), each up to 196px wide, with a 1px button-separator line between neighbours — the footer of a form, side panel or tearsheet. Put `<ui-button>`s inside, the secondary one first. Copied from @purpurabog/ui 2.3.0; the package is the maintained source, this copy is yours to change. Icons from the Carbon Design System (Apache-2.0, © IBM Corp.; see THIRD-PARTY-NOTICES.md in the package).",
  "dependencies": [
    "lit@^3.3.0"
  ],
  "registryDependencies": [
    "@kanok-ui/shared-element",
    "@kanok-ui/tokens"
  ],
  "files": [
    {
      "path": "src/primitives/button-set/button-set.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/button-set/button-set.ts",
      "content": "import { html, css } from 'lit';\nimport { customElement, property } from 'lit/decorators.js';\nimport { UiElement } from '../shared/element.ts';\n\n/**\n * Carbon `ButtonSet`: buttons side by side (or `stacked`), each up to 196px wide, with a 1px\n * button-separator line between neighbours — the footer of a form, side panel or tearsheet.\n * Put `<ui-button>`s inside, the secondary one first.\n *\n * @slot - The buttons\n * @csspart button-set - The slot that holds the buttons (Carbon's part); the row itself is the element, so style its layout on `ui-button-set`\n * @cssprop --ui-button-set-gap - Gap between the buttons (default none: they touch; Kanok: 8px)\n * @cssprop --ui-button-set-item-size - `inline-size` of each button (default 100%, up to 196px; Kanok: auto)\n * @cssprop --ui-button-set-separator - Colour of the 1px line between buttons (default `--ui-button-separator`; Kanok: none)\n */\n@customElement('ui-button-set')\nexport class UiButtonSet extends UiElement {\n    static override readonly styles = css`\n        :host {\n            display: flex;\n            gap: var(--ui-button-set-gap, normal); /* Carbon: the buttons touch; a design can space them */\n        }\n\n        :host([stacked]) {\n            flex-direction: column;\n        }\n\n        /* Carbon .btn-set .btn: full width up to 196px (design kit) */\n        ::slotted(*) {\n            inline-size: var(--ui-button-set-item-size, 100%);\n            max-inline-size: 196px;\n        }\n\n        ::slotted(:not(:first-child):not(:focus-within)) {\n            box-shadow: -1px 0 0 0 var(--ui-button-set-separator, var(--ui-button-separator));\n        }\n\n        :host([stacked]) ::slotted(:not(:first-child):not(:focus-within)) {\n            box-shadow: 0 -1px 0 0 var(--ui-button-set-separator, var(--ui-button-separator));\n        }\n    `;\n\n    /** One button per row (Carbon `stacked`), e.g. in a narrow side panel. */\n    @property({ type: Boolean, reflect: true }) stacked = false;\n\n    override render() {\n        return html`<slot part=\"button-set\"></slot>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-button-set': UiButtonSet;\n    }\n}\n"
    }
  ]
}
