@clicoh/orion-library 1.2.0-beta.2 → 1.2.0-beta.20
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/assets/css/expresivo.css +968 -0
- package/assets/logos/oculus-icon.svg +1 -0
- package/assets/logos/oculus-logo-sm-dark.svg +1 -0
- package/assets/logos/oculus-logo-sm.svg +1 -0
- package/assets/mascotas/svg/bugi-mascota-01-alerta.svg +39 -0
- package/assets/mascotas/svg/bugi-mascota-02-investigando.svg +36 -0
- package/assets/mascotas/svg/bugi-mascota-05-sorprendido.svg +38 -0
- package/assets/mascotas/svg/oculus-mascota-01-feliz.svg +52 -0
- package/assets/mascotas/svg/oculus-mascota-02-investigando.svg +51 -0
- package/assets/mascotas/svg/oculus-mascota-03-dudando.svg +51 -0
- package/assets/mascotas/svg/oculus-mascota-04-analizando-documento.svg +53 -0
- package/assets/mascotas/svg/oculus-mascota-06-celebrando.svg +54 -0
- package/assets/mascotas/svg/oculus-mascota-07-buscando-rapido.svg +57 -0
- package/assets/mascotas/svg/oculus-mascota-08-satisfecho.svg +55 -0
- package/assets/mascotas/webp/fixi-mascota-01-feliz-sm.webp +0 -0
- package/assets/mascotas/webp/fixi-mascota-02-investigando-sm.webp +0 -0
- package/assets/mascotas/webp/fixi-mascota-03-dudando-sm.webp +0 -0
- package/assets/mascotas/webp/fixi-mascota-04-reparando-sm.webp +0 -0
- package/assets/mascotas/webp/fixi-mascota-05-sorprendido-sm.webp +0 -0
- package/assets/mascotas/webp/fixi-mascota-06-celebrando-sm.webp +0 -0
- package/assets/mascotas/webp/fixi-mascota-07-corriendo-sm.webp +0 -0
- package/dist/components/01-atoms/Button/Button.d.ts +21 -1
- package/dist/components/01-atoms/Button/Button.d.ts.map +1 -1
- package/dist/components/01-atoms/Button/Button.jsx +38 -4
- package/dist/components/01-atoms/Button/Button.jsx.map +1 -1
- package/dist/components/01-atoms/CodeBlock/CodeBlock.d.ts +56 -0
- package/dist/components/01-atoms/CodeBlock/CodeBlock.d.ts.map +1 -0
- package/dist/components/01-atoms/CodeBlock/CodeBlock.jsx +97 -0
- package/dist/components/01-atoms/CodeBlock/CodeBlock.jsx.map +1 -0
- package/dist/components/01-atoms/CodeBlock/index.d.ts +2 -0
- package/dist/components/01-atoms/CodeBlock/index.d.ts.map +1 -0
- package/dist/components/01-atoms/CodeBlock/index.js +2 -0
- package/dist/components/01-atoms/CodeBlock/index.js.map +1 -0
- package/dist/components/01-atoms/Heading/Heading.jsx +1 -1
- package/dist/components/01-atoms/Heading/Heading.jsx.map +1 -1
- package/dist/components/01-atoms/IconButton/IconButton.d.ts +28 -0
- package/dist/components/01-atoms/IconButton/IconButton.d.ts.map +1 -0
- package/dist/components/01-atoms/IconButton/IconButton.jsx +32 -0
- package/dist/components/01-atoms/IconButton/IconButton.jsx.map +1 -0
- package/dist/components/01-atoms/IconButton/index.d.ts +2 -0
- package/dist/components/01-atoms/IconButton/index.d.ts.map +1 -0
- package/dist/components/01-atoms/IconButton/index.js +2 -0
- package/dist/components/01-atoms/IconButton/index.js.map +1 -0
- package/dist/components/01-atoms/Input/Input.d.ts +1 -1
- package/dist/components/01-atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/01-atoms/Input/Input.jsx +13 -9
- package/dist/components/01-atoms/Input/Input.jsx.map +1 -1
- package/dist/components/01-atoms/Input/utils/RenderErrorOrHelperText.d.ts.map +1 -1
- package/dist/components/01-atoms/Input/utils/RenderErrorOrHelperText.jsx +1 -1
- package/dist/components/01-atoms/Input/utils/RenderErrorOrHelperText.jsx.map +1 -1
- package/dist/components/01-atoms/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/01-atoms/MultiSelect/MultiSelect.jsx +2 -1
- package/dist/components/01-atoms/MultiSelect/MultiSelect.jsx.map +1 -1
- package/dist/components/01-atoms/ProgressBar/ProgressBar.d.ts +12 -1
- package/dist/components/01-atoms/ProgressBar/ProgressBar.d.ts.map +1 -1
- package/dist/components/01-atoms/ProgressBar/ProgressBar.jsx +18 -2
- package/dist/components/01-atoms/ProgressBar/ProgressBar.jsx.map +1 -1
- package/dist/components/01-atoms/Select/Select.d.ts +7 -1
- package/dist/components/01-atoms/Select/Select.d.ts.map +1 -1
- package/dist/components/01-atoms/Select/Select.jsx +61 -13
- package/dist/components/01-atoms/Select/Select.jsx.map +1 -1
- package/dist/components/01-atoms/Select/SelectList.d.ts +41 -0
- package/dist/components/01-atoms/Select/SelectList.d.ts.map +1 -0
- package/dist/components/01-atoms/Select/SelectList.jsx +116 -0
- package/dist/components/01-atoms/Select/SelectList.jsx.map +1 -0
- package/dist/components/01-atoms/SmallInput/SmallInput.d.ts.map +1 -1
- package/dist/components/01-atoms/SmallInput/SmallInput.jsx +1 -0
- package/dist/components/01-atoms/SmallInput/SmallInput.jsx.map +1 -1
- package/dist/components/01-atoms/Spinner/Spinner.d.ts +24 -3
- package/dist/components/01-atoms/Spinner/Spinner.d.ts.map +1 -1
- package/dist/components/01-atoms/Spinner/Spinner.jsx +30 -4
- package/dist/components/01-atoms/Spinner/Spinner.jsx.map +1 -1
- package/dist/components/01-atoms/Spinner/index.d.ts +1 -0
- package/dist/components/01-atoms/Spinner/index.d.ts.map +1 -1
- package/dist/components/01-atoms/Stat/Stat.d.ts +47 -0
- package/dist/components/01-atoms/Stat/Stat.d.ts.map +1 -0
- package/dist/components/01-atoms/Stat/Stat.jsx +64 -0
- package/dist/components/01-atoms/Stat/Stat.jsx.map +1 -0
- package/dist/components/01-atoms/Stat/index.d.ts +2 -0
- package/dist/components/01-atoms/Stat/index.d.ts.map +1 -0
- package/dist/components/01-atoms/Stat/index.js +2 -0
- package/dist/components/01-atoms/Stat/index.js.map +1 -0
- package/dist/components/01-atoms/Switch/Switch.d.ts +5 -2
- package/dist/components/01-atoms/Switch/Switch.d.ts.map +1 -1
- package/dist/components/01-atoms/Switch/Switch.jsx +15 -12
- package/dist/components/01-atoms/Switch/Switch.jsx.map +1 -1
- package/dist/components/01-atoms/Textarea/Textarea.d.ts +38 -0
- package/dist/components/01-atoms/Textarea/Textarea.d.ts.map +1 -0
- package/dist/components/01-atoms/Textarea/Textarea.jsx +50 -0
- package/dist/components/01-atoms/Textarea/Textarea.jsx.map +1 -0
- package/dist/components/01-atoms/Textarea/index.d.ts +2 -0
- package/dist/components/01-atoms/Textarea/index.d.ts.map +1 -0
- package/dist/components/01-atoms/Textarea/index.js +2 -0
- package/dist/components/01-atoms/Textarea/index.js.map +1 -0
- package/dist/components/01-atoms/Toast/Toast.d.ts.map +1 -1
- package/dist/components/01-atoms/Toast/Toast.jsx +3 -1
- package/dist/components/01-atoms/Toast/Toast.jsx.map +1 -1
- package/dist/components/01-atoms/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/01-atoms/Tooltip/Tooltip.jsx +4 -1
- package/dist/components/01-atoms/Tooltip/Tooltip.jsx.map +1 -1
- package/dist/components/01-atoms/index.d.ts +4 -0
- package/dist/components/01-atoms/index.d.ts.map +1 -1
- package/dist/components/01-atoms/index.js +4 -0
- package/dist/components/01-atoms/index.js.map +1 -1
- package/dist/components/02-molecules/Accordion/Accordion.d.ts +15 -4
- package/dist/components/02-molecules/Accordion/Accordion.d.ts.map +1 -1
- package/dist/components/02-molecules/Accordion/Accordion.jsx +20 -6
- package/dist/components/02-molecules/Accordion/Accordion.jsx.map +1 -1
- package/dist/components/02-molecules/Accordion/AccordionContext.d.ts +5 -1
- package/dist/components/02-molecules/Accordion/AccordionContext.d.ts.map +1 -1
- package/dist/components/02-molecules/Accordion/AccordionContext.jsx +7 -6
- package/dist/components/02-molecules/Accordion/AccordionContext.jsx.map +1 -1
- package/dist/components/02-molecules/Accordion/AccordionSection.d.ts +2 -1
- package/dist/components/02-molecules/Accordion/AccordionSection.d.ts.map +1 -1
- package/dist/components/02-molecules/Accordion/AccordionSection.jsx +62 -11
- package/dist/components/02-molecules/Accordion/AccordionSection.jsx.map +1 -1
- package/dist/components/02-molecules/Accordion/index.d.ts +1 -0
- package/dist/components/02-molecules/Accordion/index.d.ts.map +1 -1
- package/dist/components/02-molecules/Accordion/index.js.map +1 -1
- package/dist/components/02-molecules/Autocomplete/Autocomplete.d.ts +4 -1
- package/dist/components/02-molecules/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/02-molecules/Autocomplete/Autocomplete.jsx +34 -15
- package/dist/components/02-molecules/Autocomplete/Autocomplete.jsx.map +1 -1
- package/dist/components/02-molecules/Card/Card.d.ts +74 -0
- package/dist/components/02-molecules/Card/Card.d.ts.map +1 -0
- package/dist/components/02-molecules/Card/Card.jsx +87 -0
- package/dist/components/02-molecules/Card/Card.jsx.map +1 -0
- package/dist/components/02-molecules/Card/index.d.ts +2 -0
- package/dist/components/02-molecules/Card/index.d.ts.map +1 -0
- package/dist/components/02-molecules/Card/index.js +2 -0
- package/dist/components/02-molecules/Card/index.js.map +1 -0
- package/dist/components/02-molecules/DatePicker/DatePicker.d.ts +41 -3
- package/dist/components/02-molecules/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/02-molecules/DatePicker/DatePicker.jsx +190 -34
- package/dist/components/02-molecules/DatePicker/DatePicker.jsx.map +1 -1
- package/dist/components/02-molecules/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/02-molecules/Dropdown/Dropdown.jsx +1 -0
- package/dist/components/02-molecules/Dropdown/Dropdown.jsx.map +1 -1
- package/dist/components/02-molecules/EmptyState/EmptyState.d.ts +52 -0
- package/dist/components/02-molecules/EmptyState/EmptyState.d.ts.map +1 -0
- package/dist/components/02-molecules/EmptyState/EmptyState.jsx +66 -0
- package/dist/components/02-molecules/EmptyState/EmptyState.jsx.map +1 -0
- package/dist/components/02-molecules/EmptyState/index.d.ts +2 -0
- package/dist/components/02-molecules/EmptyState/index.d.ts.map +1 -0
- package/dist/components/02-molecules/EmptyState/index.js +2 -0
- package/dist/components/02-molecules/EmptyState/index.js.map +1 -0
- package/dist/components/02-molecules/Filter/Filter.d.ts +8 -1
- package/dist/components/02-molecules/Filter/Filter.d.ts.map +1 -1
- package/dist/components/02-molecules/Filter/Filter.jsx +35 -11
- package/dist/components/02-molecules/Filter/Filter.jsx.map +1 -1
- package/dist/components/02-molecules/Filter/index.d.ts +1 -0
- package/dist/components/02-molecules/Filter/index.d.ts.map +1 -1
- package/dist/components/02-molecules/Filter/index.js +1 -0
- package/dist/components/02-molecules/Filter/index.js.map +1 -1
- package/dist/components/02-molecules/Filter/types.d.ts +24 -5
- package/dist/components/02-molecules/Filter/types.d.ts.map +1 -1
- package/dist/components/02-molecules/Filter/utils/pruneOrphanValues.d.ts +34 -0
- package/dist/components/02-molecules/Filter/utils/pruneOrphanValues.d.ts.map +1 -0
- package/dist/components/02-molecules/Filter/utils/pruneOrphanValues.js +70 -0
- package/dist/components/02-molecules/Filter/utils/pruneOrphanValues.js.map +1 -0
- package/dist/components/02-molecules/ImageViewer/ImageViewer.d.ts +55 -5
- package/dist/components/02-molecules/ImageViewer/ImageViewer.d.ts.map +1 -1
- package/dist/components/02-molecules/ImageViewer/ImageViewer.jsx +118 -27
- package/dist/components/02-molecules/ImageViewer/ImageViewer.jsx.map +1 -1
- package/dist/components/02-molecules/ImageViewer/ImageViewerImage.d.ts +40 -0
- package/dist/components/02-molecules/ImageViewer/ImageViewerImage.d.ts.map +1 -0
- package/dist/components/02-molecules/ImageViewer/ImageViewerImage.jsx +109 -0
- package/dist/components/02-molecules/ImageViewer/ImageViewerImage.jsx.map +1 -0
- package/dist/components/02-molecules/InlineMessage/InlineMessage.d.ts +15 -1
- package/dist/components/02-molecules/InlineMessage/InlineMessage.d.ts.map +1 -1
- package/dist/components/02-molecules/InlineMessage/InlineMessage.jsx +18 -3
- package/dist/components/02-molecules/InlineMessage/InlineMessage.jsx.map +1 -1
- package/dist/components/02-molecules/Menu/MenuItem.d.ts.map +1 -1
- package/dist/components/02-molecules/Menu/MenuItem.jsx +2 -2
- package/dist/components/02-molecules/Menu/MenuItem.jsx.map +1 -1
- package/dist/components/02-molecules/Menu/MenuList.d.ts.map +1 -1
- package/dist/components/02-molecules/Menu/MenuList.jsx +1 -1
- package/dist/components/02-molecules/Menu/MenuList.jsx.map +1 -1
- package/dist/components/02-molecules/Modal/Modal.d.ts +5 -1
- package/dist/components/02-molecules/Modal/Modal.d.ts.map +1 -1
- package/dist/components/02-molecules/Modal/Modal.jsx +4 -2
- package/dist/components/02-molecules/Modal/Modal.jsx.map +1 -1
- package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.d.ts +80 -0
- package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.d.ts.map +1 -0
- package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.jsx +261 -0
- package/dist/components/02-molecules/MultiAutocomplete/MultiAutocomplete.jsx.map +1 -0
- package/dist/components/02-molecules/MultiAutocomplete/index.d.ts +2 -0
- package/dist/components/02-molecules/MultiAutocomplete/index.d.ts.map +1 -0
- package/dist/components/02-molecules/MultiAutocomplete/index.js +2 -0
- package/dist/components/02-molecules/MultiAutocomplete/index.js.map +1 -0
- package/dist/components/02-molecules/Stepper/Stepper.d.ts +70 -0
- package/dist/components/02-molecules/Stepper/Stepper.d.ts.map +1 -0
- package/dist/components/02-molecules/Stepper/Stepper.jsx +204 -0
- package/dist/components/02-molecules/Stepper/Stepper.jsx.map +1 -0
- package/dist/components/02-molecules/Stepper/index.d.ts +2 -0
- package/dist/components/02-molecules/Stepper/index.d.ts.map +1 -0
- package/dist/components/02-molecules/Stepper/index.js +2 -0
- package/dist/components/02-molecules/Stepper/index.js.map +1 -0
- package/dist/components/02-molecules/Table/Table.d.ts +3 -1
- package/dist/components/02-molecules/Table/Table.d.ts.map +1 -1
- package/dist/components/02-molecules/Table/Table.jsx +6 -5
- package/dist/components/02-molecules/Table/Table.jsx.map +1 -1
- package/dist/components/02-molecules/Timeline/Timeline.d.ts +47 -0
- package/dist/components/02-molecules/Timeline/Timeline.d.ts.map +1 -0
- package/dist/components/02-molecules/Timeline/Timeline.jsx +65 -0
- package/dist/components/02-molecules/Timeline/Timeline.jsx.map +1 -0
- package/dist/components/02-molecules/Timeline/index.d.ts +2 -0
- package/dist/components/02-molecules/Timeline/index.d.ts.map +1 -0
- package/dist/components/02-molecules/Timeline/index.js +2 -0
- package/dist/components/02-molecules/Timeline/index.js.map +1 -0
- package/dist/components/02-molecules/index.d.ts +5 -0
- package/dist/components/02-molecules/index.d.ts.map +1 -1
- package/dist/components/02-molecules/index.js +5 -0
- package/dist/components/02-molecules/index.js.map +1 -1
- package/dist/components/03-organisms/DataTable/DataTable.d.ts +1 -1
- package/dist/components/03-organisms/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/03-organisms/DataTable/DataTable.jsx.map +1 -1
- package/dist/components/03-organisms/Header/Header.d.ts +3 -1
- package/dist/components/03-organisms/Header/Header.d.ts.map +1 -1
- package/dist/components/03-organisms/Header/Header.jsx +4 -5
- package/dist/components/03-organisms/Header/Header.jsx.map +1 -1
- package/dist/components/03-organisms/MapView/MapView.d.ts +14 -3
- package/dist/components/03-organisms/MapView/MapView.d.ts.map +1 -1
- package/dist/components/03-organisms/MapView/MapView.jsx +40 -9
- package/dist/components/03-organisms/MapView/MapView.jsx.map +1 -1
- package/dist/components/03-organisms/ModalMultiple/ModalMultiple.d.ts.map +1 -1
- package/dist/components/03-organisms/ModalMultiple/ModalMultiple.jsx +1 -0
- package/dist/components/03-organisms/ModalMultiple/ModalMultiple.jsx.map +1 -1
- package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.d.ts +36 -4
- package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.d.ts.map +1 -1
- package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.jsx +44 -10
- package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.jsx.map +1 -1
- package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.d.ts +6 -2
- package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.d.ts.map +1 -1
- package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.jsx +7 -3
- package/dist/components/04-templates/DashboardTemplate/HeadingWithTitle.jsx.map +1 -1
- package/dist/components/04-templates/LoginTemplate/LoginForm.d.ts +66 -3
- package/dist/components/04-templates/LoginTemplate/LoginForm.d.ts.map +1 -1
- package/dist/components/04-templates/LoginTemplate/LoginForm.jsx +80 -16
- package/dist/components/04-templates/LoginTemplate/LoginForm.jsx.map +1 -1
- package/dist/components/04-templates/LoginTemplate/LoginTemplate.d.ts +24 -4
- package/dist/components/04-templates/LoginTemplate/LoginTemplate.d.ts.map +1 -1
- package/dist/components/04-templates/LoginTemplate/LoginTemplate.jsx +27 -7
- package/dist/components/04-templates/LoginTemplate/LoginTemplate.jsx.map +1 -1
- package/dist/components/04-templates/LoginTemplate/index.d.ts +1 -0
- package/dist/components/04-templates/LoginTemplate/index.d.ts.map +1 -1
- package/dist/components/04-templates/SideFilterTemplate/SideFilterTemplate.d.ts.map +1 -1
- package/dist/components/04-templates/SideFilterTemplate/SideFilterTemplate.jsx +4 -1
- package/dist/components/04-templates/SideFilterTemplate/SideFilterTemplate.jsx.map +1 -1
- package/dist/hooks/useSegments.d.ts.map +1 -1
- package/dist/hooks/useSegments.js +2 -3
- package/dist/hooks/useSegments.js.map +1 -1
- package/dist/hooks/useTheme.d.ts.map +1 -1
- package/dist/hooks/useTheme.jsx +1 -0
- package/dist/hooks/useTheme.jsx.map +1 -1
- package/expresivo/ExpBubble/ExpBubble.d.ts +51 -0
- package/expresivo/ExpBubble/ExpBubble.d.ts.map +1 -0
- package/expresivo/ExpBubble/ExpBubble.jsx +74 -0
- package/expresivo/ExpBubble/ExpBubble.jsx.map +1 -0
- package/expresivo/ExpBubble/index.d.ts +3 -0
- package/expresivo/ExpBubble/index.d.ts.map +1 -0
- package/expresivo/ExpBubble/index.js +2 -0
- package/expresivo/ExpBubble/index.js.map +1 -0
- package/expresivo/ExpChip/ExpChip.d.ts +30 -0
- package/expresivo/ExpChip/ExpChip.d.ts.map +1 -0
- package/expresivo/ExpChip/ExpChip.jsx +46 -0
- package/expresivo/ExpChip/ExpChip.jsx.map +1 -0
- package/expresivo/ExpChip/index.d.ts +3 -0
- package/expresivo/ExpChip/index.d.ts.map +1 -0
- package/expresivo/ExpChip/index.js +2 -0
- package/expresivo/ExpChip/index.js.map +1 -0
- package/expresivo/ExpCollapseToggle/ExpCollapseToggle.d.ts +37 -0
- package/expresivo/ExpCollapseToggle/ExpCollapseToggle.d.ts.map +1 -0
- package/expresivo/ExpCollapseToggle/ExpCollapseToggle.jsx +43 -0
- package/expresivo/ExpCollapseToggle/ExpCollapseToggle.jsx.map +1 -0
- package/expresivo/ExpCollapseToggle/index.d.ts +3 -0
- package/expresivo/ExpCollapseToggle/index.d.ts.map +1 -0
- package/expresivo/ExpCollapseToggle/index.js +2 -0
- package/expresivo/ExpCollapseToggle/index.js.map +1 -0
- package/expresivo/ExpEnterIcon/ExpEnterIcon.d.ts +32 -0
- package/expresivo/ExpEnterIcon/ExpEnterIcon.d.ts.map +1 -0
- package/expresivo/ExpEnterIcon/ExpEnterIcon.jsx +32 -0
- package/expresivo/ExpEnterIcon/ExpEnterIcon.jsx.map +1 -0
- package/expresivo/ExpEnterIcon/index.d.ts +3 -0
- package/expresivo/ExpEnterIcon/index.d.ts.map +1 -0
- package/expresivo/ExpEnterIcon/index.js +2 -0
- package/expresivo/ExpEnterIcon/index.js.map +1 -0
- package/expresivo/ExpGrowBar/ExpGrowBar.d.ts +26 -0
- package/expresivo/ExpGrowBar/ExpGrowBar.d.ts.map +1 -0
- package/expresivo/ExpGrowBar/ExpGrowBar.jsx +39 -0
- package/expresivo/ExpGrowBar/ExpGrowBar.jsx.map +1 -0
- package/expresivo/ExpGrowBar/index.d.ts +3 -0
- package/expresivo/ExpGrowBar/index.d.ts.map +1 -0
- package/expresivo/ExpGrowBar/index.js +2 -0
- package/expresivo/ExpGrowBar/index.js.map +1 -0
- package/expresivo/ExpJourneyTrack/ExpJourneyTrack.d.ts +65 -0
- package/expresivo/ExpJourneyTrack/ExpJourneyTrack.d.ts.map +1 -0
- package/expresivo/ExpJourneyTrack/ExpJourneyTrack.jsx +156 -0
- package/expresivo/ExpJourneyTrack/ExpJourneyTrack.jsx.map +1 -0
- package/expresivo/ExpJourneyTrack/index.d.ts +3 -0
- package/expresivo/ExpJourneyTrack/index.d.ts.map +1 -0
- package/expresivo/ExpJourneyTrack/index.js +2 -0
- package/expresivo/ExpJourneyTrack/index.js.map +1 -0
- package/expresivo/ExpKeyButton/ExpKeyButton.d.ts +49 -0
- package/expresivo/ExpKeyButton/ExpKeyButton.d.ts.map +1 -0
- package/expresivo/ExpKeyButton/ExpKeyButton.jsx +60 -0
- package/expresivo/ExpKeyButton/ExpKeyButton.jsx.map +1 -0
- package/expresivo/ExpKeyButton/index.d.ts +3 -0
- package/expresivo/ExpKeyButton/index.d.ts.map +1 -0
- package/expresivo/ExpKeyButton/index.js +2 -0
- package/expresivo/ExpKeyButton/index.js.map +1 -0
- package/expresivo/ExpLensIcon/ExpLensIcon.d.ts +29 -0
- package/expresivo/ExpLensIcon/ExpLensIcon.d.ts.map +1 -0
- package/expresivo/ExpLensIcon/ExpLensIcon.jsx +29 -0
- package/expresivo/ExpLensIcon/ExpLensIcon.jsx.map +1 -0
- package/expresivo/ExpLensIcon/index.d.ts +3 -0
- package/expresivo/ExpLensIcon/index.d.ts.map +1 -0
- package/expresivo/ExpLensIcon/index.js +2 -0
- package/expresivo/ExpLensIcon/index.js.map +1 -0
- package/expresivo/ExpLogo/ExpLogo.d.ts +33 -0
- package/expresivo/ExpLogo/ExpLogo.d.ts.map +1 -0
- package/expresivo/ExpLogo/ExpLogo.jsx +42 -0
- package/expresivo/ExpLogo/ExpLogo.jsx.map +1 -0
- package/expresivo/ExpLogo/catalog.d.ts +17 -0
- package/expresivo/ExpLogo/catalog.d.ts.map +1 -0
- package/expresivo/ExpLogo/catalog.js +11 -0
- package/expresivo/ExpLogo/catalog.js.map +1 -0
- package/expresivo/ExpLogo/index.d.ts +4 -0
- package/expresivo/ExpLogo/index.d.ts.map +1 -0
- package/expresivo/ExpLogo/index.js +2 -0
- package/expresivo/ExpLogo/index.js.map +1 -0
- package/expresivo/ExpMascot/ExpMascot.d.ts +42 -0
- package/expresivo/ExpMascot/ExpMascot.d.ts.map +1 -0
- package/expresivo/ExpMascot/ExpMascot.jsx +46 -0
- package/expresivo/ExpMascot/ExpMascot.jsx.map +1 -0
- package/expresivo/ExpMascot/catalog.d.ts +12 -0
- package/expresivo/ExpMascot/catalog.d.ts.map +1 -0
- package/expresivo/ExpMascot/catalog.js +41 -0
- package/expresivo/ExpMascot/catalog.js.map +1 -0
- package/expresivo/ExpMascot/index.d.ts +4 -0
- package/expresivo/ExpMascot/index.d.ts.map +1 -0
- package/expresivo/ExpMascot/index.js +2 -0
- package/expresivo/ExpMascot/index.js.map +1 -0
- package/expresivo/ExpMedalBadge/ExpMedalBadge.d.ts +29 -0
- package/expresivo/ExpMedalBadge/ExpMedalBadge.d.ts.map +1 -0
- package/expresivo/ExpMedalBadge/ExpMedalBadge.jsx +87 -0
- package/expresivo/ExpMedalBadge/ExpMedalBadge.jsx.map +1 -0
- package/expresivo/ExpMedalBadge/index.d.ts +3 -0
- package/expresivo/ExpMedalBadge/index.d.ts.map +1 -0
- package/expresivo/ExpMedalBadge/index.js +2 -0
- package/expresivo/ExpMedalBadge/index.js.map +1 -0
- package/expresivo/ExpPageHero/ExpPageHero.d.ts +82 -0
- package/expresivo/ExpPageHero/ExpPageHero.d.ts.map +1 -0
- package/expresivo/ExpPageHero/ExpPageHero.jsx +113 -0
- package/expresivo/ExpPageHero/ExpPageHero.jsx.map +1 -0
- package/expresivo/ExpPageHero/index.d.ts +3 -0
- package/expresivo/ExpPageHero/index.d.ts.map +1 -0
- package/expresivo/ExpPageHero/index.js +2 -0
- package/expresivo/ExpPageHero/index.js.map +1 -0
- package/expresivo/ExpPeek/ExpPeek.d.ts +56 -0
- package/expresivo/ExpPeek/ExpPeek.d.ts.map +1 -0
- package/expresivo/ExpPeek/ExpPeek.jsx +131 -0
- package/expresivo/ExpPeek/ExpPeek.jsx.map +1 -0
- package/expresivo/ExpPeek/index.d.ts +3 -0
- package/expresivo/ExpPeek/index.d.ts.map +1 -0
- package/expresivo/ExpPeek/index.js +2 -0
- package/expresivo/ExpPeek/index.js.map +1 -0
- package/expresivo/ExpPillButton/ExpPillButton.d.ts +44 -0
- package/expresivo/ExpPillButton/ExpPillButton.d.ts.map +1 -0
- package/expresivo/ExpPillButton/ExpPillButton.jsx +75 -0
- package/expresivo/ExpPillButton/ExpPillButton.jsx.map +1 -0
- package/expresivo/ExpPillButton/index.d.ts +3 -0
- package/expresivo/ExpPillButton/index.d.ts.map +1 -0
- package/expresivo/ExpPillButton/index.js +2 -0
- package/expresivo/ExpPillButton/index.js.map +1 -0
- package/expresivo/ExpScope/ExpScope.d.ts +63 -0
- package/expresivo/ExpScope/ExpScope.d.ts.map +1 -0
- package/expresivo/ExpScope/ExpScope.jsx +67 -0
- package/expresivo/ExpScope/ExpScope.jsx.map +1 -0
- package/expresivo/ExpScope/index.d.ts +3 -0
- package/expresivo/ExpScope/index.d.ts.map +1 -0
- package/expresivo/ExpScope/index.js +2 -0
- package/expresivo/ExpScope/index.js.map +1 -0
- package/expresivo/ExpScoreRing/ExpScoreRing.d.ts +35 -0
- package/expresivo/ExpScoreRing/ExpScoreRing.d.ts.map +1 -0
- package/expresivo/ExpScoreRing/ExpScoreRing.jsx +67 -0
- package/expresivo/ExpScoreRing/ExpScoreRing.jsx.map +1 -0
- package/expresivo/ExpScoreRing/index.d.ts +3 -0
- package/expresivo/ExpScoreRing/index.d.ts.map +1 -0
- package/expresivo/ExpScoreRing/index.js +2 -0
- package/expresivo/ExpScoreRing/index.js.map +1 -0
- package/expresivo/ExpStepBadge/ExpStepBadge.d.ts +25 -0
- package/expresivo/ExpStepBadge/ExpStepBadge.d.ts.map +1 -0
- package/expresivo/ExpStepBadge/ExpStepBadge.jsx +30 -0
- package/expresivo/ExpStepBadge/ExpStepBadge.jsx.map +1 -0
- package/expresivo/ExpStepBadge/index.d.ts +2 -0
- package/expresivo/ExpStepBadge/index.d.ts.map +1 -0
- package/expresivo/ExpStepBadge/index.js +2 -0
- package/expresivo/ExpStepBadge/index.js.map +1 -0
- package/expresivo/index.d.ts +18 -0
- package/expresivo/index.d.ts.map +1 -0
- package/expresivo/index.js +18 -0
- package/expresivo/index.js.map +1 -0
- package/expresivo/shared/glyphs.d.ts +20 -0
- package/expresivo/shared/glyphs.d.ts.map +1 -0
- package/expresivo/shared/glyphs.jsx +60 -0
- package/expresivo/shared/glyphs.jsx.map +1 -0
- package/package.json +6 -4
|
@@ -18,6 +18,7 @@ import { SecondMenu } from './SecondMenu';
|
|
|
18
18
|
*
|
|
19
19
|
* @param {Object} props - The properties of the Header component.
|
|
20
20
|
* @param {string} [props.homeHref='/'] - The URL for the home link.
|
|
21
|
+
* @param {ReactNode} [props.logo=<Logo />] - Content of the home link.
|
|
21
22
|
* @param {ComponentProps<typeof Menu>['menu']} [props.primaryMenu] - The primary menu configuration.
|
|
22
23
|
* @param {ComponentProps<typeof Menu>['menu']} [props.secondMenu] - The secondary menu configuration.
|
|
23
24
|
* @param {Omit<AvatarProps, 'className' | 'position'>} [props.avatar] - The avatar properties.
|
|
@@ -25,13 +26,11 @@ import { SecondMenu } from './SecondMenu';
|
|
|
25
26
|
*
|
|
26
27
|
* @returns {ReactNode} The rendered Header component.
|
|
27
28
|
*/
|
|
28
|
-
export function Header({ homeHref = '/', primaryMenu, secondMenu, avatar, bellNotifications, onFavoriteToggle, themeSwitch, }) {
|
|
29
|
-
return (<Container as="header" className="relative flex flex-row justify-between py-2 dark:text-white">
|
|
29
|
+
export function Header({ homeHref = '/', logo, primaryMenu, secondMenu, avatar, bellNotifications, onFavoriteToggle, themeSwitch, }) {
|
|
30
|
+
return (<Container as="header" data-orion-part="header" className="relative flex flex-row justify-between py-2 dark:text-white">
|
|
30
31
|
<div className="flex items-center gap-4">
|
|
31
32
|
<div>
|
|
32
|
-
<Link href={homeHref}>
|
|
33
|
-
<Logo id="logo"/>
|
|
34
|
-
</Link>
|
|
33
|
+
<Link href={homeHref}>{logo ?? <Logo id="logo"/>}</Link>
|
|
35
34
|
</div>
|
|
36
35
|
{!!secondMenu && (<SecondMenu menu={secondMenu} onFavoriteToggle={onFavoriteToggle}/>)}
|
|
37
36
|
{!!primaryMenu && (<div className="hidden lg:block">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.jsx","sourceRoot":"","sources":["../../../../src/components/03-organisms/Header/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAe,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Header.jsx","sourceRoot":"","sources":["../../../../src/components/03-organisms/Header/Header.tsx"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAe,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAc1C;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,MAAM,CAAC,EACrB,QAAQ,GAAG,GAAG,EACd,IAAI,EACJ,WAAW,EACX,UAAU,EACV,MAAM,EACN,iBAAiB,EACjB,gBAAgB,EAChB,WAAW,GACC;IACZ,OAAO,CACL,CAAC,SAAS,CACR,EAAE,CAAC,QAAQ,CACX,eAAe,CAAC,QAAQ,CACxB,SAAS,CAAC,6DAA6D,CAEvE;MAAA,CAAC,GAAG,CAAC,SAAS,CAAC,yBAAyB,CACtC;QAAA,CAAC,GAAG,CACF;UAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,EAAG,CAAC,EAAE,IAAI,CAC1D;QAAA,EAAE,GAAG,CACL;QAAA,CAAC,CAAC,CAAC,UAAU,IAAI,CACf,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,UAAU,CAAC,CAAC,gBAAgB,CAAC,CAAC,gBAAgB,CAAC,EAAG,CACrE,CACD;QAAA,CAAC,CAAC,CAAC,WAAW,IAAI,CAChB,CAAC,GAAG,CAAC,SAAS,CAAC,iBAAiB,CAC9B;YAAA,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,YAAY,EACnD;UAAA,EAAE,GAAG,CAAC,CACP,CACH;MAAA,EAAE,GAAG,CACL;MAAA,CAAC,aAAa,CACZ,MAAM,CAAC,CAAC,MAAM,CAAC,CACf,iBAAiB,CAAC,CAAC,iBAAiB,CAAC,CACrC,WAAW,CAAC,CAAC,WAAW,CAAC,CACzB,WAAW,CAAC,CAAC,WAAW,CAAC,EAE7B;IAAA,EAAE,SAAS,CAAC,CACb,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
-
export type MapMarkerVariant = 'default' | 'numbered' | 'muted';
|
|
2
|
+
export type MapMarkerVariant = 'default' | 'numbered' | 'numbered-black' | 'muted';
|
|
3
3
|
export type MapMarker = {
|
|
4
4
|
readonly id: string;
|
|
5
5
|
readonly lat: number;
|
|
@@ -25,6 +25,13 @@ export type MapViewProps = {
|
|
|
25
25
|
readonly attribution?: string;
|
|
26
26
|
readonly controls?: MapViewControls;
|
|
27
27
|
readonly onMarkerClick?: (marker: MapMarker) => void;
|
|
28
|
+
/** Fired with the clicked coordinates when the map itself (not a marker) is clicked. */
|
|
29
|
+
readonly onMapClick?: (lat: number, lng: number) => void;
|
|
30
|
+
/** Makes every rendered marker draggable. Pair with `onMarkerDragEnd` to read the new position. */
|
|
31
|
+
readonly draggableMarker?: boolean;
|
|
32
|
+
/** Pans the map while a dragged marker nears its edge, so the marker can travel past the visible area. */
|
|
33
|
+
readonly autoPanOnDrag?: boolean;
|
|
34
|
+
readonly onMarkerDragEnd?: (marker: MapMarker, lat: number, lng: number) => void;
|
|
28
35
|
readonly emptyMessage?: string;
|
|
29
36
|
readonly tone?: MapViewTone;
|
|
30
37
|
readonly className?: string;
|
|
@@ -49,17 +56,21 @@ export type MapViewTone = 'mono' | 'color';
|
|
|
49
56
|
* @param {MapViewProps} props - The properties of the MapView component.
|
|
50
57
|
* @param {{ lat: number; lng: number }} props.center - Initial map center.
|
|
51
58
|
* @param {number} [props.zoom=12] - Initial zoom level.
|
|
52
|
-
* @param {MapMarker[]} [props.markers] - Markers to render on the map.
|
|
59
|
+
* @param {MapMarker[]} [props.markers] - Markers to render on the map. `variant` is `default` or `numbered` (lavender `#6A5DF9`), `numbered-black` (black fill, white number) or `muted` (gray, no number). Numbered variants show `label` in white.
|
|
53
60
|
* @param {boolean} [props.fitToMarkers] - Fit bounds to markers when they change.
|
|
54
61
|
* @param {string} [props.tileUrl] - Tile layer URL template.
|
|
55
62
|
* @param {string} [props.attribution] - Map attribution HTML.
|
|
56
63
|
* @param {MapViewControls} [props.controls] - Labels for zoom and recenter controls.
|
|
57
64
|
* @param {(marker: MapMarker) => void} [props.onMarkerClick] - Fired when a marker is clicked.
|
|
65
|
+
* @param {(lat: number, lng: number) => void} [props.onMapClick] - Fired with the clicked coordinates when the map itself (not a marker) is clicked.
|
|
66
|
+
* @param {boolean} [props.draggableMarker] - Makes every rendered marker draggable.
|
|
67
|
+
* @param {boolean} [props.autoPanOnDrag=false] - Pans the map while a dragged marker nears its edge. Only applies with `draggableMarker`.
|
|
68
|
+
* @param {(marker: MapMarker, lat: number, lng: number) => void} [props.onMarkerDragEnd] - Fired with the new coordinates once a dragged marker is released.
|
|
58
69
|
* @param {string} [props.emptyMessage] - Message shown when there are no markers.
|
|
59
70
|
* @param {'mono' | 'color'} [props.tone='mono'] - `mono` renders the tiles in grayscale and inverts them in dark mode, so the map follows the theme and the pins stay the only accent. `color` leaves the tiles as the provider serves them.
|
|
60
71
|
* @param {string} [props.className] - Extra classes for the root element.
|
|
61
72
|
*
|
|
62
73
|
* @returns {ReactNode} The rendered MapView component.
|
|
63
74
|
*/
|
|
64
|
-
export declare function MapView({ center, zoom, markers, fitToMarkers, tileUrl, attribution, controls, onMarkerClick, emptyMessage, tone, className, ...restProps }: MapViewProps): ReactNode;
|
|
75
|
+
export declare function MapView({ center, zoom, markers, fitToMarkers, tileUrl, attribution, controls, onMarkerClick, onMapClick, draggableMarker, autoPanOnDrag, onMarkerDragEnd, emptyMessage, tone, className, ...restProps }: MapViewProps): ReactNode;
|
|
65
76
|
//# sourceMappingURL=MapView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapView.d.ts","sourceRoot":"","sources":["../../../../src/components/03-organisms/MapView/MapView.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,
|
|
1
|
+
{"version":3,"file":"MapView.d.ts","sourceRoot":"","sources":["../../../../src/components/03-organisms/MapView/MapView.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,SAAS,EAMf,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,gBAAgB,GACxB,SAAS,GACT,UAAU,GACV,gBAAgB,GAChB,OAAO,CAAC;AAEZ,MAAM,MAAM,SAAS,GAAG;IACtB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM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CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B,GAAG,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC,CAAC;AAErD,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,OAAO,CAAC;AA6C3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,OAAO,CAAC,EACtB,MAAM,EACN,IAAS,EACT,OAAY,EACZ,YAAmB,EACnB,OAAsB,EACtB,WAAiC,EACjC,QAAQ,EACR,aAAa,EACb,UAAU,EACV,eAAuB,EACvB,aAAqB,EACrB,eAAe,EACf,YAAY,EACZ,IAAa,EACb,SAAS,EACT,GAAG,SAAS,EACb,EAAE,YAAY,GAAG,SAAS,CA2N1B"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
|
-
import { useEffect, useId, useRef, useState, } from 'react';
|
|
3
|
+
import { useEffect, useId, useLayoutEffect, useRef, useState, } from 'react';
|
|
4
4
|
import { HiMinus, HiPlus, HiOutlineViewfinderCircle } from 'react-icons/hi2';
|
|
5
5
|
import { Show } from '../../00-base';
|
|
6
6
|
const toneMap = {
|
|
@@ -13,12 +13,16 @@ const DEFAULT_ATTRIBUTION = '© <a href="https://www.openstreetmap.org/copyr
|
|
|
13
13
|
const pinFill = {
|
|
14
14
|
default: '#6A5DF9',
|
|
15
15
|
numbered: '#6A5DF9',
|
|
16
|
+
'numbered-black': '#000000',
|
|
16
17
|
muted: '#B9BABB',
|
|
17
18
|
};
|
|
19
|
+
function showsNumber(variant) {
|
|
20
|
+
return variant === 'numbered' || variant === 'numbered-black';
|
|
21
|
+
}
|
|
18
22
|
function buildPinHtml(marker) {
|
|
19
23
|
const variant = marker.variant ?? 'default';
|
|
20
24
|
const fill = pinFill[variant];
|
|
21
|
-
const inner = variant
|
|
25
|
+
const inner = showsNumber(variant) && marker.label
|
|
22
26
|
? `<text x="14" y="18.5" text-anchor="middle" font-size="12" font-weight="700" fill="#fff">${marker.label}</text>`
|
|
23
27
|
: '<circle cx="14" cy="14" r="4.5" fill="#fff"/>';
|
|
24
28
|
return (`<div class="orion-map-pin"><svg width="28" height="36" viewBox="0 0 28 36" aria-hidden="true">` +
|
|
@@ -44,19 +48,23 @@ function buildPinHtml(marker) {
|
|
|
44
48
|
* @param {MapViewProps} props - The properties of the MapView component.
|
|
45
49
|
* @param {{ lat: number; lng: number }} props.center - Initial map center.
|
|
46
50
|
* @param {number} [props.zoom=12] - Initial zoom level.
|
|
47
|
-
* @param {MapMarker[]} [props.markers] - Markers to render on the map.
|
|
51
|
+
* @param {MapMarker[]} [props.markers] - Markers to render on the map. `variant` is `default` or `numbered` (lavender `#6A5DF9`), `numbered-black` (black fill, white number) or `muted` (gray, no number). Numbered variants show `label` in white.
|
|
48
52
|
* @param {boolean} [props.fitToMarkers] - Fit bounds to markers when they change.
|
|
49
53
|
* @param {string} [props.tileUrl] - Tile layer URL template.
|
|
50
54
|
* @param {string} [props.attribution] - Map attribution HTML.
|
|
51
55
|
* @param {MapViewControls} [props.controls] - Labels for zoom and recenter controls.
|
|
52
56
|
* @param {(marker: MapMarker) => void} [props.onMarkerClick] - Fired when a marker is clicked.
|
|
57
|
+
* @param {(lat: number, lng: number) => void} [props.onMapClick] - Fired with the clicked coordinates when the map itself (not a marker) is clicked.
|
|
58
|
+
* @param {boolean} [props.draggableMarker] - Makes every rendered marker draggable.
|
|
59
|
+
* @param {boolean} [props.autoPanOnDrag=false] - Pans the map while a dragged marker nears its edge. Only applies with `draggableMarker`.
|
|
60
|
+
* @param {(marker: MapMarker, lat: number, lng: number) => void} [props.onMarkerDragEnd] - Fired with the new coordinates once a dragged marker is released.
|
|
53
61
|
* @param {string} [props.emptyMessage] - Message shown when there are no markers.
|
|
54
62
|
* @param {'mono' | 'color'} [props.tone='mono'] - `mono` renders the tiles in grayscale and inverts them in dark mode, so the map follows the theme and the pins stay the only accent. `color` leaves the tiles as the provider serves them.
|
|
55
63
|
* @param {string} [props.className] - Extra classes for the root element.
|
|
56
64
|
*
|
|
57
65
|
* @returns {ReactNode} The rendered MapView component.
|
|
58
66
|
*/
|
|
59
|
-
export function MapView({ center, zoom = 12, markers = [], fitToMarkers = true, tileUrl = DEFAULT_TILE, attribution = DEFAULT_ATTRIBUTION, controls, onMarkerClick, emptyMessage, tone = 'mono', className, ...restProps }) {
|
|
67
|
+
export function MapView({ center, zoom = 12, markers = [], fitToMarkers = true, tileUrl = DEFAULT_TILE, attribution = DEFAULT_ATTRIBUTION, controls, onMarkerClick, onMapClick, draggableMarker = false, autoPanOnDrag = false, onMarkerDragEnd, emptyMessage, tone = 'mono', className, ...restProps }) {
|
|
60
68
|
const mapId = useId().replace(/:/g, '');
|
|
61
69
|
const containerRef = useRef(null);
|
|
62
70
|
const mapRef = useRef(null);
|
|
@@ -65,7 +73,13 @@ export function MapView({ center, zoom = 12, markers = [], fitToMarkers = true,
|
|
|
65
73
|
const leafletRef = useRef(null);
|
|
66
74
|
const [isReady, setIsReady] = useState(false);
|
|
67
75
|
const onMarkerClickRef = useRef(onMarkerClick);
|
|
68
|
-
|
|
76
|
+
const onMapClickRef = useRef(onMapClick);
|
|
77
|
+
const onMarkerDragEndRef = useRef(onMarkerDragEnd);
|
|
78
|
+
useLayoutEffect(() => {
|
|
79
|
+
onMarkerClickRef.current = onMarkerClick;
|
|
80
|
+
onMapClickRef.current = onMapClick;
|
|
81
|
+
onMarkerDragEndRef.current = onMarkerDragEnd;
|
|
82
|
+
});
|
|
69
83
|
useEffect(() => {
|
|
70
84
|
let cancelled = false;
|
|
71
85
|
const init = async () => {
|
|
@@ -87,6 +101,9 @@ export function MapView({ center, zoom = 12, markers = [], fitToMarkers = true,
|
|
|
87
101
|
}).addTo(map);
|
|
88
102
|
markersLayerRef.current = L.layerGroup().addTo(map);
|
|
89
103
|
mapRef.current = map;
|
|
104
|
+
map.on('click', (ev) => {
|
|
105
|
+
onMapClickRef.current?.(ev.latlng.lat, ev.latlng.lng);
|
|
106
|
+
});
|
|
90
107
|
setIsReady(true);
|
|
91
108
|
setTimeout(() => map.invalidateSize(), 80);
|
|
92
109
|
};
|
|
@@ -122,6 +139,8 @@ export function MapView({ center, zoom = 12, markers = [], fitToMarkers = true,
|
|
|
122
139
|
const leafletMarker = L.marker([marker.lat, marker.lng], {
|
|
123
140
|
icon,
|
|
124
141
|
riseOnHover: true,
|
|
142
|
+
draggable: draggableMarker,
|
|
143
|
+
autoPan: draggableMarker && autoPanOnDrag,
|
|
125
144
|
});
|
|
126
145
|
if (marker.tooltip) {
|
|
127
146
|
leafletMarker.bindTooltip(marker.tooltip, {
|
|
@@ -132,17 +151,29 @@ export function MapView({ center, zoom = 12, markers = [], fitToMarkers = true,
|
|
|
132
151
|
leafletMarker.on('click', () => {
|
|
133
152
|
onMarkerClickRef.current?.(marker);
|
|
134
153
|
});
|
|
154
|
+
if (draggableMarker) {
|
|
155
|
+
leafletMarker.on('dragend', (ev) => {
|
|
156
|
+
const position = ev.target.getLatLng();
|
|
157
|
+
onMarkerDragEndRef.current?.(marker, position.lat, position.lng);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
135
160
|
leafletMarker.addTo(layer);
|
|
136
161
|
});
|
|
137
162
|
if (fitToMarkers && markers.length > 0) {
|
|
138
163
|
const bounds = L.latLngBounds(markers.map((m) => [m.lat, m.lng]));
|
|
139
164
|
map.fitBounds(bounds, { padding: [60, 60], maxZoom: 14 });
|
|
140
165
|
}
|
|
141
|
-
else {
|
|
142
|
-
map.setView([center.lat, center.lng], zoom);
|
|
143
|
-
}
|
|
144
166
|
setTimeout(() => map.invalidateSize(), 40);
|
|
145
|
-
}, [isReady, markers, fitToMarkers,
|
|
167
|
+
}, [isReady, markers, fitToMarkers, draggableMarker, autoPanOnDrag]);
|
|
168
|
+
const hasMarkers = markers.length > 0;
|
|
169
|
+
// Kept apart from the markers effect: redrawing markers must not move the
|
|
170
|
+
// view, or every consumer re-render undoes the user's pan and zoom.
|
|
171
|
+
useEffect(() => {
|
|
172
|
+
const map = mapRef.current;
|
|
173
|
+
if (!isReady || !map || (fitToMarkers && hasMarkers))
|
|
174
|
+
return;
|
|
175
|
+
map.setView([center.lat, center.lng], zoom);
|
|
176
|
+
}, [isReady, fitToMarkers, hasMarkers, center.lat, center.lng, zoom]);
|
|
146
177
|
useEffect(() => {
|
|
147
178
|
const map = mapRef.current;
|
|
148
179
|
const L = leafletRef.current;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapView.jsx","sourceRoot":"","sources":["../../../../src/components/03-organisms/MapView/MapView.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAGL,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"MapView.jsx","sourceRoot":"","sources":["../../../../src/components/03-organisms/MapView/MapView.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAGL,SAAS,EACT,KAAK,EACL,eAAe,EACf,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAkDrC,MAAM,OAAO,GAAgC;IAC3C,IAAI,EAAE,IAAI,CACR,2GAA2G,EAC3G,sHAAsH,CACvH;IACD,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,MAAM,kBAAkB,G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AI,EACJ,KAAK,EACL,OAAO,EACP,eAAe,EACf,WAAW,EACX,SAAS,EACT,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EAAE,cAAc,EACjC,kBAAkB,EAAE,eAAe,EACnC,GAAG,SAAS,EACb,EAAE,kBAAkB,GAAG,SAAS,CAoJhC"}
|
|
@@ -79,6 +79,7 @@ export function ModalMultiple({ size, title, tabList, handleCloseIcon, onChangeT
|
|
|
79
79
|
}
|
|
80
80
|
};
|
|
81
81
|
useEffect(() => {
|
|
82
|
+
// eslint-disable-next-line react-hooks/set-state-in-effect -- opens after mount so the enter transition starts from the closed state
|
|
82
83
|
setIsOpen(true);
|
|
83
84
|
}, []);
|
|
84
85
|
useDialogFocus({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalMultiple.jsx","sourceRoot":"","sources":["../../../../src/components/03-organisms/ModalMultiple/ModalMultiple.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAKL,WAAW,EACX,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,OAAO,EAAgB,MAAM,gCAAgC,CAAC;AA2BvE,MAAM,eAAe,GAAG,iCAAiC,CAAC;AAC1D,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAE1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,OAAO,EACP,eAAe,EACf,WAAW,EACX,SAAS,EACT,oBAAoB,EACpB,eAAe,E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QAAQ,CAAC,CAChC,KAAK,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAC1B,KAAK,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAE1B;sBAAA,CAAC,YAAY,CAAC,IAAI,CACpB;oBAAA,EAAE,MAAM,CAAC,CACV,CACD;kBAAA,CAAC,CAAC,CAAC,aAAa,IAAI,CAClB,CAAC,MAAM,CACL,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CACpD,QAAQ,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CACjC,KAAK,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAC3B,KAAK,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAE3B;sBAAA,CAAC,aAAa,CAAC,IAAI,CACrB;oBAAA,EAAE,MAAM,CAAC,CACV,CACH;gBAAA,EAAE,GAAG,CACP;cAAA,EAAE,GAAG,CACP;YAAA,EAAE,GAAG,CACP;UAAA,EAAE,GAAG,CACP;QAAA,EAAE,GAAG,CACP,CACF;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"ModalMultiple.jsx","sourceRoot":"","sources":["../../../../src/components/03-organisms/ModalMultiple/ModalMultiple.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAKL,WAAW,EACX,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,cAAc,EAAE,MAAM,yCAAyC,CAAC;AACzE,OAAO,EAAE,OAAO,EAAgB,MAAM,gCAAgC,CAAC;AA2BvE,MAAM,eAAe,GAAG,iCAAi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AGnB;;gBAAA,CAAC,GAAG,CAAC,SAAS,CAAC,+DAA+D,CAC5E;kBAAA,CAAC,CAAC,CAAC,YAAY,IAAI,CACjB,CAAC,MAAM,CACL,QAAQ,CAAC,MAAM,CACf,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CACnD,QAAQ,CAAC,CAAC,YAAY,CAAC,QAAQ,CAAC,CAChC,KAAK,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAC1B,KAAK,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAE1B;sBAAA,CAAC,YAAY,CAAC,IAAI,CACpB;oBAAA,EAAE,MAAM,CAAC,CACV,CACD;kBAAA,CAAC,CAAC,CAAC,aAAa,IAAI,CAClB,CAAC,MAAM,CACL,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CACpD,QAAQ,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CACjC,KAAK,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAC3B,KAAK,CAAC,CAAC,aAAa,CAAC,KAAK,CAAC,CAE3B;sBAAA,CAAC,aAAa,CAAC,IAAI,CACrB;oBAAA,EAAE,MAAM,CAAC,CACV,CACH;gBAAA,EAAE,GAAG,CACP;cAAA,EAAE,GAAG,CACP;YAAA,EAAE,GAAG,CACP;UAAA,EAAE,GAAG,CACP;QAAA,EAAE,GAAG,CACP,CACF;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { HeaderProps } from '../../03-organisms/Header/Header';
|
|
3
|
+
import { HeadingWithTitleLevel } from './HeadingWithTitle';
|
|
3
4
|
type DashboardTemplateProps = {
|
|
4
5
|
readonly headerProps: HeaderProps;
|
|
5
6
|
readonly pageTitles: Record<string, string>;
|
|
7
|
+
readonly headingTitles?: Record<string, string>;
|
|
8
|
+
readonly headingLevel?: HeadingWithTitleLevel;
|
|
9
|
+
readonly titleAdornment?: ReactNode;
|
|
10
|
+
readonly titleDescription?: ReactNode;
|
|
6
11
|
readonly titleChildren?: ReactNode;
|
|
12
|
+
readonly heading?: ReactNode;
|
|
7
13
|
readonly children: ReactNode;
|
|
8
14
|
readonly breadcrumbLoadingLabel?: string;
|
|
9
15
|
readonly headingLoadingLabel?: string;
|
|
@@ -22,15 +28,41 @@ type DashboardTemplateProps = {
|
|
|
22
28
|
* <div>Main Content</div>
|
|
23
29
|
* </DashboardTemplate>
|
|
24
30
|
*
|
|
31
|
+
* @example
|
|
32
|
+
* // A detail page whose title is not its breadcrumb, with a badge and a summary
|
|
33
|
+
* <DashboardTemplate
|
|
34
|
+
* headerProps={headerProps}
|
|
35
|
+
* pageTitles={{ '/orders': 'Orders', '/orders/1043': '1043' }}
|
|
36
|
+
* headingTitles={{ '/orders/1043': 'Order 1043' }}
|
|
37
|
+
* titleAdornment={<Badge modifier="success">Delivered</Badge>}
|
|
38
|
+
* titleDescription="3 items · Created on 12 Oct"
|
|
39
|
+
* >
|
|
40
|
+
* <OrderDetail />
|
|
41
|
+
* </DashboardTemplate>
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* // A page header with its own layout under the breadcrumb
|
|
45
|
+
* <DashboardTemplate
|
|
46
|
+
* headerProps={headerProps}
|
|
47
|
+
* pageTitles={{ '/orders': 'Orders' }}
|
|
48
|
+
* heading={<OrdersHeader />}
|
|
49
|
+
* >
|
|
50
|
+
* <OrdersTable />
|
|
51
|
+
* </DashboardTemplate>
|
|
52
|
+
*
|
|
25
53
|
* @param {Object} props - The properties of the DashboardTemplate component.
|
|
26
54
|
* @param {HeaderProps} props.headerProps - The properties for the Header component.
|
|
27
|
-
* @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles.
|
|
28
|
-
* @param {Record<string, string>} props.
|
|
29
|
-
* @param {
|
|
55
|
+
* @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles, used by the breadcrumb and the heading.
|
|
56
|
+
* @param {Record<string, string>} [props.headingTitles] - Heading per pathname when it differs from the breadcrumb segment. Pathnames missing here use `pageTitles`.
|
|
57
|
+
* @param {'h3' | 'h4' | 'h5'} [props.headingLevel='h5'] - Heading level of the page title.
|
|
58
|
+
* @param {ReactNode} [props.titleAdornment] - Content next to the title, such as a `Badge`.
|
|
59
|
+
* @param {ReactNode} [props.titleDescription] - Content under the title, inside the title band.
|
|
60
|
+
* @param {ReactNode} [props.titleChildren] - Content at the right of the title; it moves under the title on small screens.
|
|
61
|
+
* @param {ReactNode} [props.heading] - Replaces the title row under the breadcrumb. With it, `headingTitles`, `headingLevel`, `titleAdornment`, `titleDescription` and `titleChildren` are ignored; the breadcrumb still uses `pageTitles`.
|
|
30
62
|
* @param {ReactNode} props.children - The main content to be rendered within the dashboard.
|
|
31
63
|
*
|
|
32
64
|
* @returns {ReactNode} The rendered DashboardTemplate component.
|
|
33
65
|
*/
|
|
34
|
-
export declare function DashboardTemplate({ headerProps, pageTitles, titleChildren, children, breadcrumbLoadingLabel, headingLoadingLabel, }: DashboardTemplateProps): ReactNode;
|
|
66
|
+
export declare function DashboardTemplate({ headerProps, pageTitles, headingTitles, headingLevel, titleAdornment, titleDescription, titleChildren, heading, children, breadcrumbLoadingLabel, headingLoadingLabel, }: DashboardTemplateProps): ReactNode;
|
|
35
67
|
export {};
|
|
36
68
|
//# sourceMappingURL=DashboardTemplate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/DashboardTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAU,WAAW,EAAE,MAAM,kCAAkC,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardTemplate.d.ts","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/DashboardTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AAG5C,OAAO,EAAU,WAAW,EAAE,MAAM,kCAAkC,CAAC;AAEvE,OAAO,EAAoB,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAG7E,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5C,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChD,QAAQ,CAAC,YAAY,CAAC,EAAE,qBAAqB,CAAC;IAC9C,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,CAAC;IACpC,QAAQ,CAAC,gBAAgB,CAAC,EAAE,SAAS,CAAC;IACtC,QAAQ,CAAC,aAAa,CAAC,EAAE,SAAS,CAAC;IACnC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,CAAC;IAC7B,QAAQ,CAAC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IACzC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;CACvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,WAAW,EACX,UAAU,EACV,aAAa,EACb,YAAY,EACZ,cAAc,EACd,gBAAgB,EAChB,aAAa,EACb,OAAO,EACP,QAAQ,EACR,sBAAsB,EACtB,mBAAmB,GACpB,EAAE,sBAAsB,GAAG,SAAS,CAmDpC"}
|
|
@@ -19,16 +19,42 @@ import { HeadingWithTitleSkeleton } from './HeadingWithTitleSkeleton';
|
|
|
19
19
|
* <div>Main Content</div>
|
|
20
20
|
* </DashboardTemplate>
|
|
21
21
|
*
|
|
22
|
+
* @example
|
|
23
|
+
* // A detail page whose title is not its breadcrumb, with a badge and a summary
|
|
24
|
+
* <DashboardTemplate
|
|
25
|
+
* headerProps={headerProps}
|
|
26
|
+
* pageTitles={{ '/orders': 'Orders', '/orders/1043': '1043' }}
|
|
27
|
+
* headingTitles={{ '/orders/1043': 'Order 1043' }}
|
|
28
|
+
* titleAdornment={<Badge modifier="success">Delivered</Badge>}
|
|
29
|
+
* titleDescription="3 items · Created on 12 Oct"
|
|
30
|
+
* >
|
|
31
|
+
* <OrderDetail />
|
|
32
|
+
* </DashboardTemplate>
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* // A page header with its own layout under the breadcrumb
|
|
36
|
+
* <DashboardTemplate
|
|
37
|
+
* headerProps={headerProps}
|
|
38
|
+
* pageTitles={{ '/orders': 'Orders' }}
|
|
39
|
+
* heading={<OrdersHeader />}
|
|
40
|
+
* >
|
|
41
|
+
* <OrdersTable />
|
|
42
|
+
* </DashboardTemplate>
|
|
43
|
+
*
|
|
22
44
|
* @param {Object} props - The properties of the DashboardTemplate component.
|
|
23
45
|
* @param {HeaderProps} props.headerProps - The properties for the Header component.
|
|
24
|
-
* @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles.
|
|
25
|
-
* @param {Record<string, string>} props.
|
|
26
|
-
* @param {
|
|
46
|
+
* @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles, used by the breadcrumb and the heading.
|
|
47
|
+
* @param {Record<string, string>} [props.headingTitles] - Heading per pathname when it differs from the breadcrumb segment. Pathnames missing here use `pageTitles`.
|
|
48
|
+
* @param {'h3' | 'h4' | 'h5'} [props.headingLevel='h5'] - Heading level of the page title.
|
|
49
|
+
* @param {ReactNode} [props.titleAdornment] - Content next to the title, such as a `Badge`.
|
|
50
|
+
* @param {ReactNode} [props.titleDescription] - Content under the title, inside the title band.
|
|
51
|
+
* @param {ReactNode} [props.titleChildren] - Content at the right of the title; it moves under the title on small screens.
|
|
52
|
+
* @param {ReactNode} [props.heading] - Replaces the title row under the breadcrumb. With it, `headingTitles`, `headingLevel`, `titleAdornment`, `titleDescription` and `titleChildren` are ignored; the breadcrumb still uses `pageTitles`.
|
|
27
53
|
* @param {ReactNode} props.children - The main content to be rendered within the dashboard.
|
|
28
54
|
*
|
|
29
55
|
* @returns {ReactNode} The rendered DashboardTemplate component.
|
|
30
56
|
*/
|
|
31
|
-
export function DashboardTemplate({ headerProps, pageTitles, titleChildren, children, breadcrumbLoadingLabel, headingLoadingLabel, }) {
|
|
57
|
+
export function DashboardTemplate({ headerProps, pageTitles, headingTitles, headingLevel, titleAdornment, titleDescription, titleChildren, heading, children, breadcrumbLoadingLabel, headingLoadingLabel, }) {
|
|
32
58
|
return (<>
|
|
33
59
|
<Header {...headerProps}/>
|
|
34
60
|
<hr className="border-gray-5 dark:border-gray-dark-1"/>
|
|
@@ -36,12 +62,20 @@ export function DashboardTemplate({ headerProps, pageTitles, titleChildren, chil
|
|
|
36
62
|
<Suspense fallback={<BreadcrumbSkeleton loadingLabel={breadcrumbLoadingLabel}/>}>
|
|
37
63
|
<BreadcrumbWithPathname homeHref={headerProps.homeHref} pageTitles={pageTitles}/>
|
|
38
64
|
</Suspense>
|
|
39
|
-
<div className="flex justify-between">
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
65
|
+
{heading ?? (<div className="flex flex-col items-start gap-3 sm:flex-row sm:justify-between">
|
|
66
|
+
<div className="flex min-w-0 flex-col gap-1">
|
|
67
|
+
<div className="flex min-w-0 flex-wrap items-center gap-x-3 gap-y-1">
|
|
68
|
+
<Suspense fallback={<HeadingWithTitleSkeleton loadingLabel={headingLoadingLabel}/>}>
|
|
69
|
+
<HeadingWithTitle pageTitles={pageTitles} headingTitles={headingTitles} level={headingLevel}/>
|
|
70
|
+
</Suspense>
|
|
71
|
+
{titleAdornment}
|
|
72
|
+
</div>
|
|
73
|
+
{!!titleDescription && (<div className="text-gray-1 dark:text-gray-2 text-sm">
|
|
74
|
+
{titleDescription}
|
|
75
|
+
</div>)}
|
|
76
|
+
</div>
|
|
77
|
+
{titleChildren}
|
|
78
|
+
</div>)}
|
|
45
79
|
</Container>
|
|
46
80
|
<hr className="border-gray-5 dark:border-gray-dark-1"/>
|
|
47
81
|
<Container className="py-6" as="main">
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardTemplate.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/DashboardTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,EAAE,MAAM,EAAe,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,gBAAgB,
|
|
1
|
+
{"version":3,"file":"DashboardTemplate.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/DashboardTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,EAAE,MAAM,EAAe,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAyB,MAAM,oBAAoB,CAAC;AAC7E,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAgBtE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,M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,CACH;YAAA,EAAE,GAAG,CACL;YAAA,CAAC,aAAa,CAChB;UAAA,EAAE,GAAG,CAAC,CACP,CACH;MAAA,EAAE,SAAS,CACX;MAAA,CAAC,EAAE,CAAC,SAAS,CAAC,uCAAuC,EACrD;MAAA,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,CAAC,MAAM,CACnC;QAAA,CAAC,QAAQ,CACX;MAAA,EAAE,SAAS,CACb;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
export type HeadingWithTitleLevel = 'h3' | 'h4' | 'h5';
|
|
2
3
|
/**
|
|
3
4
|
* HeadingWithTitle component for rendering a heading based on the current pathname.
|
|
4
5
|
*
|
|
@@ -9,11 +10,14 @@ import { ReactNode } from 'react';
|
|
|
9
10
|
*
|
|
10
11
|
* @param {Object} props - The properties of the HeadingWithTitle component.
|
|
11
12
|
* @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles.
|
|
13
|
+
* @param {Record<string, string>} [props.headingTitles] - Title per pathname when it differs from the breadcrumb. Falls back to `pageTitles`.
|
|
14
|
+
* @param {'h3' | 'h4' | 'h5'} [props.level='h5'] - Heading level of the title.
|
|
12
15
|
*
|
|
13
16
|
* @returns {ReactNode} The rendered HeadingWithTitle component.
|
|
14
17
|
*/
|
|
15
|
-
export declare function HeadingWithTitle({ pageTitles, }: {
|
|
18
|
+
export declare function HeadingWithTitle({ pageTitles, headingTitles, level, }: {
|
|
16
19
|
pageTitles: Record<string, string>;
|
|
17
|
-
|
|
20
|
+
headingTitles?: Record<string, string>;
|
|
21
|
+
level?: HeadingWithTitleLevel;
|
|
18
22
|
}): ReactNode;
|
|
19
23
|
//# sourceMappingURL=HeadingWithTitle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingWithTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/HeadingWithTitle.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC
|
|
1
|
+
{"version":3,"file":"HeadingWithTitle.d.ts","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/HeadingWithTitle.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKlC,MAAM,MAAM,qBAAqB,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAEvD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,aAAa,EACb,KAAY,GACb,EAAE;IACD,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvC,KAAK,CAAC,EAAE,qBAAqB,CAAC;CAC/B,GAAG,SAAS,CAgBZ"}
|
|
@@ -13,15 +13,19 @@ import { HeadingWithTitleSkeleton } from './HeadingWithTitleSkeleton';
|
|
|
13
13
|
*
|
|
14
14
|
* @param {Object} props - The properties of the HeadingWithTitle component.
|
|
15
15
|
* @param {Record<string, string>} props.pageTitles - An object mapping pathnames to their corresponding page titles.
|
|
16
|
+
* @param {Record<string, string>} [props.headingTitles] - Title per pathname when it differs from the breadcrumb. Falls back to `pageTitles`.
|
|
17
|
+
* @param {'h3' | 'h4' | 'h5'} [props.level='h5'] - Heading level of the title.
|
|
16
18
|
*
|
|
17
19
|
* @returns {ReactNode} The rendered HeadingWithTitle component.
|
|
18
20
|
*/
|
|
19
|
-
export function HeadingWithTitle({ pageTitles, }) {
|
|
21
|
+
export function HeadingWithTitle({ pageTitles, headingTitles, level = 'h5', }) {
|
|
20
22
|
const pathname = usePathname() || '/lorem/ipsum';
|
|
21
|
-
const title = pageTitles[pathname] || 'Dashboard';
|
|
23
|
+
const title = headingTitles?.[pathname] || pageTitles[pathname] || 'Dashboard';
|
|
22
24
|
return (<Show>
|
|
23
25
|
<Show.When isTrue={Boolean(title)}>
|
|
24
|
-
<Heading level={
|
|
26
|
+
<Heading level={level} className="min-w-0 break-words">
|
|
27
|
+
{title}
|
|
28
|
+
</Heading>
|
|
25
29
|
</Show.When>
|
|
26
30
|
<Show.Else>
|
|
27
31
|
<HeadingWithTitleSkeleton />
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeadingWithTitle.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/HeadingWithTitle.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"HeadingWithTitle.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/HeadingWithTitle.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAItE;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC/B,UAAU,EACV,aAAa,EACb,KAAK,GAAG,IAAI,GAKb;IACC,MAAM,QAAQ,GAAG,WAAW,EAAE,IAAI,cAAc,CAAC;IACjD,MAAM,KAAK,GACT,aAAa,EAAE,CAAC,QAAQ,CAAC,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,WAAW,CAAC;IACnE,OAAO,CACL,CAAC,IAAI,CACH;MAAA,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAChC;QAAA,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,SAAS,CAAC,qBAAqB,CACpD;UAAA,CAAC,KAAK,CACR;QAAA,EAAE,OAAO,CACX;MAAA,EAAE,IAAI,CAAC,IAAI,CACX;MAAA,CAAC,IAAI,CAAC,IAAI,CACR;QAAA,CAAC,wBAAwB,CAAC,AAAD,EAC3B;MAAA,EAAE,IAAI,CAAC,IAAI,CACb;IAAA,EAAE,IAAI,CAAC,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { type SetupMfaAccessibilityLabels } from './SetupMfa';
|
|
3
|
+
/** Copy of the form. Each one falls back to the original Spanish text. */
|
|
4
|
+
export type LoginFormLabels = {
|
|
5
|
+
username?: string;
|
|
6
|
+
password?: string;
|
|
7
|
+
code?: string;
|
|
8
|
+
submit?: string;
|
|
9
|
+
back?: string;
|
|
10
|
+
};
|
|
11
|
+
/** What `renderSubmit` receives to draw its own submit button. */
|
|
12
|
+
export type LoginFormSubmitState = {
|
|
13
|
+
/** `true` while `login` runs. */
|
|
14
|
+
pending: boolean;
|
|
15
|
+
/** `labels.submit`, or its default. */
|
|
16
|
+
label: string;
|
|
17
|
+
};
|
|
18
|
+
export type LoginFormErrorStyle = 'text' | 'message';
|
|
3
19
|
type LoginFormProps = {
|
|
4
20
|
login: (formData: FormData) => Promise<string | undefined>;
|
|
5
21
|
callback?: () => void;
|
|
@@ -12,21 +28,68 @@ type LoginFormProps = {
|
|
|
12
28
|
getOtpDigitAriaLabel?: (digit: number) => string;
|
|
13
29
|
loadingLabel?: string;
|
|
14
30
|
setupMfaAccessibilityLabels?: SetupMfaAccessibilityLabels;
|
|
31
|
+
title?: ReactNode;
|
|
32
|
+
description?: ReactNode;
|
|
33
|
+
labels?: LoginFormLabels;
|
|
34
|
+
forgotPassword?: ReactNode;
|
|
35
|
+
footer?: ReactNode;
|
|
36
|
+
renderSubmit?: (state: LoginFormSubmitState) => ReactNode;
|
|
37
|
+
errorStyle?: LoginFormErrorStyle;
|
|
38
|
+
toastErrors?: boolean;
|
|
39
|
+
showSpinner?: boolean;
|
|
15
40
|
};
|
|
16
41
|
/**
|
|
17
|
-
* LoginForm component for rendering a login form with email and password
|
|
42
|
+
* LoginForm component for rendering a login form with email and password
|
|
43
|
+
* inputs, the verification code step and the MFA setup wizard.
|
|
44
|
+
*
|
|
45
|
+
* Every prop after `setupMfaAccessibilityLabels` is optional and keeps the
|
|
46
|
+
* original look when left out.
|
|
18
47
|
*
|
|
19
48
|
* @component
|
|
20
49
|
* @example
|
|
21
50
|
* // Example usage of LoginForm component
|
|
22
51
|
* <LoginForm login={yourLoginFunction} callback={yourCallbackFunction} />
|
|
23
52
|
*
|
|
53
|
+
* @example
|
|
54
|
+
* // Own copy, a recovery link, the error above the button and a custom submit
|
|
55
|
+
* <LoginForm
|
|
56
|
+
* login={yourLoginFunction}
|
|
57
|
+
* title="Welcome back"
|
|
58
|
+
* description="Sign in with your account."
|
|
59
|
+
* labels={{ username: 'Email', password: 'Password', submit: 'Sign in' }}
|
|
60
|
+
* forgotPassword={<a href="/recover">Forgot your password?</a>}
|
|
61
|
+
* footer={<Paragraph size="body-2">No access? Ask your admin.</Paragraph>}
|
|
62
|
+
* errorStyle="message"
|
|
63
|
+
* toastErrors={false}
|
|
64
|
+
* showSpinner={false}
|
|
65
|
+
* renderSubmit={({ pending, label }) => (
|
|
66
|
+
* <Button type="submit" disabled={pending} className="w-full">{label}</Button>
|
|
67
|
+
* )}
|
|
68
|
+
* />
|
|
69
|
+
*
|
|
24
70
|
* @param {Object} props - The properties of the LoginForm component.
|
|
25
|
-
* @param {Function} props.login - The function to handle the login process.
|
|
71
|
+
* @param {Function} props.login - The function to handle the login process. Resolves with a QR image to start the MFA setup, or with nothing when done; rejects with the message to show.
|
|
26
72
|
* @param {Function} [props.callback] - Optional callback function to be called after a successful login.
|
|
73
|
+
* @param {boolean} [props.needCode=false] - Shows the verification code step instead of the credentials.
|
|
74
|
+
* @param {number} [props.lengthCode=6] - Digits of the verification code.
|
|
75
|
+
* @param {Function} [props.setupMfa] - Receives the two codes of the MFA setup wizard.
|
|
76
|
+
* @param {string} [props.showPasswordAriaLabel] - Accessible name of the button that shows the password.
|
|
77
|
+
* @param {string} [props.hidePasswordAriaLabel] - Accessible name of the button that hides the password.
|
|
78
|
+
* @param {Function} [props.getOtpDigitAriaLabel] - Accessible name of each code digit.
|
|
79
|
+
* @param {string} [props.loadingLabel] - Accessible name of the spinner.
|
|
80
|
+
* @param {SetupMfaAccessibilityLabels} [props.setupMfaAccessibilityLabels] - Accessible names of the MFA setup wizard.
|
|
81
|
+
* @param {ReactNode} [props.title='Bienvenido!'] - Heading above the form.
|
|
82
|
+
* @param {ReactNode} [props.description] - Text under the heading.
|
|
83
|
+
* @param {LoginFormLabels} [props.labels] - Field, code and button copy.
|
|
84
|
+
* @param {ReactNode} [props.forgotPassword] - Content above the submit button on the credentials step, such as a password recovery link.
|
|
85
|
+
* @param {ReactNode} [props.footer] - Content under the form, on the credentials and code steps.
|
|
86
|
+
* @param {Function} [props.renderSubmit] - Draws the submit button instead of the default one. It must render a `type="submit"` button.
|
|
87
|
+
* @param {'text' | 'message'} [props.errorStyle='text'] - `text` shows the error as red text under the buttons; `message` as an error `InlineMessage` above the submit button.
|
|
88
|
+
* @param {boolean} [props.toastErrors=true] - Also shows each error in a toast.
|
|
89
|
+
* @param {boolean} [props.showSpinner=true] - Shows a spinner under the form while `login` runs. Turn it off when `renderSubmit` already shows the wait.
|
|
27
90
|
*
|
|
28
91
|
* @returns {ReactNode} The rendered LoginForm component.
|
|
29
92
|
*/
|
|
30
|
-
export declare function LoginForm({ login, callback, needCode, lengthCode, setupMfa, showPasswordAriaLabel, hidePasswordAriaLabel, getOtpDigitAriaLabel, loadingLabel, setupMfaAccessibilityLabels, }: LoginFormProps): ReactNode;
|
|
93
|
+
export declare function LoginForm({ login, callback, needCode, lengthCode, setupMfa, showPasswordAriaLabel, hidePasswordAriaLabel, getOtpDigitAriaLabel, loadingLabel, setupMfaAccessibilityLabels, title, description, labels, forgotPassword, footer, renderSubmit, errorStyle, toastErrors, showSpinner, }: LoginFormProps): ReactNode;
|
|
31
94
|
export {};
|
|
32
95
|
//# sourceMappingURL=LoginForm.d.ts.map
|