Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/node_modules
/dist
storybook-static
debug-storybook.log
debug-storybook.log
.vscode
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Supports WordPress filter hooks: `{snakeNamespace}_dataviews_{elementName}`
- **Composition pattern**: All components use compound component pattern (e.g., `Card` + `CardHeader` + `CardContent`)
- **`cn()` utility**: Use for merging Tailwind classes — combines `clsx` + `tailwind-merge`
- **`Field` wrapper**: Use to wrap form controls with consistent label, description, and error display
- **No WordPress dependency in UI components**: Only `Layout`, `DataViews`, and `Settings` (via `applyFilters`) touch WordPress APIs
- **No WordPress dependency in UI components**: Only `Layout`, `DataViews`, `DataForm`, and `Settings` (via `applyFilters`) touch WordPress APIs
- **Externals**: React, ReactDOM, and WordPress packages (`@wordpress/components`, `@wordpress/dataviews`, `@wordpress/hooks`, `@wordpress/i18n`, `@wordpress/date`) are externalized — consumers must provide them

## Before Committing & Pushing
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -121,4 +121,4 @@
"type": "git",
"url": "https://github.com/getdokan/plugin-ui.git"
}
}
}
21 changes: 19 additions & 2 deletions src/components/ui/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Core UI Components following ShadCN pattern
// All components are pure React - no WordPress dependencies
// Core UI Components following ShadCN pattern.
// Most components are pure React; the sanctioned WordPress-integrated
// exceptions (Layout, DataViews, DataForm, LayoutMenu, AdminNotice) are
// re-exported from here to keep a single UI barrel for consumers.

export { Alert, AlertDescription, AlertTitle, AlertAction } from "./alert";
export { default as AdminNotice } from "../wordpress/AdminNotice";
Expand Down Expand Up @@ -289,6 +291,21 @@ export {
FieldTitle,
} from "./field";
export { DataViews, type DataViewAction, type DataViewField, type DataViewFilterField, type DataViewFilterProps, type DataViewLayouts, type DataViewsProps, type DataViewState } from '../wordpress/dataviews';
export { DataForm, useFormValidity } from '@wordpress/dataviews/wp';
export type {
DataFormProps,
Form as DataFormSchema,
FormField as DataFormField,
FormValidity as DataFormValidity,
Layout as DataFormLayout,
LayoutType as DataFormLayoutType,
LabelPosition as DataFormLabelPosition,
RegularLayout as DataFormRegularLayout,
PanelLayout as DataFormPanelLayout,
CardLayout as DataFormCardLayout,
RowLayout as DataFormRowLayout,
DetailsLayout as DataFormDetailsLayout,
} from '@wordpress/dataviews';
Comment thread
kzamanbd marked this conversation as resolved.

// Calendar component (react-day-picker + WordPress timezone/locale)
export { Calendar, type CalendarProps } from "./calendar";
Expand Down
Loading
Loading