@dartcom/ui-kit 10.2.2 → 10.2.4

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.
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAwBzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/icon/icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE1C,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAuCzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { IconButton } from '.';
2
+ import type { Meta, StoryObj } from '@storybook/react-vite';
3
+ declare const meta: Meta<typeof IconButton>;
4
+ export default meta;
5
+ type Story = StoryObj<typeof meta>;
6
+ export declare const Save: Story;
7
+ export declare const SaveWithTitle: Story;
8
+ export declare const Edit: Story;
9
+ export declare const EditWithTitle: Story;
10
+ export declare const Move: Story;
11
+ export declare const MoveWithTitle: Story;
12
+ export declare const Reset: Story;
13
+ export declare const ResetWithTitle: Story;
14
+ //# sourceMappingURL=icon.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"icon.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/icon/icon.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,CAAC;AAE/B,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,E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,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;;;;CAqHvE,CAAC"}
1
+ {"version":3,"file":"useGetLeafletLayer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/lib/hooks/useGetLeafletLayer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKnC,OAAO,EAEL,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,YAAY,EACZ,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAKlB,eAAO,MAAM,kBAAkB,GAAI,oBAEhC;IACD,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C;;;;4BAyGgB,kBAAkB;4BA0BlB,mBAAmB,CAAC,MAAM,CAAC;+BAa1B,mBAAmB,CAAC,MAAM,CAAC,UAC/B,mBAAmB,CAAC,KAAK,CAAC;+BAWvB,kBAAkB;sBASvB,kBAAkB;yBAyClB,kBAAkB;gCAaR;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;gCAWzC,kBAAkB;gDAgBL;QAAE,KAAK,EAAE,kBAAkB,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;;;;CAqHvE,CAAC"}
package/dist/index.cjs CHANGED
@@ -12043,10 +12043,17 @@ const icons = {
12043
12043
  const IconButton = ({ title, iconProps, ...props }) => {
12044
12044
  const buttonId = React__namespace.useId();
12045
12045
  const Icon = icons[iconProps.name];
12046
+ const iconColor = iconProps.color ?? 'primary';
12046
12047
  if (title) {
12047
- return (jsxRuntime.jsx(material.Tooltip, { title: title, children: jsxRuntime.jsx(material.IconButton, { id: buttonId, ...props, children: jsxRuntime.jsx(Icon, { fontSize: "medium", color: iconProps.color ?? 'primary' }) }) }));
12048
+ return (jsxRuntime.jsx(material.Tooltip, { title: title, children: jsxRuntime.jsx(material.IconButton, { id: buttonId, ...props, onClick: (event) => {
12049
+ event.stopPropagation();
12050
+ props.onClick?.(event);
12051
+ }, children: jsxRuntime.jsx(Icon, { fontSize: "medium", color: iconColor }) }) }));
12048
12052
  }
12049
- return (jsxRuntime.jsx(material.IconButton, { id: buttonId, ...props, children: jsxRuntime.jsx(Icon, { fontSize: "medium", color: iconProps.color ?? 'primary' }) }));
12053
+ return (jsxRuntime.jsx(material.IconButton, { id: buttonId, onClick: (event) => {
12054
+ event.stopPropagation();
12055
+ props.onClick?.(event);
12056
+ }, children: jsxRuntime.jsx(Icon, { fontSize: "medium", color: iconColor }) }));
12050
12057
  };
12051
12058
 
12052
12059
  const VisuallyHiddenInput = material.styled('input')({
@@ -26043,7 +26050,9 @@ const useGetLeafletLayer = ({ eventHandlers, }) => {
26043
26050
  setConfig(config);
26044
26051
  },
26045
26052
  });
26046
- leafletLayer.on('load', () => {
26053
+ leafletLayer.on('load', ({ sourceTarget }) => {
26054
+ const map = sourceTarget._map;
26055
+ const mapContainer = map.getContainer();
26047
26056
  leafletLayer.setSelectionEvents({
26048
26057
  click: ({ feature, leaflet_event }) => {
26049
26058
  if (feature) {
@@ -26056,12 +26065,16 @@ const useGetLeafletLayer = ({ eventHandlers, }) => {
26056
26065
  },
26057
26066
  hover: ({ feature, leaflet_event }) => {
26058
26067
  if (feature) {
26068
+ mapContainer.style.cursor = 'pointer';
26059
26069
  const { source_layer, properties } = feature;
26060
26070
  eventHandlers?.[source_layer]?.hover?.({
26061
26071
  leaflet_event,
26062
26072
  properties,
26063
26073
  });
26064
26074
  }
26075
+ else {
26076
+ mapContainer.style.cursor = 'default';
26077
+ }
26065
26078
  },
26066
26079
  });
26067
26080
  });