@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,62 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { OutlinedInputProps } from "@mui/material/OutlinedInput";
|
|
3
|
+
/**
|
|
4
|
+
* Input — Portnet UI v2
|
|
5
|
+
*
|
|
6
|
+
* Native value/onChange semantics — no Formik coupling.
|
|
7
|
+
* Wrap inside <Field> for label / hint / error / aria binding.
|
|
8
|
+
*
|
|
9
|
+
* <Field label="Référence">
|
|
10
|
+
* <Input value={v} onChange={e => setV(e.target.value)} />
|
|
11
|
+
* </Field>
|
|
12
|
+
*
|
|
13
|
+
* Optional adornments:
|
|
14
|
+
* <Input startIcon={<SearchIcon />} prefix="EUR" suffix=".pdf" />
|
|
15
|
+
*
|
|
16
|
+
* NUMERIC INPUT — use <NumberInput> instead.
|
|
17
|
+
*
|
|
18
|
+
* MUI v9 surface notes:
|
|
19
|
+
* The v2 public `inputProps` prop is routed internally to
|
|
20
|
+
* slotProps.input — the MUI v9 idiomatic location for native
|
|
21
|
+
* <input/> attributes on OutlinedInput. Consumer code passing
|
|
22
|
+
* `inputProps={...}` to v2.Input is unchanged.
|
|
23
|
+
*
|
|
24
|
+
* ── `label` IS NOT ACCEPTED — AND THAT IS DELIBERATE (S-02) ─────────
|
|
25
|
+
*
|
|
26
|
+
* `label` is omitted from the inherited `OutlinedInputProps` surface below.
|
|
27
|
+
* `OutlinedInput` does accept a `label`, but there it only SIZES THE NOTCH in
|
|
28
|
+
* the outline: it renders no text and creates no <label> element. So
|
|
29
|
+
*
|
|
30
|
+
* <Input label="Description" … /> // used to compile
|
|
31
|
+
*
|
|
32
|
+
* produced a field with no visible label and NO ACCESSIBLE NAME, while looking
|
|
33
|
+
* correct to the compiler and to review. That is a silent violation of Charter
|
|
34
|
+
* R-I.1, checklist A5 and WCAG 1.3.1 / 4.1.2.
|
|
35
|
+
*
|
|
36
|
+
* It is not hypothetical: the procuration-portnet-fe migration shipped SIX such
|
|
37
|
+
* fields across FIVE files, all passing `tsc --strict` with the full mandated
|
|
38
|
+
* flag set, before the omission was noticed. The asymmetry with `Select` — which
|
|
39
|
+
* has no `label` prop at all and therefore fails loudly — is what exposed it.
|
|
40
|
+
*
|
|
41
|
+
* Omitting `label` here converts that silent a11y defect into a compile error,
|
|
42
|
+
* and mirrors what `FormikInputProps` already does one file away. Backward
|
|
43
|
+
* compatible: a caller that correctly wraps in `<Field>` never passed `label` to
|
|
44
|
+
* `Input` in the first place.
|
|
45
|
+
*/
|
|
46
|
+
type InputType = "text" | "number" | "email" | "password" | "search" | "tel" | "url";
|
|
47
|
+
export interface InputProps extends Omit<OutlinedInputProps, "type" | "value" | "prefix" | "suffix" | "label"> {
|
|
48
|
+
/** @default "text" */
|
|
49
|
+
type?: InputType;
|
|
50
|
+
value?: string | number;
|
|
51
|
+
/** Leading icon adornment. */
|
|
52
|
+
startIcon?: React.ReactNode;
|
|
53
|
+
/** Trailing icon adornment. */
|
|
54
|
+
endIcon?: React.ReactNode;
|
|
55
|
+
/** Leading text prefix (adornment). */
|
|
56
|
+
prefix?: React.ReactNode;
|
|
57
|
+
/** Trailing text suffix (adornment). */
|
|
58
|
+
suffix?: React.ReactNode;
|
|
59
|
+
}
|
|
60
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<InputProps, "ref"> & React.RefAttributes<unknown>>;
|
|
61
|
+
export default Input;
|
|
62
|
+
//# sourceMappingURL=Input.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/components/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAGtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,KAAK,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,KAAK,GAAG,KAAK,CAAC;AAErF,MAAM,WAAW,UACf,SAAQ,IAAI,CACV,kBAAkB,EAIlB,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CACjD;IACD,sBAAsB;IACtB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,8BAA8B;IAC9B,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B,+BAA+B;IAC/B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,uCAAuC;IACvC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,wCAAwC;IACxC,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,QAAA,MAAM,KAAK,yFAuDT,CAAC;AAEH,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1,115 @@
|
|
|
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 _OutlinedInput = _interopRequireDefault(require("@mui/material/OutlinedInput"));
|
|
10
|
+
var _InputAdornment = _interopRequireDefault(require("@mui/material/InputAdornment"));
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
var _excluded = ["type", "value", "onChange", "onBlur", "placeholder", "disabled", "error", "readOnly", "fullWidth", "startIcon", "endIcon", "prefix", "suffix", "inputProps", "sx"];
|
|
13
|
+
/**
|
|
14
|
+
* Input — Portnet UI v2
|
|
15
|
+
*
|
|
16
|
+
* Native value/onChange semantics — no Formik coupling.
|
|
17
|
+
* Wrap inside <Field> for label / hint / error / aria binding.
|
|
18
|
+
*
|
|
19
|
+
* <Field label="Référence">
|
|
20
|
+
* <Input value={v} onChange={e => setV(e.target.value)} />
|
|
21
|
+
* </Field>
|
|
22
|
+
*
|
|
23
|
+
* Optional adornments:
|
|
24
|
+
* <Input startIcon={<SearchIcon />} prefix="EUR" suffix=".pdf" />
|
|
25
|
+
*
|
|
26
|
+
* NUMERIC INPUT — use <NumberInput> instead.
|
|
27
|
+
*
|
|
28
|
+
* MUI v9 surface notes:
|
|
29
|
+
* The v2 public `inputProps` prop is routed internally to
|
|
30
|
+
* slotProps.input — the MUI v9 idiomatic location for native
|
|
31
|
+
* <input/> attributes on OutlinedInput. Consumer code passing
|
|
32
|
+
* `inputProps={...}` to v2.Input is unchanged.
|
|
33
|
+
*
|
|
34
|
+
* ── `label` IS NOT ACCEPTED — AND THAT IS DELIBERATE (S-02) ─────────
|
|
35
|
+
*
|
|
36
|
+
* `label` is omitted from the inherited `OutlinedInputProps` surface below.
|
|
37
|
+
* `OutlinedInput` does accept a `label`, but there it only SIZES THE NOTCH in
|
|
38
|
+
* the outline: it renders no text and creates no <label> element. So
|
|
39
|
+
*
|
|
40
|
+
* <Input label="Description" … /> // used to compile
|
|
41
|
+
*
|
|
42
|
+
* produced a field with no visible label and NO ACCESSIBLE NAME, while looking
|
|
43
|
+
* correct to the compiler and to review. That is a silent violation of Charter
|
|
44
|
+
* R-I.1, checklist A5 and WCAG 1.3.1 / 4.1.2.
|
|
45
|
+
*
|
|
46
|
+
* It is not hypothetical: the procuration-portnet-fe migration shipped SIX such
|
|
47
|
+
* fields across FIVE files, all passing `tsc --strict` with the full mandated
|
|
48
|
+
* flag set, before the omission was noticed. The asymmetry with `Select` — which
|
|
49
|
+
* has no `label` prop at all and therefore fails loudly — is what exposed it.
|
|
50
|
+
*
|
|
51
|
+
* Omitting `label` here converts that silent a11y defect into a compile error,
|
|
52
|
+
* and mirrors what `FormikInputProps` already does one file away. Backward
|
|
53
|
+
* compatible: a caller that correctly wraps in `<Field>` never passed `label` to
|
|
54
|
+
* `Input` in the first place.
|
|
55
|
+
*/
|
|
56
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
57
|
+
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); }
|
|
58
|
+
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; }
|
|
59
|
+
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; }
|
|
60
|
+
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; }
|
|
61
|
+
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; }
|
|
62
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
63
|
+
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); }
|
|
64
|
+
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; }
|
|
65
|
+
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; }
|
|
66
|
+
var Input = /*#__PURE__*/React.forwardRef(function Input(_ref, ref) {
|
|
67
|
+
var _ref$type = _ref.type,
|
|
68
|
+
type = _ref$type === void 0 ? "text" : _ref$type,
|
|
69
|
+
value = _ref.value,
|
|
70
|
+
onChange = _ref.onChange,
|
|
71
|
+
onBlur = _ref.onBlur,
|
|
72
|
+
placeholder = _ref.placeholder,
|
|
73
|
+
disabled = _ref.disabled,
|
|
74
|
+
error = _ref.error,
|
|
75
|
+
readOnly = _ref.readOnly,
|
|
76
|
+
_ref$fullWidth = _ref.fullWidth,
|
|
77
|
+
fullWidth = _ref$fullWidth === void 0 ? true : _ref$fullWidth,
|
|
78
|
+
startIcon = _ref.startIcon,
|
|
79
|
+
endIcon = _ref.endIcon,
|
|
80
|
+
prefix = _ref.prefix,
|
|
81
|
+
suffix = _ref.suffix,
|
|
82
|
+
inputProps = _ref.inputProps,
|
|
83
|
+
sx = _ref.sx,
|
|
84
|
+
rest = _objectWithoutProperties(_ref, _excluded);
|
|
85
|
+
if (process.env["NODE_ENV"] !== "production" && type === "number") {
|
|
86
|
+
// eslint-disable-next-line no-console
|
|
87
|
+
console.warn("[@portnet/ui v2] <Input type=\"number\">: prefer <NumberInput> for charter-compliant locale formatting, clamping, and aria-valuetext.");
|
|
88
|
+
}
|
|
89
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_OutlinedInput["default"], _objectSpread({
|
|
90
|
+
ref: ref,
|
|
91
|
+
type: type,
|
|
92
|
+
value: value !== null && value !== void 0 ? value : "",
|
|
93
|
+
onChange: onChange,
|
|
94
|
+
onBlur: onBlur,
|
|
95
|
+
placeholder: placeholder,
|
|
96
|
+
disabled: disabled,
|
|
97
|
+
readOnly: readOnly,
|
|
98
|
+
error: !!error,
|
|
99
|
+
fullWidth: fullWidth,
|
|
100
|
+
startAdornment: startIcon || prefix ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputAdornment["default"], {
|
|
101
|
+
position: "start",
|
|
102
|
+
children: startIcon || prefix
|
|
103
|
+
}) : undefined,
|
|
104
|
+
endAdornment: endIcon || suffix ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_InputAdornment["default"], {
|
|
105
|
+
position: "end",
|
|
106
|
+
children: endIcon || suffix
|
|
107
|
+
}) : undefined,
|
|
108
|
+
slotProps: inputProps ? {
|
|
109
|
+
input: inputProps
|
|
110
|
+
} : undefined,
|
|
111
|
+
sx: sx
|
|
112
|
+
}, rest));
|
|
113
|
+
});
|
|
114
|
+
var _default = exports["default"] = Input;
|
|
115
|
+
//# sourceMappingURL=Input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Input.js","names":["React","_interopRequireWildcard","require","_OutlinedInput","_interopRequireDefault","_InputAdornment","_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","Input","forwardRef","_ref","ref","_ref$type","type","onChange","onBlur","placeholder","disabled","error","readOnly","_ref$fullWidth","fullWidth","startIcon","endIcon","prefix","suffix","inputProps","sx","rest","process","env","console","warn","jsx","startAdornment","position","children","endAdornment","slotProps","_default","exports"],"sources":["../../../src/lib/v2/components/Input.tsx"],"sourcesContent":["import * as React from \"react\";\r\nimport OutlinedInput from \"@mui/material/OutlinedInput\";\r\nimport type { OutlinedInputProps } from \"@mui/material/OutlinedInput\";\r\nimport InputAdornment from \"@mui/material/InputAdornment\";\r\n\r\n/**\r\n * Input — Portnet UI v2\r\n *\r\n * Native value/onChange semantics — no Formik coupling.\r\n * Wrap inside <Field> for label / hint / error / aria binding.\r\n *\r\n * <Field label=\"Référence\">\r\n * <Input value={v} onChange={e => setV(e.target.value)} />\r\n * </Field>\r\n *\r\n * Optional adornments:\r\n * <Input startIcon={<SearchIcon />} prefix=\"EUR\" suffix=\".pdf\" />\r\n *\r\n * NUMERIC INPUT — use <NumberInput> instead.\r\n *\r\n * MUI v9 surface notes:\r\n * The v2 public `inputProps` prop is routed internally to\r\n * slotProps.input — the MUI v9 idiomatic location for native\r\n * <input/> attributes on OutlinedInput. Consumer code passing\r\n * `inputProps={...}` to v2.Input is unchanged.\r\n *\r\n * ── `label` IS NOT ACCEPTED — AND THAT IS DELIBERATE (S-02) ─────────\r\n *\r\n * `label` is omitted from the inherited `OutlinedInputProps` surface below.\r\n * `OutlinedInput` does accept a `label`, but there it only SIZES THE NOTCH in\r\n * the outline: it renders no text and creates no <label> element. So\r\n *\r\n * <Input label=\"Description\" … /> // used to compile\r\n *\r\n * produced a field with no visible label and NO ACCESSIBLE NAME, while looking\r\n * correct to the compiler and to review. That is a silent violation of Charter\r\n * R-I.1, checklist A5 and WCAG 1.3.1 / 4.1.2.\r\n *\r\n * It is not hypothetical: the procuration-portnet-fe migration shipped SIX such\r\n * fields across FIVE files, all passing `tsc --strict` with the full mandated\r\n * flag set, before the omission was noticed. The asymmetry with `Select` — which\r\n * has no `label` prop at all and therefore fails loudly — is what exposed it.\r\n *\r\n * Omitting `label` here converts that silent a11y defect into a compile error,\r\n * and mirrors what `FormikInputProps` already does one file away. Backward\r\n * compatible: a caller that correctly wraps in `<Field>` never passed `label` to\r\n * `Input` in the first place.\r\n */\r\ntype InputType = \"text\" | \"number\" | \"email\" | \"password\" | \"search\" | \"tel\" | \"url\";\r\n\r\nexport interface InputProps\r\n extends Omit<\r\n OutlinedInputProps,\r\n /* S-02 — `label` is omitted on purpose. See the module docstring: on\r\n * OutlinedInput it only sizes the outline notch and renders no accessible\r\n * name, so accepting it here let unlabelled fields compile. Use <Field>. */\r\n \"type\" | \"value\" | \"prefix\" | \"suffix\" | \"label\"\r\n > {\r\n /** @default \"text\" */\r\n type?: InputType;\r\n value?: string | number;\r\n /** Leading icon adornment. */\r\n startIcon?: React.ReactNode;\r\n /** Trailing icon adornment. */\r\n endIcon?: React.ReactNode;\r\n /** Leading text prefix (adornment). */\r\n prefix?: React.ReactNode;\r\n /** Trailing text suffix (adornment). */\r\n suffix?: React.ReactNode;\r\n}\r\n\r\nconst Input = React.forwardRef<React.ComponentRef<typeof OutlinedInput>, InputProps>(function Input(\r\n {\r\n type = \"text\",\r\n value,\r\n onChange,\r\n onBlur,\r\n placeholder,\r\n disabled,\r\n error,\r\n readOnly,\r\n fullWidth = true,\r\n startIcon,\r\n endIcon,\r\n prefix,\r\n suffix,\r\n inputProps,\r\n sx,\r\n ...rest\r\n },\r\n ref,\r\n) {\r\n if (process.env[\"NODE_ENV\"] !== \"production\" && type === \"number\") {\r\n // eslint-disable-next-line no-console\r\n console.warn(\r\n \"[@portnet/ui v2] <Input type=\\\"number\\\">: prefer <NumberInput> for charter-compliant locale formatting, clamping, and aria-valuetext.\",\r\n );\r\n }\r\n\r\n return (\r\n <OutlinedInput\r\n ref={ref}\r\n type={type}\r\n value={value ?? \"\"}\r\n onChange={onChange}\r\n onBlur={onBlur}\r\n placeholder={placeholder}\r\n disabled={disabled}\r\n readOnly={readOnly}\r\n error={!!error}\r\n fullWidth={fullWidth}\r\n startAdornment={\r\n startIcon || prefix ? (\r\n <InputAdornment position=\"start\">{startIcon || prefix}</InputAdornment>\r\n ) : undefined\r\n }\r\n endAdornment={\r\n endIcon || suffix ? (\r\n <InputAdornment position=\"end\">{endIcon || suffix}</InputAdornment>\r\n ) : undefined\r\n }\r\n slotProps={inputProps ? { input: inputProps } : undefined}\r\n sx={sx}\r\n {...rest}\r\n />\r\n );\r\n});\r\n\r\nexport default Input;\r\n"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,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,EAAEA;EAAG,GACHC,IAAI,CACT,CAAC;AAEN,CAAC,CAAC;AAAC,IAAAW,QAAA,GAAAC,OAAA,cAEYhC,KAAK","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import type { SxProps, Theme } from "@mui/material/styles";
|
|
3
|
+
export interface KPICardLabels {
|
|
4
|
+
up?: string;
|
|
5
|
+
down?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface KPICardProps {
|
|
8
|
+
label: React.ReactNode;
|
|
9
|
+
value?: React.ReactNode;
|
|
10
|
+
delta?: number | string;
|
|
11
|
+
period?: React.ReactNode;
|
|
12
|
+
helper?: React.ReactNode;
|
|
13
|
+
/** Reserved for future visual variants; currently only "default". */
|
|
14
|
+
variant?: "default";
|
|
15
|
+
icon?: React.ReactElement;
|
|
16
|
+
locale?: string;
|
|
17
|
+
labels?: KPICardLabels;
|
|
18
|
+
sx?: SxProps<Theme>;
|
|
19
|
+
}
|
|
20
|
+
declare function KPICard({ label, value, delta, period, helper, icon, locale, labels, sx, }: KPICardProps): React.JSX.Element;
|
|
21
|
+
export default KPICard;
|
|
22
|
+
//# sourceMappingURL=KPICard.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KPICard.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/components/KPICard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAkD3D,MAAM,WAAW,aAAa;IAC5B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,qEAAqE;IACrE,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,EAAE,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;CACrB;AAED,iBAAS,OAAO,CAAC,EACf,KAAK,EACL,KAAK,EACL,KAAK,EACL,MAAM,EACN,MAAM,EACN,IAAI,EACJ,MAAgB,EAChB,MAAM,EACN,EAAE,GACH,EAAE,YAAY,qBAsId;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,205 @@
|
|
|
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 _ArrowUpward = _interopRequireDefault(require("@mui/icons-material/ArrowUpward"));
|
|
10
|
+
var _ArrowDownward = _interopRequireDefault(require("@mui/icons-material/ArrowDownward"));
|
|
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 _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
17
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
20
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
21
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
22
|
+
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; }
|
|
23
|
+
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; }
|
|
24
|
+
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; }
|
|
25
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
26
|
+
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); } /**
|
|
27
|
+
* KPICard - Portnet UI v2
|
|
28
|
+
*
|
|
29
|
+
* Charter §03 · Component "KPI Card".
|
|
30
|
+
* Label uppercase 11 px + valeur 24 px + delta % vs période · tabular-nums.
|
|
31
|
+
*
|
|
32
|
+
* <KPICard label="Titres en attente" value={42} delta={+12.5} period="vs mois dernier" />
|
|
33
|
+
*
|
|
34
|
+
* Localisation (FR / EN / AR):
|
|
35
|
+
* <KPICard
|
|
36
|
+
* label="Pending titles"
|
|
37
|
+
* value={42}
|
|
38
|
+
* delta={+12.5}
|
|
39
|
+
* period="vs last month"
|
|
40
|
+
* locale="en-US"
|
|
41
|
+
* labels={{ up: "up by ", down: "down by " }}
|
|
42
|
+
* />
|
|
43
|
+
*
|
|
44
|
+
* - `locale` controls the delta percentage's separator (12.5 vs 12,5).
|
|
45
|
+
* - `labels.up` / `labels.down` are SR-only direction prefixes; default
|
|
46
|
+
* French preserved for back-compat.
|
|
47
|
+
*
|
|
48
|
+
* A11y note (WCAG 1.4.1 + 1.4.3):
|
|
49
|
+
* The delta is conveyed by THREE channels:
|
|
50
|
+
* - icon (visual, non-text - uses --success / --danger, 1.4.11)
|
|
51
|
+
* - colour (visual reinforcement only)
|
|
52
|
+
* - text (uses --success-fg / --danger-fg for 4.5:1 contrast, 1.4.3)
|
|
53
|
+
* The direction is also announced to screen readers via a SR-only
|
|
54
|
+
* "en hausse de" / "en baisse de" prefix (1.4.1).
|
|
55
|
+
*/
|
|
56
|
+
var DEFAULT_LABELS = Object.freeze({
|
|
57
|
+
up: "en hausse de ",
|
|
58
|
+
down: "en baisse de "
|
|
59
|
+
});
|
|
60
|
+
function formatDelta(n, locale) {
|
|
61
|
+
var opts = {
|
|
62
|
+
maximumFractionDigits: 2
|
|
63
|
+
};
|
|
64
|
+
try {
|
|
65
|
+
return new Intl.NumberFormat(locale, opts).format(n);
|
|
66
|
+
} catch (_unused) {
|
|
67
|
+
// Invalid BCP-47 tag → fall back to fr-FR rather than throwing.
|
|
68
|
+
return new Intl.NumberFormat("fr-FR", opts).format(n);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
function KPICard(_ref) {
|
|
72
|
+
var label = _ref.label,
|
|
73
|
+
value = _ref.value,
|
|
74
|
+
delta = _ref.delta,
|
|
75
|
+
period = _ref.period,
|
|
76
|
+
helper = _ref.helper,
|
|
77
|
+
icon = _ref.icon,
|
|
78
|
+
_ref$locale = _ref.locale,
|
|
79
|
+
locale = _ref$locale === void 0 ? "fr-FR" : _ref$locale,
|
|
80
|
+
labels = _ref.labels,
|
|
81
|
+
sx = _ref.sx;
|
|
82
|
+
var L = labels ? _objectSpread(_objectSpread({}, DEFAULT_LABELS), labels) : DEFAULT_LABELS;
|
|
83
|
+
|
|
84
|
+
// Parse delta into a definite `number | null` so the sign checks and
|
|
85
|
+
// Math.abs below narrow cleanly under strictNullChecks.
|
|
86
|
+
var parsed = delta == null || delta === "" ? null : Number(delta);
|
|
87
|
+
var deltaNum = parsed !== null && Number.isFinite(parsed) ? parsed : null;
|
|
88
|
+
var isPositive = deltaNum !== null && deltaNum > 0;
|
|
89
|
+
var isNegative = deltaNum !== null && deltaNum < 0;
|
|
90
|
+
|
|
91
|
+
// R-G.1 - split icon vs text colour so the icon stays vivid (1.4.11)
|
|
92
|
+
// while the numeric text meets 1.4.3 (4.5:1 against white).
|
|
93
|
+
var iconColor = isPositive ? "var(--success)" : isNegative ? "var(--danger)" : "var(--fg-subtle)";
|
|
94
|
+
var textColor = isPositive ? "var(--success-fg)" : isNegative ? "var(--danger-fg)" : "var(--fg-subtle)";
|
|
95
|
+
|
|
96
|
+
// SR-only direction prefix - empty for zero or missing deltas (the bare
|
|
97
|
+
// "0 %" already reads correctly without a direction word).
|
|
98
|
+
var directionLabel = isPositive ? L.up : isNegative ? L.down : "";
|
|
99
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
100
|
+
sx: [{
|
|
101
|
+
padding: "var(--s-4) var(--s-5)",
|
|
102
|
+
background: "var(--surface)",
|
|
103
|
+
border: "1px solid var(--border)",
|
|
104
|
+
borderRadius: "var(--r-lg)",
|
|
105
|
+
boxShadow: "var(--shadow-xs)",
|
|
106
|
+
minWidth: 0
|
|
107
|
+
}].concat(_toConsumableArray(Array.isArray(sx) ? sx : sx ? [sx] : [])),
|
|
108
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
109
|
+
sx: {
|
|
110
|
+
display: "flex",
|
|
111
|
+
alignItems: "center",
|
|
112
|
+
justifyContent: "space-between",
|
|
113
|
+
marginBottom: 1
|
|
114
|
+
},
|
|
115
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
116
|
+
component: "p",
|
|
117
|
+
sx: {
|
|
118
|
+
margin: 0,
|
|
119
|
+
// Charter §03 KPI Card - explicit literal "label uppercase 11 px"
|
|
120
|
+
fontSize: 11,
|
|
121
|
+
fontWeight: "var(--fw-semibold)",
|
|
122
|
+
letterSpacing: "0.06em",
|
|
123
|
+
textTransform: "uppercase",
|
|
124
|
+
color: "var(--fg-subtle)"
|
|
125
|
+
},
|
|
126
|
+
children: label
|
|
127
|
+
}), icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
128
|
+
sx: {
|
|
129
|
+
color: "var(--fg-subtle)"
|
|
130
|
+
},
|
|
131
|
+
children: icon
|
|
132
|
+
})]
|
|
133
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
134
|
+
component: "p",
|
|
135
|
+
sx: {
|
|
136
|
+
margin: 0,
|
|
137
|
+
// Charter §03 KPI Card - explicit literal "valeur 24 px"
|
|
138
|
+
fontSize: 24,
|
|
139
|
+
// Heaviest weight in the post-Batch-1 scale (700). The black-weight
|
|
140
|
+
// custom property this once referenced was dropped from the
|
|
141
|
+
// typography tokens and resolved to undefined in CSS, silently
|
|
142
|
+
// flattening the weight on every dashboard KPI.
|
|
143
|
+
//
|
|
144
|
+
// The old name is deliberately NOT spelled out here: the
|
|
145
|
+
// banned-patterns guard is a raw text scan with no comment
|
|
146
|
+
// awareness, so writing it - even to document its removal - trips
|
|
147
|
+
// the very rule that protects this line. See banned-patterns.test.ts.
|
|
148
|
+
fontWeight: "var(--fw-bold)",
|
|
149
|
+
color: "var(--fg)",
|
|
150
|
+
fontVariantNumeric: "tabular-nums",
|
|
151
|
+
letterSpacing: "-0.01em",
|
|
152
|
+
lineHeight: "var(--lh-tight)"
|
|
153
|
+
},
|
|
154
|
+
children: value !== null && value !== void 0 ? value : "—"
|
|
155
|
+
}), (deltaNum !== null || helper) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
156
|
+
sx: {
|
|
157
|
+
display: "flex",
|
|
158
|
+
alignItems: "center",
|
|
159
|
+
gap: 1,
|
|
160
|
+
marginTop: 1,
|
|
161
|
+
fontSize: "var(--text-xs)"
|
|
162
|
+
},
|
|
163
|
+
children: [deltaNum !== null && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
164
|
+
sx: {
|
|
165
|
+
display: "inline-flex",
|
|
166
|
+
alignItems: "center",
|
|
167
|
+
gap: 0.25,
|
|
168
|
+
// Default colour for the block = textColor. The icon
|
|
169
|
+
// overrides to iconColor below for a vivid arrow against
|
|
170
|
+
// a darker numeric label.
|
|
171
|
+
color: textColor,
|
|
172
|
+
fontWeight: "var(--fw-semibold)",
|
|
173
|
+
// R-T.3 - tabular-nums on delta so percentages align across cards
|
|
174
|
+
fontVariantNumeric: "tabular-nums"
|
|
175
|
+
},
|
|
176
|
+
children: [directionLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
177
|
+
className: "pui-sr-only",
|
|
178
|
+
children: directionLabel
|
|
179
|
+
}), isPositive ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArrowUpward["default"], {
|
|
180
|
+
"aria-hidden": "true",
|
|
181
|
+
sx: {
|
|
182
|
+
fontSize: "var(--text-xs)",
|
|
183
|
+
color: iconColor
|
|
184
|
+
}
|
|
185
|
+
}) : isNegative ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ArrowDownward["default"], {
|
|
186
|
+
"aria-hidden": "true",
|
|
187
|
+
sx: {
|
|
188
|
+
fontSize: "var(--text-xs)",
|
|
189
|
+
color: iconColor
|
|
190
|
+
}
|
|
191
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
192
|
+
children: [formatDelta(Math.abs(deltaNum), locale), " %"]
|
|
193
|
+
})]
|
|
194
|
+
}), (period || helper) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
195
|
+
component: "span",
|
|
196
|
+
sx: {
|
|
197
|
+
color: "var(--fg-subtle)"
|
|
198
|
+
},
|
|
199
|
+
children: helper || period
|
|
200
|
+
})]
|
|
201
|
+
})]
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
var _default = exports["default"] = KPICard;
|
|
205
|
+
//# sourceMappingURL=KPICard.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KPICard.js","names":["React","_interopRequireWildcard","require","_Box","_interopRequireDefault","_ArrowUpward","_ArrowDownward","_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","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","TypeError","o","minLen","_arrayLikeToArray","n","toString","slice","name","Array","from","test","iter","isArray","len","length","i","arr2","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","arguments","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","Number","DEFAULT_LABELS","freeze","up","down","formatDelta","locale","opts","maximumFractionDigits","Intl","NumberFormat","format","_unused","KPICard","_ref","label","delta","period","helper","icon","_ref$locale","labels","sx","L","parsed","deltaNum","isFinite","isPositive","isNegative","iconColor","textColor","directionLabel","jsxs","padding","background","border","borderRadius","boxShadow","minWidth","concat","children","display","alignItems","justifyContent","marginBottom","jsx","component","margin","fontSize","fontWeight","letterSpacing","textTransform","color","fontVariantNumeric","lineHeight","gap","marginTop","className","Math","abs","_default","exports"],"sources":["../../../src/lib/v2/components/KPICard.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 ArrowUpwardIcon from \"@mui/icons-material/ArrowUpward\";\r\nimport ArrowDownwardIcon from \"@mui/icons-material/ArrowDownward\";\r\n\r\n/**\r\n * KPICard - Portnet UI v2\r\n *\r\n * Charter §03 · Component \"KPI Card\".\r\n * Label uppercase 11 px + valeur 24 px + delta % vs période · tabular-nums.\r\n *\r\n * <KPICard label=\"Titres en attente\" value={42} delta={+12.5} period=\"vs mois dernier\" />\r\n *\r\n * Localisation (FR / EN / AR):\r\n * <KPICard\r\n * label=\"Pending titles\"\r\n * value={42}\r\n * delta={+12.5}\r\n * period=\"vs last month\"\r\n * locale=\"en-US\"\r\n * labels={{ up: \"up by \", down: \"down by \" }}\r\n * />\r\n *\r\n * - `locale` controls the delta percentage's separator (12.5 vs 12,5).\r\n * - `labels.up` / `labels.down` are SR-only direction prefixes; default\r\n * French preserved for back-compat.\r\n *\r\n * A11y note (WCAG 1.4.1 + 1.4.3):\r\n * The delta is conveyed by THREE channels:\r\n * - icon (visual, non-text - uses --success / --danger, 1.4.11)\r\n * - colour (visual reinforcement only)\r\n * - text (uses --success-fg / --danger-fg for 4.5:1 contrast, 1.4.3)\r\n * The direction is also announced to screen readers via a SR-only\r\n * \"en hausse de\" / \"en baisse de\" prefix (1.4.1).\r\n */\r\n\r\nconst DEFAULT_LABELS = Object.freeze({\r\n up: \"en hausse de \",\r\n down: \"en baisse de \",\r\n});\r\n\r\nfunction formatDelta(n: number, locale: string): string {\r\n const opts: Intl.NumberFormatOptions = { maximumFractionDigits: 2 };\r\n try {\r\n return new Intl.NumberFormat(locale, opts).format(n);\r\n } catch {\r\n // Invalid BCP-47 tag → fall back to fr-FR rather than throwing.\r\n return new Intl.NumberFormat(\"fr-FR\", opts).format(n);\r\n }\r\n}\r\n\r\nexport interface KPICardLabels {\r\n up?: string;\r\n down?: string;\r\n}\r\n\r\nexport interface KPICardProps {\r\n label: React.ReactNode;\r\n value?: React.ReactNode;\r\n delta?: number | string;\r\n period?: React.ReactNode;\r\n helper?: React.ReactNode;\r\n /** Reserved for future visual variants; currently only \"default\". */\r\n variant?: \"default\";\r\n icon?: React.ReactElement;\r\n locale?: string;\r\n labels?: KPICardLabels;\r\n sx?: SxProps<Theme>;\r\n}\r\n\r\nfunction KPICard({\r\n label,\r\n value,\r\n delta,\r\n period,\r\n helper,\r\n icon,\r\n locale = \"fr-FR\",\r\n labels,\r\n sx,\r\n}: KPICardProps) {\r\n const L = labels ? { ...DEFAULT_LABELS, ...labels } : DEFAULT_LABELS;\r\n\r\n // Parse delta into a definite `number | null` so the sign checks and\r\n // Math.abs below narrow cleanly under strictNullChecks.\r\n const parsed = delta == null || delta === \"\" ? null : Number(delta);\r\n const deltaNum: number | null =\r\n parsed !== null && Number.isFinite(parsed) ? parsed : null;\r\n const isPositive = deltaNum !== null && deltaNum > 0;\r\n const isNegative = deltaNum !== null && deltaNum < 0;\r\n\r\n // R-G.1 - split icon vs text colour so the icon stays vivid (1.4.11)\r\n // while the numeric text meets 1.4.3 (4.5:1 against white).\r\n const iconColor =\r\n isPositive ? \"var(--success)\" :\r\n isNegative ? \"var(--danger)\" : \"var(--fg-subtle)\";\r\n const textColor =\r\n isPositive ? \"var(--success-fg)\" :\r\n isNegative ? \"var(--danger-fg)\" : \"var(--fg-subtle)\";\r\n\r\n // SR-only direction prefix - empty for zero or missing deltas (the bare\r\n // \"0 %\" already reads correctly without a direction word).\r\n const directionLabel =\r\n isPositive ? L.up :\r\n isNegative ? L.down : \"\";\r\n\r\n return (\r\n <Box\r\n sx={[\r\n {\r\n padding: \"var(--s-4) var(--s-5)\",\r\n background: \"var(--surface)\",\r\n border: \"1px solid var(--border)\",\r\n borderRadius: \"var(--r-lg)\",\r\n boxShadow: \"var(--shadow-xs)\",\r\n minWidth: 0,\r\n },\r\n ...(Array.isArray(sx) ? sx : sx ? [sx] : []),\r\n ]}\r\n >\r\n <Box sx={{ display: \"flex\", alignItems: \"center\", justifyContent: \"space-between\", marginBottom: 1 }}>\r\n <Box\r\n component=\"p\"\r\n sx={{\r\n margin: 0,\r\n // Charter §03 KPI Card - explicit literal \"label uppercase 11 px\"\r\n fontSize: 11,\r\n fontWeight: \"var(--fw-semibold)\",\r\n letterSpacing: \"0.06em\",\r\n textTransform: \"uppercase\",\r\n color: \"var(--fg-subtle)\",\r\n }}\r\n >\r\n {label}\r\n </Box>\r\n {icon && <Box sx={{ color: \"var(--fg-subtle)\" }}>{icon}</Box>}\r\n </Box>\r\n <Box\r\n component=\"p\"\r\n sx={{\r\n margin: 0,\r\n // Charter §03 KPI Card - explicit literal \"valeur 24 px\"\r\n fontSize: 24,\r\n // Heaviest weight in the post-Batch-1 scale (700). The black-weight\r\n // custom property this once referenced was dropped from the\r\n // typography tokens and resolved to undefined in CSS, silently\r\n // flattening the weight on every dashboard KPI.\r\n //\r\n // The old name is deliberately NOT spelled out here: the\r\n // banned-patterns guard is a raw text scan with no comment\r\n // awareness, so writing it - even to document its removal - trips\r\n // the very rule that protects this line. See banned-patterns.test.ts.\r\n fontWeight: \"var(--fw-bold)\",\r\n color: \"var(--fg)\",\r\n fontVariantNumeric: \"tabular-nums\",\r\n letterSpacing: \"-0.01em\",\r\n lineHeight: \"var(--lh-tight)\",\r\n }}\r\n >\r\n {value ?? \"—\"}\r\n </Box>\r\n {(deltaNum !== null || helper) && (\r\n <Box\r\n sx={{\r\n display: \"flex\",\r\n alignItems: \"center\",\r\n gap: 1,\r\n marginTop: 1,\r\n fontSize: \"var(--text-xs)\",\r\n }}\r\n >\r\n {deltaNum !== null && (\r\n <Box\r\n sx={{\r\n display: \"inline-flex\",\r\n alignItems: \"center\",\r\n gap: 0.25,\r\n // Default colour for the block = textColor. The icon\r\n // overrides to iconColor below for a vivid arrow against\r\n // a darker numeric label.\r\n color: textColor,\r\n fontWeight: \"var(--fw-semibold)\",\r\n // R-T.3 - tabular-nums on delta so percentages align across cards\r\n fontVariantNumeric: \"tabular-nums\",\r\n }}\r\n >\r\n {/* WCAG 1.4.1 - direction is announced to SR only; sighted\r\n users get the arrow + colour. */}\r\n {directionLabel && (\r\n <span className=\"pui-sr-only\">{directionLabel}</span>\r\n )}\r\n {isPositive ? (\r\n <ArrowUpwardIcon\r\n aria-hidden=\"true\"\r\n sx={{ fontSize: \"var(--text-xs)\", color: iconColor }}\r\n />\r\n ) : isNegative ? (\r\n <ArrowDownwardIcon\r\n aria-hidden=\"true\"\r\n sx={{ fontSize: \"var(--text-xs)\", color: iconColor }}\r\n />\r\n ) : null}\r\n <span>{formatDelta(Math.abs(deltaNum), locale)} %</span>\r\n </Box>\r\n )}\r\n {(period || helper) && (\r\n <Box component=\"span\" sx={{ color: \"var(--fg-subtle)\" }}>\r\n {helper || period}\r\n </Box>\r\n )}\r\n </Box>\r\n )}\r\n </Box>\r\n );\r\n}\r\n\r\nexport default KPICard;\r\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,IAAA,GAAAC,sBAAA,CAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,cAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAkE,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAE,uBAAAI,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,SAAAV,wBAAAO,GAAA,EAAAG,WAAA,SAAAA,WAAA,IAAAH,GAAA,IAAA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,QAAQ,CAAC,EAAEnB,MAAM,CAAC,EAAC,IAAE;QAAA,CAAM,CAAC;MAAA,CACrD,CACN,EACA,CAACW,MAAM,IAAIC,MAAM,kBAChB,IAAAnG,WAAA,CAAA8H,GAAA,EAAClI,IAAA,WAAG;QAACmI,SAAS,EAAC,MAAM;QAACxB,EAAE,EAAE;UAAE8B,KAAK,EAAE;QAAmB,CAAE;QAAAZ,QAAA,EACrDtB,MAAM,IAAID;MAAM,CACd,CACN;IAAA,CACE,CACN;EAAA,CACE,CAAC;AAEV;AAAC,IAAA2C,QAAA,GAAAC,OAAA,cAEchD,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
/**
|
|
3
|
+
* KV — Label / value pair for detail panes.
|
|
4
|
+
*
|
|
5
|
+
* The label and value are explicitly paired via `aria-labelledby` so
|
|
6
|
+
* screen readers announce them as one semantic unit (e.g. "IMPORTATEUR
|
|
7
|
+
* SOFRANE SA") instead of two adjacent-but-unrelated text nodes.
|
|
8
|
+
*
|
|
9
|
+
* Density-aware: the value renders at var(--text-fs), tracking the
|
|
10
|
+
* surrounding density tier (comfortable=14 / compact=13 / spacious=15
|
|
11
|
+
* / ultraCompact=12). The label stays at 11 px — its size is a
|
|
12
|
+
* semantic property of the eyebrow-text role, not body density.
|
|
13
|
+
*
|
|
14
|
+
* <KV label="Importateur" value="SOFRANE SA" />
|
|
15
|
+
* <KV label="Référence" value="2025-IM-0042" mono />
|
|
16
|
+
*/
|
|
17
|
+
export interface KVProps {
|
|
18
|
+
label: React.ReactNode;
|
|
19
|
+
value?: React.ReactNode;
|
|
20
|
+
mono?: boolean;
|
|
21
|
+
fallback?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
declare function KV({ label, value, mono, fallback }: KVProps): React.JSX.Element;
|
|
24
|
+
export default KV;
|
|
25
|
+
//# sourceMappingURL=KV.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KV.d.ts","sourceRoot":"","sources":["../../../src/lib/v2/components/KV.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B;;;;;;;;;;;;;;GAcG;AAEH,MAAM,WAAW,OAAO;IACtB,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,iBAAS,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,IAAY,EAAE,QAAc,EAAE,EAAE,OAAO,qBA0ClE;AAED,eAAe,EAAE,CAAC"}
|
|
@@ -0,0 +1,82 @@
|
|
|
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 _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
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); }
|
|
14
|
+
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; }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
18
|
+
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); } /**
|
|
19
|
+
* KV — Label / value pair for detail panes.
|
|
20
|
+
*
|
|
21
|
+
* The label and value are explicitly paired via `aria-labelledby` so
|
|
22
|
+
* screen readers announce them as one semantic unit (e.g. "IMPORTATEUR
|
|
23
|
+
* SOFRANE SA") instead of two adjacent-but-unrelated text nodes.
|
|
24
|
+
*
|
|
25
|
+
* Density-aware: the value renders at var(--text-fs), tracking the
|
|
26
|
+
* surrounding density tier (comfortable=14 / compact=13 / spacious=15
|
|
27
|
+
* / ultraCompact=12). The label stays at 11 px — its size is a
|
|
28
|
+
* semantic property of the eyebrow-text role, not body density.
|
|
29
|
+
*
|
|
30
|
+
* <KV label="Importateur" value="SOFRANE SA" />
|
|
31
|
+
* <KV label="Référence" value="2025-IM-0042" mono />
|
|
32
|
+
*/
|
|
33
|
+
function KV(_ref) {
|
|
34
|
+
var label = _ref.label,
|
|
35
|
+
value = _ref.value,
|
|
36
|
+
_ref$mono = _ref.mono,
|
|
37
|
+
mono = _ref$mono === void 0 ? false : _ref$mono,
|
|
38
|
+
_ref$fallback = _ref.fallback,
|
|
39
|
+
fallback = _ref$fallback === void 0 ? "—" : _ref$fallback;
|
|
40
|
+
var display = value === null || value === undefined || value === "" ? fallback : value;
|
|
41
|
+
var isMissing = display === fallback;
|
|
42
|
+
var labelId = React.useId();
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Box["default"], {
|
|
44
|
+
sx: {
|
|
45
|
+
minWidth: 0
|
|
46
|
+
},
|
|
47
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
48
|
+
id: labelId,
|
|
49
|
+
sx: {
|
|
50
|
+
fontSize: 11,
|
|
51
|
+
color: "var(--fg-subtle)",
|
|
52
|
+
fontWeight: "var(--fw-medium)",
|
|
53
|
+
marginBottom: 0.5,
|
|
54
|
+
textTransform: "uppercase",
|
|
55
|
+
/* A7-02 — was a raw "0.04em". This component is one of the two places
|
|
56
|
+
* the value was hardcoded INSIDE the library, which is what
|
|
57
|
+
* established it as platform vocabulary and justified promoting the
|
|
58
|
+
* letter-spacing scale rather than stripping the tracking. */
|
|
59
|
+
letterSpacing: "var(--ls-wide)"
|
|
60
|
+
},
|
|
61
|
+
children: label
|
|
62
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Box["default"], {
|
|
63
|
+
"aria-labelledby": labelId,
|
|
64
|
+
sx: _objectSpread(_objectSpread({
|
|
65
|
+
// B1 — density-aware body font size, tracking the host's
|
|
66
|
+
// data-density attribute. Aligns KV cells with DataGrid
|
|
67
|
+
// body cells (which already use --text-fs).
|
|
68
|
+
fontSize: "var(--text-fs)",
|
|
69
|
+
fontWeight: "var(--fw-medium)",
|
|
70
|
+
color: isMissing ? "var(--fg-subtle)" : "var(--fg)"
|
|
71
|
+
}, mono ? {
|
|
72
|
+
fontFamily: "var(--font-mono)",
|
|
73
|
+
fontVariantNumeric: "tabular-nums"
|
|
74
|
+
} : {}), {}, {
|
|
75
|
+
wordBreak: "break-word"
|
|
76
|
+
}),
|
|
77
|
+
children: display
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
var _default = exports["default"] = KV;
|
|
82
|
+
//# sourceMappingURL=KV.js.map
|