Skip to content

fix: export table and MUI types, add label prop to Checkbox and Toggle - #118

Merged
psterpu-c merged 4 commits into
mainfrom
fix-exports
Nov 5, 2026
Merged

psterpu-c merged 4 commits into
mainfrom
fix-exports

Conversation

@psterpu-c

Copy link
Copy Markdown
Contributor

📝 Description

Exposes more of the public surface without needing the underlying libraries, and brings Checkbox and Toggle in line with RadioButton for labels. All changes are additive.

  • Table and MUI types: kit-named table type aliases (TableSortingState, TableRowSelectionState, TableVisibilityState, TablePaginationState, TableColumnPinningState, TableColumnDef, TableRowModel, TableCellModel, TableInstance) and re-exports of SxProps, Theme, SvgIconProps and SystemStyleObject.
  • Checkbox and Toggle: new label and formControlLabelProps props, with label styling shared with RadioButton through one helper (getControlLabelStyles in theme/style/common.tsx). Without label, both render exactly as before.
  • Link: extra tests showing that absolute URLs render plain anchors and that download and reloadDocument work. No component changes.
  • Repo: ignore .cursor in .gitignore.

🔗 Related Issue

Closes #

🧪 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style/design update
  • 🔧 Build/CI update
  • ♻️ Refactoring (no functional changes)
  • 🧪 Tests only

🧪 Testing

  • Focused tests pass (yarn test --testPathPattern=<component-or-area>)
  • Lint and typecheck pass (yarn lint && yarn typecheck)
  • Storybook builds successfully (yarn storybook:build)
  • Manual testing completed
  • Cross-browser testing (if applicable)

Test Instructions:

  1. yarn workspace @open-ui-kit/core test src/components/checkbox src/components/toggle src/components/radio src/components/link
  2. yarn workspace @open-ui-kit/core typecheck && yarn workspace @open-ui-kit/core lint
  3. yarn storybook, then open Components/Checkbox and Components/Toggle:
    • With Label: label sits on the right with a 4px gap, same as Radio Button.
    • Toggle › With Label: the disabled example has the label on the left (labelPlacement: "start").
    • Disabled: the label uses the disabled text colour.
    • Clicking a label toggles the control.
  4. Type aliases: in a consumer project, import type { TableSortingState, TableColumnDef, Theme, SxProps } from "@open-ui-kit/core" should resolve.

♿ Accessibility

  • Follows WCAG 2.1 AA guidelines
  • Keyboard navigation tested
  • Screen reader tested
  • Color contrast verified
  • Focus indicators present
  • ARIA attributes added where needed

📱 Responsive Design

  • Mobile responsive
  • Tablet responsive
  • Desktop responsive
  • All breakpoints tested

📚 Documentation

  • Storybook story added/updated
  • Component props documented
  • Usage examples provided
  • README updated (if needed)
  • TypeScript types exported

🔄 Breaking Changes

  • This PR introduces breaking changes
  • Migration guide provided (if breaking changes)
  • Version bump required

None. The new props are optional and unused elsewhere in the repo. CheckboxProps and ToggleProps changed from type aliases to interfaces extending the MUI props, with the same names and exports.

📋 Checklist

  • Code follows the project's style guidelines
  • Self-review of code completed
  • Code is commented where necessary
  • No console.log statements left in code
  • Build passes locally
  • Tests added for new functionality
  • Existing tests still pass
  • No TypeScript errors
  • No accessibility violations
  • Full unscoped yarn test was not run locally
  • PR title follows conventional commit format

📸 Screenshots

Before

After


For Maintainers:

  • Ready for review
  • Requires design review
  • Requires accessibility review
  • Ready to merge

Signed-off-by: psterpu-c <psterpu@cisco.com>
Signed-off-by: psterpu-c <psterpu@cisco.com>
Signed-off-by: psterpu-c <psterpu@cisco.com>
@psterpu-c
psterpu-c requested a review from a team as a code owner November 5, 2026 11:58
Signed-off-by: psterpu-c <psterpu@cisco.com>
@psterpu-c
psterpu-c merged commit 6f6cb2c into main Nov 5, 2026
14 checks passed
@psterpu-c
psterpu-c deleted the fix-exports branch November 5, 2026 14:08
@rafaelsilva29

Copy link
Copy Markdown
Member

🎉 This PR is included in version 3.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants