@iabbb/bds-react 0.55.0 โ 0.56.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.
- package/Button/index.cjs +5 -4
- package/Button/index.cjs.map +1 -1
- package/Button/index.mjs +5 -4
- package/Button/index.mjs.map +1 -1
- package/CallToAction/index.cjs +4 -3
- package/CallToAction/index.cjs.map +1 -1
- package/CallToAction/index.mjs +4 -3
- package/CallToAction/index.mjs.map +1 -1
- package/ErrorMessage/index.cjs +3 -3
- package/ErrorMessage/index.mjs +3 -3
- package/ErrorSummary/index.cjs +3 -3
- package/ErrorSummary/index.cjs.map +1 -1
- package/ErrorSummary/index.mjs +3 -3
- package/ErrorSummary/index.mjs.map +1 -1
- package/FieldCharacterCountdown/FieldCharacterCountdown.d.ts +1 -1
- package/FieldCharacterCountdown/index.cjs +7 -8
- package/FieldCharacterCountdown/index.cjs.map +1 -1
- package/FieldCharacterCountdown/index.mjs +7 -8
- package/FieldCharacterCountdown/index.mjs.map +1 -1
- package/FieldCheckbox/index.cjs +7 -6
- package/FieldCheckbox/index.cjs.map +1 -1
- package/FieldCheckbox/index.mjs +7 -6
- package/FieldCheckbox/index.mjs.map +1 -1
- package/FieldRadio/index.cjs +7 -6
- package/FieldRadio/index.cjs.map +1 -1
- package/FieldRadio/index.mjs +7 -6
- package/FieldRadio/index.mjs.map +1 -1
- package/FieldSelect/index.cjs +5 -5
- package/FieldSelect/index.cjs.map +1 -1
- package/FieldSelect/index.mjs +5 -5
- package/FieldSelect/index.mjs.map +1 -1
- package/FieldTextInput/FieldTextInput.d.ts +2 -2
- package/FieldTextInput/index.cjs +5 -5
- package/FieldTextInput/index.cjs.map +1 -1
- package/FieldTextInput/index.mjs +5 -5
- package/FieldTextInput/index.mjs.map +1 -1
- package/FieldTextarea/FieldTextarea.d.ts +1 -1
- package/FieldTextarea/index.cjs +4 -5
- package/FieldTextarea/index.cjs.map +1 -1
- package/FieldTextarea/index.mjs +4 -5
- package/FieldTextarea/index.mjs.map +1 -1
- package/Fieldset/index.cjs +3 -3
- package/Fieldset/index.mjs +3 -3
- package/Pagination/index.cjs +3 -3
- package/Pagination/index.mjs +3 -3
- package/Typography/index.cjs +3 -3
- package/Typography/index.cjs.map +1 -1
- package/Typography/index.mjs +3 -3
- package/Typography/index.mjs.map +1 -1
- package/index.cjs +8 -6
- package/index.cjs.map +1 -1
- package/index.mjs +8 -6
- package/index.mjs.map +1 -1
- package/package.json +10 -10
package/FieldTextInput/index.mjs
CHANGED
|
@@ -15,8 +15,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
15
15
|
r,
|
|
16
16
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
17
17
|
if (Object.getOwnPropertySymbols) {
|
|
18
|
-
var
|
|
19
|
-
for (r = 0; r <
|
|
18
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
19
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
20
20
|
}
|
|
21
21
|
return i;
|
|
22
22
|
}
|
|
@@ -24,7 +24,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
24
24
|
if (null == r) return {};
|
|
25
25
|
var t = {};
|
|
26
26
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
27
|
-
if (e.
|
|
27
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
28
28
|
t[n] = r[n];
|
|
29
29
|
}
|
|
30
30
|
return t;
|
|
@@ -53,7 +53,6 @@ function ErrorMessage(_ref) {
|
|
|
53
53
|
|
|
54
54
|
var _excluded = ["className", "error", "hint", "id", "isOptional", "label"];
|
|
55
55
|
var FieldTextInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
56
|
-
var _id;
|
|
57
56
|
var className = _ref.className,
|
|
58
57
|
error = _ref.error,
|
|
59
58
|
hint = _ref.hint,
|
|
@@ -62,7 +61,7 @@ var FieldTextInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
62
61
|
isOptional = _ref$isOptional === void 0 ? false : _ref$isOptional,
|
|
63
62
|
label = _ref.label,
|
|
64
63
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
65
|
-
id =
|
|
64
|
+
id = id !== null && id !== void 0 ? id : props.name;
|
|
66
65
|
var errorId = React.useId();
|
|
67
66
|
var hintId = React.useId();
|
|
68
67
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -84,6 +83,7 @@ var FieldTextInput = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
|
|
|
84
83
|
ref: ref
|
|
85
84
|
}, props)));
|
|
86
85
|
});
|
|
86
|
+
FieldTextInput.displayName = 'FieldTextInput';
|
|
87
87
|
|
|
88
88
|
export { FieldTextInput as default };
|
|
89
89
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/FieldTextInput/FieldTextInput.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 FieldTextInputProps = {\n error?: string;\n hint?: string;\n id?: string;\n isOptional?: boolean;\n label: string;\n} & React.ComponentPropsWithoutRef<'input'>;\n\nconst FieldTextInput = React.forwardRef<HTMLInputElement, FieldTextInputProps>(\n ({ className, error, hint, id, isOptional = false, label, ...props }, ref) => {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <input\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className={['bds-text-input', className].filter((x) => x).join(' ')}\n id={id}\n ref={ref}\n {...props}\n />\n </div>\n );\n },\n);\n\nexport default FieldTextInput;\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","FieldTextInput","forwardRef","ref","
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/FieldTextInput/FieldTextInput.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 FieldTextInputProps = {\n error?: string;\n hint?: React.ReactNode | string;\n id?: string;\n isOptional?: boolean;\n label: string;\n} & React.ComponentPropsWithoutRef<'input'>;\n\nconst FieldTextInput = React.forwardRef<HTMLInputElement, FieldTextInputProps>(\n ({ className, error, hint, id, isOptional = false, label, ...props }, ref) => {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <input\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className={['bds-text-input', className].filter((x) => x).join(' ')}\n id={id}\n ref={ref}\n {...props}\n />\n </div>\n );\n },\n);\n\nFieldTextInput.displayName = 'FieldTextInput';\n\nexport default FieldTextInput;\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","FieldTextInput","forwardRef","ref","error","hint","id","_ref$isOptional","isOptional","label","name","errorId","useId","hintId","htmlFor","undefined","concat","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGe,SAASA,YAAYA,CAAAC,IAAA,EAA4E;AAAA,EAAA,IAAzEC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,QAAQ,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AAG,gBAAgB;;;;"}
|
package/FieldTextarea/index.cjs
CHANGED
|
@@ -38,8 +38,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
38
38
|
r,
|
|
39
39
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
40
40
|
if (Object.getOwnPropertySymbols) {
|
|
41
|
-
var
|
|
42
|
-
for (r = 0; r <
|
|
41
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
42
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
43
43
|
}
|
|
44
44
|
return i;
|
|
45
45
|
}
|
|
@@ -47,7 +47,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
47
47
|
if (null == r) return {};
|
|
48
48
|
var t = {};
|
|
49
49
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
50
|
-
if (e.
|
|
50
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
51
51
|
t[n] = r[n];
|
|
52
52
|
}
|
|
53
53
|
return t;
|
|
@@ -76,7 +76,6 @@ function ErrorMessage(_ref) {
|
|
|
76
76
|
|
|
77
77
|
var _excluded = ["error", "hint", "id", "isOptional", "label"];
|
|
78
78
|
function FieldTextarea(_ref) {
|
|
79
|
-
var _id;
|
|
80
79
|
var error = _ref.error,
|
|
81
80
|
hint = _ref.hint,
|
|
82
81
|
id = _ref.id,
|
|
@@ -84,7 +83,7 @@ function FieldTextarea(_ref) {
|
|
|
84
83
|
isOptional = _ref$isOptional === void 0 ? false : _ref$isOptional,
|
|
85
84
|
label = _ref.label,
|
|
86
85
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
87
|
-
id =
|
|
86
|
+
id = id !== null && id !== void 0 ? id : props.name;
|
|
88
87
|
var errorId = React__namespace.useId();
|
|
89
88
|
var hintId = React__namespace.useId();
|
|
90
89
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/FieldTextarea/FieldTextarea.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 FieldTextareaProps = {\n error?: string;\n hint?: string;\n id?: string;\n isOptional?: boolean;\n label: string;\n};\n\nexport default function FieldTextarea({\n error,\n hint,\n id,\n isOptional = false,\n label,\n ...props\n}: FieldTextareaProps & React.ComponentPropsWithoutRef<'textarea'>) {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <textarea\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className=\"bds-textarea\"\n id={id}\n {...props}\n />\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","FieldTextarea","
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/FieldTextarea/FieldTextarea.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 FieldTextareaProps = {\n error?: string;\n hint?: React.ReactNode | string;\n id?: string;\n isOptional?: boolean;\n label: string;\n};\n\nexport default function FieldTextarea({\n error,\n hint,\n id,\n isOptional = false,\n label,\n ...props\n}: FieldTextareaProps & React.ComponentPropsWithoutRef<'textarea'>) {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <textarea\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className=\"bds-textarea\"\n id={id}\n {...props}\n />\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","FieldTextarea","error","hint","id","_ref$isOptional","isOptional","label","name","errorId","useId","hintId","htmlFor","undefined","concat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGe,SAASA,YAAYA,CAAAC,IAAA,EAA4E;AAAA,EAAA,IAAzEC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,WAAA,CAAA;AAClE,EAAA,oBACEC,gBAAA,CAAAC,aAAA,CAAA,MAAA,EAAAC,QAAA,CAAA;IAAMP,SAAS,EAAE,CAAC,WAAW,EAAEA,SAAS,CAAC,CAACQ,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,CAAC;KAAC,CAAA,CAACC,IAAI,CAAC,GAAG;AAAE,GAAA,EAAKR,KAAK,CAAA,eAC7EG,gBAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEK,IAAAA,KAAK,EAAC,4BAA4B;AAClCC,IAAAA,OAAO,EAAC,aAAa;AACrB,IAAA,aAAA,EAAY,MAAM;AAClBC,IAAAA,MAAM,EAAC,KAAK;AACZC,IAAAA,KAAK,EAAC,KAAK;AACXC,IAAAA,IAAI,EAAC;GAELV,eAAAA,gBAAA,CAAAC,aAAA,CAAA,MAAA,EAAA;AAAMU,IAAAA,CAAC,EAAC;AAA4U,GAAE,CACnV,CAAC,EACLf,QACG,CAAC;AAEX;;;AC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,EAAA,CAAAW,MAAA,CAAMH,MAAM,OAAAG,MAAA,CAAIL,OAAO,CAAKP,GAAAA,KAAK,GAAGO,OAAO,GAAGN,IAAI,GAAGQ,MAAM,GAAGE,SAAU;AACvG7B,IAAAA,SAAS,EAAC,cAAc;AACxBoB,IAAAA,EAAE,EAAEA;GACAlB,EAAAA,KAAK,CACV,CACE,CAAC;AAEV;;;;"}
|
package/FieldTextarea/index.mjs
CHANGED
|
@@ -15,8 +15,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
15
15
|
r,
|
|
16
16
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
17
17
|
if (Object.getOwnPropertySymbols) {
|
|
18
|
-
var
|
|
19
|
-
for (r = 0; r <
|
|
18
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
19
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
20
20
|
}
|
|
21
21
|
return i;
|
|
22
22
|
}
|
|
@@ -24,7 +24,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
24
24
|
if (null == r) return {};
|
|
25
25
|
var t = {};
|
|
26
26
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
27
|
-
if (e.
|
|
27
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
28
28
|
t[n] = r[n];
|
|
29
29
|
}
|
|
30
30
|
return t;
|
|
@@ -53,7 +53,6 @@ function ErrorMessage(_ref) {
|
|
|
53
53
|
|
|
54
54
|
var _excluded = ["error", "hint", "id", "isOptional", "label"];
|
|
55
55
|
function FieldTextarea(_ref) {
|
|
56
|
-
var _id;
|
|
57
56
|
var error = _ref.error,
|
|
58
57
|
hint = _ref.hint,
|
|
59
58
|
id = _ref.id,
|
|
@@ -61,7 +60,7 @@ function FieldTextarea(_ref) {
|
|
|
61
60
|
isOptional = _ref$isOptional === void 0 ? false : _ref$isOptional,
|
|
62
61
|
label = _ref.label,
|
|
63
62
|
props = _objectWithoutProperties(_ref, _excluded);
|
|
64
|
-
id =
|
|
63
|
+
id = id !== null && id !== void 0 ? id : props.name;
|
|
65
64
|
var errorId = React.useId();
|
|
66
65
|
var hintId = React.useId();
|
|
67
66
|
return /*#__PURE__*/React.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/FieldTextarea/FieldTextarea.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 FieldTextareaProps = {\n error?: string;\n hint?: string;\n id?: string;\n isOptional?: boolean;\n label: string;\n};\n\nexport default function FieldTextarea({\n error,\n hint,\n id,\n isOptional = false,\n label,\n ...props\n}: FieldTextareaProps & React.ComponentPropsWithoutRef<'textarea'>) {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <textarea\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className=\"bds-textarea\"\n id={id}\n {...props}\n />\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","FieldTextarea","
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/ErrorMessage/ErrorMessage.tsx","../../src/FieldTextarea/FieldTextarea.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 FieldTextareaProps = {\n error?: string;\n hint?: React.ReactNode | string;\n id?: string;\n isOptional?: boolean;\n label: string;\n};\n\nexport default function FieldTextarea({\n error,\n hint,\n id,\n isOptional = false,\n label,\n ...props\n}: FieldTextareaProps & React.ComponentPropsWithoutRef<'textarea'>) {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <textarea\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className=\"bds-textarea\"\n id={id}\n {...props}\n />\n </div>\n );\n}\n"],"names":["ErrorMessage","_ref","className","children","props","_objectWithoutProperties","_excluded","React","createElement","_extends","filter","x","join","xmlns","viewBox","height","width","fill","d","FieldTextarea","error","hint","id","_ref$isOptional","isOptional","label","name","errorId","useId","hintId","htmlFor","undefined","concat"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGe,SAASA,YAAYA,CAAAC,IAAA,EAA4E;AAAA,EAAA,IAAzEC,SAAS,GAAAD,IAAA,CAATC,SAAS;IAAEC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;AAAKC,IAAAA,KAAK,GAAAC,wBAAA,CAAAJ,IAAA,EAAAK,WAAA,CAAA;AAClE,EAAA,oBACEC,KAAA,CAAAC,aAAA,CAAA,MAAA,EAAAC,QAAA,CAAA;IAAMP,SAAS,EAAE,CAAC,WAAW,EAAEA,SAAS,CAAC,CAACQ,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,CAAC;KAAC,CAAA,CAACC,IAAI,CAAC,GAAG;AAAE,GAAA,EAAKR,KAAK,CAAA,eAC7EG,KAAA,CAAAC,aAAA,CAAA,KAAA,EAAA;AACEK,IAAAA,KAAK,EAAC,4BAA4B;AAClCC,IAAAA,OAAO,EAAC,aAAa;AACrB,IAAA,aAAA,EAAY,MAAM;AAClBC,IAAAA,MAAM,EAAC,KAAK;AACZC,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A,EAAEP,KAAoB,CAAC,eAC3Db,KAAA,CAAAC,aAAA,aAAAC,QAAA,CAAA;AACE,IAAA,cAAA,EAAcW,KAAK,GAAG,IAAI,GAAGW,SAAU;IACvC,kBAAkBX,EAAAA,KAAK,IAAIC,IAAI,GAAA,EAAA,CAAAW,MAAA,CAAMH,MAAM,OAAAG,MAAA,CAAIL,OAAO,CAAKP,GAAAA,KAAK,GAAGO,OAAO,GAAGN,IAAI,GAAGQ,MAAM,GAAGE,SAAU;AACvG7B,IAAAA,SAAS,EAAC,cAAc;AACxBoB,IAAAA,EAAE,EAAEA;GACAlB,EAAAA,KAAK,CACV,CACE,CAAC;AAEV;;;;"}
|
package/Fieldset/index.cjs
CHANGED
|
@@ -38,8 +38,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
38
38
|
r,
|
|
39
39
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
40
40
|
if (Object.getOwnPropertySymbols) {
|
|
41
|
-
var
|
|
42
|
-
for (r = 0; r <
|
|
41
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
42
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
43
43
|
}
|
|
44
44
|
return i;
|
|
45
45
|
}
|
|
@@ -47,7 +47,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
47
47
|
if (null == r) return {};
|
|
48
48
|
var t = {};
|
|
49
49
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
50
|
-
if (e.
|
|
50
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
51
51
|
t[n] = r[n];
|
|
52
52
|
}
|
|
53
53
|
return t;
|
package/Fieldset/index.mjs
CHANGED
|
@@ -15,8 +15,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
15
15
|
r,
|
|
16
16
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
17
17
|
if (Object.getOwnPropertySymbols) {
|
|
18
|
-
var
|
|
19
|
-
for (r = 0; r <
|
|
18
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
19
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
20
20
|
}
|
|
21
21
|
return i;
|
|
22
22
|
}
|
|
@@ -24,7 +24,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
24
24
|
if (null == r) return {};
|
|
25
25
|
var t = {};
|
|
26
26
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
27
|
-
if (e.
|
|
27
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
28
28
|
t[n] = r[n];
|
|
29
29
|
}
|
|
30
30
|
return t;
|
package/Pagination/index.cjs
CHANGED
|
@@ -52,8 +52,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
52
52
|
r,
|
|
53
53
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
54
54
|
if (Object.getOwnPropertySymbols) {
|
|
55
|
-
var
|
|
56
|
-
for (r = 0; r <
|
|
55
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
56
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
57
57
|
}
|
|
58
58
|
return i;
|
|
59
59
|
}
|
|
@@ -61,7 +61,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
61
61
|
if (null == r) return {};
|
|
62
62
|
var t = {};
|
|
63
63
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
64
|
-
if (e.
|
|
64
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
65
65
|
t[n] = r[n];
|
|
66
66
|
}
|
|
67
67
|
return t;
|
package/Pagination/index.mjs
CHANGED
|
@@ -29,8 +29,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
29
29
|
r,
|
|
30
30
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
31
31
|
if (Object.getOwnPropertySymbols) {
|
|
32
|
-
var
|
|
33
|
-
for (r = 0; r <
|
|
32
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
33
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
34
34
|
}
|
|
35
35
|
return i;
|
|
36
36
|
}
|
|
@@ -38,7 +38,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
38
38
|
if (null == r) return {};
|
|
39
39
|
var t = {};
|
|
40
40
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
41
|
-
if (e.
|
|
41
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
42
42
|
t[n] = r[n];
|
|
43
43
|
}
|
|
44
44
|
return t;
|
package/Typography/index.cjs
CHANGED
|
@@ -38,8 +38,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
38
38
|
r,
|
|
39
39
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
40
40
|
if (Object.getOwnPropertySymbols) {
|
|
41
|
-
var
|
|
42
|
-
for (r = 0; r <
|
|
41
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
42
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
43
43
|
}
|
|
44
44
|
return i;
|
|
45
45
|
}
|
|
@@ -47,7 +47,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
47
47
|
if (null == r) return {};
|
|
48
48
|
var t = {};
|
|
49
49
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
50
|
-
if (e.
|
|
50
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
51
51
|
t[n] = r[n];
|
|
52
52
|
}
|
|
53
53
|
return t;
|
package/Typography/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Typography/Typography.tsx"],"sourcesContent":["import * as React from 'react';\n\nconst componentMap = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n body: 'p',\n};\n\nconst classMap = {\n h1: 'bds-h1',\n h2: 'bds-h2',\n h3: 'bds-h3',\n h4: 'bds-h4',\n h5: 'bds-h5',\n body: 'bds-body',\n};\n\nexport type TypographyProps = {\n component?: React.ElementType;\n variant?: 'body' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n};\n\nconst Typography = React.forwardRef<HTMLOrSVGElement, React.HTMLAttributes<HTMLOrSVGElement> & TypographyProps>(\n ({ className, component, variant = 'body', ...props }, ref) => {\n const Component = component ?? (componentMap[variant] as React.ElementType);\n\n return (\n <Component className={[classMap[variant], className].filter((x) => x).join(' ')} ref={ref} {...props} />\n );\n },\n);\n\nTypography.displayName = 'Typography';\n\nexport default Typography;\n"],"names":["componentMap","h1","h2","h3","h4","h5","body","classMap","Typography","React","forwardRef","_ref","ref","className","component","_ref$variant","variant","props","_objectWithoutProperties","_excluded","Component","createElement","_extends","filter","x","join","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG;AACnBC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,IAAI,EAAE;AACR,CAAC;AAED,IAAMC,QAAQ,GAAG;AACfN,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,IAAI,EAAE;AACR,CAAC;AAOKE,IAAAA,UAAU,gBAAGC,gBAAK,CAACC,UAAU,CACjC,UAAAC,IAAA,EAAuDC,GAAG,EAAK;AAAA,EAAA,IAA5DC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAAC,YAAA,GAAAJ,IAAA,CAAEK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Typography/Typography.tsx"],"sourcesContent":["import * as React from 'react';\n\nconst componentMap = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n body: 'p',\n};\n\nconst classMap = {\n h1: 'bds-h1',\n h2: 'bds-h2',\n h3: 'bds-h3',\n h4: 'bds-h4',\n h5: 'bds-h5',\n body: 'bds-body',\n};\n\nexport type TypographyProps = {\n component?: React.ElementType;\n variant?: 'body' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n};\n\nconst Typography = React.forwardRef<HTMLOrSVGElement, React.HTMLAttributes<HTMLOrSVGElement> & TypographyProps>(\n ({ className, component, variant = 'body', ...props }, ref) => {\n const Component = component ?? (componentMap[variant] as React.ElementType);\n\n return (\n <Component className={[classMap[variant], className].filter((x) => x).join(' ')} ref={ref} {...props} />\n );\n },\n);\n\nTypography.displayName = 'Typography';\n\nexport default Typography;\n"],"names":["componentMap","h1","h2","h3","h4","h5","body","classMap","Typography","React","forwardRef","_ref","ref","className","component","_ref$variant","variant","props","_objectWithoutProperties","_excluded","Component","createElement","_extends","filter","x","join","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG;AACnBC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,IAAI,EAAE;AACR,C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ymbols) {
|
|
18
|
-
var
|
|
19
|
-
for (r = 0; r <
|
|
18
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
19
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
20
20
|
}
|
|
21
21
|
return i;
|
|
22
22
|
}
|
|
@@ -24,7 +24,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
24
24
|
if (null == r) return {};
|
|
25
25
|
var t = {};
|
|
26
26
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
27
|
-
if (e.
|
|
27
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
28
28
|
t[n] = r[n];
|
|
29
29
|
}
|
|
30
30
|
return t;
|
package/Typography/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/Typography/Typography.tsx"],"sourcesContent":["import * as React from 'react';\n\nconst componentMap = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n body: 'p',\n};\n\nconst classMap = {\n h1: 'bds-h1',\n h2: 'bds-h2',\n h3: 'bds-h3',\n h4: 'bds-h4',\n h5: 'bds-h5',\n body: 'bds-body',\n};\n\nexport type TypographyProps = {\n component?: React.ElementType;\n variant?: 'body' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n};\n\nconst Typography = React.forwardRef<HTMLOrSVGElement, React.HTMLAttributes<HTMLOrSVGElement> & TypographyProps>(\n ({ className, component, variant = 'body', ...props }, ref) => {\n const Component = component ?? (componentMap[variant] as React.ElementType);\n\n return (\n <Component className={[classMap[variant], className].filter((x) => x).join(' ')} ref={ref} {...props} />\n );\n },\n);\n\nTypography.displayName = 'Typography';\n\nexport default Typography;\n"],"names":["componentMap","h1","h2","h3","h4","h5","body","classMap","Typography","React","forwardRef","_ref","ref","className","component","_ref$variant","variant","props","_objectWithoutProperties","_excluded","Component","createElement","_extends","filter","x","join","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG;AACnBC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,IAAI,EAAE;AACR,CAAC;AAED,IAAMC,QAAQ,GAAG;AACfN,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,IAAI,EAAE;AACR,CAAC;AAOKE,IAAAA,UAAU,gBAAGC,KAAK,CAACC,UAAU,CACjC,UAAAC,IAAA,EAAuDC,GAAG,EAAK;AAAA,EAAA,IAA5DC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAAC,YAAA,GAAAJ,IAAA,CAAEK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/Typography/Typography.tsx"],"sourcesContent":["import * as React from 'react';\n\nconst componentMap = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n body: 'p',\n};\n\nconst classMap = {\n h1: 'bds-h1',\n h2: 'bds-h2',\n h3: 'bds-h3',\n h4: 'bds-h4',\n h5: 'bds-h5',\n body: 'bds-body',\n};\n\nexport type TypographyProps = {\n component?: React.ElementType;\n variant?: 'body' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n};\n\nconst Typography = React.forwardRef<HTMLOrSVGElement, React.HTMLAttributes<HTMLOrSVGElement> & TypographyProps>(\n ({ className, component, variant = 'body', ...props }, ref) => {\n const Component = component ?? (componentMap[variant] as React.ElementType);\n\n return (\n <Component className={[classMap[variant], className].filter((x) => x).join(' ')} ref={ref} {...props} />\n );\n },\n);\n\nTypography.displayName = 'Typography';\n\nexport default Typography;\n"],"names":["componentMap","h1","h2","h3","h4","h5","body","classMap","Typography","React","forwardRef","_ref","ref","className","component","_ref$variant","variant","props","_objectWithoutProperties","_excluded","Component","createElement","_extends","filter","x","join","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,YAAY,GAAG;AACnBC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,EAAE,EAAE,IAAI;AACRC,EAAAA,IAAI,EAAE;AACR,CAAC;AAED,IAAMC,QAAQ,GAAG;AACfN,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,EAAE,EAAE,QAAQ;AACZC,EAAAA,IAAI,EAAE;AACR,CAAC;AAOKE,IAAAA,UAAU,gBAAGC,KAAK,CAACC,UAAU,CACjC,UAAAC,IAAA,EAAuDC,GAAG,EAAK;AAAA,EAAA,IAA5DC,SAAS,GAAAF,IAAA,CAATE,SAAS;IAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAAC,YAAA,GAAAJ,IAAA,CAAEK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,MAAA,GAAA,MAAM,GAAAA,YAAA;AAAKE,IAAAA,KAAK,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA;EACjD,IAAMC,SAAS,GAAGN,SAAS,KAATA,IAAAA,IAAAA,SAAS,KAATA,MAAAA,GAAAA,SAAS,GAAKd,YAAY,CAACgB,OAAO,CAAuB;AAE3E,EAAA,oBACEP,KAAA,CAAAY,aAAA,CAACD,SAAS,EAAAE,QAAA,CAAA;AAACT,IAAAA,SAAS,EAAE,CAACN,QAAQ,CAACS,OAAO,CAAC,EAAEH,SAAS,CAAC,CAACU,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,CAAC;AAAA,KAAA,CAAC,CAACC,IAAI,CAAC,GAAG,CAAE;AAACb,IAAAA,GAAG,EAAEA;GAASK,EAAAA,KAAK,CAAG,CAAC;AAE5G,CACF;AAEAT,UAAU,CAACkB,WAAW,GAAG,YAAY;;;;"}
|
package/index.cjs
CHANGED
|
@@ -50,8 +50,8 @@ function _objectWithoutProperties(e, t) {
|
|
|
50
50
|
r,
|
|
51
51
|
i = _objectWithoutPropertiesLoose(e, t);
|
|
52
52
|
if (Object.getOwnPropertySymbols) {
|
|
53
|
-
var
|
|
54
|
-
for (r = 0; r <
|
|
53
|
+
var n = Object.getOwnPropertySymbols(e);
|
|
54
|
+
for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]);
|
|
55
55
|
}
|
|
56
56
|
return i;
|
|
57
57
|
}
|
|
@@ -59,7 +59,7 @@ function _objectWithoutPropertiesLoose(r, e) {
|
|
|
59
59
|
if (null == r) return {};
|
|
60
60
|
var t = {};
|
|
61
61
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
62
|
-
if (e.
|
|
62
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
63
63
|
t[n] = r[n];
|
|
64
64
|
}
|
|
65
65
|
return t;
|
|
@@ -120,8 +120,9 @@ var Button = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
|
120
120
|
"data-type": variant !== 'standard' && variant !== 'unstyled' ? variant : null,
|
|
121
121
|
onClick: handleClick,
|
|
122
122
|
ref: ref
|
|
123
|
-
}, props), children);
|
|
123
|
+
}, props), children, " poop");
|
|
124
124
|
});
|
|
125
|
+
Button.displayName = 'Button';
|
|
125
126
|
|
|
126
127
|
var _excluded$5 = ["children", "className", "variant"];
|
|
127
128
|
var CallToAction = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
@@ -138,6 +139,7 @@ var CallToAction = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref)
|
|
|
138
139
|
ref: ref
|
|
139
140
|
}, props), children);
|
|
140
141
|
});
|
|
142
|
+
CallToAction.displayName = 'CallToAction';
|
|
141
143
|
|
|
142
144
|
function getFragmentFromUrl(url) {
|
|
143
145
|
return url.includes('#') ? url.split('#').pop() : undefined;
|
|
@@ -288,7 +290,6 @@ function ErrorMessage(_ref) {
|
|
|
288
290
|
|
|
289
291
|
var _excluded$2 = ["className", "error", "hint", "id", "isOptional", "label"];
|
|
290
292
|
var FieldTextInput = /*#__PURE__*/React__namespace.forwardRef(function (_ref, ref) {
|
|
291
|
-
var _id;
|
|
292
293
|
var className = _ref.className,
|
|
293
294
|
error = _ref.error,
|
|
294
295
|
hint = _ref.hint,
|
|
@@ -297,7 +298,7 @@ var FieldTextInput = /*#__PURE__*/React__namespace.forwardRef(function (_ref, re
|
|
|
297
298
|
isOptional = _ref$isOptional === void 0 ? false : _ref$isOptional,
|
|
298
299
|
label = _ref.label,
|
|
299
300
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
300
|
-
id =
|
|
301
|
+
id = id !== null && id !== void 0 ? id : props.name;
|
|
301
302
|
var errorId = React__namespace.useId();
|
|
302
303
|
var hintId = React__namespace.useId();
|
|
303
304
|
return /*#__PURE__*/React__namespace.createElement("div", {
|
|
@@ -319,6 +320,7 @@ var FieldTextInput = /*#__PURE__*/React__namespace.forwardRef(function (_ref, re
|
|
|
319
320
|
ref: ref
|
|
320
321
|
}, props)));
|
|
321
322
|
});
|
|
323
|
+
FieldTextInput.displayName = 'FieldTextInput';
|
|
322
324
|
|
|
323
325
|
var _excluded$1 = ["buildPageUrl", "className", "currentPage", "onPageClick", "totalPages"];
|
|
324
326
|
function usePages(currentPage, totalPages) {
|
package/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../src/Button/Button.tsx","../src/CallToAction/CallToAction.tsx","../src/ErrorSummary/utils.ts","../src/ErrorSummary/ErrorSummary.tsx","../src/ErrorMessage/ErrorMessage.tsx","../src/FieldTextInput/FieldTextInput.tsx","../src/Pagination/Pagination.tsx","../src/Typography/Typography.tsx"],"sourcesContent":["import * as React from 'react';\n\nconst DEBOUNCE_TIMEOUT_IN_SECONDS = 1;\n\nexport interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n preventDoubleClick?: boolean;\n variant?: 'cancel' | 'featured' | 'quote' | 'reverse' | 'search' | 'standard' | 'unstyled';\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ children, className, onClick, preventDoubleClick = false, variant = 'standard', ...props }, ref) => {\n const debounceClicks = React.useRef(false);\n\n const handleClick: React.MouseEventHandler<HTMLButtonElement> = (event) => {\n // ๐ button is not configured to ignore double clicks\n if (!preventDoubleClick) {\n if (onClick) {\n onClick(event);\n }\n\n return;\n }\n\n // ๐ button has been clicked recently, and subsequent clicks are prevented\n if (debounceClicks.current) {\n event.preventDefault();\n return;\n }\n\n if (onClick) {\n onClick(event);\n }\n\n // ๐ block from double clicks\n debounceClicks.current = true;\n\n // ๐ and remove the block after a given amount of seconds\n setTimeout(() => {\n debounceClicks.current = false;\n }, DEBOUNCE_TIMEOUT_IN_SECONDS * 1000);\n };\n\n return (\n <button\n className={[variant === 'unstyled' ? 'bds-button-unstyled' : 'bds-button', className]\n .filter((x) => x)\n .join(' ')}\n data-type={variant !== 'standard' && variant !== 'unstyled' ? variant : null}\n onClick={handleClick}\n ref={ref}\n {...props}\n >\n {children}\n </button>\n );\n },\n);\n\nexport default Button;\n","import * as React from 'react';\n\nexport interface CallToActionProps extends React.ComponentPropsWithoutRef<'a'> {\n variant?: 'featured' | 'quote' | 'standard';\n}\n\nconst CallToAction = React.forwardRef<HTMLAnchorElement, CallToActionProps>(\n ({ children, className, variant = 'standard', ...props }, ref) => {\n return (\n <a\n className={['bds-cta', className].filter((x) => x).join(' ')}\n data-type={variant !== 'standard' ? variant : null}\n ref={ref}\n {...props}\n >\n {children}\n </a>\n );\n },\n);\n\nexport default CallToAction;\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';\n\nimport { getAssociatedLegendOrLabel, getFragmentFromUrl } from './utils';\n\ndeclare global {\n namespace JSX {\n interface IntrinsicElements {\n 'bds-error-summary': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n }\n }\n}\n\nexport const FormErrorKey = '_form';\n\nconst FINAL_FORM_ERROR = 'FINAL_FORM/form-error';\n\nexport type ErrorSummaryProps = {\n errors: Record<string, Array<string> | string> | null;\n mapNameToId?: (name: string) => string;\n};\n\nexport default function BdsErrorSummary({\n errors,\n mapNameToId = (name) => name,\n ...props\n}: ErrorSummaryProps & React.ComponentPropsWithoutRef<'div'>) {\n const headingId = React.useId();\n const groupRef = React.useRef<HTMLElement>(null);\n\n React.useEffect(() => {\n if (!errors || Object.keys(errors).length === 0) return;\n if (!groupRef.current) return;\n\n groupRef.current.focus();\n }, [errors]);\n\n if (!errors || Object.keys(errors).length === 0) return null;\n\n const handleLinkClick = (e) => {\n const inputId = getFragmentFromUrl(e.currentTarget.href);\n\n if (!inputId) {\n return;\n }\n\n const input = document.getElementById(inputId);\n\n if (!input) {\n return;\n }\n\n const legendOrLabel = getAssociatedLegendOrLabel(input);\n\n if (!legendOrLabel) {\n return;\n }\n\n e.preventDefault();\n\n legendOrLabel.scrollIntoView();\n input.focus({ preventScroll: true });\n };\n\n return (\n // biome-ignore lint/a11y/useSemanticElements: <fieldset> is not what we want here\n // biome-ignore lint/a11y/noInteractiveElementToNoninteractiveRole: group is not an interactive role\n <bds-error-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 Issue\n </h2>\n <ul>\n {Object.keys(errors).map((errorKey) => {\n const message = errors[errorKey];\n const isFormError = [FINAL_FORM_ERROR, FormErrorKey].includes(errorKey);\n\n if (isFormError) {\n // biome-ignore lint/security/noDangerouslySetInnerHtml: some generic form errors may include links\n return <li key={errorKey} dangerouslySetInnerHTML={{ __html: message }} />;\n }\n\n const isArrayField = Array.isArray(message);\n\n const messages = isArrayField ? message : [message];\n\n return (\n <React.Fragment key={errorKey}>\n {messages.map((fieldMessage, index) => {\n const inputId = `${mapNameToId(errorKey)}${isArrayField ? `[${index}]` : ''}`;\n\n return (\n <li key={inputId}>\n <a href={`#${inputId}`} onClick={handleLinkClick}>\n {fieldMessage}\n {messages.length > 1 ? ` (${index + 1} of ${messages.length})` : undefined}\n </a>\n </li>\n );\n })}\n </React.Fragment>\n );\n })}\n </ul>\n </bds-error-summary>\n );\n}\n","// 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 FieldTextInputProps = {\n error?: string;\n hint?: string;\n id?: string;\n isOptional?: boolean;\n label: string;\n} & React.ComponentPropsWithoutRef<'input'>;\n\nconst FieldTextInput = React.forwardRef<HTMLInputElement, FieldTextInputProps>(\n ({ className, error, hint, id, isOptional = false, label, ...props }, ref) => {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <input\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className={['bds-text-input', className].filter((x) => x).join(' ')}\n id={id}\n ref={ref}\n {...props}\n />\n </div>\n );\n },\n);\n\nexport default FieldTextInput;\n","import * as React from 'react';\n\nexport type PaginationProps = {\n buildPageUrl: (page: number) => string;\n currentPage: number;\n onPageClick?: (page: number) => void;\n totalPages: number;\n};\n\nfunction usePages(currentPage: number, totalPages: number) {\n const pages = [1, currentPage - 1, currentPage, currentPage + 1, totalPages].filter(\n (x) => x >= 1 && x <= totalPages,\n );\n return [...new Set(pages)];\n}\n\nexport default function Pagination({\n buildPageUrl,\n className,\n currentPage,\n onPageClick,\n totalPages,\n ...props\n}: PaginationProps & React.ComponentPropsWithoutRef<'nav'>) {\n const pages = usePages(currentPage, totalPages);\n\n return (\n <nav aria-label=\"pagination\" className={['bds-pagination', className].filter((x) => x).join(' ')} {...props}>\n {currentPage !== 1 && (\n <>\n <a href={buildPageUrl(1)} className=\"bds-first-page\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n height=\"1em\"\n width=\"100%\"\n viewBox=\"0 63.95 512 384.1\"\n >\n <path d=\"M459.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29V96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4L288 214.3v83.4l171.5 142.9zM256 352V96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160C4.2 237.5 0 246.5 0 256s4.2 18.5 11.5 24.6l192 160c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29v-64z\" />\n </svg>\n First\n </a>\n <a aria-label=\"previous\" href={buildPageUrl(currentPage - 1)} rel=\"prev\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n width=\"100%\"\n height=\"1em\"\n viewBox=\"0.02 95.9 192.08 320.17\"\n >\n <path d=\"M9.4 278.6c-12.5-12.5-12.5-32.8 0-45.3l128-128c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6v256c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-128-128z\" />\n </svg>\n Prev.\n </a>\n </>\n )}\n <ul>\n {pages.map((page, index) => {\n const handlePageClick = () => {\n if (!onPageClick) return;\n\n onPageClick(page);\n };\n\n return (\n <React.Fragment key={page}>\n <li>\n <a\n aria-current={page === currentPage ? 'page' : undefined}\n href={buildPageUrl(page)}\n onClick={handlePageClick}\n >\n <span className=\"visually-hidden\">Page</span> {page}\n </a>\n </li>\n {pages[index + 1] > page + 1 ? <li data-overflow=\"\">...</li> : null}\n </React.Fragment>\n );\n })}\n </ul>\n {currentPage !== totalPages && (\n <>\n <a href={buildPageUrl(currentPage + 1)} rel=\"next\">\n Next\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"63.9 95.9 192.1 320.17\"\n width=\"100%\"\n height=\"1em\"\n >\n <path d=\"M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9S63.9 115 63.9 128v256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z\" />\n </svg>\n </a>\n <a href={buildPageUrl(totalPages)} className=\"bds-last-page\">\n Last\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n width=\"100%\"\n height=\"1em\"\n viewBox=\"0 63.95 512 384.1\"\n >\n <path d=\"M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416V96c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4L224 214.3v83.4L52.5 440.6zM256 352V96c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4l192 160c7.3 6.1 11.5 15.1 11.5 24.6s-4.2 18.5-11.5 24.6l-192 160c-9.5 7.9-22.8 9.7-34.1 4.4S256 428.4 256 416v-64z\" />\n </svg>\n </a>\n </>\n )}\n </nav>\n );\n}\n","import * as React from 'react';\n\nconst componentMap = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n body: 'p',\n};\n\nconst classMap = {\n h1: 'bds-h1',\n h2: 'bds-h2',\n h3: 'bds-h3',\n h4: 'bds-h4',\n h5: 'bds-h5',\n body: 'bds-body',\n};\n\nexport type TypographyProps = {\n component?: React.ElementType;\n variant?: 'body' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n};\n\nconst Typography = React.forwardRef<HTMLOrSVGElement, React.HTMLAttributes<HTMLOrSVGElement> & TypographyProps>(\n ({ className, component, variant = 'body', ...props }, ref) => {\n const Component = component ?? (componentMap[variant] as React.ElementType);\n\n return (\n <Component className={[classMap[variant], className].filter((x) => x).join(' ')} ref={ref} {...props} />\n );\n },\n);\n\nTypography.displayName = 'Typography';\n\nexport default Typography;\n"],"names":["DEBOUNCE_TIMEOUT_IN_SECONDS","Button","React","forwardRef","_ref","ref","children","className","onClick","_ref$preventDoubleCli","preventDoubleClick","_ref$variant","variant","props","_objectWithoutProperties","_excluded","debounceClicks","useRef","handleClick","event","current","preventDefault","setTimeout","createElement","_extends","filter","x","join","CallToAction","getFragmentFromUrl","url","includes","split","pop","undefined","getAssociatedLegendOrLabel","input","_document$querySelect","fieldset","closest","legends","getElementsByTagName","length","candidateLegend","HTMLInputElement","type","legendTop","getBoundingClientRect","top","inputRect","height","window","innerHeight","inputBottom","document","querySelector","concat","getAttribute","FormErrorKey","FINAL_FORM_ERROR","BdsErrorSummary","errors","_ref$mapNameToId","mapNameToId","name","headingId","useId","groupRef","useEffect","Object","keys","focus","handleLinkClick","e","inputId","currentTarget","href","getElementById","legendOrLabel","scrollIntoView","preventScroll","role","tabIndex","id","xmlns","viewBox","width","fill","d","map","errorKey","message","isFormError","key","dangerouslySetInnerHTML","__html","isArrayField","Array","isArray","messages","Fragment","fieldMessage","index","ErrorMessage","FieldTextInput","_id","error","hint","_ref$isOptional","isOptional","label","errorId","hintId","htmlFor","usePages","currentPage","totalPages","pages","_toConsumableArray","Set","Pagination","buildPageUrl","onPageClick","focusable","rel","page","handlePageClick","componentMap","h1","h2","h3","h4","h5","body","classMap","Typography","component","Component","displayName"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,2BAA2B,GAAG,CAAC;AAO/BC,IAAAA,MAAM,gBAAGC,gBAAK,CAACC,UAAU,CAC7B,UAAAC,IAAA,EAA+FC,GAAG,EAAK;AAAA,EAAA,IAApGC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAEC,OAAO,GAAAJ,IAAA,CAAPI,OAAO;IAAAC,qBAAA,GAAAL,IAAA,CAAEM,kBAAkB;AAAlBA,IAAAA,kBAAkB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,KAAK,GAAAA,qBAAA;IAAAE,YAAA,GAAAP,IAAA,CAAEQ,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,YAAA;AAAKE,IAAAA,KAAK,GAAAC,wBAAA,CAAAV,IAAA,EAAAW,WAAA,CAAA;AACzF,EAAA,IAAMC,cAAc,GAAGd,gBAAK,CAACe,MAA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IAAA,EAAAW,SAAA,CAAA;EACjD,IAAM0H,SAAS,GAAGD,SAAS,KAATA,IAAAA,IAAAA,SAAS,KAATA,KAAAA,CAAAA,GAAAA,SAAS,GAAKT,YAAY,CAACnH,OAAO,CAAuB;AAE3E,EAAA,oBACEV,gBAAA,CAAAqB,aAAA,CAACkH,SAAS,EAAAjH,QAAA,CAAA;AAACjB,IAAAA,SAAS,EAAE,CAAC+H,QAAQ,CAAC1H,OAAO,CAAC,EAAEL,SAAS,CAAC,CAACkB,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,CAAC;AAAA,KAAA,CAAC,CAACC,IAAI,CAAC,GAAG,CAAE;AAACtB,IAAAA,GAAG,EAAEA;GAASQ,EAAAA,KAAK,CAAG,CAAC;AAE5G,CACF;AAEA0H,UAAU,CAACG,WAAW,GAAG,YAAY;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../src/Button/Button.tsx","../src/CallToAction/CallToAction.tsx","../src/ErrorSummary/utils.ts","../src/ErrorSummary/ErrorSummary.tsx","../src/ErrorMessage/ErrorMessage.tsx","../src/FieldTextInput/FieldTextInput.tsx","../src/Pagination/Pagination.tsx","../src/Typography/Typography.tsx"],"sourcesContent":["import * as React from 'react';\n\nconst DEBOUNCE_TIMEOUT_IN_SECONDS = 1;\n\nexport interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {\n preventDoubleClick?: boolean;\n variant?: 'cancel' | 'featured' | 'quote' | 'reverse' | 'search' | 'standard' | 'unstyled';\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ children, className, onClick, preventDoubleClick = false, variant = 'standard', ...props }, ref) => {\n const debounceClicks = React.useRef(false);\n\n const handleClick: React.MouseEventHandler<HTMLButtonElement> = (event) => {\n // ๐ button is not configured to ignore double clicks\n if (!preventDoubleClick) {\n if (onClick) {\n onClick(event);\n }\n\n return;\n }\n\n // ๐ button has been clicked recently, and subsequent clicks are prevented\n if (debounceClicks.current) {\n event.preventDefault();\n return;\n }\n\n if (onClick) {\n onClick(event);\n }\n\n // ๐ block from double clicks\n debounceClicks.current = true;\n\n // ๐ and remove the block after a given amount of seconds\n setTimeout(() => {\n debounceClicks.current = false;\n }, DEBOUNCE_TIMEOUT_IN_SECONDS * 1000);\n };\n\n return (\n <button\n className={[variant === 'unstyled' ? 'bds-button-unstyled' : 'bds-button', className]\n .filter((x) => x)\n .join(' ')}\n data-type={variant !== 'standard' && variant !== 'unstyled' ? variant : null}\n onClick={handleClick}\n ref={ref}\n {...props}\n >\n {children} poop\n </button>\n );\n },\n);\n\nButton.displayName = 'Button';\n\nexport default Button;\n","import * as React from 'react';\n\nexport interface CallToActionProps extends React.ComponentPropsWithoutRef<'a'> {\n variant?: 'featured' | 'quote' | 'standard';\n}\n\nconst CallToAction = React.forwardRef<HTMLAnchorElement, CallToActionProps>(\n ({ children, className, variant = 'standard', ...props }, ref) => {\n return (\n <a\n className={['bds-cta', className].filter((x) => x).join(' ')}\n data-type={variant !== 'standard' ? variant : null}\n ref={ref}\n {...props}\n >\n {children}\n </a>\n );\n },\n);\n\nCallToAction.displayName = 'CallToAction';\n\nexport default CallToAction;\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';\n\nimport { getAssociatedLegendOrLabel, getFragmentFromUrl } from './utils';\n\ndeclare global {\n namespace JSX {\n interface IntrinsicElements {\n 'bds-error-summary': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\n }\n }\n}\n\nexport const FormErrorKey = '_form';\n\nconst FINAL_FORM_ERROR = 'FINAL_FORM/form-error';\n\nexport type ErrorSummaryProps = {\n errors: Record<string, Array<string> | string> | null;\n mapNameToId?: (name: string) => string;\n};\n\nexport default function BdsErrorSummary({\n errors,\n mapNameToId = (name) => name,\n ...props\n}: ErrorSummaryProps & React.ComponentPropsWithoutRef<'div'>) {\n const headingId = React.useId();\n const groupRef = React.useRef<HTMLElement>(null);\n\n React.useEffect(() => {\n if (!errors || Object.keys(errors).length === 0) return;\n if (!groupRef.current) return;\n\n groupRef.current.focus();\n }, [errors]);\n\n if (!errors || Object.keys(errors).length === 0) return null;\n\n const handleLinkClick = (e) => {\n const inputId = getFragmentFromUrl(e.currentTarget.href);\n\n if (!inputId) {\n return;\n }\n\n const input = document.getElementById(inputId);\n\n if (!input) {\n return;\n }\n\n const legendOrLabel = getAssociatedLegendOrLabel(input);\n\n if (!legendOrLabel) {\n return;\n }\n\n e.preventDefault();\n\n legendOrLabel.scrollIntoView();\n input.focus({ preventScroll: true });\n };\n\n return (\n // biome-ignore lint/a11y/useSemanticElements: <fieldset> is not what we want here\n // biome-ignore lint/a11y/noInteractiveElementToNoninteractiveRole: group is not an interactive role\n <bds-error-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 Issue\n </h2>\n <ul>\n {Object.keys(errors).map((errorKey) => {\n const message = errors[errorKey];\n const isFormError = [FINAL_FORM_ERROR, FormErrorKey].includes(errorKey);\n\n if (isFormError) {\n // biome-ignore lint/security/noDangerouslySetInnerHtml: some generic form errors may include links\n return <li key={errorKey} dangerouslySetInnerHTML={{ __html: message }} />;\n }\n\n const isArrayField = Array.isArray(message);\n\n const messages = isArrayField ? message : [message];\n\n return (\n <React.Fragment key={errorKey}>\n {messages.map((fieldMessage, index) => {\n const inputId = `${mapNameToId(errorKey)}${isArrayField ? `[${index}]` : ''}`;\n\n return (\n <li key={inputId}>\n <a href={`#${inputId}`} onClick={handleLinkClick}>\n {fieldMessage}\n {messages.length > 1 ? ` (${index + 1} of ${messages.length})` : undefined}\n </a>\n </li>\n );\n })}\n </React.Fragment>\n );\n })}\n </ul>\n </bds-error-summary>\n );\n}\n","// 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 FieldTextInputProps = {\n error?: string;\n hint?: React.ReactNode | string;\n id?: string;\n isOptional?: boolean;\n label: string;\n} & React.ComponentPropsWithoutRef<'input'>;\n\nconst FieldTextInput = React.forwardRef<HTMLInputElement, FieldTextInputProps>(\n ({ className, error, hint, id, isOptional = false, label, ...props }, ref) => {\n id = id ?? props.name;\n\n const errorId = React.useId();\n const hintId = React.useId();\n\n return (\n <div className=\"bds-form-group\">\n <label htmlFor={id}>\n {label}\n {isOptional && ' (optional)'}\n </label>\n {hint && (\n <span className=\"bds-hint\" id={hintId}>\n {hint}\n </span>\n )}\n {error && <ErrorMessage id={errorId}>{error}</ErrorMessage>}\n <input\n aria-invalid={error ? true : undefined}\n aria-describedby={error && hint ? `${hintId} ${errorId}` : error ? errorId : hint ? hintId : undefined}\n className={['bds-text-input', className].filter((x) => x).join(' ')}\n id={id}\n ref={ref}\n {...props}\n />\n </div>\n );\n },\n);\n\nFieldTextInput.displayName = 'FieldTextInput';\n\nexport default FieldTextInput;\n","import * as React from 'react';\n\nexport type PaginationProps = {\n buildPageUrl: (page: number) => string;\n currentPage: number;\n onPageClick?: (page: number) => void;\n totalPages: number;\n};\n\nfunction usePages(currentPage: number, totalPages: number) {\n const pages = [1, currentPage - 1, currentPage, currentPage + 1, totalPages].filter(\n (x) => x >= 1 && x <= totalPages,\n );\n return [...new Set(pages)];\n}\n\nexport default function Pagination({\n buildPageUrl,\n className,\n currentPage,\n onPageClick,\n totalPages,\n ...props\n}: PaginationProps & React.ComponentPropsWithoutRef<'nav'>) {\n const pages = usePages(currentPage, totalPages);\n\n return (\n <nav aria-label=\"pagination\" className={['bds-pagination', className].filter((x) => x).join(' ')} {...props}>\n {currentPage !== 1 && (\n <>\n <a href={buildPageUrl(1)} className=\"bds-first-page\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n height=\"1em\"\n width=\"100%\"\n viewBox=\"0 63.95 512 384.1\"\n >\n <path d=\"M459.5 440.6c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29V96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4L288 214.3v83.4l171.5 142.9zM256 352V96c0-12.4-7.2-23.7-18.4-29s-24.5-3.6-34.1 4.4l-192 160C4.2 237.5 0 246.5 0 256s4.2 18.5 11.5 24.6l192 160c9.5 7.9 22.8 9.7 34.1 4.4s18.4-16.6 18.4-29v-64z\" />\n </svg>\n First\n </a>\n <a aria-label=\"previous\" href={buildPageUrl(currentPage - 1)} rel=\"prev\">\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n width=\"100%\"\n height=\"1em\"\n viewBox=\"0.02 95.9 192.08 320.17\"\n >\n <path d=\"M9.4 278.6c-12.5-12.5-12.5-32.8 0-45.3l128-128c9.2-9.2 22.9-11.9 34.9-6.9s19.8 16.6 19.8 29.6v256c0 12.9-7.8 24.6-19.8 29.6s-25.7 2.2-34.9-6.9l-128-128z\" />\n </svg>\n Prev.\n </a>\n </>\n )}\n <ul>\n {pages.map((page, index) => {\n const handlePageClick = () => {\n if (!onPageClick) return;\n\n onPageClick(page);\n };\n\n return (\n <React.Fragment key={page}>\n <li>\n <a\n aria-current={page === currentPage ? 'page' : undefined}\n href={buildPageUrl(page)}\n onClick={handlePageClick}\n >\n <span className=\"visually-hidden\">Page</span> {page}\n </a>\n </li>\n {pages[index + 1] > page + 1 ? <li data-overflow=\"\">...</li> : null}\n </React.Fragment>\n );\n })}\n </ul>\n {currentPage !== totalPages && (\n <>\n <a href={buildPageUrl(currentPage + 1)} rel=\"next\">\n Next\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n viewBox=\"63.9 95.9 192.1 320.17\"\n width=\"100%\"\n height=\"1em\"\n >\n <path d=\"M246.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-9.2-9.2-22.9-11.9-34.9-6.9S63.9 115 63.9 128v256c0 12.9 7.8 24.6 19.8 29.6s25.7 2.2 34.9-6.9l128-128z\" />\n </svg>\n </a>\n <a href={buildPageUrl(totalPages)} className=\"bds-last-page\">\n Last\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n focusable=\"false\"\n width=\"100%\"\n height=\"1em\"\n viewBox=\"0 63.95 512 384.1\"\n >\n <path d=\"M52.5 440.6c-9.5 7.9-22.8 9.7-34.1 4.4S0 428.4 0 416V96c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4L224 214.3v83.4L52.5 440.6zM256 352V96c0-12.4 7.2-23.7 18.4-29s24.5-3.6 34.1 4.4l192 160c7.3 6.1 11.5 15.1 11.5 24.6s-4.2 18.5-11.5 24.6l-192 160c-9.5 7.9-22.8 9.7-34.1 4.4S256 428.4 256 416v-64z\" />\n </svg>\n </a>\n </>\n )}\n </nav>\n );\n}\n","import * as React from 'react';\n\nconst componentMap = {\n h1: 'h1',\n h2: 'h2',\n h3: 'h3',\n h4: 'h4',\n h5: 'h5',\n body: 'p',\n};\n\nconst classMap = {\n h1: 'bds-h1',\n h2: 'bds-h2',\n h3: 'bds-h3',\n h4: 'bds-h4',\n h5: 'bds-h5',\n body: 'bds-body',\n};\n\nexport type TypographyProps = {\n component?: React.ElementType;\n variant?: 'body' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5';\n};\n\nconst Typography = React.forwardRef<HTMLOrSVGElement, React.HTMLAttributes<HTMLOrSVGElement> & TypographyProps>(\n ({ className, component, variant = 'body', ...props }, ref) => {\n const Component = component ?? (componentMap[variant] as React.ElementType);\n\n return (\n <Component className={[classMap[variant], className].filter((x) => x).join(' ')} ref={ref} {...props} />\n );\n },\n);\n\nTypography.displayName = 'Typography';\n\nexport default Typography;\n"],"names":["DEBOUNCE_TIMEOUT_IN_SECONDS","Button","React","forwardRef","_ref","ref","children","className","onClick","_ref$preventDoubleCli","preventDoubleClick","_ref$variant","variant","props","_objectWithoutProperties","_excluded","debounceClicks","useRef","handleClick","event","current","preventDefault","setTimeout","createElement","_extends","filter","x","join","displayName","CallToAction","getFragmentFromUrl","url","includes","split","pop","undefined","getAssociatedLegendOrLabel","input","_document$querySelect","fieldset","closest","legends","getElementsByTagName","length","candidateLegend","HTMLInputElement","type","legendTop","getBoundingClientRect","top","inputRect","height","window","innerHeight","inputBottom","document","querySelector","concat","getAttribute","FormErrorKey","FINAL_FORM_ERROR","BdsErrorSummary","errors","_ref$mapNameToId","mapNameToId","name","headingId","useId","groupRef","useEffect","Object","keys","focus","handleLinkClick","e","inputId","currentTarget","href","getElementById","legendOrLabel","scrollIntoView","preventScroll","role","tabIndex","id","xmlns","viewBox","width","fill","d","map","errorKey","message","isFormError","key","dangerouslySetInnerHTML","__html","isArrayField","Array","isArray","messages","Fragment","fieldMessage","index","ErrorMessage","FieldTextInput","error","hint","_ref$isOptional","isOptional","label","errorId","hintId","htmlFor","usePages","currentPage","totalPages","pages","_toConsumableArray","Set","Pagination","buildPageUrl","onPageClick","focusable","rel","page","handlePageClick","componentMap","h1","h2","h3","h4","h5","body","classMap","Typography","component","Component"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,2BAA2B,GAAG,CAAC;AAO/BC,IAAAA,MAAM,gBAAGC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