Mixins / foldkit-mixins-ui

ButtonGroupSlots

const · packages/mixins-ui/src/buttonGroup.ts:15

const ButtonGroupSlots: Slots.Contract<{
  readonly root: Slot.UnnamedSlot<
    Capability.Capability<
      'Container',
      readonly [
        Capability.Capability<
          'Interactive',
          readonly [Capability.Capability<'Base', readonly []>]
        >,
      ]
    >,
    readonly Slot.EventName[],
    readonly [Attr.AttrToken<'role'>, Attr.AttrToken<'aria-label'>],
    readonly Slot.RequirementName[],
    boolean
  >
  readonly separator: Slot.UnnamedSlot<
    Capability.Capability<
      'Container',
      readonly [
        Capability.Capability<
          'Interactive',
          readonly [Capability.Capability<'Base', readonly []>]
        >,
      ]
    >,
    readonly Slot.EventName[],
    readonly Slot.AttributeName[],
    readonly Slot.RequirementName[],
    boolean
  >
  readonly text: Slot.UnnamedSlot<
    Capability.Capability<
      'Container',
      readonly [
        Capability.Capability<
          'Interactive',
          readonly [Capability.Capability<'Base', readonly []>]
        >,
      ]
    >,
    readonly Slot.EventName[],
    readonly Slot.AttributeName[],
    readonly Slot.RequirementName[],
    boolean
  >
}>

A button group publishes its row, the rule a separated group draws at each seam, and the box a word stands in (a count, a field's prefix); it owns no state, messages, or bundles. The buttons stay the caller's (their labels, styles, and Messages), drawn as the group's children; the group owns only the join. It is role="group" with a name, not a segmented control: no option is pressed, nothing selects, and arrow keys stay out of it (see Segmented for that). The row and its rules say their orientation in data-orientation, for the style to read.