@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.
Files changed (233) hide show
  1. package/admin-client.cjs +2 -0
  2. package/admin-client.js +21796 -0
  3. package/components/admin/forms/manufacturer-form.d.ts +7 -0
  4. package/components/admin/forms/organization-configuration-form.d.ts +10 -0
  5. package/components/admin/forms/organization-form.d.ts +8 -0
  6. package/components/admin/forms/organization-schedule-form.d.ts +10 -0
  7. package/components/admin/forms/product-category.form.d.ts +7 -0
  8. package/components/admin/forms/product-form/basic-info-section.d.ts +8 -0
  9. package/components/admin/forms/product-form/index.d.ts +7 -0
  10. package/components/admin/forms/product-form/metadata-section.d.ts +8 -0
  11. package/components/admin/forms/product-form/modifier-group-dialog.d.ts +9 -0
  12. package/components/admin/forms/product-form/modifiers-list.d.ts +7 -0
  13. package/components/admin/forms/product-form/modifiers-section.d.ts +8 -0
  14. package/components/admin/forms/product-form/price-section.d.ts +9 -0
  15. package/components/admin/forms/shipping-method-form.d.ts +7 -0
  16. package/components/admin/forms/sign-in-form.d.ts +2 -0
  17. package/components/admin/forms/sign-up-form.d.ts +2 -0
  18. package/components/admin/partials/manufacturers-list/columns.d.ts +3 -0
  19. package/components/admin/partials/manufacturers-list/index.d.ts +2 -0
  20. package/components/admin/partials/orders-list/actions-cell.d.ts +10 -0
  21. package/components/admin/partials/orders-list/columns.d.ts +3 -0
  22. package/components/admin/partials/orders-list/index.d.ts +2 -0
  23. package/components/admin/partials/orders-list/order-details-modal.d.ts +9 -0
  24. package/components/admin/partials/organization-list/index.d.ts +2 -0
  25. package/components/admin/partials/product-categories-list/columns.d.ts +14 -0
  26. package/components/admin/partials/product-categories-list/index.d.ts +2 -0
  27. package/components/admin/partials/products-list/columns.d.ts +14 -0
  28. package/components/admin/partials/products-list/index.d.ts +2 -0
  29. package/components/admin/partials/reservations-list/actions-cell.d.ts +10 -0
  30. package/components/admin/partials/reservations-list/columns.d.ts +3 -0
  31. package/components/admin/partials/reservations-list/index.d.ts +2 -0
  32. package/components/admin/partials/reservations-list/reservation-details-modal.d.ts +8 -0
  33. package/components/admin/partials/shipping-methods-list/columns.d.ts +3 -0
  34. package/components/admin/partials/shipping-methods-list/index.d.ts +2 -0
  35. package/components/ui/badge.d.ts +31 -0
  36. package/components/ui/button.d.ts +35 -0
  37. package/components/ui/calendar.d.ts +21 -0
  38. package/components/ui/card.d.ts +6 -0
  39. package/components/ui/checkbox.d.ts +4 -0
  40. package/components/ui/command-bar.d.ts +24 -0
  41. package/components/ui/command.d.ts +80 -0
  42. package/components/ui/data-table/DataTable.d.ts +13 -0
  43. package/components/ui/data-table/DataTableBulkEditor.d.ts +7 -0
  44. package/components/ui/data-table/DataTableColumnHeader.d.ts +7 -0
  45. package/components/ui/data-table/DataTableFilter.d.ts +18 -0
  46. package/components/ui/data-table/DataTablePagination.d.ts +8 -0
  47. package/components/ui/data-table/DataTableViewOptions.d.ts +6 -0
  48. package/components/ui/data-table/tanstack-table.d.ts +7 -0
  49. package/components/ui/date-picker.d.ts +72 -0
  50. package/components/ui/dialog.d.ts +20 -0
  51. package/components/ui/divider.d.ts +5 -0
  52. package/components/ui/drawer.d.ts +18 -0
  53. package/components/ui/dropdown.d.ts +30 -0
  54. package/components/ui/form-generator.d.ts +29 -0
  55. package/components/ui/header.d.ts +2 -0
  56. package/components/ui/icons/ArrowAnimated.d.ts +1 -0
  57. package/components/ui/icons/spinner-icon.d.ts +5 -0
  58. package/components/ui/input/country-input.d.ts +7 -0
  59. package/components/ui/input/email-input.d.ts +7 -0
  60. package/components/ui/input/image-upload-input.d.ts +19 -0
  61. package/components/ui/input/phone-number-input.d.ts +8 -0
  62. package/components/ui/input/select-input.d.ts +14 -0
  63. package/components/ui/input/text-input.d.ts +87 -0
  64. package/components/ui/input-array-group.d.ts +10 -0
  65. package/components/ui/input-group.d.ts +19 -0
  66. package/components/ui/input-object-group.d.ts +8 -0
  67. package/components/ui/input.d.ts +13 -0
  68. package/components/ui/label.d.ts +7 -0
  69. package/components/ui/line-chart.d.ts +35 -0
  70. package/components/ui/logo.d.ts +5 -0
  71. package/components/ui/multiple-select.d.ts +73 -0
  72. package/components/ui/navigation/DropdownUserProfile.d.ts +6 -0
  73. package/components/ui/navigation/MobileSidebar.d.ts +1 -0
  74. package/components/ui/navigation/Sidebar.d.ts +1 -0
  75. package/components/ui/navigation/SidebarWorkspacesDropdown.d.ts +2 -0
  76. package/components/ui/navigation/UserProfile.d.ts +2 -0
  77. package/components/ui/overview/DashboardCategoryBarCard.d.ts +13 -0
  78. package/components/ui/overview/DashboardChartCard.d.ts +12 -0
  79. package/components/ui/overview/DashboardFilterbar.d.ts +16 -0
  80. package/components/ui/overview/DashboardProgressBarCard.d.ts +12 -0
  81. package/components/ui/overview/dashboard-types.d.ts +12 -0
  82. package/components/ui/popover.d.ts +13 -0
  83. package/components/ui/progress-bar.d.ts +89 -0
  84. package/components/ui/progress-circle.d.ts +91 -0
  85. package/components/ui/radio-card.d.ts +6 -0
  86. package/components/ui/search-bar.d.ts +29 -0
  87. package/components/ui/select.d.ts +17 -0
  88. package/components/ui/settings/ModalAddUser.d.ts +4 -0
  89. package/components/ui/switch.d.ts +50 -0
  90. package/components/ui/tab-navigation.d.ts +7 -0
  91. package/components/ui/table.d.ts +11 -0
  92. package/components/ui/tooltip.d.ts +11 -0
  93. package/config/countries.d.ts +8 -0
  94. package/data/data.d.ts +31 -0
  95. package/data/overview-data.d.ts +2 -0
  96. package/data/schema.d.ts +19 -0
  97. package/index.cjs +1 -0
  98. package/index.d.ts +7 -0
  99. package/index.mjs +14 -0
  100. package/index.react-server.cjs +1 -0
  101. package/index.react-server.d.ts +8 -0
  102. package/index.react-server.mjs +37 -0
  103. package/lib/auth-redirect.d.ts +4 -0
  104. package/lib/auth.d.ts +23 -0
  105. package/lib/chartUtils.d.ts +63 -0
  106. package/lib/query-client.d.ts +2 -0
  107. package/lib/useOnWindowResize.d.ts +3 -0
  108. package/lib/utils.d.ts +11 -0
  109. package/next/server.cjs +1 -0
  110. package/next/server.d.ts +43 -0
  111. package/next/server.mjs +21 -0
  112. package/next/views.cjs +2 -0
  113. package/next/views.d.ts +7 -0
  114. package/next/views.mjs +5 -0
  115. package/package.json +119 -0
  116. package/providers/admin-provider.d.ts +13 -0
  117. package/providers/flyout-provider.d.ts +10 -0
  118. package/providers/organization-provider.d.ts +22 -0
  119. package/react.css +1 -0
  120. package/router/AdminRouter.d.ts +5 -0
  121. package/router/resolve.d.ts +67 -0
  122. package/router/routes.d.ts +25 -0
  123. package/storefront/components/cart/cart-items.d.ts +20 -0
  124. package/storefront/components/cart-summary/index.d.ts +13 -0
  125. package/storefront/components/cart-summary/schimmer.d.ts +3 -0
  126. package/storefront/components/header/index.d.ts +11 -0
  127. package/storefront/components/header/shimmer.d.ts +2 -0
  128. package/storefront/components/header/user-profile.d.ts +1 -0
  129. package/storefront/components/index.d.ts +1 -0
  130. package/storefront/components/modifiers/index.d.ts +5 -0
  131. package/storefront/components/modifiers/modifier-dialog-container.d.ts +21 -0
  132. package/storefront/components/modifiers/modifiers-group.d.ts +37 -0
  133. package/storefront/components/modifiers/modifiers-modal.d.ts +12 -0
  134. package/storefront/components/modifiers/modifiers-option.d.ts +37 -0
  135. package/storefront/components/modifiers/quantity-control.d.ts +29 -0
  136. package/storefront/components/pages/account-pages/index.d.ts +2 -0
  137. package/storefront/components/pages/account-pages/layouts.d.ts +10 -0
  138. package/storefront/components/pages/account-pages/order-details-page/index.d.ts +5 -0
  139. package/storefront/components/pages/account-pages/order-details-page/shimmer.d.ts +2 -0
  140. package/storefront/components/pages/account-pages/order-details-page/tracking-icons.d.ts +13 -0
  141. package/storefront/components/pages/account-pages/order-details-page/tracking-step.d.ts +10 -0
  142. package/storefront/components/pages/account-pages/orders-list-page/index.d.ts +2 -0
  143. package/storefront/components/pages/account-pages/sign-in-page/index.d.ts +1 -0
  144. package/storefront/components/pages/account-pages/sign-in-page/sign-in-form.d.ts +2 -0
  145. package/storefront/components/pages/account-pages/sign-up-page/index.d.ts +1 -0
  146. package/storefront/components/pages/account-pages/sign-up-page/sign-up-form.d.ts +2 -0
  147. package/storefront/components/pages/checkout-pages/customer-details-page/customer-details-form.d.ts +9 -0
  148. package/storefront/components/pages/checkout-pages/customer-details-page/index.d.ts +6 -0
  149. package/storefront/components/pages/checkout-pages/customer-details-page/shimmer.d.ts +2 -0
  150. package/storefront/components/pages/checkout-pages/index.d.ts +2 -0
  151. package/storefront/components/pages/checkout-pages/reservation-page/index.d.ts +2 -0
  152. package/storefront/components/pages/checkout-pages/reservation-page/reservation-form.d.ts +10 -0
  153. package/storefront/components/pages/checkout-pages/shipping-and-payment-page/index.d.ts +6 -0
  154. package/storefront/components/pages/checkout-pages/shipping-and-payment-page/shimmer.d.ts +2 -0
  155. package/storefront/components/pages/checkout-pages/shipping-and-payment-page/shipping-and-payment-form.d.ts +9 -0
  156. package/storefront/components/ui/badge.d.ts +31 -0
  157. package/storefront/components/ui/button.d.ts +35 -0
  158. package/storefront/components/ui/command-bar.d.ts +24 -0
  159. package/storefront/components/ui/command.d.ts +80 -0
  160. package/storefront/components/ui/datefield-rac.d.ts +12 -0
  161. package/storefront/components/ui/dialog.d.ts +20 -0
  162. package/storefront/components/ui/divider.d.ts +5 -0
  163. package/storefront/components/ui/index.d.ts +12 -0
  164. package/storefront/components/ui/input/country-input.d.ts +8 -0
  165. package/storefront/components/ui/input/email-input.d.ts +7 -0
  166. package/storefront/components/ui/input/image-upload-input.d.ts +19 -0
  167. package/storefront/components/ui/input/index.d.ts +22 -0
  168. package/storefront/components/ui/input/location-input.d.ts +9 -0
  169. package/storefront/components/ui/input/phone-number-input.d.ts +8 -0
  170. package/storefront/components/ui/input/select-input.d.ts +14 -0
  171. package/storefront/components/ui/input/switch.d.ts +50 -0
  172. package/storefront/components/ui/input/text-input.d.ts +87 -0
  173. package/storefront/components/ui/input/time-input.d.ts +4 -0
  174. package/storefront/components/ui/input/week-time-input.d.ts +8 -0
  175. package/storefront/components/ui/input-group.d.ts +20 -0
  176. package/storefront/components/ui/label.d.ts +7 -0
  177. package/storefront/components/ui/popover.d.ts +13 -0
  178. package/storefront/components/ui/radio-card.d.ts +6 -0
  179. package/storefront/components/ui/slideover.d.ts +8 -0
  180. package/storefront/components/ui/text-input.d.ts +3 -0
  181. package/storefront/config/countries.d.ts +8 -0
  182. package/storefront/constants/cart.constants.d.ts +3 -0
  183. package/storefront/exports.d.ts +21 -0
  184. package/storefront/hooks/useLocalization.d.ts +12 -0
  185. package/storefront/hooks/useModifierSelection.d.ts +21 -0
  186. package/storefront/hooks/useProductDetails.d.ts +11 -0
  187. package/storefront/index.d.ts +1 -0
  188. package/storefront/lib/better-auth.d.ts +2642 -0
  189. package/storefront/lib/react-query.lib.d.ts +2 -0
  190. package/storefront/lib/utils.d.ts +11 -0
  191. package/storefront/mock/products.d.ts +48 -0
  192. package/storefront/providers/api-provider.d.ts +11 -0
  193. package/storefront/providers/auth-provider.d.ts +9 -0
  194. package/storefront/providers/cart-provider.d.ts +39 -0
  195. package/storefront/providers/modifiers-provider.d.ts +27 -0
  196. package/storefront/providers/organization-provider.d.ts +15 -0
  197. package/storefront/providers/shophost-provider.d.ts +29 -0
  198. package/storefront/providers/translation-provider.d.ts +16 -0
  199. package/storefront/reducers/cart.reducer.d.ts +13 -0
  200. package/storefront/schemas/cart.schema.d.ts +13 -0
  201. package/storefront/translations/en.d.ts +150 -0
  202. package/storefront/translations/index.d.ts +4 -0
  203. package/storefront/translations/pl.d.ts +150 -0
  204. package/storefront/types/cart.types.d.ts +109 -0
  205. package/storefront/utils/cart-item.util.d.ts +3 -0
  206. package/storefront/utils/cart.util.d.ts +53 -0
  207. package/storefront.cjs +2 -0
  208. package/storefront.mjs +81 -0
  209. package/utils/object.util.d.ts +11 -0
  210. package/views/AdminShell.d.ts +4 -0
  211. package/views/DashboardView.d.ts +3 -0
  212. package/views/ErrorView.d.ts +3 -0
  213. package/views/OrdersView.d.ts +1 -0
  214. package/views/OrganizationsView.d.ts +1 -0
  215. package/views/ReservationsView.d.ts +1 -0
  216. package/views/auth/SignInView.d.ts +1 -0
  217. package/views/auth/SignUpView.d.ts +1 -0
  218. package/views/auth/auth-layout.d.ts +4 -0
  219. package/views/manufacturers/ManufacturerCreateView.d.ts +1 -0
  220. package/views/manufacturers/ManufacturerEditView.d.ts +1 -0
  221. package/views/manufacturers/ManufacturersListView.d.ts +1 -0
  222. package/views/product-categories/ProductCategoriesListView.d.ts +1 -0
  223. package/views/product-categories/ProductCategoryCreateView.d.ts +1 -0
  224. package/views/product-categories/ProductCategoryEditView.d.ts +1 -0
  225. package/views/products/ProductCreateView.d.ts +1 -0
  226. package/views/products/ProductEditView.d.ts +1 -0
  227. package/views/products/ProductsListView.d.ts +1 -0
  228. package/views/settings/OpeningTimesView.d.ts +1 -0
  229. package/views/settings/SettingsLayout.d.ts +4 -0
  230. package/views/settings/SettingsView.d.ts +1 -0
  231. package/views/settings/shipping-methods/ShippingMethodCreateView.d.ts +1 -0
  232. package/views/settings/shipping-methods/ShippingMethodEditView.d.ts +1 -0
  233. package/views/settings/shipping-methods/ShippingMethodsListView.d.ts +1 -0
@@ -0,0 +1,89 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ declare const progressBarVariants: import('tailwind-variants').TVReturnType<{
4
+ variant: {
5
+ default: {
6
+ background: string;
7
+ bar: string;
8
+ };
9
+ neutral: {
10
+ background: string;
11
+ bar: string;
12
+ };
13
+ warning: {
14
+ background: string;
15
+ bar: string;
16
+ };
17
+ error: {
18
+ background: string;
19
+ bar: string;
20
+ };
21
+ success: {
22
+ background: string;
23
+ bar: string;
24
+ };
25
+ };
26
+ }, {
27
+ background: string;
28
+ bar: string;
29
+ }, undefined, {
30
+ variant: {
31
+ default: {
32
+ background: string;
33
+ bar: string;
34
+ };
35
+ neutral: {
36
+ background: string;
37
+ bar: string;
38
+ };
39
+ warning: {
40
+ background: string;
41
+ bar: string;
42
+ };
43
+ error: {
44
+ background: string;
45
+ bar: string;
46
+ };
47
+ success: {
48
+ background: string;
49
+ bar: string;
50
+ };
51
+ };
52
+ }, {
53
+ background: string;
54
+ bar: string;
55
+ }, import('tailwind-variants').TVReturnType<{
56
+ variant: {
57
+ default: {
58
+ background: string;
59
+ bar: string;
60
+ };
61
+ neutral: {
62
+ background: string;
63
+ bar: string;
64
+ };
65
+ warning: {
66
+ background: string;
67
+ bar: string;
68
+ };
69
+ error: {
70
+ background: string;
71
+ bar: string;
72
+ };
73
+ success: {
74
+ background: string;
75
+ bar: string;
76
+ };
77
+ };
78
+ }, {
79
+ background: string;
80
+ bar: string;
81
+ }, undefined, unknown, unknown, undefined>>;
82
+ interface ProgressBarProps extends React.HTMLProps<HTMLDivElement>, VariantProps<typeof progressBarVariants> {
83
+ value?: number;
84
+ max?: number;
85
+ showAnimation?: boolean;
86
+ label?: string;
87
+ }
88
+ declare const ProgressBar: React.ForwardRefExoticComponent<Omit<ProgressBarProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
89
+ export { ProgressBar, progressBarVariants, type ProgressBarProps };
@@ -0,0 +1,91 @@
1
+ import { default as React } from 'react';
2
+ import { VariantProps } from 'tailwind-variants';
3
+ declare const progressCircleVariants: import('tailwind-variants').TVReturnType<{
4
+ variant: {
5
+ default: {
6
+ background: string;
7
+ circle: string;
8
+ };
9
+ neutral: {
10
+ background: string;
11
+ circle: string;
12
+ };
13
+ warning: {
14
+ background: string;
15
+ circle: string;
16
+ };
17
+ error: {
18
+ background: string;
19
+ circle: string;
20
+ };
21
+ success: {
22
+ background: string;
23
+ circle: string;
24
+ };
25
+ };
26
+ }, {
27
+ background: string;
28
+ circle: string;
29
+ }, undefined, {
30
+ variant: {
31
+ default: {
32
+ background: string;
33
+ circle: string;
34
+ };
35
+ neutral: {
36
+ background: string;
37
+ circle: string;
38
+ };
39
+ warning: {
40
+ background: string;
41
+ circle: string;
42
+ };
43
+ error: {
44
+ background: string;
45
+ circle: string;
46
+ };
47
+ success: {
48
+ background: string;
49
+ circle: string;
50
+ };
51
+ };
52
+ }, {
53
+ background: string;
54
+ circle: string;
55
+ }, import('tailwind-variants').TVReturnType<{
56
+ variant: {
57
+ default: {
58
+ background: string;
59
+ circle: string;
60
+ };
61
+ neutral: {
62
+ background: string;
63
+ circle: string;
64
+ };
65
+ warning: {
66
+ background: string;
67
+ circle: string;
68
+ };
69
+ error: {
70
+ background: string;
71
+ circle: string;
72
+ };
73
+ success: {
74
+ background: string;
75
+ circle: string;
76
+ };
77
+ };
78
+ }, {
79
+ background: string;
80
+ circle: string;
81
+ }, undefined, unknown, unknown, undefined>>;
82
+ interface ProgressCircleProps extends Omit<React.SVGProps<SVGSVGElement>, 'value'>, VariantProps<typeof progressCircleVariants> {
83
+ value?: number;
84
+ max?: number;
85
+ showAnimation?: boolean;
86
+ radius?: number;
87
+ strokeWidth?: number;
88
+ children?: React.ReactNode;
89
+ }
90
+ declare const ProgressCircle: React.ForwardRefExoticComponent<Omit<ProgressCircleProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
91
+ export { ProgressCircle, type ProgressCircleProps };
@@ -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,29 @@
1
+ import { VariantProps } from 'tailwind-variants';
2
+ import * as React from 'react';
3
+ declare const inputStyles: import('tailwind-variants').TVReturnType<{
4
+ hasError: {
5
+ true: string[];
6
+ };
7
+ enableStepper: {
8
+ true: string;
9
+ };
10
+ }, undefined, (string | string[])[], {
11
+ hasError: {
12
+ true: string[];
13
+ };
14
+ enableStepper: {
15
+ true: string;
16
+ };
17
+ }, undefined, import('tailwind-variants').TVReturnType<{
18
+ hasError: {
19
+ true: string[];
20
+ };
21
+ enableStepper: {
22
+ true: string;
23
+ };
24
+ }, undefined, (string | string[])[], unknown, unknown, undefined>>;
25
+ interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, VariantProps<typeof inputStyles> {
26
+ inputClassName?: string;
27
+ }
28
+ declare const Searchbar: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
29
+ export { Searchbar };
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ import { DateRange } from 'react-day-picker';
3
+ import * as SelectPrimitives from '@radix-ui/react-select';
4
+ declare const Select: React.FC<SelectPrimitives.SelectProps>;
5
+ declare const SelectGroup: React.ForwardRefExoticComponent<SelectPrimitives.SelectGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const SelectValue: React.ForwardRefExoticComponent<SelectPrimitives.SelectValueProps & React.RefAttributes<HTMLSpanElement>>;
7
+ declare const SelectTrigger: React.ForwardRefExoticComponent<Omit<SelectPrimitives.SelectTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & {
8
+ hasError?: boolean;
9
+ } & React.RefAttributes<HTMLButtonElement>>;
10
+ declare const SelectContent: React.ForwardRefExoticComponent<Omit<SelectPrimitives.SelectContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const SelectGroupLabel: React.ForwardRefExoticComponent<Omit<SelectPrimitives.SelectLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
12
+ declare const SelectItem: React.ForwardRefExoticComponent<Omit<SelectPrimitives.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const SelectItemPeriod: React.ForwardRefExoticComponent<Omit<SelectPrimitives.SelectItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
14
+ period?: DateRange | undefined;
15
+ } & React.RefAttributes<HTMLDivElement>>;
16
+ declare const SelectSeparator: React.ForwardRefExoticComponent<Omit<SelectPrimitives.SelectSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
17
+ export { Select, SelectContent, SelectGroup, SelectGroupLabel, SelectItem, SelectItemPeriod, SelectSeparator, SelectTrigger, SelectValue, };
@@ -0,0 +1,4 @@
1
+ export type ModalAddUserProps = {
2
+ children: React.ReactNode;
3
+ };
4
+ export declare function ModalAddUser({ children }: ModalAddUserProps): import("react/jsx-runtime").JSX.Element;
@@ -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,7 @@
1
+ import { default as React } from 'react';
2
+ import * as NavigationMenuPrimitives from '@radix-ui/react-navigation-menu';
3
+ declare const TabNavigation: React.ForwardRefExoticComponent<Omit<Omit<NavigationMenuPrimitives.NavigationMenuProps & React.RefAttributes<HTMLElement>, "ref">, "defaultValue" | "dir" | "orientation"> & React.RefAttributes<HTMLElement>>;
4
+ declare const TabNavigationLink: React.ForwardRefExoticComponent<Omit<Omit<NavigationMenuPrimitives.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>, "ref">, "onSelect"> & {
5
+ disabled?: boolean;
6
+ } & React.RefAttributes<HTMLAnchorElement>>;
7
+ export { TabNavigation, TabNavigationLink };
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ declare const TableRoot: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
3
+ declare const Table: React.ForwardRefExoticComponent<React.TableHTMLAttributes<HTMLTableElement> & React.RefAttributes<HTMLTableElement>>;
4
+ declare const TableHead: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
5
+ declare const TableHeaderCell: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
6
+ declare const TableBody: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
7
+ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableRowElement> & React.RefAttributes<HTMLTableRowElement>>;
8
+ declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
9
+ declare const TableFoot: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableSectionElement> & React.RefAttributes<HTMLTableSectionElement>>;
10
+ declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
11
+ export { Table, TableBody, TableCaption, TableCell, TableFoot, TableHead, TableHeaderCell, TableRoot, TableRow, };
@@ -0,0 +1,11 @@
1
+ import { default as React } from 'react';
2
+ import * as TooltipPrimitives from '@radix-ui/react-tooltip';
3
+ interface TooltipProps extends Omit<TooltipPrimitives.TooltipContentProps, 'content' | 'onClick'>, Pick<TooltipPrimitives.TooltipProps, 'open' | 'defaultOpen' | 'onOpenChange' | 'delayDuration'> {
4
+ content: React.ReactNode;
5
+ onClick?: React.MouseEventHandler<HTMLButtonElement>;
6
+ side?: 'bottom' | 'left' | 'top' | 'right';
7
+ showArrow?: boolean;
8
+ triggerAsChild?: boolean;
9
+ }
10
+ declare const Tooltip: React.ForwardRefExoticComponent<TooltipProps & React.RefAttributes<HTMLDivElement>>;
11
+ export { Tooltip, type TooltipProps };
@@ -0,0 +1,8 @@
1
+ export declare const countries: {
2
+ continent: string;
3
+ items: {
4
+ value: string;
5
+ label: string;
6
+ flag: string;
7
+ }[];
8
+ }[];
package/data/data.d.ts ADDED
@@ -0,0 +1,31 @@
1
+ import { Usage } from './schema';
2
+ export declare const roles: {
3
+ value: string;
4
+ label: string;
5
+ }[];
6
+ export declare const statuses: {
7
+ value: string;
8
+ label: string;
9
+ variant: string;
10
+ }[];
11
+ export declare const regions: {
12
+ value: string;
13
+ label: string;
14
+ }[];
15
+ export declare const conditions: {
16
+ value: string;
17
+ label: string;
18
+ }[];
19
+ export declare const users: {
20
+ name: string;
21
+ initials: string;
22
+ email: string;
23
+ role: string;
24
+ }[];
25
+ export declare const invitedUsers: {
26
+ initials: string;
27
+ email: string;
28
+ role: string;
29
+ expires: number;
30
+ }[];
31
+ export declare const usage: Usage[];
@@ -0,0 +1,2 @@
1
+ import { OverviewData } from './schema';
2
+ export declare const overviews: OverviewData[];
@@ -0,0 +1,19 @@
1
+ export type Usage = {
2
+ owner: string;
3
+ status: string;
4
+ costs: number;
5
+ region: string;
6
+ stability: number;
7
+ lastEdited: string;
8
+ };
9
+ export type OverviewData = {
10
+ date: string;
11
+ 'Rows written': number;
12
+ 'Rows read': number;
13
+ Queries: number;
14
+ 'Payments completed': number;
15
+ 'Sign ups': number;
16
+ Logins: number;
17
+ 'Sign outs': number;
18
+ 'Support calls': number;
19
+ };
package/index.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./admin-client.cjs");function i(t){return{basePath:"/admin",...t}}exports.AdminProvider=e.AdminProvider;exports.createAdminAuthClient=e.createAdminAuthClient;exports.createRoutes=e.createRoutes;exports.getAdminAuthClient=e.getAdminAuthClient;exports.defineConfig=i;
package/index.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export { defineConfig } from './config';
2
+ export type { AdminConfig, ResolvedAdminConfig } from './types';
3
+ export { AdminProvider } from './providers/admin-provider';
4
+ export { createAdminAuthClient, getAdminAuthClient } from './lib/auth';
5
+ export type { AdminAuthClient } from './lib/auth';
6
+ export { createRoutes } from './router/routes';
7
+ export type { AdminRoutes } from './router/routes';
package/index.mjs ADDED
@@ -0,0 +1,14 @@
1
+ import { A as a, c as r, b as o, g as d } from "./admin-client.js";
2
+ function t(e) {
3
+ return {
4
+ basePath: "/admin",
5
+ ...e
6
+ };
7
+ }
8
+ export {
9
+ a as AdminProvider,
10
+ r as createAdminAuthClient,
11
+ o as createRoutes,
12
+ t as defineConfig,
13
+ d as getAdminAuthClient
14
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function i(s){return{basePath:"/admin",...s}}function n(s){const t=s.replace(/\/$/,"");return{home:t,signIn:`${t}/auth/sign-in`,signUp:`${t}/auth/sign-up`,organizations:`${t}/organizations`,dashboard:e=>`${t}/${e}/dashboard`,liveOrders:e=>`${t}/${e}/live-orders`,orders:e=>`${t}/${e}/orders`,reservations:e=>`${t}/${e}/reservations`,products:e=>`${t}/${e}/products`,productCreate:e=>`${t}/${e}/products/create`,productEdit:(e,r)=>`${t}/${e}/products/${r}`,productCategories:e=>`${t}/${e}/product-categories`,productCategoryCreate:e=>`${t}/${e}/product-categories/create`,productCategoryEdit:(e,r)=>`${t}/${e}/product-categories/${r}`,manufacturers:e=>`${t}/${e}/manufacturers`,manufacturerCreate:e=>`${t}/${e}/manufacturers/create`,manufacturerEdit:(e,r)=>`${t}/${e}/manufacturers/${r}`,settings:e=>`${t}/${e}/settings`,settingsOpeningTimes:e=>`${t}/${e}/settings/opening-times`,settingsShippingMethods:e=>`${t}/${e}/settings/shipping-methods`,settingsShippingMethodCreate:e=>`${t}/${e}/settings/shipping-methods/create`,settingsShippingMethodEdit:(e,r)=>`${t}/${e}/settings/shipping-methods/${r}`}}exports.createRoutes=n;exports.defineConfig=i;
@@ -0,0 +1,8 @@
1
+ export type { AdminConfig, ResolvedAdminConfig } from './types';
2
+ export type { AdminRoutes } from './router/routes';
3
+ /**
4
+ * Define and validate an AdminConfig object. Applies default basePath of "/admin".
5
+ * Use this in your host app's config file.
6
+ */
7
+ export declare function defineConfig(config: import('./types').AdminConfig): import('./types').ResolvedAdminConfig;
8
+ export declare function createRoutes(basePath: string): import('./router/routes').AdminRoutes;
@@ -0,0 +1,37 @@
1
+ function i(s) {
2
+ return {
3
+ basePath: "/admin",
4
+ ...s
5
+ };
6
+ }
7
+ function n(s) {
8
+ const e = s.replace(/\/$/, "");
9
+ return {
10
+ home: e,
11
+ signIn: `${e}/auth/sign-in`,
12
+ signUp: `${e}/auth/sign-up`,
13
+ organizations: `${e}/organizations`,
14
+ dashboard: (t) => `${e}/${t}/dashboard`,
15
+ liveOrders: (t) => `${e}/${t}/live-orders`,
16
+ orders: (t) => `${e}/${t}/orders`,
17
+ reservations: (t) => `${e}/${t}/reservations`,
18
+ products: (t) => `${e}/${t}/products`,
19
+ productCreate: (t) => `${e}/${t}/products/create`,
20
+ productEdit: (t, r) => `${e}/${t}/products/${r}`,
21
+ productCategories: (t) => `${e}/${t}/product-categories`,
22
+ productCategoryCreate: (t) => `${e}/${t}/product-categories/create`,
23
+ productCategoryEdit: (t, r) => `${e}/${t}/product-categories/${r}`,
24
+ manufacturers: (t) => `${e}/${t}/manufacturers`,
25
+ manufacturerCreate: (t) => `${e}/${t}/manufacturers/create`,
26
+ manufacturerEdit: (t, r) => `${e}/${t}/manufacturers/${r}`,
27
+ settings: (t) => `${e}/${t}/settings`,
28
+ settingsOpeningTimes: (t) => `${e}/${t}/settings/opening-times`,
29
+ settingsShippingMethods: (t) => `${e}/${t}/settings/shipping-methods`,
30
+ settingsShippingMethodCreate: (t) => `${e}/${t}/settings/shipping-methods/create`,
31
+ settingsShippingMethodEdit: (t, r) => `${e}/${t}/settings/shipping-methods/${r}`
32
+ };
33
+ }
34
+ export {
35
+ n as createRoutes,
36
+ i as defineConfig
37
+ };
@@ -0,0 +1,4 @@
1
+ import { AdminRoutes } from '../router/routes';
2
+ export declare function resolveAdminRedirectPath(requestedRedirectPath: string | null | undefined, routes: Pick<AdminRoutes, "home" | "signIn" | "signUp">): string;
3
+ export declare function buildAdminAuthHref(authPath: string, redirectPath: string): string;
4
+ export declare function buildAdminCallbackUrl(origin: string, redirectPath: string | null | undefined, routes: Pick<AdminRoutes, "home" | "signIn" | "signUp">): string;
package/lib/auth.d.ts ADDED
@@ -0,0 +1,23 @@
1
+ export interface AdminAuthClient {
2
+ signIn: {
3
+ email: (data: any) => Promise<any>;
4
+ social: (data: any) => Promise<any>;
5
+ };
6
+ signUp: {
7
+ email: (data: any) => Promise<any>;
8
+ };
9
+ signOut: (data?: any) => Promise<any>;
10
+ useSession: () => {
11
+ data?: {
12
+ user?: {
13
+ email?: string;
14
+ firstname?: string;
15
+ lastname?: string;
16
+ name?: string;
17
+ } | null;
18
+ } | null;
19
+ isPending: boolean;
20
+ };
21
+ }
22
+ export declare function createAdminAuthClient(baseUrl: string): AdminAuthClient;
23
+ export declare function getAdminAuthClient(baseUrl: string): AdminAuthClient;
@@ -0,0 +1,63 @@
1
+ export type ColorUtility = 'bg' | 'stroke' | 'fill' | 'text';
2
+ export declare const chartColors: {
3
+ readonly blue: {
4
+ readonly bg: "bg-blue-500";
5
+ readonly stroke: "stroke-blue-500";
6
+ readonly fill: "fill-blue-500";
7
+ readonly text: "text-blue-500";
8
+ };
9
+ readonly emerald: {
10
+ readonly bg: "bg-emerald-500";
11
+ readonly stroke: "stroke-emerald-500";
12
+ readonly fill: "fill-emerald-500";
13
+ readonly text: "text-emerald-500";
14
+ };
15
+ readonly violet: {
16
+ readonly bg: "bg-violet-500";
17
+ readonly stroke: "stroke-violet-500";
18
+ readonly fill: "fill-violet-500";
19
+ readonly text: "text-violet-500";
20
+ };
21
+ readonly amber: {
22
+ readonly bg: "bg-amber-500";
23
+ readonly stroke: "stroke-amber-500";
24
+ readonly fill: "fill-amber-500";
25
+ readonly text: "text-amber-500";
26
+ };
27
+ readonly gray: {
28
+ readonly bg: "bg-gray-500";
29
+ readonly stroke: "stroke-gray-500";
30
+ readonly fill: "fill-gray-500";
31
+ readonly text: "text-gray-500";
32
+ };
33
+ readonly cyan: {
34
+ readonly bg: "bg-cyan-500";
35
+ readonly stroke: "stroke-cyan-500";
36
+ readonly fill: "fill-cyan-500";
37
+ readonly text: "text-cyan-500";
38
+ };
39
+ readonly pink: {
40
+ readonly bg: "bg-pink-500";
41
+ readonly stroke: "stroke-pink-500";
42
+ readonly fill: "fill-pink-500";
43
+ readonly text: "text-pink-500";
44
+ };
45
+ readonly lime: {
46
+ readonly bg: "bg-lime-500";
47
+ readonly stroke: "stroke-lime-500";
48
+ readonly fill: "fill-lime-500";
49
+ readonly text: "text-lime-500";
50
+ };
51
+ readonly fuchsia: {
52
+ readonly bg: "bg-fuchsia-500";
53
+ readonly stroke: "stroke-fuchsia-500";
54
+ readonly fill: "fill-fuchsia-500";
55
+ readonly text: "text-fuchsia-500";
56
+ };
57
+ };
58
+ export type AvailableChartColorsKeys = keyof typeof chartColors;
59
+ export declare const AvailableChartColors: AvailableChartColorsKeys[];
60
+ export declare const constructCategoryColors: (categories: string[], colors: AvailableChartColorsKeys[]) => Map<string, AvailableChartColorsKeys>;
61
+ export declare const getColorClassName: (color: AvailableChartColorsKeys, type: ColorUtility) => string;
62
+ export declare const getYAxisDomain: (autoMinValue: boolean, minValue: number | undefined, maxValue: number | undefined) => (string | number)[];
63
+ export declare function hasOnlyOneValueForKey(array: any[], keyToCheck: string): boolean;
@@ -0,0 +1,2 @@
1
+ import { QueryClient } from '@tanstack/react-query';
2
+ export declare const queryClient: QueryClient;
@@ -0,0 +1,3 @@
1
+ export declare const useOnWindowResize: (handler: {
2
+ (): void;
3
+ }) => void;
package/lib/utils.d.ts ADDED
@@ -0,0 +1,11 @@
1
+ import { ClassValue } from 'clsx';
2
+ export declare function cx(...args: ClassValue[]): string;
3
+ export declare const focusInput: string[];
4
+ export declare const focusRing: string[];
5
+ export declare const hasErrorInput: string[];
6
+ export declare const usNumberformatter: (number: number, decimals?: number) => string;
7
+ export declare const percentageFormatter: (number: number, decimals?: number) => string;
8
+ export declare const millionFormatter: (number: number, decimals?: number) => string;
9
+ export declare const formatters: {
10
+ [key: string]: any;
11
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),a=require("../admin-client.cjs");async function o({config:e,params:t}){const{segments:n=[]}=await t;return i.jsx(a.AdminProvider,{config:e,children:i.jsx(a.AdminRouter,{segments:n})})}function d(e,t){var r;return{title:(r=e.branding)!=null&&r.name?`${e.branding.name} Admin`:"Admin",robots:{index:!1,follow:!1},...e.metadata,...t}}exports.NotFoundPage=a.ErrorView;exports.RootPage=o;exports.generatePageMetadata=d;
@@ -0,0 +1,43 @@
1
+ import { Metadata } from 'next';
2
+ import { ResolvedAdminConfig } from '../types';
3
+ interface RootPageProps {
4
+ config: ResolvedAdminConfig;
5
+ params: Promise<{
6
+ segments?: string[];
7
+ }>;
8
+ }
9
+ /**
10
+ * Drop-in Next.js page component for catch-all admin routes.
11
+ *
12
+ * Usage in host app (app/<basePath>/[[...segments]]/page.tsx):
13
+ *
14
+ * import { RootPage } from "@shophost/react/next/server";
15
+ * import { adminConfig } from "../config";
16
+ * export { generatePageMetadata as generateMetadata } from "@shophost/react/next/server";
17
+ * export default function Page(props) { return <RootPage {...props} config={adminConfig} />; }
18
+ */
19
+ export declare function RootPage({ config, params }: RootPageProps): Promise<import("react/jsx-runtime").JSX.Element>;
20
+ /**
21
+ * Drop-in Next.js not-found component.
22
+ *
23
+ * Usage in host app (app/<basePath>/not-found.tsx):
24
+ *
25
+ * import { NotFoundPage } from "@shophost/react/next/server";
26
+ * export default NotFoundPage;
27
+ */
28
+ export { ErrorView as NotFoundPage } from '../views/ErrorView';
29
+ /**
30
+ * Generate page metadata from AdminConfig.
31
+ *
32
+ * Usage in host app (app/<basePath>/[[...segments]]/page.tsx):
33
+ *
34
+ * export { generatePageMetadata as generateMetadata } from "@shophost/react/next/server";
35
+ *
36
+ * Or with customization:
37
+ *
38
+ * import { generatePageMetadata } from "@shophost/react/next/server";
39
+ * export function generateMetadata() {
40
+ * return generatePageMetadata(adminConfig, { title: "Custom" });
41
+ * }
42
+ */
43
+ export declare function generatePageMetadata(config: ResolvedAdminConfig, overrides?: Partial<Metadata>): Metadata;
@@ -0,0 +1,21 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { A as r, a as i } from "../admin-client.js";
3
+ import { E as g } from "../admin-client.js";
4
+ async function s({ config: e, params: t }) {
5
+ const { segments: a = [] } = await t;
6
+ return /* @__PURE__ */ o(r, { config: e, children: /* @__PURE__ */ o(i, { segments: a }) });
7
+ }
8
+ function l(e, t) {
9
+ var n;
10
+ return {
11
+ title: (n = e.branding) != null && n.name ? `${e.branding.name} Admin` : "Admin",
12
+ robots: { index: !1, follow: !1 },
13
+ ...e.metadata,
14
+ ...t
15
+ };
16
+ }
17
+ export {
18
+ g as NotFoundPage,
19
+ s as RootPage,
20
+ l as generatePageMetadata
21
+ };