foldkit-mixins-ui 0.5.0 → 0.6.1

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.
package/README.md CHANGED
@@ -236,6 +236,23 @@ const emailField = (value: string, h: HtmlBuilder<Message>) =>
236
236
  )
237
237
  ```
238
238
 
239
+ `Input.field` and `Textarea.field` draw a whole field from a
240
+ `FieldValidation.Field`: the value, its first error or checking mark as the
241
+ description, and `aria-invalid` where the field is invalid. `changed` maps the
242
+ typed value to a Message; `label` is the text over the control; and `draw`
243
+ places the resolved `label`, `control`, and `description` bundles (the default
244
+ stacks them):
245
+
246
+ ```ts
247
+ import { Input } from 'foldkit-mixins-ui'
248
+
249
+ const titleField = (field: FieldValidation.Field<string>, h: HtmlBuilder<Message>) =>
250
+ Input.field(
251
+ { id: 'title', label: 'Title', field, changed: value => Message.TypedTitle({ value }) },
252
+ h,
253
+ )
254
+ ```
255
+
239
256
  `resolve` is the seam underneath, for bundles already in hand: a view that
240
257
  receives a Tabs `render` as its input, or a Calendar whose Mixins read the
241
258
  mode it is showing, which is only known once the attributes arrive:
package/dist/index.mjs CHANGED
@@ -1368,7 +1368,7 @@ const Segmented = Style.recipeFor(SegmentedSlots)({
1368
1368
  base: {
1369
1369
  group: component(Style.nest(`> [aria-pressed="true"]`, {
1370
1370
  background: ref.surface.base,
1371
- boxShadow: "0 1px 2px rgb(0 0 0 / 10%)",
1371
+ boxShadow: ref.shadow.xs,
1372
1372
  color: ref.text.overt,
1373
1373
  cursor: "default",
1374
1374
  fontWeight: ref.weight.semibold
@@ -1422,6 +1422,7 @@ const width = (max) => variant(Style.self({ maxInlineSize: `min(${max}, 100% - 2
1422
1422
  const Dialog = Style.recipeFor(DialogSlots)({
1423
1423
  base: {
1424
1424
  dialog: component(Style.self({
1425
+ margin: "auto",
1425
1426
  padding: "0",
1426
1427
  border: "0",
1427
1428
  background: "transparent",
@@ -1444,7 +1445,7 @@ const Dialog = Style.recipeFor(DialogSlots)({
1444
1445
  border: `${ref.border.thin} solid ${ref.outline.subtle}`,
1445
1446
  borderRadius: ref.radius.lg,
1446
1447
  background: ref.surface.base,
1447
- boxShadow: `0 1rem 3rem color-mix(in oklch, ${ref.surface.bedrock} 25%, transparent)`
1448
+ boxShadow: ref.shadow.xl
1448
1449
  })),
1449
1450
  title: component(Style.self({
1450
1451
  margin: "0",
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["resolve","toView","view","buttonView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","view","inputView","field","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","view","textareaView","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/icons.ts","../src/field.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/badge.ts","../src/recipes/button.ts","../src/segmented.ts","../src/recipes/segmented.ts","../src/recipes/dialog.ts","../src/recipes/field.ts","../src/recipes/tabs.ts","../src/recipes/toggle.ts","../src/recipes/index.ts","../src/touch.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 {\n SlotView,\n type MixinValue,\n type SlotAttributes,\n type SlotBuilders,\n type StaticMixin,\n} from 'foldkit-mixins'\n\nexport type MixinList<Message> = ReadonlyArray<\n MixinValue<Message> | MixinValue<never> | StaticMixin<Message>\n>\n\nexport interface ResolveContext<Input, Message> {\n /** What an input-driven Mixin reads; omit it when no attached Mixin reads one. */\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\n/** A component's `Base` bundles with every slot among them resolved. */\nexport type Resolved<Base, Slots, Message> = Omit<Base, keyof Slots> & ResolvedSlots<Slots, Message>\n\n/** `SlotView.buildersFor` over a context whose `input` may be left out. */\nexport const buildersOf = <Slots, Input, Message>(\n slots: Slots,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): SlotBuilders<Slots, Message> =>\n SlotView.buildersFor(slots, mixins, { input: context.input, h: context.h })\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 ): Resolved<Base, Slots, Message> => {\n const builders = buildersOf(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 Resolved<Base, Slots, Message>\n }\n","import { view as buttonView, type ButtonAttributes } from '@foldkit/ui/button'\nimport { Attr, Capability, Event, Slot, Slots, type NamedStyle } from 'foldkit-mixins'\nimport type { Html, HtmlBuilder } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The button's bundles with the attached Mixins applied. */\nexport type ResolvedButton<Message> = Resolved<\n ButtonAttributes<Message>,\n typeof ButtonSlots,\n Message\n>\n\n/** Applies `mixins` to the button's bundles. */\nexport const resolve = <Input, Message>(\n attributes: ButtonAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedButton<Message> => resolveFor(ButtonSlots, mixins, context)(attributes)\n\n/** The button's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedButton<Message>) => Html,\n ) =>\n (attributes: ButtonAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n\n/**\n * A button in one call: the label, a style for its slot, and the rest of\n * `@foldkit/ui`'s own config. `toView` stays for a button drawn as something\n * else (an `a`, a split control); this covers the common case.\n */\nexport interface ButtonView<Message> {\n /** The button's text. */\n readonly label: string\n /** A style of `ButtonSlots`, for the button's own look. */\n readonly style?: NamedStyle<typeof ButtonSlots> | undefined\n /** Mixins beside the style, for state or behavior the style does not own. */\n readonly mixins?: MixinList<Message> | undefined\n /** What an input-driven Mixin reads; omit it when no attached Mixin reads one. */\n readonly input?: unknown\n readonly type?: 'button' | 'submit' | 'reset' | undefined\n readonly disabled?: boolean | undefined\n readonly onClick?: Message | undefined\n}\n\nexport const view = <Message>(options: ButtonView<Message>, h: HtmlBuilder<Message>): Html =>\n buttonView(\n {\n ...(options.type === undefined ? {} : { type: options.type }),\n ...(options.disabled === undefined ? {} : { isDisabled: options.disabled }),\n ...(options.onClick === undefined ? {} : { onClick: options.onClick }),\n toView: toView(\n [...(options.style === undefined ? [] : [options.style.mixin]), ...(options.mixins ?? [])],\n { input: options.input, h },\n ({ button }) => h.button(button, [options.label]),\n ),\n },\n h,\n )\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, type SlotAttributes } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { buildersOf, type MixinList, type 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 = buildersOf(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\n/**\n * The calendar's `toView`: `draw` receives its bundles with `mixins` applied.\n * A Mixin that reads the mode needs `resolve`, whose `input` can be `_tag`.\n */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedCalendar<Message>) => Html,\n ) =>\n (attributes: CalendarAttributes): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { CheckboxAttributes } from '@foldkit/ui/checkbox'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The checkbox's bundles with the attached Mixins applied. */\nexport type ResolvedCheckbox<Message> = Resolved<\n CheckboxAttributes<Message>,\n typeof CheckboxSlots,\n Message\n>\n\n/** Applies `mixins` to the checkbox's bundles. */\nexport const resolve = <Input, Message>(\n attributes: CheckboxAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedCheckbox<Message> => resolveFor(CheckboxSlots, mixins, context)(attributes)\n\n/** The checkbox's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedCheckbox<Message>) => Html,\n ) =>\n (attributes: CheckboxAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { RenderInfo } from '@foldkit/ui/dialog'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The dialog's bundles with the attached Mixins applied. */\nexport type ResolvedDialog<Message> = Resolved<RenderInfo, typeof DialogSlots, Message>\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): ResolvedDialog<Message> => resolveFor(DialogSlots, mixins, context)(render)\n\n/** The dialog's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedDialog<Message>) => Html,\n ) =>\n (render: RenderInfo): Html =>\n draw(resolve(render, mixins, context))\n","import type { DisclosureAttributes } from '@foldkit/ui/disclosure'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The disclosure's bundles with the attached Mixins applied. */\nexport type ResolvedDisclosure<Message> = Resolved<\n DisclosureAttributes<Message>,\n typeof DisclosureSlots,\n Message\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): ResolvedDisclosure<Message> => resolveFor(DisclosureSlots, mixins, context)(attributes)\n\n/** The disclosure's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedDisclosure<Message>) => Html,\n ) =>\n (attributes: DisclosureAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { FieldsetAttributes } from '@foldkit/ui/fieldset'\nimport { Attr, Capability, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The fieldset's bundles with the attached Mixins applied. */\nexport type ResolvedFieldset<Message> = Resolved<\n FieldsetAttributes<Message>,\n typeof FieldsetSlots,\n Message\n>\n\n/** Applies `mixins` to the fieldset's bundles. */\nexport const resolve = <Input, Message>(\n attributes: FieldsetAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedFieldset<Message> => resolveFor(FieldsetSlots, mixins, context)(attributes)\n\n/** The fieldset's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedFieldset<Message>) => Html,\n ) =>\n (attributes: FieldsetAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { RenderInfo } from '@foldkit/ui/hoverIntent'\nimport { Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The hover intent's bundles with the attached Mixins applied. */\nexport type ResolvedHoverIntent<Message> = Resolved<RenderInfo, typeof HoverIntentSlots, Message>\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): ResolvedHoverIntent<Message> => resolveFor(HoverIntentSlots, mixins, context)(render)\n\n/** The hover intent's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedHoverIntent<Message>) => Html,\n ) =>\n (render: RenderInfo): Html =>\n draw(resolve(render, mixins, context))\n","/**\n * Attribute-dispatched mask icons: mechanisms, not components. An element\n * shows the icon its attribute names, drawn from `--icon` over the text's\n * color. Where an icon comes from (a data URI, a file) is the application's:\n * pass resolved `url(…)` strings. No slots, no views.\n */\nimport { Style, type StyleValue } from 'foldkit-mixins'\n\n/** Draws the icon in `--icon` before the element's words, in their color. */\nexport const glyph = (size: string): StyleValue =>\n Style.nest('&::before', {\n WebkitMask: 'var(--icon) center / contain no-repeat',\n background: 'currentColor',\n content: '\"\"',\n flexShrink: '0',\n height: size,\n mask: 'var(--icon) center / contain no-repeat',\n width: size,\n })\n\n/** Sets `--icon` by an attribute's value: each value its own icon. */\nexport const byAttribute = (\n attribute: string,\n icons: Readonly<Record<string, string>>,\n): StyleValue =>\n Style.compose(\n ...Object.entries(icons).map(([value, url]) =>\n Style.nest(`&[${attribute}=\"${value}\"]`, { '--icon': url }),\n ),\n )\n","/**\n * What `Input.field` and `Textarea.field` share: a text field's description\n * from its validation state, and the parts a custom `draw` places. (The\n * `Field` recipe styles in `recipes/` are the look; this is the wiring.)\n */\nimport { Array, Option } from 'effect'\nimport { FieldValidation } from 'foldkit'\nimport type { Html } from 'foldkit/html'\n\n/** A labelled field's pieces, drawn: the label, the control, and its description. */\nexport interface FieldParts {\n readonly label: Html\n readonly control: Html\n readonly description: Html\n}\n\n/** What a text field says under itself: its first error, or that it is being checked. */\nexport const descriptionOf = (field: FieldValidation.Field<unknown>): Option.Option<string> =>\n FieldValidation.match(field, {\n onNotValidated: () => Option.none(),\n onValidating: () => Option.some('Checking…'),\n onValid: () => Option.none(),\n onInvalid: ({ errors }) => Array.head(errors),\n })\n","import { view as inputView, type InputAttributes } from '@foldkit/ui/input'\nimport { Option } from 'effect'\nimport { Attr, Capability, Event, Slot, Slots, type NamedStyle } from 'foldkit-mixins'\nimport { FieldValidation } from 'foldkit'\nimport type { Html, HtmlBuilder } from 'foldkit/html'\nimport { descriptionOf, type FieldParts } from './field.js'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The input's bundles with the attached Mixins applied. */\nexport type ResolvedInput<Message> = Resolved<InputAttributes<Message>, typeof InputSlots, Message>\n\n/** Applies `mixins` to the input's bundles. */\nexport const resolve = <Input, Message>(\n attributes: InputAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedInput<Message> => resolveFor(InputSlots, mixins, context)(attributes)\n\n/** The input's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedInput<Message>) => Html,\n ) =>\n (attributes: InputAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n\n/**\n * An input in one call: its value and Messages, a style for its slots, and\n * the rest of `@foldkit/ui`'s own config. `draw` places the resolved `input`,\n * `label`, and `description` bundles; this covers the common case, while\n * `toView` stays for one drawn as something else.\n */\nexport interface InputView<Message> {\n readonly id: string\n readonly value?: string | undefined\n readonly onInput?: ((value: string) => Message) | undefined\n readonly disabled?: boolean | undefined\n readonly invalid?: boolean | undefined\n readonly described?: boolean | undefined\n readonly type?: string | undefined\n readonly placeholder?: string | undefined\n /** A style of `InputSlots`, for the input's own look. */\n readonly style?: NamedStyle<typeof InputSlots> | undefined\n /** Mixins beside the style, for state or behavior the style does not own. */\n readonly mixins?: MixinList<Message> | undefined\n /** What an input-driven Mixin reads; omit it when no attached Mixin reads one. */\n readonly input?: unknown\n readonly draw: (resolved: ResolvedInput<Message>, h: HtmlBuilder<Message>) => Html\n}\n\nexport const view = <Message>(options: InputView<Message>, h: HtmlBuilder<Message>): Html =>\n inputView(\n {\n id: options.id,\n ...(options.value === undefined ? {} : { value: options.value }),\n ...(options.onInput === undefined ? {} : { onInput: options.onInput }),\n ...(options.disabled === undefined ? {} : { isDisabled: options.disabled }),\n ...(options.invalid === undefined ? {} : { isInvalid: options.invalid }),\n ...(options.described === undefined ? {} : { hasDescription: options.described }),\n ...(options.type === undefined ? {} : { type: options.type }),\n ...(options.placeholder === undefined ? {} : { placeholder: options.placeholder }),\n toView: toView(\n [...(options.style === undefined ? [] : [options.style.mixin]), ...(options.mixins ?? [])],\n { input: options.input, h },\n resolved => options.draw(resolved, h),\n ),\n },\n h,\n )\n\n/**\n * A text field in one call: a field's state drawn through `view` with its\n * label, control, and description placed. The value is drawn with\n * `String()`, as the base field view draws any draft. `draw` places\n * the parts; the default stacks them. `type` and `placeholder` ride through\n * only where given. Custom drawers stay for controls with no shipped\n * renderer.\n */\nexport interface InputField<Message> {\n readonly id: string\n readonly label: string\n readonly field: FieldValidation.Field<unknown>\n readonly changed: (value: string) => Message\n readonly type?: string | undefined\n readonly placeholder?: string | undefined\n /** A style of `InputSlots`, for the field's own look. */\n readonly style?: NamedStyle<typeof InputSlots> | undefined\n /** Mixins beside the style, for state or behavior the style does not own. */\n readonly mixins?: MixinList<Message> | undefined\n readonly draw?: ((parts: FieldParts, h: HtmlBuilder<Message>) => Html) | undefined\n}\n\nexport const field = <Message>(options: InputField<Message>, h: HtmlBuilder<Message>): Html => {\n const description = descriptionOf(options.field)\n return view(\n {\n id: options.id,\n value: String(options.field.value),\n onInput: options.changed,\n invalid: FieldValidation.isInvalid(options.field),\n described: Option.isSome(description),\n ...(options.type === undefined ? {} : { type: options.type }),\n ...(options.placeholder === undefined ? {} : { placeholder: options.placeholder }),\n style: options.style,\n mixins: options.mixins,\n input: options.field,\n draw: (resolved, h) => {\n const parts: FieldParts = {\n label: h.label(resolved.label, [options.label]),\n control: h.input(resolved.input),\n description: Option.match(description, {\n onNone: () => h.empty,\n onSome: text => h.span(resolved.description, [text]),\n }),\n }\n return options.draw === undefined\n ? h.div([], [parts.label, parts.control, parts.description])\n : options.draw(parts, h)\n },\n },\n h,\n )\n}\n","import type { RenderInfo } from '@foldkit/ui/popover'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The popover's bundles with the attached Mixins applied. */\nexport type ResolvedPopover<Message> = Resolved<RenderInfo, typeof PopoverSlots, Message>\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): ResolvedPopover<Message> => resolveFor(PopoverSlots, mixins, context)(render)\n\n/** The popover's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedPopover<Message>) => Html,\n ) =>\n (render: RenderInfo): Html =>\n draw(resolve(render, mixins, context))\n","import type { OptionInfo, RenderInfo } from '@foldkit/ui/radioGroup'\nimport { Attr, Capability, Event, Slot, Slots, type SlotAttributes } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { buildersOf, type MixinList, type 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/** One option with the attached Mixins applied to its bundles. */\nexport type ResolvedRadioOption<Value extends string, Message> = Omit<\n OptionInfo<Value>,\n 'option' | 'label' | 'description'\n> & {\n readonly option: SlotAttributes<Message>\n readonly label: SlotAttributes<Message>\n readonly description: SlotAttributes<Message>\n}\n\n/** The radio group's bundles with the attached Mixins applied. */\nexport interface ResolvedRadioGroup<Value extends string, Message> {\n readonly group: SlotAttributes<Message>\n readonly options: ReadonlyArray<ResolvedRadioOption<Value, Message>>\n readonly selectedValue: RenderInfo<Value>['selectedValue']\n readonly hiddenInput: SlotAttributes<Message>\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): ResolvedRadioGroup<Value, Message> => {\n const builders = buildersOf(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\n/** The radio group's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Value extends string, Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedRadioGroup<Value, Message>) => Html,\n ) =>\n (render: RenderInfo<Value>): Html =>\n draw(resolve(render, mixins, context))\n","import type { SelectAttributes } from '@foldkit/ui/select'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The select's bundles with the attached Mixins applied. */\nexport type ResolvedSelect<Message> = Resolved<\n SelectAttributes<Message>,\n typeof SelectSlots,\n Message\n>\n\n/** Applies `mixins` to the select's bundles. */\nexport const resolve = <Input, Message>(\n attributes: SelectAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedSelect<Message> => resolveFor(SelectSlots, mixins, context)(attributes)\n\n/** The select's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedSelect<Message>) => Html,\n ) =>\n (attributes: SelectAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { SliderAttributes } from '@foldkit/ui/slider'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The slider's bundles with the attached Mixins applied. */\nexport type ResolvedSlider<Message> = Resolved<SliderAttributes, typeof SliderSlots, Message>\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): ResolvedSlider<Message> => resolveFor(SliderSlots, mixins, context)(render)\n\n/** The slider's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedSlider<Message>) => Html,\n ) =>\n (render: SliderAttributes): Html =>\n draw(resolve(render, mixins, context))\n","import type { SwitchAttributes } from '@foldkit/ui/switch'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The switch's bundles with the attached Mixins applied. */\nexport type ResolvedSwitch<Message> = Resolved<\n SwitchAttributes<Message>,\n typeof SwitchSlots,\n Message\n>\n\n/** Applies `mixins` to the switch's bundles. */\nexport const resolve = <Input, Message>(\n attributes: SwitchAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedSwitch<Message> => resolveFor(SwitchSlots, mixins, context)(attributes)\n\n/** The switch's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedSwitch<Message>) => Html,\n ) =>\n (attributes: SwitchAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { RenderInfo, TabInfo } from '@foldkit/ui/tabs'\nimport { Attr, Capability, Event, Slot, Slots, type SlotAttributes } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { buildersOf, type MixinList, type 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 = buildersOf(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\n/** The tabs' `toView`: `draw` receives their bundles with `mixins` applied. */\nexport const toView =\n <Value extends string, Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedTabs<Value, Message>) => Html,\n ) =>\n (render: RenderInfo<Value>): Html =>\n draw(resolve(render, mixins, context))\n","import { view as textareaView, type TextareaAttributes } from '@foldkit/ui/textarea'\nimport { Option } from 'effect'\nimport { Attr, Capability, Event, Slot, Slots, type NamedStyle } from 'foldkit-mixins'\nimport { FieldValidation } from 'foldkit'\nimport type { ChildAttribute, Html, HtmlBuilder, TextareaAttribute } from 'foldkit/html'\nimport { descriptionOf, type FieldParts } from './field.js'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/**\n * The textarea's bundles with the attached Mixins applied. `textarea` is typed\n * for `h.textarea`, which refuses `InnerHTML`.\n */\nexport type ResolvedTextarea<Message> = Omit<\n Resolved<TextareaAttributes<Message>, typeof TextareaSlots, Message>,\n 'textarea'\n> & {\n readonly textarea: ReadonlyArray<TextareaAttribute<Message> | ChildAttribute>\n}\n\n/** Applies `mixins` to the textarea's bundles. */\nexport const resolve = <Input, Message>(\n attributes: TextareaAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedTextarea<Message> =>\n // The base bundle holds no `InnerHTML` (its type excludes it) and the resolver\n // refuses one from any Mixin (`mixins:structural-override`), so none is left.\n resolveFor(TextareaSlots, mixins, context)(attributes) as ResolvedTextarea<Message>\n\n/** The textarea's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedTextarea<Message>) => Html,\n ) =>\n (attributes: TextareaAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n\n/**\n * A textarea in one call: its value and Messages, a style for its slots, and\n * the rest of `@foldkit/ui`'s own config. `draw` places the resolved\n * `textarea`, `label`, and `description` bundles.\n */\nexport interface TextareaView<Message> {\n readonly id: string\n readonly value?: string | undefined\n readonly onInput?: ((value: string) => Message) | undefined\n readonly disabled?: boolean | undefined\n readonly invalid?: boolean | undefined\n readonly described?: boolean | undefined\n readonly rows?: number | undefined\n readonly placeholder?: string | undefined\n /** A style of `TextareaSlots`, for the textarea's own look. */\n readonly style?: NamedStyle<typeof TextareaSlots> | undefined\n /** Mixins beside the style, for state or behavior the style does not own. */\n readonly mixins?: MixinList<Message> | undefined\n /** What an input-driven Mixin reads; omit it when no attached Mixin reads one. */\n readonly input?: unknown\n readonly draw: (resolved: ResolvedTextarea<Message>, h: HtmlBuilder<Message>) => Html\n}\n\nexport const view = <Message>(options: TextareaView<Message>, h: HtmlBuilder<Message>): Html =>\n textareaView(\n {\n id: options.id,\n ...(options.value === undefined ? {} : { value: options.value }),\n ...(options.onInput === undefined ? {} : { onInput: options.onInput }),\n ...(options.disabled === undefined ? {} : { isDisabled: options.disabled }),\n ...(options.invalid === undefined ? {} : { isInvalid: options.invalid }),\n ...(options.described === undefined ? {} : { hasDescription: options.described }),\n ...(options.rows === undefined ? {} : { rows: options.rows }),\n ...(options.placeholder === undefined ? {} : { placeholder: options.placeholder }),\n toView: toView(\n [...(options.style === undefined ? [] : [options.style.mixin]), ...(options.mixins ?? [])],\n { input: options.input, h },\n resolved => options.draw(resolved, h),\n ),\n },\n h,\n )\n\n/**\n * A textarea field in one call: a field's state drawn through `view` with\n * its label, control, and description placed. The value is drawn with\n * `String()`, as the base field view draws any draft. `draw`\n * places the parts; the default stacks them. `rows` and `placeholder` ride\n * through only where given. Custom drawers stay for controls with no\n * shipped renderer.\n */\nexport interface TextareaField<Message> {\n readonly id: string\n readonly label: string\n readonly field: FieldValidation.Field<unknown>\n readonly changed: (value: string) => Message\n readonly rows?: number | undefined\n readonly placeholder?: string | undefined\n /** A style of `TextareaSlots`, for the field's own look. */\n readonly style?: NamedStyle<typeof TextareaSlots> | undefined\n /** Mixins beside the style, for state or behavior the style does not own. */\n readonly mixins?: MixinList<Message> | undefined\n readonly draw?: ((parts: FieldParts, h: HtmlBuilder<Message>) => Html) | undefined\n}\n\nexport const field = <Message>(options: TextareaField<Message>, h: HtmlBuilder<Message>): Html => {\n const description = descriptionOf(options.field)\n return view(\n {\n id: options.id,\n value: String(options.field.value),\n onInput: options.changed,\n invalid: FieldValidation.isInvalid(options.field),\n described: Option.isSome(description),\n ...(options.rows === undefined ? {} : { rows: options.rows }),\n ...(options.placeholder === undefined ? {} : { placeholder: options.placeholder }),\n style: options.style,\n mixins: options.mixins,\n input: options.field,\n draw: (resolved, h) => {\n const parts: FieldParts = {\n label: h.label(resolved.label, [options.label]),\n control: h.textarea(resolved.textarea),\n description: Option.match(description, {\n onNone: () => h.empty,\n onSome: text => h.span(resolved.description, [text]),\n }),\n }\n return options.draw === undefined\n ? h.div([], [parts.label, parts.control, parts.description])\n : options.draw(parts, h)\n },\n },\n h,\n )\n}\n","import type { RenderInfo } from '@foldkit/ui/tooltip'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The tooltip's bundles with the attached Mixins applied. */\nexport type ResolvedTooltip<Message> = Resolved<RenderInfo, typeof TooltipSlots, Message>\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): ResolvedTooltip<Message> => resolveFor(TooltipSlots, mixins, context)(render)\n\n/** The tooltip's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedTooltip<Message>) => Html,\n ) =>\n (render: RenderInfo): Html =>\n draw(resolve(render, mixins, context))\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['on-fill'],\n ink: ref.accent.ink,\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['on-fill'],\n ink: ref.error.ink,\n wash: ref.error.subtle,\n }),\n} as const\n","/**\n * A status pill: the base pill with a dot, toned by an attribute's value.\n *\n * Unlike the variant recipes, every tone is present at once: one style serves\n * badges in every state, so there is no variant axis to select. `Badge` takes\n * the attribute carrying the value and the value-to-tone map instead; values\n * the map leaves out keep the base.\n */\nimport { Style, type StyleValue } from 'foldkit-mixins'\nimport { component, ref, variant } from './design.js'\n\n/** The palette families a badge value can take; unmapped values keep the base. */\nexport type BadgeTone = 'success' | 'warning' | 'info' | 'error'\n\nexport interface BadgeOptions {\n /** The attribute carrying the value, such as 'data-state'. */\n readonly attribute: string\n /** Which tone each attribute value takes. */\n readonly tones: Readonly<Record<string, BadgeTone>>\n}\n\nconst toned = (attribute: string, value: string, tone: BadgeTone): StyleValue =>\n variant(\n Style.nest(`&[${attribute}=\"${value}\"]`, {\n background: `color-mix(in oklch, ${ref[tone].default} 14%, ${ref.surface.base})`,\n color: ref[tone].ink,\n }),\n )\n\n/** The badge's piece for the application's own badge slot. */\nexport const Badge = (options: BadgeOptions): { readonly badge: StyleValue } => ({\n badge: component(\n Style.self({\n alignItems: 'center',\n background: ref.surface.muted,\n borderRadius: ref.radius.full,\n color: ref.text.muted,\n display: 'inline-flex',\n fontSize: ref.size.xs,\n fontWeight: ref.weight.semibold,\n gap: '0.35rem',\n padding: '0.15rem 0.6rem',\n whiteSpace: 'nowrap',\n }),\n // A dot before the words, in the pill's own color.\n Style.nest('&::before', {\n background: 'currentColor',\n borderRadius: '50%',\n content: '\"\"',\n height: '0.4rem',\n width: '0.4rem',\n }),\n ...Object.entries(options.tones).map(([value, tone]) => toned(options.attribute, value, tone)),\n ),\n})\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 — except `primary`, which is\n * ink by definition, and `icon`, which fixes its own square geometry (combine\n * it with `size: null`, since a density would un-square it).\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\n/**\n * Text on a button with no fill: the tone's ink, unless a container drawn in a\n * color of its own sets `--fk-ink` (as it sets `--fk-heading`), where the ink\n * would not read.\n */\nconst unfilledInk = `var(--fk-ink, ${toneVar('ink')})`\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 // A link drawn as a button (`Anchor`) is not underlined like one in running text.\n textDecoration: 'none',\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: unfilledInk,\n borderColor: toneVar('fill'),\n }),\n hover({ background: toneVar('wash') }),\n ),\n },\n ghost: {\n button: variant(\n Style.self({ background: 'transparent', color: unfilledInk }),\n hover({ background: toneVar('wash') }),\n ),\n },\n /**\n * The main action, dark as the page's ink: tone-independent, so it reads\n * on any surface. Density still comes from `size`.\n */\n primary: {\n button: variant(\n Style.self({ background: ref.text.overt, color: ref.surface.base }),\n hover({\n background: `color-mix(in oklch, ${ref.text.overt} 85%, ${ref.surface.base})`,\n }),\n ),\n },\n /**\n * An icon with no words beside it: a square that centers its glyph. The\n * words stay the accessible name; only the icon shows, so label it with\n * `aria-label` or visually-hidden text.\n */\n icon: {\n button: variant(\n Style.self({\n background: 'transparent',\n color: ref.text.muted,\n width: '2rem',\n height: '2rem',\n padding: '0',\n fontSize: '0',\n }),\n hover({ background: toneVar('wash'), color: ref.text.overt }),\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","import { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\n\n/**\n * A segmented control: one `group` of pressed-button `option`s. Plain\n * buttons, not tabs: the group is `role=\"group\"`, each option carries\n * `aria-pressed`, and there are no arrow keys or roving tabindex.\n */\nexport const SegmentedSlots = Slots.define({\n group: Slot.make({\n capability: Capability.Container,\n attributes: [Attr.Role, Attr.AriaLabel],\n }),\n option: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.AriaPressed, Attr.Disabled, Attr.AriaDisabled],\n }),\n})\n","/**\n * A segmented control: a tray of toggle buttons where pressing selects. The\n * pressed option rises from the tray: that rule lives on the group\n * (`> [aria-pressed=\"true\"]`), so icon tiles take the group piece alone and\n * share it with text options. The tray sets no `display`: the Builder owns\n * its narrow tabs' visibility, and every other tray lays itself out.\n */\nimport { Style } from 'foldkit-mixins'\nimport { SegmentedSlots } from '../segmented.js'\nimport { component, hover, ref, variant } from './design.js'\n\nconst pressed = '[aria-pressed=\"true\"]'\n\nexport const Segmented = Style.recipeFor(SegmentedSlots)({\n base: {\n group: component(\n // One pressed rule for text and icon tiles alike.\n Style.nest(`> ${pressed}`, {\n background: ref.surface.base,\n boxShadow: '0 1px 2px rgb(0 0 0 / 10%)',\n color: ref.text.overt,\n cursor: 'default',\n fontWeight: ref.weight.semibold,\n }),\n ),\n option: component(\n Style.self({\n background: 'transparent',\n border: '0',\n borderRadius: ref.radius.sm,\n color: ref.text.muted,\n cursor: 'pointer',\n font: 'inherit',\n fontWeight: ref.weight.medium,\n }),\n hover({ color: ref.text.overt }),\n ),\n },\n variants: {\n tray: {\n tray: {\n group: variant(\n Style.self({\n background: ref.surface.muted,\n borderRadius: ref.radius.md,\n gap: '2px',\n padding: '2px',\n }),\n ),\n },\n plain: {\n group: variant(Style.self({ display: 'flex', gap: ref.space['3xs'] })),\n },\n },\n size: {\n sm: {\n option: variant(Style.self({ fontSize: ref.size.sm, padding: '0.4rem 0.75rem' })),\n },\n xs: {\n option: variant(Style.self({ fontSize: ref.size.xs, padding: '0.35rem 0.4rem' })),\n },\n },\n },\n defaults: { tray: 'tray', size: 'sm' },\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 { Badge, type BadgeOptions, type BadgeTone } from './badge.js'\nexport { Button } from './button.js'\nexport { Segmented } from './segmented.js'\nexport { Dialog } from './dialog.js'\nexport { Input, Textarea } from './field.js'\nexport { Tabs } from './tabs.js'\nexport { Checkbox, Switch } from './toggle.js'\n","/**\n * Touch targets: mechanisms, not components. No slots, no views: compose\n * these into an application's own slots.\n */\nimport { Style, type StyleValue } from 'foldkit-mixins'\n\n/**\n * On a touch screen, a control a finger can hit: 44px, as the platforms\n * advise. Only where the pointer is coarse, so a desktop keeps its density.\n */\nexport const target: StyleValue = Style.media('(pointer: coarse)', {\n minHeight: '2.75rem',\n minWidth: '2.75rem',\n})\n\n/**\n * The same, for every control a region draws: a link or button laid out as a\n * box. A link inside a sentence is inline, where `min-height` does nothing, so\n * prose keeps its lines.\n */\nexport const targets: StyleValue = Style.at(\n '@media (pointer: coarse)',\n Style.nest(':is(a, button, summary, select)', { minHeight: '2.75rem' }),\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAa,SAAS,MAAM,aAAa,UAAU;CACjD,UAAU,CAAC,OAAO,KAAK;CACvB,MAAM;;EAEJ,UAAU,OAAO;EACjB,QAAQ;EACR,cAAc,OAAO,SAAS,OAAO,OAAO;EAC5C,oBAAoB,OAAO,SAAS,OAAO,OAAO;EAClD,eAAe,OAAO,SAAS,OAAO,MAAM;EAC5C,SAAS,OAAO,SAAS,OAAO,MAAM;EACtC,cAAc,OAAO,SAAS,OAAO,MAAM;CAC7C;CACA,UAAU,EA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,QAAQ;GACxB,oBAAoB;GACpB,oBAAoB,IAAI,OAAO;GAC/B,0BAA0B,IAAI,OAAO;EACvC,CAAC,GACD,MAAM,OAAO,SAAS,EAAE,YAAY,QAAQ,MAAM,EAAE,CAAC,GACrD,MAAM,OAAO,GAAG,QAAQ,WAAW,EAAE,WAAW,QAAQ,KAAK,WAAW,CAAC,GACzE,WACA,QACF;EACA;EACA;CACF;CACA,UAAU;EACR,MAAM;GACJ,QAAQ,EAAE,QAAQ,MAAM,OAAO;GAC/B,SAAS,EAAE,QAAQ,MAAM,QAAQ;EACnC;EACA,MAAM;GAAE,IAAI,EAAE,QAAQ,MAAM,GAAG;GAAG,IAAI,EAAE,QAAQ,MAAM,GAAG;GAAG,IAAI,EAAE,QAAQ,MAAM,GAAG;EAAE;CACvF;CACA,UAAU;EAAE,MAAM;EAAU,MAAM;CAAK;AACzC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;AEhID,MAAa,SAAqB,MAAM,MAAM,qBAAqB;CACjE,WAAW;CACX,UAAU;AACZ,CAAC;;;;;;AAOD,MAAa,UAAsB,MAAM,GACvC,4BACA,MAAM,KAAK,mCAAmC,EAAE,WAAW,UAAU,CAAC,CACxE"}
1
+ {"version":3,"file":"index.mjs","names":["resolve","toView","view","buttonView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","view","inputView","field","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","resolve","toView","view","textareaView","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/icons.ts","../src/field.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/badge.ts","../src/recipes/button.ts","../src/segmented.ts","../src/recipes/segmented.ts","../src/recipes/dialog.ts","../src/recipes/field.ts","../src/recipes/tabs.ts","../src/recipes/toggle.ts","../src/recipes/index.ts","../src/touch.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 {\n SlotView,\n type MixinValue,\n type SlotAttributes,\n type SlotBuilders,\n type StaticMixin,\n} from 'foldkit-mixins'\n\nexport type MixinList<Message> = ReadonlyArray<\n MixinValue<Message> | MixinValue<never> | StaticMixin<Message>\n>\n\nexport interface ResolveContext<Input, Message> {\n /** What an input-driven Mixin reads; omit it when no attached Mixin reads one. */\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\n/** A component's `Base` bundles with every slot among them resolved. */\nexport type Resolved<Base, Slots, Message> = Omit<Base, keyof Slots> & ResolvedSlots<Slots, Message>\n\n/** `SlotView.buildersFor` over a context whose `input` may be left out. */\nexport const buildersOf = <Slots, Input, Message>(\n slots: Slots,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): SlotBuilders<Slots, Message> =>\n SlotView.buildersFor(slots, mixins, { input: context.input, h: context.h })\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 ): Resolved<Base, Slots, Message> => {\n const builders = buildersOf(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 Resolved<Base, Slots, Message>\n }\n","import { view as buttonView, type ButtonAttributes } from '@foldkit/ui/button'\nimport { Attr, Capability, Event, Slot, Slots, type NamedStyle } from 'foldkit-mixins'\nimport type { Html, HtmlBuilder } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The button's bundles with the attached Mixins applied. */\nexport type ResolvedButton<Message> = Resolved<\n ButtonAttributes<Message>,\n typeof ButtonSlots,\n Message\n>\n\n/** Applies `mixins` to the button's bundles. */\nexport const resolve = <Input, Message>(\n attributes: ButtonAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedButton<Message> => resolveFor(ButtonSlots, mixins, context)(attributes)\n\n/** The button's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedButton<Message>) => Html,\n ) =>\n (attributes: ButtonAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n\n/**\n * A button in one call: the label, a style for its slot, and the rest of\n * `@foldkit/ui`'s own config. `toView` stays for a button drawn as something\n * else (an `a`, a split control); this covers the common case.\n */\nexport interface ButtonView<Message> {\n /** The button's text. */\n readonly label: string\n /** A style of `ButtonSlots`, for the button's own look. */\n readonly style?: NamedStyle<typeof ButtonSlots> | undefined\n /** Mixins beside the style, for state or behavior the style does not own. */\n readonly mixins?: MixinList<Message> | undefined\n /** What an input-driven Mixin reads; omit it when no attached Mixin reads one. */\n readonly input?: unknown\n readonly type?: 'button' | 'submit' | 'reset' | undefined\n readonly disabled?: boolean | undefined\n readonly onClick?: Message | undefined\n}\n\nexport const view = <Message>(options: ButtonView<Message>, h: HtmlBuilder<Message>): Html =>\n buttonView(\n {\n ...(options.type === undefined ? {} : { type: options.type }),\n ...(options.disabled === undefined ? {} : { isDisabled: options.disabled }),\n ...(options.onClick === undefined ? {} : { onClick: options.onClick }),\n toView: toView(\n [...(options.style === undefined ? [] : [options.style.mixin]), ...(options.mixins ?? [])],\n { input: options.input, h },\n ({ button }) => h.button(button, [options.label]),\n ),\n },\n h,\n )\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, type SlotAttributes } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { buildersOf, type MixinList, type 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 = buildersOf(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\n/**\n * The calendar's `toView`: `draw` receives its bundles with `mixins` applied.\n * A Mixin that reads the mode needs `resolve`, whose `input` can be `_tag`.\n */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedCalendar<Message>) => Html,\n ) =>\n (attributes: CalendarAttributes): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { CheckboxAttributes } from '@foldkit/ui/checkbox'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The checkbox's bundles with the attached Mixins applied. */\nexport type ResolvedCheckbox<Message> = Resolved<\n CheckboxAttributes<Message>,\n typeof CheckboxSlots,\n Message\n>\n\n/** Applies `mixins` to the checkbox's bundles. */\nexport const resolve = <Input, Message>(\n attributes: CheckboxAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedCheckbox<Message> => resolveFor(CheckboxSlots, mixins, context)(attributes)\n\n/** The checkbox's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedCheckbox<Message>) => Html,\n ) =>\n (attributes: CheckboxAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { RenderInfo } from '@foldkit/ui/dialog'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The dialog's bundles with the attached Mixins applied. */\nexport type ResolvedDialog<Message> = Resolved<RenderInfo, typeof DialogSlots, Message>\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): ResolvedDialog<Message> => resolveFor(DialogSlots, mixins, context)(render)\n\n/** The dialog's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedDialog<Message>) => Html,\n ) =>\n (render: RenderInfo): Html =>\n draw(resolve(render, mixins, context))\n","import type { DisclosureAttributes } from '@foldkit/ui/disclosure'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The disclosure's bundles with the attached Mixins applied. */\nexport type ResolvedDisclosure<Message> = Resolved<\n DisclosureAttributes<Message>,\n typeof DisclosureSlots,\n Message\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): ResolvedDisclosure<Message> => resolveFor(DisclosureSlots, mixins, context)(attributes)\n\n/** The disclosure's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedDisclosure<Message>) => Html,\n ) =>\n (attributes: DisclosureAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { FieldsetAttributes } from '@foldkit/ui/fieldset'\nimport { Attr, Capability, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The fieldset's bundles with the attached Mixins applied. */\nexport type ResolvedFieldset<Message> = Resolved<\n FieldsetAttributes<Message>,\n typeof FieldsetSlots,\n Message\n>\n\n/** Applies `mixins` to the fieldset's bundles. */\nexport const resolve = <Input, Message>(\n attributes: FieldsetAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedFieldset<Message> => resolveFor(FieldsetSlots, mixins, context)(attributes)\n\n/** The fieldset's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedFieldset<Message>) => Html,\n ) =>\n (attributes: FieldsetAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { RenderInfo } from '@foldkit/ui/hoverIntent'\nimport { Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The hover intent's bundles with the attached Mixins applied. */\nexport type ResolvedHoverIntent<Message> = Resolved<RenderInfo, typeof HoverIntentSlots, Message>\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): ResolvedHoverIntent<Message> => resolveFor(HoverIntentSlots, mixins, context)(render)\n\n/** The hover intent's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedHoverIntent<Message>) => Html,\n ) =>\n (render: RenderInfo): Html =>\n draw(resolve(render, mixins, context))\n","/**\n * Attribute-dispatched mask icons: mechanisms, not components. An element\n * shows the icon its attribute names, drawn from `--icon` over the text's\n * color. Where an icon comes from (a data URI, a file) is the application's:\n * pass resolved `url(…)` strings. No slots, no views.\n */\nimport { Style, type StyleValue } from 'foldkit-mixins'\n\n/** Draws the icon in `--icon` before the element's words, in their color. */\nexport const glyph = (size: string): StyleValue =>\n Style.nest('&::before', {\n WebkitMask: 'var(--icon) center / contain no-repeat',\n background: 'currentColor',\n content: '\"\"',\n flexShrink: '0',\n height: size,\n mask: 'var(--icon) center / contain no-repeat',\n width: size,\n })\n\n/** Sets `--icon` by an attribute's value: each value its own icon. */\nexport const byAttribute = (\n attribute: string,\n icons: Readonly<Record<string, string>>,\n): StyleValue =>\n Style.compose(\n ...Object.entries(icons).map(([value, url]) =>\n Style.nest(`&[${attribute}=\"${value}\"]`, { '--icon': url }),\n ),\n )\n","/**\n * What `Input.field` and `Textarea.field` share: a text field's description\n * from its validation state, and the parts a custom `draw` places. (The\n * `Field` recipe styles in `recipes/` are the look; this is the wiring.)\n */\nimport { Array, Option } from 'effect'\nimport { FieldValidation } from 'foldkit'\nimport type { Html } from 'foldkit/html'\n\n/** A labelled field's pieces, drawn: the label, the control, and its description. */\nexport interface FieldParts {\n readonly label: Html\n readonly control: Html\n readonly description: Html\n}\n\n/** What a text field says under itself: its first error, or that it is being checked. */\nexport const descriptionOf = (field: FieldValidation.Field<unknown>): Option.Option<string> =>\n FieldValidation.match(field, {\n onNotValidated: () => Option.none(),\n onValidating: () => Option.some('Checking…'),\n onValid: () => Option.none(),\n onInvalid: ({ errors }) => Array.head(errors),\n })\n","import { view as inputView, type InputAttributes } from '@foldkit/ui/input'\nimport { Option } from 'effect'\nimport { Attr, Capability, Event, Slot, Slots, type NamedStyle } from 'foldkit-mixins'\nimport { FieldValidation } from 'foldkit'\nimport type { Html, HtmlBuilder } from 'foldkit/html'\nimport { descriptionOf, type FieldParts } from './field.js'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The input's bundles with the attached Mixins applied. */\nexport type ResolvedInput<Message> = Resolved<InputAttributes<Message>, typeof InputSlots, Message>\n\n/** Applies `mixins` to the input's bundles. */\nexport const resolve = <Input, Message>(\n attributes: InputAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedInput<Message> => resolveFor(InputSlots, mixins, context)(attributes)\n\n/** The input's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedInput<Message>) => Html,\n ) =>\n (attributes: InputAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n\n/**\n * An input in one call: its value and Messages, a style for its slots, and\n * the rest of `@foldkit/ui`'s own config. `draw` places the resolved `input`,\n * `label`, and `description` bundles; this covers the common case, while\n * `toView` stays for one drawn as something else.\n */\nexport interface InputView<Message> {\n readonly id: string\n readonly value?: string | undefined\n readonly onInput?: ((value: string) => Message) | undefined\n readonly disabled?: boolean | undefined\n readonly invalid?: boolean | undefined\n readonly described?: boolean | undefined\n readonly type?: string | undefined\n readonly placeholder?: string | undefined\n /** A style of `InputSlots`, for the input's own look. */\n readonly style?: NamedStyle<typeof InputSlots> | undefined\n /** Mixins beside the style, for state or behavior the style does not own. */\n readonly mixins?: MixinList<Message> | undefined\n /** What an input-driven Mixin reads; omit it when no attached Mixin reads one. */\n readonly input?: unknown\n readonly draw: (resolved: ResolvedInput<Message>, h: HtmlBuilder<Message>) => Html\n}\n\nexport const view = <Message>(options: InputView<Message>, h: HtmlBuilder<Message>): Html =>\n inputView(\n {\n id: options.id,\n ...(options.value === undefined ? {} : { value: options.value }),\n ...(options.onInput === undefined ? {} : { onInput: options.onInput }),\n ...(options.disabled === undefined ? {} : { isDisabled: options.disabled }),\n ...(options.invalid === undefined ? {} : { isInvalid: options.invalid }),\n ...(options.described === undefined ? {} : { hasDescription: options.described }),\n ...(options.type === undefined ? {} : { type: options.type }),\n ...(options.placeholder === undefined ? {} : { placeholder: options.placeholder }),\n toView: toView(\n [...(options.style === undefined ? [] : [options.style.mixin]), ...(options.mixins ?? [])],\n { input: options.input, h },\n resolved => options.draw(resolved, h),\n ),\n },\n h,\n )\n\n/**\n * A text field in one call: a field's state drawn through `view` with its\n * label, control, and description placed. The value is drawn with\n * `String()`, as the base field view draws any draft. `draw` places\n * the parts; the default stacks them. `type` and `placeholder` ride through\n * only where given. Custom drawers stay for controls with no shipped\n * renderer.\n */\nexport interface InputField<Message> {\n readonly id: string\n readonly label: string\n readonly field: FieldValidation.Field<unknown>\n readonly changed: (value: string) => Message\n readonly type?: string | undefined\n readonly placeholder?: string | undefined\n /** A style of `InputSlots`, for the field's own look. */\n readonly style?: NamedStyle<typeof InputSlots> | undefined\n /** Mixins beside the style, for state or behavior the style does not own. */\n readonly mixins?: MixinList<Message> | undefined\n readonly draw?: ((parts: FieldParts, h: HtmlBuilder<Message>) => Html) | undefined\n}\n\nexport const field = <Message>(options: InputField<Message>, h: HtmlBuilder<Message>): Html => {\n const description = descriptionOf(options.field)\n return view(\n {\n id: options.id,\n value: String(options.field.value),\n onInput: options.changed,\n invalid: FieldValidation.isInvalid(options.field),\n described: Option.isSome(description),\n ...(options.type === undefined ? {} : { type: options.type }),\n ...(options.placeholder === undefined ? {} : { placeholder: options.placeholder }),\n style: options.style,\n mixins: options.mixins,\n input: options.field,\n draw: (resolved, h) => {\n const parts: FieldParts = {\n label: h.label(resolved.label, [options.label]),\n control: h.input(resolved.input),\n description: Option.match(description, {\n onNone: () => h.empty,\n onSome: text => h.span(resolved.description, [text]),\n }),\n }\n return options.draw === undefined\n ? h.div([], [parts.label, parts.control, parts.description])\n : options.draw(parts, h)\n },\n },\n h,\n )\n}\n","import type { RenderInfo } from '@foldkit/ui/popover'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The popover's bundles with the attached Mixins applied. */\nexport type ResolvedPopover<Message> = Resolved<RenderInfo, typeof PopoverSlots, Message>\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): ResolvedPopover<Message> => resolveFor(PopoverSlots, mixins, context)(render)\n\n/** The popover's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedPopover<Message>) => Html,\n ) =>\n (render: RenderInfo): Html =>\n draw(resolve(render, mixins, context))\n","import type { OptionInfo, RenderInfo } from '@foldkit/ui/radioGroup'\nimport { Attr, Capability, Event, Slot, Slots, type SlotAttributes } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { buildersOf, type MixinList, type 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/** One option with the attached Mixins applied to its bundles. */\nexport type ResolvedRadioOption<Value extends string, Message> = Omit<\n OptionInfo<Value>,\n 'option' | 'label' | 'description'\n> & {\n readonly option: SlotAttributes<Message>\n readonly label: SlotAttributes<Message>\n readonly description: SlotAttributes<Message>\n}\n\n/** The radio group's bundles with the attached Mixins applied. */\nexport interface ResolvedRadioGroup<Value extends string, Message> {\n readonly group: SlotAttributes<Message>\n readonly options: ReadonlyArray<ResolvedRadioOption<Value, Message>>\n readonly selectedValue: RenderInfo<Value>['selectedValue']\n readonly hiddenInput: SlotAttributes<Message>\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): ResolvedRadioGroup<Value, Message> => {\n const builders = buildersOf(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\n/** The radio group's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Value extends string, Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedRadioGroup<Value, Message>) => Html,\n ) =>\n (render: RenderInfo<Value>): Html =>\n draw(resolve(render, mixins, context))\n","import type { SelectAttributes } from '@foldkit/ui/select'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The select's bundles with the attached Mixins applied. */\nexport type ResolvedSelect<Message> = Resolved<\n SelectAttributes<Message>,\n typeof SelectSlots,\n Message\n>\n\n/** Applies `mixins` to the select's bundles. */\nexport const resolve = <Input, Message>(\n attributes: SelectAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedSelect<Message> => resolveFor(SelectSlots, mixins, context)(attributes)\n\n/** The select's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedSelect<Message>) => Html,\n ) =>\n (attributes: SelectAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { SliderAttributes } from '@foldkit/ui/slider'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The slider's bundles with the attached Mixins applied. */\nexport type ResolvedSlider<Message> = Resolved<SliderAttributes, typeof SliderSlots, Message>\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): ResolvedSlider<Message> => resolveFor(SliderSlots, mixins, context)(render)\n\n/** The slider's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedSlider<Message>) => Html,\n ) =>\n (render: SliderAttributes): Html =>\n draw(resolve(render, mixins, context))\n","import type { SwitchAttributes } from '@foldkit/ui/switch'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/** The switch's bundles with the attached Mixins applied. */\nexport type ResolvedSwitch<Message> = Resolved<\n SwitchAttributes<Message>,\n typeof SwitchSlots,\n Message\n>\n\n/** Applies `mixins` to the switch's bundles. */\nexport const resolve = <Input, Message>(\n attributes: SwitchAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedSwitch<Message> => resolveFor(SwitchSlots, mixins, context)(attributes)\n\n/** The switch's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedSwitch<Message>) => Html,\n ) =>\n (attributes: SwitchAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n","import type { RenderInfo, TabInfo } from '@foldkit/ui/tabs'\nimport { Attr, Capability, Event, Slot, Slots, type SlotAttributes } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { buildersOf, type MixinList, type 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 = buildersOf(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\n/** The tabs' `toView`: `draw` receives their bundles with `mixins` applied. */\nexport const toView =\n <Value extends string, Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedTabs<Value, Message>) => Html,\n ) =>\n (render: RenderInfo<Value>): Html =>\n draw(resolve(render, mixins, context))\n","import { view as textareaView, type TextareaAttributes } from '@foldkit/ui/textarea'\nimport { Option } from 'effect'\nimport { Attr, Capability, Event, Slot, Slots, type NamedStyle } from 'foldkit-mixins'\nimport { FieldValidation } from 'foldkit'\nimport type { ChildAttribute, Html, HtmlBuilder, TextareaAttribute } from 'foldkit/html'\nimport { descriptionOf, type FieldParts } from './field.js'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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\n/**\n * The textarea's bundles with the attached Mixins applied. `textarea` is typed\n * for `h.textarea`, which refuses `InnerHTML`.\n */\nexport type ResolvedTextarea<Message> = Omit<\n Resolved<TextareaAttributes<Message>, typeof TextareaSlots, Message>,\n 'textarea'\n> & {\n readonly textarea: ReadonlyArray<TextareaAttribute<Message> | ChildAttribute>\n}\n\n/** Applies `mixins` to the textarea's bundles. */\nexport const resolve = <Input, Message>(\n attributes: TextareaAttributes<Message>,\n mixins: MixinList<Message>,\n context: ResolveContext<Input, Message>,\n): ResolvedTextarea<Message> =>\n // The base bundle holds no `InnerHTML` (its type excludes it) and the resolver\n // refuses one from any Mixin (`mixins:structural-override`), so none is left.\n resolveFor(TextareaSlots, mixins, context)(attributes) as ResolvedTextarea<Message>\n\n/** The textarea's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedTextarea<Message>) => Html,\n ) =>\n (attributes: TextareaAttributes<Message>): Html =>\n draw(resolve(attributes, mixins, context))\n\n/**\n * A textarea in one call: its value and Messages, a style for its slots, and\n * the rest of `@foldkit/ui`'s own config. `draw` places the resolved\n * `textarea`, `label`, and `description` bundles.\n */\nexport interface TextareaView<Message> {\n readonly id: string\n readonly value?: string | undefined\n readonly onInput?: ((value: string) => Message) | undefined\n readonly disabled?: boolean | undefined\n readonly invalid?: boolean | undefined\n readonly described?: boolean | undefined\n readonly rows?: number | undefined\n readonly placeholder?: string | undefined\n /** A style of `TextareaSlots`, for the textarea's own look. */\n readonly style?: NamedStyle<typeof TextareaSlots> | undefined\n /** Mixins beside the style, for state or behavior the style does not own. */\n readonly mixins?: MixinList<Message> | undefined\n /** What an input-driven Mixin reads; omit it when no attached Mixin reads one. */\n readonly input?: unknown\n readonly draw: (resolved: ResolvedTextarea<Message>, h: HtmlBuilder<Message>) => Html\n}\n\nexport const view = <Message>(options: TextareaView<Message>, h: HtmlBuilder<Message>): Html =>\n textareaView(\n {\n id: options.id,\n ...(options.value === undefined ? {} : { value: options.value }),\n ...(options.onInput === undefined ? {} : { onInput: options.onInput }),\n ...(options.disabled === undefined ? {} : { isDisabled: options.disabled }),\n ...(options.invalid === undefined ? {} : { isInvalid: options.invalid }),\n ...(options.described === undefined ? {} : { hasDescription: options.described }),\n ...(options.rows === undefined ? {} : { rows: options.rows }),\n ...(options.placeholder === undefined ? {} : { placeholder: options.placeholder }),\n toView: toView(\n [...(options.style === undefined ? [] : [options.style.mixin]), ...(options.mixins ?? [])],\n { input: options.input, h },\n resolved => options.draw(resolved, h),\n ),\n },\n h,\n )\n\n/**\n * A textarea field in one call: a field's state drawn through `view` with\n * its label, control, and description placed. The value is drawn with\n * `String()`, as the base field view draws any draft. `draw`\n * places the parts; the default stacks them. `rows` and `placeholder` ride\n * through only where given. Custom drawers stay for controls with no\n * shipped renderer.\n */\nexport interface TextareaField<Message> {\n readonly id: string\n readonly label: string\n readonly field: FieldValidation.Field<unknown>\n readonly changed: (value: string) => Message\n readonly rows?: number | undefined\n readonly placeholder?: string | undefined\n /** A style of `TextareaSlots`, for the field's own look. */\n readonly style?: NamedStyle<typeof TextareaSlots> | undefined\n /** Mixins beside the style, for state or behavior the style does not own. */\n readonly mixins?: MixinList<Message> | undefined\n readonly draw?: ((parts: FieldParts, h: HtmlBuilder<Message>) => Html) | undefined\n}\n\nexport const field = <Message>(options: TextareaField<Message>, h: HtmlBuilder<Message>): Html => {\n const description = descriptionOf(options.field)\n return view(\n {\n id: options.id,\n value: String(options.field.value),\n onInput: options.changed,\n invalid: FieldValidation.isInvalid(options.field),\n described: Option.isSome(description),\n ...(options.rows === undefined ? {} : { rows: options.rows }),\n ...(options.placeholder === undefined ? {} : { placeholder: options.placeholder }),\n style: options.style,\n mixins: options.mixins,\n input: options.field,\n draw: (resolved, h) => {\n const parts: FieldParts = {\n label: h.label(resolved.label, [options.label]),\n control: h.textarea(resolved.textarea),\n description: Option.match(description, {\n onNone: () => h.empty,\n onSome: text => h.span(resolved.description, [text]),\n }),\n }\n return options.draw === undefined\n ? h.div([], [parts.label, parts.control, parts.description])\n : options.draw(parts, h)\n },\n },\n h,\n )\n}\n","import type { RenderInfo } from '@foldkit/ui/tooltip'\nimport { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\nimport type { Html } from 'foldkit/html'\nimport { resolveFor, type MixinList, type ResolveContext, type Resolved } 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/** The tooltip's bundles with the attached Mixins applied. */\nexport type ResolvedTooltip<Message> = Resolved<RenderInfo, typeof TooltipSlots, Message>\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): ResolvedTooltip<Message> => resolveFor(TooltipSlots, mixins, context)(render)\n\n/** The tooltip's `toView`: `draw` receives its bundles with `mixins` applied. */\nexport const toView =\n <Message>(\n mixins: MixinList<Message>,\n context: ResolveContext<unknown, Message>,\n draw: (resolved: ResolvedTooltip<Message>) => Html,\n ) =>\n (render: RenderInfo): Html =>\n draw(resolve(render, mixins, context))\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['on-fill'],\n ink: ref.accent.ink,\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['on-fill'],\n ink: ref.error.ink,\n wash: ref.error.subtle,\n }),\n} as const\n","/**\n * A status pill: the base pill with a dot, toned by an attribute's value.\n *\n * Unlike the variant recipes, every tone is present at once: one style serves\n * badges in every state, so there is no variant axis to select. `Badge` takes\n * the attribute carrying the value and the value-to-tone map instead; values\n * the map leaves out keep the base.\n */\nimport { Style, type StyleValue } from 'foldkit-mixins'\nimport { component, ref, variant } from './design.js'\n\n/** The palette families a badge value can take; unmapped values keep the base. */\nexport type BadgeTone = 'success' | 'warning' | 'info' | 'error'\n\nexport interface BadgeOptions {\n /** The attribute carrying the value, such as 'data-state'. */\n readonly attribute: string\n /** Which tone each attribute value takes. */\n readonly tones: Readonly<Record<string, BadgeTone>>\n}\n\nconst toned = (attribute: string, value: string, tone: BadgeTone): StyleValue =>\n variant(\n Style.nest(`&[${attribute}=\"${value}\"]`, {\n background: `color-mix(in oklch, ${ref[tone].default} 14%, ${ref.surface.base})`,\n color: ref[tone].ink,\n }),\n )\n\n/** The badge's piece for the application's own badge slot. */\nexport const Badge = (options: BadgeOptions): { readonly badge: StyleValue } => ({\n badge: component(\n Style.self({\n alignItems: 'center',\n background: ref.surface.muted,\n borderRadius: ref.radius.full,\n color: ref.text.muted,\n display: 'inline-flex',\n fontSize: ref.size.xs,\n fontWeight: ref.weight.semibold,\n gap: '0.35rem',\n padding: '0.15rem 0.6rem',\n whiteSpace: 'nowrap',\n }),\n // A dot before the words, in the pill's own color.\n Style.nest('&::before', {\n background: 'currentColor',\n borderRadius: '50%',\n content: '\"\"',\n height: '0.4rem',\n width: '0.4rem',\n }),\n ...Object.entries(options.tones).map(([value, tone]) => toned(options.attribute, value, tone)),\n ),\n})\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 — except `primary`, which is\n * ink by definition, and `icon`, which fixes its own square geometry (combine\n * it with `size: null`, since a density would un-square it).\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\n/**\n * Text on a button with no fill: the tone's ink, unless a container drawn in a\n * color of its own sets `--fk-ink` (as it sets `--fk-heading`), where the ink\n * would not read.\n */\nconst unfilledInk = `var(--fk-ink, ${toneVar('ink')})`\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 // A link drawn as a button (`Anchor`) is not underlined like one in running text.\n textDecoration: 'none',\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: unfilledInk,\n borderColor: toneVar('fill'),\n }),\n hover({ background: toneVar('wash') }),\n ),\n },\n ghost: {\n button: variant(\n Style.self({ background: 'transparent', color: unfilledInk }),\n hover({ background: toneVar('wash') }),\n ),\n },\n /**\n * The main action, dark as the page's ink: tone-independent, so it reads\n * on any surface. Density still comes from `size`.\n */\n primary: {\n button: variant(\n Style.self({ background: ref.text.overt, color: ref.surface.base }),\n hover({\n background: `color-mix(in oklch, ${ref.text.overt} 85%, ${ref.surface.base})`,\n }),\n ),\n },\n /**\n * An icon with no words beside it: a square that centers its glyph. The\n * words stay the accessible name; only the icon shows, so label it with\n * `aria-label` or visually-hidden text.\n */\n icon: {\n button: variant(\n Style.self({\n background: 'transparent',\n color: ref.text.muted,\n width: '2rem',\n height: '2rem',\n padding: '0',\n fontSize: '0',\n }),\n hover({ background: toneVar('wash'), color: ref.text.overt }),\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","import { Attr, Capability, Event, Slot, Slots } from 'foldkit-mixins'\n\n/**\n * A segmented control: one `group` of pressed-button `option`s. Plain\n * buttons, not tabs: the group is `role=\"group\"`, each option carries\n * `aria-pressed`, and there are no arrow keys or roving tabindex.\n */\nexport const SegmentedSlots = Slots.define({\n group: Slot.make({\n capability: Capability.Container,\n attributes: [Attr.Role, Attr.AriaLabel],\n }),\n option: Slot.make({\n capability: Capability.Interactive,\n events: [Event.Click],\n attributes: [Attr.AriaPressed, Attr.Disabled, Attr.AriaDisabled],\n }),\n})\n","/**\n * A segmented control: a tray of toggle buttons where pressing selects. The\n * pressed option rises from the tray: that rule lives on the group\n * (`> [aria-pressed=\"true\"]`), so icon tiles take the group piece alone and\n * share it with text options. The tray sets no `display`: the Builder owns\n * its narrow tabs' visibility, and every other tray lays itself out.\n */\nimport { Style } from 'foldkit-mixins'\nimport { SegmentedSlots } from '../segmented.js'\nimport { component, hover, ref, variant } from './design.js'\n\nconst pressed = '[aria-pressed=\"true\"]'\n\nexport const Segmented = Style.recipeFor(SegmentedSlots)({\n base: {\n group: component(\n // One pressed rule for text and icon tiles alike.\n Style.nest(`> ${pressed}`, {\n background: ref.surface.base,\n boxShadow: ref.shadow.xs,\n color: ref.text.overt,\n cursor: 'default',\n fontWeight: ref.weight.semibold,\n }),\n ),\n option: component(\n Style.self({\n background: 'transparent',\n border: '0',\n borderRadius: ref.radius.sm,\n color: ref.text.muted,\n cursor: 'pointer',\n font: 'inherit',\n fontWeight: ref.weight.medium,\n }),\n hover({ color: ref.text.overt }),\n ),\n },\n variants: {\n tray: {\n tray: {\n group: variant(\n Style.self({\n background: ref.surface.muted,\n borderRadius: ref.radius.md,\n gap: '2px',\n padding: '2px',\n }),\n ),\n },\n plain: {\n group: variant(Style.self({ display: 'flex', gap: ref.space['3xs'] })),\n },\n },\n size: {\n sm: {\n option: variant(Style.self({ fontSize: ref.size.sm, padding: '0.4rem 0.75rem' })),\n },\n xs: {\n option: variant(Style.self({ fontSize: ref.size.xs, padding: '0.35rem 0.4rem' })),\n },\n },\n },\n defaults: { tray: 'tray', size: 'sm' },\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 // `Defaults.reset` zeroes every margin, which takes away the user\n // agent's `margin: auto` and drops the modal in the top corner.\n margin: 'auto',\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: ref.shadow.xl,\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 { Badge, type BadgeOptions, type BadgeTone } from './badge.js'\nexport { Button } from './button.js'\nexport { Segmented } from './segmented.js'\nexport { Dialog } from './dialog.js'\nexport { Input, Textarea } from './field.js'\nexport { Tabs } from './tabs.js'\nexport { Checkbox, Switch } from './toggle.js'\n","/**\n * Touch targets: mechanisms, not components. No slots, no views: compose\n * these into an application's own slots.\n */\nimport { Style, type StyleValue } from 'foldkit-mixins'\n\n/**\n * On a touch screen, a control a finger can hit: 44px, as the platforms\n * advise. Only where the pointer is coarse, so a desktop keeps its density.\n */\nexport const target: StyleValue = Style.media('(pointer: coarse)', {\n minHeight: '2.75rem',\n minWidth: '2.75rem',\n})\n\n/**\n * The same, for every control a region draws: a link or button laid out as a\n * box. A link inside a sentence is inline, where `min-height` does nothing, so\n * prose keeps its lines.\n */\nexport const targets: StyleValue = Style.at(\n '@media (pointer: coarse)',\n Style.nest(':is(a, button, summary, select)', { minHeight: '2.75rem' }),\n)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAaA,MAAa,SAAS,MAAM,aAAa,UAAU;CACjD,UAAU,CAAC,OAAO,KAAK;CACvB,MAAM;;EAEJ,UAAU,OAAO;EACjB,QAAQ;EACR,cAAc,OAAO,SAAS,OAAO,OAAO;EAC5C,oBAAoB,OAAO,SAAS,OAAO,OAAO;EAClD,eAAe,OAAO,SAAS,OAAO,MAAM;EAC5C,SAAS,OAAO,SAAS,OAAO,MAAM;EACtC,cAAc,OAAO,SAAS,OAAO,MAAM;CAC7C;CACA,UAAU,EAAE,SAAS,UAAU,QAAQ,GAAG,eACxC,OAAO,eACL,OAAO,eACL,OAAO,WAEL,YAAY,SAAS;EACnB;EACA;EACA,GAAG,OAAO,YACR,OAAO,QAAQ,QAAQ,CAAC,CAAC,QACtB,CAAC,KAAK,WAAW,QAAQ,sBAAsB,UAAU,KAAA,CAC5D,CACF;CACF,CAAC,CACH,IACA,YAAW,OAAO,WAAW,QAAQ,CAAC,CACxC,CACF;AACJ,CAAC;;AAWD,MAAa,YACH,WAEN,YAEA,SAAS,SAAS,KAAK,CAAC,CACtB,GACG,QAAQ,WAAW,SAAS,KAAK;CAChC,UAAU,EAAE,YAAY,WAAW,UAAU;CAC7C,QAAQ,UAAiB,OAAO,QAAQ,OAAO,KAAK,CAAC;AACvD,CAAC,EAEH,GACA,EAAE,MAAM,SAAS,CACnB;;;;AClCJ,MAAa,cACX,OACA,QACA,YAEA,SAAS,YAAY,OAAO,QAAQ;CAAE,OAAO,QAAQ;CAAO,GAAG,QAAQ;AAAE,CAAC;AAE5E,MAAa,cAET,OACA,QACA,aAGA,SACmC;CACnC,MAAM,WAAW,WAAW,OAAO,QAAQ,OAAO;CAClD,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M,KAAK,mCAAmC,EAAE,WAAW,UAAU,CAAC,CACxE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "foldkit-mixins-ui",
3
- "version": "0.5.0",
3
+ "version": "0.6.1",
4
4
  "description": "Published slot contracts and mixin adapters for @foldkit/ui, built on foldkit-mixins.",
5
5
  "keywords": [
6
6
  "foldkit",
@@ -39,19 +39,19 @@
39
39
  "LICENSE"
40
40
  ],
41
41
  "peerDependencies": {
42
- "@foldkit/ui": "^0.163.0",
43
- "effect": ">=4.0.0-rc.116 <4.0.0-rc.118",
44
- "foldkit": "^0.163.0",
45
- "foldkit-mixins": "^0.5.0"
42
+ "@foldkit/ui": "^0.165.0",
43
+ "effect": "^4.0.0",
44
+ "foldkit": "^0.165.0",
45
+ "foldkit-mixins": "^0.7.0"
46
46
  },
47
47
  "devDependencies": {
48
- "@effect/platform-browser": "4.0.0-rc.116",
49
- "@foldkit/ui": "0.163.0",
50
- "effect": "4.0.0-rc.116",
51
- "foldkit": "0.163.0",
48
+ "@effect/platform-browser": "4.0.0",
49
+ "@foldkit/ui": "0.165.0",
50
+ "effect": "4.0.0",
51
+ "foldkit": "0.165.0",
52
52
  "tsdown": "^0.23.0",
53
53
  "typescript": "5.9.3",
54
- "foldkit-mixins": "0.5.0"
54
+ "foldkit-mixins": "0.7.0"
55
55
  },
56
56
  "scripts": {
57
57
  "build": "tsdown",