@leatcom/portal-sessions 0.2.0 → 0.3.0-beta.10
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 +66 -57
- package/dist/calendar-Can0qQlp.js +35 -0
- package/dist/camera-switch-GycOMC0h.js +32 -0
- package/dist/caret-left-Bu6hBQ5l.js +35 -0
- package/dist/close-DEGYFjZn.js +31 -0
- package/dist/crossBlack-nmm64QX1.js +40 -0
- package/dist/dollar-BbDPUsF1.js +56 -0
- package/dist/edit-xcD5f5zi.js +31 -0
- package/dist/home-Cdal78fu.js +40 -0
- package/dist/information-Cq6k4byC.js +50 -0
- package/dist/leat_logo-BpQeHCzL.js +33 -0
- package/dist/lib/api/errorHandler.d.ts +3 -0
- package/dist/lib/api/types.d.ts +9 -0
- package/dist/lib/api/useFetcher.d.ts +16 -0
- package/dist/lib/api/useHttp.d.ts +7 -0
- package/dist/lib/api/useV2Fetcher.d.ts +16 -0
- package/dist/lib/api/useV2Http.d.ts +7 -0
- package/dist/lib/components/AnimatedCounter/AnimatedCounter.d.ts +9 -0
- package/dist/lib/components/AnimatedCounter/index.d.ts +1 -0
- package/dist/lib/components/Badge/Badge.d.ts +10 -0
- package/dist/lib/components/Badge/variants.d.ts +5 -0
- package/dist/lib/components/Banner/Banner.d.ts +5 -0
- package/dist/lib/components/Buttons/Button-cva.d.ts +28 -0
- package/dist/lib/components/Buttons/Button.d.ts +12 -0
- package/dist/lib/components/Buttons/NavLinkButton.d.ts +21 -0
- package/dist/lib/components/Buttons/index.d.ts +2 -0
- package/dist/lib/components/Buttons/variants.d.ts +8 -0
- package/dist/lib/components/Card/Card.d.ts +8 -0
- package/dist/lib/components/Card/CardContent.d.ts +7 -0
- package/dist/lib/components/Card/CardFooter.d.ts +6 -0
- package/dist/lib/components/Card/CardHeader.d.ts +6 -0
- package/dist/lib/components/Card/CardSubTitle.d.ts +6 -0
- package/dist/lib/components/Card/CardTitle.d.ts +6 -0
- package/dist/lib/components/Card/NavigationHeader.d.ts +1 -0
- package/dist/lib/components/Card/index.d.ts +6 -0
- package/dist/lib/components/Checkbox/Checkbox.d.ts +15 -0
- package/dist/lib/components/Checkbox/CheckboxBase.d.ts +8 -0
- package/dist/lib/components/Checkbox/CheckboxGroup.d.ts +15 -0
- package/dist/lib/components/Checkbox/index.d.ts +3 -0
- package/dist/lib/components/Form/Form.d.ts +4 -0
- package/dist/lib/components/Form/FormInputField.d.ts +13 -0
- package/dist/lib/components/Hooks/useCloseDropdownHandler.d.ts +2 -0
- package/dist/lib/components/Hooks/useCustomEvents.d.ts +8 -0
- package/dist/lib/components/Hooks/useCustomEvents.test.d.ts +1 -0
- package/dist/lib/components/Hooks/useViewPortSize.d.ts +6 -0
- package/dist/lib/components/Icon/Icon.d.ts +10 -0
- package/dist/lib/components/Icon/IconBase.d.ts +5 -0
- package/dist/lib/components/Icon/index.d.ts +1 -0
- package/dist/lib/components/Icon/variants.d.ts +6 -0
- package/dist/lib/components/Input/Input.d.ts +23 -0
- package/dist/lib/components/Input/InputDate.d.ts +18 -0
- package/dist/lib/components/Input/InputEmail.d.ts +18 -0
- package/dist/lib/components/Input/InputNumeric.d.ts +9 -0
- package/dist/lib/components/Input/index.d.ts +3 -0
- package/dist/lib/components/Keyboard/Keyboard.d.ts +6 -0
- package/dist/lib/components/Keyboard/KeyboardWrapper.d.ts +10 -0
- package/dist/lib/components/Keyboard/NumericKeyboard.d.ts +7 -0
- package/dist/lib/components/Keyboard/index.d.ts +4 -0
- package/dist/lib/components/Keyboard/useKeyboard.d.ts +8 -0
- package/dist/lib/components/Label/Label.d.ts +18 -0
- package/dist/lib/components/Label/index.d.ts +1 -0
- package/dist/lib/components/Layout/Container.d.ts +6 -0
- package/dist/lib/components/Layout/index.d.ts +1 -0
- package/dist/lib/components/Loader/Loader.d.ts +3 -0
- package/dist/lib/components/Message/Message.d.ts +11 -0
- package/dist/lib/components/Modal/Modal.d.ts +17 -0
- package/dist/lib/components/Modal/index.d.ts +1 -0
- package/dist/lib/components/MultiSelect/MultiSelect.d.ts +13 -0
- package/dist/lib/components/MultiSelect/MultiSelectOption.d.ts +8 -0
- package/dist/lib/components/MultiSelect/index.d.ts +1 -0
- package/dist/lib/components/ProgressBar/ProgressBar.d.ts +7 -0
- package/dist/lib/components/ProgressBar/index.d.ts +1 -0
- package/dist/lib/components/Select/Select.d.ts +12 -0
- package/dist/lib/components/Select/SelectGroup.d.ts +7 -0
- package/dist/lib/components/Select/SelectOption.d.ts +5 -0
- package/dist/lib/components/Select/SelectTrigger.d.ts +10 -0
- package/dist/lib/components/Select/index.d.ts +3 -0
- package/dist/lib/components/Skeletons/RowsSkeletonLoader.d.ts +5 -0
- package/dist/lib/components/Skeletons/Skeleton.d.ts +1 -0
- package/dist/lib/components/Skeletons/TableSkeleton.d.ts +8 -0
- package/dist/lib/components/Spinner/Spinner.d.ts +2 -0
- package/dist/lib/components/Spinner/index.d.ts +1 -0
- package/dist/lib/components/Stack/Stack.d.ts +9 -0
- package/dist/lib/components/Stack/index.d.ts +1 -0
- package/dist/lib/components/Switch/Switch.d.ts +20 -0
- package/dist/lib/components/Switch/SwitchBase.d.ts +12 -0
- package/dist/lib/components/Switch/SwitchGroup.d.ts +23 -0
- package/dist/lib/components/Switch/index.d.ts +3 -0
- package/dist/lib/components/Switch/variants.d.ts +6 -0
- package/dist/lib/components/Table/Header.d.ts +6 -0
- package/dist/lib/components/Table/Row.d.ts +7 -0
- package/dist/lib/components/Table/Table.d.ts +9 -0
- package/dist/lib/components/Table/index.d.ts +2 -0
- package/dist/lib/components/Table/types.d.ts +24 -0
- package/dist/lib/components/Typography/Text.d.ts +16 -0
- package/dist/lib/components/Typography/index.d.ts +2 -0
- package/dist/lib/components/Typography/types.d.ts +3 -0
- package/dist/lib/components/debug/DebugOverlay.d.ts +1 -0
- package/dist/lib/components/special/CustomErrorBoundary.d.ts +16 -0
- package/dist/lib/components/special/ErrorHasOccurred.d.ts +1 -0
- package/dist/lib/components/special/LoadingScreen.d.ts +5 -0
- package/dist/lib/components/special/SessionUnavailable.d.ts +3 -0
- package/dist/lib/components/special/SpecialScreen.d.ts +7 -0
- package/dist/lib/components/types.d.ts +17 -0
- package/dist/lib/context/Api/ApiContext.d.ts +5 -0
- package/dist/lib/context/Api/useApiContext.d.ts +1 -0
- package/dist/lib/context/Configuration/ConfigurationContext.d.ts +19 -0
- package/dist/lib/context/Configuration/WithConfiguration.d.ts +7 -0
- package/dist/lib/context/Configuration/useConfigurationContext.d.ts +1 -0
- package/dist/lib/context/PortalSession/PortalSessionContext.d.ts +10 -0
- package/dist/lib/context/PortalSession/PortalSessionProvider.d.ts +7 -0
- package/dist/lib/context/PortalSession/usePortalSessionContext.d.ts +1 -0
- package/dist/lib/design/colorPaletteGenerator.d.ts +6 -0
- package/dist/lib/design/setupBranding.d.ts +2 -0
- package/dist/lib/helpers/displayNameForContact.d.ts +2 -0
- package/dist/lib/helpers/enum.d.ts +23 -0
- package/dist/lib/helpers/helpers.d.ts +9 -0
- package/dist/lib/helpers/index.d.ts +2 -0
- package/dist/lib/hooks/fetchers/useContactIdentifiers.d.ts +10 -0
- package/dist/lib/hooks/fetchers/useContactSubscriptions.d.ts +6 -0
- package/dist/lib/hooks/fetchers/useGiftcard.d.ts +6 -0
- package/dist/lib/hooks/fetchers/useLoyaltyTransactions.d.ts +20 -0
- package/dist/lib/hooks/fetchers/usePrepaidBalance.d.ts +6 -0
- package/dist/lib/hooks/fetchers/useRewards.d.ts +6 -0
- package/dist/lib/hooks/fetchers/useSubscriptions.d.ts +6 -0
- package/dist/lib/hooks/fetchers/useVoucher.d.ts +6 -0
- package/dist/lib/hooks/fetchers/useVouchers.d.ts +6 -0
- package/dist/lib/hooks/toasts/useToast.d.ts +7 -0
- package/dist/lib/hooks/useCreatePortalSession.d.ts +5 -0
- package/dist/lib/hooks/useCurrency.d.ts +5 -0
- package/dist/lib/hooks/useEvents.d.ts +4 -0
- package/dist/lib/localization/i18n.d.ts +2 -0
- package/dist/lib/main.d.ts +8 -0
- package/dist/lib/modules/CreateNewPortalSession.d.ts +31 -0
- package/dist/lib/modules/Root.d.ts +14 -0
- package/dist/lib/modules/StartSession.d.ts +2 -0
- package/dist/lib/modules/UuidSession.d.ts +6 -0
- package/dist/lib/modules/components/HandleContactIdentifier.d.ts +7 -0
- package/dist/lib/modules/components/Scanner/QrReader.d.ts +5 -0
- package/dist/lib/modules/components/Scanner/QrReader2.d.ts +5 -0
- package/dist/lib/modules/components/Scanner/QrReader3.d.ts +5 -0
- package/dist/lib/modules/components/Scanner/QrReader4.d.ts +5 -0
- package/dist/lib/modules/components/Scanner/Scanner.d.ts +9 -0
- package/dist/lib/modules/components/auth/AuthenticateContact.d.ts +1 -0
- package/dist/lib/modules/components/auth/AuthenticateViaContactIdentifier.d.ts +4 -0
- package/dist/lib/modules/components/auth/AuthenticateViaEmail.d.ts +13 -0
- package/dist/lib/modules/components/useFindOrCreateContact.d.ts +9 -0
- package/dist/lib/modules/components/useLinkContactToSession.d.ts +4 -0
- package/dist/lib/modules/components/useLinkIdentifierToContact.d.ts +5 -0
- package/dist/lib/modules/generic/Generic.d.ts +6 -0
- package/dist/lib/modules/giftcard/HandleGiftcard.d.ts +7 -0
- package/dist/lib/modules/giftcard/IdentifyGiftcard.d.ts +1 -0
- package/dist/lib/modules/pointsTransaction/PointsTransaction.d.ts +1 -0
- package/dist/lib/modules/portal/profile/Data.d.ts +1 -0
- package/dist/lib/modules/portal/profile/details/activities/Activities.d.ts +1 -0
- package/dist/lib/modules/portal/profile/details/contactAttributes/ContactAttributes.d.ts +1 -0
- package/dist/lib/modules/portal/profile/details/contactIdentifiers/ContactIdentifiers.d.ts +1 -0
- package/dist/lib/modules/portal/profile/details/contactIdentifiers/CreateContactIdentifier.d.ts +1 -0
- package/dist/lib/modules/portal/profile/details/subscriptions/Subscriptions.d.ts +1 -0
- package/dist/lib/modules/portal/profile/sections/Balance.d.ts +1 -0
- package/dist/lib/modules/portal/profile/sections/LoyaltyTransactions.d.ts +1 -0
- package/dist/lib/modules/portal/profile/sections/Section.d.ts +5 -0
- package/dist/lib/modules/portal/profile/sections/Stats.d.ts +1 -0
- package/dist/lib/modules/portal/profile/sections/Subscriptions.d.ts +1 -0
- package/dist/lib/modules/portal/rewards/Reward.d.ts +11 -0
- package/dist/lib/modules/portal/rewards/Rewards.d.ts +1 -0
- package/dist/lib/modules/portal/rewards/RewardsContent.d.ts +8 -0
- package/dist/lib/modules/portal/vouchers/Voucher.d.ts +9 -0
- package/dist/lib/modules/portal/vouchers/Vouchers.d.ts +1 -0
- package/dist/lib/modules/prepaid/HandlePrepaid.d.ts +1 -0
- package/dist/lib/modules/voucher/HandleVoucher.d.ts +14 -0
- package/dist/lib/modules/voucher/IdentifyVoucher.d.ts +1 -0
- package/dist/lib/routing/AuthenticatedRoute.d.ts +6 -0
- package/dist/lib/routing/ContactRoutes.d.ts +1 -0
- package/dist/lib/routing/PortalRoutes.d.ts +1 -0
- package/dist/lib/routing/Router.d.ts +1 -0
- package/dist/lib/routing/RouterStateReporter.d.ts +16 -0
- package/dist/lib/routing/routes.d.ts +3 -0
- package/dist/lib/types/Contact.d.ts +35 -0
- package/dist/lib/types/Giftcard.d.ts +47 -0
- package/dist/lib/types/PortalSession.d.ts +61 -0
- package/dist/lib/types/Prepaid.d.ts +27 -0
- package/dist/lib/types/Reward.d.ts +18 -0
- package/dist/lib/types/Subscription.d.ts +32 -0
- package/dist/lib/types/Voucher.d.ts +39 -0
- package/dist/mail-CILHEgMY.js +32 -0
- package/dist/notificationErrorV2-CtLIl0uv.js +50 -0
- package/dist/notificationSuccessV2-CiOOunIj.js +50 -0
- package/dist/notificationWarningV2-DeiXPjap.js +50 -0
- package/dist/portal-sessions.es.js +45806 -21
- package/dist/portal-sessions.umd.js +76 -879
- package/dist/qr-scanner-worker.min-uyv8r9jq.js +20 -0
- package/dist/settings-hMBGAHeo.js +40 -0
- package/dist/shopping-bag-D83pzW-N.js +48 -0
- package/dist/star-DQL2OQsB.js +34 -0
- package/dist/style.css +24 -1
- package/dist/user-DATIDkwc.js +28 -0
- package/package.json +49 -51
- package/dist/browser-ponyfill-C2l-BoS5.js +0 -380
- package/dist/calendar-DatiUSvc.js +0 -19
- package/dist/camera-switch-BG4ghgtr.js +0 -19
- package/dist/caret-left-BzIJ4OR3.js +0 -19
- package/dist/close-BOnvojez.js +0 -19
- package/dist/crossBlack-D3AScCz7.js +0 -19
- package/dist/dollar-BiByq0t0.js +0 -19
- package/dist/edit-GxItFJF8.js +0 -19
- package/dist/home-BRXF8Ydg.js +0 -19
- package/dist/information-kCveus0e.js +0 -19
- package/dist/mail-Dn-PppcI.js +0 -19
- package/dist/main-Cq8Au5WV.js +0 -38031
- package/dist/notificationErrorV2-BT7C7lnC.js +0 -19
- package/dist/notificationSuccessV2-CD4Nzkx1.js +0 -19
- package/dist/notificationWarningV2-Ce-MU9nv.js +0 -19
- package/dist/portal-sessions.es.d.ts +0 -173
- package/dist/qr-scanner-worker.min-BT9FO00c.js +0 -115
- package/dist/settings-iI_Z4aYk.js +0 -19
- package/dist/shopping-bag-gCcU6Sk5.js +0 -19
- package/dist/star-B5vZfVjf.js +0 -19
- package/dist/user-CefiGOdl.js +0 -19
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { badgeCva } from './variants';
|
|
3
|
+
export type BadgeProps = Omit<React.HTMLAttributes<HTMLSpanElement>, "size"> & VariantProps<typeof badgeCva> & {
|
|
4
|
+
label: string;
|
|
5
|
+
size?: "sm" | "md";
|
|
6
|
+
color?: "primary" | "gray";
|
|
7
|
+
stroke?: boolean;
|
|
8
|
+
};
|
|
9
|
+
declare const Badge: React.FC<BadgeProps>;
|
|
10
|
+
export default Badge;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ButtonHTMLAttributes, default as React } from 'react';
|
|
3
|
+
import { buttonCva } from './variants';
|
|
4
|
+
type ButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "disabled"> & VariantProps<typeof buttonCva> & {
|
|
5
|
+
asChild?: boolean;
|
|
6
|
+
before?: React.ReactElement<HTMLElement>;
|
|
7
|
+
after?: React.ReactElement<HTMLElement>;
|
|
8
|
+
className?: string;
|
|
9
|
+
pending?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
variant?: "primary" | "secondary" | "destructive" | "destructive-outline" | "link-gray";
|
|
12
|
+
size?: "sm" | "md" | "lg";
|
|
13
|
+
};
|
|
14
|
+
declare const Button: React.ForwardRefExoticComponent<Omit<ButtonHTMLAttributes<HTMLButtonElement>, "disabled"> & VariantProps<(props?: {
|
|
15
|
+
size?: "sm" | "md" | "lg";
|
|
16
|
+
variant?: "primary" | "secondary" | "destructive" | "destructive-outline" | "link-gray";
|
|
17
|
+
} & import('class-variance-authority/types').ClassProp) => string> & {
|
|
18
|
+
asChild?: boolean;
|
|
19
|
+
before?: React.ReactElement<HTMLElement>;
|
|
20
|
+
after?: React.ReactElement<HTMLElement>;
|
|
21
|
+
className?: string;
|
|
22
|
+
pending?: boolean;
|
|
23
|
+
disabled?: boolean;
|
|
24
|
+
variant?: "primary" | "secondary" | "destructive" | "destructive-outline" | "link-gray";
|
|
25
|
+
size?: "sm" | "md" | "lg";
|
|
26
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
export { Button, type ButtonProps, buttonCva as buttonVariants };
|
|
28
|
+
export default Button;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface ButtonProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
onClick?: (e: React.MouseEvent<HTMLButtonElement>) => void;
|
|
5
|
+
className?: string;
|
|
6
|
+
loading: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
size?: "md" | "lg";
|
|
9
|
+
variant?: "primary" | "outline-solid" | "destructive" | "destructive-outline";
|
|
10
|
+
}
|
|
11
|
+
declare const Button: React.FC<ButtonProps>;
|
|
12
|
+
export default Button;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { VariantProps } from 'class-variance-authority';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
import { NavLinkProps, To } from 'react-router-dom';
|
|
4
|
+
import { buttonCva } from './variants';
|
|
5
|
+
type NavLinkButtonDestination = {
|
|
6
|
+
path: To;
|
|
7
|
+
to?: never;
|
|
8
|
+
} | {
|
|
9
|
+
path?: never;
|
|
10
|
+
to: To;
|
|
11
|
+
};
|
|
12
|
+
type NavLinkButtonProps = Omit<NavLinkProps, "to"> & VariantProps<typeof buttonCva> & NavLinkButtonDestination & {
|
|
13
|
+
variant?: "primary" | "secondary" | "destructive" | "destructive-outline" | "link-gray";
|
|
14
|
+
size?: "sm" | "md" | "lg";
|
|
15
|
+
children: ReactNode;
|
|
16
|
+
};
|
|
17
|
+
declare const NavLinkButton: {
|
|
18
|
+
({ className, children, path, to, variant, size, ...props }: NavLinkButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
export default NavLinkButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const buttonCva: (props?: {
|
|
2
|
+
size?: "sm" | "md" | "lg";
|
|
3
|
+
variant?: "primary" | "secondary" | "destructive" | "destructive-outline" | "link-gray";
|
|
4
|
+
} & import('class-variance-authority/types').ClassProp) => string;
|
|
5
|
+
export declare const iconButtonCva: (props?: {
|
|
6
|
+
size?: "md" | "lg";
|
|
7
|
+
variant?: "primary" | "secondary" | "destructive" | "destructive-outline";
|
|
8
|
+
} & import('class-variance-authority/types').ClassProp) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function NavigationHeader(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { default as Card } from './Card';
|
|
2
|
+
export { default as CardContent } from './CardContent';
|
|
3
|
+
export { default as CardFooter } from './CardFooter';
|
|
4
|
+
export { default as CardHeader } from './CardHeader';
|
|
5
|
+
export { default as CardSubTitle } from './CardSubTitle';
|
|
6
|
+
export { default as CardTitle } from './CardTitle';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type CheckboxProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
helperText?: React.ReactNode;
|
|
9
|
+
label?: React.ReactNode;
|
|
10
|
+
required?: boolean;
|
|
11
|
+
tooltip?: React.ReactNode;
|
|
12
|
+
onChange?: (checked: boolean) => void;
|
|
13
|
+
};
|
|
14
|
+
declare const Checkbox: React.FC<CheckboxProps>;
|
|
15
|
+
export default Checkbox;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
type CheckboxBaseProps = {
|
|
2
|
+
id?: string;
|
|
3
|
+
defaultChecked?: boolean;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
onChange?: (checked: boolean) => void;
|
|
6
|
+
};
|
|
7
|
+
declare const CheckboxBase: ({ id, defaultChecked, disabled, onChange: propsOnChange, }: CheckboxBaseProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export default CheckboxBase;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { LabelProps } from '../Label/Label';
|
|
3
|
+
import { LabelHelperProps } from '../types';
|
|
4
|
+
import { CheckboxProps } from './index';
|
|
5
|
+
export type CheckboxGroupElement = HTMLDivElement;
|
|
6
|
+
export type CheckboxGroupProps = React.HTMLAttributes<HTMLDivElement> & LabelProps & LabelHelperProps;
|
|
7
|
+
type CheckboxGroupContextProps = {
|
|
8
|
+
disabled?: CheckboxGroupProps["disabled"];
|
|
9
|
+
};
|
|
10
|
+
export declare function useCheckboxGroupContext(skipCheck?: boolean): CheckboxGroupContextProps;
|
|
11
|
+
type CheckboxGroupItemProps = CheckboxProps;
|
|
12
|
+
declare const CheckboxGroup: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & LabelProps & LabelHelperProps & React.RefAttributes<HTMLDivElement>> & {
|
|
13
|
+
Item: ({ disabled, label, defaultChecked, }: CheckboxGroupItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
};
|
|
15
|
+
export default CheckboxGroup;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type FormFieldProps = {
|
|
2
|
+
type: "text" | "email" | "date";
|
|
3
|
+
name: string;
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
+
error?: string;
|
|
10
|
+
helperText?: string;
|
|
11
|
+
};
|
|
12
|
+
declare const FormField: React.FC<FormFieldProps>;
|
|
13
|
+
export default FormField;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type EventListenerWithType<T extends keyof WindowEventMap> = (event: WindowEventMap[T]) => void;
|
|
2
|
+
export default function useCustomEvents(): {
|
|
3
|
+
subscribe: (eventName: string, listener: EventListenerWithType<keyof WindowEventMap>) => void;
|
|
4
|
+
unsubscribe: (eventName: string, listener: EventListenerWithType<keyof WindowEventMap>) => void;
|
|
5
|
+
publish: (eventName: string, data?: {
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
} | string) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { default as IconBase } from './IconBase';
|
|
3
|
+
import { default as iconCva } from './variants';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
interface IconProps extends Omit<React.ComponentProps<typeof IconBase>, "svgComponent">, VariantProps<typeof iconCva> {
|
|
6
|
+
icon: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const Icon: ({ icon, size, variant, outline }: IconProps) => import("react/jsx-runtime").JSX.Element | "span";
|
|
10
|
+
export default Icon;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Icon } from './Icon';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
declare const iconCva: (props?: {
|
|
2
|
+
size?: "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl";
|
|
3
|
+
variant?: "primary" | "placeholder" | "secondary" | "discovery" | "destructive";
|
|
4
|
+
outline?: boolean;
|
|
5
|
+
} & import('class-variance-authority/types').ClassProp) => string;
|
|
6
|
+
export default iconCva;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type InputProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
type?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
error?: boolean;
|
|
11
|
+
defaultValue?: any;
|
|
12
|
+
value?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
helperText?: React.ReactNode;
|
|
15
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
beforeIcon?: string;
|
|
17
|
+
afterIcon?: string;
|
|
18
|
+
autoFocus?: boolean;
|
|
19
|
+
onFocus?: () => void;
|
|
20
|
+
onBlur?: () => void;
|
|
21
|
+
};
|
|
22
|
+
declare const Input: React.FC<InputProps>;
|
|
23
|
+
export default Input;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type InputDateProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
type?: "date" | "date_time";
|
|
6
|
+
label?: React.ReactNode;
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
error?: boolean;
|
|
11
|
+
defaultValue?: any;
|
|
12
|
+
value?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
helperText?: React.ReactNode;
|
|
15
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
};
|
|
17
|
+
declare const InputDate: React.FC<InputDateProps>;
|
|
18
|
+
export default InputDate;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
type InputEmailProps = {
|
|
3
|
+
id?: string;
|
|
4
|
+
name?: string;
|
|
5
|
+
label?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
error?: boolean;
|
|
10
|
+
defaultValue?: any;
|
|
11
|
+
value?: string;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
helperText?: React.ReactNode;
|
|
14
|
+
autoFocus?: boolean;
|
|
15
|
+
onChange?: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
16
|
+
};
|
|
17
|
+
declare const InputEmail: React.FC<InputEmailProps>;
|
|
18
|
+
export default InputEmail;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
type InputNumericProps = {
|
|
3
|
+
value: number;
|
|
4
|
+
valueSetter: Dispatch<SetStateAction<number>>;
|
|
5
|
+
enabled: boolean;
|
|
6
|
+
maxValue?: number;
|
|
7
|
+
};
|
|
8
|
+
export default function InputNumeric({ value, valueSetter, enabled, maxValue, }: InputNumericProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { MutableRefObject } from 'react';
|
|
2
|
+
import { KeyboardLayoutObject, KeyboardReactInterface } from 'react-simple-keyboard';
|
|
3
|
+
type KeyboardWrapperProps = {
|
|
4
|
+
onChange: (input: string) => void;
|
|
5
|
+
keyboardRef: MutableRefObject<KeyboardReactInterface | null>;
|
|
6
|
+
layout?: KeyboardLayoutObject;
|
|
7
|
+
theme?: string;
|
|
8
|
+
};
|
|
9
|
+
export default function KeyboardWrapper({ onChange, keyboardRef, layout, theme }: KeyboardWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
type NumericKeyboardProps = {
|
|
3
|
+
value: string;
|
|
4
|
+
valueSetter: Dispatch<SetStateAction<string>>;
|
|
5
|
+
};
|
|
6
|
+
export default function NumericKeyboard({ value, valueSetter }: NumericKeyboardProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EventListenerWithType } from '../Hooks/useCustomEvents';
|
|
2
|
+
import { FocusEvent } from 'react';
|
|
3
|
+
export default function useKeyboard(): {
|
|
4
|
+
initialize: (openKeyboardListener: EventListenerWithType<keyof WindowEventMap>, closeKeyboardListener: EventListenerWithType<keyof WindowEventMap>) => void;
|
|
5
|
+
terminate: (openKeyboardListener: EventListenerWithType<keyof WindowEventMap>, closeKeyboardListener: EventListenerWithType<keyof WindowEventMap>) => void;
|
|
6
|
+
open: (e: FocusEvent<HTMLInputElement>) => void;
|
|
7
|
+
close: () => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export type LabelProps = {
|
|
2
|
+
children: React.ReactNode;
|
|
3
|
+
className?: string;
|
|
4
|
+
tooltip?: React.ReactNode;
|
|
5
|
+
description?: React.ReactNode;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
htmlFor?: string;
|
|
9
|
+
};
|
|
10
|
+
export type HelperTextProps = {
|
|
11
|
+
helperText?: React.ReactNode;
|
|
12
|
+
error?: boolean;
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
};
|
|
15
|
+
declare const Label: import('react').FC<LabelProps> & {
|
|
16
|
+
Helper: import('react').FC<HelperTextProps>;
|
|
17
|
+
};
|
|
18
|
+
export default Label;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Label } from './Label';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Container } from './Container';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type MessageVariant = "info" | "success" | "warning" | "error";
|
|
3
|
+
type MessageProps = {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
className?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
title?: ReactNode;
|
|
8
|
+
variant?: MessageVariant;
|
|
9
|
+
};
|
|
10
|
+
export default function Message({ children, className, icon, title, variant, }: MessageProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type Action = {
|
|
3
|
+
label?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
loading?: boolean;
|
|
6
|
+
action?: () => void;
|
|
7
|
+
};
|
|
8
|
+
type ModalProps = {
|
|
9
|
+
title?: string;
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
primaryAction?: Action;
|
|
13
|
+
secondaryAction?: Action;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
};
|
|
16
|
+
export default function Modal({ title, isOpen, onClose, primaryAction, secondaryAction, children, }: ModalProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Modal } from './Modal';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
2
|
+
export type Option = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
type MultiSelectProps = Omit<ComponentProps<"select">, "onChange"> & {
|
|
7
|
+
value: string;
|
|
8
|
+
label: string;
|
|
9
|
+
options: Array<Option>;
|
|
10
|
+
onChange: (name: string, value: string) => void;
|
|
11
|
+
};
|
|
12
|
+
export default function MultiSelect(props: MultiSelectProps): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Option } from './MultiSelect';
|
|
2
|
+
type MultiSelectOptionProps = {
|
|
3
|
+
option: Option;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
onChange: (checked: boolean) => void;
|
|
6
|
+
};
|
|
7
|
+
export default function MultiSelectOption({ option: { label }, checked, onChange, }: MultiSelectOptionProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as MultiSelect } from './MultiSelect';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as ProgressBar } from './ProgressBar';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
type SelectProps = Omit<ComponentProps<"select">, "onChange" | "value"> & {
|
|
3
|
+
value?: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
helperText?: string;
|
|
7
|
+
placeholder?: string;
|
|
8
|
+
onChange?: (value: string) => void;
|
|
9
|
+
children?: ReactNode | Array<ReactNode>;
|
|
10
|
+
};
|
|
11
|
+
export default function Select(props: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SelectOptionProps } from './SelectOption';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
3
|
+
export type SelectGroupProps = {
|
|
4
|
+
label: string;
|
|
5
|
+
children: ReactElement<SelectOptionProps> | Array<ReactElement<SelectOptionProps>>;
|
|
6
|
+
};
|
|
7
|
+
export default function SelectGroup({ label, children }: SelectGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
type SelectTriggerProps = {
|
|
3
|
+
value?: string;
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
open: boolean;
|
|
6
|
+
setOpen: Dispatch<SetStateAction<boolean>>;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export default function SelectTrigger({ value, placeholder, open, setOpen, disabled }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Skeleton(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Spinner } from './Spinner';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type StackProps = {
|
|
3
|
+
children: ReactNode | Array<ReactNode>;
|
|
4
|
+
offset?: number;
|
|
5
|
+
max?: number;
|
|
6
|
+
initialCollapsed?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export default function Stack({ children, offset, max, initialCollapsed }: StackProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Stack } from './Stack';
|