@clicoh/orion-library 1.2.0-beta.1 → 1.2.0-beta.11
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/dist/components/01-atoms/Button/Button.d.ts +4 -1
- package/dist/components/01-atoms/Button/Button.d.ts.map +1 -1
- package/dist/components/01-atoms/Button/Button.jsx +16 -2
- package/dist/components/01-atoms/Button/Button.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 +7 -4
- package/dist/components/01-atoms/Input/Input.jsx.map +1 -1
- package/dist/components/01-atoms/Input/utils/border.d.ts +2 -1
- package/dist/components/01-atoms/Input/utils/border.d.ts.map +1 -1
- package/dist/components/01-atoms/Input/utils/border.js +2 -2
- package/dist/components/01-atoms/Input/utils/border.js.map +1 -1
- package/dist/components/01-atoms/MultiSelect/MultiSelect.jsx +1 -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/Radio/Radio.jsx +1 -1
- package/dist/components/01-atoms/Radio/Radio.jsx.map +1 -1
- package/dist/components/01-atoms/Select/Select.d.ts +5 -1
- package/dist/components/01-atoms/Select/Select.d.ts.map +1 -1
- package/dist/components/01-atoms/Select/Select.jsx +51 -9
- 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/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/index.d.ts +2 -0
- package/dist/components/01-atoms/index.d.ts.map +1 -1
- package/dist/components/01-atoms/index.js +2 -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 +4 -3
- 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 +35 -8
- 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 +10 -1
- package/dist/components/02-molecules/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/02-molecules/Autocomplete/Autocomplete.jsx +29 -10
- package/dist/components/02-molecules/Autocomplete/Autocomplete.jsx.map +1 -1
- package/dist/components/02-molecules/DatePicker/DatePicker.jsx +1 -1
- package/dist/components/02-molecules/DatePicker/DatePicker.jsx.map +1 -1
- package/dist/components/02-molecules/Filter/Filter.d.ts +1 -0
- package/dist/components/02-molecules/Filter/Filter.d.ts.map +1 -1
- package/dist/components/02-molecules/Filter/Filter.jsx +25 -4
- 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 +108 -0
- package/dist/components/02-molecules/ImageViewer/ImageViewerImage.jsx.map +1 -0
- 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 +7 -5
- package/dist/components/02-molecules/Modal/Modal.jsx.map +1 -1
- package/dist/components/02-molecules/index.d.ts +1 -0
- package/dist/components/02-molecules/index.d.ts.map +1 -1
- package/dist/components/02-molecules/index.js +1 -0
- package/dist/components/02-molecules/index.js.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 +36 -7
- package/dist/components/03-organisms/MapView/MapView.jsx.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/package.json +3 -2
|
@@ -6,30 +6,55 @@ import { MdFullscreen, MdFullscreenExit, MdRotateRight, MdZoomIn, MdZoomOut, } f
|
|
|
6
6
|
import { Each, Show } from '../../00-base';
|
|
7
7
|
import { List, Paragraph } from '../../01-atoms';
|
|
8
8
|
import { TabItem } from '../Tab/TabItem';
|
|
9
|
+
import { ImageViewerImage } from './ImageViewerImage';
|
|
9
10
|
const MIN_ZOOM = 1;
|
|
10
11
|
const MAX_ZOOM = 3;
|
|
11
12
|
const ZOOM_STEP = 0.5;
|
|
12
13
|
const QUARTER_TURN = 90;
|
|
13
14
|
const FULL_TURN = 360;
|
|
15
|
+
const INITIAL_TRANSFORM = { zoom: MIN_ZOOM, rotation: 0 };
|
|
14
16
|
const TOOL_CLASSNAME = 'hover:bg-gray-5 focus-visible:ring-lavender disabled:text-gray-3 dark:disabled:text-gray-1 dark:hover:bg-gray-1 flex h-8 w-8 cursor-pointer items-center justify-center rounded-sm text-lg text-black focus-visible:ring-2 focus-visible:outline-none disabled:cursor-not-allowed disabled:hover:bg-transparent dark:text-white';
|
|
15
17
|
/**
|
|
16
18
|
* ImageViewer component for inspecting one or more images of the same subject.
|
|
17
19
|
*
|
|
18
20
|
* Each view is a tab, so a subject photographed from several angles reads as one
|
|
19
|
-
* piece instead of a gallery. Zoom and rotation reset
|
|
21
|
+
* piece instead of a gallery. Zoom and rotation reset whenever the active view
|
|
22
|
+
* changes, whether the user picked a tab or the consumer moved `activeId`: a
|
|
20
23
|
* transform that made sense for one angle rarely makes sense for the next.
|
|
21
24
|
*
|
|
25
|
+
* Uncontrolled by default. Passing `activeId` makes the consumer own the active
|
|
26
|
+
* view, so something outside the viewer (a side panel, a "next pending" action)
|
|
27
|
+
* can follow or drive it; `onViewChange` reports tab picks in both modes.
|
|
28
|
+
*
|
|
22
29
|
* Renders `emptyState` while `views` is empty, and disables the toolbar with it,
|
|
23
30
|
* so the frame keeps its size instead of collapsing.
|
|
24
31
|
*
|
|
32
|
+
* `layout="split"` is for comparing different subjects instead: every view
|
|
33
|
+
* gets its own pane with its label, side by side from `sm` and stacked below
|
|
34
|
+
* it. The toolbar acts on all panes at once, so both stay at the same scale,
|
|
35
|
+
* and there is no active view.
|
|
36
|
+
*
|
|
37
|
+
* A view's `crop` draws only that region of its image, fitted to the frame
|
|
38
|
+
* like the whole image would be — a face inside a document, for instance.
|
|
39
|
+
*
|
|
25
40
|
* @component
|
|
26
41
|
* @example
|
|
42
|
+
* const [viewId, setViewId] = useState('front');
|
|
43
|
+
*
|
|
27
44
|
* <ImageViewer
|
|
28
45
|
* title="Identity document"
|
|
29
46
|
* views={[
|
|
30
47
|
* { id: 'front', label: 'Front', src: '/front.jpg', alt: 'Document front' },
|
|
31
|
-
* {
|
|
48
|
+
* {
|
|
49
|
+
* id: 'back',
|
|
50
|
+
* label: 'Back',
|
|
51
|
+
* src: '/back.jpg',
|
|
52
|
+
* alt: 'Document back',
|
|
53
|
+
* indicator: <FiAlertTriangle role="img" aria-label="Needs review" />,
|
|
54
|
+
* },
|
|
32
55
|
* ]}
|
|
56
|
+
* activeId={viewId}
|
|
57
|
+
* onViewChange={setViewId}
|
|
33
58
|
* labels={{
|
|
34
59
|
* zoomIn: 'Zoom in',
|
|
35
60
|
* zoomOut: 'Zoom out',
|
|
@@ -40,19 +65,38 @@ const TOOL_CLASSNAME = 'hover:bg-gray-5 focus-visible:ring-lavender disabled:tex
|
|
|
40
65
|
* emptyState={<p>Nothing uploaded yet</p>}
|
|
41
66
|
* />
|
|
42
67
|
*
|
|
68
|
+
* @example
|
|
69
|
+
* <ImageViewer
|
|
70
|
+
* layout="split"
|
|
71
|
+
* title="Compared images"
|
|
72
|
+
* views={[
|
|
73
|
+
* { id: 'photo', label: 'Photo', src: '/photo.jpg', alt: 'Photo taken today' },
|
|
74
|
+
* {
|
|
75
|
+
* id: 'card',
|
|
76
|
+
* label: 'ID card',
|
|
77
|
+
* src: '/card.jpg',
|
|
78
|
+
* alt: 'Face on the ID card',
|
|
79
|
+
* crop: { left: 0.08, top: 0.2, width: 0.3, height: 0.5 },
|
|
80
|
+
* },
|
|
81
|
+
* ]}
|
|
82
|
+
* labels={labels}
|
|
83
|
+
* />
|
|
84
|
+
*
|
|
43
85
|
* @param {Object} props - The properties of the ImageViewer component.
|
|
44
|
-
* @param {TImageView[]} props.views - Images to display.
|
|
86
|
+
* @param {TImageView[]} props.views - Images to display. In `tabs`, more than one renders a tab per view; in `split`, a pane per view. A view's optional `indicator` sits after its label and becomes part of the tab's accessible name, so give it its own (for an icon, `role="img"` and `aria-label`). In `tabs` with a single view there are no tabs, so no indicator is shown. A view's optional `crop` (`left`, `top`, `width`, `height` as fractions from 0 to 1 of the image) shows only that region; a crop outside the image is clamped to it, and one with no area left falls back to the whole image.
|
|
45
87
|
* @param {TImageViewerLabels} props.labels - Accessible names of the toolbar actions.
|
|
88
|
+
* @param {TImageViewerLayout} [props.layout='tabs'] - `tabs` shows one view at a time; `split` shows every view at once, one pane each.
|
|
46
89
|
* @param {ReactNode} [props.title] - Optional heading rendered on the left of the toolbar.
|
|
47
90
|
* @param {ReactNode} [props.emptyState] - Content rendered when there is no image.
|
|
91
|
+
* @param {string} [props.activeId] - Id of the view to show. Makes the viewer controlled; an id that matches no view falls back to the first one. Ignored in `split`.
|
|
92
|
+
* @param {(id: string) => void} [props.onViewChange] - Called with the id of the tab the user picks, only when it differs from the active one. Never called in `split`.
|
|
48
93
|
* @param {HTMLAttributes<HTMLElement>} [props.restProps] - Additional attributes for the root element.
|
|
49
94
|
*
|
|
50
95
|
* @returns {ReactNode} The rendered ImageViewer component.
|
|
51
96
|
*/
|
|
52
|
-
export function ImageViewer({ views, labels, title, emptyState, ...restProps }) {
|
|
53
|
-
const [
|
|
54
|
-
const [
|
|
55
|
-
const [rotation, setRotation] = useState(0);
|
|
97
|
+
export function ImageViewer({ views, labels, layout = 'tabs', title, emptyState, activeId, onViewChange, ...restProps }) {
|
|
98
|
+
const [internalIndex, setInternalIndex] = useState(0);
|
|
99
|
+
const [transform, setTransform] = useState(INITIAL_TRANSFORM);
|
|
56
100
|
const [isFullscreen, setIsFullscreen] = useState(false);
|
|
57
101
|
const generatedId = useId();
|
|
58
102
|
/**
|
|
@@ -62,9 +106,8 @@ export function ImageViewer({ views, labels, title, emptyState, ...restProps })
|
|
|
62
106
|
*/
|
|
63
107
|
const viewsSignature = views.map(({ id }) => id).join('|');
|
|
64
108
|
useEffect(() => {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
setRotation(0);
|
|
109
|
+
setInternalIndex(0);
|
|
110
|
+
setTransform(INITIAL_TRANSFORM);
|
|
68
111
|
}, [viewsSignature]);
|
|
69
112
|
useEffect(() => {
|
|
70
113
|
if (!isFullscreen)
|
|
@@ -76,12 +119,35 @@ export function ImageViewer({ views, labels, title, emptyState, ...restProps })
|
|
|
76
119
|
document.addEventListener('keydown', handleKeyDown);
|
|
77
120
|
return () => document.removeEventListener('keydown', handleKeyDown);
|
|
78
121
|
}, [isFullscreen]);
|
|
122
|
+
const isControlled = activeId !== undefined;
|
|
123
|
+
const activeIndex = isControlled
|
|
124
|
+
? Math.max(views.findIndex(({ id }) => id === activeId), 0)
|
|
125
|
+
: internalIndex;
|
|
79
126
|
const activeView = views[activeIndex] ?? views[0];
|
|
80
127
|
const hasImage = Boolean(activeView);
|
|
128
|
+
const isSplit = layout === 'split';
|
|
129
|
+
const hasTabs = !isSplit && views.length > 1;
|
|
130
|
+
const { zoom, rotation } = transform;
|
|
131
|
+
const imageStyle = { transform: `rotate(${rotation}deg) scale(${zoom})` };
|
|
132
|
+
/**
|
|
133
|
+
* En modo controlado la vista puede cambiar sin pasar por `selectView`, asi
|
|
134
|
+
* que el reinicio se ata a la vista activa y no al clic. Guardar el zoom por
|
|
135
|
+
* id no alcanza: al volver a una vista reapareceria el zoom que tenia.
|
|
136
|
+
*/
|
|
137
|
+
const [transformViewId, setTransformViewId] = useState(activeView?.id);
|
|
138
|
+
if (activeView?.id !== transformViewId) {
|
|
139
|
+
setTransformViewId(activeView?.id);
|
|
140
|
+
setTransform(INITIAL_TRANSFORM);
|
|
141
|
+
}
|
|
81
142
|
const selectView = (index) => {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
143
|
+
const view = views[index];
|
|
144
|
+
if (!view)
|
|
145
|
+
return;
|
|
146
|
+
setTransform(INITIAL_TRANSFORM);
|
|
147
|
+
if (!isControlled)
|
|
148
|
+
setInternalIndex(index);
|
|
149
|
+
if (view.id !== activeView?.id)
|
|
150
|
+
onViewChange?.(view.id);
|
|
85
151
|
};
|
|
86
152
|
const frame = (<section {...restProps} className={clsx('border-gray-5 dark:border-gray-1 flex min-h-0 flex-col overflow-hidden rounded-lg border', isFullscreen ? 'h-full w-full bg-white dark:bg-black' : undefined, !isFullscreen ? restProps.className : undefined)}>
|
|
87
153
|
<div className="border-gray-5 bg-gray-6 dark:border-gray-1 dark:bg-black-1 flex flex-none items-center justify-between gap-4 border-b px-4 py-3">
|
|
@@ -93,13 +159,22 @@ export function ImageViewer({ views, labels, title, emptyState, ...restProps })
|
|
|
93
159
|
</Show.When>
|
|
94
160
|
</Show>
|
|
95
161
|
<div className="ml-auto flex items-center gap-1.5">
|
|
96
|
-
<button type="button" aria-label={labels.zoomOut} disabled={!hasImage || zoom <= MIN_ZOOM} onClick={() =>
|
|
162
|
+
<button type="button" aria-label={labels.zoomOut} disabled={!hasImage || zoom <= MIN_ZOOM} onClick={() => setTransform((current) => ({
|
|
163
|
+
...current,
|
|
164
|
+
zoom: current.zoom - ZOOM_STEP,
|
|
165
|
+
}))} className={TOOL_CLASSNAME}>
|
|
97
166
|
<MdZoomOut aria-hidden="true"/>
|
|
98
167
|
</button>
|
|
99
|
-
<button type="button" aria-label={labels.zoomIn} disabled={!hasImage || zoom >= MAX_ZOOM} onClick={() =>
|
|
168
|
+
<button type="button" aria-label={labels.zoomIn} disabled={!hasImage || zoom >= MAX_ZOOM} onClick={() => setTransform((current) => ({
|
|
169
|
+
...current,
|
|
170
|
+
zoom: current.zoom + ZOOM_STEP,
|
|
171
|
+
}))} className={TOOL_CLASSNAME}>
|
|
100
172
|
<MdZoomIn aria-hidden="true"/>
|
|
101
173
|
</button>
|
|
102
|
-
<button type="button" aria-label={labels.rotate} disabled={!hasImage} onClick={() =>
|
|
174
|
+
<button type="button" aria-label={labels.rotate} disabled={!hasImage} onClick={() => setTransform((current) => ({
|
|
175
|
+
...current,
|
|
176
|
+
rotation: (current.rotation + QUARTER_TURN) % FULL_TURN,
|
|
177
|
+
}))} className={TOOL_CLASSNAME}>
|
|
103
178
|
<MdRotateRight aria-hidden="true"/>
|
|
104
179
|
</button>
|
|
105
180
|
<button type="button" aria-label={isFullscreen ? labels.exitFullscreen : labels.enterFullscreen} aria-pressed={isFullscreen} disabled={!hasImage} onClick={() => setIsFullscreen((current) => !current)} className={TOOL_CLASSNAME}>
|
|
@@ -109,27 +184,43 @@ export function ImageViewer({ views, labels, title, emptyState, ...restProps })
|
|
|
109
184
|
</div>
|
|
110
185
|
|
|
111
186
|
<Show>
|
|
112
|
-
<Show.When isTrue={
|
|
187
|
+
<Show.When isTrue={hasTabs}>
|
|
113
188
|
<List role="tablist" aria-orientation="horizontal" orientation="horizontal" className="border-gray-5 dark:border-gray-1 flex-none items-end gap-6 border-b px-4">
|
|
114
|
-
<Each of={views} render={({ id, label }, index) => (<li key={id} role="presentation">
|
|
189
|
+
<Each of={views} render={({ id, label, indicator }, index) => (<li key={id} role="presentation">
|
|
115
190
|
<TabItem id={`${generatedId}-tab-${index}`} aria-controls={`${generatedId}-panel`} aria-selected={index === activeIndex} tabIndex={index === activeIndex ? 0 : -1} isActive={index === activeIndex} onClick={() => selectView(index)} className="pb-2">
|
|
116
|
-
|
|
191
|
+
<span className="inline-flex items-center gap-1.5">
|
|
192
|
+
{label}
|
|
193
|
+
{!!indicator && (<span className="flex flex-none items-center">
|
|
194
|
+
{indicator}
|
|
195
|
+
</span>)}
|
|
196
|
+
</span>
|
|
117
197
|
</TabItem>
|
|
118
198
|
</li>)}/>
|
|
119
199
|
</List>
|
|
120
200
|
</Show.When>
|
|
121
201
|
</Show>
|
|
122
202
|
|
|
123
|
-
<div id={`${generatedId}-panel`} role={
|
|
203
|
+
<div id={`${generatedId}-panel`} role={hasTabs ? 'tabpanel' : undefined} aria-labelledby={hasTabs ? `${generatedId}-tab-${activeIndex}` : undefined} className="bg-gray-7 dark:bg-black-2 flex min-h-0 flex-1 items-center justify-center overflow-hidden p-5">
|
|
124
204
|
<Show>
|
|
205
|
+
<Show.When isTrue={hasImage && isSplit}>
|
|
206
|
+
<div className="grid h-full w-full auto-rows-fr grid-cols-1 gap-5 sm:auto-cols-fr sm:grid-flow-col sm:grid-cols-none sm:grid-rows-1">
|
|
207
|
+
<Each of={views} render={({ id, label, indicator, src, alt, crop }) => (<figure key={id} className="flex min-h-0 min-w-0 flex-col gap-2">
|
|
208
|
+
<figcaption className="flex flex-none items-center gap-1.5">
|
|
209
|
+
<Paragraph size="subtitle-2" className="dark:text-white">
|
|
210
|
+
{label}
|
|
211
|
+
</Paragraph>
|
|
212
|
+
{!!indicator && (<span className="flex flex-none items-center">
|
|
213
|
+
{indicator}
|
|
214
|
+
</span>)}
|
|
215
|
+
</figcaption>
|
|
216
|
+
<div className="flex min-h-0 flex-1 items-center justify-center overflow-hidden">
|
|
217
|
+
<ImageViewerImage src={src} alt={alt} crop={crop} style={imageStyle}/>
|
|
218
|
+
</div>
|
|
219
|
+
</figure>)}/>
|
|
220
|
+
</div>
|
|
221
|
+
</Show.When>
|
|
125
222
|
<Show.When isTrue={hasImage}>
|
|
126
|
-
{
|
|
127
|
-
* `next/image` exigiria que cada consumidor declare el dominio de
|
|
128
|
-
* sus imagenes en `remotePatterns`. Estas son cargas de usuario en
|
|
129
|
-
* almacenamiento externo, asi que la lista no se puede conocer.
|
|
130
|
-
*/}
|
|
131
|
-
{/* eslint-disable-next-line @next/next/no-img-element */}
|
|
132
|
-
<img src={activeView?.src} alt={activeView?.alt} style={{ transform: `rotate(${rotation}deg) scale(${zoom})` }} className="max-h-full max-w-full object-contain transition-transform duration-200 ease-out"/>
|
|
223
|
+
{activeView && (<ImageViewerImage key={activeView.id} src={activeView.src} alt={activeView.alt} crop={activeView.crop} style={imageStyle}/>)}
|
|
133
224
|
</Show.When>
|
|
134
225
|
<Show.Else>{emptyState}</Show.Else>
|
|
135
226
|
</Show>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageViewer.jsx","sourceRoot":"","sources":["../../../../src/components/02-molecules/ImageViewer/ImageViewer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,SAAS,EACT,KAAK,EACL,QAAQ,GAGT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,SAAS,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ImageViewer.jsx","sourceRoot":"","sources":["../../../../src/components/02-molecules/ImageViewer/ImageViewer.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EACL,SAAS,EACT,KAAK,EACL,QAAQ,GAGT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,QAAQ,EACR,SAAS,GACV,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAmB,MAAM,oBAAoB,CAAC;AAsCvE,MAAM,QAAQ,GAAG,CAAC,CAAC;AACnB,MAAM,QAAQ,GAAG,CAAC,CAAC;AACnB,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;QAAA,EAAE,IAAI,CACR;MAAA,EAAE,GAAG,CACP;IAAA,EAAE,OAAO,CAAC,CACX,CAAC;IAEF,IAAI,CAAC,YAAY;QAAE,OAAO,KAAK,CAAC;IAEhC,OAAO,YAAY,CACjB,CAAC,GAAG,CAAC,SAAS,CAAC,qEAAqE,CAClF;MAAA,CAAC,GAAG,CAAC,SAAS,CAAC,yBAAyB,CAAC,CAAC,KAAK,CAAC,EAAE,GAAG,CACvD;IAAA,EAAE,GAAG,CAAC,EACN,QAAQ,CAAC,IAAI,CACd,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { type CSSProperties, type ReactNode } from 'react';
|
|
2
|
+
export type TImageCrop = {
|
|
3
|
+
left: number;
|
|
4
|
+
top: number;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
};
|
|
8
|
+
type ImageViewerImageProps = {
|
|
9
|
+
src: string;
|
|
10
|
+
alt: string;
|
|
11
|
+
crop?: TImageCrop;
|
|
12
|
+
style: CSSProperties;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Image of one `ImageViewer` view, fitted inside its frame. With `crop`, only
|
|
16
|
+
* that region of the image is drawn, scaled to fit the frame the same way the
|
|
17
|
+
* whole image would be.
|
|
18
|
+
*
|
|
19
|
+
* Internal to `ImageViewer`: it is not exported from the library.
|
|
20
|
+
*
|
|
21
|
+
* @component
|
|
22
|
+
* @example
|
|
23
|
+
* <ImageViewerImage
|
|
24
|
+
* src="/document.jpg"
|
|
25
|
+
* alt="Document front"
|
|
26
|
+
* crop={{ left: 0.1, top: 0.2, width: 0.3, height: 0.4 }}
|
|
27
|
+
* style={{ transform: 'rotate(0deg) scale(1)' }}
|
|
28
|
+
* />
|
|
29
|
+
*
|
|
30
|
+
* @param {Object} props - The properties of the ImageViewerImage component.
|
|
31
|
+
* @param {string} props.src - Image URL.
|
|
32
|
+
* @param {string} props.alt - Accessible description of the image.
|
|
33
|
+
* @param {TImageCrop} [props.crop] - Region to show, as fractions (0 to 1) of the image width and height.
|
|
34
|
+
* @param {CSSProperties} props.style - Zoom and rotation computed by the viewer.
|
|
35
|
+
*
|
|
36
|
+
* @returns {ReactNode} The rendered image.
|
|
37
|
+
*/
|
|
38
|
+
export declare function ImageViewerImage({ src, alt, crop, style, }: ImageViewerImageProps): ReactNode;
|
|
39
|
+
export {};
|
|
40
|
+
//# sourceMappingURL=ImageViewerImage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageViewerImage.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/ImageViewer/ImageViewerImage.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,SAAS,EAIf,MAAM,OAAO,CAAC;AAEf,MAAM,MAAM,UAAU,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAOF,KAAK,qBAAqB,GAAG;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,KAAK,EAAE,aAAa,CAAC;CACtB,CAAC;AA0DF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,GAAG,EACH,GAAG,EACH,IAAI,EACJ,KAAK,GACN,EAAE,qBAAqB,GAAG,SAAS,CA4DnC"}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useEffect, useId, useState, } from 'react';
|
|
4
|
+
const TRANSFORM_CLASSNAME = 'transition-transform duration-200 ease-out';
|
|
5
|
+
const clampFraction = (value) => Math.min(Math.max(value, 0), 1);
|
|
6
|
+
/**
|
|
7
|
+
* Keeps the region inside the image, and drops it when nothing is left to
|
|
8
|
+
* show, so a malformed crop falls back to the whole image.
|
|
9
|
+
*/
|
|
10
|
+
const normalizeCrop = (crop) => {
|
|
11
|
+
if (!crop)
|
|
12
|
+
return null;
|
|
13
|
+
const left = clampFraction(crop.left);
|
|
14
|
+
const top = clampFraction(crop.top);
|
|
15
|
+
const width = clampFraction(crop.left + crop.width) - left;
|
|
16
|
+
const height = clampFraction(crop.top + crop.height) - top;
|
|
17
|
+
return width > 0 && height > 0 ? { left, top, width, height } : null;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* The crop is expressed in fractions, but an SVG `viewBox` needs pixels to keep
|
|
21
|
+
* the region undistorted, so the image is decoded once to read its size.
|
|
22
|
+
*/
|
|
23
|
+
const useNaturalSize = (src, isEnabled) => {
|
|
24
|
+
const [size, setSize] = useState(null);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!isEnabled)
|
|
27
|
+
return;
|
|
28
|
+
let isCurrent = true;
|
|
29
|
+
const image = new window.Image();
|
|
30
|
+
setSize(null);
|
|
31
|
+
image.onload = () => {
|
|
32
|
+
if (isCurrent) {
|
|
33
|
+
setSize({ width: image.naturalWidth, height: image.naturalHeight });
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
image.onerror = () => {
|
|
37
|
+
if (isCurrent)
|
|
38
|
+
setSize('error');
|
|
39
|
+
};
|
|
40
|
+
image.src = src;
|
|
41
|
+
return () => {
|
|
42
|
+
isCurrent = false;
|
|
43
|
+
image.onload = null;
|
|
44
|
+
image.onerror = null;
|
|
45
|
+
};
|
|
46
|
+
}, [src, isEnabled]);
|
|
47
|
+
return size;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Image of one `ImageViewer` view, fitted inside its frame. With `crop`, only
|
|
51
|
+
* that region of the image is drawn, scaled to fit the frame the same way the
|
|
52
|
+
* whole image would be.
|
|
53
|
+
*
|
|
54
|
+
* Internal to `ImageViewer`: it is not exported from the library.
|
|
55
|
+
*
|
|
56
|
+
* @component
|
|
57
|
+
* @example
|
|
58
|
+
* <ImageViewerImage
|
|
59
|
+
* src="/document.jpg"
|
|
60
|
+
* alt="Document front"
|
|
61
|
+
* crop={{ left: 0.1, top: 0.2, width: 0.3, height: 0.4 }}
|
|
62
|
+
* style={{ transform: 'rotate(0deg) scale(1)' }}
|
|
63
|
+
* />
|
|
64
|
+
*
|
|
65
|
+
* @param {Object} props - The properties of the ImageViewerImage component.
|
|
66
|
+
* @param {string} props.src - Image URL.
|
|
67
|
+
* @param {string} props.alt - Accessible description of the image.
|
|
68
|
+
* @param {TImageCrop} [props.crop] - Region to show, as fractions (0 to 1) of the image width and height.
|
|
69
|
+
* @param {CSSProperties} props.style - Zoom and rotation computed by the viewer.
|
|
70
|
+
*
|
|
71
|
+
* @returns {ReactNode} The rendered image.
|
|
72
|
+
*/
|
|
73
|
+
export function ImageViewerImage({ src, alt, crop, style, }) {
|
|
74
|
+
const region = normalizeCrop(crop);
|
|
75
|
+
const size = useNaturalSize(src, region !== null);
|
|
76
|
+
const clipId = `crop${useId().replace(/[^\w-]/g, '')}`;
|
|
77
|
+
if (!region || size === 'error') {
|
|
78
|
+
return (
|
|
79
|
+
/**
|
|
80
|
+
* `next/image` exigiria que cada consumidor declare el dominio de sus
|
|
81
|
+
* imagenes en `remotePatterns`. Estas son cargas de usuario en
|
|
82
|
+
* almacenamiento externo, asi que la lista no se puede conocer.
|
|
83
|
+
*/
|
|
84
|
+
// eslint-disable-next-line @next/next/no-img-element
|
|
85
|
+
<img src={src} alt={alt} style={style} className={clsx('max-h-full max-w-full object-contain', TRANSFORM_CLASSNAME)}/>);
|
|
86
|
+
}
|
|
87
|
+
if (!size)
|
|
88
|
+
return null;
|
|
89
|
+
const box = {
|
|
90
|
+
x: region.left * size.width,
|
|
91
|
+
y: region.top * size.height,
|
|
92
|
+
width: region.width * size.width,
|
|
93
|
+
height: region.height * size.height,
|
|
94
|
+
};
|
|
95
|
+
/**
|
|
96
|
+
* `meet` centers the region but the SVG still paints whatever falls in the
|
|
97
|
+
* letterbox, which is the rest of the image: the clip keeps only the region.
|
|
98
|
+
*/
|
|
99
|
+
return (<svg role="img" aria-label={alt} viewBox={[box.x, box.y, box.width, box.height].join(' ')} preserveAspectRatio="xMidYMid meet" style={style} className={clsx('h-full w-full', TRANSFORM_CLASSNAME)}>
|
|
100
|
+
<defs>
|
|
101
|
+
<clipPath id={clipId}>
|
|
102
|
+
<rect {...box}/>
|
|
103
|
+
</clipPath>
|
|
104
|
+
</defs>
|
|
105
|
+
<image href={src} width={size.width} height={size.height} clipPath={`url(#${clipId})`}/>
|
|
106
|
+
</svg>);
|
|
107
|
+
}
|
|
108
|
+
//# sourceMappingURL=ImageViewerImage.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageViewerImage.jsx","sourceRoot":"","sources":["../../../../src/components/02-molecules/ImageViewer/ImageViewerImage.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAGL,SAAS,EACT,KAAK,EACL,QAAQ,GACT,MAAM,OAAO,CAAC;AAqBf,MAAM,mBAAmB,GAAG,4CAA4C,CAAC;AAEzE,MAAM,aAAa,GAAG,CAAC,KAAa,EAAU,EAAE,CAC9C,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAElC;;;GAGG;AACH,MAAM,aAAa,GAAG,CAAC,IAA4B,EAAqB,EAAE;IACxE,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAEvB,MAAM,IAAI,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,MAAM,GAAG,GAAG,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;IACpC,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,KAAK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C,KAAK,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CACzD,mBAAmB,CAAC,eAAe,CACnC,KAAK,CAAC,CAAC,KAAK,CAAC,CACb,SAAS,CAAC,CAAC,IAAI,CAAC,eAAe,EAAE,mBAAmB,CAAC,CAAC,CAEtD;MAAA,CAAC,IAAI,CACH;QAAA,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,MAAM,CAAC,CACnB;UAAA,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC,EAChB;QAAA,EAAE,QAAQ,CACZ;MAAA,EAAE,IAAI,CACN;MAAA,CAAC,KAAK,CACJ,IAAI,CAAC,CAAC,GAAG,CAAC,CACV,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAClB,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CACpB,QAAQ,CAAC,CAAC,QAAQ,MAAM,GAAG,CAAC,EAEhC;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { type ReactNode, type RefObject } from 'react';
|
|
1
|
+
import { type ComponentProps, type ReactNode, type RefObject } from 'react';
|
|
2
|
+
import { Button } from '../../01-atoms';
|
|
2
3
|
type ModalProps = {
|
|
3
4
|
header: string | ReactNode;
|
|
4
5
|
subHeader?: string | ReactNode;
|
|
@@ -16,6 +17,7 @@ export type TButton = {
|
|
|
16
17
|
text: string;
|
|
17
18
|
callback: (close: (closeAction: () => void) => void) => void;
|
|
18
19
|
disabled?: boolean;
|
|
20
|
+
tone?: ComponentProps<typeof Button>['tone'];
|
|
19
21
|
};
|
|
20
22
|
type ModalRef = {
|
|
21
23
|
handlerClose: (callback: TButton['callback']) => void;
|
|
@@ -43,10 +45,12 @@ type ModalRef = {
|
|
|
43
45
|
* @param {Object} [props.confirmButton] - Configuration for the confirm button.
|
|
44
46
|
* @param {Function} props.confirmButton.callback - Callback function triggered on confirm.
|
|
45
47
|
* @param {boolean} [props.confirmButton.disabled] - Whether the confirm button is disabled.
|
|
48
|
+
* @param {'default' | 'critical'} [props.confirmButton.tone='default'] - `critical` for a confirmation that cannot be undone (reject, delete).
|
|
46
49
|
* @param {Object} [props.cancelButton] - Configuration for the cancel button.
|
|
47
50
|
* @param {string} props.cancelButton.text - Text displayed on the cancel button.
|
|
48
51
|
* @param {Function} props.cancelButton.callback - Callback function triggered on cancel.
|
|
49
52
|
* @param {boolean} [props.cancelButton.disabled] - Whether the cancel button is disabled.
|
|
53
|
+
* @param {'default' | 'critical'} [props.cancelButton.tone='default'] - Tone of the cancel button, same values as the confirm one.
|
|
50
54
|
* @param {'base' | 'lg' | 'xl'} [props.size='base'] - The size of the modal.
|
|
51
55
|
* @param {string} props.classHeader - Class header.
|
|
52
56
|
* @param {Function} [props.handleCloseIcon] - Handle close icon close
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/Modal/Modal.tsx"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../src/components/02-molecules/Modal/Modal.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,cAAc,EAGnB,KAAK,SAAS,EACd,KAAK,SAAS,EAOf,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,MAAM,EAAa,MAAM,gBAAgB,CAAC;AAGnD,KAAK,UAAU,GAAG;IAChB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,QAAQ,EAAE,SAAS,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC5B,eAAe,EAAE,OAAO,CAAC,UAAU,CAAC,CAAC;IACrC,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;IAChD,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,WAAW,EAAE,MAAM,IAAI,KAAK,IAAI,KAAK,IAAI,CAAC;IAC7D,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;CAC9C,CAAC;AAEF,KAAK,QAAQ,GAAG;IACd,YAAY,EAAE,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;CACvD,CAAC;AAKF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,eAAO,MAAM,KAAK,iGAqJhB,CAAC"}
|
|
@@ -29,10 +29,12 @@ const leavingClasses = 'ease-in duration-200 opacity-75';
|
|
|
29
29
|
* @param {Object} [props.confirmButton] - Configuration for the confirm button.
|
|
30
30
|
* @param {Function} props.confirmButton.callback - Callback function triggered on confirm.
|
|
31
31
|
* @param {boolean} [props.confirmButton.disabled] - Whether the confirm button is disabled.
|
|
32
|
+
* @param {'default' | 'critical'} [props.confirmButton.tone='default'] - `critical` for a confirmation that cannot be undone (reject, delete).
|
|
32
33
|
* @param {Object} [props.cancelButton] - Configuration for the cancel button.
|
|
33
34
|
* @param {string} props.cancelButton.text - Text displayed on the cancel button.
|
|
34
35
|
* @param {Function} props.cancelButton.callback - Callback function triggered on cancel.
|
|
35
36
|
* @param {boolean} [props.cancelButton.disabled] - Whether the cancel button is disabled.
|
|
37
|
+
* @param {'default' | 'critical'} [props.cancelButton.tone='default'] - Tone of the cancel button, same values as the confirm one.
|
|
36
38
|
* @param {'base' | 'lg' | 'xl'} [props.size='base'] - The size of the modal.
|
|
37
39
|
* @param {string} props.classHeader - Class header.
|
|
38
40
|
* @param {Function} [props.handleCloseIcon] - Handle close icon close
|
|
@@ -83,8 +85,8 @@ export const Modal = forwardRef(function ({ header, subHeader, children, confirm
|
|
|
83
85
|
}, !isOpen
|
|
84
86
|
? `${enteringClasses} pointer-events-none translate-y-4 sm:translate-y-0 sm:scale-95`
|
|
85
87
|
: `translate-y-0 sm:scale-100`)}>
|
|
86
|
-
<div className="bg-gray-6 dark:bg-black-1 flex justify-between rounded-t-lg px-6 py-4">
|
|
87
|
-
<div>
|
|
88
|
+
<div className="bg-gray-6 dark:bg-black-1 flex items-start justify-between gap-4 rounded-t-lg px-6 py-4">
|
|
89
|
+
<div className="min-w-0">
|
|
88
90
|
<Paragraph id={titleId} size="subtitle-1">
|
|
89
91
|
{header}
|
|
90
92
|
</Paragraph>
|
|
@@ -92,7 +94,7 @@ export const Modal = forwardRef(function ({ header, subHeader, children, confirm
|
|
|
92
94
|
{subHeader}
|
|
93
95
|
</Paragraph>)}
|
|
94
96
|
</div>
|
|
95
|
-
<button type="button" aria-label={closeButtonAriaLabel} className="hover:text-gray-1 focus-visible:ring-lavender dark:hover:text-gray-3 rounded-sm p-1 transition-colors focus-visible:ring-2 focus-visible:outline-none" onClick={() => handlerClose(handleCloseIcon)}>
|
|
97
|
+
<button type="button" aria-label={closeButtonAriaLabel} className="hover:text-gray-1 focus-visible:ring-lavender dark:hover:text-gray-3 -my-1 shrink-0 rounded-sm p-1 transition-colors focus-visible:ring-2 focus-visible:outline-none" onClick={() => handlerClose(handleCloseIcon)}>
|
|
96
98
|
<IoCloseSharp aria-hidden size={20}/>
|
|
97
99
|
</button>
|
|
98
100
|
</div>
|
|
@@ -100,10 +102,10 @@ export const Modal = forwardRef(function ({ header, subHeader, children, confirm
|
|
|
100
102
|
{children}
|
|
101
103
|
</div>
|
|
102
104
|
{!!(cancelButton || confirmButton) && (<div className="flex flex-col-reverse justify-end gap-2 px-6 py-4 sm:flex-row">
|
|
103
|
-
{!!cancelButton && (<Button modifier="text" onClick={() => handlerClose(cancelButton.callback)} disabled={cancelButton.disabled}>
|
|
105
|
+
{!!cancelButton && (<Button modifier="text" tone={cancelButton.tone} onClick={() => handlerClose(cancelButton.callback)} disabled={cancelButton.disabled}>
|
|
104
106
|
{cancelButton.text}
|
|
105
107
|
</Button>)}
|
|
106
|
-
{!!confirmButton && (<Button onClick={() => handlerClose(confirmButton.callback)} disabled={confirmButton.disabled}>
|
|
108
|
+
{!!confirmButton && (<Button tone={confirmButton.tone} onClick={() => handlerClose(confirmButton.callback)} disabled={confirmButton.disabled}>
|
|
107
109
|
{confirmButton.text}
|
|
108
110
|
</Button>)}
|
|
109
111
|
</div>)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.jsx","sourceRoot":"","sources":["../../../../src/components/02-molecules/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,
|
|
1
|
+
{"version":3,"file":"Modal.jsx","sourceRoot":"","sources":["../../../../src/components/02-molecules/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAEL,UAAU,EAIV,WAAW,EACX,SAAS,EACT,KAAK,EACL,mBAAmB,EACnB,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AA2BlD,MAAM,eAAe,GAAG,iCAAiC,CAAC;AAC1D,MAAM,cAAc,GAAG,iCAAiC,CAAC;AAEzD;;;;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AA,EAAE,MAAM,CAAC,CACV,CACD;kBAAA,CAAC,CAAC,CAAC,aAAa,IAAI,CAClB,CAAC,MAAM,CACL,IAAI,CAAC,CAAC,aAAa,CAAC,IAAI,CAAC,CACzB,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,YAAY,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC,CACpD,QAAQ,CAAC,CAAC,aAAa,CAAC,QAAQ,CAAC,CAEjC;sBAAA,CAAC,aAAa,CAAC,IAAI,CACrB;oBAAA,EAAE,MAAM,CAAC,CACV,CACH;gBAAA,EAAE,GAAG,CAAC,CACP,CACH;YAAA,EAAE,GAAG,CACP;UAAA,EAAE,GAAG,CACP;QAAA,EAAE,GAAG,CACP;MAAA,EAAE,GAAG,CACP;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC,CAAC,CAAC;AACH,KAAK,CAAC,WAAW,GAAG,OAAO,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/02-molecules/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/02-molecules/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/02-molecules/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/02-molecules/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,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,EAKf,MAAM,OAAO,CAAC;AAIf,MAAM,MAAM,gBAAgB,
|
|
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,EAKf,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,CAAC;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,OAAO,CAAC,EAAE,gBAAgB,CAAC;CACrC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ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