@redsift/dashboard 6.3.0 → 7.0.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -29,12 +29,21 @@ var mdiRefresh = "M17.65,6.35C16.2,4.9 14.21,4 12,4A8,8 0 0,0 4,12A8,8 0 0,0 12,
29
29
  * Color palette.
30
30
  */
31
31
  const ColorPalette = {
32
- primary: 'primary',
33
- secondary: 'secondary',
32
+ default: 'default',
33
+ success: 'success',
34
34
  error: 'error',
35
35
  warning: 'warning',
36
36
  info: 'info',
37
- success: 'success'
37
+ question: 'question',
38
+ 'no-data': 'no-data'
39
+ };
40
+ const ProductColorPalette = {
41
+ website: 'website',
42
+ ondmarc: 'ondmarc',
43
+ oninbox: 'oninbox',
44
+ ondomain: 'ondomain',
45
+ hardenize: 'hardenize',
46
+ tools: 'tools'
38
47
  };
39
48
 
40
49
  function ownKeys(object, enumerableOnly) {
@@ -3329,9 +3338,10 @@ function $55f54f7887471b58$export$51e84d46ca0bc451(props, state, ref) {
3329
3338
  * Component size.
3330
3339
  */
3331
3340
  const IconSize = {
3332
- large: 'large',
3341
+ xsmall: 'xsmall',
3342
+ small: 'small',
3333
3343
  medium: 'medium',
3334
- small: 'small'
3344
+ large: 'large'
3335
3345
  };
3336
3346
 
3337
3347
  /**
@@ -3345,11 +3355,11 @@ const StyledIcon = styled.span`
3345
3355
  let {
3346
3356
  $color
3347
3357
  } = _ref;
3348
- return $color && Object.keys(ColorPalette).indexOf($color) !== -1 ? css`
3349
- color: var(--redsift-color-${$color}-main);
3350
- ` : css`
3351
- color: ${$color || css`var(--redsift-color-action-active)`};
3352
- `;
3358
+ return $color && [...Object.keys(ColorPalette), ...Object.keys(ProductColorPalette)].indexOf($color) !== -1 ? css`
3359
+ color: var(--redsift-color-${$color}-primary);
3360
+ ` : css`
3361
+ color: ${$color || css`var(--redsift-color-neutral-darkgrey)`};
3362
+ `;
3353
3363
  }}
3354
3364
 
3355
3365
  ${_ref2 => {
@@ -3359,21 +3369,21 @@ const StyledIcon = styled.span`
3359
3369
  switch ($size) {
3360
3370
  case IconSize.large:
3361
3371
  return css`
3362
- font-size: 35px;
3363
- height: 35px;
3364
- line-height: 35px;
3365
- width: 35px;
3366
-
3372
+ font-size: 28px;
3373
+ height: 28px;
3374
+ line-height: 28px;
3375
+ width: 28px;
3376
+
3367
3377
  & .redsift-badge-standard {
3368
3378
  position: absolute;
3369
- right: -23px;
3370
- top: 0px;
3379
+ right: -24px;
3380
+ top: -4px;
3371
3381
  }
3372
-
3382
+
3373
3383
  & .redsift-badge-dot {
3374
3384
  position: absolute;
3375
- right: -7px;
3376
- top: 4px;
3385
+ right: -14px;
3386
+ top: 2px;
3377
3387
  }
3378
3388
  `;
3379
3389
  case IconSize.small:
@@ -3382,19 +3392,38 @@ const StyledIcon = styled.span`
3382
3392
  height: 20px;
3383
3393
  line-height: 20px;
3384
3394
  width: 20px;
3385
-
3395
+
3386
3396
  & .redsift-badge-standard {
3387
3397
  position: absolute;
3388
3398
  right: -24px;
3389
3399
  top: -8px;
3390
3400
  }
3391
-
3401
+
3392
3402
  & .redsift-badge-dot {
3393
3403
  position: absolute;
3394
- right: -8px;
3404
+ right: -14px;
3395
3405
  top: 1px;
3396
3406
  }
3397
3407
  `;
3408
+ case IconSize.xsmall:
3409
+ return css`
3410
+ font-size: 16px;
3411
+ height: 16px;
3412
+ line-height: 16px;
3413
+ width: 16px;
3414
+
3415
+ & .redsift-badge-standard {
3416
+ position: absolute;
3417
+ right: -24px;
3418
+ top: -12px;
3419
+ }
3420
+
3421
+ & .redsift-badge-dot {
3422
+ position: absolute;
3423
+ right: -14px;
3424
+ top: -1px;
3425
+ }
3426
+ `;
3398
3427
  case IconSize.medium:
3399
3428
  default:
3400
3429
  return css`
@@ -3402,17 +3431,17 @@ const StyledIcon = styled.span`
3402
3431
  height: 24px;
3403
3432
  line-height: 24px;
3404
3433
  width: 24px;
3405
-
3434
+
3406
3435
  & .redsift-badge-standard {
3407
3436
  position: absolute;
3408
3437
  right: -24px;
3409
- top: -6px;
3438
+ top: -5px;
3410
3439
  }
3411
-
3440
+
3412
3441
  & .redsift-badge-dot {
3413
3442
  position: absolute;
3414
- right: -8px;
3415
- top: 2px;
3443
+ right: -14px;
3444
+ top: 1px;
3416
3445
  }
3417
3446
  `;
3418
3447
  }
@@ -3430,7 +3459,6 @@ const DEFAULT_PROPS$6 = {
3430
3459
  * The Icon component.
3431
3460
  */
3432
3461
  const Icon = /*#__PURE__*/forwardRef((props, ref) => {
3433
- const iconRef = ref || useRef();
3434
3462
  const {
3435
3463
  'aria-hidden': ariaHidden,
3436
3464
  'aria-label': ariaLabel,
@@ -3448,7 +3476,7 @@ const Icon = /*#__PURE__*/forwardRef((props, ref) => {
3448
3476
  "aria-hidden": ariaLabel ? ariaHidden ? ariaHidden : undefined : true,
3449
3477
  "aria-label": ariaLabel,
3450
3478
  className: classNames(Icon.className, className),
3451
- ref: iconRef
3479
+ ref: ref
3452
3480
  }), /*#__PURE__*/React.createElement("svg", _extends({}, svgProps, {
3453
3481
  "aria-hidden": ariaLabel ? ariaHidden ? ariaHidden : undefined : true,
3454
3482
  "aria-label": ariaLabel,
@@ -3474,139 +3502,64 @@ Icon.displayName = COMPONENT_NAME$6;
3474
3502
  * Component variant.
3475
3503
  */
3476
3504
  const ButtonVariant = {
3477
- contained: 'contained',
3478
- outlined: 'outlined',
3479
- text: 'text'
3480
- };
3481
- /**
3482
- * Component size.
3483
- */
3484
- const ButtonSize = {
3485
- large: 'large',
3486
- medium: 'medium',
3487
- small: 'small'
3505
+ primary: 'primary',
3506
+ secondary: 'secondary',
3507
+ unstyled: 'unstyled'
3488
3508
  };
3489
3509
 
3490
3510
  /**
3491
3511
  * Component style.
3492
3512
  */
3493
3513
  const StyledButton = styled.button`
3494
- display: flex;
3495
3514
  align-items: center;
3515
+ background: none;
3516
+ border: none;
3517
+ display: flex;
3518
+ font-family: var(--redsift-typography-button-font-family);
3519
+ font-size: var(--redsift-typography-button-font-size);
3520
+ font-weight: var(--redsift-typography-button-font-weight);
3496
3521
  justify-content: center;
3522
+ line-height: var(--redsift-typography-button-line-height);
3497
3523
  text-decoration: none;
3524
+ text-transform: var(--redsift-typography-button-text-transform);
3498
3525
 
3499
3526
  ${_ref => {
3500
3527
  let {
3501
3528
  $variant,
3502
3529
  $color,
3503
- $size,
3530
+ $isActive,
3504
3531
  $isDisabled
3505
3532
  } = _ref;
3506
- switch ($variant) {
3507
- case ButtonVariant.outlined:
3508
- return css`
3509
- border: 1px solid ${$isDisabled ? 'var(--redsift-color-action-disabled-background)' : `var(--redsift-color-${$color}-outlined-resting)`};
3510
- background-color: transparent;
3511
- &, .redsift-icon {
3512
- color: ${$isDisabled ? 'var(--redsift-color-action-disabled)' : `var(--redsift-color-${$color}-main)`};
3533
+ return css`
3534
+ padding: ${$variant === ButtonVariant.secondary ? '7px 15px' : '8px 16px'};
3535
+
3536
+ ${$variant === ButtonVariant.secondary ? css`
3537
+ background-color: ${$isActive ? `var(--redsift-color-${$color}-active)` : $isDisabled ? 'var(--redsift-color-neutral-white)' : 'var(--redsift-color-neutral-white)'};
3538
+ &,
3539
+ .redsift-icon {
3540
+ color: ${$isDisabled ? 'var(--redsift-color-neutral-midgrey)' : `var(--redsift-color-${$color}-primary)`};
3513
3541
  }
3514
-
3515
- padding: ${$size === ButtonSize.small ? '4px 8px' : $size === ButtonSize.medium ? '6px 16px' : '8px 24px'};
3516
- `;
3517
- case ButtonVariant.text:
3518
- return css`
3519
- border: none;
3520
- background-color: transparent;
3521
- &, .redsift-icon {
3522
- color: ${$isDisabled ? 'var(--redsift-color-action-disabled)' : `var(--redsift-color-${$color}-main)`};
3542
+ ` : $variant === ButtonVariant.unstyled ? css`
3543
+ background-color: ${$isActive ? `var(--redsift-color-${$color}-active)` : $isDisabled ? 'none' : 'none'};
3544
+ &,
3545
+ .redsift-icon {
3546
+ color: ${$isDisabled ? 'var(--redsift-color-neutral-midgrey)' : `var(--redsift-color-${$color}-primary)`};
3523
3547
  }
3524
-
3525
- padding: ${$size === ButtonSize.small ? '4px 4px' : $size === ButtonSize.medium ? '6px 8px' : '8px 8px'};
3526
- `;
3527
- case ButtonVariant.contained:
3528
- default:
3529
- return css`
3530
- border: none;
3531
- background-color: ${$isDisabled ? 'var(--redsift-color-action-disabled-background)' : `var(--redsift-color-${$color}-main)`};
3532
- &, .redsift-icon {
3533
- color: ${$isDisabled ? 'var(--redsift-color-action-disabled)' : `var(--redsift-color-${$color}-contrast)`};
3548
+ ` : css`
3549
+ background-color: ${$isActive ? `var(--redsift-color-${$color}-primary-active)` : $isDisabled ? 'var(--redsift-color-neutral-lightgrey)' : `var(--redsift-color-${$color}-primary)`};
3550
+ &,
3551
+ .redsift-icon {
3552
+ color: ${$isDisabled ? 'var(--redsift-color-neutral-midgrey)' : 'var(--redsift-color-neutral-white)'};
3534
3553
  }
3554
+ `}
3535
3555
 
3536
- padding: ${$size === ButtonSize.small ? '4px 8px' : $size === ButtonSize.medium ? '6px 16px' : '8px 24px'};
3537
- `;
3538
- }
3539
- }}
3540
-
3541
- font-family: ${_ref2 => {
3542
- let {
3543
- $size
3544
- } = _ref2;
3545
- return `var(--redsift-typography-button-${$size}-font-family)`;
3546
- }};
3547
- font-weight: ${_ref3 => {
3548
- let {
3549
- $size
3550
- } = _ref3;
3551
- return `var(--redsift-typography-button-${$size}-font-weight)`;
3552
- }};
3553
- font-size: ${_ref4 => {
3554
- let {
3555
- $size
3556
- } = _ref4;
3557
- return `var(--redsift-typography-button-${$size}-font-size)`;
3558
- }};
3559
- line-height: ${_ref5 => {
3560
- let {
3561
- $size
3562
- } = _ref5;
3563
- return `var(--redsift-typography-button-${$size}-line-height)`;
3564
- }};
3565
- text-transform: ${_ref6 => {
3566
- let {
3567
- $size
3568
- } = _ref6;
3569
- return `var(--redsift-typography-button-${$size}-text-transform)`;
3556
+ ${$variant === ButtonVariant.secondary ? css`
3557
+ border: 1px solid
3558
+ ${$isDisabled ? 'var(--redsift-color-neutral-midgrey)' : `var(--redsift-color-${$color}-primary)`};
3559
+ ` : ''}
3560
+ `;
3570
3561
  }};
3571
3562
 
3572
- .redsift-icon {
3573
- ${_ref7 => {
3574
- let {
3575
- $size
3576
- } = _ref7;
3577
- return $size === ButtonSize.large ? `
3578
- height: 24px;
3579
- width: 24px;
3580
- font-size: 24px;
3581
- line-height: 24px;
3582
- ` : '';
3583
- }}
3584
-
3585
- ${_ref8 => {
3586
- let {
3587
- $size
3588
- } = _ref8;
3589
- return $size === ButtonSize.medium ? `
3590
- height: 20px;
3591
- width: 20px;
3592
- font-size: 20px;
3593
- line-height: 20px;
3594
- ` : '';
3595
- }}
3596
-
3597
- ${_ref9 => {
3598
- let {
3599
- $size
3600
- } = _ref9;
3601
- return $size === ButtonSize.small ? `
3602
- height: 18px;
3603
- width: 18px;
3604
- font-size: 18px;
3605
- line-height: 18px;
3606
- ` : '';
3607
- }}
3608
- }
3609
-
3610
3563
  .redsift-icon.left {
3611
3564
  margin-right: 8px;
3612
3565
  }
@@ -3619,66 +3572,81 @@ const StyledButton = styled.button`
3619
3572
  &:focus-visible {
3620
3573
  outline: none;
3621
3574
 
3622
- ${_ref10 => {
3575
+ ${_ref2 => {
3623
3576
  let {
3624
- $isDisabled,
3625
3577
  $variant,
3626
- $color
3627
- } = _ref10;
3628
- return !$isDisabled ? css`
3629
- cursor: pointer;
3630
-
3631
- ${$variant === ButtonVariant.contained ? css`
3632
- background-color: var(--redsift-color-${$color}-contained-hover);
3633
- ` : ''}
3634
-
3635
- ${$variant === ButtonVariant.outlined ? css`
3636
- background-color: var(--redsift-color-${$color}-outlined-hover);
3637
- ` : ''}
3638
-
3639
- ${$variant === ButtonVariant.text ? css`
3640
- background-color: var(--redsift-color-${$color}-outlined-hover);
3641
- ` : ''}
3642
- ` : '';
3643
- }}
3578
+ $color,
3579
+ $isActive,
3580
+ $isDisabled
3581
+ } = _ref2;
3582
+ return css`
3583
+ cursor: ${$isDisabled ? 'default' : 'pointer'};
3584
+
3585
+ ${$variant === ButtonVariant.secondary ? css`
3586
+ background-color: ${$isActive ? `var(--redsift-color-${$color}-active-hover)` : $isDisabled ? 'var(--redsift-color-neutral-white)' : `var(--redsift-color-${$color}-hover)`};
3587
+ &,
3588
+ .redsift-icon {
3589
+ color: ${$isDisabled ? 'var(--redsift-color-neutral-midgrey)' : `var(--redsift-color-${$color}-secondary)`};
3590
+ }
3591
+ ` : $variant === ButtonVariant.unstyled ? css`
3592
+ background-color: ${$isActive ? `var(--redsift-color-${$color}-active-hover)` : $isDisabled ? 'none' : `var(--redsift-color-${$color}-hover)`};
3593
+ &,
3594
+ .redsift-icon {
3595
+ color: ${$isDisabled ? 'var(--redsift-color-neutral-midgrey)' : `var(--redsift-color-${$color}-secondary)`};
3596
+ }
3597
+ ` : css`
3598
+ background-color: ${$isDisabled ? 'var(--redsift-color-neutral-lightgrey)' : `var(--redsift-color-${$color}-secondary)`};
3599
+ &,
3600
+ .redsift-icon {
3601
+ color: ${$isDisabled ? 'var(--redsift-color-neutral-midgrey)' : 'var(--redsift-color-neutral-white)'};
3602
+ }
3603
+ `}
3604
+
3605
+ ${$variant === ButtonVariant.secondary ? css`
3606
+ border: 1px solid
3607
+ ${$isDisabled ? 'var(--redsift-color-neutral-midgrey)' : `var(--redsift-color-${$color}-primary)`};
3608
+ ` : `
3609
+ border: none;
3610
+ `}
3611
+ `;
3612
+ }};
3644
3613
  }
3645
3614
 
3646
- ${_ref11 => {
3615
+ ${_ref3 => {
3647
3616
  let {
3648
3617
  $fullWidth
3649
- } = _ref11;
3618
+ } = _ref3;
3650
3619
  return $fullWidth ? `
3651
- width: 100%;
3652
- flex-grow: 1;
3620
+ width: 100%;
3621
+ flex-grow: 1;
3653
3622
 
3654
- .redsift-icon.left {
3655
- margin-right: unset;
3656
- }
3623
+ .redsift-icon.left {
3624
+ margin-right: unset;
3625
+ }
3657
3626
 
3658
- .redsift-icon.right {
3659
- margin-left: unset;
3660
- }
3627
+ .redsift-icon.right {
3628
+ margin-left: unset;
3629
+ }
3661
3630
 
3662
- span {
3663
- margin-right: 8px;
3664
- margin-left: 8px;
3665
- }
3666
- ` : '';
3631
+ span {
3632
+ margin-right: 8px;
3633
+ margin-left: 8px;
3634
+ }
3635
+ ` : '';
3667
3636
  }}
3668
3637
  `;
3669
3638
 
3670
- const _excluded$5 = ["children", "className", "color", "disabled", "fullWidth", "isDisabled", "leftIcon", "onPress", "rightIcon", "size", "variant"];
3639
+ const _excluded$5 = ["children", "className", "color", "disabled", "fullWidth", "isActive", "isDisabled", "leftIcon", "onPress", "rightIcon", "variant"];
3671
3640
  const COMPONENT_NAME$5 = 'RedSiftButton';
3672
3641
  const CLASSNAME$5 = 'redsift-button';
3673
3642
  const DEFAULT_PROPS$5 = {
3674
- color: ColorPalette.primary,
3675
- size: ButtonSize.large,
3676
- variant: ButtonVariant.contained
3643
+ color: ColorPalette.default,
3644
+ variant: ButtonVariant.primary
3677
3645
  };
3678
3646
 
3679
3647
  /**
3680
3648
  * The Button is a semantic button that looks like a button.
3681
- *
3649
+ *
3682
3650
  * For a semantic link that looks like a button, please use the ButtonLink component.
3683
3651
  * For a semantic link that looks like a link, please use the Link component.
3684
3652
  * For a semantic button that looks like a link, please use the LinkButton component.
@@ -3696,20 +3664,20 @@ const Button = /*#__PURE__*/forwardRef((props, ref) => {
3696
3664
  color,
3697
3665
  disabled,
3698
3666
  fullWidth,
3667
+ isActive,
3699
3668
  isDisabled,
3700
3669
  leftIcon,
3701
3670
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
3702
3671
  onPress,
3703
3672
  rightIcon,
3704
- size,
3705
3673
  variant
3706
3674
  } = props,
3707
3675
  forwardedProps = _objectWithoutProperties(props, _excluded$5);
3708
3676
  return /*#__PURE__*/React.createElement(StyledButton, _extends({}, forwardedProps, buttonProps, {
3709
3677
  $color: color,
3710
3678
  $fullWidth: fullWidth,
3679
+ $isActive: isActive,
3711
3680
  $isDisabled: isDisabled || disabled,
3712
- $size: size,
3713
3681
  $variant: variant,
3714
3682
  "aria-disabled": isDisabled || disabled,
3715
3683
  className: classNames(Button.className, className),
@@ -3905,9 +3873,7 @@ const ChartEmptyState = /*#__PURE__*/forwardRef((props, ref) => {
3905
3873
  }, title), /*#__PURE__*/React.createElement("div", {
3906
3874
  className: `${ChartEmptyState.className}__subtitle`
3907
3875
  }, subtitle), onReset ? /*#__PURE__*/React.createElement(StyledResetButton, {
3908
- variant: "text",
3909
- size: "small",
3910
- color: "primary",
3876
+ variant: "unstyled",
3911
3877
  leftIcon: mdiRefresh,
3912
3878
  onPress: onReset
3913
3879
  }, resetLabel) : null);
@@ -4044,7 +4010,7 @@ const HorizontalBarChartTheme = ColorTheme;
4044
4010
  const StyledHorizontalBarChart = styled.div`
4045
4011
  margin: 8px;
4046
4012
  padding: 8px;
4047
- color: var(--redsift-color-text-primary);
4013
+ color: var(--redsift-color-neutral-black);
4048
4014
 
4049
4015
  .redsift-horizontal-barchart__chart {
4050
4016
  display: flex;
@@ -4070,7 +4036,7 @@ const StyledHorizontalBarChart = styled.div`
4070
4036
 
4071
4037
  rect.deselected {
4072
4038
  stroke: none;
4073
- fill: var(--redsift-color-text-disabled);
4039
+ fill: var(--redsift-color-neutral-lightgrey);
4074
4040
  }
4075
4041
  }
4076
4042
 
@@ -4081,7 +4047,7 @@ const StyledHorizontalBarChart = styled.div`
4081
4047
  }
4082
4048
  }
4083
4049
 
4084
- g.pie-slice.focused rect.deselected {
4050
+ g.row.focused rect.deselected {
4085
4051
  fill-opacity: 0.3;
4086
4052
  }
4087
4053
 
@@ -4147,7 +4113,7 @@ const StyledHorizontalBarChartContainer = styled.div`
4147
4113
  `;
4148
4114
 
4149
4115
  /**
4150
- * .
4116
+ * Hook to give to a chart the roles, events and attributes of a listbox.
4151
4117
  */
4152
4118
  const useChartAsListbox = _ref => {
4153
4119
  let {
@@ -4156,6 +4122,7 @@ const useChartAsListbox = _ref => {
4156
4122
  numberOfGroups,
4157
4123
  chartRef,
4158
4124
  chart,
4125
+ labelling,
4159
4126
  orientation = 'horizontal'
4160
4127
  } = _ref;
4161
4128
  const currentIndexRef = useRef(0);
@@ -4236,7 +4203,15 @@ const useChartAsListbox = _ref => {
4236
4203
  // Add role, aria attributes and keyboard events to the group of options.
4237
4204
  chartRef.setAttribute('tabIndex', '0');
4238
4205
  chartRef.setAttribute('role', 'listbox');
4239
- chartRef.setAttribute('aria-labelledby', `id${id}__title`);
4206
+ if (labelling.ariaLabel) {
4207
+ chartRef.setAttribute('aria-label', labelling.ariaLabel);
4208
+ } else if (labelling.ariaLabelledby) {
4209
+ chartRef.setAttribute('aria-labelledby', labelling.ariaLabelledby);
4210
+ } else if (labelling.hasTitle) {
4211
+ chartRef.setAttribute('aria-labelledby', `id${id}__title`);
4212
+ } else {
4213
+ chartRef.setAttribute('aria-label', labelling.fallbackAriaLabel);
4214
+ }
4240
4215
  chartRef.setAttribute('aria-multiselectable', 'true');
4241
4216
  chartRef.setAttribute('aria-orientation', orientation);
4242
4217
  chartRef.setAttribute('aria-activedescendant', `id${id}__option-0`);
@@ -4263,7 +4238,7 @@ const useChartAsListbox = _ref => {
4263
4238
  }, [chart]);
4264
4239
  };
4265
4240
 
4266
- const _excluded$2 = ["areXLabelsRotated", "caping", "caption", "className", "data", "datagridFilter", "dimension", "group", "isDimensionArray", "isResetable", "localeText", "onFilter", "others", "setLabels", "size", "theme", "title"];
4241
+ const _excluded$2 = ["aria-label", "aria-labelledby", "areXLabelsRotated", "caping", "caption", "className", "data", "datagridFilter", "dimension", "group", "isDimensionArray", "isResetable", "localeText", "onFilter", "others", "setLabels", "size", "theme", "title"];
4267
4242
  const COMPONENT_NAME$2 = 'RedSiftHorizontalBarChart';
4268
4243
  const CLASSNAME$2 = 'redsift-horizontal-barchart';
4269
4244
  const DEFAULT_PROPS$2 = {
@@ -4273,8 +4248,7 @@ const DEFAULT_PROPS$2 = {
4273
4248
  },
4274
4249
  others: true,
4275
4250
  size: HorizontalBarChartSize.medium,
4276
- theme: HorizontalBarChartTheme.default,
4277
- title: 'Horizontal Bar Chart'
4251
+ theme: HorizontalBarChartTheme.default
4278
4252
  };
4279
4253
  const sizeToDimension$2 = size => {
4280
4254
  switch (size) {
@@ -4304,6 +4278,8 @@ const HorizontalBarChart = /*#__PURE__*/forwardRef((props, ref) => {
4304
4278
  const [groups, setGroups] = useState();
4305
4279
  const [dimensions, setDimensions] = useState();
4306
4280
  const {
4281
+ 'aria-label': ariaLabel,
4282
+ 'aria-labelledby': ariaLabelledby,
4307
4283
  areXLabelsRotated,
4308
4284
  caping,
4309
4285
  caption,
@@ -4453,18 +4429,23 @@ const HorizontalBarChart = /*#__PURE__*/forwardRef((props, ref) => {
4453
4429
  numberOfGroups: numberOfGroups || 0,
4454
4430
  chartRef: chartRef.current,
4455
4431
  chart: chart,
4432
+ labelling: {
4433
+ ariaLabel,
4434
+ ariaLabelledby,
4435
+ hasTitle: !!title,
4436
+ fallbackAriaLabel: 'Horizontal Bar Chart'
4437
+ },
4456
4438
  orientation: 'vertical'
4457
4439
  });
4458
4440
  return /*#__PURE__*/React.createElement(StyledHorizontalBarChart, _extends({}, forwardedProps, {
4459
4441
  className: classNames(HorizontalBarChart.className, className),
4460
4442
  ref: containerRef
4461
4443
  }), /*#__PURE__*/React.createElement(StyledHorizontalBarChartTitle, {
4462
- className: `${HorizontalBarChart.className}__title`,
4444
+ className: `${HorizontalBarChart.className}__title`
4445
+ }, title ? /*#__PURE__*/React.createElement("div", {
4463
4446
  id: `id${id}__title`
4464
- }, title, chart && isResetable ? /*#__PURE__*/React.createElement(Button, {
4465
- variant: "text",
4466
- size: "small",
4467
- color: "primary",
4447
+ }, title) : null, chart && isResetable ? /*#__PURE__*/React.createElement(Button, {
4448
+ variant: "unstyled",
4468
4449
  onPress: () => {
4469
4450
  chart.filter(null);
4470
4451
  redrawAll();
@@ -7530,7 +7511,7 @@ Transform.prototype;
7530
7511
  const StyledPieChart = styled.div`
7531
7512
  margin: 8px;
7532
7513
  padding: 8px;
7533
- color: var(--redsift-color-text-primary);
7514
+ color: var(--redsift-color-neutral-black);
7534
7515
 
7535
7516
  .redsift-piechart__title {
7536
7517
  display: flex;
@@ -7572,7 +7553,7 @@ const StyledPieChart = styled.div`
7572
7553
  g.pie-slice.deselected {
7573
7554
  path {
7574
7555
  fill-opacity: 0.5;
7575
- fill: var(--redsift-color-text-disabled);
7556
+ fill: var(--redsift-color-neutral-lightgrey);
7576
7557
  }
7577
7558
  }
7578
7559
 
@@ -7621,7 +7602,7 @@ const StyledPieChartContainer = styled.div`
7621
7602
  }
7622
7603
  `;
7623
7604
 
7624
- const _excluded$1 = ["caping", "caption", "className", "data", "datagridFilter", "isResetable", "labelVariant", "dimension", "group", "isDimensionArray", "localeText", "onFilter", "others", "setLabels", "size", "text", "middleText", "subtext", "theme", "title", "variant"];
7605
+ const _excluded$1 = ["aria-label", "aria-labelledby", "caping", "caption", "className", "data", "datagridFilter", "isResetable", "labelVariant", "dimension", "group", "isDimensionArray", "localeText", "onFilter", "others", "setLabels", "size", "text", "middleText", "subtext", "theme", "title", "variant"];
7625
7606
  const COMPONENT_NAME$1 = 'RedSiftPieChart';
7626
7607
  const CLASSNAME$1 = 'redsift-piechart';
7627
7608
  const DEFAULT_PROPS$1 = {
@@ -7633,7 +7614,6 @@ const DEFAULT_PROPS$1 = {
7633
7614
  others: true,
7634
7615
  size: PieChartSize.medium,
7635
7616
  theme: PieChartTheme.default,
7636
- title: 'Pie Chart',
7637
7617
  variant: PieChartVariant.plain
7638
7618
  };
7639
7619
  const sizeToDimension$1 = size => {
@@ -7696,6 +7676,8 @@ const PieChart = /*#__PURE__*/forwardRef((props, ref) => {
7696
7676
  const [groups, setGroups] = useState();
7697
7677
  const [dimensions, setDimensions] = useState();
7698
7678
  const {
7679
+ 'aria-label': ariaLabel,
7680
+ 'aria-labelledby': ariaLabelledby,
7699
7681
  caping,
7700
7682
  caption,
7701
7683
  className,
@@ -7836,7 +7818,13 @@ const PieChart = /*#__PURE__*/forwardRef((props, ref) => {
7836
7818
  querySelector: 'g.pie-slice',
7837
7819
  numberOfGroups: numberOfGroups || 0,
7838
7820
  chartRef: chartRef.current,
7839
- chart: chart
7821
+ chart: chart,
7822
+ labelling: {
7823
+ ariaLabel,
7824
+ ariaLabelledby,
7825
+ hasTitle: !!title,
7826
+ fallbackAriaLabel: 'Pie Chart'
7827
+ }
7840
7828
  });
7841
7829
  return /*#__PURE__*/React.createElement(StyledPieChart, _extends({}, forwardedProps, {
7842
7830
  id: id,
@@ -7845,12 +7833,11 @@ const PieChart = /*#__PURE__*/forwardRef((props, ref) => {
7845
7833
  $spaced: variant === PieChartVariant.spaced || variant === PieChartVariant.spacedDonut,
7846
7834
  $showLabels: labelVariant === PieChartLabelVariant.internal
7847
7835
  }), /*#__PURE__*/React.createElement(StyledPieChartTitle, {
7848
- className: `${PieChart.className}__title`,
7836
+ className: `${PieChart.className}__title`
7837
+ }, title ? /*#__PURE__*/React.createElement("div", {
7849
7838
  id: `id${id}__title`
7850
- }, title, chart && isResetable ? /*#__PURE__*/React.createElement(Button, {
7851
- variant: "text",
7852
- size: "small",
7853
- color: "primary",
7839
+ }, title) : null, chart && isResetable ? /*#__PURE__*/React.createElement(Button, {
7840
+ variant: "unstyled",
7854
7841
  onPress: () => {
7855
7842
  chart.filter(null);
7856
7843
  redrawAll();
@@ -7924,7 +7911,7 @@ const TimeSeriesBarChartTheme = ColorTheme;
7924
7911
  const StyledTimeSeriesBarChart = styled.div`
7925
7912
  margin: 16px;
7926
7913
  padding: 16px;
7927
- color: var(--redsift-color-text-primary);
7914
+ color: var(--redsift-color-neutral-black);
7928
7915
 
7929
7916
  .redsift-timeseries-barchart__chart {
7930
7917
  display: flex;
@@ -7954,7 +7941,7 @@ const StyledTimeSeriesBarChart = styled.div`
7954
7941
 
7955
7942
  g.stack rect.bar.deselected {
7956
7943
  fill-opacity: 0.5;
7957
- fill: var(--redsift-color-text-disabled);
7944
+ fill: var(--redsift-color-neutral-midgrey);
7958
7945
  }
7959
7946
 
7960
7947
  .brush .custom-brush-handle {
@@ -7962,6 +7949,10 @@ const StyledTimeSeriesBarChart = styled.div`
7962
7949
  stroke: #666;
7963
7950
  cursor: ew-resize;
7964
7951
  }
7952
+
7953
+ text {
7954
+ user-select: none;
7955
+ }
7965
7956
  `;
7966
7957
  const StyledTimeSeriesBarChartTitle = styled.div`
7967
7958
  align-items: center;
@@ -8012,8 +8003,7 @@ const DEFAULT_PROPS = {
8012
8003
  localeText: {
8013
8004
  resetLabel: 'Reset'
8014
8005
  },
8015
- size: TimeSeriesBarChartSize.medium,
8016
- title: 'Time Series Bar Chart'
8006
+ size: TimeSeriesBarChartSize.medium
8017
8007
  };
8018
8008
  const getStartDate = dates => new Date(Math.min(...dates.map(Number)));
8019
8009
  const getEndDate = dates => new Date(Math.max(...dates.map(Number)));
@@ -8296,12 +8286,11 @@ const TimeSeriesBarChart = /*#__PURE__*/forwardRef((props, ref) => {
8296
8286
  className: classNames(TimeSeriesBarChart.className, className),
8297
8287
  ref: containerRef
8298
8288
  }), /*#__PURE__*/React.createElement(StyledTimeSeriesBarChartTitle, {
8299
- className: `${TimeSeriesBarChart.className}__title`,
8289
+ className: `${TimeSeriesBarChart.className}__title`
8290
+ }, title ? /*#__PURE__*/React.createElement("div", {
8300
8291
  id: `id${id}__title`
8301
- }, title, chart && isResetable ? /*#__PURE__*/React.createElement(Button, {
8302
- variant: "text",
8303
- size: "small",
8304
- color: "primary",
8292
+ }, title) : null, chart && isResetable ? /*#__PURE__*/React.createElement(Button, {
8293
+ variant: "unstyled",
8305
8294
  onPress: () => {
8306
8295
  chart.filter(null);
8307
8296
  redrawAll();