@utahdts/utah-design-system 4.2.1 → 5.0.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/css/1-settings/_color-swatches.scss +74 -0
- package/css/1-settings/_font-stuff.scss +52 -2
- package/css/1-settings/_settings-index.scss +91 -12
- package/css/6-components/base-components/containers/_drawer.scss +1 -1
- package/css/6-components/base-components/containers/_tab-group.scss +3 -0
- package/css/6-components/base-components/footer/_utah-footer.scss +4 -1
- package/css/6-components/base-components/forms/_switch.scss +1 -1
- package/css/6-components/base-components/forms/_text-input.scss +1 -0
- package/css/6-components/base-components/navigation/_main-menu.scss +4 -1
- package/css/6-components/base-components/popups/_search-modal.scss +8 -0
- package/css/6-components/base-components/widgetsIndicators/_badge.scss +2 -2
- package/css/6-components/project-components/_swatch-list.scss +5 -2
- package/css/6-components/utah-header/_badge.scss +2 -2
- package/css/6-components/utah-header/_logos.scss +9 -6
- package/css/6-components/utah-header/_mobile-menu.scss +3 -3
- package/css/6-components/utah-header/_notifications.scss +200 -0
- package/css/6-components/utah-header/_official-banner.scss +78 -0
- package/css/6-components/utah-header/_official-website-popup.scss +3 -2
- package/css/6-components/utah-header/_utah-header-wrapper.scss +12 -1
- package/css/6-components/utah-header/index.scss +2 -0
- package/dist/style.css +410 -38
- package/dist/utah-design-system.es.js +7450 -7220
- package/dist/utah-design-system.umd.js +7732 -7328
- package/package.json +15 -15
- package/react/components/containers/accordion/Accordion.jsx +1 -0
- package/react/components/containers/tabs/TabPanel.jsx +1 -0
- package/react/components/forms/MultiSelect/MultiSelectComboBox.jsx +0 -1
- package/react/components/navigation/pagination/Pagination.jsx +27 -23
- package/react/components/popups/Popup.jsx +1 -0
- package/react/components/table/TableWrapper.jsx +15 -1
- package/react/components/table/useCurrentValuesFromStateContext.js +1 -1
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": "
|
|
5
|
+
"version": "5.0.0",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"development-local": "./index.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"utah",
|
|
59
59
|
"components"
|
|
60
60
|
],
|
|
61
|
-
"author": "DTS Digital Experience <
|
|
61
|
+
"author": "DTS Digital Experience <dxp@utah.gov>",
|
|
62
62
|
"license": "Apache 2.0",
|
|
63
63
|
"bugs": {
|
|
64
64
|
"url": "https://github.com/utahdts/utah-design-system/issues"
|
|
@@ -68,26 +68,26 @@
|
|
|
68
68
|
"react": "^18.0.0 || ^19.0.0"
|
|
69
69
|
},
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@floating-ui/react-dom": "2.1.
|
|
72
|
-
"@utahdts/utah-design-system-header": "
|
|
71
|
+
"@floating-ui/react-dom": "^2.1.8",
|
|
72
|
+
"@utahdts/utah-design-system-header": "5.0.0",
|
|
73
73
|
"date-fns": "4.1.0",
|
|
74
|
-
"immer": "
|
|
75
|
-
"lodash-es": "4.17.
|
|
74
|
+
"immer": "11.1.4",
|
|
75
|
+
"lodash-es": "4.17.23",
|
|
76
76
|
"use-immer": "0.11.0",
|
|
77
77
|
"uuid": "13.0.0"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@types/lodash-es": "4.17.12",
|
|
81
|
-
"@types/react": "^19.2.
|
|
82
|
-
"@vitejs/plugin-react": "
|
|
83
|
-
"@vitest/coverage-istanbul": "4.
|
|
84
|
-
"@vitest/ui": "4.
|
|
85
|
-
"jsdom": "
|
|
81
|
+
"@types/react": "^19.2.13",
|
|
82
|
+
"@vitejs/plugin-react": "^6.0.1",
|
|
83
|
+
"@vitest/coverage-istanbul": "^4.1.2",
|
|
84
|
+
"@vitest/ui": "^4.1.2",
|
|
85
|
+
"jsdom": "^29.0.1",
|
|
86
86
|
"prop-types": "15.8.1",
|
|
87
|
-
"sass": "1.
|
|
88
|
-
"typescript": "
|
|
89
|
-
"vite": "
|
|
90
|
-
"vitest": "4.
|
|
87
|
+
"sass": "^1.98.0",
|
|
88
|
+
"typescript": "^6.0.2",
|
|
89
|
+
"vite": "^8.0.3",
|
|
90
|
+
"vitest": "^4.1.2"
|
|
91
91
|
},
|
|
92
92
|
"type": "module"
|
|
93
93
|
}
|
|
@@ -59,6 +59,7 @@ export function Accordion({
|
|
|
59
59
|
<div
|
|
60
60
|
aria-hidden={!stateIsOpen}
|
|
61
61
|
aria-labelledby={`accordion-button__${id}`}
|
|
62
|
+
inert={!stateIsOpen}
|
|
62
63
|
className={joinClassNames(['accordion__content', contentClassName, stateIsOpen ? 'accordion__content--open' : ''])}
|
|
63
64
|
id={`accordion-content__${id}`}
|
|
64
65
|
role="region"
|
|
@@ -202,7 +202,6 @@ export function MultiSelectComboBox({
|
|
|
202
202
|
</ComboBox>
|
|
203
203
|
<MultiSelectClearIcon isClearable={isClearable} isDisabled={isDisabled} />
|
|
204
204
|
<IconButton
|
|
205
|
-
aria-hidden="true"
|
|
206
205
|
className={joinClassNames(
|
|
207
206
|
'multi-select__chevron',
|
|
208
207
|
'icon-button--borderless',
|
|
@@ -84,26 +84,28 @@ export function Pagination({
|
|
|
84
84
|
// eslint-disable-next-line react/jsx-props-no-spreading
|
|
85
85
|
<WrapInElement ref={innerRef} className={joinClassNames('pagination', className)} id={id} aria-label={ariaLabel} {...rest}>
|
|
86
86
|
<ul>
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
87
|
+
<li>
|
|
88
|
+
<IconButton
|
|
89
|
+
appearance={ICON_BUTTON_APPEARANCE.BORDERLESS}
|
|
90
|
+
className="pagination__prev"
|
|
91
|
+
icon={<span className="utds-icon-before-arrow-left" aria-hidden="true" />}
|
|
92
|
+
isDisabled={currentPageIndex === 0}
|
|
93
|
+
onClick={useCallback(() => currentOnChange(currentPageIndexRef.current - 1), [currentOnChange, currentPageIndexRef])}
|
|
94
|
+
title="Previous page"
|
|
95
|
+
/>
|
|
96
|
+
</li>
|
|
95
97
|
|
|
96
98
|
{
|
|
97
99
|
paginationLinks.map((paginationLink, paginationLinkIndex) => (
|
|
98
100
|
paginationLink.isEllipsis
|
|
99
101
|
? (
|
|
100
|
-
<
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
</
|
|
102
|
+
<li key={`pagination-link__ellipsis__${paginationLinkIndex}`}>
|
|
103
|
+
<span
|
|
104
|
+
className="pagination__ellipsis"
|
|
105
|
+
>
|
|
106
|
+
<span className="utds-icon-before-more-horizontal" aria-hidden="true" />
|
|
107
|
+
</span>
|
|
108
|
+
</li>
|
|
107
109
|
)
|
|
108
110
|
: (
|
|
109
111
|
<PaginationLink
|
|
@@ -118,14 +120,16 @@ export function Pagination({
|
|
|
118
120
|
))
|
|
119
121
|
}
|
|
120
122
|
|
|
121
|
-
<
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
123
|
+
<li>
|
|
124
|
+
<IconButton
|
|
125
|
+
appearance={ICON_BUTTON_APPEARANCE.BORDERLESS}
|
|
126
|
+
className="pagination__next"
|
|
127
|
+
icon={<span className="utds-icon-before-arrow-right" aria-hidden="true" />}
|
|
128
|
+
isDisabled={currentPageIndex === numberOfPages - 1}
|
|
129
|
+
onClick={useCallback(() => currentOnChange(currentPageIndexRef.current + 1), [currentOnChange, currentPageIndexRef])}
|
|
130
|
+
title="Next page"
|
|
131
|
+
/>
|
|
132
|
+
</li>
|
|
129
133
|
</ul>
|
|
130
134
|
</WrapInElement>
|
|
131
135
|
);
|
|
@@ -57,6 +57,8 @@ function sortByFieldType(sortingRule, fieldValueA, fieldValueB) {
|
|
|
57
57
|
/**
|
|
58
58
|
* @template TableDataT extends TableDataT & { [x: string]: any; }
|
|
59
59
|
* @param {object} props
|
|
60
|
+
* @param {boolean} [props.allowScrollOverflow]
|
|
61
|
+
* @param {string} [props.ariaLabelledBy]
|
|
60
62
|
* @param {import('react').ReactNode} props.children
|
|
61
63
|
* @param {string} [props.className]
|
|
62
64
|
* @param {import('react').RefObject<HTMLDivElement>} [props.innerRef]
|
|
@@ -64,12 +66,17 @@ function sortByFieldType(sortingRule, fieldValueA, fieldValueB) {
|
|
|
64
66
|
* @returns {import('react').JSX.Element}
|
|
65
67
|
*/
|
|
66
68
|
export function TableWrapper({
|
|
69
|
+
allowScrollOverflow,
|
|
70
|
+
ariaLabelledBy,
|
|
67
71
|
children,
|
|
68
72
|
className,
|
|
69
73
|
id,
|
|
70
74
|
innerRef,
|
|
71
75
|
...rest
|
|
72
76
|
}) {
|
|
77
|
+
if (allowScrollOverflow && !ariaLabelledBy) {
|
|
78
|
+
console.warn(`allowScrollOverflow: TableWrapper is missing a valid ariaLabelledBy attribute`);
|
|
79
|
+
}
|
|
73
80
|
const internalId = useId();
|
|
74
81
|
/** @type {[TableContextState<TableDataT>, import('use-immer').Updater<import('@utahdts/utah-design-system').TableContextState<TableDataT>>]} */
|
|
75
82
|
const [state, setState] = useImmer(
|
|
@@ -212,7 +219,14 @@ export function TableWrapper({
|
|
|
212
219
|
|
|
213
220
|
return (
|
|
214
221
|
<TableContext.Provider value={contextValue}>
|
|
215
|
-
<div
|
|
222
|
+
<div
|
|
223
|
+
aria-labelledby={ariaLabelledBy}
|
|
224
|
+
className={joinClassNames('table__wrapper', className)}
|
|
225
|
+
id={id} ref={innerRef}
|
|
226
|
+
tabIndex={allowScrollOverflow ? 0 : undefined}
|
|
227
|
+
role={allowScrollOverflow ? 'region' : undefined}
|
|
228
|
+
{...rest}
|
|
229
|
+
>
|
|
216
230
|
{children}
|
|
217
231
|
</div>
|
|
218
232
|
</TableContext.Provider>
|
|
@@ -100,6 +100,7 @@ export function useCurrentValuesFromStateContext({
|
|
|
100
100
|
currentValue = defaultValueRef.current;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
// @ts-expect-error I dont know how to fix this Austin
|
|
103
104
|
return useMemo(
|
|
104
105
|
() => ({
|
|
105
106
|
currentOnChange: (
|
|
@@ -126,7 +127,6 @@ export function useCurrentValuesFromStateContext({
|
|
|
126
127
|
setStateLocal(defaultOnChange(e));
|
|
127
128
|
})
|
|
128
129
|
),
|
|
129
|
-
// @ts-expect-error hacked for missing currentValue that shouldn't be?
|
|
130
130
|
currentValue: currentValue ?? '',
|
|
131
131
|
setValue,
|
|
132
132
|
}),
|