@shophost/react 0.1.3
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/admin-client.cjs +2 -0
- package/admin-client.js +21796 -0
- package/components/admin/forms/manufacturer-form.d.ts +7 -0
- package/components/admin/forms/organization-configuration-form.d.ts +10 -0
- package/components/admin/forms/organization-form.d.ts +8 -0
- package/components/admin/forms/organization-schedule-form.d.ts +10 -0
- package/components/admin/forms/product-category.form.d.ts +7 -0
- package/components/admin/forms/product-form/basic-info-section.d.ts +8 -0
- package/components/admin/forms/product-form/index.d.ts +7 -0
- package/components/admin/forms/product-form/metadata-section.d.ts +8 -0
- package/components/admin/forms/product-form/modifier-group-dialog.d.ts +9 -0
- package/components/admin/forms/product-form/modifiers-list.d.ts +7 -0
- package/components/admin/forms/product-form/modifiers-section.d.ts +8 -0
- package/components/admin/forms/product-form/price-section.d.ts +9 -0
- package/components/admin/forms/shipping-method-form.d.ts +7 -0
- package/components/admin/forms/sign-in-form.d.ts +2 -0
- package/components/admin/forms/sign-up-form.d.ts +2 -0
- package/components/admin/partials/manufacturers-list/columns.d.ts +3 -0
- package/components/admin/partials/manufacturers-list/index.d.ts +2 -0
- package/components/admin/partials/orders-list/actions-cell.d.ts +10 -0
- package/components/admin/partials/orders-list/columns.d.ts +3 -0
- package/components/admin/partials/orders-list/index.d.ts +2 -0
- package/components/admin/partials/orders-list/order-details-modal.d.ts +9 -0
- package/components/admin/partials/organization-list/index.d.ts +2 -0
- package/components/admin/partials/product-categories-list/columns.d.ts +14 -0
- package/components/admin/partials/product-categories-list/index.d.ts +2 -0
- package/components/admin/partials/products-list/columns.d.ts +14 -0
- package/components/admin/partials/products-list/index.d.ts +2 -0
- package/components/admin/partials/reservations-list/actions-cell.d.ts +10 -0
- package/components/admin/partials/reservations-list/columns.d.ts +3 -0
- package/components/admin/partials/reservations-list/index.d.ts +2 -0
- package/components/admin/partials/reservations-list/reservation-details-modal.d.ts +8 -0
- package/components/admin/partials/shipping-methods-list/columns.d.ts +3 -0
- package/components/admin/partials/shipping-methods-list/index.d.ts +2 -0
- package/components/ui/badge.d.ts +31 -0
- package/components/ui/button.d.ts +35 -0
- package/components/ui/calendar.d.ts +21 -0
- package/components/ui/card.d.ts +6 -0
- package/components/ui/checkbox.d.ts +4 -0
- package/components/ui/command-bar.d.ts +24 -0
- package/components/ui/command.d.ts +80 -0
- package/components/ui/data-table/DataTable.d.ts +13 -0
- package/components/ui/data-table/DataTableBulkEditor.d.ts +7 -0
- package/components/ui/data-table/DataTableColumnHeader.d.ts +7 -0
- package/components/ui/data-table/DataTableFilter.d.ts +18 -0
- package/components/ui/data-table/DataTablePagination.d.ts +8 -0
- package/components/ui/data-table/DataTableViewOptions.d.ts +6 -0
- package/components/ui/data-table/tanstack-table.d.ts +7 -0
- package/components/ui/date-picker.d.ts +72 -0
- package/components/ui/dialog.d.ts +20 -0
- package/components/ui/divider.d.ts +5 -0
- package/components/ui/drawer.d.ts +18 -0
- package/components/ui/dropdown.d.ts +30 -0
- package/components/ui/form-generator.d.ts +29 -0
- package/components/ui/header.d.ts +2 -0
- package/components/ui/icons/ArrowAnimated.d.ts +1 -0
- package/components/ui/icons/spinner-icon.d.ts +5 -0
- package/components/ui/input/country-input.d.ts +7 -0
- package/components/ui/input/email-input.d.ts +7 -0
- package/components/ui/input/image-upload-input.d.ts +19 -0
- package/components/ui/input/phone-number-input.d.ts +8 -0
- package/components/ui/input/select-input.d.ts +14 -0
- package/components/ui/input/text-input.d.ts +87 -0
- package/components/ui/input-array-group.d.ts +10 -0
- package/components/ui/input-group.d.ts +19 -0
- package/components/ui/input-object-group.d.ts +8 -0
- package/components/ui/input.d.ts +13 -0
- package/components/ui/label.d.ts +7 -0
- package/components/ui/line-chart.d.ts +35 -0
- package/components/ui/logo.d.ts +5 -0
- package/components/ui/multiple-select.d.ts +73 -0
- package/components/ui/navigation/DropdownUserProfile.d.ts +6 -0
- package/components/ui/navigation/MobileSidebar.d.ts +1 -0
- package/components/ui/navigation/Sidebar.d.ts +1 -0
- package/components/ui/navigation/SidebarWorkspacesDropdown.d.ts +2 -0
- package/components/ui/navigation/UserProfile.d.ts +2 -0
- package/components/ui/overview/DashboardCategoryBarCard.d.ts +13 -0
- package/components/ui/overview/DashboardChartCard.d.ts +12 -0
- package/components/ui/overview/DashboardFilterbar.d.ts +16 -0
- package/components/ui/overview/DashboardProgressBarCard.d.ts +12 -0
- package/components/ui/overview/dashboard-types.d.ts +12 -0
- package/components/ui/popover.d.ts +13 -0
- package/components/ui/progress-bar.d.ts +89 -0
- package/components/ui/progress-circle.d.ts +91 -0
- package/components/ui/radio-card.d.ts +6 -0
- package/components/ui/search-bar.d.ts +29 -0
- package/components/ui/select.d.ts +17 -0
- package/components/ui/settings/ModalAddUser.d.ts +4 -0
- package/components/ui/switch.d.ts +50 -0
- package/components/ui/tab-navigation.d.ts +7 -0
- package/components/ui/table.d.ts +11 -0
- package/components/ui/tooltip.d.ts +11 -0
- package/config/countries.d.ts +8 -0
- package/data/data.d.ts +31 -0
- package/data/overview-data.d.ts +2 -0
- package/data/schema.d.ts +19 -0
- package/index.cjs +1 -0
- package/index.d.ts +7 -0
- package/index.mjs +14 -0
- package/index.react-server.cjs +1 -0
- package/index.react-server.d.ts +8 -0
- package/index.react-server.mjs +37 -0
- package/lib/auth-redirect.d.ts +4 -0
- package/lib/auth.d.ts +23 -0
- package/lib/chartUtils.d.ts +63 -0
- package/lib/query-client.d.ts +2 -0
- package/lib/useOnWindowResize.d.ts +3 -0
- package/lib/utils.d.ts +11 -0
- package/next/server.cjs +1 -0
- package/next/server.d.ts +43 -0
- package/next/server.mjs +21 -0
- package/next/views.cjs +2 -0
- package/next/views.d.ts +7 -0
- package/next/views.mjs +5 -0
- package/package.json +119 -0
- package/providers/admin-provider.d.ts +13 -0
- package/providers/flyout-provider.d.ts +10 -0
- package/providers/organization-provider.d.ts +22 -0
- package/react.css +1 -0
- package/router/AdminRouter.d.ts +5 -0
- package/router/resolve.d.ts +67 -0
- package/router/routes.d.ts +25 -0
- package/storefront/components/cart/cart-items.d.ts +20 -0
- package/storefront/components/cart-summary/index.d.ts +13 -0
- package/storefront/components/cart-summary/schimmer.d.ts +3 -0
- package/storefront/components/header/index.d.ts +11 -0
- package/storefront/components/header/shimmer.d.ts +2 -0
- package/storefront/components/header/user-profile.d.ts +1 -0
- package/storefront/components/index.d.ts +1 -0
- package/storefront/components/modifiers/index.d.ts +5 -0
- package/storefront/components/modifiers/modifier-dialog-container.d.ts +21 -0
- package/storefront/components/modifiers/modifiers-group.d.ts +37 -0
- package/storefront/components/modifiers/modifiers-modal.d.ts +12 -0
- package/storefront/components/modifiers/modifiers-option.d.ts +37 -0
- package/storefront/components/modifiers/quantity-control.d.ts +29 -0
- package/storefront/components/pages/account-pages/index.d.ts +2 -0
- package/storefront/components/pages/account-pages/layouts.d.ts +10 -0
- package/storefront/components/pages/account-pages/order-details-page/index.d.ts +5 -0
- package/storefront/components/pages/account-pages/order-details-page/shimmer.d.ts +2 -0
- package/storefront/components/pages/account-pages/order-details-page/tracking-icons.d.ts +13 -0
- package/storefront/components/pages/account-pages/order-details-page/tracking-step.d.ts +10 -0
- package/storefront/components/pages/account-pages/orders-list-page/index.d.ts +2 -0
- package/storefront/components/pages/account-pages/sign-in-page/index.d.ts +1 -0
- package/storefront/components/pages/account-pages/sign-in-page/sign-in-form.d.ts +2 -0
- package/storefront/components/pages/account-pages/sign-up-page/index.d.ts +1 -0
- package/storefront/components/pages/account-pages/sign-up-page/sign-up-form.d.ts +2 -0
- package/storefront/components/pages/checkout-pages/customer-details-page/customer-details-form.d.ts +9 -0
- package/storefront/components/pages/checkout-pages/customer-details-page/index.d.ts +6 -0
- package/storefront/components/pages/checkout-pages/customer-details-page/shimmer.d.ts +2 -0
- package/storefront/components/pages/checkout-pages/index.d.ts +2 -0
- package/storefront/components/pages/checkout-pages/reservation-page/index.d.ts +2 -0
- package/storefront/components/pages/checkout-pages/reservation-page/reservation-form.d.ts +10 -0
- package/storefront/components/pages/checkout-pages/shipping-and-payment-page/index.d.ts +6 -0
- package/storefront/components/pages/checkout-pages/shipping-and-payment-page/shimmer.d.ts +2 -0
- package/storefront/components/pages/checkout-pages/shipping-and-payment-page/shipping-and-payment-form.d.ts +9 -0
- package/storefront/components/ui/badge.d.ts +31 -0
- package/storefront/components/ui/button.d.ts +35 -0
- package/storefront/components/ui/command-bar.d.ts +24 -0
- package/storefront/components/ui/command.d.ts +80 -0
- package/storefront/components/ui/datefield-rac.d.ts +12 -0
- package/storefront/components/ui/dialog.d.ts +20 -0
- package/storefront/components/ui/divider.d.ts +5 -0
- package/storefront/components/ui/index.d.ts +12 -0
- package/storefront/components/ui/input/country-input.d.ts +8 -0
- package/storefront/components/ui/input/email-input.d.ts +7 -0
- package/storefront/components/ui/input/image-upload-input.d.ts +19 -0
- package/storefront/components/ui/input/index.d.ts +22 -0
- package/storefront/components/ui/input/location-input.d.ts +9 -0
- package/storefront/components/ui/input/phone-number-input.d.ts +8 -0
- package/storefront/components/ui/input/select-input.d.ts +14 -0
- package/storefront/components/ui/input/switch.d.ts +50 -0
- package/storefront/components/ui/input/text-input.d.ts +87 -0
- package/storefront/components/ui/input/time-input.d.ts +4 -0
- package/storefront/components/ui/input/week-time-input.d.ts +8 -0
- package/storefront/components/ui/input-group.d.ts +20 -0
- package/storefront/components/ui/label.d.ts +7 -0
- package/storefront/components/ui/popover.d.ts +13 -0
- package/storefront/components/ui/radio-card.d.ts +6 -0
- package/storefront/components/ui/slideover.d.ts +8 -0
- package/storefront/components/ui/text-input.d.ts +3 -0
- package/storefront/config/countries.d.ts +8 -0
- package/storefront/constants/cart.constants.d.ts +3 -0
- package/storefront/exports.d.ts +21 -0
- package/storefront/hooks/useLocalization.d.ts +12 -0
- package/storefront/hooks/useModifierSelection.d.ts +21 -0
- package/storefront/hooks/useProductDetails.d.ts +11 -0
- package/storefront/index.d.ts +1 -0
- package/storefront/lib/better-auth.d.ts +2642 -0
- package/storefront/lib/react-query.lib.d.ts +2 -0
- package/storefront/lib/utils.d.ts +11 -0
- package/storefront/mock/products.d.ts +48 -0
- package/storefront/providers/api-provider.d.ts +11 -0
- package/storefront/providers/auth-provider.d.ts +9 -0
- package/storefront/providers/cart-provider.d.ts +39 -0
- package/storefront/providers/modifiers-provider.d.ts +27 -0
- package/storefront/providers/organization-provider.d.ts +15 -0
- package/storefront/providers/shophost-provider.d.ts +29 -0
- package/storefront/providers/translation-provider.d.ts +16 -0
- package/storefront/reducers/cart.reducer.d.ts +13 -0
- package/storefront/schemas/cart.schema.d.ts +13 -0
- package/storefront/translations/en.d.ts +150 -0
- package/storefront/translations/index.d.ts +4 -0
- package/storefront/translations/pl.d.ts +150 -0
- package/storefront/types/cart.types.d.ts +109 -0
- package/storefront/utils/cart-item.util.d.ts +3 -0
- package/storefront/utils/cart.util.d.ts +53 -0
- package/storefront.cjs +2 -0
- package/storefront.mjs +81 -0
- package/utils/object.util.d.ts +11 -0
- package/views/AdminShell.d.ts +4 -0
- package/views/DashboardView.d.ts +3 -0
- package/views/ErrorView.d.ts +3 -0
- package/views/OrdersView.d.ts +1 -0
- package/views/OrganizationsView.d.ts +1 -0
- package/views/ReservationsView.d.ts +1 -0
- package/views/auth/SignInView.d.ts +1 -0
- package/views/auth/SignUpView.d.ts +1 -0
- package/views/auth/auth-layout.d.ts +4 -0
- package/views/manufacturers/ManufacturerCreateView.d.ts +1 -0
- package/views/manufacturers/ManufacturerEditView.d.ts +1 -0
- package/views/manufacturers/ManufacturersListView.d.ts +1 -0
- package/views/product-categories/ProductCategoriesListView.d.ts +1 -0
- package/views/product-categories/ProductCategoryCreateView.d.ts +1 -0
- package/views/product-categories/ProductCategoryEditView.d.ts +1 -0
- package/views/products/ProductCreateView.d.ts +1 -0
- package/views/products/ProductEditView.d.ts +1 -0
- package/views/products/ProductsListView.d.ts +1 -0
- package/views/settings/OpeningTimesView.d.ts +1 -0
- package/views/settings/SettingsLayout.d.ts +4 -0
- package/views/settings/SettingsView.d.ts +1 -0
- package/views/settings/shipping-methods/ShippingMethodCreateView.d.ts +1 -0
- package/views/settings/shipping-methods/ShippingMethodEditView.d.ts +1 -0
- package/views/settings/shipping-methods/ShippingMethodsListView.d.ts +1 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
4
|
+
declare const switchVariants: import('tailwind-variants').TVReturnType<{
|
|
5
|
+
size: {
|
|
6
|
+
default: {
|
|
7
|
+
root: string;
|
|
8
|
+
thumb: string;
|
|
9
|
+
};
|
|
10
|
+
small: {
|
|
11
|
+
root: string;
|
|
12
|
+
thumb: string;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
}, {
|
|
16
|
+
root: (string | string[])[];
|
|
17
|
+
thumb: string[];
|
|
18
|
+
}, undefined, {
|
|
19
|
+
size: {
|
|
20
|
+
default: {
|
|
21
|
+
root: string;
|
|
22
|
+
thumb: string;
|
|
23
|
+
};
|
|
24
|
+
small: {
|
|
25
|
+
root: string;
|
|
26
|
+
thumb: string;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
}, {
|
|
30
|
+
root: (string | string[])[];
|
|
31
|
+
thumb: string[];
|
|
32
|
+
}, import('tailwind-variants').TVReturnType<{
|
|
33
|
+
size: {
|
|
34
|
+
default: {
|
|
35
|
+
root: string;
|
|
36
|
+
thumb: string;
|
|
37
|
+
};
|
|
38
|
+
small: {
|
|
39
|
+
root: string;
|
|
40
|
+
thumb: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
44
|
+
root: (string | string[])[];
|
|
45
|
+
thumb: string[];
|
|
46
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
47
|
+
interface SwitchProps extends Omit<React.ComponentPropsWithoutRef<typeof SwitchPrimitives.Root>, "asChild">, VariantProps<typeof switchVariants> {
|
|
48
|
+
}
|
|
49
|
+
declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLButtonElement>>;
|
|
50
|
+
export { Switch };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
declare const inputStyles: import('tailwind-variants').TVReturnType<{
|
|
4
|
+
hasError: {
|
|
5
|
+
true: string[];
|
|
6
|
+
};
|
|
7
|
+
enableStepper: {
|
|
8
|
+
false: string;
|
|
9
|
+
};
|
|
10
|
+
multiline: {
|
|
11
|
+
true: string;
|
|
12
|
+
false: string;
|
|
13
|
+
};
|
|
14
|
+
}, undefined, (string | string[])[], {
|
|
15
|
+
hasError: {
|
|
16
|
+
true: string[];
|
|
17
|
+
};
|
|
18
|
+
enableStepper: {
|
|
19
|
+
false: string;
|
|
20
|
+
};
|
|
21
|
+
multiline: {
|
|
22
|
+
true: string;
|
|
23
|
+
false: string;
|
|
24
|
+
};
|
|
25
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
26
|
+
hasError: {
|
|
27
|
+
true: string[];
|
|
28
|
+
};
|
|
29
|
+
enableStepper: {
|
|
30
|
+
false: string;
|
|
31
|
+
};
|
|
32
|
+
multiline: {
|
|
33
|
+
true: string;
|
|
34
|
+
false: string;
|
|
35
|
+
};
|
|
36
|
+
}, undefined, (string | string[])[], unknown, unknown, undefined>>;
|
|
37
|
+
type InputType = React.HTMLInputTypeAttribute | "textarea";
|
|
38
|
+
type InputProps = React.InputHTMLAttributes<HTMLInputElement> & React.TextareaHTMLAttributes<HTMLTextAreaElement> & VariantProps<typeof inputStyles> & {
|
|
39
|
+
inputClassName?: string;
|
|
40
|
+
type?: InputType;
|
|
41
|
+
/** Optional prefix element (e.g. a currency symbol) */
|
|
42
|
+
prefix?: React.ReactNode;
|
|
43
|
+
/** Optional suffix element (e.g. a currency code) */
|
|
44
|
+
suffix?: React.ReactNode;
|
|
45
|
+
};
|
|
46
|
+
declare const TextInput: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & React.TextareaHTMLAttributes<HTMLTextAreaElement> & VariantProps<import('tailwind-variants').TVReturnType<{
|
|
47
|
+
hasError: {
|
|
48
|
+
true: string[];
|
|
49
|
+
};
|
|
50
|
+
enableStepper: {
|
|
51
|
+
false: string;
|
|
52
|
+
};
|
|
53
|
+
multiline: {
|
|
54
|
+
true: string;
|
|
55
|
+
false: string;
|
|
56
|
+
};
|
|
57
|
+
}, undefined, (string | string[])[], {
|
|
58
|
+
hasError: {
|
|
59
|
+
true: string[];
|
|
60
|
+
};
|
|
61
|
+
enableStepper: {
|
|
62
|
+
false: string;
|
|
63
|
+
};
|
|
64
|
+
multiline: {
|
|
65
|
+
true: string;
|
|
66
|
+
false: string;
|
|
67
|
+
};
|
|
68
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
69
|
+
hasError: {
|
|
70
|
+
true: string[];
|
|
71
|
+
};
|
|
72
|
+
enableStepper: {
|
|
73
|
+
false: string;
|
|
74
|
+
};
|
|
75
|
+
multiline: {
|
|
76
|
+
true: string;
|
|
77
|
+
false: string;
|
|
78
|
+
};
|
|
79
|
+
}, undefined, (string | string[])[], unknown, unknown, undefined>>> & {
|
|
80
|
+
inputClassName?: string;
|
|
81
|
+
type?: InputType;
|
|
82
|
+
/** Optional prefix element (e.g. a currency symbol) */
|
|
83
|
+
prefix?: React.ReactNode;
|
|
84
|
+
/** Optional suffix element (e.g. a currency code) */
|
|
85
|
+
suffix?: React.ReactNode;
|
|
86
|
+
} & React.RefAttributes<HTMLInputElement | HTMLTextAreaElement>>;
|
|
87
|
+
export { TextInput, inputStyles, type InputProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Locale } from '../../../../../client/src/index.ts';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
import { InputType } from './input';
|
|
4
|
+
import { Option } from './input/select-input';
|
|
5
|
+
interface InputGroupProps {
|
|
6
|
+
name: string;
|
|
7
|
+
type?: InputType;
|
|
8
|
+
label?: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
localizable?: boolean;
|
|
12
|
+
locale?: Locale;
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
options?: Option[];
|
|
15
|
+
prefix?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export declare const getFieldError: (obj: Record<string, any> | undefined, path: string) => any;
|
|
19
|
+
declare const InputGroup: React.FC<InputGroupProps>;
|
|
20
|
+
export { InputGroup };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as LabelPrimitives from "@radix-ui/react-label";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
interface LabelProps extends React.ComponentPropsWithoutRef<typeof LabelPrimitives.Root> {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
|
|
7
|
+
export { Label };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as PopoverPrimitives from '@radix-ui/react-popover';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Popover: {
|
|
4
|
+
(props: React.ComponentPropsWithoutRef<typeof PopoverPrimitives.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
declare const PopoverTrigger: React.ForwardRefExoticComponent<Omit<PopoverPrimitives.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const PopoverAnchor: React.ForwardRefExoticComponent<Omit<PopoverPrimitives.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const PopoverClose: React.ForwardRefExoticComponent<Omit<PopoverPrimitives.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
interface ContentProps extends React.ComponentPropsWithoutRef<typeof PopoverPrimitives.Content> {
|
|
11
|
+
}
|
|
12
|
+
declare const PopoverContent: React.ForwardRefExoticComponent<ContentProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
export { Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger };
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as RadioGroupPrimitives from "@radix-ui/react-radio-group";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
declare const RadioCardGroup: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitives.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const RadioCardGroupIndicator: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitives.RadioGroupIndicatorProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
declare const RadioCardItem: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitives.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export { RadioCardGroup, RadioCardGroupIndicator, RadioCardItem };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface OrderSummarySliderOverPropType {
|
|
3
|
+
isOpen?: boolean;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const SliderOver: ({ isOpen, onClose, children, }: OrderSummarySliderOverPropType) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
export { SliderOver };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export { CartProvider, useCartContext, useCart, } from './providers/cart-provider';
|
|
2
|
+
export { useModifiers } from './providers/modifiers-provider';
|
|
3
|
+
export { CartItems } from './components/cart/cart-items';
|
|
4
|
+
export { CustomerDetailsPage } from './components/pages/checkout-pages/customer-details-page';
|
|
5
|
+
export { ShippingAndPaymentPage } from './components/pages/checkout-pages/shipping-and-payment-page';
|
|
6
|
+
export { AuthPages } from './components/pages/account-pages';
|
|
7
|
+
export { CheckoutPages } from './components/pages/checkout-pages';
|
|
8
|
+
export * from './components';
|
|
9
|
+
export { ModifierContainer, QuantityControl, ModifiersGroup, ModifiersOption, ModifiersModal, } from './components/modifiers';
|
|
10
|
+
export { useProductDetails, useMultipleProductDetails, } from './hooks/useProductDetails';
|
|
11
|
+
export { useModifierSelection } from './hooks/useModifierSelection';
|
|
12
|
+
export { useLocalization } from './hooks/useLocalization';
|
|
13
|
+
export { calculateCartTotal, formatPrice, getFormattedModifiers, findCartItem, productRequiresModifiers, } from './utils/cart.util';
|
|
14
|
+
export { mockProducts } from './mock/products';
|
|
15
|
+
export type { CartItem } from './schemas/cart.schema';
|
|
16
|
+
export * from './components/modifiers';
|
|
17
|
+
export * from './hooks/useModifierSelection';
|
|
18
|
+
export * from './hooks/useLocalization';
|
|
19
|
+
export { ShophostProvider } from './providers/shophost-provider';
|
|
20
|
+
export { APIProvider, useAPI } from './providers/api-provider';
|
|
21
|
+
export { useOrganization } from './providers/organization-provider';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare const useLocalization: (defaultLocale?: string) => {
|
|
2
|
+
locale: string;
|
|
3
|
+
setLocale: import('react').Dispatch<import('react').SetStateAction<string>>;
|
|
4
|
+
getTranslation: (translations: Array<{
|
|
5
|
+
locale: string;
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}> | undefined, field: string, fallback?: string) => string;
|
|
8
|
+
getProductName: (product: any, fallback?: string) => string;
|
|
9
|
+
getProductDescription: (product: any, fallback?: string) => string;
|
|
10
|
+
getCategoryName: (category: any, fallback?: string) => string;
|
|
11
|
+
getModifierGroupName: (modifierGroup: any, fallback?: string) => string;
|
|
12
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface ModifierSelection {
|
|
2
|
+
groupId: string;
|
|
3
|
+
modifierIds: string[];
|
|
4
|
+
}
|
|
5
|
+
export declare const useModifierSelection: (product: any) => {
|
|
6
|
+
selections: ModifierSelection[];
|
|
7
|
+
initializeSelections: () => void;
|
|
8
|
+
toggleModifier: (groupId: string, modifierId: string) => void;
|
|
9
|
+
selectModifier: (groupId: string, modifierId: string) => void;
|
|
10
|
+
isModifierSelected: (groupId: string, modifierId: string) => boolean;
|
|
11
|
+
validateSelections: () => boolean;
|
|
12
|
+
validationError: string | null;
|
|
13
|
+
getCartModifierGroups: () => {
|
|
14
|
+
id: string;
|
|
15
|
+
modifiers: {
|
|
16
|
+
id: string;
|
|
17
|
+
quantity: number;
|
|
18
|
+
}[];
|
|
19
|
+
}[];
|
|
20
|
+
};
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const useProductDetails: (productId: string, productData?: any[]) => {
|
|
2
|
+
product: any;
|
|
3
|
+
loading: boolean;
|
|
4
|
+
error: Error | null;
|
|
5
|
+
};
|
|
6
|
+
export declare const useMultipleProductDetails: (productIds: string[], productData?: any[]) => {
|
|
7
|
+
products: Record<string, any>;
|
|
8
|
+
getProduct: (id: string) => any;
|
|
9
|
+
loading: boolean;
|
|
10
|
+
error: Error | null;
|
|
11
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './exports';
|