@dartcom/ui-kit 10.2.10 → 10.2.12

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.
@@ -0,0 +1,4 @@
1
+ export type TestingProps = {
2
+ ['data-testId']?: string;
3
+ };
4
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/__test__/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,CAAC,aAAa,CAAC,CAAC,EAAE,MAAM,CAAC;CAC1B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=button.spec.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.spec.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/button.spec.tsx"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAW5C,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAmF7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAgB/B,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAW5C,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CA4F7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -4,5 +4,7 @@ declare const meta: Meta<typeof DeleteButton>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof meta>;
6
6
  export declare const Primary: Story;
7
+ export declare const Disabled: Story;
7
8
  export declare const WithNotification: Story;
9
+ export declare const DisabledWithNotification: Story;
8
10
  //# sourceMappingURL=delete.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"delete.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AAEjC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CASnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAS9B,CAAC"}
1
+ {"version":3,"file":"delete.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/delete.stories.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG,CAAC;AAEjC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAK5D,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,YAAY,CAcnC,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAItB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAS9B,CAAC;AAEF,eAAO,MAAM,wBAAwB,EAAE,KAUtC,CAAC"}
@@ -1,5 +1,7 @@
1
- export type DeleteButtonProps = {
1
+ import { TestingProps } from '../../../__test__/types';
2
+ export type DeleteButtonProps = TestingProps & {
2
3
  onDelete: () => void;
4
+ disabled?: boolean;
3
5
  notification?: {
4
6
  title: string;
5
7
  description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,YAAY,CAAC,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/buttons/delete/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAEhD,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG;IAC7C,QAAQ,EAAE,MAAM,IAAI,CAAC;IAErB,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,YAAY,CAAC,EAAE;QACb,KAAK,EAAE,MAAM,CAAC;QACd,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC"}
package/dist/index.cjs CHANGED
@@ -14803,7 +14803,7 @@ const IconButton = ({ title, iconProps, ...props }) => {
14803
14803
  const Transition = React__namespace.forwardRef(function Transition(props, ref) {
14804
14804
  return jsxRuntime.jsx(material.Slide, { direction: "up", ref: ref, ...props });
14805
14805
  });
14806
- const DeleteButton = ({ notification, onDelete, }) => {
14806
+ const DeleteButton = ({ notification, onDelete, disabled = false, ...props }) => {
14807
14807
  const id = React__namespace.useId();
14808
14808
  const [openNotification, setOpenNotification] = React__namespace.useState(false);
14809
14809
  const handleOpenNotification = () => {
@@ -14812,13 +14812,13 @@ const DeleteButton = ({ notification, onDelete, }) => {
14812
14812
  const handleCloseNotification = () => {
14813
14813
  setOpenNotification(false);
14814
14814
  };
14815
- return (jsxRuntime.jsxs(React__namespace.Fragment, { children: [notification ? (jsxRuntime.jsx(material.Tooltip, { title: notification.title, children: jsxRuntime.jsx(IconButton, { iconProps: {
14816
- name: 'delete',
14817
- color: 'error',
14818
- }, onClick: handleOpenNotification }) })) : (jsxRuntime.jsx(IconButton, { iconProps: {
14819
- name: 'delete',
14820
- color: 'error',
14821
- }, onClick: onDelete })), notification ? (jsxRuntime.jsxs(material.Dialog, { slots: {
14815
+ const iconProps = React__namespace.useMemo(() => {
14816
+ return {
14817
+ name: 'delete',
14818
+ color: disabled ? 'disabled' : 'error',
14819
+ };
14820
+ }, [disabled]);
14821
+ return (jsxRuntime.jsxs(React__namespace.Fragment, { children: [notification ? (jsxRuntime.jsx(material.Tooltip, { title: notification.title, children: jsxRuntime.jsx(IconButton, { ...props, iconProps: iconProps, onClick: handleOpenNotification, disabled: disabled }) })) : (jsxRuntime.jsx(IconButton, { ...props, iconProps: iconProps, onClick: onDelete, disabled: disabled })), notification ? (jsxRuntime.jsxs(material.Dialog, { slots: {
14822
14822
  transition: Transition,
14823
14823
  }, open: openNotification, onClose: handleCloseNotification, children: [jsxRuntime.jsx(material.DialogTitle, { id: `${id}-dialog-title`, children: notification.title }), jsxRuntime.jsx(material.DialogContent, { children: jsxRuntime.jsx(material.DialogContentText, { id: `${id}-dialog-text`, children: notification.description }) }), jsxRuntime.jsxs(material.DialogActions, { children: [jsxRuntime.jsx(material.Button, { variant: "contained", color: "error", sx: {
14824
14824
  textTransform: 'none',
@@ -26058,7 +26058,7 @@ const generalizationBaseLayerDraw = {
26058
26058
  text,
26059
26059
  lines: {
26060
26060
  color: '#BABCC2',
26061
- width: 30,
26061
+ width: 10,
26062
26062
  cap: 'round',
26063
26063
  join: 'round',
26064
26064
  },
@@ -26102,7 +26102,7 @@ const getFilter = (zLvl) => {
26102
26102
  const filter = `function() {
26103
26103
  const { z_lvl = '0.0' } = feature;
26104
26104
 
26105
- const isFilter = z_lvl === '${zLvl}' && $zoom > ${generalizationZoom};
26105
+ const isFilter = z_lvl === '${zLvl}' && $zoom <= ${generalizationZoom};
26106
26106
 
26107
26107
  return isFilter;
26108
26108
  }`;
@@ -26135,7 +26135,7 @@ const getLinkLayers = (source) => {
26135
26135
  filter: `function() {
26136
26136
  const { functional_class, z_lvl = '0.0' } = feature;
26137
26137
 
26138
- const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom > ${generalizationZoom};
26138
+ const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom <= ${generalizationZoom};
26139
26139
 
26140
26140
  return isFilter;
26141
26141
  }`,
@@ -26158,7 +26158,7 @@ const getLinkLayers = (source) => {
26158
26158
  filter: `function() {
26159
26159
  const { functional_class, z_lvl = '0.0' } = feature;
26160
26160
 
26161
- const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom <= ${generalizationZoom};
26161
+ const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && $zoom > ${generalizationZoom};
26162
26162
 
26163
26163
  return isFilter;
26164
26164
  }`,
@@ -26175,7 +26175,7 @@ const getLinkLayers = (source) => {
26175
26175
  filter: `function() {
26176
26176
  const { functional_class, z_lvl = '0.0' } = feature;
26177
26177
 
26178
- const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature) && $zoom > ${generalizationZoom};
26178
+ const isFilter = z_lvl === '${zLvl}' && +functional_class === ${functionClass} && !global.links.getIsConstruction(feature) && !global.links.getIsFunctionalClass(feature) && $zoom <= ${generalizationZoom};
26179
26179
 
26180
26180
 
26181
26181
  return isFilter;
@@ -26210,7 +26210,7 @@ const getLinkLayers = (source) => {
26210
26210
  filter: `function() {
26211
26211
  const { z_lvl = '0.0' } = feature;
26212
26212
 
26213
- const isFilter = z_lvl === '${zLvl}' && $zoom <= ${generalizationZoom};
26213
+ const isFilter = z_lvl === '${zLvl}' && $zoom > ${generalizationZoom};
26214
26214
 
26215
26215
  return isFilter;
26216
26216
  }`,