@trackunit/react-map 0.2.44 → 0.2.46
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/index.cjs.js +4 -3
- package/index.esm.js +5 -4
- package/migrations/entry.js.map +1 -0
- package/package.json +10 -10
- package/src/panel/PanelIconButton.d.ts +3 -2
package/index.cjs.js
CHANGED
|
@@ -700,12 +700,13 @@ const SHAPE_STYLE_DEFAULTS = {
|
|
|
700
700
|
const PANEL_ICON_BUTTON_CLASS_NAME = tailwindMerge.twMerge("inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent p-1.5 text-neutral-600", "hover:bg-black/5 hover:text-neutral-700", "active:bg-black/10 active:text-neutral-800", "focus-visible:bg-black/10 focus-visible:text-neutral-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1", "disabled:cursor-not-allowed disabled:bg-transparent disabled:text-neutral-400");
|
|
701
701
|
/**
|
|
702
702
|
* Lightweight ghost icon button for map panel chrome. Skips `IconButton`'s
|
|
703
|
-
*
|
|
703
|
+
* Button stack so icon glyphs paint on the same frame as panel content, but
|
|
704
|
+
* still wraps the trigger in the shared `Tooltip` for hover labels.
|
|
704
705
|
*
|
|
705
706
|
* Consumers should pass decorative icons with `ariaHidden` and rely on
|
|
706
|
-
* `aria-label`
|
|
707
|
+
* `aria-label` for accessible naming and tooltip text.
|
|
707
708
|
*/
|
|
708
|
-
const PanelIconButton = ({ "aria-label": ariaLabel, children, disabled = false, onClick, "data-testid": dataTestId, }) => (jsxRuntime.jsx("button", { "aria-label": ariaLabel, className: PANEL_ICON_BUTTON_CLASS_NAME, "data-testid": dataTestId, disabled: disabled, onClick: onClick,
|
|
709
|
+
const PanelIconButton = ({ "aria-label": ariaLabel, children, disabled = false, onClick, "data-testid": dataTestId, }) => (jsxRuntime.jsx(reactComponents.Tooltip, { delayed: true, disabled: disabled, interactable: false, label: ariaLabel, children: jsxRuntime.jsx("button", { "aria-label": ariaLabel, className: PANEL_ICON_BUTTON_CLASS_NAME, "data-testid": dataTestId, disabled: disabled, onClick: onClick, type: "button", children: children }) }));
|
|
709
710
|
|
|
710
711
|
/**
|
|
711
712
|
* CSS `max-height` of the Panel shell — `min(320px, 40vh)`.
|
package/index.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ import { INITIAL_CAMERA_STATE, INITIAL_MAP_STATUS, KEYBOARD_PAN_AMOUNT, KEYBOARD
|
|
|
4
4
|
export { ANCHOR_SELECTOR, DEFAULT_MAP_APPEARANCE, HIT_SURFACE_SELECTOR, INITIAL_CAMERA_STATE, INITIAL_INTERACTION_STATE, INITIAL_MAP_STATE, INITIAL_MAP_STATUS, computeMarkerDomPortalZIndex, defineAdapter, geometryTypeToShapeType, mapAppearanceSchema, mapThemeSchema, mapTypeSchema } from '@trackunit/react-map-adapter-shared';
|
|
5
5
|
import { useSyncExternalStore, useMemo, useState, useRef, useCallback, useLayoutEffect, useEffect, useReducer, createContext, useContext, memo, Suspense, useId, Fragment as Fragment$1, forwardRef } from 'react';
|
|
6
6
|
import { cvaMerge } from '@trackunit/css-class-variance-utilities';
|
|
7
|
-
import { useMergeRefs, Icon, Spinner, Text, useMeasure, useContainerBreakpoints, useDebounce, useWatch, useKeyboardShortcut,
|
|
7
|
+
import { Tooltip, useMergeRefs, Icon, Spinner, Text, useMeasure, useContainerBreakpoints, useDebounce, useWatch, useKeyboardShortcut, IconButton, ToggleGroup as ToggleGroup$1, useIsFullscreen, Popover, PopoverTrigger, PopoverContent, MoreMenu, useHover as useHover$1, cvaInteractableItem, useLocalStorageReducer } from '@trackunit/react-components';
|
|
8
8
|
import { twMerge } from 'tailwind-merge';
|
|
9
9
|
import { useFloating, autoUpdate, offset, flip, useHover, safePolygon, useInteractions, shift, hide, useDismiss, useRole } from '@floating-ui/react';
|
|
10
10
|
import { createPortal } from 'react-dom';
|
|
@@ -699,12 +699,13 @@ const SHAPE_STYLE_DEFAULTS = {
|
|
|
699
699
|
const PANEL_ICON_BUTTON_CLASS_NAME = twMerge("inline-flex h-7 w-7 shrink-0 cursor-pointer items-center justify-center rounded-md border-0 bg-transparent p-1.5 text-neutral-600", "hover:bg-black/5 hover:text-neutral-700", "active:bg-black/10 active:text-neutral-800", "focus-visible:bg-black/10 focus-visible:text-neutral-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1", "disabled:cursor-not-allowed disabled:bg-transparent disabled:text-neutral-400");
|
|
700
700
|
/**
|
|
701
701
|
* Lightweight ghost icon button for map panel chrome. Skips `IconButton`'s
|
|
702
|
-
*
|
|
702
|
+
* Button stack so icon glyphs paint on the same frame as panel content, but
|
|
703
|
+
* still wraps the trigger in the shared `Tooltip` for hover labels.
|
|
703
704
|
*
|
|
704
705
|
* Consumers should pass decorative icons with `ariaHidden` and rely on
|
|
705
|
-
* `aria-label`
|
|
706
|
+
* `aria-label` for accessible naming and tooltip text.
|
|
706
707
|
*/
|
|
707
|
-
const PanelIconButton = ({ "aria-label": ariaLabel, children, disabled = false, onClick, "data-testid": dataTestId, }) => (jsx("button", { "aria-label": ariaLabel, className: PANEL_ICON_BUTTON_CLASS_NAME, "data-testid": dataTestId, disabled: disabled, onClick: onClick,
|
|
708
|
+
const PanelIconButton = ({ "aria-label": ariaLabel, children, disabled = false, onClick, "data-testid": dataTestId, }) => (jsx(Tooltip, { delayed: true, disabled: disabled, interactable: false, label: ariaLabel, children: jsx("button", { "aria-label": ariaLabel, className: PANEL_ICON_BUTTON_CLASS_NAME, "data-testid": dataTestId, disabled: disabled, onClick: onClick, type: "button", children: children }) }));
|
|
708
709
|
|
|
709
710
|
/**
|
|
710
711
|
* CSS `max-height` of the Panel shell — `min(320px, 40vh)`.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../libs/react/map/migrations/entry.ts"],"names":[],"mappings":"","sourcesContent":["export {};\n"]}
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/react-map",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.46",
|
|
4
4
|
"repository": "https://github.com/Trackunit/manager",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
7
7
|
"node": ">=24.x"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@trackunit/react-components": "2.
|
|
11
|
-
"@trackunit/css-class-variance-utilities": "1.13.
|
|
12
|
-
"@trackunit/react-form-components": "2.3.
|
|
13
|
-
"@trackunit/react-core-hooks": "1.19.
|
|
14
|
-
"@trackunit/geo-json-utils": "1.14.
|
|
15
|
-
"@trackunit/i18n-library-translation": "2.2.
|
|
10
|
+
"@trackunit/react-components": "2.4.0",
|
|
11
|
+
"@trackunit/css-class-variance-utilities": "1.13.90",
|
|
12
|
+
"@trackunit/react-form-components": "2.3.6",
|
|
13
|
+
"@trackunit/react-core-hooks": "1.19.5",
|
|
14
|
+
"@trackunit/geo-json-utils": "1.14.93",
|
|
15
|
+
"@trackunit/i18n-library-translation": "2.2.5",
|
|
16
16
|
"react-minimal-pie-chart": "^8.4.0",
|
|
17
|
-
"@trackunit/react-map-adapter-shared": "0.0.
|
|
18
|
-
"@trackunit/react-map-color-utils": "0.0.
|
|
19
|
-
"@trackunit/ui-design-tokens": "1.13.
|
|
17
|
+
"@trackunit/react-map-adapter-shared": "0.0.74",
|
|
18
|
+
"@trackunit/react-map-color-utils": "0.0.59",
|
|
19
|
+
"@trackunit/ui-design-tokens": "1.13.89",
|
|
20
20
|
"@floating-ui/react": "^0.26.25",
|
|
21
21
|
"es-toolkit": "^1.39.10",
|
|
22
22
|
"tailwind-merge": "^2.0.0",
|
|
@@ -8,9 +8,10 @@ export type PanelIconButtonProps = Readonly<{
|
|
|
8
8
|
}>;
|
|
9
9
|
/**
|
|
10
10
|
* Lightweight ghost icon button for map panel chrome. Skips `IconButton`'s
|
|
11
|
-
*
|
|
11
|
+
* Button stack so icon glyphs paint on the same frame as panel content, but
|
|
12
|
+
* still wraps the trigger in the shared `Tooltip` for hover labels.
|
|
12
13
|
*
|
|
13
14
|
* Consumers should pass decorative icons with `ariaHidden` and rely on
|
|
14
|
-
* `aria-label`
|
|
15
|
+
* `aria-label` for accessible naming and tooltip text.
|
|
15
16
|
*/
|
|
16
17
|
export declare const PanelIconButton: ({ "aria-label": ariaLabel, children, disabled, onClick, "data-testid": dataTestId, }: PanelIconButtonProps) => ReactElement;
|