@kubit-ui-web/react-charts 1.5.1 → 1.6.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.
Files changed (156) hide show
  1. package/dist/cjs/components/focusRing/components/FocusRingInline.d.ts +25 -0
  2. package/dist/cjs/components/focusRing/components/FocusRingInline.d.ts.map +1 -0
  3. package/dist/cjs/components/focusRing/components/FocusRingInline.js +37 -0
  4. package/dist/cjs/components/focusRing/components/FocusRingRenderer.d.ts +13 -0
  5. package/dist/cjs/components/focusRing/components/FocusRingRenderer.d.ts.map +1 -0
  6. package/dist/cjs/components/focusRing/components/FocusRingRenderer.js +25 -0
  7. package/dist/cjs/components/focusRing/components/FocusRingSeparate.d.ts +40 -0
  8. package/dist/cjs/components/focusRing/components/FocusRingSeparate.d.ts.map +1 -0
  9. package/dist/cjs/components/focusRing/components/FocusRingSeparate.js +45 -0
  10. package/dist/cjs/components/focusRing/focusRing.css +14 -0
  11. package/dist/cjs/components/focusRing/focusRing.d.ts +35 -0
  12. package/dist/cjs/components/focusRing/focusRing.d.ts.map +1 -0
  13. package/dist/cjs/components/focusRing/focusRing.js +44 -0
  14. package/dist/cjs/components/focusRing/focusRing.types.d.ts +40 -0
  15. package/dist/cjs/components/focusRing/focusRing.types.d.ts.map +1 -0
  16. package/dist/cjs/components/focusRing/focusRing.types.js +1 -0
  17. package/dist/cjs/components/focusRing/hooks/useFocusRingData.d.ts +27 -0
  18. package/dist/cjs/components/focusRing/hooks/useFocusRingData.d.ts.map +1 -0
  19. package/dist/cjs/components/focusRing/hooks/useFocusRingData.js +67 -0
  20. package/dist/cjs/components/focusRing/index.d.ts +3 -0
  21. package/dist/cjs/components/focusRing/index.d.ts.map +1 -0
  22. package/dist/cjs/components/focusRing/index.js +1 -0
  23. package/dist/cjs/components/focusRing/utils/composeRefs.d.ts +7 -0
  24. package/dist/cjs/components/focusRing/utils/composeRefs.d.ts.map +1 -0
  25. package/dist/cjs/components/focusRing/utils/composeRefs.js +16 -0
  26. package/dist/cjs/components/focusRing/utils/createAdaptiveFocusRings.d.ts +24 -0
  27. package/dist/cjs/components/focusRing/utils/createAdaptiveFocusRings.d.ts.map +1 -0
  28. package/dist/cjs/components/focusRing/utils/createAdaptiveFocusRings.js +141 -0
  29. package/dist/cjs/components/focusRing/utils/createBoundingBoxFocusRings.d.ts +33 -0
  30. package/dist/cjs/components/focusRing/utils/createBoundingBoxFocusRings.d.ts.map +1 -0
  31. package/dist/cjs/components/focusRing/utils/createBoundingBoxFocusRings.js +126 -0
  32. package/dist/cjs/components/focusRing/utils/utils.types.d.ts +52 -0
  33. package/dist/cjs/components/focusRing/utils/utils.types.d.ts.map +1 -0
  34. package/dist/cjs/components/focusRing/utils/utils.types.js +1 -0
  35. package/dist/cjs/components/index.d.ts +1 -0
  36. package/dist/cjs/components/index.d.ts.map +1 -1
  37. package/dist/cjs/components/index.js +1 -0
  38. package/dist/cjs/components/plot/plot.d.ts.map +1 -1
  39. package/dist/cjs/components/plot/plot.js +7 -19
  40. package/dist/cjs/components/zoomArea/components/SelectionArea.d.ts +3 -23
  41. package/dist/cjs/components/zoomArea/components/SelectionArea.d.ts.map +1 -1
  42. package/dist/cjs/components/zoomArea/components/SelectionArea.js +7 -39
  43. package/dist/cjs/components/zoomArea/components/ZoomHandler.d.ts +3 -3
  44. package/dist/cjs/components/zoomArea/components/ZoomHandler.d.ts.map +1 -1
  45. package/dist/cjs/components/zoomArea/components/ZoomHandler.js +2 -15
  46. package/dist/cjs/components/zoomArea/components/index.d.ts +1 -1
  47. package/dist/cjs/components/zoomArea/components/index.d.ts.map +1 -1
  48. package/dist/cjs/components/zoomArea/components/index.js +1 -1
  49. package/dist/cjs/components/zoomArea/zoomArea.js +6 -6
  50. package/dist/cjs/components/zoomArea/zoomArea.type.d.ts +1 -1
  51. package/dist/cjs/components/zoomArea/zoomArea.type.d.ts.map +1 -1
  52. package/dist/cjs/types/focusConfig.type.d.ts +15 -3
  53. package/dist/cjs/types/focusConfig.type.d.ts.map +1 -1
  54. package/dist/cjs/types/focusConfig.type.js +14 -1
  55. package/dist/esm/components/focusRing/components/FocusRingInline.d.ts +25 -0
  56. package/dist/esm/components/focusRing/components/FocusRingInline.d.ts.map +1 -0
  57. package/dist/esm/components/focusRing/components/FocusRingInline.js +37 -0
  58. package/dist/esm/components/focusRing/components/FocusRingRenderer.d.ts +13 -0
  59. package/dist/esm/components/focusRing/components/FocusRingRenderer.d.ts.map +1 -0
  60. package/dist/esm/components/focusRing/components/FocusRingRenderer.js +25 -0
  61. package/dist/esm/components/focusRing/components/FocusRingSeparate.d.ts +40 -0
  62. package/dist/esm/components/focusRing/components/FocusRingSeparate.d.ts.map +1 -0
  63. package/dist/esm/components/focusRing/components/FocusRingSeparate.js +45 -0
  64. package/dist/esm/components/focusRing/focusRing.css +14 -0
  65. package/dist/esm/components/focusRing/focusRing.d.ts +35 -0
  66. package/dist/esm/components/focusRing/focusRing.d.ts.map +1 -0
  67. package/dist/esm/components/focusRing/focusRing.js +44 -0
  68. package/dist/esm/components/focusRing/focusRing.types.d.ts +40 -0
  69. package/dist/esm/components/focusRing/focusRing.types.d.ts.map +1 -0
  70. package/dist/esm/components/focusRing/focusRing.types.js +1 -0
  71. package/dist/esm/components/focusRing/hooks/useFocusRingData.d.ts +27 -0
  72. package/dist/esm/components/focusRing/hooks/useFocusRingData.d.ts.map +1 -0
  73. package/dist/esm/components/focusRing/hooks/useFocusRingData.js +67 -0
  74. package/dist/esm/components/focusRing/index.d.ts +3 -0
  75. package/dist/esm/components/focusRing/index.d.ts.map +1 -0
  76. package/dist/esm/components/focusRing/index.js +1 -0
  77. package/dist/esm/components/focusRing/utils/composeRefs.d.ts +7 -0
  78. package/dist/esm/components/focusRing/utils/composeRefs.d.ts.map +1 -0
  79. package/dist/esm/components/focusRing/utils/composeRefs.js +16 -0
  80. package/dist/esm/components/focusRing/utils/createAdaptiveFocusRings.d.ts +24 -0
  81. package/dist/esm/components/focusRing/utils/createAdaptiveFocusRings.d.ts.map +1 -0
  82. package/dist/esm/components/focusRing/utils/createAdaptiveFocusRings.js +141 -0
  83. package/dist/esm/components/focusRing/utils/createBoundingBoxFocusRings.d.ts +33 -0
  84. package/dist/esm/components/focusRing/utils/createBoundingBoxFocusRings.d.ts.map +1 -0
  85. package/dist/esm/components/focusRing/utils/createBoundingBoxFocusRings.js +126 -0
  86. package/dist/esm/components/focusRing/utils/utils.types.d.ts +52 -0
  87. package/dist/esm/components/focusRing/utils/utils.types.d.ts.map +1 -0
  88. package/dist/esm/components/focusRing/utils/utils.types.js +1 -0
  89. package/dist/esm/components/index.d.ts +1 -0
  90. package/dist/esm/components/index.d.ts.map +1 -1
  91. package/dist/esm/components/index.js +1 -0
  92. package/dist/esm/components/plot/plot.d.ts.map +1 -1
  93. package/dist/esm/components/plot/plot.js +7 -19
  94. package/dist/esm/components/zoomArea/components/SelectionArea.d.ts +3 -23
  95. package/dist/esm/components/zoomArea/components/SelectionArea.d.ts.map +1 -1
  96. package/dist/esm/components/zoomArea/components/SelectionArea.js +7 -39
  97. package/dist/esm/components/zoomArea/components/ZoomHandler.d.ts +3 -3
  98. package/dist/esm/components/zoomArea/components/ZoomHandler.d.ts.map +1 -1
  99. package/dist/esm/components/zoomArea/components/ZoomHandler.js +2 -15
  100. package/dist/esm/components/zoomArea/components/index.d.ts +1 -1
  101. package/dist/esm/components/zoomArea/components/index.d.ts.map +1 -1
  102. package/dist/esm/components/zoomArea/components/index.js +1 -1
  103. package/dist/esm/components/zoomArea/zoomArea.js +6 -6
  104. package/dist/esm/components/zoomArea/zoomArea.type.d.ts +1 -1
  105. package/dist/esm/components/zoomArea/zoomArea.type.d.ts.map +1 -1
  106. package/dist/esm/types/focusConfig.type.d.ts +15 -3
  107. package/dist/esm/types/focusConfig.type.d.ts.map +1 -1
  108. package/dist/esm/types/focusConfig.type.js +14 -1
  109. package/dist/kubit-ui-web-react-charts.cjs.js +1 -1
  110. package/dist/kubit-ui-web-react-charts.es.js +1 -1
  111. package/dist/kubit-ui-web-react-charts.umd.js +1 -1
  112. package/dist/react-charts.css +1 -1
  113. package/dist/types/components/focusRing/components/FocusRingInline.d.ts +25 -0
  114. package/dist/types/components/focusRing/components/FocusRingInline.d.ts.map +1 -0
  115. package/dist/types/components/focusRing/components/FocusRingRenderer.d.ts +13 -0
  116. package/dist/types/components/focusRing/components/FocusRingRenderer.d.ts.map +1 -0
  117. package/dist/types/components/focusRing/components/FocusRingSeparate.d.ts +40 -0
  118. package/dist/types/components/focusRing/components/FocusRingSeparate.d.ts.map +1 -0
  119. package/dist/types/components/focusRing/focusRing.d.ts +34 -0
  120. package/dist/types/components/focusRing/focusRing.d.ts.map +1 -0
  121. package/dist/types/components/focusRing/focusRing.types.d.ts +40 -0
  122. package/dist/types/components/focusRing/focusRing.types.d.ts.map +1 -0
  123. package/dist/types/components/focusRing/hooks/useFocusRingData.d.ts +27 -0
  124. package/dist/types/components/focusRing/hooks/useFocusRingData.d.ts.map +1 -0
  125. package/dist/types/components/focusRing/index.d.ts +3 -0
  126. package/dist/types/components/focusRing/index.d.ts.map +1 -0
  127. package/dist/types/components/focusRing/utils/composeRefs.d.ts +7 -0
  128. package/dist/types/components/focusRing/utils/composeRefs.d.ts.map +1 -0
  129. package/dist/types/components/focusRing/utils/createAdaptiveFocusRings.d.ts +24 -0
  130. package/dist/types/components/focusRing/utils/createAdaptiveFocusRings.d.ts.map +1 -0
  131. package/dist/types/components/focusRing/utils/createBoundingBoxFocusRings.d.ts +33 -0
  132. package/dist/types/components/focusRing/utils/createBoundingBoxFocusRings.d.ts.map +1 -0
  133. package/dist/types/components/focusRing/utils/utils.types.d.ts +52 -0
  134. package/dist/types/components/focusRing/utils/utils.types.d.ts.map +1 -0
  135. package/dist/types/components/index.d.ts +1 -0
  136. package/dist/types/components/index.d.ts.map +1 -1
  137. package/dist/types/components/plot/plot.d.ts.map +1 -1
  138. package/dist/types/components/zoomArea/components/SelectionArea.d.ts +3 -23
  139. package/dist/types/components/zoomArea/components/SelectionArea.d.ts.map +1 -1
  140. package/dist/types/components/zoomArea/components/ZoomHandler.d.ts +3 -3
  141. package/dist/types/components/zoomArea/components/ZoomHandler.d.ts.map +1 -1
  142. package/dist/types/components/zoomArea/components/index.d.ts +1 -1
  143. package/dist/types/components/zoomArea/components/index.d.ts.map +1 -1
  144. package/dist/types/components/zoomArea/zoomArea.type.d.ts +1 -1
  145. package/dist/types/components/zoomArea/zoomArea.type.d.ts.map +1 -1
  146. package/dist/types/types/focusConfig.type.d.ts +15 -3
  147. package/dist/types/types/focusConfig.type.d.ts.map +1 -1
  148. package/package.json +1 -1
  149. package/dist/cjs/utils/calculateFocusOutline/calculateFocusOutline.d.ts +0 -73
  150. package/dist/cjs/utils/calculateFocusOutline/calculateFocusOutline.d.ts.map +0 -1
  151. package/dist/cjs/utils/calculateFocusOutline/calculateFocusOutline.js +0 -80
  152. package/dist/esm/utils/calculateFocusOutline/calculateFocusOutline.d.ts +0 -73
  153. package/dist/esm/utils/calculateFocusOutline/calculateFocusOutline.d.ts.map +0 -1
  154. package/dist/esm/utils/calculateFocusOutline/calculateFocusOutline.js +0 -80
  155. package/dist/types/utils/calculateFocusOutline/calculateFocusOutline.d.ts +0 -73
  156. package/dist/types/utils/calculateFocusOutline/calculateFocusOutline.d.ts.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useFocusRingData.d.ts","sourceRoot":"","sources":["../../../../../src/components/focusRing/hooks/useFocusRingData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAgC,MAAM,OAAO,CAAC;AAErE,OAAO,EAAE,KAAK,WAAW,EAAkB,MAAM,0BAA0B,CAAC;AAO5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE5D,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,SAAS,CAAC,kBAAkB,CAAC,CAAC;IAC1C,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED,MAAM,WAAW,aAAa;IAC5B,cAAc,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IACtC,MAAM,EAAE,eAAe,GAAG,SAAS,CAAC;CACrC;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,WAAW,EACX,SAAS,GACV,EAAE,uBAAuB,GAAG,aAAa,CA+DzC"}
@@ -0,0 +1,3 @@
1
+ export { FocusRing } from './focusRing';
2
+ export type { FocusRingProps, FocusRingRendererProps } from './focusRing.types';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/focusRing/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,MAAM,mBAAmB,CAAC"}
@@ -0,0 +1,7 @@
1
+ import { ForwardedRef } from '../../../../node_modules/react';
2
+ /**
3
+ * Composes multiple refs into a single ref callback
4
+ * Allows using both internal and external refs simultaneously
5
+ */
6
+ export declare function composeRefs<T>(...refs: Array<ForwardedRef<T> | undefined>): (instance: T | null) => void;
7
+ //# sourceMappingURL=composeRefs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"composeRefs.d.ts","sourceRoot":"","sources":["../../../../../src/components/focusRing/utils/composeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C;;;GAGG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAC3B,GAAG,IAAI,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,GAC1C,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAU9B"}
@@ -0,0 +1,24 @@
1
+ import { FocusConfig } from '../../../types/focusConfig.type';
2
+ import { FocusRingLayers } from './utils.types';
3
+ /**
4
+ * SVG geometric attributes that define shape position and dimensions.
5
+ * These attributes are extracted from the original element to create focus rings.
6
+ * Also used by MutationObserver to detect when focus rings need to be regenerated.
7
+ */
8
+ export declare const SVG_GEOMETRIC_ATTRIBUTES: string[];
9
+ /**
10
+ * Creates adaptive focus ring layers from a DOM SVGElement.
11
+ *
12
+ * This function reads properties directly from the DOM element and creates
13
+ * props objects for rendering new SVG elements with scaled stroke-width for the focus rings.
14
+ * The focus rings adapt to the exact shape of the element (circle → circle, path → path, etc.)
15
+ *
16
+ * This unified approach works for both targetRef and children modes by
17
+ * reading from the mounted DOM element.
18
+ *
19
+ * @param element - The SVG graphics element to create focus rings for
20
+ * @param focusConfig - Focus ring configuration (colors, widths, gap)
21
+ * @returns Focus ring layers (outer and inner props) or null if not supported
22
+ */
23
+ export declare function createAdaptiveFocusRings(element: SVGGraphicsElement, focusConfig: Required<FocusConfig>): FocusRingLayers | undefined;
24
+ //# sourceMappingURL=createAdaptiveFocusRings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createAdaptiveFocusRings.d.ts","sourceRoot":"","sources":["../../../../../src/components/focusRing/utils/createAdaptiveFocusRings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAErD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,UAsBpC,CAAC;AAqBF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,wBAAwB,CACtC,OAAO,EAAE,kBAAkB,EAC3B,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,GACjC,eAAe,GAAG,SAAS,CAkE7B"}
@@ -0,0 +1,33 @@
1
+ import { FocusConfig } from '../../../types/focusConfig.type';
2
+ import { ElementBounds, FocusRingLayers, RectangleFocusOutline } from './utils.types';
3
+ /**
4
+ * Calculates the dimensions of the focus outlines (outer and inner) for a bounding-box.
5
+ * This function is used internally by createBoundingBoxFocusRings and always produces
6
+ * rectangular focus rings.
7
+ *
8
+ * @param bounds - Element bounds information from DOM detection
9
+ * @param config - Focus stroke configuration (widths and gap)
10
+ * @returns Rectangle dimensions for outer and inner focus rings
11
+ */
12
+ export declare const calculateBoundingBoxFocusRings: (bounds: ElementBounds, config: {
13
+ outlineStrokeWidth: number;
14
+ innerStrokeWidth: number;
15
+ gap: number;
16
+ }) => RectangleFocusOutline;
17
+ /**
18
+ * Creates bounding-box focus ring layers with calculated dimensions.
19
+ *
20
+ * This function:
21
+ * 1. Detects element bounds from DOM using getBBox()
22
+ * 2. Calculates geometric dimensions using calculateBoundingBoxFocusRings
23
+ * 3. Wraps the result in the same FocusRingLayers structure as createAdaptiveFocusRings
24
+ * 4. Includes all rendering props (colors, strokes, etc.)
25
+ *
26
+ * This provides a unified API for both adaptive and bounding-box strategies.
27
+ *
28
+ * @param element - The SVG graphics element to create focus rings for
29
+ * @param focusConfig - Focus ring configuration (colors, widths, gap)
30
+ * @returns Focus ring layers in the same format as createAdaptiveFocusRings, or null if detection fails
31
+ */
32
+ export declare function createBoundingBoxFocusRings(element: SVGGraphicsElement, focusConfig: Required<FocusConfig>): FocusRingLayers | undefined;
33
+ //# sourceMappingURL=createBoundingBoxFocusRings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"createBoundingBoxFocusRings.d.ts","sourceRoot":"","sources":["../../../../../src/components/focusRing/utils/createBoundingBoxFocusRings.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,OAAO,KAAK,EAAE,aAAa,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE3F;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,GACzC,QAAQ,aAAa,EACrB,QAAQ;IACN,kBAAkB,EAAE,MAAM,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,GAAG,EAAE,MAAM,CAAC;CACb,KACA,qBAkCF,CAAC;AAiCF;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,kBAAkB,EAC3B,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,GACjC,eAAe,GAAG,SAAS,CA0C7B"}
@@ -0,0 +1,52 @@
1
+ /**
2
+ * Props for rendering a focus ring element
3
+ */
4
+ export interface FocusRingElementProps {
5
+ /** SVG element type (e.g., 'circle', 'rect', 'path') */
6
+ type: string;
7
+ /** Props to pass to React.createElement */
8
+ props: Record<string, unknown>;
9
+ }
10
+ /**
11
+ * Result of creating focus ring layers
12
+ */
13
+ export interface FocusRingLayers {
14
+ /** Outer focus ring element props (blue) */
15
+ outerRing: FocusRingElementProps;
16
+ /** Inner focus ring element props (white) */
17
+ innerRing: FocusRingElementProps;
18
+ }
19
+ /**
20
+ * Element bounds information from DOM detection
21
+ */
22
+ export interface ElementBounds {
23
+ /** Element width in pixels */
24
+ elementWidth: number;
25
+ /** Element height in pixels */
26
+ elementHeight: number;
27
+ /** Position of the element center */
28
+ elementPosition: {
29
+ x: number;
30
+ y: number;
31
+ };
32
+ /** Stroke width of the element */
33
+ elementStrokeWidth: number;
34
+ }
35
+ /**
36
+ * Dimensions for rectangle focus outlines
37
+ */
38
+ export interface RectangleFocusOutline {
39
+ outer: {
40
+ x: number;
41
+ y: number;
42
+ width: number;
43
+ height: number;
44
+ };
45
+ inner: {
46
+ x: number;
47
+ y: number;
48
+ width: number;
49
+ height: number;
50
+ };
51
+ }
52
+ //# sourceMappingURL=utils.types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/focusRing/utils/utils.types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,2CAA2C;IAC3C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,4CAA4C;IAC5C,SAAS,EAAE,qBAAqB,CAAC;IACjC,6CAA6C;IAC7C,SAAS,EAAE,qBAAqB,CAAC;CAClC;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,eAAe,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,kCAAkC;IAClC,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE;QACL,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,KAAK,EAAE;QACL,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH"}
@@ -1,6 +1,7 @@
1
1
  export * from './axisChart';
2
2
  export * from './bar';
3
3
  export * from './chartText';
4
+ export * from './focusRing';
4
5
  export * from './foreignObject';
5
6
  export * from './line';
6
7
  export * from './node';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,OAAO,CAAC;AACtB,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC;AAChC,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../../../../src/components/plot/plot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAc,MAAM,OAAO,CAAC;AAYtD,OAAO,YAAY,CAAC;AACpB,OAAO,EAAiB,KAAK,SAAS,EAAsB,MAAM,cAAc,CAAC;AA+IjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,IAAI,EAAgC,CAAC,CAAC,GAAG,MAAM,EAC1D,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG;IACpB,GAAG,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;CAChC,KACE,GAAG,CAAC,OAAO,CAAC"}
1
+ {"version":3,"file":"plot.d.ts","sourceRoot":"","sources":["../../../../src/components/plot/plot.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAc,MAAM,OAAO,CAAC;AAStD,OAAO,YAAY,CAAC;AACpB,OAAO,EAAiB,KAAK,SAAS,EAAsB,MAAM,cAAc,CAAC;AA2GjF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,IAAI,EAAgC,CAAC,CAAC,GAAG,MAAM,EAC1D,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG;IACpB,GAAG,CAAC,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;CAChC,KACE,GAAG,CAAC,OAAO,CAAC"}
@@ -1,5 +1,4 @@
1
- import { FC, KeyboardEvent, MouseEvent, TouchEvent } from '../../../../node_modules/react';
2
- import { FocusConfig } from '../../../types/focusConfig.type';
1
+ import { KeyboardEvent, MouseEvent, TouchEvent } from '../../../../node_modules/react';
3
2
  import { ZoomAreaSelectionConfig, ZoomRange } from '../zoomArea.type';
4
3
  /**
5
4
 
@@ -31,27 +30,8 @@ interface SelectionAreaProps {
31
30
  onBlur: () => void;
32
31
  }
33
32
  /**
34
- * Props for the SelectionAreaFocusRing component
33
+ * Selection area overlay - the interactive rectangle that users can drag and focus
35
34
  */
36
- interface SelectionAreaFocusRingProps {
37
- /** Start X position */
38
- startX: number;
39
- /** End X position */
40
- endX: number;
41
- /** Chart height */
42
- height: number;
43
- /** Whether the selection area is focused */
44
- isFocused: boolean;
45
- /** Custom focus configuration (already resolved) */
46
- focusConfig: Required<FocusConfig>;
47
- }
48
- /**
49
- * Focus ring for the selection area - rendered separately to control z-order
50
- */
51
- export declare const SelectionAreaFocusRing: FC<SelectionAreaFocusRingProps>;
52
- /**
53
- * Selection area overlay
54
- */
55
- export declare const SelectionArea: FC<SelectionAreaProps>;
35
+ export declare const SelectionArea: import('../../../../node_modules/react').ForwardRefExoticComponent<SelectionAreaProps & import('../../../../node_modules/react').RefAttributes<SVGRectElement>>;
56
36
  export {};
57
37
  //# sourceMappingURL=SelectionArea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionArea.d.ts","sourceRoot":"","sources":["../../../../../src/components/zoomArea/components/SelectionArea.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEvE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAI5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE3E;;;;GAIG;AACH,UAAU,kBAAkB;IAC1B,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,YAAY,EAAE,SAAS,CAAC;IACxB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,eAAe,EAAE,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IACnD,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB;IACrB,WAAW,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAC1C,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,UAAU,2BAA2B;IACnC,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,SAAS,EAAE,OAAO,CAAC;IACnB,oDAAoD;IACpD,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC,2BAA2B,CA+DlE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,EAAE,CAAC,kBAAkB,CAqDhD,CAAC"}
1
+ {"version":3,"file":"SelectionArea.d.ts","sourceRoot":"","sources":["../../../../../src/components/zoomArea/components/SelectionArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,UAAU,EAAc,MAAM,OAAO,CAAC;AAGzF,OAAO,KAAK,EAAE,uBAAuB,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAE3E;;;;GAIG;AACH,UAAU,kBAAkB;IAC1B,uBAAuB;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,yBAAyB;IACzB,YAAY,EAAE,SAAS,CAAC;IACxB,kCAAkC;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,mBAAmB;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,0CAA0C;IAC1C,eAAe,EAAE,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IACnD,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB;IACrB,WAAW,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAC1C,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,+GA2DzB,CAAC"}
@@ -17,12 +17,12 @@ interface ZoomHandlerProps {
17
17
  min: number;
18
18
  /** Maximum allowed value */
19
19
  max: number;
20
- /** Whether this handler is focused */
20
+ /** Whether the handler is focused (controlled mode) */
21
21
  isFocused: boolean;
22
22
  /** Custom handler configuration */
23
23
  handlerConfig?: ZoomAreaHandlerConfig;
24
- /** Custom focus configuration (already resolved) */
25
- focusConfig: Required<FocusConfig>;
24
+ /** Focus ring configuration */
25
+ focusConfig?: FocusConfig;
26
26
  /** Text announced by screen readers */
27
27
  screenReaderText?: string;
28
28
  /** Data test ID */
@@ -1 +1 @@
1
- {"version":3,"file":"ZoomHandler.d.ts","sourceRoot":"","sources":["../../../../../src/components/zoomArea/components/ZoomHandler.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAG5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AAyBhF;;GAEG;AACH,UAAU,gBAAgB;IACxB,+CAA+C;IAC/C,IAAI,EAAE,MAAM,OAAO,gBAAgB,CAAC;IACpC,iBAAiB;IACjB,CAAC,EAAE,MAAM,CAAC;IACV,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,SAAS,EAAE,OAAO,CAAC;IACnB,mCAAmC;IACnC,aAAa,CAAC,EAAE,qBAAqB,CAAC;IACtC,oDAAoD;IACpD,WAAW,EAAE,QAAQ,CAAC,WAAW,CAAC,CAAC;IACnC,uCAAuC;IACvC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,mBAAmB;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,qBAAqB;IACrB,WAAW,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IACzC,YAAY,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,CAAC;IAC1C,SAAS,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,IAAI,CAAC;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAmBD;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B;AAmBD;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+DlD,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export { HandlerIcon } from './HandlerIcon';
2
2
  export { LineRenderer } from './LineRenderer';
3
- export { SelectionArea, SelectionAreaFocusRing } from './SelectionArea';
3
+ export { SelectionArea } from './SelectionArea';
4
4
  export { ZoomHandler } from './ZoomHandler';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/zoomArea/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACxE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/zoomArea/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC"}
@@ -121,7 +121,7 @@ export interface ZoomAreaProps {
121
121
  /** Custom selection area configuration */
122
122
  selectionConfig?: ZoomAreaSelectionConfig;
123
123
  /** Custom focus configuration applied to all focusable elements */
124
- focusConfig?: FocusConfig;
124
+ focusConfig?: Omit<FocusConfig, 'variant'>;
125
125
  /** Configuration for interaction behavior (keyboard navigation, handler distances) */
126
126
  interactionConfig?: ZoomAreaInteractionConfig;
127
127
  /** Configuration for accessibility label templates */
@@ -1 +1 @@
1
- {"version":3,"file":"zoomArea.type.d.ts","sour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KAAK,IAAI,CAAC;IACvD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;CAC/D"}
1
+ {"version":3,"file":"zoomArea.type.d.ts","sourceRoot":"","sources":["../../../../src/components/zoomArea/zoomArea.type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;CAChC;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,2BAA2B;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,yBAAyB;IACzB,GAAG,EAAE,MAAM,CAAC;CACb;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;CAInB,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,iCAAiC;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wBAAwB;IACxB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,kCAAkC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kCAAkC;IAClC,WAAW,C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C;IACzE,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,UAAU,EAAE,UAAU,CAAC,KAAK,IAAI,CAAC;IACzE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,UAAU,CAAC,UAAU,CAAC,KAAK,IAAI,CAAC;IACvD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;IAChE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,aAAa,CAAC,KAAK,IAAI,CAAC;CAC/D"}
@@ -3,16 +3,22 @@
3
3
  *
4
4
  * - `outlineColor` - Color of the outer outline when focused. Defaults to #0078D7.
5
5
  * - `outlineStrokeWidth` - Stroke width of the outer outline. Defaults to 2.
6
- * - `innerStrokeColor` - Color of the inner outline when focused. Defaults to #FFFFFF.
6
+ * - `innerColor` - Color of the inner outline when focused. Defaults to #FFFFFF.
7
7
  * - `innerStrokeWidth` - Stroke width of the inner outline. Defaults to 2.
8
- * - `gap` - Gap between the inner and outer outline. Defaults to 0.
8
+ * - `gap` - Gap between the element and the focus rings. Defaults to 0.
9
+ * Note: Only applies when variant is 'bounding-box'. Ignored in 'adaptive' mode.
10
+ * - `variant` - Focus ring rendering mode. Defaults to 'adaptive'.
11
+ * - 'adaptive': Ring follows the exact shape of the element (circle → circular ring, path → path ring)
12
+ * - 'bounding-box': Ring is always rectangular, wrapping the element's bounding box
9
13
  */
10
14
  export interface FocusConfig {
11
15
  outlineColor?: string;
12
16
  outlineStrokeWidth?: number;
13
17
  innerColor?: string;
14
18
  innerStrokeWidth?: number;
19
+ /** Only applicable when variant is 'bounding-box' */
15
20
  gap?: number;
21
+ variant?: 'adaptive' | 'bounding-box';
16
22
  }
17
23
  export declare const FOCUS_DEFAULT: {
18
24
  /** Focus ring color */
@@ -23,7 +29,13 @@ export declare const FOCUS_DEFAULT: {
23
29
  readonly INNER_FOCUS_STROKE_WIDTH: 2;
24
30
  /** Focus ring outer stroke width */
25
31
  readonly OUTER_FOCUS_STROKE_WIDTH: 2;
26
- /** Gap between element and outlines */
32
+ /** Gap between element and outlines (only applies in bounding-box variant) */
27
33
  readonly OUTLINES_GAP: 0;
34
+ /** Focus ring rendering variant */
35
+ readonly VARIANT: "adaptive";
28
36
  };
37
+ /**
38
+ * Helper function to get complete focus config with defaults applied
39
+ */
40
+ export declare const getFocusConfig: (focusConfig?: FocusConfig) => Required<FocusConfig>;
29
41
  //# sourceMappingURL=focusConfig.type.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"focusConfig.type.d.ts","sourceRoot":"","sources":["../../../src/types/focusConfig.type.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,aAAa;IACxB,uBAAuB;;IAEvB,8BAA8B;;IAE9B,oCAAoC;;IAEpC,oCAAoC;;IAEpC,uCAAuC;;CAE/B,CAAC"}
1
+ {"version":3,"file":"focusConfig.type.d.ts","sourceRoot":"","sources":["../../../src/types/focusConfig.type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,WAAW;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qDAAqD;IACrD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,UAAU,GAAG,cAAc,CAAC;CACvC;AAED,eAAO,MAAM,aAAa;IACxB,uBAAuB;;IAEvB,8BAA8B;;IAE9B,oCAAoC;;IAEpC,oCAAoC;;IAEpC,8EAA8E;;IAE9E,mCAAmC;;CAE3B,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,cAAc,WAAW,KAAG,QAAQ,CAAC,WAAW,CAO7E,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kubit-ui-web/react-charts",
3
- "version": "1.5.1",
3
+ "version": "1.6.0",
4
4
  "private": false,
5
5
  "main": "dist/kubit-ui-web-react-charts.cjs.js",
6
6
  "module": "dist/kubit-ui-web-react-charts.es.js",
@@ -1,73 +0,0 @@
1
- import { type FocusConfig } from '../../types/focusConfig.type';
2
- export interface FocusOutlineConfig {
3
- /** Type of element for focus calculation */
4
- elementType: 'circle' | 'rectangle';
5
- /** Element width in pixels */
6
- elementWidth: number;
7
- /** Element height in pixels */
8
- elementHeight: number;
9
- /** Position of the element center */
10
- elementPosition: {
11
- x: number;
12
- y: number;
13
- };
14
- /** Stroke width of the element */
15
- elementStrokeWidth?: number;
16
- /** Stroke width of the outer focus outline */
17
- outlineStrokeWidth?: number;
18
- /** Stroke width of the inner focus outline */
19
- innerStrokeWidth?: number;
20
- /** Gap between the outer and inner outlines */
21
- gap?: number;
22
- }
23
- /**
24
- * Dimensions for circle focus outlines
25
- */
26
- export interface CircleFocusOutline {
27
- type: 'circle';
28
- outer: {
29
- cx: number;
30
- cy: number;
31
- r: number;
32
- };
33
- inner: {
34
- cx: number;
35
- cy: number;
36
- r: number;
37
- };
38
- }
39
- /**
40
- * Dimensions for rectangle focus outlines
41
- */
42
- export interface RectangleFocusOutline {
43
- type: 'rectangle';
44
- outer: {
45
- x: number;
46
- y: number;
47
- width: number;
48
- height: number;
49
- };
50
- inner: {
51
- x: number;
52
- y: number;
53
- width: number;
54
- height: number;
55
- };
56
- }
57
- /**
58
- * Union type for focus outline results
59
- */
60
- export type FocusOutlineDimensions = CircleFocusOutline | RectangleFocusOutline;
61
- /**
62
- * Calculates the dimensions of the focus outlines (outer and inner) for an SVG element.
63
- * Supports elements with different width and height dimensions.
64
- *
65
- * @param config - Configuration for the calculation.
66
- * @returns Object with the dimensions and positions of the outer and inner rectangles.
67
- */
68
- export declare const calculateFocusOutline: ({ elementHeight, elementPosition, elementStrokeWidth, elementType, elementWidth, gap, innerStrokeWidth, outlineStrokeWidth, }: FocusOutlineConfig) => FocusOutlineDimensions;
69
- /**
70
- * Helper function to get focus complete config
71
- */
72
- export declare const getFocusConfig: (focusConfig?: FocusConfig) => Required<FocusConfig>;
73
- //# sourceMappingURL=calculateFocusOutline.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"calculateFocusOutline.d.ts","sourceRoot":"","sources":["../../../../src/utils/calculateFocusOutline/calculateFocusOutline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE3E,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,WAAW,EAAE,QAAQ,GAAG,WAAW,CAAC;IACpC,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,eAAe,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;IACF,KAAK,EAAE;QACL,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,CAAC,EAAE,MAAM,CAAC;KACX,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,WAAW,CAAC;IAClB,KAAK,EAAE;QACL,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,KAAK,EAAE;QACL,CAAC,EAAE,MAAM,CAAC;QACV,CAAC,EAAE,MAAM,CAAC;QACV,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;AAEhF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,GAAI,+HASnC,kBAAkB,KAAG,sBAmEvB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,cAAc,WAAW,KAAG,QAAQ,CAAC,WAAW,CAM7E,CAAC"}
@@ -1,80 +0,0 @@
1
- import { FOCUS_DEFAULT } from '../../types/focusConfig.type';
2
- /**
3
- * Calculates the dimensions of the focus outlines (outer and inner) for an SVG element.
4
- * Supports elements with different width and height dimensions.
5
- *
6
- * @param config - Configuration for the calculation.
7
- * @returns Object with the dimensions and positions of the outer and inner rectangles.
8
- */
9
- export const calculateFocusOutline = ({ elementHeight, elementPosition, elementStrokeWidth = 0, elementType, elementWidth, gap = 0, innerStrokeWidth = 2, outlineStrokeWidth = 2, }) => {
10
- if (elementType === 'circle') {
11
- // For circles, work with radius
12
- const elementRadius = elementWidth / 2;
13
- // Calculate inner circle radius
14
- // Position inner circle adjacent to the inner edge of the outer stroke (no gap)
15
- // The element's stroke extends strokeWidth/2 outward from the element edge
16
- // The same happens for the inner stroke
17
- // This ensures the inner circle is positioned correctly without gaps
18
- const innerRadius = elementRadius + elementStrokeWidth / 2 + innerStrokeWidth / 2 + gap;
19
- // Calculate outer circle radius
20
- // Position outer ring completely outside the element and the inner stroke
21
- // The element's stroke extends strokeWidth/2 outward from the element edge
22
- // The inner stroke is added to ensure the outer ring is clearly visible
23
- // The outline stroke / 2 is added to ensure the outer ring is clearly visible
24
- const outerRadius = innerRadius + innerStrokeWidth / 2 + outlineStrokeWidth / 2;
25
- return {
26
- inner: {
27
- cx: elementPosition.x,
28
- cy: elementPosition.y,
29
- r: innerRadius,
30
- },
31
- outer: {
32
- cx: elementPosition.x,
33
- cy: elementPosition.y,
34
- r: outerRadius,
35
- },
36
- type: 'circle',
37
- };
38
- }
39
- // Calculate inner rectangle dimensions
40
- // Here we have to take into account that height and width must grow in both sides
41
- // to ensure the inner rectangle is positioned correctly without gaps
42
- // that is why here we do not divide by 2
43
- const innerWidth = elementWidth + elementStrokeWidth + innerStrokeWidth + gap * 2;
44
- const innerHeight = elementHeight + elementStrokeWidth + innerStrokeWidth + gap * 2;
45
- const innerX = elementPosition.x - innerWidth / 2;
46
- const innerY = elementPosition.y - innerHeight / 2;
47
- // Calculate outer rectangle dimensions
48
- // Must account for the fact that both inner and outer strokes extend outward from their borders
49
- // Inner stroke extends innerStrokeWidth/2 on each side, outer stroke extends outlineStrokeWidth/2 on each side
50
- // We also take into account if some gap between outlines is wanted
51
- const outerWidth = innerWidth + innerStrokeWidth + outlineStrokeWidth;
52
- const outerHeight = innerHeight + innerStrokeWidth + outlineStrokeWidth;
53
- const outerX = elementPosition.x - outerWidth / 2;
54
- const outerY = elementPosition.y - outerHeight / 2;
55
- return {
56
- inner: {
57
- height: innerHeight,
58
- width: innerWidth,
59
- x: innerX,
60
- y: innerY,
61
- },
62
- outer: {
63
- height: outerHeight,
64
- width: outerWidth,
65
- x: outerX,
66
- y: outerY,
67
- },
68
- type: 'rectangle',
69
- };
70
- };
71
- /**
72
- * Helper function to get focus complete config
73
- */
74
- export const getFocusConfig = (focusConfig) => ({
75
- gap: focusConfig?.gap ?? FOCUS_DEFAULT.OUTLINES_GAP,
76
- innerColor: focusConfig?.innerColor ?? FOCUS_DEFAULT.FOCUS_INNER,
77
- innerStrokeWidth: focusConfig?.innerStrokeWidth ?? FOCUS_DEFAULT.INNER_FOCUS_STROKE_WIDTH,
78
- outlineColor: focusConfig?.outlineColor ?? FOCUS_DEFAULT.FOCUS_COLOR,
79
- outlineStrokeWidth: focusConfig?.outlineStrokeWidth ?? FOCUS_DEFAULT.OUTER_FOCUS_STROKE_WIDTH,
80
- });
@@ -1,73 +0,0 @@
1
- import { type FocusConfig } from '../../types/focusConfig.type';
2
- export interface FocusOutlineConfig {
3
- /** Type of element for focus calculation */
4
- elementType: 'circle' | 'rectangle';
5
- /** Element width in pixels */
6
- elementWidth: number;
7
- /** Element height in pixels */
8
- elementHeight: number;
9
- /** Position of the element center */
10
- elementPosition: {
11
- x: number;
12
- y: number;
13
- };
14
- /** Stroke width of the element */
15
- elementStrokeWidth?: number;
16
- /** Stroke width of the outer focus outline */
17
- outlineStrokeWidth?: number;
18
- /** Stroke width of the inner focus outline */
19
- innerStrokeWidth?: number;
20
- /** Gap between the outer and inner outlines */
21
- gap?: number;
22
- }
23
- /**
24
- * Dimensions for circle focus outlines
25
- */
26
- export interface CircleFocusOutline {
27
- type: 'circle';
28
- outer: {
29
- cx: number;
30
- cy: number;
31
- r: number;
32
- };
33
- inner: {
34
- cx: number;
35
- cy: number;
36
- r: number;
37
- };
38
- }
39
- /**
40
- * Dimensions for rectangle focus outlines
41
- */
42
- export interface RectangleFocusOutline {
43
- type: 'rectangle';
44
- outer: {
45
- x: number;
46
- y: number;
47
- width: number;
48
- height: number;
49
- };
50
- inner: {
51
- x: number;
52
- y: number;
53
- width: number;
54
- height: number;
55
- };
56
- }
57
- /**
58
- * Union type for focus outline results
59
- */
60
- export type FocusOutlineDimensions = CircleFocusOutline | RectangleFocusOutline;
61
- /**
62
- * Calculates the dimensions of the focus outlines (outer and inner) for an SVG element.
63
- * Supports elements with different width and height dimensions.
64
- *
65
- * @param config - Configuration for the calculation.
66
- * @returns Object with the dimensions and positions of the outer and inner rectangles.
67
- */
68
- export declare const calculateFocusOutline: ({ elementHeight, elementPosition, elementStrokeWidth, elementType, elementWidth, gap, innerStrokeWidth, outlineStrokeWidth, }: FocusOutlineConfig) => FocusOutlineDimensions;
69
- /**
70
- * Helper function to get focus complete config
71
- */
72
- export declare const getFocusConfig: (focusConfig?: FocusConfig) => Required<FocusConfig>;
73
- //# sourceMappingURL=calculateFocusOutline.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"calculateFocusOutline.d.ts","sourceRoot":"","sources":["../../../../src/utils/calculateFocusOutline/calculateFocusOutline.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,KAAK,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE3E,MAAM,WAAW,kBAAkB;IACjC,4CAA4C;IAC5C,WAAW,EAAE,QAAQ,GAAG,WAAW,CAAC;IACpC,8BAA8B;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,+BAA+B;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,eAAe,EAAE;QAAE,CAAC,EAAE,MAAM,CAAC;QAAC,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,kCAAkC;IAClC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,8CAA8C;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+CAA+C;IAC/C,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,IAAI,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