@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,11 @@
|
|
|
1
|
+
import { FormattedCartItem } from '../../types/cart.types';
|
|
2
|
+
interface CheckoutHeaderProps {
|
|
3
|
+
summary?: {
|
|
4
|
+
items: FormattedCartItem[];
|
|
5
|
+
total: number;
|
|
6
|
+
shipping?: number;
|
|
7
|
+
subtotal: number;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
declare const Header: ({ summary }: CheckoutHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Header };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const UserProfile: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ui';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ModifierContainerProps {
|
|
3
|
+
/**
|
|
4
|
+
* Render function that receives modifiers data and dialog control props
|
|
5
|
+
*/
|
|
6
|
+
children: (props: {
|
|
7
|
+
modifierGroups: any[];
|
|
8
|
+
hasModifiers: boolean;
|
|
9
|
+
product: any;
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
productName: string;
|
|
13
|
+
quantity: number;
|
|
14
|
+
onIncrement: () => void;
|
|
15
|
+
onDecrement: () => void;
|
|
16
|
+
isDecrementDisabled: boolean;
|
|
17
|
+
onAddToCart: () => void;
|
|
18
|
+
validationError: string | null;
|
|
19
|
+
}) => React.ReactNode;
|
|
20
|
+
}
|
|
21
|
+
export declare const ModifierContainer: React.FC<ModifierContainerProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ModifiersGroupProps {
|
|
3
|
+
/**
|
|
4
|
+
* Render function for the modifier group
|
|
5
|
+
*/
|
|
6
|
+
children: (props: {
|
|
7
|
+
/**
|
|
8
|
+
* Modifier group data
|
|
9
|
+
*/
|
|
10
|
+
group: any;
|
|
11
|
+
/**
|
|
12
|
+
* Group name
|
|
13
|
+
*/
|
|
14
|
+
groupName: string;
|
|
15
|
+
/**
|
|
16
|
+
* Whether the group is required
|
|
17
|
+
*/
|
|
18
|
+
isRequired: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Selection requirements text
|
|
21
|
+
*/
|
|
22
|
+
selectionRequirements: string | null;
|
|
23
|
+
/**
|
|
24
|
+
* Render function for the modifier options
|
|
25
|
+
*/
|
|
26
|
+
renderOptions: () => React.ReactNode;
|
|
27
|
+
}) => React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Modifier group data
|
|
30
|
+
*/
|
|
31
|
+
group: any;
|
|
32
|
+
/**
|
|
33
|
+
* Modifier options to render
|
|
34
|
+
*/
|
|
35
|
+
renderOptions: () => React.ReactNode;
|
|
36
|
+
}
|
|
37
|
+
export declare const ModifiersGroup: React.FC<ModifiersGroupProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ModifiersModalProps {
|
|
3
|
+
/**
|
|
4
|
+
* Children to render inside the modal
|
|
5
|
+
*/
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/**
|
|
8
|
+
* Locale for translations
|
|
9
|
+
*/
|
|
10
|
+
locale?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const ModifiersModal: React.FC<ModifiersModalProps>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ModifiersOptionProps {
|
|
3
|
+
/**
|
|
4
|
+
* Render function for the modifier option
|
|
5
|
+
*/
|
|
6
|
+
children: (props: {
|
|
7
|
+
/**
|
|
8
|
+
* Modifier data
|
|
9
|
+
*/
|
|
10
|
+
modifier: any;
|
|
11
|
+
/**
|
|
12
|
+
* Whether the modifier is selected
|
|
13
|
+
*/
|
|
14
|
+
isSelected: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Function to toggle or select the modifier
|
|
17
|
+
*/
|
|
18
|
+
onSelect: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Whether the modifier group is multi-select
|
|
21
|
+
*/
|
|
22
|
+
isMultiSelect: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Formatted price text (e.g. "(+$1.00)")
|
|
25
|
+
*/
|
|
26
|
+
formattedPrice: string;
|
|
27
|
+
}) => React.ReactNode;
|
|
28
|
+
/**
|
|
29
|
+
* Modifier data
|
|
30
|
+
*/
|
|
31
|
+
modifier: any;
|
|
32
|
+
/**
|
|
33
|
+
* Group ID
|
|
34
|
+
*/
|
|
35
|
+
groupId: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const ModifiersOption: React.FC<ModifiersOptionProps>;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface QuantityControlProps {
|
|
3
|
+
/**
|
|
4
|
+
* Render function for the quantity control
|
|
5
|
+
*/
|
|
6
|
+
children: (props: {
|
|
7
|
+
/**
|
|
8
|
+
* Current quantity
|
|
9
|
+
*/
|
|
10
|
+
quantity: number;
|
|
11
|
+
/**
|
|
12
|
+
* Function to increment quantity
|
|
13
|
+
*/
|
|
14
|
+
onIncrement: () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Function to decrement quantity
|
|
17
|
+
*/
|
|
18
|
+
onDecrement: () => void;
|
|
19
|
+
/**
|
|
20
|
+
* Whether decrement button should be disabled
|
|
21
|
+
*/
|
|
22
|
+
isDecrementDisabled: boolean;
|
|
23
|
+
}) => React.ReactNode;
|
|
24
|
+
/**
|
|
25
|
+
* Minimum quantity (default: 1)
|
|
26
|
+
*/
|
|
27
|
+
minQuantity?: number;
|
|
28
|
+
}
|
|
29
|
+
export declare const QuantityControl: React.FC<QuantityControlProps>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface AuthLayoutProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
}
|
|
5
|
+
declare const AuthLayout: React.FC<AuthLayoutProps>;
|
|
6
|
+
interface LoggedInViewLayoutProps {
|
|
7
|
+
children: React.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const LoggedInView: React.FC<LoggedInViewLayoutProps>;
|
|
10
|
+
export { AuthLayout, LoggedInView };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const CheckIcon: React.FC<{
|
|
3
|
+
className?: string;
|
|
4
|
+
}>;
|
|
5
|
+
export declare const AlertIcon: React.FC<{
|
|
6
|
+
className?: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare const CancelIcon: React.FC<{
|
|
9
|
+
className?: string;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const LoadingSpinner: React.FC<{
|
|
12
|
+
className?: string;
|
|
13
|
+
}>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface TrackingStepProps {
|
|
3
|
+
title: string;
|
|
4
|
+
description: string;
|
|
5
|
+
active: boolean;
|
|
6
|
+
date?: Date | string | null;
|
|
7
|
+
cancelled?: boolean;
|
|
8
|
+
showConfetti?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const TrackingStep: React.FC<TrackingStepProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SignInPage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SignUpPage: () => import("react/jsx-runtime").JSX.Element;
|
package/storefront/components/pages/checkout-pages/customer-details-page/customer-details-form.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ShippingAddress } from '../../../../../../../client/src/index.ts';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface ShippingAddressFormProps {
|
|
4
|
+
initialData: ShippingAddress | null;
|
|
5
|
+
shippingAndPaymentPageUrl: string;
|
|
6
|
+
onSuccess?: (data: any) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const CustomerDetailsForm: React.FC<ShippingAddressFormProps>;
|
|
9
|
+
export { CustomerDetailsForm };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface ShippingAddressFormProps {
|
|
3
|
+
initialData: {
|
|
4
|
+
firstname: string;
|
|
5
|
+
lastname: string;
|
|
6
|
+
};
|
|
7
|
+
onSuccess?: (data: any) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const ReservationDetailsForm: React.FC<ShippingAddressFormProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ShippingMethod, PaymentMethodDetails } from '../../../../../../../client/src/index.ts';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface ShippingAndPaymentFormProps {
|
|
4
|
+
shippingMethods: ShippingMethod[];
|
|
5
|
+
paymentMethods: PaymentMethodDetails[];
|
|
6
|
+
customerDetailsPageUrl: string;
|
|
7
|
+
}
|
|
8
|
+
declare const ShippingAndPaymentForm: React.FC<ShippingAndPaymentFormProps>;
|
|
9
|
+
export { ShippingAndPaymentForm };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
declare const badgeVariants: import('tailwind-variants').TVReturnType<{
|
|
4
|
+
variant: {
|
|
5
|
+
default: string[];
|
|
6
|
+
neutral: string[];
|
|
7
|
+
success: string[];
|
|
8
|
+
error: string[];
|
|
9
|
+
warning: string[];
|
|
10
|
+
};
|
|
11
|
+
}, undefined, string, {
|
|
12
|
+
variant: {
|
|
13
|
+
default: string[];
|
|
14
|
+
neutral: string[];
|
|
15
|
+
success: string[];
|
|
16
|
+
error: string[];
|
|
17
|
+
warning: string[];
|
|
18
|
+
};
|
|
19
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
20
|
+
variant: {
|
|
21
|
+
default: string[];
|
|
22
|
+
neutral: string[];
|
|
23
|
+
success: string[];
|
|
24
|
+
error: string[];
|
|
25
|
+
warning: string[];
|
|
26
|
+
};
|
|
27
|
+
}, undefined, string, unknown, unknown, undefined>>;
|
|
28
|
+
interface BadgeProps extends React.ComponentPropsWithoutRef<'span'>, VariantProps<typeof badgeVariants> {
|
|
29
|
+
}
|
|
30
|
+
declare const Badge: React.ForwardRefExoticComponent<BadgeProps & React.RefAttributes<HTMLSpanElement>>;
|
|
31
|
+
export { Badge, badgeVariants, type BadgeProps };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
declare const buttonVariants: import('tailwind-variants').TVReturnType<{
|
|
4
|
+
variant: {
|
|
5
|
+
primary: string[];
|
|
6
|
+
secondary: string[];
|
|
7
|
+
light: string[];
|
|
8
|
+
ghost: string[];
|
|
9
|
+
destructive: string[];
|
|
10
|
+
};
|
|
11
|
+
}, undefined, (string | string[])[], {
|
|
12
|
+
variant: {
|
|
13
|
+
primary: string[];
|
|
14
|
+
secondary: string[];
|
|
15
|
+
light: string[];
|
|
16
|
+
ghost: string[];
|
|
17
|
+
destructive: string[];
|
|
18
|
+
};
|
|
19
|
+
}, undefined, import('tailwind-variants').TVReturnType<{
|
|
20
|
+
variant: {
|
|
21
|
+
primary: string[];
|
|
22
|
+
secondary: string[];
|
|
23
|
+
light: string[];
|
|
24
|
+
ghost: string[];
|
|
25
|
+
destructive: string[];
|
|
26
|
+
};
|
|
27
|
+
}, undefined, (string | string[])[], unknown, unknown, undefined>>;
|
|
28
|
+
interface ButtonProps extends React.ComponentPropsWithoutRef<"button">, VariantProps<typeof buttonVariants> {
|
|
29
|
+
asChild?: boolean;
|
|
30
|
+
isLoading?: boolean;
|
|
31
|
+
loadingText?: string;
|
|
32
|
+
disableShadows?: boolean;
|
|
33
|
+
}
|
|
34
|
+
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
35
|
+
export { Button, buttonVariants, type ButtonProps };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface CommandBarProps extends React.PropsWithChildren {
|
|
3
|
+
open?: boolean;
|
|
4
|
+
onOpenChange?: (open: boolean) => void;
|
|
5
|
+
defaultOpen?: boolean;
|
|
6
|
+
disableAutoFocus?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const CommandBar: {
|
|
9
|
+
({ open, onOpenChange, defaultOpen, disableAutoFocus, children, }: CommandBarProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const CommandBarValue: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const CommandBarBar: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
declare const CommandBarSeperator: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "children"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
interface CommandProps extends Omit<React.ComponentPropsWithoutRef<'button'>, 'children' | 'onClick'> {
|
|
16
|
+
action: () => void | Promise<void>;
|
|
17
|
+
label: string;
|
|
18
|
+
shortcut: {
|
|
19
|
+
shortcut: string;
|
|
20
|
+
label?: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
declare const CommandBarCommand: React.ForwardRefExoticComponent<CommandProps & React.RefAttributes<HTMLButtonElement>>;
|
|
24
|
+
export { CommandBar, CommandBarBar, CommandBarCommand, CommandBarSeperator, CommandBarValue, };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { DialogProps } from '@radix-ui/react-dialog';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
4
|
+
children?: React.ReactNode;
|
|
5
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
6
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
7
|
+
} & {
|
|
8
|
+
asChild?: boolean;
|
|
9
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
10
|
+
label?: string;
|
|
11
|
+
shouldFilter?: boolean;
|
|
12
|
+
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
13
|
+
defaultValue?: string;
|
|
14
|
+
value?: string;
|
|
15
|
+
onValueChange?: (value: string) => void;
|
|
16
|
+
loop?: boolean;
|
|
17
|
+
disablePointerSelection?: boolean;
|
|
18
|
+
vimBindings?: boolean;
|
|
19
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const CommandDialog: ({ children, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
22
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
23
|
+
} & {
|
|
24
|
+
asChild?: boolean;
|
|
25
|
+
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "value" | "type" | "onChange"> & {
|
|
26
|
+
value?: string;
|
|
27
|
+
onValueChange?: (search: string) => void;
|
|
28
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
32
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
33
|
+
} & {
|
|
34
|
+
asChild?: boolean;
|
|
35
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
36
|
+
label?: string;
|
|
37
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
38
|
+
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
39
|
+
children?: React.ReactNode;
|
|
40
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
41
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
42
|
+
} & {
|
|
43
|
+
asChild?: boolean;
|
|
44
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
46
|
+
children?: React.ReactNode;
|
|
47
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
48
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
49
|
+
} & {
|
|
50
|
+
asChild?: boolean;
|
|
51
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "heading"> & {
|
|
52
|
+
heading?: React.ReactNode;
|
|
53
|
+
value?: string;
|
|
54
|
+
forceMount?: boolean;
|
|
55
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
+
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
57
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
58
|
+
} & {
|
|
59
|
+
asChild?: boolean;
|
|
60
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
61
|
+
alwaysRender?: boolean;
|
|
62
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
+
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
64
|
+
children?: React.ReactNode;
|
|
65
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
66
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
67
|
+
} & {
|
|
68
|
+
asChild?: boolean;
|
|
69
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "disabled" | "onSelect"> & {
|
|
70
|
+
disabled?: boolean;
|
|
71
|
+
onSelect?: (value: string) => void;
|
|
72
|
+
value?: string;
|
|
73
|
+
keywords?: string[];
|
|
74
|
+
forceMount?: boolean;
|
|
75
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
76
|
+
declare const CommandShortcut: {
|
|
77
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
78
|
+
displayName: string;
|
|
79
|
+
};
|
|
80
|
+
export { Command, CommandDialog, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { DateFieldProps, DateInputProps as DateInputPropsRac, DateSegmentProps, DateValue as DateValueRac, TimeFieldProps, TimeValue as TimeValueRac } from 'react-aria-components';
|
|
2
|
+
declare function DateField<T extends DateValueRac>({ className, children, ...props }: DateFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function TimeField<T extends TimeValueRac>({ className, children, ...props }: TimeFieldProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function DateSegment({ className, ...props }: DateSegmentProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare const dateInputStyle = "relative inline-flex h-9 w-full items-center overflow-hidden whitespace-nowrap rounded-md border border-input bg-background px-3 py-2 text-sm shadow-2xs transition-[color,box-shadow] outline-hidden data-focus-within:border-ring data-focus-within:ring-ring/50 data-focus-within:ring-[3px] data-focus-within:has-aria-invalid:ring-destructive/20 dark:data-focus-within:has-aria-invalid:ring-destructive/40 data-focus-within:has-aria-invalid:border-destructive";
|
|
6
|
+
interface DateInputProps extends DateInputPropsRac {
|
|
7
|
+
className?: string;
|
|
8
|
+
unstyled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
declare function DateInput({ className, unstyled, ...props }: Omit<DateInputProps, "children">): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { DateField, DateInput, DateSegment, TimeField, dateInputStyle };
|
|
12
|
+
export type { DateInputProps };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import * as DialogPrimitives from "@radix-ui/react-dialog";
|
|
3
|
+
declare const Dialog: {
|
|
4
|
+
(props: React.ComponentPropsWithoutRef<typeof DialogPrimitives.Root>): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
displayName: string;
|
|
6
|
+
};
|
|
7
|
+
declare const DialogTrigger: React.ForwardRefExoticComponent<DialogPrimitives.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const DialogClose: React.ForwardRefExoticComponent<DialogPrimitives.DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
declare const DialogContent: React.ForwardRefExoticComponent<Omit<DialogPrimitives.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const DialogHeader: {
|
|
11
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
declare const DialogTitle: React.ForwardRefExoticComponent<Omit<DialogPrimitives.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
|
|
15
|
+
declare const DialogDescription: React.ForwardRefExoticComponent<Omit<DialogPrimitives.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
|
|
16
|
+
declare const DialogFooter: {
|
|
17
|
+
({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
displayName: string;
|
|
19
|
+
};
|
|
20
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './button';
|
|
2
|
+
export * from './input';
|
|
3
|
+
export * from './label';
|
|
4
|
+
export * from './input-group';
|
|
5
|
+
export * from './command';
|
|
6
|
+
export * from './dialog';
|
|
7
|
+
export * from './popover';
|
|
8
|
+
export * from './slideover';
|
|
9
|
+
export * from './command-bar';
|
|
10
|
+
export * from './radio-card';
|
|
11
|
+
export * from './badge';
|
|
12
|
+
export * from './divider';
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { UploadedFile } from '../../../../../../client/src/index.ts';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface ImageUploadBaseProps {
|
|
4
|
+
pathPrefix?: string;
|
|
5
|
+
organizationId?: string;
|
|
6
|
+
}
|
|
7
|
+
interface SingleImageUploadProps extends ImageUploadBaseProps {
|
|
8
|
+
multiple?: false;
|
|
9
|
+
onChange: (file: UploadedFile | undefined) => void;
|
|
10
|
+
value?: UploadedFile;
|
|
11
|
+
}
|
|
12
|
+
interface MultipleImageUploadProps extends ImageUploadBaseProps {
|
|
13
|
+
multiple: true;
|
|
14
|
+
onChange: (files: UploadedFile[] | undefined) => void;
|
|
15
|
+
value?: UploadedFile[];
|
|
16
|
+
}
|
|
17
|
+
type ImageUploadProps = SingleImageUploadProps | MultipleImageUploadProps;
|
|
18
|
+
declare const ImageUploadInput: React.FC<ImageUploadProps>;
|
|
19
|
+
export { ImageUploadInput };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CountryInput } from './country-input';
|
|
3
|
+
import { EmailInput } from './email-input';
|
|
4
|
+
import { ImageUploadInput } from './image-upload-input';
|
|
5
|
+
import { LocationInput } from './location-input';
|
|
6
|
+
import { PhoneNumberInput } from './phone-number-input';
|
|
7
|
+
import { Option, SelectInput } from './select-input';
|
|
8
|
+
import { Switch } from './switch';
|
|
9
|
+
import { TextInput } from './text-input';
|
|
10
|
+
import { default as TimeInput } from './time-input';
|
|
11
|
+
export type InputType = "text" | "email" | "file" | "number" | "phone-number" | "country" | "textarea" | "select" | "switch" | "array" | "object" | "location" | "time" | "week-time";
|
|
12
|
+
interface InputProps {
|
|
13
|
+
name: string;
|
|
14
|
+
type: InputType;
|
|
15
|
+
prefix?: string;
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
multiple?: boolean;
|
|
18
|
+
options?: Option[];
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
}
|
|
21
|
+
declare const Input: React.FC<InputProps>;
|
|
22
|
+
export { Input, LocationInput, PhoneNumberInput, EmailInput, CountryInput, SelectInput, Switch, TextInput, ImageUploadInput, TimeInput, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Place } from '../../../../../../client/src/index.ts';
|
|
2
|
+
import { default as React } from 'react';
|
|
3
|
+
interface AutocompleteInputProps {
|
|
4
|
+
value: string;
|
|
5
|
+
onChange: (value: Place) => void;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const LocationInput: React.FC<AutocompleteInputProps>;
|
|
9
|
+
export { LocationInput };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface Option {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string;
|
|
5
|
+
}
|
|
6
|
+
interface GenericInputProps {
|
|
7
|
+
options: Option[];
|
|
8
|
+
value: string | string[];
|
|
9
|
+
onChange: (value: string | string[]) => void;
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const SelectInput: React.FC<GenericInputProps>;
|
|
14
|
+
export { SelectInput };
|