danielgm-ui 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/image-cropper.d.ts +24 -0
- package/dist/image-cropper.js +180 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/internal/image-crop.d.ts +25 -0
- package/dist/internal/image-crop.js +22 -0
- package/dist/styles.css +94 -0
- package/package.json +1 -1
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** Recorte local: el navegador decodifica la imagen y exporta el área visible a un Blob. */
|
|
2
|
+
import { type HTMLAttributes, type ReactElement } from 'react';
|
|
3
|
+
/** Opciones del recortador. Las URLs externas requieren CORS para poder exportarse. */
|
|
4
|
+
export interface ImageCropperProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onError'> {
|
|
5
|
+
/** Archivo local, Blob o URL de la imagen; null muestra el estado vacío. */
|
|
6
|
+
src: string | Blob | null;
|
|
7
|
+
/** Recibe el archivo recortado, sin realizar ninguna subida. */
|
|
8
|
+
onCrop: (blob: Blob) => void | Promise<void>;
|
|
9
|
+
/** Relación anchura/altura del recorte. @defaultValue 1 */
|
|
10
|
+
aspectRatio?: number;
|
|
11
|
+
/** Anchura de salida en píxeles. @defaultValue 512 */
|
|
12
|
+
outputWidth?: number;
|
|
13
|
+
/** Formato de salida del canvas. @defaultValue 'image/png' */
|
|
14
|
+
outputType?: 'image/png' | 'image/jpeg' | 'image/webp';
|
|
15
|
+
/** Calidad JPEG/WebP entre 0 y 1. @defaultValue 0.92 */
|
|
16
|
+
quality?: number;
|
|
17
|
+
/** Límite superior del zoom respecto al encuadre inicial. @defaultValue 4 */
|
|
18
|
+
maxZoom?: number;
|
|
19
|
+
/** Idioma de los controles integrados. @defaultValue 'en' */
|
|
20
|
+
locale?: 'es' | 'en';
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Visor con arrastre, zoom, desplazamiento por teclado y exportación al confirmar. */
|
|
24
|
+
export declare function ImageCropper({ src, onCrop, aspectRatio, outputWidth, outputType, quality, maxZoom, locale, disabled, className, style, ...props }: ImageCropperProps): ReactElement;
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/** Recorte local: el navegador decodifica la imagen y exporta el área visible a un Blob. */
|
|
4
|
+
import { useEffect, useId, useRef, useState, } from 'react';
|
|
5
|
+
import { Button } from './button.js';
|
|
6
|
+
import { Slider } from './slider.js';
|
|
7
|
+
import { clampCropOffset, getCropGeometry } from './internal/image-crop.js';
|
|
8
|
+
import { cx } from './utils.js';
|
|
9
|
+
/** Visor con arrastre, zoom, desplazamiento por teclado y exportación al confirmar. */
|
|
10
|
+
export function ImageCropper({ src, onCrop, aspectRatio = 1, outputWidth = 512, outputType = 'image/png', quality = 0.92, maxZoom = 4, locale = 'en', disabled = false, className, style, ...props }) {
|
|
11
|
+
const [imageUrl, setImageUrl] = useState();
|
|
12
|
+
const [imageSize, setImageSize] = useState();
|
|
13
|
+
const [viewport, setViewport] = useState({ width: 0, height: 0 });
|
|
14
|
+
const [zoom, setZoom] = useState(1);
|
|
15
|
+
const [offset, setOffset] = useState({ x: 0, y: 0 });
|
|
16
|
+
const [dragging, setDragging] = useState(false);
|
|
17
|
+
const [saving, setSaving] = useState(false);
|
|
18
|
+
const [message, setMessage] = useState();
|
|
19
|
+
const stage = useRef(null);
|
|
20
|
+
const image = useRef(null);
|
|
21
|
+
const drag = useRef(undefined);
|
|
22
|
+
const id = useId();
|
|
23
|
+
const es = locale === 'es';
|
|
24
|
+
const ratio = Number.isFinite(aspectRatio) && aspectRatio > 0 ? aspectRatio : 1;
|
|
25
|
+
const zoomLimit = Number.isFinite(maxZoom) ? Math.max(1, maxZoom) : 4;
|
|
26
|
+
const width = Number.isFinite(outputWidth) ? Math.max(1, Math.round(outputWidth)) : 512;
|
|
27
|
+
const geometry = imageSize && viewport.width > 0 && viewport.height > 0
|
|
28
|
+
? getCropGeometry(imageSize.width, imageSize.height, viewport.width, viewport.height, zoom, offset)
|
|
29
|
+
: undefined;
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (!geometry)
|
|
32
|
+
return;
|
|
33
|
+
setOffset((current) => {
|
|
34
|
+
const next = clampCropOffset(current, geometry);
|
|
35
|
+
return next.x === current.x && next.y === current.y ? current : next;
|
|
36
|
+
});
|
|
37
|
+
// La posición se ajusta solo cuando cambian las medidas o el zoom.
|
|
38
|
+
}, [imageSize?.width, imageSize?.height, viewport.width, viewport.height, zoom]);
|
|
39
|
+
useEffect(() => {
|
|
40
|
+
drag.current = undefined;
|
|
41
|
+
setDragging(false);
|
|
42
|
+
setImageSize(undefined);
|
|
43
|
+
setOffset({ x: 0, y: 0 });
|
|
44
|
+
setZoom(1);
|
|
45
|
+
setMessage(undefined);
|
|
46
|
+
if (!src) {
|
|
47
|
+
setImageUrl(undefined);
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const url = typeof src === 'string' ? src : URL.createObjectURL(src);
|
|
51
|
+
setImageUrl(url);
|
|
52
|
+
return () => {
|
|
53
|
+
if (typeof src !== 'string')
|
|
54
|
+
URL.revokeObjectURL(url);
|
|
55
|
+
};
|
|
56
|
+
}, [src]);
|
|
57
|
+
useEffect(() => {
|
|
58
|
+
if (!disabled)
|
|
59
|
+
return;
|
|
60
|
+
drag.current = undefined;
|
|
61
|
+
setDragging(false);
|
|
62
|
+
}, [disabled]);
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (!stage.current)
|
|
65
|
+
return;
|
|
66
|
+
const observer = new ResizeObserver(([entry]) => {
|
|
67
|
+
setViewport({ width: entry.contentRect.width, height: entry.contentRect.height });
|
|
68
|
+
});
|
|
69
|
+
observer.observe(stage.current);
|
|
70
|
+
return () => observer.disconnect();
|
|
71
|
+
}, []);
|
|
72
|
+
function move(next) {
|
|
73
|
+
if (!geometry)
|
|
74
|
+
return;
|
|
75
|
+
setOffset(clampCropOffset(next, geometry));
|
|
76
|
+
}
|
|
77
|
+
async function crop() {
|
|
78
|
+
if (!geometry || !image.current || saving || disabled)
|
|
79
|
+
return;
|
|
80
|
+
setSaving(true);
|
|
81
|
+
setMessage(undefined);
|
|
82
|
+
try {
|
|
83
|
+
const canvas = document.createElement('canvas');
|
|
84
|
+
canvas.width = width;
|
|
85
|
+
canvas.height = Math.max(1, Math.round(width / ratio));
|
|
86
|
+
const context = canvas.getContext('2d');
|
|
87
|
+
if (!context)
|
|
88
|
+
throw new Error('Canvas unavailable');
|
|
89
|
+
context.drawImage(image.current, geometry.x, geometry.y, geometry.width, geometry.height, 0, 0, canvas.width, canvas.height);
|
|
90
|
+
const blob = await new Promise((resolve, reject) => {
|
|
91
|
+
canvas.toBlob((result) => (result ? resolve(result) : reject(new Error('Image export failed'))), outputType, Math.max(0, Math.min(1, quality)));
|
|
92
|
+
});
|
|
93
|
+
await onCrop(blob);
|
|
94
|
+
}
|
|
95
|
+
catch {
|
|
96
|
+
setMessage(es
|
|
97
|
+
? 'No se pudo recortar la imagen. Comprueba que la URL permita CORS.'
|
|
98
|
+
: 'Could not crop the image. Check that the URL allows CORS.');
|
|
99
|
+
}
|
|
100
|
+
finally {
|
|
101
|
+
setSaving(false);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
const labels = es
|
|
105
|
+
? {
|
|
106
|
+
region: 'Área de recorte',
|
|
107
|
+
hint: 'Arrastra la imagen o usa las flechas para encuadrarla.',
|
|
108
|
+
zoom: 'Zoom',
|
|
109
|
+
crop: 'Recortar imagen',
|
|
110
|
+
empty: 'Selecciona una imagen para recortar.',
|
|
111
|
+
invalid: 'No se pudo abrir la imagen.',
|
|
112
|
+
}
|
|
113
|
+
: {
|
|
114
|
+
region: 'Crop area',
|
|
115
|
+
hint: 'Drag the image or use the arrow keys to position it.',
|
|
116
|
+
zoom: 'Zoom',
|
|
117
|
+
crop: 'Crop image',
|
|
118
|
+
empty: 'Choose an image to crop.',
|
|
119
|
+
invalid: 'Could not open the image.',
|
|
120
|
+
};
|
|
121
|
+
return (_jsxs("div", { ...props, className: cx('dgm-image-cropper', className), style: style, "data-disabled": disabled || undefined, children: [_jsxs("div", { ref: stage, className: "dgm-image-cropper-stage", style: { '--dgm-crop-ratio': ratio }, role: "group", "aria-label": labels.region, "aria-describedby": `${id}-hint`, tabIndex: imageSize && !disabled ? 0 : -1, "data-dragging": dragging || undefined, onPointerDown: (event) => {
|
|
122
|
+
if (!geometry || disabled || event.button !== 0)
|
|
123
|
+
return;
|
|
124
|
+
event.currentTarget.focus();
|
|
125
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
126
|
+
drag.current = {
|
|
127
|
+
pointerId: event.pointerId,
|
|
128
|
+
x: event.clientX,
|
|
129
|
+
y: event.clientY,
|
|
130
|
+
offsetX: offset.x,
|
|
131
|
+
offsetY: offset.y,
|
|
132
|
+
};
|
|
133
|
+
setDragging(true);
|
|
134
|
+
}, onPointerMove: (event) => {
|
|
135
|
+
if (disabled || !drag.current || drag.current.pointerId !== event.pointerId)
|
|
136
|
+
return;
|
|
137
|
+
move({
|
|
138
|
+
x: drag.current.offsetX + event.clientX - drag.current.x,
|
|
139
|
+
y: drag.current.offsetY + event.clientY - drag.current.y,
|
|
140
|
+
});
|
|
141
|
+
}, onPointerUp: (event) => {
|
|
142
|
+
if (drag.current?.pointerId !== event.pointerId)
|
|
143
|
+
return;
|
|
144
|
+
drag.current = undefined;
|
|
145
|
+
setDragging(false);
|
|
146
|
+
event.currentTarget.releasePointerCapture(event.pointerId);
|
|
147
|
+
}, onPointerCancel: () => {
|
|
148
|
+
drag.current = undefined;
|
|
149
|
+
setDragging(false);
|
|
150
|
+
}, onKeyDown: (event) => {
|
|
151
|
+
if (!geometry || disabled)
|
|
152
|
+
return;
|
|
153
|
+
const step = event.shiftKey ? 1 : 10;
|
|
154
|
+
const delta = {
|
|
155
|
+
ArrowLeft: { x: -step, y: 0 },
|
|
156
|
+
ArrowRight: { x: step, y: 0 },
|
|
157
|
+
ArrowUp: { x: 0, y: -step },
|
|
158
|
+
ArrowDown: { x: 0, y: step },
|
|
159
|
+
}[event.key];
|
|
160
|
+
if (!delta)
|
|
161
|
+
return;
|
|
162
|
+
event.preventDefault();
|
|
163
|
+
move({ x: offset.x + delta.x, y: offset.y + delta.y });
|
|
164
|
+
}, children: [imageUrl ? (_jsx("img", { ref: image, alt: "", crossOrigin: typeof src === 'string' && !src.startsWith('data:') && !src.startsWith('blob:')
|
|
165
|
+
? 'anonymous'
|
|
166
|
+
: undefined, src: imageUrl, draggable: false, onLoad: (event) => {
|
|
167
|
+
const current = event.currentTarget;
|
|
168
|
+
setImageSize({ width: current.naturalWidth, height: current.naturalHeight });
|
|
169
|
+
setMessage(undefined);
|
|
170
|
+
}, onError: () => {
|
|
171
|
+
setImageSize(undefined);
|
|
172
|
+
setMessage(labels.invalid);
|
|
173
|
+
}, style: geometry
|
|
174
|
+
? {
|
|
175
|
+
width: imageSize?.width,
|
|
176
|
+
height: imageSize?.height,
|
|
177
|
+
transform: `translate(-50%, -50%) translate(${Math.max(-geometry.maxOffsetX, Math.min(geometry.maxOffsetX, offset.x))}px, ${Math.max(-geometry.maxOffsetY, Math.min(geometry.maxOffsetY, offset.y))}px) scale(${geometry.scale})`,
|
|
178
|
+
}
|
|
179
|
+
: { visibility: 'hidden' } })) : (_jsx("span", { className: "dgm-image-cropper-empty", children: labels.empty })), imageSize && _jsx("span", { className: "dgm-image-cropper-guides", "aria-hidden": "true" })] }), _jsx("p", { id: `${id}-hint`, className: "dgm-description", children: labels.hint }), _jsxs("div", { className: "dgm-image-cropper-controls", children: [_jsx(Slider, { label: labels.zoom, min: 1, max: Math.max(1.01, zoomLimit), step: 0.01, value: zoom, onValueChange: setZoom, formatValue: (value) => `${Math.round(value * 100)}%`, disabled: disabled || !imageSize || zoomLimit === 1 }), _jsx(Button, { onClick: crop, disabled: disabled || !geometry, loading: saving, children: labels.crop })] }), message && (_jsx("p", { className: "dgm-error", role: "alert", children: message }))] }));
|
|
180
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -30,6 +30,7 @@ export { CheckboxGroup, SwitchGroup, type CheckboxGroupProps, type SwitchGroupPr
|
|
|
30
30
|
export { DatePicker, DateRangePicker, type DatePickerProps, type DateRangePickerProps, type DateRangeValue, type DatePickerBaseProps, } from './date-picker.js';
|
|
31
31
|
export { DataTable, type DataTableProps, type DataColumn, type DataTableSort, } from './data-table.js';
|
|
32
32
|
export { FileUpload, type FileUploadProps, type FileRejection } from './file-upload.js';
|
|
33
|
+
export { ImageCropper, type ImageCropperProps } from './image-cropper.js';
|
|
33
34
|
export { CommandPalette, type CommandPaletteProps, type CommandAction } from './command-palette.js';
|
|
34
35
|
export { Stepper, type StepperProps, type StepItem } from './stepper.js';
|
|
35
36
|
export { DropdownMenu, type DropdownMenuProps, type DropdownMenuItem } from './dropdown-menu.js';
|
package/dist/index.js
CHANGED
|
@@ -30,6 +30,7 @@ export { CheckboxGroup, SwitchGroup, } from './choice-group.js';
|
|
|
30
30
|
export { DatePicker, DateRangePicker, } from './date-picker.js';
|
|
31
31
|
export { DataTable, } from './data-table.js';
|
|
32
32
|
export { FileUpload } from './file-upload.js';
|
|
33
|
+
export { ImageCropper } from './image-cropper.js';
|
|
33
34
|
export { CommandPalette } from './command-palette.js';
|
|
34
35
|
export { Stepper } from './stepper.js';
|
|
35
36
|
export { DropdownMenu } from './dropdown-menu.js';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** Geometría compartida entre el visor y la exportación al canvas. */
|
|
2
|
+
export interface CropGeometry {
|
|
3
|
+
scale: number;
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
maxOffsetX: number;
|
|
9
|
+
maxOffsetY: number;
|
|
10
|
+
}
|
|
11
|
+
export declare function clampCropOffset(offset: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
}, bounds: {
|
|
15
|
+
maxOffsetX: number;
|
|
16
|
+
maxOffsetY: number;
|
|
17
|
+
}): {
|
|
18
|
+
x: number;
|
|
19
|
+
y: number;
|
|
20
|
+
};
|
|
21
|
+
/** El mismo rectángulo gobierna la posición visible y los píxeles exportados. */
|
|
22
|
+
export declare function getCropGeometry(imageWidth: number, imageHeight: number, viewportWidth: number, viewportHeight: number, zoom: number, offset: {
|
|
23
|
+
x: number;
|
|
24
|
+
y: number;
|
|
25
|
+
}): CropGeometry;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export function clampCropOffset(offset, bounds) {
|
|
2
|
+
return {
|
|
3
|
+
x: Math.max(-bounds.maxOffsetX, Math.min(bounds.maxOffsetX, offset.x)),
|
|
4
|
+
y: Math.max(-bounds.maxOffsetY, Math.min(bounds.maxOffsetY, offset.y)),
|
|
5
|
+
};
|
|
6
|
+
}
|
|
7
|
+
/** El mismo rectángulo gobierna la posición visible y los píxeles exportados. */
|
|
8
|
+
export function getCropGeometry(imageWidth, imageHeight, viewportWidth, viewportHeight, zoom, offset) {
|
|
9
|
+
const scale = Math.max(viewportWidth / imageWidth, viewportHeight / imageHeight) * zoom;
|
|
10
|
+
const maxOffsetX = Math.max(0, (imageWidth * scale - viewportWidth) / 2);
|
|
11
|
+
const maxOffsetY = Math.max(0, (imageHeight * scale - viewportHeight) / 2);
|
|
12
|
+
const limited = clampCropOffset(offset, { maxOffsetX, maxOffsetY });
|
|
13
|
+
return {
|
|
14
|
+
scale,
|
|
15
|
+
x: (imageWidth * scale - viewportWidth) / (2 * scale) - limited.x / scale,
|
|
16
|
+
y: (imageHeight * scale - viewportHeight) / (2 * scale) - limited.y / scale,
|
|
17
|
+
width: viewportWidth / scale,
|
|
18
|
+
height: viewportHeight / scale,
|
|
19
|
+
maxOffsetX,
|
|
20
|
+
maxOffsetY,
|
|
21
|
+
};
|
|
22
|
+
}
|
package/dist/styles.css
CHANGED
|
@@ -2854,6 +2854,100 @@ button.dgm-step:hover:not(:disabled),
|
|
|
2854
2854
|
.dgm-file-upload > p {
|
|
2855
2855
|
margin: 0;
|
|
2856
2856
|
}
|
|
2857
|
+
.dgm-image-cropper {
|
|
2858
|
+
display: grid;
|
|
2859
|
+
gap: 0.75rem;
|
|
2860
|
+
min-width: 0;
|
|
2861
|
+
color: var(--dgm-text);
|
|
2862
|
+
font-family: var(--dgm-font, inherit);
|
|
2863
|
+
}
|
|
2864
|
+
.dgm-image-cropper-stage {
|
|
2865
|
+
position: relative;
|
|
2866
|
+
overflow: hidden;
|
|
2867
|
+
width: 100%;
|
|
2868
|
+
aspect-ratio: var(--dgm-crop-ratio);
|
|
2869
|
+
border-radius: var(--dgm-radius);
|
|
2870
|
+
background: var(--dgm-subtle);
|
|
2871
|
+
box-shadow: inset 0 0 0 1px var(--dgm-control-border);
|
|
2872
|
+
cursor: grab;
|
|
2873
|
+
touch-action: none;
|
|
2874
|
+
user-select: none;
|
|
2875
|
+
}
|
|
2876
|
+
.dgm-image-cropper-stage[data-dragging] {
|
|
2877
|
+
cursor: grabbing;
|
|
2878
|
+
}
|
|
2879
|
+
.dgm-image-cropper-stage:focus-visible {
|
|
2880
|
+
outline: 2px solid var(--dgm-primary);
|
|
2881
|
+
outline-offset: 2px;
|
|
2882
|
+
}
|
|
2883
|
+
.dgm-image-cropper-stage img {
|
|
2884
|
+
position: absolute;
|
|
2885
|
+
top: 50%;
|
|
2886
|
+
left: 50%;
|
|
2887
|
+
display: block;
|
|
2888
|
+
max-width: none;
|
|
2889
|
+
pointer-events: none;
|
|
2890
|
+
transform-origin: center;
|
|
2891
|
+
}
|
|
2892
|
+
.dgm-image-cropper-guides {
|
|
2893
|
+
position: absolute;
|
|
2894
|
+
inset: 0;
|
|
2895
|
+
pointer-events: none;
|
|
2896
|
+
background:
|
|
2897
|
+
linear-gradient(
|
|
2898
|
+
to right,
|
|
2899
|
+
transparent 33.33%,
|
|
2900
|
+
rgb(255 255 255 / 38%) 33.33%,
|
|
2901
|
+
rgb(255 255 255 / 38%) calc(33.33% + 1px),
|
|
2902
|
+
transparent calc(33.33% + 1px),
|
|
2903
|
+
transparent 66.66%,
|
|
2904
|
+
rgb(255 255 255 / 38%) 66.66%,
|
|
2905
|
+
rgb(255 255 255 / 38%) calc(66.66% + 1px),
|
|
2906
|
+
transparent calc(66.66% + 1px)
|
|
2907
|
+
),
|
|
2908
|
+
linear-gradient(
|
|
2909
|
+
to bottom,
|
|
2910
|
+
transparent 33.33%,
|
|
2911
|
+
rgb(255 255 255 / 38%) 33.33%,
|
|
2912
|
+
rgb(255 255 255 / 38%) calc(33.33% + 1px),
|
|
2913
|
+
transparent calc(33.33% + 1px),
|
|
2914
|
+
transparent 66.66%,
|
|
2915
|
+
rgb(255 255 255 / 38%) 66.66%,
|
|
2916
|
+
rgb(255 255 255 / 38%) calc(66.66% + 1px),
|
|
2917
|
+
transparent calc(66.66% + 1px)
|
|
2918
|
+
);
|
|
2919
|
+
box-shadow: inset 0 0 0 1px rgb(255 255 255 / 40%);
|
|
2920
|
+
}
|
|
2921
|
+
.dgm-image-cropper-empty {
|
|
2922
|
+
position: absolute;
|
|
2923
|
+
inset: 0;
|
|
2924
|
+
display: grid;
|
|
2925
|
+
place-items: center;
|
|
2926
|
+
padding: 1rem;
|
|
2927
|
+
color: var(--dgm-muted);
|
|
2928
|
+
text-align: center;
|
|
2929
|
+
}
|
|
2930
|
+
.dgm-image-cropper > .dgm-description,
|
|
2931
|
+
.dgm-image-cropper > .dgm-error {
|
|
2932
|
+
margin: 0;
|
|
2933
|
+
}
|
|
2934
|
+
.dgm-image-cropper-controls {
|
|
2935
|
+
display: grid;
|
|
2936
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
2937
|
+
gap: 0.75rem;
|
|
2938
|
+
align-items: end;
|
|
2939
|
+
}
|
|
2940
|
+
.dgm-image-cropper[data-disabled] .dgm-image-cropper-stage {
|
|
2941
|
+
cursor: default;
|
|
2942
|
+
}
|
|
2943
|
+
@media (max-width: 35rem) {
|
|
2944
|
+
.dgm-image-cropper-controls {
|
|
2945
|
+
grid-template-columns: minmax(0, 1fr);
|
|
2946
|
+
}
|
|
2947
|
+
.dgm-image-cropper-controls .dgm-button {
|
|
2948
|
+
width: 100%;
|
|
2949
|
+
}
|
|
2950
|
+
}
|
|
2857
2951
|
.dgm-stepper {
|
|
2858
2952
|
color: var(--dgm-text);
|
|
2859
2953
|
font-family: var(--dgm-font, inherit);
|