{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "action-set",
  "type": "registry:ui",
  "title": "<ui-action-set>",
  "description": "Carbon for IBM Products `ActionSet` (`c4p-action-set`): the action buttons at the foot of a side panel or tearsheet — 64px expressive buttons with their text at the top (48px `condensed`), separated by 1px lines, laid out by `size` (the panel's) and how many there are: a lone button fills a medium set and takes half a large one; two take half each; three or four a quarter (232px at most) in large sets; a ghost takes what the others leave; small sets, and medium ones with three, stack them (primary on top). Put `<ui-button>`s inside in Carbon's order — ghost, tertiary, secondary, danger, primary — and a stack shows it reversed. 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/core-action-set",
    "@kanok-ui/shared-action-set",
    "@kanok-ui/shared-element",
    "@kanok-ui/tokens"
  ],
  "files": [
    {
      "path": "src/primitives/action-set/action-set.ts",
      "type": "registry:ui",
      "target": "components/ui/primitives/action-set/action-set.ts",
      "content": "import { html, css, type PropertyValues } from 'lit';\nimport { customElement, property, query } from 'lit/decorators.js';\nimport type { ActionSetSize } from '../../core/action-set.ts';\nimport { actionSetStyles, layoutActions, slottedActions, warnActionProblems } from '../shared/action-set.ts';\nimport { UiElement } from '../shared/element.ts';\n\n/**\n * Carbon for IBM Products `ActionSet` (`c4p-action-set`): the action buttons at the foot of a side panel or tearsheet —\n * 64px expressive buttons with their text at the top (48px `condensed`), separated by 1px lines, laid out by `size`\n * (the panel's) and how many there are: a lone button fills a medium set and takes half a large one; two take half\n * each; three or four a quarter (232px at most) in large sets; a ghost takes what the others leave; small sets, and\n * medium ones with three, stack them (primary on top). Put `<ui-button>`s inside in Carbon's order — ghost, tertiary,\n * secondary, danger, primary — and a stack shows it reversed.\n *\n * @slot - The buttons\n * @csspart base - The row of buttons\n * @cssprop --ui-actions-gap / --ui-actions-padding - Gap between the action buttons and padding round them (default none: full-bleed buttons that touch; Kanok: 8px / 16px 20px)\n * @cssprop --ui-actions-button-flex - `flex` of each action button (default: Carbon's widths by count; Kanok: their own width)\n * @cssprop --ui-actions-button-align / --ui-actions-button-padding-top - Where a button's label sits (default: at the top, 16px in)\n * @cssprop --ui-actions-stacked-direction / --ui-actions-stacked-wrap / --ui-actions-stacked-width - Where Carbon stacks the actions (narrow): `flex-direction`, `flex-wrap` and each button's width (default column-reverse, nowrap, 100%; Kanok: one row that wraps)\n */\n@customElement('ui-action-set')\nexport class UiActionSet extends UiElement {\n    static override readonly styles = [\n        css`\n            :host {\n                display: block;\n            }\n        `,\n        actionSetStyles('.set'),\n    ];\n\n    /** The set's size (a side panel's size; xs counts as sm): how the buttons share the row, or stack. */\n    @property({ reflect: true }) size: ActionSetSize = 'md';\n\n    /** 48px buttons instead of 64px (Carbon `condensedActions` of a side panel). */\n    @property({ type: Boolean, reflect: true }) condensed = false;\n\n    /** Keep the buttons in a row even where Carbon would stack them. */\n    @property({ type: Boolean, attribute: 'disable-stacking' }) disableStacking = false;\n\n    /** Whether the buttons stack, one per row. */\n    get stacked() {\n        return this.set?.hasAttribute('data-stacked') ?? false;\n    }\n\n    @query('.set') private readonly set?: HTMLElement;\n    @query('slot') private readonly slotEl?: HTMLSlotElement;\n\n    protected override updated(changed: PropertyValues<this>) {\n        super.updated(changed);\n        this.layout();\n    }\n\n    private layout() {\n        if (!this.set || !this.slotEl) return;\n        const buttons = slottedActions(this.slotEl);\n        warnActionProblems(this, buttons, this.size);\n        layoutActions(this.set, buttons, this.size, this.disableStacking);\n    }\n\n    override render() {\n        return html`<div class=\"set\" part=\"base\" ?data-condensed=${this.condensed}><slot @slotchange=${this.layout}></slot></div>`;\n    }\n}\n\ndeclare global {\n    interface HTMLElementTagNameMap {\n        'ui-action-set': UiActionSet;\n    }\n}\n"
    }
  ]
}
