foldkit-mixins-ui 0.2.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["resolve","resolve","resolve","resolve","resolve","resolve","resolve","resolve","resolve","resolve","resolve","resolve","resolve","resolve"],"sources":["../src/resolve.ts","../src/button.ts","../src/calendar.ts","../src/checkbox.ts","../src/dialog.ts","../src/disclosure.ts","../src/fieldset.ts","../src/input.ts","../src/popover.ts","../src/radioGroup.ts","../src/select.ts","../src/slider.ts","../src/switch.ts","../src/tabs.ts","../src/textarea.ts","../src/tooltip.ts"],"sourcesContent":["/**\n * Binds a `@foldkit/ui` component's published Slots and the Mixins attached to\n * it. The returned function takes the component's own attribute bundles (from\n * its `toView` callback) and returns them with Mixin contributions resolved by\n * the core resolver. Base attributes and `ChildAttribute`s are preserved\n * untouched; non-slot entries (`animatePanel`) pass through unchanged.\n */\nimport type { HtmlBuilder } from 'foldkit/html'\nimport { SlotView, type MixinValue, type SlotAttributes, type StaticMixin } from 'foldkit-mixins'\n\nexport type MixinList<Message> = ReadonlyArray<\n MixinValue<Message> | MixinValue<never> | StaticMixin<Message>\n>\n\nexport interface ResolveContext<Input, Message> {\n readonly input: Input\n readonly h: HtmlBuilder<Message>\n}\n\nexport type ResolvedSlots<Slots, Message> = {\n readonly [K in keyof Slots]: SlotAttributes<Message>\n}\n\nexport const resolveFor =\n <Slots, Input, Message>(\n slots: Slots,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n ) =>\n <Base extends { readonly [K in keyof Slots]?: SlotAttributes<Message> }>(\n base: Base,\n ): Omit<Base, keyof Slots> & ResolvedSlots<Slots, Message> => {\n const builders = SlotView.buildersFor(slots, mixins, context)\n const out: Record<string, unknown> = Object.assign(Object.create(null), base)\n for (const name of Object.getOwnPropertyNames(slots as object)) {\n out[name] = builders[name as keyof Slots].attrs(base[name as keyof Slots])\n }\n return out as Omit<Base, keyof Slots> & ResolvedSlots<Slots, Message>\n }\n","import type { ButtonAttributes } from '@foldkit/ui/button'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * The button publishes one slot. `click` is owned by the base `OnClick` when\n * the button is interactive, so a Behavior that adds its own click handler is a\n * conflict rather than a second silent owner.\n */\nexport const ButtonSlots = Slots.define({\n button: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaDisabled, Attr.Disabled],\n }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: ButtonAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(ButtonSlots, mixins, context)(attributes)\n","import type {\n CalendarAttributes,\n ColumnHeader,\n DayCell,\n DaysModeAttributes,\n MonthCell,\n MonthsModeAttributes,\n Week,\n YearCell,\n YearsModeAttributes,\n} from '@foldkit/ui/calendar'\nimport { Attr, Capability, Event, Slot, Slots, SlotView, type SlotAttributes } from 'foldkit-mixins'\nimport type { MixinList, ResolveContext } from './resolve.js'\n\n/**\n * Calendar is a nested Submodel whose shape depends on `model.viewMode`. The\n * top-level groups (`root`, `grid`, the navigation buttons) and per-item groups\n * (`columnHeaders[]`, `weeks[].attributes`, the day/month/year cells and their\n * buttons) are each resolved with `SlotView.buildersFor`, so a contribution to\n * a cell slot applies to every cell while each cell's base keeps its own event\n * ownership (a disabled day omits `OnClick`).\n */\nexport const CalendarSlots = Slots.define({\n root: Slot.make({ capability: Capability.Container }),\n previousMonthButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n nextMonthButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n headingButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role],\n }),\n previousPageButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n nextPageButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n grid: Slot.make({\n capability: Capability.Container,\n events: [Event.Focus, Event.Blur],\n attributes: [Attr.Role],\n }),\n headerRow: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n columnHeader: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n weekRow: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n dayCell: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n dayButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n monthCell: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n monthButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n yearCell: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n yearButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n})\n\nexport type ResolvedColumnHeader<Message> = Omit<ColumnHeader, 'attributes'> & {\n readonly attributes: SlotAttributes<Message>\n}\nexport type ResolvedDayCell<Message> = Omit<DayCell, 'cellAttributes' | 'buttonAttributes'> & {\n readonly cellAttributes: SlotAttributes<Message>\n readonly buttonAttributes: SlotAttributes<Message>\n}\nexport type ResolvedWeek<Message> = Omit<Week, 'attributes' | 'cells'> & {\n readonly attributes: SlotAttributes<Message>\n readonly cells: ReadonlyArray<ResolvedDayCell<Message>>\n}\nexport type ResolvedMonthCell<Message> = Omit<MonthCell, 'cellAttributes' | 'buttonAttributes'> & {\n readonly cellAttributes: SlotAttributes<Message>\n readonly buttonAttributes: SlotAttributes<Message>\n}\nexport type ResolvedYearCell<Message> = Omit<YearCell, 'cellAttributes' | 'buttonAttributes'> & {\n readonly cellAttributes: SlotAttributes<Message>\n readonly buttonAttributes: SlotAttributes<Message>\n}\n\nexport interface ResolvedDays<Message> {\n readonly _tag: 'Days'\n readonly root: SlotAttributes<Message>\n readonly previousMonthButton: SlotAttributes<Message>\n readonly nextMonthButton: SlotAttributes<Message>\n readonly headingButton: SlotAttributes<Message>\n readonly heading: DaysModeAttributes['heading']\n readonly grid: SlotAttributes<Message>\n readonly headerRow: SlotAttributes<Message>\n readonly columnHeaders: ReadonlyArray<ResolvedColumnHeader<Message>>\n readonly weeks: ReadonlyArray<ResolvedWeek<Message>>\n}\nexport interface ResolvedMonths<Message> {\n readonly _tag: 'Months'\n readonly root: SlotAttributes<Message>\n readonly headingButton: SlotAttributes<Message>\n readonly heading: MonthsModeAttributes['heading']\n readonly grid: SlotAttributes<Message>\n readonly cells: ReadonlyArray<ResolvedMonthCell<Message>>\n}\nexport interface ResolvedYears<Message> {\n readonly _tag: 'Years'\n readonly root: SlotAttributes<Message>\n readonly previousPageButton: SlotAttributes<Message>\n readonly nextPageButton: SlotAttributes<Message>\n readonly heading: YearsModeAttributes['heading']\n readonly grid: SlotAttributes<Message>\n readonly cells: ReadonlyArray<ResolvedYearCell<Message>>\n}\nexport type ResolvedCalendar<Message> =\n ResolvedDays<Message> | ResolvedMonths<Message> | ResolvedYears<Message>\n\n/** Resolves every mode's nested groups, preserving the `_tag` and heading data. */\nexport const resolve = <Input, Message>(\n render: CalendarAttributes,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedCalendar<Message> => {\n const builders = SlotView.buildersFor(CalendarSlots, mixins, context)\n const root = builders.root.attrs(render.root)\n const grid = builders.grid.attrs(render.grid)\n switch (render._tag) {\n case 'Days':\n return {\n _tag: 'Days',\n root,\n grid,\n heading: render.heading,\n previousMonthButton: builders.previousMonthButton.attrs(render.previousMonthButton),\n nextMonthButton: builders.nextMonthButton.attrs(render.nextMonthButton),\n headingButton: builders.headingButton.attrs(render.headingButton),\n headerRow: builders.headerRow.attrs(render.headerRow),\n columnHeaders: render.columnHeaders.map(column => ({\n ...column,\n attributes: builders.columnHeader.attrs(column.attributes),\n })),\n weeks: render.weeks.map(week => ({\n ...week,\n attributes: builders.weekRow.attrs(week.attributes),\n cells: week.cells.map(cell => ({\n ...cell,\n cellAttributes: builders.dayCell.attrs(cell.cellAttributes),\n buttonAttributes: builders.dayButton.attrs(cell.buttonAttributes),\n })),\n })),\n }\n case 'Months':\n return {\n _tag: 'Months',\n root,\n grid,\n heading: render.heading,\n headingButton: builders.headingButton.attrs(render.headingButton),\n cells: render.cells.map(cell => ({\n ...cell,\n cellAttributes: builders.monthCell.attrs(cell.cellAttributes),\n buttonAttributes: builders.monthButton.attrs(cell.buttonAttributes),\n })),\n }\n case 'Years':\n return {\n _tag: 'Years',\n root,\n grid,\n heading: render.heading,\n previousPageButton: builders.previousPageButton.attrs(render.previousPageButton),\n nextPageButton: builders.nextPageButton.attrs(render.nextPageButton),\n cells: render.cells.map(cell => ({\n ...cell,\n cellAttributes: builders.yearCell.attrs(cell.cellAttributes),\n buttonAttributes: builders.yearButton.attrs(cell.buttonAttributes),\n })),\n }\n }\n}\n","import type { CheckboxAttributes } from '@foldkit/ui/checkbox'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * Both the control and its label carry the base toggle handlers, so both own\n * `click`. `hiddenInput` exists only when a form `name` is configured; its base\n * bundle is then empty.\n */\nexport const CheckboxSlots = Slots.define({\n checkbox: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaDisabled, Attr.Disabled, Attr.Value],\n }),\n label: Slot.make({\n capability: Capability.Container,\n events: [Event.Click],\n }),\n description: Slot.make({ capability: Capability.Container }),\n hiddenInput: Slot.make({\n capability: Capability.Base,\n attributes: [Attr.Value],\n }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: CheckboxAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(CheckboxSlots, mixins, context)(attributes)\n","import type { RenderInfo } from '@foldkit/ui/dialog'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * Dialog is a Submodel: each published bundle is a `ChildAttribute` group that\n * carries the dialog boundary's dispatcher. The resolver treats those as opaque\n * and preserves their identity, so spreading a resolved bundle into the parent's\n * markup keeps routing through the dialog's `toParentMessage`.\n *\n * `dialog` owns `cancel` (the native Escape handler); `backdrop` and\n * `closeButton` own `click`. A Behavior adding its own handler to one of those\n * is a conflict, not a second silent owner.\n */\nexport const DialogSlots = Slots.define({\n dialog: Slot.make({\n capability: Capability.Container,\n events: [Event.Cancel],\n attributes: [Attr.AriaDescribedby],\n }),\n backdrop: Slot.make({ capability: Capability.Container, events: [Event.Click] }),\n panel: Slot.make({ capability: Capability.Container }),\n title: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n initialFocus: Slot.make({ capability: Capability.Focusable }),\n closeButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled],\n }),\n})\n\n/** Resolves the dialog's render groups; `isVisible` passes through unchanged. */\nexport const resolve = <Input, Message>(\n render: RenderInfo,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(DialogSlots, mixins, context)(render)\n","import type { DisclosureAttributes } from '@foldkit/ui/disclosure'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\nexport const DisclosureSlots = Slots.define({\n button: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaExpanded, Attr.AriaDisabled, Attr.Disabled],\n }),\n panel: Slot.make({ capability: Capability.Container }),\n})\n\n/** `animatePanel` is not an attribute bundle, so it passes through unchanged. */\nexport const resolve = <Input, Message>(\n attributes: DisclosureAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(DisclosureSlots, mixins, context)(attributes)\n","import type { FieldsetAttributes } from '@foldkit/ui/fieldset'\nimport { Attr, Capability, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\nexport const FieldsetSlots = Slots.define({\n fieldset: Slot.make({\n capability: Capability.Container,\n attributes: [Attr.Disabled],\n }),\n legend: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: FieldsetAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(FieldsetSlots, mixins, context)(attributes)\n","import type { InputAttributes } from '@foldkit/ui/input'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\nexport const InputSlots = Slots.define({\n input: Slot.make({\n capability: Capability.TextInput,\n events: [Event.Input, Event.Focus, Event.Blur],\n attributes: [Attr.AriaLabel, Attr.AriaInvalid, Attr.Disabled, Attr.Value],\n }),\n label: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: InputAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(InputSlots, mixins, context)(attributes)\n","import type { RenderInfo } from '@foldkit/ui/popover'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * Popover is a Submodel; every bundle is a `ChildAttribute` group. `button`\n * owns `click` (and its pointer/keyboard handlers) while open; `panel` owns\n * `blur`; `backdrop` owns `click`. The panel and backdrop bundles also carry\n * the anchor and portal Mounts, preserved as opaque `ChildAttribute`s.\n */\nexport const PopoverSlots = Slots.define({\n button: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaExpanded, Attr.AriaDisabled, Attr.Disabled],\n }),\n panel: Slot.make({ capability: Capability.Container, events: [Event.Blur] }),\n backdrop: Slot.make({ capability: Capability.Container, events: [Event.Click] }),\n arrow: Slot.make({ capability: Capability.Container }),\n})\n\n/** Resolves the popover's render groups; `isVisible` passes through unchanged. */\nexport const resolve = <Input, Message>(\n render: RenderInfo,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(PopoverSlots, mixins, context)(render)\n","import type { RenderInfo } from '@foldkit/ui/radioGroup'\nimport { Attr, Capability, Event, Slot, Slots, SlotView } from 'foldkit-mixins'\nimport type { MixinList, ResolveContext } from './resolve.js'\n\n/**\n * RadioGroup is a Submodel: each published bundle is a `ChildAttribute` group\n * that carries the boundary's dispatcher. The resolver treats those as opaque\n * and preserves their identity, so spreading a resolved bundle into the\n * parent's markup keeps routing through the radio group's `toParentMessage`.\n *\n * The base installs `OnClick` on an enabled, non-readonly option's `option`\n * bundle, so a Behavior adding its own click handler is a conflict rather than\n * a second silent owner.\n */\nexport const RadioGroupSlots = Slots.define({\n group: Slot.make({\n capability: Capability.Container,\n attributes: [Attr.Role],\n }),\n option: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaSelected, Attr.Disabled, Attr.AriaDisabled],\n }),\n label: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n hiddenInput: Slot.make({\n capability: Capability.Base,\n attributes: [Attr.Value],\n }),\n})\n\n/** Resolves every option's bundles alongside the group and hidden input. */\nexport const resolve = <Value extends string, Input, Message>(\n render: RenderInfo<Value>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => {\n const builders = SlotView.buildersFor(RadioGroupSlots, mixins, context)\n return {\n group: builders.group.attrs(render.group),\n options: render.options.map(option => ({\n ...option,\n option: builders.option.attrs(option.option),\n label: builders.label.attrs(option.label),\n description: builders.description.attrs(option.description),\n })),\n selectedValue: render.selectedValue,\n hiddenInput: builders.hiddenInput.attrs(render.hiddenInput),\n }\n}\n","import type { SelectAttributes } from '@foldkit/ui/select'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * The base bundle installs `OnChange` only when `onChange` is configured and\n * the control is enabled, so a Behavior that adds its own handler is a\n * conflict rather than a second silent owner.\n */\nexport const SelectSlots = Slots.define({\n select: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Change],\n attributes: [Attr.AriaLabel, Attr.AriaInvalid, Attr.Disabled, Attr.Value],\n }),\n label: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: SelectAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(SelectSlots, mixins, context)(attributes)\n","import type { SliderAttributes } from '@foldkit/ui/slider'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * Slider is a Submodel: each published bundle is a `ChildAttribute` group that\n * carries the boundary's dispatcher. The resolver treats those as opaque and\n * preserves their identity, so spreading a resolved bundle into the parent's\n * markup keeps routing through the slider's `toParentMessage`.\n *\n * The base installs the pointer handler on `track` and `thumb` only while the\n * slider is interactive. A Behavior adding one of those owns it in the same\n * window, so a second owner is a conflict rather than a silent takeover. Its\n * keyboard handler is `OnKeyDownPreventDefault`, a distinct tag from `KeyDown`,\n * so the thumb does not advertise `Event.KeyDown` (it would falsely imply a\n * conflict the resolver cannot see).\n */\nexport const SliderSlots = Slots.define({\n root: Slot.make({ capability: Capability.Container }),\n track: Slot.make({\n capability: Capability.Container,\n events: [Event.PointerDown],\n }),\n filledTrack: Slot.make({ capability: Capability.Base }),\n thumb: Slot.make({\n capability: Capability.Focusable,\n events: [Event.PointerDown],\n attributes: [Attr.Role],\n }),\n label: Slot.make({ capability: Capability.Container }),\n hiddenInput: Slot.make({\n capability: Capability.Base,\n attributes: [Attr.Value],\n }),\n})\n\n/** Resolves the slider's render groups; `value` and the rest pass through unchanged. */\nexport const resolve = <Input, Message>(\n render: SliderAttributes,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(SliderSlots, mixins, context)(render)\n","import type { SwitchAttributes } from '@foldkit/ui/switch'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/** Mirrors the checkbox contract: both the control and its label own `click`. */\nexport const SwitchSlots = Slots.define({\n button: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaDisabled, Attr.Disabled, Attr.Value],\n }),\n label: Slot.make({\n capability: Capability.Container,\n events: [Event.Click],\n }),\n description: Slot.make({ capability: Capability.Container }),\n hiddenInput: Slot.make({\n capability: Capability.Base,\n attributes: [Attr.Value],\n }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: SwitchAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(SwitchSlots, mixins, context)(attributes)\n","import type { RenderInfo, TabInfo } from '@foldkit/ui/tabs'\nimport { Attr, Capability, Event, Slot, Slots, SlotView, type SlotAttributes } from 'foldkit-mixins'\nimport type { MixinList, ResolveContext } from './resolve.js'\n\n/**\n * Tabs is a nested Submodel: one `tablist` group plus a `tab`/`panel` pair per\n * item, so the resolver runs once per group and each base `ChildAttribute`\n * bundle passes through by identity.\n *\n * Enabled tabs own `click` through the base `OnClick`; a Behavior adding its\n * own click handler is a conflict rather than a second silent owner. Disabled\n * tabs publish no click, so the contract still lists it as allowed.\n */\nexport const TabsSlots = Slots.define({\n tablist: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n tab: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaSelected, Attr.Disabled, Attr.AriaDisabled],\n }),\n panel: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n})\n\nexport type ResolvedTab<Value extends string, Message> = Omit<TabInfo<Value>, 'tab' | 'panel'> & {\n readonly tab: SlotAttributes<Message>\n readonly panel: SlotAttributes<Message>\n}\n\nexport interface ResolvedTabs<Value extends string, Message> {\n readonly tablist: SlotAttributes<Message>\n readonly tabs: ReadonlyArray<ResolvedTab<Value, Message>>\n readonly activeIndex: number\n}\n\n/** Resolves the tabs' nested render groups, preserving `activeIndex`. */\nexport const resolve = <Value extends string, Input, Message>(\n render: RenderInfo<Value>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedTabs<Value, Message> => {\n const builders = SlotView.buildersFor(TabsSlots, mixins, context)\n return {\n tablist: builders.tablist.attrs(render.tablist),\n tabs: render.tabs.map(item => ({\n ...item,\n tab: builders.tab.attrs(item.tab),\n panel: builders.panel.attrs(item.panel),\n })),\n activeIndex: render.activeIndex,\n }\n}\n","import type { TextareaAttributes } from '@foldkit/ui/textarea'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\nexport const TextareaSlots = Slots.define({\n textarea: Slot.make({\n capability: Capability.TextInput,\n events: [Event.Input, Event.Focus, Event.Blur],\n attributes: [Attr.AriaLabel, Attr.AriaInvalid, Attr.Disabled, Attr.Value],\n }),\n label: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: TextareaAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(TextareaSlots, mixins, context)(attributes)\n","import type { RenderInfo } from '@foldkit/ui/tooltip'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * Tooltip is a Submodel; both bundles are `ChildAttribute` groups. `trigger`\n * owns `focus`, `blur` and `pointerdown` (the hover/keyboard entry points);\n * `panel` carries the anchor Mount. `resolve` preserves each group by identity.\n */\nexport const TooltipSlots = Slots.define({\n trigger: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Focus, Event.Blur, Event.PointerDown],\n attributes: [Attr.Role, Attr.AriaDisabled, Attr.Disabled],\n }),\n panel: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n})\n\n/** Resolves the tooltip's render groups; `isVisible` passes through unchanged. */\nexport const resolve = <Input, Message>(\n render: RenderInfo,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(TooltipSlots, mixins, context)(render)\n"],"mappings":";;;AAuBA,MAAa,cAET,OACA,QACA,aAGA,SAC4D;CAC5D,MAAM,WAAW,SAAS,YAAY,OAAO,QAAQ,OAAO;CAC5D,MAAM,MAA+B,OAAO,OAAO,OAAO,OAAO,IAAI,GAAG,IAAI;CAC5E,KAAK,MAAM,QAAQ,OAAO,oBAAoB,KAAe,GAC3D,IAAI,QAAQ,SAAS,KAAoB,CAAC,MAAM,KAAK,KAAoB;CAE3E,OAAO;AACT;;;;;;;;;;;;AC7BF,MAAa,cAAc,MAAM,OAAO,EACtC,QAAQ,KAAK,KAAK;CAChB,YAAY,WAAW;CACvB,QAAQ,CAAC,MAAM,KAAK;CACpB,YAAY;EAAC,KAAK;EAAM,KAAK;EAAc,KAAK;CAAQ;AAC1D,CAAC,EACH,CAAC;AAED,MAAaA,cACX,YACA,QACA,YACG,WAAW,aAAa,QAAQ,OAAO,CAAC,CAAC,UAAU;;;;;;;;;;;;;;;ACCxD,MAAa,gBAAgB,MAAM,OAAO;CACxC,MAAM,KAAK,KAAK,EAAE,YAAY,WAAW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ve","resolve","resolve","resolve","resolve","resolve","resolve","resolve","resolve","resolve","resolve","Button","Input","Textarea","Checkbox","Switch","Dialog","Tabs","size","label","description","size","sizes"],"sources":["../src/anchor.ts","../src/resolve.ts","../src/button.ts","../src/calendar.ts","../src/checkbox.ts","../src/dialog.ts","../src/disclosure.ts","../src/fieldset.ts","../src/hoverIntent.ts","../src/input.ts","../src/popover.ts","../src/radioGroup.ts","../src/select.ts","../src/slider.ts","../src/switch.ts","../src/tabs.ts","../src/textarea.ts","../src/tooltip.ts","../src/patterns.ts","../src/recipes/design.ts","../src/recipes/button.ts","../src/recipes/dialog.ts","../src/recipes/field.ts","../src/recipes/tabs.ts","../src/recipes/toggle.ts","../src/recipes/index.ts"],"sourcesContent":["/**\n * `@foldkit/ui`'s anchor positioning as a Mount and a Behavior: the floating\n * element is placed against the button whose id is given, with placement,\n * gap, offset, padding, portal and flip handled by `anchorSetup`, which also\n * releases on unmount. The Mount writes `position`, `top` and `left` on the\n * element itself, imperatively; a Style on the same slot must leave those\n * alone, and `data-placement` is written by `@foldkit/ui` for styling.\n */\nimport { Effect, Schema, Stream } from 'effect'\nimport { AnchorConfig, anchorSetup } from '@foldkit/ui/anchor'\nimport * as Mount from 'foldkit/mount'\nimport { Behavior, Capability } from 'foldkit-mixins'\n\nexport const Anchor = Mount.defineStream('Anchor', {\n messages: [Schema.Never],\n args: {\n /** The id of the element the floating one is placed against. */\n buttonId: Schema.String,\n anchor: AnchorConfig,\n interceptTab: Schema.optional(Schema.Boolean),\n focusAfterPosition: Schema.optional(Schema.Boolean),\n focusSelector: Schema.optional(Schema.String),\n arrowId: Schema.optional(Schema.String),\n arrowPadding: Schema.optional(Schema.Number),\n },\n execute: ({ element, buttonId, anchor, ...optional }) =>\n Stream.callback<never>(() =>\n Effect.acquireRelease(\n Effect.sync(() =>\n // `Schema.optional` admits undefined; the setup wants the key absent.\n anchorSetup(element, {\n buttonId,\n anchor,\n ...Object.fromEntries(\n Object.entries(optional).filter(\n ([key, value]) => key !== 'viewStateChanges' && value !== undefined,\n ),\n ),\n }),\n ),\n release => Effect.sync(() => release()),\n ),\n ),\n})\n\nexport type AnchorArgs = Parameters<typeof Anchor>[0]\n\nexport interface BehaviorOptions<Input, Slots> {\n /** The slot to position. */\n readonly floating: keyof Slots & string\n readonly config: (input: Input) => AnchorArgs\n}\n\n/** Mounts the anchor on the floating slot with the config the input gives. */\nexport const behavior =\n <Slots>(slots: Slots) =>\n <Input, ParentMessage>(\n options: BehaviorOptions<Input, Slots>,\n ): Behavior.NamedBehavior<Slots, Input, ParentMessage> =>\n Behavior.forSlots(slots)<Input, ParentMessage>(\n {\n [options.floating]: Behavior.slot({\n requires: { capability: Capability.Container },\n mount: (input: Input) => Anchor(options.config(input)),\n }),\n // Keyed by a value the caller chose; `forSlots` checks the key exists.\n } as unknown as Behavior.BehaviorSpec<Slots, Input, ParentMessage>,\n { name: 'Anchor' },\n )\n","/**\n * Binds a `@foldkit/ui` component's published Slots and the Mixins attached to\n * it. The returned function takes the component's own attribute bundles (from\n * its `toView` callback) and returns them with Mixin contributions resolved by\n * the core resolver. Base attributes and `ChildAttribute`s are preserved\n * untouched; non-slot entries (`animatePanel`) pass through unchanged.\n */\nimport type { HtmlBuilder } from 'foldkit/html'\nimport { SlotView, type MixinValue, type SlotAttributes, type StaticMixin } from 'foldkit-mixins'\n\nexport type MixinList<Message> = ReadonlyArray<\n MixinValue<Message> | MixinValue<never> | StaticMixin<Message>\n>\n\nexport interface ResolveContext<Input, Message> {\n readonly input: Input\n readonly h: HtmlBuilder<Message>\n}\n\nexport type ResolvedSlots<Slots, Message> = {\n readonly [K in keyof Slots]: SlotAttributes<Message>\n}\n\nexport const resolveFor =\n <Slots, Input, Message>(\n slots: Slots,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n ) =>\n <Base extends { readonly [K in keyof Slots]?: SlotAttributes<Message> }>(\n base: Base,\n ): Omit<Base, keyof Slots> & ResolvedSlots<Slots, Message> => {\n const builders = SlotView.buildersFor(slots, mixins, context)\n const out: Record<string, unknown> = Object.assign(Object.create(null), base)\n for (const name of Object.getOwnPropertyNames(slots as object)) {\n out[name] = builders[name as keyof Slots].attrs(base[name as keyof Slots])\n }\n return out as Omit<Base, keyof Slots> & ResolvedSlots<Slots, Message>\n }\n","import type { ButtonAttributes } from '@foldkit/ui/button'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * The button publishes one slot. `click` is owned by the base `OnClick` when\n * the button is interactive, so a Behavior that adds its own click handler is a\n * conflict rather than a second silent owner.\n */\nexport const ButtonSlots = Slots.define({\n button: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaDisabled, Attr.Disabled],\n }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: ButtonAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(ButtonSlots, mixins, context)(attributes)\n","import type {\n CalendarAttributes,\n ColumnHeader,\n DayCell,\n DaysModeAttributes,\n MonthCell,\n MonthsModeAttributes,\n Week,\n YearCell,\n YearsModeAttributes,\n} from '@foldkit/ui/calendar'\nimport { Attr, Capability, Event, Slot, Slots, SlotView, type SlotAttributes } from 'foldkit-mixins'\nimport type { MixinList, ResolveContext } from './resolve.js'\n\n/**\n * Calendar is a nested Submodel whose shape depends on `model.viewMode`. The\n * top-level groups (`root`, `grid`, the navigation buttons) and per-item groups\n * (`columnHeaders[]`, `weeks[].attributes`, the day/month/year cells and their\n * buttons) are each resolved with `SlotView.buildersFor`, so a contribution to\n * a cell slot applies to every cell while each cell's base keeps its own event\n * ownership (a disabled day omits `OnClick`).\n */\nexport const CalendarSlots = Slots.define({\n root: Slot.make({ capability: Capability.Container }),\n previousMonthButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n nextMonthButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n headingButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role],\n }),\n previousPageButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n nextPageButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n grid: Slot.make({\n capability: Capability.Container,\n events: [Event.Focus, Event.Blur],\n attributes: [Attr.Role],\n }),\n headerRow: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n columnHeader: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n weekRow: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n dayCell: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n dayButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n monthCell: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n monthButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n yearCell: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n yearButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled, Attr.AriaDisabled],\n }),\n})\n\nexport type ResolvedColumnHeader<Message> = Omit<ColumnHeader, 'attributes'> & {\n readonly attributes: SlotAttributes<Message>\n}\nexport type ResolvedDayCell<Message> = Omit<DayCell, 'cellAttributes' | 'buttonAttributes'> & {\n readonly cellAttributes: SlotAttributes<Message>\n readonly buttonAttributes: SlotAttributes<Message>\n}\nexport type ResolvedWeek<Message> = Omit<Week, 'attributes' | 'cells'> & {\n readonly attributes: SlotAttributes<Message>\n readonly cells: ReadonlyArray<ResolvedDayCell<Message>>\n}\nexport type ResolvedMonthCell<Message> = Omit<MonthCell, 'cellAttributes' | 'buttonAttributes'> & {\n readonly cellAttributes: SlotAttributes<Message>\n readonly buttonAttributes: SlotAttributes<Message>\n}\nexport type ResolvedYearCell<Message> = Omit<YearCell, 'cellAttributes' | 'buttonAttributes'> & {\n readonly cellAttributes: SlotAttributes<Message>\n readonly buttonAttributes: SlotAttributes<Message>\n}\n\nexport interface ResolvedDays<Message> {\n readonly _tag: 'Days'\n readonly root: SlotAttributes<Message>\n readonly previousMonthButton: SlotAttributes<Message>\n readonly nextMonthButton: SlotAttributes<Message>\n readonly headingButton: SlotAttributes<Message>\n readonly heading: DaysModeAttributes['heading']\n readonly grid: SlotAttributes<Message>\n readonly headerRow: SlotAttributes<Message>\n readonly columnHeaders: ReadonlyArray<ResolvedColumnHeader<Message>>\n readonly weeks: ReadonlyArray<ResolvedWeek<Message>>\n}\nexport interface ResolvedMonths<Message> {\n readonly _tag: 'Months'\n readonly root: SlotAttributes<Message>\n readonly headingButton: SlotAttributes<Message>\n readonly heading: MonthsModeAttributes['heading']\n readonly grid: SlotAttributes<Message>\n readonly cells: ReadonlyArray<ResolvedMonthCell<Message>>\n}\nexport interface ResolvedYears<Message> {\n readonly _tag: 'Years'\n readonly root: SlotAttributes<Message>\n readonly previousPageButton: SlotAttributes<Message>\n readonly nextPageButton: SlotAttributes<Message>\n readonly heading: YearsModeAttributes['heading']\n readonly grid: SlotAttributes<Message>\n readonly cells: ReadonlyArray<ResolvedYearCell<Message>>\n}\nexport type ResolvedCalendar<Message> =\n ResolvedDays<Message> | ResolvedMonths<Message> | ResolvedYears<Message>\n\n/** Resolves every mode's nested groups, preserving the `_tag` and heading data. */\nexport const resolve = <Input, Message>(\n render: CalendarAttributes,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedCalendar<Message> => {\n const builders = SlotView.buildersFor(CalendarSlots, mixins, context)\n const root = builders.root.attrs(render.root)\n const grid = builders.grid.attrs(render.grid)\n switch (render._tag) {\n case 'Days':\n return {\n _tag: 'Days',\n root,\n grid,\n heading: render.heading,\n previousMonthButton: builders.previousMonthButton.attrs(render.previousMonthButton),\n nextMonthButton: builders.nextMonthButton.attrs(render.nextMonthButton),\n headingButton: builders.headingButton.attrs(render.headingButton),\n headerRow: builders.headerRow.attrs(render.headerRow),\n columnHeaders: render.columnHeaders.map(column => ({\n ...column,\n attributes: builders.columnHeader.attrs(column.attributes),\n })),\n weeks: render.weeks.map(week => ({\n ...week,\n attributes: builders.weekRow.attrs(week.attributes),\n cells: week.cells.map(cell => ({\n ...cell,\n cellAttributes: builders.dayCell.attrs(cell.cellAttributes),\n buttonAttributes: builders.dayButton.attrs(cell.buttonAttributes),\n })),\n })),\n }\n case 'Months':\n return {\n _tag: 'Months',\n root,\n grid,\n heading: render.heading,\n headingButton: builders.headingButton.attrs(render.headingButton),\n cells: render.cells.map(cell => ({\n ...cell,\n cellAttributes: builders.monthCell.attrs(cell.cellAttributes),\n buttonAttributes: builders.monthButton.attrs(cell.buttonAttributes),\n })),\n }\n case 'Years':\n return {\n _tag: 'Years',\n root,\n grid,\n heading: render.heading,\n previousPageButton: builders.previousPageButton.attrs(render.previousPageButton),\n nextPageButton: builders.nextPageButton.attrs(render.nextPageButton),\n cells: render.cells.map(cell => ({\n ...cell,\n cellAttributes: builders.yearCell.attrs(cell.cellAttributes),\n buttonAttributes: builders.yearButton.attrs(cell.buttonAttributes),\n })),\n }\n }\n}\n","import type { CheckboxAttributes } from '@foldkit/ui/checkbox'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * Both the control and its label carry the base toggle handlers, so both own\n * `click`. `hiddenInput` exists only when a form `name` is configured; its base\n * bundle is then empty.\n */\nexport const CheckboxSlots = Slots.define({\n checkbox: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaDisabled, Attr.Disabled, Attr.Value],\n }),\n label: Slot.make({\n capability: Capability.Container,\n events: [Event.Click],\n }),\n description: Slot.make({ capability: Capability.Container }),\n hiddenInput: Slot.make({\n capability: Capability.Base,\n attributes: [Attr.Value],\n }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: CheckboxAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(CheckboxSlots, mixins, context)(attributes)\n","import type { RenderInfo } from '@foldkit/ui/dialog'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * Dialog is a Submodel: each published bundle is a `ChildAttribute` group that\n * carries the dialog boundary's dispatcher. The resolver treats those as opaque\n * and preserves their identity, so spreading a resolved bundle into the parent's\n * markup keeps routing through the dialog's `toParentMessage`.\n *\n * `dialog` owns `cancel` (the native Escape handler); `backdrop` and\n * `closeButton` own `click`. A Behavior adding its own handler to one of those\n * is a conflict, not a second silent owner.\n */\nexport const DialogSlots = Slots.define({\n dialog: Slot.make({\n capability: Capability.Container,\n events: [Event.Cancel],\n attributes: [Attr.AriaDescribedby],\n }),\n backdrop: Slot.make({ capability: Capability.Container, events: [Event.Click] }),\n panel: Slot.make({ capability: Capability.Container }),\n title: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n initialFocus: Slot.make({ capability: Capability.Focusable }),\n closeButton: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.Disabled],\n }),\n})\n\n/** Resolves the dialog's render groups; `isVisible` passes through unchanged. */\nexport const resolve = <Input, Message>(\n render: RenderInfo,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(DialogSlots, mixins, context)(render)\n","import type { DisclosureAttributes } from '@foldkit/ui/disclosure'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\nexport const DisclosureSlots = Slots.define({\n button: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaExpanded, Attr.AriaDisabled, Attr.Disabled],\n }),\n panel: Slot.make({ capability: Capability.Container }),\n})\n\n/** `animatePanel` is not an attribute bundle, so it passes through unchanged. */\nexport const resolve = <Input, Message>(\n attributes: DisclosureAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(DisclosureSlots, mixins, context)(attributes)\n","import type { FieldsetAttributes } from '@foldkit/ui/fieldset'\nimport { Attr, Capability, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\nexport const FieldsetSlots = Slots.define({\n fieldset: Slot.make({\n capability: Capability.Container,\n attributes: [Attr.Disabled],\n }),\n legend: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: FieldsetAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(FieldsetSlots, mixins, context)(attributes)\n","import type { RenderInfo } from '@foldkit/ui/hoverIntent'\nimport { Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * HoverIntent is a Submodel: open and close delays with intent, for a hover\n * card or a menu that should not flicker. Both bundles are `ChildAttribute`\n * groups: `trigger` owns the pointer and focus entry points, `panel` owns\n * its own so moving into the panel keeps it open. `resolve` preserves each\n * group by identity.\n */\nexport const HoverIntentSlots = Slots.define({\n trigger: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Hover, Event.Focus, Event.Blur],\n }),\n panel: Slot.make({\n capability: Capability.Container,\n events: [Event.Hover, Event.Focus, Event.Blur],\n }),\n})\n\n/** Resolves the hover-intent render groups; `isVisible` passes through unchanged. */\nexport const resolve = <Input, Message>(\n render: RenderInfo,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(HoverIntentSlots, mixins, context)(render)\n","import type { InputAttributes } from '@foldkit/ui/input'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\nexport const InputSlots = Slots.define({\n input: Slot.make({\n capability: Capability.TextInput,\n events: [Event.Input, Event.Focus, Event.Blur],\n attributes: [Attr.AriaLabel, Attr.AriaInvalid, Attr.Disabled, Attr.Value],\n }),\n label: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: InputAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(InputSlots, mixins, context)(attributes)\n","import type { RenderInfo } from '@foldkit/ui/popover'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * Popover is a Submodel; every bundle is a `ChildAttribute` group. `button`\n * owns `click` (and its pointer/keyboard handlers) while open; `panel` owns\n * `blur`; `backdrop` owns `click`. The panel and backdrop bundles also carry\n * the anchor and portal Mounts, preserved as opaque `ChildAttribute`s.\n */\nexport const PopoverSlots = Slots.define({\n button: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaExpanded, Attr.AriaDisabled, Attr.Disabled],\n }),\n panel: Slot.make({ capability: Capability.Container, events: [Event.Blur] }),\n backdrop: Slot.make({ capability: Capability.Container, events: [Event.Click] }),\n arrow: Slot.make({ capability: Capability.Container }),\n})\n\n/** Resolves the popover's render groups; `isVisible` passes through unchanged. */\nexport const resolve = <Input, Message>(\n render: RenderInfo,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(PopoverSlots, mixins, context)(render)\n","import type { RenderInfo } from '@foldkit/ui/radioGroup'\nimport { Attr, Capability, Event, Slot, Slots, SlotView } from 'foldkit-mixins'\nimport type { MixinList, ResolveContext } from './resolve.js'\n\n/**\n * RadioGroup is a Submodel: each published bundle is a `ChildAttribute` group\n * that carries the boundary's dispatcher. The resolver treats those as opaque\n * and preserves their identity, so spreading a resolved bundle into the\n * parent's markup keeps routing through the radio group's `toParentMessage`.\n *\n * The base installs `OnClick` on an enabled, non-readonly option's `option`\n * bundle, so a Behavior adding its own click handler is a conflict rather than\n * a second silent owner.\n */\nexport const RadioGroupSlots = Slots.define({\n group: Slot.make({\n capability: Capability.Container,\n attributes: [Attr.Role],\n }),\n option: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaSelected, Attr.Disabled, Attr.AriaDisabled],\n }),\n label: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n hiddenInput: Slot.make({\n capability: Capability.Base,\n attributes: [Attr.Value],\n }),\n})\n\n/** Resolves every option's bundles alongside the group and hidden input. */\nexport const resolve = <Value extends string, Input, Message>(\n render: RenderInfo<Value>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => {\n const builders = SlotView.buildersFor(RadioGroupSlots, mixins, context)\n return {\n group: builders.group.attrs(render.group),\n options: render.options.map(option => ({\n ...option,\n option: builders.option.attrs(option.option),\n label: builders.label.attrs(option.label),\n description: builders.description.attrs(option.description),\n })),\n selectedValue: render.selectedValue,\n hiddenInput: builders.hiddenInput.attrs(render.hiddenInput),\n }\n}\n","import type { SelectAttributes } from '@foldkit/ui/select'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * The base bundle installs `OnChange` only when `onChange` is configured and\n * the control is enabled, so a Behavior that adds its own handler is a\n * conflict rather than a second silent owner.\n */\nexport const SelectSlots = Slots.define({\n select: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Change],\n attributes: [Attr.AriaLabel, Attr.AriaInvalid, Attr.Disabled, Attr.Value],\n }),\n label: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: SelectAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(SelectSlots, mixins, context)(attributes)\n","import type { SliderAttributes } from '@foldkit/ui/slider'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * Slider is a Submodel: each published bundle is a `ChildAttribute` group that\n * carries the boundary's dispatcher. The resolver treats those as opaque and\n * preserves their identity, so spreading a resolved bundle into the parent's\n * markup keeps routing through the slider's `toParentMessage`.\n *\n * The base installs the pointer handler on `track` and `thumb` only while the\n * slider is interactive. A Behavior adding one of those owns it in the same\n * window, so a second owner is a conflict rather than a silent takeover. Its\n * keyboard handler is `OnKeyDownPreventDefault`, a distinct tag from `KeyDown`,\n * so the thumb does not advertise `Event.KeyDown` (it would falsely imply a\n * conflict the resolver cannot see).\n */\nexport const SliderSlots = Slots.define({\n root: Slot.make({ capability: Capability.Container }),\n track: Slot.make({\n capability: Capability.Container,\n events: [Event.PointerDown],\n }),\n filledTrack: Slot.make({ capability: Capability.Base }),\n thumb: Slot.make({\n capability: Capability.Focusable,\n events: [Event.PointerDown],\n attributes: [Attr.Role],\n }),\n label: Slot.make({ capability: Capability.Container }),\n hiddenInput: Slot.make({\n capability: Capability.Base,\n attributes: [Attr.Value],\n }),\n})\n\n/** Resolves the slider's render groups; `value` and the rest pass through unchanged. */\nexport const resolve = <Input, Message>(\n render: SliderAttributes,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(SliderSlots, mixins, context)(render)\n","import type { SwitchAttributes } from '@foldkit/ui/switch'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/** Mirrors the checkbox contract: both the control and its label own `click`. */\nexport const SwitchSlots = Slots.define({\n button: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaDisabled, Attr.Disabled, Attr.Value],\n }),\n label: Slot.make({\n capability: Capability.Container,\n events: [Event.Click],\n }),\n description: Slot.make({ capability: Capability.Container }),\n hiddenInput: Slot.make({\n capability: Capability.Base,\n attributes: [Attr.Value],\n }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: SwitchAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(SwitchSlots, mixins, context)(attributes)\n","import type { RenderInfo, TabInfo } from '@foldkit/ui/tabs'\nimport { Attr, Capability, Event, Slot, Slots, SlotView, type SlotAttributes } from 'foldkit-mixins'\nimport type { MixinList, ResolveContext } from './resolve.js'\n\n/**\n * Tabs is a nested Submodel: one `tablist` group plus a `tab`/`panel` pair per\n * item, so the resolver runs once per group and each base `ChildAttribute`\n * bundle passes through by identity.\n *\n * Enabled tabs own `click` through the base `OnClick`; a Behavior adding its\n * own click handler is a conflict rather than a second silent owner. Disabled\n * tabs publish no click, so the contract still lists it as allowed.\n */\nexport const TabsSlots = Slots.define({\n tablist: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n tab: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaSelected, Attr.Disabled, Attr.AriaDisabled],\n }),\n panel: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n})\n\nexport type ResolvedTab<Value extends string, Message> = Omit<TabInfo<Value>, 'tab' | 'panel'> & {\n readonly tab: SlotAttributes<Message>\n readonly panel: SlotAttributes<Message>\n}\n\nexport interface ResolvedTabs<Value extends string, Message> {\n readonly tablist: SlotAttributes<Message>\n readonly tabs: ReadonlyArray<ResolvedTab<Value, Message>>\n readonly activeIndex: number\n}\n\n/** Resolves the tabs' nested render groups, preserving `activeIndex`. */\nexport const resolve = <Value extends string, Input, Message>(\n render: RenderInfo<Value>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedTabs<Value, Message> => {\n const builders = SlotView.buildersFor(TabsSlots, mixins, context)\n return {\n tablist: builders.tablist.attrs(render.tablist),\n tabs: render.tabs.map(item => ({\n ...item,\n tab: builders.tab.attrs(item.tab),\n panel: builders.panel.attrs(item.panel),\n })),\n activeIndex: render.activeIndex,\n }\n}\n","import type { TextareaAttributes } from '@foldkit/ui/textarea'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\nexport const TextareaSlots = Slots.define({\n textarea: Slot.make({\n capability: Capability.TextInput,\n events: [Event.Input, Event.Focus, Event.Blur],\n attributes: [Attr.AriaLabel, Attr.AriaInvalid, Attr.Disabled, Attr.Value],\n }),\n label: Slot.make({ capability: Capability.Container }),\n description: Slot.make({ capability: Capability.Container }),\n})\n\nexport const resolve = <Input, Message>(\n attributes: TextareaAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(TextareaSlots, mixins, context)(attributes)\n","import type { RenderInfo } from '@foldkit/ui/tooltip'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport { resolveFor, type MixinList, type ResolveContext } from './resolve.js'\n\n/**\n * Tooltip is a Submodel; both bundles are `ChildAttribute` groups. `trigger`\n * owns `focus`, `blur` and `pointerdown` (the hover/keyboard entry points);\n * `panel` carries the anchor Mount. `resolve` preserves each group by identity.\n */\nexport const TooltipSlots = Slots.define({\n trigger: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Focus, Event.Blur, Event.PointerDown],\n attributes: [Attr.Role, Attr.AriaDisabled, Attr.Disabled],\n }),\n panel: Slot.make({ capability: Capability.Container, attributes: [Attr.Role] }),\n})\n\n/** Resolves the tooltip's render groups; `isVisible` passes through unchanged. */\nexport const resolve = <Input, Message>(\n render: RenderInfo,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n) => resolveFor(TooltipSlots, mixins, context)(render)\n","/**\n * An accessibility pattern per adapter: the slots a widget of that kind must\n * publish, with the capability, events and attributes each must expose, as\n * `A11y.pattern` contracts. `catalog` lists them with their tier, the ARIA\n * roles involved, and the platform floor: what the widget relies on the\n * browser for, so a reader or an agent can ask. The gate test validates\n * every adapter's Slots against its pattern; a custom view built from\n * `foldkit-primitives/interaction` entries validates against the same one.\n */\nimport { A11y, Attr, Capability, Event } from 'foldkit-mixins'\nimport { ButtonSlots } from './button.js'\nimport { CalendarSlots } from './calendar.js'\nimport { CheckboxSlots } from './checkbox.js'\nimport { DialogSlots } from './dialog.js'\nimport { DisclosureSlots } from './disclosure.js'\nimport { FieldsetSlots } from './fieldset.js'\nimport { InputSlots } from './input.js'\nimport { PopoverSlots } from './popover.js'\nimport { RadioGroupSlots } from './radioGroup.js'\nimport { SelectSlots } from './select.js'\nimport { SliderSlots } from './slider.js'\nimport { SwitchSlots } from './switch.js'\nimport { TabsSlots } from './tabs.js'\nimport { TextareaSlots } from './textarea.js'\nimport { TooltipSlots } from './tooltip.js'\n\n/** Whether the widget keeps state of its own (a Submodel) or only decorates. */\nexport type Tier = 'stateful' | 'stateless'\n\n/** What a widget relies on the browser for, so nothing here reimplements it. */\nexport type FloorConcern =\n | 'focus-trap'\n | 'escape-dismiss'\n | 'outside-dismiss'\n | 'inert-outside'\n | 'top-layer'\n | 'backdrop'\n | 'form-submission'\n | 'native-control'\n\nexport const Button = A11y.pattern({\n button: { capability: Capability.Interactive, events: [Event.Click], attributes: [Attr.Role] },\n})\n\nexport const Input = A11y.pattern({\n input: {\n capability: Capability.TextInput,\n events: [Event.Input, Event.Blur],\n attributes: [Attr.AriaInvalid],\n },\n label: { capability: Capability.Container },\n description: { capability: Capability.Container, optional: true },\n})\n\nexport const Textarea = A11y.pattern({\n textarea: {\n capability: Capability.TextInput,\n events: [Event.Input, Event.Blur],\n attributes: [Attr.AriaInvalid],\n },\n label: { capability: Capability.Container },\n description: { capability: Capability.Container, optional: true },\n})\n\nexport const Select = A11y.pattern({\n select: {\n capability: Capability.Interactive,\n events: [Event.Change],\n attributes: [Attr.AriaInvalid],\n },\n label: { capability: Capability.Container },\n description: { capability: Capability.Container, optional: true },\n})\n\nexport const Checkbox = A11y.pattern({\n checkbox: { capability: Capability.Interactive, events: [Event.Click], attributes: [Attr.Role] },\n label: { capability: Capability.Container },\n hiddenInput: { capability: Capability.Base, attributes: [Attr.Value], optional: true },\n})\n\nexport const Switch = A11y.pattern({\n button: { capability: Capability.Interactive, events: [Event.Click], attributes: [Attr.Role] },\n label: { capability: Capability.Container },\n hiddenInput: { capability: Capability.Base, attributes: [Attr.Value], optional: true },\n})\n\nexport const Fieldset = A11y.pattern({\n fieldset: { capability: Capability.Container },\n legend: { capability: Capability.Container },\n})\n\nexport const Disclosure = A11y.pattern({\n button: {\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.AriaExpanded],\n },\n panel: { capability: Capability.Container },\n})\n\nexport const Dialog = A11y.pattern({\n dialog: { capability: Capability.Container, events: [Event.Cancel] },\n panel: { capability: Capability.Container },\n title: { capability: Capability.Container },\n description: { capability: Capability.Container, optional: true },\n closeButton: { capability: Capability.Interactive, events: [Event.Click], optional: true },\n})\n\nexport const Popover = A11y.pattern({\n button: {\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.AriaExpanded],\n },\n panel: { capability: Capability.Container },\n})\n\nexport const Tooltip = A11y.pattern({\n trigger: { capability: Capability.Interactive, events: [Event.Focus, Event.Blur] },\n panel: { capability: Capability.Container, attributes: [Attr.Role] },\n})\n\nexport const Slider = A11y.pattern({\n root: { capability: Capability.Container },\n track: { capability: Capability.Container, events: [Event.PointerDown] },\n thumb: { capability: Capability.Focusable, attributes: [Attr.Role] },\n label: { capability: Capability.Container },\n})\n\nexport const Tabs = A11y.pattern({\n tablist: { capability: Capability.Container, attributes: [Attr.Role] },\n tab: {\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.Role, Attr.AriaSelected],\n },\n panel: { capability: Capability.Container, attributes: [Attr.Role] },\n})\n\nexport const RadioGroup = A11y.pattern({\n group: { capability: Capability.Container, attributes: [Attr.Role] },\n option: { capability: Capability.Interactive, events: [Event.Click], attributes: [Attr.Role] },\n label: { capability: Capability.Container },\n})\n\nexport const Calendar = A11y.pattern({\n root: { capability: Capability.Container },\n grid: { capability: Capability.Container, attributes: [Attr.Role] },\n previousMonthButton: { capability: Capability.Interactive, events: [Event.Click] },\n nextMonthButton: { capability: Capability.Interactive, events: [Event.Click] },\n})\n\nexport interface Entry {\n readonly name: string\n readonly pattern: A11y.Pattern\n /** The adapter's own contract, which the gate validates against `pattern`. */\n readonly slots: { readonly [name: string]: unknown }\n readonly tier: Tier\n readonly roles: ReadonlyArray<string>\n readonly floor: ReadonlyArray<FloorConcern>\n}\n\nconst entry = (\n name: string,\n pattern: A11y.Pattern,\n slots: { readonly [name: string]: unknown },\n tier: Tier,\n roles: ReadonlyArray<string>,\n floor: ReadonlyArray<FloorConcern> = [],\n): Entry => Object.freeze({ name, pattern, slots, tier, roles, floor })\n\n/** Every adapted widget, for the gate, DevTools, and agents. */\nexport const catalog: ReadonlyArray<Entry> = Object.freeze([\n entry('button', Button, ButtonSlots, 'stateless', ['button'], ['native-control']),\n entry(\n 'input',\n Input,\n InputSlots,\n 'stateless',\n ['textbox'],\n ['native-control', 'form-submission'],\n ),\n entry(\n 'textarea',\n Textarea,\n TextareaSlots,\n 'stateless',\n ['textbox'],\n ['native-control', 'form-submission'],\n ),\n entry(\n 'select',\n Select,\n SelectSlots,\n 'stateless',\n ['combobox'],\n ['native-control', 'form-submission'],\n ),\n entry('checkbox', Checkbox, CheckboxSlots, 'stateless', ['checkbox'], ['form-submission']),\n entry('switch', Switch, SwitchSlots, 'stateless', ['switch'], ['form-submission']),\n entry('fieldset', Fieldset, FieldsetSlots, 'stateless', ['group'], ['native-control']),\n entry('disclosure', Disclosure, DisclosureSlots, 'stateless', ['button']),\n entry(\n 'dialog',\n Dialog,\n DialogSlots,\n 'stateful',\n ['dialog', 'button'],\n ['focus-trap', 'escape-dismiss', 'inert-outside', 'top-layer', 'backdrop'],\n ),\n entry(\n 'popover',\n Popover,\n PopoverSlots,\n 'stateful',\n ['dialog', 'button'],\n ['top-layer', 'escape-dismiss'],\n ),\n entry('tooltip', Tooltip, TooltipSlots, 'stateful', ['tooltip']),\n entry('slider', Slider, SliderSlots, 'stateful', ['slider'], ['form-submission']),\n entry('tabs', Tabs, TabsSlots, 'stateful', ['tablist', 'tab', 'tabpanel']),\n entry(\n 'radioGroup',\n RadioGroup,\n RadioGroupSlots,\n 'stateful',\n ['radiogroup', 'radio'],\n ['form-submission'],\n ),\n entry('calendar', Calendar, CalendarSlots, 'stateful', ['grid', 'gridcell', 'button']),\n])\n","/**\n * What every recipe shares: typed token references, the layer each piece is\n * emitted in, and the focus and disabled treatments. The recipes assume a page\n * that ships `Theme.root` of `Theme.tokens` and a `Theme.oklch` palette from\n * `foldkit-mixins/theme`; a token name either lacks is a type error here.\n */\nimport { Layers, Style, type Declarations, type StyleValue } from 'foldkit-mixins'\nimport { Theme } from 'foldkit-mixins/theme'\n\n/**\n * `var(--fk-group-name)` for every token the shipped scales and palette\n * define. The palette is built only for its names: `Theme.ref` never reads a\n * value, so the accent here is irrelevant and the page's own palette applies.\n */\nexport const ref = Theme.ref(\n Theme.compose(Theme.tokens, Theme.oklch({ accent: { h: 0, c: 0, l: '50%' } })),\n)\n\n/** The base of a recipe, in the `components` layer. */\nexport const component = (...pieces: ReadonlyArray<StyleValue>): StyleValue =>\n Layers.standard.in('components', Style.compose(...pieces))\n\n/** A variant or compound, in the `variants` layer, so it beats the base. */\nexport const variant = (...pieces: ReadonlyArray<StyleValue>): StyleValue =>\n Layers.standard.in('variants', Style.compose(...pieces))\n\n/** A hover rule that skips a disabled element. */\nexport const hover = (declarations: Declarations): StyleValue =>\n Style.pseudo(':hover:not([aria-disabled=\"true\"], :disabled)', declarations)\n\nexport const focusRing: StyleValue = Style.pseudo(':focus-visible', {\n outline: `${ref.border.thick} solid ${ref.outline.focus}`,\n outlineOffset: '2px',\n})\n\nexport const disabled: StyleValue = Style.pseudo(':is([aria-disabled=\"true\"], :disabled)', {\n opacity: '0.5',\n cursor: 'not-allowed',\n})\n\nexport const transition = (properties: string): Declarations => ({\n transitionProperty: properties,\n transitionDuration: ref.motion.fast,\n transitionTimingFunction: ref.motion.ease,\n})\n\n/**\n * A tone is five private custom properties that the variants read: the fill,\n * its hover, the text on it, the ink where nothing is filled, and the wash\n * behind an unfilled control on hover. Tone and variant are then independent\n * axes with no compound per pair.\n */\ninterface Tone {\n readonly fill: string\n readonly fillHover: string\n readonly onFill: string\n readonly ink: string\n readonly wash: string\n}\n\nconst tone = (value: Tone): StyleValue =>\n variant(\n Style.self({\n '--_fk-tone-fill': value.fill,\n '--_fk-tone-fill-hover': value.fillHover,\n '--_fk-tone-on-fill': value.onFill,\n '--_fk-tone-ink': value.ink,\n '--_fk-tone-wash': value.wash,\n }),\n )\n\nexport const toneVar = (name: 'fill' | 'fill-hover' | 'on-fill' | 'ink' | 'wash'): string =>\n `var(--_fk-tone-${name})`\n\nexport const tones = {\n accent: tone({\n fill: ref.accent.default,\n fillHover: ref.accent.hover,\n onFill: ref.accent.text,\n ink: ref.text.link,\n wash: ref.accent.subtle,\n }),\n neutral: tone({\n fill: ref.surface.default,\n fillHover: ref.surface.overt,\n onFill: ref.text.overt,\n ink: ref.text.default,\n wash: ref.surface.muted,\n }),\n danger: tone({\n fill: ref.error.default,\n fillHover: ref.error.outline,\n onFill: ref.error.text,\n ink: ref.error.outline,\n wash: ref.error.subtle,\n }),\n} as const\n","/**\n * A button: `tone` picks the colors, `variant` how they are applied, `size`\n * the density. Tone and variant are independent because a tone only sets the\n * private custom properties the variants read.\n */\nimport { Style } from 'foldkit-mixins'\nimport { ButtonSlots } from '../button.js'\nimport {\n component,\n disabled,\n focusRing,\n ref,\n tones,\n toneVar,\n transition,\n variant,\n hover,\n} from './design.js'\n\nconst size = (block: string, inline: string, font: string) =>\n variant(Style.self({ paddingBlock: block, paddingInline: inline, fontSize: font }))\n\nexport const Button = Style.recipeFor(ButtonSlots)({\n base: {\n button: component(\n Style.self({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: ref.space.xs,\n border: `${ref.border.thin} solid transparent`,\n borderRadius: ref.radius.md,\n font: 'inherit',\n fontWeight: ref.weight.medium,\n lineHeight: ref.leading.tight,\n cursor: 'pointer',\n ...transition('background-color, border-color, color'),\n }),\n focusRing,\n disabled,\n ),\n },\n variants: {\n tone: {\n accent: { button: tones.accent },\n neutral: { button: tones.neutral },\n danger: { button: tones.danger },\n },\n variant: {\n solid: {\n button: variant(\n Style.self({ background: toneVar('fill'), color: toneVar('on-fill') }),\n hover({ background: toneVar('fill-hover') }),\n ),\n },\n outline: {\n button: variant(\n Style.self({\n background: 'transparent',\n color: toneVar('ink'),\n borderColor: toneVar('fill'),\n }),\n hover({ background: toneVar('wash') }),\n ),\n },\n ghost: {\n button: variant(\n Style.self({ background: 'transparent', color: toneVar('ink') }),\n hover({ background: toneVar('wash') }),\n ),\n },\n },\n size: {\n sm: { button: size(ref.space['2xs'], ref.space.sm, ref.size.sm) },\n md: { button: size(ref.space.xs, ref.space.md, ref.size.md) },\n lg: { button: size(ref.space.sm, ref.space.lg, ref.size.lg) },\n },\n },\n defaults: { tone: 'accent', variant: 'solid', size: 'md' },\n compound: [\n {\n // A destructive primary action announces itself on focus too.\n when: { tone: 'danger', variant: 'solid' },\n style: {\n button: variant(Style.pseudo(':focus-visible', { outlineColor: ref.error.outline })),\n },\n },\n {\n // A small ghost button sits in dense toolbars: trim it to its label.\n when: { variant: 'ghost', size: 'sm' },\n style: { button: variant(Style.self({ paddingInline: ref.space['2xs'] })) },\n },\n ],\n})\n","/**\n * A modal dialog: the backdrop dims the page and the panel is a raised\n * surface. `size` is the panel's maximum width.\n */\nimport { Style } from 'foldkit-mixins'\nimport { DialogSlots } from '../dialog.js'\nimport { component, focusRing, ref, variant, hover } from './design.js'\n\nconst width = (max: string) => variant(Style.self({ maxInlineSize: `min(${max}, 100% - 2rem)` }))\n\nexport const Dialog = Style.recipeFor(DialogSlots)({\n base: {\n dialog: component(\n Style.self({\n padding: '0',\n border: '0',\n background: 'transparent',\n color: ref.text.default,\n maxInlineSize: '100%',\n maxBlockSize: '100%',\n }),\n Style.pseudo('::backdrop', { background: 'transparent' }),\n ),\n backdrop: component(\n Style.self({\n position: 'fixed',\n inset: '0',\n background: `color-mix(in oklch, ${ref.surface.bedrock} 45%, transparent)`,\n }),\n ),\n panel: component(\n Style.self({\n position: 'relative',\n display: 'grid',\n gap: ref.space.sm,\n inlineSize: '100%',\n marginInline: 'auto',\n padding: ref.space.lg,\n border: `${ref.border.thin} solid ${ref.outline.subtle}`,\n borderRadius: ref.radius.lg,\n background: ref.surface.base,\n boxShadow: `0 1rem 3rem color-mix(in oklch, ${ref.surface.bedrock} 25%, transparent)`,\n }),\n ),\n title: component(\n Style.self({\n margin: '0',\n color: ref.text.overt,\n fontFamily: ref.font.heading,\n fontSize: ref.size.xl,\n fontWeight: ref.weight.semibold,\n lineHeight: ref.leading.tight,\n }),\n ),\n description: component(Style.self({ margin: '0', color: ref.text.muted })),\n closeButton: component(\n Style.self({\n position: 'absolute',\n insetBlockStart: ref.space.sm,\n insetInlineEnd: ref.space.sm,\n padding: ref.space['2xs'],\n border: '0',\n borderRadius: ref.radius.sm,\n background: 'transparent',\n color: ref.text.muted,\n cursor: 'pointer',\n }),\n hover({\n background: ref.surface.muted,\n color: ref.text.overt,\n }),\n focusRing,\n ),\n },\n variants: {\n size: {\n sm: { panel: width('24rem') },\n md: { panel: width('32rem') },\n lg: { panel: width('48rem') },\n },\n },\n defaults: { size: 'md' },\n})\n","/**\n * Text fields: `Input` and `Textarea` publish the same regions under\n * different control names, so both recipes are built from these pieces.\n */\nimport { Style, type StyleValue } from 'foldkit-mixins'\nimport { InputSlots } from '../input.js'\nimport { TextareaSlots } from '../textarea.js'\nimport { component, disabled, focusRing, ref, transition, variant } from './design.js'\n\nconst control = component(\n Style.self({\n display: 'block',\n inlineSize: '100%',\n border: `${ref.border.thin} solid ${ref.outline.default}`,\n borderRadius: ref.radius.md,\n background: ref.surface.base,\n color: ref.text.default,\n font: 'inherit',\n lineHeight: ref.leading.normal,\n ...transition('border-color, background-color'),\n }),\n Style.pseudo(':hover:not(:focus, :disabled)', { borderColor: ref.outline.overt }),\n Style.pseudo('::placeholder', { color: ref.text.muted }),\n Style.pseudo('[aria-invalid=\"true\"]', { borderColor: ref.error.outline }),\n focusRing,\n disabled,\n)\n\nconst label = component(\n Style.self({\n display: 'block',\n marginBlockEnd: ref.space['2xs'],\n color: ref.text.overt,\n fontSize: ref.size.sm,\n fontWeight: ref.weight.medium,\n }),\n)\n\nconst description = component(\n Style.self({\n marginBlockStart: ref.space['2xs'],\n color: ref.text.muted,\n fontSize: ref.size.sm,\n }),\n)\n\nconst size = (block: string, inline: string, font: string) =>\n variant(Style.self({ paddingBlock: block, paddingInline: inline, fontSize: font }))\n\nconst sizes = {\n sm: size(ref.space['2xs'], ref.space.xs, ref.size.sm),\n md: size(ref.space.xs, ref.space.sm, ref.size.md),\n lg: size(ref.space.sm, ref.space.md, ref.size.lg),\n} as const\n\nconst filled: StyleValue = variant(\n Style.self({ background: ref.surface.subtle, borderColor: 'transparent' }),\n)\nconst outlined: StyleValue = variant(Style.self({ background: ref.surface.base }))\n\nexport const Input = Style.recipeFor(InputSlots)({\n base: { input: control, label, description },\n variants: {\n size: { sm: { input: sizes.sm }, md: { input: sizes.md }, lg: { input: sizes.lg } },\n variant: { outline: { input: outlined }, filled: { input: filled } },\n },\n defaults: { size: 'md', variant: 'outline' },\n})\n\nexport const Textarea = Style.recipeFor(TextareaSlots)({\n base: {\n textarea: Style.compose(control, component(Style.self({ resize: 'vertical' }))),\n label,\n description,\n },\n variants: {\n size: { sm: { textarea: sizes.sm }, md: { textarea: sizes.md }, lg: { textarea: sizes.lg } },\n variant: { outline: { textarea: outlined }, filled: { textarea: filled } },\n },\n defaults: { size: 'md', variant: 'outline' },\n})\n","/**\n * Tabs: the selected tab is `aria-selected`, which `@foldkit/ui` writes.\n * `variant` is an underline under a rule or a pill in a tray; `size` the\n * density of each tab.\n */\nimport { Style } from 'foldkit-mixins'\nimport { TabsSlots } from '../tabs.js'\nimport { component, disabled, focusRing, ref, transition, variant, hover } from './design.js'\n\nconst selected = '[aria-selected=\"true\"]'\n\nconst size = (block: string, inline: string, font: string) =>\n variant(Style.self({ paddingBlock: block, paddingInline: inline, fontSize: font }))\n\nexport const Tabs = Style.recipeFor(TabsSlots)({\n base: {\n tablist: component(Style.self({ display: 'flex', gap: ref.space['2xs'] })),\n tab: component(\n Style.self({\n border: '0',\n background: 'transparent',\n color: ref.text.muted,\n font: 'inherit',\n fontWeight: ref.weight.medium,\n cursor: 'pointer',\n ...transition('background-color, color, box-shadow'),\n }),\n hover({ color: ref.text.overt }),\n Style.pseudo(selected, { color: ref.text.overt }),\n focusRing,\n disabled,\n ),\n panel: component(Style.self({ paddingBlock: ref.space.md })),\n },\n variants: {\n variant: {\n line: {\n tablist: variant(\n Style.self({\n boxShadow: `inset 0 calc(-1 * ${ref.border.thin}) 0 ${ref.outline.default}`,\n }),\n ),\n tab: variant(\n Style.pseudo(selected, {\n boxShadow: `inset 0 calc(-1 * ${ref.border.thick}) 0 ${ref.accent.default}`,\n }),\n ),\n },\n pill: {\n tablist: variant(\n Style.self({\n inlineSize: 'fit-content',\n padding: ref.space['3xs'],\n borderRadius: ref.radius.lg,\n background: ref.surface.muted,\n }),\n ),\n tab: variant(\n Style.self({ borderRadius: ref.radius.md }),\n Style.pseudo(selected, { background: ref.surface.base }),\n ),\n },\n },\n size: {\n sm: { tab: size(ref.space['2xs'], ref.space.sm, ref.size.sm) },\n md: { tab: size(ref.space.xs, ref.space.md, ref.size.md) },\n },\n },\n defaults: { variant: 'line', size: 'md' },\n})\n","/**\n * Checkbox and Switch: controls whose state is `aria-checked`, which\n * `@foldkit/ui` writes, so the checked look needs no input condition. `tone`\n * is the checked fill; `size` the control's box. The check mark and the\n * switch thumb are pseudo-elements, so the view renders an empty control.\n */\nimport { Style } from 'foldkit-mixins'\nimport { CheckboxSlots } from '../checkbox.js'\nimport { SwitchSlots } from '../switch.js'\nimport {\n component,\n disabled,\n focusRing,\n ref,\n tones,\n toneVar,\n transition,\n variant,\n} from './design.js'\n\nconst checked = '[aria-checked=\"true\"]'\n\nconst label = component(\n Style.self({ color: ref.text.default, fontSize: ref.size.md, cursor: 'pointer' }),\n)\n\nconst description = component(Style.self({ color: ref.text.muted, fontSize: ref.size.sm }))\n\n/** The control's edge length; the check mark and the thumb scale from it. */\nconst box = (length: string) => variant(Style.self({ '--_fk-toggle-size': length }))\n\nconst sizes = {\n sm: box('0.875rem'),\n md: box('1rem'),\n lg: box('1.25rem'),\n} as const\n\nconst edge = 'var(--_fk-toggle-size)'\n\nexport const Checkbox = Style.recipeFor(CheckboxSlots)({\n base: {\n checkbox: component(\n Style.self({\n position: 'relative',\n display: 'inline-block',\n flexShrink: '0',\n inlineSize: edge,\n blockSize: edge,\n padding: '0',\n border: `${ref.border.thin} solid ${ref.outline.overt}`,\n borderRadius: ref.radius.sm,\n background: ref.surface.base,\n cursor: 'pointer',\n ...transition('background-color, border-color'),\n }),\n Style.pseudo(`:is(${checked}, [aria-checked=\"mixed\"])`, {\n background: toneVar('fill'),\n borderColor: toneVar('fill'),\n }),\n // A check: two borders of a box, rotated; a dash when mixed.\n Style.pseudo(`${checked}::after`, {\n content: '\"\"',\n position: 'absolute',\n insetBlockStart: '12%',\n insetInlineStart: '32%',\n inlineSize: '32%',\n blockSize: '56%',\n border: `solid ${toneVar('on-fill')}`,\n borderWidth: '0 2px 2px 0',\n rotate: '45deg',\n }),\n Style.pseudo('[aria-checked=\"mixed\"]::after', {\n content: '\"\"',\n position: 'absolute',\n inset: '45% 20%',\n background: toneVar('on-fill'),\n }),\n focusRing,\n disabled,\n ),\n label,\n description,\n },\n variants: {\n tone: {\n accent: { checkbox: tones.accent },\n neutral: { checkbox: tones.neutral },\n },\n size: { sm: { checkbox: sizes.sm }, md: { checkbox: sizes.md }, lg: { checkbox: sizes.lg } },\n },\n defaults: { tone: 'accent', size: 'md' },\n})\n\nexport const Switch = Style.recipeFor(SwitchSlots)({\n base: {\n button: component(\n Style.self({\n position: 'relative',\n display: 'inline-block',\n flexShrink: '0',\n inlineSize: `calc(${edge} * 1.8)`,\n blockSize: edge,\n padding: '0',\n border: '0',\n borderRadius: ref.radius.full,\n background: ref.outline.overt,\n cursor: 'pointer',\n ...transition('background-color'),\n }),\n Style.pseudo('::before', {\n content: '\"\"',\n position: 'absolute',\n insetBlockStart: '2px',\n insetInlineStart: '2px',\n inlineSize: `calc(${edge} - 4px)`,\n blockSize: `calc(${edge} - 4px)`,\n borderRadius: ref.radius.full,\n background: ref.surface.base,\n transitionProperty: 'translate',\n transitionDuration: ref.motion.fast,\n transitionTimingFunction: ref.motion.ease,\n }),\n Style.pseudo(checked, { background: toneVar('fill') }),\n Style.pseudo(`${checked}::before`, { translate: `calc(${edge} * 0.8) 0` }),\n focusRing,\n disabled,\n ),\n label,\n description,\n },\n variants: {\n tone: {\n accent: { button: tones.accent },\n neutral: { button: tones.neutral },\n },\n size: { sm: { button: sizes.sm }, md: { button: sizes.md }, lg: { button: sizes.lg } },\n },\n defaults: { tone: 'accent', size: 'md' },\n})\n","/**\n * Shipped recipes for the slot contracts this package publishes. Each is a\n * `Style.recipeFor` over those slots, so an application selects variants,\n * hands the pieces to `Style.forSlots`, and adjusts a recipe with `extend`\n * instead of forking it. Bases are in the `components` layer and variants in\n * `variants`, of `Layers.standard`.\n */\nexport { Button } from './button.js'\nexport { Dialog } from './dialog.js'\nexport { Input, Textarea } from './field.js'\nexport { Tabs } from './tabs.js'\nexport { Checkbox, Switch } from './toggle.js'\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAaA,MAAa,SAAS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
- "version": "0.2.0",
3
+ "version": "0.4.0",
4
4
  "description": "Published slot contracts and mixin adapters for @foldkit/ui, built on foldkit-mixins.",
5
5
  "keywords": [
6
6
  "foldkit",
@@ -38,18 +38,19 @@
38
38
  "LICENSE"
39
39
  ],
40
40
  "peerDependencies": {
41
- "@foldkit/ui": "^0.158.2",
42
- "effect": "^4.0.0-rc.112",
43
- "foldkit": "^0.158.2",
44
- "foldkit-mixins": "^0.2.0"
41
+ "@foldkit/ui": "^0.163.0",
42
+ "effect": "^4.0.0-rc.116",
43
+ "foldkit": "^0.163.0",
44
+ "foldkit-mixins": "^0.4.0"
45
45
  },
46
46
  "devDependencies": {
47
- "@foldkit/ui": "0.158.2",
48
- "effect": "4.0.0-rc.112",
49
- "foldkit": "0.158.2",
47
+ "@effect/platform-browser": "4.0.0-rc.116",
48
+ "@foldkit/ui": "0.163.0",
49
+ "effect": "4.0.0-rc.116",
50
+ "foldkit": "0.163.0",
50
51
  "tsdown": "^0.23.0",
51
- "typescript": "^5.7.2",
52
- "foldkit-mixins": "0.2.0"
52
+ "typescript": "5.9.3",
53
+ "foldkit-mixins": "0.4.0"
53
54
  },
54
55
  "scripts": {
55
56
  "build": "tsdown",