@sfperusacdev/sf-ui 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +116 -0
- package/dist/sf-ui.css +2 -0
- package/dist/sf-ui.js +13228 -0
- package/dist/sf-ui.js.map +1 -0
- package/dist/sf-ui.umd.cjs +21 -0
- package/dist/sf-ui.umd.cjs.map +1 -0
- package/dist/theme/dark.css +156 -0
- package/dist/theme/erp.css +84 -0
- package/dist/theme/sark.css +117 -0
- package/dist/theme/sf-tokens.css +474 -0
- package/dist/types/src/adapters/maps/google/index.d.ts +18 -0
- package/dist/types/src/adapters/maps/index.d.ts +2 -0
- package/dist/types/src/adapters/maps/leaflet/index.d.ts +10 -0
- package/dist/types/src/components/advanced-inputs/CodeEditor.d.ts +20 -0
- package/dist/types/src/components/advanced-inputs/MapFlyTo.d.ts +9 -0
- package/dist/types/src/components/advanced-inputs/MapGeocoderBar.d.ts +8 -0
- package/dist/types/src/components/advanced-inputs/MapPicker.d.ts +22 -0
- package/dist/types/src/components/advanced-inputs/MapPickerMap.d.ts +10 -0
- package/dist/types/src/components/advanced-inputs/PhotoInput.d.ts +18 -0
- package/dist/types/src/components/advanced-inputs/RichTextEditor.d.ts +16 -0
- package/dist/types/src/components/advanced-inputs/SignaturePad.d.ts +17 -0
- package/dist/types/src/components/advanced-inputs/codeEditorClassName.d.ts +7 -0
- package/dist/types/src/components/advanced-inputs/codeEditorExtensions.d.ts +3 -0
- package/dist/types/src/components/advanced-inputs/index.d.ts +8 -0
- package/dist/types/src/components/advanced-inputs/mapPickerUtils.d.ts +19 -0
- package/dist/types/src/components/advanced-inputs/types.d.ts +5 -0
- package/dist/types/src/components/buttons/ActionButton.d.ts +11 -0
- package/dist/types/src/components/buttons/Button.d.ts +12 -0
- package/dist/types/src/components/buttons/ButtonGroup.d.ts +7 -0
- package/dist/types/src/components/buttons/FormActions.d.ts +12 -0
- package/dist/types/src/components/buttons/RowActions.d.ts +10 -0
- package/dist/types/src/components/buttons/ToolbarButton.d.ts +10 -0
- package/dist/types/src/components/buttons/buttonClassName.d.ts +9 -0
- package/dist/types/src/components/buttons/index.d.ts +9 -0
- package/dist/types/src/components/cards/Badge.d.ts +11 -0
- package/dist/types/src/components/cards/EntityCard.d.ts +28 -0
- package/dist/types/src/components/cards/KPICard.d.ts +22 -0
- package/dist/types/src/components/cards/MetricBar.d.ts +13 -0
- package/dist/types/src/components/cards/ModuleCard.d.ts +34 -0
- package/dist/types/src/components/cards/RecommendationCard.d.ts +13 -0
- package/dist/types/src/components/cards/badgeClassName.d.ts +8 -0
- package/dist/types/src/components/cards/index.d.ts +12 -0
- package/dist/types/src/components/cards/types.d.ts +16 -0
- package/dist/types/src/components/charts/Chart.d.ts +3 -0
- package/dist/types/src/components/charts/Sparkline.d.ts +2 -0
- package/dist/types/src/components/charts/chartUtils.d.ts +14 -0
- package/dist/types/src/components/charts/index.d.ts +5 -0
- package/dist/types/src/components/charts/types.d.ts +32 -0
- package/dist/types/src/components/dashboard/Calendar.d.ts +10 -0
- package/dist/types/src/components/dashboard/DashboardCard.d.ts +43 -0
- package/dist/types/src/components/dashboard/DonutGauge.d.ts +25 -0
- package/dist/types/src/components/dashboard/EventLog.d.ts +37 -0
- package/dist/types/src/components/dashboard/Stepper.d.ts +14 -0
- package/dist/types/src/components/dashboard/calendarUtils.d.ts +5 -0
- package/dist/types/src/components/dashboard/index.d.ts +11 -0
- package/dist/types/src/components/dashboard/types.d.ts +39 -0
- package/dist/types/src/components/display/AuditTimeline.d.ts +20 -0
- package/dist/types/src/components/display/Avatar.d.ts +22 -0
- package/dist/types/src/components/display/Carousel.d.ts +10 -0
- package/dist/types/src/components/display/LiveChip.d.ts +6 -0
- package/dist/types/src/components/display/LiveStatusBar.d.ts +23 -0
- package/dist/types/src/components/display/PassengerBoardCard.d.ts +22 -0
- package/dist/types/src/components/display/RecordList.d.ts +26 -0
- package/dist/types/src/components/display/Timeline.d.ts +17 -0
- package/dist/types/src/components/display/index.d.ts +16 -0
- package/dist/types/src/components/document-inputs/CurrencyInput.d.ts +21 -0
- package/dist/types/src/components/document-inputs/DniInput.d.ts +17 -0
- package/dist/types/src/components/document-inputs/DocumentInputs.fuzz.test.d.ts +1 -0
- package/dist/types/src/components/document-inputs/OtpInput.d.ts +15 -0
- package/dist/types/src/components/document-inputs/PhoneInput.d.ts +18 -0
- package/dist/types/src/components/document-inputs/RucInput.d.ts +17 -0
- package/dist/types/src/components/document-inputs/documentUtils.d.ts +11 -0
- package/dist/types/src/components/document-inputs/index.d.ts +7 -0
- package/dist/types/src/components/feedback/AccessDenied.d.ts +8 -0
- package/dist/types/src/components/feedback/Alert.d.ts +13 -0
- package/dist/types/src/components/feedback/EmptyState.d.ts +9 -0
- package/dist/types/src/components/feedback/ErrorView.d.ts +8 -0
- package/dist/types/src/components/feedback/LoadingView.d.ts +5 -0
- package/dist/types/src/components/feedback/RetryBlock.d.ts +11 -0
- package/dist/types/src/components/feedback/Skeleton.d.ts +9 -0
- package/dist/types/src/components/feedback/Spinner.d.ts +6 -0
- package/dist/types/src/components/feedback/Toast.d.ts +27 -0
- package/dist/types/src/components/feedback/index.d.ts +13 -0
- package/dist/types/src/components/icons/SyncIcon.d.ts +4 -0
- package/dist/types/src/components/icons/index.d.ts +2 -0
- package/dist/types/src/components/inputs/AsyncCardSelect.d.ts +17 -0
- package/dist/types/src/components/inputs/AsyncSearchSelect.d.ts +20 -0
- package/dist/types/src/components/inputs/AsyncSearchTableSelect.d.ts +21 -0
- package/dist/types/src/components/inputs/BooleanCheckbox.d.ts +14 -0
- package/dist/types/src/components/inputs/CardSelect.d.ts +18 -0
- package/dist/types/src/components/inputs/Checkbox.d.ts +16 -0
- package/dist/types/src/components/inputs/CheckboxGroup.d.ts +18 -0
- package/dist/types/src/components/inputs/DateInput.d.ts +20 -0
- package/dist/types/src/components/inputs/DatePicker.d.ts +19 -0
- package/dist/types/src/components/inputs/DisplayField.d.ts +15 -0
- package/dist/types/src/components/inputs/FieldLayout.d.ts +13 -0
- package/dist/types/src/components/inputs/FileInput.d.ts +21 -0
- package/dist/types/src/components/inputs/FileInput.security.test.d.ts +1 -0
- package/dist/types/src/components/inputs/Input.d.ts +21 -0
- package/dist/types/src/components/inputs/NumberInput.d.ts +21 -0
- package/dist/types/src/components/inputs/PasswordInput.d.ts +17 -0
- package/dist/types/src/components/inputs/RadioGroup.d.ts +18 -0
- package/dist/types/src/components/inputs/SearchSelect.d.ts +24 -0
- package/dist/types/src/components/inputs/SearchTableSelect.d.ts +22 -0
- package/dist/types/src/components/inputs/Select.d.ts +18 -0
- package/dist/types/src/components/inputs/SelectOption.d.ts +4 -0
- package/dist/types/src/components/inputs/SmartDateInput.d.ts +35 -0
- package/dist/types/src/components/inputs/SmartDateInput.test.d.ts +1 -0
- package/dist/types/src/components/inputs/SmartInput.d.ts +84 -0
- package/dist/types/src/components/inputs/SmartInput.test.d.ts +1 -0
- package/dist/types/src/components/inputs/SmartSelect.d.ts +77 -0
- package/dist/types/src/components/inputs/SmartSelect.test.d.ts +1 -0
- package/dist/types/src/components/inputs/TextArea.d.ts +19 -0
- package/dist/types/src/components/inputs/Toggle.d.ts +18 -0
- package/dist/types/src/components/inputs/Transfer.d.ts +10 -0
- package/dist/types/src/components/inputs/TreeSelect.d.ts +21 -0
- package/dist/types/src/components/inputs/YesNoSelect.d.ts +17 -0
- package/dist/types/src/components/inputs/fieldClassName.d.ts +8 -0
- package/dist/types/src/components/inputs/index.d.ts +37 -0
- package/dist/types/src/components/inputs/inputFocusTransition.d.ts +2 -0
- package/dist/types/src/components/inputs/passwordStrength.d.ts +7 -0
- package/dist/types/src/components/inputs/textareaClassName.d.ts +7 -0
- package/dist/types/src/components/inputs/treeSelectUtils.d.ts +9 -0
- package/dist/types/src/components/inputs/types-form.d.ts +12 -0
- package/dist/types/src/components/inputs/useAsyncOptions.d.ts +15 -0
- package/dist/types/src/components/interactive-inputs/CardRadioGroup.d.ts +15 -0
- package/dist/types/src/components/interactive-inputs/ColorInput.d.ts +15 -0
- package/dist/types/src/components/interactive-inputs/KeyValueInput.d.ts +16 -0
- package/dist/types/src/components/interactive-inputs/NumberStepper.d.ts +17 -0
- package/dist/types/src/components/interactive-inputs/ProgressBar.d.ts +15 -0
- package/dist/types/src/components/interactive-inputs/ProgressBarReadonly.d.ts +15 -0
- package/dist/types/src/components/interactive-inputs/RangeSliderInput.d.ts +20 -0
- package/dist/types/src/components/interactive-inputs/RatingInput.d.ts +16 -0
- package/dist/types/src/components/interactive-inputs/SliderInput.d.ts +19 -0
- package/dist/types/src/components/interactive-inputs/SortableList.d.ts +12 -0
- package/dist/types/src/components/interactive-inputs/TagsInput.d.ts +16 -0
- package/dist/types/src/components/interactive-inputs/index.d.ts +24 -0
- package/dist/types/src/components/interactive-inputs/interactiveUtils.d.ts +14 -0
- package/dist/types/src/components/interactive-inputs/types.d.ts +8 -0
- package/dist/types/src/components/layout/Accordion.d.ts +17 -0
- package/dist/types/src/components/layout/AppShell.d.ts +100 -0
- package/dist/types/src/components/layout/AppShell.test.d.ts +1 -0
- package/dist/types/src/components/layout/Breadcrumb.d.ts +14 -0
- package/dist/types/src/components/layout/DateWeekStrip.d.ts +12 -0
- package/dist/types/src/components/layout/FilterBar.d.ts +54 -0
- package/dist/types/src/components/layout/FormWizard.d.ts +11 -0
- package/dist/types/src/components/layout/HeightProvider.d.ts +7 -0
- package/dist/types/src/components/layout/ItineraryEditor.d.ts +20 -0
- package/dist/types/src/components/layout/LiveRouteBoard.d.ts +50 -0
- package/dist/types/src/components/layout/MaestroLayout.d.ts +15 -0
- package/dist/types/src/components/layout/MasterDetailLayout.d.ts +21 -0
- package/dist/types/src/components/layout/PageContainer.d.ts +8 -0
- package/dist/types/src/components/layout/PageHeader.d.ts +13 -0
- package/dist/types/src/components/layout/ScrollArea.d.ts +9 -0
- package/dist/types/src/components/layout/Separator.d.ts +6 -0
- package/dist/types/src/components/layout/SidePanel.d.ts +15 -0
- package/dist/types/src/components/layout/SidePanelContainer.d.ts +21 -0
- package/dist/types/src/components/layout/TablePageLayout.d.ts +9 -0
- package/dist/types/src/components/layout/Tabs.d.ts +17 -0
- package/dist/types/src/components/layout/UnitSelector.d.ts +14 -0
- package/dist/types/src/components/layout/Visibility.d.ts +10 -0
- package/dist/types/src/components/layout/WeekdayToggleStrip.d.ts +12 -0
- package/dist/types/src/components/layout/flotaLayout.test.d.ts +1 -0
- package/dist/types/src/components/layout/index.d.ts +40 -0
- package/dist/types/src/components/layout/transportApi.test.d.ts +1 -0
- package/dist/types/src/components/layout/useFormWizard.d.ts +40 -0
- package/dist/types/src/components/maps/base/MapFrame.d.ts +8 -0
- package/dist/types/src/components/maps/base/MapStatus.d.ts +5 -0
- package/dist/types/src/components/maps/base/index.d.ts +4 -0
- package/dist/types/src/components/maps/forms/AddressSearchInput.d.ts +16 -0
- package/dist/types/src/components/maps/forms/AreaInput.d.ts +7 -0
- package/dist/types/src/components/maps/forms/CoordinatesInput.d.ts +6 -0
- package/dist/types/src/components/maps/forms/LocationPicker.d.ts +16 -0
- package/dist/types/src/components/maps/forms/LocationPicker.test.d.ts +1 -0
- package/dist/types/src/components/maps/forms/RouteInput.d.ts +7 -0
- package/dist/types/src/components/maps/forms/ShapeInput.d.ts +19 -0
- package/dist/types/src/components/maps/forms/ShapeInput.test.d.ts +1 -0
- package/dist/types/src/components/maps/forms/SmartMapInput.d.ts +39 -0
- package/dist/types/src/components/maps/forms/SmartMapInput.test.d.ts +1 -0
- package/dist/types/src/components/maps/forms/index.d.ts +12 -0
- package/dist/types/src/components/maps/index.d.ts +3 -0
- package/dist/types/src/components/maps/renderers/google/GoogleMapRenderer.d.ts +6 -0
- package/dist/types/src/components/maps/renderers/google/index.d.ts +1 -0
- package/dist/types/src/components/maps/renderers/index.d.ts +2 -0
- package/dist/types/src/components/maps/renderers/leaflet/LeafletMapRenderer.d.ts +7 -0
- package/dist/types/src/components/maps/renderers/leaflet/index.d.ts +1 -0
- package/dist/types/src/components/maps/views/MapView.d.ts +9 -0
- package/dist/types/src/components/maps/views/index.d.ts +2 -0
- package/dist/types/src/components/media-inputs/FileDropInput.d.ts +21 -0
- package/dist/types/src/components/media-inputs/MultiPhotoInput.d.ts +20 -0
- package/dist/types/src/components/media-inputs/MultiPhotoInput.security.test.d.ts +1 -0
- package/dist/types/src/components/media-inputs/PhotoCropEditor.d.ts +9 -0
- package/dist/types/src/components/media-inputs/PhotoCropInput.d.ts +19 -0
- package/dist/types/src/components/media-inputs/PhotoInput.d.ts +1 -0
- package/dist/types/src/components/media-inputs/SignaturePad.d.ts +1 -0
- package/dist/types/src/components/media-inputs/SmartMediaInput.d.ts +43 -0
- package/dist/types/src/components/media-inputs/SmartMediaInput.test.d.ts +1 -0
- package/dist/types/src/components/media-inputs/cropImageFromArea.d.ts +7 -0
- package/dist/types/src/components/media-inputs/index.d.ts +13 -0
- package/dist/types/src/components/media-inputs/mediaUtils.d.ts +9 -0
- package/dist/types/src/components/media-inputs/types.d.ts +6 -0
- package/dist/types/src/components/overlays/CommandPalette.d.ts +17 -0
- package/dist/types/src/components/overlays/ConfirmDialog.d.ts +14 -0
- package/dist/types/src/components/overlays/ContextMenu.d.ts +15 -0
- package/dist/types/src/components/overlays/Drawer.d.ts +23 -0
- package/dist/types/src/components/overlays/DropdownMenu.d.ts +21 -0
- package/dist/types/src/components/overlays/MessageDialog.d.ts +11 -0
- package/dist/types/src/components/overlays/Modal.d.ts +31 -0
- package/dist/types/src/components/overlays/NotificationBell.d.ts +12 -0
- package/dist/types/src/components/overlays/OptionItem.d.ts +11 -0
- package/dist/types/src/components/overlays/Popover.d.ts +18 -0
- package/dist/types/src/components/overlays/ProductTour.d.ts +15 -0
- package/dist/types/src/components/overlays/QRView.d.ts +9 -0
- package/dist/types/src/components/overlays/TabMenuOption.d.ts +9 -0
- package/dist/types/src/components/overlays/Tooltip.d.ts +10 -0
- package/dist/types/src/components/overlays/index.d.ts +27 -0
- package/dist/types/src/components/range-inputs/DateRangeInput.d.ts +19 -0
- package/dist/types/src/components/range-inputs/DateRangeUtcInput.d.ts +3 -0
- package/dist/types/src/components/range-inputs/TimeRangeInput.d.ts +18 -0
- package/dist/types/src/components/range-inputs/index.d.ts +8 -0
- package/dist/types/src/components/range-inputs/rangeUtils.d.ts +8 -0
- package/dist/types/src/components/range-inputs/types.d.ts +10 -0
- package/dist/types/src/components/table/ActiveFiltersBar.d.ts +10 -0
- package/dist/types/src/components/table/AsyncCustomTable.d.ts +13 -0
- package/dist/types/src/components/table/CustomTable.d.ts +83 -0
- package/dist/types/src/components/table/EditableDataGrid.d.ts +15 -0
- package/dist/types/src/components/table/EditableDataGrid.test.d.ts +1 -0
- package/dist/types/src/components/table/ExpandableTableSection.d.ts +26 -0
- package/dist/types/src/components/table/PaginationRangeInput.d.ts +14 -0
- package/dist/types/src/components/table/TableColumnSettings.d.ts +13 -0
- package/dist/types/src/components/table/TableFiltersPanel.d.ts +17 -0
- package/dist/types/src/components/table/TableSortingPanel.d.ts +16 -0
- package/dist/types/src/components/table/activeFilterUtils.d.ts +9 -0
- package/dist/types/src/components/table/asyncStateStore.d.ts +6 -0
- package/dist/types/src/components/table/customTableController.d.ts +51 -0
- package/dist/types/src/components/table/index.d.ts +26 -0
- package/dist/types/src/components/table/tableFilters.d.ts +21 -0
- package/dist/types/src/components/table/useTableColumnSettings.d.ts +29 -0
- package/dist/types/src/components/visualization/NetworkLegend.d.ts +8 -0
- package/dist/types/src/components/visualization/NetworkMap.d.ts +19 -0
- package/dist/types/src/components/visualization/OrgTree.d.ts +20 -0
- package/dist/types/src/components/visualization/index.d.ts +9 -0
- package/dist/types/src/components/visualization/networkMapUtils.d.ts +32 -0
- package/dist/types/src/components/visualization/orgTreeUtils.d.ts +6 -0
- package/dist/types/src/components/visualization/types.d.ts +38 -0
- package/dist/types/src/constants/index.d.ts +1 -0
- package/dist/types/src/constants/maps/index.d.ts +8 -0
- package/dist/types/src/contracts/maps/index.d.ts +27 -0
- package/dist/types/src/engines/maps/google/googleMapEngine.d.ts +3 -0
- package/dist/types/src/engines/maps/google/index.d.ts +1 -0
- package/dist/types/src/engines/maps/index.d.ts +2 -0
- package/dist/types/src/engines/maps/leaflet/index.d.ts +1 -0
- package/dist/types/src/engines/maps/leaflet/leafletMapEngine.d.ts +3 -0
- package/dist/types/src/hooks/index.d.ts +11 -0
- package/dist/types/src/hooks/maps/index.d.ts +3 -0
- package/dist/types/src/hooks/maps/useAddressSearch.d.ts +7 -0
- package/dist/types/src/hooks/maps/useAddressSearch.test.d.ts +1 -0
- package/dist/types/src/hooks/maps/useMapEngine.d.ts +5 -0
- package/dist/types/src/hooks/maps/useMapsConfig.d.ts +1 -0
- package/dist/types/src/hooks/useArrayPaginator.d.ts +21 -0
- package/dist/types/src/hooks/useClickAway.d.ts +2 -0
- package/dist/types/src/hooks/useCustomForm.d.ts +26 -0
- package/dist/types/src/hooks/useFilterData.d.ts +10 -0
- package/dist/types/src/hooks/useIsClient.d.ts +2 -0
- package/dist/types/src/hooks/useMaestroFilter.d.ts +15 -0
- package/dist/types/src/hooks/useMaestroFilter.test.d.ts +1 -0
- package/dist/types/src/hooks/useQueryStringState.d.ts +2 -0
- package/dist/types/src/hooks/useStoredState.d.ts +2 -0
- package/dist/types/src/index.d.ts +24 -0
- package/dist/types/src/performance/catalogPhases.performance.test.d.ts +1 -0
- package/dist/types/src/performance/componentRender.performance.test.d.ts +1 -0
- package/dist/types/src/providers/SfProvider.d.ts +21 -0
- package/dist/types/src/providers/SfProvider.maps.test.d.ts +1 -0
- package/dist/types/src/providers/index.d.ts +2 -0
- package/dist/types/src/services/maps/distance/basicDistanceService.d.ts +2 -0
- package/dist/types/src/services/maps/distance/basicDistanceService.test.d.ts +1 -0
- package/dist/types/src/services/maps/distance/index.d.ts +1 -0
- package/dist/types/src/services/maps/geocoding/googleGeocodingService.d.ts +3 -0
- package/dist/types/src/services/maps/geocoding/index.d.ts +2 -0
- package/dist/types/src/services/maps/geocoding/nominatimGeocodingService.d.ts +2 -0
- package/dist/types/src/services/maps/googleMapsLoader.d.ts +66 -0
- package/dist/types/src/services/maps/index.d.ts +5 -0
- package/dist/types/src/services/maps/places/index.d.ts +1 -0
- package/dist/types/src/services/maps/places/mapsPlacesService.d.ts +2 -0
- package/dist/types/src/services/maps/routing/basicRouteService.d.ts +2 -0
- package/dist/types/src/services/maps/routing/basicRouteService.test.d.ts +1 -0
- package/dist/types/src/services/maps/routing/index.d.ts +1 -0
- package/dist/types/src/types/maps/index.d.ts +155 -0
- package/dist/types/src/utils/exportTableCsv.d.ts +11 -0
- package/dist/types/src/utils/exportTableXlsx.d.ts +5 -0
- package/dist/types/src/utils/index.d.ts +9 -0
- package/dist/types/src/utils/maps/geocoder.d.ts +8 -0
- package/dist/types/src/utils/maps/index.d.ts +10 -0
- package/dist/types/src/utils/maps/index.test.d.ts +1 -0
- package/dist/types/src/utils/queryParams.d.ts +3 -0
- package/dist/types/src/utils/resolveCssVar.d.ts +2 -0
- package/dist/types/src/utils/sanitizeRichHtml.d.ts +1 -0
- package/dist/types/src/utils/sanitizeRichHtml.test.d.ts +1 -0
- package/dist/types/src/utils/spreadsheetSanitizer.d.ts +1 -0
- package/dist/types/src/utils/spreadsheetSanitizer.test.d.ts +1 -0
- package/dist/types/src/utils/toStringArray.d.ts +1 -0
- package/dist/types/src/utils/validators.d.ts +52 -0
- package/package.json +128 -0
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { ButtonVariant } from '../buttons/buttonClassName';
|
|
3
|
+
import { StepperVariant } from '../dashboard/Stepper';
|
|
4
|
+
export type FormWizardStep = {
|
|
5
|
+
key: string;
|
|
6
|
+
label: string;
|
|
7
|
+
sublabel?: string;
|
|
8
|
+
content: ReactNode;
|
|
9
|
+
validate?: () => boolean | Promise<boolean>;
|
|
10
|
+
};
|
|
11
|
+
export type FormWizardFooterVariant = "default" | "brand";
|
|
12
|
+
export type UseFormWizardOptions = {
|
|
13
|
+
steps: FormWizardStep[];
|
|
14
|
+
activeKey?: string;
|
|
15
|
+
defaultActiveKey?: string;
|
|
16
|
+
onActiveKeyChange?: (key: string) => void;
|
|
17
|
+
onFinish?: () => void;
|
|
18
|
+
nextLabel?: string;
|
|
19
|
+
prevLabel?: string;
|
|
20
|
+
finishLabel?: string;
|
|
21
|
+
showStepProgress?: boolean;
|
|
22
|
+
stepperVariant?: StepperVariant;
|
|
23
|
+
footerVariant?: FormWizardFooterVariant;
|
|
24
|
+
/** Oculta «Atrás» en el primer paso (mockup transporte). */
|
|
25
|
+
hidePrevOnFirst?: boolean;
|
|
26
|
+
nextIcon?: ReactNode;
|
|
27
|
+
primaryVariant?: ButtonVariant;
|
|
28
|
+
orientation?: "horizontal" | "vertical";
|
|
29
|
+
};
|
|
30
|
+
export type FormWizardShell = {
|
|
31
|
+
activeKey: string;
|
|
32
|
+
activeIndex: number;
|
|
33
|
+
stepper: ReactNode;
|
|
34
|
+
content: ReactNode;
|
|
35
|
+
footer: ReactNode;
|
|
36
|
+
isFirst: boolean;
|
|
37
|
+
isLast: boolean;
|
|
38
|
+
goToStep: (direction: "next" | "prev") => Promise<void>;
|
|
39
|
+
};
|
|
40
|
+
export declare const useFormWizard: ({ steps, activeKey: controlledActiveKey, defaultActiveKey, onActiveKeyChange, onFinish, nextLabel, prevLabel, finishLabel, showStepProgress, stepperVariant, footerVariant, hidePrevOnFirst, nextIcon, primaryVariant, orientation, }: UseFormWizardOptions) => FormWizardShell;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type MapFrameProps = {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
className?: string;
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare const MapFrame: ({ title, description, className, children }: MapFrameProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { SfPlace } from '../../../types/maps';
|
|
3
|
+
export type AddressSearchInputProps<TFormValues extends FieldValues> = {
|
|
4
|
+
form: UseFormReturn<TFormValues>;
|
|
5
|
+
name: Path<TFormValues>;
|
|
6
|
+
label?: string;
|
|
7
|
+
info?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
placeholder?: string;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
onChange?: (value: SfPlace | null) => void;
|
|
14
|
+
onRefresh?: () => Promise<void> | void;
|
|
15
|
+
};
|
|
16
|
+
export declare const AddressSearchInput: <TFormValues extends FieldValues>({ form, name, label, info, required, placeholder, readOnly, disabled, className, onChange, onRefresh, }: AddressSearchInputProps<TFormValues>) => import("react").JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { ShapeInputProps } from './ShapeInput';
|
|
3
|
+
import { SfLatLng } from '../../../types/maps';
|
|
4
|
+
export type AreaInputProps<TFormValues extends FieldValues> = Omit<ShapeInputProps<TFormValues>, "mode"> & {
|
|
5
|
+
onChange?: (value: SfLatLng[]) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const AreaInput: <TFormValues extends FieldValues>(props: AreaInputProps<TFormValues>) => import("react").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { LocationPickerProps } from './LocationPicker';
|
|
3
|
+
import { SfLatLng } from '../../../types/maps';
|
|
4
|
+
export type CoordinatesInputProps<TFormValues extends FieldValues> = LocationPickerProps<TFormValues>;
|
|
5
|
+
export declare const CoordinatesInput: <TFormValues extends FieldValues>(props: CoordinatesInputProps<TFormValues>) => import("react").JSX.Element;
|
|
6
|
+
export type CoordinatesValue = SfLatLng;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { SfLatLng } from '../../../types/maps';
|
|
3
|
+
export type LocationPickerProps<TFormValues extends FieldValues> = {
|
|
4
|
+
form: UseFormReturn<TFormValues>;
|
|
5
|
+
name: Path<TFormValues>;
|
|
6
|
+
label?: string;
|
|
7
|
+
info?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
zoom?: number;
|
|
10
|
+
readOnly?: boolean;
|
|
11
|
+
disabled?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
onChange?: (value: SfLatLng) => void;
|
|
14
|
+
onRefresh?: () => Promise<void> | void;
|
|
15
|
+
};
|
|
16
|
+
export declare const LocationPicker: <TFormValues extends FieldValues>({ form, name, label, info, required, zoom, readOnly, disabled, className, onChange, onRefresh, }: LocationPickerProps<TFormValues>) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { ShapeInputProps } from './ShapeInput';
|
|
3
|
+
import { SfLatLng } from '../../../types/maps';
|
|
4
|
+
export type RouteInputProps<TFormValues extends FieldValues> = Omit<ShapeInputProps<TFormValues>, "mode"> & {
|
|
5
|
+
onChange?: (value: SfLatLng[]) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const RouteInput: <TFormValues extends FieldValues>(props: RouteInputProps<TFormValues>) => import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { SfLatLng } from '../../../types/maps';
|
|
3
|
+
type ShapeInputMode = "area" | "route";
|
|
4
|
+
export type ShapeInputProps<TFormValues extends FieldValues> = {
|
|
5
|
+
form: UseFormReturn<TFormValues>;
|
|
6
|
+
name: Path<TFormValues>;
|
|
7
|
+
mode: ShapeInputMode;
|
|
8
|
+
label?: string;
|
|
9
|
+
info?: string;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
zoom?: number;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
onChange?: (value: SfLatLng[]) => void;
|
|
16
|
+
onRefresh?: () => Promise<void> | void;
|
|
17
|
+
};
|
|
18
|
+
export declare const ShapeInput: <TFormValues extends FieldValues>({ form, name, mode, label, info, required, zoom, readOnly, disabled, className, onChange, onRefresh, }: ShapeInputProps<TFormValues>) => import("react").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { SfLatLng, SfPlace } from '../../../types/maps';
|
|
3
|
+
type SmartMapBaseProps<TFormValues extends FieldValues> = {
|
|
4
|
+
form: UseFormReturn<TFormValues>;
|
|
5
|
+
name: Path<TFormValues>;
|
|
6
|
+
label?: string;
|
|
7
|
+
info?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
className?: string;
|
|
12
|
+
onRefresh?: () => Promise<void> | void;
|
|
13
|
+
};
|
|
14
|
+
type SmartMapCoordinatesProps<TFormValues extends FieldValues> = SmartMapBaseProps<TFormValues> & {
|
|
15
|
+
kind: "coordinates";
|
|
16
|
+
zoom?: number;
|
|
17
|
+
onChange?: (value: SfLatLng) => void;
|
|
18
|
+
};
|
|
19
|
+
type SmartMapLocationProps<TFormValues extends FieldValues> = SmartMapBaseProps<TFormValues> & {
|
|
20
|
+
kind: "location";
|
|
21
|
+
zoom?: number;
|
|
22
|
+
onChange?: (value: SfLatLng) => void;
|
|
23
|
+
};
|
|
24
|
+
type SmartMapAddressProps<TFormValues extends FieldValues> = SmartMapBaseProps<TFormValues> & {
|
|
25
|
+
kind: "address";
|
|
26
|
+
placeholder?: string;
|
|
27
|
+
onChange?: (value: SfPlace | null) => void;
|
|
28
|
+
};
|
|
29
|
+
type SmartMapAreaProps<TFormValues extends FieldValues> = SmartMapBaseProps<TFormValues> & {
|
|
30
|
+
kind: "area";
|
|
31
|
+
onChange?: (value: SfLatLng[]) => void;
|
|
32
|
+
};
|
|
33
|
+
type SmartMapRouteProps<TFormValues extends FieldValues> = SmartMapBaseProps<TFormValues> & {
|
|
34
|
+
kind: "route";
|
|
35
|
+
onChange?: (value: SfLatLng[]) => void;
|
|
36
|
+
};
|
|
37
|
+
export type SmartMapInputProps<TFormValues extends FieldValues> = SmartMapCoordinatesProps<TFormValues> | SmartMapLocationProps<TFormValues> | SmartMapAddressProps<TFormValues> | SmartMapAreaProps<TFormValues> | SmartMapRouteProps<TFormValues>;
|
|
38
|
+
export declare const SmartMapInput: <TFormValues extends FieldValues>(props: SmartMapInputProps<TFormValues>) => import("react").JSX.Element | null;
|
|
39
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export { AddressSearchInput } from './AddressSearchInput';
|
|
2
|
+
export type { AddressSearchInputProps } from './AddressSearchInput';
|
|
3
|
+
export { CoordinatesInput } from './CoordinatesInput';
|
|
4
|
+
export type { CoordinatesInputProps, CoordinatesValue } from './CoordinatesInput';
|
|
5
|
+
export { AreaInput } from './AreaInput';
|
|
6
|
+
export type { AreaInputProps } from './AreaInput';
|
|
7
|
+
export { LocationPicker } from './LocationPicker';
|
|
8
|
+
export type { LocationPickerProps } from './LocationPicker';
|
|
9
|
+
export { RouteInput } from './RouteInput';
|
|
10
|
+
export type { RouteInputProps } from './RouteInput';
|
|
11
|
+
export { SmartMapInput } from './SmartMapInput';
|
|
12
|
+
export type { SmartMapInputProps } from './SmartMapInput';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SfGoogleMapsEngineConfig, SfMapRendererProps } from '../../../../types/maps';
|
|
2
|
+
type GoogleMapRendererProps = SfMapRendererProps & {
|
|
3
|
+
config?: SfGoogleMapsEngineConfig;
|
|
4
|
+
};
|
|
5
|
+
export declare const GoogleMapRenderer: ({ config, center, zoom, markers, routes, areas, height, className, readOnly, onClick, onMarkerClick, onMarkerDoubleClick, onMarkerDrag, onMarkerDragEnd, }: GoogleMapRendererProps) => import("react").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { GoogleMapRenderer } from './GoogleMapRenderer';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SfMapRendererProps } from '../../../../types/maps';
|
|
2
|
+
type LeafletMapRendererProps = SfMapRendererProps & {
|
|
3
|
+
tileUrl?: string;
|
|
4
|
+
attribution?: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const LeafletMapRenderer: ({ center, zoom, markers, routes, areas, height, className, readOnly, tileUrl, attribution, onClick, onMarkerClick, onMarkerDoubleClick, onMarkerDrag, onMarkerDragEnd, }: LeafletMapRendererProps) => import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LeafletMapRenderer } from './LeafletMapRenderer';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SfMapMarker, SfMapRendererProps, SfMapShape } from '../../../types/maps';
|
|
2
|
+
export type MapViewProps = Omit<SfMapRendererProps, "markers"> & {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
markers?: SfMapMarker[];
|
|
6
|
+
routes?: SfMapShape[];
|
|
7
|
+
areas?: SfMapShape[];
|
|
8
|
+
};
|
|
9
|
+
export declare const MapView: ({ title, description, center, zoom, markers, routes, areas, height, className, readOnly, onClick, onMarkerClick, onMarkerDoubleClick, onMarkerDrag, onMarkerDragEnd, }: MapViewProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
type FileDropInputProps<TFormValues extends FieldValues> = {
|
|
3
|
+
form: UseFormReturn<TFormValues>;
|
|
4
|
+
name: Path<TFormValues>;
|
|
5
|
+
label?: string;
|
|
6
|
+
info?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
accept?: string;
|
|
9
|
+
multiple?: boolean;
|
|
10
|
+
maxSizeMb?: number;
|
|
11
|
+
dropLabel?: string;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
small?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
onChange?: (files: File[]) => void;
|
|
17
|
+
onUpload?: (file: File, reportProgress: (percent: number) => void) => Promise<void>;
|
|
18
|
+
onRefresh?: () => Promise<void> | void;
|
|
19
|
+
};
|
|
20
|
+
export declare const FileDropInput: <TFormValues extends FieldValues>({ form, name, label, info, required, accept, multiple, maxSizeMb, dropLabel, readOnly, disabled, small, className, onChange, onUpload, onRefresh, }: FileDropInputProps<TFormValues>) => import("react").JSX.Element;
|
|
21
|
+
export type { FileDropInputProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { PhotoItem } from './types';
|
|
3
|
+
type MultiPhotoInputProps<TFormValues extends FieldValues> = {
|
|
4
|
+
form: UseFormReturn<TFormValues>;
|
|
5
|
+
name: Path<TFormValues>;
|
|
6
|
+
label?: string;
|
|
7
|
+
info?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
max?: number;
|
|
10
|
+
maxSizeMb?: number;
|
|
11
|
+
camera?: boolean;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
small?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
onChange?: (photos: PhotoItem[]) => void;
|
|
17
|
+
onRefresh?: () => Promise<void> | void;
|
|
18
|
+
};
|
|
19
|
+
export declare const MultiPhotoInput: <TFormValues extends FieldValues>({ form, name, label, info, required, max, maxSizeMb, camera, readOnly, disabled, small, className, onChange, onRefresh, }: MultiPhotoInputProps<TFormValues>) => import("react").JSX.Element;
|
|
20
|
+
export type { MultiPhotoInputProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type PhotoCropEditorProps = {
|
|
2
|
+
imageUrl: string;
|
|
3
|
+
fileName: string;
|
|
4
|
+
aspect?: number;
|
|
5
|
+
onCancel: () => void;
|
|
6
|
+
onConfirm: (file: File) => void;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const PhotoCropEditor: ({ imageUrl, fileName, aspect, onCancel, onConfirm, className, }: PhotoCropEditorProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
type PhotoCropInputProps<TFormValues extends FieldValues> = {
|
|
3
|
+
form: UseFormReturn<TFormValues>;
|
|
4
|
+
name: Path<TFormValues>;
|
|
5
|
+
label?: string;
|
|
6
|
+
info?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
maxSizeMb?: number;
|
|
9
|
+
interactive?: boolean;
|
|
10
|
+
aspect?: number;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
small?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
onChange?: (file: File | null) => void;
|
|
16
|
+
onRefresh?: () => Promise<void> | void;
|
|
17
|
+
};
|
|
18
|
+
export declare const PhotoCropInput: <TFormValues extends FieldValues>({ form, name, label, info, required, maxSizeMb, interactive, aspect, readOnly, disabled, small, className, onChange, onRefresh, }: PhotoCropInputProps<TFormValues>) => import("react").JSX.Element;
|
|
19
|
+
export type { PhotoCropInputProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PhotoInput } from '../advanced-inputs/PhotoInput';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SignaturePad } from '../advanced-inputs/SignaturePad';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { FieldValues, Path, UseFormReturn } from 'react-hook-form';
|
|
2
|
+
import { PhotoItem } from './types';
|
|
3
|
+
type SmartMediaBaseProps<TFormValues extends FieldValues> = {
|
|
4
|
+
form: UseFormReturn<TFormValues>;
|
|
5
|
+
name: Path<TFormValues>;
|
|
6
|
+
label?: string;
|
|
7
|
+
info?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
readOnly?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
small?: boolean;
|
|
12
|
+
className?: string;
|
|
13
|
+
onRefresh?: () => Promise<void> | void;
|
|
14
|
+
};
|
|
15
|
+
type SmartMediaPhotoProps<TFormValues extends FieldValues> = SmartMediaBaseProps<TFormValues> & {
|
|
16
|
+
kind: "photo";
|
|
17
|
+
capture?: "user" | "environment";
|
|
18
|
+
maxSizeMb?: number;
|
|
19
|
+
onChange?: (file: File | null) => void;
|
|
20
|
+
};
|
|
21
|
+
type SmartMediaMultiPhotoProps<TFormValues extends FieldValues> = SmartMediaBaseProps<TFormValues> & {
|
|
22
|
+
kind: "multiPhoto";
|
|
23
|
+
max?: number;
|
|
24
|
+
camera?: boolean;
|
|
25
|
+
onChange?: (photos: PhotoItem[]) => void;
|
|
26
|
+
};
|
|
27
|
+
type SmartMediaSignatureProps<TFormValues extends FieldValues> = SmartMediaBaseProps<TFormValues> & {
|
|
28
|
+
kind: "signature";
|
|
29
|
+
width?: number;
|
|
30
|
+
height?: number;
|
|
31
|
+
onChange?: (dataUrl: string) => void;
|
|
32
|
+
};
|
|
33
|
+
type SmartMediaFileProps<TFormValues extends FieldValues> = SmartMediaBaseProps<TFormValues> & {
|
|
34
|
+
kind: "file";
|
|
35
|
+
accept?: string;
|
|
36
|
+
multiple?: boolean;
|
|
37
|
+
maxSizeMb?: number;
|
|
38
|
+
buttonLabel?: string;
|
|
39
|
+
onChange?: (files: File[]) => void;
|
|
40
|
+
};
|
|
41
|
+
export type SmartMediaInputProps<TFormValues extends FieldValues> = SmartMediaPhotoProps<TFormValues> | SmartMediaMultiPhotoProps<TFormValues> | SmartMediaSignatureProps<TFormValues> | SmartMediaFileProps<TFormValues>;
|
|
42
|
+
export declare const SmartMediaInput: <TFormValues extends FieldValues>(props: SmartMediaInputProps<TFormValues>) => import("react").JSX.Element | null;
|
|
43
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { FileDropInput } from './FileDropInput';
|
|
2
|
+
export type { FileDropInputProps } from './FileDropInput';
|
|
3
|
+
export { PhotoInput } from './PhotoInput';
|
|
4
|
+
export { SignaturePad } from './SignaturePad';
|
|
5
|
+
export { MultiPhotoInput } from './MultiPhotoInput';
|
|
6
|
+
export type { MultiPhotoInputProps } from './MultiPhotoInput';
|
|
7
|
+
export { SmartMediaInput } from './SmartMediaInput';
|
|
8
|
+
export type { SmartMediaInputProps } from './SmartMediaInput';
|
|
9
|
+
export { PhotoCropInput } from './PhotoCropInput';
|
|
10
|
+
export type { PhotoCropInputProps } from './PhotoCropInput';
|
|
11
|
+
export { isValidFileType, showFilePicker, createPhotoItem, nextPhotoId, revokePhotoPreview, revokePhotoPreviews, normalizePhotoItems, cropImageToSquare, } from './mediaUtils';
|
|
12
|
+
export { emptyPhotoItems } from './types';
|
|
13
|
+
export type { PhotoItem } from './types';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PhotoItem } from './types';
|
|
2
|
+
export declare const nextPhotoId: () => string;
|
|
3
|
+
export declare const isValidFileType: (file: File, acceptString: string) => boolean;
|
|
4
|
+
export declare const showFilePicker: (accept: string, multiple?: boolean) => Promise<File[]>;
|
|
5
|
+
export declare const createPhotoItem: (file: File) => PhotoItem;
|
|
6
|
+
export declare const revokePhotoPreview: (photo: PhotoItem) => void;
|
|
7
|
+
export declare const revokePhotoPreviews: (photos: PhotoItem[]) => void;
|
|
8
|
+
export declare const normalizePhotoItems: (value: unknown) => PhotoItem[];
|
|
9
|
+
export declare const cropImageToSquare: (file: File, quality?: number) => Promise<File>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export type CommandPaletteItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
group?: string;
|
|
5
|
+
keywords?: string;
|
|
6
|
+
onSelect: () => void;
|
|
7
|
+
};
|
|
8
|
+
export type CommandPaletteProps = {
|
|
9
|
+
open: boolean;
|
|
10
|
+
onOpenChange: (open: boolean) => void;
|
|
11
|
+
items: CommandPaletteItem[];
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
emptyMessage?: string;
|
|
14
|
+
enableShortcut?: boolean;
|
|
15
|
+
className?: string;
|
|
16
|
+
};
|
|
17
|
+
export declare const CommandPalette: ({ open, onOpenChange, items, placeholder, emptyMessage, enableShortcut, className, }: CommandPaletteProps) => import('react').ReactPortal | null;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type ConfirmDialogProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
title?: string;
|
|
5
|
+
message?: ReactNode;
|
|
6
|
+
confirmLabel?: string;
|
|
7
|
+
cancelLabel?: string;
|
|
8
|
+
onConfirm: () => void;
|
|
9
|
+
onCancel: () => void;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
danger?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const ConfirmDialog: ({ open, title, message, confirmLabel, cancelLabel, onConfirm, onCancel, loading, danger, }: ConfirmDialogProps) => import("react").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FC, MouseEvent, ReactNode } from 'react';
|
|
2
|
+
import { IconType } from 'react-icons';
|
|
3
|
+
export type ContextMenuItem = {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
icon?: IconType | string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
onClick?: (ctxValue?: unknown) => void;
|
|
9
|
+
};
|
|
10
|
+
export type ContextMenuItemDef = ContextMenuItem | ((ctxValue?: unknown) => ContextMenuItem | null | undefined);
|
|
11
|
+
export type ContextMenuProviderProps = {
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
};
|
|
14
|
+
export declare const ContextMenuProvider: FC<ContextMenuProviderProps>;
|
|
15
|
+
export declare const useContextMenu: (defs: ContextMenuItemDef[]) => (event: MouseEvent<HTMLElement>, ctxValue?: unknown) => void;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
+
import { OverlayHeaderVariant } from './Modal';
|
|
3
|
+
export type DrawerSide = "left" | "right" | "top" | "bottom";
|
|
4
|
+
export type DrawerProps = {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
side?: DrawerSide;
|
|
8
|
+
title?: string;
|
|
9
|
+
subtitle?: string;
|
|
10
|
+
icon?: ReactNode;
|
|
11
|
+
children: ReactNode;
|
|
12
|
+
footer?: ReactNode;
|
|
13
|
+
subheader?: ReactNode;
|
|
14
|
+
width?: CSSProperties["width"];
|
|
15
|
+
height?: CSSProperties["height"];
|
|
16
|
+
headerVariant?: OverlayHeaderVariant;
|
|
17
|
+
closeOnOverlay?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const Drawer: ({ open, onClose, side, title, subtitle, icon, children, footer, subheader, width, height, headerVariant, closeOnOverlay, className, }: DrawerProps) => import('react').ReactPortal | null;
|
|
21
|
+
/** Alias de `Drawer` — patrón shadcn Sheet (panel lateral o inferior). */
|
|
22
|
+
export declare const Sheet: ({ open, onClose, side, title, subtitle, icon, children, footer, subheader, width, height, headerVariant, closeOnOverlay, className, }: DrawerProps) => import('react').ReactPortal | null;
|
|
23
|
+
export type SheetProps = DrawerProps;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { IconType } from 'react-icons';
|
|
3
|
+
type DropdownAlign = "start" | "end";
|
|
4
|
+
type DropdownMenuProps = {
|
|
5
|
+
trigger: ReactNode | ((open: boolean) => ReactNode);
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
align?: DropdownAlign;
|
|
8
|
+
widthClassName?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const useDropdownClose: () => () => void;
|
|
12
|
+
export declare const DropdownMenu: ({ trigger, children, align, widthClassName, className, }: DropdownMenuProps) => import("react").JSX.Element;
|
|
13
|
+
type DropdownMenuItemProps = {
|
|
14
|
+
label: string;
|
|
15
|
+
onClick: () => void;
|
|
16
|
+
icon?: IconType;
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
danger?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare const DropdownMenuItem: FC<DropdownMenuItemProps>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type MessageDialogVariant = "info" | "success" | "warning" | "danger";
|
|
3
|
+
export type MessageDialogProps = {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
variant?: MessageDialogVariant;
|
|
7
|
+
title?: string;
|
|
8
|
+
message?: ReactNode;
|
|
9
|
+
actionLabel?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const MessageDialog: ({ open, onClose, variant, title, message, actionLabel, }: MessageDialogProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type ModalSize = "sm" | "md" | "lg" | "xl";
|
|
3
|
+
export type OverlayHeaderVariant = "default" | "brand" | "dark" | "danger";
|
|
4
|
+
export type ModalProps = {
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
title?: string;
|
|
8
|
+
subtitle?: ReactNode;
|
|
9
|
+
icon?: ReactNode;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
footer?: ReactNode;
|
|
12
|
+
subheader?: ReactNode;
|
|
13
|
+
size?: ModalSize;
|
|
14
|
+
headerVariant?: OverlayHeaderVariant;
|
|
15
|
+
/** Oculta cabecera estándar (título, subtítulo, icono y cerrar) cuando el consumidor renderiza cabecera propia en el body. */
|
|
16
|
+
hideHeader?: boolean;
|
|
17
|
+
closeOnOverlay?: boolean;
|
|
18
|
+
className?: string;
|
|
19
|
+
};
|
|
20
|
+
export declare const Modal: ({ open, onClose, title, subtitle, icon, children, footer, subheader, size, headerVariant, hideHeader, closeOnOverlay, className, }: ModalProps) => import('react').ReactPortal | null;
|
|
21
|
+
type UseModalOptions = {
|
|
22
|
+
onOpen?: () => void;
|
|
23
|
+
onClose?: () => void;
|
|
24
|
+
};
|
|
25
|
+
export declare const useModal: <T>(options?: UseModalOptions) => {
|
|
26
|
+
isOpen: boolean;
|
|
27
|
+
open: (data?: T) => void;
|
|
28
|
+
close: () => void;
|
|
29
|
+
data: T | undefined;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export type NotificationItem = {
|
|
2
|
+
id: string;
|
|
3
|
+
title: string;
|
|
4
|
+
message?: string;
|
|
5
|
+
};
|
|
6
|
+
export type NotificationBellProps = {
|
|
7
|
+
items: NotificationItem[];
|
|
8
|
+
onItemClick?: (item: NotificationItem) => void;
|
|
9
|
+
emptyLabel?: string;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const NotificationBell: ({ items, onItemClick, emptyLabel, className, }: NotificationBellProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AriaRole, ReactNode } from 'react';
|
|
2
|
+
export type OptionItemProps = {
|
|
3
|
+
title: string;
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
icon?: ReactNode;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
role?: AriaRole;
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const OptionItem: ({ title, selected, icon, disabled, onClick, role, className, }: OptionItemProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
export type PopoverAlign = "start" | "end";
|
|
3
|
+
export type PopoverSide = "top" | "bottom";
|
|
4
|
+
export type PopoverProps = {
|
|
5
|
+
trigger: ReactNode | ((open: boolean) => ReactNode);
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
align?: PopoverAlign;
|
|
8
|
+
side?: PopoverSide;
|
|
9
|
+
open?: boolean;
|
|
10
|
+
onOpenChange?: (open: boolean) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
contentClassName?: string;
|
|
13
|
+
triggerId?: string;
|
|
14
|
+
triggerAriaLabel?: string;
|
|
15
|
+
triggerDisabled?: boolean;
|
|
16
|
+
triggerAriaReadOnly?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare const Popover: FC<PopoverProps>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type ProductTourStep = {
|
|
2
|
+
target: string;
|
|
3
|
+
title: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
placement?: "top" | "bottom" | "left" | "right";
|
|
6
|
+
};
|
|
7
|
+
export type ProductTourProps = {
|
|
8
|
+
open: boolean;
|
|
9
|
+
onOpenChange: (open: boolean) => void;
|
|
10
|
+
steps: ProductTourStep[];
|
|
11
|
+
stepIndex?: number;
|
|
12
|
+
onStepChange?: (index: number) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
};
|
|
15
|
+
export declare const ProductTour: ({ open, onOpenChange, steps, stepIndex: controlledIndex, onStepChange, className, }: ProductTourProps) => import('react').ReactPortal | null;
|