@portnet/ui 5.0.27 → 6.0.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 +524 -0
- package/README.md +101 -38
- package/dist/index.d.ts +59 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +174 -203
- package/dist/index.js.map +1 -0
- package/dist/v2/__tests__/MobileRowCard.test.js +337 -0
- package/dist/v2/__tests__/MobileRowCard.test.js.map +1 -0
- package/dist/v2/__tests__/apiError.test.js +182 -0
- package/dist/v2/__tests__/apiError.test.js.map +1 -0
- package/dist/v2/__tests__/banned-patterns.test.js +272 -0
- package/dist/v2/__tests__/banned-patterns.test.js.map +1 -0
- package/dist/v2/__tests__/contrast-palette.test.js +225 -0
- package/dist/v2/__tests__/contrast-palette.test.js.map +1 -0
- package/dist/v2/__tests__/cssVariables.test.js +158 -0
- package/dist/v2/__tests__/cssVariables.test.js.map +1 -0
- package/dist/v2/__tests__/labels-merge.test.js +153 -0
- package/dist/v2/__tests__/labels-merge.test.js.map +1 -0
- package/dist/v2/__tests__/locale-fallback.test.js +111 -0
- package/dist/v2/__tests__/locale-fallback.test.js.map +1 -0
- package/dist/v2/__tests__/useFocusTrap.test.js +517 -0
- package/dist/v2/__tests__/useFocusTrap.test.js.map +1 -0
- package/dist/v2/components/Accordion.d.ts +56 -0
- package/dist/v2/components/Accordion.d.ts.map +1 -0
- package/dist/v2/components/Accordion.js +238 -0
- package/dist/v2/components/Accordion.js.map +1 -0
- package/dist/v2/components/ActionStrip.d.ts +67 -0
- package/dist/v2/components/ActionStrip.d.ts.map +1 -0
- package/dist/v2/components/ActionStrip.js +154 -0
- package/dist/v2/components/ActionStrip.js.map +1 -0
- package/dist/v2/components/Banner.d.ts +49 -0
- package/dist/v2/components/Banner.d.ts.map +1 -0
- package/dist/v2/components/Banner.js +183 -0
- package/dist/v2/components/Banner.js.map +1 -0
- package/dist/v2/components/Busy.d.ts +18 -0
- package/dist/v2/components/Busy.d.ts.map +1 -0
- package/dist/v2/components/Busy.js +104 -0
- package/dist/v2/components/Busy.js.map +1 -0
- package/dist/v2/components/Button.d.ts +36 -0
- package/dist/v2/components/Button.d.ts.map +1 -0
- package/dist/v2/components/Button.js +122 -0
- package/dist/v2/components/Button.js.map +1 -0
- package/dist/v2/components/CategoryTag.d.ts +45 -0
- package/dist/v2/components/CategoryTag.d.ts.map +1 -0
- package/dist/v2/components/CategoryTag.js +89 -0
- package/dist/v2/components/CategoryTag.js.map +1 -0
- package/dist/v2/components/Checkbox.d.ts +59 -0
- package/dist/v2/components/Checkbox.d.ts.map +1 -0
- package/dist/v2/components/Checkbox.js +134 -0
- package/dist/v2/components/Checkbox.js.map +1 -0
- package/dist/v2/components/Chip.d.ts +48 -0
- package/dist/v2/components/Chip.d.ts.map +1 -0
- package/dist/v2/components/Chip.js +131 -0
- package/dist/v2/components/Chip.js.map +1 -0
- package/dist/v2/components/Combobox.d.ts +134 -0
- package/dist/v2/components/Combobox.d.ts.map +1 -0
- package/dist/v2/components/Combobox.js +399 -0
- package/dist/v2/components/Combobox.js.map +1 -0
- package/dist/v2/components/CommandPalette.d.ts +36 -0
- package/dist/v2/components/CommandPalette.d.ts.map +1 -0
- package/dist/v2/components/CommandPalette.js +672 -0
- package/dist/v2/components/CommandPalette.js.map +1 -0
- package/dist/v2/components/ConfirmDialog.d.ts +23 -0
- package/dist/v2/components/ConfirmDialog.d.ts.map +1 -0
- package/dist/v2/components/ConfirmDialog.js +150 -0
- package/dist/v2/components/ConfirmDialog.js.map +1 -0
- package/dist/v2/components/DatePicker.d.ts +21 -0
- package/dist/v2/components/DatePicker.d.ts.map +1 -0
- package/dist/v2/components/DatePicker.js +207 -0
- package/dist/v2/components/DatePicker.js.map +1 -0
- package/dist/v2/components/DateRangePicker.d.ts +81 -0
- package/dist/v2/components/DateRangePicker.d.ts.map +1 -0
- package/dist/v2/components/DateRangePicker.js +295 -0
- package/dist/v2/components/DateRangePicker.js.map +1 -0
- package/dist/v2/components/DateTimePicker.d.ts +21 -0
- package/dist/v2/components/DateTimePicker.d.ts.map +1 -0
- package/dist/v2/components/DateTimePicker.js +189 -0
- package/dist/v2/components/DateTimePicker.js.map +1 -0
- package/dist/v2/components/Drawer.d.ts +34 -0
- package/dist/v2/components/Drawer.d.ts.map +1 -0
- package/dist/v2/components/Drawer.js +339 -0
- package/dist/v2/components/Drawer.js.map +1 -0
- package/dist/v2/components/Dropzone.d.ts +150 -0
- package/dist/v2/components/Dropzone.d.ts.map +1 -0
- package/dist/v2/components/Dropzone.js +539 -0
- package/dist/v2/components/Dropzone.js.map +1 -0
- package/dist/v2/components/EmptyState.d.ts +36 -0
- package/dist/v2/components/EmptyState.d.ts.map +1 -0
- package/dist/v2/components/EmptyState.js +112 -0
- package/dist/v2/components/EmptyState.js.map +1 -0
- package/dist/v2/components/FavoriteToggle.d.ts +22 -0
- package/dist/v2/components/FavoriteToggle.d.ts.map +1 -0
- package/dist/v2/components/FavoriteToggle.js +134 -0
- package/dist/v2/components/FavoriteToggle.js.map +1 -0
- package/dist/v2/components/Field.d.ts +58 -0
- package/dist/v2/components/Field.d.ts.map +1 -0
- package/dist/v2/components/Field.js +186 -0
- package/dist/v2/components/Field.js.map +1 -0
- package/dist/v2/components/FieldHelp.d.ts +54 -0
- package/dist/v2/components/FieldHelp.d.ts.map +1 -0
- package/dist/v2/components/FieldHelp.js +209 -0
- package/dist/v2/components/FieldHelp.js.map +1 -0
- package/dist/v2/components/FilterTab.d.ts +35 -0
- package/dist/v2/components/FilterTab.d.ts.map +1 -0
- package/dist/v2/components/FilterTab.js +144 -0
- package/dist/v2/components/FilterTab.js.map +1 -0
- package/dist/v2/components/ForbiddenPage.d.ts +40 -0
- package/dist/v2/components/ForbiddenPage.d.ts.map +1 -0
- package/dist/v2/components/ForbiddenPage.js +81 -0
- package/dist/v2/components/ForbiddenPage.js.map +1 -0
- package/dist/v2/components/FormGrid.d.ts +76 -0
- package/dist/v2/components/FormGrid.d.ts.map +1 -0
- package/dist/v2/components/FormGrid.js +177 -0
- package/dist/v2/components/FormGrid.js.map +1 -0
- package/dist/v2/components/FormikDisplay.d.ts +38 -0
- package/dist/v2/components/FormikDisplay.d.ts.map +1 -0
- package/dist/v2/components/FormikDisplay.js +125 -0
- package/dist/v2/components/FormikDisplay.js.map +1 -0
- package/dist/v2/components/Input.d.ts +62 -0
- package/dist/v2/components/Input.d.ts.map +1 -0
- package/dist/v2/components/Input.js +115 -0
- package/dist/v2/components/Input.js.map +1 -0
- package/dist/v2/components/KPICard.d.ts +22 -0
- package/dist/v2/components/KPICard.d.ts.map +1 -0
- package/dist/v2/components/KPICard.js +205 -0
- package/dist/v2/components/KPICard.js.map +1 -0
- package/dist/v2/components/KV.d.ts +25 -0
- package/dist/v2/components/KV.d.ts.map +1 -0
- package/dist/v2/components/KV.js +82 -0
- package/dist/v2/components/KV.js.map +1 -0
- package/dist/v2/components/KVGrid.d.ts +44 -0
- package/dist/v2/components/KVGrid.d.ts.map +1 -0
- package/dist/v2/components/KVGrid.js +73 -0
- package/dist/v2/components/KVGrid.js.map +1 -0
- package/dist/v2/components/Layout.d.ts +78 -0
- package/dist/v2/components/Layout.d.ts.map +1 -0
- package/dist/v2/components/Layout.js +284 -0
- package/dist/v2/components/Layout.js.map +1 -0
- package/dist/v2/components/MobileRowCard.d.ts +63 -0
- package/dist/v2/components/MobileRowCard.d.ts.map +1 -0
- package/dist/v2/components/MobileRowCard.js +321 -0
- package/dist/v2/components/MobileRowCard.js.map +1 -0
- package/dist/v2/components/Modal.d.ts +21 -0
- package/dist/v2/components/Modal.d.ts.map +1 -0
- package/dist/v2/components/Modal.js +281 -0
- package/dist/v2/components/Modal.js.map +1 -0
- package/dist/v2/components/NetworkErrorPage.d.ts +11 -0
- package/dist/v2/components/NetworkErrorPage.d.ts.map +1 -0
- package/dist/v2/components/NetworkErrorPage.js +86 -0
- package/dist/v2/components/NetworkErrorPage.js.map +1 -0
- package/dist/v2/components/NotFoundPage.d.ts +9 -0
- package/dist/v2/components/NotFoundPage.d.ts.map +1 -0
- package/dist/v2/components/NotFoundPage.js +66 -0
- package/dist/v2/components/NotFoundPage.js.map +1 -0
- package/dist/v2/components/NumberInput.d.ts +83 -0
- package/dist/v2/components/NumberInput.d.ts.map +1 -0
- package/dist/v2/components/NumberInput.js +316 -0
- package/dist/v2/components/NumberInput.js.map +1 -0
- package/dist/v2/components/OverflowMenu.d.ts +55 -0
- package/dist/v2/components/OverflowMenu.d.ts.map +1 -0
- package/dist/v2/components/OverflowMenu.js +196 -0
- package/dist/v2/components/OverflowMenu.js.map +1 -0
- package/dist/v2/components/PdfViewer.d.ts +56 -0
- package/dist/v2/components/PdfViewer.d.ts.map +1 -0
- package/dist/v2/components/PdfViewer.js +132 -0
- package/dist/v2/components/PdfViewer.js.map +1 -0
- package/dist/v2/components/ProgressBar.d.ts +53 -0
- package/dist/v2/components/ProgressBar.d.ts.map +1 -0
- package/dist/v2/components/ProgressBar.js +209 -0
- package/dist/v2/components/ProgressBar.js.map +1 -0
- package/dist/v2/components/Radio.d.ts +78 -0
- package/dist/v2/components/Radio.d.ts.map +1 -0
- package/dist/v2/components/Radio.js +238 -0
- package/dist/v2/components/Radio.js.map +1 -0
- package/dist/v2/components/SectionHeader.d.ts +53 -0
- package/dist/v2/components/SectionHeader.d.ts.map +1 -0
- package/dist/v2/components/SectionHeader.js +140 -0
- package/dist/v2/components/SectionHeader.js.map +1 -0
- package/dist/v2/components/Segmented.d.ts +61 -0
- package/dist/v2/components/Segmented.d.ts.map +1 -0
- package/dist/v2/components/Segmented.js +261 -0
- package/dist/v2/components/Segmented.js.map +1 -0
- package/dist/v2/components/Select.d.ts +72 -0
- package/dist/v2/components/Select.d.ts.map +1 -0
- package/dist/v2/components/Select.js +382 -0
- package/dist/v2/components/Select.js.map +1 -0
- package/dist/v2/components/ServerErrorPage.d.ts +11 -0
- package/dist/v2/components/ServerErrorPage.d.ts.map +1 -0
- package/dist/v2/components/ServerErrorPage.js +82 -0
- package/dist/v2/components/ServerErrorPage.js.map +1 -0
- package/dist/v2/components/Skeleton.d.ts +56 -0
- package/dist/v2/components/Skeleton.d.ts.map +1 -0
- package/dist/v2/components/Skeleton.js +281 -0
- package/dist/v2/components/Skeleton.js.map +1 -0
- package/dist/v2/components/SkipLink.d.ts +30 -0
- package/dist/v2/components/SkipLink.d.ts.map +1 -0
- package/dist/v2/components/SkipLink.js +58 -0
- package/dist/v2/components/SkipLink.js.map +1 -0
- package/dist/v2/components/Spinner.d.ts +40 -0
- package/dist/v2/components/Spinner.d.ts.map +1 -0
- package/dist/v2/components/Spinner.js +76 -0
- package/dist/v2/components/Spinner.js.map +1 -0
- package/dist/v2/components/Status.d.ts +42 -0
- package/dist/v2/components/Status.d.ts.map +1 -0
- package/dist/v2/components/Status.js +71 -0
- package/dist/v2/components/Status.js.map +1 -0
- package/dist/v2/components/Stepper.d.ts +136 -0
- package/dist/v2/components/Stepper.d.ts.map +1 -0
- package/dist/v2/components/Stepper.js +415 -0
- package/dist/v2/components/Stepper.js.map +1 -0
- package/dist/v2/components/Switch.d.ts +30 -0
- package/dist/v2/components/Switch.d.ts.map +1 -0
- package/dist/v2/components/Switch.js +136 -0
- package/dist/v2/components/Switch.js.map +1 -0
- package/dist/v2/components/Tabs.d.ts +49 -0
- package/dist/v2/components/Tabs.d.ts.map +1 -0
- package/dist/v2/components/Tabs.js +160 -0
- package/dist/v2/components/Tabs.js.map +1 -0
- package/dist/v2/components/TelInput.d.ts +33 -0
- package/dist/v2/components/TelInput.d.ts.map +1 -0
- package/dist/v2/components/TelInput.js +282 -0
- package/dist/v2/components/TelInput.js.map +1 -0
- package/dist/v2/components/Textarea.d.ts +23 -0
- package/dist/v2/components/Textarea.d.ts.map +1 -0
- package/dist/v2/components/Textarea.js +80 -0
- package/dist/v2/components/Textarea.js.map +1 -0
- package/dist/v2/components/TimePicker.d.ts +21 -0
- package/dist/v2/components/TimePicker.d.ts.map +1 -0
- package/dist/v2/components/TimePicker.js +141 -0
- package/dist/v2/components/TimePicker.js.map +1 -0
- package/dist/v2/components/Toast.d.ts +32 -0
- package/dist/v2/components/Toast.d.ts.map +1 -0
- package/dist/v2/components/Toast.js +384 -0
- package/dist/v2/components/Toast.js.map +1 -0
- package/dist/v2/components/Tooltip.d.ts +9 -0
- package/dist/v2/components/Tooltip.d.ts.map +1 -0
- package/dist/v2/components/Tooltip.js +169 -0
- package/dist/v2/components/Tooltip.js.map +1 -0
- package/dist/v2/components/_ErrorPageBody.d.ts +48 -0
- package/dist/v2/components/_ErrorPageBody.d.ts.map +1 -0
- package/dist/v2/components/_ErrorPageBody.js +96 -0
- package/dist/v2/components/_ErrorPageBody.js.map +1 -0
- package/dist/v2/components/_pickerShared.d.ts +47 -0
- package/dist/v2/components/_pickerShared.d.ts.map +1 -0
- package/dist/v2/components/_pickerShared.js +68 -0
- package/dist/v2/components/_pickerShared.js.map +1 -0
- package/dist/v2/components/index.d.ts +83 -0
- package/dist/v2/components/index.d.ts.map +1 -0
- package/dist/v2/components/index.js +477 -0
- package/dist/v2/components/index.js.map +1 -0
- package/dist/v2/hooks/index.d.ts +11 -0
- package/dist/v2/hooks/index.d.ts.map +1 -0
- package/dist/v2/hooks/index.js +85 -0
- package/dist/v2/hooks/index.js.map +1 -0
- package/dist/v2/hooks/useDelayedFlag.d.ts +22 -0
- package/dist/v2/hooks/useDelayedFlag.d.ts.map +1 -0
- package/dist/v2/hooks/useDelayedFlag.js +60 -0
- package/dist/v2/hooks/useDelayedFlag.js.map +1 -0
- package/dist/v2/hooks/useDensity.d.ts +23 -0
- package/dist/v2/hooks/useDensity.d.ts.map +1 -0
- package/dist/v2/hooks/useDensity.js +124 -0
- package/dist/v2/hooks/useDensity.js.map +1 -0
- package/dist/v2/hooks/useFocusFirstError.d.ts +121 -0
- package/dist/v2/hooks/useFocusFirstError.d.ts.map +1 -0
- package/dist/v2/hooks/useFocusFirstError.js +203 -0
- package/dist/v2/hooks/useFocusFirstError.js.map +1 -0
- package/dist/v2/hooks/useFocusTrap.d.ts +3 -0
- package/dist/v2/hooks/useFocusTrap.d.ts.map +1 -0
- package/dist/v2/hooks/useFocusTrap.js +207 -0
- package/dist/v2/hooks/useFocusTrap.js.map +1 -0
- package/dist/v2/hooks/useFormAutoSave.d.ts +42 -0
- package/dist/v2/hooks/useFormAutoSave.d.ts.map +1 -0
- package/dist/v2/hooks/useFormAutoSave.js +186 -0
- package/dist/v2/hooks/useFormAutoSave.js.map +1 -0
- package/dist/v2/hooks/useFormCompletionProgress.d.ts +52 -0
- package/dist/v2/hooks/useFormCompletionProgress.d.ts.map +1 -0
- package/dist/v2/hooks/useFormCompletionProgress.js +136 -0
- package/dist/v2/hooks/useFormCompletionProgress.js.map +1 -0
- package/dist/v2/hooks/useResolvedDensity.d.ts +31 -0
- package/dist/v2/hooks/useResolvedDensity.d.ts.map +1 -0
- package/dist/v2/hooks/useResolvedDensity.js +50 -0
- package/dist/v2/hooks/useResolvedDensity.js.map +1 -0
- package/dist/v2/hooks/useSortedRows.d.ts +25 -0
- package/dist/v2/hooks/useSortedRows.d.ts.map +1 -0
- package/dist/v2/hooks/useSortedRows.js +38 -0
- package/dist/v2/hooks/useSortedRows.js.map +1 -0
- package/dist/v2/hooks/useTabLoading.d.ts +39 -0
- package/dist/v2/hooks/useTabLoading.d.ts.map +1 -0
- package/dist/v2/hooks/useTabLoading.js +85 -0
- package/dist/v2/hooks/useTabLoading.js.map +1 -0
- package/dist/v2/index.d.ts +115 -0
- package/dist/v2/index.d.ts.map +1 -0
- package/dist/v2/index.js +1127 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/modalContext.d.ts +96 -0
- package/dist/v2/modalContext.d.ts.map +1 -0
- package/dist/v2/modalContext.js +113 -0
- package/dist/v2/modalContext.js.map +1 -0
- package/dist/v2/models/favorite.d.ts +14 -0
- package/dist/v2/models/favorite.d.ts.map +1 -0
- package/dist/v2/models/favorite.js +6 -0
- package/dist/v2/models/favorite.js.map +1 -0
- package/dist/v2/models/index.d.ts +11 -0
- package/dist/v2/models/index.d.ts.map +1 -0
- package/dist/v2/models/index.js +50 -0
- package/dist/v2/models/index.js.map +1 -0
- package/dist/v2/models/personalization.d.ts +65 -0
- package/dist/v2/models/personalization.d.ts.map +1 -0
- package/dist/v2/models/personalization.js +6 -0
- package/dist/v2/models/personalization.js.map +1 -0
- package/dist/v2/models/referentiel.d.ts +67 -0
- package/dist/v2/models/referentiel.d.ts.map +1 -0
- package/dist/v2/models/referentiel.js +6 -0
- package/dist/v2/models/referentiel.js.map +1 -0
- package/dist/v2/models/savedFilter.d.ts +22 -0
- package/dist/v2/models/savedFilter.d.ts.map +1 -0
- package/dist/v2/models/savedFilter.js +6 -0
- package/dist/v2/models/savedFilter.js.map +1 -0
- package/dist/v2/patterns/ActionBar.d.ts +137 -0
- package/dist/v2/patterns/ActionBar.d.ts.map +1 -0
- package/dist/v2/patterns/ActionBar.js +601 -0
- package/dist/v2/patterns/ActionBar.js.map +1 -0
- package/dist/v2/patterns/BulkActionBar.d.ts +63 -0
- package/dist/v2/patterns/BulkActionBar.d.ts.map +1 -0
- package/dist/v2/patterns/BulkActionBar.js +153 -0
- package/dist/v2/patterns/BulkActionBar.js.map +1 -0
- package/dist/v2/patterns/CollapsibleDataGrid.d.ts +62 -0
- package/dist/v2/patterns/CollapsibleDataGrid.d.ts.map +1 -0
- package/dist/v2/patterns/CollapsibleDataGrid.js +306 -0
- package/dist/v2/patterns/CollapsibleDataGrid.js.map +1 -0
- package/dist/v2/patterns/ColumnsToggle.d.ts +55 -0
- package/dist/v2/patterns/ColumnsToggle.d.ts.map +1 -0
- package/dist/v2/patterns/ColumnsToggle.js +314 -0
- package/dist/v2/patterns/ColumnsToggle.js.map +1 -0
- package/dist/v2/patterns/DataGrid.d.ts +7 -0
- package/dist/v2/patterns/DataGrid.d.ts.map +1 -0
- package/dist/v2/patterns/DataGrid.js +834 -0
- package/dist/v2/patterns/DataGrid.js.map +1 -0
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts +68 -0
- package/dist/v2/patterns/DataGridSettingsMenu.d.ts.map +1 -0
- package/dist/v2/patterns/DataGridSettingsMenu.js +381 -0
- package/dist/v2/patterns/DataGridSettingsMenu.js.map +1 -0
- package/dist/v2/patterns/DataGridToolbar.d.ts +81 -0
- package/dist/v2/patterns/DataGridToolbar.d.ts.map +1 -0
- package/dist/v2/patterns/DataGridToolbar.js +255 -0
- package/dist/v2/patterns/DataGridToolbar.js.map +1 -0
- package/dist/v2/patterns/DataGridVirtualized.d.ts +76 -0
- package/dist/v2/patterns/DataGridVirtualized.d.ts.map +1 -0
- package/dist/v2/patterns/DataGridVirtualized.js +528 -0
- package/dist/v2/patterns/DataGridVirtualized.js.map +1 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts +46 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.d.ts.map +1 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js +77 -0
- package/dist/v2/patterns/DeleteResourceConfirmDialog.js.map +1 -0
- package/dist/v2/patterns/FavoriteColumn.d.ts +72 -0
- package/dist/v2/patterns/FavoriteColumn.d.ts.map +1 -0
- package/dist/v2/patterns/FavoriteColumn.js +171 -0
- package/dist/v2/patterns/FavoriteColumn.js.map +1 -0
- package/dist/v2/patterns/FavoritesFilter.d.ts +51 -0
- package/dist/v2/patterns/FavoritesFilter.d.ts.map +1 -0
- package/dist/v2/patterns/FavoritesFilter.js +97 -0
- package/dist/v2/patterns/FavoritesFilter.js.map +1 -0
- package/dist/v2/patterns/FormErrorSummary.d.ts +39 -0
- package/dist/v2/patterns/FormErrorSummary.d.ts.map +1 -0
- package/dist/v2/patterns/FormErrorSummary.js +111 -0
- package/dist/v2/patterns/FormErrorSummary.js.map +1 -0
- package/dist/v2/patterns/FormPageShell.d.ts +55 -0
- package/dist/v2/patterns/FormPageShell.d.ts.map +1 -0
- package/dist/v2/patterns/FormPageShell.js +133 -0
- package/dist/v2/patterns/FormPageShell.js.map +1 -0
- package/dist/v2/patterns/FormSection.d.ts +53 -0
- package/dist/v2/patterns/FormSection.d.ts.map +1 -0
- package/dist/v2/patterns/FormSection.js +162 -0
- package/dist/v2/patterns/FormSection.js.map +1 -0
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts +51 -0
- package/dist/v2/patterns/FormikCheckboxGroup.d.ts.map +1 -0
- package/dist/v2/patterns/FormikCheckboxGroup.js +117 -0
- package/dist/v2/patterns/FormikCheckboxGroup.js.map +1 -0
- package/dist/v2/patterns/FormikCombobox.d.ts +43 -0
- package/dist/v2/patterns/FormikCombobox.d.ts.map +1 -0
- package/dist/v2/patterns/FormikCombobox.js +121 -0
- package/dist/v2/patterns/FormikCombobox.js.map +1 -0
- package/dist/v2/patterns/FormikDatePicker.d.ts +87 -0
- package/dist/v2/patterns/FormikDatePicker.d.ts.map +1 -0
- package/dist/v2/patterns/FormikDatePicker.js +177 -0
- package/dist/v2/patterns/FormikDatePicker.js.map +1 -0
- package/dist/v2/patterns/FormikErrorFocus.d.ts +59 -0
- package/dist/v2/patterns/FormikErrorFocus.d.ts.map +1 -0
- package/dist/v2/patterns/FormikErrorFocus.js +83 -0
- package/dist/v2/patterns/FormikErrorFocus.js.map +1 -0
- package/dist/v2/patterns/FormikFile.d.ts +43 -0
- package/dist/v2/patterns/FormikFile.d.ts.map +1 -0
- package/dist/v2/patterns/FormikFile.js +156 -0
- package/dist/v2/patterns/FormikFile.js.map +1 -0
- package/dist/v2/patterns/FormikInput.d.ts +37 -0
- package/dist/v2/patterns/FormikInput.d.ts.map +1 -0
- package/dist/v2/patterns/FormikInput.js +87 -0
- package/dist/v2/patterns/FormikInput.js.map +1 -0
- package/dist/v2/patterns/FormikReferentielField.d.ts +33 -0
- package/dist/v2/patterns/FormikReferentielField.d.ts.map +1 -0
- package/dist/v2/patterns/FormikReferentielField.js +124 -0
- package/dist/v2/patterns/FormikReferentielField.js.map +1 -0
- package/dist/v2/patterns/FormikSelect.d.ts +40 -0
- package/dist/v2/patterns/FormikSelect.d.ts.map +1 -0
- package/dist/v2/patterns/FormikSelect.js +139 -0
- package/dist/v2/patterns/FormikSelect.js.map +1 -0
- package/dist/v2/patterns/FormikTextarea.d.ts +31 -0
- package/dist/v2/patterns/FormikTextarea.d.ts.map +1 -0
- package/dist/v2/patterns/FormikTextarea.js +84 -0
- package/dist/v2/patterns/FormikTextarea.js.map +1 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts +44 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.d.ts.map +1 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.js +207 -0
- package/dist/v2/patterns/KeyboardShortcutsHelp.js.map +1 -0
- package/dist/v2/patterns/NetworkErrorBanner.d.ts +26 -0
- package/dist/v2/patterns/NetworkErrorBanner.d.ts.map +1 -0
- package/dist/v2/patterns/NetworkErrorBanner.js +82 -0
- package/dist/v2/patterns/NetworkErrorBanner.js.map +1 -0
- package/dist/v2/patterns/PageContent.d.ts +40 -0
- package/dist/v2/patterns/PageContent.d.ts.map +1 -0
- package/dist/v2/patterns/PageContent.js +69 -0
- package/dist/v2/patterns/PageContent.js.map +1 -0
- package/dist/v2/patterns/ReferentielField.d.ts +118 -0
- package/dist/v2/patterns/ReferentielField.d.ts.map +1 -0
- package/dist/v2/patterns/ReferentielField.js +617 -0
- package/dist/v2/patterns/ReferentielField.js.map +1 -0
- package/dist/v2/patterns/SaveFilterDialog.d.ts +68 -0
- package/dist/v2/patterns/SaveFilterDialog.d.ts.map +1 -0
- package/dist/v2/patterns/SaveFilterDialog.js +203 -0
- package/dist/v2/patterns/SaveFilterDialog.js.map +1 -0
- package/dist/v2/patterns/SavedFiltersMenu.d.ts +74 -0
- package/dist/v2/patterns/SavedFiltersMenu.d.ts.map +1 -0
- package/dist/v2/patterns/SavedFiltersMenu.js +412 -0
- package/dist/v2/patterns/SavedFiltersMenu.js.map +1 -0
- package/dist/v2/patterns/SkeletonPageShell.d.ts +76 -0
- package/dist/v2/patterns/SkeletonPageShell.d.ts.map +1 -0
- package/dist/v2/patterns/SkeletonPageShell.js +347 -0
- package/dist/v2/patterns/SkeletonPageShell.js.map +1 -0
- package/dist/v2/patterns/SortableHeader.d.ts +47 -0
- package/dist/v2/patterns/SortableHeader.d.ts.map +1 -0
- package/dist/v2/patterns/SortableHeader.js +193 -0
- package/dist/v2/patterns/SortableHeader.js.map +1 -0
- package/dist/v2/patterns/Tour.d.ts +55 -0
- package/dist/v2/patterns/Tour.d.ts.map +1 -0
- package/dist/v2/patterns/Tour.js +473 -0
- package/dist/v2/patterns/Tour.js.map +1 -0
- package/dist/v2/patterns/_dataGridShared.d.ts +125 -0
- package/dist/v2/patterns/_dataGridShared.d.ts.map +1 -0
- package/dist/v2/patterns/_dataGridShared.js +406 -0
- package/dist/v2/patterns/_dataGridShared.js.map +1 -0
- package/dist/v2/patterns/_sort.d.ts +22 -0
- package/dist/v2/patterns/_sort.d.ts.map +1 -0
- package/dist/v2/patterns/_sort.js +118 -0
- package/dist/v2/patterns/_sort.js.map +1 -0
- package/dist/v2/patterns/_useColumnReorder.d.ts +69 -0
- package/dist/v2/patterns/_useColumnReorder.d.ts.map +1 -0
- package/dist/v2/patterns/_useColumnReorder.js +264 -0
- package/dist/v2/patterns/_useColumnReorder.js.map +1 -0
- package/dist/v2/patterns/_useColumnResize.d.ts +49 -0
- package/dist/v2/patterns/_useColumnResize.d.ts.map +1 -0
- package/dist/v2/patterns/_useColumnResize.js +198 -0
- package/dist/v2/patterns/_useColumnResize.js.map +1 -0
- package/dist/v2/patterns/index.d.ts +62 -0
- package/dist/v2/patterns/index.d.ts.map +1 -0
- package/dist/v2/patterns/index.js +246 -0
- package/dist/v2/patterns/index.js.map +1 -0
- package/dist/v2/personalization/PersonalizationProvider.d.ts +80 -0
- package/dist/v2/personalization/PersonalizationProvider.d.ts.map +1 -0
- package/dist/v2/personalization/PersonalizationProvider.js +177 -0
- package/dist/v2/personalization/PersonalizationProvider.js.map +1 -0
- package/dist/v2/personalization/adapters/_storageKey.d.ts +35 -0
- package/dist/v2/personalization/adapters/_storageKey.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/_storageKey.js +69 -0
- package/dist/v2/personalization/adapters/_storageKey.js.map +1 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts +31 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js +128 -0
- package/dist/v2/personalization/adapters/createLocalStorageAdapter.js.map +1 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts +25 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.js +76 -0
- package/dist/v2/personalization/adapters/createMemoryAdapter.js.map +1 -0
- package/dist/v2/personalization/adapters/index.d.ts +10 -0
- package/dist/v2/personalization/adapters/index.d.ts.map +1 -0
- package/dist/v2/personalization/adapters/index.js +21 -0
- package/dist/v2/personalization/adapters/index.js.map +1 -0
- package/dist/v2/personalization/capabilities/favorites.d.ts +53 -0
- package/dist/v2/personalization/capabilities/favorites.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/favorites.js +223 -0
- package/dist/v2/personalization/capabilities/favorites.js.map +1 -0
- package/dist/v2/personalization/capabilities/favoritesView.d.ts +58 -0
- package/dist/v2/personalization/capabilities/favoritesView.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/favoritesView.js +121 -0
- package/dist/v2/personalization/capabilities/favoritesView.js.map +1 -0
- package/dist/v2/personalization/capabilities/index.d.ts +16 -0
- package/dist/v2/personalization/capabilities/index.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/index.js +69 -0
- package/dist/v2/personalization/capabilities/index.js.map +1 -0
- package/dist/v2/personalization/capabilities/savedFilters.d.ts +61 -0
- package/dist/v2/personalization/capabilities/savedFilters.d.ts.map +1 -0
- package/dist/v2/personalization/capabilities/savedFilters.js +297 -0
- package/dist/v2/personalization/capabilities/savedFilters.js.map +1 -0
- package/dist/v2/personalization/createPersonalizationStore.d.ts +76 -0
- package/dist/v2/personalization/createPersonalizationStore.d.ts.map +1 -0
- package/dist/v2/personalization/createPersonalizationStore.js +475 -0
- package/dist/v2/personalization/createPersonalizationStore.js.map +1 -0
- package/dist/v2/personalization/index.d.ts +33 -0
- package/dist/v2/personalization/index.d.ts.map +1 -0
- package/dist/v2/personalization/index.js +111 -0
- package/dist/v2/personalization/index.js.map +1 -0
- package/dist/v2/personalization/personalizationContext.d.ts +78 -0
- package/dist/v2/personalization/personalizationContext.d.ts.map +1 -0
- package/dist/v2/personalization/personalizationContext.js +121 -0
- package/dist/v2/personalization/personalizationContext.js.map +1 -0
- package/dist/v2/personalization/schema.d.ts +60 -0
- package/dist/v2/personalization/schema.d.ts.map +1 -0
- package/dist/v2/personalization/schema.js +102 -0
- package/dist/v2/personalization/schema.js.map +1 -0
- package/dist/v2/personalization/types.d.ts +81 -0
- package/dist/v2/personalization/types.d.ts.map +1 -0
- package/dist/v2/personalization/types.js +6 -0
- package/dist/v2/personalization/types.js.map +1 -0
- package/dist/v2/referentiel/ReferentielProvider.d.ts +53 -0
- package/dist/v2/referentiel/ReferentielProvider.d.ts.map +1 -0
- package/dist/v2/referentiel/ReferentielProvider.js +94 -0
- package/dist/v2/referentiel/ReferentielProvider.js.map +1 -0
- package/dist/v2/referentiel/index.d.ts +18 -0
- package/dist/v2/referentiel/index.d.ts.map +1 -0
- package/dist/v2/referentiel/index.js +44 -0
- package/dist/v2/referentiel/index.js.map +1 -0
- package/dist/v2/referentiel/useReferentielClient.d.ts +15 -0
- package/dist/v2/referentiel/useReferentielClient.d.ts.map +1 -0
- package/dist/v2/referentiel/useReferentielClient.js +46 -0
- package/dist/v2/referentiel/useReferentielClient.js.map +1 -0
- package/dist/v2/referentiel/useReferentielOptions.d.ts +40 -0
- package/dist/v2/referentiel/useReferentielOptions.d.ts.map +1 -0
- package/dist/v2/referentiel/useReferentielOptions.js +177 -0
- package/dist/v2/referentiel/useReferentielOptions.js.map +1 -0
- package/dist/v2/referentiel/useReferentielSearch.d.ts +76 -0
- package/dist/v2/referentiel/useReferentielSearch.d.ts.map +1 -0
- package/dist/v2/referentiel/useReferentielSearch.js +140 -0
- package/dist/v2/referentiel/useReferentielSearch.js.map +1 -0
- package/dist/v2/styles/base.css +425 -0
- package/dist/v2/styles/css.d.ts +10 -0
- package/dist/v2/styles/index.d.ts +12 -0
- package/dist/v2/styles/index.d.ts.map +1 -0
- package/dist/v2/styles/index.js +4 -0
- package/dist/v2/styles/index.js.map +1 -0
- package/dist/v2/theme/_brand.d.ts +29 -0
- package/dist/v2/theme/_brand.d.ts.map +1 -0
- package/dist/v2/theme/_brand.js +69 -0
- package/dist/v2/theme/_brand.js.map +1 -0
- package/dist/v2/theme/_brandSecondary.d.ts +26 -0
- package/dist/v2/theme/_brandSecondary.d.ts.map +1 -0
- package/dist/v2/theme/_brandSecondary.js +65 -0
- package/dist/v2/theme/_brandSecondary.js.map +1 -0
- package/dist/v2/theme/createPortnetTheme.d.ts +50 -0
- package/dist/v2/theme/createPortnetTheme.d.ts.map +1 -0
- package/dist/v2/theme/createPortnetTheme.js +529 -0
- package/dist/v2/theme/createPortnetTheme.js.map +1 -0
- package/dist/v2/theme/cssVariables.d.ts +41 -0
- package/dist/v2/theme/cssVariables.d.ts.map +1 -0
- package/dist/v2/theme/cssVariables.js +205 -0
- package/dist/v2/theme/cssVariables.js.map +1 -0
- package/dist/v2/theme/index.d.ts +33 -0
- package/dist/v2/theme/index.d.ts.map +1 -0
- package/dist/v2/theme/index.js +60 -0
- package/dist/v2/theme/index.js.map +1 -0
- package/dist/v2/tokens/breakpoints.d.ts +74 -0
- package/dist/v2/tokens/breakpoints.d.ts.map +1 -0
- package/dist/v2/tokens/breakpoints.js +114 -0
- package/dist/v2/tokens/breakpoints.js.map +1 -0
- package/dist/v2/tokens/colors.d.ts +228 -0
- package/dist/v2/tokens/colors.d.ts.map +1 -0
- package/dist/v2/tokens/colors.js +225 -0
- package/dist/v2/tokens/colors.js.map +1 -0
- package/dist/v2/tokens/density.d.ts +142 -0
- package/dist/v2/tokens/density.d.ts.map +1 -0
- package/dist/v2/tokens/density.js +111 -0
- package/dist/v2/tokens/density.js.map +1 -0
- package/dist/v2/tokens/index.d.ts +556 -0
- package/dist/v2/tokens/index.d.ts.map +1 -0
- package/dist/v2/tokens/index.js +313 -0
- package/dist/v2/tokens/index.js.map +1 -0
- package/dist/v2/tokens/motion.d.ts +85 -0
- package/dist/v2/tokens/motion.d.ts.map +1 -0
- package/dist/v2/tokens/motion.js +94 -0
- package/dist/v2/tokens/motion.js.map +1 -0
- package/dist/v2/tokens/radius.d.ts +18 -0
- package/dist/v2/tokens/radius.d.ts.map +1 -0
- package/dist/v2/tokens/radius.js +28 -0
- package/dist/v2/tokens/radius.js.map +1 -0
- package/dist/v2/tokens/shadows.d.ts +25 -0
- package/dist/v2/tokens/shadows.d.ts.map +1 -0
- package/dist/v2/tokens/shadows.js +46 -0
- package/dist/v2/tokens/shadows.js.map +1 -0
- package/dist/v2/tokens/spacing.d.ts +38 -0
- package/dist/v2/tokens/spacing.d.ts.map +1 -0
- package/dist/v2/tokens/spacing.js +57 -0
- package/dist/v2/tokens/spacing.js.map +1 -0
- package/dist/v2/tokens/state.d.ts +40 -0
- package/dist/v2/tokens/state.d.ts.map +1 -0
- package/dist/v2/tokens/state.js +47 -0
- package/dist/v2/tokens/state.js.map +1 -0
- package/dist/v2/tokens/statusPalette.d.ts +54 -0
- package/dist/v2/tokens/statusPalette.d.ts.map +1 -0
- package/dist/v2/tokens/statusPalette.js +72 -0
- package/dist/v2/tokens/statusPalette.js.map +1 -0
- package/dist/v2/tokens/tokens.json +153 -0
- package/dist/v2/tokens/typography.d.ts +206 -0
- package/dist/v2/tokens/typography.d.ts.map +1 -0
- package/dist/v2/tokens/typography.js +155 -0
- package/dist/v2/tokens/typography.js.map +1 -0
- package/dist/v2/tokens/zIndex.d.ts +33 -0
- package/dist/v2/tokens/zIndex.d.ts.map +1 -0
- package/dist/v2/tokens/zIndex.js +50 -0
- package/dist/v2/tokens/zIndex.js.map +1 -0
- package/dist/v2/types/common.d.ts +24 -0
- package/dist/v2/types/common.d.ts.map +1 -0
- package/dist/v2/types/common.js +6 -0
- package/dist/v2/types/common.js.map +1 -0
- package/dist/v2/types/datagrid.d.ts +131 -0
- package/dist/v2/types/datagrid.d.ts.map +1 -0
- package/dist/v2/types/datagrid.js +6 -0
- package/dist/v2/types/datagrid.js.map +1 -0
- package/dist/v2/types/index.d.ts +11 -0
- package/dist/v2/types/index.d.ts.map +1 -0
- package/dist/v2/types/index.js +28 -0
- package/dist/v2/types/index.js.map +1 -0
- package/dist/v2/utils/apiError.d.ts +90 -0
- package/dist/v2/utils/apiError.d.ts.map +1 -0
- package/dist/v2/utils/apiError.js +227 -0
- package/dist/v2/utils/apiError.js.map +1 -0
- package/dist/v2/utils/contrast.d.ts +68 -0
- package/dist/v2/utils/contrast.d.ts.map +1 -0
- package/dist/v2/utils/contrast.js +167 -0
- package/dist/v2/utils/contrast.js.map +1 -0
- package/dist/v2/utils/cx.d.ts +9 -0
- package/dist/v2/utils/cx.d.ts.map +1 -0
- package/dist/v2/utils/cx.js +45 -0
- package/dist/v2/utils/cx.js.map +1 -0
- package/dist/v2/utils/fileDownload.d.ts +94 -0
- package/dist/v2/utils/fileDownload.d.ts.map +1 -0
- package/dist/v2/utils/fileDownload.js +236 -0
- package/dist/v2/utils/fileDownload.js.map +1 -0
- package/dist/v2/utils/fmtMoney.d.ts +28 -0
- package/dist/v2/utils/fmtMoney.d.ts.map +1 -0
- package/dist/v2/utils/fmtMoney.js +84 -0
- package/dist/v2/utils/fmtMoney.js.map +1 -0
- package/dist/v2/utils/index.d.ts +8 -0
- package/dist/v2/utils/index.d.ts.map +1 -0
- package/dist/v2/utils/index.js +90 -0
- package/dist/v2/utils/index.js.map +1 -0
- package/dist/v2/utils/networkStatus.d.ts +88 -0
- package/dist/v2/utils/networkStatus.d.ts.map +1 -0
- package/dist/v2/utils/networkStatus.js +121 -0
- package/dist/v2/utils/networkStatus.js.map +1 -0
- package/package.json +191 -73
- package/dist/api/guideApi.js +0 -12
- package/dist/api/guideImageService.js +0 -119
- package/dist/api/reclamationApi.js +0 -102
- package/dist/assets/guides/FAQ.json +0 -118
- package/dist/assets/guides/index.js +0 -11
- package/dist/assets/images/tijariaLogo.ico +0 -0
- package/dist/components/buttons/PuiButton.js +0 -217
- package/dist/components/buttons/PuiIconButton.js +0 -98
- package/dist/components/common/PuiAlertContext.js +0 -12
- package/dist/components/common/PuiHelpWidgetContext.js +0 -17
- package/dist/components/common/StyledMuiButton.js +0 -48
- package/dist/components/common/StyledMuiTextField.js +0 -180
- package/dist/components/inputs/PuiAutocomplete.js +0 -352
- package/dist/components/inputs/PuiCheckbox.js +0 -308
- package/dist/components/inputs/PuiCheckboxGroup.js +0 -215
- package/dist/components/inputs/PuiCheckboxItem.js +0 -162
- package/dist/components/inputs/PuiDateField.js +0 -280
- package/dist/components/inputs/PuiDateTimeField.js +0 -276
- package/dist/components/inputs/PuiFileField.js +0 -265
- package/dist/components/inputs/PuiRadioGroup.js +0 -197
- package/dist/components/inputs/PuiRadioItem.js +0 -100
- package/dist/components/inputs/PuiSelect.js +0 -427
- package/dist/components/inputs/PuiTextField.js +0 -263
- package/dist/components/others/PuiBadge.js +0 -58
- package/dist/components/others/PuiChip.js +0 -150
- package/dist/components/others/PuiDialog.js +0 -102
- package/dist/components/others/PuiFormikForm.js +0 -70
- package/dist/components/others/PuiGrid.js +0 -23
- package/dist/components/others/PuiIcon.js +0 -92
- package/dist/components/others/PuiLoadingBackdrop.js +0 -32
- package/dist/components/others/PuiMainContainer.js +0 -41
- package/dist/components/others/PuiNavigation.js +0 -68
- package/dist/components/others/PuiSection.js +0 -187
- package/dist/components/others/PuiTooltip.js +0 -86
- package/dist/components/providers/PuiAlertProvider.js +0 -134
- package/dist/components/providers/PuiHelpWidgetProvider.js +0 -91
- package/dist/components/providers/PuiLocalizationProvider.js +0 -34
- package/dist/components/referentiel/common/ReferetielContext.js +0 -12
- package/dist/components/referentiel/common/constants/specificReferentielsApis.js +0 -22
- package/dist/components/referentiel/common/constants/specificReferentielsBaseColumns.js +0 -691
- package/dist/components/referentiel/common/constants/specificReferentielsBaseFilters.js +0 -598
- package/dist/components/referentiel/common/constants/specificReferentielsInitialValues.js +0 -80
- package/dist/components/referentiel/common/constants/specificReferentielsKeys.js +0 -18
- package/dist/components/referentiel/common/constants/specificReferentielsTitles.js +0 -22
- package/dist/components/referentiel/common/constants/specificReferentielsValidationSchemas.js +0 -85
- package/dist/components/referentiel/components/PuiBasePopupReferentielField.js +0 -356
- package/dist/components/referentiel/components/PuiCustomPopupReferentielField.js +0 -181
- package/dist/components/referentiel/components/PuiSimplePopupReferentielField.js +0 -325
- package/dist/components/referentiel/components/PuiSimpleReferentielField.js +0 -203
- package/dist/components/referentiel/components/PuiSpecificReferentielField.js +0 -352
- package/dist/components/referentiel/providers/PuiReferentielProvider.js +0 -66
- package/dist/components/tab/PuiTab.js +0 -25
- package/dist/components/tab/PuiTabs.js +0 -148
- package/dist/components/table/PuiTable.js +0 -643
- package/dist/components/table/PuiTableAction.js +0 -75
- package/dist/components/typography/PuiDefinition.js +0 -42
- package/dist/components/typography/PuiIndication.js +0 -80
- package/dist/components/typography/PuiMainTitle.js +0 -144
- package/dist/components/ui/dialogs/PuiSearchDialog.js +0 -106
- package/dist/components/ui/pages/errors/PuiErrorBasePage.js +0 -73
- package/dist/components/ui/pages/errors/PuiForbiddenErrorPage.js +0 -36
- package/dist/components/ui/pages/errors/PuiNetworkErrorPage.js +0 -36
- package/dist/components/ui/pages/errors/PuiNotFoundErrorPage.js +0 -30
- package/dist/components/ui/pages/errors/PuiServerErrorPage.js +0 -37
- package/dist/components/ui/pages/general/PuiDefaultPage.js +0 -68
- package/dist/components/ui/pages/general/PuiSearchPage.js +0 -203
- package/dist/components/widgets/GuideImage.js +0 -251
- package/dist/components/widgets/PuiHelpWidget.js +0 -4153
- package/dist/config/apperance.js +0 -26
- package/dist/config/mapping.js +0 -26
- package/dist/config/referentiel.js +0 -10
- package/dist/general/yupValidationErrors.js +0 -8
- package/dist/hooks/useAlert.js +0 -19
- package/dist/hooks/useAxios.js +0 -23
- package/dist/hooks/useQuery.js +0 -21
- package/dist/hooks/useReclamation.js +0 -100
- package/dist/styles/ReclamationFormModal.css +0 -629
- package/dist/styles/help-widget.css +0 -621
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* FormErrorSummary — Portnet UI v2
|
|
4
|
+
*
|
|
5
|
+
* Charter §05 / R-FV.2. Synthesis banner rendered above a form after a
|
|
6
|
+
* failed-submit so the user sees, at-a-glance, every field that needs
|
|
7
|
+
* attention. Each entry is a clickable jump-to-field affordance; the host
|
|
8
|
+
* supplies the navigation behaviour via `onItemClick`.
|
|
9
|
+
*
|
|
10
|
+
* Composition: pure v2.Banner + a semantic <ul> of <button> jump-links.
|
|
11
|
+
* No host-specific scroll/focus logic baked in.
|
|
12
|
+
*
|
|
13
|
+
* Renders nothing when `errors` is empty / nullish — host can mount
|
|
14
|
+
* unconditionally above the form.
|
|
15
|
+
*
|
|
16
|
+
* Accessibility:
|
|
17
|
+
* - <button type="button"> instead of <a href="#…">. The entries trigger
|
|
18
|
+
* an action (focus/scroll) and don't navigate.
|
|
19
|
+
* - Explicit role="list" + role="listitem" because some screen readers
|
|
20
|
+
* strip list semantics when CSS list-style:none is applied.
|
|
21
|
+
* - Banner already carries the alert/role semantics for the region.
|
|
22
|
+
* - Explicit :focus-visible outline on each jump-button on --danger-fg,
|
|
23
|
+
* which passes WCAG 1.4.11 ≥ 3:1 on danger-soft (finding B4-EXT-2).
|
|
24
|
+
*
|
|
25
|
+
* Charter R-AI.2: composition of v2.Banner only — no local primitive.
|
|
26
|
+
*/
|
|
27
|
+
export interface FormErrorSummaryError {
|
|
28
|
+
name: string;
|
|
29
|
+
message: string;
|
|
30
|
+
}
|
|
31
|
+
export interface FormErrorSummaryProps {
|
|
32
|
+
errors?: FormErrorSummaryError[];
|
|
33
|
+
labelByName?: Record<string, string>;
|
|
34
|
+
onItemClick?: (name: string) => void;
|
|
35
|
+
title?: string;
|
|
36
|
+
}
|
|
37
|
+
declare function FormErrorSummary({ errors, labelByName, onItemClick, title, }: FormErrorSummaryProps): React.JSX.Element | null;
|
|
38
|
+
export default FormErrorSummary;
|
|
39
|
+
//# sourceMappingURL=FormErrorSummary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormErrorSummary.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/patterns/FormErrorSummary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IACpC,MAAM,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,iBAAS,gBAAgB,CAAC,EACxB,MAAM,EACN,WAAW,EACX,WAAW,EACX,KAAK,GACN,EAAE,qBAAqB,4BAwEvB;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var React = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
10
|
+
var _Banner = _interopRequireDefault(require("../components/Banner"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
/**
|
|
16
|
+
* FormErrorSummary — Portnet UI v2
|
|
17
|
+
*
|
|
18
|
+
* Charter §05 / R-FV.2. Synthesis banner rendered above a form after a
|
|
19
|
+
* failed-submit so the user sees, at-a-glance, every field that needs
|
|
20
|
+
* attention. Each entry is a clickable jump-to-field affordance; the host
|
|
21
|
+
* supplies the navigation behaviour via `onItemClick`.
|
|
22
|
+
*
|
|
23
|
+
* Composition: pure v2.Banner + a semantic <ul> of <button> jump-links.
|
|
24
|
+
* No host-specific scroll/focus logic baked in.
|
|
25
|
+
*
|
|
26
|
+
* Renders nothing when `errors` is empty / nullish — host can mount
|
|
27
|
+
* unconditionally above the form.
|
|
28
|
+
*
|
|
29
|
+
* Accessibility:
|
|
30
|
+
* - <button type="button"> instead of <a href="#…">. The entries trigger
|
|
31
|
+
* an action (focus/scroll) and don't navigate.
|
|
32
|
+
* - Explicit role="list" + role="listitem" because some screen readers
|
|
33
|
+
* strip list semantics when CSS list-style:none is applied.
|
|
34
|
+
* - Banner already carries the alert/role semantics for the region.
|
|
35
|
+
* - Explicit :focus-visible outline on each jump-button on --danger-fg,
|
|
36
|
+
* which passes WCAG 1.4.11 ≥ 3:1 on danger-soft (finding B4-EXT-2).
|
|
37
|
+
*
|
|
38
|
+
* Charter R-AI.2: composition of v2.Banner only — no local primitive.
|
|
39
|
+
*/
|
|
40
|
+
|
|
41
|
+
function FormErrorSummary(_ref) {
|
|
42
|
+
var errors = _ref.errors,
|
|
43
|
+
labelByName = _ref.labelByName,
|
|
44
|
+
onItemClick = _ref.onItemClick,
|
|
45
|
+
title = _ref.title;
|
|
46
|
+
if (!errors || errors.length === 0) return null;
|
|
47
|
+
var heading = title || "Veuillez corriger les erreurs ci-dessous";
|
|
48
|
+
var handleClick = function handleClick(e, name) {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
if (typeof onItemClick === "function") {
|
|
51
|
+
onItemClick(name);
|
|
52
|
+
}
|
|
53
|
+
};
|
|
54
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Banner["default"], {
|
|
55
|
+
variant: "error",
|
|
56
|
+
title: heading,
|
|
57
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
58
|
+
component: "ul",
|
|
59
|
+
role: "list",
|
|
60
|
+
sx: {
|
|
61
|
+
margin: 0,
|
|
62
|
+
paddingInlineStart: "var(--s-5)",
|
|
63
|
+
fontSize: "var(--text-sm)",
|
|
64
|
+
listStyle: "disc"
|
|
65
|
+
},
|
|
66
|
+
children: errors.map(function (err, idx) {
|
|
67
|
+
var label = labelByName && labelByName[err.name] || err.name;
|
|
68
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
69
|
+
component: "li",
|
|
70
|
+
role: "listitem",
|
|
71
|
+
sx: {
|
|
72
|
+
marginBottom: "var(--s-1)"
|
|
73
|
+
},
|
|
74
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
75
|
+
component: "button",
|
|
76
|
+
type: "button",
|
|
77
|
+
onClick: function onClick(e) {
|
|
78
|
+
return handleClick(e, err.name);
|
|
79
|
+
},
|
|
80
|
+
sx: {
|
|
81
|
+
// Reset default <button> chrome so the link reads visually
|
|
82
|
+
// as a hyperlink in the banner body.
|
|
83
|
+
background: "transparent",
|
|
84
|
+
border: "none",
|
|
85
|
+
padding: 0,
|
|
86
|
+
margin: 0,
|
|
87
|
+
font: "inherit",
|
|
88
|
+
cursor: "pointer",
|
|
89
|
+
color: "var(--danger-fg)",
|
|
90
|
+
textDecoration: "underline",
|
|
91
|
+
fontWeight: "var(--fw-medium)",
|
|
92
|
+
// R-F.1 — explicit focus-visible outline. Outline on
|
|
93
|
+
// currentColor (danger-fg) passes 1.4.11 ≥ 3:1 on the soft
|
|
94
|
+
// danger background; borderRadius aligns the ring with the DS.
|
|
95
|
+
"&:focus-visible": {
|
|
96
|
+
outline: "2px solid var(--danger-fg)",
|
|
97
|
+
outlineOffset: "var(--pui-outline-offset)",
|
|
98
|
+
borderRadius: "var(--r-sm)"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
children: label
|
|
102
|
+
}), ": ", /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
103
|
+
children: err.message
|
|
104
|
+
})]
|
|
105
|
+
}, "".concat(err.name, "-").concat(idx));
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
var _default = exports["default"] = FormErrorSummary;
|
|
111
|
+
//# sourceMappingURL=FormErrorSummary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormErrorSummary.js","names":["React","_interopRequireWildcard","require","_Box","_interopRequireDefault","_Banner","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","FormErrorSummary","_ref","errors","labelByName","onItemClick","title","length","heading","handleClick","e","name","preventDefault","jsx","variant","children","component","role","sx","margin","paddingInlineStart","fontSize","listStyle","map","err","idx","label","jsxs","marginBottom","type","onClick","background","border","padding","font","cursor","color","textDecoration","fontWeight","outline","outlineOffset","borderRadius","message","concat","_default","exports"],"sources":["../../../src/lib/v2/patterns/FormErrorSummary.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Box from \"@mui/material/Box\";\r\nimport Banner from \"../components/Banner\";\r\n\r\n/**\r\n * FormErrorSummary — Portnet UI v2\r\n *\r\n * Charter §05 / R-FV.2. Synthesis banner rendered above a form after a\r\n * failed-submit so the user sees, at-a-glance, every field that needs\r\n * attention. Each entry is a clickable jump-to-field affordance; the host\r\n * supplies the navigation behaviour via `onItemClick`.\r\n *\r\n * Composition: pure v2.Banner + a semantic <ul> of <button> jump-links.\r\n * No host-specific scroll/focus logic baked in.\r\n *\r\n * Renders nothing when `errors` is empty / nullish — host can mount\r\n * unconditionally above the form.\r\n *\r\n * Accessibility:\r\n * - <button type=\"button\"> instead of <a href=\"#…\">. The entries trigger\r\n * an action (focus/scroll) and don't navigate.\r\n * - Explicit role=\"list\" + role=\"listitem\" because some screen readers\r\n * strip list semantics when CSS list-style:none is applied.\r\n * - Banner already carries the alert/role semantics for the region.\r\n * - Explicit :focus-visible outline on each jump-button on --danger-fg,\r\n * which passes WCAG 1.4.11 ≥ 3:1 on danger-soft (finding B4-EXT-2).\r\n *\r\n * Charter R-AI.2: composition of v2.Banner only — no local primitive.\r\n */\r\n\r\nexport interface FormErrorSummaryError {\r\n name: string;\r\n message: string;\r\n}\r\n\r\nexport interface FormErrorSummaryProps {\r\n errors?: FormErrorSummaryError[];\r\n labelByName?: Record<string, string>;\r\n onItemClick?: (name: string) => void;\r\n title?: string;\r\n}\r\n\r\nfunction FormErrorSummary({\r\n errors,\r\n labelByName,\r\n onItemClick,\r\n title,\r\n}: FormErrorSummaryProps) {\r\n if (!errors || errors.length === 0) return null;\r\n\r\n const heading = title || \"Veuillez corriger les erreurs ci-dessous\";\r\n\r\n const handleClick = (\r\n e: React.MouseEvent<HTMLButtonElement>,\r\n name: string\r\n ) => {\r\n e.preventDefault();\r\n if (typeof onItemClick === \"function\") {\r\n onItemClick(name);\r\n }\r\n };\r\n\r\n return (\r\n <Banner variant=\"error\" title={heading}>\r\n <Box\r\n component=\"ul\"\r\n role=\"list\"\r\n sx={{\r\n margin: 0,\r\n paddingInlineStart: \"var(--s-5)\",\r\n fontSize: \"var(--text-sm)\",\r\n listStyle: \"disc\",\r\n }}\r\n >\r\n {errors.map((err, idx) => {\r\n const label = (labelByName && labelByName[err.name]) || err.name;\r\n return (\r\n <Box\r\n component=\"li\"\r\n role=\"listitem\"\r\n key={`${err.name}-${idx}`}\r\n sx={{ marginBottom: \"var(--s-1)\" }}\r\n >\r\n <Box\r\n component=\"button\"\r\n type=\"button\"\r\n onClick={(e) => handleClick(e, err.name)}\r\n sx={{\r\n // Reset default <button> chrome so the link reads visually\r\n // as a hyperlink in the banner body.\r\n background: \"transparent\",\r\n border: \"none\",\r\n padding: 0,\r\n margin: 0,\r\n font: \"inherit\",\r\n cursor: \"pointer\",\r\n color: \"var(--danger-fg)\",\r\n textDecoration: \"underline\",\r\n fontWeight: \"var(--fw-medium)\",\r\n // R-F.1 — explicit focus-visible outline. Outline on\r\n // currentColor (danger-fg) passes 1.4.11 ≥ 3:1 on the soft\r\n // danger background; borderRadius aligns the ring with the DS.\r\n \"&:focus-visible\": {\r\n outline: \"2px solid var(--danger-fg)\",\r\n outlineOffset: \"var(--pui-outline-offset)\",\r\n borderRadius: \"var(--r-sm)\",\r\n },\r\n }}\r\n >\r\n {label}\r\n </Box>\r\n {\": \"}\r\n <span>{err.message}</span>\r\n </Box>\r\n );\r\n })}\r\n </Box>\r\n </Banner>\r\n );\r\n}\r\n\r\nexport default FormErrorSummary;\r\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAD,sBAAA,CAAAF,OAAA;AAA0C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAM,GAAA,EAAAG,WAAA,SAAAA,WAAA,IAAAH,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAO,OAAA,CAAAP,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAQ,KAAA,GAAAN,wBAAA,CAAAC,WAAA,OAAAK,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAA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,GAAA;YAAAE,QAAA,EAAOS,GAAG,CAACkB;UAAO,CAAO,CAAC;QAAA,MAAAC,MAAA,CAhClBnB,GAAG,CAACb,IAAI,OAAAgC,MAAA,CAAIlB,GAAG,CAiCpB,CAAC;MAEV,CAAC;IAAC,CACC;EAAC,CACA,CAAC;AAEb;AAAC,IAAAmB,QAAA,GAAAC,OAAA,cAEc5C,gBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SxProps, Theme } from "@mui/material/styles";
|
|
3
|
+
import { type ActionBarProps } from "./ActionBar";
|
|
4
|
+
/**
|
|
5
|
+
* FormPageShell — Portnet UI v2 (pattern)
|
|
6
|
+
*
|
|
7
|
+
* Charter §07 R-L.2 — canonical shell for create/edit form pages.
|
|
8
|
+
*
|
|
9
|
+
* Combines a sticky ActionBar (surface=false, accent title) with a
|
|
10
|
+
* responsive PageContent wrapper so every module's form page has the
|
|
11
|
+
* same structure without reimplementing it.
|
|
12
|
+
*
|
|
13
|
+
* ┌───────────────────────────────────────────────────────────────┐
|
|
14
|
+
* │ 🏠 > Breadcrumb │ sticky
|
|
15
|
+
* │ Title [secondary] [primary] [overflow…] │
|
|
16
|
+
* │ Subtitle │
|
|
17
|
+
* └───────────────────────────────────────────────────────────────┘
|
|
18
|
+
* ┌───────────────────────────────────────────────────────────────┐
|
|
19
|
+
* │ [ProgressBar ── progressLabel] ← if progress prop given │
|
|
20
|
+
* │ children │
|
|
21
|
+
* └───────────────────────────────────────────────────────────────┘
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* <FormPageShell
|
|
25
|
+
* home={() => navigate("/")}
|
|
26
|
+
* back={() => navigate("/list")}
|
|
27
|
+
* breadcrumb={["Autorisations", "Nouvelle autorisation"]}
|
|
28
|
+
* title="Nouvelle autorisation"
|
|
29
|
+
* subtitle="Saisissez les informations…"
|
|
30
|
+
* secondary={[{ label: "Enregistrer", icon: <SaveIcon />, onClick: handleSave }]}
|
|
31
|
+
* primary={{ label: "Déposer", iconRight: <ArrowIcon />, onClick: handleDeposit }}
|
|
32
|
+
* overflow={[{ label: "Retour à la liste", onClick: goBack }]}
|
|
33
|
+
* progress={requiredPct}
|
|
34
|
+
* progressLabel={isComplete ? "Prêt à déposer ✓" : `${filled}/${total} requis`}
|
|
35
|
+
* >
|
|
36
|
+
* <FormSection number={1} title="Informations">…</FormSection>
|
|
37
|
+
* </FormPageShell>
|
|
38
|
+
*/
|
|
39
|
+
export interface FormPageShellProps extends Pick<ActionBarProps, "home" | "back" | "breadcrumb" | "title" | "subtitle" | "icon" | "secondary" | "primary" | "overflow"> {
|
|
40
|
+
/** 0-100; renders a ProgressBar when provided. */
|
|
41
|
+
progress?: number;
|
|
42
|
+
/** Companion text beside the progress bar. */
|
|
43
|
+
progressLabel?: React.ReactNode;
|
|
44
|
+
children?: React.ReactNode;
|
|
45
|
+
/** MUI sx override for PageContent. */
|
|
46
|
+
contentSx?: SxProps<Theme>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Valeurs par défaut inline — plus de defaultProps.
|
|
50
|
+
* React 18.3+ supprime le support de defaultProps pour les function
|
|
51
|
+
* components. Aligné sur le pattern DataGridToolbar (B14).
|
|
52
|
+
*/
|
|
53
|
+
declare function FormPageShell({ home, back, breadcrumb, title, subtitle, icon, secondary, primary, overflow, progress, progressLabel, children, contentSx, }: FormPageShellProps): React.JSX.Element;
|
|
54
|
+
export default FormPageShell;
|
|
55
|
+
//# sourceMappingURL=FormPageShell.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormPageShell.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/patterns/FormPageShell.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAkB,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC;AAI7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,MAAM,WAAW,kBACf,SAAQ,IAAI,CACV,cAAc,EACZ,MAAM,GACN,MAAM,GACN,YAAY,GACZ,OAAO,GACP,UAAU,GACV,MAAM,GACN,WAAW,GACX,SAAS,GACT,UAAU,CACb;IACD,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,uCAAuC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CAC5B;AAmBD;;;;GAIG;AACH,iBAAS,aAAa,CAAC,EAErB,IAAI,EACJ,IAAI,EACJ,UAAU,EACV,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,SAAc,EACd,OAAO,EACP,QAAa,EAEb,QAAQ,EACR,aAAa,EAEb,QAAQ,EACR,SAAS,GACV,EAAE,kBAAkB,qBAoCpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
9
|
+
var _ActionBar = _interopRequireDefault(require("./ActionBar"));
|
|
10
|
+
var _PageContent = _interopRequireDefault(require("./PageContent"));
|
|
11
|
+
var _ProgressBar = _interopRequireDefault(require("../components/ProgressBar"));
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
16
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
17
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
22
|
+
* FormPageShell — Portnet UI v2 (pattern)
|
|
23
|
+
*
|
|
24
|
+
* Charter §07 R-L.2 — canonical shell for create/edit form pages.
|
|
25
|
+
*
|
|
26
|
+
* Combines a sticky ActionBar (surface=false, accent title) with a
|
|
27
|
+
* responsive PageContent wrapper so every module's form page has the
|
|
28
|
+
* same structure without reimplementing it.
|
|
29
|
+
*
|
|
30
|
+
* ┌───────────────────────────────────────────────────────────────┐
|
|
31
|
+
* │ 🏠 > Breadcrumb │ sticky
|
|
32
|
+
* │ Title [secondary] [primary] [overflow…] │
|
|
33
|
+
* │ Subtitle │
|
|
34
|
+
* └───────────────────────────────────────────────────────────────┘
|
|
35
|
+
* ┌───────────────────────────────────────────────────────────────┐
|
|
36
|
+
* │ [ProgressBar ── progressLabel] ← if progress prop given │
|
|
37
|
+
* │ children │
|
|
38
|
+
* └───────────────────────────────────────────────────────────────┘
|
|
39
|
+
*
|
|
40
|
+
* @example
|
|
41
|
+
* <FormPageShell
|
|
42
|
+
* home={() => navigate("/")}
|
|
43
|
+
* back={() => navigate("/list")}
|
|
44
|
+
* breadcrumb={["Autorisations", "Nouvelle autorisation"]}
|
|
45
|
+
* title="Nouvelle autorisation"
|
|
46
|
+
* subtitle="Saisissez les informations…"
|
|
47
|
+
* secondary={[{ label: "Enregistrer", icon: <SaveIcon />, onClick: handleSave }]}
|
|
48
|
+
* primary={{ label: "Déposer", iconRight: <ArrowIcon />, onClick: handleDeposit }}
|
|
49
|
+
* overflow={[{ label: "Retour à la liste", onClick: goBack }]}
|
|
50
|
+
* progress={requiredPct}
|
|
51
|
+
* progressLabel={isComplete ? "Prêt à déposer ✓" : `${filled}/${total} requis`}
|
|
52
|
+
* >
|
|
53
|
+
* <FormSection number={1} title="Informations">…</FormSection>
|
|
54
|
+
* </FormPageShell>
|
|
55
|
+
*/
|
|
56
|
+
var PROGRESS_ROW_SX = Object.freeze({
|
|
57
|
+
display: "flex",
|
|
58
|
+
alignItems: "center",
|
|
59
|
+
gap: "var(--s-3)",
|
|
60
|
+
marginBottom: "var(--s-5)"
|
|
61
|
+
});
|
|
62
|
+
var PROGRESS_BAR_WRAPPER_SX = Object.freeze({
|
|
63
|
+
flex: 1,
|
|
64
|
+
minWidth: 0
|
|
65
|
+
});
|
|
66
|
+
var PROGRESS_LABEL_SX = Object.freeze({
|
|
67
|
+
fontSize: "var(--text-xs)",
|
|
68
|
+
color: "var(--fg-muted)",
|
|
69
|
+
whiteSpace: "nowrap",
|
|
70
|
+
fontVariantNumeric: "tabular-nums",
|
|
71
|
+
flexShrink: 0
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Valeurs par défaut inline — plus de defaultProps.
|
|
76
|
+
* React 18.3+ supprime le support de defaultProps pour les function
|
|
77
|
+
* components. Aligné sur le pattern DataGridToolbar (B14).
|
|
78
|
+
*/
|
|
79
|
+
function FormPageShell(_ref) {
|
|
80
|
+
var home = _ref.home,
|
|
81
|
+
back = _ref.back,
|
|
82
|
+
breadcrumb = _ref.breadcrumb,
|
|
83
|
+
title = _ref.title,
|
|
84
|
+
subtitle = _ref.subtitle,
|
|
85
|
+
icon = _ref.icon,
|
|
86
|
+
_ref$secondary = _ref.secondary,
|
|
87
|
+
secondary = _ref$secondary === void 0 ? [] : _ref$secondary,
|
|
88
|
+
primary = _ref.primary,
|
|
89
|
+
_ref$overflow = _ref.overflow,
|
|
90
|
+
overflow = _ref$overflow === void 0 ? [] : _ref$overflow,
|
|
91
|
+
progress = _ref.progress,
|
|
92
|
+
progressLabel = _ref.progressLabel,
|
|
93
|
+
children = _ref.children,
|
|
94
|
+
contentSx = _ref.contentSx;
|
|
95
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
96
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ActionBar["default"], _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({
|
|
97
|
+
surface: false,
|
|
98
|
+
title: title,
|
|
99
|
+
subtitle: subtitle,
|
|
100
|
+
secondary: secondary,
|
|
101
|
+
overflow: overflow
|
|
102
|
+
}, home !== undefined ? {
|
|
103
|
+
home: home
|
|
104
|
+
} : {}), back !== undefined ? {
|
|
105
|
+
back: back
|
|
106
|
+
} : {}), breadcrumb !== undefined ? {
|
|
107
|
+
breadcrumb: breadcrumb
|
|
108
|
+
} : {}), icon !== undefined ? {
|
|
109
|
+
icon: icon
|
|
110
|
+
} : {}), primary !== undefined ? {
|
|
111
|
+
primary: primary
|
|
112
|
+
} : {})), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_PageContent["default"], _objectSpread(_objectSpread({}, contentSx !== undefined ? {
|
|
113
|
+
sx: contentSx
|
|
114
|
+
} : {}), {}, {
|
|
115
|
+
children: [typeof progress === "number" && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
116
|
+
sx: PROGRESS_ROW_SX,
|
|
117
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
118
|
+
sx: PROGRESS_BAR_WRAPPER_SX,
|
|
119
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ProgressBar["default"], {
|
|
120
|
+
value: progress,
|
|
121
|
+
"aria-label": "Avancement de la saisie"
|
|
122
|
+
})
|
|
123
|
+
}), progressLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
124
|
+
component: "span",
|
|
125
|
+
sx: PROGRESS_LABEL_SX,
|
|
126
|
+
children: progressLabel
|
|
127
|
+
})]
|
|
128
|
+
}), children]
|
|
129
|
+
}))]
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
var _default = exports["default"] = FormPageShell;
|
|
133
|
+
//# sourceMappingURL=FormPageShell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormPageShell.js","names":["React","_interopRequireWildcard","require","_Box","_interopRequireDefault","_ActionBar","_PageContent","_ProgressBar","_jsxRuntime","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Symbol","iterator","constructor","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","TypeError","Number","PROGRESS_ROW_SX","freeze","display","alignItems","gap","marginBottom","PROGRESS_BAR_WRAPPER_SX","flex","minWidth","PROGRESS_LABEL_SX","fontSize","color","whiteSpace","fontVariantNumeric","flexShrink","FormPageShell","_ref","home","back","breadcrumb","title","subtitle","icon","_ref$secondary","secondary","primary","_ref$overflow","overflow","progress","progressLabel","children","contentSx","jsxs","Fragment","jsx","surface","sx","component","_default","exports"],"sources":["../../../src/lib/v2/patterns/FormPageShell.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Box from \"@mui/material/Box\";\r\nimport type { SxProps, Theme } from \"@mui/material/styles\";\r\nimport ActionBar, { type ActionBarProps } from \"./ActionBar\";\r\nimport PageContent from \"./PageContent\";\r\nimport ProgressBar from \"../components/ProgressBar\";\r\n\r\n/**\r\n * FormPageShell — Portnet UI v2 (pattern)\r\n *\r\n * Charter §07 R-L.2 — canonical shell for create/edit form pages.\r\n *\r\n * Combines a sticky ActionBar (surface=false, accent title) with a\r\n * responsive PageContent wrapper so every module's form page has the\r\n * same structure without reimplementing it.\r\n *\r\n * ┌───────────────────────────────────────────────────────────────┐\r\n * │ 🏠 > Breadcrumb │ sticky\r\n * │ Title [secondary] [primary] [overflow…] │\r\n * │ Subtitle │\r\n * └───────────────────────────────────────────────────────────────┘\r\n * ┌───────────────────────────────────────────────────────────────┐\r\n * │ [ProgressBar ── progressLabel] ← if progress prop given │\r\n * │ children │\r\n * └───────────────────────────────────────────────────────────────┘\r\n *\r\n * @example\r\n * <FormPageShell\r\n * home={() => navigate(\"/\")}\r\n * back={() => navigate(\"/list\")}\r\n * breadcrumb={[\"Autorisations\", \"Nouvelle autorisation\"]}\r\n * title=\"Nouvelle autorisation\"\r\n * subtitle=\"Saisissez les informations…\"\r\n * secondary={[{ label: \"Enregistrer\", icon: <SaveIcon />, onClick: handleSave }]}\r\n * primary={{ label: \"Déposer\", iconRight: <ArrowIcon />, onClick: handleDeposit }}\r\n * overflow={[{ label: \"Retour à la liste\", onClick: goBack }]}\r\n * progress={requiredPct}\r\n * progressLabel={isComplete ? \"Prêt à déposer ✓\" : `${filled}/${total} requis`}\r\n * >\r\n * <FormSection number={1} title=\"Informations\">…</FormSection>\r\n * </FormPageShell>\r\n */\r\n\r\nexport interface FormPageShellProps\r\n extends Pick<\r\n ActionBarProps,\r\n | \"home\"\r\n | \"back\"\r\n | \"breadcrumb\"\r\n | \"title\"\r\n | \"subtitle\"\r\n | \"icon\"\r\n | \"secondary\"\r\n | \"primary\"\r\n | \"overflow\"\r\n > {\r\n /** 0-100; renders a ProgressBar when provided. */\r\n progress?: number;\r\n /** Companion text beside the progress bar. */\r\n progressLabel?: React.ReactNode;\r\n children?: React.ReactNode;\r\n /** MUI sx override for PageContent. */\r\n contentSx?: SxProps<Theme>;\r\n}\r\n\r\nconst PROGRESS_ROW_SX = Object.freeze({\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n gap: \"var(--s-3)\",\r\n marginBottom: \"var(--s-5)\",\r\n} satisfies SxProps<Theme>);\r\n\r\nconst PROGRESS_BAR_WRAPPER_SX = Object.freeze({ flex: 1, minWidth: 0 });\r\n\r\nconst PROGRESS_LABEL_SX = Object.freeze({\r\n fontSize: \"var(--text-xs)\",\r\n color: \"var(--fg-muted)\",\r\n whiteSpace: \"nowrap\",\r\n fontVariantNumeric: \"tabular-nums\",\r\n flexShrink: 0,\r\n} satisfies SxProps<Theme>);\r\n\r\n/**\r\n * Valeurs par défaut inline — plus de defaultProps.\r\n * React 18.3+ supprime le support de defaultProps pour les function\r\n * components. Aligné sur le pattern DataGridToolbar (B14).\r\n */\r\nfunction FormPageShell({\r\n /* ActionBar props */\r\n home,\r\n back,\r\n breadcrumb,\r\n title,\r\n subtitle,\r\n icon,\r\n secondary = [],\r\n primary,\r\n overflow = [],\r\n /* Progress slot */\r\n progress,\r\n progressLabel,\r\n /* Content */\r\n children,\r\n contentSx,\r\n}: FormPageShellProps) {\r\n return (\r\n <>\r\n <ActionBar\r\n surface={false}\r\n title={title}\r\n subtitle={subtitle}\r\n secondary={secondary}\r\n overflow={overflow}\r\n {...(home !== undefined ? { home } : {})}\r\n {...(back !== undefined ? { back } : {})}\r\n {...(breadcrumb !== undefined ? { breadcrumb } : {})}\r\n {...(icon !== undefined ? { icon } : {})}\r\n {...(primary !== undefined ? { primary } : {})}\r\n />\r\n\r\n <PageContent {...(contentSx !== undefined ? { sx: contentSx } : {})}>\r\n {typeof progress === \"number\" && (\r\n <Box sx={PROGRESS_ROW_SX}>\r\n <Box sx={PROGRESS_BAR_WRAPPER_SX}>\r\n <ProgressBar\r\n value={progress}\r\n aria-label=\"Avancement de la saisie\"\r\n />\r\n </Box>\r\n {progressLabel && (\r\n <Box component=\"span\" sx={PROGRESS_LABEL_SX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gG,GAAA,EAACrG,IAAA,WAAG;UAACuG,EAAE,EAAE9B,uBAAwB;UAAAwB,QAAA,eAC/B,IAAA5F,WAAA,CAAAgG,GAAA,EAACjG,YAAA,WAAW;YACVgD,KAAK,EAAE2C,QAAS;YAChB,cAAW;UAAyB,CACrC;QAAC,CACC,CAAC,EACLC,aAAa,iBACZ,IAAA3F,WAAA,CAAAgG,GAAA,EAACrG,IAAA,WAAG;UAACwG,SAAS,EAAC,MAAM;UAACD,EAAE,EAAE3B,iBAAkB;UAAAqB,QAAA,EACzCD;QAAa,CACX,CACN;MAAA,CACE,CACN,EACAC,QAAQ;IAAA,EACE,CAAC;EAAA,CACd,CAAC;AAEP;AAAC,IAAAQ,QAAA,GAAAC,OAAA,cAEcxB,aAAa","ignoreList":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SxProps, Theme } from "@mui/material/styles";
|
|
3
|
+
/**
|
|
4
|
+
* FormSection - Portnet UI v2 (pattern)
|
|
5
|
+
*
|
|
6
|
+
* Charter R-3.1 — groups form fields into named, numbered sections.
|
|
7
|
+
* Charter R-3.2 — 3-column grid is the standard for form sections.
|
|
8
|
+
*
|
|
9
|
+
* cols (default 3):
|
|
10
|
+
* 3 — three equal columns (DEFAULT — standard form layout)
|
|
11
|
+
* 2 — two equal columns (narrow forms, few fields, wide labels)
|
|
12
|
+
* 1 — single column (textareas, file uploads, notes)
|
|
13
|
+
* "auto" — auto-fill tracks min 220px
|
|
14
|
+
* "none" — no grid wrapper — children manage their own layout.
|
|
15
|
+
* Use for: KVGrid, DataGrid, nested FormGrid.
|
|
16
|
+
*
|
|
17
|
+
* Full-width items within a 3-col section:
|
|
18
|
+
* <FormGrid.Full><FormikTextarea name="obs" /></FormGrid.Full>
|
|
19
|
+
*
|
|
20
|
+
* Usage:
|
|
21
|
+
* // Standard form section — 3 cols (no need to specify)
|
|
22
|
+
* <FormSection number={1} title="Identification">
|
|
23
|
+
* <FormikInput name="nom" label="Nom" />
|
|
24
|
+
* <FormikInput name="prenom" label="Prénom" />
|
|
25
|
+
* <FormikInput name="code" label="Code" />
|
|
26
|
+
* </FormSection>
|
|
27
|
+
*
|
|
28
|
+
* // Read-only section — self-managed layout
|
|
29
|
+
* <FormSection title="Importateur" cols="none">
|
|
30
|
+
* <KVGrid minColumnWidth={180}>...</KVGrid>
|
|
31
|
+
* </FormSection>
|
|
32
|
+
*/
|
|
33
|
+
export interface FormSectionProps {
|
|
34
|
+
number?: number | string;
|
|
35
|
+
title: React.ReactNode;
|
|
36
|
+
description?: React.ReactNode;
|
|
37
|
+
actions?: React.ReactNode;
|
|
38
|
+
srLabel?: (n: number | string) => React.ReactNode;
|
|
39
|
+
headingLevel?: 2 | 3 | 4 | 5 | 6;
|
|
40
|
+
/**
|
|
41
|
+
* cols — Charter R-3.2 field layout.
|
|
42
|
+
* 3 (DEFAULT) : 3 equal columns — standard form layout.
|
|
43
|
+
* 2 | 1 : fewer columns for narrow/simple forms.
|
|
44
|
+
* "auto" : auto-fill tracks min 220px.
|
|
45
|
+
* "none" : no grid wrapper — children manage own layout.
|
|
46
|
+
*/
|
|
47
|
+
cols?: number | "auto" | "none";
|
|
48
|
+
children: React.ReactNode;
|
|
49
|
+
sx?: SxProps<Theme>;
|
|
50
|
+
}
|
|
51
|
+
declare function FormSection({ number, title, description, actions, srLabel, headingLevel, cols, children, sx, }: FormSectionProps): React.JSX.Element;
|
|
52
|
+
export default FormSection;
|
|
53
|
+
//# sourceMappingURL=FormSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormSection.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/patterns/FormSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAI3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IAClD,YAAY,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IACjC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;IAChC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAaD,iBAAS,WAAW,CAAC,EACnB,MAAM,EACN,KAAK,EACL,WAAW,EACX,OAAO,EACP,OAA0B,EAC1B,YAAgB,EAChB,IAAQ,EACR,QAAQ,EACR,EAAE,GACH,EAAE,gBAAgB,qBAkGlB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var React = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
9
|
+
var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
|
|
10
|
+
var _FormGrid = _interopRequireDefault(require("../components/FormGrid"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
16
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
17
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
18
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
19
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); } /**
|
|
21
|
+
* FormSection - Portnet UI v2 (pattern)
|
|
22
|
+
*
|
|
23
|
+
* Charter R-3.1 — groups form fields into named, numbered sections.
|
|
24
|
+
* Charter R-3.2 — 3-column grid is the standard for form sections.
|
|
25
|
+
*
|
|
26
|
+
* cols (default 3):
|
|
27
|
+
* 3 — three equal columns (DEFAULT — standard form layout)
|
|
28
|
+
* 2 — two equal columns (narrow forms, few fields, wide labels)
|
|
29
|
+
* 1 — single column (textareas, file uploads, notes)
|
|
30
|
+
* "auto" — auto-fill tracks min 220px
|
|
31
|
+
* "none" — no grid wrapper — children manage their own layout.
|
|
32
|
+
* Use for: KVGrid, DataGrid, nested FormGrid.
|
|
33
|
+
*
|
|
34
|
+
* Full-width items within a 3-col section:
|
|
35
|
+
* <FormGrid.Full><FormikTextarea name="obs" /></FormGrid.Full>
|
|
36
|
+
*
|
|
37
|
+
* Usage:
|
|
38
|
+
* // Standard form section — 3 cols (no need to specify)
|
|
39
|
+
* <FormSection number={1} title="Identification">
|
|
40
|
+
* <FormikInput name="nom" label="Nom" />
|
|
41
|
+
* <FormikInput name="prenom" label="Prénom" />
|
|
42
|
+
* <FormikInput name="code" label="Code" />
|
|
43
|
+
* </FormSection>
|
|
44
|
+
*
|
|
45
|
+
* // Read-only section — self-managed layout
|
|
46
|
+
* <FormSection title="Importateur" cols="none">
|
|
47
|
+
* <KVGrid minColumnWidth={180}>...</KVGrid>
|
|
48
|
+
* </FormSection>
|
|
49
|
+
*/
|
|
50
|
+
var DEFAULT_SR_LABEL = function DEFAULT_SR_LABEL(n) {
|
|
51
|
+
return "Section ".concat(n, " : ");
|
|
52
|
+
};
|
|
53
|
+
function resolveGridProps(cols) {
|
|
54
|
+
if (!cols || cols === "none") return null;
|
|
55
|
+
if (cols === "auto") return {
|
|
56
|
+
minColumnWidth: 220
|
|
57
|
+
};
|
|
58
|
+
if (typeof cols === "number") return {
|
|
59
|
+
columns: cols
|
|
60
|
+
};
|
|
61
|
+
return null;
|
|
62
|
+
}
|
|
63
|
+
function FormSection(_ref) {
|
|
64
|
+
var number = _ref.number,
|
|
65
|
+
title = _ref.title,
|
|
66
|
+
description = _ref.description,
|
|
67
|
+
actions = _ref.actions,
|
|
68
|
+
_ref$srLabel = _ref.srLabel,
|
|
69
|
+
srLabel = _ref$srLabel === void 0 ? DEFAULT_SR_LABEL : _ref$srLabel,
|
|
70
|
+
_ref$headingLevel = _ref.headingLevel,
|
|
71
|
+
headingLevel = _ref$headingLevel === void 0 ? 2 : _ref$headingLevel,
|
|
72
|
+
_ref$cols = _ref.cols,
|
|
73
|
+
cols = _ref$cols === void 0 ? 3 : _ref$cols,
|
|
74
|
+
children = _ref.children,
|
|
75
|
+
sx = _ref.sx;
|
|
76
|
+
var HeadingTag = "h".concat(headingLevel);
|
|
77
|
+
var gridProps = resolveGridProps(cols);
|
|
78
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
79
|
+
sx: _objectSpread({
|
|
80
|
+
background: "var(--surface)",
|
|
81
|
+
border: "1px solid var(--border)",
|
|
82
|
+
borderRadius: "var(--r-lg)",
|
|
83
|
+
marginBottom: 3
|
|
84
|
+
}, sx),
|
|
85
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
86
|
+
sx: {
|
|
87
|
+
padding: "var(--s-4) var(--s-5)",
|
|
88
|
+
borderBottom: "1px solid var(--border)",
|
|
89
|
+
display: "flex",
|
|
90
|
+
alignItems: "flex-start",
|
|
91
|
+
justifyContent: "space-between",
|
|
92
|
+
gap: 2
|
|
93
|
+
},
|
|
94
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
95
|
+
sx: {
|
|
96
|
+
display: "flex",
|
|
97
|
+
gap: 2,
|
|
98
|
+
alignItems: "flex-start",
|
|
99
|
+
flex: 1,
|
|
100
|
+
minWidth: 0
|
|
101
|
+
},
|
|
102
|
+
children: [number != null && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
103
|
+
"aria-hidden": "true",
|
|
104
|
+
sx: {
|
|
105
|
+
flexShrink: 0,
|
|
106
|
+
width: 28,
|
|
107
|
+
height: 28,
|
|
108
|
+
borderRadius: "var(--r-full)",
|
|
109
|
+
background: "var(--accent-soft)",
|
|
110
|
+
color: "var(--accent)",
|
|
111
|
+
display: "grid",
|
|
112
|
+
placeItems: "center",
|
|
113
|
+
fontSize: "var(--text-sm)",
|
|
114
|
+
fontWeight: "var(--fw-bold)"
|
|
115
|
+
},
|
|
116
|
+
children: number
|
|
117
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
118
|
+
sx: {
|
|
119
|
+
minWidth: 0
|
|
120
|
+
},
|
|
121
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Typography["default"], {
|
|
122
|
+
component: HeadingTag,
|
|
123
|
+
sx: {
|
|
124
|
+
/* R-2.3 / R-AI.1 MUST — was a bare `15`, a magic font-size no
|
|
125
|
+
* token can express (the type scale is 12/13/14/16/20/26).
|
|
126
|
+
* The Charter's own typography table assigns --text-h3 (16px)
|
|
127
|
+
* to "Card / form group" titles, which is exactly what a
|
|
128
|
+
* FormSection header is. Fleet-wide 15→16px on section
|
|
129
|
+
* headers — needs visual confirmation, but 15 could not
|
|
130
|
+
* remain: it is unrepresentable in the token system. */
|
|
131
|
+
fontSize: "var(--text-h3)",
|
|
132
|
+
fontWeight: "var(--fw-bold)",
|
|
133
|
+
color: "var(--fg)",
|
|
134
|
+
lineHeight: "var(--lh-snug)",
|
|
135
|
+
margin: 0
|
|
136
|
+
},
|
|
137
|
+
children: [number != null && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
138
|
+
className: "pui-sr-only",
|
|
139
|
+
children: srLabel(number)
|
|
140
|
+
}), title]
|
|
141
|
+
}), description && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Typography["default"], {
|
|
142
|
+
sx: {
|
|
143
|
+
fontSize: "var(--text-xs)",
|
|
144
|
+
color: "var(--fg-muted)",
|
|
145
|
+
marginTop: 0.25
|
|
146
|
+
},
|
|
147
|
+
children: description
|
|
148
|
+
})]
|
|
149
|
+
})]
|
|
150
|
+
}), actions]
|
|
151
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
152
|
+
sx: {
|
|
153
|
+
padding: "var(--s-5)"
|
|
154
|
+
},
|
|
155
|
+
children: gridProps ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormGrid["default"], _objectSpread(_objectSpread({}, gridProps), {}, {
|
|
156
|
+
children: children
|
|
157
|
+
})) : children
|
|
158
|
+
})]
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
var _default = exports["default"] = FormSection;
|
|
162
|
+
//# sourceMappingURL=FormSection.js.map
|