@iabbb/bds-react 0.65.0 → 0.66.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/WarningSummary/WarningSunmmary.d.ts +29 -0
- package/WarningSummary/index.cjs +315 -0
- package/WarningSummary/index.cjs.map +1 -0
- package/WarningSummary/index.d.ts +2 -0
- package/WarningSummary/index.mjs +292 -0
- package/WarningSummary/index.mjs.map +1 -0
- package/WarningSummary/package.json +7 -0
- package/WarningSummary/utils.d.ts +2 -0
- package/index.cjs +244 -18
- package/index.cjs.map +1 -1
- package/index.d.ts +1 -0
- package/index.mjs +244 -19
- package/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare global {
|
|
3
|
+
namespace JSX {
|
|
4
|
+
interface IntrinsicElements {
|
|
5
|
+
'bds-warning-summary': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export type WarningSummaryProps = {
|
|
10
|
+
warnings: {
|
|
11
|
+
field: string;
|
|
12
|
+
message: string;
|
|
13
|
+
items?: {
|
|
14
|
+
label: string;
|
|
15
|
+
value?: string;
|
|
16
|
+
}[];
|
|
17
|
+
}[];
|
|
18
|
+
mapNameToId?: (name: string) => string;
|
|
19
|
+
acknowledgement?: {
|
|
20
|
+
checked: boolean;
|
|
21
|
+
onChange: (checked: boolean) => void;
|
|
22
|
+
label?: string;
|
|
23
|
+
helpText?: string;
|
|
24
|
+
clarifyText?: string;
|
|
25
|
+
clarifyLink?: string;
|
|
26
|
+
error?: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
export default function BdsWarningSummary({ warnings, mapNameToId, acknowledgement, ...props }: WarningSummaryProps & React.ComponentPropsWithoutRef<'div'>): React.JSX.Element | null;
|
|
@@ -0,0 +1,315 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
function _interopNamespaceDefault(e) {
|
|
8
|
+
var n = Object.create(null);
|
|
9
|
+
if (e) {
|
|
10
|
+
Object.keys(e).forEach(function (k) {
|
|
11
|
+
if (k !== 'default') {
|
|
12
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
13
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
14
|
+
enumerable: true,
|
|
15
|
+
get: function () { return e[k]; }
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
n.default = e;
|
|
21
|
+
return Object.freeze(n);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
25
|
+
|
|
26
|
+
function _arrayLikeToArray(r, a) {
|
|
27
|
+
(null == a || a > r.length) && (a = r.length);
|
|
28
|
+
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
29
|
+
return n;
|
|
30
|
+
}
|
|
31
|
+
function _arrayWithHoles(r) {
|
|
32
|
+
if (Array.isArray(r)) return r;
|
|
33
|
+
}
|
|
34
|
+
function _extends() {
|
|
35
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
36
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
37
|
+
var t = arguments[e];
|
|
38
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
39
|
+
}
|
|
40
|
+
return n;
|
|
41
|
+
}, _extends.apply(null, arguments);
|
|
42
|
+
}
|
|
43
|
+
function _iterableToArrayLimit(r, l) {
|
|
44
|
+
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
45
|
+
if (null != t) {
|
|
46
|
+
var e,
|
|
47
|
+
n,
|
|
48
|
+
i,
|
|
49
|
+
u,
|
|
50
|
+
a = [],
|
|
51
|
+
f = true,
|
|
52
|
+
o = false;
|
|
53
|
+
try {
|
|
54
|
+
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
55
|
+
} catch (r) {
|
|
56
|
+
o = true, n = r;
|
|
57
|
+
} finally {
|
|
58
|
+
try {
|
|
59
|
+
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
60
|
+
} finally {
|
|
61
|
+
if (o) throw n;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
return a;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function _nonIterableRest() {
|
|
68
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
69
|
+
}
|
|
70
|
+
function _objectWithoutProperties(e, t) {
|
|
71
|
+
if (null == e) return {};
|
|
72
|
+
var o,
|
|
73
|
+
r,
|
|
74
|
+
i = _objectWithoutPropertiesLoose(e, t);
|
|
75
|
+
if (Object.getOwnPropertySymbols) {
|
|
76
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
77
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
78
|
+
}
|
|
79
|
+
return i;
|
|
80
|
+
}
|
|
81
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
82
|
+
if (null == r) return {};
|
|
83
|
+
var t = {};
|
|
84
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
85
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
86
|
+
t[n] = r[n];
|
|
87
|
+
}
|
|
88
|
+
return t;
|
|
89
|
+
}
|
|
90
|
+
function _slicedToArray(r, e) {
|
|
91
|
+
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
92
|
+
}
|
|
93
|
+
function _unsupportedIterableToArray(r, a) {
|
|
94
|
+
if (r) {
|
|
95
|
+
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
96
|
+
var t = {}.toString.call(r).slice(8, -1);
|
|
97
|
+
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
var _excluded$2 = ["className", "children"];
|
|
102
|
+
function ErrorMessage(_ref) {
|
|
103
|
+
var className = _ref.className,
|
|
104
|
+
children = _ref.children,
|
|
105
|
+
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
106
|
+
return /*#__PURE__*/React__namespace.createElement("span", _extends({
|
|
107
|
+
className: ['bds-error', className].filter(function (x) {
|
|
108
|
+
return x;
|
|
109
|
+
}).join(' ')
|
|
110
|
+
}, props), /*#__PURE__*/React__namespace.createElement("svg", {
|
|
111
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
112
|
+
viewBox: "0 0 512 512",
|
|
113
|
+
"aria-hidden": "true",
|
|
114
|
+
height: "1em",
|
|
115
|
+
width: "1em",
|
|
116
|
+
fill: "currentColor"
|
|
117
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
118
|
+
d: "M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z"
|
|
119
|
+
})), children);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
var _excluded$1 = ["error", "id", "label"];
|
|
123
|
+
var FieldCheckbox = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
124
|
+
var error = _ref.error,
|
|
125
|
+
id = _ref.id,
|
|
126
|
+
label = _ref.label,
|
|
127
|
+
props = _objectWithoutProperties(_ref, _excluded$1);
|
|
128
|
+
var _React$useState = React__namespace.useState(false),
|
|
129
|
+
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
130
|
+
isEnhanced = _React$useState2[0],
|
|
131
|
+
setIsEnhanced = _React$useState2[1];
|
|
132
|
+
var fallbackId = React__namespace.useId();
|
|
133
|
+
var errorId = React__namespace.useId();
|
|
134
|
+
var inputId = id !== null && id !== void 0 ? id : fallbackId;
|
|
135
|
+
React__namespace.useEffect(function () {
|
|
136
|
+
setIsEnhanced(true);
|
|
137
|
+
}, []);
|
|
138
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
139
|
+
className: "bds-form-group"
|
|
140
|
+
}, error && /*#__PURE__*/React__namespace.createElement(ErrorMessage, {
|
|
141
|
+
id: errorId
|
|
142
|
+
}, error), /*#__PURE__*/React__namespace.createElement("div", {
|
|
143
|
+
className: "bds-checkbox",
|
|
144
|
+
"data-enhanced": isEnhanced ? '' : undefined
|
|
145
|
+
}, /*#__PURE__*/React__namespace.createElement("input", _extends({}, props, {
|
|
146
|
+
"aria-describedby": error ? errorId : undefined,
|
|
147
|
+
"aria-invalid": error ? true : undefined,
|
|
148
|
+
id: inputId,
|
|
149
|
+
ref: ref,
|
|
150
|
+
type: "checkbox"
|
|
151
|
+
})), isEnhanced && /*#__PURE__*/React__namespace.createElement("svg", {
|
|
152
|
+
width: "32",
|
|
153
|
+
height: "32",
|
|
154
|
+
viewBox: "0 0 32 32",
|
|
155
|
+
"aria-hidden": "true",
|
|
156
|
+
focusable: "false"
|
|
157
|
+
}, /*#__PURE__*/React__namespace.createElement("rect", {
|
|
158
|
+
className: "background",
|
|
159
|
+
width: "31",
|
|
160
|
+
height: "31",
|
|
161
|
+
stroke: "currentColor",
|
|
162
|
+
fill: "none",
|
|
163
|
+
strokeWidth: "1",
|
|
164
|
+
x: "0.5",
|
|
165
|
+
y: "0.5",
|
|
166
|
+
vectorEffect: "non-scaling-stroke"
|
|
167
|
+
}), /*#__PURE__*/React__namespace.createElement("path", {
|
|
168
|
+
className: "checkmark",
|
|
169
|
+
d: "M 6 14 L 13 23 L 26 7",
|
|
170
|
+
stroke: "#fff",
|
|
171
|
+
strokeDasharray: "140",
|
|
172
|
+
strokeDashoffset: "140"
|
|
173
|
+
})), /*#__PURE__*/React__namespace.createElement("label", {
|
|
174
|
+
htmlFor: inputId
|
|
175
|
+
}, label)));
|
|
176
|
+
});
|
|
177
|
+
FieldCheckbox.displayName = 'FieldCheckbox';
|
|
178
|
+
|
|
179
|
+
function getFragmentFromUrl(url) {
|
|
180
|
+
return url.includes('#') ? url.split('#').pop() : undefined;
|
|
181
|
+
}
|
|
182
|
+
function getAssociatedLegendOrLabel(input) {
|
|
183
|
+
var _document$querySelect;
|
|
184
|
+
var fieldset = input.closest('fieldset');
|
|
185
|
+
if (fieldset) {
|
|
186
|
+
var legends = fieldset.getElementsByTagName('legend');
|
|
187
|
+
if (legends.length) {
|
|
188
|
+
var candidateLegend = legends[0];
|
|
189
|
+
|
|
190
|
+
// If the input type is radio or checkbox, always use the legend if there
|
|
191
|
+
// is one.
|
|
192
|
+
if (input instanceof HTMLInputElement && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
193
|
+
return candidateLegend;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
// For other input types, only scroll to the fieldset’s legend (instead of
|
|
197
|
+
// the label associated with the input) if the input would end up in the
|
|
198
|
+
// top half of the screen.
|
|
199
|
+
//
|
|
200
|
+
// This should avoid situations where the input either ends up off the
|
|
201
|
+
// screen, or obscured by a software keyboard.
|
|
202
|
+
var legendTop = candidateLegend.getBoundingClientRect().top;
|
|
203
|
+
var inputRect = input.getBoundingClientRect();
|
|
204
|
+
|
|
205
|
+
// If the browser doesn't support Element.getBoundingClientRect().height
|
|
206
|
+
// or window.innerHeight (like IE8), bail and just link to the label.
|
|
207
|
+
if (inputRect.height && window.innerHeight) {
|
|
208
|
+
var inputBottom = inputRect.top + inputRect.height;
|
|
209
|
+
if (inputBottom - legendTop < window.innerHeight / 2) {
|
|
210
|
+
return candidateLegend;
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
return (_document$querySelect = document.querySelector("label[for='".concat(input.getAttribute('id'), "']"))) !== null && _document$querySelect !== void 0 ? _document$querySelect : input.closest('label');
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
var _excluded = ["warnings", "mapNameToId", "acknowledgement"];
|
|
219
|
+
function BdsWarningSummary(_ref) {
|
|
220
|
+
var _acknowledgement$labe, _acknowledgement$help;
|
|
221
|
+
var warnings = _ref.warnings,
|
|
222
|
+
_ref$mapNameToId = _ref.mapNameToId,
|
|
223
|
+
mapNameToId = _ref$mapNameToId === void 0 ? function (name) {
|
|
224
|
+
return name;
|
|
225
|
+
} : _ref$mapNameToId,
|
|
226
|
+
acknowledgement = _ref.acknowledgement,
|
|
227
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
228
|
+
var headingId = React__namespace.useId();
|
|
229
|
+
var groupRef = React__namespace.useRef(null);
|
|
230
|
+
React__namespace.useEffect(function () {
|
|
231
|
+
var _groupRef$current;
|
|
232
|
+
if (!warnings || warnings.length === 0) return;
|
|
233
|
+
(_groupRef$current = groupRef.current) === null || _groupRef$current === void 0 || _groupRef$current.focus();
|
|
234
|
+
}, [warnings]);
|
|
235
|
+
if (!warnings || warnings.length === 0) return null;
|
|
236
|
+
var handleLinkClick = function handleLinkClick(e) {
|
|
237
|
+
var inputId = getFragmentFromUrl(e.currentTarget.href);
|
|
238
|
+
if (!inputId) return;
|
|
239
|
+
var input = document.getElementById(inputId);
|
|
240
|
+
if (!input) return;
|
|
241
|
+
var legendOrLabel = getAssociatedLegendOrLabel(input);
|
|
242
|
+
if (!legendOrLabel) return;
|
|
243
|
+
e.preventDefault();
|
|
244
|
+
legendOrLabel.scrollIntoView();
|
|
245
|
+
input.focus({
|
|
246
|
+
preventScroll: true
|
|
247
|
+
});
|
|
248
|
+
};
|
|
249
|
+
return (
|
|
250
|
+
/*#__PURE__*/
|
|
251
|
+
// biome-ignore lint/a11y/noInteractiveElementToNoninteractiveRole: group is not an interactive role
|
|
252
|
+
React__namespace.createElement("bds-warning-summary", _extends({
|
|
253
|
+
role: "group",
|
|
254
|
+
"aria-labelledby": headingId,
|
|
255
|
+
ref: groupRef,
|
|
256
|
+
tabIndex: -1
|
|
257
|
+
}, props), /*#__PURE__*/React__namespace.createElement("h2", {
|
|
258
|
+
className: "bds-h5",
|
|
259
|
+
id: headingId
|
|
260
|
+
}, /*#__PURE__*/React__namespace.createElement("svg", {
|
|
261
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
262
|
+
viewBox: "0 0 512 512",
|
|
263
|
+
"aria-hidden": "true",
|
|
264
|
+
height: "1em",
|
|
265
|
+
width: "1em",
|
|
266
|
+
fill: "currentColor"
|
|
267
|
+
}, /*#__PURE__*/React__namespace.createElement("path", {
|
|
268
|
+
d: "M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z"
|
|
269
|
+
})), "Warning"), warnings === null || warnings === void 0 ? void 0 : warnings.map(function (group) {
|
|
270
|
+
var _group$items, _group$items2;
|
|
271
|
+
var fieldId = mapNameToId(group === null || group === void 0 ? void 0 : group.field);
|
|
272
|
+
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
273
|
+
key: group === null || group === void 0 ? void 0 : group.field
|
|
274
|
+
}, /*#__PURE__*/React__namespace.createElement("ul", null, /*#__PURE__*/React__namespace.createElement("li", null, /*#__PURE__*/React__namespace.createElement("a", {
|
|
275
|
+
href: "#".concat(fieldId),
|
|
276
|
+
onClick: handleLinkClick
|
|
277
|
+
}, group.message), (group === null || group === void 0 || (_group$items = group.items) === null || _group$items === void 0 ? void 0 : _group$items.length) > 0 && /*#__PURE__*/React__namespace.createElement("ul", null, group === null || group === void 0 || (_group$items2 = group.items) === null || _group$items2 === void 0 ? void 0 : _group$items2.map(function (item, index) {
|
|
278
|
+
return /*#__PURE__*/React__namespace.createElement("li", {
|
|
279
|
+
key: "".concat(item.label, "-").concat(index)
|
|
280
|
+
}, item.label, item.value && /*#__PURE__*/React__namespace.createElement(React__namespace.Fragment, null, ": ", item.value));
|
|
281
|
+
})))));
|
|
282
|
+
}), acknowledgement && /*#__PURE__*/React__namespace.createElement("div", {
|
|
283
|
+
style: {
|
|
284
|
+
marginTop: '0.75rem'
|
|
285
|
+
}
|
|
286
|
+
}, (acknowledgement === null || acknowledgement === void 0 ? void 0 : acknowledgement.clarifyText) && /*#__PURE__*/React__namespace.createElement("div", {
|
|
287
|
+
className: "bds-form-group"
|
|
288
|
+
}, /*#__PURE__*/React__namespace.createElement("div", {
|
|
289
|
+
className: "bds-checkbox"
|
|
290
|
+
}, /*#__PURE__*/React__namespace.createElement("span", {
|
|
291
|
+
style: {
|
|
292
|
+
marginLeft: '32px'
|
|
293
|
+
}
|
|
294
|
+
}, acknowledgement.clarifyLink ? /*#__PURE__*/React__namespace.createElement("a", {
|
|
295
|
+
href: acknowledgement.clarifyLink
|
|
296
|
+
}, acknowledgement.clarifyText) : acknowledgement.clarifyText))), /*#__PURE__*/React__namespace.createElement(FieldCheckbox, {
|
|
297
|
+
name: "warningAcknowledgement",
|
|
298
|
+
label: (_acknowledgement$labe = acknowledgement.label) !== null && _acknowledgement$labe !== void 0 ? _acknowledgement$labe : 'I understand this warning and want to submit the form anyway.',
|
|
299
|
+
checked: acknowledgement.checked,
|
|
300
|
+
onChange: function onChange(e) {
|
|
301
|
+
return acknowledgement.onChange(e.target.checked);
|
|
302
|
+
},
|
|
303
|
+
error: acknowledgement.error
|
|
304
|
+
}), /*#__PURE__*/React__namespace.createElement("p", {
|
|
305
|
+
style: {
|
|
306
|
+
marginTop: '0.25rem',
|
|
307
|
+
marginLeft: '2rem',
|
|
308
|
+
fontSize: '0.875rem'
|
|
309
|
+
}
|
|
310
|
+
}, (_acknowledgement$help = acknowledgement.helpText) !== null && _acknowledgement$help !== void 0 ? _acknowledgement$help : "Check this box only if you've reviewed the detected information and are certain it needs to be included.")))
|
|
311
|
+
);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
exports.default = BdsWarningSummary;
|
|
315
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/FieldCheckbox/FieldCheckbox.tsx","../../src/WarningSummary/utils.ts","../../src/WarningSummary/WarningSunmmary.tsx"],"sourcesContent":["// biome-ignore lint/style/useImportType: following this rule does not work for some reason\nimport * as React from 'react';\n\nexport default function ErrorMessage({ className, children, ...props }: React.ComponentPropsWithoutRef<'span'>) {\n return (\n <span className={['bds-error', className].filter((x) => x).join(' ')} {...props}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n fill=\"currentColor\"\n >\n <path d=\"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z\" />\n </svg>\n {children}\n </span>\n );\n}\n","import * as React from 'react';\n\nimport ErrorMessage from '../ErrorMessage';\n\nexport type FieldCheckboxProps = {\n error?: string;\n label: React.ReactNode | string;\n} & React.ComponentPropsWithoutRef<'input'>;\n\nconst FieldCheckbox = React.forwardRef<HTMLInputElement, FieldCheckboxProps>(\n ({ error, id, label, ...props }, ref) => {\n const [isEnhanced, setIsEnhanced] = React.useState(false);\n\n const fallbackId = React.useId();\n const errorId = React.useId();\n\n const inputId = id ?? fallbackId;\n\n React.useEffect(() => {\n setIsEnhanced(true);\n }, []);\n\n return (\n <div className=\"bds-form-group\">\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <div className=\"bds-checkbox\" data-enhanced={isEnhanced ? '' : undefined}>\n <input\n {...props}\n aria-describedby={error ? errorId : undefined}\n aria-invalid={error ? true : undefined}\n id={inputId}\n ref={ref}\n type=\"checkbox\"\n />\n {isEnhanced && (\n <svg width=\"32\" height=\"32\" viewBox=\"0 0 32 32\" aria-hidden=\"true\" focusable=\"false\">\n <rect\n className=\"background\"\n width=\"31\"\n height=\"31\"\n stroke=\"currentColor\"\n fill=\"none\"\n strokeWidth=\"1\"\n x=\"0.5\"\n y=\"0.5\"\n vectorEffect=\"non-scaling-stroke\"\n />\n <path\n className=\"checkmark\"\n d=\"M 6 14 L 13 23 L 26 7\"\n stroke=\"#fff\"\n strokeDasharray=\"140\"\n strokeDashoffset=\"140\"\n />\n </svg>\n )}\n <label htmlFor={inputId}>{label}</label>\n </div>\n </div>\n );\n },\n);\n\nFieldCheckbox.displayName = 'FieldCheckbox';\n\nexport default FieldCheckbox;\n","export function getFragmentFromUrl(url: string) {\n return url.includes('#') ? url.split('#').pop() : undefined;\n}\n\nexport function getAssociatedLegendOrLabel(input: HTMLElement) {\n const fieldset = input.closest('fieldset');\n\n if (fieldset) {\n const legends = fieldset.getElementsByTagName('legend');\n\n if (legends.length) {\n const candidateLegend = legends[0];\n\n // If the input type is radio or checkbox, always use the legend if there\n // is one.\n if (input instanceof HTMLInputElement && (input.type === 'checkbox' || input.type === 'radio')) {\n return candidateLegend;\n }\n\n // For other input types, only scroll to the fieldset’s legend (instead of\n // the label associated with the input) if the input would end up in the\n // top half of the screen.\n //\n // This should avoid situations where the input either ends up off the\n // screen, or obscured by a software keyboard.\n const legendTop = candidateLegend.getBoundingClientRect().top;\n const inputRect = input.getBoundingClientRect();\n\n // If the browser doesn't support Element.getBoundingClientRect().height\n // or window.innerHeight (like IE8), bail and just link to the label.\n if (inputRect.height && window.innerHeight) {\n const inputBottom = inputRect.top + inputRect.height;\n\n if (inputBottom - legendTop < window.innerHeight / 2) {\n return candidateLegend;\n }\n }\n }\n }\n\n return document.querySelector(`label[for='${input.getAttribute('id')}']`) ?? input.closest('label');\n}\n","import * as React from 'react';\nimport FieldCheckbox from '../FieldCheckbox';\nimport { getAssociatedLegendOrLabel, getFragmentFromUrl } from './utils';\n\ndeclare global {\n namespace JSX {\n interface IntrinsicElements {\n 'bds-warning-summary': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n }\n }\n}\n\nexport type WarningSummaryProps = {\n warnings: {\n field: string;\n message: string;\n items?: {\n label: string;\n value?: string;\n }[];\n }[];\n mapNameToId?: (name: string) => string;\n acknowledgement?: {\n checked: boolean;\n onChange: (checked: boolean) => void;\n label?: string;\n helpText?: string;\n clarifyText?: string;\n clarifyLink?: string;\n error?: string;\n };\n};\n\nexport default function BdsWarningSummary({\n warnings,\n mapNameToId = (name) => name,\n acknowledgement,\n ...props\n}: WarningSummaryProps & React.ComponentPropsWithoutRef<'div'>) {\n const headingId = React.useId();\n const groupRef = React.useRef<HTMLElement>(null);\n\n React.useEffect(() => {\n if (!warnings || warnings.length === 0) return;\n groupRef.current?.focus();\n }, [warnings]);\n\n if (!warnings || warnings.length === 0) return null;\n\n const handleLinkClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n const inputId = getFragmentFromUrl(e.currentTarget.href);\n if (!inputId) return;\n\n const input = document.getElementById(inputId);\n if (!input) return;\n\n const legendOrLabel = getAssociatedLegendOrLabel(input);\n if (!legendOrLabel) return;\n\n e.preventDefault();\n legendOrLabel.scrollIntoView();\n input.focus({ preventScroll: true });\n };\n\n return (\n // biome-ignore lint/a11y/noInteractiveElementToNoninteractiveRole: group is not an interactive role\n <bds-warning-summary role=\"group\" aria-labelledby={headingId} ref={groupRef} tabIndex={-1} {...props}>\n <h2 className=\"bds-h5\" id={headingId}>\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 512 512\"\n aria-hidden=\"true\"\n height=\"1em\"\n width=\"1em\"\n fill=\"currentColor\"\n >\n <path d=\"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z\" />\n </svg>\n Warning\n </h2>\n {warnings?.map((group) => {\n const fieldId = mapNameToId(group?.field);\n return (\n <div key={group?.field}>\n <ul>\n <li>\n <a href={`#${fieldId}`} onClick={handleLinkClick}>\n {group.message}\n </a>\n\n {group?.items?.length > 0 && (\n <ul>\n {group?.items?.map((item, index) => (\n <li key={`${item.label}-${index}`}>\n {item.label}\n {item.value && <>: {item.value}</>}\n </li>\n ))}\n </ul>\n )}\n </li>\n </ul>\n </div>\n );\n })}\n {acknowledgement && (\n <div style={{ marginTop: '0.75rem' }}>\n {acknowledgement?.clarifyText && (\n <div className=\"bds-form-group\">\n <div className=\"bds-checkbox\">\n <span style={{ marginLeft: '32px' }}>\n {acknowledgement.clarifyLink ? (\n <a href={acknowledgement.clarifyLink}>{acknowledgement.clarifyText}</a>\n ) : (\n acknowledgement.clarifyText\n )}\n </span>\n </div>\n </div>\n )}\n <FieldCheckbox\n name=\"warningAcknowledgement\"\n label={acknowledgement.label ?? 'I understand this warning and want to submit the form anyway.'}\n checked={acknowledgement.checked}\n onChange={(e) => acknowledgement.onChange((e.target as HTMLInputElement).checked)}\n error={acknowledgement.error}\n />\n <p style={{ marginTop: '0.25rem', marginLeft: '2rem', fontSize: '0.875rem' }}>\n {acknowledgement.helpText ??\n \"Check this box only if you've reviewed the detected information and are certain it needs to be included.\"}\n </p>\n </div>\n )}\n </bds-warning-summary>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","FieldCheckbox","forwardRef","ref","error","id","label","_React$useState","useState","_React$useState2","_slicedToArray","isEnhanced","setIsEnhanced","fallbackId","useId","errorId","inputId","useEffect","undefined","type","focusable","stroke","strokeWidth","y","vectorEffect","strokeDasharray","strokeDashoffset","htmlFor","displayName","getFragmentFromUrl","url","includes","split","pop","getAssociatedLegendOrLabel","input","_document$querySelect","fieldset","closest","legends","getElementsByTagName","length","candidateLegend","HTMLInputElement","legendTop","getBoundingClientRect","top","inputRect","window","innerHeight","inputBottom","document","querySelector","concat","getAttribute","BdsWarningSummary","_acknowledgement$labe","_acknowledgement$help","warnings","_ref$mapNameToId","mapNameToId","name","acknowledgement","headingId","groupRef","useRef","_groupRef$current","current","focus","handleLinkClick","e","currentTarget","href","getElementById","legendOrLabel","preventDefault","scrollIntoView","preventScroll","role","tabIndex","map","group","_group$items","_group$items2","fieldId","field","key","onClick","message","items","item","index","value","Fragment","style","marginTop","clarifyText","marginLeft","clarifyLink","checked","onChange","target","fontSize","helpText"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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