@mantis-core/ui 0.3.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/dist/components/Forms/ColorPickerInput.d.ts +10 -0
- package/dist/components/Forms/ColorPickerInput.d.ts.map +1 -0
- package/dist/components/Forms/ColorPickerInput.js +13 -0
- package/dist/components/Forms/ColorPickerInput.js.map +1 -0
- package/dist/components/Forms/Combobox.d.ts +10 -0
- package/dist/components/Forms/Combobox.d.ts.map +1 -0
- package/dist/components/Forms/Combobox.js +11 -0
- package/dist/components/Forms/Combobox.js.map +1 -0
- package/dist/components/Forms/DatePresets.d.ts +14 -0
- package/dist/components/Forms/DatePresets.d.ts.map +1 -0
- package/dist/components/Forms/DatePresets.js +55 -0
- package/dist/components/Forms/DatePresets.js.map +1 -0
- package/dist/components/Forms/OtpInput.d.ts +11 -0
- package/dist/components/Forms/OtpInput.d.ts.map +1 -0
- package/dist/components/Forms/OtpInput.js +11 -0
- package/dist/components/Forms/OtpInput.js.map +1 -0
- package/dist/components/Forms/PasswordInput.d.ts +12 -0
- package/dist/components/Forms/PasswordInput.d.ts.map +1 -0
- package/dist/components/Forms/PasswordInput.js +31 -0
- package/dist/components/Forms/PasswordInput.js.map +1 -0
- package/dist/components/Forms/RatingInput.d.ts +11 -0
- package/dist/components/Forms/RatingInput.d.ts.map +1 -0
- package/dist/components/Forms/RatingInput.js +11 -0
- package/dist/components/Forms/RatingInput.js.map +1 -0
- package/dist/components/Forms/TagsInput.d.ts +10 -0
- package/dist/components/Forms/TagsInput.d.ts.map +1 -0
- package/dist/components/Forms/TagsInput.js +11 -0
- package/dist/components/Forms/TagsInput.js.map +1 -0
- package/dist/components/auth/ChangePasswordForm.d.ts +16 -0
- package/dist/components/auth/ChangePasswordForm.d.ts.map +1 -0
- package/dist/components/auth/ChangePasswordForm.js +23 -0
- package/dist/components/auth/ChangePasswordForm.js.map +1 -0
- package/dist/components/auth/ForgotPasswordForm.d.ts +15 -0
- package/dist/components/auth/ForgotPasswordForm.d.ts.map +1 -0
- package/dist/components/auth/ForgotPasswordForm.js +14 -0
- package/dist/components/auth/ForgotPasswordForm.js.map +1 -0
- package/dist/components/auth/LoginForm.d.ts +22 -0
- package/dist/components/auth/LoginForm.d.ts.map +1 -0
- package/dist/components/auth/LoginForm.js +20 -0
- package/dist/components/auth/LoginForm.js.map +1 -0
- package/dist/components/auth/ResetPasswordForm.d.ts +16 -0
- package/dist/components/auth/ResetPasswordForm.d.ts.map +1 -0
- package/dist/components/auth/ResetPasswordForm.js +23 -0
- package/dist/components/auth/ResetPasswordForm.js.map +1 -0
- package/dist/components/auth/UserMenu.d.ts +22 -0
- package/dist/components/auth/UserMenu.d.ts.map +1 -0
- package/dist/components/auth/UserMenu.js +95 -0
- package/dist/components/auth/UserMenu.js.map +1 -0
- package/dist/components/auth/index.d.ts +11 -0
- package/dist/components/auth/index.d.ts.map +1 -0
- package/dist/components/auth/index.js +6 -0
- package/dist/components/auth/index.js.map +1 -0
- package/dist/components/charts/BarChart.d.ts +20 -0
- package/dist/components/charts/BarChart.d.ts.map +1 -0
- package/dist/components/charts/BarChart.js +28 -0
- package/dist/components/charts/BarChart.js.map +1 -0
- package/dist/components/charts/DonutChart.d.ts +21 -0
- package/dist/components/charts/DonutChart.d.ts.map +1 -0
- package/dist/components/charts/DonutChart.js +26 -0
- package/dist/components/charts/DonutChart.js.map +1 -0
- package/dist/components/charts/LineChart.d.ts +20 -0
- package/dist/components/charts/LineChart.d.ts.map +1 -0
- package/dist/components/charts/LineChart.js +27 -0
- package/dist/components/charts/LineChart.js.map +1 -0
- package/dist/components/charts/chart-setup.d.ts +3 -0
- package/dist/components/charts/chart-setup.d.ts.map +1 -0
- package/dist/components/charts/chart-setup.js +10 -0
- package/dist/components/charts/chart-setup.js.map +1 -0
- package/dist/components/charts/defaults.d.ts +13 -0
- package/dist/components/charts/defaults.d.ts.map +1 -0
- package/dist/components/charts/defaults.js +54 -0
- package/dist/components/charts/defaults.js.map +1 -0
- package/dist/components/charts/index.d.ts +9 -0
- package/dist/components/charts/index.d.ts.map +1 -0
- package/dist/components/charts/index.js +6 -0
- package/dist/components/charts/index.js.map +1 -0
- package/dist/components/data/DescriptionList.d.ts +11 -0
- package/dist/components/data/DescriptionList.d.ts.map +1 -0
- package/dist/components/data/DescriptionList.js +23 -0
- package/dist/components/data/DescriptionList.js.map +1 -0
- package/dist/components/data/StatCard.d.ts +14 -0
- package/dist/components/data/StatCard.d.ts.map +1 -0
- package/dist/components/data/StatCard.js +39 -0
- package/dist/components/data/StatCard.js.map +1 -0
- package/dist/components/data/Timeline.d.ts +15 -0
- package/dist/components/data/Timeline.d.ts.map +1 -0
- package/dist/components/data/Timeline.js +20 -0
- package/dist/components/data/Timeline.js.map +1 -0
- package/dist/components/feedback/Avatar.d.ts +9 -0
- package/dist/components/feedback/Avatar.d.ts.map +1 -0
- package/dist/components/feedback/Avatar.js +15 -0
- package/dist/components/feedback/Avatar.js.map +1 -0
- package/dist/components/feedback/CardSkeleton.d.ts +6 -0
- package/dist/components/feedback/CardSkeleton.d.ts.map +1 -0
- package/dist/components/feedback/CardSkeleton.js +7 -0
- package/dist/components/feedback/CardSkeleton.js.map +1 -0
- package/dist/components/feedback/EmptyState.d.ts +9 -0
- package/dist/components/feedback/EmptyState.d.ts.map +1 -0
- package/dist/components/feedback/EmptyState.js +6 -0
- package/dist/components/feedback/EmptyState.js.map +1 -0
- package/dist/components/feedback/ErrorBoundary.d.ts +18 -0
- package/dist/components/feedback/ErrorBoundary.d.ts.map +1 -0
- package/dist/components/feedback/ErrorBoundary.js +24 -0
- package/dist/components/feedback/ErrorBoundary.js.map +1 -0
- package/dist/components/feedback/TableSkeleton.d.ts +7 -0
- package/dist/components/feedback/TableSkeleton.d.ts.map +1 -0
- package/dist/components/feedback/TableSkeleton.js +7 -0
- package/dist/components/feedback/TableSkeleton.js.map +1 -0
- package/dist/components/feedback/Tag.d.ts +6 -0
- package/dist/components/feedback/Tag.d.ts.map +1 -0
- package/dist/components/feedback/Tag.js +7 -0
- package/dist/components/feedback/Tag.js.map +1 -0
- package/dist/components/navigation/CommandPalette.d.ts +17 -0
- package/dist/components/navigation/CommandPalette.d.ts.map +1 -0
- package/dist/components/navigation/CommandPalette.js +73 -0
- package/dist/components/navigation/CommandPalette.js.map +1 -0
- package/dist/components/navigation/PageTabs.d.ts +14 -0
- package/dist/components/navigation/PageTabs.d.ts.map +1 -0
- package/dist/components/navigation/PageTabs.js +21 -0
- package/dist/components/navigation/PageTabs.js.map +1 -0
- package/dist/components/overlays/Drawer.d.ts +6 -0
- package/dist/components/overlays/Drawer.d.ts.map +1 -0
- package/dist/components/overlays/Drawer.js +8 -0
- package/dist/components/overlays/Drawer.js.map +1 -0
- package/dist/components/overlays/Modal.d.ts +6 -0
- package/dist/components/overlays/Modal.d.ts.map +1 -0
- package/dist/components/overlays/Modal.js +8 -0
- package/dist/components/overlays/Modal.js.map +1 -0
- package/dist/components/pages/app-shell/AppShell.d.ts.map +1 -1
- package/dist/components/pages/app-shell/AppShell.js +11 -9
- package/dist/components/pages/app-shell/AppShell.js.map +1 -1
- package/dist/components/pages/app-shell/types.d.ts +4 -0
- package/dist/components/pages/app-shell/types.d.ts.map +1 -1
- package/dist/validation/index.d.ts +2 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +3 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/rules.d.ts +10 -0
- package/dist/validation/rules.d.ts.map +1 -0
- package/dist/validation/rules.js +39 -0
- package/dist/validation/rules.js.map +1 -0
- package/dist/validation/zod.d.ts +2 -0
- package/dist/validation/zod.d.ts.map +1 -0
- package/dist/validation/zod.js +3 -0
- package/dist/validation/zod.js.map +1 -0
- 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 +40 -4
- package/PRIMEREACT_MAPPING.md +0 -6
package/COMPONENTS.md
CHANGED
|
@@ -1,20 +1,120 @@
|
|
|
1
|
-
|
|
1
|
+
<!-- GENERATED by `pnpm gen:catalog` — do not edit. Source: docs/components/*.md -->
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# @mantis-core/ui — Component Index
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
One doc per component under [`docs/components/`](./docs/components). Edit those `.md` files and run `pnpm gen:catalog` to refresh this index.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
- [Shared contracts](./docs/contracts/controller-props.md)
|
|
9
|
-
- [Underlying library map](./docs/contracts/dependency-map.md)
|
|
10
|
-
- [Style import guide](./docs/contracts/style-imports.md)
|
|
7
|
+
## forms
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
- [AsyncSelect](./docs/components/async-select.md) — Searchable select that loads options asynchronously via loadOptions callback.
|
|
10
|
+
- [CKEditorInput](./docs/components/ckeditor-input.md) — Rich-text WYSIWYG editor (CKEditor 5) wired to react-hook-form; emits HTML string.
|
|
11
|
+
- [ColorPickerInput](./docs/components/color-picker-input.md) — Color picker (PrimeReact ColorPicker, hex format) wired to react-hook-form.
|
|
12
|
+
- [Combobox](./docs/components/combobox.md) — Autocomplete text input (PrimeReact AutoComplete) wired to react-hook-form; pass suggestions via the suggestions prop.
|
|
13
|
+
- [CurrencyInput](./docs/components/currency-input.md) — Numeric input pre-configured for currency display (mode=currency).
|
|
14
|
+
- [DateInput](./docs/components/date-input.md) — Single date picker (PrimeReact Calendar, locale=es, format=dd/mm/yy).
|
|
15
|
+
- [DatePresets](./docs/components/date-presets.md) — Row of preset buttons (Hoy, 7 días, 30 días, Este mes) that fire onChange with a [Date, Date] range; pair with DateRangeInput.
|
|
16
|
+
- [DateRangeInput](./docs/components/date-range-input.md) — Date range picker that stores [startDate, endDate] array; selectionMode is locked to 'range'.
|
|
17
|
+
- [DirtyFormGuard](./docs/components/dirty-form-guard.md) — Blocks navigation when a react-hook-form has unsaved changes; also available as useDirtyFormGuard hook.
|
|
18
|
+
- [DropDown](./docs/components/drop-down.md) — PrimeReact Dropdown (single select with filter) wired to react-hook-form; use when you need PrimeReact styling over react-select.
|
|
19
|
+
- [ErrorMessage](./docs/components/error-message.md) — Displays a validation error string; use standalone when not using FormFieldRender.
|
|
20
|
+
- [FileDropzone](./docs/components/file-dropzone.md) — Drag-and-drop file input with validation (type, size, count); supports react-hook-form mode and plain controlled mode.
|
|
21
|
+
- [FormActionsBar](./docs/components/form-actions-bar.md) — Sticky-capable action bar with primary/secondary buttons and optional left/right slots for form pages.
|
|
22
|
+
- [FormFieldRender](./docs/components/form-field-render.md) — Wrapper that renders a label, the input slot, and a validation error message; use to compose any form control.
|
|
23
|
+
- [FormWizard](./docs/components/form-wizard.md) — Multi-step form navigator with step indicator and per-step validation; must render inside a FormProvider, parent owns the <form onSubmit>.
|
|
24
|
+
- [HiddenField](./docs/components/hidden-field.md) — Registers a hidden value in react-hook-form without rendering any UI.
|
|
25
|
+
- [MultiSelect](./docs/components/multi-select.md) — Multi-value select (PrimeReact) wired to react-hook-form.
|
|
26
|
+
- [NumberInput](./docs/components/number-input.md) — Numeric input (integer or decimal) wired to react-hook-form.
|
|
27
|
+
- [OtpInput](./docs/components/otp-input.md) — One-time password input (PrimeReact InputOtp) wired to react-hook-form.
|
|
28
|
+
- [PasswordInput](./docs/components/password-input.md) — Password field with show/hide toggle; Controller pattern, same API as TextInput.
|
|
29
|
+
- [PhoneInput](./docs/components/phone-input.md) — Masked phone number input; default mask (999) 999-9999.
|
|
30
|
+
- [RadioGroup](./docs/components/radio-group.md) — Renders a set of radio buttons from an options array; value is the selected option's value.
|
|
31
|
+
- [RangeSlider](./docs/components/range-slider.md) — Dual-handle range slider that stores a [min, max] tuple; backed by PrimeReact Slider.
|
|
32
|
+
- [RatingInput](./docs/components/rating-input.md) — Star rating input (PrimeReact Rating) wired to react-hook-form; stores numeric value.
|
|
33
|
+
- [RenderField](./docs/components/render-field.md) — Low-level escape hatch: connects any custom UI to react-hook-form via a render prop.
|
|
34
|
+
- [SearchInput](./docs/components/search-input.md) — Debounced text input that calls onSearch instead of using react-hook-form; ideal for live table/list filtering.
|
|
35
|
+
- [Select](./docs/components/select.md) — Single-value searchable select (react-select); supports creatable mode.
|
|
36
|
+
- [Switch](./docs/components/switch.md) — Toggle/boolean switch wired to react-hook-form.
|
|
37
|
+
- [TagsInput](./docs/components/tags-input.md) — Chip/tags input (PrimeReact Chips) wired to react-hook-form; stores value as string[].
|
|
38
|
+
- [TextArea](./docs/components/text-area.md) — Multi-line text field wired to react-hook-form.
|
|
39
|
+
- [TextInput](./docs/components/text-input.md) — Single-line text field wired to react-hook-form.
|
|
40
|
+
- [TimePicker](./docs/components/time-picker.md) — Time-only picker (15-min intervals) wired to react-hook-form; renders as a styled InputText trigger.
|
|
41
|
+
- [Toggle](./docs/components/toggle.md) — Checkbox-based boolean toggle wired to react-hook-form with configurable on/off labels.
|
|
42
|
+
- [ToggleInlineButton](./docs/components/toggle-inline-button.md) — Segmented button group (single or multi-select) wired to react-hook-form via a controller prop.
|
|
43
|
+
- [UploadFilesPreview](./docs/components/upload-files-preview.md) — Drag-and-drop upload zone with live preview grid, drag-to-reorder, and async upload queue; designed for image galleries.
|
|
13
44
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- [
|
|
17
|
-
- [
|
|
18
|
-
- [
|
|
19
|
-
- [
|
|
20
|
-
- [
|
|
45
|
+
## tables
|
|
46
|
+
|
|
47
|
+
- [ActionColumn](./docs/components/action-column.md) — Factory function that returns a PrimeReact Column with a dropdown action menu; call as ActionColumn(itemsFn, props).
|
|
48
|
+
- [FilterPannel](./docs/components/filter-pannel.md) — Slide-in sidebar filter panel for tables; wraps children in FormProvider and calls onApplyFilter with cleaned form data.
|
|
49
|
+
- [IndexColumn](./docs/components/index-column.md) — Returns a PrimeReact Column that renders the row's 1-based visual index; call as IndexColumn(colProps).
|
|
50
|
+
- [MenuButton](./docs/components/menu-button.md) — Dropdown button with a list of actions; used inside table rows.
|
|
51
|
+
- [MultiSelectFilter](./docs/components/multi-select-filter.md) — PrimeReact MultiSelect wired for use as a DataTable column filter template.
|
|
52
|
+
- [PaginatedTable](./docs/components/paginated-table.md) — Generic server-side paginated DataTable with built-in index column, action column, and Mantis Core CSS. Wraps PrimeReact DataTable.
|
|
53
|
+
- [TableFilterField](./docs/components/table-filter-field.md) — Wraps a form control inside FilterPannel with a label; provides consistent layout.
|
|
54
|
+
- [TableToolbar](./docs/components/table-toolbar.md) — Header bar above a table showing title, record count, and action buttons slot.
|
|
55
|
+
|
|
56
|
+
## pages
|
|
57
|
+
|
|
58
|
+
- [AdminPageConfigurator](./docs/components/admin-page-configurator.md) — Sets the page title, description, and breadcrumbs in the admin layout shell via context; wrap each page's content with this.
|
|
59
|
+
- [AdminPageHeader](./docs/components/admin-page-header.md) — Gradient page header with title, optional description, breadcrumbs, and right-side actions slot; rendered by AdminPageLayoutShell — avoid rendering directly inside feature views.
|
|
60
|
+
- [AdminPageLayout](./docs/components/admin-page-layout.md) — Overview of the admin page layout system — Provider, Configurator, and Shell exports that together compose admin pages.
|
|
61
|
+
- [AdminPageLayoutShell](./docs/components/admin-page-layout-shell.md) — Root layout shell for admin pages; renders AdminPageHeader from context set by AdminPageConfigurator and provides the layout grid.
|
|
62
|
+
- [AppShell](./docs/components/app-shell.md) — Full-page app shell with responsive sidebar nav, topbar, and mobile drawer; use as the root layout wrapper for authenticated pages.
|
|
63
|
+
- [Breadcrumbs](./docs/components/breadcrumbs.md) — Standalone breadcrumb nav; renders nothing when items is empty.
|
|
64
|
+
- [FormSection](./docs/components/form-section.md) — Bordered card section with a header (title + description + icon) and a padded body; groups related form fields.
|
|
65
|
+
- [PageTitle](./docs/components/page-title.md) — Centered display-font heading for public-facing pages.
|
|
66
|
+
|
|
67
|
+
## maps
|
|
68
|
+
|
|
69
|
+
- [MapPicker](./docs/components/map-picker.md) — Interactive Leaflet map that lets the user click to select a lat/lng coordinate; SSR-safe via next/dynamic.
|
|
70
|
+
- [MapPickerClient](./docs/components/map-picker-client.md) — Client-only Leaflet map that lets the user click to pick a coordinate; controlled via initialLat/initialLng.
|
|
71
|
+
- [MapPickerOSM](./docs/components/map-picker-osm.md) — Script-injected Leaflet map (no SSR bundle cost) with click/drag marker and a save-location button.
|
|
72
|
+
|
|
73
|
+
## overlays
|
|
74
|
+
|
|
75
|
+
- [Drawer](./docs/components/drawer.md) — Slide-in side panel (PrimeReact Sidebar wrapper); defaults to right position.
|
|
76
|
+
- [Modal](./docs/components/modal.md) — Dialog/modal (PrimeReact Dialog wrapper); dismissable mask and non-draggable by default.
|
|
77
|
+
|
|
78
|
+
## navigation
|
|
79
|
+
|
|
80
|
+
- [CommandPalette](./docs/components/command-palette.md) — Keyboard-driven command search overlay (Ctrl+K); pair with useCommandPalette hook to wire the shortcut.
|
|
81
|
+
- [PageTabs](./docs/components/page-tabs.md) — Tab menu bar for page-level navigation; auto-detects active tab from Next.js pathname when tabs have href.
|
|
82
|
+
|
|
83
|
+
## data
|
|
84
|
+
|
|
85
|
+
- [DescriptionList](./docs/components/description-list.md) — Grid-based label/value list for detail views; supports 1, 2, or 3 columns.
|
|
86
|
+
- [StatCard](./docs/components/stat-card.md) — KPI card showing a metric label, large value, optional icon, trend indicator, and footer.
|
|
87
|
+
- [Timeline](./docs/components/timeline.md) — Vertical event timeline backed by PrimeReact Timeline; items render title, description, date, and optional icon.
|
|
88
|
+
|
|
89
|
+
## feedback
|
|
90
|
+
|
|
91
|
+
- [Avatar](./docs/components/avatar.md) — User avatar that auto-generates initials from a name when no image is supplied; wraps PrimeReact Avatar.
|
|
92
|
+
- [CardSkeleton](./docs/components/card-skeleton.md) — Animated skeleton for card grid layouts while data loads.
|
|
93
|
+
- [ConfirmDialog](./docs/components/confirm-dialog.md) — Modal confirmation dialog with confirm/cancel buttons and severity-aware styling.
|
|
94
|
+
- [DataState](./docs/components/data-state.md) — Full-area empty/error/loading state placeholder for data-fetching views.
|
|
95
|
+
- [EmptyState](./docs/components/empty-state.md) — Centered empty-state placeholder with icon, title, optional description, and action button.
|
|
96
|
+
- [ErrorBoundary](./docs/components/error-boundary.md) — React error boundary; renders fallback UI on uncaught errors; fallback can be a ReactNode or render function.
|
|
97
|
+
- [Loading](./docs/components/loading.md) — Full-screen loading overlay with animated spinner; renders children when loading=false.
|
|
98
|
+
- [Pagination](./docs/components/pagination.md) — Standalone pagination control; use when not relying on PaginatedTable's built-in paginator.
|
|
99
|
+
- [RichTextPreview](./docs/components/rich-text-preview.md) — Safely renders a CKEditor HTML string with correct CKEditor content styles.
|
|
100
|
+
- [StatusBadge](./docs/components/status-badge.md) — Colored pill badge to communicate a status or label with semantic tone.
|
|
101
|
+
- [TableSkeleton](./docs/components/table-skeleton.md) — Animated skeleton placeholder that mimics a table grid while data loads.
|
|
102
|
+
- [Tag](./docs/components/tag.md) — Styled label chip (PrimeReact Tag wrapper with Mantis Core CSS); use for status labels, categories, or counts.
|
|
103
|
+
|
|
104
|
+
## auth
|
|
105
|
+
|
|
106
|
+
- [ChangePasswordForm](./docs/components/change-password-form.md) — Current + new + confirm password form for authenticated users.
|
|
107
|
+
- [ForgotPasswordForm](./docs/components/forgot-password-form.md) — Email-only form to trigger password reset; caller owns the reset logic.
|
|
108
|
+
- [LoginForm](./docs/components/login-form.md) — Self-contained login form with email/username + password fields; pass onSubmit to wire signIn/Supabase from the app layer.
|
|
109
|
+
- [ResetPasswordForm](./docs/components/reset-password-form.md) — New password + confirm form; caller owns token validation and API call.
|
|
110
|
+
- [UserMenu](./docs/components/user-menu.md) — Topbar user avatar + dropdown with custom nav items and sign-out; no auth lib coupling.
|
|
111
|
+
|
|
112
|
+
## buttons
|
|
113
|
+
|
|
114
|
+
- [Button](./docs/components/button.md) — Primary action button; wraps PrimeReact Button with Mantis Core variant tokens and optional Next.js href navigation.
|
|
115
|
+
|
|
116
|
+
## charts
|
|
117
|
+
|
|
118
|
+
- [BarChart](./docs/components/bar-chart.md) — Categorical comparisons rendered as a bar chart. Same prop shape as LineChart.
|
|
119
|
+
- [DonutChart](./docs/components/donut-chart.md) — Part-to-whole breakdown rendered as a doughnut chart.
|
|
120
|
+
- [LineChart](./docs/components/line-chart.md) — Time-series or trend data rendered as a line chart. Zero-config defaults with full options override.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ColorPickerProps } from "primereact/colorpicker";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ControllerProps } from "./types";
|
|
4
|
+
export interface ColorPickerInputProps extends Omit<ColorPickerProps, "name" | "defaultValue" | "value" | "onChange"> {
|
|
5
|
+
controller: ControllerProps;
|
|
6
|
+
block?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const ColorPickerInput: React.FC<ColorPickerInputProps>;
|
|
9
|
+
export default ColorPickerInput;
|
|
10
|
+
//# sourceMappingURL=ColorPickerInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorPickerInput.d.ts","sourceRoot":"","sources":["../../../src/components/Forms/ColorPickerInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAe,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,qBACf,SAAQ,IAAI,CAAC,gBAAgB,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,GAAG,UAAU,CAAC;IAC9E,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAkBrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { ColorPicker } from "primereact/colorpicker";
|
|
5
|
+
import { Controller } from "react-hook-form";
|
|
6
|
+
const ColorPickerInput = (props) => {
|
|
7
|
+
const { controller, block, ...rest } = props;
|
|
8
|
+
return (_jsx(Controller, { ...controller, render: ({ field, formState }) => (_jsx(ColorPicker, { id: field.name, ...rest,
|
|
9
|
+
// ColorPicker uses hex string by default (format="hex")
|
|
10
|
+
value: field.value ?? "ffffff", onChange: (e) => field.onChange(e.value), disabled: formState.isSubmitting || rest.disabled, className: classNames(rest.className, { "w-full": block }) })) }));
|
|
11
|
+
};
|
|
12
|
+
export default ColorPickerInput;
|
|
13
|
+
//# sourceMappingURL=ColorPickerInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColorPickerInput.js","sourceRoot":"","sources":["../../../src/components/Forms/ColorPickerInput.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,WAAW,EAAoB,MAAM,wBAAwB,CAAC;AAEvE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAS7C,MAAM,gBAAgB,GAAoC,CAAC,KAAK,EAAE,EAAE;IAClE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC7C,OAAO,CACL,KAAC,UAAU,OACL,UAAU,EACd,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAChC,KAAC,WAAW,IACV,EAAE,EAAE,KAAK,CAAC,IAAI,KACV,IAAI;YACR,wDAAwD;YACxD,KAAK,EAAG,KAAK,CAAC,KAAgB,IAAI,QAAQ,EAC1C,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAe,CAAC,EAClD,QAAQ,EAAE,SAAS,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,EACjD,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,GAC1D,CACH,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AutoCompleteProps } from "primereact/autocomplete";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ControllerProps } from "./types";
|
|
4
|
+
export interface ComboboxProps extends Omit<AutoCompleteProps, "name" | "defaultValue" | "value" | "onChange" | "onBlur"> {
|
|
5
|
+
controller: ControllerProps;
|
|
6
|
+
block?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const Combobox: React.FC<ComboboxProps>;
|
|
9
|
+
export default Combobox;
|
|
10
|
+
//# sourceMappingURL=Combobox.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combobox.d.ts","sourceRoot":"","sources":["../../../src/components/Forms/Combobox.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAgB,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,iBAAiB,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC1F,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAsBrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { AutoComplete } from "primereact/autocomplete";
|
|
5
|
+
import { Controller } from "react-hook-form";
|
|
6
|
+
const Combobox = (props) => {
|
|
7
|
+
const { controller, block, ...rest } = props;
|
|
8
|
+
return (_jsx(Controller, { ...controller, render: ({ field, fieldState, formState }) => (_jsx(AutoComplete, { id: field.name, ...rest, name: field.name, ref: field.ref, value: field.value ?? "", onChange: (e) => field.onChange(e.value), onBlur: field.onBlur, disabled: formState.isSubmitting || rest.disabled, invalid: fieldState.invalid, className: classNames(rest.className, { "w-full": block }), inputClassName: classNames({ "w-full": block }) })) }));
|
|
9
|
+
};
|
|
10
|
+
export default Combobox;
|
|
11
|
+
//# sourceMappingURL=Combobox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combobox.js","sourceRoot":"","sources":["../../../src/components/Forms/Combobox.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,YAAY,EAAqB,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAS7C,MAAM,QAAQ,GAA4B,CAAC,KAAK,EAAE,EAAE;IAClD,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC7C,OAAO,CACL,KAAC,UAAU,OACL,UAAU,EACd,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC5C,KAAC,YAAY,IACX,EAAE,EAAE,KAAK,CAAC,IAAI,KACV,IAAI,EACR,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EACxC,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,QAAQ,EAAE,SAAS,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,EACjD,OAAO,EAAE,UAAU,CAAC,OAAO,EAC3B,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EAC1D,cAAc,EAAE,UAAU,CAAC,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,GAC/C,CACH,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface DatePreset {
|
|
3
|
+
label: string;
|
|
4
|
+
resolve: () => [Date, Date];
|
|
5
|
+
}
|
|
6
|
+
export interface DatePresetsProps {
|
|
7
|
+
onChange: (range: [Date, Date]) => void;
|
|
8
|
+
presets?: DatePreset[];
|
|
9
|
+
className?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
}
|
|
12
|
+
declare const DatePresets: React.FC<DatePresetsProps>;
|
|
13
|
+
export default DatePresets;
|
|
14
|
+
//# sourceMappingURL=DatePresets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePresets.d.ts","sourceRoot":"","sources":["../../../src/components/Forms/DatePresets.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,IAAI,CAAC;IACxC,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAmDD,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAqB3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { Button } from "primereact/button";
|
|
5
|
+
function startOfDay(d) {
|
|
6
|
+
const r = new Date(d);
|
|
7
|
+
r.setHours(0, 0, 0, 0);
|
|
8
|
+
return r;
|
|
9
|
+
}
|
|
10
|
+
function endOfDay(d) {
|
|
11
|
+
const r = new Date(d);
|
|
12
|
+
r.setHours(23, 59, 59, 999);
|
|
13
|
+
return r;
|
|
14
|
+
}
|
|
15
|
+
const DEFAULT_PRESETS = [
|
|
16
|
+
{
|
|
17
|
+
label: "Hoy",
|
|
18
|
+
resolve: () => {
|
|
19
|
+
const now = new Date();
|
|
20
|
+
return [startOfDay(now), endOfDay(now)];
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: "7 días",
|
|
25
|
+
resolve: () => {
|
|
26
|
+
const end = new Date();
|
|
27
|
+
const start = new Date(end);
|
|
28
|
+
start.setDate(start.getDate() - 6); // today + 6 prior days = 7-day window
|
|
29
|
+
return [startOfDay(start), endOfDay(end)];
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "30 días",
|
|
34
|
+
resolve: () => {
|
|
35
|
+
const end = new Date();
|
|
36
|
+
const start = new Date(end);
|
|
37
|
+
start.setDate(start.getDate() - 29); // today + 29 prior days = 30-day window
|
|
38
|
+
return [startOfDay(start), endOfDay(end)];
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
label: "Este mes",
|
|
43
|
+
resolve: () => {
|
|
44
|
+
const now = new Date();
|
|
45
|
+
const start = new Date(now.getFullYear(), now.getMonth(), 1);
|
|
46
|
+
const end = new Date(now.getFullYear(), now.getMonth() + 1, 0);
|
|
47
|
+
return [startOfDay(start), endOfDay(end)];
|
|
48
|
+
},
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
const DatePresets = ({ onChange, presets = DEFAULT_PRESETS, className, disabled, }) => {
|
|
52
|
+
return (_jsx("div", { className: classNames("flex gap-2 flex-wrap", className), children: presets.map((preset) => (_jsx(Button, { type: "button", label: preset.label, size: "small", outlined: true, disabled: disabled, onClick: () => onChange(preset.resolve()) }, preset.label))) }));
|
|
53
|
+
};
|
|
54
|
+
export default DatePresets;
|
|
55
|
+
//# sourceMappingURL=DatePresets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePresets.js","sourceRoot":"","sources":["../../../src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AC,IANpC,MAAM,CAAC,KAAK,CAOjB,CACH,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { InputOtpProps } from "primereact/inputotp";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ControllerProps } from "./types";
|
|
4
|
+
export interface OtpInputProps extends Omit<InputOtpProps, "name" | "defaultValue" | "value" | "onChange"> {
|
|
5
|
+
controller: ControllerProps;
|
|
6
|
+
length?: number;
|
|
7
|
+
block?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const OtpInput: React.FC<OtpInputProps>;
|
|
10
|
+
export default OtpInput;
|
|
11
|
+
//# sourceMappingURL=OtpInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtpInput.d.ts","sourceRoot":"","sources":["../../../src/components/Forms/OtpInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,aAAa,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,GAAG,UAAU,CAAC;IAC3E,UAAU,EAAE,eAAe,CAAC;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmBrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { InputOtp } from "primereact/inputotp";
|
|
5
|
+
import { Controller } from "react-hook-form";
|
|
6
|
+
const OtpInput = (props) => {
|
|
7
|
+
const { controller, length = 6, block, ...rest } = props;
|
|
8
|
+
return (_jsx(Controller, { ...controller, render: ({ field, fieldState, formState }) => (_jsx(InputOtp, { id: field.name, ...rest, length: length, value: field.value ?? "", onChange: (e) => field.onChange(e.value), disabled: formState.isSubmitting || rest.disabled, invalid: fieldState.invalid, className: classNames(rest.className, { "w-full": block }) })) }));
|
|
9
|
+
};
|
|
10
|
+
export default OtpInput;
|
|
11
|
+
//# sourceMappingURL=OtpInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OtpInput.js","sourceRoot":"","sources":["../../../src/components/Forms/OtpInput.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAiB,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAU7C,MAAM,QAAQ,GAA4B,CAAC,KAAK,EAAE,EAAE;IAClD,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACzD,OAAO,CACL,KAAC,UAAU,OACL,UAAU,EACd,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC5C,KAAC,QAAQ,IACP,EAAE,EAAE,KAAK,CAAC,IAAI,KACV,IAAI,EACR,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,CAAC,KAAK,IAAI,EAAE,EACxB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EACxC,QAAQ,EAAE,SAAS,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,EACjD,OAAO,EAAE,UAAU,CAAC,OAAO,EAC3B,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,GAC1D,CACH,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { InputTextProps } from 'primereact/inputtext';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ControllerProps } from './types';
|
|
4
|
+
export interface PasswordInputProps extends Omit<InputTextProps, 'name' | 'defaultValue'> {
|
|
5
|
+
controller: ControllerProps;
|
|
6
|
+
block?: boolean;
|
|
7
|
+
defaultValue?: string;
|
|
8
|
+
showToggle?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare const PasswordInput: React.FC<PasswordInputProps>;
|
|
11
|
+
export default PasswordInput;
|
|
12
|
+
//# sourceMappingURL=PasswordInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInput.d.ts","sourceRoot":"","sources":["../../../src/components/Forms/PasswordInput.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAa,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,KAAmB,MAAM,OAAO,CAAC;AAExC,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,cAAc,EAAE,MAAM,GAAG,cAAc,CAAC;IACvF,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,QAAA,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAyD/C,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { Eye, EyeOff } from 'lucide-react';
|
|
5
|
+
import { InputText } from 'primereact/inputtext';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import { Controller } from 'react-hook-form';
|
|
8
|
+
const PasswordInput = (props) => {
|
|
9
|
+
const { controller, block, defaultValue = '', showToggle = true, ...rest } = props;
|
|
10
|
+
const [visible, setVisible] = useState(false);
|
|
11
|
+
return (_jsx(Controller, { defaultValue: controller?.defaultValue || defaultValue, ...controller, render: ({ field, fieldState, formState }) => {
|
|
12
|
+
const inputEl = (_jsx(InputText, { id: rest.id || field.name, ...rest, type: showToggle ? (visible ? 'text' : 'password') : 'password', disabled: formState.isSubmitting || rest.disabled, invalid: fieldState.invalid, className: classNames(rest.className, { 'w-full': block }), ...field }));
|
|
13
|
+
if (!showToggle)
|
|
14
|
+
return inputEl;
|
|
15
|
+
return (_jsxs("div", { className: classNames('mantis-core-password-input', { 'w-full': block }), style: { position: 'relative' }, children: [inputEl, _jsx("button", { type: "button", className: "mantis-core-password-input__toggle", onClick: () => setVisible((v) => !v), disabled: formState.isSubmitting || rest.disabled, style: {
|
|
16
|
+
position: 'absolute',
|
|
17
|
+
right: '0.75rem',
|
|
18
|
+
top: '50%',
|
|
19
|
+
transform: 'translateY(-50%)',
|
|
20
|
+
background: 'none',
|
|
21
|
+
border: 'none',
|
|
22
|
+
cursor: 'pointer',
|
|
23
|
+
padding: '0',
|
|
24
|
+
display: 'flex',
|
|
25
|
+
alignItems: 'center',
|
|
26
|
+
color: 'var(--text-color-secondary)',
|
|
27
|
+
}, tabIndex: -1, "aria-label": visible ? 'Ocultar contraseña' : 'Mostrar contraseña', children: visible ? _jsx(EyeOff, { size: 16 }) : _jsx(Eye, { size: 16 }) })] }));
|
|
28
|
+
} }));
|
|
29
|
+
};
|
|
30
|
+
export default PasswordInput;
|
|
31
|
+
//# sourceMappingURL=PasswordInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"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IAAI,CAAC,UAAU;gBAAE,OAAO,OAAO,CAAC;YAEhC,OAAO,CACL,eACE,SAAS,EAAE,UAAU,CAAC,4BAA4B,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,EACxE,KAAK,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,aAE9B,OAAO,EACR,iBACE,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,oCAAoC,EAC9C,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EACpC,QAAQ,EAAE,SAAS,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,EACjD,KAAK,EAAE;4BACL,QAAQ,EAAE,UAAU;4BACpB,KAAK,EAAE,SAAS;4BAChB,GAAG,EAAE,KAAK;4BACV,SAAS,EAAE,kBAAkB;4BAC7B,UAAU,EAAE,MAAM;4BAClB,MAAM,EAAE,MAAM;4BACd,MAAM,EAAE,SAAS;4BACjB,OAAO,EAAE,GAAG;4BACZ,OAAO,EAAE,MAAM;4BACf,UAAU,EAAE,QAAQ;4BACpB,KAAK,EAAE,6BAA6B;yBACrC,EACD,QAAQ,EAAE,CAAC,CAAC,gBACA,OAAO,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,oBAAoB,YAEhE,OAAO,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,IAAI,EAAE,EAAE,GAAI,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,IAAI,EAAE,EAAE,GAAI,GAC5C,IACL,CACP,CAAC;QACJ,CAAC,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RatingProps } from "primereact/rating";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ControllerProps } from "./types";
|
|
4
|
+
export interface RatingInputProps extends Omit<RatingProps, "name" | "defaultValue" | "value" | "onChange"> {
|
|
5
|
+
controller: ControllerProps;
|
|
6
|
+
stars?: number;
|
|
7
|
+
block?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const RatingInput: React.FC<RatingInputProps>;
|
|
10
|
+
export default RatingInput;
|
|
11
|
+
//# sourceMappingURL=RatingInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RatingInput.d.ts","sourceRoot":"","sources":["../../../src/components/Forms/RatingInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,gBACf,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,GAAG,UAAU,CAAC;IACzE,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAmB3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { Rating } from "primereact/rating";
|
|
5
|
+
import { Controller } from "react-hook-form";
|
|
6
|
+
const RatingInput = (props) => {
|
|
7
|
+
const { controller, stars = 5, block, ...rest } = props;
|
|
8
|
+
return (_jsx(Controller, { ...controller, render: ({ field, formState }) => (_jsx(Rating, { id: field.name, ...rest, stars: stars, value: field.value ?? undefined, onChange: (e) => field.onChange(e.value), onBlur: field.onBlur, disabled: formState.isSubmitting || rest.disabled, className: classNames(rest.className, { "w-full": block }) })) }));
|
|
9
|
+
};
|
|
10
|
+
export default RatingInput;
|
|
11
|
+
//# sourceMappingURL=RatingInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RatingInput.js","sourceRoot":"","sources":["../../../src/components/Forms/RatingInput.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,MAAM,EAAe,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAU7C,MAAM,WAAW,GAA+B,CAAC,KAAK,EAAE,EAAE;IACxD,MAAM,EAAE,UAAU,EAAE,KAAK,GAAG,CAAC,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACxD,OAAO,CACL,KAAC,UAAU,OACL,UAAU,EACd,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAChC,KAAC,MAAM,IACL,EAAE,EAAE,KAAK,CAAC,IAAI,KACV,IAAI,EACR,KAAK,EAAE,KAAK,EACZ,KAAK,EAAG,KAAK,CAAC,KAAgB,IAAI,SAAS,EAC3C,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EACxC,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,QAAQ,EAAE,SAAS,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,EACjD,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,GAC1D,CACH,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChipsProps } from "primereact/chips";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { ControllerProps } from "./types";
|
|
4
|
+
export interface TagsInputProps extends Omit<ChipsProps, "name" | "defaultValue" | "value" | "onChange" | "onBlur"> {
|
|
5
|
+
controller: ControllerProps;
|
|
6
|
+
block?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const TagsInput: React.FC<TagsInputProps>;
|
|
9
|
+
export default TagsInput;
|
|
10
|
+
//# sourceMappingURL=TagsInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagsInput.d.ts","sourceRoot":"","sources":["../../../src/components/Forms/TagsInput.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAS,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,WAAW,cACf,SAAQ,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,cAAc,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,CAAC;IACnF,UAAU,EAAE,eAAe,CAAC;IAC5B,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAqBvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import classNames from "classnames";
|
|
4
|
+
import { Chips } from "primereact/chips";
|
|
5
|
+
import { Controller } from "react-hook-form";
|
|
6
|
+
const TagsInput = (props) => {
|
|
7
|
+
const { controller, block, ...rest } = props;
|
|
8
|
+
return (_jsx(Controller, { ...controller, render: ({ field, fieldState, formState }) => (_jsx(Chips, { id: field.name, ...rest, name: field.name, ref: field.ref, value: field.value ?? [], onChange: (e) => field.onChange(e.value), onBlur: field.onBlur, disabled: formState.isSubmitting || rest.disabled, invalid: fieldState.invalid, className: classNames(rest.className, { "w-full": block }) })) }));
|
|
9
|
+
};
|
|
10
|
+
export default TagsInput;
|
|
11
|
+
//# sourceMappingURL=TagsInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagsInput.js","sourceRoot":"","sources":["../../../src/components/Forms/TagsInput.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,KAAK,EAAc,MAAM,kBAAkB,CAAC;AAErD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAS7C,MAAM,SAAS,GAA6B,CAAC,KAAK,EAAE,EAAE;IACpD,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC7C,OAAO,CACL,KAAC,UAAU,OACL,UAAU,EACd,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC5C,KAAC,KAAK,IACJ,EAAE,EAAE,KAAK,CAAC,IAAI,KACV,IAAI,EACR,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,KAAK,EAAG,KAAK,CAAC,KAAkB,IAAI,EAAE,EACtC,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,EACxC,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,QAAQ,EAAE,SAAS,CAAC,YAAY,IAAI,IAAI,CAAC,QAAQ,EACjD,OAAO,EAAE,UAAU,CAAC,OAAO,EAC3B,SAAS,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,GAC1D,CACH,GACD,CACH,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ChangePasswordFormValues {
|
|
3
|
+
currentPassword: string;
|
|
4
|
+
newPassword: string;
|
|
5
|
+
confirmPassword: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ChangePasswordFormProps {
|
|
8
|
+
onSubmit: (values: ChangePasswordFormValues) => void | Promise<void>;
|
|
9
|
+
title?: string;
|
|
10
|
+
submitLabel?: string;
|
|
11
|
+
minPasswordLength?: number;
|
|
12
|
+
className?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const ChangePasswordForm: React.FC<ChangePasswordFormProps>;
|
|
15
|
+
export default ChangePasswordForm;
|
|
16
|
+
//# sourceMappingURL=ChangePasswordForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChangePasswordForm.d.ts","sourceRoot":"","sources":["../../../src/components/auth/ChangePasswordForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAQ1B,MAAM,WAAW,wBAAwB;IACvC,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAoEzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { FormProvider, useForm } from 'react-hook-form';
|
|
5
|
+
import Button from '../Buttons/Button';
|
|
6
|
+
import FormFieldRender from '../Forms/FormFieldRender';
|
|
7
|
+
import PasswordInput from '../Forms/PasswordInput';
|
|
8
|
+
import { minLengthRule, notEmptyRule } from '../../validation';
|
|
9
|
+
const ChangePasswordForm = ({ onSubmit, title = 'Cambiar contraseña', submitLabel = 'Actualizar contraseña', minPasswordLength = 8, className, }) => {
|
|
10
|
+
const form = useForm({ mode: 'onChange' });
|
|
11
|
+
const { watch } = form;
|
|
12
|
+
return (_jsx(FormProvider, { ...form, children: _jsxs("div", { className: classNames('mantis-core-change-password-form', className), children: [_jsx("h1", { className: "mantis-core-change-password-form__title", children: title }), _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-4", children: [_jsx(FormFieldRender, { label: "Contrase\u00F1a actual", name: "currentPassword", render: ({ name }) => (_jsx(PasswordInput, { controller: { name, rules: notEmptyRule() }, autoComplete: "current-password", block: true })) }), _jsx(FormFieldRender, { label: "Nueva contrase\u00F1a", name: "newPassword", render: ({ name }) => (_jsx(PasswordInput, { controller: {
|
|
13
|
+
name,
|
|
14
|
+
rules: { ...notEmptyRule(), ...minLengthRule(minPasswordLength) },
|
|
15
|
+
}, autoComplete: "new-password", block: true })) }), _jsx(FormFieldRender, { label: "Confirmar nueva contrase\u00F1a", name: "confirmPassword", render: ({ name }) => (_jsx(PasswordInput, { controller: {
|
|
16
|
+
name,
|
|
17
|
+
rules: {
|
|
18
|
+
validate: (v) => v === watch('newPassword') || 'Las contraseñas no coinciden',
|
|
19
|
+
},
|
|
20
|
+
}, autoComplete: "new-password", block: true })) }), _jsx(Button, { type: "submit", label: submitLabel, loading: form.formState.isSubmitting, disabled: form.formState.isSubmitting, block: true })] })] }) }));
|
|
21
|
+
};
|
|
22
|
+
export default ChangePasswordForm;
|
|
23
|
+
//# sourceMappingURL=ChangePasswordForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ChangePasswordForm.js","sourceRoot":"","sources":["../../../src/components/auth/ChangePasswordForm.tsx"],"names":[],"mappings":"AA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AAa,IACZ,UAAU,EAAE;oCACV,IAAI;oCACJ,KAAK,EAAE,EAAE,GAAG,YAAY,EAAE,EAAE,GAAG,aAAa,CAAC,iBAAiB,CAAC,EAAqB;iCACrF,EACD,YAAY,EAAC,cAAc,EAC3B,KAAK,SACL,CACH,GACD,EACF,KAAC,eAAe,IACd,KAAK,EAAC,iCAA4B,EAClC,IAAI,EAAC,iBAAiB,EACtB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CACpB,KAAC,aAAa,IACZ,UAAU,EAAE;oCACV,IAAI;oCACJ,KAAK,EAAE;wCACL,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CACd,CAAC,KAAK,KAAK,CAAC,aAAa,CAAC,IAAI,8BAA8B;qCAC/D;iCACF,EACD,YAAY,EAAC,cAAc,EAC3B,KAAK,SACL,CACH,GACD,EACF,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,EACpC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,EACrC,KAAK,SACL,IACG,IACH,GACO,CAChB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface ForgotPasswordFormValues {
|
|
3
|
+
email: string;
|
|
4
|
+
}
|
|
5
|
+
export interface ForgotPasswordFormProps {
|
|
6
|
+
onSubmit: (values: ForgotPasswordFormValues) => void | Promise<void>;
|
|
7
|
+
title?: string;
|
|
8
|
+
subtitle?: string;
|
|
9
|
+
submitLabel?: string;
|
|
10
|
+
backSlot?: React.ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const ForgotPasswordForm: React.FC<ForgotPasswordFormProps>;
|
|
14
|
+
export default ForgotPasswordForm;
|
|
15
|
+
//# sourceMappingURL=ForgotPasswordForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForgotPasswordForm.d.ts","sourceRoot":"","sources":["../../../src/components/auth/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,CAAC,MAAM,EAAE,wBAAwB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAwCzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import classNames from 'classnames';
|
|
4
|
+
import { FormProvider, useForm } from 'react-hook-form';
|
|
5
|
+
import Button from '../Buttons/Button';
|
|
6
|
+
import FormFieldRender from '../Forms/FormFieldRender';
|
|
7
|
+
import TextInput from '../Forms/TextInput';
|
|
8
|
+
import { emailRule } from '../../validation';
|
|
9
|
+
const ForgotPasswordForm = ({ onSubmit, title = 'Recuperar contraseña', subtitle, submitLabel = 'Enviar enlace', backSlot, className, }) => {
|
|
10
|
+
const form = useForm({ mode: 'onChange' });
|
|
11
|
+
return (_jsx(FormProvider, { ...form, children: _jsxs("div", { className: classNames('mantis-core-forgot-password-form', className), children: [_jsx("h1", { className: "mantis-core-forgot-password-form__title", children: title }), subtitle && _jsx("p", { className: "mantis-core-forgot-password-form__subtitle", children: subtitle }), _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), className: "space-y-4", children: [_jsx(FormFieldRender, { label: "Correo electr\u00F3nico", name: "email", render: ({ name }) => (_jsx(TextInput, { controller: { name, rules: emailRule() }, type: "email", autoComplete: "email", block: true })) }), _jsx(Button, { type: "submit", label: submitLabel, loading: form.formState.isSubmitting, disabled: form.formState.isSubmitting, block: true }), backSlot && _jsx("div", { className: "mantis-core-forgot-password-form__back", children: backSlot })] })] }) }));
|
|
12
|
+
};
|
|
13
|
+
export default ForgotPasswordForm;
|
|
14
|
+
//# sourceMappingURL=ForgotPasswordForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ForgotPasswordForm.js","sourceRoot":"","sources":["../../../src/components/auth/ForgotPasswordForm.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AACb,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,YAAY,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,MAAM,MAAM,mBAAmB,CAAC;AACvC,OAAO,eAAe,MAAM,0BAA0B,CAAC;AACvD,OAAO,SAAS,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAe7C,MAAM,kBAAkB,GAAsC,CAAC,EAC7D,QAAQ,EACR,KAAK,GAAG,sBAAsB,EAC9B,QAAQ,EACR,WAAW,GAAG,eAAe,EAC7B,QAAQ,EACR,SAAS,GACV,EAAE,EAAE;IACH,MAAM,IAAI,GAAG,OAAO,CAA2B,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC,CAAC;IAErE,OAAO,CACL,KAAC,YAAY,OAAK,IAAI,YACpB,eAAK,SAAS,EAAE,UAAU,CAAC,kCAAkC,EAAE,SAAS,CAAC,aACvE,aAAI,SAAS,EAAC,yCAAyC,YAAE,KAAK,GAAM,EACnE,QAAQ,IAAI,YAAG,SAAS,EAAC,4CAA4C,YAAE,QAAQ,GAAK,EACrF,gBAAM,QAAQ,EAAE,IAAI,CAAC,YAAY,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAC,WAAW,aAChE,KAAC,eAAe,IACd,KAAK,EAAC,yBAAoB,EAC1B,IAAI,EAAC,OAAO,EACZ,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CACpB,KAAC,SAAS,IACR,UAAU,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EACxC,IAAI,EAAC,OAAO,EACZ,YAAY,EAAC,OAAO,EACpB,KAAK,SACL,CACH,GACD,EACF,KAAC,MAAM,IACL,IAAI,EAAC,QAAQ,EACb,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,EACpC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,YAAY,EACrC,KAAK,SACL,EACD,QAAQ,IAAI,cAAK,SAAS,EAAC,wCAAwC,YAAE,QAAQ,GAAO,IAChF,IACH,GACO,CAChB,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface LoginFormValues {
|
|
3
|
+
identifier: string;
|
|
4
|
+
password: string;
|
|
5
|
+
}
|
|
6
|
+
export interface LoginFormProps {
|
|
7
|
+
onSubmit: (values: LoginFormValues) => void | Promise<void>;
|
|
8
|
+
brand?: React.ReactNode;
|
|
9
|
+
title?: string;
|
|
10
|
+
subtitle?: string;
|
|
11
|
+
footer?: React.ReactNode;
|
|
12
|
+
identifierField?: 'email' | 'username';
|
|
13
|
+
identifierLabel?: string;
|
|
14
|
+
identifierPlaceholder?: string;
|
|
15
|
+
passwordLabel?: string;
|
|
16
|
+
passwordPlaceholder?: string;
|
|
17
|
+
submitLabel?: string;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const LoginForm: React.FC<LoginFormProps>;
|
|
21
|
+
export default LoginForm;
|
|
22
|
+
//# sourceMappingURL=LoginForm.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LoginForm.d.ts","sourceRoot":"","sources":["../../../src/components/auth/LoginForm.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,CAAC,MAAM,EAAE,eAAe,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;IACvC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAkEvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
|