@utahdts/utah-design-system 1.15.0 → 1.15.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.
|
@@ -31,7 +31,7 @@ import { useLocation, NavLink } from "react-router-dom";
|
|
|
31
31
|
const name = "@utahdts/utah-design-system";
|
|
32
32
|
const description = "Utah Design System React Library";
|
|
33
33
|
const displayName = "Utah Design System React Library";
|
|
34
|
-
const version$1 = "1.15.
|
|
34
|
+
const version$1 = "1.15.1";
|
|
35
35
|
const exports = {
|
|
36
36
|
".": {
|
|
37
37
|
"development-local": "./index.js",
|
|
@@ -94,7 +94,7 @@ const bugs = {
|
|
|
94
94
|
};
|
|
95
95
|
const homepage = "https://github.com/utahdts/utah-design-system";
|
|
96
96
|
const dependencies = {
|
|
97
|
-
"@utahdts/utah-design-system-header": "1.15.
|
|
97
|
+
"@utahdts/utah-design-system-header": "1.15.1",
|
|
98
98
|
"date-fns": "3.2.0",
|
|
99
99
|
lodash: "4.17.21",
|
|
100
100
|
"prop-types": "15.8.1",
|
|
@@ -46940,7 +46940,7 @@ const ariaLiveTypes = {
|
|
|
46940
46940
|
function setupDefaultLists(numberOfLists) {
|
|
46941
46941
|
return Array.from({ length: numberOfLists }).map(() => []);
|
|
46942
46942
|
}
|
|
46943
|
-
const NUMBER_REGIONS =
|
|
46943
|
+
const NUMBER_REGIONS = 30;
|
|
46944
46944
|
function AriaLiveMessages({ ariaLiveType, messages }) {
|
|
46945
46945
|
const messagesLists = useMemo(
|
|
46946
46946
|
() => (
|
|
@@ -46959,12 +46959,23 @@ function AriaLiveMessages({ ariaLiveType, messages }) {
|
|
|
46959
46959
|
),
|
|
46960
46960
|
[messages]
|
|
46961
46961
|
);
|
|
46962
|
-
|
|
46962
|
+
let role;
|
|
46963
|
+
switch (ariaLiveType) {
|
|
46964
|
+
case ariaLiveTypes.ASSERTIVE:
|
|
46965
|
+
role = "alert";
|
|
46966
|
+
break;
|
|
46967
|
+
case ariaLiveTypes.POLITE:
|
|
46968
|
+
role = "log";
|
|
46969
|
+
break;
|
|
46970
|
+
default:
|
|
46971
|
+
throw new Error(`AriaLiveMessages: Unknown ariaLiveType (${ariaLiveType})`);
|
|
46972
|
+
}
|
|
46973
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "aria-live-regions visually-hidden utah-design-system", children: messagesLists.map((messagesList) => messagesList[messagesList.length - 1]).map((messagesListMessage, i2) => messagesListMessage ? (
|
|
46963
46974
|
// eslint-disable-next-line react/no-array-index-key
|
|
46964
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-live": ariaLiveType, role
|
|
46975
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-live": ariaLiveType, role, children: messagesListMessage.message }, `${ariaLiveType}-messages-${i2}`)
|
|
46965
46976
|
) : (
|
|
46966
46977
|
// eslint-disable-next-line react/no-array-index-key
|
|
46967
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-live": ariaLiveType, role
|
|
46978
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-live": ariaLiveType, role }, `${ariaLiveType}-messages-${i2}`)
|
|
46968
46979
|
)) }, `aria-live-region-${ariaLiveType}`);
|
|
46969
46980
|
}
|
|
46970
46981
|
function useBanner() {
|
|
@@ -47,7 +47,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
47
47
|
const name = "@utahdts/utah-design-system";
|
|
48
48
|
const description = "Utah Design System React Library";
|
|
49
49
|
const displayName = "Utah Design System React Library";
|
|
50
|
-
const version$1 = "1.15.
|
|
50
|
+
const version$1 = "1.15.1";
|
|
51
51
|
const exports$1 = {
|
|
52
52
|
".": {
|
|
53
53
|
"development-local": "./index.js",
|
|
@@ -110,7 +110,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
110
110
|
};
|
|
111
111
|
const homepage = "https://github.com/utahdts/utah-design-system";
|
|
112
112
|
const dependencies = {
|
|
113
|
-
"@utahdts/utah-design-system-header": "1.15.
|
|
113
|
+
"@utahdts/utah-design-system-header": "1.15.1",
|
|
114
114
|
"date-fns": "3.2.0",
|
|
115
115
|
lodash: "4.17.21",
|
|
116
116
|
"prop-types": "15.8.1",
|
|
@@ -46956,7 +46956,7 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
46956
46956
|
function setupDefaultLists(numberOfLists) {
|
|
46957
46957
|
return Array.from({ length: numberOfLists }).map(() => []);
|
|
46958
46958
|
}
|
|
46959
|
-
const NUMBER_REGIONS =
|
|
46959
|
+
const NUMBER_REGIONS = 30;
|
|
46960
46960
|
function AriaLiveMessages({ ariaLiveType, messages }) {
|
|
46961
46961
|
const messagesLists = React.useMemo(
|
|
46962
46962
|
() => (
|
|
@@ -46975,12 +46975,23 @@ var __privateSet = (obj, member, value, setter) => {
|
|
|
46975
46975
|
),
|
|
46976
46976
|
[messages]
|
|
46977
46977
|
);
|
|
46978
|
-
|
|
46978
|
+
let role;
|
|
46979
|
+
switch (ariaLiveType) {
|
|
46980
|
+
case ariaLiveTypes.ASSERTIVE:
|
|
46981
|
+
role = "alert";
|
|
46982
|
+
break;
|
|
46983
|
+
case ariaLiveTypes.POLITE:
|
|
46984
|
+
role = "log";
|
|
46985
|
+
break;
|
|
46986
|
+
default:
|
|
46987
|
+
throw new Error(`AriaLiveMessages: Unknown ariaLiveType (${ariaLiveType})`);
|
|
46988
|
+
}
|
|
46989
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "aria-live-regions visually-hidden utah-design-system", children: messagesLists.map((messagesList) => messagesList[messagesList.length - 1]).map((messagesListMessage, i2) => messagesListMessage ? (
|
|
46979
46990
|
// eslint-disable-next-line react/no-array-index-key
|
|
46980
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-live": ariaLiveType, role
|
|
46991
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-live": ariaLiveType, role, children: messagesListMessage.message }, `${ariaLiveType}-messages-${i2}`)
|
|
46981
46992
|
) : (
|
|
46982
46993
|
// eslint-disable-next-line react/no-array-index-key
|
|
46983
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-live": ariaLiveType, role
|
|
46994
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { "aria-live": ariaLiveType, role }, `${ariaLiveType}-messages-${i2}`)
|
|
46984
46995
|
)) }, `aria-live-region-${ariaLiveType}`);
|
|
46985
46996
|
}
|
|
46986
46997
|
function useBanner() {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@utahdts/utah-design-system",
|
|
3
3
|
"description": "Utah Design System React Library",
|
|
4
4
|
"displayName": "Utah Design System React Library",
|
|
5
|
-
"version": "1.15.
|
|
5
|
+
"version": "1.15.1",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"development-local": "./index.js",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
},
|
|
66
66
|
"homepage": "https://github.com/utahdts/utah-design-system",
|
|
67
67
|
"dependencies": {
|
|
68
|
-
"@utahdts/utah-design-system-header": "1.15.
|
|
68
|
+
"@utahdts/utah-design-system-header": "1.15.1",
|
|
69
69
|
"date-fns": "3.2.0",
|
|
70
70
|
"lodash": "4.17.21",
|
|
71
71
|
"prop-types": "15.8.1",
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
|
+
import { ariaLiveTypes } from '../../../enums/ariaLiveTypes';
|
|
2
3
|
|
|
3
4
|
/** @typedef {import('@utahdts/utah-design-system').AriaLiveType} AriaLiveType */
|
|
4
5
|
|
|
@@ -17,7 +18,7 @@ function setupDefaultLists(numberOfLists) {
|
|
|
17
18
|
return Array.from({ length: numberOfLists }).map(() => []);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
const NUMBER_REGIONS =
|
|
21
|
+
const NUMBER_REGIONS = 30;
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* @param {object} props
|
|
@@ -44,8 +45,17 @@ export function AriaLiveMessages({ ariaLiveType, messages }) {
|
|
|
44
45
|
[messages]
|
|
45
46
|
);
|
|
46
47
|
|
|
48
|
+
/** @type {'alert' | 'log'} */
|
|
49
|
+
let role;
|
|
50
|
+
switch (ariaLiveType) {
|
|
51
|
+
case ariaLiveTypes.ASSERTIVE: role = 'alert'; break;
|
|
52
|
+
case ariaLiveTypes.POLITE: role = 'log'; break;
|
|
53
|
+
default:
|
|
54
|
+
throw new Error(`AriaLiveMessages: Unknown ariaLiveType (${ariaLiveType})`);
|
|
55
|
+
}
|
|
56
|
+
|
|
47
57
|
return (
|
|
48
|
-
<div className="aria-live-regions visually-hidden" key={`aria-live-region-${ariaLiveType}`}>
|
|
58
|
+
<div className="aria-live-regions visually-hidden utah-design-system" key={`aria-live-region-${ariaLiveType}`}>
|
|
49
59
|
{
|
|
50
60
|
messagesLists
|
|
51
61
|
// pull the last message off each list queue
|
|
@@ -56,13 +66,13 @@ export function AriaLiveMessages({ ariaLiveType, messages }) {
|
|
|
56
66
|
messagesListMessage
|
|
57
67
|
? (
|
|
58
68
|
// eslint-disable-next-line react/no-array-index-key
|
|
59
|
-
<div aria-live={ariaLiveType} key={`${ariaLiveType}-messages-${i}`} role=
|
|
69
|
+
<div aria-live={ariaLiveType} key={`${ariaLiveType}-messages-${i}`} role={role}>
|
|
60
70
|
{messagesListMessage.message}
|
|
61
71
|
</div>
|
|
62
72
|
)
|
|
63
73
|
: (
|
|
64
74
|
// eslint-disable-next-line react/no-array-index-key
|
|
65
|
-
<div aria-live={ariaLiveType} key={`${ariaLiveType}-messages-${i}`} role=
|
|
75
|
+
<div aria-live={ariaLiveType} key={`${ariaLiveType}-messages-${i}`} role={role} />
|
|
66
76
|
)
|
|
67
77
|
))
|
|
68
78
|
}
|