consumer-eu-doctor-locator 0.0.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/README.md +10 -0
- package/lib/components/atoms/AnchorBar/AnchorBar.d.ts +8 -0
- package/lib/components/atoms/AnchorBar/AnchorBar.stories.d.ts +18 -0
- package/lib/components/atoms/Icons/ArrowBackIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/ArrowUpIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/ChevronDown.d.ts +3 -0
- package/lib/components/atoms/Icons/ChevronUp.d.ts +3 -0
- package/lib/components/atoms/Icons/CloseIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/DropdownIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/Forms/ClearFiltersIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/Forms/ExclamationCircleIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/Forms/FilterIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/Forms/FormFieldErrorIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/Forms/InfoIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/Forms/SearchIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/Forms/TrailingIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/Icon.d.ts +11 -0
- package/lib/components/atoms/Icons/Icon.stories.d.ts +31 -0
- package/lib/components/atoms/Icons/InfoIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/LeftCircleArrowIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/Location/Location.d.ts +3 -0
- package/lib/components/atoms/Icons/Location/SmallLocationIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/MinusIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/PlusIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/RightCircleArrowIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/Selection/CheckButtonUnselected.d.ts +3 -0
- package/lib/components/atoms/Icons/Selection/CheckIconRaw.d.ts +3 -0
- package/lib/components/atoms/Icons/Selection/CheckSelected.d.ts +3 -0
- package/lib/components/atoms/Icons/Selection/RadioButtonChecked.d.ts +3 -0
- package/lib/components/atoms/Icons/Selection/RadioButtonUnchecked.d.ts +3 -0
- package/lib/components/atoms/Icons/arrows/ArrowIcon.d.ts +10 -0
- package/lib/components/atoms/Icons/listView/ListView.d.ts +2 -0
- package/lib/components/atoms/Icons/mapView/MapView.d.ts +2 -0
- package/lib/components/atoms/Icons/socials/FacebookIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/socials/GoogleIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/socials/InstagramIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/socials/PhoneIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/socials/TwitterIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/socials/YoutubeIcon.d.ts +3 -0
- package/lib/components/atoms/Icons/star/StarIcon.d.ts +13 -0
- package/lib/components/atoms/Loader/Loader.d.ts +8 -0
- package/lib/components/atoms/Loader/Loader.stories.d.ts +18 -0
- package/lib/components/atoms/ProfileImage/ProfileImage.d.ts +10 -0
- package/lib/components/atoms/ProfileImage/ProfileImage.stories.d.ts +26 -0
- package/lib/components/atoms/bootstrapmodal/BootstrapModal.d.ts +18 -0
- package/lib/components/atoms/bootstrapmodal/BootstrapModal.stories.d.ts +47 -0
- package/lib/components/atoms/buttons/button/Button.d.ts +18 -0
- package/lib/components/atoms/buttons/button/Button.stories.d.ts +21 -0
- package/lib/components/atoms/inputs/chip/Chip.d.ts +3 -0
- package/lib/components/atoms/inputs/chip/Chip.stories.d.ts +14 -0
- package/lib/components/atoms/inputs/chip/chipConstants.d.ts +4 -0
- package/lib/components/atoms/inputs/chip/chipTypes.d.ts +36 -0
- package/lib/components/atoms/inputs/formikInputs/InputContainer/InputContainer.d.ts +8 -0
- package/lib/components/atoms/inputs/formikInputs/InputContainer/InputContainer.stories.d.ts +8 -0
- package/lib/components/atoms/inputs/formikInputs/InputLabel/InputLabel.d.ts +2 -0
- package/lib/components/atoms/inputs/formikInputs/InputLabel/InputLabel.stories.d.ts +16 -0
- package/lib/components/atoms/inputs/formikInputs/InputText/InputText.d.ts +18 -0
- package/lib/components/atoms/inputs/formikInputs/InputText/InputText.stories.d.ts +16 -0
- package/lib/components/atoms/inputs/formikInputs/InputTextArea/InputTextArea.d.ts +3 -0
- package/lib/components/atoms/inputs/formikInputs/InputTextArea/InputTextArea.stories.d.ts +16 -0
- package/lib/components/atoms/inputs/formikInputs/Recaptcha/Recaptcha.d.ts +13 -0
- package/lib/components/atoms/inputs/formikInputs/checkbox/Checkbox.d.ts +25 -0
- package/lib/components/atoms/inputs/formikInputs/checkbox/Checkbox.stories.d.ts +9 -0
- package/lib/components/atoms/inputs/formikInputs/radio/InputRadio.d.ts +13 -0
- package/lib/components/atoms/inputs/formikInputs/radio/InputRadio.stories.d.ts +25 -0
- package/lib/components/atoms/inputs/formikInputs/radioButton/RadioButton.d.ts +8 -0
- package/lib/components/atoms/inputs/formikInputs/radioButton/RadioButton.stories.d.ts +36 -0
- package/lib/components/atoms/inputs/formikInputs/range/InputRange.d.ts +3 -0
- package/lib/components/atoms/inputs/formikInputs/range/InputRange.stories.d.ts +45 -0
- package/lib/components/atoms/inputs/formikInputs/select/InputSelect.d.ts +3 -0
- package/lib/components/atoms/inputs/formikInputs/select/InputSelect.stories.d.ts +42 -0
- package/lib/components/atoms/layout/col/Col.d.ts +21 -0
- package/lib/components/atoms/layout/col/Col.stories.d.ts +14 -0
- package/lib/components/atoms/layout/container/Container.d.ts +6 -0
- package/lib/components/atoms/layout/container/Container.stories.d.ts +14 -0
- package/lib/components/atoms/layout/row/Row.d.ts +5 -0
- package/lib/components/atoms/layout/row/Row.stories.d.ts +14 -0
- package/lib/components/atoms/spinner/Spinner.d.ts +8 -0
- package/lib/components/atoms/spinner/Spinner.stories.d.ts +16 -0
- package/lib/components/atoms/stars/Rating.d.ts +9 -0
- package/lib/components/atoms/stars/Rating.stories.d.ts +12 -0
- package/lib/components/mapComponents/infoWindow/InfoWindow.d.ts +3 -0
- package/lib/components/mapComponents/infoWindow/InfoWindow.stories.d.ts +8 -0
- package/lib/components/mapComponents/map/Map.d.ts +8 -0
- package/lib/components/mapComponents/map/Map.stories.d.ts +6 -0
- package/lib/components/mapComponents/marker/Marker.d.ts +2 -0
- package/lib/components/mapComponents/marker/Marker.stories.d.ts +9 -0
- package/lib/components/mapComponents/multiMarkers/MultiMarkers.d.ts +7 -0
- package/lib/components/mapComponents/multiMarkers/MultiMarkers.stories.d.ts +6 -0
- package/lib/components/molecules/DoctorContactDetails/DoctorContactDetails.d.ts +12 -0
- package/lib/components/molecules/DoctorContactDetails/DoctorContactDetails.stories.d.ts +15 -0
- package/lib/components/molecules/DoctorProfileInfo/DoctorProfileInfo.d.ts +14 -0
- package/lib/components/molecules/DoctorProfileInfo/DoctorProfileInfo.stories.d.ts +14 -0
- package/lib/components/molecules/ProfileCard/ProfileCard.d.ts +20 -0
- package/lib/components/molecules/ProfileCard/ProfileCard.stories.d.ts +15 -0
- package/lib/components/molecules/RatingWidget/RatingWidget.d.ts +5 -0
- package/lib/components/molecules/RatingWidget/RatingWidget.stories.d.ts +13 -0
- package/lib/components/molecules/RenderCampaignBadge/RenderCampaignBadge.d.ts +8 -0
- package/lib/components/molecules/WorkingTimeItem/WorkingTimeItem.d.ts +7 -0
- package/lib/components/molecules/WorkingTimeItem/WorkingTimeItem.stories.d.ts +15 -0
- package/lib/components/molecules/annotations/Annotations.d.ts +4 -0
- package/lib/components/molecules/annotations/AnnotationsPopover.d.ts +9 -0
- package/lib/components/molecules/infoWindowContent/InfoWindowContent.d.ts +9 -0
- package/lib/components/molecules/infoWindowContent/InfoWindowContent.stories.d.ts +32 -0
- package/lib/components/molecules/inputs/checkboxGroup/CheckboxGroup.d.ts +12 -0
- package/lib/components/molecules/inputs/checkboxGroup/CheckboxGroup.stories.d.ts +8 -0
- package/lib/components/molecules/inputs/radioGroup/RadioGroup.d.ts +3 -0
- package/lib/components/molecules/inputs/radioGroup/RadioGroup.stories.d.ts +8 -0
- package/lib/components/molecules/profileReview/DoctorProfileReview.d.ts +10 -0
- package/lib/components/molecules/profileReview/DoctorProfileReview.stories.d.ts +18 -0
- package/lib/components/molecules/resultsItem/ResultItem.d.ts +8 -0
- package/lib/components/organisms/AppointmentForm/AppointmentForm.d.ts +11 -0
- package/lib/components/organisms/ProfilePage/ProfilePage.d.ts +5 -0
- package/lib/components/organisms/ProfilePage/ProfilePage.stories.d.ts +6 -0
- package/lib/components/organisms/ProfilePage/profileHelper.d.ts +16 -0
- package/lib/components/organisms/ResultPage/Result.stories.d.ts +6 -0
- package/lib/components/organisms/ResultPage/ResultPage.d.ts +6 -0
- package/lib/components/organisms/WelcomePage/WelcomePage.d.ts +8 -0
- package/lib/components/organisms/WelcomePage/WelcomePage.stories.d.ts +9 -0
- package/lib/components/organisms/inputs/findAdoctor/FindADoctor.d.ts +16 -0
- package/lib/components/organisms/inputs/findAdoctor/FindADoctor.stories.d.ts +24 -0
- package/lib/components/organisms/inputs/formikForm/FormikForm.d.ts +14 -0
- package/lib/components/organisms/inputs/formikForm/FormikForm.stories.d.ts +21 -0
- package/lib/components/organisms/inputs/formikForm/RenderFormFields.d.ts +7 -0
- package/lib/components/organisms/inputs/formikForm/validationSchema.d.ts +9 -0
- package/lib/components/organisms/inputs/nameAndCitySearch/NameAndCitySearch.d.ts +9 -0
- package/lib/components/organisms/inputs/nameAndCitySearch/NameAndCitySearch.stories.d.ts +16 -0
- package/lib/components/organisms/inputs/paginator/Paginator.d.ts +11 -0
- package/lib/components/organisms/inputs/paginator/Paginator.stories.d.ts +12 -0
- package/lib/components/organisms/inputs/paginator/Paginator.trigger.d.ts +3 -0
- package/lib/components/organisms/inputs/searchFilterBar/SearchFilterBar.d.ts +12 -0
- package/lib/components/organisms/inputs/searchFilterBar/SearchFilterBar.stories.d.ts +19 -0
- package/lib/components/organisms/locationResultsMap/LocationResultsMap.d.ts +7 -0
- package/lib/components/organisms/locationResultsMap/LocationResultsMap.stories.d.ts +7 -0
- package/lib/components/organisms/mapContainer/MapContainer.d.ts +9 -0
- package/lib/components/organisms/mapContainer/MapContainer.stories.d.ts +7 -0
- package/lib/components/templates/DoctLocator/DocLocator.d.ts +6 -0
- package/lib/components/templates/DoctLocator/DocLocator.stories.d.ts +7 -0
- package/lib/components/templates/DoctorProfile/DoctorProfile.d.ts +9 -0
- package/lib/components/templates/DoctorProfile/DoctorProfile.stories.d.ts +9 -0
- package/lib/config/configData.d.ts +14 -0
- package/lib/config/index.d.ts +3 -0
- package/lib/config/initialValues.d.ts +5 -0
- package/lib/config/sampleData.d.ts +79 -0
- package/lib/contexts/DocLocatorContext.d.ts +20 -0
- package/lib/contexts/DoctorProfileContext.d.ts +19 -0
- package/lib/doctorLocator.css +1 -0
- package/lib/index.d.ts +827 -0
- package/lib/index.esm.js +2 -0
- package/lib/index.esm.js.map +1 -0
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/lib/classes.d.ts +51 -0
- package/lib/lib/jsonp.d.ts +14 -0
- package/lib/lib/searchSvc.d.ts +35 -0
- package/lib/lib/searchSvcExt.d.ts +30 -0
- package/lib/lib/services/doctorProfileSvc.d.ts +8 -0
- package/lib/lib/services/index.d.ts +8 -0
- package/lib/lib/types/index.d.ts +810 -0
- package/lib/lib/util/UIhelpers.d.ts +21 -0
- package/lib/lib/util/constants.d.ts +4 -0
- package/lib/lib/util/docLocItemUtil.d.ts +40 -0
- package/lib/lib/util/doctorDataProcess.d.ts +2 -0
- package/lib/lib/util/historyUtil.d.ts +32 -0
- package/lib/lib/util/index.d.ts +69 -0
- package/lib/lib/util/profilePageTracking.d.ts +11 -0
- package/lib/lib/util/tracking.d.ts +18 -0
- package/lib/storybook/constants.d.ts +12 -0
- package/lib/tsconfig.tsbuildinfo +1 -0
- package/package.json +67 -0
package/README.md
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# Doc Locator components storybook library
|
|
2
|
+
|
|
3
|
+
## Installation
|
|
4
|
+
Requires node 18 or higher
|
|
5
|
+
Install with: `npm install`
|
|
6
|
+
|
|
7
|
+
## Sripts
|
|
8
|
+
|
|
9
|
+
`npm run storybook` - starts the storybook UI
|
|
10
|
+
`npm run build` - build the library - output files are in the /lib folder
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("./AnchorBar").AnchorBarProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
anchors: {
|
|
12
|
+
control: "object";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
type Story = StoryObj<typeof meta>;
|
|
18
|
+
export declare const Default: Story;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { IconType } from "../../../lib/types";
|
|
3
|
+
export type IconProps = {
|
|
4
|
+
type: IconType;
|
|
5
|
+
width?: number;
|
|
6
|
+
height?: number;
|
|
7
|
+
background?: string;
|
|
8
|
+
color?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
} & React.SVGProps<SVGSVGElement & SVGCircleElement & SVGRectElement>;
|
|
11
|
+
export declare const Icon: (props: IconProps) => React.JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: (props: import("./Icon").IconProps) => import("react").JSX.Element;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
argTypes: {
|
|
10
|
+
type: {
|
|
11
|
+
control: {
|
|
12
|
+
type: "select";
|
|
13
|
+
options: string[];
|
|
14
|
+
defaultValue: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
width: {
|
|
18
|
+
control: "number";
|
|
19
|
+
};
|
|
20
|
+
height: {
|
|
21
|
+
control: "number";
|
|
22
|
+
};
|
|
23
|
+
color: {
|
|
24
|
+
control: "color";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
export default meta;
|
|
29
|
+
type Story = StoryObj<typeof meta>;
|
|
30
|
+
export declare const SearchIcon: Story;
|
|
31
|
+
export declare const TrailingIcon: Story;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import "./ArrowIcon.scss";
|
|
3
|
+
type Props = {
|
|
4
|
+
direction: "left" | "right";
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
isClickable?: boolean;
|
|
7
|
+
onClick?: () => void;
|
|
8
|
+
};
|
|
9
|
+
export default function ArrowIcon({ direction, isClickable, disabled, onClick, }: Props): React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type IStarIcon = {
|
|
3
|
+
/**
|
|
4
|
+
* must be unique
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
fillPercentage?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
height?: number;
|
|
10
|
+
fillColor?: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const StarIcon: ({ id, width, height, fillColor, fillPercentage, }: IStarIcon) => React.JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface LoaderProps {
|
|
3
|
+
loader?: boolean;
|
|
4
|
+
showText?: string;
|
|
5
|
+
size?: "sm" | "md" | "lg";
|
|
6
|
+
variant?: "primary" | "secondary" | "success" | "danger" | "warning" | "info" | "dark" | "light";
|
|
7
|
+
}
|
|
8
|
+
export declare const Loader: React.FC<LoaderProps>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("./Loader").LoaderProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {};
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
type Story = StoryObj<typeof meta>;
|
|
14
|
+
export declare const Default: Story;
|
|
15
|
+
export declare const loader: Story;
|
|
16
|
+
export declare const NoText: Story;
|
|
17
|
+
export declare const loaderNoText: Story;
|
|
18
|
+
export declare const Large: Story;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("./ProfileImage").ProfileImageProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
src: {
|
|
12
|
+
control: "text";
|
|
13
|
+
};
|
|
14
|
+
fallback: {
|
|
15
|
+
control: "text";
|
|
16
|
+
};
|
|
17
|
+
badgeUrl: {
|
|
18
|
+
control: "text";
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default meta;
|
|
23
|
+
type Story = StoryObj<typeof meta>;
|
|
24
|
+
export declare const Default: Story;
|
|
25
|
+
export declare const NoProfileImage: Story;
|
|
26
|
+
export declare const WithBadge: Story;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface BootstrapModalProps {
|
|
3
|
+
show?: boolean;
|
|
4
|
+
onHide?: () => void;
|
|
5
|
+
header?: string;
|
|
6
|
+
children?: React.ReactNode;
|
|
7
|
+
renderHeader?: () => React.ReactNode;
|
|
8
|
+
renderFooter?: () => React.ReactNode;
|
|
9
|
+
renderCloseIcon?: () => React.ReactNode;
|
|
10
|
+
centered?: boolean;
|
|
11
|
+
size?: "sm" | "lg" | "xl";
|
|
12
|
+
animation?: boolean;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Primary UI component for user interaction
|
|
17
|
+
*/
|
|
18
|
+
export declare const BootstrapModal: React.FC<BootstrapModalProps>;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("./BootstrapModal").BootstrapModalProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
args: {
|
|
10
|
+
show: false;
|
|
11
|
+
};
|
|
12
|
+
tags: string[];
|
|
13
|
+
argTypes: {};
|
|
14
|
+
decorators: ((Story: import("@storybook/core/csf").PartialStoryFn<import("@storybook/react").ReactRenderer, {
|
|
15
|
+
show?: boolean | undefined;
|
|
16
|
+
onHide?: (() => void) | undefined;
|
|
17
|
+
header?: string | undefined;
|
|
18
|
+
children?: React.ReactNode;
|
|
19
|
+
renderHeader?: (() => React.ReactNode) | undefined;
|
|
20
|
+
renderFooter?: (() => React.ReactNode) | undefined;
|
|
21
|
+
renderCloseIcon?: (() => React.ReactNode) | undefined;
|
|
22
|
+
centered?: boolean | undefined;
|
|
23
|
+
size?: "sm" | "lg" | "xl" | undefined;
|
|
24
|
+
animation?: boolean | undefined;
|
|
25
|
+
className?: string | undefined;
|
|
26
|
+
}>, ctx: import("@storybook/core/csf").StoryContext<import("@storybook/react").ReactRenderer, {
|
|
27
|
+
show?: boolean | undefined;
|
|
28
|
+
onHide?: (() => void) | undefined;
|
|
29
|
+
header?: string | undefined;
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
renderHeader?: (() => React.ReactNode) | undefined;
|
|
32
|
+
renderFooter?: (() => React.ReactNode) | undefined;
|
|
33
|
+
renderCloseIcon?: (() => React.ReactNode) | undefined;
|
|
34
|
+
centered?: boolean | undefined;
|
|
35
|
+
size?: "sm" | "lg" | "xl" | undefined;
|
|
36
|
+
animation?: boolean | undefined;
|
|
37
|
+
className?: string | undefined;
|
|
38
|
+
}>) => React.JSX.Element)[];
|
|
39
|
+
};
|
|
40
|
+
export default meta;
|
|
41
|
+
type Story = StoryObj<typeof meta>;
|
|
42
|
+
export declare const Default: Story;
|
|
43
|
+
export declare const CustomHeaderFooter: Story;
|
|
44
|
+
export declare const CloseButtonFooter: Story;
|
|
45
|
+
export declare const CenteredModel: Story;
|
|
46
|
+
export declare const TriggeredByButton: Story;
|
|
47
|
+
export declare const ModalForm: Story;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export type ButtonProps = {
|
|
3
|
+
variant: "primary" | "secondary" | "tertiary";
|
|
4
|
+
href?: string;
|
|
5
|
+
type?: React.ButtonHTMLAttributes<HTMLButtonElement>["type"];
|
|
6
|
+
size?: "xs" | "md" | "lg";
|
|
7
|
+
width?: "unset" | "lg" | "fit" | "100";
|
|
8
|
+
className?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
children?: React.ReactNode;
|
|
11
|
+
leftIcon?: React.ReactNode;
|
|
12
|
+
rightIcon?: React.ReactNode;
|
|
13
|
+
fontColor?: "heritage-blue";
|
|
14
|
+
style?: React.CSSProperties;
|
|
15
|
+
onClick?: (e: React.MouseEvent) => void;
|
|
16
|
+
target?: "_blank" | "_self";
|
|
17
|
+
};
|
|
18
|
+
export declare const Button: React.FC<ButtonProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: React.FC<import("./Button").ButtonProps>;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const DefaultButton: Story;
|
|
14
|
+
export declare const PrimaryButton: Story;
|
|
15
|
+
export declare const SecondaryButton: Story;
|
|
16
|
+
export declare const TertiaryButton: Story;
|
|
17
|
+
export declare const LargeButtonWithIcon: Story;
|
|
18
|
+
export declare const DisabledButton: Story;
|
|
19
|
+
export declare const ButtonWithLink: Story;
|
|
20
|
+
export declare const ButtonWithRightIcon: Story;
|
|
21
|
+
export declare const ButtonWithCustomFontColor: Story;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").MemoExoticComponent<(props: import("./chipTypes").IChip) => import("react").JSX.Element>;
|
|
5
|
+
parameters: {
|
|
6
|
+
layout: string;
|
|
7
|
+
};
|
|
8
|
+
tags: string[];
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const FullyEquippedComponent: Story;
|
|
13
|
+
export declare const WithLeftIcon: Story;
|
|
14
|
+
export declare const WithRightIcon: Story;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { chipIconMap } from "./chipConstants";
|
|
2
|
+
type IChipVariant = "outlined" | "filled";
|
|
3
|
+
export type IChipIcon = {
|
|
4
|
+
icon: JSX.Element;
|
|
5
|
+
className: {
|
|
6
|
+
[key in IChipVariant]: `${string}${key}${string}`;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
export type IChipIconType = keyof typeof chipIconMap;
|
|
10
|
+
export type IChip = {
|
|
11
|
+
/**
|
|
12
|
+
* The text displayed on the Chip
|
|
13
|
+
*/
|
|
14
|
+
label: string;
|
|
15
|
+
/**
|
|
16
|
+
* Controls the styling of the Chip
|
|
17
|
+
*/
|
|
18
|
+
variant: IChipVariant;
|
|
19
|
+
/**
|
|
20
|
+
* Callback for the onClick event
|
|
21
|
+
*/
|
|
22
|
+
onClick: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* An icon displayed at the start of the Chip
|
|
25
|
+
*/
|
|
26
|
+
leftIconType?: IChipIconType;
|
|
27
|
+
/**
|
|
28
|
+
* An icon displayed at the end of the Chip
|
|
29
|
+
*/
|
|
30
|
+
rightIconType?: IChipIconType;
|
|
31
|
+
/**
|
|
32
|
+
* Controls wether the Chip is clickable
|
|
33
|
+
*/
|
|
34
|
+
disabled?: boolean;
|
|
35
|
+
};
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
interface InputContainerProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
3
|
+
error: boolean;
|
|
4
|
+
onDarkBg?: boolean;
|
|
5
|
+
hideLabelOnFocus?: boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare const InputContainer: React.ForwardRefExoticComponent<InputContainerProps & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InputContainer } from "./InputContainer";
|
|
2
|
+
import { Meta, StoryObj } from "@storybook/react";
|
|
3
|
+
declare const meta: Meta<typeof InputContainer>;
|
|
4
|
+
export default meta;
|
|
5
|
+
export declare const DefaultInputContainer: StoryObj<typeof InputContainer>;
|
|
6
|
+
export declare const InputContainerWithError: StoryObj<typeof InputContainer>;
|
|
7
|
+
export declare const InputContainerOnDarkBg: StoryObj<typeof InputContainer>;
|
|
8
|
+
export declare const InputContainerHideLabelOnFocus: StoryObj<typeof InputContainer>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { InputLabel } from "./InputLabel";
|
|
3
|
+
import type { StoryObj } from "@storybook/react";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.FC<React.LabelHTMLAttributes<HTMLLabelElement>>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export declare const DefaultInputLabel: StoryObj<typeof InputLabel>;
|
|
14
|
+
export declare const CustomClassNameInputLabel: StoryObj<typeof InputLabel>;
|
|
15
|
+
export declare const InputLabelWithFor: StoryObj<typeof InputLabel>;
|
|
16
|
+
export declare const StyledInputLabel: StoryObj<typeof InputLabel>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CustomFieldDef } from "../../../../../lib/types";
|
|
3
|
+
export declare const InputText: React.FC<CustomFieldDef>;
|
|
4
|
+
type MaskHandlerProps = {
|
|
5
|
+
inputRef: React.RefObject<HTMLInputElement>;
|
|
6
|
+
type: "text" | "number";
|
|
7
|
+
value: string;
|
|
8
|
+
mask?: string;
|
|
9
|
+
numberRegex?: RegExp;
|
|
10
|
+
letterRegex?: RegExp;
|
|
11
|
+
uppercase?: boolean;
|
|
12
|
+
onChange: (v: string) => void;
|
|
13
|
+
};
|
|
14
|
+
export declare const useChangeHandler: ({ inputRef, type, value, mask, numberRegex, letterRegex, onChange, }: MaskHandlerProps) => {
|
|
15
|
+
restOfTheMask: string | undefined;
|
|
16
|
+
handleOnChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
17
|
+
};
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
import { InputText } from "./InputText";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.FC<import("../../../../..").CustomFieldDef>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export declare const DefaultInputText: StoryObj<typeof InputText>;
|
|
14
|
+
export declare const InputTextWithIcons: StoryObj<typeof InputText>;
|
|
15
|
+
export declare const InputTextWithMask: StoryObj<typeof InputText>;
|
|
16
|
+
export declare const InputTextWithError: StoryObj<typeof InputText>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { StoryObj } from "@storybook/react";
|
|
3
|
+
import { InputTextArea } from "./InputTextArea";
|
|
4
|
+
declare const meta: {
|
|
5
|
+
title: string;
|
|
6
|
+
component: React.FC<import("../../../../..").CustomFieldDef>;
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
tags: string[];
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export declare const DefaultInputTextArea: StoryObj<typeof InputTextArea>;
|
|
14
|
+
export declare const InputTextAreaWithIcons: StoryObj<typeof InputTextArea>;
|
|
15
|
+
export declare const InputTextAreaWithError: StoryObj<typeof InputTextArea>;
|
|
16
|
+
export declare const InputTextAreaWithVariant: StoryObj<typeof InputTextArea>;
|