@thecb/components 12.0.4 → 12.0.6-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "12.0.4",
3
+ "version": "12.0.6-beta.0",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -2,7 +2,10 @@ import React from "react";
2
2
  import { fallbackValues } from "./Icons.theme";
3
3
  import { themeComponent } from "../../../util/themeUtils";
4
4
 
5
- const AccountsIconSmall = ({ themeValues }) => {
5
+ // When ariaHidden is true, aria-hidden="true" is added to the SVG, which tells
6
+ // screen readers to skip this element. Use this when the icon is purely decorative
7
+ // and adjacent text already conveys its meaning (e.g. an icon inside a labeled nav link).
8
+ const AccountsIconSmall = ({ themeValues, ariaHidden = true }) => {
6
9
  return (
7
10
  <svg
8
11
  width="22px"
@@ -12,6 +15,7 @@ const AccountsIconSmall = ({ themeValues }) => {
12
15
  xmlns="http://www.w3.org/2000/svg"
13
16
  xmlnsXlink="http://www.w3.org/1999/xlink"
14
17
  style={{ display: "inline-block", verticalAlign: "text-bottom" }}
18
+ aria-hidden={ariaHidden ? "true" : undefined}
15
19
  >
16
20
  <defs>
17
21
  <rect
@@ -2,7 +2,10 @@ import React from "react";
2
2
  import { fallbackValues } from "./Icons.theme";
3
3
  import { themeComponent } from "../../../util/themeUtils";
4
4
 
5
- const FindIconSmall = ({ themeValues, iconIndex = 0 }) => {
5
+ // When ariaHidden is true, aria-hidden="true" is added to the SVG, which tells
6
+ // screen readers to skip this element. Use this when the icon is purely decorative
7
+ // and adjacent text already conveys its meaning (e.g. an icon inside a labeled nav link).
8
+ const FindIconSmall = ({ themeValues, iconIndex = 0, ariaHidden = true }) => {
6
9
  const maskId = `find-icon-mask-${iconIndex}`;
7
10
  return (
8
11
  <svg
@@ -11,6 +14,7 @@ const FindIconSmall = ({ themeValues, iconIndex = 0 }) => {
11
14
  viewBox="0 0 20 20"
12
15
  fill="none"
13
16
  xmlns="http://www.w3.org/2000/svg"
17
+ aria-hidden={ariaHidden ? "true" : undefined}
14
18
  >
15
19
  <path
16
20
  fillRule="evenodd"
@@ -2,7 +2,10 @@ import React from "react";
2
2
  import { fallbackValues } from "./Icons.theme";
3
3
  import { themeComponent } from "../../../util/themeUtils";
4
4
 
5
- const HistoryIconSmall = ({ themeValues }) => {
5
+ // When ariaHidden is true, aria-hidden="true" is added to the SVG, which tells
6
+ // screen readers to skip this element. Use this when the icon is purely decorative
7
+ // and adjacent text already conveys its meaning (e.g. an icon inside a labeled nav link).
8
+ const HistoryIconSmall = ({ themeValues, ariaHidden = true }) => {
6
9
  return (
7
10
  <svg
8
11
  width="20"
@@ -10,6 +13,7 @@ const HistoryIconSmall = ({ themeValues }) => {
10
13
  viewBox="0 0 20 20"
11
14
  fill="none"
12
15
  xmlns="http://www.w3.org/2000/svg"
16
+ aria-hidden={ariaHidden ? "true" : undefined}
13
17
  >
14
18
  <path
15
19
  d="M3.33337 8.33333C3.33337 7.8731 3.70647 7.5 4.16671 7.5H15.8334C16.2936 7.5 16.6667 7.8731 16.6667 8.33333V16.6667C16.6667 17.1269 16.2936 17.5 15.8334 17.5H4.16671C3.70647 17.5 3.33337 17.1269 3.33337 16.6667V8.33333Z"
@@ -2,7 +2,10 @@ import React from "react";
2
2
  import { fallbackValues } from "./Icons.theme";
3
3
  import { themeComponent } from "../../../util/themeUtils";
4
4
 
5
- const PropertiesIconSmall = ({ themeValues }) => {
5
+ // When ariaHidden is true, aria-hidden="true" is added to the SVG, which tells
6
+ // screen readers to skip this element. Use this when the icon is purely decorative
7
+ // and adjacent text already conveys its meaning (e.g. an icon inside a labeled nav link).
8
+ const PropertiesIconSmall = ({ themeValues, ariaHidden = true }) => {
6
9
  return (
7
10
  <svg
8
11
  xmlns="http://www.w3.org/2000/svg"
@@ -12,6 +15,7 @@ const PropertiesIconSmall = ({ themeValues }) => {
12
15
  version="1.1"
13
16
  xmlnsXlink="http://www.w3.org/1999/xlink"
14
17
  style={{ display: "inline-block", verticalAlign: "text-bottom" }}
18
+ aria-hidden={ariaHidden ? "true" : undefined}
15
19
  >
16
20
  <g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1">
17
21
  <path
@@ -2,7 +2,10 @@ import React from "react";
2
2
  import { fallbackValues } from "./Icons.theme";
3
3
  import { themeComponent } from "../../../util/themeUtils";
4
4
 
5
- const SettingsIconSmall = ({ themeValues }) => {
5
+ // When ariaHidden is true, aria-hidden="true" is added to the SVG, which tells
6
+ // screen readers to skip this element. Use this when the icon is purely decorative
7
+ // and adjacent text already conveys its meaning (e.g. an icon inside a labeled nav link).
8
+ const SettingsIconSmall = ({ themeValues, ariaHidden = true }) => {
6
9
  return (
7
10
  <svg
8
11
  width="22px"
@@ -12,6 +15,7 @@ const SettingsIconSmall = ({ themeValues }) => {
12
15
  xmlns="http://www.w3.org/2000/svg"
13
16
  xmlnsXlink="http://www.w3.org/1999/xlink"
14
17
  style={{ display: "inline-block", verticalAlign: "text-bottom" }}
18
+ aria-hidden={ariaHidden ? "true" : undefined}
15
19
  >
16
20
  <defs>
17
21
  <rect
@@ -2,7 +2,15 @@ import React from "react";
2
2
  import { fallbackValues } from "./Icons.theme";
3
3
  import { themeComponent } from "../../../util/themeUtils";
4
4
 
5
- const WalletIconSmall = ({ themeValues, iconIndex = 0, colorOverride }) => {
5
+ // When ariaHidden is true, aria-hidden="true" is added to the SVG, which tells
6
+ // screen readers to skip this element. Use this when the icon is purely decorative
7
+ // and adjacent text already conveys its meaning (e.g. an icon inside a labeled nav link).
8
+ const WalletIconSmall = ({
9
+ themeValues,
10
+ iconIndex = 0,
11
+ colorOverride,
12
+ ariaHidden = true
13
+ }) => {
6
14
  return (
7
15
  <svg
8
16
  width="20"
@@ -10,6 +18,7 @@ const WalletIconSmall = ({ themeValues, iconIndex = 0, colorOverride }) => {
10
18
  viewBox="0 0 20 20"
11
19
  fill="none"
12
20
  xmlns="http://www.w3.org/2000/svg"
21
+ aria-hidden={ariaHidden ? "true" : undefined}
13
22
  >
14
23
  <path
15
24
  fillRule="evenodd"