cleanplate 0.1.11 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +193 -60
- package/dist/components/accordion/Accordion.d.ts +23 -12
- package/dist/components/accordion/Accordion.d.ts.map +1 -1
- package/dist/components/accordion/index.d.ts +2 -1
- package/dist/components/accordion/index.d.ts.map +1 -1
- package/dist/components/app-shell/AppShell.d.ts +35 -3
- package/dist/components/app-shell/AppShell.d.ts.map +1 -1
- package/dist/components/app-shell/index.d.ts +2 -1
- package/dist/components/app-shell/index.d.ts.map +1 -1
- package/dist/components/bottom-sheet/BottomSheet.d.ts +17 -16
- package/dist/components/bottom-sheet/BottomSheet.d.ts.map +1 -1
- package/dist/components/bottom-sheet/index.d.ts +2 -1
- package/dist/components/bottom-sheet/index.d.ts.map +1 -1
- package/dist/components/breadcrumb/BreadCrumb.d.ts +26 -0
- package/dist/components/breadcrumb/BreadCrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.d.ts +3 -2
- package/dist/components/breadcrumb/index.d.ts.map +1 -1
- package/dist/components/footer/Footer.d.ts +21 -16
- package/dist/components/footer/Footer.d.ts.map +1 -1
- package/dist/components/footer/index.d.ts +2 -1
- package/dist/components/footer/index.d.ts.map +1 -1
- package/dist/components/header/Header.d.ts +32 -28
- package/dist/components/header/Header.d.ts.map +1 -1
- package/dist/components/header/index.d.ts +2 -1
- package/dist/components/header/index.d.ts.map +1 -1
- package/dist/components/icon/material-icon-names.d.ts +5 -5
- package/dist/components/icon/material-icon-names.d.ts.map +1 -1
- package/dist/components/menu-list/MenuList.d.ts +32 -22
- package/dist/components/menu-list/MenuList.d.ts.map +1 -1
- package/dist/components/menu-list/index.d.ts +2 -1
- package/dist/components/menu-list/index.d.ts.map +1 -1
- package/dist/components/page-header/PageHeader.d.ts +22 -3
- package/dist/components/page-header/PageHeader.d.ts.map +1 -1
- package/dist/components/page-header/index.d.ts +2 -1
- package/dist/components/page-header/index.d.ts.map +1 -1
- package/dist/components/toast/Toast.d.ts +20 -12
- package/dist/components/toast/Toast.d.ts.map +1 -1
- package/dist/components/toast/index.d.ts +2 -1
- package/dist/components/toast/index.d.ts.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.es.css +1 -1
- package/dist/index.es.js +3 -3
- package/dist/index.js +3 -3
- package/docs/Accordion.md +125 -0
- package/docs/Alert.md +131 -0
- package/docs/Animated.md +101 -0
- package/docs/AppShell.md +145 -0
- package/docs/Avatar.md +130 -0
- package/docs/Badge.md +83 -0
- package/docs/BottomSheet.md +78 -0
- package/docs/BreadCrumb.md +133 -0
- package/docs/Button.md +189 -0
- package/docs/ConfirmDialog.md +139 -0
- package/docs/Container.md +230 -0
- package/docs/Dropdown.md +175 -0
- package/docs/Footer.md +93 -0
- package/docs/FormControls.md +115 -0
- package/docs/Header.md +115 -0
- package/docs/Icon.md +225 -0
- package/docs/MediaObject.md +303 -0
- package/docs/MenuList.md +113 -0
- package/docs/Modal.md +152 -0
- package/docs/PageHeader.md +134 -0
- package/docs/Pagination.md +142 -0
- package/docs/Pills.md +104 -0
- package/docs/Spinner.md +115 -0
- package/docs/Stepper.md +131 -0
- package/docs/Table.md +194 -0
- package/docs/Toast.md +96 -0
- package/docs/Typography.md +231 -0
- package/llms.txt +293 -0
- package/package.json +6 -1
package/llms.txt
ADDED
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
# CleanPlate Component Documentation Index
|
|
2
|
+
|
|
3
|
+
This file is published in the **`cleanplate` npm package** (next to `package.json`). Consumers and coding agents should use `node_modules/cleanplate/llms.txt` or a CDN URL pinned to their installed semver (see the README “LLM / AI-friendly docs & agents” section).
|
|
4
|
+
|
|
5
|
+
This file contains an index of all available component documentation for the CleanPlate UI framework.
|
|
6
|
+
|
|
7
|
+
## Project Overview
|
|
8
|
+
|
|
9
|
+
CleanPlate is a Headless React UI Framework providing reusable, accessible, and customizable components for building modern web applications.
|
|
10
|
+
|
|
11
|
+
## Guidelines for AI / LLM code generation
|
|
12
|
+
|
|
13
|
+
When generating code that uses CleanPlate components, **use component props instead of inline `style`** for layout, spacing, and alignment. The framework exposes these via props; inline styles bypass design tokens and consistency.
|
|
14
|
+
|
|
15
|
+
### Spacing (margin, padding, gap) — common rule for all components
|
|
16
|
+
|
|
17
|
+
**This rule applies to every CleanPlate component** that accepts `margin`, `padding`, or `gap` (Typography, Button, Container, Alert, Avatar, Accordion, Header, Footer, and others). All of them use the same **suffix-only** API; the component adds the prefix internally.
|
|
18
|
+
|
|
19
|
+
- **Correct:** `margin="0"`, `margin="b-2"`, `margin={["b-2", "t-1"]}`, `padding="4"`, `gap="2"`. The component turns these into m-0, m-b-2, p-4, g-2, etc.
|
|
20
|
+
- **Wrong:** `margin="m-0"`, `padding="p-4"`, `gap="g-2"` — do not include the m-, p-, or g- prefix.
|
|
21
|
+
- Common suffixes: "0", "1", "2", "3", "4", "b-1", "b-2", "t-2", "y-2", "x-2".
|
|
22
|
+
- Use the `margin` / `padding` / `gap` prop instead of `style={{ marginBottom, paddingTop, gap }}` for spacing.
|
|
23
|
+
|
|
24
|
+
### Typography
|
|
25
|
+
- **Text alignment:** Use the `align` prop. Example: `<Typography align="center">` not `style={{ textAlign: "center" }}`. Values: `"left"`, `"center"`, `"right"`.
|
|
26
|
+
- **Spacing:** Use `margin` with the spacing suffix (see above; same rule as all components).
|
|
27
|
+
- **Bold:** Use `isBold` prop, not `style={{ fontWeight: "bold" }}`.
|
|
28
|
+
|
|
29
|
+
### Other components
|
|
30
|
+
- **Container:** Use `padding`, `margin`, `gap`, `align`, `justify`, `display`, `width` props (spacing uses suffix rule above).
|
|
31
|
+
- **Button, Alert, Badge, etc.:** Each has documented props (e.g. variant, size, margin). Prefer these over inline style. Any `margin` or `padding` prop follows the suffix rule. See `docs/<ComponentName>.md` for the full prop list.
|
|
32
|
+
|
|
33
|
+
### Example (correct)
|
|
34
|
+
```jsx
|
|
35
|
+
<Typography variant="h4" align="center" margin="b-2">Login</Typography>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Example (avoid)
|
|
39
|
+
```jsx
|
|
40
|
+
<Typography variant="h4" style={{ textAlign: "center", marginBottom: "1rem" }}>Login</Typography>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Component Documentation
|
|
44
|
+
|
|
45
|
+
All component documentation is located in the `docs/` folder. The following documentation files are available:
|
|
46
|
+
|
|
47
|
+
### Button Component
|
|
48
|
+
- File: `docs/Button.md`
|
|
49
|
+
- Purpose: A highly customizable and interactive UI element designed to handle user actions with various styles, sizes, and variants. Supports loading states, disabled states, and click events.
|
|
50
|
+
- Key Features: Variants (solid, outline, ghost, icon), sizes (small, medium), loading states, disabled states, fluid layout, margin spacing
|
|
51
|
+
- Types: ButtonProps, ButtonSize, ButtonVariant, ButtonMargin, SpacingOption
|
|
52
|
+
|
|
53
|
+
### Typography Component
|
|
54
|
+
- File: `docs/Typography.md`
|
|
55
|
+
- Purpose: Provides a consistent set of text styles for headings, paragraphs, and inline elements, ensuring clear hierarchy, readability, and brand-aligned communication across the interface.
|
|
56
|
+
- Key Features: Variants (h1-h6, p, span, small), text alignment, word breaking, bold text, margin spacing
|
|
57
|
+
- Types: TypographyProps, TypographyVariant, TypographyAlign, TypographyWordBreak, TypographyMargin, SpacingOption
|
|
58
|
+
|
|
59
|
+
### Icon Component
|
|
60
|
+
- File: `docs/Icon.md`
|
|
61
|
+
- Purpose: A versatile and reusable element for displaying scalable vector icons, supporting various sizes, colors, and custom classes. Uses Google Material Symbols.
|
|
62
|
+
- Key Features: Material Symbols integration, sizes (small, medium, large), colors (black, white, gray, blue, green, red, yellow, orange)
|
|
63
|
+
- Types: IconProps, IconSize, IconColor
|
|
64
|
+
- Note: Requires Material Symbols font to be included in the project
|
|
65
|
+
|
|
66
|
+
### MediaObject Component
|
|
67
|
+
- File: `docs/MediaObject.md`
|
|
68
|
+
- Purpose: A flexible layout pattern that combines media (icon, image, or avatar) with content (title and description). Perfect for displaying user profiles, product cards, notifications, and any content that needs a media element alongside text.
|
|
69
|
+
- Key Features: Media types (icon, image, avatar), title and description, margin and padding spacing, clickable support
|
|
70
|
+
- Types: MediaObjectProps, MediaObjectMargin, MediaObjectPadding, SpacingOption
|
|
71
|
+
- Related Components: Uses Avatar and Typography internally
|
|
72
|
+
|
|
73
|
+
### Avatar Component
|
|
74
|
+
- File: `docs/Avatar.md`
|
|
75
|
+
- Purpose: Displays user initials, an image, or a Material icon in a consistent circle. Use for user identity in headers, lists, MediaObject, or anywhere you need a compact avatar.
|
|
76
|
+
- Key Features: Display modes (initials, image, icon), sizes (small, medium), margin spacing (suffix API: e.g. "0" → m-0), optional onClick
|
|
77
|
+
- Types: AvatarProps, AvatarSize, AvatarMargin, SpacingOption; icon prop uses MaterialIconName from Icon
|
|
78
|
+
- Related Components: Used by MediaObject; often used with Container, Icon
|
|
79
|
+
|
|
80
|
+
### Container Component
|
|
81
|
+
- File: `docs/Container.md`
|
|
82
|
+
- Purpose: A layout wrapper that controls display type, width, spacing (margin, padding, gap), and flex alignment. Use it to structure content, create flex layouts, and apply consistent spacing.
|
|
83
|
+
- Key Features: Display (block, flex, inline-block), width variants, margin/padding/gap spacing (suffix API: e.g. "4" → p-4, "0" → m-0), flex align/justify, responsive width at 600px
|
|
84
|
+
- Types: ContainerProps, ContainerDisplay, ContainerWidth, ContainerJustify, ContainerAlign, ContainerSpacing, SpacingOption
|
|
85
|
+
|
|
86
|
+
### Dropdown Component
|
|
87
|
+
- File: `docs/Dropdown.md`
|
|
88
|
+
- Purpose: Floating panel that shows content relative to a trigger. Use for menus, option lists, or any content that opens on click.
|
|
89
|
+
- Key Features: 12 placements, flip/shift to stay in viewport, three trigger modes (trigger element, renderTrigger, triggerLabel), close on outside click or Escape
|
|
90
|
+
- Types: DropdownProps, DropdownPlacement, DropdownTriggerProps, DropdownRenderTriggerParams
|
|
91
|
+
- Related Components: Button (trigger), MenuList (content)
|
|
92
|
+
|
|
93
|
+
### Alert Component
|
|
94
|
+
- File: `docs/Alert.md`
|
|
95
|
+
- Purpose: Displays a short message with optional variant icon and dismiss button. Use for inline feedback (success, error, warning, info) or neutral notices.
|
|
96
|
+
- Key Features: Variants (default, info, warning, error, success), sizes (small, medium, large), dismissible with onDismiss, margin spacing (suffix API), unmounts on dismiss
|
|
97
|
+
- Types: AlertProps, AlertSize, AlertVariant, AlertMargin, SpacingOption
|
|
98
|
+
- Related Components: Typography, Container, Button, Icon (used internally)
|
|
99
|
+
|
|
100
|
+
### Spinner Component
|
|
101
|
+
- File: `docs/Spinner.md`
|
|
102
|
+
- Purpose: Loading indicator that shows a rotating Material icon. Use for progress or activity states.
|
|
103
|
+
- Key Features: Six icon options (progress_activity, autorenew, sync, refresh, cached, loop), sizes (small, medium, large), variants (light, dark), margin spacing (suffix API)
|
|
104
|
+
- Types: SpinnerProps, SpinnerSize, SpinnerVariant, SpinnerIcon, SpinnerMargin, SpacingOption
|
|
105
|
+
- Related Components: Container, Icon (used internally)
|
|
106
|
+
|
|
107
|
+
### Stepper Component
|
|
108
|
+
- File: `docs/Stepper.md`
|
|
109
|
+
- Purpose: Displays a sequence of steps for wizards or multi-step flows. Each step has label, key, and optional active/completed state; steps can be clickable.
|
|
110
|
+
- Key Features: Variants (horizontal, vertical), config-driven steps (StepperStepConfig), optional onClick(step), margin spacing (suffix API), completed state shows done icon
|
|
111
|
+
- Types: StepperProps, StepperStepConfig, StepperVariant, StepperMargin, SpacingOption
|
|
112
|
+
- Related Components: Container, Typography, Icon (used internally)
|
|
113
|
+
|
|
114
|
+
### BreadCrumb Component
|
|
115
|
+
- File: `docs/BreadCrumb.md`
|
|
116
|
+
- Purpose: Renders a semantic navigation trail (e.g. Home → Products → Current page). Use at the top of a page to show hierarchy and let users navigate back. Last item without href is the current page.
|
|
117
|
+
- Key Features: Semantic nav/ol/li, aria-current="page", Schema.org BreadcrumbList, separators (chevron, slash), items (label, optional href), margin spacing (suffix API)
|
|
118
|
+
- Types: BreadCrumbProps, BreadCrumbItem, BreadCrumbSeparator, BreadCrumbMargin, SpacingOption
|
|
119
|
+
- Related Components: Container, Typography, Icon (used internally), Header
|
|
120
|
+
|
|
121
|
+
### Accordion Component
|
|
122
|
+
- File: `docs/Accordion.md`
|
|
123
|
+
- Purpose: Collapsible panels from array of title and content items. For FAQ sections, feature lists, or expandable content.
|
|
124
|
+
- Key Features: items (title, content), allowMultiple, defaultExpandedIndex, iconVariant (expand, plus), variant (grouped, spaced), titleTag (span, h2–h6 for SEO), margin, padding (suffix API), className
|
|
125
|
+
- Types: AccordionProps, AccordionItem, AccordionIconVariant, AccordionVariant, AccordionTitleTag, AccordionMargin, AccordionPadding
|
|
126
|
+
- Related Components: Container, Typography, Icon (used internally)
|
|
127
|
+
|
|
128
|
+
### ConfirmDialog Component
|
|
129
|
+
- File: `docs/ConfirmDialog.md`
|
|
130
|
+
- Purpose: Modal dialog for confirmation actions (delete, discard, proceed). Title, description, primary/secondary buttons, optional close button; overlay and Escape to close.
|
|
131
|
+
- Key Features: Variants (default, destructive, warning), sizes (small, medium, large), showCloseButton, closeOnOverlayClick, closeOnEscape, focus and body scroll management
|
|
132
|
+
- Types: ConfirmDialogProps, ConfirmDialogSize, ConfirmDialogVariant
|
|
133
|
+
- Related Components: Button, Typography, Icon (used internally)
|
|
134
|
+
|
|
135
|
+
### Modal Component
|
|
136
|
+
- File: `docs/Modal.md`
|
|
137
|
+
- Purpose: Full-featured modal overlay for forms, long content, or custom dialogs. Optional title, close button, footer primary/secondary buttons; overlay and Escape to close.
|
|
138
|
+
- Key Features: Sizes (small, medium, large, fullscreen), showCloseButton, closeOnOverlayClick, closeOnEscape, margin spacing, contentClassName/overlayClassName, focus and body scroll management
|
|
139
|
+
- Types: ModalProps, ModalSize, ModalMargin, SpacingOption
|
|
140
|
+
- Related Components: ConfirmDialog (simpler confirm-only), Button, Typography, Icon (used internally)
|
|
141
|
+
|
|
142
|
+
### Pagination Component
|
|
143
|
+
- File: `docs/Pagination.md`
|
|
144
|
+
- Purpose: Navigate large content sets by pages. Shows total count, prev/next and page-number buttons with ellipsis, and optional rows-per-page select. Controlled via currentPage and rowsPerPage.
|
|
145
|
+
- Key Features: Variants (default, minimal), rowsPerPageOptions, onPageChange(page, rowsPerPage), onRowsPerPageChange(rowsPerPage), margin spacing (suffix API)
|
|
146
|
+
- Types: PaginationProps, PaginationVariant, PaginationMargin, PaginationRowsPerPageOption, SpacingOption
|
|
147
|
+
- Related Components: Table (often used with Pagination), Container, Button, FormControls.Select, Typography, Icon (used internally)
|
|
148
|
+
|
|
149
|
+
### Table Component
|
|
150
|
+
- File: `docs/Table.md`
|
|
151
|
+
- Purpose: Displays structured data in a table with configurable columns, optional built-in pagination, and responsive mobile view (MediaObject cards when viewport < 768px and mobileColumns set).
|
|
152
|
+
- Key Features: columns (id, title, textAlign, widthPercentage, customRender), data (TableRow[]), variants (default, compact), mobileColumns, onRowClick, pagination props (totalItems, currentPage, onPageChange, etc.), hidePagination, margin (suffix API)
|
|
153
|
+
- Types: TableProps, TableColumn, TableRow, TableVariant, TableMargin, TableColumnTextAlign, TableMobileColumns, SpacingOption
|
|
154
|
+
- Related Components: Pagination (built-in), MediaObject (mobile view), Typography, Container, Badge (often in customRender)
|
|
155
|
+
|
|
156
|
+
### Badge Component
|
|
157
|
+
- File: `docs/Badge.md`
|
|
158
|
+
- Purpose: Short label with colored background for status, tags, or counts. Inline-block, five variants.
|
|
159
|
+
- Key Features: label, variant (default, info, success, warning, error), className
|
|
160
|
+
- Types: BadgeProps, BadgeVariant
|
|
161
|
+
- Related Components: Table (often in customRender for status columns), Container (layout for multiple badges)
|
|
162
|
+
|
|
163
|
+
### Pills Component
|
|
164
|
+
- File: `docs/Pills.md`
|
|
165
|
+
- Purpose: Single tag/chip with modes: read-only (label only), edit (input + submit), remove (label + close). For tags, filters, editable chips.
|
|
166
|
+
- Key Features: mode (read-only, edit, remove), label, placeholder, onSubmit(value), onRemove(), isLoading, isDisabled, margin (suffix API)
|
|
167
|
+
- Types: PillsProps, PillsMode, PillsMargin, SpacingOption
|
|
168
|
+
- Related Components: Container (layout), FormControls.Input, Button, Icon, Spinner, Typography (used internally)
|
|
169
|
+
|
|
170
|
+
### Animated Component
|
|
171
|
+
- File: `docs/Animated.md`
|
|
172
|
+
- Purpose: Atom that adds scroll-triggered entrance/exit animations. Uses IntersectionObserver; applies animation class when element enters viewport.
|
|
173
|
+
- Key Features: animationType (fade-in/out top, right, bottom, left), as (polymorphic root), delay (ms for stagger), margin (suffix API), isBlock
|
|
174
|
+
- Types: AnimatedProps, AnimatedMargin, AnimationType, AnimationDelay, SpacingOption
|
|
175
|
+
- Related Components: Container, Typography, Avatar (content); Header, BottomSheet, MenuList (use Animated internally)
|
|
176
|
+
|
|
177
|
+
### FormControls
|
|
178
|
+
- File: `docs/FormControls.md`
|
|
179
|
+
- Purpose: Set of form primitives: Input, TextArea, Select, Date, Checkbox, Radio, File, Toggle, Stepper. Access via FormControls.Input, FormControls.Select, etc.
|
|
180
|
+
- Key Features: Input (text), TextArea, Select (single/multi, options { label, value }), Date (dd-mm-yyyy), Checkbox (onChange(boolean)), Radio, File, Toggle, Stepper; common props label, isRequired, isFluid, error
|
|
181
|
+
- Types: InputProps, SelectProps, SelectOption, TextAreaProps, CheckboxProps, FileProps, RadioProps, ToggleProps, DateProps, FormControlsStepperProps
|
|
182
|
+
- Related Components: Pills (Input), Pagination (Select), Container, Button
|
|
183
|
+
|
|
184
|
+
### Toast Component
|
|
185
|
+
- File: `docs/Toast.md`
|
|
186
|
+
- Purpose: Displays transient messages in a portal (fixed top-right). Use ref.addMessage({ mode, message }) imperatively.
|
|
187
|
+
- Key Features: Imperative API (addMessage), variants (info, error, warning, success), autoClose, autoCloseTime, portal rendering, click to dismiss
|
|
188
|
+
- Types: ToastProps, ToastRefHandle, ToastMessage, ToastVariant
|
|
189
|
+
- Related Components: Alert (inline feedback), Button (trigger), Container (layout)
|
|
190
|
+
|
|
191
|
+
### MenuList Component
|
|
192
|
+
- File: `docs/MenuList.md`
|
|
193
|
+
- Purpose: Renders a list of navigational items with optional icons, active state highlighting, and customizable layout.
|
|
194
|
+
- Key Features: items (label, value, icon), activeItem, direction (horizontal, vertical), sizes (small, medium, large), variants (light, dark), margin (suffix API), onMenuClick(item), Animated entrance
|
|
195
|
+
- Types: MenuListProps, MenuListItem, MenuListSize, MenuListVariant, MenuListDirection, MenuListMargin
|
|
196
|
+
- Related Components: Dropdown (content), Header (navigation), Container, Typography, Icon, Animated (used internally)
|
|
197
|
+
|
|
198
|
+
### Header Component
|
|
199
|
+
- File: `docs/Header.md`
|
|
200
|
+
- Purpose: Responsive navigation header with logo, menu items, and customizable left/center/right slots.
|
|
201
|
+
- Key Features: logoUrl, menuItems, activeMenuItem, onMenuItemClick, headerLeft, headerCenter, headerRight, sizes (small, medium, large), variants (light, dark), margin (suffix API), responsive mobile menu
|
|
202
|
+
- Types: HeaderProps, HeaderSize, HeaderVariant, HeaderMargin
|
|
203
|
+
- Related Components: MenuList (center and mobile menu), Avatar (headerRight), Button, Icon, Animated (used internally)
|
|
204
|
+
|
|
205
|
+
### PageHeader Component
|
|
206
|
+
- File: `docs/PageHeader.md`
|
|
207
|
+
- Purpose: Two-column page header: left (title, subtitle), right (primary CTA, more menu with three-dots icon). For page/section headings and actions.
|
|
208
|
+
- Key Features: title, subtitle (string or ReactNode), primaryCta (ReactNode), moreMenuItems (label, onClick) or moreMenuContent, right column aligned right, className
|
|
209
|
+
- Types: PageHeaderProps, PageHeaderMoreMenuItem
|
|
210
|
+
- Related Components: Button, Typography, Dropdown, Icon (used internally), Container
|
|
211
|
+
|
|
212
|
+
### BottomSheet Component
|
|
213
|
+
- File: `docs/BottomSheet.md`
|
|
214
|
+
- Purpose: Slides up from the bottom of the screen for additional content, forms, or actions.
|
|
215
|
+
- Key Features: isOpen, onClose, snap points (30%, 60%, 90%), drag-to-close, touch and mouse support, body scroll lock, margin (suffix API)
|
|
216
|
+
- Types: BottomSheetProps, BottomSheetMargin
|
|
217
|
+
- Related Components: Modal, ConfirmDialog, Button, Container, Typography
|
|
218
|
+
|
|
219
|
+
### Footer Component
|
|
220
|
+
- File: `docs/Footer.md`
|
|
221
|
+
- Purpose: Customizable footer with copyright, optional powered-by link, and custom content via children.
|
|
222
|
+
- Key Features: brandName, poweredByLabel, poweredByLink, children, sizes (small, medium, large), variants (light, dark), margin (suffix API)
|
|
223
|
+
- Types: FooterProps, FooterSize, FooterVariant, FooterMargin
|
|
224
|
+
- Related Components: Container (footer columns), Typography (used internally), Header (app layout)
|
|
225
|
+
|
|
226
|
+
### AppShell Component
|
|
227
|
+
- File: `docs/AppShell.md`
|
|
228
|
+
- Purpose: Full-page layout combining optional Header (top), Footer (bottom), and MenuList as left sidebar with main content. For dashboard-style apps.
|
|
229
|
+
- Key Features: header (Header props or ReactNode), footer (Footer props or ReactNode), sidebar (AppShellSidebarConfig: items, activeItem, onMenuClick, size, variant), sidebarWidth, responsive (sidebar hidden ≤1024px; use header mobile menu)
|
|
230
|
+
- Types: AppShellProps, AppShellSidebarConfig
|
|
231
|
+
- Related Components: Header, Footer, MenuList (sidebar), Container, Typography, Avatar
|
|
232
|
+
|
|
233
|
+
## Documentation Format
|
|
234
|
+
|
|
235
|
+
All documentation files follow a consistent format:
|
|
236
|
+
1. Component name and purpose
|
|
237
|
+
2. Props/Inputs table with types, defaults, and descriptions
|
|
238
|
+
3. TypeScript type definitions
|
|
239
|
+
4. Usage examples covering common use cases
|
|
240
|
+
5. Behavior notes explaining important details
|
|
241
|
+
6. Related components and links
|
|
242
|
+
|
|
243
|
+
## Quick Reference
|
|
244
|
+
|
|
245
|
+
| Component | File | Primary Use Case |
|
|
246
|
+
|-----------|------|------------------|
|
|
247
|
+
| Button | `docs/Button.md` | User actions and interactions |
|
|
248
|
+
| Typography | `docs/Typography.md` | Text content and headings |
|
|
249
|
+
| Icon | `docs/Icon.md` | Visual icons and symbols |
|
|
250
|
+
| MediaObject | `docs/MediaObject.md` | Media + content layouts |
|
|
251
|
+
| Avatar | `docs/Avatar.md` | User identity (initials, image, or icon) |
|
|
252
|
+
| Container | `docs/Container.md` | Layout, spacing, and flex structure |
|
|
253
|
+
| Dropdown | `docs/Dropdown.md` | Menus and floating panels |
|
|
254
|
+
| Alert | `docs/Alert.md` | Inline feedback and notices |
|
|
255
|
+
| Spinner | `docs/Spinner.md` | Loading and activity indicator |
|
|
256
|
+
| Stepper | `docs/Stepper.md` | Multi-step flows and wizards |
|
|
257
|
+
| BreadCrumb | `docs/BreadCrumb.md` | Navigation trail and page hierarchy |
|
|
258
|
+
| Accordion | `docs/Accordion.md` | Collapsible panels and FAQ sections |
|
|
259
|
+
| ConfirmDialog | `docs/ConfirmDialog.md` | Confirmation modals and destructive actions |
|
|
260
|
+
| Modal | `docs/Modal.md` | Forms, long content, and custom dialogs |
|
|
261
|
+
| Pagination | `docs/Pagination.md` | Page navigation for tables and lists |
|
|
262
|
+
| Table | `docs/Table.md` | Structured tabular data with optional pagination and mobile view |
|
|
263
|
+
| Badge | `docs/Badge.md` | Status labels, tags, and counts with colored variants |
|
|
264
|
+
| Pills | `docs/Pills.md` | Tags/chips with read-only, edit, and remove modes |
|
|
265
|
+
| Animated | `docs/Animated.md` | Scroll-triggered entrance/exit animations |
|
|
266
|
+
| FormControls | `docs/FormControls.md` | Form primitives (Input, Select, TextArea, Date, Checkbox, etc.) |
|
|
267
|
+
| Toast | `docs/Toast.md` | Transient messages via ref.addMessage |
|
|
268
|
+
| MenuList | `docs/MenuList.md` | Nav menus and link lists with icons |
|
|
269
|
+
| Header | `docs/Header.md` | Responsive navigation header with logo and menu |
|
|
270
|
+
| PageHeader | `docs/PageHeader.md` | Page title, subtitle, primary CTA, and more menu |
|
|
271
|
+
| BottomSheet | `docs/BottomSheet.md` | Slide-up panel for forms and actions |
|
|
272
|
+
| Footer | `docs/Footer.md` | App footer with copyright and optional links |
|
|
273
|
+
| AppShell | `docs/AppShell.md` | Dashboard layout with header, sidebar, footer, and main content |
|
|
274
|
+
|
|
275
|
+
## Additional Resources
|
|
276
|
+
|
|
277
|
+
- Component source code: `src/components/`
|
|
278
|
+
- Storybook documentation: Available at the project's Storybook instance
|
|
279
|
+
- Type definitions: `src/types/` and component-specific type exports
|
|
280
|
+
- Storybook static build: `storybook-static/`
|
|
281
|
+
- Component stories: `src/stories/`
|
|
282
|
+
|
|
283
|
+
## Installation
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
npm install cleanplate
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## Usage
|
|
290
|
+
|
|
291
|
+
```jsx
|
|
292
|
+
import { Button, Typography, Icon, MediaObject, Avatar, Container, Dropdown, Alert, Spinner, Stepper, BreadCrumb, Accordion, ConfirmDialog, Modal, Pagination, Table, Badge, Pills, Animated, FormControls, Toast, MenuList, Header, PageHeader, BottomSheet, Footer, AppShell } from "cleanplate";
|
|
293
|
+
```
|
package/package.json
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cleanplate",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"description": "CleanPlate - A Headless React UI Framework",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist",
|
|
7
|
+
"docs",
|
|
8
|
+
"llms.txt"
|
|
9
|
+
],
|
|
5
10
|
"main": "dist/index.js",
|
|
6
11
|
"module": "dist/index.es.js",
|
|
7
12
|
"types": "dist/index.d.ts",
|