Add Accordion component (5 parts, keyboard nav, single/multiple, animations)
Parts: Root, Item, Header, Trigger, Content
- Single/multiple mode via type prop
- Collapsible (single mode: click open item to close)
- Per-item and global disabled
- Keyboard: Arrow keys (orientation-aware), Home/End, loop option
- Presence on Content with data-starting/ending-style
- --soma-accordion-content-height/width CSS vars for animations
- forceMount on Content
- Header with level prop (aria-level)
- Auto-generated item values when omitted
- Demo page with 5 sections
Compared with Radix, Ark UI, Bits UI:
- Has collapsible + loop (Radix has collapsible, Bits has loop, soma has both)
- Has header level (like Bits)
- Has CSS animation vars (like all three)
- Has data-starting/ending-style (like Bits)
- Skipped ItemIndicator (Ark) — presentation concern for visual layer
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Accordion from './accordion';
|
soma: dias date library, Calendar + RangeCalendar, Command fixes, doc updates
**Date library reorganisation** (no new third-party dependency)
- New `src/lib/util/dias/` with `_vendor/` (Adobe Apache 2.0 vendored code,
ATTRIBUTION.md preserved) and a public facade split into `types`,
`values`, `calendars`, `queries`, `operations`, `parse`, `format`,
`index`. Consumers import only from `$lib/util/dias`.
- All date-related `Intl` consolidated in `dias/format.ts` —
`DateFormatter`, cache, `resolveDateOrder`, `resolveHourCycle`,
placeholders, defaults.
- `ext/dates` now a thin reactive wrapper delegating to `dias`.
- Aligned App-layer `HourCycle` to canonical numeric form `12 | 24`
(matches `Intl.DateTimeFormat`'s `hour12`). Removed string form
`'12h' | '24h'` from `ext/app/types`, `ext/dates`,
`ext/presentation/locale-defaults`, and their tests.
- Repointed every consumer: `soma/external/dates`,
`terra/external/dates`, eight `routes/test/*` pages.
- Legacy `src/lib/util/dates/` left untouched by request.
**Tier 3 components**
- `soma/components/calendar/` — 14 parts, single + multiple selection,
`MonthSelect`/`YearSelect`, ISO/simple week numbers,
`isDateHoliday` matcher, `data-weekend` flag, navigation live-
region, RTL flip, full ARIA, 27-item checklist verified.
- `soma/components/range-calendar/` — 14 parts, range selection with
live hover preview (novel vs ark/bits/radix/react-aria), `minDays`
/ `maxDays` / `allowSingleDay`, third-click deselects only the
clicked endpoint.
- Test pages at `/test/soma/calendar` and `/test/soma/range-calendar`
with seven demos each. Links added to the soma index under a new
"Dates" section.
- READMEs with anatomy, parts, props, ARIA, keyboard, data-attrs, and
a competitive comparison table.
**Command fixes**
- Resolved O(N^2) reactive cascade: introduced
`visibleSet: $derived<Set<string>>` on the root provider;
per-item `isVisible` is now an O(1) `has()` lookup instead of
calling back into the provider, which was re-running all items'
derivations on every `itemsVersion` bump.
- Added `dir` prop with fallback to `soma.presentation.getDir()`;
horizontal arrows flip in RTL via `getDirectionalKeys`; root
receives `dir` attribute.
**Doc updates (session outcomes)**
- `CLAUDE.md`: replaced obsolete `@/glob/lib` date references with
`$lib/util/dias`; added canonical date-layer section; reinforced
`Provider` export rule and `data-{component}[-{part}]` naming
(never `data-soma-*`); clarified translation convention.
- `src/uix/soma/COMPONENT_GUIDE.md`: new checklist items 26
(component README required) and 27 (grep for data-attr
consistency); new Common Mistakes 11 (`data-soma-*` prefix), 12
(wrong date module), 13 (string `HourCycle`).
- `src/uix/soma/SOMA_ARCHITECTURE.md`: clarified data-attr naming
(canonical emitter is `createAttrs`; validator checks enum
values only, not names); new section covering date types and
formatting through `$soma/external/dates` → `$lib/util/dias`;
documented numeric `HourCycle`.
**Infrastructure**
- `PrimitiveHeaderAttributes` and `PrimitiveSelectAttributes` added
to `$soma/types`.
- `getLastFirstDayOfWeek`, `getNextLastDayOfWeek` re-exported from
`$soma/external/dates`.
- `calendar.*` and `range-calendar.*` translation blocks added to
`$soma/core/langs.ts`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Calendar from './calendar';
|
soma: 12 components, architecture docs, naming fixes, form tier complete
Components (12):
- Accordion (keyboard nav, single/multiple, collapsible, loop)
- Checkbox (indeterminate, group, readonly)
- Collapsible
- Combobox (input + floating listbox, consumer-side filtering)
- Dialog (variant dialog/alertdialog, modal, nested, animations, forceMount)
- DropdownMenu (15 parts, submenus, typeahead, checkbox/radio items)
- Popover (floating, openOnHover, modal, custom anchor)
- RadioGroup (roving tabindex, orientation, readonly)
- Select (single/multiple, typeahead, scroll-into-view, hidden select)
- Slider (drag, keyboard, single/range, ticks, vertical)
- Switch (hidden input, data-checked)
- Tooltip (skip-delay group, 3-state, hover/focus)
Architecture:
- State class files renamed: {name}.svelte.ts → {name}-provider.svelte.ts
(avoids Vite module resolution ambiguity with .svelte wrappers)
- Export name standardized: always Provider, never Root
- COMPONENT_GUIDE.md: step-by-step implementation guide with checklist
- SOMA_ARCHITECTURE.md: updated structure, anti-patterns, improvements table
- README.md: updated naming, file structure, inventory
- context.ts: error message uses Provider not Root
- Demo index page at /test/soma/
Bug fixes:
- DropdownMenu trigger missing onclick/onkeydown in props
- DropdownMenu interactOutsideBehavior always 'close' (not modal-dependent)
- Checkbox getContext in event handler → captured in constructor
- Select context not found → was Vite cache issue (not naming)
- ScrollLock unlock path
- Floating wrapper z-index: auto override
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Checkbox from './checkbox';
|
Refactor soma: consolidate layers, add Soma class, Dialog component, animation system
Layers:
- Consolidate 28 files/10 dirs → 13 files/2 dirs
- Separate behavior layers (classes) from internal components
- Normalize naming: Dismissal, ScrollLock, TextSelection, FocusScope
- Adapt floating layer from terra to soma (imports, CSS vars --soma--)
- Presence rewritten: data-starting/ending-style, forceMount, onComplete, getAnimations API
Architecture:
- Replace config/ with Soma class (root instance with services)
- Add SomaFormat namespace (date, number, currency, unit formatters)
- Add generic resolve() for prop → config → fallback chain
- Provider supports optional ref (ProviderOpts vs WithRefOpts)
- Hierarchical component barrel: import { Dialog } from '$soma/components'
- Descriptive IDs: soma-dialog-trigger-c12
Dialog component (7 parts):
- Provider, Trigger, Content, Overlay, Title, Description, Close
- Content integrates all behavior layers as classes (no template nesting)
- modal prop controls interactOutsideBehavior automatically
- Nested dialog support: depth, data-nested, --soma-dialog-depth CSS vars
- Animation support: forceMount, data-starting/ending-style, onOpenChangeComplete
- Translator integration for aria-labels
- JSDoc documentation on all props
Bug fixes:
- Presence mount without ref (chicken-and-egg)
- ScrollLock unlock path restores body style
- Nested dialog infinite loop (untrack mutation)
- pointer-events: none blocking dialog interaction
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Collapsible from './collapsible';
|
soma: 12 components, architecture docs, naming fixes, form tier complete
Components (12):
- Accordion (keyboard nav, single/multiple, collapsible, loop)
- Checkbox (indeterminate, group, readonly)
- Collapsible
- Combobox (input + floating listbox, consumer-side filtering)
- Dialog (variant dialog/alertdialog, modal, nested, animations, forceMount)
- DropdownMenu (15 parts, submenus, typeahead, checkbox/radio items)
- Popover (floating, openOnHover, modal, custom anchor)
- RadioGroup (roving tabindex, orientation, readonly)
- Select (single/multiple, typeahead, scroll-into-view, hidden select)
- Slider (drag, keyboard, single/range, ticks, vertical)
- Switch (hidden input, data-checked)
- Tooltip (skip-delay group, 3-state, hover/focus)
Architecture:
- State class files renamed: {name}.svelte.ts → {name}-provider.svelte.ts
(avoids Vite module resolution ambiguity with .svelte wrappers)
- Export name standardized: always Provider, never Root
- COMPONENT_GUIDE.md: step-by-step implementation guide with checklist
- SOMA_ARCHITECTURE.md: updated structure, anti-patterns, improvements table
- README.md: updated naming, file structure, inventory
- context.ts: error message uses Provider not Root
- Demo index page at /test/soma/
Bug fixes:
- DropdownMenu trigger missing onclick/onkeydown in props
- DropdownMenu interactOutsideBehavior always 'close' (not modal-dependent)
- Checkbox getContext in event handler → captured in constructor
- Select context not found → was Vite cache issue (not naming)
- ScrollLock unlock path
- Floating wrapper z-index: auto override
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Combobox from './combobox';
|
soma: dias date library, Calendar + RangeCalendar, Command fixes, doc updates
**Date library reorganisation** (no new third-party dependency)
- New `src/lib/util/dias/` with `_vendor/` (Adobe Apache 2.0 vendored code,
ATTRIBUTION.md preserved) and a public facade split into `types`,
`values`, `calendars`, `queries`, `operations`, `parse`, `format`,
`index`. Consumers import only from `$lib/util/dias`.
- All date-related `Intl` consolidated in `dias/format.ts` —
`DateFormatter`, cache, `resolveDateOrder`, `resolveHourCycle`,
placeholders, defaults.
- `ext/dates` now a thin reactive wrapper delegating to `dias`.
- Aligned App-layer `HourCycle` to canonical numeric form `12 | 24`
(matches `Intl.DateTimeFormat`'s `hour12`). Removed string form
`'12h' | '24h'` from `ext/app/types`, `ext/dates`,
`ext/presentation/locale-defaults`, and their tests.
- Repointed every consumer: `soma/external/dates`,
`terra/external/dates`, eight `routes/test/*` pages.
- Legacy `src/lib/util/dates/` left untouched by request.
**Tier 3 components**
- `soma/components/calendar/` — 14 parts, single + multiple selection,
`MonthSelect`/`YearSelect`, ISO/simple week numbers,
`isDateHoliday` matcher, `data-weekend` flag, navigation live-
region, RTL flip, full ARIA, 27-item checklist verified.
- `soma/components/range-calendar/` — 14 parts, range selection with
live hover preview (novel vs ark/bits/radix/react-aria), `minDays`
/ `maxDays` / `allowSingleDay`, third-click deselects only the
clicked endpoint.
- Test pages at `/test/soma/calendar` and `/test/soma/range-calendar`
with seven demos each. Links added to the soma index under a new
"Dates" section.
- READMEs with anatomy, parts, props, ARIA, keyboard, data-attrs, and
a competitive comparison table.
**Command fixes**
- Resolved O(N^2) reactive cascade: introduced
`visibleSet: $derived<Set<string>>` on the root provider;
per-item `isVisible` is now an O(1) `has()` lookup instead of
calling back into the provider, which was re-running all items'
derivations on every `itemsVersion` bump.
- Added `dir` prop with fallback to `soma.presentation.getDir()`;
horizontal arrows flip in RTL via `getDirectionalKeys`; root
receives `dir` attribute.
**Doc updates (session outcomes)**
- `CLAUDE.md`: replaced obsolete `@/glob/lib` date references with
`$lib/util/dias`; added canonical date-layer section; reinforced
`Provider` export rule and `data-{component}[-{part}]` naming
(never `data-soma-*`); clarified translation convention.
- `src/uix/soma/COMPONENT_GUIDE.md`: new checklist items 26
(component README required) and 27 (grep for data-attr
consistency); new Common Mistakes 11 (`data-soma-*` prefix), 12
(wrong date module), 13 (string `HourCycle`).
- `src/uix/soma/SOMA_ARCHITECTURE.md`: clarified data-attr naming
(canonical emitter is `createAttrs`; validator checks enum
values only, not names); new section covering date types and
formatting through `$soma/external/dates` → `$lib/util/dias`;
documented numeric `HourCycle`.
**Infrastructure**
- `PrimitiveHeaderAttributes` and `PrimitiveSelectAttributes` added
to `$soma/types`.
- `getLastFirstDayOfWeek`, `getNextLastDayOfWeek` re-exported from
`$soma/external/dates`.
- `calendar.*` and `range-calendar.*` translation blocks added to
`$soma/core/langs.ts`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Command from './command';
|
|
|
|
|
export * as ContextMenu from './context-menu';
|
Refactor soma: consolidate layers, add Soma class, Dialog component, animation system
Layers:
- Consolidate 28 files/10 dirs → 13 files/2 dirs
- Separate behavior layers (classes) from internal components
- Normalize naming: Dismissal, ScrollLock, TextSelection, FocusScope
- Adapt floating layer from terra to soma (imports, CSS vars --soma--)
- Presence rewritten: data-starting/ending-style, forceMount, onComplete, getAnimations API
Architecture:
- Replace config/ with Soma class (root instance with services)
- Add SomaFormat namespace (date, number, currency, unit formatters)
- Add generic resolve() for prop → config → fallback chain
- Provider supports optional ref (ProviderOpts vs WithRefOpts)
- Hierarchical component barrel: import { Dialog } from '$soma/components'
- Descriptive IDs: soma-dialog-trigger-c12
Dialog component (7 parts):
- Provider, Trigger, Content, Overlay, Title, Description, Close
- Content integrates all behavior layers as classes (no template nesting)
- modal prop controls interactOutsideBehavior automatically
- Nested dialog support: depth, data-nested, --soma-dialog-depth CSS vars
- Animation support: forceMount, data-starting/ending-style, onOpenChangeComplete
- Translator integration for aria-labels
- JSDoc documentation on all props
Bug fixes:
- Presence mount without ref (chicken-and-egg)
- ScrollLock unlock path restores body style
- Nested dialog infinite loop (untrack mutation)
- pointer-events: none blocking dialog interaction
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Dialog from './dialog';
|
soma: 12 components, architecture docs, naming fixes, form tier complete
Components (12):
- Accordion (keyboard nav, single/multiple, collapsible, loop)
- Checkbox (indeterminate, group, readonly)
- Collapsible
- Combobox (input + floating listbox, consumer-side filtering)
- Dialog (variant dialog/alertdialog, modal, nested, animations, forceMount)
- DropdownMenu (15 parts, submenus, typeahead, checkbox/radio items)
- Popover (floating, openOnHover, modal, custom anchor)
- RadioGroup (roving tabindex, orientation, readonly)
- Select (single/multiple, typeahead, scroll-into-view, hidden select)
- Slider (drag, keyboard, single/range, ticks, vertical)
- Switch (hidden input, data-checked)
- Tooltip (skip-delay group, 3-state, hover/focus)
Architecture:
- State class files renamed: {name}.svelte.ts → {name}-provider.svelte.ts
(avoids Vite module resolution ambiguity with .svelte wrappers)
- Export name standardized: always Provider, never Root
- COMPONENT_GUIDE.md: step-by-step implementation guide with checklist
- SOMA_ARCHITECTURE.md: updated structure, anti-patterns, improvements table
- README.md: updated naming, file structure, inventory
- context.ts: error message uses Provider not Root
- Demo index page at /test/soma/
Bug fixes:
- DropdownMenu trigger missing onclick/onkeydown in props
- DropdownMenu interactOutsideBehavior always 'close' (not modal-dependent)
- Checkbox getContext in event handler → captured in constructor
- Select context not found → was Vite cache issue (not naming)
- ScrollLock unlock path
- Floating wrapper z-index: auto override
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as DropdownMenu from './dropdown-menu';
|
soma: 10 new components, README docs for all 22, PrimitiveAnchorAttributes
New components (10):
- Tabs: roving tabindex, automatic/manual activation, onFocusChange
- ToggleGroup: single/multiple, roving tabindex, deselectable
- Toast: imperative API (createToaster), swipe-to-dismiss, hotkey, promise()
- ScrollArea: custom scrollbars, visibility modes, thumb drag, position tracking
- Splitter: resizable panels, collapsible, flex-grow sizing, double-click toggle
- Stepper: multi-step wizard, linear mode, step state, PrevTrigger/NextTrigger
- TreeView: WAI-ARIA tree pattern, expand/collapse, typeahead, * expand siblings
- Pagination: page range algorithm, siblingCount/boundaryCount, slice() utility
- Toolbar: WAI-ARIA toolbar, roving tabindex, integrated ToggleGroup, Separator
- Editable: inline edit, activation/submit modes, draft tracking, auto-resize
Documentation:
- README.md for all 22 components with anatomy, ARIA, data-*, keyboard, usage
- Comparison tables vs ark-ui, bits-ui, radix-ui for every component
Infrastructure:
- Added PrimitiveAnchorAttributes to $soma/types/html.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Editable from './editable';
|
soma: dias date library, Calendar + RangeCalendar, Command fixes, doc updates
**Date library reorganisation** (no new third-party dependency)
- New `src/lib/util/dias/` with `_vendor/` (Adobe Apache 2.0 vendored code,
ATTRIBUTION.md preserved) and a public facade split into `types`,
`values`, `calendars`, `queries`, `operations`, `parse`, `format`,
`index`. Consumers import only from `$lib/util/dias`.
- All date-related `Intl` consolidated in `dias/format.ts` —
`DateFormatter`, cache, `resolveDateOrder`, `resolveHourCycle`,
placeholders, defaults.
- `ext/dates` now a thin reactive wrapper delegating to `dias`.
- Aligned App-layer `HourCycle` to canonical numeric form `12 | 24`
(matches `Intl.DateTimeFormat`'s `hour12`). Removed string form
`'12h' | '24h'` from `ext/app/types`, `ext/dates`,
`ext/presentation/locale-defaults`, and their tests.
- Repointed every consumer: `soma/external/dates`,
`terra/external/dates`, eight `routes/test/*` pages.
- Legacy `src/lib/util/dates/` left untouched by request.
**Tier 3 components**
- `soma/components/calendar/` — 14 parts, single + multiple selection,
`MonthSelect`/`YearSelect`, ISO/simple week numbers,
`isDateHoliday` matcher, `data-weekend` flag, navigation live-
region, RTL flip, full ARIA, 27-item checklist verified.
- `soma/components/range-calendar/` — 14 parts, range selection with
live hover preview (novel vs ark/bits/radix/react-aria), `minDays`
/ `maxDays` / `allowSingleDay`, third-click deselects only the
clicked endpoint.
- Test pages at `/test/soma/calendar` and `/test/soma/range-calendar`
with seven demos each. Links added to the soma index under a new
"Dates" section.
- READMEs with anatomy, parts, props, ARIA, keyboard, data-attrs, and
a competitive comparison table.
**Command fixes**
- Resolved O(N^2) reactive cascade: introduced
`visibleSet: $derived<Set<string>>` on the root provider;
per-item `isVisible` is now an O(1) `has()` lookup instead of
calling back into the provider, which was re-running all items'
derivations on every `itemsVersion` bump.
- Added `dir` prop with fallback to `soma.presentation.getDir()`;
horizontal arrows flip in RTL via `getDirectionalKeys`; root
receives `dir` attribute.
**Doc updates (session outcomes)**
- `CLAUDE.md`: replaced obsolete `@/glob/lib` date references with
`$lib/util/dias`; added canonical date-layer section; reinforced
`Provider` export rule and `data-{component}[-{part}]` naming
(never `data-soma-*`); clarified translation convention.
- `src/uix/soma/COMPONENT_GUIDE.md`: new checklist items 26
(component README required) and 27 (grep for data-attr
consistency); new Common Mistakes 11 (`data-soma-*` prefix), 12
(wrong date module), 13 (string `HourCycle`).
- `src/uix/soma/SOMA_ARCHITECTURE.md`: clarified data-attr naming
(canonical emitter is `createAttrs`; validator checks enum
values only, not names); new section covering date types and
formatting through `$soma/external/dates` → `$lib/util/dias`;
documented numeric `HourCycle`.
**Infrastructure**
- `PrimitiveHeaderAttributes` and `PrimitiveSelectAttributes` added
to `$soma/types`.
- `getLastFirstDayOfWeek`, `getNextLastDayOfWeek` re-exported from
`$soma/external/dates`.
- `calendar.*` and `range-calendar.*` translation blocks added to
`$soma/core/langs.ts`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Field from './field';
|
|
|
|
|
export * as FileUpload from './file-upload';
|
|
|
|
|
export * as LinkPreview from './link-preview';
|
|
|
|
|
export * as Menubar from './menubar';
|
|
|
|
|
export * as NumberField from './number-field';
|
soma: 10 new components, README docs for all 22, PrimitiveAnchorAttributes
New components (10):
- Tabs: roving tabindex, automatic/manual activation, onFocusChange
- ToggleGroup: single/multiple, roving tabindex, deselectable
- Toast: imperative API (createToaster), swipe-to-dismiss, hotkey, promise()
- ScrollArea: custom scrollbars, visibility modes, thumb drag, position tracking
- Splitter: resizable panels, collapsible, flex-grow sizing, double-click toggle
- Stepper: multi-step wizard, linear mode, step state, PrevTrigger/NextTrigger
- TreeView: WAI-ARIA tree pattern, expand/collapse, typeahead, * expand siblings
- Pagination: page range algorithm, siblingCount/boundaryCount, slice() utility
- Toolbar: WAI-ARIA toolbar, roving tabindex, integrated ToggleGroup, Separator
- Editable: inline edit, activation/submit modes, draft tracking, auto-resize
Documentation:
- README.md for all 22 components with anatomy, ARIA, data-*, keyboard, usage
- Comparison tables vs ark-ui, bits-ui, radix-ui for every component
Infrastructure:
- Added PrimitiveAnchorAttributes to $soma/types/html.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Pagination from './pagination';
|
Add Popover component, Dialog variant/restoreScrollDelay, fix floating z-index
Popover (7 parts):
- Provider, Trigger, Content, Arrow, Close, Anchor, Overlay
- Floating positioning via FloatingProvider/Content/Anchor integration
- openOnHover with configurable openDelay/closeDelay on Trigger
- Modal mode: overlay + focus trap + preventScroll
- Custom anchor support
- All behavior layers integrated (Presence, FocusScope, Dismissal, ScrollLock, TextSelection)
- Demo page with 6 sections
Dialog improvements:
- variant prop: 'dialog' | 'alertdialog' (changes role, escape/outside behavior)
- restoreScrollDelay prop on Content (passed to ScrollLock)
- escapeKeydownBehavior defaults from variant (alertdialog → 'ignore')
- Demo page updated with AlertDialog and restoreScrollDelay sections
Fix: FloatingContent wrapper no longer sets z-index: auto inline
(was overriding CSS z-index, causing content to render below overlay)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Popover from './popover';
|
soma: 12 components, architecture docs, naming fixes, form tier complete
Components (12):
- Accordion (keyboard nav, single/multiple, collapsible, loop)
- Checkbox (indeterminate, group, readonly)
- Collapsible
- Combobox (input + floating listbox, consumer-side filtering)
- Dialog (variant dialog/alertdialog, modal, nested, animations, forceMount)
- DropdownMenu (15 parts, submenus, typeahead, checkbox/radio items)
- Popover (floating, openOnHover, modal, custom anchor)
- RadioGroup (roving tabindex, orientation, readonly)
- Select (single/multiple, typeahead, scroll-into-view, hidden select)
- Slider (drag, keyboard, single/range, ticks, vertical)
- Switch (hidden input, data-checked)
- Tooltip (skip-delay group, 3-state, hover/focus)
Architecture:
- State class files renamed: {name}.svelte.ts → {name}-provider.svelte.ts
(avoids Vite module resolution ambiguity with .svelte wrappers)
- Export name standardized: always Provider, never Root
- COMPONENT_GUIDE.md: step-by-step implementation guide with checklist
- SOMA_ARCHITECTURE.md: updated structure, anti-patterns, improvements table
- README.md: updated naming, file structure, inventory
- context.ts: error message uses Provider not Root
- Demo index page at /test/soma/
Bug fixes:
- DropdownMenu trigger missing onclick/onkeydown in props
- DropdownMenu interactOutsideBehavior always 'close' (not modal-dependent)
- Checkbox getContext in event handler → captured in constructor
- Select context not found → was Vite cache issue (not naming)
- ScrollLock unlock path
- Floating wrapper z-index: auto override
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as RadioGroup from './radio-group';
|
soma: dias date library, Calendar + RangeCalendar, Command fixes, doc updates
**Date library reorganisation** (no new third-party dependency)
- New `src/lib/util/dias/` with `_vendor/` (Adobe Apache 2.0 vendored code,
ATTRIBUTION.md preserved) and a public facade split into `types`,
`values`, `calendars`, `queries`, `operations`, `parse`, `format`,
`index`. Consumers import only from `$lib/util/dias`.
- All date-related `Intl` consolidated in `dias/format.ts` —
`DateFormatter`, cache, `resolveDateOrder`, `resolveHourCycle`,
placeholders, defaults.
- `ext/dates` now a thin reactive wrapper delegating to `dias`.
- Aligned App-layer `HourCycle` to canonical numeric form `12 | 24`
(matches `Intl.DateTimeFormat`'s `hour12`). Removed string form
`'12h' | '24h'` from `ext/app/types`, `ext/dates`,
`ext/presentation/locale-defaults`, and their tests.
- Repointed every consumer: `soma/external/dates`,
`terra/external/dates`, eight `routes/test/*` pages.
- Legacy `src/lib/util/dates/` left untouched by request.
**Tier 3 components**
- `soma/components/calendar/` — 14 parts, single + multiple selection,
`MonthSelect`/`YearSelect`, ISO/simple week numbers,
`isDateHoliday` matcher, `data-weekend` flag, navigation live-
region, RTL flip, full ARIA, 27-item checklist verified.
- `soma/components/range-calendar/` — 14 parts, range selection with
live hover preview (novel vs ark/bits/radix/react-aria), `minDays`
/ `maxDays` / `allowSingleDay`, third-click deselects only the
clicked endpoint.
- Test pages at `/test/soma/calendar` and `/test/soma/range-calendar`
with seven demos each. Links added to the soma index under a new
"Dates" section.
- READMEs with anatomy, parts, props, ARIA, keyboard, data-attrs, and
a competitive comparison table.
**Command fixes**
- Resolved O(N^2) reactive cascade: introduced
`visibleSet: $derived<Set<string>>` on the root provider;
per-item `isVisible` is now an O(1) `has()` lookup instead of
calling back into the provider, which was re-running all items'
derivations on every `itemsVersion` bump.
- Added `dir` prop with fallback to `soma.presentation.getDir()`;
horizontal arrows flip in RTL via `getDirectionalKeys`; root
receives `dir` attribute.
**Doc updates (session outcomes)**
- `CLAUDE.md`: replaced obsolete `@/glob/lib` date references with
`$lib/util/dias`; added canonical date-layer section; reinforced
`Provider` export rule and `data-{component}[-{part}]` naming
(never `data-soma-*`); clarified translation convention.
- `src/uix/soma/COMPONENT_GUIDE.md`: new checklist items 26
(component README required) and 27 (grep for data-attr
consistency); new Common Mistakes 11 (`data-soma-*` prefix), 12
(wrong date module), 13 (string `HourCycle`).
- `src/uix/soma/SOMA_ARCHITECTURE.md`: clarified data-attr naming
(canonical emitter is `createAttrs`; validator checks enum
values only, not names); new section covering date types and
formatting through `$soma/external/dates` → `$lib/util/dias`;
documented numeric `HourCycle`.
**Infrastructure**
- `PrimitiveHeaderAttributes` and `PrimitiveSelectAttributes` added
to `$soma/types`.
- `getLastFirstDayOfWeek`, `getNextLastDayOfWeek` re-exported from
`$soma/external/dates`.
- `calendar.*` and `range-calendar.*` translation blocks added to
`$soma/core/langs.ts`.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as RangeCalendar from './range-calendar';
|
soma: 10 new components, README docs for all 22, PrimitiveAnchorAttributes
New components (10):
- Tabs: roving tabindex, automatic/manual activation, onFocusChange
- ToggleGroup: single/multiple, roving tabindex, deselectable
- Toast: imperative API (createToaster), swipe-to-dismiss, hotkey, promise()
- ScrollArea: custom scrollbars, visibility modes, thumb drag, position tracking
- Splitter: resizable panels, collapsible, flex-grow sizing, double-click toggle
- Stepper: multi-step wizard, linear mode, step state, PrevTrigger/NextTrigger
- TreeView: WAI-ARIA tree pattern, expand/collapse, typeahead, * expand siblings
- Pagination: page range algorithm, siblingCount/boundaryCount, slice() utility
- Toolbar: WAI-ARIA toolbar, roving tabindex, integrated ToggleGroup, Separator
- Editable: inline edit, activation/submit modes, draft tracking, auto-resize
Documentation:
- README.md for all 22 components with anatomy, ARIA, data-*, keyboard, usage
- Comparison tables vs ark-ui, bits-ui, radix-ui for every component
Infrastructure:
- Added PrimitiveAnchorAttributes to $soma/types/html.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as ScrollArea from './scroll-area';
|
soma: 12 components, architecture docs, naming fixes, form tier complete
Components (12):
- Accordion (keyboard nav, single/multiple, collapsible, loop)
- Checkbox (indeterminate, group, readonly)
- Collapsible
- Combobox (input + floating listbox, consumer-side filtering)
- Dialog (variant dialog/alertdialog, modal, nested, animations, forceMount)
- DropdownMenu (15 parts, submenus, typeahead, checkbox/radio items)
- Popover (floating, openOnHover, modal, custom anchor)
- RadioGroup (roving tabindex, orientation, readonly)
- Select (single/multiple, typeahead, scroll-into-view, hidden select)
- Slider (drag, keyboard, single/range, ticks, vertical)
- Switch (hidden input, data-checked)
- Tooltip (skip-delay group, 3-state, hover/focus)
Architecture:
- State class files renamed: {name}.svelte.ts → {name}-provider.svelte.ts
(avoids Vite module resolution ambiguity with .svelte wrappers)
- Export name standardized: always Provider, never Root
- COMPONENT_GUIDE.md: step-by-step implementation guide with checklist
- SOMA_ARCHITECTURE.md: updated structure, anti-patterns, improvements table
- README.md: updated naming, file structure, inventory
- context.ts: error message uses Provider not Root
- Demo index page at /test/soma/
Bug fixes:
- DropdownMenu trigger missing onclick/onkeydown in props
- DropdownMenu interactOutsideBehavior always 'close' (not modal-dependent)
- Checkbox getContext in event handler → captured in constructor
- Select context not found → was Vite cache issue (not naming)
- ScrollLock unlock path
- Floating wrapper z-index: auto override
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Select from './select';
|
|
|
|
|
export * as Slider from './slider';
|
soma: 10 new components, README docs for all 22, PrimitiveAnchorAttributes
New components (10):
- Tabs: roving tabindex, automatic/manual activation, onFocusChange
- ToggleGroup: single/multiple, roving tabindex, deselectable
- Toast: imperative API (createToaster), swipe-to-dismiss, hotkey, promise()
- ScrollArea: custom scrollbars, visibility modes, thumb drag, position tracking
- Splitter: resizable panels, collapsible, flex-grow sizing, double-click toggle
- Stepper: multi-step wizard, linear mode, step state, PrevTrigger/NextTrigger
- TreeView: WAI-ARIA tree pattern, expand/collapse, typeahead, * expand siblings
- Pagination: page range algorithm, siblingCount/boundaryCount, slice() utility
- Toolbar: WAI-ARIA toolbar, roving tabindex, integrated ToggleGroup, Separator
- Editable: inline edit, activation/submit modes, draft tracking, auto-resize
Documentation:
- README.md for all 22 components with anatomy, ARIA, data-*, keyboard, usage
- Comparison tables vs ark-ui, bits-ui, radix-ui for every component
Infrastructure:
- Added PrimitiveAnchorAttributes to $soma/types/html.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Splitter from './splitter';
|
|
|
|
|
export * as Stepper from './stepper';
|
soma: 12 components, architecture docs, naming fixes, form tier complete
Components (12):
- Accordion (keyboard nav, single/multiple, collapsible, loop)
- Checkbox (indeterminate, group, readonly)
- Collapsible
- Combobox (input + floating listbox, consumer-side filtering)
- Dialog (variant dialog/alertdialog, modal, nested, animations, forceMount)
- DropdownMenu (15 parts, submenus, typeahead, checkbox/radio items)
- Popover (floating, openOnHover, modal, custom anchor)
- RadioGroup (roving tabindex, orientation, readonly)
- Select (single/multiple, typeahead, scroll-into-view, hidden select)
- Slider (drag, keyboard, single/range, ticks, vertical)
- Switch (hidden input, data-checked)
- Tooltip (skip-delay group, 3-state, hover/focus)
Architecture:
- State class files renamed: {name}.svelte.ts → {name}-provider.svelte.ts
(avoids Vite module resolution ambiguity with .svelte wrappers)
- Export name standardized: always Provider, never Root
- COMPONENT_GUIDE.md: step-by-step implementation guide with checklist
- SOMA_ARCHITECTURE.md: updated structure, anti-patterns, improvements table
- README.md: updated naming, file structure, inventory
- context.ts: error message uses Provider not Root
- Demo index page at /test/soma/
Bug fixes:
- DropdownMenu trigger missing onclick/onkeydown in props
- DropdownMenu interactOutsideBehavior always 'close' (not modal-dependent)
- Checkbox getContext in event handler → captured in constructor
- Select context not found → was Vite cache issue (not naming)
- ScrollLock unlock path
- Floating wrapper z-index: auto override
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Switch from './switch';
|
|
|
|
|
export * as Table from './table';
|
soma: 10 new components, README docs for all 22, PrimitiveAnchorAttributes
New components (10):
- Tabs: roving tabindex, automatic/manual activation, onFocusChange
- ToggleGroup: single/multiple, roving tabindex, deselectable
- Toast: imperative API (createToaster), swipe-to-dismiss, hotkey, promise()
- ScrollArea: custom scrollbars, visibility modes, thumb drag, position tracking
- Splitter: resizable panels, collapsible, flex-grow sizing, double-click toggle
- Stepper: multi-step wizard, linear mode, step state, PrevTrigger/NextTrigger
- TreeView: WAI-ARIA tree pattern, expand/collapse, typeahead, * expand siblings
- Pagination: page range algorithm, siblingCount/boundaryCount, slice() utility
- Toolbar: WAI-ARIA toolbar, roving tabindex, integrated ToggleGroup, Separator
- Editable: inline edit, activation/submit modes, draft tracking, auto-resize
Documentation:
- README.md for all 22 components with anatomy, ARIA, data-*, keyboard, usage
- Comparison tables vs ark-ui, bits-ui, radix-ui for every component
Infrastructure:
- Added PrimitiveAnchorAttributes to $soma/types/html.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Tabs from './tabs';
|
soma: add TagsInput component (23 total)
TagsInput with 7 parts: Provider, Control, Input, Item, ItemText,
ItemDeleteTrigger, ClearTrigger. Keyboard nav between tags (arrows,
Home/End, Backspace/Delete), paste split by delimiter, max tags,
custom validation, blur behavior, allow duplicates, data-highlighted.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as TagsInput from './tags-input';
|
soma: 10 new components, README docs for all 22, PrimitiveAnchorAttributes
New components (10):
- Tabs: roving tabindex, automatic/manual activation, onFocusChange
- ToggleGroup: single/multiple, roving tabindex, deselectable
- Toast: imperative API (createToaster), swipe-to-dismiss, hotkey, promise()
- ScrollArea: custom scrollbars, visibility modes, thumb drag, position tracking
- Splitter: resizable panels, collapsible, flex-grow sizing, double-click toggle
- Stepper: multi-step wizard, linear mode, step state, PrevTrigger/NextTrigger
- TreeView: WAI-ARIA tree pattern, expand/collapse, typeahead, * expand siblings
- Pagination: page range algorithm, siblingCount/boundaryCount, slice() utility
- Toolbar: WAI-ARIA toolbar, roving tabindex, integrated ToggleGroup, Separator
- Editable: inline edit, activation/submit modes, draft tracking, auto-resize
Documentation:
- README.md for all 22 components with anatomy, ARIA, data-*, keyboard, usage
- Comparison tables vs ark-ui, bits-ui, radix-ui for every component
Infrastructure:
- Added PrimitiveAnchorAttributes to $soma/types/html.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as Toast from './toast';
|
|
|
|
|
export * as ToggleGroup from './toggle-group';
|
|
|
|
|
export * as Toolbar from './toolbar';
|
|
|
|
|
export * as Tooltip from './tooltip';
|
soma: 10 new components, README docs for all 22, PrimitiveAnchorAttributes
New components (10):
- Tabs: roving tabindex, automatic/manual activation, onFocusChange
- ToggleGroup: single/multiple, roving tabindex, deselectable
- Toast: imperative API (createToaster), swipe-to-dismiss, hotkey, promise()
- ScrollArea: custom scrollbars, visibility modes, thumb drag, position tracking
- Splitter: resizable panels, collapsible, flex-grow sizing, double-click toggle
- Stepper: multi-step wizard, linear mode, step state, PrevTrigger/NextTrigger
- TreeView: WAI-ARIA tree pattern, expand/collapse, typeahead, * expand siblings
- Pagination: page range algorithm, siblingCount/boundaryCount, slice() utility
- Toolbar: WAI-ARIA toolbar, roving tabindex, integrated ToggleGroup, Separator
- Editable: inline edit, activation/submit modes, draft tracking, auto-resize
Documentation:
- README.md for all 22 components with anatomy, ARIA, data-*, keyboard, usage
- Comparison tables vs ark-ui, bits-ui, radix-ui for every component
Infrastructure:
- Added PrimitiveAnchorAttributes to $soma/types/html.ts
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
6 months ago
|
|
|
export * as TreeView from './tree-view';
|