@clicoh/orion-library 1.2.0-beta.2 → 1.2.0-beta.21
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/avatares/caja-chispa.png +0 -0
- package/assets/avatares/caja.png +0 -0
- package/assets/avatares/cohete.png +0 -0
- package/assets/avatares/dino.png +0 -0
- package/assets/avatares/pulpo-lentes.png +0 -0
- package/assets/avatares/pulpo-verde.png +0 -0
- package/assets/avatares/pulpo.png +0 -0
- package/assets/cifras/alerta.png +0 -0
- package/assets/cifras/duda.png +0 -0
- package/assets/cifras/error.png +0 -0
- package/assets/cifras/monedas.png +0 -0
- package/assets/cifras/reloj.png +0 -0
- package/assets/cifras/visto.png +0 -0
- package/assets/css/expresivo.css +1069 -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 +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 +40 -0
- package/expresivo/ExpChip/ExpChip.d.ts.map +1 -0
- package/expresivo/ExpChip/ExpChip.jsx +67 -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 +69 -0
- package/expresivo/ExpJourneyTrack/ExpJourneyTrack.d.ts.map +1 -0
- package/expresivo/ExpJourneyTrack/ExpJourneyTrack.jsx +160 -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/ExpLadder/ExpLadder.d.ts +42 -0
- package/expresivo/ExpLadder/ExpLadder.d.ts.map +1 -0
- package/expresivo/ExpLadder/ExpLadder.jsx +82 -0
- package/expresivo/ExpLadder/ExpLadder.jsx.map +1 -0
- package/expresivo/ExpLadder/index.d.ts +3 -0
- package/expresivo/ExpLadder/index.d.ts.map +1 -0
- package/expresivo/ExpLadder/index.js +2 -0
- package/expresivo/ExpLadder/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 +47 -0
- package/expresivo/ExpPillButton/ExpPillButton.d.ts.map +1 -0
- package/expresivo/ExpPillButton/ExpPillButton.jsx +77 -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/ExpRepoAvatar/ExpRepoAvatar.d.ts +28 -0
- package/expresivo/ExpRepoAvatar/ExpRepoAvatar.d.ts.map +1 -0
- package/expresivo/ExpRepoAvatar/ExpRepoAvatar.jsx +32 -0
- package/expresivo/ExpRepoAvatar/ExpRepoAvatar.jsx.map +1 -0
- package/expresivo/ExpRepoAvatar/catalog.d.ts +6 -0
- package/expresivo/ExpRepoAvatar/catalog.d.ts.map +1 -0
- package/expresivo/ExpRepoAvatar/catalog.js +18 -0
- package/expresivo/ExpRepoAvatar/catalog.js.map +1 -0
- package/expresivo/ExpRepoAvatar/index.d.ts +4 -0
- package/expresivo/ExpRepoAvatar/index.d.ts.map +1 -0
- package/expresivo/ExpRepoAvatar/index.js +2 -0
- package/expresivo/ExpRepoAvatar/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/ExpSearchField/ExpSearchField.d.ts +49 -0
- package/expresivo/ExpSearchField/ExpSearchField.d.ts.map +1 -0
- package/expresivo/ExpSearchField/ExpSearchField.jsx +81 -0
- package/expresivo/ExpSearchField/ExpSearchField.jsx.map +1 -0
- package/expresivo/ExpSearchField/index.d.ts +3 -0
- package/expresivo/ExpSearchField/index.d.ts.map +1 -0
- package/expresivo/ExpSearchField/index.js +2 -0
- package/expresivo/ExpSearchField/index.js.map +1 -0
- package/expresivo/ExpStatIcon/ExpStatIcon.d.ts +25 -0
- package/expresivo/ExpStatIcon/ExpStatIcon.d.ts.map +1 -0
- package/expresivo/ExpStatIcon/ExpStatIcon.jsx +29 -0
- package/expresivo/ExpStatIcon/ExpStatIcon.jsx.map +1 -0
- package/expresivo/ExpStatIcon/catalog.d.ts +6 -0
- package/expresivo/ExpStatIcon/catalog.d.ts.map +1 -0
- package/expresivo/ExpStatIcon/catalog.js +16 -0
- package/expresivo/ExpStatIcon/catalog.js.map +1 -0
- package/expresivo/ExpStatIcon/index.d.ts +4 -0
- package/expresivo/ExpStatIcon/index.d.ts.map +1 -0
- package/expresivo/ExpStatIcon/index.js +2 -0
- package/expresivo/ExpStatIcon/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 +22 -0
- package/expresivo/index.d.ts.map +1 -0
- package/expresivo/index.js +22 -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
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useEffect, useState, } from 'react';
|
|
4
|
+
import { FiCheck } from 'react-icons/fi';
|
|
5
|
+
import { Each, Show, Stepper } from '@clicoh/orion-library';
|
|
6
|
+
import { ExpMascot } from '../ExpMascot';
|
|
7
|
+
import { useExpScopeOptions } from '../ExpScope/ExpScope';
|
|
8
|
+
const STEP_MS = 1100;
|
|
9
|
+
const stateOf = (index, current) => {
|
|
10
|
+
if (index < current)
|
|
11
|
+
return 'done';
|
|
12
|
+
if (index === current)
|
|
13
|
+
return 'current';
|
|
14
|
+
return 'pending';
|
|
15
|
+
};
|
|
16
|
+
const dotMap = {
|
|
17
|
+
done: 'size-3.5 border-lavender bg-lavender dark:border-lavender-dark dark:bg-lavender-dark text-white',
|
|
18
|
+
current: 'size-[18px] border-lavender bg-white shadow-[0_0_0_5px_rgba(106,93,249,0.18)] dark:border-lavender-dark dark:bg-black',
|
|
19
|
+
pending: 'size-3.5 border-gray-4 bg-white dark:border-gray-1 dark:bg-black',
|
|
20
|
+
};
|
|
21
|
+
const labelMap = {
|
|
22
|
+
done: 'font-medium text-black dark:text-white',
|
|
23
|
+
current: 'font-semibold text-lavender dark:text-lavender-dark',
|
|
24
|
+
pending: 'font-medium text-gray-1 dark:text-gray-2',
|
|
25
|
+
};
|
|
26
|
+
const alignOf = (index, count) => {
|
|
27
|
+
if (index === 0)
|
|
28
|
+
return 'items-start text-left';
|
|
29
|
+
if (index === count - 1)
|
|
30
|
+
return 'items-end text-right';
|
|
31
|
+
return 'items-center text-center';
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Progress line with a mascot that travels to the current stage and takes
|
|
35
|
+
* that stage's pose. Reached stages get a check and the travelled part of
|
|
36
|
+
* the line fills with the clicOH gradient. Like the core `Stepper`, it only
|
|
37
|
+
* displays progress: the consumer owns `current`.
|
|
38
|
+
*
|
|
39
|
+
* The line and the mascot are decorative; the stages are an ordered list
|
|
40
|
+
* whose current item carries `aria-current="step"`.
|
|
41
|
+
*
|
|
42
|
+
* Labels sit under their dots, so the first and last columns are half as wide
|
|
43
|
+
* as the rest. When the track is narrower than 28rem every label gets the same
|
|
44
|
+
* width instead, so the end labels don't spill onto their neighbours.
|
|
45
|
+
*
|
|
46
|
+
* Outside an `ExpScope` it falls back to the core `Stepper`. When the scope
|
|
47
|
+
* hides mascots, the line renders without its traveller.
|
|
48
|
+
*
|
|
49
|
+
* @component
|
|
50
|
+
* @example
|
|
51
|
+
* <ExpJourneyTrack
|
|
52
|
+
* ariaLabel="Progress"
|
|
53
|
+
* stateLabels={{ done: 'done', current: 'in progress', pending: 'pending' }}
|
|
54
|
+
* current={1}
|
|
55
|
+
* stages={[
|
|
56
|
+
* { id: 'read', label: 'Read', mascot: 'oculus-04-analizando-documento' },
|
|
57
|
+
* { id: 'search', label: 'Search', mascot: 'oculus-07-buscando-rapido' },
|
|
58
|
+
* { id: 'answer', label: 'Answer', mascot: 'oculus-08-satisfecho' },
|
|
59
|
+
* ]}
|
|
60
|
+
* />
|
|
61
|
+
*
|
|
62
|
+
* @param {Object} props - The properties of the ExpJourneyTrack component.
|
|
63
|
+
* @param {ExpJourneyStage[]} props.stages - Stages in order, each with `id`, `label`, `mascot`, and optional `meta` and `onSelect`.
|
|
64
|
+
* @param {number} props.current - Index of the current stage.
|
|
65
|
+
* @param {string} props.ariaLabel - Accessible name of the list.
|
|
66
|
+
* @param {ExpJourneyStateLabels} props.stateLabels - Words for `done`, `current` and `pending`.
|
|
67
|
+
* @param {number} [props.mascotSize=88] - Width and height of the mascot, in pixels.
|
|
68
|
+
* @param {boolean} [props.autoplay=false] - Walks from the first stage to `current` once when it mounts. Off with reduced motion.
|
|
69
|
+
*
|
|
70
|
+
* @returns {ReactNode} The journey track, a core `Stepper` outside an `ExpScope`, or `null` without stages.
|
|
71
|
+
*/
|
|
72
|
+
export function ExpJourneyTrack({ stages, current, ariaLabel, stateLabels, mascotSize = 88, autoplay = false, ...restProps }) {
|
|
73
|
+
const options = useExpScopeOptions();
|
|
74
|
+
const [step, setStep] = useState(autoplay ? 0 : current);
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
const reduceMotion = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
77
|
+
if (!autoplay || reduceMotion) {
|
|
78
|
+
setStep(current);
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
setStep(0);
|
|
82
|
+
let index = 0;
|
|
83
|
+
const timer = setInterval(() => {
|
|
84
|
+
index += 1;
|
|
85
|
+
setStep(Math.min(index, current));
|
|
86
|
+
if (index >= current)
|
|
87
|
+
clearInterval(timer);
|
|
88
|
+
}, STEP_MS);
|
|
89
|
+
return () => clearInterval(timer);
|
|
90
|
+
}, [autoplay, current, stages.length]);
|
|
91
|
+
if (stages.length === 0)
|
|
92
|
+
return null;
|
|
93
|
+
if (!options) {
|
|
94
|
+
return (<Stepper ariaLabel={ariaLabel} stateLabels={{ ...stateLabels, skipped: stateLabels.pending }} steps={stages.map((stage, index) => ({
|
|
95
|
+
id: stage.id,
|
|
96
|
+
label: stage.label,
|
|
97
|
+
state: stateOf(index, current),
|
|
98
|
+
}))}/>);
|
|
99
|
+
}
|
|
100
|
+
const showMascot = options.mascots === 'shown';
|
|
101
|
+
const lastIndex = Math.max(1, stages.length - 1);
|
|
102
|
+
const percent = (Math.min(step, lastIndex) / lastIndex) * 100;
|
|
103
|
+
const labelColumns = stages.length > 2
|
|
104
|
+
? `minmax(0, 1fr) repeat(${stages.length - 2}, minmax(0, 2fr)) minmax(0, 1fr)`
|
|
105
|
+
: `repeat(${stages.length}, minmax(0, 1fr))`;
|
|
106
|
+
return (<div {...restProps} className={clsx('@container relative', restProps.className)}>
|
|
107
|
+
<div aria-hidden="true" className="relative" style={{ paddingTop: showMascot ? mascotSize + 8 : 0 }}>
|
|
108
|
+
{!!showMascot && (<div className="exp-float absolute top-0 transition-[left] duration-900 ease-[cubic-bezier(.65,0,.35,1)] motion-reduce:transition-none" style={{
|
|
109
|
+
width: mascotSize,
|
|
110
|
+
height: mascotSize,
|
|
111
|
+
left: `clamp(0px, calc(${percent}% - ${mascotSize / 2}px), calc(100% - ${mascotSize}px))`,
|
|
112
|
+
}}>
|
|
113
|
+
<Each of={stages} render={(stage, index) => (<span key={stage.id} className={clsx('absolute inset-0 transition-[opacity,scale] delay-200 duration-300 motion-reduce:transition-none', index === step
|
|
114
|
+
? 'scale-100 opacity-100'
|
|
115
|
+
: 'scale-85 opacity-0')}>
|
|
116
|
+
<ExpMascot name={stage.mascot} size={mascotSize}/>
|
|
117
|
+
</span>)}/>
|
|
118
|
+
</div>)}
|
|
119
|
+
<div className="bg-gray-5 dark:bg-gray-dark-1 relative mx-1.5 h-1.5 rounded-full">
|
|
120
|
+
<span className="from-lavender to-violet absolute inset-y-0 left-0 rounded-full bg-linear-90 transition-[width] duration-900 ease-[cubic-bezier(.65,0,.35,1)] motion-reduce:transition-none" style={{ width: `${percent}%` }}/>
|
|
121
|
+
<Each of={stages} render={(stage, index) => {
|
|
122
|
+
const state = stateOf(index, step);
|
|
123
|
+
return (<span key={stage.id} className={clsx('absolute top-1/2 flex -translate-x-1/2 -translate-y-1/2 items-center justify-center rounded-full border-2 transition-all duration-300', dotMap[state])} style={{ left: `${(index / lastIndex) * 100}%` }}>
|
|
124
|
+
{state === 'done' && (<FiCheck strokeWidth={4} className="size-2"/>)}
|
|
125
|
+
</span>);
|
|
126
|
+
}}/>
|
|
127
|
+
</div>
|
|
128
|
+
</div>
|
|
129
|
+
<ol aria-label={ariaLabel} className="mt-3.5 grid grid-cols-(--exp-track-columns) @max-md:auto-cols-fr @max-md:grid-flow-col @max-md:grid-cols-none @max-md:gap-x-1" style={{ '--exp-track-columns': labelColumns }}>
|
|
130
|
+
<Each of={stages} render={(stage, index) => {
|
|
131
|
+
const state = stateOf(index, current);
|
|
132
|
+
const isReached = index <= current;
|
|
133
|
+
const body = (<>
|
|
134
|
+
<span className={clsx('text-xs leading-4 transition-colors duration-300', labelMap[stateOf(index, step)])}>
|
|
135
|
+
{stage.label}
|
|
136
|
+
<span className="sr-only">, {stateLabels[state]}</span>
|
|
137
|
+
</span>
|
|
138
|
+
{!!stage.meta && (<span className={clsx('text-gray-1 dark:text-gray-2 text-[11px] leading-4 transition-opacity duration-300', index <= step ? 'opacity-100' : 'opacity-0')}>
|
|
139
|
+
{stage.meta}
|
|
140
|
+
</span>)}
|
|
141
|
+
</>);
|
|
142
|
+
return (<li key={stage.id} aria-current={state === 'current' ? 'step' : undefined} className="flex min-w-0">
|
|
143
|
+
<Show>
|
|
144
|
+
<Show.When isTrue={Boolean(stage.onSelect) && isReached}>
|
|
145
|
+
<button type="button" onClick={stage.onSelect} className={clsx('focus-visible:ring-lavender -mx-1.5 -my-1 flex w-full flex-col gap-0.5 rounded-lg px-1.5 py-1 focus-visible:ring-2 focus-visible:outline-none', alignOf(index, stages.length))}>
|
|
146
|
+
{body}
|
|
147
|
+
</button>
|
|
148
|
+
</Show.When>
|
|
149
|
+
<Show.Else>
|
|
150
|
+
<span className={clsx('flex w-full flex-col gap-0.5', alignOf(index, stages.length))}>
|
|
151
|
+
{body}
|
|
152
|
+
</span>
|
|
153
|
+
</Show.Else>
|
|
154
|
+
</Show>
|
|
155
|
+
</li>);
|
|
156
|
+
}}/>
|
|
157
|
+
</ol>
|
|
158
|
+
</div>);
|
|
159
|
+
}
|
|
160
|
+
//# sourceMappingURL=ExpJourneyTrack.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpJourneyTrack.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpJourneyTrack/ExpJourneyTrack.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAIL,SAAS,EACT,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAqB,MAAM,uBAAuB,CAAC;AAC/E,OAAO,EAAE,SAAS,EAAsB,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAmC1D,MAAM,OAAO,GAAG,IAAI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ACxB,SAAS,CAAC,CAAC,IAAI,CACb,+IAA+I,EAC/I,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAC9B,CAAC,CAEF;sBAAA,CAAC,IAAI,CACP;oBAAA,EAAE,MAAM,CACV;kBAAA,EAAE,IAAI,CAAC,IAAI,CACX;kBAAA,CAAC,IAAI,CAAC,IAAI,CACR;oBAAA,CAAC,IAAI,CACH,SAAS,CAAC,CAAC,IAAI,CACb,8BAA8B,EAC9B,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,CAC9B,CAAC,CAEF;sBAAA,CAAC,IAAI,CACP;oBAAA,EAAE,IAAI,CACR;kBAAA,EAAE,IAAI,CAAC,IAAI,CACb;gBAAA,EAAE,IAAI,CACR;cAAA,EAAE,EAAE,CAAC,CACN,CAAC;QACJ,CAAC,CAAC,EAEN;MAAA,EAAE,EAAE,CACN;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpJourneyTrack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EACV,eAAe,EACf,qBAAqB,EACrB,oBAAoB,GACrB,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpJourneyTrack/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
export type ExpKeyButtonTone = 'brand' | 'white' | 'black';
|
|
3
|
+
export type ExpKeyButtonSize = 'lg' | 'sm';
|
|
4
|
+
export type ExpKeyButtonIcon = 'lens' | 'sync' | 'none';
|
|
5
|
+
export type ExpKeyButtonProps = {
|
|
6
|
+
tone?: ExpKeyButtonTone;
|
|
7
|
+
size?: ExpKeyButtonSize;
|
|
8
|
+
icon?: ExpKeyButtonIcon;
|
|
9
|
+
/** Shows an arrow after the label that steps forward on hover. */
|
|
10
|
+
arrow?: boolean;
|
|
11
|
+
/** Sinks the key and blocks it while the action runs. */
|
|
12
|
+
busy?: boolean;
|
|
13
|
+
/** Label shown while `busy`. Defaults to `children`. */
|
|
14
|
+
busyLabel?: string;
|
|
15
|
+
/** Takes the full width of its container. */
|
|
16
|
+
block?: boolean;
|
|
17
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>;
|
|
18
|
+
/**
|
|
19
|
+
* Call to action shaped like a physical key: a gradient face over a darker
|
|
20
|
+
* edge that gives it depth. It lifts on hover, sinks when pressed and stays
|
|
21
|
+
* sunk while `busy`, with a shine crossing its face. Use one per screen, for
|
|
22
|
+
* the main action.
|
|
23
|
+
*
|
|
24
|
+
* Outside an `ExpScope` it falls back to the core `Button`: `white` maps to
|
|
25
|
+
* `second`, the other tones to `principal`, and `sm` to the `field` size.
|
|
26
|
+
*
|
|
27
|
+
* @component
|
|
28
|
+
* @example
|
|
29
|
+
* <ExpKeyButton onClick={start}>Start</ExpKeyButton>
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* // Compact, in a row of form controls, without icon or arrow
|
|
33
|
+
* <ExpKeyButton size="sm" tone="white" icon="none" arrow={false}>Clear</ExpKeyButton>
|
|
34
|
+
*
|
|
35
|
+
* @param {Object} props - The properties of the ExpKeyButton component.
|
|
36
|
+
* @param {'brand' | 'white' | 'black'} [props.tone='brand'] - Color of the key face.
|
|
37
|
+
* @param {'lg' | 'sm'} [props.size='lg'] - `lg` is 52px tall; `sm` is 36px, the height of `Input`, `Select` and `DatePicker`.
|
|
38
|
+
* @param {'lens' | 'sync' | 'none'} [props.icon='lens'] - Glyph before the label.
|
|
39
|
+
* @param {boolean} [props.arrow=true] - Shows an arrow after the label.
|
|
40
|
+
* @param {boolean} [props.busy=false] - Sinks the key and blocks it while the action runs.
|
|
41
|
+
* @param {string} [props.busyLabel] - Label shown while `busy`.
|
|
42
|
+
* @param {boolean} [props.block=false] - Takes the full width of its container.
|
|
43
|
+
* @param {ReactNode} props.children - Label of the action.
|
|
44
|
+
* @param {ButtonHTMLAttributes<HTMLButtonElement>} restProps - Additional properties for the button element.
|
|
45
|
+
*
|
|
46
|
+
* @returns {ReactNode} The rendered key, or a core `Button` outside an `ExpScope`.
|
|
47
|
+
*/
|
|
48
|
+
export declare function ExpKeyButton({ tone, size, icon, arrow, busy, busyLabel, block, disabled, children, ...restProps }: ExpKeyButtonProps): ReactNode;
|
|
49
|
+
//# sourceMappingURL=ExpKeyButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpKeyButton.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpKeyButton/ExpKeyButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAM7D,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAE3D,MAAM,MAAM,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAAC;AAE3C,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAExD,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,IAAI,CAAC,EAAE,gBAAgB,CAAC;IACxB,kEAAkE;IAClE,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yDAAyD;IACzD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wDAAwD;IACxD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAY5C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAc,EACd,IAAW,EACX,IAAa,EACb,KAAY,EACZ,IAAY,EACZ,SAAS,EACT,KAAa,EACb,QAAgB,EAChB,QAAQ,EACR,GAAG,SAAS,EACb,EAAE,iBAAiB,GAAG,SAAS,CAmD/B"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { FiArrowRight, FiRefreshCw, FiSearch } from 'react-icons/fi';
|
|
4
|
+
import { Button } from '@clicoh/orion-library';
|
|
5
|
+
import { useExpScope } from '../ExpScope/ExpScope';
|
|
6
|
+
import { ArrowGlyph, LensGlyph, SyncBadgeGlyph } from '../shared/glyphs';
|
|
7
|
+
const fallbackIconMap = {
|
|
8
|
+
lens: <FiSearch />,
|
|
9
|
+
sync: <FiRefreshCw />,
|
|
10
|
+
none: undefined,
|
|
11
|
+
};
|
|
12
|
+
const glyphSizeMap = { lg: 32, sm: 24 };
|
|
13
|
+
const arrowSizeMap = { lg: 20, sm: 16 };
|
|
14
|
+
/**
|
|
15
|
+
* Call to action shaped like a physical key: a gradient face over a darker
|
|
16
|
+
* edge that gives it depth. It lifts on hover, sinks when pressed and stays
|
|
17
|
+
* sunk while `busy`, with a shine crossing its face. Use one per screen, for
|
|
18
|
+
* the main action.
|
|
19
|
+
*
|
|
20
|
+
* Outside an `ExpScope` it falls back to the core `Button`: `white` maps to
|
|
21
|
+
* `second`, the other tones to `principal`, and `sm` to the `field` size.
|
|
22
|
+
*
|
|
23
|
+
* @component
|
|
24
|
+
* @example
|
|
25
|
+
* <ExpKeyButton onClick={start}>Start</ExpKeyButton>
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* // Compact, in a row of form controls, without icon or arrow
|
|
29
|
+
* <ExpKeyButton size="sm" tone="white" icon="none" arrow={false}>Clear</ExpKeyButton>
|
|
30
|
+
*
|
|
31
|
+
* @param {Object} props - The properties of the ExpKeyButton component.
|
|
32
|
+
* @param {'brand' | 'white' | 'black'} [props.tone='brand'] - Color of the key face.
|
|
33
|
+
* @param {'lg' | 'sm'} [props.size='lg'] - `lg` is 52px tall; `sm` is 36px, the height of `Input`, `Select` and `DatePicker`.
|
|
34
|
+
* @param {'lens' | 'sync' | 'none'} [props.icon='lens'] - Glyph before the label.
|
|
35
|
+
* @param {boolean} [props.arrow=true] - Shows an arrow after the label.
|
|
36
|
+
* @param {boolean} [props.busy=false] - Sinks the key and blocks it while the action runs.
|
|
37
|
+
* @param {string} [props.busyLabel] - Label shown while `busy`.
|
|
38
|
+
* @param {boolean} [props.block=false] - Takes the full width of its container.
|
|
39
|
+
* @param {ReactNode} props.children - Label of the action.
|
|
40
|
+
* @param {ButtonHTMLAttributes<HTMLButtonElement>} restProps - Additional properties for the button element.
|
|
41
|
+
*
|
|
42
|
+
* @returns {ReactNode} The rendered key, or a core `Button` outside an `ExpScope`.
|
|
43
|
+
*/
|
|
44
|
+
export function ExpKeyButton({ tone = 'brand', size = 'lg', icon = 'lens', arrow = true, busy = false, busyLabel, block = false, disabled = false, children, ...restProps }) {
|
|
45
|
+
const inScope = useExpScope();
|
|
46
|
+
const label = busy && busyLabel ? busyLabel : children;
|
|
47
|
+
if (!inScope) {
|
|
48
|
+
return (<Button {...restProps} modifier={tone === 'white' ? 'second' : 'principal'} size={size === 'lg' ? 'md' : 'field'} iconL={fallbackIconMap[icon]} iconR={arrow ? <FiArrowRight /> : undefined} disabled={disabled || busy} aria-busy={busy || undefined} className={clsx(block && 'w-full', restProps.className)}>
|
|
49
|
+
{label}
|
|
50
|
+
</Button>);
|
|
51
|
+
}
|
|
52
|
+
return (<button {...restProps} disabled={disabled || busy} aria-busy={busy || undefined} data-tone={tone} data-size={size} data-icon={icon} data-state={disabled ? 'disabled' : busy ? 'busy' : 'idle'} className={clsx('exp-key', block && 'exp-key--block', restProps.className)}>
|
|
53
|
+
{!!busy && <span aria-hidden="true" className="exp-key-shine"/>}
|
|
54
|
+
{icon === 'lens' && (<LensGlyph size={glyphSizeMap[size]} busy={busy} disabled={disabled}/>)}
|
|
55
|
+
{icon === 'sync' && (<SyncBadgeGlyph size={glyphSizeMap[size]} busy={busy} disabled={disabled}/>)}
|
|
56
|
+
<span className="exp-key-label">{label}</span>
|
|
57
|
+
{!!arrow && <ArrowGlyph size={arrowSizeMap[size]}/>}
|
|
58
|
+
</button>);
|
|
59
|
+
}
|
|
60
|
+
//# sourceMappingURL=ExpKeyButton.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpKeyButton.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpKeyButton/ExpKeyButton.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAsBzE,MAAM,eAAe,GAAwC;IAC3D,IAAI,EAAE,CAAC,QAAQ,CAAC,AAAD,EAAG;IAClB,IAAI,EAAE,CAAC,WAAW,CAAC,AAAD,EAAG;IACrB,IAAI,EAAE,SAAS;CAChB,CAAC;AAEF,MAAM,YAAY,GAAqC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAE1E,MAAM,YAAY,GAAqC,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,MAAM,UAAU,YAA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AAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,YAAY,EACV,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpKeyButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type StepperStep, type StepperStepState } from '@clicoh/orion-library';
|
|
2
|
+
import type { ReactNode } from 'react';
|
|
3
|
+
export type ExpLadderProps = {
|
|
4
|
+
/** Steps in order, with the same shape as the core `Stepper`. */
|
|
5
|
+
steps: StepperStep[];
|
|
6
|
+
/** Accessible name of the list. */
|
|
7
|
+
ariaLabel: string;
|
|
8
|
+
/** Word for each state, read after every label. A skipped step also shows it. */
|
|
9
|
+
stateLabels: Record<StepperStepState, string>;
|
|
10
|
+
className?: string;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Vertical progress drawn as a staircase: every step that was not skipped
|
|
14
|
+
* sits a little further in, with a diamond in place of the dot. The current
|
|
15
|
+
* step is tinted lavender; skipped steps are struck through and say so.
|
|
16
|
+
*
|
|
17
|
+
* Outside an `ExpScope` it falls back to the core `Stepper`, vertical and
|
|
18
|
+
* `sm`, with the same steps.
|
|
19
|
+
*
|
|
20
|
+
* @component
|
|
21
|
+
* @example
|
|
22
|
+
* <ExpLadder
|
|
23
|
+
* ariaLabel="Case lifecycle"
|
|
24
|
+
* stateLabels={{ done: 'done', current: 'current', pending: 'pending', skipped: 'skipped' }}
|
|
25
|
+
* steps={[
|
|
26
|
+
* { id: 'new', label: 'New', state: 'done' },
|
|
27
|
+
* { id: 'review', label: 'In review', state: 'skipped' },
|
|
28
|
+
* { id: 'fixed', label: 'Fixed', state: 'current' },
|
|
29
|
+
* { id: 'closed', label: 'Closed', state: 'pending' },
|
|
30
|
+
* ]}
|
|
31
|
+
* />
|
|
32
|
+
*
|
|
33
|
+
* @param {ExpLadderProps} props - The properties of the ExpLadder component.
|
|
34
|
+
* @param {StepperStep[]} props.steps - Steps in order: `id`, `label` and `state`.
|
|
35
|
+
* @param {string} props.ariaLabel - Accessible name of the list.
|
|
36
|
+
* @param {Record<StepperStepState, string>} props.stateLabels - Word for each state.
|
|
37
|
+
* @param {string} [props.className] - Classes for the list.
|
|
38
|
+
*
|
|
39
|
+
* @returns {ReactNode} The staircase, or a core `Stepper` outside an `ExpScope`.
|
|
40
|
+
*/
|
|
41
|
+
export declare function ExpLadder({ steps, ariaLabel, stateLabels, className, }: ExpLadderProps): ReactNode;
|
|
42
|
+
//# sourceMappingURL=ExpLadder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpLadder.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpLadder/ExpLadder.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACtB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,MAAM,MAAM,cAAc,GAAG;IAC3B,iEAAiE;IACjE,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB,mCAAmC;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,iFAAiF;IACjF,WAAW,EAAE,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAmCF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,SAAS,CAAC,EACxB,KAAK,EACL,SAAS,EACT,WAAW,EACX,SAAS,GACV,EAAE,cAAc,GAAG,SAAS,CA8D5B"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { Each, Stepper, } from '@clicoh/orion-library';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import { useExpScope } from '../ExpScope/ExpScope';
|
|
5
|
+
const INDENTS = [
|
|
6
|
+
'ml-0',
|
|
7
|
+
'ml-[7px]',
|
|
8
|
+
'ml-[14px]',
|
|
9
|
+
'ml-[21px]',
|
|
10
|
+
'ml-[28px]',
|
|
11
|
+
'ml-[35px]',
|
|
12
|
+
'ml-[42px]',
|
|
13
|
+
];
|
|
14
|
+
const rowMap = {
|
|
15
|
+
done: '',
|
|
16
|
+
current: 'bg-lavender-3 ring-1 ring-lavender-1 ring-inset dark:bg-lavender-dark-1 dark:ring-0',
|
|
17
|
+
pending: '',
|
|
18
|
+
skipped: 'opacity-60',
|
|
19
|
+
};
|
|
20
|
+
const diamondMap = {
|
|
21
|
+
done: 'size-3 bg-black dark:bg-white',
|
|
22
|
+
current: 'size-3.5 bg-linear-135 from-lavender to-violet shadow-[0_0_0_4px_rgba(106,93,249,0.18)] dark:from-lavender-dark dark:to-violet-dark',
|
|
23
|
+
pending: 'size-3 border border-gray-2',
|
|
24
|
+
skipped: 'size-3 border border-dashed border-gray-2',
|
|
25
|
+
};
|
|
26
|
+
const textMap = {
|
|
27
|
+
done: 'font-medium text-black dark:text-white',
|
|
28
|
+
current: 'font-semibold text-lavender dark:text-lavender-dark',
|
|
29
|
+
pending: 'text-gray-1 dark:text-gray-2',
|
|
30
|
+
skipped: 'text-gray-1 line-through dark:text-gray-2',
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Vertical progress drawn as a staircase: every step that was not skipped
|
|
34
|
+
* sits a little further in, with a diamond in place of the dot. The current
|
|
35
|
+
* step is tinted lavender; skipped steps are struck through and say so.
|
|
36
|
+
*
|
|
37
|
+
* Outside an `ExpScope` it falls back to the core `Stepper`, vertical and
|
|
38
|
+
* `sm`, with the same steps.
|
|
39
|
+
*
|
|
40
|
+
* @component
|
|
41
|
+
* @example
|
|
42
|
+
* <ExpLadder
|
|
43
|
+
* ariaLabel="Case lifecycle"
|
|
44
|
+
* stateLabels={{ done: 'done', current: 'current', pending: 'pending', skipped: 'skipped' }}
|
|
45
|
+
* steps={[
|
|
46
|
+
* { id: 'new', label: 'New', state: 'done' },
|
|
47
|
+
* { id: 'review', label: 'In review', state: 'skipped' },
|
|
48
|
+
* { id: 'fixed', label: 'Fixed', state: 'current' },
|
|
49
|
+
* { id: 'closed', label: 'Closed', state: 'pending' },
|
|
50
|
+
* ]}
|
|
51
|
+
* />
|
|
52
|
+
*
|
|
53
|
+
* @param {ExpLadderProps} props - The properties of the ExpLadder component.
|
|
54
|
+
* @param {StepperStep[]} props.steps - Steps in order: `id`, `label` and `state`.
|
|
55
|
+
* @param {string} props.ariaLabel - Accessible name of the list.
|
|
56
|
+
* @param {Record<StepperStepState, string>} props.stateLabels - Word for each state.
|
|
57
|
+
* @param {string} [props.className] - Classes for the list.
|
|
58
|
+
*
|
|
59
|
+
* @returns {ReactNode} The staircase, or a core `Stepper` outside an `ExpScope`.
|
|
60
|
+
*/
|
|
61
|
+
export function ExpLadder({ steps, ariaLabel, stateLabels, className, }) {
|
|
62
|
+
const inScope = useExpScope();
|
|
63
|
+
if (!inScope) {
|
|
64
|
+
return (<Stepper steps={steps} ariaLabel={ariaLabel} stateLabels={stateLabels} orientation="vertical" size="sm" className={className}/>);
|
|
65
|
+
}
|
|
66
|
+
const indents = steps.reduce((acc, step, index) => {
|
|
67
|
+
const before = index === 0 ? 0 : acc[index - 1];
|
|
68
|
+
const previous = steps[index - 1];
|
|
69
|
+
acc.push(index === 0 || previous.state === 'skipped' ? before : before + 1);
|
|
70
|
+
return acc;
|
|
71
|
+
}, []);
|
|
72
|
+
return (<ol aria-label={ariaLabel} className={clsx('flex flex-col', className)}>
|
|
73
|
+
<Each of={steps} render={(step, index) => (<li key={step.id} aria-current={step.state === 'current' ? 'step' : undefined} className={clsx('flex min-w-0 items-center gap-2.5 rounded-[10px] py-1.5 pr-2.5 pl-2', INDENTS[Math.min(indents[index], INDENTS.length - 1)], rowMap[step.state])}>
|
|
74
|
+
<span aria-hidden="true" className={clsx('flex-none rotate-45 rounded-[4px]', diamondMap[step.state])}/>
|
|
75
|
+
<span className={clsx('truncate text-[13px] leading-[18px]', textMap[step.state])}>
|
|
76
|
+
{step.label}
|
|
77
|
+
{step.state === 'skipped' ? (` · ${stateLabels.skipped}`) : (<span className="sr-only">{`, ${stateLabels[step.state]}`}</span>)}
|
|
78
|
+
</span>
|
|
79
|
+
</li>)}/>
|
|
80
|
+
</ol>);
|
|
81
|
+
}
|
|
82
|
+
//# sourceMappingURL=ExpLadder.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpLadder.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpLadder/ExpLadder.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EACL,IAAI,EACJ,OAAO,GAGR,MAAM,uBAAuB,CAAC;AAC/B,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAYnD,MAAM,OAAO,GAAG;IACd,MAAM;IACN,UAAU;IACV,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;IACX,WAAW;CACZ,CAAC;AAEF,MAAM,MAAM,GAAqC;IAC/C,IAAI,EAAE,EAAE;IACR,OAAO,EACL,qFAAqF;IACvF,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,YAAY;CACtB,CAAC;AAEF,MAAM,UAAU,GAAqC;IACnD,IAAI,EAAE,+BAA+B;IACrC,OAAO,EACL,qIAAqI;IACvI,OAAO,EAAE,6BAA6B;IACtC,OAAO,EAAE,2CAA2C;CACrD,CAAC;AAEF,MAAM,OAAO,GAAqC;IAChD,IAAI,EAAE,wCAAwC;IAC9C,OAAO,EAAE,qDAAqD;IAC9D,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,2CAA2C;CACrD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;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 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpLadder/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export type ExpLensIconProps = {
|
|
3
|
+
/** Width and height in pixels. */
|
|
4
|
+
size?: number;
|
|
5
|
+
/** Scans from side to side while the action runs. */
|
|
6
|
+
busy?: boolean;
|
|
7
|
+
/** Grays out, to match a disabled button. */
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Magnifier with an eye inside, for the `iconL` of a core `Button` that
|
|
12
|
+
* searches or investigates. It blinks at rest, looks towards the label while
|
|
13
|
+
* the button is hovered, and scans while `busy`. It is decorative.
|
|
14
|
+
*
|
|
15
|
+
* Outside an `ExpScope` it falls back to the plain search icon.
|
|
16
|
+
*
|
|
17
|
+
* @component
|
|
18
|
+
* @example
|
|
19
|
+
* <Button iconL={<ExpLensIcon busy={isSearching} />}>Search</Button>
|
|
20
|
+
*
|
|
21
|
+
* @param {Object} props - The properties of the ExpLensIcon component.
|
|
22
|
+
* @param {number} [props.size=20] - Width and height in pixels.
|
|
23
|
+
* @param {boolean} [props.busy=false] - Scans from side to side while the action runs.
|
|
24
|
+
* @param {boolean} [props.disabled=false] - Grays out, to match a disabled button.
|
|
25
|
+
*
|
|
26
|
+
* @returns {ReactNode} The lens, or `FiSearch` outside an `ExpScope`.
|
|
27
|
+
*/
|
|
28
|
+
export declare function ExpLensIcon({ size, busy, disabled, }: ExpLensIconProps): ReactNode;
|
|
29
|
+
//# sourceMappingURL=ExpLensIcon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpLensIcon.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpLensIcon/ExpLensIcon.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,MAAM,MAAM,gBAAgB,GAAG;IAC7B,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CAAC,EAC1B,IAAS,EACT,IAAY,EACZ,QAAgB,GACjB,EAAE,gBAAgB,GAAG,SAAS,CAM9B"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { FiSearch } from 'react-icons/fi';
|
|
3
|
+
import { useExpScope } from '../ExpScope/ExpScope';
|
|
4
|
+
import { LensGlyph } from '../shared/glyphs';
|
|
5
|
+
/**
|
|
6
|
+
* Magnifier with an eye inside, for the `iconL` of a core `Button` that
|
|
7
|
+
* searches or investigates. It blinks at rest, looks towards the label while
|
|
8
|
+
* the button is hovered, and scans while `busy`. It is decorative.
|
|
9
|
+
*
|
|
10
|
+
* Outside an `ExpScope` it falls back to the plain search icon.
|
|
11
|
+
*
|
|
12
|
+
* @component
|
|
13
|
+
* @example
|
|
14
|
+
* <Button iconL={<ExpLensIcon busy={isSearching} />}>Search</Button>
|
|
15
|
+
*
|
|
16
|
+
* @param {Object} props - The properties of the ExpLensIcon component.
|
|
17
|
+
* @param {number} [props.size=20] - Width and height in pixels.
|
|
18
|
+
* @param {boolean} [props.busy=false] - Scans from side to side while the action runs.
|
|
19
|
+
* @param {boolean} [props.disabled=false] - Grays out, to match a disabled button.
|
|
20
|
+
*
|
|
21
|
+
* @returns {ReactNode} The lens, or `FiSearch` outside an `ExpScope`.
|
|
22
|
+
*/
|
|
23
|
+
export function ExpLensIcon({ size = 20, busy = false, disabled = false, }) {
|
|
24
|
+
const inScope = useExpScope();
|
|
25
|
+
if (!inScope)
|
|
26
|
+
return <FiSearch aria-hidden="true"/>;
|
|
27
|
+
return <LensGlyph size={size} busy={busy} disabled={disabled}/>;
|
|
28
|
+
}
|
|
29
|
+
//# sourceMappingURL=ExpLensIcon.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpLensIcon.jsx","sourceRoot":"","sources":["../../src/expresivo/ExpLensIcon/ExpLensIcon.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAGb,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAW7C;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,WAAW,CAAC,EAC1B,IAAI,GAAG,EAAE,EACT,IAAI,GAAG,KAAK,EACZ,QAAQ,GAAG,KAAK,GACC;IACjB,MAAM,OAAO,GAAG,WAAW,EAAE,CAAC;IAE9B,IAAI,CAAC,OAAO;QAAE,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAC,MAAM,EAAG,CAAC;IAErD,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,EAAG,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpLensIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/expresivo/ExpLensIcon/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import { type ExpLogoName } from './catalog';
|
|
3
|
+
export type ExpLogoProps = {
|
|
4
|
+
name: ExpLogoName;
|
|
5
|
+
/** Accessible name of the logo, usually the product name. */
|
|
6
|
+
alt: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Logo of a clicOH product, for `Header.logo`. From `lg` up it shows the full
|
|
11
|
+
* logo, light or dark after the `dark` class on `<html>` (not the system
|
|
12
|
+
* preference); below `lg`, only the symbol. The files are drawn at their own
|
|
13
|
+
* size: never redrawn, recolored, stretched or padded.
|
|
14
|
+
*
|
|
15
|
+
* Outside an `ExpScope` it falls back to the core clicOH `Logo`.
|
|
16
|
+
*
|
|
17
|
+
* @component
|
|
18
|
+
* @example
|
|
19
|
+
* <DashboardTemplate
|
|
20
|
+
* headerProps={{ logo: <ExpLogo name="oculus" alt="Oculus clicOH" /> }}
|
|
21
|
+
* >
|
|
22
|
+
* {children}
|
|
23
|
+
* </DashboardTemplate>
|
|
24
|
+
*
|
|
25
|
+
* @param {ExpLogoProps} props - The properties of the ExpLogo component.
|
|
26
|
+
* @param {ExpLogoName} props.name - Product whose logo is shown.
|
|
27
|
+
* @param {string} props.alt - Accessible name of the logo.
|
|
28
|
+
* @param {string} [props.className] - Classes for the wrapper.
|
|
29
|
+
*
|
|
30
|
+
* @returns {ReactNode} The product logo, or the core `Logo` outside an `ExpScope`.
|
|
31
|
+
*/
|
|
32
|
+
export declare function ExpLogo({ name, alt, className }: ExpLogoProps): ReactNode;
|
|
33
|
+
//# sourceMappingURL=ExpLogo.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpLogo.d.ts","sourceRoot":"","sources":["../../src/expresivo/ExpLogo/ExpLogo.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAE,KAAK,WAAW,EAAe,MAAM,WAAW,CAAC;AAE1D,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,WAAW,CAAC;IAClB,6DAA6D;IAC7D,GAAG,EAAE,MAAM,CAAC;IACZ,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,wBAAgB,OAAO,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,YAAY,GAAG,SAAS,CAqCzE"}
|