openpencil/src/theme/layout-alignment.ts
Danila Poyarkov e69ba75c12
refactor(ui): compose shared editor controls (#670)
* refactor(ui): extract shared action and navigation primitives

* refactor(ui): compose settings and libraries with shared tabs

* feat(ui): preserve native activation and toolbar keyboard navigation

* refactor(home): share document entries and accessible input controls

* fix(layers): share virtualized row geometry and selection styling

* refactor(layout): compose spacing and readable dimension controls

* refactor(properties): compose advanced strokes and inline effects

* refactor(ui): reuse actions in page and property controls

* refactor(settings): adopt shared actions without changing workflows

* refactor(ui): share collaboration and provider actions

* refactor(ui): finish shell and paint action composition

* test(ui): restore extracted control and settings coverage

* test(ui): complete workflow extraction coverage

* fix(ui): address review and trim redundant snapshots

* fix(layout): preserve single-step Undo for guides and wrap
2026-09-10 12:09:06 +03:00

25 lines
758 B
TypeScript

const layoutAlignmentTheme = {
slots: {
grid: 'grid w-fit grid-cols-3 gap-0.5 rounded bg-panel-field p-0.5',
cell: 'flex size-6 cursor-pointer items-center justify-center rounded border-0 text-[11px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent/50',
dot: 'size-1.5 rounded-full bg-current'
},
variants: {
active: {
true: { cell: 'bg-accent/10 text-accent' },
false: { cell: 'text-muted hover:bg-hover hover:text-surface' }
},
disabled: {
true: { cell: 'pointer-events-none opacity-50' },
false: {}
}
},
defaultVariants: {
active: false,
disabled: false
}
}
export type LayoutAlignmentTheme = typeof layoutAlignmentTheme
export default layoutAlignmentTheme