@clicoh/orion-library 1.1.0 → 1.2.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/css/base.css +24 -1
- package/dist/components/01-atoms/Badge/Badge.d.ts +13 -3
- package/dist/components/01-atoms/Badge/Badge.d.ts.map +1 -1
- package/dist/components/01-atoms/Badge/Badge.jsx +21 -4
- package/dist/components/01-atoms/Badge/Badge.jsx.map +1 -1
- 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 +32 -4
- package/dist/components/01-atoms/Button/Button.jsx.map +1 -1
- package/dist/components/01-atoms/Input/Input.d.ts +5 -1
- package/dist/components/01-atoms/Input/Input.d.ts.map +1 -1
- package/dist/components/01-atoms/Input/Input.jsx +12 -6
- package/dist/components/01-atoms/Input/Input.jsx.map +1 -1
- package/dist/components/01-atoms/Input/utils/border.d.ts +3 -1
- package/dist/components/01-atoms/Input/utils/border.d.ts.map +1 -1
- package/dist/components/01-atoms/Input/utils/border.js +3 -3
- 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 +31 -0
- package/dist/components/01-atoms/ProgressBar/ProgressBar.d.ts.map +1 -0
- package/dist/components/01-atoms/ProgressBar/ProgressBar.jsx +36 -0
- package/dist/components/01-atoms/ProgressBar/ProgressBar.jsx.map +1 -0
- package/dist/components/01-atoms/ProgressBar/index.d.ts +2 -0
- package/dist/components/01-atoms/ProgressBar/index.d.ts.map +1 -0
- package/dist/components/01-atoms/ProgressBar/index.js +2 -0
- package/dist/components/01-atoms/ProgressBar/index.js.map +1 -0
- package/dist/components/01-atoms/Radio/Radio.d.ts +19 -2
- package/dist/components/01-atoms/Radio/Radio.d.ts.map +1 -1
- package/dist/components/01-atoms/Radio/Radio.jsx +51 -6
- package/dist/components/01-atoms/Radio/Radio.jsx.map +1 -1
- package/dist/components/01-atoms/Select/Select.d.ts +3 -1
- package/dist/components/01-atoms/Select/Select.d.ts.map +1 -1
- package/dist/components/01-atoms/Select/Select.jsx +8 -4
- package/dist/components/01-atoms/Select/Select.jsx.map +1 -1
- package/dist/components/01-atoms/Skeleton/Skeleton.d.ts +32 -0
- package/dist/components/01-atoms/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/01-atoms/Skeleton/Skeleton.jsx +34 -0
- package/dist/components/01-atoms/Skeleton/Skeleton.jsx.map +1 -0
- package/dist/components/01-atoms/Skeleton/index.d.ts +2 -0
- package/dist/components/01-atoms/Skeleton/index.d.ts.map +1 -0
- package/dist/components/01-atoms/Skeleton/index.js +2 -0
- package/dist/components/01-atoms/Skeleton/index.js.map +1 -0
- package/dist/components/01-atoms/SmallInput/SmallInput.jsx +1 -1
- package/dist/components/01-atoms/SmallInput/SmallInput.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/Autocomplete/Autocomplete.d.ts +7 -1
- package/dist/components/02-molecules/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/components/02-molecules/Autocomplete/Autocomplete.jsx +6 -2
- package/dist/components/02-molecules/Autocomplete/Autocomplete.jsx.map +1 -1
- package/dist/components/02-molecules/DatePicker/DatePicker.d.ts +79 -0
- package/dist/components/02-molecules/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/components/02-molecules/DatePicker/DatePicker.jsx +229 -0
- package/dist/components/02-molecules/DatePicker/DatePicker.jsx.map +1 -0
- package/dist/components/02-molecules/DatePicker/index.d.ts +2 -0
- package/dist/components/02-molecules/DatePicker/index.d.ts.map +1 -0
- package/dist/components/02-molecules/DatePicker/index.js +2 -0
- package/dist/components/02-molecules/DatePicker/index.js.map +1 -0
- package/dist/components/02-molecules/InlineMessage/InlineMessage.d.ts +37 -0
- package/dist/components/02-molecules/InlineMessage/InlineMessage.d.ts.map +1 -0
- package/dist/components/02-molecules/InlineMessage/InlineMessage.jsx +59 -0
- package/dist/components/02-molecules/InlineMessage/InlineMessage.jsx.map +1 -0
- package/dist/components/02-molecules/InlineMessage/index.d.ts +2 -0
- package/dist/components/02-molecules/InlineMessage/index.d.ts.map +1 -0
- package/dist/components/02-molecules/InlineMessage/index.js +2 -0
- package/dist/components/02-molecules/InlineMessage/index.js.map +1 -0
- package/dist/components/02-molecules/Modal/Modal.jsx +3 -3
- package/dist/components/02-molecules/Modal/Modal.jsx.map +1 -1
- package/dist/components/02-molecules/index.d.ts +3 -0
- package/dist/components/02-molecules/index.d.ts.map +1 -1
- package/dist/components/02-molecules/index.js +3 -0
- package/dist/components/02-molecules/index.js.map +1 -1
- package/dist/components/03-organisms/MapView/MapView.d.ts +65 -0
- package/dist/components/03-organisms/MapView/MapView.d.ts.map +1 -0
- package/dist/components/03-organisms/MapView/MapView.jsx +199 -0
- package/dist/components/03-organisms/MapView/MapView.jsx.map +1 -0
- package/dist/components/03-organisms/MapView/index.d.ts +2 -0
- package/dist/components/03-organisms/MapView/index.d.ts.map +1 -0
- package/dist/components/03-organisms/MapView/index.js +2 -0
- package/dist/components/03-organisms/MapView/index.js.map +1 -0
- package/dist/components/03-organisms/index.d.ts +1 -0
- package/dist/components/03-organisms/index.d.ts.map +1 -1
- package/dist/components/03-organisms/index.js +1 -0
- package/dist/components/03-organisms/index.js.map +1 -1
- package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.jsx +2 -2
- package/dist/components/04-templates/DashboardTemplate/DashboardTemplate.jsx.map +1 -1
- package/package.json +3 -1
- package/tailwind.config.ts +10 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import clsx from 'clsx';
|
|
3
|
+
import { useEffect, useId, useRef, useState, } from 'react';
|
|
4
|
+
import { HiMinus, HiPlus, HiOutlineViewfinderCircle } from 'react-icons/hi2';
|
|
5
|
+
import { Show } from '../../00-base';
|
|
6
|
+
const toneMap = {
|
|
7
|
+
mono: clsx('[&_.leaflet-tile-pane]:brightness-105 [&_.leaflet-tile-pane]:contrast-90 [&_.leaflet-tile-pane]:grayscale', 'dark:[&_.leaflet-tile-pane]:brightness-90 dark:[&_.leaflet-tile-pane]:contrast-90 dark:[&_.leaflet-tile-pane]:invert'),
|
|
8
|
+
color: '',
|
|
9
|
+
};
|
|
10
|
+
const attributionClasses = clsx('dark:[&_.leaflet-control-attribution]:text-gray-2 dark:[&_.leaflet-control-attribution]:bg-black/70', 'dark:[&_.leaflet-control-attribution_a]:text-lavender-dark');
|
|
11
|
+
const DEFAULT_TILE = 'https://tile.openstreetmap.org/{z}/{x}/{y}.png';
|
|
12
|
+
const DEFAULT_ATTRIBUTION = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>';
|
|
13
|
+
const pinFill = {
|
|
14
|
+
default: '#6A5DF9',
|
|
15
|
+
numbered: '#6A5DF9',
|
|
16
|
+
muted: '#B9BABB',
|
|
17
|
+
};
|
|
18
|
+
function buildPinHtml(marker) {
|
|
19
|
+
const variant = marker.variant ?? 'default';
|
|
20
|
+
const fill = pinFill[variant];
|
|
21
|
+
const inner = variant === 'numbered' && marker.label
|
|
22
|
+
? `<text x="14" y="18.5" text-anchor="middle" font-size="12" font-weight="700" fill="#fff">${marker.label}</text>`
|
|
23
|
+
: '<circle cx="14" cy="14" r="4.5" fill="#fff"/>';
|
|
24
|
+
return (`<div class="orion-map-pin"><svg width="28" height="36" viewBox="0 0 28 36" aria-hidden="true">` +
|
|
25
|
+
`<path d="M14 0C6.3 0 0 6.3 0 14c0 10.5 14 22 14 22s14-11.5 14-22C28 6.3 21.7 0 14 0z" fill="${fill}"/>` +
|
|
26
|
+
`<circle cx="14" cy="14" r="9" fill="${fill}"/>${inner}</svg></div>`);
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* MapView renders an interactive map with customizable markers and controls.
|
|
30
|
+
* Leaflet is loaded dynamically so the library barrel stays safe for SSR.
|
|
31
|
+
*
|
|
32
|
+
* @component
|
|
33
|
+
* @example
|
|
34
|
+
* <MapView
|
|
35
|
+
* center={{ lat: 4.711, lng: -74.072 }}
|
|
36
|
+
* markers={[{ id: '1', lat: 4.71, lng: -74.07, tooltip: 'Stop A' }]}
|
|
37
|
+
* controls={{
|
|
38
|
+
* zoomInLabel: 'Zoom in',
|
|
39
|
+
* zoomOutLabel: 'Zoom out',
|
|
40
|
+
* recenterLabel: 'Recenter',
|
|
41
|
+
* }}
|
|
42
|
+
* />
|
|
43
|
+
*
|
|
44
|
+
* @param {MapViewProps} props - The properties of the MapView component.
|
|
45
|
+
* @param {{ lat: number; lng: number }} props.center - Initial map center.
|
|
46
|
+
* @param {number} [props.zoom=12] - Initial zoom level.
|
|
47
|
+
* @param {MapMarker[]} [props.markers] - Markers to render on the map.
|
|
48
|
+
* @param {boolean} [props.fitToMarkers] - Fit bounds to markers when they change.
|
|
49
|
+
* @param {string} [props.tileUrl] - Tile layer URL template.
|
|
50
|
+
* @param {string} [props.attribution] - Map attribution HTML.
|
|
51
|
+
* @param {MapViewControls} [props.controls] - Labels for zoom and recenter controls.
|
|
52
|
+
* @param {(marker: MapMarker) => void} [props.onMarkerClick] - Fired when a marker is clicked.
|
|
53
|
+
* @param {string} [props.emptyMessage] - Message shown when there are no markers.
|
|
54
|
+
* @param {'mono' | 'color'} [props.tone='mono'] - `mono` renders the tiles in grayscale and inverts them in dark mode, so the map follows the theme and the pins stay the only accent. `color` leaves the tiles as the provider serves them.
|
|
55
|
+
* @param {string} [props.className] - Extra classes for the root element.
|
|
56
|
+
*
|
|
57
|
+
* @returns {ReactNode} The rendered MapView component.
|
|
58
|
+
*/
|
|
59
|
+
export function MapView({ center, zoom = 12, markers = [], fitToMarkers = true, tileUrl = DEFAULT_TILE, attribution = DEFAULT_ATTRIBUTION, controls, onMarkerClick, emptyMessage, tone = 'mono', className, ...restProps }) {
|
|
60
|
+
const mapId = useId().replace(/:/g, '');
|
|
61
|
+
const containerRef = useRef(null);
|
|
62
|
+
const mapRef = useRef(null);
|
|
63
|
+
const tilesRef = useRef(null);
|
|
64
|
+
const markersLayerRef = useRef(null);
|
|
65
|
+
const leafletRef = useRef(null);
|
|
66
|
+
const [isReady, setIsReady] = useState(false);
|
|
67
|
+
const onMarkerClickRef = useRef(onMarkerClick);
|
|
68
|
+
onMarkerClickRef.current = onMarkerClick;
|
|
69
|
+
useEffect(() => {
|
|
70
|
+
let cancelled = false;
|
|
71
|
+
const init = async () => {
|
|
72
|
+
if (!containerRef.current || mapRef.current)
|
|
73
|
+
return;
|
|
74
|
+
const L = await import('leaflet');
|
|
75
|
+
if (cancelled || !containerRef.current)
|
|
76
|
+
return;
|
|
77
|
+
leafletRef.current = L;
|
|
78
|
+
const map = L.map(containerRef.current, {
|
|
79
|
+
zoomControl: false,
|
|
80
|
+
scrollWheelZoom: true,
|
|
81
|
+
attributionControl: true,
|
|
82
|
+
}).setView([center.lat, center.lng], zoom);
|
|
83
|
+
map.attributionControl.setPrefix(false);
|
|
84
|
+
tilesRef.current = L.tileLayer(tileUrl, {
|
|
85
|
+
maxZoom: 17,
|
|
86
|
+
attribution,
|
|
87
|
+
}).addTo(map);
|
|
88
|
+
markersLayerRef.current = L.layerGroup().addTo(map);
|
|
89
|
+
mapRef.current = map;
|
|
90
|
+
setIsReady(true);
|
|
91
|
+
setTimeout(() => map.invalidateSize(), 80);
|
|
92
|
+
};
|
|
93
|
+
void init();
|
|
94
|
+
return () => {
|
|
95
|
+
cancelled = true;
|
|
96
|
+
if (mapRef.current) {
|
|
97
|
+
mapRef.current.remove();
|
|
98
|
+
mapRef.current = null;
|
|
99
|
+
tilesRef.current = null;
|
|
100
|
+
markersLayerRef.current = null;
|
|
101
|
+
leafletRef.current = null;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
// Intentionally mount-only: subsequent prop changes are handled below.
|
|
105
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
106
|
+
}, []);
|
|
107
|
+
useEffect(() => {
|
|
108
|
+
const map = mapRef.current;
|
|
109
|
+
const L = leafletRef.current;
|
|
110
|
+
const layer = markersLayerRef.current;
|
|
111
|
+
if (!isReady || !map || !L || !layer)
|
|
112
|
+
return;
|
|
113
|
+
layer.clearLayers();
|
|
114
|
+
markers.forEach((marker) => {
|
|
115
|
+
const icon = L.divIcon({
|
|
116
|
+
html: buildPinHtml(marker),
|
|
117
|
+
className: '',
|
|
118
|
+
iconSize: [28, 36],
|
|
119
|
+
iconAnchor: [14, 36],
|
|
120
|
+
tooltipAnchor: [0, -30],
|
|
121
|
+
});
|
|
122
|
+
const leafletMarker = L.marker([marker.lat, marker.lng], {
|
|
123
|
+
icon,
|
|
124
|
+
riseOnHover: true,
|
|
125
|
+
});
|
|
126
|
+
if (marker.tooltip) {
|
|
127
|
+
leafletMarker.bindTooltip(marker.tooltip, {
|
|
128
|
+
direction: 'top',
|
|
129
|
+
offset: [0, -4],
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
leafletMarker.on('click', () => {
|
|
133
|
+
onMarkerClickRef.current?.(marker);
|
|
134
|
+
});
|
|
135
|
+
leafletMarker.addTo(layer);
|
|
136
|
+
});
|
|
137
|
+
if (fitToMarkers && markers.length > 0) {
|
|
138
|
+
const bounds = L.latLngBounds(markers.map((m) => [m.lat, m.lng]));
|
|
139
|
+
map.fitBounds(bounds, { padding: [60, 60], maxZoom: 14 });
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
map.setView([center.lat, center.lng], zoom);
|
|
143
|
+
}
|
|
144
|
+
setTimeout(() => map.invalidateSize(), 40);
|
|
145
|
+
}, [isReady, markers, fitToMarkers, center.lat, center.lng, zoom]);
|
|
146
|
+
useEffect(() => {
|
|
147
|
+
const map = mapRef.current;
|
|
148
|
+
const L = leafletRef.current;
|
|
149
|
+
if (!map || !L)
|
|
150
|
+
return;
|
|
151
|
+
if (tilesRef.current) {
|
|
152
|
+
map.removeLayer(tilesRef.current);
|
|
153
|
+
}
|
|
154
|
+
tilesRef.current = L.tileLayer(tileUrl, {
|
|
155
|
+
maxZoom: 17,
|
|
156
|
+
attribution,
|
|
157
|
+
}).addTo(map);
|
|
158
|
+
}, [tileUrl, attribution]);
|
|
159
|
+
const recenter = () => {
|
|
160
|
+
const map = mapRef.current;
|
|
161
|
+
const L = leafletRef.current;
|
|
162
|
+
if (!map || !L)
|
|
163
|
+
return;
|
|
164
|
+
if (markers.length > 0) {
|
|
165
|
+
const bounds = L.latLngBounds(markers.map((m) => [m.lat, m.lng]));
|
|
166
|
+
map.fitBounds(bounds, { padding: [60, 60], maxZoom: 14 });
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
map.setView([center.lat, center.lng], zoom);
|
|
170
|
+
};
|
|
171
|
+
return (<div {...restProps} className={clsx('bg-gray-6 dark:bg-gray-dark-2 relative h-full min-h-64 w-full overflow-hidden rounded-lg', toneMap[tone], attributionClasses, className)}>
|
|
172
|
+
<div ref={containerRef} id={`orion-map-${mapId}`} className="absolute inset-0 z-0 h-full w-full" role="application" aria-label={restProps['aria-label']}/>
|
|
173
|
+
<Show>
|
|
174
|
+
<Show.When isTrue={Boolean(emptyMessage) && markers.length === 0}>
|
|
175
|
+
<div className="pointer-events-none absolute inset-0 z-10 flex items-center justify-center bg-white/60 p-4 text-center dark:bg-black/50">
|
|
176
|
+
<p className="text-gray-1 dark:text-gray-2 text-sm">
|
|
177
|
+
{emptyMessage}
|
|
178
|
+
</p>
|
|
179
|
+
</div>
|
|
180
|
+
</Show.When>
|
|
181
|
+
</Show>
|
|
182
|
+
<Show>
|
|
183
|
+
<Show.When isTrue={Boolean(controls)}>
|
|
184
|
+
<div className="absolute right-3 bottom-3 z-10 flex flex-col gap-1">
|
|
185
|
+
<button type="button" aria-label={controls?.zoomInLabel} onClick={() => mapRef.current?.zoomIn()} className="border-gray-5 dark:border-gray-1 flex h-9 w-9 items-center justify-center rounded-full border bg-white text-black shadow-md dark:bg-black dark:text-white">
|
|
186
|
+
<HiPlus className="h-4 w-4" aria-hidden/>
|
|
187
|
+
</button>
|
|
188
|
+
<button type="button" aria-label={controls?.zoomOutLabel} onClick={() => mapRef.current?.zoomOut()} className="border-gray-5 dark:border-gray-1 flex h-9 w-9 items-center justify-center rounded-full border bg-white text-black shadow-md dark:bg-black dark:text-white">
|
|
189
|
+
<HiMinus className="h-4 w-4" aria-hidden/>
|
|
190
|
+
</button>
|
|
191
|
+
<button type="button" aria-label={controls?.recenterLabel} onClick={recenter} className="border-gray-5 dark:border-gray-1 flex h-9 w-9 items-center justify-center rounded-full border bg-white text-black shadow-md dark:bg-black dark:text-white">
|
|
192
|
+
<HiOutlineViewfinderCircle className="h-4 w-4" aria-hidden/>
|
|
193
|
+
</button>
|
|
194
|
+
</div>
|
|
195
|
+
</Show.When>
|
|
196
|
+
</Show>
|
|
197
|
+
</div>);
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=MapView.jsx.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MapView.jsx","sourceRoot":"","sources":["../../../../src/components/03-organisms/MapView/MapView.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAGL,SAAS,EACT,KAAK,EACL,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAmCrC,MAAM,OAAO,GAAgC;IAC3C,IAAI,EAAE,IAAI,CACR,2GAA2G,EAC3G,sHAAsH,CACvH;IACD,KAAK,EAAE,EAAE;CACV,CAAC;AAEF,MAAM,kBA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CAAC,SAAS,CAAC,WAAW,EACzC;YAAA,EAAE,MAAM,CACR;YAAA,CAAC,MAAM,CACL,IAAI,CAAC,QAAQ,CACb,UAAU,CAAC,CAAC,QAAQ,EAAE,YAAY,CAAC,CACnC,OAAO,CAAC,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,EAAE,OAAO,EAAE,CAAC,CACzC,SAAS,CAAC,2JAA2J,CAErK;cAAA,CAAC,OAAO,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAC1C;YAAA,EAAE,MAAM,CACR;YAAA,CAAC,MAAM,CACL,IAAI,CAAC,QAAQ,CACb,UAAU,CAAC,CAAC,QAAQ,EAAE,aAAa,CAAC,CACpC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAClB,SAAS,CAAC,2JAA2J,CAErK;cAAA,CAAC,yBAAyB,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,EAC5D;YAAA,EAAE,MAAM,CACV;UAAA,EAAE,GAAG,CACP;QAAA,EAAE,IAAI,CAAC,IAAI,CACb;MAAA,EAAE,IAAI,CACR;IAAA,EAAE,GAAG,CAAC,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/03-organisms/MapView/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/components/03-organisms/MapView/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/03-organisms/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/03-organisms/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/03-organisms/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/03-organisms/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC"}
|
|
@@ -31,7 +31,7 @@ import { HeadingWithTitleSkeleton } from './HeadingWithTitleSkeleton';
|
|
|
31
31
|
export function DashboardTemplate({ headerProps, pageTitles, titleChildren, children, breadcrumbLoadingLabel, headingLoadingLabel, }) {
|
|
32
32
|
return (<>
|
|
33
33
|
<Header {...headerProps}/>
|
|
34
|
-
<hr className="border-gray-5 dark:border-gray-
|
|
34
|
+
<hr className="border-gray-5 dark:border-gray-dark-1"/>
|
|
35
35
|
<Container className="grid gap-2 py-4">
|
|
36
36
|
<Suspense fallback={<BreadcrumbSkeleton loadingLabel={breadcrumbLoadingLabel}/>}>
|
|
37
37
|
<BreadcrumbWithPathname homeHref={headerProps.homeHref} pageTitles={pageTitles}/>
|
|
@@ -43,7 +43,7 @@ export function DashboardTemplate({ headerProps, pageTitles, titleChildren, chil
|
|
|
43
43
|
{titleChildren}
|
|
44
44
|
</div>
|
|
45
45
|
</Container>
|
|
46
|
-
<hr className="border-gray-5 dark:border-gray-
|
|
46
|
+
<hr className="border-gray-5 dark:border-gray-dark-1"/>
|
|
47
47
|
<Container className="py-6" as="main">
|
|
48
48
|
{children}
|
|
49
49
|
</Container>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardTemplate.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/DashboardTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,EAAE,MAAM,EAAe,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAWtE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAChC,WAAW,EACX,UAAU,EACV,aAAa,EACb,QAAQ,EACR,sBAAsB,EACtB,mBAAmB,GACI;IACvB,OAAO,CACL,EACE;MAAA,CAAC,MAAM,CAAC,IAAI,WAAW,CAAC,EACxB;MAAA,CAAC,EAAE,CAAC,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"DashboardTemplate.jsx","sourceRoot":"","sources":["../../../../src/components/04-templates/DashboardTemplate/DashboardTemplate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,kBAAkB,EAAE,MAAM,kDAAkD,CAAC;AACtF,OAAO,EAA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X;MAAA,EAAE,SAAS,CACb;IAAA,GAAG,CACJ,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@clicoh/orion-library",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0-beta.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@floating-ui/react": "0.26.19",
|
|
7
7
|
"clsx": "2.1.1",
|
|
8
|
+
"leaflet": "^1.9.4",
|
|
8
9
|
"next": "16.2.6",
|
|
9
10
|
"react": "19.2.6",
|
|
10
11
|
"react-dom": "19.2.6",
|
|
@@ -22,6 +23,7 @@
|
|
|
22
23
|
"@storybook/react": "10.4.0",
|
|
23
24
|
"@tailwindcss/postcss": "4.1.18",
|
|
24
25
|
"@types/copyfiles": "2",
|
|
26
|
+
"@types/leaflet": "^1.9.22",
|
|
25
27
|
"@types/node": "20",
|
|
26
28
|
"@types/react": "19.2.6",
|
|
27
29
|
"@types/react-dom": "19.2.3",
|
package/tailwind.config.ts
CHANGED
|
@@ -116,6 +116,16 @@ const config: Config = {
|
|
|
116
116
|
'brand-shipping': 'linear-gradient(135deg, #5683DD, #8EE3C6)',
|
|
117
117
|
'brand-full': 'linear-gradient(135deg, #CFBDB2, #CF86F4)',
|
|
118
118
|
},
|
|
119
|
+
keyframes: {
|
|
120
|
+
'progress-indeterminate': {
|
|
121
|
+
from: { transform: 'translateX(-100%)' },
|
|
122
|
+
to: { transform: 'translateX(250%)' },
|
|
123
|
+
},
|
|
124
|
+
},
|
|
125
|
+
animation: {
|
|
126
|
+
'progress-indeterminate':
|
|
127
|
+
'progress-indeterminate 1.5s ease-in-out infinite',
|
|
128
|
+
},
|
|
119
129
|
},
|
|
120
130
|
},
|
|
121
131
|
plugins: [],
|