47 Commits

Author SHA1 Message Date
Mats Bosson
789f4e0328 Fix Slider NaN edge case 2026-03-29 08:35:52 +07:00
Mats Bosson
796ccab838 Slider component
Implements headless Slider with Root, Track, Range, and Thumb parts. Supports controlled/uncontrolled value, keyboard navigation (Arrow, Page, Home, End), clamping, step, orientation, and disabled state. 10 tests added, all 152 suite tests pass.
2026-03-29 08:30:31 +07:00
Mats Bosson
ddc5aa3d7f Tabs component
Implements accessible Tabs with List, Tab, Panel parts. Supports controlled/uncontrolled value, keyboard navigation (ArrowRight/Left/Home/End), automatic/manual activation mode, and full WAI-ARIA compliance (role=tablist/tab/tabpanel, aria-selected strings, aria-controls/labelledby wiring).
2026-03-29 08:26:03 +07:00
Mats Bosson
576001f89f Fix AlertDialog ARIA 2026-03-29 08:22:31 +07:00
Mats Bosson
3388dbd371 AlertDialog component
Implements AlertDialog with compound component pattern (Root, Content, Title, Description, Trigger, Cancel, Action, Portal, Overlay). Content uses role=alertdialog, aria-modal, aria-labelledby/describedby, focus trap, and scroll lock. Does not dismiss on Escape key. 8 tests passing.
2026-03-29 08:19:02 +07:00
Mats Bosson
30ee5c877e Fix Accordion per-item disabled
- Add disabled accessor to AccordionItemContextValue and itemCtx so per-item disabled prop disables the trigger button
- Use getter for itemCtx.value to stay reactive with the local proxy
- Guard onClick toggle against itemCtx.disabled() in addition to rootCtx.disabled()
- Add one-liner JSDoc to all six exported accordion interfaces
2026-03-29 08:13:45 +07:00
Mats Bosson
94822186c2 Accordion component
Headless accordion with single/multiple modes, collapsible support, keyboard navigation (ArrowDown/ArrowUp/Home/End), and full ARIA semantics.
2026-03-29 08:06:47 +07:00
Mats Bosson
4c3005aa74 Fix Collapsible controlled mode 2026-03-29 08:03:31 +07:00
Mats Bosson
7359cd8d8f Collapsible component
Implements headless Collapsible with Root, Trigger, and Content parts.
Supports controlled/uncontrolled open state, disabled state, and full
ARIA attributes (aria-expanded, aria-controls, hidden).
2026-03-29 08:00:12 +07:00
Mats Bosson
315f5e4ae2 Fix ToggleGroup disabled handling 2026-03-29 07:57:25 +07:00
Mats Bosson
40e57715f9 ToggleGroup component
Implements headless ToggleGroup with single/multiple selection modes, context-based item coordination, aria-pressed, and data-state attributes.
2026-03-29 07:55:44 +07:00
Mats Bosson
b1f0cd2e9d Fix RadioGroup aria-checked 2026-03-29 07:52:49 +07:00
Mats Bosson
c2422d2da0 RadioGroup component
Implements headless RadioGroup with root + item sub-components, keyboard navigation (ArrowDown/Up/Left/Right), controlled/uncontrolled value via createControllableSignal, and disabled state. 8 tests passing.
2026-03-29 07:50:21 +07:00
Mats Bosson
46cc41221d Fix TextField ARIA attributes 2026-03-29 07:47:38 +07:00
Mats Bosson
fce03b7531 TextField component
Headless TextField with Label, Input, Description, and ErrorMessage parts. Supports invalid, disabled, and required states with full ARIA wiring (aria-invalid, aria-required, aria-describedby, aria-errormessage). 7 tests passing.
2026-03-29 07:42:05 +07:00
Mats Bosson
c5b7260e6d Fix Progress zero value bug 2026-03-29 07:39:35 +07:00
Mats Bosson
21a7991562 Progress component
- Headless progress bar component with support for determinate and indeterminate states
- Exposes aria-valuemin, aria-valuemax, aria-valuenow, and aria-valuetext for accessibility
- Supports custom value label via getValueLabel function
- All tests passing (8/8), full suite passing (88/88), types check, biome compliant
2026-03-29 07:25:07 +07:00
Mats Bosson
041217ca33 Fix Checkbox indeterminate state 2026-03-29 07:23:19 +07:00
Mats Bosson
3a84dfaac9 Checkbox component 2026-03-29 07:19:39 +07:00
Mats Bosson
5bd158782a Switch component 2026-03-29 07:14:52 +07:00
Mats Bosson
5af7dc6cfa Switch component
Also fix Toggle component to properly handle onChange callback and onClick handler binding.
2026-03-29 07:12:11 +07:00
Mats Bosson
3def20bf0d Fix Toggle options stability 2026-03-29 07:10:31 +07:00
Mats Bosson
d522090872 Toggle component 2026-03-29 07:08:51 +07:00
Mats Bosson
230133415b Separator component 2026-03-29 07:06:29 +07:00
Mats Bosson
7dd8615757 Package entry point and lint fixes
Adds packages/core/src/index.ts as the convenience re-export barrel for
all Dialog parts, Presence, Portal, VisuallyHidden, createFocusTrap,
createScrollLock, and createDismiss. Also resolves pre-existing biome
formatter and noNonNullAssertion violations across five files so CI passes.
2026-03-29 06:01:41 +07:00
Mats Bosson
a25244840b Clean up Dialog test 2026-03-29 05:59:50 +07:00
Mats Bosson
0155749028 Dialog tests
Adds aria and keyboard interaction tests for the Dialog component (10 new tests, 53 total passing). Also fixes DialogContent to render with the `open` attribute so the <dialog> element is accessible in JSDOM.
2026-03-29 05:56:42 +07:00
Mats Bosson
8ab23a1722 Clean up Dialog internals 2026-03-29 05:54:12 +07:00
Mats Bosson
87af246d71 Fix Dialog activation and role
Replace onMount+onCleanup with createEffect watching ctx.isOpen() and
ctx.modal(), so focusTrap/scrollLock/dismiss activate/deactivate
reactively on every open/close — including when forceMount keeps the
component mounted.
Note: role="dialog" was omitted; the project's Biome rules flag it as
redundant (noRedundantRoles) since <dialog> carries the implicit role.
2026-03-29 05:49:57 +07:00
Mats Bosson
69068fbee9 Dialog component
Implements DialogRoot, Content, Title, Description, Trigger, Close, Portal, and Overlay parts with full context wiring, focus trap, scroll lock, and dismiss. Also fixes pre-existing TS6 exactOptionalPropertyTypes errors in create-disclosure-state and presence, and silences TS6.0 deprecation warnings via ignoreDeprecations.
2026-03-29 05:47:48 +07:00
Mats Bosson
4e711d8f5d Dialog types and context 2026-03-29 05:32:45 +07:00
Mats Bosson
de85abf548 Fix Presence reactivity 2026-03-29 05:28:35 +07:00
Mats Bosson
3374349ef2 Presence animation utility
Implements the Presence utility component with forceMount support and
data-opening/data-closing attribute signals for CSS-driven transitions.
2026-03-29 05:26:01 +07:00
Mats Bosson
0268422c81 NagLint hook setup 2026-03-29 05:18:07 +07:00
Mats Bosson
523c908b20 Fix dismiss idempotency 2026-03-29 04:43:07 +07:00
Mats Bosson
be99077306 Dismiss utility with layer stack 2026-03-29 04:41:38 +07:00
Mats Bosson
18f4869b20 Scroll lock utility 2026-03-29 04:41:35 +07:00
Mats Bosson
7e201f6af6 Harden focus trap and add tests 2026-03-29 04:37:45 +07:00
Mats Bosson
5b86cb5650 Focus trap utility 2026-03-29 04:36:00 +07:00
Mats Bosson
697e80ef72 VisuallyHidden and Portal utilities 2026-03-29 03:01:52 +07:00
Mats Bosson
b291ceab50 ID registration primitive 2026-03-29 02:46:51 +07:00
Mats Bosson
bedfa33117 Fix disclosure state toggle behavior 2026-03-29 02:43:19 +07:00
Mats Bosson
ed13193430 Disclosure state primitive
Implements controlled/uncontrolled open-close state for disclosure components (Dialog, Popover, Tooltip, Collapsible, etc.) wrapping createControllableSignal with open/close/toggle convenience methods.
2026-03-29 02:41:54 +07:00
Mats Bosson
512eba474a Fix null handling in controllable signal 2026-03-29 02:40:38 +07:00
Mats Bosson
8f2e6042ea Controllable signal primitive
Implements the controlled/uncontrolled state primitive with full TDD coverage (5 tests passing). Delegates to an internal signal when uncontrolled, defers to the external value accessor when controlled.
2026-03-29 02:38:40 +07:00
Mats Bosson
db906fd85a Fix linting config and package fields
- Replace .eslintrc.cjs with eslint.config.mjs (ESLint 9 flat config)
  using direct eslint-plugin-solid + @typescript-eslint/parser approach
- Add @typescript-eslint/parser to root devDependencies
- Add main/module/types top-level fields to packages/core/package.json
- Add resolve.conditions to packages/core/vite.config.ts
- Create packages/core/tsconfig.test.json for test type-checking
- Remove empty paths:{} from packages/core/tsconfig.json
2026-03-29 02:35:57 +07:00
Mats Bosson
405ce15933 Initial monorepo setup 2026-03-29 02:30:05 +07:00