@superrb/react-addons 3.0.0-9 → 4.0.0-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/accordion.d.ts +9 -0
- package/components/accordion.d.ts.map +1 -0
- package/components/accordion.js +44 -0
- package/components/back-to-top.d.ts +1 -2
- package/components/back-to-top.d.ts.map +1 -1
- package/components/back-to-top.js +2 -3
- package/components/button.d.ts.map +1 -1
- package/components/button.js +3 -3
- package/components/context-wrapper.d.ts +1 -2
- package/components/context-wrapper.d.ts.map +1 -1
- package/components/context-wrapper.js +3 -2
- package/components/cookie-banner.d.ts +8 -3
- package/components/cookie-banner.d.ts.map +1 -1
- package/components/cookie-banner.js +6 -7
- package/components/form/error-message.d.ts +1 -2
- package/components/form/error-message.d.ts.map +1 -1
- package/components/form/error-message.js +2 -3
- package/components/form/field.d.ts +11 -3
- package/components/form/field.d.ts.map +1 -1
- package/components/form/field.js +18 -7
- package/components/form/file-field.d.ts +15 -0
- package/components/form/file-field.d.ts.map +1 -0
- package/components/form/file-field.js +24 -0
- package/components/form/submit-button.d.ts +3 -3
- package/components/form/submit-button.d.ts.map +1 -1
- package/components/form/submit-button.js +3 -4
- package/components/form/success-message.d.ts +3 -2
- package/components/form/success-message.d.ts.map +1 -1
- package/components/form/success-message.js +9 -2
- package/components/form.d.ts +22 -6
- package/components/form.d.ts.map +1 -1
- package/components/form.js +72 -55
- package/components/menu-toggle.d.ts +4 -4
- package/components/menu-toggle.d.ts.map +1 -1
- package/components/menu-toggle.js +4 -13
- package/components/modal.d.ts +3 -2
- package/components/modal.d.ts.map +1 -1
- package/components/modal.js +10 -6
- package/components/skip-to.d.ts +1 -2
- package/components/skip-to.d.ts.map +1 -1
- package/components/skip-to.js +2 -3
- package/components/slideshow-buttons.d.ts +2 -3
- package/components/slideshow-buttons.d.ts.map +1 -1
- package/components/slideshow-buttons.js +2 -3
- package/components/slideshow-pagination.d.ts +5 -0
- package/components/slideshow-pagination.d.ts.map +1 -0
- package/components/slideshow-pagination.js +4 -0
- package/components.d.ts +3 -1
- package/components.d.ts.map +1 -1
- package/components.js +3 -1
- package/context/cookies-context-provider.d.ts.map +1 -1
- package/context/modal-context-provider.d.ts +1 -1
- package/context/modal-context-provider.d.ts.map +1 -1
- package/context/modal-context-provider.js +2 -2
- package/context/nav-context-provider.d.ts +1 -1
- package/context/nav-context-provider.d.ts.map +1 -1
- package/context/nav-context-provider.js +2 -2
- package/hooks/use-async.d.ts +3 -2
- package/hooks/use-async.d.ts.map +1 -1
- package/hooks/use-async.js +3 -4
- package/hooks/use-draggable-scroll.d.ts +3 -3
- package/hooks/use-draggable-scroll.d.ts.map +1 -1
- package/hooks/use-draggable-scroll.js +2 -3
- package/hooks/use-escape.d.ts +3 -0
- package/hooks/use-escape.d.ts.map +1 -0
- package/hooks/use-escape.js +11 -0
- package/hooks/use-event-listener.d.ts +2 -2
- package/hooks/use-event-listener.d.ts.map +1 -1
- package/hooks/use-event-listener.js +4 -12
- package/hooks/use-hide-on-scroll.d.ts +1 -2
- package/hooks/use-hide-on-scroll.d.ts.map +1 -1
- package/hooks/use-hide-on-scroll.js +2 -3
- package/hooks/use-id.d.ts +1 -2
- package/hooks/use-id.d.ts.map +1 -1
- package/hooks/use-id.js +2 -3
- package/hooks/use-is-in-viewport.d.ts +2 -3
- package/hooks/use-is-in-viewport.d.ts.map +1 -1
- package/hooks/use-is-in-viewport.js +17 -15
- package/hooks/use-is-mobile.d.ts +1 -2
- package/hooks/use-is-mobile.d.ts.map +1 -1
- package/hooks/use-is-mobile.js +2 -3
- package/hooks/use-is-overflowing.d.ts +1 -2
- package/hooks/use-is-overflowing.d.ts.map +1 -1
- package/hooks/use-is-overflowing.js +5 -4
- package/hooks/use-lock-body-scroll.d.ts +1 -2
- package/hooks/use-lock-body-scroll.d.ts.map +1 -1
- package/hooks/use-lock-body-scroll.js +1 -2
- package/hooks/use-modal.d.ts +1 -2
- package/hooks/use-modal.d.ts.map +1 -1
- package/hooks/use-modal.js +2 -3
- package/hooks/use-motion-allowed.d.ts +1 -2
- package/hooks/use-motion-allowed.d.ts.map +1 -1
- package/hooks/use-motion-allowed.js +2 -3
- package/hooks/use-parallax.d.ts +1 -2
- package/hooks/use-parallax.d.ts.map +1 -1
- package/hooks/use-parallax.js +2 -3
- package/hooks/use-slideshow.d.ts +5 -4
- package/hooks/use-slideshow.d.ts.map +1 -1
- package/hooks/use-slideshow.js +86 -41
- package/hooks.d.ts +2 -1
- package/hooks.d.ts.map +1 -1
- package/hooks.js +2 -1
- package/package.json +18 -11
- package/store/cookies.d.ts.map +1 -1
- package/store/cookies.js +7 -3
- package/store/modal.d.ts.map +1 -1
- package/store/modal.js +4 -0
- package/store/nav.d.ts.map +1 -1
- package/store/nav.js +4 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/utils/animate.d.ts +1 -2
- package/utils/animate.d.ts.map +1 -1
- package/utils/animate.js +24 -23
- package/utils/extend-class.d.ts +1 -2
- package/utils/extend-class.d.ts.map +1 -1
- package/utils/extend-class.js +8 -7
- package/utils/get-y-pos.d.ts +1 -2
- package/utils/get-y-pos.d.ts.map +1 -1
- package/utils/get-y-pos.js +2 -3
- package/utils/get.d.ts +2 -2
- package/utils/get.d.ts.map +1 -1
- package/utils/get.js +1 -2
- package/utils/is-external-link.d.ts +1 -2
- package/utils/is-external-link.d.ts.map +1 -1
- package/utils/is-external-link.js +6 -7
- package/utils/scroll-to-hash.d.ts +1 -2
- package/utils/scroll-to-hash.d.ts.map +1 -1
- package/utils/scroll-to-hash.js +2 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
2
|
+
export declare function AccordionItem({ title, expanded, children, }: PropsWithChildren<{
|
|
3
|
+
title: string;
|
|
4
|
+
expanded?: boolean;
|
|
5
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare function Accordion({ multiple, children, }: PropsWithChildren<{
|
|
7
|
+
multiple?: boolean;
|
|
8
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
//# sourceMappingURL=accordion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../src/components/accordion.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,iBAAiB,EAMlB,MAAM,OAAO,CAAA;AAcd,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,QAAgB,EAChB,QAAQ,GACT,EAAE,iBAAiB,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,2CA0D1D;AAED,wBAAgB,SAAS,CAAC,EACxB,QAAgB,EAChB,QAAQ,GACT,EAAE,iBAAiB,CAAC;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC,2CAoB3C"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
import { createContext, useContext, useState, useEffect, useId, } from 'react';
|
|
4
|
+
const AccordionContext = createContext({
|
|
5
|
+
multiple: false,
|
|
6
|
+
expandedItems: [],
|
|
7
|
+
setExpandedItems: () => { },
|
|
8
|
+
});
|
|
9
|
+
export function AccordionItem({ title, expanded = false, children, }) {
|
|
10
|
+
const { multiple, expandedItems, setExpandedItems } = useContext(AccordionContext);
|
|
11
|
+
const id = useId();
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (expanded === true) {
|
|
14
|
+
setExpandedItems((expandedItems) => {
|
|
15
|
+
expandedItems.push(id);
|
|
16
|
+
return expandedItems;
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
}, []);
|
|
20
|
+
const toggle = () => {
|
|
21
|
+
setExpandedItems((expandedItems) => {
|
|
22
|
+
const isExpanded = expandedItems.includes(id);
|
|
23
|
+
if (isExpanded) {
|
|
24
|
+
return expandedItems.filter((item) => item !== id);
|
|
25
|
+
}
|
|
26
|
+
if (!multiple) {
|
|
27
|
+
return [id];
|
|
28
|
+
}
|
|
29
|
+
return [...expandedItems, id];
|
|
30
|
+
});
|
|
31
|
+
};
|
|
32
|
+
return (_jsxs(_Fragment, { children: [_jsxs("button", { "aria-selected": expandedItems.includes(id), "aria-controls": `${id}-panel`, className: "accordion__trigger", onClick: toggle, role: "tab", "aria-label": title, id: `${id}-trigger`, children: [_jsx("span", { className: "screenreader-text", children: expandedItems ? 'Close' : 'Expand' }), title] }), _jsx("div", { className: "accordion__content", role: "tabpanel", "aria-labelledby": `${id}-trigger`, id: `${id}-panel`, children: children })] }));
|
|
33
|
+
}
|
|
34
|
+
export function Accordion({ multiple = false, children, }) {
|
|
35
|
+
const [expandedItemsStorage, setExpandedItemsStorage] = useState([]);
|
|
36
|
+
const setExpandedItems = (newState) => {
|
|
37
|
+
setExpandedItemsStorage((items) => [...new Set(newState(items))]);
|
|
38
|
+
};
|
|
39
|
+
return (_jsx(AccordionContext.Provider, { value: {
|
|
40
|
+
multiple,
|
|
41
|
+
expandedItems: expandedItemsStorage,
|
|
42
|
+
setExpandedItems,
|
|
43
|
+
}, children: _jsx("div", { className: "accordion", role: "tablist", "aria-multiselectable": multiple, children: children }) }));
|
|
44
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"back-to-top.d.ts","sourceRoot":"","sources":["../src/components/back-to-top.tsx"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"back-to-top.d.ts","sourceRoot":"","sources":["../src/components/back-to-top.tsx"],"names":[],"mappings":"AAAA,MAAM,CAAC,OAAO,UAAU,SAAS,4CAMhC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
export default function BackToTop() {
|
|
3
3
|
return (_jsx("div", { className: "back-to-top", id: "back-to-top", children: _jsx("a", { href: "#top", children: "Back to Top" }) }));
|
|
4
|
-
}
|
|
5
|
-
export default BackToTop;
|
|
4
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EAEpB,cAAc,EACd,iBAAiB,EAEjB,iBAAiB,EAGlB,MAAM,OAAO,CAAA;AAGd,KAAK,KAAK,GAAG,CACT,iBAAiB,CAAC,cAAc,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC,GACxE,oBAAoB,CAAC,iBAAiB,CAAC,GACvC,oBAAoB,CAAC,iBAAiB,CAAC,CAC1C,GAAG;IACF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;;
|
|
1
|
+
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../src/components/button.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EAEpB,cAAc,EACd,iBAAiB,EAEjB,iBAAiB,EAGlB,MAAM,OAAO,CAAA;AAGd,KAAK,KAAK,GAAG,CACT,iBAAiB,CAAC,cAAc,CAAC,iBAAiB,GAAG,iBAAiB,CAAC,CAAC,GACxE,oBAAoB,CAAC,iBAAiB,CAAC,GACvC,oBAAoB,CAAC,iBAAiB,CAAC,CAC1C,GAAG;IACF,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,iBAAiB,CAAA;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;;AA8DD,wBAAuC;AACvC,YAAY,EAAE,KAAK,IAAI,WAAW,EAAE,CAAA"}
|
package/components/button.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, memo, } from 'react';
|
|
3
3
|
import { extendClass } from '../utils';
|
|
4
|
-
|
|
4
|
+
function Button({ children, label, label_a11y, onClick, className = '', href, ...props }, ref) {
|
|
5
5
|
className = `button ${className}`;
|
|
6
6
|
const renderedChildren = (_jsxs(_Fragment, { children: [label_a11y && _jsx("span", { className: "screenreader-text", children: label_a11y }), label && (_jsx("span", { className: `${extendClass(className, 'label')}`, "aria-hidden": label_a11y !== undefined, "data-text": label, children: label })), children] }));
|
|
7
7
|
const linkProps = {
|
|
@@ -22,5 +22,5 @@ const Button = forwardRef(({ children, label, label_a11y, onClick, className = '
|
|
|
22
22
|
ref,
|
|
23
23
|
};
|
|
24
24
|
return _jsx("button", { ...buttonProps, children: renderedChildren });
|
|
25
|
-
}
|
|
26
|
-
export default memo(Button);
|
|
25
|
+
}
|
|
26
|
+
export default memo(forwardRef(Button));
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
|
-
|
|
3
|
-
export default ContextWrapper;
|
|
2
|
+
export default function ContextWrapper({ children }: PropsWithChildren<{}>): import("react/jsx-runtime").JSX.Element;
|
|
4
3
|
//# sourceMappingURL=context-wrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context-wrapper.d.ts","sourceRoot":"","sources":["../src/components/context-wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAGzC,
|
|
1
|
+
{"version":3,"file":"context-wrapper.d.ts","sourceRoot":"","sources":["../src/components/context-wrapper.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAA;AAGzC,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EAAE,QAAQ,EAAE,EAAE,iBAAiB,CAAC,EAAE,CAAC,2CAQzE"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { GoogleReCaptchaProvider } from 'react-google-recaptcha-v3';
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
export default function ContextWrapper({ children }) {
|
|
4
|
+
return (_jsx(GoogleReCaptchaProvider, { reCaptchaKey: process.env.NEXT_PUBLIC_RECAPTCHA_KEY, children: children }));
|
|
5
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
|
|
2
|
+
export default function CookieBanner({ allowCustomisation, allowReject, title, text, formText, policyLink, policyLabel, acceptLabel, acceptAllLabel, rejectLabel, customiseLabel, tracking, necessary, renderAcceptButton, renderCustomiseButton, renderRejectButton, renderSubmitButton, }: {
|
|
3
3
|
allowCustomisation?: boolean;
|
|
4
4
|
allowReject?: boolean;
|
|
5
5
|
title?: string;
|
|
@@ -11,10 +11,15 @@ declare const CookieBanner: ({ allowCustomisation, allowReject, title, text, for
|
|
|
11
11
|
acceptAllLabel?: string;
|
|
12
12
|
rejectLabel?: string;
|
|
13
13
|
customiseLabel?: string;
|
|
14
|
+
tracking?: {
|
|
15
|
+
[key: string]: string;
|
|
16
|
+
};
|
|
17
|
+
necessary?: {
|
|
18
|
+
[key: string]: string;
|
|
19
|
+
};
|
|
14
20
|
renderAcceptButton?: (props: {}) => ReactNode;
|
|
15
21
|
renderCustomiseButton?: (props: {}) => ReactNode;
|
|
16
22
|
renderRejectButton?: (props: {}) => ReactNode;
|
|
17
23
|
renderSubmitButton?: () => ReactNode;
|
|
18
|
-
})
|
|
19
|
-
export default CookieBanner;
|
|
24
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
20
25
|
//# sourceMappingURL=cookie-banner.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookie-banner.d.ts","sourceRoot":"","sources":["../src/components/cookie-banner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAA;AA6BtD,
|
|
1
|
+
{"version":3,"file":"cookie-banner.d.ts","sourceRoot":"","sources":["../src/components/cookie-banner.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAuB,MAAM,OAAO,CAAA;AA6BtD,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,kBAAyB,EACzB,WAAmB,EACnB,KAAqB,EACrB,IAAmB,EACnB,QAA4B,EAC5B,UAA+B,EAC/B,WAAiC,EACjC,WAAiC,EACjC,cAAuC,EACvC,WAAiC,EACjC,cAAuC,EACvC,QAA2B,EAC3B,SAA6B,EAC7B,kBAAkB,EAClB,qBAAqB,EACrB,kBAAkB,EAClB,kBAAkB,GACnB,EAAE;IACD,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,WAAW,CAAC,EAAE,OAAO,CAAA;IACrB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACpC,SAAS,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAA;IACrC,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,KAAK,SAAS,CAAA;IAC7C,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,KAAK,SAAS,CAAA;IAChD,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,EAAE,KAAK,SAAS,CAAA;IAC7C,kBAAkB,CAAC,EAAE,MAAM,SAAS,CAAA;CACrC,2CA4JA"}
|
|
@@ -25,7 +25,7 @@ const content = {
|
|
|
25
25
|
description: 'These cookies are necessary for the website to function and cannot be switched off.',
|
|
26
26
|
},
|
|
27
27
|
};
|
|
28
|
-
|
|
28
|
+
export default function CookieBanner({ allowCustomisation = true, allowReject = false, title = content.title, text = content.text, formText = content.form_text, policyLink = content.policyLink, policyLabel = content.policyLabel, acceptLabel = content.acceptLabel, acceptAllLabel = content.acceptAllLabel, rejectLabel = content.rejectLabel, customiseLabel = content.customiseLabel, tracking = content.tracking, necessary = content.necessary, renderAcceptButton, renderCustomiseButton, renderRejectButton, renderSubmitButton, }) {
|
|
29
29
|
const { cookiesAccepted, setCookiesAccepted, trackingCookiesAccepted, setTrackingCookiesAccepted, popupOpen, closePopup, } = useCookieStore();
|
|
30
30
|
const [animate, setAnimate] = useState(false);
|
|
31
31
|
const [formOpen, setFormOpen] = useState(false);
|
|
@@ -57,15 +57,15 @@ const CookieBanner = ({ allowCustomisation = true, allowReject = false, title =
|
|
|
57
57
|
const trueAcceptLabel = !allowCustomisation || formOpen ? acceptLabel : acceptAllLabel;
|
|
58
58
|
const schema = Yup.object().shape({
|
|
59
59
|
tracking: Yup.boolean().required().default(trackingCookiesAccepted).label(`
|
|
60
|
-
<strong>${
|
|
61
|
-
<p>${
|
|
60
|
+
<strong>${tracking?.title}</strong>
|
|
61
|
+
<p>${tracking?.description}</p>
|
|
62
62
|
`),
|
|
63
63
|
necessary: Yup.boolean()
|
|
64
64
|
.required()
|
|
65
65
|
.default(true)
|
|
66
66
|
.label(`
|
|
67
|
-
<strong>${
|
|
68
|
-
<p>${
|
|
67
|
+
<strong>${necessary?.title}</strong>
|
|
68
|
+
<p>${necessary?.description}</p>
|
|
69
69
|
`)
|
|
70
70
|
.meta({ disabled: true }),
|
|
71
71
|
});
|
|
@@ -73,5 +73,4 @@ const CookieBanner = ({ allowCustomisation = true, allowReject = false, title =
|
|
|
73
73
|
setReady(true);
|
|
74
74
|
}, []);
|
|
75
75
|
return (_jsx(_Fragment, { children: ready && ((!rejected && !cookiesAccepted) || popupOpen) ? (_jsx("div", { className: `cookie-banner ${animate ? ' cookie-banner--hide' : ''} `, children: _jsx("div", { className: "cookie-banner__container container", children: _jsxs("div", { className: "cookie-banner__inner", children: [allowCustomisation && (_jsxs("div", { className: "cookie-banner__form", "aria-hidden": !formOpen, children: [formText && (_jsx("p", { className: "cookie-banner__form-text", children: formText })), _jsx(Form, { useRecaptcha: false, className: "cookie-banner__form", schema: schema, onSubmit: submit, renderSubmit: () => renderSubmitButton ? (renderSubmitButton()) : (_jsx(SubmitButton, { label: acceptLabel })), renderSuccessMessage: false })] })), _jsxs("div", { className: "cookie-banner__main", children: [_jsxs("div", { className: "cookie-banner__message", "aria-hidden": formOpen, children: [title && _jsx("h2", { className: "cookie-banner__title", children: title }), text && (_jsxs("p", { className: "cookie-banner__text", children: [text, " ", _jsx("a", { href: policyLink, children: policyLabel })] }))] }), _jsxs("div", { className: "cookie-banner__buttons", children: [allowCustomisation && !formOpen && (_jsx(_Fragment, { children: renderCustomiseButton ? (renderCustomiseButton({ onClick: openForm })) : (_jsx(Button, { onClick: openForm, className: "cookie-banner__customise", label: customiseLabel })) })), allowReject && !formOpen && (_jsx(_Fragment, { children: renderRejectButton ? (renderRejectButton({ onClick: reject })) : (_jsx(Button, { onClick: reject, className: "cookie-banner__reject", label: rejectLabel })) })), !formOpen && (_jsx(_Fragment, { children: renderAcceptButton ? (renderAcceptButton({ onClick: acceptAll })) : (_jsx(Button, { onClick: acceptAll, className: "cookie-banner__accept", label: trueAcceptLabel })) }))] })] })] }) }) })) : ('') }));
|
|
76
|
-
}
|
|
77
|
-
export default CookieBanner;
|
|
76
|
+
}
|
|
@@ -4,6 +4,5 @@ export interface ErrorMessageProps {
|
|
|
4
4
|
error?: FieldError | Merge<FieldError, FieldErrorsImpl<any>>;
|
|
5
5
|
fieldSchema?: AnySchema;
|
|
6
6
|
}
|
|
7
|
-
|
|
8
|
-
export default ErrorMessage;
|
|
7
|
+
export default function ErrorMessage({ error }: ErrorMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
9
8
|
//# sourceMappingURL=error-message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-message.d.ts","sourceRoot":"","sources":["../../src/components/form/error-message.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAE/B,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAA;IAC5D,WAAW,CAAC,EAAE,SAAS,CAAA;CACxB;AAED,
|
|
1
|
+
{"version":3,"file":"error-message.d.ts","sourceRoot":"","sources":["../../src/components/form/error-message.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAA;AACpE,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAE/B,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,UAAU,GAAG,KAAK,CAAC,UAAU,EAAE,eAAe,CAAC,GAAG,CAAC,CAAC,CAAA;IAC5D,WAAW,CAAC,EAAE,SAAS,CAAA;CACxB;AAED,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE,iBAAiB,2CAQhE"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
2
|
+
export default function ErrorMessage({ error }) {
|
|
3
3
|
const GENERIC_ERROR = 'Sorry, an error occurred';
|
|
4
4
|
return (_jsx("span", { className: "form__error", children: error?.message || GENERIC_ERROR }));
|
|
5
|
-
}
|
|
6
|
-
export default ErrorMessage;
|
|
5
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormEventHandler } from 'react';
|
|
1
|
+
import { FormEventHandler, InputHTMLAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
|
|
2
2
|
import { AnySchema } from 'yup';
|
|
3
3
|
import { UseFormRegisterReturn } from 'react-hook-form';
|
|
4
4
|
interface Props {
|
|
@@ -6,7 +6,15 @@ interface Props {
|
|
|
6
6
|
schema: AnySchema<any>;
|
|
7
7
|
id?: string;
|
|
8
8
|
onInput?: FormEventHandler<HTMLElement>;
|
|
9
|
+
onChange?: FormEventHandler<HTMLElement>;
|
|
10
|
+
value?: any;
|
|
11
|
+
disabled?: boolean;
|
|
9
12
|
}
|
|
10
|
-
|
|
11
|
-
export
|
|
13
|
+
export type InputFieldType = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;
|
|
14
|
+
export type InputProps = InputHTMLAttributes<HTMLInputElement>;
|
|
15
|
+
export type TextareaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;
|
|
16
|
+
export type SelectProps = SelectHTMLAttributes<HTMLSelectElement>;
|
|
17
|
+
export type FieldProps = InputProps | TextareaProps | SelectProps;
|
|
18
|
+
declare const _default: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<InputFieldType>>;
|
|
19
|
+
export default _default;
|
|
12
20
|
//# sourceMappingURL=field.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components/form/field.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components/form/field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,gBAAgB,EAGhB,mBAAmB,EAEnB,oBAAoB,EACpB,sBAAsB,EAGvB,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAGvD,UAAU,KAAK;IACb,QAAQ,EAAE,qBAAqB,CAAC,MAAM,CAAC,CAAA;IACvC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,CAAA;IACtB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,OAAO,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;IACvC,QAAQ,CAAC,EAAE,gBAAgB,CAAC,WAAW,CAAC,CAAA;IACxC,KAAK,CAAC,EAAE,GAAG,CAAA;IACX,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,MAAM,cAAc,GACtB,gBAAgB,GAChB,mBAAmB,GACnB,iBAAiB,CAAA;AAErB,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC,gBAAgB,CAAC,CAAA;AAC9D,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,CAAA;AACvE,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAA;AAEjE,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,aAAa,GAAG,WAAW,CAAA;;AAmHjE,wBAAoC"}
|
package/components/form/field.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
-
import { useEffect, useState } from 'react';
|
|
4
|
-
|
|
3
|
+
import { forwardRef, useEffect, useState, } from 'react';
|
|
4
|
+
import FileField from './file-field';
|
|
5
|
+
function FormField({ register, schema, id, onInput, onChange, value, disabled = false }, ref) {
|
|
5
6
|
const [touched, setTouched] = useState(false);
|
|
6
7
|
const [rendered, setRendered] = useState(false);
|
|
7
8
|
const fieldProps = {
|
|
@@ -10,23 +11,33 @@ const FormField = ({ register, schema, id, onInput }) => {
|
|
|
10
11
|
? { value: schema?.spec?.default }
|
|
11
12
|
: {}),
|
|
12
13
|
...(id ? { id } : {}),
|
|
13
|
-
...(schema?.spec?.meta?.disabled ? { disabled: true } : {}),
|
|
14
|
+
...(disabled || schema?.spec?.meta?.disabled ? { disabled: true } : {}),
|
|
15
|
+
...(schema?.spec?.meta?.multiple ? { multiple: true } : {}),
|
|
14
16
|
...(schema?.spec?.meta?.placeholder
|
|
15
17
|
? { placeholder: schema?.spec?.meta?.placeholder }
|
|
16
18
|
: {}),
|
|
19
|
+
...(schema?.spec?.meta?.autocomplete
|
|
20
|
+
? { autocomplete: schema?.spec?.meta?.autocomplete }
|
|
21
|
+
: {}),
|
|
17
22
|
onInput: (event) => {
|
|
18
23
|
setTouched(true);
|
|
19
24
|
if (onInput) {
|
|
20
25
|
onInput(event);
|
|
21
26
|
}
|
|
22
27
|
},
|
|
28
|
+
onChange: (event) => {
|
|
29
|
+
setTouched(true);
|
|
30
|
+
if (onChange) {
|
|
31
|
+
onChange(event);
|
|
32
|
+
}
|
|
33
|
+
},
|
|
23
34
|
};
|
|
24
35
|
useEffect(() => {
|
|
25
36
|
setRendered(true);
|
|
26
37
|
}, []);
|
|
27
38
|
if (schema?.spec?.meta?.options?.length > 0) {
|
|
28
|
-
return (_jsxs("select", { className: "form__control form__control--select", ...fieldProps, children: [schema?.spec?.meta?.placeholder ? (_jsx("option", { value: "", children: schema?.spec?.meta?.placeholder }, 'placeholder')) : null, schema?.spec?.meta?.options?.map((
|
|
39
|
+
return (_jsxs("select", { className: "form__control form__control--select", ...fieldProps, ref: ref, children: [schema?.spec?.meta?.placeholder ? (_jsx("option", { value: "", children: schema?.spec?.meta?.placeholder }, 'placeholder')) : null, schema?.spec?.meta?.options?.map((optionValue, index) => (_jsx("option", { value: optionValue, children: optionValue }, optionValue)))] }));
|
|
29
40
|
}
|
|
30
|
-
return (_jsx(_Fragment, { children: schema?.spec?.meta?.textarea === true ? (_jsx("textarea", { className: "form__control", ...fieldProps })) : schema?.type === 'boolean' ? (_jsx("input", { type: "checkbox", className: "form__control form__control--checkbox", checked: !rendered ? schema?.spec?.default : null, ...fieldProps })) : schema?.spec?.meta?.hidden === true ? (_jsx("input", { type: "hidden", className: "form__control form__control--hidden", ...fieldProps })) : schema?.type === 'mixed' ? (_jsx(
|
|
31
|
-
}
|
|
32
|
-
export default FormField;
|
|
41
|
+
return (_jsx(_Fragment, { children: schema?.spec?.meta?.textarea === true ? (_jsx("textarea", { className: "form__control", ...fieldProps, ref: ref })) : schema?.type === 'boolean' ? (_jsx("input", { type: "checkbox", className: "form__control form__control--checkbox", checked: !rendered ? schema?.spec?.default : null, value: "true", ...fieldProps, ref: ref })) : schema?.type === 'date' ? (_jsx("input", { type: "date", className: "form__control form__control--date", ...fieldProps, ref: ref })) : schema?.spec?.meta?.hidden === true ? (_jsx("input", { type: "hidden", className: "form__control form__control--hidden", ...fieldProps, ref: ref })) : schema?.type === 'mixed' ? (_jsx(_Fragment, { children: _jsx(FileField, { schema: schema, ...fieldProps, ref: ref }) })) : (_jsx("input", { className: "form__control", ...fieldProps, ref: ref })) }));
|
|
42
|
+
}
|
|
43
|
+
export default forwardRef(FormField);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AnySchema } from 'yup';
|
|
2
|
+
import { InputProps } from './field';
|
|
3
|
+
interface Props extends InputProps {
|
|
4
|
+
schema: AnySchema<any>;
|
|
5
|
+
}
|
|
6
|
+
interface File {
|
|
7
|
+
url: string;
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function Files({ files }: {
|
|
11
|
+
files: File[];
|
|
12
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
declare const _default: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLInputElement>>;
|
|
14
|
+
export default _default;
|
|
15
|
+
//# sourceMappingURL=file-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"file-field.d.ts","sourceRoot":"","sources":["../../src/components/form/file-field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AASpC,UAAU,KAAM,SAAQ,UAAU;IAChC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,CAAA;CACvB;AAED,UAAU,IAAI;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;CACb;AAED,wBAAgB,KAAK,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,IAAI,EAAE,CAAA;CAAE,2CAoBjD;;AA2CD,wBAAoC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useState, } from 'react';
|
|
3
|
+
export function Files({ files }) {
|
|
4
|
+
return (_jsx("ul", { className: "form__file-list", children: files.map((file) => (_jsxs("li", { className: "form__file-list-item", children: [_jsx("figure", { className: "form__file-list-image", children: _jsx("img", { src: file.url, alt: file.name }) }), _jsx("a", { href: file.url, download: file.name, className: "form__file-list-name", children: file.name })] }, file.name))) }));
|
|
5
|
+
}
|
|
6
|
+
function FileField({ schema, ...fieldProps }, ref) {
|
|
7
|
+
const [files, setFiles] = useState([]);
|
|
8
|
+
const originalOnInput = fieldProps.onInput;
|
|
9
|
+
fieldProps.onInput = (event) => {
|
|
10
|
+
const target = event.target;
|
|
11
|
+
const newFiles = Array.from(target.files || []).map((file) => ({
|
|
12
|
+
name: file.name,
|
|
13
|
+
url: URL.createObjectURL(file),
|
|
14
|
+
}));
|
|
15
|
+
setFiles(newFiles);
|
|
16
|
+
target.blur();
|
|
17
|
+
if (originalOnInput) {
|
|
18
|
+
originalOnInput(event);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
const input = (_jsx(_Fragment, { children: _jsx("input", { className: "form__control form__control--mixed", type: "file", ...fieldProps, ref: ref }) }));
|
|
22
|
+
return (_jsxs("fieldset", { className: "form__file-upload-wrapper", children: [input, _jsx(Files, { files: files })] }));
|
|
23
|
+
}
|
|
24
|
+
export default forwardRef(FileField);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { ButtonHTMLAttributes } from 'react';
|
|
2
|
+
export default function SubmitButton({ label, ...props }: {
|
|
2
3
|
label?: string;
|
|
3
|
-
})
|
|
4
|
-
export default SubmitButton;
|
|
4
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>): import("react/jsx-runtime").JSX.Element;
|
|
5
5
|
//# sourceMappingURL=submit-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"submit-button.d.ts","sourceRoot":"","sources":["../../src/components/form/submit-button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"submit-button.d.ts","sourceRoot":"","sources":["../../src/components/form/submit-button.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AAG5C,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,KAAgB,EAChB,GAAG,KAAK,EACT,EAAE;IAAE,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,2CAI9D"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from '../../components';
|
|
3
|
-
|
|
4
|
-
return (_jsx(Button, { label: label
|
|
5
|
-
}
|
|
6
|
-
export default SubmitButton;
|
|
3
|
+
export default function SubmitButton({ label = 'Submit', ...props }) {
|
|
4
|
+
return (_jsx(Button, { label: label, className: "form__submit", type: "submit", ...props }));
|
|
5
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
export default function SuccessMessage({ data, }: {
|
|
2
|
+
data: Record<string, any>;
|
|
3
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
3
4
|
//# sourceMappingURL=success-message.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"success-message.d.ts","sourceRoot":"","sources":["../../src/components/form/success-message.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"success-message.d.ts","sourceRoot":"","sources":["../../src/components/form/success-message.tsx"],"names":[],"mappings":"AAIA,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,IAAI,GACL,EAAE;IACD,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAC1B,2CAeA"}
|
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
export default SuccessMessage
|
|
3
|
+
import { useEffect, useRef } from 'react';
|
|
4
|
+
export default function SuccessMessage({ data, }) {
|
|
5
|
+
const ref = useRef(null);
|
|
6
|
+
useEffect(() => {
|
|
7
|
+
ref.current?.scrollIntoView({ behavior: 'smooth' });
|
|
8
|
+
}, []);
|
|
9
|
+
return (_jsxs("div", { className: "success-message", ref: ref, children: [_jsx("h2", { className: "success-message__title", children: "Thanks for your message" }), _jsx("p", { className: "success-message__text", children: "We'll get back to you as soon as possible." })] }));
|
|
10
|
+
}
|
package/components/form.d.ts
CHANGED
|
@@ -1,27 +1,43 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ReactNode, ButtonHTMLAttributes } from 'react';
|
|
2
2
|
import { ObjectSchema, InferType, AnySchema } from 'yup';
|
|
3
3
|
import { FieldError } from 'react-hook-form';
|
|
4
4
|
import { Status } from '../hooks/use-async';
|
|
5
5
|
import { FieldRenderer } from './form/types';
|
|
6
|
-
|
|
6
|
+
type WithRecaptcha<T> = T & {
|
|
7
|
+
recaptchaToken?: string;
|
|
8
|
+
};
|
|
9
|
+
export interface FormProps<T extends ObjectSchema<any>, DataStructure extends InferType<T> = InferType<T>> {
|
|
7
10
|
schema: T;
|
|
8
11
|
name?: string;
|
|
9
|
-
action?:
|
|
12
|
+
action?: any;
|
|
13
|
+
disabled?: boolean;
|
|
10
14
|
className?: string;
|
|
11
15
|
method?: string;
|
|
12
16
|
initialData?: {
|
|
13
17
|
[P in T as string]: any;
|
|
14
18
|
};
|
|
15
19
|
onSubmit?: (data: InferType<T>) => void;
|
|
20
|
+
onChange?: (data: InferType<T>) => void;
|
|
16
21
|
onStatusChange?: (status: Status) => void;
|
|
17
22
|
renderSuccessMessage?: ((data: InferType<T>) => ReactNode) | false;
|
|
18
23
|
renderErrorMessage?: (error?: FieldError, fieldSchema?: AnySchema) => ReactNode;
|
|
19
|
-
renderSubmit?: (
|
|
24
|
+
renderSubmit?: (props: {
|
|
25
|
+
label?: string;
|
|
26
|
+
} & ButtonHTMLAttributes<HTMLButtonElement>) => ReactNode;
|
|
20
27
|
renderers?: {
|
|
21
|
-
[P in
|
|
28
|
+
[P in DataStructure]: FieldRenderer;
|
|
22
29
|
};
|
|
23
30
|
useRecaptcha?: boolean;
|
|
24
31
|
}
|
|
25
|
-
|
|
32
|
+
export interface FormRef<T extends ObjectSchema<any>, DataStructure extends InferType<T> = InferType<T>> {
|
|
33
|
+
form: HTMLFormElement;
|
|
34
|
+
submit: () => void;
|
|
35
|
+
reset: () => void;
|
|
36
|
+
values: WithRecaptcha<DataStructure>;
|
|
37
|
+
fields: {
|
|
38
|
+
[P in DataStructure as string]?: HTMLElement;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
declare const _default: import("react").ForwardRefExoticComponent<FormProps<ObjectSchema<any, import("yup").AnyObject, any, "">, any> & import("react").RefAttributes<FormRef<ObjectSchema<any, import("yup").AnyObject, any, "">, any>>>;
|
|
26
42
|
export default _default;
|
|
27
43
|
//# sourceMappingURL=form.d.ts.map
|
package/components/form.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/components/form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,SAAS,
|
|
1
|
+
{"version":3,"file":"form.d.ts","sourceRoot":"","sources":["../src/components/form.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,SAAS,EAUT,oBAAoB,EACrB,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,KAAK,CAAA;AAExD,OAAO,EAAiB,UAAU,EAAiB,MAAM,iBAAiB,CAAA;AAE1E,OAAiB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAA;AAY5C,KAAK,aAAa,CAAC,CAAC,IAAI,CAAC,GAAG;IAAE,cAAc,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvD,MAAM,WAAW,SAAS,CACxB,CAAC,SAAS,YAAY,CAAC,GAAG,CAAC,EAC3B,aAAa,SAAS,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;IAEjD,MAAM,EAAE,CAAC,CAAA;IACT,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,GAAG,CAAA;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,WAAW,CAAC,EAAE;SAAG,CAAC,IAAI,CAAC,IAAI,MAAM,GAAG,GAAG;KAAE,CAAA;IACzC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;IACvC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,IAAI,CAAA;IACvC,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IACzC,oBAAoB,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,GAAG,KAAK,CAAA;IAClE,kBAAkB,CAAC,EAAE,CACnB,KAAK,CAAC,EAAE,UAAU,EAClB,WAAW,CAAC,EAAE,SAAS,KACpB,SAAS,CAAA;IACd,YAAY,CAAC,EAAE,CACb,KAAK,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,KAChE,SAAS,CAAA;IACd,SAAS,CAAC,EAAE;SAAG,CAAC,IAAI,aAAa,GAAG,aAAa;KAAE,CAAA;IACnD,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,MAAM,WAAW,OAAO,CACtB,CAAC,SAAS,YAAY,CAAC,GAAG,CAAC,EAC3B,aAAa,SAAS,SAAS,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC,CAAC;IAEjD,IAAI,EAAE,eAAe,CAAA;IACrB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,CAAA;IACpC,MAAM,EAAE;SACL,CAAC,IAAI,aAAa,IAAI,MAAM,CAAC,CAAC,EAAE,WAAW;KAC7C,CAAA;CACF;;AAsVD,wBAA+B"}
|