@brightlocal/ui-components 2.10.0 → 2.12.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/README.md +3 -1
- package/component-meta.json +200 -17
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +42 -25
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts +16 -4
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +57 -53
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts +7 -1
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +82 -81
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +19 -10
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +173 -169
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +14 -2
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +37 -37
- package/dist/button.cjs +1 -1
- package/dist/button.js +25 -25
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +3 -3
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +2 -1
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +10 -1
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +85 -82
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +37 -4
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +213 -163
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +11 -0
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +43 -38
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +12 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +235 -230
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +106 -1
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +385 -120
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +10 -0
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +96 -96
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +7 -2
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +38 -30
- package/dist/drawer.d.ts +2 -2
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +5 -0
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +15 -7
- package/dist/hooks/use-breakpoint.cjs +1 -1
- package/dist/hooks/use-breakpoint.d.ts.map +1 -1
- package/dist/hooks/use-breakpoint.js +10 -10
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +406 -395
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.d.ts +8 -5
- package/dist/input-chip.d.ts.map +1 -1
- package/dist/input-chip.js +164 -170
- package/dist/input-group.d.ts +1 -1
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +10 -0
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +108 -106
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +1 -1
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +36 -37
- package/dist/list.d.ts +1 -1
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts +6 -1
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +25 -22
- package/dist/map.cjs +1 -0
- package/dist/map.d.ts +207 -0
- package/dist/map.d.ts.map +1 -0
- package/dist/map.js +256 -0
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +29 -3
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +26 -25
- package/dist/rating.cjs +1 -1
- package/dist/rating.d.ts +6 -0
- package/dist/rating.d.ts.map +1 -1
- package/dist/rating.js +27 -19
- package/dist/resizable.d.ts +1 -1
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +7 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +52 -51
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +16 -4
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +38 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +6 -1
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +42 -41
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +5 -0
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +13 -11
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +32 -30
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +4 -0
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +101 -52
- package/dist/text-reveal-motion.cjs +1 -1
- package/dist/text-reveal-motion.d.ts +5 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/text-reveal-motion.js +111 -110
- package/dist/typography.cjs +1 -1
- package/dist/typography.d.ts +1 -2
- package/dist/typography.d.ts.map +1 -1
- package/dist/typography.js +49 -50
- package/package.json +4 -5
- package/src/blocks/data-table.tsx +26 -9
- package/src/blocks/input-list.tsx +12 -1
- package/src/blocks/sidebar.tsx +61 -44
- package/src/components/badge.tsx +22 -5
- package/src/components/breadcrumb.tsx +43 -26
- package/src/components/button.tsx +13 -13
- package/src/components/callout.tsx +5 -4
- package/src/components/card.tsx +35 -19
- package/src/components/carousel.tsx +134 -13
- package/src/components/chip.tsx +22 -2
- package/src/components/combobox.tsx +18 -3
- package/src/components/command.tsx +644 -17
- package/src/components/date-picker.tsx +17 -3
- package/src/components/dialog.tsx +17 -4
- package/src/components/drawer.tsx +2 -2
- package/src/components/global-layout.tsx +15 -2
- package/src/components/input-chip.tsx +114 -66
- package/src/components/input-password.tsx +73 -49
- package/src/components/link.tsx +29 -17
- package/src/components/logo.tsx +10 -2
- package/src/components/map.tsx +597 -0
- package/src/components/pagination.tsx +44 -11
- package/src/components/rating.tsx +20 -2
- package/src/components/select.tsx +9 -1
- package/src/components/separator.tsx +40 -25
- package/src/components/sheet.tsx +28 -20
- package/src/components/skeleton.tsx +13 -2
- package/src/components/sonner.tsx +9 -3
- package/src/components/tabs.tsx +118 -22
- package/src/components/text-reveal-motion.tsx +7 -1
- package/src/components/typography.tsx +6 -7
- package/src/hooks/use-breakpoint.ts +2 -3
- package/src/index.ts +1 -0
package/dist/map.d.ts
ADDED
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { Popover, PopoverProps, PopoverAnchorProps, PopoverContentProps } from './popover';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Vendor-agnostic map type identifiers.
|
|
5
|
+
* Values match `google.maps.MapTypeId` so they can be passed directly
|
|
6
|
+
* to Google Maps or any provider that accepts the same string literals.
|
|
7
|
+
*/
|
|
8
|
+
declare const MapTypeId: {
|
|
9
|
+
/** Default road map view */
|
|
10
|
+
readonly ROADMAP: "roadmap";
|
|
11
|
+
/** Satellite imagery */
|
|
12
|
+
readonly SATELLITE: "satellite";
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Union of all map type identifier values.
|
|
16
|
+
*/
|
|
17
|
+
type MapTypeIdValue = (typeof MapTypeId)[keyof typeof MapTypeId];
|
|
18
|
+
type MapGridPinVariant = "primary" | "secondary" | "destructive" | "outline" | "warning";
|
|
19
|
+
/**
|
|
20
|
+
* Props for the MapGridPin component.
|
|
21
|
+
*/
|
|
22
|
+
interface MapGridPinProps extends Omit<React.ComponentProps<"button">, "children" | "type"> {
|
|
23
|
+
/** Value displayed inside the pin (number or short label) */
|
|
24
|
+
value: number | string;
|
|
25
|
+
/** Button variant — consumer controls this based on value thresholds */
|
|
26
|
+
variant?: MapGridPinVariant;
|
|
27
|
+
/** Enable infinite pulse animation radiating from the pin */
|
|
28
|
+
pulse?: boolean;
|
|
29
|
+
/** Required test hook identifier */
|
|
30
|
+
dataHook: string;
|
|
31
|
+
/** Analytics element identifier */
|
|
32
|
+
trackingEl?: string;
|
|
33
|
+
/** Analytics label */
|
|
34
|
+
trackingLabel?: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* A circular map pin button that displays a numeric value with a colored background.
|
|
38
|
+
* Uses the Button component internally. Color is determined by the `variant` prop —
|
|
39
|
+
* the consumer controls which variant to apply based on the value.
|
|
40
|
+
* Supports an optional `pulse` animation for emphasis.
|
|
41
|
+
*/
|
|
42
|
+
declare const MapGridPin: React.ForwardRefExoticComponent<Omit<MapGridPinProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
43
|
+
/**
|
|
44
|
+
* Props for the MapLocationPin component.
|
|
45
|
+
*/
|
|
46
|
+
interface MapLocationPinProps extends Omit<MapGridPinProps, "value"> {
|
|
47
|
+
/** Numeric value displayed inside the pin */
|
|
48
|
+
value?: number;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* A map location pin marker.
|
|
52
|
+
* Thin wrapper around MapGridPin with a default value of 1.
|
|
53
|
+
* Designed to be placed inside any map marker component (e.g. AdvancedMarker).
|
|
54
|
+
*/
|
|
55
|
+
declare const MapLocationPin: React.ForwardRefExoticComponent<Omit<MapLocationPinProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
56
|
+
/**
|
|
57
|
+
* Props for the MapControlButton component.
|
|
58
|
+
*/
|
|
59
|
+
interface MapControlButtonProps extends Omit<React.ComponentProps<"button">, "type"> {
|
|
60
|
+
/** Required test hook identifier */
|
|
61
|
+
dataHook: string;
|
|
62
|
+
/** Analytics element identifier */
|
|
63
|
+
trackingEl?: string;
|
|
64
|
+
/** Analytics label */
|
|
65
|
+
trackingLabel?: string;
|
|
66
|
+
/** Button type attribute */
|
|
67
|
+
type?: "button" | "submit";
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* A floating control button for map UIs.
|
|
71
|
+
* Renders a square, shadowed button designed to overlay a map surface.
|
|
72
|
+
* Use for zoom, locate, layer toggles, and other map controls.
|
|
73
|
+
*/
|
|
74
|
+
declare const MapControlButton: React.ForwardRefExoticComponent<Omit<MapControlButtonProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
75
|
+
/**
|
|
76
|
+
* Props for the MapLoadingState component.
|
|
77
|
+
*/
|
|
78
|
+
interface MapLoadingStateProps extends React.ComponentProps<"div"> {
|
|
79
|
+
/** Optional loading message */
|
|
80
|
+
message?: string;
|
|
81
|
+
/** Required test hook identifier */
|
|
82
|
+
dataHook: string;
|
|
83
|
+
/** Analytics element identifier */
|
|
84
|
+
trackingEl?: string;
|
|
85
|
+
/** Analytics label */
|
|
86
|
+
trackingLabel?: string;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* A loading placeholder for map containers.
|
|
90
|
+
* Uses the same spinner pattern as ComboboxLoading.
|
|
91
|
+
* Use as a fallback while the map provider is loading.
|
|
92
|
+
*/
|
|
93
|
+
declare const MapLoadingState: React.ForwardRefExoticComponent<Omit<MapLoadingStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
94
|
+
/**
|
|
95
|
+
* Props for the MapErrorState component.
|
|
96
|
+
*/
|
|
97
|
+
interface MapErrorStateProps extends React.ComponentProps<"div"> {
|
|
98
|
+
/** Error title */
|
|
99
|
+
title?: string;
|
|
100
|
+
/** Error description */
|
|
101
|
+
message?: string;
|
|
102
|
+
/** Retry callback — renders a "Try again" button when provided */
|
|
103
|
+
onRetry?: () => void;
|
|
104
|
+
/** Required test hook identifier */
|
|
105
|
+
dataHook: string;
|
|
106
|
+
/** Analytics element identifier */
|
|
107
|
+
trackingEl?: string;
|
|
108
|
+
/** Analytics label */
|
|
109
|
+
trackingLabel?: string;
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* An error state for map containers.
|
|
113
|
+
* Displays an alert icon, title, message, and an optional retry button.
|
|
114
|
+
* Use when the map provider fails to initialise or a network error occurs.
|
|
115
|
+
*/
|
|
116
|
+
declare const MapErrorState: React.ForwardRefExoticComponent<Omit<MapErrorStateProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
117
|
+
/**
|
|
118
|
+
* Props for the MapLegend component.
|
|
119
|
+
*/
|
|
120
|
+
interface MapLegendProps extends React.ComponentProps<"div"> {
|
|
121
|
+
/** Required test hook identifier */
|
|
122
|
+
dataHook: string;
|
|
123
|
+
/** Analytics element identifier */
|
|
124
|
+
trackingEl?: string;
|
|
125
|
+
/** Analytics label */
|
|
126
|
+
trackingLabel?: string;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* A flexible legend container for map UIs.
|
|
130
|
+
* Renders a horizontal pill-shaped bar — consumers define items via children.
|
|
131
|
+
*/
|
|
132
|
+
declare const MapLegend: React.ForwardRefExoticComponent<Omit<MapLegendProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
133
|
+
/**
|
|
134
|
+
* Return type of {@link useMapPopoverHover}.
|
|
135
|
+
*/
|
|
136
|
+
interface UseMapPopoverHoverReturn<T> {
|
|
137
|
+
/** The item currently being hovered, or `null` when idle. Use for `open` prop. */
|
|
138
|
+
activeItem: T | null;
|
|
139
|
+
/** Last non-null item — holds position stable during the close animation. Use for anchor positioning. */
|
|
140
|
+
anchorItem: T | null;
|
|
141
|
+
/** Set a new active item and cancel any pending close timer. */
|
|
142
|
+
showItem: (item: T) => void;
|
|
143
|
+
/** Start a delayed close (default 150 ms). Moving to another pin or the popover content cancels it. */
|
|
144
|
+
scheduleClose: () => void;
|
|
145
|
+
/** Cancel a pending close — call from `MapPopoverContent.onMouseEnter`. */
|
|
146
|
+
cancelClose: () => void;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Manages hover state for a single repositioning Popover on dense map grids.
|
|
150
|
+
*
|
|
151
|
+
* Wire the returned callbacks to `MapGridPin` mouse events and
|
|
152
|
+
* `MapPopoverContent` mouse events. The 150 ms grace period prevents
|
|
153
|
+
* flicker when the pointer travels between a pin and the popover content.
|
|
154
|
+
*
|
|
155
|
+
* @param delay - Close timer in ms.
|
|
156
|
+
* @default 150
|
|
157
|
+
*/
|
|
158
|
+
declare function useMapPopoverHover<T>(delay?: number): UseMapPopoverHoverReturn<T>;
|
|
159
|
+
/**
|
|
160
|
+
* Controlled popover root for map UIs.
|
|
161
|
+
* Re-exports `Popover` so consumers import everything from the map module.
|
|
162
|
+
*
|
|
163
|
+
* @example
|
|
164
|
+
* ```tsx
|
|
165
|
+
* <MapPopover open={!!activeItem}>
|
|
166
|
+
* <MapPopoverAnchor />
|
|
167
|
+
* <MapPopoverContent dataHook="popover">…</MapPopoverContent>
|
|
168
|
+
* </MapPopover>
|
|
169
|
+
* ```
|
|
170
|
+
*/
|
|
171
|
+
declare const MapPopover: typeof Popover;
|
|
172
|
+
/**
|
|
173
|
+
* Props for the MapPopover component.
|
|
174
|
+
*/
|
|
175
|
+
type MapPopoverProps = PopoverProps;
|
|
176
|
+
/**
|
|
177
|
+
* Virtual anchor that positions the popover without rendering a trigger.
|
|
178
|
+
* Re-exports `PopoverAnchor` so consumers import everything from the map module.
|
|
179
|
+
*/
|
|
180
|
+
declare const MapPopoverAnchor: React.ForwardRefExoticComponent<Omit<PopoverAnchorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
181
|
+
/**
|
|
182
|
+
* Props for the MapPopoverAnchor component.
|
|
183
|
+
*/
|
|
184
|
+
type MapPopoverAnchorProps = PopoverAnchorProps;
|
|
185
|
+
/**
|
|
186
|
+
* Props for the MapPopoverContent component.
|
|
187
|
+
*/
|
|
188
|
+
interface MapPopoverContentProps extends PopoverContentProps {
|
|
189
|
+
/** Test hook identifier */
|
|
190
|
+
dataHook: string;
|
|
191
|
+
/** Analytics element identifier */
|
|
192
|
+
trackingEl?: string;
|
|
193
|
+
/** Analytics label */
|
|
194
|
+
trackingLabel?: string;
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* Popover content panel with map-specific defaults.
|
|
198
|
+
* Compact sizing (`w-auto p-3`), top placement, and focus-prevention
|
|
199
|
+
* for hover-activated popovers.
|
|
200
|
+
*
|
|
201
|
+
* Use inside a controlled `<MapPopover open={!!activeItem}>` together
|
|
202
|
+
* with `MapPopoverAnchor` and {@link useMapPopoverHover}.
|
|
203
|
+
*/
|
|
204
|
+
declare const MapPopoverContent: React.ForwardRefExoticComponent<Omit<MapPopoverContentProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
205
|
+
export { MapTypeId, MapLocationPin, MapGridPin, MapControlButton, MapLoadingState, MapErrorState, MapLegend, MapPopover, MapPopoverAnchor, MapPopoverContent, useMapPopoverHover, };
|
|
206
|
+
export type { MapTypeIdValue, MapLocationPinProps, MapGridPinProps, MapGridPinVariant, MapControlButtonProps, MapLoadingStateProps, MapErrorStateProps, MapLegendProps, MapPopoverProps, MapPopoverAnchorProps, MapPopoverContentProps, UseMapPopoverHoverReturn, };
|
|
207
|
+
//# sourceMappingURL=map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../src/components/map.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EACL,OAAO,EAGP,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACzB,MAAM,oCAAoC,CAAC;AAM5C;;;;GAIG;AACH,QAAA,MAAM,SAAS;IACb,4BAA4B;;IAE5B,wBAAwB;;CAEhB,CAAC;AAEX;;GAEG;AACH,KAAK,cAAc,GAAG,CAAC,OAAO,SAAS,CAAC,CAAC,MAAM,OAAO,SAAS,CAAC,CAAC;AAMjE,KAAK,iBAAiB,GAClB,SAAS,GACT,WAAW,GACX,aAAa,GACb,SAAS,GACT,SAAS,CAAC;AAUd;;GAEG;AACH,UAAU,eAAgB,SAAQ,IAAI,CACpC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAC9B,UAAU,GAAG,MAAM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;GAWG;AACH,QAAA,MAAM,UAAU,gBAAU,CAAC;AAE3B;;GAEG;AACH,KAAK,eAAe,GAAG,YAAY,CAAC;AAEpC;;;GAGG;AACH,QAAA,MAAM,gBAAgB,wGAAgB,CAAC;AAGvC;;GAEG;AACH,KAAK,qBAAqB,GAAG,kBAAkB,CAAC;AAMhD;;GAEG;AACH,UAAU,sBAAuB,SAAQ,mBAAmB;IAC1D,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,sBAAsB;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,iBAAiB,4GAgCtB,CAAC;AAQF,OAAO,EACL,SAAS,EACT,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,aAAa,EACb,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,GACnB,CAAC;AAEF,YAAY,EACV,cAAc,EACd,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,eAAe,EACf,qBAAqB,EACrB,sBAAsB,EACtB,wBAAwB,GACzB,CAAC"}
|
package/dist/map.js
ADDED
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
import { jsx as l, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { AlertCircle as v } from "@brightlocal/icons";
|
|
4
|
+
import { Button as u } from "@brightlocal/ui-components/button";
|
|
5
|
+
import { Card as h, CardContent as x } from "@brightlocal/ui-components/card";
|
|
6
|
+
import { cn as p } from "@brightlocal/ui-components/lib/utils";
|
|
7
|
+
import { Popover as y, PopoverAnchor as N, PopoverContent as M } from "@brightlocal/ui-components/popover";
|
|
8
|
+
const B = {
|
|
9
|
+
/** Default road map view */
|
|
10
|
+
ROADMAP: "roadmap",
|
|
11
|
+
/** Satellite imagery */
|
|
12
|
+
SATELLITE: "satellite"
|
|
13
|
+
}, w = {
|
|
14
|
+
primary: "var(--primary)",
|
|
15
|
+
secondary: "var(--secondary)",
|
|
16
|
+
destructive: "var(--destructive)",
|
|
17
|
+
outline: "var(--muted)",
|
|
18
|
+
warning: "var(--warning-background)"
|
|
19
|
+
}, g = s.forwardRef(
|
|
20
|
+
({
|
|
21
|
+
value: t,
|
|
22
|
+
variant: r = "primary",
|
|
23
|
+
pulse: a = !1,
|
|
24
|
+
dataHook: o,
|
|
25
|
+
className: n,
|
|
26
|
+
trackingEl: e,
|
|
27
|
+
trackingLabel: i,
|
|
28
|
+
...d
|
|
29
|
+
}, c) => /* @__PURE__ */ l(
|
|
30
|
+
u,
|
|
31
|
+
{
|
|
32
|
+
ref: c,
|
|
33
|
+
className: p(
|
|
34
|
+
"size-8 p-0",
|
|
35
|
+
a && "animate-grid-pin-pulse transition-none motion-reduce:animate-none",
|
|
36
|
+
n
|
|
37
|
+
),
|
|
38
|
+
dataHook: o,
|
|
39
|
+
size: "sm",
|
|
40
|
+
style: a ? {
|
|
41
|
+
"--grid-pin-pulse-color": w[r]
|
|
42
|
+
} : void 0,
|
|
43
|
+
trackingEl: e || "map-grid-pin",
|
|
44
|
+
trackingLabel: i,
|
|
45
|
+
variant: r,
|
|
46
|
+
...d,
|
|
47
|
+
children: String(t)
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
g.displayName = "MapGridPin";
|
|
52
|
+
const k = s.forwardRef(
|
|
53
|
+
({ value: t = 1, dataHook: r, ...a }, o) => /* @__PURE__ */ l(g, { ref: o, dataHook: r, value: t, ...a })
|
|
54
|
+
);
|
|
55
|
+
k.displayName = "MapLocationPin";
|
|
56
|
+
const P = s.forwardRef(
|
|
57
|
+
({ className: t, dataHook: r, trackingEl: a, trackingLabel: o, children: n, ...e }, i) => /* @__PURE__ */ l(
|
|
58
|
+
u,
|
|
59
|
+
{
|
|
60
|
+
ref: i,
|
|
61
|
+
className: p("rounded-lg shadow-sm", t),
|
|
62
|
+
"data-slot": "map-control-button",
|
|
63
|
+
dataHook: r,
|
|
64
|
+
trackingEl: a || "map-control-button",
|
|
65
|
+
trackingLabel: o,
|
|
66
|
+
variant: "outline",
|
|
67
|
+
...e,
|
|
68
|
+
children: n
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
);
|
|
72
|
+
P.displayName = "MapControlButton";
|
|
73
|
+
const b = s.forwardRef(
|
|
74
|
+
({
|
|
75
|
+
className: t,
|
|
76
|
+
message: r = "Loading map…",
|
|
77
|
+
dataHook: a,
|
|
78
|
+
trackingEl: o,
|
|
79
|
+
trackingLabel: n,
|
|
80
|
+
...e
|
|
81
|
+
}, i) => /* @__PURE__ */ m(
|
|
82
|
+
"div",
|
|
83
|
+
{
|
|
84
|
+
ref: i,
|
|
85
|
+
"aria-live": "polite",
|
|
86
|
+
className: p(
|
|
87
|
+
"text-muted-foreground flex items-center justify-center gap-2 py-6 text-sm",
|
|
88
|
+
t
|
|
89
|
+
),
|
|
90
|
+
"data-hook": a,
|
|
91
|
+
"data-slot": "map-loading-state",
|
|
92
|
+
"data-tracking-el": o || "map-loading-state",
|
|
93
|
+
"data-tracking-label": n,
|
|
94
|
+
role: "status",
|
|
95
|
+
...e,
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ l(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
"aria-hidden": "true",
|
|
101
|
+
className: "size-4 animate-spin rounded-full border-2 border-current border-t-transparent"
|
|
102
|
+
}
|
|
103
|
+
),
|
|
104
|
+
r
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
);
|
|
109
|
+
b.displayName = "MapLoadingState";
|
|
110
|
+
const C = s.forwardRef(
|
|
111
|
+
({
|
|
112
|
+
className: t,
|
|
113
|
+
title: r = "Unable to load map",
|
|
114
|
+
message: a = "Something went wrong while loading the map. Please try again.",
|
|
115
|
+
onRetry: o,
|
|
116
|
+
dataHook: n,
|
|
117
|
+
trackingEl: e,
|
|
118
|
+
trackingLabel: i,
|
|
119
|
+
...d
|
|
120
|
+
}, c) => /* @__PURE__ */ m(
|
|
121
|
+
"div",
|
|
122
|
+
{
|
|
123
|
+
ref: c,
|
|
124
|
+
className: p(
|
|
125
|
+
"bg-muted/50 flex flex-col items-center justify-center gap-3 rounded-xl p-8 text-center",
|
|
126
|
+
t
|
|
127
|
+
),
|
|
128
|
+
"data-hook": n,
|
|
129
|
+
"data-slot": "map-error-state",
|
|
130
|
+
"data-tracking-el": e || "map-error-state",
|
|
131
|
+
"data-tracking-label": i,
|
|
132
|
+
role: "alert",
|
|
133
|
+
...d,
|
|
134
|
+
children: [
|
|
135
|
+
/* @__PURE__ */ l(
|
|
136
|
+
v,
|
|
137
|
+
{
|
|
138
|
+
"aria-hidden": "true",
|
|
139
|
+
className: "text-muted-foreground/60",
|
|
140
|
+
size: 40,
|
|
141
|
+
strokeWidth: 1.5
|
|
142
|
+
}
|
|
143
|
+
),
|
|
144
|
+
/* @__PURE__ */ m("div", { className: "flex flex-col gap-1", children: [
|
|
145
|
+
/* @__PURE__ */ l(
|
|
146
|
+
"h3",
|
|
147
|
+
{
|
|
148
|
+
className: "text-foreground text-sm font-semibold",
|
|
149
|
+
"data-slot": "map-error-title",
|
|
150
|
+
children: r
|
|
151
|
+
}
|
|
152
|
+
),
|
|
153
|
+
a && /* @__PURE__ */ l(
|
|
154
|
+
"p",
|
|
155
|
+
{
|
|
156
|
+
className: "text-muted-foreground max-w-xs text-xs",
|
|
157
|
+
"data-slot": "map-error-message",
|
|
158
|
+
children: a
|
|
159
|
+
}
|
|
160
|
+
)
|
|
161
|
+
] }),
|
|
162
|
+
o && /* @__PURE__ */ l(
|
|
163
|
+
u,
|
|
164
|
+
{
|
|
165
|
+
className: "mt-1",
|
|
166
|
+
dataHook: `${n}-retry`,
|
|
167
|
+
size: "sm",
|
|
168
|
+
variant: "primary",
|
|
169
|
+
onClick: o,
|
|
170
|
+
children: "Try again"
|
|
171
|
+
}
|
|
172
|
+
)
|
|
173
|
+
]
|
|
174
|
+
}
|
|
175
|
+
)
|
|
176
|
+
);
|
|
177
|
+
C.displayName = "MapErrorState";
|
|
178
|
+
const A = s.forwardRef(
|
|
179
|
+
({ className: t, dataHook: r, trackingEl: a, trackingLabel: o, children: n, ...e }, i) => /* @__PURE__ */ l(
|
|
180
|
+
h,
|
|
181
|
+
{
|
|
182
|
+
ref: i,
|
|
183
|
+
className: p("inline-flex w-auto flex-row items-center", t),
|
|
184
|
+
"data-slot": "map-legend",
|
|
185
|
+
dataHook: r,
|
|
186
|
+
density: "condensed",
|
|
187
|
+
maxWidth: "none",
|
|
188
|
+
trackingEl: a || "map-legend",
|
|
189
|
+
trackingLabel: o,
|
|
190
|
+
variant: "filled",
|
|
191
|
+
...e,
|
|
192
|
+
children: /* @__PURE__ */ l(x, { className: "flex items-center gap-3", children: n })
|
|
193
|
+
}
|
|
194
|
+
)
|
|
195
|
+
);
|
|
196
|
+
A.displayName = "MapLegend";
|
|
197
|
+
function D(t = 150) {
|
|
198
|
+
const [r, a] = s.useState(null), [o, n] = s.useState(null), e = s.useRef(null), i = s.useCallback((f) => {
|
|
199
|
+
e.current && clearTimeout(e.current), n(f), a(f);
|
|
200
|
+
}, []), d = s.useCallback(() => {
|
|
201
|
+
e.current && clearTimeout(e.current), e.current = setTimeout(() => a(null), t);
|
|
202
|
+
}, [t]), c = s.useCallback(() => {
|
|
203
|
+
e.current && clearTimeout(e.current);
|
|
204
|
+
}, []);
|
|
205
|
+
return {
|
|
206
|
+
activeItem: r,
|
|
207
|
+
anchorItem: o,
|
|
208
|
+
showItem: i,
|
|
209
|
+
scheduleClose: d,
|
|
210
|
+
cancelClose: c
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
const G = y, R = N;
|
|
214
|
+
R.displayName = "MapPopoverAnchor";
|
|
215
|
+
const L = s.forwardRef(
|
|
216
|
+
({
|
|
217
|
+
className: t,
|
|
218
|
+
side: r = "top",
|
|
219
|
+
sideOffset: a = 4,
|
|
220
|
+
dataHook: o,
|
|
221
|
+
trackingEl: n,
|
|
222
|
+
trackingLabel: e,
|
|
223
|
+
...i
|
|
224
|
+
}, d) => /* @__PURE__ */ l(
|
|
225
|
+
M,
|
|
226
|
+
{
|
|
227
|
+
ref: d,
|
|
228
|
+
className: p(
|
|
229
|
+
"w-auto p-3 data-[state=closed]:animate-none data-[state=closed]:opacity-0",
|
|
230
|
+
t
|
|
231
|
+
),
|
|
232
|
+
"data-slot": "map-popover-content",
|
|
233
|
+
"data-tracking-el": n || "map-popover",
|
|
234
|
+
"data-tracking-label": e,
|
|
235
|
+
dataHook: o,
|
|
236
|
+
side: r,
|
|
237
|
+
sideOffset: a,
|
|
238
|
+
onOpenAutoFocus: (c) => c.preventDefault(),
|
|
239
|
+
...i
|
|
240
|
+
}
|
|
241
|
+
)
|
|
242
|
+
);
|
|
243
|
+
L.displayName = "MapPopoverContent";
|
|
244
|
+
export {
|
|
245
|
+
P as MapControlButton,
|
|
246
|
+
C as MapErrorState,
|
|
247
|
+
g as MapGridPin,
|
|
248
|
+
A as MapLegend,
|
|
249
|
+
b as MapLoadingState,
|
|
250
|
+
k as MapLocationPin,
|
|
251
|
+
G as MapPopover,
|
|
252
|
+
R as MapPopoverAnchor,
|
|
253
|
+
L as MapPopoverContent,
|
|
254
|
+
B as MapTypeId,
|
|
255
|
+
D as useMapPopoverHover
|
|
256
|
+
};
|
package/dist/pagination.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),j=require("react"),d=require("@brightlocal/icons"),N=require("class-variance-authority"),f=require("@brightlocal/ui-components/lib/utils");function k(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>a[n]})}}return e.default=a,Object.freeze(e)}const l=k(j);function w({page:a,totalPages:e,siblingCount:n=1,boundaryCount:i=1}){return l.useMemo(()=>{const r=[];r.push("previous");const u=Math.max(a-n,i+1),p=Math.min(a+n,e-i),b=u>i+2,P=p<e-i-1;for(let t=1;t<=Math.min(i,e);t++)r.push(t);if(b)r.push("ellipsis");else if(i+1<u)for(let t=i+1;t<u;t++)r.push(t);for(let t=u;t<=p;t++)t>i&&t<=e-i&&r.push(t);if(P)r.push("ellipsis");else if(p<e-i)for(let t=p+1;t<e-i+1;t++)r.push(t);for(let t=Math.max(e-i+1,i+1);t<=e;t++)t>i&&r.push(t);return r.push("next"),r},[a,e,n,i])}const g=N.cva(["inline-flex items-center justify-center","h-9 w-9","rounded-full","text-sm font-medium","transition-colors","focus-visible:outline-none focus-visible:shadow-default"],{variants:{variant:{previous:["text-foreground","hover:bg-accent","aria-disabled:opacity-50 aria-disabled:cursor-default aria-disabled:pointer-events-none"],next:["text-foreground","hover:bg-accent","aria-disabled:opacity-50 aria-disabled:cursor-default aria-disabled:pointer-events-none"],link:["text-foreground","hover:bg-accent hover:text-accent-foreground","aria-[current=page]:bg-background aria-[current=page]:border aria-[current=page]:border-input","dark:aria-[current=page]:bg-input/30","aria-[current=page]:hover:bg-accent","aria-[current=page]:focus-visible:border-ring","aria-disabled:opacity-50 aria-disabled:cursor-default aria-disabled:pointer-events-none"],ellipsis:["cursor-default","text-foreground","pointer-events-none"]}},defaultVariants:{variant:"link"}});function h({className:a,dataHook:e,trackingEl:n,trackingLabel:i,ariaLabel:o
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),j=require("react"),d=require("@brightlocal/icons"),N=require("class-variance-authority"),f=require("@brightlocal/ui-components/lib/utils");function k(a){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const n in a)if(n!=="default"){const i=Object.getOwnPropertyDescriptor(a,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:()=>a[n]})}}return e.default=a,Object.freeze(e)}const l=k(j);function w({page:a,totalPages:e,siblingCount:n=1,boundaryCount:i=1}){return l.useMemo(()=>{const r=[];r.push("previous");const u=Math.max(a-n,i+1),p=Math.min(a+n,e-i),b=u>i+2,P=p<e-i-1;for(let t=1;t<=Math.min(i,e);t++)r.push(t);if(b)r.push("ellipsis");else if(i+1<u)for(let t=i+1;t<u;t++)r.push(t);for(let t=u;t<=p;t++)t>i&&t<=e-i&&r.push(t);if(P)r.push("ellipsis");else if(p<e-i)for(let t=p+1;t<e-i+1;t++)r.push(t);for(let t=Math.max(e-i+1,i+1);t<=e;t++)t>i&&r.push(t);return r.push("next"),r},[a,e,n,i])}const g=N.cva(["inline-flex items-center justify-center","h-9 w-9","rounded-full","text-sm font-medium","transition-colors","focus-visible:outline-none focus-visible:shadow-default"],{variants:{variant:{previous:["text-foreground","hover:bg-accent","aria-disabled:opacity-50 aria-disabled:cursor-default aria-disabled:pointer-events-none"],next:["text-foreground","hover:bg-accent","aria-disabled:opacity-50 aria-disabled:cursor-default aria-disabled:pointer-events-none"],link:["text-foreground","hover:bg-accent hover:text-accent-foreground","aria-[current=page]:bg-background aria-[current=page]:border aria-[current=page]:border-input","dark:aria-[current=page]:bg-input/30","aria-[current=page]:hover:bg-accent","aria-[current=page]:focus-visible:border-ring","aria-disabled:opacity-50 aria-disabled:cursor-default aria-disabled:pointer-events-none"],ellipsis:["cursor-default","text-foreground","pointer-events-none"]}},defaultVariants:{variant:"link"}});function h({className:a,dataHook:e,trackingEl:n,trackingLabel:i,ariaLabel:o,...r}){return s.jsx("nav",{"aria-label":o??"Pagination",className:f.cn("mx-auto flex w-full justify-center",a),"data-hook":e,"data-slot":"pagination","data-tracking-el":n||"pagination","data-tracking-label":i,role:"navigation",...r})}h.displayName="Pagination";function M({className:a,...e}){return s.jsx("ul",{className:f.cn("flex flex-row items-center gap-2",a),"data-slot":"pagination-content",...e})}function R(a){return s.jsx("li",{"data-slot":"pagination-item",...a})}const c=l.forwardRef(({className:a,variant:e,isActive:n,children:i,...o},r)=>s.jsx("button",{ref:r,"aria-current":n?"page":void 0,className:f.cn(g({variant:e}),a),"data-active":n,"data-slot":"pagination-button",type:"button",...o,children:i}));c.displayName="PaginationButton";const x=l.forwardRef(({className:a,disabled:e,ariaLabel:n,...i},o)=>s.jsx(c,{ref:o,"aria-disabled":e,"aria-label":n??"Go to previous page",className:a,disabled:e,variant:"previous",...i,children:s.jsx(d.ChevronLeft,{})}));x.displayName="PaginationPrevious";const v=l.forwardRef(({className:a,disabled:e,ariaLabel:n,...i},o)=>s.jsx(c,{ref:o,"aria-disabled":e,"aria-label":n??"Go to next page",className:a,disabled:e,variant:"next",...i,children:s.jsx(d.ChevronRight,{})}));v.displayName="PaginationNext";const m=l.forwardRef(({className:a,page:e,isActive:n,ariaLabel:i,...o},r)=>s.jsx(c,{ref:r,"aria-label":i?i.replace("{page}",String(e)):`Go to page ${e}`,className:a,isActive:n,variant:"link",...o,children:e}));m.displayName="PaginationLink";function S({className:a,srLabel:e="More pages",...n}){return s.jsxs("span",{"aria-hidden":"true",className:f.cn(g({variant:"ellipsis"}),a),"data-slot":"pagination-ellipsis",...n,children:[s.jsx(d.MoreHorizontal,{}),s.jsx("span",{className:"sr-only",children:e})]})}exports.Pagination=h;exports.PaginationButton=c;exports.PaginationContent=M;exports.PaginationEllipsis=S;exports.PaginationItem=R;exports.PaginationLink=m;exports.PaginationNext=v;exports.PaginationPrevious=x;exports.usePagination=w;
|
package/dist/pagination.d.ts
CHANGED
|
@@ -44,7 +44,10 @@ interface PaginationProps extends React.ComponentProps<"nav"> {
|
|
|
44
44
|
trackingEl?: string;
|
|
45
45
|
/** Tracking label for analytics context */
|
|
46
46
|
trackingLabel?: string;
|
|
47
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Accessible label for the pagination navigation (for unique landmark identification).
|
|
49
|
+
* @default "Pagination"
|
|
50
|
+
*/
|
|
48
51
|
ariaLabel?: string;
|
|
49
52
|
}
|
|
50
53
|
declare function Pagination({ className, dataHook, trackingEl, trackingLabel, ariaLabel, ...props }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -61,19 +64,42 @@ declare const PaginationButton: React.ForwardRefExoticComponent<Omit<PaginationB
|
|
|
61
64
|
interface PaginationPreviousProps extends Omit<PaginationButtonProps, "variant"> {
|
|
62
65
|
/** Whether the previous button is disabled (on first page) */
|
|
63
66
|
disabled?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Accessible label for the previous-page button.
|
|
69
|
+
* @default "Go to previous page"
|
|
70
|
+
*/
|
|
71
|
+
ariaLabel?: string;
|
|
64
72
|
}
|
|
65
73
|
declare const PaginationPrevious: React.ForwardRefExoticComponent<Omit<PaginationPreviousProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
66
74
|
interface PaginationNextProps extends Omit<PaginationButtonProps, "variant"> {
|
|
67
75
|
/** Whether the next button is disabled (on last page) */
|
|
68
76
|
disabled?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Accessible label for the next-page button.
|
|
79
|
+
* @default "Go to next page"
|
|
80
|
+
*/
|
|
81
|
+
ariaLabel?: string;
|
|
69
82
|
}
|
|
70
83
|
declare const PaginationNext: React.ForwardRefExoticComponent<Omit<PaginationNextProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
71
84
|
interface PaginationLinkProps extends Omit<PaginationButtonProps, "variant"> {
|
|
72
85
|
/** Page number to display */
|
|
73
86
|
page: number;
|
|
87
|
+
/**
|
|
88
|
+
* Accessible label for the page button.
|
|
89
|
+
* Supports `{page}` placeholder for interpolation.
|
|
90
|
+
* @default "Go to page {page}"
|
|
91
|
+
*/
|
|
92
|
+
ariaLabel?: string;
|
|
74
93
|
}
|
|
75
94
|
declare const PaginationLink: React.ForwardRefExoticComponent<Omit<PaginationLinkProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
76
|
-
|
|
95
|
+
interface PaginationEllipsisProps extends React.ComponentProps<"span"> {
|
|
96
|
+
/**
|
|
97
|
+
* Screen-reader-only label for the ellipsis.
|
|
98
|
+
* @default "More pages"
|
|
99
|
+
*/
|
|
100
|
+
srLabel?: string;
|
|
101
|
+
}
|
|
102
|
+
declare function PaginationEllipsis({ className, srLabel, ...props }: PaginationEllipsisProps): import("react/jsx-runtime").JSX.Element;
|
|
77
103
|
export type { PaginationItemType };
|
|
78
|
-
export { Pagination, PaginationContent, PaginationItem, PaginationButton, PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis, type PaginationProps, type PaginationButtonProps, type PaginationLinkProps, type PaginationPreviousProps, type PaginationNextProps, };
|
|
104
|
+
export { Pagination, PaginationContent, PaginationItem, PaginationButton, PaginationLink, PaginationPrevious, PaginationNext, PaginationEllipsis, type PaginationProps, type PaginationButtonProps, type PaginationLinkProps, type PaginationPreviousProps, type PaginationNextProps, type PaginationEllipsisProps, };
|
|
79
105
|
//# sourceMappingURL=pagination.d.ts.map
|
package/dist/pagination.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../src/components/pagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,UAAU,CAAC;AAE1E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wDAAwD;IACxD,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,KAAK,kBAAkB,GAA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