@redsift/charts 7.7.0 → 7.8.1

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/CONTRIBUTING.md CHANGED
@@ -123,7 +123,7 @@ The component should stricly follow the following structure:
123
123
  ```ts
124
124
  import React, { forwardRef, RefObject, useRef } from 'react';
125
125
  import classNames from 'classnames';
126
- import { Comp } from '~/types';
126
+ import { Comp } from '../../types';
127
127
  import { StyledBadge } from './styles';
128
128
  import { BadgeProps } from './types';
129
129
 
package/index.d.ts CHANGED
@@ -1,200 +1,10 @@
1
1
  import { PieArcDatum as PieArcDatum$1 } from 'd3-shape';
2
- import { Ref, ReactElement, ComponentProps } from 'react';
2
+ import * as _redsift_design_system from '@redsift/design-system';
3
+ import { ValueOf, Comp } from '@redsift/design-system';
3
4
  import { ScaleOrdinal, ScaleLinear } from 'd3';
4
- import { ValueOf as ValueOf$1, Comp as Comp$1 } from '@redsift/design-system';
5
+ import { ComponentProps } from 'react';
5
6
  import * as styled_components from 'styled-components';
6
7
 
7
- /** Component Type. */
8
- type Comp<P, T = HTMLElement> = {
9
- (props: P & {
10
- ref?: Ref<T>;
11
- }): ReactElement | null;
12
- /** React component type. */
13
- readonly $$typeof: symbol;
14
- /** Component default props. */
15
- defaultProps?: Partial<P>;
16
- /** Component name. */
17
- displayName?: string;
18
- /** Component base class name. */
19
- className?: string;
20
- };
21
- /** Get types of the values of a record. */
22
- type ValueOf<T extends Record<any, any>> = T[keyof T];
23
-
24
- declare const AlignSelf: {
25
- readonly auto: "auto";
26
- readonly normal: "normal";
27
- readonly start: "start";
28
- readonly end: "end";
29
- readonly center: "center";
30
- readonly 'flex-start': "flex-start";
31
- readonly 'flex-end': "flex-end";
32
- readonly 'self-start': "self-start";
33
- readonly 'self-end': "self-end";
34
- readonly baseline: "baseline";
35
- readonly stretch: "stretch";
36
- };
37
- type AlignSelf = ValueOf<typeof AlignSelf>;
38
- declare const AlignContent: {
39
- readonly 'flex-start': "flex-start";
40
- readonly 'flex-end': "flex-end";
41
- readonly center: "center";
42
- readonly 'space-between': "space-between";
43
- readonly 'space-around': "space-around";
44
- readonly 'space-evenly': "space-evenly";
45
- readonly stretch: "stretch";
46
- readonly start: "start";
47
- readonly end: "end";
48
- readonly baseline: "baseline";
49
- readonly 'first baseline': "first baseline";
50
- readonly 'last baseline': "last baseline";
51
- };
52
- type AlignContent = ValueOf<typeof AlignContent>;
53
- declare const AlignItems: {
54
- readonly stretch: "stretch";
55
- readonly 'flex-start': "flex-start";
56
- readonly 'flex-end': "flex-end";
57
- readonly center: "center";
58
- readonly baseline: "baseline";
59
- readonly 'first baseline': "first baseline";
60
- readonly 'last baseline': "last baseline";
61
- readonly start: "start";
62
- readonly end: "end";
63
- readonly 'self-start': "self-start";
64
- readonly 'self-end': "self-end";
65
- };
66
- type AlignItems = ValueOf<typeof AlignItems>;
67
- declare const FlexDirection: {
68
- readonly row: "row";
69
- readonly 'row-reverse': "row-reverse";
70
- readonly column: "column";
71
- readonly 'column-reverse': "column-reverse";
72
- };
73
- type FlexDirection = ValueOf<typeof FlexDirection>;
74
- declare const FlexWrap: {
75
- readonly nowrap: "nowrap";
76
- readonly wrap: "wrap";
77
- readonly 'wrap-reverse': "wrap-reverse";
78
- };
79
- type FlexWrap = ValueOf<typeof FlexWrap>;
80
- declare const JustifyContent: {
81
- readonly 'flex-start': "flex-start";
82
- readonly 'flex-end': "flex-end";
83
- readonly center: "center";
84
- readonly 'space-between': "space-between";
85
- readonly 'space-around': "space-around";
86
- readonly 'space-evenly': "space-evenly";
87
- readonly start: "start";
88
- readonly end: "end";
89
- readonly left: "left";
90
- readonly right: "right";
91
- readonly baseline: "baseline";
92
- readonly 'first baseline': "first baseline";
93
- readonly 'last baseline': "last baseline";
94
- readonly stretch: "stretch";
95
- };
96
- type JustifyContent = ValueOf<typeof JustifyContent>;
97
- interface LayoutProps {
98
- /** When used in a flex layout, specifies how the element will grow or shrink to fit the space available. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex">MDN</a>. */
99
- flex?: string;
100
- /** When used in a flex layout, specifies how the element will grow to fit the space available. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow">MDN</a>. */
101
- flexGrow?: number;
102
- /** When used in a flex layout, specifies how the element will shrink to fit the space available. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-shrink">MDN</a>. */
103
- flexShrink?: number;
104
- /** When used in a flex layout, specifies the initial main size of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex_basis">MDN</a>. */
105
- flexBasis?: string;
106
- /** Overrides the alignItems property of a flex or grid container. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/align-self">MDN</a>. */
107
- alignSelf?: AlignSelf;
108
- /** Specifies how the element is justified inside a flex or grid container. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/justify-self">MDN</a>. */
109
- justifySelf?: string;
110
- /** The layout order for the element within a flex or grid container. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/order">MDN</a>. */
111
- order?: number;
112
- /** When used in a grid layout, specifies the named grid area that the element should be placed in within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-area">MDN</a>. */
113
- gridArea?: string;
114
- /** When used in a grid layout, specifies the column the element should be placed in within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column">MDN</a>. */
115
- gridColumn?: string;
116
- /** When used in a grid layout, specifies the row the element should be placed in within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row">MDN</a>. */
117
- gridRow?: string;
118
- /** When used in a grid layout, specifies the starting column to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-start">MDN</a>. */
119
- gridColumnStart?: string;
120
- /** When used in a grid layout, specifies the ending column to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-column-end">MDN</a>. */
121
- gridColumnEnd?: string;
122
- /** When used in a grid layout, specifies the starting row to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-start">MDN</a>. */
123
- gridRowStart?: string;
124
- /** When used in a grid layout, specifies the ending row to span within the grid. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/grid-row-end">MDN</a>. */
125
- gridRowEnd?: string;
126
- }
127
- interface SpacingProps {
128
- /** The margin for all four sides of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin">MDN</a>. */
129
- margin?: string;
130
- /** The margin for the bottom side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-bottom">MDN</a>. */
131
- marginBottom?: string;
132
- /** The margin for the left side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left">MDN</a>. */
133
- marginLeft?: string;
134
- /** The margin for the right side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-right">MDN</a>. */
135
- marginRight?: string;
136
- /** The margin for the top side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/margin-top">MDN</a>. */
137
- marginTop?: string;
138
- }
139
- interface SizingProps {
140
- /** The height of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/height">MDN</a>. */
141
- height?: string | number;
142
- /** The maximum height of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/max-height">MDN</a>. */
143
- maxHeight?: string;
144
- /** The maximum width of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/max-width">MDN</a>. */
145
- maxWidth?: string;
146
- /** The minimum height of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/min-height">MDN</a>. */
147
- minHeight?: string;
148
- /** The minimum width of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/min-width">MDN</a>. */
149
- minWidth?: string;
150
- /** The width of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/width">MDN</a>. */
151
- width?: string | number;
152
- }
153
- interface PositioningProps {
154
- /** Specifies how the element is positioned. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/position">MDN</a>. */
155
- position?: string;
156
- /** The top position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/top">MDN</a>. */
157
- top?: string;
158
- /** The bottom position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/bottom">MDN</a>. */
159
- bottom?: string;
160
- /** The left position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/left">MDN</a>. Consider using start instead for RTL support. */
161
- left?: string;
162
- /** The right position for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/right">MDN</a>. Consider using start instead for RTL support. */
163
- right?: string;
164
- /** The stacking order for the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/z-index">MDN</a>. */
165
- zIndex?: string;
166
- }
167
- interface FlexLayoutProps {
168
- /** The distribution of space around child items along the cross axis. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/align-content">MDN</a>. */
169
- alignContent?: AlignContent;
170
- /** The alignment of children within their container. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/align-items">MDN</a>. */
171
- alignItems?: AlignItems;
172
- /** The direction in which to layout children. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-direction">MDN</a>. */
173
- flexDirection?: FlexDirection;
174
- /** Whether to wrap items onto multiple lines. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/flex-wrap">MDN</a>. */
175
- flexWrap?: FlexWrap;
176
- /** The space to display between both rows and columns. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/gap">MDN</a>. */
177
- gap?: string;
178
- /** Whether the box is displayed inline or not. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/display">MDN</a>. */
179
- inline?: boolean;
180
- /** The distribution of space around items along the main axis. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/justify-content">MDN</a>. */
181
- justifyContent?: JustifyContent;
182
- }
183
- interface StylingProps extends LayoutProps, SpacingProps, SizingProps, PositioningProps {
184
- }
185
- interface InternalSpacingProps {
186
- /** The padding for all four sides of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/padding">MDN</a>. */
187
- padding?: string;
188
- /** The padding for the bottom side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom">MDN</a>. */
189
- paddingBottom?: string;
190
- /** The padding for the left side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left">MDN</a>. */
191
- paddingLeft?: string;
192
- /** The padding for the right side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/padding-right">MDN</a>. */
193
- paddingRight?: string;
194
- /** The padding for the top side of the element. See <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/padding-top">MDN</a>. */
195
- paddingTop?: string;
196
- }
197
-
198
8
  type ChartDimensions = {
199
9
  width: number;
200
10
  height: number;
@@ -248,17 +58,19 @@ declare const HorizontalBarChartSize: {
248
58
  readonly medium: "medium";
249
59
  readonly large: "large";
250
60
  };
251
- type HorizontalBarChartSize = ValueOf$1<typeof HorizontalBarChartSize>;
61
+ type HorizontalBarChartSize = ValueOf<typeof HorizontalBarChartSize>;
252
62
  /**
253
63
  * Component theme.
254
64
  */
255
65
  declare const HorizontalBarChartTheme: {
256
- readonly default: "default";
66
+ readonly default: "default"; /**
67
+ * Component theme.
68
+ */
257
69
  readonly dark: "dark";
258
70
  readonly darker: "darker";
259
71
  readonly monochrome: "monochrome";
260
72
  };
261
- type HorizontalBarChartTheme = ValueOf$1<typeof HorizontalBarChartTheme>;
73
+ type HorizontalBarChartTheme = ValueOf<typeof HorizontalBarChartTheme>;
262
74
  /**
263
75
  * Tooltip label variant.
264
76
  */
@@ -268,7 +80,7 @@ declare const HorizontalBarChartTooltipVariant: {
268
80
  value: string;
269
81
  percent: string;
270
82
  };
271
- type HorizontalBarChartTooltipVariant = ValueOf$1<typeof HorizontalBarChartTooltipVariant>;
83
+ type HorizontalBarChartTooltipVariant = ValueOf<typeof HorizontalBarChartTooltipVariant>;
272
84
  interface LocaleText$1 {
273
85
  emptyChartText: string;
274
86
  }
@@ -327,19 +139,13 @@ interface HorizontalBarChartAxisBottomProps extends ComponentProps<'g'> {
327
139
  }
328
140
  type StyledHorizontalBarChartAxisBottomProps = Omit<HorizontalBarChartAxisBottomProps, 'areXLabelsRotated' | 'chartHeight' | 'd3scale'> & {};
329
141
 
330
- declare const HorizontalBarChart: Comp$1<HorizontalBarChartProps, HTMLDivElement>;
331
-
332
- /**
333
- * Component props.
334
- */
335
- interface FlexboxProps extends ComponentProps<'div'>, StylingProps, InternalSpacingProps, FlexLayoutProps {
336
- }
142
+ declare const HorizontalBarChart: Comp<HorizontalBarChartProps, HTMLDivElement>;
337
143
 
338
144
  /**
339
145
  * Component style.
340
146
  */
341
147
  declare const StyledHorizontalBarChart: styled_components.StyledComponent<"div", any, Omit<HorizontalBarChartProps, "data">, never>;
342
- declare const StyledHorizontalBarChartTitle: styled_components.StyledComponent<Comp<FlexboxProps, HTMLDivElement>, any, Omit<HorizontalBarChartProps, "data">, never>;
148
+ declare const StyledHorizontalBarChartTitle: styled_components.StyledComponent<_redsift_design_system.Comp<_redsift_design_system.FlexboxProps, HTMLDivElement>, any, Omit<HorizontalBarChartProps, "data">, never>;
343
149
  declare const StyledHorizontalBarChartCaption: styled_components.StyledComponent<"p", any, Omit<HorizontalBarChartProps, "data">, never>;
344
150
  declare const StyledHorizontalBarChartEmptyText: styled_components.StyledComponent<"div", any, {
345
151
  $maxWidth: number;
@@ -358,7 +164,7 @@ declare const PieChartSize: {
358
164
  readonly medium: "medium";
359
165
  readonly large: "large";
360
166
  };
361
- type PieChartSize = ValueOf$1<typeof PieChartSize>;
167
+ type PieChartSize = ValueOf<typeof PieChartSize>;
362
168
  /**
363
169
  * Component variant.
364
170
  */
@@ -368,7 +174,7 @@ declare const PieChartVariant: {
368
174
  readonly donut: "donut";
369
175
  readonly spacedDonut: "spacedDonut";
370
176
  };
371
- type PieChartVariant = ValueOf$1<typeof PieChartVariant>;
177
+ type PieChartVariant = ValueOf<typeof PieChartVariant>;
372
178
  /**
373
179
  * Component's labels variant.
374
180
  */
@@ -379,7 +185,7 @@ declare const PieChartLabelVariant: {
379
185
  readonly externalLabelValue: "externalLabelValue";
380
186
  readonly externalLabelPercent: "externalLabelPercent";
381
187
  };
382
- type PieChartLabelVariant = ValueOf$1<typeof PieChartLabelVariant>;
188
+ type PieChartLabelVariant = ValueOf<typeof PieChartLabelVariant>;
383
189
  /**
384
190
  * Component theme.
385
191
  */
@@ -389,7 +195,7 @@ declare const PieChartTheme: {
389
195
  readonly darker: "darker";
390
196
  readonly monochrome: "monochrome";
391
197
  };
392
- type PieChartTheme = ValueOf$1<typeof PieChartTheme>;
198
+ type PieChartTheme = ValueOf<typeof PieChartTheme>;
393
199
  /**
394
200
  * Tooltip label variant.
395
201
  */
@@ -399,7 +205,7 @@ declare const PieChartTooltipVariant: {
399
205
  value: string;
400
206
  percent: string;
401
207
  };
402
- type PieChartTooltipVariant = ValueOf$1<typeof PieChartTooltipVariant>;
208
+ type PieChartTooltipVariant = ValueOf<typeof PieChartTooltipVariant>;
403
209
  interface LocaleText {
404
210
  emptyChartText: string;
405
211
  }
@@ -460,13 +266,13 @@ type StyledPieChartArcProps = Omit<PieChartArcProps, 'chartId' | 'color' | 'data
460
266
  $clickable: boolean;
461
267
  };
462
268
 
463
- declare const PieChart: Comp$1<PieChartProps, HTMLDivElement>;
269
+ declare const PieChart: Comp<PieChartProps, HTMLDivElement>;
464
270
 
465
271
  /**
466
272
  * Component style.
467
273
  */
468
274
  declare const StyledPieChart: styled_components.StyledComponent<"div", any, Omit<PieChartProps, "data">, never>;
469
- declare const StyledPieChartTitle: styled_components.StyledComponent<Comp<FlexboxProps, HTMLDivElement>, any, Omit<PieChartProps, "data">, never>;
275
+ declare const StyledPieChartTitle: styled_components.StyledComponent<_redsift_design_system.Comp<_redsift_design_system.FlexboxProps, HTMLDivElement>, any, Omit<PieChartProps, "data">, never>;
470
276
  declare const StyledPieChartCaption: styled_components.StyledComponent<"p", any, Omit<PieChartProps, "data">, never>;
471
277
  declare const StyledPieChartCenterText: styled_components.StyledComponent<"div", any, {
472
278
  $maxWidth: number;
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { scaleOrdinal, select, axisBottom, scaleLinear, sum, pie, arc } from 'd3';
2
+ import { RedsiftDataVizColorBlueDefault, RedsiftDataVizColorPurpleDefault, RedsiftDataVizColorGreenDefault, RedsiftDataVizColorRedDefault, RedsiftDataVizColorPinkDefault, RedsiftDataVizColorCyanDefault, RedsiftDataVizColorOrangeDefault, RedsiftDataVizColorYellowDefault, RedsiftDataVizColorBrownDefault, RedsiftDataVizColorGreyDefault, RedsiftDataVizColorPurpleDark, RedsiftDataVizColorBlueDark, RedsiftDataVizColorGreenDark, RedsiftDataVizColorRedDark, RedsiftDataVizColorPinkDark, RedsiftDataVizColorCyanDark, RedsiftDataVizColorOrangeDark, RedsiftDataVizColorYellowDark, RedsiftDataVizColorBrownDark, RedsiftDataVizColorGreyDark, RedsiftDataVizColorPurpleDarker, RedsiftDataVizColorBlueDarker, RedsiftDataVizColorGreenDarker, RedsiftDataVizColorRedDarker, RedsiftDataVizColorPinkDarker, RedsiftDataVizColorCyanDarker, RedsiftDataVizColorOrangeDarker, RedsiftDataVizColorYellowDarker, RedsiftDataVizColorBrownDarker, RedsiftDataVizColorGreyDarker, RedsiftDataVizColorPurpleLight, RedsiftDataVizColorBlueLight, RedsiftDataVizColorGreenLight, RedsiftDataVizColorRedLight, RedsiftDataVizColorPinkLight, RedsiftDataVizColorCyanLight, RedsiftDataVizColorOrangeLight, RedsiftDataVizColorYellowLight, RedsiftDataVizColorBrownLight, RedsiftDataVizColorGreyLight, RedsiftDataVizColorPurpleLighter, RedsiftDataVizColorBlueLighter, RedsiftDataVizColorGreenLighter, RedsiftDataVizColorRedLighter, RedsiftDataVizColorPinkLighter, RedsiftDataVizColorCyanLighter, RedsiftDataVizColorOrangeLighter, RedsiftDataVizColorYellowLighter, RedsiftDataVizColorBrownLighter, RedsiftDataVizColorGreyLighter, Flexbox, Text, Number as Number$1 } from '@redsift/design-system';
2
3
  import React, { forwardRef, useRef, useEffect, useId } from 'react';
3
4
  import styled, { css } from 'styled-components';
4
- import { Text, Number as Number$1 } from '@redsift/design-system';
5
5
  import { Tooltip } from '@redsift/popovers';
6
6
 
7
7
  const ColorTheme = {
@@ -11,61 +11,6 @@ const ColorTheme = {
11
11
  monochrome: 'monochrome'
12
12
  };
13
13
 
14
- /**
15
- * Do not edit directly
16
- * Generated on Tue, 14 Mar 2023 15:14:37 GMT
17
- */
18
- const RedsiftDataVizColorPurpleDefault = '#C1AAEA';
19
- const RedsiftDataVizColorPurpleDark = '#A78ADB';
20
- const RedsiftDataVizColorPurpleDarker = '#8D6CC9';
21
- const RedsiftDataVizColorPurpleLight = '#D9CAF5';
22
- const RedsiftDataVizColorPurpleLighter = '#F0E9FC';
23
- const RedsiftDataVizColorBlueDefault = '#B6DAEE';
24
- const RedsiftDataVizColorBlueDark = '#97C5DE';
25
- const RedsiftDataVizColorBlueDarker = '#73ADCC';
26
- const RedsiftDataVizColorBlueLight = '#D8EDF8';
27
- const RedsiftDataVizColorBlueLighter = '#F6FBFE';
28
- const RedsiftDataVizColorGreenDefault = '#B3E3C5';
29
- const RedsiftDataVizColorGreenDark = '#90D2A9';
30
- const RedsiftDataVizColorGreenDarker = '#6DBE8B';
31
- const RedsiftDataVizColorGreenLight = '#D3F0DE';
32
- const RedsiftDataVizColorGreenLighter = '#EDFAF1';
33
- const RedsiftDataVizColorRedDefault = '#EAADAC';
34
- const RedsiftDataVizColorRedDark = '#D18785';
35
- const RedsiftDataVizColorRedDarker = '#BA6361';
36
- const RedsiftDataVizColorRedLight = '#FFD3D2';
37
- const RedsiftDataVizColorRedLighter = '#FFE5E5';
38
- const RedsiftDataVizColorPinkDefault = '#E2A7D7';
39
- const RedsiftDataVizColorPinkDark = '#D185C3';
40
- const RedsiftDataVizColorPinkDarker = '#BD63AC';
41
- const RedsiftDataVizColorPinkLight = '#EFC8E8';
42
- const RedsiftDataVizColorPinkLighter = '#F9E6F6';
43
- const RedsiftDataVizColorCyanDefault = '#AFF5F3';
44
- const RedsiftDataVizColorCyanDark = '#8CEAE6';
45
- const RedsiftDataVizColorCyanDarker = '#6CDCD8';
46
- const RedsiftDataVizColorCyanLight = '#D4FCFA';
47
- const RedsiftDataVizColorCyanLighter = '#E1FFFF';
48
- const RedsiftDataVizColorOrangeDefault = '#F2D39E';
49
- const RedsiftDataVizColorOrangeDark = '#D8B475';
50
- const RedsiftDataVizColorOrangeDarker = '#BD954F';
51
- const RedsiftDataVizColorOrangeLight = '#FFE8C0';
52
- const RedsiftDataVizColorOrangeLighter = '#FFF0D7';
53
- const RedsiftDataVizColorYellowDefault = '#F6EFC7';
54
- const RedsiftDataVizColorYellowDark = '#DED4A0';
55
- const RedsiftDataVizColorYellowDarker = '#C6BB7A';
56
- const RedsiftDataVizColorYellowLight = '#FFFBE1';
57
- const RedsiftDataVizColorYellowLighter = '#FFFDF0';
58
- const RedsiftDataVizColorBrownDefault = '#E6C2A0';
59
- const RedsiftDataVizColorBrownDark = '#CDA279';
60
- const RedsiftDataVizColorBrownDarker = '#B58556';
61
- const RedsiftDataVizColorBrownLight = '#FFE3C9';
62
- const RedsiftDataVizColorBrownLighter = '#FFEEDE';
63
- const RedsiftDataVizColorGreyDefault = '#E5E5E5';
64
- const RedsiftDataVizColorGreyDark = '#BDBDBD';
65
- const RedsiftDataVizColorGreyDarker = '#666666';
66
- const RedsiftDataVizColorGreyLight = '#F5F5F5';
67
- const RedsiftDataVizColorGreyLighter = '#FFFFFF';
68
-
69
14
  const monochrome = RedsiftDataVizColorBlueDefault;
70
15
  const scheme = {
71
16
  default: [RedsiftDataVizColorPurpleDefault, RedsiftDataVizColorBlueDefault, RedsiftDataVizColorGreenDefault, RedsiftDataVizColorRedDefault, RedsiftDataVizColorPinkDefault, RedsiftDataVizColorCyanDefault, RedsiftDataVizColorOrangeDefault, RedsiftDataVizColorYellowDefault, RedsiftDataVizColorBrownDefault, RedsiftDataVizColorGreyDefault],
@@ -207,301 +152,6 @@ const HorizontalBarChartTooltipVariant = {
207
152
  percent: 'percent'
208
153
  };
209
154
 
210
- var classnamesExports = {};
211
- var classnames = {
212
- get exports(){ return classnamesExports; },
213
- set exports(v){ classnamesExports = v; },
214
- };
215
-
216
- /*!
217
- Copyright (c) 2018 Jed Watson.
218
- Licensed under the MIT License (MIT), see
219
- http://jedwatson.github.io/classnames
220
- */
221
-
222
- (function (module) {
223
- /* global define */
224
-
225
- (function () {
226
-
227
- var hasOwn = {}.hasOwnProperty;
228
-
229
- function classNames() {
230
- var classes = [];
231
-
232
- for (var i = 0; i < arguments.length; i++) {
233
- var arg = arguments[i];
234
- if (!arg) continue;
235
-
236
- var argType = typeof arg;
237
-
238
- if (argType === 'string' || argType === 'number') {
239
- classes.push(arg);
240
- } else if (Array.isArray(arg)) {
241
- if (arg.length) {
242
- var inner = classNames.apply(null, arg);
243
- if (inner) {
244
- classes.push(inner);
245
- }
246
- }
247
- } else if (argType === 'object') {
248
- if (arg.toString === Object.prototype.toString) {
249
- for (var key in arg) {
250
- if (hasOwn.call(arg, key) && arg[key]) {
251
- classes.push(key);
252
- }
253
- }
254
- } else {
255
- classes.push(arg.toString());
256
- }
257
- }
258
- }
259
-
260
- return classes.join(' ');
261
- }
262
-
263
- if (module.exports) {
264
- classNames.default = classNames;
265
- module.exports = classNames;
266
- } else {
267
- window.classNames = classNames;
268
- }
269
- }());
270
- } (classnames));
271
-
272
- var classNames = classnamesExports;
273
-
274
- const baseLayout = css`
275
- ${_ref => {
276
- let {
277
- flex,
278
- flexGrow,
279
- flexShrink,
280
- flexBasis,
281
- alignSelf,
282
- justifySelf,
283
- order,
284
- gridArea,
285
- gridColumn,
286
- gridRow,
287
- gridColumnStart,
288
- gridColumnEnd,
289
- gridRowStart,
290
- gridRowEnd
291
- } = _ref;
292
- return css`
293
- ${flex ? `flex: ${flex};` : ''}
294
- ${flexGrow !== undefined ? `flex-grow: ${flexGrow};` : ''}
295
- ${flexShrink !== undefined ? `flex-shrink: ${flexShrink};` : ''}
296
- ${flexBasis ? `flex-basis: ${flexBasis};` : ''}
297
- ${alignSelf ? `align-self: ${alignSelf};` : ''}
298
- ${justifySelf ? `justify-self: ${justifySelf};` : ''}
299
- ${order !== undefined ? `order: ${order};` : ''}
300
- ${gridArea ? `grid-area: ${gridArea};` : ''}
301
- ${gridColumn ? `grid-column: ${gridColumn};` : ''}
302
- ${gridRow ? `grid-row: ${gridRow};` : ''}
303
- ${gridColumnStart ? `grid-column-start: ${gridColumnStart};` : ''}
304
- ${gridColumnEnd ? `grid-column-end: ${gridColumnEnd};` : ''}
305
- ${gridRowStart ? `grid-row-start: ${gridRowStart};` : ''}
306
- ${gridRowEnd ? `grid-row-end: ${gridRowEnd};` : ''}
307
- `;
308
- }}
309
- `;
310
- const baseSpacing = css`
311
- ${_ref2 => {
312
- let {
313
- margin,
314
- marginBottom,
315
- marginLeft,
316
- marginRight,
317
- marginTop
318
- } = _ref2;
319
- return css`
320
- ${margin ? `margin: ${margin};` : ''}
321
- ${marginBottom ? `margin-bottom: ${marginBottom};` : ''}
322
- ${marginLeft ? `margin-left: ${marginLeft};` : ''}
323
- ${marginRight ? `margin-right: ${marginRight};` : ''}
324
- ${marginTop ? `margin-top: ${marginTop};` : ''}
325
- `;
326
- }}
327
- `;
328
- const baseInternalSpacing = css`
329
- ${_ref3 => {
330
- let {
331
- padding,
332
- paddingBottom,
333
- paddingLeft,
334
- paddingRight,
335
- paddingTop
336
- } = _ref3;
337
- return css`
338
- ${padding ? `padding: ${padding};` : ''}
339
- ${paddingBottom ? `padding-bottom: ${paddingBottom};` : ''}
340
- ${paddingLeft ? `padding-left: ${paddingLeft};` : ''}
341
- ${paddingRight ? `padding-right: ${paddingRight};` : ''}
342
- ${paddingTop ? `padding-top: ${paddingTop};` : ''}
343
- `;
344
- }}
345
- `;
346
- const baseSizing = css`
347
- ${_ref4 => {
348
- let {
349
- height,
350
- maxHeight,
351
- maxWidth,
352
- minHeight,
353
- minWidth,
354
- width
355
- } = _ref4;
356
- return css`
357
- ${height !== undefined ? `height: ${typeof height === 'number' ? `${height}px` : height};` : ''}
358
- ${maxHeight ? `max-height: ${maxHeight};` : ''}
359
- ${maxWidth ? `max-width: ${maxWidth};` : ''}
360
- ${minHeight ? `min-height: ${minHeight};` : ''}
361
- ${minWidth ? `min-width: ${minWidth};` : ''}
362
- ${width !== undefined ? `width: ${typeof width === 'number' ? `${width}px` : width};` : ''}
363
- `;
364
- }}
365
- `;
366
- const basePositioning = css`
367
- ${_ref5 => {
368
- let {
369
- position,
370
- top,
371
- bottom,
372
- left,
373
- right,
374
- zIndex
375
- } = _ref5;
376
- return css`
377
- ${position ? `position: ${position};` : ''}
378
- ${top ? `top: ${top};` : ''}
379
- ${bottom ? `bottom: ${bottom};` : ''}
380
- ${left ? `left: ${left};` : ''}
381
- ${right ? `right: ${right};` : ''}
382
- ${zIndex ? `z-index: ${zIndex};` : ''}
383
- `;
384
- }}
385
- `;
386
- const baseFlexbox = css`
387
- ${_ref6 => {
388
- let {
389
- alignContent,
390
- alignItems,
391
- flexDirection,
392
- flexWrap,
393
- gap,
394
- justifyContent
395
- } = _ref6;
396
- return css`
397
- ${alignContent ? `align-content: ${alignContent};` : ''}
398
- ${alignItems ? `align-items: ${alignItems};` : ''}
399
- ${flexDirection ? `flex-direction: ${flexDirection};` : ''}
400
- ${flexWrap ? `flex-wrap: ${flexWrap};` : ''}
401
- gap: ${gap};
402
- ${justifyContent ? `justify-content: ${justifyContent};` : ''}
403
- `;
404
- }}
405
- `;
406
- const baseGrid = css`
407
- ${_ref7 => {
408
- let {
409
- alignContent,
410
- alignItems,
411
- gap,
412
- gridAutoColumns,
413
- gridAutoRows,
414
- gridTemplateAreas,
415
- gridTemplateColumns,
416
- gridTemplateRows,
417
- justifyContent,
418
- justifyItems
419
- } = _ref7;
420
- return css`
421
- ${alignContent ? `align-content: ${alignContent};` : ''}
422
- ${alignItems ? `align-items: ${alignItems};` : ''}
423
- ${gap ? `gap: ${gap};` : ''}
424
- ${gridAutoColumns ? `grid-auto-columns: ${gridAutoColumns};` : ''}
425
- ${gridAutoRows ? `grid-auto-rows: ${gridAutoRows};` : ''}
426
- ${gridTemplateAreas ? `grid-template-areas: ${gridTemplateAreas};` : ''}
427
- ${gridTemplateColumns ? `grid-template-columns: ${gridTemplateColumns};` : ''}
428
- ${gridTemplateRows ? `grid-template-rows: ${gridTemplateRows};` : ''}
429
- ${justifyContent ? `justify-content: ${justifyContent};` : ''}
430
- ${justifyItems ? `justify-items: ${justifyItems};` : ''}
431
- `;
432
- }}
433
- `;
434
- const baseStyling = css`
435
- font-family: var(--redsift-typography-body-font-family);
436
- font-size: var(--redsift-typography-body-font-size);
437
- font-weight: var(--redsift-typography-body-font-weight);
438
- line-height: var(--redsift-typography-body-line-height);
439
- color: var(--redsift-color-neutral-black);
440
-
441
- ${baseLayout}
442
- ${baseSpacing}
443
- ${baseSizing}
444
- ${basePositioning}
445
- `;
446
- css`
447
- ${_ref8 => {
448
- let {
449
- display
450
- } = _ref8;
451
- return display ? `display: ${display};` : '';
452
- }}
453
- font-family: var(--redsift-typography-body-font-family);
454
- font-size: var(--redsift-typography-body-font-size);
455
- font-weight: var(--redsift-typography-body-font-weight);
456
- line-height: var(--redsift-typography-body-line-height);
457
- color: var(--redsift-color-neutral-black);
458
-
459
- ${baseInternalSpacing}
460
- ${baseFlexbox}
461
- ${baseGrid}
462
- `;
463
-
464
- /**
465
- * Component style.
466
- */
467
- const StyledFlexbox = styled.div`
468
- display: ${_ref => {
469
- let {
470
- inline
471
- } = _ref;
472
- return inline ? 'inline-flex' : 'flex';
473
- }};
474
-
475
- ${baseStyling}
476
- ${baseInternalSpacing}
477
- ${baseFlexbox}
478
- `;
479
-
480
- const _excluded$5 = ["children", "className"];
481
- const COMPONENT_NAME$5 = 'Flexbox';
482
- const CLASSNAME$5 = 'redsift-flex-box';
483
- const DEFAULT_PROPS$5 = {
484
- gap: '16px'
485
- };
486
-
487
- /**
488
- * The Flexbox component.
489
- */
490
- const Flexbox = /*#__PURE__*/forwardRef((props, ref) => {
491
- const {
492
- children,
493
- className
494
- } = props,
495
- forwardedProps = _objectWithoutProperties(props, _excluded$5);
496
- return /*#__PURE__*/React.createElement(StyledFlexbox, _extends({}, forwardedProps, {
497
- className: classNames(Flexbox.className, className),
498
- ref: ref
499
- }), children);
500
- });
501
- Flexbox.className = CLASSNAME$5;
502
- Flexbox.defaultProps = DEFAULT_PROPS$5;
503
- Flexbox.displayName = COMPONENT_NAME$5;
504
-
505
155
  /**
506
156
  * Component style.
507
157
  */
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../src/types.ts","../../design-system/src/utils/redsift-design-tokens.ts","../src/scheme.ts","../src/components/HorizontalBarChart/types.ts","../../../node_modules/classnames/index.js","../../design-system/src/components/shared/styles.ts","../../design-system/src/components/flexbox/styles.ts","../../design-system/src/components/flexbox/Flexbox.tsx","../src/components/HorizontalBarChart/styles.ts","../src/components/HorizontalBarChart/HorizontalBarChartBar.tsx","../src/components/HorizontalBarChart/HorizontalBarChartAxisBottom.tsx","../src/components/HorizontalBarChart/HorizontalBarChart.tsx","../src/components/PieChart/types.ts","../src/components/PieChart/styles.ts","../src/components/PieChart/PieChartArc.tsx","../src/components/PieChart/PieChart.tsx"],"sourcesContent":["import { PieArcDatum as D3PieArcDatum } from 'd3-shape';\nimport { ValueOf } from '~/types';\n\nexport type ChartDimensions = {\n width: number;\n height: number;\n marginTop?: number;\n marginRight?: number;\n marginBottom?: number;\n marginLeft?: number;\n};\n\nexport type Datum = {\n name: string;\n value: number;\n};\n\nexport type PieArcDatum = D3PieArcDatum<Datum>;\n\nexport const ColorTheme = {\n default: 'default',\n dark: 'dark',\n darker: 'darker',\n monochrome: 'monochrome',\n} as const;\nexport type ColorTheme = ValueOf<typeof ColorTheme>;\n\nexport type SuccessDangerColorTheme = {\n success: string;\n warning: string;\n danger: string;\n neutral?: string;\n};\n","/**\n * Do not edit directly\n * Generated on Tue, 14 Mar 2023 15:14:37 GMT\n */\n\nexport const RedsiftColorDefaultPrimary = '#0079e1';\nexport const RedsiftColorDefaultSecondary = '#0063b9';\nexport const RedsiftColorDefaultHover = '#dce8f3';\nexport const RedsiftColorDefaultActive = '#c4dcf1';\nexport const RedsiftColorDefaultActiveHover = '#abcfef';\nexport const RedsiftColorDefaultPrimaryActive = '#004a8a';\nexport const RedsiftColorDefaultPrimaryActiveHover = '#00427c';\nexport const RedsiftColorWebsitePrimary = '#0079e1';\nexport const RedsiftColorWebsiteSecondary = '#0063b9';\nexport const RedsiftColorWebsiteHover = '#dce8f3';\nexport const RedsiftColorWebsiteActive = '#c4dcf1';\nexport const RedsiftColorWebsiteActiveHover = '#abcfef';\nexport const RedsiftColorWebsitePrimaryActive = '#004a8a';\nexport const RedsiftColorWebsitePrimaryActiveHover = '#00427c';\nexport const RedsiftColorOndmarcPrimary = '#02ac61';\nexport const RedsiftColorOndmarcSecondary = '#009252';\nexport const RedsiftColorOndmarcHover = '#dcede6';\nexport const RedsiftColorOndmarcActive = '#c4e6d7';\nexport const RedsiftColorOndmarcActiveHover = '#acdfc8';\nexport const RedsiftColorOndmarcPrimaryActive = '#00512e';\nexport const RedsiftColorOndmarcPrimaryActiveHover = '#004829';\nexport const RedsiftColorOninboxPrimary = '#33b222';\nexport const RedsiftColorOninboxSecondary = '#268519';\nexport const RedsiftColorOninboxHover = '#e1eedf';\nexport const RedsiftColorOninboxActive = '#cee8cb';\nexport const RedsiftColorOninboxActiveHover = '#bae0b5';\nexport const RedsiftColorOninboxPrimaryActive = '#164e0e';\nexport const RedsiftColorOninboxPrimaryActiveHover = '#13460c';\nexport const RedsiftColorOndomainPrimary = '#028062';\nexport const RedsiftColorOndomainSecondary = '#015944';\nexport const RedsiftColorOndomainHover = '#dce9e6';\nexport const RedsiftColorOndomainActive = '#c4ded8';\nexport const RedsiftColorOndomainActiveHover = '#acd1c8';\nexport const RedsiftColorOndomainPrimaryActive = '#003f30';\nexport const RedsiftColorOndomainPrimaryActiveHover = '#00382b';\nexport const RedsiftColorHardenizePrimary = '#0f7ab3';\nexport const RedsiftColorHardenizeSecondary = '#3498db';\nexport const RedsiftColorHardenizeHover = '#dee8ee';\nexport const RedsiftColorHardenizeActive = '#c7dce8';\nexport const RedsiftColorHardenizeActiveHover = '#b0d0e1';\nexport const RedsiftColorHardenizePrimaryActive = '#0a5379';\nexport const RedsiftColorHardenizePrimaryActiveHover = '#094a6c';\nexport const RedsiftColorToolsPrimary = '#37bdfb';\nexport const RedsiftColorToolsSecondary = '#02a2ef';\nexport const RedsiftColorToolsHover = '#e2eff5';\nexport const RedsiftColorToolsActive = '#cfeaf6';\nexport const RedsiftColorToolsActiveHover = '#bce4f6';\nexport const RedsiftColorToolsPrimaryActive = '#237ea8';\nexport const RedsiftColorToolsPrimaryActiveHover = '#1f7197';\nexport const RedsiftColorSuccessPrimary = '#02ac61';\nexport const RedsiftColorSuccessSecondary = '#009252';\nexport const RedsiftColorSuccessHover = '#dcede6';\nexport const RedsiftColorSuccessActive = '#c4e6d7';\nexport const RedsiftColorSuccessActiveHover = '#acdfc8';\nexport const RedsiftColorSuccessPrimaryActive = '#00512e';\nexport const RedsiftColorSuccessPrimaryActiveHover = '#004829';\nexport const RedsiftColorErrorPrimary = '#e11010';\nexport const RedsiftColorErrorSecondary = '#b41010';\nexport const RedsiftColorErrorHover = '#f3dede';\nexport const RedsiftColorErrorActive = '#f1c7c7';\nexport const RedsiftColorErrorActiveHover = '#efb0b0';\nexport const RedsiftColorErrorPrimaryActive = '#770a0a';\nexport const RedsiftColorErrorPrimaryActiveHover = '#6b0909';\nexport const RedsiftColorWarningPrimary = '#fcbb54';\nexport const RedsiftColorWarningSecondary = '#c09300';\nexport const RedsiftColorWarningHover = '#f5efe4';\nexport const RedsiftColorWarningActive = '#f6e9d5';\nexport const RedsiftColorWarningActiveHover = '#f7e3c4';\nexport const RedsiftColorWarningPrimaryActive = '#ae833f';\nexport const RedsiftColorWarningPrimaryActiveHover = '#9c7538';\nexport const RedsiftColorInfoPrimary = '#0079e1';\nexport const RedsiftColorInfoSecondary = '#0063b9';\nexport const RedsiftColorInfoHover = '#dce8f3';\nexport const RedsiftColorInfoActive = '#c4dcf1';\nexport const RedsiftColorInfoActiveHover = '#abcfef';\nexport const RedsiftColorInfoPrimaryActive = '#004a8a';\nexport const RedsiftColorInfoPrimaryActiveHover = '#00427c';\nexport const RedsiftColorQuestionPrimary = '#666666';\nexport const RedsiftColorQuestionSecondary = '#1c1c1c';\nexport const RedsiftColorQuestionHover = '#e6e6e6';\nexport const RedsiftColorQuestionActive = '#d8d8d8';\nexport const RedsiftColorQuestionActiveHover = '#cacaca';\nexport const RedsiftColorQuestionPrimaryActive = '#111111';\nexport const RedsiftColorQuestionPrimaryActiveHover = '#0f0f0f';\nexport const RedsiftColorNoDataPrimary = '#bdbdbd';\nexport const RedsiftColorNoDataSecondary = '#666666';\nexport const RedsiftColorNoDataHover = '#efefef';\nexport const RedsiftColorNoDataActive = '#eaeaea';\nexport const RedsiftColorNoDataActiveHover = '#e4e4e4';\nexport const RedsiftColorNoDataPrimaryActive = '#3d3d3d';\nexport const RedsiftColorNoDataPrimaryActiveHover = '#363636';\nexport const RedsiftColorNeutralBlack = '#1c1c1c';\nexport const RedsiftColorNeutralDarkgrey = '#666666';\nexport const RedsiftColorNeutralMidgrey = '#bdbdbd';\nexport const RedsiftColorNeutralLightgrey = '#ebebeb';\nexport const RedsiftColorNeutralXlightgrey = '#f5f5f5';\nexport const RedsiftColorNeutralWhite = '#ffffff';\nexport const RedsiftAppBarColorBackground = '#0079e1';\nexport const RedsiftAppBarColorText = '#FFFFFF';\nexport const RedsiftAppBarColorExpandIconResting = '#FFFFFF';\nexport const RedsiftAppBarColorExpandIconHover = '#FFFFFF';\nexport const RedsiftAppBarColorExpandIconBackgroundHover = '#0063b9';\nexport const RedsiftDataVizColorPurpleDefault = '#C1AAEA';\nexport const RedsiftDataVizColorPurpleDark = '#A78ADB';\nexport const RedsiftDataVizColorPurpleDarker = '#8D6CC9';\nexport const RedsiftDataVizColorPurpleLight = '#D9CAF5';\nexport const RedsiftDataVizColorPurpleLighter = '#F0E9FC';\nexport const RedsiftDataVizColorBlueDefault = '#B6DAEE';\nexport const RedsiftDataVizColorBlueDark = '#97C5DE';\nexport const RedsiftDataVizColorBlueDarker = '#73ADCC';\nexport const RedsiftDataVizColorBlueLight = '#D8EDF8';\nexport const RedsiftDataVizColorBlueLighter = '#F6FBFE';\nexport const RedsiftDataVizColorGreenDefault = '#B3E3C5';\nexport const RedsiftDataVizColorGreenDark = '#90D2A9';\nexport const RedsiftDataVizColorGreenDarker = '#6DBE8B';\nexport const RedsiftDataVizColorGreenLight = '#D3F0DE';\nexport const RedsiftDataVizColorGreenLighter = '#EDFAF1';\nexport const RedsiftDataVizColorRedDefault = '#EAADAC';\nexport const RedsiftDataVizColorRedDark = '#D18785';\nexport const RedsiftDataVizColorRedDarker = '#BA6361';\nexport const RedsiftDataVizColorRedLight = '#FFD3D2';\nexport const RedsiftDataVizColorRedLighter = '#FFE5E5';\nexport const RedsiftDataVizColorPinkDefault = '#E2A7D7';\nexport const RedsiftDataVizColorPinkDark = '#D185C3';\nexport const RedsiftDataVizColorPinkDarker = '#BD63AC';\nexport const RedsiftDataVizColorPinkLight = '#EFC8E8';\nexport const RedsiftDataVizColorPinkLighter = '#F9E6F6';\nexport const RedsiftDataVizColorCyanDefault = '#AFF5F3';\nexport const RedsiftDataVizColorCyanDark = '#8CEAE6';\nexport const RedsiftDataVizColorCyanDarker = '#6CDCD8';\nexport const RedsiftDataVizColorCyanLight = '#D4FCFA';\nexport const RedsiftDataVizColorCyanLighter = '#E1FFFF';\nexport const RedsiftDataVizColorOrangeDefault = '#F2D39E';\nexport const RedsiftDataVizColorOrangeDark = '#D8B475';\nexport const RedsiftDataVizColorOrangeDarker = '#BD954F';\nexport const RedsiftDataVizColorOrangeLight = '#FFE8C0';\nexport const RedsiftDataVizColorOrangeLighter = '#FFF0D7';\nexport const RedsiftDataVizColorYellowDefault = '#F6EFC7';\nexport const RedsiftDataVizColorYellowDark = '#DED4A0';\nexport const RedsiftDataVizColorYellowDarker = '#C6BB7A';\nexport const RedsiftDataVizColorYellowLight = '#FFFBE1';\nexport const RedsiftDataVizColorYellowLighter = '#FFFDF0';\nexport const RedsiftDataVizColorBrownDefault = '#E6C2A0';\nexport const RedsiftDataVizColorBrownDark = '#CDA279';\nexport const RedsiftDataVizColorBrownDarker = '#B58556';\nexport const RedsiftDataVizColorBrownLight = '#FFE3C9';\nexport const RedsiftDataVizColorBrownLighter = '#FFEEDE';\nexport const RedsiftDataVizColorGreyDefault = '#E5E5E5';\nexport const RedsiftDataVizColorGreyDark = '#BDBDBD';\nexport const RedsiftDataVizColorGreyDarker = '#666666';\nexport const RedsiftDataVizColorGreyLight = '#F5F5F5';\nexport const RedsiftDataVizColorGreyLighter = '#FFFFFF';\nexport const RedsiftSideNavigationColorBackground = '#2D2D34';\nexport const RedsiftSideNavigationColorMenuItemTextResting = '#FFFFFFB3';\nexport const RedsiftSideNavigationColorMenuItemTextDisabled = '#76767A';\nexport const RedsiftSideNavigationColorMenuItemTextHover = '#FFFFFF';\nexport const RedsiftSideNavigationColorMenuItemBackgroundHover = '#4C4C64';\nexport const RedsiftSideNavigationColorMenuItemBackgroundSecondary = '#333340';\nexport const RedsiftSideNavigationColorMenuItemBackgroundActive = '#39394C';\nexport const RedsiftSideNavigationColorMenuItemActive = '#02AC61';\nexport const RedsiftSideNavigationColorScrollbarResting = '#4C4C64';\nexport const RedsiftSideNavigationColorScrollbarHover = '#5d5d73';\nexport const RedsiftLayoutZIndexFooter = '1000';\nexport const RedsiftLayoutZIndexHeader = '1010';\nexport const RedsiftLayoutZIndexSidePanel = '1050';\nexport const RedsiftLayoutZIndexDropdown = '1100';\nexport const RedsiftLayoutZIndexOverlay = '1150';\nexport const RedsiftLayoutZIndexDialog = '1200';\nexport const RedsiftLayoutZIndexPopover = '1250';\nexport const RedsiftLayoutZIndexTooltip = '1300';\nexport const RedsiftTypographyFontFamilyRaleway = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyFontFamilyElectrolize =\n \"'electrolize', sans-serif\";\nexport const RedsiftTypographyFontFamilySourceCodePro =\n \"'Source Code Pro', sans-serif\";\nexport const RedsiftTypographyFontWeightRegular = '400';\nexport const RedsiftTypographyFontWeightMedium = '500';\nexport const RedsiftTypographyFontWeightSemiBold = '600';\nexport const RedsiftTypographyFontWeightBold = '700';\nexport const RedsiftTypographyH1FontFamily = \"'electrolize', sans-serif\";\nexport const RedsiftTypographyH1FontSize = '24px';\nexport const RedsiftTypographyH1FontWeight = '400';\nexport const RedsiftTypographyH1LineHeight = '28px';\nexport const RedsiftTypographyH1TextTransform = 'uppercase';\nexport const RedsiftTypographyH2FontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyH2FontSize = '24px';\nexport const RedsiftTypographyH2FontWeight = '600';\nexport const RedsiftTypographyH2LineHeight = '28px';\nexport const RedsiftTypographyH2TextTransform = 'unset';\nexport const RedsiftTypographyH3FontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyH3FontSize = '20px';\nexport const RedsiftTypographyH3FontWeight = '500';\nexport const RedsiftTypographyH3LineHeight = '24px';\nexport const RedsiftTypographyH3TextTransform = 'unset';\nexport const RedsiftTypographyH4FontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyH4FontSize = '18px';\nexport const RedsiftTypographyH4FontWeight = '500';\nexport const RedsiftTypographyH4LineHeight = '22px';\nexport const RedsiftTypographyH4TextTransform = 'unset';\nexport const RedsiftTypographyH5FontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyH5FontSize = '16px';\nexport const RedsiftTypographyH5FontWeight = '600';\nexport const RedsiftTypographyH5LineHeight = '20px';\nexport const RedsiftTypographyH5TextTransform = 'unset';\nexport const RedsiftTypographySubtitleFontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographySubtitleFontSize = '15px';\nexport const RedsiftTypographySubtitleFontWeight = '700';\nexport const RedsiftTypographySubtitleLineHeight = '26px';\nexport const RedsiftTypographySubtitleTextTransform = 'unset';\nexport const RedsiftTypographyBodyFontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyBodyFontSize = '15px';\nexport const RedsiftTypographyBodyFontWeight = '400';\nexport const RedsiftTypographyBodyLineHeight = '26px';\nexport const RedsiftTypographyBodyTextTransform = 'unset';\nexport const RedsiftTypographyBody2FontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyBody2FontSize = '14px';\nexport const RedsiftTypographyBody2FontWeight = '400';\nexport const RedsiftTypographyBody2LineHeight = '20px';\nexport const RedsiftTypographyLinkFontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyLinkFontSize = '15px';\nexport const RedsiftTypographyLinkFontWeight = '400';\nexport const RedsiftTypographyLinkLineHeight = '26px';\nexport const RedsiftTypographyInputTextFontFamily =\n \"'Source Code Pro', sans-serif\";\nexport const RedsiftTypographyInputTextFontSize = '15px';\nexport const RedsiftTypographyInputTextFontWeight = '400';\nexport const RedsiftTypographyInputTextLineHeight = '26px';\nexport const RedsiftTypographyButtonFontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyButtonFontSize = '15px';\nexport const RedsiftTypographyButtonFontWeight = '500';\nexport const RedsiftTypographyButtonLineHeight = '26px';\nexport const RedsiftTypographyButtonTextTransform = 'uppercase';\nexport const RedsiftTypographyCaptionFontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyCaptionFontSize = '13px';\nexport const RedsiftTypographyCaptionFontWeight = '400';\nexport const RedsiftTypographyCaptionLineHeight = '23px';\nexport const RedsiftTypographyCaptionTextTransform = 'unset';\nexport const RedsiftTypographyHelperFontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyHelperFontSize = '12px';\nexport const RedsiftTypographyHelperFontWeight = '400';\nexport const RedsiftTypographyHelperLineHeight = '16px';\nexport const RedsiftTypographyBadgeFontFamily = \"'Source Code Pro', sans-serif\";\nexport const RedsiftTypographyBadgeFontSize = '12px';\nexport const RedsiftTypographyBadgeFontWeight = '500';\nexport const RedsiftTypographyBadgeLineHeight = '20px';\nexport const RedsiftTypographyPillFontFamily = \"'Source Code Pro', sans-serif\";\nexport const RedsiftTypographyPillFontSize = '15px';\nexport const RedsiftTypographyPillFontWeight = '500';\nexport const RedsiftTypographyPillLineHeight = '28px';\nexport const RedsiftTypographyChipFontFamily = \"'Source Code Pro', sans-serif\";\nexport const RedsiftTypographyChipFontSize = '13px';\nexport const RedsiftTypographyChipFontWeight = '400';\nexport const RedsiftTypographyChipLineHeight = '18px';\nexport const RedsiftTypographyTooltipFontFamily = \"'Raleway', sans-serif\";\nexport const RedsiftTypographyTooltipFontSize = '13px';\nexport const RedsiftTypographyTooltipFontWeight = '500';\nexport const RedsiftTypographyTooltipLineHeight = '23px';\n","import {\n scaleOrdinal as d3scaleOrdinal,\n ScaleOrdinal as d3ScaleOrdinal,\n} from 'd3';\nimport { ColorTheme, SuccessDangerColorTheme } from './types';\n\nimport {\n RedsiftDataVizColorBlueDark,\n RedsiftDataVizColorBlueDarker,\n RedsiftDataVizColorBlueDefault,\n RedsiftDataVizColorBlueLight,\n RedsiftDataVizColorBlueLighter,\n RedsiftDataVizColorBrownDark,\n RedsiftDataVizColorBrownDarker,\n RedsiftDataVizColorBrownDefault,\n RedsiftDataVizColorBrownLight,\n RedsiftDataVizColorBrownLighter,\n RedsiftDataVizColorCyanDark,\n RedsiftDataVizColorCyanDarker,\n RedsiftDataVizColorCyanDefault,\n RedsiftDataVizColorCyanLight,\n RedsiftDataVizColorCyanLighter,\n RedsiftDataVizColorGreenDark,\n RedsiftDataVizColorGreenDarker,\n RedsiftDataVizColorGreenDefault,\n RedsiftDataVizColorGreenLight,\n RedsiftDataVizColorGreenLighter,\n RedsiftDataVizColorGreyDark,\n RedsiftDataVizColorGreyDarker,\n RedsiftDataVizColorGreyDefault,\n RedsiftDataVizColorGreyLight,\n RedsiftDataVizColorGreyLighter,\n RedsiftDataVizColorOrangeDark,\n RedsiftDataVizColorOrangeDarker,\n RedsiftDataVizColorOrangeDefault,\n RedsiftDataVizColorOrangeLight,\n RedsiftDataVizColorOrangeLighter,\n RedsiftDataVizColorPinkDark,\n RedsiftDataVizColorPinkDarker,\n RedsiftDataVizColorPinkDefault,\n RedsiftDataVizColorPinkLight,\n RedsiftDataVizColorPinkLighter,\n RedsiftDataVizColorPurpleDark,\n RedsiftDataVizColorPurpleDarker,\n RedsiftDataVizColorPurpleDefault,\n RedsiftDataVizColorPurpleLight,\n RedsiftDataVizColorPurpleLighter,\n RedsiftDataVizColorRedDark,\n RedsiftDataVizColorRedDarker,\n RedsiftDataVizColorRedDefault,\n RedsiftDataVizColorRedLight,\n RedsiftDataVizColorRedLighter,\n RedsiftDataVizColorYellowDark,\n RedsiftDataVizColorYellowDarker,\n RedsiftDataVizColorYellowDefault,\n RedsiftDataVizColorYellowLight,\n RedsiftDataVizColorYellowLighter,\n} from '~/utils';\n\nexport const monochrome = RedsiftDataVizColorBlueDefault;\n\nexport const scheme = {\n default: [\n RedsiftDataVizColorPurpleDefault,\n RedsiftDataVizColorBlueDefault,\n RedsiftDataVizColorGreenDefault,\n RedsiftDataVizColorRedDefault,\n RedsiftDataVizColorPinkDefault,\n RedsiftDataVizColorCyanDefault,\n RedsiftDataVizColorOrangeDefault,\n RedsiftDataVizColorYellowDefault,\n RedsiftDataVizColorBrownDefault,\n RedsiftDataVizColorGreyDefault,\n ],\n dark: [\n RedsiftDataVizColorPurpleDark,\n RedsiftDataVizColorBlueDark,\n RedsiftDataVizColorGreenDark,\n RedsiftDataVizColorRedDark,\n RedsiftDataVizColorPinkDark,\n RedsiftDataVizColorCyanDark,\n RedsiftDataVizColorOrangeDark,\n RedsiftDataVizColorYellowDark,\n RedsiftDataVizColorBrownDark,\n RedsiftDataVizColorGreyDark,\n ],\n darker: [\n RedsiftDataVizColorPurpleDarker,\n RedsiftDataVizColorBlueDarker,\n RedsiftDataVizColorGreenDarker,\n RedsiftDataVizColorRedDarker,\n RedsiftDataVizColorPinkDarker,\n RedsiftDataVizColorCyanDarker,\n RedsiftDataVizColorOrangeDarker,\n RedsiftDataVizColorYellowDarker,\n RedsiftDataVizColorBrownDarker,\n RedsiftDataVizColorGreyDarker,\n ],\n light: [\n RedsiftDataVizColorPurpleLight,\n RedsiftDataVizColorBlueLight,\n RedsiftDataVizColorGreenLight,\n RedsiftDataVizColorRedLight,\n RedsiftDataVizColorPinkLight,\n RedsiftDataVizColorCyanLight,\n RedsiftDataVizColorOrangeLight,\n RedsiftDataVizColorYellowLight,\n RedsiftDataVizColorBrownLight,\n RedsiftDataVizColorGreyLight,\n ],\n lighter: [\n RedsiftDataVizColorPurpleLighter,\n RedsiftDataVizColorBlueLighter,\n RedsiftDataVizColorGreenLighter,\n RedsiftDataVizColorRedLighter,\n RedsiftDataVizColorPinkLighter,\n RedsiftDataVizColorCyanLighter,\n RedsiftDataVizColorOrangeLighter,\n RedsiftDataVizColorYellowLighter,\n RedsiftDataVizColorBrownLighter,\n RedsiftDataVizColorGreyLighter,\n ],\n monochrome: [monochrome],\n empty: [RedsiftDataVizColorGreyDark],\n};\n\nexport const successDangerScheme = {\n success: RedsiftDataVizColorGreenDark,\n warning: RedsiftDataVizColorOrangeDark,\n danger: RedsiftDataVizColorRedDark,\n neutral: RedsiftDataVizColorGreyDark,\n};\n\nexport const getColorScale = (\n theme: ColorTheme | SuccessDangerColorTheme,\n isEmpty?: boolean\n): d3ScaleOrdinal<string, string> => {\n let d3colors = d3scaleOrdinal(scheme.default);\n if (isEmpty) {\n d3colors = d3scaleOrdinal(scheme.empty);\n } else if (typeof theme === 'string') {\n d3colors = d3scaleOrdinal(scheme[theme]);\n } else if (typeof theme === 'object') {\n d3colors = d3scaleOrdinal()\n .domain([\n theme.success,\n theme.warning,\n theme.danger,\n ...(theme.neutral ? [theme.neutral] : []),\n ])\n .range([\n successDangerScheme.success,\n successDangerScheme.warning,\n successDangerScheme.danger,\n ...(theme.neutral ? [successDangerScheme.neutral] : []),\n ])\n .unknown(monochrome) as d3ScaleOrdinal<string, string>;\n }\n\n return d3colors;\n};\n","import { ColorTheme, Datum, SuccessDangerColorTheme } from '../../types';\nimport { ComponentProps } from 'react';\nimport { ValueOf } from '@redsift/design-system';\nimport { ScaleLinear as d3ScaleLinear } from 'd3';\n\n/**\n * Component size.\n */\nexport const HorizontalBarChartSize = {\n small: 'small',\n medium: 'medium',\n large: 'large',\n} as const;\nexport type HorizontalBarChartSize = ValueOf<typeof HorizontalBarChartSize>;\n\n/**\n * Component theme.\n */\nexport const HorizontalBarChartTheme = ColorTheme;\nexport type HorizontalBarChartTheme = ValueOf<typeof HorizontalBarChartTheme>;\n\n/**\n * Tooltip label variant.\n */\nexport const HorizontalBarChartTooltipVariant = {\n none: 'none',\n label: 'label',\n value: 'value',\n percent: 'percent',\n};\nexport type HorizontalBarChartTooltipVariant = ValueOf<\n typeof HorizontalBarChartTooltipVariant\n>;\n\ninterface LocaleText {\n emptyChartText: string;\n}\n\n/**\n * Component props.\n */\nexport interface HorizontalBarChartProps extends ComponentProps<'div'> {\n /** Whether the x axis labels are rotated or not. */\n areXLabelsRotated?: boolean;\n /** Number of categories to use, the rest being put into a new category called \"Others\". */\n caping?: number;\n /** Caption. */\n caption?: string;\n /** Dataset to use to generate the chart, should be a list of objects containing a name and a value. */\n data: Datum[];\n /** Labels and texts. */\n localeText?: LocaleText;\n /** Method to be called on a click on a bar. */\n onBarClick?: (data: Datum) => void;\n /** Whether a category should be displayed for categories that has been removed by the caping option. Optionaly, this prop can be used to change the label of this category. */\n others?: boolean | string;\n /** HorizontalBarChart size. */\n size?: HorizontalBarChartSize;\n /** Bar role. Used to indicate that bars are to be considered buttons or links. If an onClick is provided, the bars will have the role `button` unless specifically set to `link` with this prop. */\n barRole?: 'button' | 'link';\n /** Color palette to use. You can choose among the list of available color palette or also choose to use the success/warning/danger theme for which you have to specify which key corresponds to which status. */\n theme?: HorizontalBarChartTheme | SuccessDangerColorTheme;\n /** Title. */\n title?: string;\n /** Tooltip variant. */\n tooltipVariant?: HorizontalBarChartTooltipVariant;\n}\n\nexport type StyledHorizontalBarChartProps = Omit<\n HorizontalBarChartProps,\n 'data'\n> & {};\n\nexport interface HorizontalBarChartBarProps extends ComponentProps<'g'> {\n chartId: string;\n color: string;\n data: Datum;\n gap: number;\n height: number;\n index: number;\n isEmpty: boolean;\n onClick?: () => void;\n role?: HorizontalBarChartProps['barRole'];\n showTooltip: boolean;\n tooltipLabelOnly: boolean;\n tooltipPercent: number | null;\n width: number;\n}\n\nexport type StyledHorizontalBarChartBarProps = Omit<\n HorizontalBarChartBarProps,\n | 'chartId'\n | 'color'\n | 'data'\n | 'gap'\n | 'height'\n | 'index'\n | 'isEmpty'\n | 'showTooltip'\n | 'tooltipPercent'\n | 'tooltipLabelOnly'\n | 'width'\n> & {\n $clickable: boolean;\n};\n\nexport interface HorizontalBarChartAxisBottomProps extends ComponentProps<'g'> {\n areXLabelsRotated: boolean;\n chartHeight: number;\n d3scale: d3ScaleLinear<number, number>;\n}\n\nexport type StyledHorizontalBarChartAxisBottomProps = Omit<\n HorizontalBarChartAxisBottomProps,\n 'areXLabelsRotated' | 'chartHeight' | 'd3scale'\n> & {};\n","/*!\n Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import { css } from 'styled-components';\nimport {\n LayoutProps,\n SpacingProps,\n SizingProps,\n PositioningProps,\n FlexLayoutProps,\n GridLayoutProps,\n StylingProps,\n ContainerProps,\n InternalSpacingProps,\n} from '~/types';\n\nexport const baseLayout = css<LayoutProps>`\n ${({\n flex,\n flexGrow,\n flexShrink,\n flexBasis,\n alignSelf,\n justifySelf,\n order,\n gridArea,\n gridColumn,\n gridRow,\n gridColumnStart,\n gridColumnEnd,\n gridRowStart,\n gridRowEnd,\n }) =>\n css`\n ${flex ? `flex: ${flex};` : ''}\n ${flexGrow !== undefined ? `flex-grow: ${flexGrow};` : ''}\n ${flexShrink !== undefined ? `flex-shrink: ${flexShrink};` : ''}\n ${flexBasis ? `flex-basis: ${flexBasis};` : ''}\n ${alignSelf ? `align-self: ${alignSelf};` : ''}\n ${justifySelf ? `justify-self: ${justifySelf};` : ''}\n ${order !== undefined ? `order: ${order};` : ''}\n ${gridArea ? `grid-area: ${gridArea};` : ''}\n ${gridColumn ? `grid-column: ${gridColumn};` : ''}\n ${gridRow ? `grid-row: ${gridRow};` : ''}\n ${gridColumnStart ? `grid-column-start: ${gridColumnStart};` : ''}\n ${gridColumnEnd ? `grid-column-end: ${gridColumnEnd};` : ''}\n ${gridRowStart ? `grid-row-start: ${gridRowStart};` : ''}\n ${gridRowEnd ? `grid-row-end: ${gridRowEnd};` : ''}\n `}\n`;\n\nexport const baseSpacing = css<SpacingProps>`\n ${({ margin, marginBottom, marginLeft, marginRight, marginTop }) =>\n css`\n ${margin ? `margin: ${margin};` : ''}\n ${marginBottom ? `margin-bottom: ${marginBottom};` : ''}\n ${marginLeft ? `margin-left: ${marginLeft};` : ''}\n ${marginRight ? `margin-right: ${marginRight};` : ''}\n ${marginTop ? `margin-top: ${marginTop};` : ''}\n `}\n`;\n\nexport const baseInternalSpacing = css<InternalSpacingProps>`\n ${({ padding, paddingBottom, paddingLeft, paddingRight, paddingTop }) =>\n css`\n ${padding ? `padding: ${padding};` : ''}\n ${paddingBottom ? `padding-bottom: ${paddingBottom};` : ''}\n ${paddingLeft ? `padding-left: ${paddingLeft};` : ''}\n ${paddingRight ? `padding-right: ${paddingRight};` : ''}\n ${paddingTop ? `padding-top: ${paddingTop};` : ''}\n `}\n`;\n\nexport const baseSizing = css<SizingProps>`\n ${({ height, maxHeight, maxWidth, minHeight, minWidth, width }) =>\n css`\n ${height !== undefined\n ? `height: ${typeof height === 'number' ? `${height}px` : height};`\n : ''}\n ${maxHeight ? `max-height: ${maxHeight};` : ''}\n ${maxWidth ? `max-width: ${maxWidth};` : ''}\n ${minHeight ? `min-height: ${minHeight};` : ''}\n ${minWidth ? `min-width: ${minWidth};` : ''}\n ${width !== undefined\n ? `width: ${typeof width === 'number' ? `${width}px` : width};`\n : ''}\n `}\n`;\n\nexport const basePositioning = css<PositioningProps>`\n ${({ position, top, bottom, left, right, zIndex }) =>\n css`\n ${position ? `position: ${position};` : ''}\n ${top ? `top: ${top};` : ''}\n ${bottom ? `bottom: ${bottom};` : ''}\n ${left ? `left: ${left};` : ''}\n ${right ? `right: ${right};` : ''}\n ${zIndex ? `z-index: ${zIndex};` : ''}\n `}\n`;\n\nexport const baseFlexbox = css<FlexLayoutProps>`\n ${({\n alignContent,\n alignItems,\n flexDirection,\n flexWrap,\n gap,\n justifyContent,\n }) =>\n css`\n ${alignContent ? `align-content: ${alignContent};` : ''}\n ${alignItems ? `align-items: ${alignItems};` : ''}\n ${flexDirection ? `flex-direction: ${flexDirection};` : ''}\n ${flexWrap ? `flex-wrap: ${flexWrap};` : ''}\n gap: ${gap};\n ${justifyContent ? `justify-content: ${justifyContent};` : ''}\n `}\n`;\n\nexport const baseGrid = css<GridLayoutProps>`\n ${({\n alignContent,\n alignItems,\n gap,\n gridAutoColumns,\n gridAutoRows,\n gridTemplateAreas,\n gridTemplateColumns,\n gridTemplateRows,\n justifyContent,\n justifyItems,\n }) =>\n css`\n ${alignContent ? `align-content: ${alignContent};` : ''}\n ${alignItems ? `align-items: ${alignItems};` : ''}\n ${gap ? `gap: ${gap};` : ''}\n ${gridAutoColumns ? `grid-auto-columns: ${gridAutoColumns};` : ''}\n ${gridAutoRows ? `grid-auto-rows: ${gridAutoRows};` : ''}\n ${gridTemplateAreas ? `grid-template-areas: ${gridTemplateAreas};` : ''}\n ${gridTemplateColumns\n ? `grid-template-columns: ${gridTemplateColumns};`\n : ''}\n ${gridTemplateRows ? `grid-template-rows: ${gridTemplateRows};` : ''}\n ${justifyContent ? `justify-content: ${justifyContent};` : ''}\n ${justifyItems ? `justify-items: ${justifyItems};` : ''}\n `}\n`;\n\nexport const baseStyling = css<StylingProps>`\n font-family: var(--redsift-typography-body-font-family);\n font-size: var(--redsift-typography-body-font-size);\n font-weight: var(--redsift-typography-body-font-weight);\n line-height: var(--redsift-typography-body-line-height);\n color: var(--redsift-color-neutral-black);\n\n ${baseLayout}\n ${baseSpacing}\n ${baseSizing}\n ${basePositioning}\n`;\n\nexport const baseContainer = css<ContainerProps>`\n ${({ display }) => (display ? `display: ${display};` : '')}\n font-family: var(--redsift-typography-body-font-family);\n font-size: var(--redsift-typography-body-font-size);\n font-weight: var(--redsift-typography-body-font-weight);\n line-height: var(--redsift-typography-body-line-height);\n color: var(--redsift-color-neutral-black);\n\n ${baseInternalSpacing}\n ${baseFlexbox}\n ${baseGrid}\n`;\n","import styled from 'styled-components';\nimport {\n baseFlexbox,\n baseInternalSpacing,\n baseStyling,\n} from '~/components/shared';\nimport { StyledFlexboxProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledFlexbox = styled.div<StyledFlexboxProps>`\n display: ${({ inline }) => (inline ? 'inline-flex' : 'flex')};\n\n ${baseStyling}\n ${baseInternalSpacing}\n ${baseFlexbox}\n`;\n","import React, { forwardRef, RefObject } from 'react';\nimport classNames from 'classnames';\nimport { Comp } from '~/types';\nimport { StyledFlexbox } from './styles';\nimport { FlexboxProps } from './types';\n\nconst COMPONENT_NAME = 'Flexbox';\nconst CLASSNAME = 'redsift-flex-box';\nconst DEFAULT_PROPS: Partial<FlexboxProps> = {\n gap: '16px',\n};\n\n/**\n * The Flexbox component.\n */\nexport const Flexbox: Comp<FlexboxProps, HTMLDivElement> = forwardRef(\n (props, ref) => {\n const { children, className, ...forwardedProps } = props;\n\n return (\n <StyledFlexbox\n {...forwardedProps}\n className={classNames(Flexbox.className, className)}\n ref={ref as RefObject<HTMLDivElement>}\n >\n {children}\n </StyledFlexbox>\n );\n }\n);\nFlexbox.className = CLASSNAME;\nFlexbox.defaultProps = DEFAULT_PROPS;\nFlexbox.displayName = COMPONENT_NAME;\n","import styled, { css } from 'styled-components';\nimport { Flexbox } from '~/components/flexbox';\nimport {\n StyledHorizontalBarChartProps,\n StyledHorizontalBarChartBarProps,\n} from './types';\n\n/**\n * Component style.\n */\nexport const StyledHorizontalBarChart = styled.div<StyledHorizontalBarChartProps>`\n margin: 8px;\n padding: 8px;\n color: var(--redsift-color-neutral-black);\n\n .redsift-horizontal-barchart__container {\n display: flex;\n align-items: center;\n gap: 16px;\n font-family: var(--redsift-typography-font-family-source-code-pro);\n font-size: 11px;\n justify-content: center;\n margin: 8px 0;\n\n .redsift-horizontal-barchart-container__chart {\n position: relative;\n }\n }\n\n svg {\n display: block;\n\n g {\n margin: 8px;\n }\n }\n`;\n\nexport const StyledHorizontalBarChartTitle = styled(\n Flexbox\n)<StyledHorizontalBarChartProps>`\n font-family: var(--redsift-typography-h4-font-family);\n font-size: var(--redsift-typography-h4-font-size);\n font-weight: var(--redsift-typography-h4-font-weight);\n line-height: var(--redsift-typography-h4-line-height);\n`;\n\nexport const StyledHorizontalBarChartCaption = styled.p<StyledHorizontalBarChartProps>`\n font-family: var(--redsift-typography-caption-font-family);\n font-size: var(--redsift-typography-caption-font-size);\n font-weight: var(--redsift-typography-caption-font-weight);\n line-height: var(--redsift-typography-caption-line-height);\n`;\n\nexport const StyledHorizontalBarChartEmptyText = styled.div<{\n $maxWidth: number;\n $textSize: number;\n}>`\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n\n > * {\n max-width: ${({ $maxWidth }) => $maxWidth}px;\n }\n\n > span {\n font-family: var(--redsift-typography-font-family-raleway);\n color: var(--redsift-color-neutral-black);\n font-size: ${({ $textSize }) => $textSize}px;\n line-height: ${({ $textSize }) => $textSize}px;\n }\n`;\n\nexport const StyledHorizontalBarChartBar = styled.g<StyledHorizontalBarChartBarProps>`\n rect {\n fill-opacity: 0.9;\n }\n\n ${({ $clickable }) =>\n $clickable\n ? css`\n cursor: pointer;\n\n &:hover,\n &:focus {\n outline: none;\n rect {\n fill-opacity: 0.7;\n }\n }\n\n &:focus-visible {\n rect {\n stroke: var(--redsift-color-default-primary);\n stroke-width: 4px;\n paint-order: stroke;\n }\n }\n `\n : ''}}\n`;\n\nexport const StyledHorizontalBarChartAxisBottom = styled.g`\n line.grid-line {\n fill: none;\n stroke: #ccc;\n shape-rendering: crispEdges;\n }\n\n text {\n font-family: var(--redsift-typography-font-family-source-code-pro);\n font-size: 10px;\n }\n`;\n","import React, { forwardRef, KeyboardEventHandler, RefObject } from 'react';\n\nimport { Comp, Number, Text } from '@redsift/design-system';\nimport { Tooltip } from '@redsift/popovers';\n\nimport { HorizontalBarChartBarProps } from './types';\nimport { StyledHorizontalBarChartBar } from './styles';\n\nconst COMPONENT_NAME = 'HorizontalBarChartBar';\nconst CLASSNAME = 'redsift-horizontal-barchart-bar';\nconst DEFAULT_PROPS: Partial<HorizontalBarChartBarProps> = {};\n\nexport const HorizontalBarChartBar: Comp<\n HorizontalBarChartBarProps,\n SVGGElement\n> = forwardRef((props, ref) => {\n const {\n chartId,\n color,\n data,\n gap,\n height,\n index,\n isEmpty,\n onClick,\n role,\n showTooltip,\n tooltipLabelOnly,\n tooltipPercent,\n width,\n ...forwardedProps\n } = props;\n\n const onKeyDown: KeyboardEventHandler<SVGElement> = (event) => {\n if (onClick) {\n event.stopPropagation();\n\n if (event.code === 'Enter' || event.code === 'Space') {\n event.preventDefault();\n onClick();\n }\n }\n };\n\n const Bar = (\n <StyledHorizontalBarChartBar\n {...forwardedProps}\n ref={ref as RefObject<SVGGElement>}\n aria-label={\n showTooltip && !isEmpty ? `${data.name}: ${data.value}` : undefined\n }\n aria-labelledby={\n !showTooltip && !isEmpty\n ? `id${chartId}__slice-${index}-title`\n : undefined\n }\n id={`id${chartId}__slice-${index}`}\n className={`row _${index}`}\n onClick={onClick}\n onKeyDown={onKeyDown}\n role={role ? role : onClick ? 'button' : undefined}\n tabIndex={onClick ? 0 : undefined}\n transform={`translate(0,${gap * (index + 1) + height * index})`}\n $clickable={Boolean(onClick)}\n >\n <rect height={height} width={width} fill={color} />\n <text x=\"10\" y={height / 2} dy=\"0.35em\" aria-hidden={true}>\n {data.name}\n </text>\n {!showTooltip && !isEmpty && (\n <title>{`${data.name}: ${data.value}`}</title>\n )}\n </StyledHorizontalBarChartBar>\n );\n\n if (showTooltip) {\n return (\n <Tooltip placement=\"right\">\n <Tooltip.Trigger>{Bar}</Tooltip.Trigger>\n <Tooltip.Content>\n {tooltipLabelOnly ? (\n <Text variant=\"caption\">{data.name}</Text>\n ) : tooltipPercent !== null ? (\n <Text variant=\"caption\">\n {data.name} -{' '}\n <Number\n value={tooltipPercent}\n type=\"percent\"\n variant=\"caption\"\n maximumFractionDigits={2}\n />\n </Text>\n ) : (\n <Text variant=\"caption\">\n {data.name} -{' '}\n <Number\n value={data.value}\n variant=\"caption\"\n maximumFractionDigits={2}\n />\n </Text>\n )}\n </Tooltip.Content>\n </Tooltip>\n );\n }\n\n return Bar;\n});\nHorizontalBarChartBar.className = CLASSNAME;\nHorizontalBarChartBar.defaultProps = DEFAULT_PROPS;\nHorizontalBarChartBar.displayName = COMPONENT_NAME;\n","import React, { forwardRef, RefObject, useEffect, useRef } from 'react';\n\nimport { Comp } from '@redsift/design-system';\n\nimport { HorizontalBarChartAxisBottomProps } from './types';\nimport { StyledHorizontalBarChartAxisBottom } from './styles';\nimport { select, axisBottom } from 'd3';\n\nconst COMPONENT_NAME = 'HorizontalBarChartAxisBottom';\nconst CLASSNAME = 'redsift-horizontal-barchart-axis-bottom';\nconst DEFAULT_PROPS: Partial<HorizontalBarChartAxisBottomProps> = {};\n\nexport const HorizontalBarChartAxisBottom: Comp<\n HorizontalBarChartAxisBottomProps,\n SVGGElement\n> = forwardRef((props, ref) => {\n const { areXLabelsRotated, chartHeight, d3scale, ...forwardedProps } = props;\n\n const axisRef = (ref || useRef<SVGGElement>()) as RefObject<SVGGElement>;\n\n useEffect(() => {\n if (axisRef.current) {\n select(axisRef.current).call(axisBottom(d3scale).ticks(5));\n\n select(axisRef.current)\n .selectAll('g.tick')\n .select('line.grid-line')\n .remove();\n\n select(axisRef.current)\n .selectAll('g.tick')\n .append('line')\n .attr('class', 'grid-line')\n .attr('x1', 0)\n .attr('y1', 0)\n .attr('x2', 0)\n .attr('y2', () => -chartHeight);\n\n if (areXLabelsRotated) {\n select(axisRef.current)\n .attr('text-anchor', 'end')\n .selectAll('text')\n .attr('transform', 'translate(-6,5) rotate(-45)');\n }\n }\n }, [d3scale]);\n\n return (\n <StyledHorizontalBarChartAxisBottom\n className=\"axis\"\n {...forwardedProps}\n ref={axisRef}\n />\n );\n});\nHorizontalBarChartAxisBottom.className = CLASSNAME;\nHorizontalBarChartAxisBottom.defaultProps = DEFAULT_PROPS;\nHorizontalBarChartAxisBottom.displayName = COMPONENT_NAME;\n","import React, { forwardRef, RefObject, useId } from 'react';\nimport { scaleLinear as d3scaleLinear, sum as d3sum } from 'd3';\n\nimport { Comp } from '@redsift/design-system';\n\nimport { ChartDimensions, Datum } from '../../types';\nimport { getColorScale } from '../../scheme';\nimport {\n HorizontalBarChartProps,\n HorizontalBarChartSize,\n HorizontalBarChartTheme,\n HorizontalBarChartTooltipVariant,\n} from './types';\nimport {\n StyledHorizontalBarChart,\n StyledHorizontalBarChartCaption,\n StyledHorizontalBarChartEmptyText,\n StyledHorizontalBarChartTitle,\n} from './styles';\nimport { HorizontalBarChartBar } from './HorizontalBarChartBar';\nimport { HorizontalBarChartAxisBottom } from './HorizontalBarChartAxisBottom';\n\nconst COMPONENT_NAME = 'HorizontalBarChart';\nconst CLASSNAME = 'redsift-horizontal-barchart';\nconst DEFAULT_PROPS: Partial<HorizontalBarChartProps> = {\n others: true,\n size: HorizontalBarChartSize.medium,\n theme: HorizontalBarChartTheme.default,\n tooltipVariant: HorizontalBarChartTooltipVariant.value,\n localeText: {\n emptyChartText: 'No Data',\n },\n};\n\nconst sizeToDimension = (size: HorizontalBarChartSize): ChartDimensions => {\n switch (size) {\n case HorizontalBarChartSize.small:\n return { width: 300, height: 200 };\n case HorizontalBarChartSize.large:\n return { width: 500, height: 400 };\n case HorizontalBarChartSize.medium:\n default:\n return { width: 400, height: 300 };\n }\n};\n\nconst sizeToFontSize = (size: HorizontalBarChartSize | undefined): number => {\n switch (size) {\n case HorizontalBarChartSize.small:\n return 30;\n case HorizontalBarChartSize.large:\n return 38;\n case HorizontalBarChartSize.medium:\n default:\n return 34;\n }\n};\n\nexport const HorizontalBarChart: Comp<HorizontalBarChartProps, HTMLDivElement> =\n forwardRef((props, ref) => {\n const id = useId();\n\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n areXLabelsRotated,\n caping,\n caption,\n className,\n data: propData,\n onBarClick,\n others,\n size,\n barRole,\n theme,\n title,\n tooltipVariant,\n localeText,\n ...forwardedProps\n } = props;\n const { emptyChartText } = {\n ...DEFAULT_PROPS.localeText,\n ...localeText,\n };\n const isEmpty = propData.every((d) => d.value === 0);\n let data = propData.sort((a, b) => (a.value < b.value ? 1 : -1));\n if (caping) {\n if (typeof others === 'boolean' && !others) {\n data = data.slice(0, caping);\n } else {\n data = data.reduce<Datum[]>((acc, curr, index) => {\n if (index < caping) {\n acc[index] = curr;\n } else if (index === caping) {\n acc[index] = {\n name: typeof others === 'string' ? others : 'Others',\n value: curr.value,\n };\n } else {\n acc[caping] = {\n ...acc[caping],\n value: acc[caping].value + curr.value,\n };\n }\n return acc;\n }, []);\n }\n }\n if (isEmpty) {\n data = [];\n }\n\n // Get charts dimensions based on the selected size.\n const chartDimensions = sizeToDimension(size!);\n const width = chartDimensions.width - 16;\n const height = chartDimensions.height;\n const chartHeight = height - 48 - (areXLabelsRotated ? 30 : 0);\n const margins = { top: 16, left: 16, right: 16, bottom: 32 };\n const numberOfRows = data.length;\n const gap = 5;\n\n // Set color scheme.\n const d3colors = getColorScale(theme!, isEmpty);\n\n // Initialize the chart.\n const scaleX = d3scaleLinear()\n .domain([0, Math.max(...data.map(({ value }) => value))])\n .range([0, width - 32]);\n const barHeight = (chartHeight - (numberOfRows + 1) * gap) / numberOfRows;\n\n const total = d3sum(data, (d) => d.value);\n return (\n <StyledHorizontalBarChart\n {...forwardedProps}\n ref={ref as RefObject<HTMLDivElement>}\n className={className}\n >\n {title ? (\n <StyledHorizontalBarChartTitle\n className={`${HorizontalBarChart.className}__title`}\n alignItems=\"center\"\n id={`id${id}__title`}\n >\n {title}\n </StyledHorizontalBarChartTitle>\n ) : null}\n <div className={`${HorizontalBarChart.className}__container`}>\n <div\n className={`${HorizontalBarChart.className}-container__chart`}\n aria-label={\n ariaLabel\n ? ariaLabel\n : ariaLabelledby || title\n ? undefined\n : 'Horizontal Bar Chart'\n }\n aria-labelledby={\n ariaLabelledby\n ? ariaLabelledby\n : title\n ? `id${id}__title`\n : undefined\n }\n >\n {isEmpty ? (\n <StyledHorizontalBarChartEmptyText\n $maxWidth={width}\n $textSize={sizeToFontSize(size) / 2}\n >\n <span>{emptyChartText}</span>\n </StyledHorizontalBarChartEmptyText>\n ) : null}\n <svg width={width} height={height}>\n <g transform={`translate(${margins.left},${margins.top})`}>\n <HorizontalBarChartAxisBottom\n areXLabelsRotated={!!areXLabelsRotated}\n chartHeight={chartHeight}\n d3scale={scaleX}\n transform={`translate(0,${chartHeight})`}\n />\n {data.map(({ value, name }, index) => {\n const percent = value / total;\n return (\n <HorizontalBarChartBar\n chartId={id}\n color={d3colors(name)}\n data={{ value, name }}\n gap={gap}\n height={barHeight}\n index={index}\n isEmpty={isEmpty}\n key={`row _${index}`}\n onClick={\n onBarClick ? () => onBarClick(data[index]) : undefined\n }\n role={barRole}\n showTooltip={\n tooltipVariant !==\n HorizontalBarChartTooltipVariant.none && !isEmpty\n }\n tooltipLabelOnly={\n tooltipVariant == HorizontalBarChartTooltipVariant.label\n }\n tooltipPercent={\n tooltipVariant ===\n HorizontalBarChartTooltipVariant.percent\n ? percent\n : null\n }\n width={Math.abs(scaleX(value))}\n />\n );\n })}\n </g>\n </svg>\n </div>\n </div>\n {caption ? (\n <StyledHorizontalBarChartCaption\n className={`${HorizontalBarChart.className}__caption`}\n >\n {caption}\n </StyledHorizontalBarChartCaption>\n ) : null}\n </StyledHorizontalBarChart>\n );\n });\nHorizontalBarChart.className = CLASSNAME;\nHorizontalBarChart.defaultProps = DEFAULT_PROPS;\nHorizontalBarChart.displayName = COMPONENT_NAME;\n","import { ColorTheme, Datum, SuccessDangerColorTheme } from '../../types';\nimport { ComponentProps } from 'react';\nimport { ValueOf } from '@redsift/design-system';\n\n/**\n * Component size.\n */\nexport const PieChartSize = {\n small: 'small',\n medium: 'medium',\n large: 'large',\n} as const;\nexport type PieChartSize = ValueOf<typeof PieChartSize>;\n\n/**\n * Component variant.\n */\nexport const PieChartVariant = {\n plain: 'plain',\n spaced: 'spaced',\n donut: 'donut',\n spacedDonut: 'spacedDonut',\n} as const;\nexport type PieChartVariant = ValueOf<typeof PieChartVariant>;\n\n/**\n * Component's labels variant.\n */\nexport const PieChartLabelVariant = {\n none: 'none',\n internal: 'internal',\n externalLabel: 'externalLabel',\n externalLabelValue: 'externalLabelValue',\n externalLabelPercent: 'externalLabelPercent',\n} as const;\nexport type PieChartLabelVariant = ValueOf<typeof PieChartLabelVariant>;\n\n/**\n * Component theme.\n */\nexport const PieChartTheme = ColorTheme;\nexport type PieChartTheme = ValueOf<typeof PieChartTheme>;\n\n/**\n * Tooltip label variant.\n */\nexport const PieChartTooltipVariant = {\n none: 'none',\n label: 'label',\n value: 'value',\n percent: 'percent',\n};\nexport type PieChartTooltipVariant = ValueOf<typeof PieChartTooltipVariant>;\n\ninterface LocaleText {\n emptyChartText: string;\n}\n\n/**\n * Component props.\n */\nexport interface PieChartProps extends ComponentProps<'div'> {\n /** Number of categories to use, the rest being put into a new category called \"Others\". */\n caping?: number;\n /** Caption. */\n caption?: string;\n /** Dataset to use to generate the chart, should be a list of objects containing a name and a value. */\n data: Datum[];\n /** Define whether the labels should be displayed inside or outside the charts and if they should contain raw or percentage values. */\n labelVariant?: PieChartLabelVariant;\n /** Labels and texts. */\n localeText?: LocaleText;\n /** Method to be called on a click on a slice. */\n onSliceClick?: (data: Datum) => void;\n /** Whether a category should be displayed for categories that has been removed by the caping option. Optionaly, this prop can be used to change the label of this category. */\n others?: boolean | string;\n /** PieChart size. */\n size?: PieChartSize;\n /** Slice role. Used to indicate that slices are to be considered buttons or links. If an onClick is provided, the slices will have the role `button` unless specifically set to `link` with this prop. */\n sliceRole?: 'button' | 'link';\n /** Secondary text to be displayed in the middle of the chart, between the main text and subtext. Recommended to be used with donut variants only. */\n middleText?: string;\n /** Secondary text to be displayed in the middle of the chart, above the main text. Recommended to be used with `donut` variants only. */\n subtext?: string;\n /** Main text to be displayed in the middle of the chart. Recommended to be used with `donut` variants only. */\n text?: string;\n /** Color palette to use. You can choose among the list of available color palette or also choose to use the success/warning/danger theme for which you have to specify which key corresponds to which status. */\n theme?: PieChartTheme | SuccessDangerColorTheme;\n /** Title. */\n title?: string;\n /** PieChart variant. */\n variant?: PieChartVariant;\n /** Tooltip variant. */\n tooltipVariant?: PieChartTooltipVariant;\n}\n\nexport type StyledPieChartProps = Omit<PieChartProps, 'data'> & {};\n\nexport interface PieChartArcProps extends ComponentProps<'g'> {\n chartId: string;\n color: string;\n data: Datum;\n index: number;\n onClick?: () => void;\n path: string;\n role?: PieChartProps['sliceRole'];\n spaced?: boolean;\n showTooltip: boolean;\n tooltipPercent: number | null;\n tooltipLabelOnly: boolean;\n isEmpty: boolean;\n}\n\nexport type StyledPieChartArcProps = Omit<\n PieChartArcProps,\n | 'chartId'\n | 'color'\n | 'data'\n | 'index'\n | 'path'\n | 'spaced'\n | 'showTooltip'\n | 'tooltipPercent'\n | 'tooltipLabelOnly'\n | 'isEmpty'\n> & {\n $spaced: boolean;\n $clickable: boolean;\n};\n","import styled, { css } from 'styled-components';\nimport { Flexbox } from '~/components/flexbox';\nimport { StyledPieChartProps, StyledPieChartArcProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledPieChart = styled.div<StyledPieChartProps>`\n margin: 8px;\n padding: 8px;\n color: var(--redsift-color-neutral-black);\n\n .redsift-piechart__container {\n display: flex;\n align-items: center;\n gap: 16px;\n font-family: var(--redsift-typography-font-family-source-code-pro);\n font-size: 11px;\n justify-content: center;\n margin: 8px 0;\n\n .redsift-piechart-container__chart {\n position: relative;\n }\n }\n svg {\n display: block;\n }\n`;\n\nexport const StyledPieChartTitle = styled(Flexbox)<StyledPieChartProps>`\n font-family: var(--redsift-typography-h4-font-family);\n font-size: var(--redsift-typography-h4-font-size);\n font-weight: var(--redsift-typography-h4-font-weight);\n line-height: var(--redsift-typography-h4-line-height);\n`;\n\nexport const StyledPieChartCaption = styled.p<StyledPieChartProps>`\n font-family: var(--redsift-typography-caption-font-family);\n font-size: var(--redsift-typography-caption-font-size);\n font-weight: var(--redsift-typography-caption-font-weight);\n line-height: var(--redsift-typography-caption-line-height);\n`;\n\nexport const StyledPieChartCenterText = styled.div<{\n $maxWidth: number;\n $textSize: number;\n $smallTextSize: number;\n}>`\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n\n > * {\n max-width: ${({ $maxWidth }) => $maxWidth}px;\n }\n\n > b {\n font-family: var(--redsift-typography-font-family-source-code-pro);\n color: var(--redsift-color-neutral-black);\n font-weight: var(--redsift-typography-font-weight-medium);\n font-size: ${({ $textSize }) => $textSize}px;\n line-height: ${({ $textSize }) => $textSize}px;\n\n &:nth-child(2) {\n font-weight: normal;\n margin-top: 8px;\n font-family: var(--redsift-typography-font-family-raleway);\n font-size: ${({ $smallTextSize }) => $smallTextSize}px;\n line-height: ${({ $smallTextSize }) => $smallTextSize}px;\n }\n }\n > span {\n color: var(--redsift-color-neutral-black);\n font-size: ${({ $textSize }) => $textSize}px;\n line-height: ${({ $textSize }) => $textSize}px;\n &:nth-child(3) {\n margin-top: 4px;\n font-size: ${({ $smallTextSize }) => $smallTextSize}px;\n line-height: ${({ $smallTextSize }) => $smallTextSize}px;\n }\n }\n > b + span {\n font-size: var(--redsift-typography-body-font-size);\n font-family: var(--redsift-typography-font-family-raleway);\n line-height: var(--redsift-typography-badge-line-height);\n color: rgba(0, 0, 0, 0.6);\n text-align: center;\n }\n`;\n\nexport const StyledPieChartEmptyText = styled.div<{\n $maxWidth: number;\n $textSize: number;\n $isDonut: boolean;\n}>`\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n\n > * {\n max-width: ${({ $maxWidth }) => $maxWidth}px;\n }\n\n > span {\n font-family: var(--redsift-typography-font-family-raleway);\n color: ${({ $isDonut }) =>\n $isDonut\n ? css`var(--redsift-color-neutral-midgrey)`\n : css`var(--redsift-color-neutral-black)`};\n font-size: ${({ $textSize }) => $textSize}px;\n line-height: ${({ $textSize }) => $textSize}px;\n }\n`;\n\nexport const StyledPieChartLabel = styled.li<{ $color: string }>`\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n max-width: 262px;\n font-size: var(--redsift-typography-caption-font-size);\n\n > div {\n height: 16px;\n width: 16px;\n min-width: 16px;\n background-color: ${({ $color }) => $color};\n }\n`;\n\nexport const StyledPieChartArc = styled.g<StyledPieChartArcProps>`\n ${({ $spaced }) =>\n $spaced\n ? css`\n path {\n stroke-width: 2px;\n stroke: #fff;\n }\n `\n : ''}\n\n ${({ $clickable }) =>\n $clickable\n ? css`\n cursor: pointer;\n\n &:hover,\n &:focus {\n opacity: 0.8;\n outline: none;\n }\n\n &:focus-visible {\n path {\n stroke: var(--redsift-color-default-primary);\n stroke-width: 4px;\n paint-order: stroke;\n }\n }\n `\n : ''}}\n`;\n","import React, { forwardRef, KeyboardEventHandler, RefObject } from 'react';\n\nimport { Comp, Number, Text } from '@redsift/design-system';\nimport { Tooltip } from '@redsift/popovers';\n\nimport { PieChartArcProps } from './types';\nimport { StyledPieChartArc } from './styles';\n\nconst COMPONENT_NAME = 'PieChartArc';\nconst CLASSNAME = 'redsift-piechart-arc';\nconst DEFAULT_PROPS: Partial<PieChartArcProps> = {};\n\nexport const PieChartArc: Comp<PieChartArcProps, SVGGElement> = forwardRef(\n (props, ref) => {\n const {\n chartId,\n color,\n data,\n index,\n onClick,\n path,\n role,\n spaced,\n showTooltip,\n tooltipPercent,\n tooltipLabelOnly,\n isEmpty,\n ...forwardedProps\n } = props;\n\n const onKeyDown: KeyboardEventHandler<SVGElement> = (event) => {\n if (onClick) {\n event.stopPropagation();\n\n if (event.code === 'Enter' || event.code === 'Space') {\n event.preventDefault();\n onClick();\n }\n }\n };\n\n const Arc = (\n <StyledPieChartArc\n {...forwardedProps}\n ref={ref as RefObject<SVGGElement>}\n aria-label={\n showTooltip && !isEmpty ? `${data.name}: ${data.value}` : undefined\n }\n aria-labelledby={\n !showTooltip && !isEmpty\n ? `id${chartId}__slice-${index}-title`\n : undefined\n }\n className={`pie-slice _${index}`}\n id={`id${chartId}__slice-${index}`}\n onClick={onClick}\n onKeyDown={onKeyDown}\n role={role ? role : onClick ? 'button' : undefined}\n tabIndex={onClick ? 0 : undefined}\n $clickable={Boolean(onClick)}\n $spaced={Boolean(spaced)}\n >\n <path d={path} fill={color} />\n {!showTooltip && !isEmpty ? (\n <title\n id={`id${chartId}__slice-${index}-title`}\n >{`${data.name}: ${data.value}`}</title>\n ) : null}\n </StyledPieChartArc>\n );\n\n if (showTooltip) {\n return (\n <Tooltip placement=\"right\">\n <Tooltip.Trigger>{Arc}</Tooltip.Trigger>\n <Tooltip.Content>\n {tooltipLabelOnly ? (\n <Text variant=\"caption\">{data.name}</Text>\n ) : tooltipPercent !== null ? (\n <Text variant=\"caption\">\n {data.name} -{' '}\n <Number\n maximumFractionDigits={2}\n type=\"percent\"\n value={tooltipPercent}\n variant=\"caption\"\n />\n </Text>\n ) : (\n <Text variant=\"caption\">\n {data.name} -{' '}\n <Number\n maximumFractionDigits={2}\n value={data.value}\n variant=\"caption\"\n />\n </Text>\n )}\n </Tooltip.Content>\n </Tooltip>\n );\n }\n\n return Arc;\n }\n);\nPieChartArc.className = CLASSNAME;\nPieChartArc.defaultProps = DEFAULT_PROPS;\nPieChartArc.displayName = COMPONENT_NAME;\n","import React, { forwardRef, RefObject, useId } from 'react';\nimport { arc as d3arc, pie as d3pie, sum as d3sum } from 'd3';\n\nimport { Comp, Number, Text } from '@redsift/design-system';\n\nimport { ChartDimensions, Datum, PieArcDatum } from '../../types';\nimport { getColorScale } from '../../scheme';\nimport {\n PieChartLabelVariant,\n PieChartProps,\n PieChartSize,\n PieChartTheme,\n PieChartTooltipVariant,\n PieChartVariant,\n} from './types';\nimport {\n StyledPieChartCenterText,\n StyledPieChart,\n StyledPieChartCaption,\n StyledPieChartLabel,\n StyledPieChartTitle,\n StyledPieChartEmptyText,\n} from './styles';\nimport { PieChartArc } from './PieChartArc';\n\nconst COMPONENT_NAME = 'PieChart';\nconst CLASSNAME = 'redsift-piechart';\nconst DEFAULT_PROPS: Partial<PieChartProps> = {\n labelVariant: PieChartLabelVariant.none,\n others: true,\n size: PieChartSize.medium,\n theme: PieChartTheme.default,\n variant: PieChartVariant.plain,\n tooltipVariant: PieChartTooltipVariant.value,\n localeText: {\n emptyChartText: 'No Data',\n },\n};\n\nconst sizeToDimension = (size: PieChartSize): ChartDimensions => {\n switch (size) {\n case PieChartSize.small:\n return { width: 200, height: 200 };\n case PieChartSize.large:\n return { width: 300, height: 300 };\n case PieChartSize.medium:\n default:\n return { width: 240, height: 240 };\n }\n};\n\nconst sizeToSmallFontSize = (size: PieChartSize | undefined): number => {\n switch (size) {\n case PieChartSize.small:\n return 13;\n case PieChartSize.large:\n return 18;\n case PieChartSize.medium:\n default:\n return 14;\n }\n};\n\nconst sizeToFontSize = (size: PieChartSize | undefined): number => {\n switch (size) {\n case PieChartSize.small:\n return 30;\n case PieChartSize.large:\n return 38;\n case PieChartSize.medium:\n default:\n return 34;\n }\n};\n\nconst sizeToInnerRadius = (size: PieChartSize): number => {\n switch (size) {\n case PieChartSize.small:\n return 55;\n case PieChartSize.large:\n return 80;\n case PieChartSize.medium:\n default:\n return 65;\n }\n};\n\nexport const PieChart: Comp<PieChartProps, HTMLDivElement> = forwardRef(\n (props, ref) => {\n const id = useId();\n\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n caping,\n caption,\n className,\n data: propData,\n labelVariant,\n onSliceClick,\n others,\n size,\n sliceRole,\n text,\n middleText,\n subtext,\n theme,\n title,\n variant,\n tooltipVariant,\n localeText,\n ...forwardedProps\n } = props;\n const { emptyChartText } = {\n ...DEFAULT_PROPS.localeText,\n ...localeText,\n };\n const isEmpty = propData.every((d) => d.value === 0);\n const isDonut =\n variant === PieChartVariant.donut ||\n variant === PieChartVariant.spacedDonut;\n let data = propData.sort((a, b) => (a.value < b.value ? 1 : -1));\n if (caping) {\n if (typeof others === 'boolean' && !others) {\n data = data.slice(0, caping);\n } else {\n data = data.reduce<Datum[]>((acc, curr, index) => {\n if (index < caping) {\n acc[index] = curr;\n } else if (index === caping) {\n acc[index] = {\n name: typeof others === 'string' ? others : 'Others',\n value: curr.value,\n };\n } else {\n acc[caping] = {\n ...acc[caping],\n value: acc[caping].value + curr.value,\n };\n }\n return acc;\n }, []);\n }\n }\n if (isEmpty) {\n data = [\n {\n name: emptyChartText as string,\n value: 100,\n },\n ];\n }\n\n // Get charts dimensions based on the selected size.\n const chartDimensions = sizeToDimension(size!);\n const externalRadiusPadding = 8;\n const innerRadius = sizeToInnerRadius(size!);\n\n // Set color scheme.\n const d3colors = getColorScale(theme!, isEmpty);\n\n // Initialize the chart.\n const createPie = d3pie<Datum>()\n .value((d) => d.value)\n .sort(null);\n const createArc = d3arc<PieArcDatum>()\n .innerRadius(isDonut ? innerRadius : 0)\n .outerRadius(chartDimensions.width / 2 - externalRadiusPadding);\n const pieData = createPie(data);\n const total = d3sum(data, (d) => d.value);\n return (\n <StyledPieChart\n {...forwardedProps}\n ref={ref as RefObject<HTMLDivElement>}\n className={className}\n >\n {title ? (\n <StyledPieChartTitle\n className={`${PieChart.className}__title`}\n alignItems=\"center\"\n id={`id${id}__title`}\n >\n {title}\n </StyledPieChartTitle>\n ) : null}\n <div className={`${PieChart.className}__container`}>\n <div\n className={`${PieChart.className}-container__chart`}\n aria-label={\n ariaLabel\n ? ariaLabel\n : ariaLabelledby || title\n ? undefined\n : 'Pie Chart'\n }\n aria-labelledby={\n ariaLabelledby\n ? ariaLabelledby\n : title\n ? `id${id}__title`\n : undefined\n }\n >\n {text && !isEmpty ? (\n <StyledPieChartCenterText\n $maxWidth={innerRadius * 2}\n $textSize={sizeToFontSize(size)}\n $smallTextSize={sizeToSmallFontSize(size)}\n >\n {subtext ? <b>{text}</b> : <span>{text}</span>}\n {middleText ? <b>{middleText}</b> : null}\n <span>{subtext}</span>\n </StyledPieChartCenterText>\n ) : null}\n {isEmpty ? (\n <StyledPieChartEmptyText\n $maxWidth={innerRadius * 2}\n $textSize={sizeToFontSize(size) / 2}\n $isDonut={isDonut}\n >\n <span>{emptyChartText}</span>\n </StyledPieChartEmptyText>\n ) : null}\n <svg width={chartDimensions.width} height={chartDimensions.height}>\n <g\n transform={`translate(${chartDimensions.width / 2} ${\n chartDimensions.height / 2\n })`}\n >\n <g className=\"pie-slice-group\">\n {pieData.map((datum, index) => {\n const percent = datum.data.value / total;\n return (\n <PieChartArc\n chartId={id}\n color={d3colors(datum.data.name)}\n data={datum.data}\n isEmpty={isEmpty}\n index={index}\n key={`pie-slice _${index}`}\n onClick={\n onSliceClick\n ? () => onSliceClick(data[index])\n : undefined\n }\n showTooltip={\n tooltipVariant !== PieChartTooltipVariant.none &&\n !isEmpty\n }\n role={sliceRole}\n tooltipLabelOnly={\n tooltipVariant == PieChartTooltipVariant.label\n }\n tooltipPercent={\n tooltipVariant === PieChartTooltipVariant.percent\n ? percent\n : null\n }\n path={createArc(datum) as string}\n spaced={\n variant === PieChartVariant.spaced ||\n variant === PieChartVariant.spacedDonut\n }\n />\n );\n })}\n </g>\n {labelVariant === PieChartLabelVariant.internal && !isEmpty ? (\n <g className=\"pie-label-group\">\n {pieData\n .filter((datum) => {\n const value = datum.data.value;\n return value > 0 && value / total >= 0.1;\n })\n .map((datum, index) => (\n <text\n className={`pie-slice pie-label _${index}`}\n key={`pie-slice pie-label _${index}`}\n textAnchor=\"middle\"\n transform={`translate(${createArc.centroid(datum)})`}\n >\n {datum.data.name}\n </text>\n ))}\n </g>\n ) : null}\n </g>\n </svg>\n </div>\n {labelVariant !== PieChartLabelVariant.none &&\n labelVariant !== PieChartLabelVariant.internal ? (\n <ul>\n {data.map(({ name, value }: Datum, index) => (\n <StyledPieChartLabel\n key={`pie-external-label _${index}`}\n $color={d3colors(name)}\n >\n <div />\n {labelVariant === PieChartLabelVariant.externalLabelValue ? (\n <>\n <Number\n as=\"b\"\n maximumFractionDigits={2}\n value={value}\n variant=\"inherit\"\n />\n <Text variant=\"caption\">{name}</Text>\n </>\n ) : labelVariant ===\n PieChartLabelVariant.externalLabelPercent ? (\n <>\n <Number\n as=\"b\"\n maximumFractionDigits={2}\n type=\"percent\"\n value={value / total}\n variant=\"inherit\"\n />\n <Text variant=\"caption\">{name}</Text>\n </>\n ) : (\n <Text variant=\"caption\">{name}</Text>\n )}\n </StyledPieChartLabel>\n ))}\n </ul>\n ) : null}\n </div>\n {caption ? (\n <StyledPieChartCaption className={`${PieChart.className}__caption`}>\n {caption}\n </StyledPieChartCaption>\n ) : null}\n </StyledPieChart>\n );\n }\n);\nPieChart.className = CLASSNAME;\nPieChart.defaultProps = DEFAULT_PROPS;\nPieChart.displayName = COMPONENT_NAME;\n"],"names":["ColorTheme","default","dark","darker","monochrome","RedsiftDataVizColorPurpleDefault","RedsiftDataVizColorPurpleDark","RedsiftDataVizColorPurpleDarker","RedsiftDataVizColorPurpleLight","RedsiftDataVizColorPurpleLighter","RedsiftDataVizColorBlueDefault","RedsiftDataVizColorBlueDark","RedsiftDataVizColorBlueDarker","RedsiftDataVizColorBlueLight","RedsiftDataVizColorBlueLighter","RedsiftDataVizColorGreenDefault","RedsiftDataVizColorGreenDark","RedsiftDataVizColorGreenDarker","RedsiftDataVizColorGreenLight","RedsiftDataVizColorGreenLighter","RedsiftDataVizColorRedDefault","RedsiftDataVizColorRedDark","RedsiftDataVizColorRedDarker","RedsiftDataVizColorRedLight","RedsiftDataVizColorRedLighter","RedsiftDataVizColorPinkDefault","RedsiftDataVizColorPinkDark","RedsiftDataVizColorPinkDarker","RedsiftDataVizColorPinkLight","RedsiftDataVizColorPinkLighter","RedsiftDataVizColorCyanDefault","RedsiftDataVizColorCyanDark","RedsiftDataVizColorCyanDarker","RedsiftDataVizColorCyanLight","RedsiftDataVizColorCyanLighter","RedsiftDataVizColorOrangeDefault","RedsiftDataVizColorOrangeDark","RedsiftDataVizColorOrangeDarker","RedsiftDataVizColorOrangeLight","RedsiftDataVizColorOrangeLighter","RedsiftDataVizColorYellowDefault","RedsiftDataVizColorYellowDark","RedsiftDataVizColorYellowDarker","RedsiftDataVizColorYellowLight","RedsiftDataVizColorYellowLighter","RedsiftDataVizColorBrownDefault","RedsiftDataVizColorBrownDark","RedsiftDataVizColorBrownDarker","RedsiftDataVizColorBrownLight","RedsiftDataVizColorBrownLighter","RedsiftDataVizColorGreyDefault","RedsiftDataVizColorGreyDark","RedsiftDataVizColorGreyDarker","RedsiftDataVizColorGreyLight","RedsiftDataVizColorGreyLighter","scheme","light","lighter","empty","successDangerScheme","success","warning","danger","neutral","getColorScale","theme","isEmpty","d3colors","d3scaleOrdinal","domain","range","unknown","HorizontalBarChartSize","small","medium","large","HorizontalBarChartTheme","HorizontalBarChartTooltipVariant","none","label","value","percent","baseLayout","css","flex","flexGrow","flexShrink","flexBasis","alignSelf","justifySelf","order","gridArea","gridColumn","gridRow","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","undefined","baseSpacing","margin","marginBottom","marginLeft","marginRight","marginTop","baseInternalSpacing","padding","paddingBottom","paddingLeft","paddingRight","paddingTop","baseSizing","height","maxHeight","maxWidth","minHeight","minWidth","width","basePositioning","position","top","bottom","left","right","zIndex","baseFlexbox","alignContent","alignItems","flexDirection","flexWrap","gap","justifyContent","baseGrid","gridAutoColumns","gridAutoRows","gridTemplateAreas","gridTemplateColumns","gridTemplateRows","justifyItems","baseStyling","display","StyledFlexbox","styled","div","inline","COMPONENT_NAME","CLASSNAME","DEFAULT_PROPS","Flexbox","forwardRef","props","ref","children","className","forwardedProps","_excluded","classNames","defaultProps","displayName","StyledHorizontalBarChart","StyledHorizontalBarChartTitle","StyledHorizontalBarChartCaption","p","StyledHorizontalBarChartEmptyText","$maxWidth","$textSize","StyledHorizontalBarChartBar","g","$clickable","StyledHorizontalBarChartAxisBottom","HorizontalBarChartBar","chartId","color","data","index","onClick","role","showTooltip","tooltipLabelOnly","tooltipPercent","onKeyDown","event","stopPropagation","code","preventDefault","Bar","name","Boolean","Number","HorizontalBarChartAxisBottom","areXLabelsRotated","chartHeight","d3scale","axisRef","useRef","useEffect","current","select","call","axisBottom","ticks","selectAll","remove","append","attr","others","size","tooltipVariant","localeText","emptyChartText","sizeToDimension","sizeToFontSize","HorizontalBarChart","id","useId","ariaLabel","ariaLabelledby","caping","caption","propData","onBarClick","barRole","title","every","d","sort","a","b","slice","reduce","acc","curr","chartDimensions","margins","numberOfRows","length","scaleX","d3scaleLinear","Math","max","map","barHeight","total","d3sum","abs","PieChartSize","PieChartVariant","plain","spaced","donut","spacedDonut","PieChartLabelVariant","internal","externalLabel","externalLabelValue","externalLabelPercent","PieChartTheme","PieChartTooltipVariant","StyledPieChart","StyledPieChartTitle","StyledPieChartCaption","StyledPieChartCenterText","$smallTextSize","StyledPieChartEmptyText","$isDonut","StyledPieChartLabel","li","$color","StyledPieChartArc","$spaced","PieChartArc","path","Arc","labelVariant","variant","sizeToSmallFontSize","sizeToInnerRadius","PieChart","onSliceClick","sliceRole","text","middleText","subtext","isDonut","externalRadiusPadding","innerRadius","createPie","d3pie","createArc","d3arc","outerRadius","pieData","datum","filter","centroid"],"mappings":";;;;;;AAmBO,MAAMA,UAAU,GAAG;AACxBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,UAAU,EAAE,YAAA;AACd;;ACxBA;AACA;AACA;AACA;AAwGO,MAAMC,gCAAgC,GAAG,SAAS,CAAA;AAClD,MAAMC,6BAA6B,GAAG,SAAS,CAAA;AAC/C,MAAMC,+BAA+B,GAAG,SAAS,CAAA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rCkI,QAAQ,CAACvH,WAAW,GAAGb,cAAc;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../src/types.ts","../src/scheme.ts","../src/components/HorizontalBarChart/types.ts","../src/components/HorizontalBarChart/styles.ts","../src/components/HorizontalBarChart/HorizontalBarChartBar.tsx","../src/components/HorizontalBarChart/HorizontalBarChartAxisBottom.tsx","../src/components/HorizontalBarChart/HorizontalBarChart.tsx","../src/components/PieChart/types.ts","../src/components/PieChart/styles.ts","../src/components/PieChart/PieChartArc.tsx","../src/components/PieChart/PieChart.tsx"],"sourcesContent":["import { PieArcDatum as D3PieArcDatum } from 'd3-shape';\nimport { ValueOf } from '@redsift/design-system';\n\nexport type ChartDimensions = {\n width: number;\n height: number;\n marginTop?: number;\n marginRight?: number;\n marginBottom?: number;\n marginLeft?: number;\n};\n\nexport type Datum = {\n name: string;\n value: number;\n};\n\nexport type PieArcDatum = D3PieArcDatum<Datum>;\n\nexport const ColorTheme = {\n default: 'default',\n dark: 'dark',\n darker: 'darker',\n monochrome: 'monochrome',\n} as const;\nexport type ColorTheme = ValueOf<typeof ColorTheme>;\n\nexport type SuccessDangerColorTheme = {\n success: string;\n warning: string;\n danger: string;\n neutral?: string;\n};\n","import {\n scaleOrdinal as d3scaleOrdinal,\n ScaleOrdinal as d3ScaleOrdinal,\n} from 'd3';\nimport { ColorTheme, SuccessDangerColorTheme } from './types';\n\nimport {\n RedsiftDataVizColorBlueDark,\n RedsiftDataVizColorBlueDarker,\n RedsiftDataVizColorBlueDefault,\n RedsiftDataVizColorBlueLight,\n RedsiftDataVizColorBlueLighter,\n RedsiftDataVizColorBrownDark,\n RedsiftDataVizColorBrownDarker,\n RedsiftDataVizColorBrownDefault,\n RedsiftDataVizColorBrownLight,\n RedsiftDataVizColorBrownLighter,\n RedsiftDataVizColorCyanDark,\n RedsiftDataVizColorCyanDarker,\n RedsiftDataVizColorCyanDefault,\n RedsiftDataVizColorCyanLight,\n RedsiftDataVizColorCyanLighter,\n RedsiftDataVizColorGreenDark,\n RedsiftDataVizColorGreenDarker,\n RedsiftDataVizColorGreenDefault,\n RedsiftDataVizColorGreenLight,\n RedsiftDataVizColorGreenLighter,\n RedsiftDataVizColorGreyDark,\n RedsiftDataVizColorGreyDarker,\n RedsiftDataVizColorGreyDefault,\n RedsiftDataVizColorGreyLight,\n RedsiftDataVizColorGreyLighter,\n RedsiftDataVizColorOrangeDark,\n RedsiftDataVizColorOrangeDarker,\n RedsiftDataVizColorOrangeDefault,\n RedsiftDataVizColorOrangeLight,\n RedsiftDataVizColorOrangeLighter,\n RedsiftDataVizColorPinkDark,\n RedsiftDataVizColorPinkDarker,\n RedsiftDataVizColorPinkDefault,\n RedsiftDataVizColorPinkLight,\n RedsiftDataVizColorPinkLighter,\n RedsiftDataVizColorPurpleDark,\n RedsiftDataVizColorPurpleDarker,\n RedsiftDataVizColorPurpleDefault,\n RedsiftDataVizColorPurpleLight,\n RedsiftDataVizColorPurpleLighter,\n RedsiftDataVizColorRedDark,\n RedsiftDataVizColorRedDarker,\n RedsiftDataVizColorRedDefault,\n RedsiftDataVizColorRedLight,\n RedsiftDataVizColorRedLighter,\n RedsiftDataVizColorYellowDark,\n RedsiftDataVizColorYellowDarker,\n RedsiftDataVizColorYellowDefault,\n RedsiftDataVizColorYellowLight,\n RedsiftDataVizColorYellowLighter,\n} from '@redsift/design-system';\n\nexport const monochrome = RedsiftDataVizColorBlueDefault;\n\nexport const scheme = {\n default: [\n RedsiftDataVizColorPurpleDefault,\n RedsiftDataVizColorBlueDefault,\n RedsiftDataVizColorGreenDefault,\n RedsiftDataVizColorRedDefault,\n RedsiftDataVizColorPinkDefault,\n RedsiftDataVizColorCyanDefault,\n RedsiftDataVizColorOrangeDefault,\n RedsiftDataVizColorYellowDefault,\n RedsiftDataVizColorBrownDefault,\n RedsiftDataVizColorGreyDefault,\n ],\n dark: [\n RedsiftDataVizColorPurpleDark,\n RedsiftDataVizColorBlueDark,\n RedsiftDataVizColorGreenDark,\n RedsiftDataVizColorRedDark,\n RedsiftDataVizColorPinkDark,\n RedsiftDataVizColorCyanDark,\n RedsiftDataVizColorOrangeDark,\n RedsiftDataVizColorYellowDark,\n RedsiftDataVizColorBrownDark,\n RedsiftDataVizColorGreyDark,\n ],\n darker: [\n RedsiftDataVizColorPurpleDarker,\n RedsiftDataVizColorBlueDarker,\n RedsiftDataVizColorGreenDarker,\n RedsiftDataVizColorRedDarker,\n RedsiftDataVizColorPinkDarker,\n RedsiftDataVizColorCyanDarker,\n RedsiftDataVizColorOrangeDarker,\n RedsiftDataVizColorYellowDarker,\n RedsiftDataVizColorBrownDarker,\n RedsiftDataVizColorGreyDarker,\n ],\n light: [\n RedsiftDataVizColorPurpleLight,\n RedsiftDataVizColorBlueLight,\n RedsiftDataVizColorGreenLight,\n RedsiftDataVizColorRedLight,\n RedsiftDataVizColorPinkLight,\n RedsiftDataVizColorCyanLight,\n RedsiftDataVizColorOrangeLight,\n RedsiftDataVizColorYellowLight,\n RedsiftDataVizColorBrownLight,\n RedsiftDataVizColorGreyLight,\n ],\n lighter: [\n RedsiftDataVizColorPurpleLighter,\n RedsiftDataVizColorBlueLighter,\n RedsiftDataVizColorGreenLighter,\n RedsiftDataVizColorRedLighter,\n RedsiftDataVizColorPinkLighter,\n RedsiftDataVizColorCyanLighter,\n RedsiftDataVizColorOrangeLighter,\n RedsiftDataVizColorYellowLighter,\n RedsiftDataVizColorBrownLighter,\n RedsiftDataVizColorGreyLighter,\n ],\n monochrome: [monochrome],\n empty: [RedsiftDataVizColorGreyDark],\n};\n\nexport const successDangerScheme = {\n success: RedsiftDataVizColorGreenDark,\n warning: RedsiftDataVizColorOrangeDark,\n danger: RedsiftDataVizColorRedDark,\n neutral: RedsiftDataVizColorGreyDark,\n};\n\nexport const getColorScale = (\n theme: ColorTheme | SuccessDangerColorTheme,\n isEmpty?: boolean\n): d3ScaleOrdinal<string, string> => {\n let d3colors = d3scaleOrdinal(scheme.default);\n if (isEmpty) {\n d3colors = d3scaleOrdinal(scheme.empty);\n } else if (typeof theme === 'string') {\n d3colors = d3scaleOrdinal(scheme[theme]);\n } else if (typeof theme === 'object') {\n d3colors = d3scaleOrdinal()\n .domain([\n theme.success,\n theme.warning,\n theme.danger,\n ...(theme.neutral ? [theme.neutral] : []),\n ])\n .range([\n successDangerScheme.success,\n successDangerScheme.warning,\n successDangerScheme.danger,\n ...(theme.neutral ? [successDangerScheme.neutral] : []),\n ])\n .unknown(monochrome) as d3ScaleOrdinal<string, string>;\n }\n\n return d3colors;\n};\n","import { ColorTheme, Datum, SuccessDangerColorTheme } from '../../types';\nimport { ComponentProps } from 'react';\nimport { ValueOf } from '@redsift/design-system';\nimport { ScaleLinear as d3ScaleLinear } from 'd3';\n\n/**\n * Component size.\n */\nexport const HorizontalBarChartSize = {\n small: 'small',\n medium: 'medium',\n large: 'large',\n} as const;\nexport type HorizontalBarChartSize = ValueOf<typeof HorizontalBarChartSize>;\n\n/**\n * Component theme.\n */\nexport const HorizontalBarChartTheme = ColorTheme;\nexport type HorizontalBarChartTheme = ValueOf<typeof HorizontalBarChartTheme>;\n\n/**\n * Tooltip label variant.\n */\nexport const HorizontalBarChartTooltipVariant = {\n none: 'none',\n label: 'label',\n value: 'value',\n percent: 'percent',\n};\nexport type HorizontalBarChartTooltipVariant = ValueOf<\n typeof HorizontalBarChartTooltipVariant\n>;\n\ninterface LocaleText {\n emptyChartText: string;\n}\n\n/**\n * Component props.\n */\nexport interface HorizontalBarChartProps extends ComponentProps<'div'> {\n /** Whether the x axis labels are rotated or not. */\n areXLabelsRotated?: boolean;\n /** Number of categories to use, the rest being put into a new category called \"Others\". */\n caping?: number;\n /** Caption. */\n caption?: string;\n /** Dataset to use to generate the chart, should be a list of objects containing a name and a value. */\n data: Datum[];\n /** Labels and texts. */\n localeText?: LocaleText;\n /** Method to be called on a click on a bar. */\n onBarClick?: (data: Datum) => void;\n /** Whether a category should be displayed for categories that has been removed by the caping option. Optionaly, this prop can be used to change the label of this category. */\n others?: boolean | string;\n /** HorizontalBarChart size. */\n size?: HorizontalBarChartSize;\n /** Bar role. Used to indicate that bars are to be considered buttons or links. If an onClick is provided, the bars will have the role `button` unless specifically set to `link` with this prop. */\n barRole?: 'button' | 'link';\n /** Color palette to use. You can choose among the list of available color palette or also choose to use the success/warning/danger theme for which you have to specify which key corresponds to which status. */\n theme?: HorizontalBarChartTheme | SuccessDangerColorTheme;\n /** Title. */\n title?: string;\n /** Tooltip variant. */\n tooltipVariant?: HorizontalBarChartTooltipVariant;\n}\n\nexport type StyledHorizontalBarChartProps = Omit<\n HorizontalBarChartProps,\n 'data'\n> & {};\n\nexport interface HorizontalBarChartBarProps extends ComponentProps<'g'> {\n chartId: string;\n color: string;\n data: Datum;\n gap: number;\n height: number;\n index: number;\n isEmpty: boolean;\n onClick?: () => void;\n role?: HorizontalBarChartProps['barRole'];\n showTooltip: boolean;\n tooltipLabelOnly: boolean;\n tooltipPercent: number | null;\n width: number;\n}\n\nexport type StyledHorizontalBarChartBarProps = Omit<\n HorizontalBarChartBarProps,\n | 'chartId'\n | 'color'\n | 'data'\n | 'gap'\n | 'height'\n | 'index'\n | 'isEmpty'\n | 'showTooltip'\n | 'tooltipPercent'\n | 'tooltipLabelOnly'\n | 'width'\n> & {\n $clickable: boolean;\n};\n\nexport interface HorizontalBarChartAxisBottomProps extends ComponentProps<'g'> {\n areXLabelsRotated: boolean;\n chartHeight: number;\n d3scale: d3ScaleLinear<number, number>;\n}\n\nexport type StyledHorizontalBarChartAxisBottomProps = Omit<\n HorizontalBarChartAxisBottomProps,\n 'areXLabelsRotated' | 'chartHeight' | 'd3scale'\n> & {};\n","import styled, { css } from 'styled-components';\nimport { Flexbox } from '@redsift/design-system';\nimport {\n StyledHorizontalBarChartProps,\n StyledHorizontalBarChartBarProps,\n} from './types';\n\n/**\n * Component style.\n */\nexport const StyledHorizontalBarChart = styled.div<StyledHorizontalBarChartProps>`\n margin: 8px;\n padding: 8px;\n color: var(--redsift-color-neutral-black);\n\n .redsift-horizontal-barchart__container {\n display: flex;\n align-items: center;\n gap: 16px;\n font-family: var(--redsift-typography-font-family-source-code-pro);\n font-size: 11px;\n justify-content: center;\n margin: 8px 0;\n\n .redsift-horizontal-barchart-container__chart {\n position: relative;\n }\n }\n\n svg {\n display: block;\n\n g {\n margin: 8px;\n }\n }\n`;\n\nexport const StyledHorizontalBarChartTitle = styled(\n Flexbox\n)<StyledHorizontalBarChartProps>`\n font-family: var(--redsift-typography-h4-font-family);\n font-size: var(--redsift-typography-h4-font-size);\n font-weight: var(--redsift-typography-h4-font-weight);\n line-height: var(--redsift-typography-h4-line-height);\n`;\n\nexport const StyledHorizontalBarChartCaption = styled.p<StyledHorizontalBarChartProps>`\n font-family: var(--redsift-typography-caption-font-family);\n font-size: var(--redsift-typography-caption-font-size);\n font-weight: var(--redsift-typography-caption-font-weight);\n line-height: var(--redsift-typography-caption-line-height);\n`;\n\nexport const StyledHorizontalBarChartEmptyText = styled.div<{\n $maxWidth: number;\n $textSize: number;\n}>`\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n\n > * {\n max-width: ${({ $maxWidth }) => $maxWidth}px;\n }\n\n > span {\n font-family: var(--redsift-typography-font-family-raleway);\n color: var(--redsift-color-neutral-black);\n font-size: ${({ $textSize }) => $textSize}px;\n line-height: ${({ $textSize }) => $textSize}px;\n }\n`;\n\nexport const StyledHorizontalBarChartBar = styled.g<StyledHorizontalBarChartBarProps>`\n rect {\n fill-opacity: 0.9;\n }\n\n ${({ $clickable }) =>\n $clickable\n ? css`\n cursor: pointer;\n\n &:hover,\n &:focus {\n outline: none;\n rect {\n fill-opacity: 0.7;\n }\n }\n\n &:focus-visible {\n rect {\n stroke: var(--redsift-color-default-primary);\n stroke-width: 4px;\n paint-order: stroke;\n }\n }\n `\n : ''}}\n`;\n\nexport const StyledHorizontalBarChartAxisBottom = styled.g`\n line.grid-line {\n fill: none;\n stroke: #ccc;\n shape-rendering: crispEdges;\n }\n\n text {\n font-family: var(--redsift-typography-font-family-source-code-pro);\n font-size: 10px;\n }\n`;\n","import React, { forwardRef, KeyboardEventHandler, RefObject } from 'react';\n\nimport { Comp, Number, Text } from '@redsift/design-system';\nimport { Tooltip } from '@redsift/popovers';\n\nimport { HorizontalBarChartBarProps } from './types';\nimport { StyledHorizontalBarChartBar } from './styles';\n\nconst COMPONENT_NAME = 'HorizontalBarChartBar';\nconst CLASSNAME = 'redsift-horizontal-barchart-bar';\nconst DEFAULT_PROPS: Partial<HorizontalBarChartBarProps> = {};\n\nexport const HorizontalBarChartBar: Comp<\n HorizontalBarChartBarProps,\n SVGGElement\n> = forwardRef((props, ref) => {\n const {\n chartId,\n color,\n data,\n gap,\n height,\n index,\n isEmpty,\n onClick,\n role,\n showTooltip,\n tooltipLabelOnly,\n tooltipPercent,\n width,\n ...forwardedProps\n } = props;\n\n const onKeyDown: KeyboardEventHandler<SVGElement> = (event) => {\n if (onClick) {\n event.stopPropagation();\n\n if (event.code === 'Enter' || event.code === 'Space') {\n event.preventDefault();\n onClick();\n }\n }\n };\n\n const Bar = (\n <StyledHorizontalBarChartBar\n {...forwardedProps}\n ref={ref as RefObject<SVGGElement>}\n aria-label={\n showTooltip && !isEmpty ? `${data.name}: ${data.value}` : undefined\n }\n aria-labelledby={\n !showTooltip && !isEmpty\n ? `id${chartId}__slice-${index}-title`\n : undefined\n }\n id={`id${chartId}__slice-${index}`}\n className={`row _${index}`}\n onClick={onClick}\n onKeyDown={onKeyDown}\n role={role ? role : onClick ? 'button' : undefined}\n tabIndex={onClick ? 0 : undefined}\n transform={`translate(0,${gap * (index + 1) + height * index})`}\n $clickable={Boolean(onClick)}\n >\n <rect height={height} width={width} fill={color} />\n <text x=\"10\" y={height / 2} dy=\"0.35em\" aria-hidden={true}>\n {data.name}\n </text>\n {!showTooltip && !isEmpty && (\n <title>{`${data.name}: ${data.value}`}</title>\n )}\n </StyledHorizontalBarChartBar>\n );\n\n if (showTooltip) {\n return (\n <Tooltip placement=\"right\">\n <Tooltip.Trigger>{Bar}</Tooltip.Trigger>\n <Tooltip.Content>\n {tooltipLabelOnly ? (\n <Text variant=\"caption\">{data.name}</Text>\n ) : tooltipPercent !== null ? (\n <Text variant=\"caption\">\n {data.name} -{' '}\n <Number\n value={tooltipPercent}\n type=\"percent\"\n variant=\"caption\"\n maximumFractionDigits={2}\n />\n </Text>\n ) : (\n <Text variant=\"caption\">\n {data.name} -{' '}\n <Number\n value={data.value}\n variant=\"caption\"\n maximumFractionDigits={2}\n />\n </Text>\n )}\n </Tooltip.Content>\n </Tooltip>\n );\n }\n\n return Bar;\n});\nHorizontalBarChartBar.className = CLASSNAME;\nHorizontalBarChartBar.defaultProps = DEFAULT_PROPS;\nHorizontalBarChartBar.displayName = COMPONENT_NAME;\n","import React, { forwardRef, RefObject, useEffect, useRef } from 'react';\n\nimport { Comp } from '@redsift/design-system';\n\nimport { HorizontalBarChartAxisBottomProps } from './types';\nimport { StyledHorizontalBarChartAxisBottom } from './styles';\nimport { select, axisBottom } from 'd3';\n\nconst COMPONENT_NAME = 'HorizontalBarChartAxisBottom';\nconst CLASSNAME = 'redsift-horizontal-barchart-axis-bottom';\nconst DEFAULT_PROPS: Partial<HorizontalBarChartAxisBottomProps> = {};\n\nexport const HorizontalBarChartAxisBottom: Comp<\n HorizontalBarChartAxisBottomProps,\n SVGGElement\n> = forwardRef((props, ref) => {\n const { areXLabelsRotated, chartHeight, d3scale, ...forwardedProps } = props;\n\n const axisRef = (ref || useRef<SVGGElement>()) as RefObject<SVGGElement>;\n\n useEffect(() => {\n if (axisRef.current) {\n select(axisRef.current).call(axisBottom(d3scale).ticks(5));\n\n select(axisRef.current)\n .selectAll('g.tick')\n .select('line.grid-line')\n .remove();\n\n select(axisRef.current)\n .selectAll('g.tick')\n .append('line')\n .attr('class', 'grid-line')\n .attr('x1', 0)\n .attr('y1', 0)\n .attr('x2', 0)\n .attr('y2', () => -chartHeight);\n\n if (areXLabelsRotated) {\n select(axisRef.current)\n .attr('text-anchor', 'end')\n .selectAll('text')\n .attr('transform', 'translate(-6,5) rotate(-45)');\n }\n }\n }, [d3scale]);\n\n return (\n <StyledHorizontalBarChartAxisBottom\n className=\"axis\"\n {...forwardedProps}\n ref={axisRef}\n />\n );\n});\nHorizontalBarChartAxisBottom.className = CLASSNAME;\nHorizontalBarChartAxisBottom.defaultProps = DEFAULT_PROPS;\nHorizontalBarChartAxisBottom.displayName = COMPONENT_NAME;\n","import React, { forwardRef, RefObject, useId } from 'react';\nimport { scaleLinear as d3scaleLinear, sum as d3sum } from 'd3';\n\nimport { Comp } from '@redsift/design-system';\n\nimport { ChartDimensions, Datum } from '../../types';\nimport { getColorScale } from '../../scheme';\nimport {\n HorizontalBarChartProps,\n HorizontalBarChartSize,\n HorizontalBarChartTheme,\n HorizontalBarChartTooltipVariant,\n} from './types';\nimport {\n StyledHorizontalBarChart,\n StyledHorizontalBarChartCaption,\n StyledHorizontalBarChartEmptyText,\n StyledHorizontalBarChartTitle,\n} from './styles';\nimport { HorizontalBarChartBar } from './HorizontalBarChartBar';\nimport { HorizontalBarChartAxisBottom } from './HorizontalBarChartAxisBottom';\n\nconst COMPONENT_NAME = 'HorizontalBarChart';\nconst CLASSNAME = 'redsift-horizontal-barchart';\nconst DEFAULT_PROPS: Partial<HorizontalBarChartProps> = {\n others: true,\n size: HorizontalBarChartSize.medium,\n theme: HorizontalBarChartTheme.default,\n tooltipVariant: HorizontalBarChartTooltipVariant.value,\n localeText: {\n emptyChartText: 'No Data',\n },\n};\n\nconst sizeToDimension = (size: HorizontalBarChartSize): ChartDimensions => {\n switch (size) {\n case HorizontalBarChartSize.small:\n return { width: 300, height: 200 };\n case HorizontalBarChartSize.large:\n return { width: 500, height: 400 };\n case HorizontalBarChartSize.medium:\n default:\n return { width: 400, height: 300 };\n }\n};\n\nconst sizeToFontSize = (size: HorizontalBarChartSize | undefined): number => {\n switch (size) {\n case HorizontalBarChartSize.small:\n return 30;\n case HorizontalBarChartSize.large:\n return 38;\n case HorizontalBarChartSize.medium:\n default:\n return 34;\n }\n};\n\nexport const HorizontalBarChart: Comp<HorizontalBarChartProps, HTMLDivElement> =\n forwardRef((props, ref) => {\n const id = useId();\n\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n areXLabelsRotated,\n caping,\n caption,\n className,\n data: propData,\n onBarClick,\n others,\n size,\n barRole,\n theme,\n title,\n tooltipVariant,\n localeText,\n ...forwardedProps\n } = props;\n const { emptyChartText } = {\n ...DEFAULT_PROPS.localeText,\n ...localeText,\n };\n const isEmpty = propData.every((d) => d.value === 0);\n let data = propData.sort((a, b) => (a.value < b.value ? 1 : -1));\n if (caping) {\n if (typeof others === 'boolean' && !others) {\n data = data.slice(0, caping);\n } else {\n data = data.reduce<Datum[]>((acc, curr, index) => {\n if (index < caping) {\n acc[index] = curr;\n } else if (index === caping) {\n acc[index] = {\n name: typeof others === 'string' ? others : 'Others',\n value: curr.value,\n };\n } else {\n acc[caping] = {\n ...acc[caping],\n value: acc[caping].value + curr.value,\n };\n }\n return acc;\n }, []);\n }\n }\n if (isEmpty) {\n data = [];\n }\n\n // Get charts dimensions based on the selected size.\n const chartDimensions = sizeToDimension(size!);\n const width = chartDimensions.width - 16;\n const height = chartDimensions.height;\n const chartHeight = height - 48 - (areXLabelsRotated ? 30 : 0);\n const margins = { top: 16, left: 16, right: 16, bottom: 32 };\n const numberOfRows = data.length;\n const gap = 5;\n\n // Set color scheme.\n const d3colors = getColorScale(theme!, isEmpty);\n\n // Initialize the chart.\n const scaleX = d3scaleLinear()\n .domain([0, Math.max(...data.map(({ value }) => value))])\n .range([0, width - 32]);\n const barHeight = (chartHeight - (numberOfRows + 1) * gap) / numberOfRows;\n\n const total = d3sum(data, (d) => d.value);\n return (\n <StyledHorizontalBarChart\n {...forwardedProps}\n ref={ref as RefObject<HTMLDivElement>}\n className={className}\n >\n {title ? (\n <StyledHorizontalBarChartTitle\n className={`${HorizontalBarChart.className}__title`}\n alignItems=\"center\"\n id={`id${id}__title`}\n >\n {title}\n </StyledHorizontalBarChartTitle>\n ) : null}\n <div className={`${HorizontalBarChart.className}__container`}>\n <div\n className={`${HorizontalBarChart.className}-container__chart`}\n aria-label={\n ariaLabel\n ? ariaLabel\n : ariaLabelledby || title\n ? undefined\n : 'Horizontal Bar Chart'\n }\n aria-labelledby={\n ariaLabelledby\n ? ariaLabelledby\n : title\n ? `id${id}__title`\n : undefined\n }\n >\n {isEmpty ? (\n <StyledHorizontalBarChartEmptyText\n $maxWidth={width}\n $textSize={sizeToFontSize(size) / 2}\n >\n <span>{emptyChartText}</span>\n </StyledHorizontalBarChartEmptyText>\n ) : null}\n <svg width={width} height={height}>\n <g transform={`translate(${margins.left},${margins.top})`}>\n <HorizontalBarChartAxisBottom\n areXLabelsRotated={!!areXLabelsRotated}\n chartHeight={chartHeight}\n d3scale={scaleX}\n transform={`translate(0,${chartHeight})`}\n />\n {data.map(({ value, name }, index) => {\n const percent = value / total;\n return (\n <HorizontalBarChartBar\n chartId={id}\n color={d3colors(name)}\n data={{ value, name }}\n gap={gap}\n height={barHeight}\n index={index}\n isEmpty={isEmpty}\n key={`row _${index}`}\n onClick={\n onBarClick ? () => onBarClick(data[index]) : undefined\n }\n role={barRole}\n showTooltip={\n tooltipVariant !==\n HorizontalBarChartTooltipVariant.none && !isEmpty\n }\n tooltipLabelOnly={\n tooltipVariant == HorizontalBarChartTooltipVariant.label\n }\n tooltipPercent={\n tooltipVariant ===\n HorizontalBarChartTooltipVariant.percent\n ? percent\n : null\n }\n width={Math.abs(scaleX(value))}\n />\n );\n })}\n </g>\n </svg>\n </div>\n </div>\n {caption ? (\n <StyledHorizontalBarChartCaption\n className={`${HorizontalBarChart.className}__caption`}\n >\n {caption}\n </StyledHorizontalBarChartCaption>\n ) : null}\n </StyledHorizontalBarChart>\n );\n });\nHorizontalBarChart.className = CLASSNAME;\nHorizontalBarChart.defaultProps = DEFAULT_PROPS;\nHorizontalBarChart.displayName = COMPONENT_NAME;\n","import { ColorTheme, Datum, SuccessDangerColorTheme } from '../../types';\nimport { ComponentProps } from 'react';\nimport { ValueOf } from '@redsift/design-system';\n\n/**\n * Component size.\n */\nexport const PieChartSize = {\n small: 'small',\n medium: 'medium',\n large: 'large',\n} as const;\nexport type PieChartSize = ValueOf<typeof PieChartSize>;\n\n/**\n * Component variant.\n */\nexport const PieChartVariant = {\n plain: 'plain',\n spaced: 'spaced',\n donut: 'donut',\n spacedDonut: 'spacedDonut',\n} as const;\nexport type PieChartVariant = ValueOf<typeof PieChartVariant>;\n\n/**\n * Component's labels variant.\n */\nexport const PieChartLabelVariant = {\n none: 'none',\n internal: 'internal',\n externalLabel: 'externalLabel',\n externalLabelValue: 'externalLabelValue',\n externalLabelPercent: 'externalLabelPercent',\n} as const;\nexport type PieChartLabelVariant = ValueOf<typeof PieChartLabelVariant>;\n\n/**\n * Component theme.\n */\nexport const PieChartTheme = ColorTheme;\nexport type PieChartTheme = ValueOf<typeof PieChartTheme>;\n\n/**\n * Tooltip label variant.\n */\nexport const PieChartTooltipVariant = {\n none: 'none',\n label: 'label',\n value: 'value',\n percent: 'percent',\n};\nexport type PieChartTooltipVariant = ValueOf<typeof PieChartTooltipVariant>;\n\ninterface LocaleText {\n emptyChartText: string;\n}\n\n/**\n * Component props.\n */\nexport interface PieChartProps extends ComponentProps<'div'> {\n /** Number of categories to use, the rest being put into a new category called \"Others\". */\n caping?: number;\n /** Caption. */\n caption?: string;\n /** Dataset to use to generate the chart, should be a list of objects containing a name and a value. */\n data: Datum[];\n /** Define whether the labels should be displayed inside or outside the charts and if they should contain raw or percentage values. */\n labelVariant?: PieChartLabelVariant;\n /** Labels and texts. */\n localeText?: LocaleText;\n /** Method to be called on a click on a slice. */\n onSliceClick?: (data: Datum) => void;\n /** Whether a category should be displayed for categories that has been removed by the caping option. Optionaly, this prop can be used to change the label of this category. */\n others?: boolean | string;\n /** PieChart size. */\n size?: PieChartSize;\n /** Slice role. Used to indicate that slices are to be considered buttons or links. If an onClick is provided, the slices will have the role `button` unless specifically set to `link` with this prop. */\n sliceRole?: 'button' | 'link';\n /** Secondary text to be displayed in the middle of the chart, between the main text and subtext. Recommended to be used with donut variants only. */\n middleText?: string;\n /** Secondary text to be displayed in the middle of the chart, above the main text. Recommended to be used with `donut` variants only. */\n subtext?: string;\n /** Main text to be displayed in the middle of the chart. Recommended to be used with `donut` variants only. */\n text?: string;\n /** Color palette to use. You can choose among the list of available color palette or also choose to use the success/warning/danger theme for which you have to specify which key corresponds to which status. */\n theme?: PieChartTheme | SuccessDangerColorTheme;\n /** Title. */\n title?: string;\n /** PieChart variant. */\n variant?: PieChartVariant;\n /** Tooltip variant. */\n tooltipVariant?: PieChartTooltipVariant;\n}\n\nexport type StyledPieChartProps = Omit<PieChartProps, 'data'> & {};\n\nexport interface PieChartArcProps extends ComponentProps<'g'> {\n chartId: string;\n color: string;\n data: Datum;\n index: number;\n onClick?: () => void;\n path: string;\n role?: PieChartProps['sliceRole'];\n spaced?: boolean;\n showTooltip: boolean;\n tooltipPercent: number | null;\n tooltipLabelOnly: boolean;\n isEmpty: boolean;\n}\n\nexport type StyledPieChartArcProps = Omit<\n PieChartArcProps,\n | 'chartId'\n | 'color'\n | 'data'\n | 'index'\n | 'path'\n | 'spaced'\n | 'showTooltip'\n | 'tooltipPercent'\n | 'tooltipLabelOnly'\n | 'isEmpty'\n> & {\n $spaced: boolean;\n $clickable: boolean;\n};\n","import styled, { css } from 'styled-components';\nimport { Flexbox } from '@redsift/design-system';\nimport { StyledPieChartProps, StyledPieChartArcProps } from './types';\n\n/**\n * Component style.\n */\nexport const StyledPieChart = styled.div<StyledPieChartProps>`\n margin: 8px;\n padding: 8px;\n color: var(--redsift-color-neutral-black);\n\n .redsift-piechart__container {\n display: flex;\n align-items: center;\n gap: 16px;\n font-family: var(--redsift-typography-font-family-source-code-pro);\n font-size: 11px;\n justify-content: center;\n margin: 8px 0;\n\n .redsift-piechart-container__chart {\n position: relative;\n }\n }\n svg {\n display: block;\n }\n`;\n\nexport const StyledPieChartTitle = styled(Flexbox)<StyledPieChartProps>`\n font-family: var(--redsift-typography-h4-font-family);\n font-size: var(--redsift-typography-h4-font-size);\n font-weight: var(--redsift-typography-h4-font-weight);\n line-height: var(--redsift-typography-h4-line-height);\n`;\n\nexport const StyledPieChartCaption = styled.p<StyledPieChartProps>`\n font-family: var(--redsift-typography-caption-font-family);\n font-size: var(--redsift-typography-caption-font-size);\n font-weight: var(--redsift-typography-caption-font-weight);\n line-height: var(--redsift-typography-caption-line-height);\n`;\n\nexport const StyledPieChartCenterText = styled.div<{\n $maxWidth: number;\n $textSize: number;\n $smallTextSize: number;\n}>`\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n\n > * {\n max-width: ${({ $maxWidth }) => $maxWidth}px;\n }\n\n > b {\n font-family: var(--redsift-typography-font-family-source-code-pro);\n color: var(--redsift-color-neutral-black);\n font-weight: var(--redsift-typography-font-weight-medium);\n font-size: ${({ $textSize }) => $textSize}px;\n line-height: ${({ $textSize }) => $textSize}px;\n\n &:nth-child(2) {\n font-weight: normal;\n margin-top: 8px;\n font-family: var(--redsift-typography-font-family-raleway);\n font-size: ${({ $smallTextSize }) => $smallTextSize}px;\n line-height: ${({ $smallTextSize }) => $smallTextSize}px;\n }\n }\n > span {\n color: var(--redsift-color-neutral-black);\n font-size: ${({ $textSize }) => $textSize}px;\n line-height: ${({ $textSize }) => $textSize}px;\n &:nth-child(3) {\n margin-top: 4px;\n font-size: ${({ $smallTextSize }) => $smallTextSize}px;\n line-height: ${({ $smallTextSize }) => $smallTextSize}px;\n }\n }\n > b + span {\n font-size: var(--redsift-typography-body-font-size);\n font-family: var(--redsift-typography-font-family-raleway);\n line-height: var(--redsift-typography-badge-line-height);\n color: rgba(0, 0, 0, 0.6);\n text-align: center;\n }\n`;\n\nexport const StyledPieChartEmptyText = styled.div<{\n $maxWidth: number;\n $textSize: number;\n $isDonut: boolean;\n}>`\n position: absolute;\n top: 0;\n left: 0;\n height: 100%;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n align-items: center;\n pointer-events: none;\n\n > * {\n max-width: ${({ $maxWidth }) => $maxWidth}px;\n }\n\n > span {\n font-family: var(--redsift-typography-font-family-raleway);\n color: ${({ $isDonut }) =>\n $isDonut\n ? css`var(--redsift-color-neutral-midgrey)`\n : css`var(--redsift-color-neutral-black)`};\n font-size: ${({ $textSize }) => $textSize}px;\n line-height: ${({ $textSize }) => $textSize}px;\n }\n`;\n\nexport const StyledPieChartLabel = styled.li<{ $color: string }>`\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n max-width: 262px;\n font-size: var(--redsift-typography-caption-font-size);\n\n > div {\n height: 16px;\n width: 16px;\n min-width: 16px;\n background-color: ${({ $color }) => $color};\n }\n`;\n\nexport const StyledPieChartArc = styled.g<StyledPieChartArcProps>`\n ${({ $spaced }) =>\n $spaced\n ? css`\n path {\n stroke-width: 2px;\n stroke: #fff;\n }\n `\n : ''}\n\n ${({ $clickable }) =>\n $clickable\n ? css`\n cursor: pointer;\n\n &:hover,\n &:focus {\n opacity: 0.8;\n outline: none;\n }\n\n &:focus-visible {\n path {\n stroke: var(--redsift-color-default-primary);\n stroke-width: 4px;\n paint-order: stroke;\n }\n }\n `\n : ''}}\n`;\n","import React, { forwardRef, KeyboardEventHandler, RefObject } from 'react';\n\nimport { Comp, Number, Text } from '@redsift/design-system';\nimport { Tooltip } from '@redsift/popovers';\n\nimport { PieChartArcProps } from './types';\nimport { StyledPieChartArc } from './styles';\n\nconst COMPONENT_NAME = 'PieChartArc';\nconst CLASSNAME = 'redsift-piechart-arc';\nconst DEFAULT_PROPS: Partial<PieChartArcProps> = {};\n\nexport const PieChartArc: Comp<PieChartArcProps, SVGGElement> = forwardRef(\n (props, ref) => {\n const {\n chartId,\n color,\n data,\n index,\n onClick,\n path,\n role,\n spaced,\n showTooltip,\n tooltipPercent,\n tooltipLabelOnly,\n isEmpty,\n ...forwardedProps\n } = props;\n\n const onKeyDown: KeyboardEventHandler<SVGElement> = (event) => {\n if (onClick) {\n event.stopPropagation();\n\n if (event.code === 'Enter' || event.code === 'Space') {\n event.preventDefault();\n onClick();\n }\n }\n };\n\n const Arc = (\n <StyledPieChartArc\n {...forwardedProps}\n ref={ref as RefObject<SVGGElement>}\n aria-label={\n showTooltip && !isEmpty ? `${data.name}: ${data.value}` : undefined\n }\n aria-labelledby={\n !showTooltip && !isEmpty\n ? `id${chartId}__slice-${index}-title`\n : undefined\n }\n className={`pie-slice _${index}`}\n id={`id${chartId}__slice-${index}`}\n onClick={onClick}\n onKeyDown={onKeyDown}\n role={role ? role : onClick ? 'button' : undefined}\n tabIndex={onClick ? 0 : undefined}\n $clickable={Boolean(onClick)}\n $spaced={Boolean(spaced)}\n >\n <path d={path} fill={color} />\n {!showTooltip && !isEmpty ? (\n <title\n id={`id${chartId}__slice-${index}-title`}\n >{`${data.name}: ${data.value}`}</title>\n ) : null}\n </StyledPieChartArc>\n );\n\n if (showTooltip) {\n return (\n <Tooltip placement=\"right\">\n <Tooltip.Trigger>{Arc}</Tooltip.Trigger>\n <Tooltip.Content>\n {tooltipLabelOnly ? (\n <Text variant=\"caption\">{data.name}</Text>\n ) : tooltipPercent !== null ? (\n <Text variant=\"caption\">\n {data.name} -{' '}\n <Number\n maximumFractionDigits={2}\n type=\"percent\"\n value={tooltipPercent}\n variant=\"caption\"\n />\n </Text>\n ) : (\n <Text variant=\"caption\">\n {data.name} -{' '}\n <Number\n maximumFractionDigits={2}\n value={data.value}\n variant=\"caption\"\n />\n </Text>\n )}\n </Tooltip.Content>\n </Tooltip>\n );\n }\n\n return Arc;\n }\n);\nPieChartArc.className = CLASSNAME;\nPieChartArc.defaultProps = DEFAULT_PROPS;\nPieChartArc.displayName = COMPONENT_NAME;\n","import React, { forwardRef, RefObject, useId } from 'react';\nimport { arc as d3arc, pie as d3pie, sum as d3sum } from 'd3';\n\nimport { Comp, Number, Text } from '@redsift/design-system';\n\nimport { ChartDimensions, Datum, PieArcDatum } from '../../types';\nimport { getColorScale } from '../../scheme';\nimport {\n PieChartLabelVariant,\n PieChartProps,\n PieChartSize,\n PieChartTheme,\n PieChartTooltipVariant,\n PieChartVariant,\n} from './types';\nimport {\n StyledPieChartCenterText,\n StyledPieChart,\n StyledPieChartCaption,\n StyledPieChartLabel,\n StyledPieChartTitle,\n StyledPieChartEmptyText,\n} from './styles';\nimport { PieChartArc } from './PieChartArc';\n\nconst COMPONENT_NAME = 'PieChart';\nconst CLASSNAME = 'redsift-piechart';\nconst DEFAULT_PROPS: Partial<PieChartProps> = {\n labelVariant: PieChartLabelVariant.none,\n others: true,\n size: PieChartSize.medium,\n theme: PieChartTheme.default,\n variant: PieChartVariant.plain,\n tooltipVariant: PieChartTooltipVariant.value,\n localeText: {\n emptyChartText: 'No Data',\n },\n};\n\nconst sizeToDimension = (size: PieChartSize): ChartDimensions => {\n switch (size) {\n case PieChartSize.small:\n return { width: 200, height: 200 };\n case PieChartSize.large:\n return { width: 300, height: 300 };\n case PieChartSize.medium:\n default:\n return { width: 240, height: 240 };\n }\n};\n\nconst sizeToSmallFontSize = (size: PieChartSize | undefined): number => {\n switch (size) {\n case PieChartSize.small:\n return 13;\n case PieChartSize.large:\n return 18;\n case PieChartSize.medium:\n default:\n return 14;\n }\n};\n\nconst sizeToFontSize = (size: PieChartSize | undefined): number => {\n switch (size) {\n case PieChartSize.small:\n return 30;\n case PieChartSize.large:\n return 38;\n case PieChartSize.medium:\n default:\n return 34;\n }\n};\n\nconst sizeToInnerRadius = (size: PieChartSize): number => {\n switch (size) {\n case PieChartSize.small:\n return 55;\n case PieChartSize.large:\n return 80;\n case PieChartSize.medium:\n default:\n return 65;\n }\n};\n\nexport const PieChart: Comp<PieChartProps, HTMLDivElement> = forwardRef(\n (props, ref) => {\n const id = useId();\n\n const {\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n caping,\n caption,\n className,\n data: propData,\n labelVariant,\n onSliceClick,\n others,\n size,\n sliceRole,\n text,\n middleText,\n subtext,\n theme,\n title,\n variant,\n tooltipVariant,\n localeText,\n ...forwardedProps\n } = props;\n const { emptyChartText } = {\n ...DEFAULT_PROPS.localeText,\n ...localeText,\n };\n const isEmpty = propData.every((d) => d.value === 0);\n const isDonut =\n variant === PieChartVariant.donut ||\n variant === PieChartVariant.spacedDonut;\n let data = propData.sort((a, b) => (a.value < b.value ? 1 : -1));\n if (caping) {\n if (typeof others === 'boolean' && !others) {\n data = data.slice(0, caping);\n } else {\n data = data.reduce<Datum[]>((acc, curr, index) => {\n if (index < caping) {\n acc[index] = curr;\n } else if (index === caping) {\n acc[index] = {\n name: typeof others === 'string' ? others : 'Others',\n value: curr.value,\n };\n } else {\n acc[caping] = {\n ...acc[caping],\n value: acc[caping].value + curr.value,\n };\n }\n return acc;\n }, []);\n }\n }\n if (isEmpty) {\n data = [\n {\n name: emptyChartText as string,\n value: 100,\n },\n ];\n }\n\n // Get charts dimensions based on the selected size.\n const chartDimensions = sizeToDimension(size!);\n const externalRadiusPadding = 8;\n const innerRadius = sizeToInnerRadius(size!);\n\n // Set color scheme.\n const d3colors = getColorScale(theme!, isEmpty);\n\n // Initialize the chart.\n const createPie = d3pie<Datum>()\n .value((d) => d.value)\n .sort(null);\n const createArc = d3arc<PieArcDatum>()\n .innerRadius(isDonut ? innerRadius : 0)\n .outerRadius(chartDimensions.width / 2 - externalRadiusPadding);\n const pieData = createPie(data);\n const total = d3sum(data, (d) => d.value);\n return (\n <StyledPieChart\n {...forwardedProps}\n ref={ref as RefObject<HTMLDivElement>}\n className={className}\n >\n {title ? (\n <StyledPieChartTitle\n className={`${PieChart.className}__title`}\n alignItems=\"center\"\n id={`id${id}__title`}\n >\n {title}\n </StyledPieChartTitle>\n ) : null}\n <div className={`${PieChart.className}__container`}>\n <div\n className={`${PieChart.className}-container__chart`}\n aria-label={\n ariaLabel\n ? ariaLabel\n : ariaLabelledby || title\n ? undefined\n : 'Pie Chart'\n }\n aria-labelledby={\n ariaLabelledby\n ? ariaLabelledby\n : title\n ? `id${id}__title`\n : undefined\n }\n >\n {text && !isEmpty ? (\n <StyledPieChartCenterText\n $maxWidth={innerRadius * 2}\n $textSize={sizeToFontSize(size)}\n $smallTextSize={sizeToSmallFontSize(size)}\n >\n {subtext ? <b>{text}</b> : <span>{text}</span>}\n {middleText ? <b>{middleText}</b> : null}\n <span>{subtext}</span>\n </StyledPieChartCenterText>\n ) : null}\n {isEmpty ? (\n <StyledPieChartEmptyText\n $maxWidth={innerRadius * 2}\n $textSize={sizeToFontSize(size) / 2}\n $isDonut={isDonut}\n >\n <span>{emptyChartText}</span>\n </StyledPieChartEmptyText>\n ) : null}\n <svg width={chartDimensions.width} height={chartDimensions.height}>\n <g\n transform={`translate(${chartDimensions.width / 2} ${\n chartDimensions.height / 2\n })`}\n >\n <g className=\"pie-slice-group\">\n {pieData.map((datum, index) => {\n const percent = datum.data.value / total;\n return (\n <PieChartArc\n chartId={id}\n color={d3colors(datum.data.name)}\n data={datum.data}\n isEmpty={isEmpty}\n index={index}\n key={`pie-slice _${index}`}\n onClick={\n onSliceClick\n ? () => onSliceClick(data[index])\n : undefined\n }\n showTooltip={\n tooltipVariant !== PieChartTooltipVariant.none &&\n !isEmpty\n }\n role={sliceRole}\n tooltipLabelOnly={\n tooltipVariant == PieChartTooltipVariant.label\n }\n tooltipPercent={\n tooltipVariant === PieChartTooltipVariant.percent\n ? percent\n : null\n }\n path={createArc(datum) as string}\n spaced={\n variant === PieChartVariant.spaced ||\n variant === PieChartVariant.spacedDonut\n }\n />\n );\n })}\n </g>\n {labelVariant === PieChartLabelVariant.internal && !isEmpty ? (\n <g className=\"pie-label-group\">\n {pieData\n .filter((datum) => {\n const value = datum.data.value;\n return value > 0 && value / total >= 0.1;\n })\n .map((datum, index) => (\n <text\n className={`pie-slice pie-label _${index}`}\n key={`pie-slice pie-label _${index}`}\n textAnchor=\"middle\"\n transform={`translate(${createArc.centroid(datum)})`}\n >\n {datum.data.name}\n </text>\n ))}\n </g>\n ) : null}\n </g>\n </svg>\n </div>\n {labelVariant !== PieChartLabelVariant.none &&\n labelVariant !== PieChartLabelVariant.internal ? (\n <ul>\n {data.map(({ name, value }: Datum, index) => (\n <StyledPieChartLabel\n key={`pie-external-label _${index}`}\n $color={d3colors(name)}\n >\n <div />\n {labelVariant === PieChartLabelVariant.externalLabelValue ? (\n <>\n <Number\n as=\"b\"\n maximumFractionDigits={2}\n value={value}\n variant=\"inherit\"\n />\n <Text variant=\"caption\">{name}</Text>\n </>\n ) : labelVariant ===\n PieChartLabelVariant.externalLabelPercent ? (\n <>\n <Number\n as=\"b\"\n maximumFractionDigits={2}\n type=\"percent\"\n value={value / total}\n variant=\"inherit\"\n />\n <Text variant=\"caption\">{name}</Text>\n </>\n ) : (\n <Text variant=\"caption\">{name}</Text>\n )}\n </StyledPieChartLabel>\n ))}\n </ul>\n ) : null}\n </div>\n {caption ? (\n <StyledPieChartCaption className={`${PieChart.className}__caption`}>\n {caption}\n </StyledPieChartCaption>\n ) : null}\n </StyledPieChart>\n );\n }\n);\nPieChart.className = CLASSNAME;\nPieChart.defaultProps = DEFAULT_PROPS;\nPieChart.displayName = COMPONENT_NAME;\n"],"names":["ColorTheme","default","dark","darker","monochrome","RedsiftDataVizColorBlueDefault","scheme","RedsiftDataVizColorPurpleDefault","RedsiftDataVizColorGreenDefault","RedsiftDataVizColorRedDefault","RedsiftDataVizColorPinkDefault","RedsiftDataVizColorCyanDefault","RedsiftDataVizColorOrangeDefault","RedsiftDataVizColorYellowDefault","RedsiftDataVizColorBrownDefault","RedsiftDataVizColorGreyDefault","RedsiftDataVizColorPurpleDark","RedsiftDataVizColorBlueDark","RedsiftDataVizColorGreenDark","RedsiftDataVizColorRedDark","RedsiftDataVizColorPinkDark","RedsiftDataVizColorCyanDark","RedsiftDataVizColorOrangeDark","RedsiftDataVizColorYellowDark","RedsiftDataVizColorBrownDark","RedsiftDataVizColorGreyDark","RedsiftDataVizColorPurpleDarker","RedsiftDataVizColorBlueDarker","RedsiftDataVizColorGreenDarker","RedsiftDataVizColorRedDarker","RedsiftDataVizColorPinkDarker","RedsiftDataVizColorCyanDarker","RedsiftDataVizColorOrangeDarker","RedsiftDataVizColorYellowDarker","RedsiftDataVizColorBrownDarker","RedsiftDataVizColorGreyDarker","light","RedsiftDataVizColorPurpleLight","RedsiftDataVizColorBlueLight","RedsiftDataVizColorGreenLight","RedsiftDataVizColorRedLight","RedsiftDataVizColorPinkLight","RedsiftDataVizColorCyanLight","RedsiftDataVizColorOrangeLight","RedsiftDataVizColorYellowLight","RedsiftDataVizColorBrownLight","RedsiftDataVizColorGreyLight","lighter","RedsiftDataVizColorPurpleLighter","RedsiftDataVizColorBlueLighter","RedsiftDataVizColorGreenLighter","RedsiftDataVizColorRedLighter","RedsiftDataVizColorPinkLighter","RedsiftDataVizColorCyanLighter","RedsiftDataVizColorOrangeLighter","RedsiftDataVizColorYellowLighter","RedsiftDataVizColorBrownLighter","RedsiftDataVizColorGreyLighter","empty","successDangerScheme","success","warning","danger","neutral","getColorScale","theme","isEmpty","d3colors","d3scaleOrdinal","domain","range","unknown","HorizontalBarChartSize","small","medium","large","HorizontalBarChartTheme","HorizontalBarChartTooltipVariant","none","label","value","percent","StyledHorizontalBarChart","styled","div","StyledHorizontalBarChartTitle","Flexbox","StyledHorizontalBarChartCaption","p","StyledHorizontalBarChartEmptyText","$maxWidth","$textSize","StyledHorizontalBarChartBar","g","$clickable","css","StyledHorizontalBarChartAxisBottom","COMPONENT_NAME","CLASSNAME","DEFAULT_PROPS","HorizontalBarChartBar","forwardRef","props","ref","chartId","color","data","gap","height","index","onClick","role","showTooltip","tooltipLabelOnly","tooltipPercent","width","forwardedProps","_excluded","onKeyDown","event","stopPropagation","code","preventDefault","Bar","name","undefined","Boolean","Number","className","defaultProps","displayName","HorizontalBarChartAxisBottom","areXLabelsRotated","chartHeight","d3scale","axisRef","useRef","useEffect","current","select","call","axisBottom","ticks","selectAll","remove","append","attr","others","size","tooltipVariant","localeText","emptyChartText","sizeToDimension","sizeToFontSize","HorizontalBarChart","id","useId","ariaLabel","ariaLabelledby","caping","caption","propData","onBarClick","barRole","title","every","d","sort","a","b","slice","reduce","acc","curr","chartDimensions","margins","top","left","right","bottom","numberOfRows","length","scaleX","d3scaleLinear","Math","max","map","barHeight","total","d3sum","abs","PieChartSize","PieChartVariant","plain","spaced","donut","spacedDonut","PieChartLabelVariant","internal","externalLabel","externalLabelValue","externalLabelPercent","PieChartTheme","PieChartTooltipVariant","StyledPieChart","StyledPieChartTitle","StyledPieChartCaption","StyledPieChartCenterText","$smallTextSize","StyledPieChartEmptyText","$isDonut","StyledPieChartLabel","li","$color","StyledPieChartArc","$spaced","PieChartArc","path","Arc","labelVariant","variant","sizeToSmallFontSize","sizeToInnerRadius","PieChart","onSliceClick","sliceRole","text","middleText","subtext","isDonut","externalRadiusPadding","innerRadius","createPie","d3pie","createArc","d3arc","outerRadius","pieData","datum","filter","centroid"],"mappings":";;;;;;AAmBO,MAAMA,UAAU,GAAG;AACxBC,EAAAA,OAAO,EAAE,SAAS;AAClBC,EAAAA,IAAI,EAAE,MAAM;AACZC,EAAAA,MAAM,EAAE,QAAQ;AAChBC,EAAAA,UAAU,EAAE,YAAA;AACd;;ACmCO,MAAMA,UAAU,GAAGC,+BAA8B;AAEjD,MAAMC,MAAM,GAAG;EACpBL,OAAO,EAAE,CACPM,gCAAgC,EAChCF,8BAA8B,EAC9BG,+BAA+B,EAC/BC,6BAA6B,EAC7BC,8BAA8B,EAC9BC,8BAA8B,EAC9BC,gCAAgC,EAChCC,gCAAgC,EAChCC,+BAA+B,EAC/BC,8BAA8B,CAC/B;EACDb,IAAI,EAAE,CACJc,6BAA6B,EAC7BC,2BAA2B,EAC3BC,4BAA4B,EAC5BC,0BAA0B,EAC1BC,2BAA2B,EAC3BC,2BAA2B,EAC3BC,6BAA6B,EAC7BC,6BAA6B,EAC7BC,4BAA4B,EAC5BC,2BAA2B,CA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,eAAA,KAAA,CAAA,aAAA,CAAC1E,QAAM,EAAA;AACL,MAAA,EAAE,EAAC,GAAG;AACN,MAAA,qBAAqB,EAAE,CAAE;AACzB,MAAA,IAAI,EAAC,SAAS;MACd,KAAK,EAAE/C,KAAK,GAAG4G,KAAM;AACrB,MAAA,OAAO,EAAC,SAAA;KACR,CAAA,eACF,oBAAC,IAAI,EAAA;AAAC,MAAA,OAAO,EAAC,SAAA;AAAS,KAAA,EAAEhE,IAAI,CAAQ,CACpC,gBAEH,oBAAC,IAAI,EAAA;AAAC,MAAA,OAAO,EAAC,SAAA;KAAWA,EAAAA,IAAI,CAC9B,CACmB,CAAA;GACvB,CAAC,CACC,GACH,IAAI,CACJ,EACLoC,OAAO,gBACN,KAAA,CAAA,aAAA,CAAC,qBAAqB,EAAA;AAAC,IAAA,SAAS,EAAG,CAAA,EAAE+D,QAAQ,CAAC/F,SAAU,CAAA,SAAA,CAAA;AAAW,GAAA,EAChEgC,OAAO,CACc,GACtB,IAAI,CACO,CAAA;AAErB,CAAC,EACF;AACD+D,QAAQ,CAAC/F,SAAS,GAAG9B,SAAS,CAAA;AAC9B6H,QAAQ,CAAC9F,YAAY,GAAG9B,aAAa,CAAA;AACrC4H,QAAQ,CAAC7F,WAAW,GAAGjC,cAAc;;;;"}
package/package.json CHANGED
@@ -28,12 +28,12 @@
28
28
  "test": "NODE_ENV=test jest --verbose"
29
29
  },
30
30
  "types": "types.d.ts",
31
- "version": "7.7.0",
31
+ "version": "7.8.1",
32
32
  "dependencies": {
33
33
  "@emotion/react": "^11.10.4",
34
34
  "@emotion/styled": "^11.10.4",
35
- "@redsift/design-system": "^7.7.0",
36
- "@redsift/popovers": "^7.7.0",
35
+ "@redsift/design-system": "^7.8.1",
36
+ "@redsift/popovers": "^7.8.1",
37
37
  "d3": "^7.8.0",
38
38
  "d3-shape": "^3.1.0"
39
39
  },
@@ -95,5 +95,5 @@
95
95
  "react-dom": "18",
96
96
  "styled-components": "^5.3.5"
97
97
  },
98
- "gitHead": "6ccb15c58ce0cf14b222cc649552c1f73c017211"
98
+ "gitHead": "fa53d39f525fef098f314743c4cbad268f43f84f"
99
99
  }