@portnet/ui 5.0.28 → 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 -76
- 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 -4167
- 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,78 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { RadioProps as MuiRadioProps } from "@mui/material/Radio";
|
|
3
|
+
import type { RadioGroupProps as MuiRadioGroupProps } from "@mui/material/RadioGroup";
|
|
4
|
+
/**
|
|
5
|
+
* Radio - Portnet UI v2
|
|
6
|
+
*
|
|
7
|
+
* Charter §03 · Component "Radio". Required by R-Sel.2 (2-3 options
|
|
8
|
+
* -> Radio or Segmented).
|
|
9
|
+
*
|
|
10
|
+
* Low-level: a single controlled radio. For typical usage, prefer
|
|
11
|
+
* <RadioGroup options={...}> below.
|
|
12
|
+
*
|
|
13
|
+
* <Radio checked={v === "a"} onChange={() => setV("a")} label="Option A" value="a" />
|
|
14
|
+
*
|
|
15
|
+
* MUI v9 surface notes (audit Batch 2 external):
|
|
16
|
+
* The public `inputProps` is routed internally to slotProps.input -
|
|
17
|
+
* MUI v9 idiomatic location for native <input type="radio"/> attributes.
|
|
18
|
+
* `inputProps` was deprecated in v6 and REMOVED in v9, so it is no longer
|
|
19
|
+
* inherited from MuiRadioProps and must be re-declared here. Consumer code
|
|
20
|
+
* passing `inputProps={...}` to v2.Radio is unchanged.
|
|
21
|
+
*/
|
|
22
|
+
export interface RadioProps extends MuiRadioProps {
|
|
23
|
+
label?: React.ReactNode;
|
|
24
|
+
/** Native <input> attributes. Routed to slotProps.input (v9). */
|
|
25
|
+
inputProps?: React.InputHTMLAttributes<HTMLInputElement>;
|
|
26
|
+
}
|
|
27
|
+
export declare const Radio: React.ForwardRefExoticComponent<Omit<RadioProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
28
|
+
/**
|
|
29
|
+
* RadioGroup - Portnet UI v2
|
|
30
|
+
*
|
|
31
|
+
* Declarative group of radios taking an `options` array. Use inside
|
|
32
|
+
* <Field> for label / hint / error / a11y wiring.
|
|
33
|
+
*
|
|
34
|
+
* <Field label="Type d'opération" required>
|
|
35
|
+
* <RadioGroup
|
|
36
|
+
* value={op}
|
|
37
|
+
* onChange={e => setOp(e.target.value)}
|
|
38
|
+
* options={[
|
|
39
|
+
* { value: "import", label: "Importation" },
|
|
40
|
+
* { value: "export", label: "Exportation" },
|
|
41
|
+
* { value: "transit", label: "Transit", helper: "Marchandises en transit douanier" },
|
|
42
|
+
* ]}
|
|
43
|
+
* />
|
|
44
|
+
* </Field>
|
|
45
|
+
*
|
|
46
|
+
* Layout:
|
|
47
|
+
* row={false} (default) -> vertical stack
|
|
48
|
+
* row={true} -> horizontal (use only when labels are short)
|
|
49
|
+
*
|
|
50
|
+
* A11y (audit Batch 5, finding B3-3):
|
|
51
|
+
* When an option carries a `helper` text, RadioGroup wires it
|
|
52
|
+
* to the inner radio input via aria-describedby - SR users hear
|
|
53
|
+
* the helper alongside the label when navigating. Without this
|
|
54
|
+
* link the helper is purely visual.
|
|
55
|
+
*
|
|
56
|
+
* A11y (audit Batch 19, RG-1):
|
|
57
|
+
* Used inside <Field>, Field cloneElement-injects presentational /
|
|
58
|
+
* validation props onto this group. `error` and `fullWidth` are not valid
|
|
59
|
+
* on the role="radiogroup" element (React emits "non-boolean / unrecognized
|
|
60
|
+
* attribute" warnings), so they are stripped before the spread. The aria-*
|
|
61
|
+
* (labelledby / describedby / invalid) and id that Field also injects stay
|
|
62
|
+
* valid on the group and are still forwarded.
|
|
63
|
+
*/
|
|
64
|
+
export interface RadioOption {
|
|
65
|
+
value: string | number;
|
|
66
|
+
label: React.ReactNode;
|
|
67
|
+
helper?: React.ReactNode;
|
|
68
|
+
disabled?: boolean;
|
|
69
|
+
}
|
|
70
|
+
export type RadioGroupOption = string | RadioOption;
|
|
71
|
+
export interface RadioGroupProps extends Omit<MuiRadioGroupProps, "value" | "children"> {
|
|
72
|
+
value?: string | number;
|
|
73
|
+
options?: RadioGroupOption[];
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
}
|
|
76
|
+
export declare function RadioGroup({ value, onChange, options, row, disabled, name, id, sx, ...rest }: RadioGroupProps): React.JSX.Element;
|
|
77
|
+
export default Radio;
|
|
78
|
+
//# sourceMappingURL=Radio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/components/Radio.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,KAAK,EAAE,eAAe,IAAI,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAItF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,UAAW,SAAQ,aAAa;IAC/C,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,iEAAiE;IACjE,UAAU,CAAC,EAAE,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CAC1D;AAED,eAAO,MAAM,KAAK,mGAyChB,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,WAAW,CAAC;AAEpD,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,kBAAkB,EAAE,OAAO,GAAG,UAAU,CAAC;IACrF,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,OAAY,EACZ,GAAW,EACX,QAAgB,EAChB,IAAI,EACJ,EAAE,EACF,EAAE,EACF,GAAG,IAAI,EACR,EAAE,eAAe,qBAkFjB;AAED,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Radio = void 0;
|
|
7
|
+
exports.RadioGroup = RadioGroup;
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
var React = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _Radio = _interopRequireDefault(require("@mui/material/Radio"));
|
|
11
|
+
var _RadioGroup = _interopRequireDefault(require("@mui/material/RadioGroup"));
|
|
12
|
+
var _FormControlLabel = _interopRequireDefault(require("@mui/material/FormControlLabel"));
|
|
13
|
+
var _Box = _interopRequireDefault(require("@mui/material/Box"));
|
|
14
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
+
var _excluded = ["checked", "onChange", "label", "value", "disabled", "inputProps", "sx"],
|
|
16
|
+
_excluded2 = ["value", "onChange", "options", "row", "disabled", "name", "id", "sx"],
|
|
17
|
+
_excluded3 = ["error", "fullWidth"];
|
|
18
|
+
/**
|
|
19
|
+
* Radio - Portnet UI v2
|
|
20
|
+
*
|
|
21
|
+
* Charter §03 · Component "Radio". Required by R-Sel.2 (2-3 options
|
|
22
|
+
* -> Radio or Segmented).
|
|
23
|
+
*
|
|
24
|
+
* Low-level: a single controlled radio. For typical usage, prefer
|
|
25
|
+
* <RadioGroup options={...}> below.
|
|
26
|
+
*
|
|
27
|
+
* <Radio checked={v === "a"} onChange={() => setV("a")} label="Option A" value="a" />
|
|
28
|
+
*
|
|
29
|
+
* MUI v9 surface notes (audit Batch 2 external):
|
|
30
|
+
* The public `inputProps` is routed internally to slotProps.input -
|
|
31
|
+
* MUI v9 idiomatic location for native <input type="radio"/> attributes.
|
|
32
|
+
* `inputProps` was deprecated in v6 and REMOVED in v9, so it is no longer
|
|
33
|
+
* inherited from MuiRadioProps and must be re-declared here. Consumer code
|
|
34
|
+
* passing `inputProps={...}` to v2.Radio is unchanged.
|
|
35
|
+
*/
|
|
36
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37
|
+
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); }
|
|
38
|
+
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; }
|
|
39
|
+
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); }
|
|
40
|
+
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; }
|
|
41
|
+
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; }
|
|
42
|
+
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; }
|
|
43
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
44
|
+
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); }
|
|
45
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
46
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
47
|
+
var Radio = exports.Radio = /*#__PURE__*/React.forwardRef(function Radio(_ref, ref) {
|
|
48
|
+
var checked = _ref.checked,
|
|
49
|
+
onChange = _ref.onChange,
|
|
50
|
+
label = _ref.label,
|
|
51
|
+
value = _ref.value,
|
|
52
|
+
disabled = _ref.disabled,
|
|
53
|
+
inputProps = _ref.inputProps,
|
|
54
|
+
sx = _ref.sx,
|
|
55
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
56
|
+
var radio = /*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio["default"], _objectSpread({
|
|
57
|
+
ref: ref,
|
|
58
|
+
checked: !!checked,
|
|
59
|
+
onChange: onChange,
|
|
60
|
+
value: value,
|
|
61
|
+
disabled: disabled,
|
|
62
|
+
size: "small"
|
|
63
|
+
// MUI v9: Radio inputProps -> slotProps.input (same migration class
|
|
64
|
+
// as Checkbox / Switch / NumberInput). Emitted conditionally so we
|
|
65
|
+
// don't pass `slotProps={{ input: undefined }}` when nothing is
|
|
66
|
+
// supplied.
|
|
67
|
+
,
|
|
68
|
+
slotProps: inputProps ? {
|
|
69
|
+
input: inputProps
|
|
70
|
+
} : undefined,
|
|
71
|
+
sx: _objectSpread({
|
|
72
|
+
padding: "6px",
|
|
73
|
+
"&:focus-visible": {
|
|
74
|
+
outline: "2px solid var(--accent)",
|
|
75
|
+
outlineOffset: "var(--pui-outline-offset)"
|
|
76
|
+
}
|
|
77
|
+
}, sx)
|
|
78
|
+
}, rest));
|
|
79
|
+
if (!label) return radio;
|
|
80
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControlLabel["default"], {
|
|
81
|
+
control: radio,
|
|
82
|
+
label: label,
|
|
83
|
+
value: value,
|
|
84
|
+
disabled: disabled,
|
|
85
|
+
sx: {
|
|
86
|
+
margin: 0,
|
|
87
|
+
"& .MuiFormControlLabel-label": {
|
|
88
|
+
fontSize: "var(--text-sm, 13px)"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
});
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* RadioGroup - Portnet UI v2
|
|
96
|
+
*
|
|
97
|
+
* Declarative group of radios taking an `options` array. Use inside
|
|
98
|
+
* <Field> for label / hint / error / a11y wiring.
|
|
99
|
+
*
|
|
100
|
+
* <Field label="Type d'opération" required>
|
|
101
|
+
* <RadioGroup
|
|
102
|
+
* value={op}
|
|
103
|
+
* onChange={e => setOp(e.target.value)}
|
|
104
|
+
* options={[
|
|
105
|
+
* { value: "import", label: "Importation" },
|
|
106
|
+
* { value: "export", label: "Exportation" },
|
|
107
|
+
* { value: "transit", label: "Transit", helper: "Marchandises en transit douanier" },
|
|
108
|
+
* ]}
|
|
109
|
+
* />
|
|
110
|
+
* </Field>
|
|
111
|
+
*
|
|
112
|
+
* Layout:
|
|
113
|
+
* row={false} (default) -> vertical stack
|
|
114
|
+
* row={true} -> horizontal (use only when labels are short)
|
|
115
|
+
*
|
|
116
|
+
* A11y (audit Batch 5, finding B3-3):
|
|
117
|
+
* When an option carries a `helper` text, RadioGroup wires it
|
|
118
|
+
* to the inner radio input via aria-describedby - SR users hear
|
|
119
|
+
* the helper alongside the label when navigating. Without this
|
|
120
|
+
* link the helper is purely visual.
|
|
121
|
+
*
|
|
122
|
+
* A11y (audit Batch 19, RG-1):
|
|
123
|
+
* Used inside <Field>, Field cloneElement-injects presentational /
|
|
124
|
+
* validation props onto this group. `error` and `fullWidth` are not valid
|
|
125
|
+
* on the role="radiogroup" element (React emits "non-boolean / unrecognized
|
|
126
|
+
* attribute" warnings), so they are stripped before the spread. The aria-*
|
|
127
|
+
* (labelledby / describedby / invalid) and id that Field also injects stay
|
|
128
|
+
* valid on the group and are still forwarded.
|
|
129
|
+
*/
|
|
130
|
+
|
|
131
|
+
function RadioGroup(_ref2) {
|
|
132
|
+
var value = _ref2.value,
|
|
133
|
+
onChange = _ref2.onChange,
|
|
134
|
+
_ref2$options = _ref2.options,
|
|
135
|
+
options = _ref2$options === void 0 ? [] : _ref2$options,
|
|
136
|
+
_ref2$row = _ref2.row,
|
|
137
|
+
row = _ref2$row === void 0 ? false : _ref2$row,
|
|
138
|
+
_ref2$disabled = _ref2.disabled,
|
|
139
|
+
disabled = _ref2$disabled === void 0 ? false : _ref2$disabled,
|
|
140
|
+
name = _ref2.name,
|
|
141
|
+
id = _ref2.id,
|
|
142
|
+
sx = _ref2.sx,
|
|
143
|
+
rest = _objectWithoutProperties(_ref2, _excluded2);
|
|
144
|
+
// R-Ar.1 - stable, SSR-safe, per-instance base for option helper ids.
|
|
145
|
+
// Each option that exposes a `helper` derives a deterministic id from
|
|
146
|
+
// this base + its index, so the inner <input type="radio">'s
|
|
147
|
+
// aria-describedby points at the right <Box> element.
|
|
148
|
+
var baseId = React.useId();
|
|
149
|
+
|
|
150
|
+
// RG-1 — Field cloneElement-injects presentational/validation props onto this
|
|
151
|
+
// child; `error` and `fullWidth` are not valid on the role="radiogroup"
|
|
152
|
+
// element and would trigger React attribute warnings if forwarded. Strip just
|
|
153
|
+
// those two (object-rest omit); the aria-* / id Field also injects remain in
|
|
154
|
+
// `domRest` and stay valid on the group. Cast because these injected props
|
|
155
|
+
// are not part of RadioGroupProps.
|
|
156
|
+
var _ref3 = rest,
|
|
157
|
+
_fieldError = _ref3.error,
|
|
158
|
+
_fieldFullWidth = _ref3.fullWidth,
|
|
159
|
+
domRest = _objectWithoutProperties(_ref3, _excluded3);
|
|
160
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_RadioGroup["default"], _objectSpread(_objectSpread({
|
|
161
|
+
value: value !== null && value !== void 0 ? value : "",
|
|
162
|
+
onChange: onChange,
|
|
163
|
+
row: row,
|
|
164
|
+
name: name,
|
|
165
|
+
id: id,
|
|
166
|
+
sx: _objectSpread({
|
|
167
|
+
gap: row ? 2 : 0.5
|
|
168
|
+
}, sx)
|
|
169
|
+
}, domRest), {}, {
|
|
170
|
+
children: options.map(function (opt, idx) {
|
|
171
|
+
var v = typeof opt === "string" ? opt : opt.value;
|
|
172
|
+
var lbl = typeof opt === "string" ? opt : opt.label;
|
|
173
|
+
var helper = typeof opt === "string" ? null : opt.helper;
|
|
174
|
+
var optDisabled = disabled || _typeof(opt) === "object" && opt.disabled;
|
|
175
|
+
// Per-option deterministic id. Uses the loop index so the
|
|
176
|
+
// value type (string, number, object) doesn't constrain the
|
|
177
|
+
// shape. Stable across renders for the same option list.
|
|
178
|
+
var helperId = helper ? "".concat(baseId, "-h-").concat(idx) : undefined;
|
|
179
|
+
var labelNode = helper ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
180
|
+
sx: {
|
|
181
|
+
display: "flex",
|
|
182
|
+
flexDirection: "column",
|
|
183
|
+
paddingY: 0.25
|
|
184
|
+
},
|
|
185
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
186
|
+
component: "span",
|
|
187
|
+
sx: {
|
|
188
|
+
fontSize: "var(--text-sm)",
|
|
189
|
+
color: "var(--fg)"
|
|
190
|
+
},
|
|
191
|
+
children: lbl
|
|
192
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
193
|
+
id: helperId,
|
|
194
|
+
component: "span",
|
|
195
|
+
sx: {
|
|
196
|
+
fontSize: "var(--text-xs)",
|
|
197
|
+
color: "var(--fg-subtle)"
|
|
198
|
+
},
|
|
199
|
+
children: helper
|
|
200
|
+
})]
|
|
201
|
+
}) : lbl;
|
|
202
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormControlLabel["default"], {
|
|
203
|
+
value: v,
|
|
204
|
+
disabled: optDisabled,
|
|
205
|
+
control: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Radio["default"], {
|
|
206
|
+
size: "small"
|
|
207
|
+
// MUI v9: aria-describedby routed through slotProps.input
|
|
208
|
+
// to land on the inner <input type="radio">, not on the
|
|
209
|
+
// root span. SR users hear the helper as a description
|
|
210
|
+
// when focusing the radio.
|
|
211
|
+
,
|
|
212
|
+
slotProps: helperId ? {
|
|
213
|
+
input: {
|
|
214
|
+
"aria-describedby": helperId
|
|
215
|
+
}
|
|
216
|
+
} : undefined,
|
|
217
|
+
sx: {
|
|
218
|
+
padding: "6px",
|
|
219
|
+
"&:focus-visible": {
|
|
220
|
+
outline: "2px solid var(--accent)",
|
|
221
|
+
outlineOffset: "var(--pui-outline-offset)"
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
}),
|
|
225
|
+
label: labelNode,
|
|
226
|
+
sx: {
|
|
227
|
+
margin: 0,
|
|
228
|
+
alignItems: helper ? "flex-start" : "center",
|
|
229
|
+
"& .MuiFormControlLabel-label": {
|
|
230
|
+
fontSize: "var(--text-sm)"
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
}, v);
|
|
234
|
+
})
|
|
235
|
+
}));
|
|
236
|
+
}
|
|
237
|
+
var _default = exports["default"] = Radio;
|
|
238
|
+
//# sourceMappingURL=Radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Radio.js","names":["React","_interopRequireWildcard","require","_Radio","_interopRequireDefault","_RadioGroup","_FormControlLabel","_Box","_jsxRuntime","_excluded","_excluded2","_excluded3","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","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","Radio","exports","forwardRef","_ref","ref","checked","onChange","label","disabled","inputProps","sx","rest","radio","jsx","size","slotProps","padding","outline","outlineOffset","control","margin","fontSize","RadioGroup","_ref2","_ref2$options","options","_ref2$row","row","_ref2$disabled","name","id","baseId","useId","_ref3","_fieldError","error","_fieldFullWidth","fullWidth","domRest","gap","children","map","opt","idx","v","lbl","helper","optDisabled","helperId","concat","labelNode","jsxs","display","flexDirection","paddingY","component","color","alignItems","_default"],"sources":["../../../src/lib/v2/components/Radio.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport MuiRadio from \"@mui/material/Radio\";\r\nimport type { RadioProps as MuiRadioProps } from \"@mui/material/Radio\";\r\nimport MuiRadioGroup from \"@mui/material/RadioGroup\";\r\nimport type { RadioGroupProps as MuiRadioGroupProps } from \"@mui/material/RadioGroup\";\r\nimport FormControlLabel from \"@mui/material/FormControlLabel\";\r\nimport Box from \"@mui/material/Box\";\r\n\r\n/**\r\n * Radio - Portnet UI v2\r\n *\r\n * Charter §03 · Component \"Radio\". Required by R-Sel.2 (2-3 options\r\n * -> Radio or Segmented).\r\n *\r\n * Low-level: a single controlled radio. For typical usage, prefer\r\n * <RadioGroup options={...}> below.\r\n *\r\n * <Radio checked={v === \"a\"} onChange={() => setV(\"a\")} label=\"Option A\" value=\"a\" />\r\n *\r\n * MUI v9 surface notes (audit Batch 2 external):\r\n * The public `inputProps` is routed internally to slotProps.input -\r\n * MUI v9 idiomatic location for native <input type=\"radio\"/> attributes.\r\n * `inputProps` was deprecated in v6 and REMOVED in v9, so it is no longer\r\n * inherited from MuiRadioProps and must be re-declared here. Consumer code\r\n * passing `inputProps={...}` to v2.Radio is unchanged.\r\n */\r\nexport interface RadioProps extends MuiRadioProps {\r\n label?: React.ReactNode;\r\n /** Native <input> attributes. Routed to slotProps.input (v9). */\r\n inputProps?: React.InputHTMLAttributes<HTMLInputElement>;\r\n}\r\n\r\nexport const Radio = React.forwardRef<React.ComponentRef<typeof MuiRadio>, RadioProps>(function Radio(\r\n { checked, onChange, label, value, disabled, inputProps, sx, ...rest },\r\n ref,\r\n) {\r\n const radio = (\r\n <MuiRadio\r\n ref={ref}\r\n checked={!!checked}\r\n onChange={onChange}\r\n value={value}\r\n disabled={disabled}\r\n size=\"small\"\r\n // MUI v9: Radio inputProps -> slotProps.input (same migration class\r\n // as Checkbox / Switch / NumberInput). Emitted conditionally so we\r\n // don't pass `slotProps={{ input: undefined }}` when nothing is\r\n // supplied.\r\n slotProps={inputProps ? { input: inputProps } : undefined}\r\n sx={{\r\n padding: \"6px\",\r\n \"&:focus-visible\": {\r\n outline: \"2px solid var(--accent)\",\r\n outlineOffset: \"var(--pui-outline-offset)\",\r\n },\r\n ...sx,\r\n }}\r\n {...rest}\r\n />\r\n );\r\n if (!label) return radio;\r\n return (\r\n <FormControlLabel\r\n control={radio}\r\n label={label}\r\n value={value}\r\n disabled={disabled}\r\n sx={{\r\n margin: 0,\r\n \"& .MuiFormControlLabel-label\": { fontSize: \"var(--text-sm, 13px)\" },\r\n }}\r\n />\r\n );\r\n});\r\n\r\n/**\r\n * RadioGroup - Portnet UI v2\r\n *\r\n * Declarative group of radios taking an `options` array. Use inside\r\n * <Field> for label / hint / error / a11y wiring.\r\n *\r\n * <Field label=\"Type d'opération\" required>\r\n * <RadioGroup\r\n * value={op}\r\n * onChange={e => setOp(e.target.value)}\r\n * options={[\r\n * { value: \"import\", label: \"Importation\" },\r\n * { value: \"export\", label: \"Exportation\" },\r\n * { value: \"transit\", label: \"Transit\", helper: \"Marchandises en transit douanier\" },\r\n * ]}\r\n * />\r\n * </Field>\r\n *\r\n * Layout:\r\n * row={false} (default) -> vertical stack\r\n * row={true} -> horizontal (use only when labels are short)\r\n *\r\n * A11y (audit Batch 5, finding B3-3):\r\n * When an option carries a `helper` text, RadioGroup wires it\r\n * to the inner radio input via aria-describedby - SR users hear\r\n * the helper alongside the label when navigating. Without this\r\n * link the helper is purely visual.\r\n *\r\n * A11y (audit Batch 19, RG-1):\r\n * Used inside <Field>, Field cloneElement-injects presentational /\r\n * validation props onto this group. `error` and `fullWidth` are not valid\r\n * on the role=\"radiogroup\" element (React emits \"non-boolean / unrecognized\r\n * attribute\" warnings), so they are stripped before the spread. The aria-*\r\n * (labelledby / describedby / invalid) and id that Field also injects stay\r\n * valid on the group and are still forwarded.\r\n */\r\nexport interface RadioOption {\r\n value: string | number;\r\n label: React.ReactNode;\r\n helper?: React.ReactNode;\r\n disabled?: boolean;\r\n}\r\n\r\nexport type RadioGroupOption = string | RadioOption;\r\n\r\nexport interface RadioGroupProps extends Omit<MuiRadioGroupProps, \"value\" | \"children\"> {\r\n value?: string | number;\r\n options?: RadioGroupOption[];\r\n disabled?: boolean;\r\n}\r\n\r\nexport function RadioGroup({\r\n value,\r\n onChange,\r\n options = [],\r\n row = false,\r\n disabled = false,\r\n name,\r\n id,\r\n sx,\r\n ...rest\r\n}: RadioGroupProps) {\r\n // R-Ar.1 - stable, SSR-safe, per-instance base for option helper ids.\r\n // Each option that exposes a `helper` derives a deterministic id from\r\n // this base + its index, so the inner <input type=\"radio\">'s\r\n // aria-describedby points at the right <Box> element.\r\n const baseId = React.useId();\r\n\r\n // RG-1 — Field cloneElement-injects presentational/validation props onto this\r\n // child; `error` and `fullWidth` are not valid on the role=\"radiogroup\"\r\n // element and would trigger React attribute warnings if forwarded. Strip just\r\n // those two (object-rest omit); the aria-* / id Field also injects remain in\r\n // `domRest` and stay valid on the group. Cast because these injected props\r\n // are not part of RadioGroupProps.\r\n const { error: _fieldError, fullWidth: _fieldFullWidth, ...domRest } =\r\n rest as typeof rest & { error?: unknown; fullWidth?: unknown };\r\n\r\n return (\r\n <MuiRadioGroup\r\n value={value ?? \"\"}\r\n onChange={onChange}\r\n row={row}\r\n name={name}\r\n id={id}\r\n sx={{ gap: row ? 2 : 0.5, ...sx }}\r\n {...domRest}\r\n >\r\n {options.map((opt, idx) => {\r\n const v = typeof opt === \"string\" ? opt : opt.value;\r\n const lbl = typeof opt === \"string\" ? opt : opt.label;\r\n const helper = typeof opt === \"string\" ? null : opt.helper;\r\n const optDisabled = disabled || (typeof opt === \"object\" && opt.disabled);\r\n // Per-option deterministic id. Uses the loop index so the\r\n // value type (string, number, object) doesn't constrain the\r\n // shape. Stable across renders for the same option list.\r\n const helperId = helper ? `${baseId}-h-${idx}` : undefined;\r\n const labelNode = helper ? (\r\n <Box sx={{ display: \"flex\", flexDirection: \"column\", paddingY: 0.25 }}>\r\n <Box component=\"span\" sx={{ fontSize: \"var(--text-sm)\", color: \"var(--fg)\" }}>\r\n {lbl}\r\n </Box>\r\n <Box\r\n id={helperId}\r\n component=\"span\"\r\n sx={{ fontSize: \"var(--text-xs)\", color: \"var(--fg-subtle)\" }}\r\n >\r\n {helper}\r\n </Box>\r\n </Box>\r\n ) : lbl;\r\n return (\r\n <FormControlLabel\r\n key={v}\r\n value={v}\r\n disabled={optDisabled}\r\n control={\r\n <MuiRadio\r\n size=\"small\"\r\n // MUI v9: aria-describedby routed through slotProps.input\r\n // to land on the inner <input type=\"radio\">, not on the\r\n // root span. SR users hear the helper as a description\r\n // when focusing the radio.\r\n slotProps={helperId ? { input: { \"aria-describedby\": helperId } } : undefined}\r\n sx={{\r\n padding: \"6px\",\r\n \"&:focus-visible\": {\r\n outline: \"2px solid var(--accent)\",\r\n outlineOffset: \"var(--pui-outline-offset)\",\r\n },\r\n }}\r\n />\r\n }\r\n label={labelNode}\r\n sx={{\r\n margin: 0,\r\n alignItems: helper ? \"flex-start\" : \"center\",\r\n \"& .MuiFormControlLabel-label\": { fontSize: \"var(--text-sm)\" },\r\n }}\r\n />\r\n );\r\n })}\r\n </MuiRadioGroup>\r\n );\r\n}\r\n\r\nexport default Radio;\r\n"],"mappings":";;;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAE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B,OAAO,eACL,IAAA3F,WAAA,CAAAqF,GAAA,EAAC1F,MAAA,WAAQ;UACP2F,IAAI,EAAC;UACL;UACA;UACA;UACA;UAAA;UACAC,SAAS,EAAEiC,QAAQ,GAAG;YAAE/D,KAAK,EAAE;cAAE,kBAAkB,EAAE+D;YAAS;UAAE,CAAC,GAAG3D,SAAU;UAC9EqB,EAAE,EAAE;YACFM,OAAO,EAAE,KAAK;YACd,iBAAiB,EAAE;cACjBC,OAAO,EAAE,yBAAyB;cAClCC,aAAa,EAAE;YACjB;UACF;QAAE,CACH,CACF;QACDX,KAAK,EAAE2C,SAAU;QACjBxC,EAAE,EAAE;UACFU,MAAM,EAAE,CAAC;UACTqC,UAAU,EAAEX,MAAM,GAAG,YAAY,GAAG,QAAQ;UAC5C,8BAA8B,EAAE;YAAEzB,QAAQ,EAAE;UAAiB;QAC/D;MAAE,GAzBGuB,CA0BN,CAAC;IAEN,CAAC;EAAC,EACW,CAAC;AAEpB;AAAC,IAAAc,QAAA,GAAAzD,OAAA,cAEcD,KAAK","ignoreList":[]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { BoxProps } from "@mui/material/Box";
|
|
3
|
+
/**
|
|
4
|
+
* SectionHeader — Portnet UI v2
|
|
5
|
+
*
|
|
6
|
+
* Charter §03 · standalone section-header primitive. Replaces the
|
|
7
|
+
* local AppTitle wrapper that host modules previously maintained
|
|
8
|
+
* (audit Batch 2 violation C3 in ms-ti-fe — direct MUI Typography
|
|
9
|
+
* with hardcoded styling).
|
|
10
|
+
*
|
|
11
|
+
* Distinguished from v2.FormSection: SectionHeader is JUST the
|
|
12
|
+
* heading row (no wrapping content, no surface chrome). Use it
|
|
13
|
+
* when you need to label a region but don't want the FormSection
|
|
14
|
+
* card border + padding.
|
|
15
|
+
*
|
|
16
|
+
* Usage:
|
|
17
|
+
*
|
|
18
|
+
* <SectionHeader level="h3" icon={<DescriptionIcon />}>
|
|
19
|
+
* Données du titre
|
|
20
|
+
* </SectionHeader>
|
|
21
|
+
*
|
|
22
|
+
* <SectionHeader
|
|
23
|
+
* level="h2"
|
|
24
|
+
* title="Documents joints"
|
|
25
|
+
* subtitle="Pièces transmises par l'opérateur"
|
|
26
|
+
* action={<Button variant="ghost">Tout télécharger</Button>}
|
|
27
|
+
* />
|
|
28
|
+
*
|
|
29
|
+
* The text can be passed either as `children` (single-line) or as
|
|
30
|
+
* `title` + optional `subtitle` (multi-line).
|
|
31
|
+
*
|
|
32
|
+
* Props:
|
|
33
|
+
* level — semantic h-level ("h2" / "h3" / "h4"). Default "h3".
|
|
34
|
+
* Pick the next level below the page's outermost
|
|
35
|
+
* heading (typically the ActionBar h1).
|
|
36
|
+
* icon — optional leading icon element.
|
|
37
|
+
* title — heading text. Use this OR children.
|
|
38
|
+
* children — heading text. Use this OR title.
|
|
39
|
+
* subtitle — optional secondary line beneath the title.
|
|
40
|
+
* action — optional trailing element (Button, dropdown, etc.).
|
|
41
|
+
* sx — escape hatch.
|
|
42
|
+
*/
|
|
43
|
+
export type SectionHeaderLevel = "h2" | "h3" | "h4";
|
|
44
|
+
export interface SectionHeaderProps extends Omit<BoxProps, "title"> {
|
|
45
|
+
level?: SectionHeaderLevel;
|
|
46
|
+
icon?: React.ReactElement;
|
|
47
|
+
title?: React.ReactNode;
|
|
48
|
+
subtitle?: React.ReactNode;
|
|
49
|
+
action?: React.ReactNode;
|
|
50
|
+
}
|
|
51
|
+
declare function SectionHeader({ level, icon, title, children, subtitle, action, sx, ...rest }: SectionHeaderProps): React.JSX.Element;
|
|
52
|
+
export default SectionHeader;
|
|
53
|
+
//# sourceMappingURL=SectionHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionHeader.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/components/SectionHeader.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAEH,MAAM,MAAM,kBAAkB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAQpD,MAAM,WAAW,kBAAmB,SAAQ,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC;IACjE,KAAK,CAAC,EAAE,kBAAkB,CAAC;IAC3B,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,iBAAS,aAAa,CAAC,EACrB,KAAY,EACZ,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,EAAE,EACF,GAAG,IAAI,EACR,EAAE,kBAAkB,qBA4DpB;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,140 @@
|
|
|
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 _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
+
var _excluded = ["level", "icon", "title", "children", "subtitle", "action", "sx"];
|
|
12
|
+
/**
|
|
13
|
+
* SectionHeader — Portnet UI v2
|
|
14
|
+
*
|
|
15
|
+
* Charter §03 · standalone section-header primitive. Replaces the
|
|
16
|
+
* local AppTitle wrapper that host modules previously maintained
|
|
17
|
+
* (audit Batch 2 violation C3 in ms-ti-fe — direct MUI Typography
|
|
18
|
+
* with hardcoded styling).
|
|
19
|
+
*
|
|
20
|
+
* Distinguished from v2.FormSection: SectionHeader is JUST the
|
|
21
|
+
* heading row (no wrapping content, no surface chrome). Use it
|
|
22
|
+
* when you need to label a region but don't want the FormSection
|
|
23
|
+
* card border + padding.
|
|
24
|
+
*
|
|
25
|
+
* Usage:
|
|
26
|
+
*
|
|
27
|
+
* <SectionHeader level="h3" icon={<DescriptionIcon />}>
|
|
28
|
+
* Données du titre
|
|
29
|
+
* </SectionHeader>
|
|
30
|
+
*
|
|
31
|
+
* <SectionHeader
|
|
32
|
+
* level="h2"
|
|
33
|
+
* title="Documents joints"
|
|
34
|
+
* subtitle="Pièces transmises par l'opérateur"
|
|
35
|
+
* action={<Button variant="ghost">Tout télécharger</Button>}
|
|
36
|
+
* />
|
|
37
|
+
*
|
|
38
|
+
* The text can be passed either as `children` (single-line) or as
|
|
39
|
+
* `title` + optional `subtitle` (multi-line).
|
|
40
|
+
*
|
|
41
|
+
* Props:
|
|
42
|
+
* level — semantic h-level ("h2" / "h3" / "h4"). Default "h3".
|
|
43
|
+
* Pick the next level below the page's outermost
|
|
44
|
+
* heading (typically the ActionBar h1).
|
|
45
|
+
* icon — optional leading icon element.
|
|
46
|
+
* title — heading text. Use this OR children.
|
|
47
|
+
* children — heading text. Use this OR title.
|
|
48
|
+
* subtitle — optional secondary line beneath the title.
|
|
49
|
+
* action — optional trailing element (Button, dropdown, etc.).
|
|
50
|
+
* sx — escape hatch.
|
|
51
|
+
*/
|
|
52
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
53
|
+
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); }
|
|
54
|
+
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; }
|
|
55
|
+
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; }
|
|
56
|
+
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; }
|
|
57
|
+
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; }
|
|
58
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
59
|
+
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); }
|
|
60
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
61
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
62
|
+
var TYPOGRAPHY_BY_LEVEL = Object.freeze({
|
|
63
|
+
h2: {
|
|
64
|
+
fontSize: "var(--text-h2)",
|
|
65
|
+
lineHeight: "var(--lh-tight)"
|
|
66
|
+
},
|
|
67
|
+
h3: {
|
|
68
|
+
fontSize: "var(--text-h3)",
|
|
69
|
+
lineHeight: "var(--lh-snug)"
|
|
70
|
+
},
|
|
71
|
+
h4: {
|
|
72
|
+
fontSize: "var(--text-h4)",
|
|
73
|
+
lineHeight: "var(--lh-snug)"
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
function SectionHeader(_ref) {
|
|
77
|
+
var _ref$level = _ref.level,
|
|
78
|
+
level = _ref$level === void 0 ? "h3" : _ref$level,
|
|
79
|
+
icon = _ref.icon,
|
|
80
|
+
title = _ref.title,
|
|
81
|
+
children = _ref.children,
|
|
82
|
+
subtitle = _ref.subtitle,
|
|
83
|
+
action = _ref.action,
|
|
84
|
+
sx = _ref.sx,
|
|
85
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
86
|
+
var headingText = title !== null && title !== void 0 ? title : children;
|
|
87
|
+
var typography = TYPOGRAPHY_BY_LEVEL[level] || TYPOGRAPHY_BY_LEVEL.h3;
|
|
88
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], _objectSpread(_objectSpread({
|
|
89
|
+
sx: _objectSpread({
|
|
90
|
+
display: "flex",
|
|
91
|
+
alignItems: subtitle ? "flex-start" : "center",
|
|
92
|
+
gap: "var(--s-2)"
|
|
93
|
+
}, sx)
|
|
94
|
+
}, rest), {}, {
|
|
95
|
+
children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
96
|
+
"aria-hidden": "true",
|
|
97
|
+
sx: {
|
|
98
|
+
color: "var(--fg-muted)",
|
|
99
|
+
display: "inline-flex",
|
|
100
|
+
// Lift the icon slightly so it lines up with the
|
|
101
|
+
// first cap-height of the heading text rather than
|
|
102
|
+
// floating at the baseline.
|
|
103
|
+
marginTop: subtitle ? "2px" : 0,
|
|
104
|
+
"& svg": {
|
|
105
|
+
fontSize: 20
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
children: icon
|
|
109
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
110
|
+
sx: {
|
|
111
|
+
flex: 1,
|
|
112
|
+
minWidth: 0
|
|
113
|
+
},
|
|
114
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
115
|
+
component: level,
|
|
116
|
+
sx: _objectSpread({
|
|
117
|
+
margin: 0,
|
|
118
|
+
fontWeight: "var(--fw-semibold)",
|
|
119
|
+
color: "var(--fg)"
|
|
120
|
+
}, typography),
|
|
121
|
+
children: headingText
|
|
122
|
+
}), subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
123
|
+
sx: {
|
|
124
|
+
marginTop: "var(--s-1)",
|
|
125
|
+
fontSize: "var(--text-sm)",
|
|
126
|
+
color: "var(--fg-muted)",
|
|
127
|
+
lineHeight: "var(--lh-normal)"
|
|
128
|
+
},
|
|
129
|
+
children: subtitle
|
|
130
|
+
})]
|
|
131
|
+
}), action && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
132
|
+
sx: {
|
|
133
|
+
flex: "0 0 auto"
|
|
134
|
+
},
|
|
135
|
+
children: action
|
|
136
|
+
})]
|
|
137
|
+
}));
|
|
138
|
+
}
|
|
139
|
+
var _default = exports["default"] = SectionHeader;
|
|
140
|
+
//# sourceMappingURL=SectionHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SectionHeader.js","names":["React","_interopRequireWildcard","require","_Box","_interopRequireDefault","_jsxRuntime","_excluded","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","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","Symbol","toPrimitive","undefined","res","TypeError","Number","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","TYPOGRAPHY_BY_LEVEL","freeze","h2","fontSize","lineHeight","h3","h4","SectionHeader","_ref","_ref$level","level","icon","title","children","subtitle","action","sx","rest","headingText","typography","jsxs","display","alignItems","gap","jsx","color","marginTop","flex","minWidth","component","margin","fontWeight","_default","exports"],"sources":["../../../src/lib/v2/components/SectionHeader.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport Box from \"@mui/material/Box\";\r\nimport type { BoxProps } from \"@mui/material/Box\";\r\n\r\n/**\r\n * SectionHeader — Portnet UI v2\r\n *\r\n * Charter §03 · standalone section-header primitive. Replaces the\r\n * local AppTitle wrapper that host modules previously maintained\r\n * (audit Batch 2 violation C3 in ms-ti-fe — direct MUI Typography\r\n * with hardcoded styling).\r\n *\r\n * Distinguished from v2.FormSection: SectionHeader is JUST the\r\n * heading row (no wrapping content, no surface chrome). Use it\r\n * when you need to label a region but don't want the FormSection\r\n * card border + padding.\r\n *\r\n * Usage:\r\n *\r\n * <SectionHeader level=\"h3\" icon={<DescriptionIcon />}>\r\n * Données du titre\r\n * </SectionHeader>\r\n *\r\n * <SectionHeader\r\n * level=\"h2\"\r\n * title=\"Documents joints\"\r\n * subtitle=\"Pièces transmises par l'opérateur\"\r\n * action={<Button variant=\"ghost\">Tout télécharger</Button>}\r\n * />\r\n *\r\n * The text can be passed either as `children` (single-line) or as\r\n * `title` + optional `subtitle` (multi-line).\r\n *\r\n * Props:\r\n * level — semantic h-level (\"h2\" / \"h3\" / \"h4\"). Default \"h3\".\r\n * Pick the next level below the page's outermost\r\n * heading (typically the ActionBar h1).\r\n * icon — optional leading icon element.\r\n * title — heading text. Use this OR children.\r\n * children — heading text. Use this OR title.\r\n * subtitle — optional secondary line beneath the title.\r\n * action — optional trailing element (Button, dropdown, etc.).\r\n * sx — escape hatch.\r\n */\r\n\r\nexport type SectionHeaderLevel = \"h2\" | \"h3\" | \"h4\";\r\n\r\nconst TYPOGRAPHY_BY_LEVEL: Record<SectionHeaderLevel, { fontSize: string; lineHeight: string }> = Object.freeze({\r\n h2: { fontSize: \"var(--text-h2)\", lineHeight: \"var(--lh-tight)\" },\r\n h3: { fontSize: \"var(--text-h3)\", lineHeight: \"var(--lh-snug)\" },\r\n h4: { fontSize: \"var(--text-h4)\", lineHeight: \"var(--lh-snug)\" },\r\n});\r\n\r\nexport interface SectionHeaderProps extends Omit<BoxProps, \"title\"> {\r\n level?: SectionHeaderLevel;\r\n icon?: React.ReactElement;\r\n title?: React.ReactNode;\r\n subtitle?: React.ReactNode;\r\n action?: React.ReactNode;\r\n}\r\n\r\nfunction SectionHeader({\r\n level = \"h3\",\r\n icon,\r\n title,\r\n children,\r\n subtitle,\r\n action,\r\n sx,\r\n ...rest\r\n}: SectionHeaderProps) {\r\n const headingText = title ?? children;\r\n const typography = TYPOGRAPHY_BY_LEVEL[level] || TYPOGRAPHY_BY_LEVEL.h3;\r\n\r\n return (\r\n <Box\r\n sx={{\r\n display: \"flex\",\r\n alignItems: subtitle ? \"flex-start\" : \"center\",\r\n gap: \"var(--s-2)\",\r\n ...sx,\r\n }}\r\n {...rest}\r\n >\r\n {icon && (\r\n <Box\r\n aria-hidden=\"true\"\r\n sx={{\r\n color: \"var(--fg-muted)\",\r\n display: \"inline-flex\",\r\n // Lift the icon slightly so it lines up with the\r\n // first cap-height of the heading text rather than\r\n // floating at the baseline.\r\n marginTop: subtitle ? \"2px\" : 0,\r\n \"& svg\": { fontSize: 20 },\r\n }}\r\n >\r\n {icon}\r\n </Box>\r\n )}\r\n\r\n <Box sx={{ flex: 1, minWidth: 0 }}>\r\n <Box\r\n component={level}\r\n sx={{\r\n margin: 0,\r\n fontWeight: \"var(--fw-semibold)\",\r\n color: \"var(--fg)\",\r\n ...typography,\r\n }}\r\n >\r\n {headingText}\r\n </Box>\r\n {subtitle && (\r\n <Box\r\n sx={{\r\n marginTop: \"var(--s-1)\",\r\n fontSize: \"var(--text-sm)\",\r\n color: \"var(--fg-muted)\",\r\n lineHeight: \"var(--lh-normal)\",\r\n }}\r\n >\r\n {subtitle}\r\n </Box>\r\n )}\r\n </Box>\r\n\r\n {action && <Box sx={{ flex: \"0 0 auto\" }}>{action}</Box>}\r\n </Box>\r\n );\r\n}\r\n\r\nexport default SectionHeader;\r\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAoC,IAAAG,WAAA,GAAAH,OAAA;AAAA,IAAAI,SAAA;AAGpC;AACA;AACA;AACA;AACA;AAC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