Skip to content

Feat/storybook - #14

Merged
rottenronin merged 13 commits into
mainfrom
feat/storybook
May 2, 2026
Merged

Feat/storybook#14
rottenronin merged 13 commits into
mainfrom
feat/storybook

Conversation

@rottenronin

Copy link
Copy Markdown
Owner

several improvements and add storybook ui documentation

longlong added 13 commits March 23, 2026 12:51
…book10, Cypress15

- TypeScript 5.9 to 6.0, vue-tsc 1.8 to 3.2 (Node 22+ support)
- Vite 5 to 8 (rolldown), Vitest 1 to 4, plugin-vue 5 to 6, plugin-vue-jsx 4 to 5
- ESLint 8 to 10 with flat config (eslint.config.cjs via FlatCompat)
- Storybook 8.6 to 10.3 (codemod migration, manager-api path moved)
- Cypress 13 to 15, cypress vite-dev-server 5 to 7
- vue-router 4 to 5, vue-i18n 9 to 11
- vue-datepicker 8 to 12 (named export, date-fns Locale)
- jsdom 23 to 29, types/node 20 to 25, faker 8 to 10
- vue/tsconfig 0.4 to 0.9 (extends tsconfig.dom.json)
- vite SCSS preprocessor: loadPaths instead of absolute imports
- engines.node >=22

BREAKING CHANGE: Node >=22 required; peerDependencies majors bumped
(vue-router 5, vue-i18n 11, vue ^3.5.33); .eslintrc.js / .eslintignore
replaced by eslint.config.cjs flat config; vue-datepicker 8 to 12 default
export removed.
A11y & UX
- new useFormControl(props, fallbackName, modelRef?) composable centralising
  inputId / errorId / hasError / hasErrorSlot / hasValueOrPlaceholder
- unified `error` slot on every form-control (legacy `errors` slot still
  supported with dev-mode deprecation warning)
- ARIA wiring: aria-invalid, aria-describedby, aria-required, error region
  with stable id on every form-control
- CDropdown: full ARIA listbox/option pattern with keyboard navigation
  (arrows, Home, End, Enter, Space, Esc, Tab) and aria-activedescendant
- CCheckbox: rebuilt with visually-hidden native input for proper
  screen-reader support and visible focus ring
- CSwitch: role=switch + aria-label prop
- CModal: <Teleport> (configurable), document-level Escape handler
- i18n aria-labels: common.aria.{close,previous,next,upload_zone} added
  to 6 locales (en, fr, de, es, it, cn); CTag, CDocumentViewer,
  CFileUploadZone use them
- CFileUploadZone: file input is tabindex=-1 aria-hidden, button is the
  real keyboard trigger

API
- CButton rewritten with <script setup>: variant (solid/outlined/text)
  and size (sm/md/lg), legacy props bridged via resolved computeds
- validators on CTag.type, CButton.variant, CButton.size
- new CSS vars: --c-form-control-padding-top, --c-form-control-error-reserve,
  --c-select-min-width, --c-select-arrow-space, --c-select-width
- new utility class .c-form-control--dense

Refactor
- migrate 14 v-model components to defineModel<T>() macro:
  CCheckbox, CCreditCardInput, CDatetimeInput, CDocumentViewer, CDrawer,
  CDropdown, CInput, CModal, CPhoneInput, CRadio, CSelect, CSlider,
  CSwitch, CTextarea
- modelValue removed from base-control-props.ts (per-component now)
- public API unchanged for consumers (props/events identical)

Fixes
- CTabs resize listener leak (mismatched anonymous arrows)
- CDropdown: clear scheduled timers and document listeners on unmount
- CModal/CEmpty: okLabel/cancelLabel defaults now reactive to locale
  (useI18n inside computeds with plugin fallback)
- CDatetimeInput, CTextarea: broken inputId now provided by useFormControl
- CPhoneInput: undefined phoneInputId now provided by useFormControl
- CDatatableFooter, CPhoneInput: handler types widened for defineModel

BREAKING CHANGE: modelValue removed from base-control-props.ts; public
v-model behaviour unchanged but internal prop merging is no longer applied.
@rottenronin rottenronin self-assigned this May 2, 2026
@rottenronin
rottenronin merged commit 13686a0 into main May 2, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant