Skip to content

Add primitive components#44

Draft
IzumiSy wants to merge 20 commits intomainfrom
add_primitive_components
Draft

Add primitive components#44
IzumiSy wants to merge 20 commits intomainfrom
add_primitive_components

Conversation

@IzumiSy
Copy link
Contributor

@IzumiSy IzumiSy commented Mar 4, 2026

Adds a comprehensive set of pre-styled primitive UI components to @tailor-platform/app-shell, giving consumers a complete toolkit for building ERP interfaces without additional UI library dependencies.

New Components (25)

  • Inputs & Selection: Autocomplete, Checkbox, Combobox (single/multi-select, creatable, async), NumberField, Radio, Select, Slider, Switch, Toggle, ToggleGroup
  • Overlays & Popups: AlertDialog, Popover, PreviewCard
  • Layout & Navigation: Accordion, ScrollArea, Tabs, Toolbar
  • Form: Field, Fieldset, Form, Label
  • Display: Avatar, Meter, Progress

Updated Components

  • Dialog, Sheet, Tooltip, Separator, Collapsible, Breadcrumb, Table — migrated from Radix/shadcn to Base UI primitives with consistent data-slot attributes and namespace object pattern (e.g. Dialog.Root, Dialog.Content)
  • Sidebar, CommandPalette, DescriptionCard, Layout — updated internal imports to use new primitive components

Hooks

  • Combobox.useCreatable — on-the-fly item creation with sync/async/deferred patterns
  • Combobox.useAsync / Autocomplete.useAsync — debounced async fetching with abort support
  • Combobox.useFilter / Autocomplete.useFilter — client-side filtering (re-exported from Base UI)

Other Changes

  • Reorganized index.ts exports into logical sections (Core, Module/Resource, Auth, Hooks, Routing, UI Components)
  • Added docs/components.md — comprehensive documentation for all 39 UI components
  • Migrated component docs from docs/api.md into the new file
  • Updated CLAUDE.md documentation index
  • Added tests for: Accordion, AlertDialog, Autocomplete, Checkbox, Combobox (incl. useCreatable), NumberField, Popover, Radio, Select, Slider, Switch, Tabs, Toggle

@IzumiSy IzumiSy self-assigned this Mar 4, 2026
@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 4, 2026

Open in StackBlitz

npm i https://pkg.pr.new/@tailor-platform/app-shell@44
npm i https://pkg.pr.new/@tailor-platform/app-shell-vite-plugin@44

commit: ba544cb

@IzumiSy IzumiSy force-pushed the add_primitive_components branch 2 times, most recently from b8d40a4 to f361611 Compare March 9, 2026 03:16
@IzumiSy
Copy link
Contributor Author

IzumiSy commented Mar 9, 2026

/review

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated by API Design Review for issue #44

@IzumiSy
Copy link
Contributor Author

IzumiSy commented Mar 9, 2026

/review

@IzumiSy IzumiSy force-pushed the add_primitive_components branch from 18cfb1c to 1fdf03c Compare March 9, 2026 08:04
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated by API Design Review for issue #44

@IzumiSy
Copy link
Contributor Author

IzumiSy commented Mar 9, 2026

/review

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated by API Design Review for issue #44

@IzumiSy
Copy link
Contributor Author

IzumiSy commented Mar 10, 2026

/review

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generated by API Design Review for issue #44

IzumiSy added 17 commits March 13, 2026 15:16
Aligns with other multi-part components (Dialog.Root, Tabs.Root, etc.):
- Radio.Root / Radio.Group
- Checkbox.Root / Checkbox.Group
- Toggle.Root / Toggle.Group

Also removes Skeleton from docs (component was deleted).
Expose an `error` field in UseAsyncItemsReturn so consumers can
distinguish network failures from empty result sets. The error is
set in the catch block and reset on successful fetch or empty input.
Rename `query` to `value` in AutocompleteUseAsyncReturn to match
the Root component's `value` prop, enabling ergonomic spread usage.
Also propagate the new `error` field from useAsyncItems.
Define and export ButtonProps type from button.tsx, re-export from
index.ts to follow the minimal export pattern (ComponentName + ComponentNameProps).
@IzumiSy IzumiSy force-pushed the add_primitive_components branch from d069858 to ba544cb Compare March 13, 2026 06:33
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