@mantis-core/ui 0.4.0 → 0.5.0
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/COMPONENTS.md +115 -15
- package/docs/components/action-column.md +14 -13
- package/docs/components/admin-page-configurator.md +23 -0
- package/docs/components/admin-page-header.md +15 -17
- package/docs/components/admin-page-layout-shell.md +22 -0
- package/docs/components/admin-page-layout.md +11 -20
- package/docs/components/app-shell.md +20 -0
- package/docs/components/async-select.md +18 -17
- package/docs/components/avatar.md +19 -0
- package/docs/components/bar-chart.md +21 -0
- package/docs/components/breadcrumbs.md +15 -0
- package/docs/components/button.md +20 -15
- package/docs/components/card-skeleton.md +15 -0
- package/docs/components/change-password-form.md +17 -0
- package/docs/components/ckeditor-input.md +15 -16
- package/docs/components/color-picker-input.md +19 -0
- package/docs/components/combobox.md +19 -0
- package/docs/components/command-palette.md +17 -0
- package/docs/components/confirm-dialog.md +19 -17
- package/docs/components/currency-input.md +21 -0
- package/docs/components/data-state.md +15 -15
- package/docs/components/date-input.md +17 -18
- package/docs/components/date-presets.md +18 -0
- package/docs/components/date-range-input.md +20 -0
- package/docs/components/description-list.md +16 -0
- package/docs/components/dirty-form-guard.md +15 -23
- package/docs/components/donut-chart.md +21 -0
- package/docs/components/drawer.md +19 -0
- package/docs/components/drop-down.md +18 -20
- package/docs/components/empty-state.md +18 -0
- package/docs/components/error-boundary.md +17 -0
- package/docs/components/error-message.md +11 -9
- package/docs/components/file-dropzone.md +28 -16
- package/docs/components/filter-pannel.md +12 -14
- package/docs/components/forgot-password-form.md +18 -0
- package/docs/components/form-actions-bar.md +29 -18
- package/docs/components/form-field-render.md +16 -16
- package/docs/components/form-section.md +15 -11
- package/docs/components/form-wizard.md +18 -0
- package/docs/components/hidden-field.md +12 -15
- package/docs/components/index-column.md +12 -9
- package/docs/components/line-chart.md +21 -0
- package/docs/components/loading.md +14 -12
- package/docs/components/login-form.md +22 -0
- package/docs/components/map-picker-client.md +14 -14
- package/docs/components/map-picker-osm.md +16 -14
- package/docs/components/map-picker.md +14 -17
- package/docs/components/menu-button.md +14 -18
- package/docs/components/modal.md +20 -0
- package/docs/components/multi-select-filter.md +14 -16
- package/docs/components/multi-select.md +18 -19
- package/docs/components/number-input.md +17 -16
- package/docs/components/otp-input.md +18 -0
- package/docs/components/page-tabs.md +16 -0
- package/docs/components/page-title.md +11 -9
- package/docs/components/paginated-table.md +19 -26
- package/docs/components/pagination.md +15 -18
- package/docs/components/password-input.md +19 -0
- package/docs/components/phone-input.md +18 -0
- package/docs/components/radio-group.md +20 -0
- package/docs/components/range-slider.md +20 -0
- package/docs/components/rating-input.md +19 -0
- package/docs/components/render-field.md +15 -20
- package/docs/components/reset-password-form.md +17 -0
- package/docs/components/rich-text-preview.md +15 -14
- package/docs/components/search-input.md +19 -0
- package/docs/components/select.md +19 -19
- package/docs/components/stat-card.md +19 -0
- package/docs/components/status-badge.md +16 -10
- package/docs/components/switch.md +16 -19
- package/docs/components/table-filter-field.md +13 -17
- package/docs/components/table-skeleton.md +16 -0
- package/docs/components/table-toolbar.md +16 -15
- package/docs/components/tag.md +18 -0
- package/docs/components/tags-input.md +19 -0
- package/docs/components/text-area.md +16 -16
- package/docs/components/text-input.md +16 -15
- package/docs/components/time-picker.md +17 -14
- package/docs/components/timeline.md +15 -0
- package/docs/components/toggle-inline-button.md +17 -18
- package/docs/components/toggle.md +20 -17
- package/docs/components/upload-files-preview.md +20 -22
- package/docs/components/user-menu.md +19 -0
- package/docs/contracts/component-doc-schema.md +78 -0
- package/docs/contracts/dependency-map.md +68 -29
- package/docs/contracts/style-imports.md +38 -12
- package/llms.txt +106 -0
- package/package.json +2 -2
- package/PRIMEREACT_MAPPING.md +0 -6
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: RangeSlider
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/RangeSlider'
|
|
5
|
+
whenToUse: 'Dual-handle range slider that stores a [min, max] tuple; backed by PrimeReact Slider.'
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
formContract: ControllerProps
|
|
8
|
+
relatedNextCore: []
|
|
9
|
+
props:
|
|
10
|
+
- { name: controller, type: ControllerProps, required: true }
|
|
11
|
+
- { name: min, type: number, required: false }
|
|
12
|
+
- { name: max, type: number, required: false }
|
|
13
|
+
- { name: step, type: number, required: false }
|
|
14
|
+
- { name: block, type: boolean, required: false }
|
|
15
|
+
---
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
<RangeSlider controller={{ name: 'priceRange' }} min={0} max={500000} step={1000} block />
|
|
20
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: RatingInput
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/RatingInput'
|
|
5
|
+
whenToUse: Star rating input (PrimeReact Rating) wired to react-hook-form; stores numeric value.
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
formContract: ControllerProps
|
|
8
|
+
relatedNextCore: []
|
|
9
|
+
props:
|
|
10
|
+
- { name: controller, type: ControllerProps, required: true }
|
|
11
|
+
- { name: stars, type: number, required: false, default: '5' }
|
|
12
|
+
- { name: cancel, type: boolean, required: false }
|
|
13
|
+
- { name: block, type: boolean, required: false }
|
|
14
|
+
---
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<RatingInput controller={{ name: 'score' }} stars={5} />
|
|
19
|
+
```
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
---
|
|
2
|
+
name: RenderField
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/RenderField'
|
|
5
|
+
whenToUse: 'Low-level escape hatch: connects any custom UI to react-hook-form via a render prop.'
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
relatedNextCore: []
|
|
8
|
+
props:
|
|
9
|
+
- { name: name, type: string, required: true }
|
|
10
|
+
- { name: render, type: '(props: RenderProps) => ReactElement', required: true }
|
|
11
|
+
- { name: defaultValue, type: any, required: false }
|
|
12
|
+
- { name: rules, type: RegisterOptions, required: false }
|
|
13
|
+
- { name: control, type: Control, required: false }
|
|
14
|
+
---
|
|
10
15
|
## Example
|
|
11
16
|
|
|
12
17
|
```tsx
|
|
13
|
-
<RenderField
|
|
14
|
-
name="featured"
|
|
15
|
-
control={form.control}
|
|
16
|
-
render={({ field }) => (
|
|
17
|
-
<input
|
|
18
|
-
type="checkbox"
|
|
19
|
-
checked={!!field.value}
|
|
20
|
-
onChange={(e) => field.onChange(e.target.checked)}
|
|
21
|
-
/>
|
|
22
|
-
)}
|
|
23
|
-
/>
|
|
18
|
+
<RenderField name='rating' render={({ field }) => <StarPicker value={field.value} onChange={field.onChange} />} />
|
|
24
19
|
```
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ResetPasswordForm
|
|
3
|
+
category: auth
|
|
4
|
+
import: '@mantis-core/ui/components/auth/ResetPasswordForm'
|
|
5
|
+
whenToUse: New password + confirm form; caller owns token validation and API call.
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
relatedNextCore: []
|
|
8
|
+
props:
|
|
9
|
+
- { name: onSubmit, type: '(values: ResetPasswordFormValues) => void | Promise<void>', required: true }
|
|
10
|
+
- { name: minPasswordLength, type: number, required: false, default: '8' }
|
|
11
|
+
- { name: className, type: string, required: false }
|
|
12
|
+
---
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
<ResetPasswordForm onSubmit={({ newPassword }) => resetPassword(token, newPassword)} />
|
|
17
|
+
```
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
---
|
|
2
|
+
name: RichTextPreview
|
|
3
|
+
category: feedback
|
|
4
|
+
import: '@mantis-core/ui/components/ui/RichTextPreview'
|
|
5
|
+
whenToUse: Safely renders a CKEditor HTML string with correct CKEditor content styles.
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
requiredStyles: [scss/rich-text-preview.scss]
|
|
8
|
+
relatedComponents: [CKEditorInput]
|
|
9
|
+
relatedNextCore: []
|
|
10
|
+
props:
|
|
11
|
+
- { name: content, type: string, required: true }
|
|
12
|
+
- { name: size, type: '''sm'' | ''md'' | ''lg''', required: false }
|
|
13
|
+
- { name: className, type: string, required: false }
|
|
14
|
+
---
|
|
10
15
|
## Example
|
|
11
16
|
|
|
12
17
|
```tsx
|
|
13
|
-
<RichTextPreview
|
|
14
|
-
html={post.bodyHtml}
|
|
15
|
-
size="lg"
|
|
16
|
-
emptyFallback={<p>No content yet.</p>}
|
|
17
|
-
/>
|
|
18
|
+
<RichTextPreview content={post.body} size='md' />
|
|
18
19
|
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: SearchInput
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/SearchInput'
|
|
5
|
+
whenToUse: Debounced text input that calls onSearch instead of using react-hook-form; ideal for live table/list filtering.
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
formContract: ControllerProps
|
|
8
|
+
relatedNextCore: []
|
|
9
|
+
props:
|
|
10
|
+
- { name: controller, type: ControllerProps, required: true }
|
|
11
|
+
- { name: onSearch, type: '(value: string) => void', required: false }
|
|
12
|
+
- { name: debounceMs, type: number, required: false, default: '300' }
|
|
13
|
+
- { name: block, type: boolean, required: false }
|
|
14
|
+
---
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<SearchInput controller={{ name: 'q' }} onSearch={setQuery} debounceMs={400} block />
|
|
19
|
+
```
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
---
|
|
2
|
+
name: Select
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/Select'
|
|
5
|
+
whenToUse: Single-value searchable select (react-select); supports creatable mode.
|
|
6
|
+
baseLibrary: react-select
|
|
7
|
+
formContract: ControllerProps
|
|
8
|
+
requiredStyles: [scss/select.scss]
|
|
9
|
+
relatedComponents: [FormFieldRender, AsyncSelect, DropDown]
|
|
10
|
+
relatedNextCore: []
|
|
11
|
+
props:
|
|
12
|
+
- { name: controller, type: ControllerProps, required: true }
|
|
13
|
+
- { name: options, type: OptionsOrGroups, required: false }
|
|
14
|
+
- { name: isCreatable, type: boolean, required: false, default: 'false' }
|
|
15
|
+
- { name: variant, type: ButtonVariant, required: false, default: '''primary''' }
|
|
16
|
+
- { name: block, type: boolean, required: false }
|
|
17
|
+
- { name: isLoading, type: boolean, required: false }
|
|
18
|
+
---
|
|
10
19
|
## Example
|
|
11
20
|
|
|
12
21
|
```tsx
|
|
13
|
-
<Select
|
|
14
|
-
controller={{ name: "agent", control: form.control }}
|
|
15
|
-
block
|
|
16
|
-
variant="secondary"
|
|
17
|
-
options={[
|
|
18
|
-
{ label: "Alice", value: "alice" },
|
|
19
|
-
{ label: "Bob", value: "bob" },
|
|
20
|
-
]}
|
|
21
|
-
isClearable
|
|
22
|
-
/>
|
|
22
|
+
<Select controller={{ name: 'status' }} options={statusOptions} block />
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Notes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: StatCard
|
|
3
|
+
category: data
|
|
4
|
+
import: '@mantis-core/ui/components/data/StatCard'
|
|
5
|
+
whenToUse: 'KPI card showing a metric label, large value, optional icon, trend indicator, and footer.'
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
relatedNextCore: []
|
|
8
|
+
props:
|
|
9
|
+
- { name: label, type: string, required: true }
|
|
10
|
+
- { name: value, type: ReactNode, required: true }
|
|
11
|
+
- { name: icon, type: ReactNode, required: false }
|
|
12
|
+
- { name: trend, type: '{ value: number; direction: ''up'' | ''down'' }', required: false }
|
|
13
|
+
- { name: footer, type: ReactNode, required: false }
|
|
14
|
+
---
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<StatCard label='Leads' value={142} icon={<i className='pi pi-users' />} trend={{ value: 12, direction: 'up' }} />
|
|
19
|
+
```
|
|
@@ -1,14 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
---
|
|
2
|
+
name: StatusBadge
|
|
3
|
+
category: feedback
|
|
4
|
+
import: '@mantis-core/ui/components/ui/StatusBadge'
|
|
5
|
+
whenToUse: Colored pill badge to communicate a status or label with semantic tone.
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
requiredStyles: [scss/status-badge.scss]
|
|
8
|
+
relatedComponents: [DataState]
|
|
9
|
+
relatedNextCore: []
|
|
10
|
+
props:
|
|
11
|
+
- { name: label, type: ReactNode, required: false }
|
|
12
|
+
- { name: tone, type: '''success'' | ''muted'' | ''warning'' | ''info'' | ''danger''', required: false, default: '''muted''' }
|
|
13
|
+
- { name: size, type: '''sm'' | ''md''', required: false, default: '''md''' }
|
|
14
|
+
- { name: block, type: boolean, required: false }
|
|
15
|
+
---
|
|
10
16
|
## Example
|
|
11
17
|
|
|
12
18
|
```tsx
|
|
13
|
-
<StatusBadge tone=
|
|
19
|
+
<StatusBadge label='Activo' tone='success' />
|
|
14
20
|
```
|
|
@@ -1,25 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
---
|
|
2
|
+
name: Switch
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/Switch'
|
|
5
|
+
whenToUse: Toggle/boolean switch wired to react-hook-form.
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
formContract: ControllerProps
|
|
8
|
+
requiredStyles: [scss/switch.scss]
|
|
9
|
+
relatedComponents: [FormFieldRender, Toggle]
|
|
10
|
+
relatedNextCore: []
|
|
11
|
+
props:
|
|
12
|
+
- { name: controller, type: ControllerProps, required: true }
|
|
13
|
+
- { name: label, type: string, required: false }
|
|
14
|
+
- { name: block, type: boolean, required: false }
|
|
15
|
+
---
|
|
11
16
|
## Example
|
|
12
17
|
|
|
13
18
|
```tsx
|
|
14
|
-
<Switch
|
|
15
|
-
name="enabled"
|
|
16
|
-
control={form.control}
|
|
17
|
-
defaultValue={true}
|
|
18
|
-
onLabel="Enabled"
|
|
19
|
-
offLabel="Disabled"
|
|
20
|
-
onStyle="success"
|
|
21
|
-
offStyle="light"
|
|
22
|
-
/>
|
|
19
|
+
<Switch controller={{ name: 'isActive' }} label='Active' />
|
|
23
20
|
```
|
|
24
21
|
|
|
25
22
|
## Notes
|
|
@@ -1,21 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
---
|
|
2
|
+
name: TableFilterField
|
|
3
|
+
category: tables
|
|
4
|
+
import: '@mantis-core/ui/components/table-filter-field'
|
|
5
|
+
whenToUse: Wraps a form control inside FilterPannel with a label; provides consistent layout.
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
relatedNextCore: []
|
|
8
|
+
props:
|
|
9
|
+
- { name: label, type: string, required: true }
|
|
10
|
+
- { name: htmlFor, type: string, required: false }
|
|
11
|
+
- { name: className, type: string, required: false }
|
|
12
|
+
---
|
|
10
13
|
## Example
|
|
11
14
|
|
|
12
15
|
```tsx
|
|
13
|
-
<TableFilterField label=
|
|
14
|
-
<DropDown
|
|
15
|
-
controller={{ name: "status", control: form.control }}
|
|
16
|
-
block
|
|
17
|
-
inputId="status-filter"
|
|
18
|
-
options={statusOptions}
|
|
19
|
-
/>
|
|
20
|
-
</TableFilterField>
|
|
16
|
+
<TableFilterField label='Status' htmlFor='filter-status'><DropDown controller={{ name: 'status' }} options={statusOpts} /></TableFilterField>
|
|
21
17
|
```
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: TableSkeleton
|
|
3
|
+
category: feedback
|
|
4
|
+
import: '@mantis-core/ui/components/feedback/TableSkeleton'
|
|
5
|
+
whenToUse: Animated skeleton placeholder that mimics a table grid while data loads.
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
relatedNextCore: []
|
|
8
|
+
props:
|
|
9
|
+
- { name: rows, type: number, required: false, default: '5' }
|
|
10
|
+
- { name: columns, type: number, required: false, default: '4' }
|
|
11
|
+
---
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
<TableSkeleton rows={8} columns={5} />
|
|
16
|
+
```
|
|
@@ -1,19 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
---
|
|
2
|
+
name: TableToolbar
|
|
3
|
+
category: tables
|
|
4
|
+
import: '@mantis-core/ui/components/table-toolbar'
|
|
5
|
+
whenToUse: 'Header bar above a table showing title, record count, and action buttons slot.'
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
relatedComponents: [PaginatedTable, Button]
|
|
8
|
+
relatedNextCore: []
|
|
9
|
+
props:
|
|
10
|
+
- { name: title, type: ReactNode, required: false }
|
|
11
|
+
- { name: totalRecords, type: number, required: false }
|
|
12
|
+
- { name: actions, type: ReactNode, required: false }
|
|
13
|
+
- { name: meta, type: ReactNode, required: false }
|
|
14
|
+
- { name: className, type: string, required: false }
|
|
15
|
+
---
|
|
10
16
|
## Example
|
|
11
17
|
|
|
12
18
|
```tsx
|
|
13
|
-
<TableToolbar
|
|
14
|
-
title="Listings"
|
|
15
|
-
totalRecords={total}
|
|
16
|
-
meta="Updated today"
|
|
17
|
-
actions={<Button label="New listing" icon="pi pi-plus" />}
|
|
18
|
-
/>
|
|
19
|
+
<TableToolbar title='Users' totalRecords={total} actions={<Button label='New' onClick={onCreate} />} />
|
|
19
20
|
```
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Tag
|
|
3
|
+
category: feedback
|
|
4
|
+
import: '@mantis-core/ui/components/feedback/Tag'
|
|
5
|
+
whenToUse: 'Styled label chip (PrimeReact Tag wrapper with Mantis Core CSS); use for status labels, categories, or counts.'
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
relatedNextCore: []
|
|
8
|
+
props:
|
|
9
|
+
- { name: value, type: ReactNode, required: false }
|
|
10
|
+
- { name: severity, type: '''success'' | ''info'' | ''warning'' | ''danger'' | null', required: false }
|
|
11
|
+
- { name: icon, type: string, required: false }
|
|
12
|
+
- { name: rounded, type: boolean, required: false }
|
|
13
|
+
---
|
|
14
|
+
## Example
|
|
15
|
+
|
|
16
|
+
```tsx
|
|
17
|
+
<Tag value='Vendido' severity='success' rounded />
|
|
18
|
+
```
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: TagsInput
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/TagsInput'
|
|
5
|
+
whenToUse: 'Chip/tags input (PrimeReact Chips) wired to react-hook-form; stores value as string[].'
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
formContract: ControllerProps
|
|
8
|
+
relatedNextCore: []
|
|
9
|
+
props:
|
|
10
|
+
- { name: controller, type: ControllerProps, required: true }
|
|
11
|
+
- { name: placeholder, type: string, required: false }
|
|
12
|
+
- { name: max, type: number, required: false }
|
|
13
|
+
- { name: block, type: boolean, required: false }
|
|
14
|
+
---
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
<TagsInput controller={{ name: 'amenities' }} placeholder='Agregar etiqueta...' block />
|
|
19
|
+
```
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
---
|
|
2
|
+
name: TextArea
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/TextArea'
|
|
5
|
+
whenToUse: Multi-line text field wired to react-hook-form.
|
|
6
|
+
baseLibrary: primereact/inputtextarea
|
|
7
|
+
formContract: ControllerProps
|
|
8
|
+
requiredStyles: [scss/inputs.scss]
|
|
9
|
+
relatedComponents: [FormFieldRender, TextInput]
|
|
10
|
+
relatedNextCore: []
|
|
11
|
+
props:
|
|
12
|
+
- { name: controller, type: ControllerProps, required: true }
|
|
13
|
+
- { name: block, type: boolean, required: false }
|
|
14
|
+
- { name: rows, type: number, required: false }
|
|
15
|
+
---
|
|
11
16
|
## Example
|
|
12
17
|
|
|
13
18
|
```tsx
|
|
14
|
-
<TextArea
|
|
15
|
-
controller={{ name: "description", control: form.control }}
|
|
16
|
-
block
|
|
17
|
-
rows={6}
|
|
18
|
-
autoResize
|
|
19
|
-
/>
|
|
19
|
+
<TextArea controller={{ name: 'description' }} rows={4} block />
|
|
20
20
|
```
|
|
@@ -1,21 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
---
|
|
2
|
+
name: TextInput
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/TextInput'
|
|
5
|
+
whenToUse: Single-line text field wired to react-hook-form.
|
|
6
|
+
baseLibrary: primereact/inputtext
|
|
7
|
+
formContract: ControllerProps
|
|
8
|
+
requiredStyles: [scss/inputs.scss]
|
|
9
|
+
relatedComponents: [FormFieldRender, TextArea]
|
|
10
|
+
relatedNextCore: []
|
|
11
|
+
props:
|
|
12
|
+
- { name: controller, type: ControllerProps, required: true }
|
|
13
|
+
- { name: block, type: boolean, required: false, default: 'false' }
|
|
14
|
+
- { name: defaultValue, type: string, required: false, default: '''''' }
|
|
15
|
+
---
|
|
11
16
|
## Example
|
|
12
17
|
|
|
13
18
|
```tsx
|
|
14
|
-
<TextInput
|
|
15
|
-
controller={{ name: "title", control: form.control }}
|
|
16
|
-
block
|
|
17
|
-
placeholder="Listing title"
|
|
18
|
-
/>
|
|
19
|
+
<TextInput controller={{ name: 'email', rules: { required: true } }} block />
|
|
19
20
|
```
|
|
20
21
|
|
|
21
22
|
## Notes
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
---
|
|
2
|
+
name: TimePicker
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/TimePicker'
|
|
5
|
+
whenToUse: Time-only picker (15-min intervals) wired to react-hook-form; renders as a styled InputText trigger.
|
|
6
|
+
baseLibrary: react-datepicker
|
|
7
|
+
formContract: ControllerProps
|
|
8
|
+
requiredStyles: [scss/inputs.scss]
|
|
9
|
+
relatedNextCore: []
|
|
10
|
+
props:
|
|
11
|
+
- { name: controller, type: ControllerProps, required: true, description: 'react-hook-form controller config' }
|
|
12
|
+
- { name: block, type: boolean, required: false, default: 'false', description: 'Expand to full width' }
|
|
13
|
+
- { name: datePicker, type: DatePickerProps, required: false, description: 'Passthrough props for react-datepicker' }
|
|
14
|
+
- { name: className, type: string, required: false, description: 'Additional CSS class on the DatePicker wrapper' }
|
|
15
|
+
- { name: timePeriod, type: '''AM'' | ''PM''', required: false, description: 'Default time period hint' }
|
|
16
|
+
---
|
|
10
17
|
## Example
|
|
11
18
|
|
|
12
19
|
```tsx
|
|
13
|
-
|
|
14
|
-
controller={{ name: "openingTime", control: form.control }}
|
|
15
|
-
block
|
|
16
|
-
datePicker={{ showTimeSelectOnly: true, timeIntervals: 30 }}
|
|
17
|
-
/>
|
|
20
|
+
{/* TODO: add example */}
|
|
18
21
|
```
|
|
19
22
|
|
|
20
23
|
## Notes
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Timeline
|
|
3
|
+
category: data
|
|
4
|
+
import: '@mantis-core/ui/components/data/Timeline'
|
|
5
|
+
whenToUse: 'Vertical event timeline backed by PrimeReact Timeline; items render title, description, date, and optional icon.'
|
|
6
|
+
baseLibrary: custom
|
|
7
|
+
relatedNextCore: []
|
|
8
|
+
props:
|
|
9
|
+
- { name: items, type: '{ title: string; description?: string; date?: string; icon?: ReactNode; color?: string }[]', required: true }
|
|
10
|
+
---
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<Timeline items={[{ title: 'Lead creado', date: '2025-01-10', description: 'Formulario web' }, { title: 'Contactado', date: '2025-01-11' }]} />
|
|
15
|
+
```
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
---
|
|
2
|
+
name: ToggleInlineButton
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/ToggleInlineButton'
|
|
5
|
+
whenToUse: Segmented button group (single or multi-select) wired to react-hook-form via a controller prop.
|
|
6
|
+
baseLibrary: primereact/selectbutton
|
|
7
|
+
formContract: ControllerProps
|
|
8
|
+
requiredStyles: [scss/select-button.scss]
|
|
9
|
+
relatedComponents: [FormFieldRender]
|
|
10
|
+
relatedNextCore: []
|
|
11
|
+
props:
|
|
12
|
+
- { name: controller, type: ControllerProps, required: true, description: 'react-hook-form controller config' }
|
|
13
|
+
- { name: options, type: 'any[]', required: true, description: 'Options array passed to SelectButton' }
|
|
14
|
+
- { name: variant, type: ButtonVariant, required: false, default: '''primary''', description: 'Design-system color variant' }
|
|
15
|
+
- { name: multiple, type: boolean, required: false, default: 'false', description: 'Allow selecting multiple options' }
|
|
16
|
+
---
|
|
11
17
|
## Example
|
|
12
18
|
|
|
13
19
|
```tsx
|
|
14
|
-
|
|
15
|
-
controller={{ name: "visibility", control: form.control }}
|
|
16
|
-
variant="accent"
|
|
17
|
-
options={[
|
|
18
|
-
{ label: "Public", value: "public" },
|
|
19
|
-
{ label: "Private", value: "private" },
|
|
20
|
-
]}
|
|
21
|
-
/>
|
|
20
|
+
{/* TODO: add example */}
|
|
22
21
|
```
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
---
|
|
2
|
+
name: Toggle
|
|
3
|
+
category: forms
|
|
4
|
+
import: '@mantis-core/ui/components/Forms/Toggle'
|
|
5
|
+
whenToUse: Checkbox-based boolean toggle wired to react-hook-form with configurable on/off labels.
|
|
6
|
+
baseLibrary: primereact/checkbox
|
|
7
|
+
formContract: ControllerProps
|
|
8
|
+
relatedComponents: [FormFieldRender, Switch]
|
|
9
|
+
relatedNextCore: []
|
|
10
|
+
props:
|
|
11
|
+
- { name: controller, type: ControllerProps, required: true, description: 'react-hook-form controller config (name, rules, defaultValue)' }
|
|
12
|
+
- { name: on, type: 'string | any', required: false, default: '''SI''', description: 'Label shown when value is true' }
|
|
13
|
+
- { name: off, type: 'string | any', required: false, default: '''NO''', description: 'Label shown when value is false' }
|
|
14
|
+
- { name: size, type: '''sm'' | ''lg'' | ''md''', required: false, description: 'Visual size variant' }
|
|
15
|
+
- { name: offstyle, type: '''primary'' | ''secondary'' | ''dark''', required: false, description: 'Style when off' }
|
|
16
|
+
- { name: onstyle, type: '''primary'' | ''secondary'' | ''dark''', required: false, description: 'Style when on' }
|
|
17
|
+
- { name: onClick, type: any, required: false, description: 'Click handler passthrough' }
|
|
18
|
+
- { name: active, type: boolean, required: false, description: 'Controlled active state' }
|
|
19
|
+
---
|
|
11
20
|
## Example
|
|
12
21
|
|
|
13
22
|
```tsx
|
|
14
|
-
|
|
15
|
-
name="published"
|
|
16
|
-
control={form.control}
|
|
17
|
-
defaultValue={false}
|
|
18
|
-
on="YES"
|
|
19
|
-
off="NO"
|
|
20
|
-
/>
|
|
23
|
+
{/* TODO: add example */}
|
|
21
24
|
```
|