@iabbb/bds-react 0.40.0-beta.9 โ 0.40.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/Button.d.ts +7 -7
- package/Button/index.cjs.map +1 -1
- package/Button/index.d.ts +2 -2
- package/Button/index.mjs.map +1 -1
- package/CallToAction/CallToAction.d.ts +6 -6
- package/CallToAction/index.cjs.map +1 -1
- package/CallToAction/index.d.ts +2 -2
- package/CallToAction/index.mjs.map +1 -1
- package/ErrorSummary/ErrorSummary.d.ts +14 -15
- package/ErrorSummary/index.cjs +54 -357
- package/ErrorSummary/index.cjs.map +1 -1
- package/ErrorSummary/index.d.ts +2 -2
- package/ErrorSummary/index.mjs +54 -357
- package/ErrorSummary/index.mjs.map +1 -1
- package/ErrorSummary/package.json +1 -4
- package/ErrorSummary/utils.d.ts +2 -2
- package/FieldTextInput/FieldTextInput.d.ts +10 -10
- package/FieldTextInput/index.cjs.map +1 -1
- package/FieldTextInput/index.d.ts +1 -1
- package/FieldTextInput/index.mjs.map +1 -1
- package/Pagination/Pagination.d.ts +8 -8
- package/Pagination/index.cjs.map +1 -1
- package/Pagination/index.d.ts +1 -1
- package/Pagination/index.mjs.map +1 -1
- package/README.md +17 -17
- package/Typography/Typography.d.ts +7 -7
- package/Typography/index.cjs.map +1 -1
- package/Typography/index.d.ts +1 -1
- package/Typography/index.mjs.map +1 -1
- package/index.cjs +52 -574
- package/index.cjs.map +1 -1
- package/index.d.ts +6 -6
- package/index.mjs +52 -574
- package/index.mjs.map +1 -1
- package/package.json +35 -40
- package/dom-shim.d.ts +0 -1
package/Button/Button.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
|
|
3
|
-
preventDoubleClick?: boolean;
|
|
4
|
-
variant?: 'cancel' | 'featured' | 'quote' | 'search' | 'standard' | 'unstyled';
|
|
5
|
-
}
|
|
6
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
-
export default Button;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface ButtonProps extends React.ComponentPropsWithoutRef<'button'> {
|
|
3
|
+
preventDoubleClick?: boolean;
|
|
4
|
+
variant?: 'cancel' | 'featured' | 'quote' | 'search' | 'standard' | 'unstyled';
|
|
5
|
+
}
|
|
6
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export default Button;
|
package/Button/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/Button/Button.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' | '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"],"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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,2BAA2B,GAAG,CAAC,CAAA;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,SAAA,CAAA,CAAA;AACzF,EAAA,IAAMC,cAAc,GAAGd,gBAAK,CAACe,MAAM,CAAC,KAAK,CAAC,CAAA;AAE1C,EAAA,IAAMC,WAAuD,GAAG,SAA1DA,WAAuDA,CAAIC,KAAK,EAAK;AACzE;IACA,IAAI,CAACT,kBAAkB,EAAE;AACvB,MAAA,IAAIF,OAAO,EAAE;QACXA,OAAO,CAACW,KAAK,CAAC,CAAA;AAChB,OAAA;AAEA,MAAA,OAAA;AACF,KAAA;;AAEA;IACA,IAAIH,cAAc,CAACI,OAAO,EAAE;MAC1BD,KAAK,CAACE,cAAc,EAAE,CAAA;AACtB,MAAA,OAAA;AACF,KAAA;AAEA,IAAA,IAAIb,OAAO,EAAE;MACXA,OAAO,CAACW,KAAK,CAAC,CAAA;AAChB,KAAA;;AAEA;IACAH,cAAc,CAACI,OAAO,GAAG,IAAI,CAAA;;AAE7B;AACAE,IAAAA,UAAU,CAAC,YAAM;MACfN,cAAc,CAACI,OAAO,GAAG,KAAK,CAAA;AAChC,KAAC,EAAEpB,2BAA2B,GAAG,IAAI,CAAC,CAAA;GACvC,CAAA;AAED,EAAA,oBACEE,gBAAA,CAAAqB,aAAA,CAAA,QAAA,EAAAC,QAAA,CAAA;AACEjB,IAAAA,SAAS,EAAE,CAACK,OAAO,KAAK,UAAU,GAAG,qBAAqB,GAAG,YAAY,EAAEL,SAAS,CAAC,CAClFkB,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,CAAC,CAAA;AAAA,KAAA,CAAC,CAChBC,IAAI,CAAC,GAAG,CAAE;IACb,WAAWf,EAAAA,OAAO,KAAK,UAAU,IAAIA,OAAO,KAAK,UAAU,GAAGA,OAAO,GAAG,IAAK;AAC7EJ,IAAAA,OAAO,EAAEU,WAAY;AACrBb,IAAAA,GAAG,EAAEA,GAAAA;GACDQ,EAAAA,KAAK,CAERP,EAAAA,QACK,CAAC,CAAA;AAEb,CACF;;;;"}
|
package/Button/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './Button';
|
|
2
|
-
export * from './Button';
|
|
1
|
+
export { default } from './Button';
|
|
2
|
+
export * from './Button';
|
package/Button/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/Button/Button.tsx"],"sourcesContent":["import * as React from 'react';\
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/Button/Button.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' | '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"],"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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,2BAA2B,GAAG,CAAC,CAAA;AAO/BC,IAAAA,MAAM,gBAAGC,KAAK,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,SAAA,CAAA,CAAA;AACzF,EAAA,IAAMC,cAAc,GAAGd,KAAK,CAACe,MAAM,CAAC,KAAK,CAAC,CAAA;AAE1C,EAAA,IAAMC,WAAuD,GAAG,SAA1DA,WAAuDA,CAAIC,KAAK,EAAK;AACzE;IACA,IAAI,CAACT,kBAAkB,EAAE;AACvB,MAAA,IAAIF,OAAO,EAAE;QACXA,OAAO,CAACW,KAAK,CAAC,CAAA;AAChB,OAAA;AAEA,MAAA,OAAA;AACF,KAAA;;AAEA;IACA,IAAIH,cAAc,CAACI,OAAO,EAAE;MAC1BD,KAAK,CAACE,cAAc,EAAE,CAAA;AACtB,MAAA,OAAA;AACF,KAAA;AAEA,IAAA,IAAIb,OAAO,EAAE;MACXA,OAAO,CAACW,KAAK,CAAC,CAAA;AAChB,KAAA;;AAEA;IACAH,cAAc,CAACI,OAAO,GAAG,IAAI,CAAA;;AAE7B;AACAE,IAAAA,UAAU,CAAC,YAAM;MACfN,cAAc,CAACI,OAAO,GAAG,KAAK,CAAA;AAChC,KAAC,EAAEpB,2BAA2B,GAAG,IAAI,CAAC,CAAA;GACvC,CAAA;AAED,EAAA,oBACEE,KAAA,CAAAqB,aAAA,CAAA,QAAA,EAAAC,QAAA,CAAA;AACEjB,IAAAA,SAAS,EAAE,CAACK,OAAO,KAAK,UAAU,GAAG,qBAAqB,GAAG,YAAY,EAAEL,SAAS,CAAC,CAClFkB,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,CAAC,CAAA;AAAA,KAAA,CAAC,CAChBC,IAAI,CAAC,GAAG,CAAE;IACb,WAAWf,EAAAA,OAAO,KAAK,UAAU,IAAIA,OAAO,KAAK,UAAU,GAAGA,OAAO,GAAG,IAAK;AAC7EJ,IAAAA,OAAO,EAAEU,WAAY;AACrBb,IAAAA,GAAG,EAAEA,GAAAA;GACDQ,EAAAA,KAAK,CAERP,EAAAA,QACK,CAAC,CAAA;AAEb,CACF;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
export interface CallToActionProps extends React.ComponentPropsWithoutRef<'a'> {
|
|
3
|
-
variant?: 'featured' | 'quote' | 'standard';
|
|
4
|
-
}
|
|
5
|
-
declare const CallToAction: React.ForwardRefExoticComponent<CallToActionProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
6
|
-
export default CallToAction;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface CallToActionProps extends React.ComponentPropsWithoutRef<'a'> {
|
|
3
|
+
variant?: 'featured' | 'quote' | 'standard';
|
|
4
|
+
}
|
|
5
|
+
declare const CallToAction: React.ForwardRefExoticComponent<CallToActionProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
6
|
+
export default CallToAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../src/CallToAction/CallToAction.tsx"],"sourcesContent":["import * as React from 'react';\
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../src/CallToAction/CallToAction.tsx"],"sourcesContent":["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"],"names":["CallToAction","React","forwardRef","_ref","ref","children","className","_ref$variant","variant","props","_objectWithoutProperties","_excluded","createElement","_extends","filter","x","join"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMMA,IAAAA,YAAY,gBAAGC,gBAAK,CAACC,UAAU,CACnC,UAAAC,IAAA,EAA0DC,GAAG,EAAK;AAAA,EAAA,IAA/DC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAAC,YAAA,GAAAJ,IAAA,CAAEK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,YAAA;AAAKE,IAAAA,KAAK,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;AACpD,EAAA,oBACEV,gBAAA,CAAAW,aAAA,CAAA,GAAA,EAAAC,QAAA,CAAA;IACEP,SAAS,EAAE,CAAC,SAAS,EAAEA,SAAS,CAAC,CAACQ,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,CAAC,CAAA;AAAA,KAAA,CAAC,CAACC,IAAI,CAAC,GAAG,CAAE;AAC7D,IAAA,WAAA,EAAWR,OAAO,KAAK,UAAU,GAAGA,OAAO,GAAG,IAAK;AACnDJ,IAAAA,GAAG,EAAEA,GAAAA;GACDK,EAAAA,KAAK,CAERJ,EAAAA,QACA,CAAC,CAAA;AAER,CACF;;;;"}
|
package/CallToAction/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { default } from './CallToAction';
|
|
2
|
-
export * from './CallToAction';
|
|
1
|
+
export { default } from './CallToAction';
|
|
2
|
+
export * from './CallToAction';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":["../../src/CallToAction/CallToAction.tsx"],"sourcesContent":["import * as React from 'react';\
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":["../../src/CallToAction/CallToAction.tsx"],"sourcesContent":["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"],"names":["CallToAction","React","forwardRef","_ref","ref","children","className","_ref$variant","variant","props","_objectWithoutProperties","_excluded","createElement","_extends","filter","x","join"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMMA,IAAAA,YAAY,gBAAGC,KAAK,CAACC,UAAU,CACnC,UAAAC,IAAA,EAA0DC,GAAG,EAAK;AAAA,EAAA,IAA/DC,QAAQ,GAAAF,IAAA,CAARE,QAAQ;IAAEC,SAAS,GAAAH,IAAA,CAATG,SAAS;IAAAC,YAAA,GAAAJ,IAAA,CAAEK,OAAO;AAAPA,IAAAA,OAAO,GAAAD,YAAA,KAAG,KAAA,CAAA,GAAA,UAAU,GAAAA,YAAA;AAAKE,IAAAA,KAAK,GAAAC,wBAAA,CAAAP,IAAA,EAAAQ,SAAA,CAAA,CAAA;AACpD,EAAA,oBACEV,KAAA,CAAAW,aAAA,CAAA,GAAA,EAAAC,QAAA,CAAA;IACEP,SAAS,EAAE,CAAC,SAAS,EAAEA,SAAS,CAAC,CAACQ,MAAM,CAAC,UAACC,CAAC,EAAA;AAAA,MAAA,OAAKA,CAAC,CAAA;AAAA,KAAA,CAAC,CAACC,IAAI,CAAC,GAAG,CAAE;AAC7D,IAAA,WAAA,EAAWR,OAAO,KAAK,UAAU,GAAGA,OAAO,GAAG,IAAK;AACnDJ,IAAAA,GAAG,EAAEA,GAAAA;GACDK,EAAAA,KAAK,CAERJ,EAAAA,QACA,CAAC,CAAA;AAER,CACF;;;;"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import '
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
export declare
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
};
|
|
15
|
-
export default function BdsErrorSummary({ className, errors, mapNameToId, ...props }: ErrorSummaryProps & React.ComponentPropsWithoutRef<'div'>): React.JSX.Element | null;
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
declare global {
|
|
3
|
+
namespace JSX {
|
|
4
|
+
interface IntrinsicElements {
|
|
5
|
+
'bds-error-summary': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare const FormErrorKey = "_form";
|
|
10
|
+
export declare type ErrorSummaryProps = {
|
|
11
|
+
errors: Record<string, Array<string> | string> | null;
|
|
12
|
+
mapNameToId?: (name: string) => string;
|
|
13
|
+
};
|
|
14
|
+
export default function BdsErrorSummary({ className, errors, mapNameToId, ...props }: ErrorSummaryProps & React.ComponentPropsWithoutRef<'div'>): React.JSX.Element | null;
|
package/ErrorSummary/index.cjs
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var ssrDomShim = require('@lit-labs/ssr-dom-shim');
|
|
6
5
|
var React = require('react');
|
|
7
6
|
|
|
8
7
|
function _interopNamespaceDefault(e) {
|
|
@@ -24,90 +23,6 @@ function _interopNamespaceDefault(e) {
|
|
|
24
23
|
|
|
25
24
|
var React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
|
|
26
25
|
|
|
27
|
-
function _iterableToArrayLimit(r, l) {
|
|
28
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
29
|
-
if (null != t) {
|
|
30
|
-
var e,
|
|
31
|
-
n,
|
|
32
|
-
i,
|
|
33
|
-
u,
|
|
34
|
-
a = [],
|
|
35
|
-
f = !0,
|
|
36
|
-
o = !1;
|
|
37
|
-
try {
|
|
38
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
39
|
-
if (Object(t) !== t) return;
|
|
40
|
-
f = !1;
|
|
41
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
42
|
-
} catch (r) {
|
|
43
|
-
o = !0, n = r;
|
|
44
|
-
} finally {
|
|
45
|
-
try {
|
|
46
|
-
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
47
|
-
} finally {
|
|
48
|
-
if (o) throw n;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
return a;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
function ownKeys(e, r) {
|
|
55
|
-
var t = Object.keys(e);
|
|
56
|
-
if (Object.getOwnPropertySymbols) {
|
|
57
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
58
|
-
r && (o = o.filter(function (r) {
|
|
59
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
60
|
-
})), t.push.apply(t, o);
|
|
61
|
-
}
|
|
62
|
-
return t;
|
|
63
|
-
}
|
|
64
|
-
function _objectSpread2(e) {
|
|
65
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
66
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
67
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
68
|
-
_defineProperty(e, r, t[r]);
|
|
69
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
70
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return e;
|
|
74
|
-
}
|
|
75
|
-
function _classCallCheck(instance, Constructor) {
|
|
76
|
-
if (!(instance instanceof Constructor)) {
|
|
77
|
-
throw new TypeError("Cannot call a class as a function");
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function _defineProperties(target, props) {
|
|
81
|
-
for (var i = 0; i < props.length; i++) {
|
|
82
|
-
var descriptor = props[i];
|
|
83
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
84
|
-
descriptor.configurable = true;
|
|
85
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
86
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
90
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
91
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
92
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
93
|
-
writable: false
|
|
94
|
-
});
|
|
95
|
-
return Constructor;
|
|
96
|
-
}
|
|
97
|
-
function _defineProperty(obj, key, value) {
|
|
98
|
-
key = _toPropertyKey(key);
|
|
99
|
-
if (key in obj) {
|
|
100
|
-
Object.defineProperty(obj, key, {
|
|
101
|
-
value: value,
|
|
102
|
-
enumerable: true,
|
|
103
|
-
configurable: true,
|
|
104
|
-
writable: true
|
|
105
|
-
});
|
|
106
|
-
} else {
|
|
107
|
-
obj[key] = value;
|
|
108
|
-
}
|
|
109
|
-
return obj;
|
|
110
|
-
}
|
|
111
26
|
function _extends() {
|
|
112
27
|
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
113
28
|
for (var i = 1; i < arguments.length; i++) {
|
|
@@ -122,90 +37,6 @@ function _extends() {
|
|
|
122
37
|
};
|
|
123
38
|
return _extends.apply(this, arguments);
|
|
124
39
|
}
|
|
125
|
-
function _inherits(subClass, superClass) {
|
|
126
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
127
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
128
|
-
}
|
|
129
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
130
|
-
constructor: {
|
|
131
|
-
value: subClass,
|
|
132
|
-
writable: true,
|
|
133
|
-
configurable: true
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
Object.defineProperty(subClass, "prototype", {
|
|
137
|
-
writable: false
|
|
138
|
-
});
|
|
139
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
140
|
-
}
|
|
141
|
-
function _getPrototypeOf(o) {
|
|
142
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
143
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
144
|
-
};
|
|
145
|
-
return _getPrototypeOf(o);
|
|
146
|
-
}
|
|
147
|
-
function _setPrototypeOf(o, p) {
|
|
148
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
149
|
-
o.__proto__ = p;
|
|
150
|
-
return o;
|
|
151
|
-
};
|
|
152
|
-
return _setPrototypeOf(o, p);
|
|
153
|
-
}
|
|
154
|
-
function _isNativeReflectConstruct() {
|
|
155
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
156
|
-
if (Reflect.construct.sham) return false;
|
|
157
|
-
if (typeof Proxy === "function") return true;
|
|
158
|
-
try {
|
|
159
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
160
|
-
return true;
|
|
161
|
-
} catch (e) {
|
|
162
|
-
return false;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
|
-
function _construct(Parent, args, Class) {
|
|
166
|
-
if (_isNativeReflectConstruct()) {
|
|
167
|
-
_construct = Reflect.construct.bind();
|
|
168
|
-
} else {
|
|
169
|
-
_construct = function _construct(Parent, args, Class) {
|
|
170
|
-
var a = [null];
|
|
171
|
-
a.push.apply(a, args);
|
|
172
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
173
|
-
var instance = new Constructor();
|
|
174
|
-
if (Class) _setPrototypeOf(instance, Class.prototype);
|
|
175
|
-
return instance;
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
return _construct.apply(null, arguments);
|
|
179
|
-
}
|
|
180
|
-
function _isNativeFunction(fn) {
|
|
181
|
-
return Function.toString.call(fn).indexOf("[native code]") !== -1;
|
|
182
|
-
}
|
|
183
|
-
function _wrapNativeSuper(Class) {
|
|
184
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
185
|
-
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
186
|
-
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
187
|
-
if (typeof Class !== "function") {
|
|
188
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
189
|
-
}
|
|
190
|
-
if (typeof _cache !== "undefined") {
|
|
191
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
192
|
-
_cache.set(Class, Wrapper);
|
|
193
|
-
}
|
|
194
|
-
function Wrapper() {
|
|
195
|
-
return _construct(Class, arguments, _getPrototypeOf(this).constructor);
|
|
196
|
-
}
|
|
197
|
-
Wrapper.prototype = Object.create(Class.prototype, {
|
|
198
|
-
constructor: {
|
|
199
|
-
value: Wrapper,
|
|
200
|
-
enumerable: false,
|
|
201
|
-
writable: true,
|
|
202
|
-
configurable: true
|
|
203
|
-
}
|
|
204
|
-
});
|
|
205
|
-
return _setPrototypeOf(Wrapper, Class);
|
|
206
|
-
};
|
|
207
|
-
return _wrapNativeSuper(Class);
|
|
208
|
-
}
|
|
209
40
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
210
41
|
if (source == null) return {};
|
|
211
42
|
var target = {};
|
|
@@ -233,201 +64,47 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
233
64
|
}
|
|
234
65
|
return target;
|
|
235
66
|
}
|
|
236
|
-
function _assertThisInitialized(self) {
|
|
237
|
-
if (self === void 0) {
|
|
238
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
239
|
-
}
|
|
240
|
-
return self;
|
|
241
|
-
}
|
|
242
|
-
function _possibleConstructorReturn(self, call) {
|
|
243
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
244
|
-
return call;
|
|
245
|
-
} else if (call !== void 0) {
|
|
246
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
247
|
-
}
|
|
248
|
-
return _assertThisInitialized(self);
|
|
249
|
-
}
|
|
250
|
-
function _createSuper(Derived) {
|
|
251
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
252
|
-
return function _createSuperInternal() {
|
|
253
|
-
var Super = _getPrototypeOf(Derived),
|
|
254
|
-
result;
|
|
255
|
-
if (hasNativeReflectConstruct) {
|
|
256
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
257
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
258
|
-
} else {
|
|
259
|
-
result = Super.apply(this, arguments);
|
|
260
|
-
}
|
|
261
|
-
return _possibleConstructorReturn(this, result);
|
|
262
|
-
};
|
|
263
|
-
}
|
|
264
|
-
function _slicedToArray(arr, i) {
|
|
265
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
266
|
-
}
|
|
267
|
-
function _arrayWithHoles(arr) {
|
|
268
|
-
if (Array.isArray(arr)) return arr;
|
|
269
|
-
}
|
|
270
|
-
function _unsupportedIterableToArray(o, minLen) {
|
|
271
|
-
if (!o) return;
|
|
272
|
-
if (typeof o === "string") return _arrayLikeToArray(o, minLen);
|
|
273
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
274
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
275
|
-
if (n === "Map" || n === "Set") return Array.from(o);
|
|
276
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
277
|
-
}
|
|
278
|
-
function _arrayLikeToArray(arr, len) {
|
|
279
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
280
|
-
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
281
|
-
return arr2;
|
|
282
|
-
}
|
|
283
|
-
function _nonIterableRest() {
|
|
284
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
285
|
-
}
|
|
286
|
-
function _toPrimitive(input, hint) {
|
|
287
|
-
if (typeof input !== "object" || input === null) return input;
|
|
288
|
-
var prim = input[Symbol.toPrimitive];
|
|
289
|
-
if (prim !== undefined) {
|
|
290
|
-
var res = prim.call(input, hint || "default");
|
|
291
|
-
if (typeof res !== "object") return res;
|
|
292
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
293
|
-
}
|
|
294
|
-
return (hint === "string" ? String : Number)(input);
|
|
295
|
-
}
|
|
296
|
-
function _toPropertyKey(arg) {
|
|
297
|
-
var key = _toPrimitive(arg, "string");
|
|
298
|
-
return typeof key === "symbol" ? key : String(key);
|
|
299
|
-
}
|
|
300
|
-
function _classPrivateMethodGet(receiver, privateSet, fn) {
|
|
301
|
-
if (!privateSet.has(receiver)) {
|
|
302
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
303
|
-
}
|
|
304
|
-
return fn;
|
|
305
|
-
}
|
|
306
|
-
function _checkPrivateRedeclaration(obj, privateCollection) {
|
|
307
|
-
if (privateCollection.has(obj)) {
|
|
308
|
-
throw new TypeError("Cannot initialize the same private elements twice on an object");
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
function _classPrivateMethodInitSpec(obj, privateSet) {
|
|
312
|
-
_checkPrivateRedeclaration(obj, privateSet);
|
|
313
|
-
privateSet.add(obj);
|
|
314
|
-
}
|
|
315
67
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
var window$1 = {
|
|
319
|
-
customElements: ssrDomShim.customElements,
|
|
320
|
-
HTMLElement: ssrDomShim.HTMLElement
|
|
321
|
-
};
|
|
322
|
-
// Copy initial window globals to node global
|
|
323
|
-
Object.assign(globalThis, window$1);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
var _e = /*#__PURE__*/new WeakSet();
|
|
327
|
-
var _t = /*#__PURE__*/new WeakSet();
|
|
328
|
-
var e$1 = /*#__PURE__*/function (_HTMLElement) {
|
|
329
|
-
_inherits(e, _HTMLElement);
|
|
330
|
-
var _super = _createSuper(e);
|
|
331
|
-
function e() {
|
|
332
|
-
var _this;
|
|
333
|
-
_classCallCheck(this, e);
|
|
334
|
-
(_this = _super.call(this), _classPrivateMethodInitSpec(_assertThisInitialized(_this), _t), _classPrivateMethodInitSpec(_assertThisInitialized(_this), _e)), _this.addEventListener("click", function (_e5) {
|
|
335
|
-
var t = _e5.target.closest("a");
|
|
336
|
-
if (!t) return;
|
|
337
|
-
var n = _classPrivateMethodGet(_assertThisInitialized(_this), _e, _e2).call(_assertThisInitialized(_this), t.href);
|
|
338
|
-
if (!n) return;
|
|
339
|
-
var r = document.getElementById(n);
|
|
340
|
-
if (!r) return;
|
|
341
|
-
var o = _classPrivateMethodGet(_assertThisInitialized(_this), _t, _t2).call(_assertThisInitialized(_this), r);
|
|
342
|
-
o && (_e5.preventDefault(), o.scrollIntoView(), r.focus({
|
|
343
|
-
preventScroll: !0
|
|
344
|
-
}));
|
|
345
|
-
});
|
|
346
|
-
return _this;
|
|
347
|
-
}
|
|
348
|
-
return _createClass(e);
|
|
349
|
-
}( /*#__PURE__*/_wrapNativeSuper(HTMLElement));
|
|
350
|
-
function _e2(_e3) {
|
|
351
|
-
return _e3.includes("#") ? _e3.split("#").pop() : void 0;
|
|
68
|
+
function getFragmentFromUrl(url) {
|
|
69
|
+
return url.includes('#') ? url.split('#').pop() : undefined;
|
|
352
70
|
}
|
|
353
|
-
function
|
|
71
|
+
function getAssociatedLegendOrLabel(input) {
|
|
354
72
|
var _document$querySelect;
|
|
355
|
-
var
|
|
356
|
-
if (
|
|
357
|
-
var
|
|
358
|
-
if (
|
|
359
|
-
var
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
if (
|
|
364
|
-
|
|
73
|
+
var fieldset = input.closest('fieldset');
|
|
74
|
+
if (fieldset) {
|
|
75
|
+
var legends = fieldset.getElementsByTagName('legend');
|
|
76
|
+
if (legends.length) {
|
|
77
|
+
var candidateLegend = legends[0];
|
|
78
|
+
|
|
79
|
+
// If the input type is radio or checkbox, always use the legend if there
|
|
80
|
+
// is one.
|
|
81
|
+
if (input instanceof HTMLInputElement && (input.type === 'checkbox' || input.type === 'radio')) {
|
|
82
|
+
return candidateLegend;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// For other input types, only scroll to the fieldsetโs legend (instead of
|
|
86
|
+
// the label associated with the input) if the input would end up in the
|
|
87
|
+
// top half of the screen.
|
|
88
|
+
//
|
|
89
|
+
// This should avoid situations where the input either ends up off the
|
|
90
|
+
// screen, or obscured by a software keyboard.
|
|
91
|
+
var legendTop = candidateLegend.getBoundingClientRect().top;
|
|
92
|
+
var inputRect = input.getBoundingClientRect();
|
|
93
|
+
|
|
94
|
+
// If the browser doesn't support Element.getBoundingClientRect().height
|
|
95
|
+
// or window.innerHeight (like IE8), bail and just link to the label.
|
|
96
|
+
if (inputRect.height && window.innerHeight) {
|
|
97
|
+
var inputBottom = inputRect.top + inputRect.height;
|
|
98
|
+
if (inputBottom - legendTop < window.innerHeight / 2) {
|
|
99
|
+
return candidateLegend;
|
|
100
|
+
}
|
|
365
101
|
}
|
|
366
102
|
}
|
|
367
103
|
}
|
|
368
|
-
return (_document$querySelect = document.querySelector("label[for='".concat(
|
|
104
|
+
return (_document$querySelect = document.querySelector("label[for='".concat(input.getAttribute('id'), "']"))) !== null && _document$querySelect !== void 0 ? _document$querySelect : input.closest('label');
|
|
369
105
|
}
|
|
370
|
-
"customElements" in window && customElements.define("bds-error-summary", e$1);
|
|
371
|
-
|
|
372
|
-
/**
|
|
373
|
-
* @license
|
|
374
|
-
* Copyright 2018 Google LLC
|
|
375
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
376
|
-
*/
|
|
377
|
-
var e = new Set(["children", "localName", "ref", "style", "className"]),
|
|
378
|
-
n = new WeakMap(),
|
|
379
|
-
l = function l(e, _l, t, o, a) {
|
|
380
|
-
var i = null == a ? void 0 : a[_l];
|
|
381
|
-
void 0 === i || t === o ? (e[_l] = t, null == t && _l in HTMLElement.prototype && e.removeAttribute(_l)) : function (e, l, t) {
|
|
382
|
-
var o = n.get(e);
|
|
383
|
-
void 0 === o && n.set(e, o = new Map());
|
|
384
|
-
var a = o.get(l);
|
|
385
|
-
void 0 !== t ? void 0 === a ? (o.set(l, a = {
|
|
386
|
-
handleEvent: t
|
|
387
|
-
}), e.addEventListener(l, a)) : a.handleEvent = t : void 0 !== a && (o["delete"](l), e.removeEventListener(l, a));
|
|
388
|
-
}(e, i, t);
|
|
389
|
-
},
|
|
390
|
-
t = function t(_ref) {
|
|
391
|
-
var n = _ref.react,
|
|
392
|
-
t = _ref.tagName,
|
|
393
|
-
o = _ref.elementClass,
|
|
394
|
-
a = _ref.events,
|
|
395
|
-
i = _ref.displayName;
|
|
396
|
-
var s = new Set(Object.keys(null != a ? a : {})),
|
|
397
|
-
c = n.forwardRef(function (i, c) {
|
|
398
|
-
var r = n.useRef(null),
|
|
399
|
-
d = n.useRef(null),
|
|
400
|
-
u = {},
|
|
401
|
-
v = {};
|
|
402
|
-
for (var _i = 0, _Object$entries = Object.entries(i); _i < _Object$entries.length; _i++) {
|
|
403
|
-
var _Object$entries$_i = _slicedToArray(_Object$entries[_i], 2),
|
|
404
|
-
_n = _Object$entries$_i[0],
|
|
405
|
-
_l2 = _Object$entries$_i[1];
|
|
406
|
-
e.has(_n) ? u["className" === _n ? "class" : _n] = _l2 : s.has(_n) || _n in o.prototype ? v[_n] = _l2 : u[_n] = _l2;
|
|
407
|
-
}
|
|
408
|
-
return n.useLayoutEffect(function () {
|
|
409
|
-
if (null !== d.current) {
|
|
410
|
-
for (var _e in v) l(d.current, _e, i[_e], r.current ? r.current[_e] : void 0, a);
|
|
411
|
-
r.current = i;
|
|
412
|
-
}
|
|
413
|
-
}), n.useLayoutEffect(function () {
|
|
414
|
-
var e;
|
|
415
|
-
null === (e = d.current) || void 0 === e || e.removeAttribute("defer-hydration");
|
|
416
|
-
}, []), u.suppressHydrationWarning = !0, n.createElement(t, _objectSpread2(_objectSpread2({}, u), {}, {
|
|
417
|
-
ref: function ref(e) {
|
|
418
|
-
d.current = e, "function" == typeof c ? c(e) : null !== c && (c.current = e);
|
|
419
|
-
}
|
|
420
|
-
}));
|
|
421
|
-
});
|
|
422
|
-
return c.displayName = null != i ? i : o.name, c;
|
|
423
|
-
};
|
|
424
106
|
|
|
425
107
|
var _excluded = ["className", "errors", "mapNameToId"];
|
|
426
|
-
var ReactErrorSummary = t({
|
|
427
|
-
tagName: 'bds-error-summary',
|
|
428
|
-
elementClass: e$1,
|
|
429
|
-
react: React__namespace
|
|
430
|
-
});
|
|
431
108
|
var FormErrorKey = '_form';
|
|
432
109
|
var FINAL_FORM_ERROR = 'FINAL_FORM/form-error';
|
|
433
110
|
function BdsErrorSummary(_ref) {
|
|
@@ -446,7 +123,26 @@ function BdsErrorSummary(_ref) {
|
|
|
446
123
|
groupRef.current.focus();
|
|
447
124
|
}, [errors]);
|
|
448
125
|
if (!errors || Object.keys(errors).length === 0) return null;
|
|
449
|
-
|
|
126
|
+
var handleLinkClick = function handleLinkClick(e) {
|
|
127
|
+
var inputId = getFragmentFromUrl(e.currentTarget.href);
|
|
128
|
+
if (!inputId) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
var input = document.getElementById(inputId);
|
|
132
|
+
if (!input) {
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
var legendOrLabel = getAssociatedLegendOrLabel(input);
|
|
136
|
+
if (!legendOrLabel) {
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
e.preventDefault();
|
|
140
|
+
legendOrLabel.scrollIntoView();
|
|
141
|
+
input.focus({
|
|
142
|
+
preventScroll: true
|
|
143
|
+
});
|
|
144
|
+
};
|
|
145
|
+
return /*#__PURE__*/React__namespace.createElement("bds-error-summary", _extends({
|
|
450
146
|
className: ['stack', className].filter(function (x) {
|
|
451
147
|
return x;
|
|
452
148
|
}).join(' '),
|
|
@@ -486,7 +182,8 @@ function BdsErrorSummary(_ref) {
|
|
|
486
182
|
return /*#__PURE__*/React__namespace.createElement("li", {
|
|
487
183
|
key: inputId
|
|
488
184
|
}, /*#__PURE__*/React__namespace.createElement("a", {
|
|
489
|
-
href: "#".concat(inputId)
|
|
185
|
+
href: "#".concat(inputId),
|
|
186
|
+
onClick: handleLinkClick
|
|
490
187
|
}, fieldMessage, messages.length > 1 ? " (".concat(index + 1, " of ").concat(messages.length, ")") : undefined));
|
|
491
188
|
}));
|
|
492
189
|
})));
|