{"version":3,"names":["createContext","createMemo","createSignal","untrack","useContext","REASONS","readOption","mergeRootProps","SNAPSHOT_KEYS","snapshotKeys","createStableCallback","CheckboxGroupContext","EMPTY","Object","freeze","CheckboxGroupApiContext","useCheckboxGroup","ctx","Error","createCheckboxGroup","options","value","name","allValues","disabled","Boolean","readOnly","required","setValue","next","event","reason","none","ev","Event","cancelable","nextArr","slice","onValueChange","disabledStates","Map","uncontrolledStash","status","setStatus","ownedWrite","parentChecked","v","all","length","parentIndeterminate","handleParentFlip","_next","values","stash","filter","get","includes","allEnabled","allOnOrOff","phase","parent","checked","indeterminate","getParentProps","onCheckedChange","groupInternal","role","data-disabled","undefined","data-readonly","data-required","group","userProps","bridgeSetValue","details","isCanceled","legacyContext","defaultValue","id","getChildProps","childValue","nextChecked","current","nextValue","push","idx","indexOf","splice","present","api","Provider","props","children","CHECKBOX_GROUP_SNAPSHOT_KEYS"],"sources":["create-checkbox-group.tsx"],"sourcesContent":["import type { JSX } from \"@solidjs/web\";\nimport {\n\ttype Accessor,\n\tcreateContext,\n\tcreateMemo,\n\tcreateSignal,\n\tuntrack,\n\tuseContext,\n} from \"solid-js\";\nimport {\n\ttype BaseUIEventReasons,\n\tREASONS,\n} from \"../internals/change-event-details\";\nimport { type MaybeAccessor, readOption } from \"../internals/maybe-accessor\";\nimport { mergeRootProps } from \"../internals/merge-root-props\";\nimport {\n\tSNAPSHOT_KEYS,\n\ttype Snapshottable,\n\tsnapshotKeys,\n} from \"../internals/observability/snapshot\";\nimport { createStableCallback } from \"../internals/stable-callback\";\nimport {\n\tCheckboxGroupContext,\n\ttype CheckboxGroupContextValue,\n} from \"./checkbox-group-context.ts\";\n\n/**\n * Why the value array changed. CheckboxGroup carries the `\"none\"` reason —\n * children dispatch via plain clicks; the group itself doesn't distinguish\n * navigation/key/imperative origins in its public surface (matches React's\n * `CheckboxGroup.ChangeEventDetails`).\n */\nexport type CheckboxGroupChangeReason = BaseUIEventReasons[\"none\"];\n\nimport type { CheckboxGroupChangeEventDetails } from \"./checkbox-group-context\";\n\nexport type { CheckboxGroupChangeEventDetails };\n\nconst EMPTY: readonly string[] = Object.freeze([]);\n\n/**\n * Options for {@link createCheckboxGroup}. Every reactive input is\n * `MaybeAccessor<T>`; pass an accessor to make the value reactive.\n *\n * Design notes:\n *\n * - `value` is `MaybeAccessor<readonly string[]>`; the consumer always owns\n *   the signal. Internal storage is the consumer's accessor — no defaultValue.\n * - `allValues` is the universe of child values for the parent-indicator\n *   helper (all/none/mixed math). Optional; the parent helper degrades to\n *   `false`/`false` when absent.\n * - `onValueChange(next, event, reason)` is **pre-change**. The consumer's\n *   signal write is the only writer. Post-change observation is via\n *   `createEffect(c.value, ...)` on the api.\n *\n * **Solid-native shape (2026-04-30).** No internal state. `value` is\n * required and the consumer always owns the signal. See `solidify.md` §6.\n */\nexport interface CreateCheckboxGroupOptions {\n\t/** Selected-value array. Consumer-owned signal. Pair with {@link onValueChange}. */\n\tvalue: MaybeAccessor<readonly string[]>;\n\t/**\n\t * The group's `defaultValue` while the group is uncontrolled, exposed to\n\t * descendant `<Checkbox.Root>` elements through the legacy context so\n\t * they can mirror Base UI's seed derivation\n\t * (`defaultGroupValue.includes(value)`). `undefined` while the group is\n\t * controlled. Purely informational — the primitive itself never reads it.\n\t */\n\tdefaultValue?: MaybeAccessor<readonly string[] | undefined>;\n\t/** Universe of child values used by the parent-indicator helper. */\n\tallValues?: MaybeAccessor<readonly string[] | undefined>;\n\t/** Whether the group (and every descendant checkbox) is disabled. */\n\tdisabled?: MaybeAccessor<boolean>;\n\t/** Whether the group is read-only. */\n\treadOnly?: MaybeAccessor<boolean>;\n\t/** Whether the group is required for form submission. */\n\trequired?: MaybeAccessor<boolean>;\n\t/** Form-control name for the group. */\n\tname?: MaybeAccessor<string | undefined>;\n\t/**\n\t * Pre-change callback. `event.preventDefault()` is now a no-op for\n\t * the primitive (the consumer's signal write is the only writer).\n\t */\n\tonValueChange?: (\n\t\tvalue: string[],\n\t\tevent: Event,\n\t\treason: CheckboxGroupChangeReason,\n\t) => void;\n}\n\n/** Slot props emitted by `c.group()`. */\nexport interface CheckboxGroupSlotProps {\n\trole: \"group\";\n\t\"data-disabled\": \"\" | undefined;\n\t\"data-readonly\": \"\" | undefined;\n\t\"data-required\": \"\" | undefined;\n}\n\n/** Parent-indicator bundle returned by {@link CheckboxGroupApi.parent}. */\nexport interface CheckboxGroupParentApi {\n\t/** True when every value in `allValues` is also in `value`. */\n\tchecked: Accessor<boolean>;\n\t/** True when `value` is non-empty but doesn't cover all `allValues`. */\n\tindeterminate: Accessor<boolean>;\n\t/**\n\t * Plain `Map` (not reactive) of `childValue → disabled?`. Children push\n\t * into it during setup so the parent's flip-all math can skip disabled\n\t * entries that weren't checked. Mirrors React's `disabledStatesRef`.\n\t */\n\tdisabledStates: Map<string, boolean>;\n\t/**\n\t * Click-the-parent flip helper. Cycles all-on / all-off / restore-mixed\n\t * on each call. The returned descriptor exposes the current `checked` /\n\t * `indeterminate` and an `onCheckedChange(next, event?, reason?)` setter\n\t * the wrapper invokes from the parent checkbox's onClick.\n\t */\n\tgetParentProps: () => {\n\t\tchecked: boolean;\n\t\tindeterminate: boolean;\n\t\tonCheckedChange: (\n\t\t\tnext: boolean,\n\t\t\tevent?: Event,\n\t\t\treason?: CheckboxGroupChangeReason,\n\t\t) => void;\n\t};\n}\n\n/** Public api returned by {@link createCheckboxGroup}. */\nexport interface CheckboxGroupApi {\n\tvalue: Accessor<readonly string[]>;\n\tallValues: Accessor<readonly string[] | undefined>;\n\tdisabled: Accessor<boolean>;\n\treadOnly: Accessor<boolean>;\n\trequired: Accessor<boolean>;\n\tname: Accessor<string | undefined>;\n\n\t/**\n\t * Pure event-emitter: fires `onValueChange(next, event, reason)`.\n\t * The consumer's signal write (in their handler) is the only writer.\n\t * No-op while `disabled` or `readOnly`.\n\t */\n\tsetValue: (\n\t\tnext: readonly string[],\n\t\tevent?: Event,\n\t\treason?: CheckboxGroupChangeReason,\n\t) => void;\n\n\t/** Parent-indicator helper bundle. */\n\tparent: CheckboxGroupParentApi;\n\n\t/** Slot function for the group root element. */\n\tgroup: <U extends object | undefined = undefined>(\n\t\tuserProps?: U,\n\t) => CheckboxGroupSlotProps & (U extends object ? U : object);\n\n\t/** Context provider. Also publishes the legacy `CheckboxGroupContext`. */\n\tProvider: (props: { children: JSX.Element }) => JSX.Element;\n}\n\nconst CheckboxGroupApiContext = createContext<CheckboxGroupApi | null>(null);\n\n/**\n * Read the nearest {@link CheckboxGroupApi} provided by `c.Provider`. Throws\n * when used outside the Provider.\n */\nexport function useCheckboxGroup(): CheckboxGroupApi {\n\tconst ctx = useContext(CheckboxGroupApiContext);\n\tif (ctx == null) {\n\t\tthrow new Error(\n\t\t\t\"Base UI: useCheckboxGroup() must be called inside a <c.Provider>.\",\n\t\t);\n\t}\n\treturn ctx;\n}\n\n/**\n * Solid 2.0-native compound primitive for CheckboxGroup. Owns the selected\n * value array and the parent-indicator (all/none/mixed) bundle. Form wiring\n * (field registration, hidden inputs, name resolution) and rendering live in\n * the `<CheckboxGroup>` wrapper — those are integration concerns layered on\n * top of this primitive.\n *\n * Embeds cleanly with `<Checkbox.Root>`: the wrapper reads the legacy\n * {@link CheckboxGroupContext} (also published by `c.Provider`), routes\n * clicks through `groupContext.setValue(...)`, and derives each child's\n * `checked` from `groupContext.value().includes(childValue)`. The bypass\n * pattern in `checkbox-root.tsx`'s onClick keeps that interface unchanged.\n */\nexport function createCheckboxGroup(\n\toptions: CreateCheckboxGroupOptions,\n): CheckboxGroupApi {\n\t// `value` reads through the consumer's accessor — no internal signal,\n\t// no controlled-or-internal branching.\n\tconst value = createMemo<readonly string[]>(() => readOption(options.value), {\n\t\tname: \"checkbox-group.value\",\n\t});\n\n\tconst allValues = createMemo<readonly string[] | undefined>(\n\t\t() => readOption(options.allValues),\n\t\t{ name: \"checkbox-group.allValues\" },\n\t);\n\tconst disabled = createMemo<boolean>(\n\t\t() => Boolean(readOption(options.disabled)),\n\t\t{ name: \"checkbox-group.disabled\" },\n\t);\n\tconst readOnly = createMemo<boolean>(\n\t\t() => Boolean(readOption(options.readOnly)),\n\t\t{ name: \"checkbox-group.readOnly\" },\n\t);\n\tconst required = createMemo<boolean>(\n\t\t() => Boolean(readOption(options.required)),\n\t\t{ name: \"checkbox-group.required\" },\n\t);\n\tconst name = createMemo<string | undefined>(() => readOption(options.name), {\n\t\tname: \"checkbox-group.name\",\n\t});\n\n\t// `setValue` is a pure event-emitter. The consumer is responsible for\n\t// updating their value-signal in response. No internal state to write.\n\tconst setValue = (\n\t\tnext: readonly string[],\n\t\tevent?: Event,\n\t\treason: CheckboxGroupChangeReason = REASONS.none,\n\t): void => {\n\t\tif (untrack(disabled) || untrack(readOnly)) return;\n\t\tconst ev = event ?? new Event(\"valuechange\", { cancelable: true });\n\t\tconst nextArr = next.slice();\n\t\toptions.onValueChange?.(nextArr, ev, reason);\n\t};\n\n\t// --- Parent-indicator helper -----------------------------------------\n\t// Mirrors `useCheckboxGroupParent` (the legacy hook) but lives on the\n\t// primitive so external callers get the same shape via `c.parent`. The\n\t// `disabledStates` map is a plain coordination side-channel populated by\n\t// child wrappers during setup; same convention React uses.\n\tconst disabledStates = new Map<string, boolean>();\n\tlet uncontrolledStash: readonly string[] = untrack(value);\n\tconst [status, setStatus] = createSignal<\"on\" | \"off\" | \"mixed\">(\"mixed\", {\n\t\tname: \"checkbox-group.parentStatus\",\n\t\townedWrite: true,\n\t});\n\n\tconst parentChecked = createMemo<boolean>(\n\t\t() => {\n\t\t\tconst v = value();\n\t\t\tconst all = allValues() ?? EMPTY;\n\t\t\treturn all.length > 0 && v.length === all.length;\n\t\t},\n\t\t{ name: \"checkbox-group.parent.checked\" },\n\t);\n\tconst parentIndeterminate = createMemo<boolean>(\n\t\t() => {\n\t\t\tconst v = value();\n\t\t\tconst all = allValues() ?? EMPTY;\n\t\t\treturn v.length > 0 && v.length !== all.length;\n\t\t},\n\t\t{ name: \"checkbox-group.parent.indeterminate\" },\n\t);\n\n\tconst handleParentFlip = createStableCallback<\n\t\t(_next: boolean, event?: Event, reason?: CheckboxGroupChangeReason) => void\n\t>(() => (_next, event, reason) => {\n\t\tconst all = allValues() ?? EMPTY;\n\t\tconst values = value();\n\t\tconst stash = uncontrolledStash;\n\n\t\t// \"none\": disabled children that happen to be currently in the value\n\t\t// array stay on (mirrors React's `parentContext` math).\n\t\tconst none = all.filter((v) => disabledStates.get(v) && stash.includes(v));\n\t\tconst allEnabled = all.filter(\n\t\t\t(v) =>\n\t\t\t\t!disabledStates.get(v) || (disabledStates.get(v) && stash.includes(v)),\n\t\t);\n\n\t\tconst allOnOrOff = stash.length === allEnabled.length || stash.length === 0;\n\t\tif (allOnOrOff) {\n\t\t\tif (values.length === allEnabled.length) {\n\t\t\t\tsetValue(none, event, reason);\n\t\t\t} else {\n\t\t\t\tsetValue(allEnabled, event, reason);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst phase = status();\n\t\tif (phase === \"mixed\") {\n\t\t\tsetValue(allEnabled, event, reason);\n\t\t\tsetStatus(\"on\");\n\t\t} else if (phase === \"on\") {\n\t\t\tsetValue(none, event, reason);\n\t\t\tsetStatus(\"off\");\n\t\t} else {\n\t\t\tsetValue(stash.slice(), event, reason);\n\t\t\tsetStatus(\"mixed\");\n\t\t}\n\t});\n\n\tconst parent: CheckboxGroupParentApi = {\n\t\tchecked: parentChecked,\n\t\tindeterminate: parentIndeterminate,\n\t\tdisabledStates,\n\t\tgetParentProps: () => ({\n\t\t\tchecked: parentChecked(),\n\t\t\tindeterminate: parentIndeterminate(),\n\t\t\tonCheckedChange: handleParentFlip,\n\t\t}),\n\t};\n\n\t// --- Slot ------------------------------------------------------------\n\tconst groupInternal = {\n\t\trole: \"group\" as const,\n\t\tget \"data-disabled\"() {\n\t\t\treturn disabled() ? \"\" : undefined;\n\t\t},\n\t\tget \"data-readonly\"() {\n\t\t\treturn readOnly() ? \"\" : undefined;\n\t\t},\n\t\tget \"data-required\"() {\n\t\t\treturn required() ? \"\" : undefined;\n\t\t},\n\t};\n\n\tconst group = <U extends object | undefined>(userProps?: U) =>\n\t\tmergeRootProps(groupInternal, userProps) as CheckboxGroupSlotProps &\n\t\t\t(U extends object ? U : object);\n\n\t// --- Legacy-context bridge ------------------------------------------\n\t// `<Checkbox.Root>` reads `CheckboxGroupContext` and calls\n\t// `setValue(next, details)` from its onClick. Stash the most recent\n\t// pre-array on every child-driven write so the parent flip-all math\n\t// can restore \"mixed\" correctly; same trick the legacy hook uses.\n\tconst bridgeSetValue = createStableCallback<\n\t\t(next: string[], details: CheckboxGroupChangeEventDetails) => void\n\t>(() => (next, details) => {\n\t\tuncontrolledStash = next;\n\t\t// Reset the parent cycle to \"mixed\" on a child-driven change. Matches\n\t\t// the legacy `useCheckboxGroupParent.getChildProps` behaviour.\n\t\tsetStatus(\"mixed\");\n\t\tsetValue(next, details.event, details.reason);\n\t\t// Cancel propagation: the legacy bridge also honours\n\t\t// `details.cancel()`. Consumers calling `details.cancel()` should see\n\t\t// no internal write — `setValue` already vetoes via `defaultPrevented`,\n\t\t// but the details API uses its own `isCanceled` flag, so honour both.\n\t\tif (details.isCanceled) {\n\t\t\treturn;\n\t\t}\n\t});\n\n\tconst legacyContext: CheckboxGroupContextValue = {\n\t\tvalue,\n\t\tdefaultValue: () => readOption(options.defaultValue),\n\t\tallValues,\n\t\tsetValue: (next, details) => {\n\t\t\tif (details.isCanceled) return;\n\t\t\tbridgeSetValue(next, details);\n\t\t},\n\t\tparent: {\n\t\t\tid: \"\",\n\t\t\tchecked: parentChecked,\n\t\t\tindeterminate: parentIndeterminate,\n\t\t\tdisabledStates,\n\t\t\tgetParentProps: () => ({\n\t\t\t\tid: \"\",\n\t\t\t\tchecked: parentChecked(),\n\t\t\t\tindeterminate: parentIndeterminate(),\n\t\t\t\t\"aria-controls\": \"\",\n\t\t\t\tonCheckedChange: (_next, details) => {\n\t\t\t\t\tif (details.isCanceled) return;\n\t\t\t\t\thandleParentFlip(_next, details.event, details.reason);\n\t\t\t\t},\n\t\t\t}),\n\t\t\tgetChildProps: (childValue: string) => ({\n\t\t\t\tchecked: value().includes(childValue),\n\t\t\t\tonCheckedChange: (nextChecked, details) => {\n\t\t\t\t\tif (details.isCanceled) return;\n\t\t\t\t\tconst current = value();\n\t\t\t\t\tconst nextValue = current.slice();\n\t\t\t\t\tif (nextChecked) {\n\t\t\t\t\t\tif (!nextValue.includes(childValue)) nextValue.push(childValue);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst idx = nextValue.indexOf(childValue);\n\t\t\t\t\t\tif (idx >= 0) nextValue.splice(idx, 1);\n\t\t\t\t\t}\n\t\t\t\t\tuncontrolledStash = nextValue;\n\t\t\t\t\tsetStatus(\"mixed\");\n\t\t\t\t\tsetValue(nextValue, details.event, details.reason);\n\t\t\t\t},\n\t\t\t}),\n\t\t},\n\t\tdisabled,\n\t\tpresent: true,\n\t};\n\n\tconst api: CheckboxGroupApi = {\n\t\tvalue,\n\t\tallValues,\n\t\tdisabled,\n\t\treadOnly,\n\t\trequired,\n\t\tname,\n\t\tsetValue,\n\t\tparent,\n\t\tgroup,\n\t\tProvider: (props) => (\n\t\t\t<CheckboxGroupApiContext value={api}>\n\t\t\t\t<CheckboxGroupContext value={legacyContext}>\n\t\t\t\t\t{props.children}\n\t\t\t\t</CheckboxGroupContext>\n\t\t\t</CheckboxGroupApiContext>\n\t\t),\n\t};\n\t(api as CheckboxGroupApi & Snapshottable)[SNAPSHOT_KEYS] =\n\t\tCHECKBOX_GROUP_SNAPSHOT_KEYS;\n\treturn api;\n}\n\nconst CHECKBOX_GROUP_SNAPSHOT_KEYS = snapshotKeys<CheckboxGroupApi>(\n\t\"value\",\n\t\"allValues\",\n\t\"disabled\",\n\t\"readOnly\",\n\t\"required\",\n\t\"name\",\n);\n"],"mappings":"AACA,SAECA,aAAa,EACbC,UAAU,EACVC,YAAY,EACZC,OAAO,EACPC,UAAU,QACJ,UAAU;AACjB,SAECC,OAAO,QACD,mCAAmC;AAC1C,SAA6BC,UAAU,QA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