@goodhood-web/nebenan-core 1.0.0-development.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.
Files changed (45) hide show
  1. package/fonts/inter/Inter-Black.woff2 +0 -0
  2. package/fonts/inter/Inter-BlackItalic.woff2 +0 -0
  3. package/fonts/inter/Inter-Bold.woff2 +0 -0
  4. package/fonts/inter/Inter-BoldItalic.woff2 +0 -0
  5. package/fonts/inter/Inter-ExtraBold.woff2 +0 -0
  6. package/fonts/inter/Inter-ExtraBoldItalic.woff +0 -0
  7. package/fonts/inter/Inter-ExtraBoldItalic.woff2 +0 -0
  8. package/fonts/inter/Inter-ExtraLight.woff2 +0 -0
  9. package/fonts/inter/Inter-ExtraLightItalic.woff +0 -0
  10. package/fonts/inter/Inter-ExtraLightItalic.woff2 +0 -0
  11. package/fonts/inter/Inter-Italic.woff2 +0 -0
  12. package/fonts/inter/Inter-Light.woff2 +0 -0
  13. package/fonts/inter/Inter-LightItalic.woff2 +0 -0
  14. package/fonts/inter/Inter-Medium.woff2 +0 -0
  15. package/fonts/inter/Inter-MediumItalic.woff2 +0 -0
  16. package/fonts/inter/Inter-Regular.woff2 +0 -0
  17. package/fonts/inter/Inter-SemiBold.woff2 +0 -0
  18. package/fonts/inter/Inter-SemiBoldItalic.woff2 +0 -0
  19. package/fonts/inter/Inter-Thin.woff2 +0 -0
  20. package/fonts/inter/Inter-ThinItalic.woff2 +0 -0
  21. package/fonts/inter/Inter-italic.var.woff2 +0 -0
  22. package/fonts/inter/Inter-roman.var.woff2 +0 -0
  23. package/fonts/inter/Inter.var.woff2 +0 -0
  24. package/index.d.ts +6 -0
  25. package/index.js +212 -0
  26. package/index.mjs +21504 -0
  27. package/lib/DynamicRenderer/DynamicRenderer.d.ts +9 -0
  28. package/lib/SponsorCardForm/SponsorCardForm.contentful.d.ts +10 -0
  29. package/lib/SponsorCardForm/SponsorCardForm.d.ts +4 -0
  30. package/lib/SponsorCardForm/SponsorCardForm.types.d.ts +66 -0
  31. package/lib/SponsorCardForm/components/AmountPickerBlock/AmountPickerBlock.d.ts +8 -0
  32. package/lib/SponsorCardForm/components/CtaBlock/CtaBlock.d.ts +9 -0
  33. package/lib/SponsorCardForm/components/GuidelinesModal/GuidelinesModal.d.ts +16 -0
  34. package/lib/SponsorCardForm/components/HeadlineBlock/HeadlineBlock.d.ts +9 -0
  35. package/lib/SponsorCardForm/components/HeroBlock/HeroBlock.d.ts +9 -0
  36. package/lib/SponsorCardForm/components/LegalCheckboxBlock/LegalCheckboxBlock.d.ts +16 -0
  37. package/lib/SponsorCardForm/components/PaymentMethodsBlock/PaymentMethodsBlock.d.ts +10 -0
  38. package/lib/SponsorCardForm/components/PriceDescriptionBlock/PriceDescriptionBlock.d.ts +5 -0
  39. package/lib/SponsorCardForm/components/SelectablePillsBlock/SelectablePillsBlock.d.ts +13 -0
  40. package/lib/SponsorCardForm/components/SubmitButtonBlock/SubmitButtonBlock.d.ts +10 -0
  41. package/lib/SponsorCardForm/components/SwitcherToggleBlock/SwitcherToggleBlock.d.ts +11 -0
  42. package/lib/SponsorCardForm/components/index.d.ts +13 -0
  43. package/lib/SponsorCardForm/storybook_data.d.ts +607 -0
  44. package/package.json +17 -0
  45. package/style.css +1 -0
@@ -0,0 +1,9 @@
1
+ import { Entry } from 'contentful';
2
+ import { TypeBlockSponsorCardSkeleton } from '../../../../api/src/contentful/core/types';
3
+ import { SubmitValues } from '../SponsorCardForm/SponsorCardForm.types';
4
+
5
+ declare const DynamicRenderer: ({ blocks, onSubmit, }: {
6
+ blocks: Entry<TypeBlockSponsorCardSkeleton, "WITHOUT_UNRESOLVABLE_LINKS", string>[];
7
+ onSubmit: (value: SubmitValues) => void;
8
+ }) => import("react/jsx-runtime").JSX.Element;
9
+ export default DynamicRenderer;
@@ -0,0 +1,10 @@
1
+ import { Entry } from 'contentful';
2
+ import { TypeBlockSponsorCardSkeleton } from '../../../../api/src/contentful/core/types';
3
+ import { SubmitValues } from './SponsorCardForm.types';
4
+
5
+ export interface ContentfulBlockProps {
6
+ block: Entry<TypeBlockSponsorCardSkeleton, 'WITHOUT_UNRESOLVABLE_LINKS', string>;
7
+ onSubmit: (Values: SubmitValues) => void;
8
+ }
9
+ declare const ContentfulSponsorCardForm: ({ block, onSubmit }: ContentfulBlockProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default ContentfulSponsorCardForm;
@@ -0,0 +1,4 @@
1
+ import { SponsorCardFormProps } from './SponsorCardForm.types';
2
+
3
+ declare const SponsorCardForm: ({ blocks, defaultSelectedToggle, fieldDescription, fieldErrors, guidelinesModalData, hero, layout, onSubmit, }: SponsorCardFormProps) => import("react/jsx-runtime").JSX.Element;
4
+ export default SponsorCardForm;
@@ -0,0 +1,66 @@
1
+ import { SelectablePillProps } from '../../../../ui/src/lib/SelectablePill/SelectablePill.types';
2
+ import { CtaBlockDataProps } from './components/CtaBlock/CtaBlock';
3
+ import { GuidelinesModalDataProps } from './components/GuidelinesModal/GuidelinesModal';
4
+ import { HeadlineBlockDataProps } from './components/HeadlineBlock/HeadlineBlock';
5
+ import { HeroDataProps } from './components/HeroBlock/HeroBlock';
6
+ import { LegalCheckboxBlockDataProps } from './components/LegalCheckboxBlock/LegalCheckboxBlock';
7
+ import { PaymentMethodsBlockDataProps } from './components/PaymentMethodsBlock/PaymentMethodsBlock';
8
+ import { PriceDescriptionBlockDataProps } from './components/PriceDescriptionBlock/PriceDescriptionBlock';
9
+ import { SubmitButtonBlockDataProps } from './components/SubmitButtonBlock/SubmitButtonBlock';
10
+ import { SwitcherToggleBlockDataProps } from './components/SwitcherToggleBlock/SwitcherToggleBlock';
11
+
12
+ export interface SelectablePillBlockDataProps {
13
+ [key: string]: SelectablePillProps[];
14
+ }
15
+ export type Blocks = {
16
+ cta: CtaBlockDataProps;
17
+ headline: HeadlineBlockDataProps;
18
+ legalCheckbox: LegalCheckboxBlockDataProps;
19
+ paymentMethods: PaymentMethodsBlockDataProps[];
20
+ priceDescription: PriceDescriptionBlockDataProps;
21
+ selectablePills: SelectablePillBlockDataProps;
22
+ submitButton: SubmitButtonBlockDataProps;
23
+ switcherToggle: SwitcherToggleBlockDataProps[];
24
+ };
25
+ export interface FieldErrorsDataProps {
26
+ [key: string]: {
27
+ error: string;
28
+ errorLegal: string;
29
+ minValue: number;
30
+ };
31
+ }
32
+ export interface FieldDescriptionDataProps {
33
+ [key: string]: string;
34
+ }
35
+ export interface SubmitValues {
36
+ amount: number;
37
+ fieldDescription: string;
38
+ legalCheckbox: boolean;
39
+ legalModalOpen: boolean;
40
+ selectedPills: {
41
+ id: string;
42
+ value: string;
43
+ }[];
44
+ toggle: string;
45
+ }
46
+ export interface SponsorCardFormProps {
47
+ blocks: Blocks;
48
+ defaultSelectedToggle: string;
49
+ fieldDescription: FieldDescriptionDataProps;
50
+ fieldErrors: FieldErrorsDataProps;
51
+ guidelinesModalData: GuidelinesModalDataProps;
52
+ hero: HeroDataProps;
53
+ layout: string[];
54
+ onSubmit: (value: SubmitValues) => void;
55
+ }
56
+ export declare const LAYOUT_BLOCK: {
57
+ amountPicker: string;
58
+ cta: string;
59
+ headline: string;
60
+ legalCheckbox: string;
61
+ paymentMethods: string;
62
+ priceDescription: string;
63
+ selectablePills: string;
64
+ submitButton: string;
65
+ switcherToggle: string;
66
+ };
@@ -0,0 +1,8 @@
1
+ interface AmountPickerBlockProps {
2
+ errorMessage?: string;
3
+ id: string;
4
+ onChange: (id: string, value: number) => void;
5
+ value: number;
6
+ }
7
+ declare const AmountPickerBlock: ({ errorMessage, id, onChange, value, }: AmountPickerBlockProps) => import("react/jsx-runtime").JSX.Element;
8
+ export default AmountPickerBlock;
@@ -0,0 +1,9 @@
1
+ export interface CtaBlockDataProps {
2
+ label: string;
3
+ url: string;
4
+ }
5
+ interface CtaBlockProps {
6
+ data: CtaBlockDataProps;
7
+ }
8
+ declare const CtaBlock: ({ data: { label, url } }: CtaBlockProps) => import("react/jsx-runtime").JSX.Element;
9
+ export default CtaBlock;
@@ -0,0 +1,16 @@
1
+ import { ReactNode } from 'react';
2
+
3
+ export interface GuidelinesModalDataProps {
4
+ buttonText: string;
5
+ content: ReactNode[][];
6
+ date: string;
7
+ headline: string;
8
+ version: string;
9
+ }
10
+ interface GuidelinesModalProps {
11
+ data: GuidelinesModalDataProps;
12
+ onClose: (value: boolean) => void;
13
+ open: boolean;
14
+ }
15
+ declare const GuidelinesModal: ({ data: { buttonText, content, date, headline, version }, onClose, open, }: GuidelinesModalProps) => import("react/jsx-runtime").JSX.Element;
16
+ export default GuidelinesModal;
@@ -0,0 +1,9 @@
1
+ export interface HeadlineBlockDataProps {
2
+ headline: string;
3
+ subheadline: string;
4
+ }
5
+ interface HeadlineBlockProps {
6
+ data: HeadlineBlockDataProps;
7
+ }
8
+ declare const HeadlineBlock: ({ data: { headline, subheadline } }: HeadlineBlockProps) => import("react/jsx-runtime").JSX.Element;
9
+ export default HeadlineBlock;
@@ -0,0 +1,9 @@
1
+ export interface HeroDataProps {
2
+ alt: string;
3
+ src: string;
4
+ }
5
+ interface HeroProps {
6
+ data: HeroDataProps;
7
+ }
8
+ declare const HeroBlock: ({ data: { alt, src } }: HeroProps) => import("react/jsx-runtime").JSX.Element;
9
+ export default HeroBlock;
@@ -0,0 +1,16 @@
1
+ export interface LegalCheckboxBlockDataProps {
2
+ buttonLabel: string;
3
+ label: string;
4
+ }
5
+ interface LegalCheckboxBlockProps {
6
+ data: LegalCheckboxBlockDataProps;
7
+ error?: string;
8
+ onChange: (e: {
9
+ target: {
10
+ checked: boolean;
11
+ };
12
+ }) => void;
13
+ onClick: (value: boolean) => void;
14
+ }
15
+ declare const LegalCheckboxBlock: ({ data: { buttonLabel, label }, error, onChange, onClick, }: LegalCheckboxBlockProps) => import("react/jsx-runtime").JSX.Element;
16
+ export default LegalCheckboxBlock;
@@ -0,0 +1,10 @@
1
+ export interface PaymentMethodsBlockDataProps {
2
+ alt: string;
3
+ id: string;
4
+ src: string;
5
+ }
6
+ interface PaymentMethodsBlockProps {
7
+ methods: PaymentMethodsBlockDataProps[];
8
+ }
9
+ declare const PaymentMethodsBlock: ({ methods }: PaymentMethodsBlockProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default PaymentMethodsBlock;
@@ -0,0 +1,5 @@
1
+ export interface PriceDescriptionBlockDataProps {
2
+ label: string;
3
+ }
4
+ declare const PriceDescriptionBlock: ({ label }: PriceDescriptionBlockDataProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default PriceDescriptionBlock;
@@ -0,0 +1,13 @@
1
+ import { SelectablePillProps } from '../../../../../../ui/src/lib/SelectablePill/SelectablePill.types';
2
+
3
+ interface SelectablePill {
4
+ id: string;
5
+ value: string;
6
+ }
7
+ interface SelectablePillsBlockProps {
8
+ onChange: (pills: SelectablePill[]) => void;
9
+ selectablePills: SelectablePillProps[];
10
+ selectedPills: SelectablePill[];
11
+ }
12
+ declare const SelectablePillsBlock: ({ onChange, selectablePills, selectedPills, }: SelectablePillsBlockProps) => import("react/jsx-runtime").JSX.Element;
13
+ export default SelectablePillsBlock;
@@ -0,0 +1,10 @@
1
+ export interface SubmitButtonBlockDataProps {
2
+ label: string;
3
+ securityText: string;
4
+ }
5
+ interface SubmitButtonBlockProps {
6
+ data: SubmitButtonBlockDataProps;
7
+ onSubmit: () => void;
8
+ }
9
+ declare const SubmitButtonBlock: ({ data: { label, securityText }, onSubmit, }: SubmitButtonBlockProps) => import("react/jsx-runtime").JSX.Element;
10
+ export default SubmitButtonBlock;
@@ -0,0 +1,11 @@
1
+ export interface SwitcherToggleBlockDataProps {
2
+ id: string;
3
+ label: string;
4
+ }
5
+ export interface SwitcherToggleBlockProps {
6
+ onChange: (value: string) => void;
7
+ switcherToggle: SwitcherToggleBlockDataProps[];
8
+ value: string;
9
+ }
10
+ declare const SwitcherToggleBlock: ({ onChange, switcherToggle, value, }: SwitcherToggleBlockProps) => import("react/jsx-runtime").JSX.Element;
11
+ export default SwitcherToggleBlock;
@@ -0,0 +1,13 @@
1
+ import { default as AmountPickerBlock } from './AmountPickerBlock/AmountPickerBlock';
2
+ import { default as CtaBlock } from './CtaBlock/CtaBlock';
3
+ import { default as GuidelinesModal } from './GuidelinesModal/GuidelinesModal';
4
+ import { default as HeadlineBlock } from './HeadlineBlock/HeadlineBlock';
5
+ import { default as HeroBlock } from './HeroBlock/HeroBlock';
6
+ import { default as LegalCheckboxBlock } from './LegalCheckboxBlock/LegalCheckboxBlock';
7
+ import { default as PaymentMethodsBlock } from './PaymentMethodsBlock/PaymentMethodsBlock';
8
+ import { default as PriceDescriptionBlock } from './PriceDescriptionBlock/PriceDescriptionBlock';
9
+ import { default as SelectablePillsBlock } from './SelectablePillsBlock/SelectablePillsBlock';
10
+ import { default as SubmitButtonBlock } from './SubmitButtonBlock/SubmitButtonBlock';
11
+ import { default as SwitcherToggleBlock } from './SwitcherToggleBlock/SwitcherToggleBlock';
12
+
13
+ export { AmountPickerBlock, CtaBlock, HeadlineBlock, HeroBlock, LegalCheckboxBlock, PaymentMethodsBlock, PriceDescriptionBlock, GuidelinesModal, SelectablePillsBlock, SubmitButtonBlock, SwitcherToggleBlock, };