@thecb/components 7.7.3-beta.4 → 7.7.3-beta.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "7.7.3-beta.4",
3
+ "version": "7.7.3-beta.5",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -1,6 +1,11 @@
1
1
  import React from "react";
2
2
 
3
- const WarningIconXS = () => (
3
+ const WarningIconXS = ({
4
+ color = "#B34A00",
5
+ title,
6
+ titleID = "warning-icon-title",
7
+ iconIndex = 0
8
+ }) => (
4
9
  <svg
5
10
  width="16px"
6
11
  height="13px"
@@ -8,47 +13,45 @@ const WarningIconXS = () => (
8
13
  version="1.1"
9
14
  xmlns="http://www.w3.org/2000/svg"
10
15
  xmlnsXlink="http://www.w3.org/1999/xlink"
11
- aria-labelledby="#warning-restricted-item"
16
+ aria-labelledby={title && `#${titleID}-${iconIndex}`}
12
17
  role="img"
13
18
  >
14
- <title id="warning-restricted-item">
15
- Warning: restricted items cannot be selected
16
- </title>
19
+ {title && <title id={`${titleID}-${iconIndex}`}>{title}</title>}
17
20
  <defs>
18
21
  <path
19
22
  d="M11.0106463,4.4659633 C11.3063934,4.63914978 11.5526739,4.88543032 11.7258604,5.18117739 L16.7999622,13.846119 C17.3581267,14.7992854 17.0379144,16.0244612 16.0847481,16.5826257 C15.7781918,16.762142 15.4293522,16.8567653 15.0741018,16.8567653 L4.92589823,16.8567653 C3.82132873,16.8567653 2.92589823,15.9613348 2.92589823,14.8567653 C2.92589823,14.5015149 3.02052159,14.1526753 3.20003784,13.846119 L8.27413962,5.18117739 C8.83230416,4.22801102 10.0574799,3.90779877 11.0106463,4.4659633 Z M10.6666667,13.3333333 L9.33333333,13.3333333 L9.33333333,14.6666667 L10.6666667,14.6666667 L10.6666667,13.3333333 Z M10.6666667,6.66666667 L9.33333333,6.66666667 L9.33333333,12 L10.6666667,12 L10.6666667,6.66666667 Z"
20
- id="WarningIconXs-path-1"
23
+ id={`WarningIconXs-path-1-${iconIndex}`}
21
24
  ></path>
22
25
  </defs>
23
26
  <g
24
- id="WarningIconXs-SRV-2647---Workflow-$0-Balance"
27
+ id={`WarningIconXs-Group-1-${iconIndex}`}
25
28
  stroke="none"
26
29
  strokeWidth="1"
27
30
  fill="none"
28
31
  fillRule="evenodd"
29
32
  >
30
33
  <g
31
- id="WarningIconXs-11---Search-Results----Checked--Copy-6"
34
+ id={`WarningIconXs-Group-2-${iconIndex}`}
32
35
  transform="translate(-135.000000, -483.000000)"
33
36
  >
34
37
  <g
35
- id="WarningIconXs-Group"
38
+ id={`WarningIconXs-Group-3-${iconIndex}`}
36
39
  transform="translate(133.000000, 479.000000)"
37
40
  >
38
- <mask id="WarningIconXs-mask-2" fill="white">
39
- <use xlinkHref="#WarningIconXs-path-1"></use>
41
+ <mask id={`WarningIconXs-mask-2-${iconIndex}`} fill="white">
42
+ <use xlinkHref={`#WarningIconXs-path-1-${iconIndex}`}></use>
40
43
  </mask>
41
44
  <use
42
- id="WarningIconXs-Mask"
43
- fill="#B34A00"
45
+ id={`WarningIconXs-Mask-${iconIndex}`}
46
+ fill={color}
44
47
  fillRule="nonzero"
45
- xlinkHref="#WarningIconXs-path-1"
48
+ xlinkHref={`#WarningIconXs-path-1-${iconIndex}`}
46
49
  ></use>
47
50
  <polygon
48
- id="WarningIconXs-Path"
49
- fill="#B34A00"
51
+ id={`WarningIconXs-Path-${iconIndex}`}
52
+ fill={color}
50
53
  fillRule="nonzero"
51
- mask="url(#WarningIconXs-mask-2)"
54
+ mask={`url(#WarningIconXs-mask-2-${iconIndex})`}
52
55
  points="-2.84217094e-14 -4.26325641e-14 20 -4.26325641e-14 20 20 -2.84217094e-14 20"
53
56
  ></polygon>
54
57
  </g>