@mantis-core/ui 0.4.0 → 0.6.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/CHANGELOG.md +144 -0
- package/COMPONENTS.md +113 -15
- package/README.md +13 -6
- package/catalog.json +3031 -0
- package/dist/components/Buttons/Button.d.ts +39 -9
- package/dist/components/Buttons/Button.d.ts.map +1 -1
- package/dist/components/Buttons/Button.js +21 -13
- package/dist/components/Buttons/Button.js.map +1 -1
- package/dist/components/Forms/AutoCompleteField.d.ts +60 -0
- package/dist/components/Forms/AutoCompleteField.d.ts.map +1 -0
- package/dist/components/Forms/AutoCompleteField.js +125 -0
- package/dist/components/Forms/AutoCompleteField.js.map +1 -0
- package/dist/components/Forms/CKEditorInput.d.ts +5 -2
- package/dist/components/Forms/CKEditorInput.d.ts.map +1 -1
- package/dist/components/Forms/CKEditorInput.js +5 -2
- package/dist/components/Forms/CKEditorInput.js.map +1 -1
- package/dist/components/Forms/CheckboxField.d.ts +14 -0
- package/dist/components/Forms/CheckboxField.d.ts.map +1 -0
- package/dist/components/Forms/CheckboxField.js +26 -0
- package/dist/components/Forms/CheckboxField.js.map +1 -0
- package/dist/components/Forms/ColorPickerInput.d.ts +27 -8
- package/dist/components/Forms/ColorPickerInput.d.ts.map +1 -1
- package/dist/components/Forms/ColorPickerInput.js +57 -11
- package/dist/components/Forms/ColorPickerInput.js.map +1 -1
- package/dist/components/Forms/DateField.d.ts +68 -0
- package/dist/components/Forms/DateField.d.ts.map +1 -0
- package/dist/components/Forms/DateField.js +108 -0
- package/dist/components/Forms/DateField.js.map +1 -0
- package/dist/components/Forms/DatePresets.d.ts.map +1 -1
- package/dist/components/Forms/DatePresets.js +6 -3
- package/dist/components/Forms/DatePresets.js.map +1 -1
- package/dist/components/Forms/FieldShell.d.ts +24 -0
- package/dist/components/Forms/FieldShell.d.ts.map +1 -0
- package/dist/components/Forms/FieldShell.js +39 -0
- package/dist/components/Forms/FieldShell.js.map +1 -0
- package/dist/components/Forms/FileDropzone.d.ts +4 -2
- package/dist/components/Forms/FileDropzone.d.ts.map +1 -1
- package/dist/components/Forms/FileDropzone.js.map +1 -1
- package/dist/components/Forms/FormActionsBar.js +2 -2
- package/dist/components/Forms/FormActionsBar.js.map +1 -1
- package/dist/components/Forms/FormWizard.d.ts +1 -1
- package/dist/components/Forms/FormWizard.d.ts.map +1 -1
- package/dist/components/Forms/FormWizard.js +4 -5
- package/dist/components/Forms/FormWizard.js.map +1 -1
- package/dist/components/Forms/HiddenField.d.ts +12 -6
- package/dist/components/Forms/HiddenField.d.ts.map +1 -1
- package/dist/components/Forms/HiddenField.js +14 -5
- package/dist/components/Forms/HiddenField.js.map +1 -1
- package/dist/components/Forms/MaskField.d.ts +28 -0
- package/dist/components/Forms/MaskField.d.ts.map +1 -0
- package/dist/components/Forms/MaskField.js +74 -0
- package/dist/components/Forms/MaskField.js.map +1 -0
- package/dist/components/Forms/NumberField.d.ts +14 -0
- package/dist/components/Forms/NumberField.d.ts.map +1 -0
- package/dist/components/Forms/NumberField.js +51 -0
- package/dist/components/Forms/NumberField.js.map +1 -0
- package/dist/components/Forms/OtpInput.d.ts +23 -8
- package/dist/components/Forms/OtpInput.d.ts.map +1 -1
- package/dist/components/Forms/OtpInput.js +37 -8
- package/dist/components/Forms/OtpInput.js.map +1 -1
- package/dist/components/Forms/PasswordInput.d.ts +22 -9
- package/dist/components/Forms/PasswordInput.d.ts.map +1 -1
- package/dist/components/Forms/PasswordInput.js +63 -28
- package/dist/components/Forms/PasswordInput.js.map +1 -1
- package/dist/components/Forms/PhoneInput.d.ts +16 -8
- package/dist/components/Forms/PhoneInput.d.ts.map +1 -1
- package/dist/components/Forms/PhoneInput.js +13 -6
- package/dist/components/Forms/PhoneInput.js.map +1 -1
- package/dist/components/Forms/RadioGroup.d.ts +34 -13
- package/dist/components/Forms/RadioGroup.d.ts.map +1 -1
- package/dist/components/Forms/RadioGroup.js +49 -6
- package/dist/components/Forms/RadioGroup.js.map +1 -1
- package/dist/components/Forms/RangeSlider.d.ts +26 -11
- package/dist/components/Forms/RangeSlider.d.ts.map +1 -1
- package/dist/components/Forms/RangeSlider.js +40 -7
- package/dist/components/Forms/RangeSlider.js.map +1 -1
- package/dist/components/Forms/RatingInput.d.ts +24 -8
- package/dist/components/Forms/RatingInput.d.ts.map +1 -1
- package/dist/components/Forms/RatingInput.js +41 -9
- package/dist/components/Forms/RatingInput.js.map +1 -1
- package/dist/components/Forms/SearchInput.d.ts +18 -10
- package/dist/components/Forms/SearchInput.d.ts.map +1 -1
- package/dist/components/Forms/SearchInput.js +44 -23
- package/dist/components/Forms/SearchInput.js.map +1 -1
- package/dist/components/Forms/SelectField.d.ts +41 -0
- package/dist/components/Forms/SelectField.d.ts.map +1 -0
- package/dist/components/Forms/SelectField.js +110 -0
- package/dist/components/Forms/SelectField.js.map +1 -0
- package/dist/components/Forms/SwitchField.d.ts +14 -0
- package/dist/components/Forms/SwitchField.d.ts.map +1 -0
- package/dist/components/Forms/SwitchField.js +26 -0
- package/dist/components/Forms/SwitchField.js.map +1 -0
- package/dist/components/Forms/TagsInput.d.ts +29 -8
- package/dist/components/Forms/TagsInput.d.ts.map +1 -1
- package/dist/components/Forms/TagsInput.js +53 -9
- package/dist/components/Forms/TagsInput.js.map +1 -1
- package/dist/components/Forms/TextArea.d.ts +13 -10
- package/dist/components/Forms/TextArea.d.ts.map +1 -1
- package/dist/components/Forms/TextArea.js +27 -9
- package/dist/components/Forms/TextArea.js.map +1 -1
- package/dist/components/Forms/TextField.d.ts +14 -0
- package/dist/components/Forms/TextField.d.ts.map +1 -0
- package/dist/components/Forms/TextField.js +29 -0
- package/dist/components/Forms/TextField.js.map +1 -0
- package/dist/components/Forms/ToggleInlineButton.d.ts +33 -12
- package/dist/components/Forms/ToggleInlineButton.d.ts.map +1 -1
- package/dist/components/Forms/ToggleInlineButton.js +56 -6
- package/dist/components/Forms/ToggleInlineButton.js.map +1 -1
- package/dist/components/Forms/UploadFilesPreview.js +3 -3
- package/dist/components/Forms/UploadFilesPreview.js.map +1 -1
- package/dist/components/Forms/field-typing.test-d.d.ts +2 -0
- package/dist/components/Forms/field-typing.test-d.d.ts.map +1 -0
- package/dist/components/Forms/field-typing.test-d.js +24 -0
- package/dist/components/Forms/field-typing.test-d.js.map +1 -0
- package/dist/components/Forms/useFieldController.d.ts +85 -0
- package/dist/components/Forms/useFieldController.d.ts.map +1 -0
- package/dist/components/Forms/useFieldController.js +54 -0
- package/dist/components/Forms/useFieldController.js.map +1 -0
- package/dist/components/Loaders/Loading.d.ts.map +1 -1
- package/dist/components/Loaders/Loading.js +3 -2
- package/dist/components/Loaders/Loading.js.map +1 -1
- package/dist/components/Tables/ActionColumn.d.ts +20 -4
- package/dist/components/Tables/ActionColumn.d.ts.map +1 -1
- package/dist/components/Tables/ActionColumn.js +24 -5
- package/dist/components/Tables/ActionColumn.js.map +1 -1
- package/dist/components/Tables/FilterPannel.d.ts +9 -2
- package/dist/components/Tables/FilterPannel.d.ts.map +1 -1
- package/dist/components/Tables/FilterPannel.js +15 -11
- package/dist/components/Tables/FilterPannel.js.map +1 -1
- package/dist/components/Tables/IndexColumn.d.ts +12 -3
- package/dist/components/Tables/IndexColumn.d.ts.map +1 -1
- package/dist/components/Tables/IndexColumn.js +21 -5
- package/dist/components/Tables/IndexColumn.js.map +1 -1
- package/dist/components/Tables/MantisDataTable.d.ts +45 -0
- package/dist/components/Tables/MantisDataTable.d.ts.map +1 -0
- package/dist/components/Tables/MantisDataTable.js +63 -0
- package/dist/components/Tables/MantisDataTable.js.map +1 -0
- package/dist/components/Tables/MenuButton.d.ts +28 -7
- package/dist/components/Tables/MenuButton.d.ts.map +1 -1
- package/dist/components/Tables/MenuButton.js +20 -10
- package/dist/components/Tables/MenuButton.js.map +1 -1
- package/dist/components/Tables/PaginatedTable.d.ts +26 -17
- package/dist/components/Tables/PaginatedTable.d.ts.map +1 -1
- package/dist/components/Tables/PaginatedTable.js +24 -22
- package/dist/components/Tables/PaginatedTable.js.map +1 -1
- package/dist/components/Tables/cell-presets.d.ts +35 -0
- package/dist/components/Tables/cell-presets.d.ts.map +1 -0
- package/dist/components/Tables/cell-presets.js +40 -0
- package/dist/components/Tables/cell-presets.js.map +1 -0
- package/dist/components/Tables/columns.d.ts +40 -0
- package/dist/components/Tables/columns.d.ts.map +1 -0
- package/dist/components/Tables/columns.js +2 -0
- package/dist/components/Tables/columns.js.map +1 -0
- package/dist/components/Tables/filters/MultiSelectFilter.d.ts +24 -6
- package/dist/components/Tables/filters/MultiSelectFilter.d.ts.map +1 -1
- package/dist/components/Tables/filters/MultiSelectFilter.js +19 -6
- package/dist/components/Tables/filters/MultiSelectFilter.js.map +1 -1
- package/dist/components/auth/ChangePasswordForm.d.ts.map +1 -1
- package/dist/components/auth/ChangePasswordForm.js +12 -12
- package/dist/components/auth/ChangePasswordForm.js.map +1 -1
- package/dist/components/auth/ForgotPasswordForm.d.ts.map +1 -1
- package/dist/components/auth/ForgotPasswordForm.js +7 -5
- package/dist/components/auth/ForgotPasswordForm.js.map +1 -1
- package/dist/components/auth/LoginForm.d.ts +2 -2
- package/dist/components/auth/LoginForm.d.ts.map +1 -1
- package/dist/components/auth/LoginForm.js +15 -15
- package/dist/components/auth/LoginForm.js.map +1 -1
- package/dist/components/auth/ResetPasswordForm.d.ts.map +1 -1
- package/dist/components/auth/ResetPasswordForm.js +11 -12
- package/dist/components/auth/ResetPasswordForm.js.map +1 -1
- package/dist/components/auth/UserMenu.d.ts +11 -1
- package/dist/components/auth/UserMenu.d.ts.map +1 -1
- package/dist/components/auth/UserMenu.js +30 -87
- package/dist/components/auth/UserMenu.js.map +1 -1
- package/dist/components/data/Timeline.d.ts +2 -2
- package/dist/components/data/Timeline.d.ts.map +1 -1
- package/dist/components/data/Timeline.js +17 -17
- package/dist/components/data/Timeline.js.map +1 -1
- package/dist/components/feedback/Avatar.d.ts +4 -2
- package/dist/components/feedback/Avatar.d.ts.map +1 -1
- package/dist/components/feedback/Avatar.js +4 -4
- package/dist/components/feedback/Avatar.js.map +1 -1
- package/dist/components/feedback/CardSkeleton.d.ts.map +1 -1
- package/dist/components/feedback/CardSkeleton.js +3 -3
- package/dist/components/feedback/CardSkeleton.js.map +1 -1
- package/dist/components/feedback/TableSkeleton.d.ts.map +1 -1
- package/dist/components/feedback/TableSkeleton.js +3 -3
- package/dist/components/feedback/TableSkeleton.js.map +1 -1
- package/dist/components/feedback/Tag.d.ts +4 -2
- package/dist/components/feedback/Tag.d.ts.map +1 -1
- package/dist/components/feedback/Tag.js +4 -4
- package/dist/components/feedback/Tag.js.map +1 -1
- package/dist/components/navigation/CommandPalette.d.ts.map +1 -1
- package/dist/components/navigation/CommandPalette.js +5 -2
- package/dist/components/navigation/CommandPalette.js.map +1 -1
- package/dist/components/navigation/PageTabs.d.ts +10 -8
- package/dist/components/navigation/PageTabs.d.ts.map +1 -1
- package/dist/components/navigation/PageTabs.js +17 -13
- package/dist/components/navigation/PageTabs.js.map +1 -1
- package/dist/components/overlays/Drawer.d.ts +16 -3
- package/dist/components/overlays/Drawer.d.ts.map +1 -1
- package/dist/components/overlays/Drawer.js +9 -5
- package/dist/components/overlays/Drawer.js.map +1 -1
- package/dist/components/overlays/Modal.d.ts +18 -3
- package/dist/components/overlays/Modal.d.ts.map +1 -1
- package/dist/components/overlays/Modal.js +13 -5
- package/dist/components/overlays/Modal.js.map +1 -1
- package/dist/components/pages/app-shell/AppShell.d.ts.map +1 -1
- package/dist/components/pages/app-shell/AppShell.js +6 -6
- package/dist/components/pages/app-shell/AppShell.js.map +1 -1
- package/dist/components/ui/ConfirmDialog.d.ts +1 -2
- package/dist/components/ui/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/ui/ConfirmDialog.js +10 -4
- package/dist/components/ui/ConfirmDialog.js.map +1 -1
- package/dist/components/ui/DataState.js +2 -2
- package/dist/components/ui/DataState.js.map +1 -1
- package/dist/index.d.ts +71 -42
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +114 -22
- package/dist/index.js.map +1 -1
- package/docs/README.md +1 -1
- package/docs/components/action-column.md +39 -12
- package/docs/components/admin-page-configurator.md +42 -0
- package/docs/components/admin-page-header.md +32 -16
- package/docs/components/admin-page-layout-shell.md +36 -0
- package/docs/components/admin-page-layout.md +41 -21
- package/docs/components/app-shell.md +45 -0
- package/docs/components/auto-complete-field.md +60 -0
- package/docs/components/avatar.md +29 -0
- package/docs/components/bar-chart.md +39 -0
- package/docs/components/breadcrumbs.md +28 -0
- package/docs/components/button.md +41 -17
- package/docs/components/card-skeleton.md +21 -0
- package/docs/components/change-password-form.md +36 -0
- package/docs/components/checkbox-field.md +38 -0
- package/docs/components/ckeditor-input.md +47 -16
- package/docs/components/color-picker-input.md +30 -0
- package/docs/components/command-palette.md +38 -0
- package/docs/components/confirm-dialog.md +45 -16
- package/docs/components/data-state.md +39 -14
- package/docs/components/date-field.md +39 -0
- package/docs/components/date-presets.md +32 -0
- package/docs/components/description-list.md +34 -0
- package/docs/components/dirty-form-guard.md +28 -24
- package/docs/components/donut-chart.md +38 -0
- package/docs/components/drawer.md +38 -0
- package/docs/components/empty-state.md +28 -0
- package/docs/components/error-boundary.md +31 -0
- package/docs/components/error-message.md +29 -8
- package/docs/components/field-shell.md +47 -0
- package/docs/components/file-dropzone.md +45 -17
- package/docs/components/filter-pannel.md +40 -15
- package/docs/components/forgot-password-form.md +36 -0
- package/docs/components/form-actions-bar.md +47 -17
- package/docs/components/form-field-render.md +43 -15
- package/docs/components/form-section.md +26 -10
- package/docs/components/form-wizard.md +47 -0
- package/docs/components/hidden-field.md +27 -14
- package/docs/components/index-column.md +31 -8
- package/docs/components/line-chart.md +39 -0
- package/docs/components/loading.md +23 -12
- package/docs/components/login-form.md +47 -0
- package/docs/components/mantis-data-table.md +61 -0
- package/docs/components/map-picker-client.md +35 -14
- package/docs/components/map-picker-osm.md +33 -13
- package/docs/components/map-picker.md +34 -16
- package/docs/components/mask-field.md +31 -0
- package/docs/components/menu-button.md +28 -17
- package/docs/components/modal.md +45 -0
- package/docs/components/multi-select-filter.md +31 -15
- package/docs/components/number-field.md +40 -0
- package/docs/components/otp-input.md +31 -0
- package/docs/components/page-tabs.md +35 -0
- package/docs/components/page-title.md +15 -8
- package/docs/components/paginated-table.md +42 -26
- package/docs/components/pagination.md +28 -18
- package/docs/components/password-input.md +31 -0
- package/docs/components/phone-input.md +28 -0
- package/docs/components/radio-group.md +50 -0
- package/docs/components/range-slider.md +32 -0
- package/docs/components/rating-input.md +30 -0
- package/docs/components/render-field.md +41 -18
- package/docs/components/reset-password-form.md +37 -0
- package/docs/components/rich-text-preview.md +26 -13
- package/docs/components/search-input.md +30 -0
- package/docs/components/select-field.md +55 -0
- package/docs/components/stat-card.md +30 -0
- package/docs/components/status-badge.md +25 -9
- package/docs/components/switch-field.md +32 -0
- package/docs/components/table-filter-field.md +30 -16
- package/docs/components/table-skeleton.md +22 -0
- package/docs/components/table-toolbar.md +28 -14
- package/docs/components/tag.md +27 -0
- package/docs/components/tags-input.md +32 -0
- package/docs/components/text-area.md +25 -15
- package/docs/components/text-field.md +32 -0
- package/docs/components/timeline.md +31 -0
- package/docs/components/toggle-inline-button.md +48 -17
- package/docs/components/upload-files-preview.md +39 -20
- package/docs/components/use-field-controller.md +58 -0
- package/docs/components/user-menu.md +39 -0
- package/docs/contracts/STORYBOOK_IMPLEMENTATION_AND_VOBO.md +92 -0
- package/docs/contracts/STORYBOOK_VOBO_LEDGER.md +195 -0
- package/docs/contracts/component-doc-schema.md +120 -0
- package/docs/contracts/dependency-map.md +76 -39
- package/docs/contracts/field-controller.md +138 -0
- package/docs/contracts/style-imports.md +21 -14
- package/llms.txt +104 -0
- package/package.json +39 -10
- package/PRIMEREACT_MAPPING.md +0 -6
- package/dist/components/Forms/AsyncSelect.d.ts +0 -20
- package/dist/components/Forms/AsyncSelect.d.ts.map +0 -1
- package/dist/components/Forms/AsyncSelect.js +0 -77
- package/dist/components/Forms/AsyncSelect.js.map +0 -1
- package/dist/components/Forms/Combobox.d.ts +0 -10
- package/dist/components/Forms/Combobox.d.ts.map +0 -1
- package/dist/components/Forms/Combobox.js +0 -11
- package/dist/components/Forms/Combobox.js.map +0 -1
- package/dist/components/Forms/CurrencyInput.d.ts +0 -12
- package/dist/components/Forms/CurrencyInput.d.ts.map +0 -1
- package/dist/components/Forms/CurrencyInput.js +0 -9
- package/dist/components/Forms/CurrencyInput.js.map +0 -1
- package/dist/components/Forms/DateInput.d.ts +0 -10
- package/dist/components/Forms/DateInput.d.ts.map +0 -1
- package/dist/components/Forms/DateInput.js +0 -11
- package/dist/components/Forms/DateInput.js.map +0 -1
- package/dist/components/Forms/DateRangeInput.d.ts +0 -10
- package/dist/components/Forms/DateRangeInput.d.ts.map +0 -1
- package/dist/components/Forms/DateRangeInput.js +0 -13
- package/dist/components/Forms/DateRangeInput.js.map +0 -1
- package/dist/components/Forms/DropDown.d.ts +0 -10
- package/dist/components/Forms/DropDown.d.ts.map +0 -1
- package/dist/components/Forms/DropDown.js +0 -11
- package/dist/components/Forms/DropDown.js.map +0 -1
- package/dist/components/Forms/MultiSelect.d.ts +0 -10
- package/dist/components/Forms/MultiSelect.d.ts.map +0 -1
- package/dist/components/Forms/MultiSelect.js +0 -13
- package/dist/components/Forms/MultiSelect.js.map +0 -1
- package/dist/components/Forms/NumberInput.d.ts +0 -10
- package/dist/components/Forms/NumberInput.d.ts.map +0 -1
- package/dist/components/Forms/NumberInput.js +0 -16
- package/dist/components/Forms/NumberInput.js.map +0 -1
- package/dist/components/Forms/Select.d.ts +0 -15
- package/dist/components/Forms/Select.d.ts.map +0 -1
- package/dist/components/Forms/Select.js +0 -48
- package/dist/components/Forms/Select.js.map +0 -1
- package/dist/components/Forms/Switch.d.ts +0 -18
- package/dist/components/Forms/Switch.d.ts.map +0 -1
- package/dist/components/Forms/Switch.js +0 -30
- package/dist/components/Forms/Switch.js.map +0 -1
- package/dist/components/Forms/TextInput.d.ts +0 -11
- package/dist/components/Forms/TextInput.d.ts.map +0 -1
- package/dist/components/Forms/TextInput.js +0 -12
- package/dist/components/Forms/TextInput.js.map +0 -1
- package/dist/components/Forms/TimePicker.d.ts +0 -13
- package/dist/components/Forms/TimePicker.d.ts.map +0 -1
- package/dist/components/Forms/TimePicker.js +0 -19
- package/dist/components/Forms/TimePicker.js.map +0 -1
- package/dist/components/Forms/Toggle.d.ts +0 -14
- package/dist/components/Forms/Toggle.d.ts.map +0 -1
- package/dist/components/Forms/Toggle.js +0 -10
- package/dist/components/Forms/Toggle.js.map +0 -1
- package/dist/components/Forms/types.d.ts +0 -9
- package/dist/components/Forms/types.d.ts.map +0 -1
- package/dist/components/Forms/types.js +0 -2
- package/dist/components/Forms/types.js.map +0 -1
- package/docs/components/async-select.md +0 -26
- package/docs/components/date-input.md +0 -22
- package/docs/components/drop-down.md +0 -28
- package/docs/components/multi-select.md +0 -23
- package/docs/components/number-input.md +0 -20
- package/docs/components/select.md +0 -28
- package/docs/components/switch.md +0 -27
- package/docs/components/text-input.md +0 -23
- package/docs/components/time-picker.md +0 -22
- package/docs/components/toggle.md +0 -21
- package/docs/contracts/controller-props.md +0 -28
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
# Storybook VoBo Ledger — PR11 Forms stage
|
|
2
|
+
|
|
3
|
+
Sign-off tracker. A component is **done** only when every column is ✅ and the supervisor has signed.
|
|
4
|
+
Legend: ✅ pass · ⬜ pending · ❌ failing/blocked · N/A not applicable.
|
|
5
|
+
Columns map to `STORYBOOK_IMPLEMENTATION_AND_VOBO.md` Rule Set 2 (typing / lint / rules = Rule Set 1 / tests / visual / supervisor).
|
|
6
|
+
|
|
7
|
+
## Batch S — Contract segregation
|
|
8
|
+
|
|
9
|
+
| Item | typing | lint | rules | tests | visual | supervisor |
|
|
10
|
+
| --- | :--: | :--: | :--: | :--: | :--: | :--: |
|
|
11
|
+
| ChoiceFieldControllerProps | ✅ | ⬜ | ✅ | ✅ | N/A | ⬜ |
|
|
12
|
+
| FieldShell `top` mode (hard-cap = type+default, not runtime) | ✅ | ⬜ | ✅ | ✅ | ⬜ (via B2 stories) | ⬜ |
|
|
13
|
+
| field-typing.test-d (B1/B2 reject float/ifta labelMode) | ✅ | ⬜ | ✅ | ✅ | N/A | ⬜ |
|
|
14
|
+
|
|
15
|
+
## Bucket A — text-box ✅ supervisor VoBo 2026-07-05
|
|
16
|
+
|
|
17
|
+
Story taxonomy + WithAddons (InputGroup.Addon) done; 4 render defects fixed root-cause vs official PR11 docs
|
|
18
|
+
(NumberField addons `InputNumber.Root as={Fragment}`; PasswordInput expose size/variant; SearchInput `fluid`).
|
|
19
|
+
lint column: repo-wide `react-hooks/refs` debt pre-exists on unchanged lines — no NEW lint introduced (†).
|
|
20
|
+
|
|
21
|
+
| Component | typing | lint | rules | tests | visual | supervisor |
|
|
22
|
+
| --- | :--: | :--: | :--: | :--: | :--: | :--: |
|
|
23
|
+
| TextField | ✅ | † | ✅ | ✅ | ✅ | ✅ |
|
|
24
|
+
| TextArea | ✅ | † | ✅ | N/A | ✅ | ✅ |
|
|
25
|
+
| NumberField | ✅ | † | ✅ | N/A | ✅ | ✅ |
|
|
26
|
+
| PasswordInput | ✅ | † | ✅ | ✅ | ✅ | ✅ |
|
|
27
|
+
| SearchInput | ✅ | † | ✅ | N/A | ✅ | ✅ |
|
|
28
|
+
| MaskField | ✅ | † | ✅ | ✅ | ✅ | ✅ |
|
|
29
|
+
| PhoneInput | ✅ | † | ✅ | ✅ | ✅ | ✅ |
|
|
30
|
+
| SelectField | ✅ | † | ✅ | N/A | ✅‡ | ✅ |
|
|
31
|
+
| AutoCompleteField | ✅ | † | ✅ | N/A | ✅‡ | ✅ |
|
|
32
|
+
| DateField | ✅ | † | ✅ | ✅ | ✅‡ | ✅ |
|
|
33
|
+
| TagsInput | ✅ | † | ✅ | ✅ | ✅‡ | ✅ |
|
|
34
|
+
|
|
35
|
+
‡ Visual self-verified via Playwright + preview server (DOM measurement + screenshots) after fixing: placeholder overlap, multiselect filter/checkmark, creatable-in-portal, Today/Clear button bar, themed chips, **TagsInput nested focus ring** (the `.p-inputtags` container owns the field border/focus ring — the entry `InputText` was rendering a SECOND border+focus box-shadow/outline; made it chrome-less via inline `border/background/box-shadow/outline:0`, matching PR11's own `.p-inputtags .p-autocomplete-input` rule), and the **fluid axis** (see below). Awaiting final supervisor sign-off.
|
|
36
|
+
|
|
37
|
+
**FLUID AXIS — root-caused + fixed (verified by DOM width measurement, fluid on↔off via the SB globals channel).**
|
|
38
|
+
Root cause: in PrimeReact 11.0.0-rc.1 the `<Fluid>` **context does NOT propagate** to composed inputs inside `FieldShell`
|
|
39
|
+
(`.p-fluid` wrapper renders full-width but the inner `.p-inputtext` stayed inline-block ~181px — no `p-inputtext-fluid`).
|
|
40
|
+
So NO plain field was actually full-width under `config.fluid`; the earlier overlay `w-full` hacks only masked it on Select/Date/AutoComplete.
|
|
41
|
+
Fix (PR11-idiomatic): every PR11 field primitive reads `props.fluid ?? context.$fluid` and applies its `p-<name>-fluid` width:100% class,
|
|
42
|
+
so `useFieldController` now resolves `fluid = props.fluid ?? config.fluid` and each bucket-A field passes `fluid={f.fluid}` to its primitive.
|
|
43
|
+
Verified widths in the 480px story frame (fluid ON → ~416, OFF → intrinsic): TextField 416↔181, TextArea 416↔166, NumberField 416↔181,
|
|
44
|
+
SelectField 416↔62, AutoCompleteField 416↔181, DateField 416↔205 (root **and** inner input — the input sits in `IconField` where the
|
|
45
|
+
`fluid` prop resolves to ~46px, so it keeps `w-full` to fill the fluid-driven root), MaskField/PhoneInput 416↔181.
|
|
46
|
+
Intentionally **always full-width** (their root is a block-level container that fills the parent regardless of the prop — auto-mode would
|
|
47
|
+
leave a mismatched input, and full is the sensible default): SearchInput (`IconField`), PasswordInput (`IconField` in toggle mode), TagsInput (`InputTags`).
|
|
48
|
+
|
|
49
|
+
† Pre-existing repo lint debt (`react-hooks/refs` flags `{...f.aria}`/`f.disabled` spreads across ALL fields, on lines untouched by this work). Tracked as a separate cleanup, not a blocker for this stage.
|
|
50
|
+
| SelectField | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ |
|
|
51
|
+
| AutoCompleteField | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ |
|
|
52
|
+
| DateField | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ |
|
|
53
|
+
| TagsInput | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ | ⬜ |
|
|
54
|
+
|
|
55
|
+
## Bucket B1 — toggle inline
|
|
56
|
+
|
|
57
|
+
Stories done (Default/HelpText/Required/Disabled/LabelBeside/LabelNone; Toggle adds Multiple/WithRenderOption).
|
|
58
|
+
Visual self-verified via Playwright DOM+interaction (screenshots were flaky): themed controls, label beside,
|
|
59
|
+
click→checked/on/pressed all render (incl. ToggleButton rc-context workaround). No defects. lint = repo debt (†).
|
|
60
|
+
|
|
61
|
+
| Component | typing | lint | rules | tests | visual | supervisor |
|
|
62
|
+
| --- | :--: | :--: | :--: | :--: | :--: | :--: |
|
|
63
|
+
| CheckboxField | ✅ | † | ✅ | N/A | ✅‡ | ✅ |
|
|
64
|
+
| SwitchField | ✅ | † | ✅ | N/A | ✅‡ | ✅ |
|
|
65
|
+
| ToggleInlineButton | ✅ | † | ✅ | N/A | ✅‡ | ✅ |
|
|
66
|
+
|
|
67
|
+
## Bucket B2 — group/range
|
|
68
|
+
|
|
69
|
+
Stories done (Default/HelpText/Required/Disabled/LabelTop/LabelNone + control-specific). Visual self-verified via
|
|
70
|
+
Playwright (label on top, themed controls). Fix: RangeSlider range mode rendered ONE handle → now two indexed
|
|
71
|
+
handles (official Slider Range example). lint = repo debt (†). Awaiting final supervisor sign-off.
|
|
72
|
+
|
|
73
|
+
| Component | typing | lint | rules | tests | visual | supervisor |
|
|
74
|
+
| --- | :--: | :--: | :--: | :--: | :--: | :--: |
|
|
75
|
+
| RadioGroup | ✅ | † | ✅ | ✅ | ✅‡ | ✅ |
|
|
76
|
+
| RangeSlider | ✅ | † | ✅ | ✅ | ✅‡ (fixed range handles) | ✅ |
|
|
77
|
+
| RatingInput | ✅ | † | ✅ | ✅ | ✅‡ | ✅ |
|
|
78
|
+
| OtpInput | ✅ | † | ✅ | ✅ | ✅‡ | ✅ |
|
|
79
|
+
| ColorPickerInput | ✅ | † | ✅ | N/A | ✅‡ | ✅ |
|
|
80
|
+
|
|
81
|
+
## Bucket C — special
|
|
82
|
+
|
|
83
|
+
Stories written; typecheck + build green. Playwright pass: CKEditor + HiddenField OK; FileDropzone/UploadFilesPreview
|
|
84
|
+
have an open rendering issue (see notes). Batch-0 baseline improved: wired `@mantis-core/styles` SCSS (via sass) into
|
|
85
|
+
`.storybook/preview.tsx`, and CKEditorInput now self-imports `ckeditor5/ckeditor5.css`.
|
|
86
|
+
|
|
87
|
+
| Component | typing | lint | rules | tests | visual | supervisor |
|
|
88
|
+
| --- | :--: | :--: | :--: | :--: | :--: | :--: |
|
|
89
|
+
| CKEditorInput | ✅ | † | ✅ | ✅ | ✅‡ (self-imports ckeditor CSS + respects tokens) | ✅ |
|
|
90
|
+
| FileDropzone | ✅ | † | ✅ | N/A | ✅‡ (respects tokens — dashed border/surface/icon) | ✅ |
|
|
91
|
+
| UploadFilesPreview | ✅ | † | ✅ | N/A | ✅‡ (respects tokens — dropzone + cover-badge tiles) | ✅ |
|
|
92
|
+
| HiddenField | ✅ | † | ✅ | N/A | N/A (invisible, wiring verified) | ✅‡ |
|
|
93
|
+
|
|
94
|
+
RESOLVED — theme unification + dark mode for the 3 Mantis-token consumers (CKEditor / FileDropzone / UploadFilesPreview):
|
|
95
|
+
these are the ONLY Forms components that paint from the Mantis `--*` token layer (via `@mantis-core/styles` SCSS); every
|
|
96
|
+
other field renders through PrimeReact primitives (`--p-*`) and already followed the toolbar + dark. Two defects, both fixed:
|
|
97
|
+
|
|
98
|
+
1. **Tokens were static** — `tokens.template.scss` is a fixed brand palette (green, no working dark: its `.dark` block
|
|
99
|
+
keyed off `.dark` while the app toggles `.p-dark`). So the 3 never followed the toolbar primary/surface/dark. Fix:
|
|
100
|
+
`MantisStorybookProvider` now derives the Mantis tokens (`--background/--foreground/--card/--primary/--accent/--muted/
|
|
101
|
+
--border/--input/--ring`) from the SAME `primary`/`surface`/`dark` globals that drive the PR11 preset, set inline on
|
|
102
|
+
`<html>` per active light/dark. `--accent` tracks the primary hue (one step off) so idle/hover two-tone survives.
|
|
103
|
+
|
|
104
|
+
2. **SCSS anchored fills to literal `white`** — `color-mix(var(--primary), white 96%)` forced near-white surfaces
|
|
105
|
+
regardless of theme (dark impossible). Fix: `white` → `var(--card)` in `file-dropzone.scss`, `ckeditor.scss`
|
|
106
|
+
(blockquote), and `UploadFilesPreview.tsx` inline styles — zero light change (`--card`=white in light), correct in dark.
|
|
107
|
+
Plus a `--ck-*` chrome bridge in `ckeditor.scss` so the CKEditor toolbar/buttons/dropdowns follow the theme (else dark
|
|
108
|
+
icons on dark surface). Verified via Playwright in light+emerald and dark+{rose,ocean}; `build-storybook` exit 0.
|
|
109
|
+
|
|
110
|
+
## Form utilities
|
|
111
|
+
|
|
112
|
+
| Component | typing | lint | rules | tests | visual | supervisor |
|
|
113
|
+
| --- | :--: | :--: | :--: | :--: | :--: | :--: |
|
|
114
|
+
Baseline fix this batch: `next/navigation` `useRouter()` crashed all Button-based components in react-vite Storybook
|
|
115
|
+
("invariant expected app router to be mounted") → aliased to a no-op stub (`.storybook/next-navigation-mock.ts` +
|
|
116
|
+
`main.ts` resolve.alias). Self-verified via Playwright.
|
|
117
|
+
|
|
118
|
+
| FormActionsBar | ✅ | † | ✅ | N/A | ✅‡ (renders after useRouter stub; primary "Guardar" faintness RESOLVED — was missing token layer, `--primary` now resolves) | ⬜ |
|
|
119
|
+
| FormWizard | ✅ | † | ✅ | N/A | ✅‡ (stepper + fields + submit render) | ⬜ |
|
|
120
|
+
| DirtyFormGuard | ✅ | † | ✅ | ⚠️ needs `useDirtyFormGuard.test.ts` (missing; logic-only) | N/A (invisible) | ⬜ |
|
|
121
|
+
| ErrorMessage | ✅ | † | ✅ | ⚠️ small render test recommended | ✅‡ (shows on Submit) | ⬜ |
|
|
122
|
+
| RenderField / FormFieldRender | ✅ | † | ✅ | N/A | ✅‡ (renders fields from descriptor) | ⬜ |
|
|
123
|
+
|
|
124
|
+
## Buttons
|
|
125
|
+
|
|
126
|
+
Stories authored (co-located `Button.stories.tsx`, title `Buttons/Button`): Default, Variants (8), Outlined, Text,
|
|
127
|
+
Sizes, Rounded, WithIcon, IconOnly, Loading, Disabled, Block, Playground. Visual self-verified via Playwright (light+emerald,
|
|
128
|
+
dark+ocean).
|
|
129
|
+
|
|
130
|
+
**MIGRATED to PR11's native design system (removed the deprecated PR10 SCSS layer)** — supervisor decisions: use PR11
|
|
131
|
+
severity colors from the preset (delete `buttons.scss`), and drop the unused `accent`/`premium` variants.
|
|
132
|
+
- `packages/mantis-core-styles/scss/buttons.scss` **DELETED** (+ its `@use` in `index.scss`). It was the PR10-style layer:
|
|
133
|
+
per-variant `.p-button-<variant>` mixins coloring buttons from Mantis `--*` tokens, plus dead `.p-button-premium`/`accent`.
|
|
134
|
+
- `Button.tsx`: `ButtonVariant` drops `accent` (8 variants); `variant`→PR11 `severity` only (no more `p-button-<variant>` class).
|
|
135
|
+
ALL button colors now come from the PR11 preset. Consequences (intended): `secondary` is now PR11 neutral (was amber),
|
|
136
|
+
`gray`→`contrast` (near-black light / near-white dark), success/warn/danger/info use the Aura severity palettes. `primary`
|
|
137
|
+
follows the toolbar primary ramp. `accent`/`premium` unused repo-wide, so removing them is caller-safe (verified by grep).
|
|
138
|
+
- `Button.test.tsx` updated: assert only the PR11 severity class (`p-button-warn`/`p-button-danger`), not the removed wrapper class. 5/5 pass.
|
|
139
|
+
- **PrimeIcons font**: Button's `icon` string prop (`pi pi-*`) + loading spinner (`pi pi-spin`) need `primeicons/primeicons.css`,
|
|
140
|
+
imported nowhere → added to `.storybook/preview.tsx` + `primeicons` devDep. (Forms use `@primeicons/react` SVG, so it only surfaced here.)
|
|
141
|
+
The earlier "primary Guardar faint" (FormActionsBar) is RESOLVED — was the missing token layer; `--primary` now resolves.
|
|
142
|
+
|
|
143
|
+
**Global severity colors — now controllable via the PR11 preset (not SCSS).** PR11 severity components read from the
|
|
144
|
+
primitive palettes (`success`→`{green}`, `warn`→`{orange}`, `danger`→`{red}`, `info`→`{sky}`; `secondary`/`contrast`→`{surface}`,
|
|
145
|
+
already toolbar-driven). `buildPreset(preset, primary, surface, severities?)` now takes optional per-severity ramps and injects
|
|
146
|
+
`primitive: { green, orange, red, sky }` — recoloring ALL severity components globally (buttons/tags/badges/messages), not just
|
|
147
|
+
buttons. Wired into `MantisThemeConfig.severities` (real `MantisThemeProvider`) + 4 Storybook toolbar dropdowns (Success/Warn/
|
|
148
|
+
Danger/Info), reusing the `PRIMARY_RAMPS` pool. Default (unset) = Aura defaults, byte-identical (no `primitive` block emitted).
|
|
149
|
+
Verified via Playwright: default success=green#22c55e/danger=red#ef4444/warn=orange#f97316/info=sky#0ea5e9; overriding sevSuccess→rose
|
|
150
|
+
recolors the success button to rose (and any severity component) live. next-core + ui typecheck, theme tests 13/13, build green.
|
|
151
|
+
|
|
152
|
+
| Component | typing | lint | rules | tests | visual | supervisor |
|
|
153
|
+
| --- | :--: | :--: | :--: | :--: | :--: | :--: |
|
|
154
|
+
| Button | ✅ | † | ✅ | ✅ (Button.test.tsx 5/5) | ✅‡ (8 variants PR11-native severities, light+dark, follow toolbar primary; icons+spinner render) | ⬜ |
|
|
155
|
+
|
|
156
|
+
## Toast (PR11 migration)
|
|
157
|
+
|
|
158
|
+
Migrated `@mantis-core/next-core/toasts` off `react-hot-toast` to PR11's NATIVE toaster (Zag-based singleton `toast` from
|
|
159
|
+
`@primereact/ui/toaster` + `Toast`/`Toaster` compound). `useMantisToasts` API PRESERVED (add{Success,Error,Info,Warning,Loading}Toast,
|
|
160
|
+
promiseToast, jsxToast, dismiss, remove) — now built on `toast.{success,info,warn,error}`/`.promise`/`.dismiss`. Deleted
|
|
161
|
+
`mantis-toast-theme.ts`(+ test) — styling is now native (severity colors from the preset, follow the toolbar). New `MantisToaster`
|
|
162
|
+
host (promoted from the demo's app-toaster pattern) mounted by `MantisCoreBaseProvider` (replaces the react-hot-toast `<Toaster>`;
|
|
163
|
+
`toasterProps` removed). `react-hot-toast` dep removed; `@primereact/ui` added to next-core peers. API deltas (intended): `opts` type
|
|
164
|
+
is now `MantisToastOptions` (Pick of ToastType) not react-hot-toast's; `addLoadingToast` uses `loading:true` + duration Infinity;
|
|
165
|
+
`remove`≡`dismiss`; `jsxToast` callback no longer gets a live toast handle (use the returned id + `dismiss`). CRUD hooks unaffected
|
|
166
|
+
(they mock `../toasts`; crud-hooks.test 6/6). Story `Feedback/Toast` (mounts MantisToaster + buttons per severity + promise + dismiss-all).
|
|
167
|
+
Visual self-verified via playwright-cli: toasts fire, animate in to opacity 1, render severity-themed (success green "Guardado correctamente",
|
|
168
|
+
etc.), auto-dismiss ~5s, loading persists; Zag collapses the stack by default (front shown, hover-expands) — native PR11 behavior.
|
|
169
|
+
typecheck (next-core + ui), build-storybook exit 0.
|
|
170
|
+
|
|
171
|
+
| Item | typing | lint | rules | tests | visual | supervisor |
|
|
172
|
+
| --- | :--: | :--: | :--: | :--: | :--: | :--: |
|
|
173
|
+
| useMantisToasts (PR11, API preserved) | ✅ | † | ✅ | ✅ (crud-hooks 6/6, mocked) | ✅‡ (fires + severity-themed + auto-dismiss + loading persists) | ⬜ |
|
|
174
|
+
| MantisToaster host | ✅ | † | ✅ | N/A | ✅‡ (renders toasts top-right, Zag stack) | ⬜ |
|
|
175
|
+
|
|
176
|
+
## Hook
|
|
177
|
+
|
|
178
|
+
Headless `useDataTableQuery` in `@mantis-core/nuqs` (`src/use-data-table-query.ts`): pagination + sorting + filtering in one
|
|
179
|
+
state object, with OPT-IN URL sync via nuqs. Two backends selected by the (construction-time constant) `urlSync`: `useState`
|
|
180
|
+
(headless, no routing) or nuqs `useQueryStates` (deep-link + back/forward) — identical `DataTableQuery<F>` return in both.
|
|
181
|
+
Filter kinds map to parsers: text→`parseAsString`, enum→`createParseAsEnumArray`, stringArray→`parseAsStringArray`, json→`parseAsSuperJson`.
|
|
182
|
+
`setPageSize`/`setFilter`/`setFilters`/`clearFilter`/`resetFilters` reset page to 0; `toggleSort` cycles asc→desc→cleared; `multiSort`
|
|
183
|
+
keeps an array; `queryParams` is the backend-ready `{page,pageSize,sort,filters}`. Root-cause fix along the way: `parseAsSuperJson`
|
|
184
|
+
had an unannotated `createParser` generic that inferred to `null`, making `.withDefault()` uncallable for every caller → annotated
|
|
185
|
+
`createParser<unknown>`. Story `Hooks/useDataTableQuery` — a rich, themed "Directorio de cuentas" admin demo built from the **Mantis
|
|
186
|
+
Forms wrappers** (TextField/SelectField×2 multiple/TagsInput/RangeSlider/DateField/SwitchField in a RHF form bridged one-way to the
|
|
187
|
+
hook via useWatch→setFilters, with a useRef dedupe so unrelated re-renders don't reset page) + a themed sortable table (Tag status
|
|
188
|
+
badges) + Prev/Next + rows-per-page, wired to **REAL nuqs URL sync** via `NuqsAdapter` (`nuqs/adapters/react`, `keyPrefix:"dt"`) and a
|
|
189
|
+
live "URL / queryParams" panel. Verified via playwright-cli in light+emerald AND dark+ocean: typing search → `?dtq=…` + table narrows;
|
|
190
|
+
paginate → `dtpage` (1-based via parseAsIndex) persists (no bridge-reset); sort → `dtsort={json…}`; switch → `dtactiveOnly={json:true}`
|
|
191
|
+
+ page resets; Limpiar → URL clean. All complex state (arrays/dates/ranges/booleans/sort) round-trips through the URL.
|
|
192
|
+
|
|
193
|
+
| Item | typing | lint | rules | tests | visual | supervisor |
|
|
194
|
+
| --- | :--: | :--: | :--: | :--: | :--: | :--: |
|
|
195
|
+
| useDataTableQuery | ✅ | † | ✅ | ✅ (17/17: local + URL round-trip per filter kind) | ✅‡ (live: paginate 01-05→06-10, search resets page, enum filter, reset — all correct) | ⬜ |
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# Component Doc Schema
|
|
2
|
+
|
|
3
|
+
Single source of truth for each component in `@mantis-core/ui`. One file per component at
|
|
4
|
+
`docs/components/<kebab-name>.md`. The file has **YAML frontmatter** (machine data) plus a short
|
|
5
|
+
prose body (`## Example`, optional `## Notes`).
|
|
6
|
+
|
|
7
|
+
`catalog.json`, `COMPONENTS.md`, `llms.txt`, `docs/contracts/dependency-map.md`, and
|
|
8
|
+
`docs/contracts/style-imports.md` are **generated** from these files by `pnpm gen:catalog` — never
|
|
9
|
+
edit them by hand. To document a component, edit its `.md` here and re-run the generator.
|
|
10
|
+
|
|
11
|
+
## File shape
|
|
12
|
+
|
|
13
|
+
```md
|
|
14
|
+
---
|
|
15
|
+
name: TextField
|
|
16
|
+
category: forms
|
|
17
|
+
import: '@mantis-core/ui/components/Forms/TextField'
|
|
18
|
+
whenToUse: Single-line text field wired to react-hook-form.
|
|
19
|
+
baseLibrary: '@primereact/ui/inputtext'
|
|
20
|
+
formContract: FieldControllerProps
|
|
21
|
+
requiredStyles: ['scss/inputs.scss']
|
|
22
|
+
relatedComponents: ['SelectField', 'FieldShell']
|
|
23
|
+
relatedNextCore: []
|
|
24
|
+
props:
|
|
25
|
+
- { name: placeholder, type: string, required: false, description: 'Native <input> passthrough beyond FieldControllerProps.' }
|
|
26
|
+
- { name: maxLength, type: number, required: false, description: 'Native <input> passthrough beyond FieldControllerProps.' }
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## Example
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
import { TextField } from '@mantis-core/ui/components/Forms/TextField';
|
|
33
|
+
import { useForm } from 'react-hook-form';
|
|
34
|
+
|
|
35
|
+
function Example() {
|
|
36
|
+
const { control } = useForm({ defaultValues: { title: '' } });
|
|
37
|
+
return <TextField name='title' control={control} label='Title' />;
|
|
38
|
+
}
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Notes
|
|
42
|
+
|
|
43
|
+
- Optional prose. Gotchas, variants, edge cases. Keep terse — LLM-optimized, no over-info.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Frontmatter fields
|
|
47
|
+
|
|
48
|
+
| Field | Type | Required | Notes |
|
|
49
|
+
|---|---|---|---|
|
|
50
|
+
| `name` | string | ✅ | Component identifier, PascalCase. Matches the export. |
|
|
51
|
+
| `category` | string | ✅ | One of: `forms`, `tables`, `pages`, `maps`, `overlays`, `navigation`, `data`, `feedback`, `auth`, `buttons`, `charts`. Groups `catalog.json`. |
|
|
52
|
+
| `import` | string | ✅¹ | **Deep path**, verbatim into `catalog.json.import`. Form `@mantis-core/ui/components/<Area>/<Name>`. Exceptions exist (`.../components/table-toolbar`, `.../components/table-filter-field`) — store the real path, do not derive it. ¹Omit **only** for overview/guide docs (e.g. `admin-page-layout.md`): an `import`-less file ships but is excluded from `catalog.json` and `llms.txt`. |
|
|
53
|
+
| `whenToUse` | string | ✅ | One line. Drives `catalog.json.whenToUse` + the `llms.txt` index. |
|
|
54
|
+
| `baseLibrary` | string | ➖ | Underlying lib. One of: `@primereact/ui/<part>` (e.g. `@primereact/ui/select`, `@primereact/ui/inputtext`, `@primereact/ui/datatable`), `chart.js`, `leaflet`, `ckeditor`, or `custom` for components with no third-party base. Drives `dependency-map.md`. |
|
|
55
|
+
| `formContract` | string | ➖ | Shared contract the component follows. RHF-bound field wrappers use `FieldControllerProps` (see [`field-controller.md`](./field-controller.md)); non-text-box fields (toggles, groups, ranges) use `ChoiceFieldControllerProps`. Omit if the component isn't RHF-bound. |
|
|
56
|
+
| `requiredStyles` | string[] | ➖ | SCSS partials from `@mantis-core/styles`, e.g. `['scss/inputs.scss']`. Drives `style-imports.md`. Empty/omit when the component uses only utility classes or inline styles. |
|
|
57
|
+
| `relatedComponents` | string[] | ➖ | Sibling component `name`s. Cross-reference for LLMs. |
|
|
58
|
+
| `relatedNextCore` | string[] | ➖ | Hooks/utils from `@mantis-core/next-core` it pairs with, e.g. `['useList']`. Empty for stateless components. |
|
|
59
|
+
| `props` | object[] | ✅ | Each: `{ name, type, required, default?, description? }`. `name`/`type` strings, `required` boolean, `default`/`description` optional strings. Maps 1:1 to `catalog.json.props[]`. For a wrapper extending `FieldControllerProps`/`ChoiceFieldControllerProps`, list only the props it adds or overrides beyond the shared contract (link the contract via `formContract` instead of repeating `name`/`control`/`rules`/… on every wrapper). Empty array `[]` for components with no documented props (factories, etc.). |
|
|
60
|
+
|
|
61
|
+
## `formContract`: the flattened API (PR11)
|
|
62
|
+
|
|
63
|
+
Form wrappers no longer take a `controller={{ ... }}` object prop. They extend
|
|
64
|
+
`FieldControllerProps` (or `ChoiceFieldControllerProps` for non-text-box fields) directly as their
|
|
65
|
+
own props, alongside their component-specific props:
|
|
66
|
+
|
|
67
|
+
```tsx
|
|
68
|
+
// PR11 — flattened, no `controller` object
|
|
69
|
+
<TextField name='email' control={control} label='Email' rules={{ required: true }} />
|
|
70
|
+
|
|
71
|
+
// NOT this (PR10 shape, removed)
|
|
72
|
+
<TextInput controller={{ name: 'email', control }} label='Email' />
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
See [`field-controller.md`](./field-controller.md) for the full prop list, `FieldShell` label
|
|
76
|
+
modes, and the recipe for building a new wrapper.
|
|
77
|
+
|
|
78
|
+
## Body
|
|
79
|
+
|
|
80
|
+
- `## Example` — **enforced**: if the `## Example` heading is present it MUST contain exactly one fenced
|
|
81
|
+
```tsx block (closing fence on its own line) — the generator throws otherwise. The code inside is
|
|
82
|
+
extracted verbatim into `catalog.json.example`. Use the heading `## Example` (singular); `##
|
|
83
|
+
Examples` is not recognized. Avoid an inline ``` inside the snippet.
|
|
84
|
+
- **Self-contained and compilable**: the `## Example` snippet MUST include its own `import`
|
|
85
|
+
statements — importing the component from the exact deep path declared in frontmatter `import`,
|
|
86
|
+
plus any other modules it uses (`react-hook-form`, other Mantis Core components, etc.) — and MUST
|
|
87
|
+
define a `function Example() { ... }` component that renders the snippet's JSX. A CI check
|
|
88
|
+
compiles every doc's `## Example` block in isolation (no ambient imports, no shared scope across
|
|
89
|
+
docs), so a snippet missing an import or referencing an undefined variable fails the build. Only
|
|
90
|
+
this `## Example` fence is compiled by `check-doc-examples`; other ```tsx fences elsewhere in a
|
|
91
|
+
doc are illustrative and not type-checked. Keep it copy-pasteable and minimal — one realistic
|
|
92
|
+
usage, not a feature tour.
|
|
93
|
+
- `## Notes` — optional prose. Not consumed by the generator beyond shipping in the `.md`.
|
|
94
|
+
|
|
95
|
+
## Multi-package docs
|
|
96
|
+
|
|
97
|
+
The same frontmatter-driven approach extends beyond `@mantis-core/ui` to `@mantis-core/next-core`,
|
|
98
|
+
`@mantis-core/nuqs`, and `@mantis-core/styles`. Each package's `docs/*.md` files use the same
|
|
99
|
+
minimal frontmatter subset — `name`, `import`, `whenToUse`, `props` — with `category` taking
|
|
100
|
+
per-package values (e.g. `providers`, `theme`, `toasts` for `next-core`; `hooks`, `parsers` for
|
|
101
|
+
`nuqs`; `styles` for `styles`). A generator produces a per-package `llms.txt` from these files, the
|
|
102
|
+
same way `pnpm gen:catalog` does for `@mantis-core/ui`. This section is a pointer only — the
|
|
103
|
+
frontmatter contract and `## Example` rules above apply as-is; generator specifics live with that
|
|
104
|
+
package's own generator script, not here.
|
|
105
|
+
|
|
106
|
+
## Generated outputs (do not hand-edit)
|
|
107
|
+
|
|
108
|
+
| Output | Built from |
|
|
109
|
+
|---|---|
|
|
110
|
+
| `catalog.json` | All frontmatter, grouped by `category`. Shape: `{ name, import, whenToUse, props, example, category }`. |
|
|
111
|
+
| `COMPONENTS.md` | Index linking every `docs/components/*.md`. |
|
|
112
|
+
| `llms.txt` | LLM entry-point: `name · whenToUse · import · link`, grouped by category. |
|
|
113
|
+
| `docs/contracts/dependency-map.md` | `name → baseLibrary`, sectioned PrimeReact / non-PrimeReact / custom. |
|
|
114
|
+
| `docs/contracts/style-imports.md` | `name → requiredStyles`, plus the consolidated `@use` block. |
|
|
115
|
+
|
|
116
|
+
## Hand-maintained (not generated)
|
|
117
|
+
|
|
118
|
+
- `docs/contracts/field-controller.md` — shared RHF contract, not derivable from one component.
|
|
119
|
+
- `docs/README.md`, `README.md` — narrative docs.
|
|
120
|
+
- Each component's `## Notes` prose.
|
|
@@ -1,57 +1,94 @@
|
|
|
1
|
+
<!-- GENERATED by `pnpm gen:catalog` — do not edit. Source: docs/components/*.md -->
|
|
2
|
+
|
|
1
3
|
# Underlying Library Map
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
Which base library each component wraps.
|
|
4
6
|
|
|
5
7
|
## PrimeReact wrappers
|
|
6
8
|
|
|
7
|
-
- `
|
|
8
|
-
- `
|
|
9
|
-
- `
|
|
10
|
-
- `
|
|
11
|
-
- `
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
14
|
-
- `
|
|
15
|
-
- `
|
|
16
|
-
- `
|
|
17
|
-
- `
|
|
18
|
-
- `IndexColumn`:
|
|
19
|
-
- `
|
|
20
|
-
- `
|
|
21
|
-
- `
|
|
22
|
-
- `
|
|
9
|
+
- `ActionColumn`: `@primereact/ui/menu`
|
|
10
|
+
- `AutoCompleteField`: `@primereact/ui/autocomplete`
|
|
11
|
+
- `Avatar`: `@primereact/ui/avatar`
|
|
12
|
+
- `Button`: `@primereact/ui/button`
|
|
13
|
+
- `CardSkeleton`: `@primereact/ui/skeleton`
|
|
14
|
+
- `CheckboxField`: `@primereact/ui/checkbox`
|
|
15
|
+
- `ColorPickerInput`: `@primereact/ui/inputcolor`
|
|
16
|
+
- `DateField`: `@primereact/ui/datepicker`
|
|
17
|
+
- `DatePresets`: `@primereact/ui/button`
|
|
18
|
+
- `Drawer`: `@primereact/ui/drawer`
|
|
19
|
+
- `FormWizard`: `@primereact/ui/stepper`
|
|
20
|
+
- `IndexColumn`: `@primereact/ui/datatable`
|
|
21
|
+
- `Loading`: `@primereact/ui/progressspinner`
|
|
22
|
+
- `MantisDataTable`: `@primereact/ui/datatable`
|
|
23
|
+
- `MaskField`: `@primereact/ui/inputtext`
|
|
24
|
+
- `MenuButton`: `@primereact/ui/menu`
|
|
25
|
+
- `Modal`: `@primereact/ui/dialog`
|
|
26
|
+
- `MultiSelectFilter`: `@primereact/ui/select`
|
|
27
|
+
- `NumberField`: `@primereact/ui/inputnumber`
|
|
28
|
+
- `OtpInput`: `@primereact/ui/inputotp`
|
|
29
|
+
- `PageTabs`: `@primereact/ui/tabs`
|
|
30
|
+
- `PaginatedTable`: `@primereact/ui/datatable`
|
|
31
|
+
- `PasswordInput`: `@primereact/ui/inputpassword`
|
|
32
|
+
- `PhoneInput`: `@primereact/ui/inputtext`
|
|
33
|
+
- `RadioGroup`: `@primereact/ui/radiobutton`
|
|
34
|
+
- `RangeSlider`: `@primereact/ui/slider`
|
|
35
|
+
- `RatingInput`: `@primereact/ui/rating`
|
|
36
|
+
- `SearchInput`: `@primereact/ui/inputtext`
|
|
37
|
+
- `SelectField`: `@primereact/ui/select`
|
|
38
|
+
- `SwitchField`: `@primereact/ui/toggleswitch`
|
|
39
|
+
- `TableSkeleton`: `@primereact/ui/skeleton`
|
|
40
|
+
- `Tag`: `@primereact/ui/tag`
|
|
41
|
+
- `TagsInput`: `@primereact/ui/inputtags`
|
|
42
|
+
- `TextArea`: `@primereact/ui/textarea`
|
|
43
|
+
- `TextField`: `@primereact/ui/inputtext`
|
|
44
|
+
- `Timeline`: `@primereact/ui/timeline`
|
|
45
|
+
- `ToggleInlineButton`: `@primereact/ui/togglebutton`
|
|
46
|
+
- `UserMenu`: `@primereact/ui/menu`
|
|
23
47
|
|
|
24
48
|
## Non-PrimeReact wrappers
|
|
25
49
|
|
|
26
|
-
- `
|
|
27
|
-
- `
|
|
28
|
-
- `CKEditorInput`:
|
|
29
|
-
- `
|
|
30
|
-
- `
|
|
31
|
-
- `
|
|
32
|
-
- `MapPicker`: `
|
|
50
|
+
- `AdminPageLayout`: `React context + custom shell`
|
|
51
|
+
- `BarChart`: `chart.js`
|
|
52
|
+
- `CKEditorInput`: `ckeditor`
|
|
53
|
+
- `DonutChart`: `chart.js`
|
|
54
|
+
- `ErrorMessage`: `@hookform/error-message`
|
|
55
|
+
- `LineChart`: `chart.js`
|
|
56
|
+
- `MapPicker`: `leaflet`
|
|
57
|
+
- `MapPickerClient`: `leaflet`
|
|
58
|
+
- `MapPickerOSM`: `leaflet`
|
|
33
59
|
|
|
34
60
|
## Custom components
|
|
35
61
|
|
|
36
|
-
- `
|
|
62
|
+
- `AdminPageConfigurator`
|
|
63
|
+
- `AdminPageHeader`
|
|
64
|
+
- `AdminPageLayoutShell`
|
|
65
|
+
- `AppShell`
|
|
66
|
+
- `Breadcrumbs`
|
|
67
|
+
- `ChangePasswordForm`
|
|
68
|
+
- `CommandPalette`
|
|
69
|
+
- `ConfirmDialog`
|
|
70
|
+
- `DataState`
|
|
71
|
+
- `DescriptionList`
|
|
72
|
+
- `DirtyFormGuard`
|
|
73
|
+
- `EmptyState`
|
|
74
|
+
- `ErrorBoundary`
|
|
75
|
+
- `FieldShell`
|
|
37
76
|
- `FileDropzone`
|
|
38
|
-
- `
|
|
77
|
+
- `FilterPannel`
|
|
78
|
+
- `ForgotPasswordForm`
|
|
39
79
|
- `FormActionsBar`
|
|
40
80
|
- `FormFieldRender`
|
|
41
|
-
- `RenderField`
|
|
42
|
-
- `DirtyFormGuard`
|
|
43
|
-
- `useDirtyFormGuard`
|
|
44
|
-
- `TableToolbar`
|
|
45
|
-
- `TableFilterField`
|
|
46
|
-
- `PageTitle`
|
|
47
81
|
- `FormSection`
|
|
48
|
-
- `
|
|
49
|
-
- `
|
|
50
|
-
- `
|
|
51
|
-
- `AdminPageLayoutShell`
|
|
82
|
+
- `HiddenField`
|
|
83
|
+
- `LoginForm`
|
|
84
|
+
- `PageTitle`
|
|
52
85
|
- `Pagination`
|
|
53
|
-
- `
|
|
54
|
-
- `
|
|
86
|
+
- `RenderField`
|
|
87
|
+
- `ResetPasswordForm`
|
|
55
88
|
- `RichTextPreview`
|
|
89
|
+
- `StatCard`
|
|
56
90
|
- `StatusBadge`
|
|
57
|
-
- `
|
|
91
|
+
- `TableFilterField`
|
|
92
|
+
- `TableToolbar`
|
|
93
|
+
- `UploadFilesPreview`
|
|
94
|
+
- `useFieldController`
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Field Controller
|
|
2
|
+
|
|
3
|
+
Shared react-hook-form contract for every form wrapper in `@mantis-core/ui` (PR11). One hook —
|
|
4
|
+
`useFieldController` — wires RHF's `useController` and the field's presentation shell so each
|
|
5
|
+
wrapper only maps `field.value`/`field.onChange` into its own component's shape.
|
|
6
|
+
|
|
7
|
+
Source: `packages/mantis-core-ui/src/components/Forms/useFieldController.ts` and `FieldShell.tsx`.
|
|
8
|
+
|
|
9
|
+
## `FieldControllerProps`
|
|
10
|
+
|
|
11
|
+
Form wrappers extend this directly as their own props — there is **no** `controller={{ ... }}`
|
|
12
|
+
object prop. `TFieldValues`/`TName` are generic over the caller's form so `name` is
|
|
13
|
+
autocompleted/validated against real fields, and `defaultValue`/`rules` are typed by path.
|
|
14
|
+
|
|
15
|
+
```ts
|
|
16
|
+
interface FieldControllerProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> {
|
|
17
|
+
name: TName;
|
|
18
|
+
control?: Control<TFieldValues>;
|
|
19
|
+
rules?: Omit<RegisterOptions<TFieldValues, TName>, 'valueAsNumber' | 'valueAsDate' | 'setValueAs' | 'disabled'>;
|
|
20
|
+
defaultValue?: FieldPathValue<TFieldValues, TName>;
|
|
21
|
+
shouldUnregister?: boolean;
|
|
22
|
+
disabled?: boolean; // OR-ed with the form's isSubmitting state
|
|
23
|
+
label?: string;
|
|
24
|
+
labelMode?: LabelMode; // 'ifta' | 'float' | 'beside' | 'top' | 'none' — defaults to MantisThemeProvider (ifta)
|
|
25
|
+
floatVariant?: FloatVariant; // 'over' | 'in' | 'on' — only used when labelMode='float'
|
|
26
|
+
addonBefore?: ReactNode;
|
|
27
|
+
addonAfter?: ReactNode;
|
|
28
|
+
variant?: InputVariant; // 'outlined' | 'filled' — defaults to MantisThemeProvider
|
|
29
|
+
size?: FieldSize; // 'small' | 'large' — defaults to MantisThemeProvider
|
|
30
|
+
fluid?: boolean; // full-width override for this field
|
|
31
|
+
required?: boolean; // presentational only — validation is `rules`
|
|
32
|
+
helpText?: string;
|
|
33
|
+
id?: string; // override the generated id used to wire input <-> label <-> aria
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Usage — no `controller` wrapper, props are flat:
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
<TextField name='email' control={control} label='Email' rules={{ required: 'Required' }} />
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### `ChoiceFieldControllerProps` (bucket B: toggles, groups, ranges)
|
|
44
|
+
|
|
45
|
+
For non-text-box controls (checkboxes, radio groups, rating, range), text-box-only affordances are
|
|
46
|
+
removed **at the type level** so passing them fails to compile, not just render wrong:
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
type ChoiceFieldControllerProps<TFieldValues, TName> = Omit<
|
|
50
|
+
FieldControllerProps<TFieldValues, TName>,
|
|
51
|
+
'labelMode' | 'floatVariant' | 'addonBefore' | 'addonAfter' | 'variant'
|
|
52
|
+
> & {
|
|
53
|
+
labelMode?: 'beside' | 'top' | 'none'; // 'beside' default for toggles, 'top' for groups
|
|
54
|
+
};
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
A `<CheckboxField labelMode='float'>` or an addon on a `<RatingInput>` does not compile — `ifta` /
|
|
58
|
+
`float` / `InputGroup` / `variant` don't apply to these controls.
|
|
59
|
+
|
|
60
|
+
## `FieldShell` anatomy
|
|
61
|
+
|
|
62
|
+
`FieldShell` owns label + addon + help + error composition; every wrapper supplies only its input
|
|
63
|
+
node as `children`.
|
|
64
|
+
|
|
65
|
+
```ts
|
|
66
|
+
interface FieldShellProps {
|
|
67
|
+
id: string;
|
|
68
|
+
label?: string;
|
|
69
|
+
required?: boolean;
|
|
70
|
+
helpText?: string;
|
|
71
|
+
errorMessage?: string;
|
|
72
|
+
labelMode?: LabelMode;
|
|
73
|
+
floatVariant?: FloatVariant;
|
|
74
|
+
addonBefore?: ReactNode;
|
|
75
|
+
addonAfter?: ReactNode;
|
|
76
|
+
children: ReactNode;
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
- **Label modes** (`LabelMode = 'ifta' | 'float' | 'beside' | 'top' | 'none'`):
|
|
81
|
+
- `ifta` — wraps input + label in PR11 `IftaLabel`.
|
|
82
|
+
- `float` — wraps input + label in PR11 `FloatLabel` (position per `floatVariant`: `over` / `in` / `on`).
|
|
83
|
+
- `beside` — label renders next to the control (row layout).
|
|
84
|
+
- `top` — label renders above the control.
|
|
85
|
+
- `none` — no label rendered even if `label` text is provided elsewhere.
|
|
86
|
+
- **Addons** — `addonBefore`/`addonAfter` wrap the (already labeled) control in PR11's
|
|
87
|
+
`InputGroup.Root`, addons outer, labeled control inner.
|
|
88
|
+
- **Fluid** — resolved from the `useFieldConfig()` context (not a per-shell prop); when on, wraps
|
|
89
|
+
the composed control in PR11's `<Fluid>`.
|
|
90
|
+
- **Help/error** — rendered below the control as `<small id="${id}-help">` /
|
|
91
|
+
`<small id="${id}-error">`. Both render independently — if `helpText` and `errorMessage` are both
|
|
92
|
+
truthy, both `<small>` elements show at once; there is no suppression. The only precedence is in
|
|
93
|
+
`aria-describedby`, which prefers the error (see Aria wiring below).
|
|
94
|
+
- **Required marker** — a presentational ` *` appended to the label, `aria-hidden`.
|
|
95
|
+
|
|
96
|
+
### Aria wiring
|
|
97
|
+
|
|
98
|
+
`useFieldController` owns aria, not `FieldShell`: PR11's `invalid` prop drives styling only, it does
|
|
99
|
+
**not** emit `aria-invalid`. The hook returns an `aria` object —
|
|
100
|
+
`{ 'aria-invalid': fieldState.invalid || undefined, 'aria-describedby': errorId | helpId | undefined }`
|
|
101
|
+
(error id wins over help id when both are present) — spread onto the actual input/trigger element.
|
|
102
|
+
|
|
103
|
+
## `useFieldController` return shape
|
|
104
|
+
|
|
105
|
+
```ts
|
|
106
|
+
const f = useFieldController({ name, control, rules, defaultValue, shouldUnregister, disabled, helpText, id, variant, size, fluid });
|
|
107
|
+
// f.field, f.fieldState, f.formState — raw RHF controller result
|
|
108
|
+
// f.id, f.errorId, f.helpId — stable ids for FieldShell + aria
|
|
109
|
+
// f.variant, f.size, f.fluid — resolved (prop ?? MantisThemeProvider config)
|
|
110
|
+
// f.invalid — fieldState.invalid
|
|
111
|
+
// f.disabled — disabled || formState.isSubmitting
|
|
112
|
+
// f.errorMessage — fieldState.error?.message
|
|
113
|
+
// f.aria — { 'aria-invalid', 'aria-describedby' }
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## How to build a new form wrapper
|
|
117
|
+
|
|
118
|
+
Canonical pattern (from `TextField.tsx`):
|
|
119
|
+
|
|
120
|
+
1. Accept `FieldControllerProps<TFieldValues, TName>` (or `ChoiceFieldControllerProps` for bucket B)
|
|
121
|
+
intersected with the underlying PR11 primitive's own extra props (Omit the primitive's
|
|
122
|
+
controlled/state props — `value`, `onChange`, `invalid`, `disabled`, etc. — since the hook owns
|
|
123
|
+
those).
|
|
124
|
+
2. Destructure the controller/presentation props out of `props`; call `useFieldController` with
|
|
125
|
+
`name, control, rules, defaultValue, shouldUnregister, disabled, helpText, id, variant, size, fluid`.
|
|
126
|
+
3. Render `<FieldShell id={f.id} label={label} labelMode={labelMode} floatVariant={floatVariant}
|
|
127
|
+
addonBefore={addonBefore} addonAfter={addonAfter} required={required} helpText={helpText}
|
|
128
|
+
errorMessage={f.errorMessage}>` around the actual PR11 input.
|
|
129
|
+
4. Wire the PR11 primitive to `f.field` (`name`, `value`, `onChange`/`onValueChange`, `onBlur`,
|
|
130
|
+
`ref`) and `f.id` (`id`), plus `invalid={f.invalid}`, `disabled={f.disabled}`,
|
|
131
|
+
`variant={f.variant}`, `size={f.size}`, `fluid={f.fluid}`, and spread `{...f.aria}` onto the
|
|
132
|
+
element that owns focus (native input, or the trigger button for portal-based compounds like
|
|
133
|
+
`Select`).
|
|
134
|
+
5. Spread any remaining `...rest` primitive props straight onto the PR11 element as an escape hatch.
|
|
135
|
+
|
|
136
|
+
Portal-based compounds (e.g. `Select`) have no native blur — call `f.field.onBlur()` from the
|
|
137
|
+
compound's `onOpenChange` (fired on close) instead, and put id/aria on the trigger element rather
|
|
138
|
+
than a bare `<input>`.
|
|
@@ -1,27 +1,34 @@
|
|
|
1
|
+
<!-- GENERATED by `pnpm gen:catalog` — do not edit. Source: docs/components/*.md -->
|
|
2
|
+
|
|
1
3
|
# Style Import Guide
|
|
2
4
|
|
|
3
5
|
`@mantis-core/ui` does not inject CSS automatically. Import the matching partials from `@mantis-core/styles`.
|
|
4
6
|
|
|
5
|
-
##
|
|
7
|
+
## All partials
|
|
6
8
|
|
|
7
9
|
```scss
|
|
8
|
-
@use "@mantis-core/styles/scss/
|
|
9
|
-
@use "@mantis-core/styles/scss/inputs.scss";
|
|
10
|
-
@use "@mantis-core/styles/scss/select.scss";
|
|
11
|
-
@use "@mantis-core/styles/scss/select-button.scss";
|
|
12
|
-
@use "@mantis-core/styles/scss/table.scss";
|
|
13
|
-
@use "@mantis-core/styles/scss/status-badge.scss";
|
|
14
|
-
@use "@mantis-core/styles/scss/data-state.scss";
|
|
10
|
+
@use "@mantis-core/styles/scss/ckeditor.scss";
|
|
15
11
|
@use "@mantis-core/styles/scss/confirm-dialog.scss";
|
|
16
|
-
@use "@mantis-core/styles/scss/
|
|
12
|
+
@use "@mantis-core/styles/scss/data-state.scss";
|
|
17
13
|
@use "@mantis-core/styles/scss/file-dropzone.scss";
|
|
18
|
-
@use "@mantis-core/styles/scss/
|
|
14
|
+
@use "@mantis-core/styles/scss/form-actions.scss";
|
|
19
15
|
@use "@mantis-core/styles/scss/rich-text-preview.scss";
|
|
20
|
-
@use "@mantis-core/styles/scss/
|
|
16
|
+
@use "@mantis-core/styles/scss/status-badge.scss";
|
|
17
|
+
@use "@mantis-core/styles/scss/table.scss";
|
|
21
18
|
```
|
|
22
19
|
|
|
20
|
+
## Per component
|
|
21
|
+
|
|
22
|
+
- `CKEditorInput`: `scss/ckeditor.scss`
|
|
23
|
+
- `ConfirmDialog`: `scss/confirm-dialog.scss`
|
|
24
|
+
- `DataState`: `scss/data-state.scss`
|
|
25
|
+
- `FileDropzone`: `scss/file-dropzone.scss`
|
|
26
|
+
- `FormActionsBar`: `scss/form-actions.scss`
|
|
27
|
+
- `MantisDataTable`: `scss/table.scss`
|
|
28
|
+
- `PaginatedTable`: `scss/table.scss`
|
|
29
|
+
- `RichTextPreview`: `scss/rich-text-preview.scss`
|
|
30
|
+
- `StatusBadge`: `scss/status-badge.scss`
|
|
31
|
+
|
|
23
32
|
## Notes
|
|
24
33
|
|
|
25
|
-
-
|
|
26
|
-
- `Select` and `AsyncSelect` require `select.scss`, not PrimeReact input styles.
|
|
27
|
-
- Components like `Loading`, `UploadFilesPreview`, `PageTitle`, and `FormSection` rely mainly on utility classes or inline styles.
|
|
34
|
+
- Components not listed above rely on utility classes or inline styles only.
|