@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,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,5 @@
1
+ import { default as React } from 'react';
2
+ interface DividerProps extends React.ComponentPropsWithoutRef<'div'> {
3
+ }
4
+ declare const Divider: React.ForwardRefExoticComponent<DividerProps & React.RefAttributes<HTMLDivElement>>;
5
+ export { Divider };
@@ -0,0 +1,18 @@
1
+ import * as DrawerPrimitives from '@radix-ui/react-dialog';
2
+ import * as React from 'react';
3
+ declare const Drawer: {
4
+ (props: React.ComponentPropsWithoutRef<typeof DrawerPrimitives.Root>): import("react/jsx-runtime").JSX.Element;
5
+ displayName: string;
6
+ };
7
+ declare const DrawerTrigger: React.ForwardRefExoticComponent<Omit<DrawerPrimitives.DialogTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
8
+ declare const DrawerClose: React.ForwardRefExoticComponent<Omit<DrawerPrimitives.DialogCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
9
+ declare const DrawerContent: React.ForwardRefExoticComponent<Omit<DrawerPrimitives.DialogContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const DrawerHeader: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const DrawerTitle: React.ForwardRefExoticComponent<Omit<DrawerPrimitives.DialogTitleProps & React.RefAttributes<HTMLHeadingElement>, "ref"> & React.RefAttributes<HTMLHeadingElement>>;
12
+ declare const DrawerBody: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DrawerDescription: React.ForwardRefExoticComponent<Omit<DrawerPrimitives.DialogDescriptionProps & React.RefAttributes<HTMLParagraphElement>, "ref"> & React.RefAttributes<HTMLParagraphElement>>;
14
+ declare const DrawerFooter: {
15
+ ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react/jsx-runtime").JSX.Element;
16
+ displayName: string;
17
+ };
18
+ export { Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, };
@@ -0,0 +1,30 @@
1
+ import * as DropdownMenuPrimitives from '@radix-ui/react-dropdown-menu';
2
+ import * as React from 'react';
3
+ declare const DropdownMenu: React.FC<DropdownMenuPrimitives.DropdownMenuProps>;
4
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<DropdownMenuPrimitives.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>>;
5
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitives.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>>;
6
+ declare const DropdownMenuSubMenu: React.FC<DropdownMenuPrimitives.DropdownMenuSubProps>;
7
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<DropdownMenuPrimitives.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DropdownMenuSubMenuTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitives.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuSubMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitives.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
10
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitives.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
11
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitives.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
12
+ shortcut?: string;
13
+ hint?: string;
14
+ } & React.RefAttributes<HTMLDivElement>>;
15
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitives.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
16
+ shortcut?: string;
17
+ hint?: string;
18
+ } & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitives.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
20
+ shortcut?: string;
21
+ hint?: string;
22
+ iconType?: "check" | "radio";
23
+ } & React.RefAttributes<HTMLDivElement>>;
24
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitives.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
25
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitives.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
26
+ declare const DropdownMenuIconWrapper: {
27
+ ({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
28
+ displayName: string;
29
+ };
30
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuIconWrapper, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuSubMenu, DropdownMenuSubMenuContent, DropdownMenuSubMenuTrigger, DropdownMenuTrigger, };
@@ -0,0 +1,29 @@
1
+ import { FC } from 'react';
2
+ import { UseFormReturn } from 'react-hook-form';
3
+ import { InputType } from './input';
4
+ import { Option } from './input/select-input';
5
+ export interface FieldConfig {
6
+ name: string;
7
+ label?: string;
8
+ description?: string;
9
+ type: InputType;
10
+ placeholder?: string;
11
+ localizable?: boolean;
12
+ colspan?: 1 | 2 | 3 | 4;
13
+ multiple?: boolean;
14
+ prefix?: string;
15
+ options?: Option[];
16
+ fields?: Omit<FieldConfig, "fields">[];
17
+ }
18
+ export interface FormGeneratorProps {
19
+ form: UseFormReturn<any>;
20
+ config: FieldConfig[];
21
+ columns?: 1 | 2 | 3 | 4;
22
+ onCancel?: () => void;
23
+ cancelText?: string;
24
+ okText?: string;
25
+ loading?: boolean;
26
+ onSubmit?: (formData: any) => void;
27
+ }
28
+ declare const FormGenerator: FC<FormGeneratorProps>;
29
+ export { FormGenerator };
@@ -0,0 +1,2 @@
1
+ declare const Header: () => import("react/jsx-runtime").JSX.Element;
2
+ export { Header };
@@ -0,0 +1 @@
1
+ export declare function ArrowAnimated({ className, ...props }: React.HTMLAttributes<SVGElement>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ interface SpinnerIconProps extends React.SVGProps<SVGSVGElement> {
3
+ }
4
+ declare const SpinnerIcon: React.FC<SpinnerIconProps>;
5
+ export { SpinnerIcon };
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ interface CountryInputProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ }
6
+ declare const CountryInput: React.FC<CountryInputProps>;
7
+ export { CountryInput };
@@ -0,0 +1,7 @@
1
+ import { default as React } from 'react';
2
+ import { InputProps } from './text-input';
3
+ interface EmailInputProps extends Omit<InputProps, 'type'> {
4
+ id?: string;
5
+ }
6
+ declare const EmailInput: React.FC<EmailInputProps>;
7
+ export { EmailInput };
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { UploadedFile } from '../../../../../client/src/index.ts';
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,8 @@
1
+ import { default as React } from 'react';
2
+ interface PhoneNumberInputProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ onBlur?: () => void;
6
+ }
7
+ declare const PhoneNumberInput: React.FC<PhoneNumberInputProps>;
8
+ export { PhoneNumberInput };
@@ -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 };
@@ -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,10 @@
1
+ import { default as React } from 'react';
2
+ import { UseFormReturn } from 'react-hook-form';
3
+ import { FieldConfig } from './form-generator';
4
+ interface InputGroupProps {
5
+ form: UseFormReturn<any>;
6
+ columns?: 1 | 2 | 3 | 4;
7
+ config: FieldConfig;
8
+ }
9
+ declare const InputArrayGroup: React.FC<InputGroupProps>;
10
+ export { InputArrayGroup };
@@ -0,0 +1,19 @@
1
+ import { default as React } from 'react';
2
+ import { Locale } from '../../../../client/src/index.ts';
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
+ }
17
+ export declare const getFieldError: (obj: Record<string, any> | undefined, path: string) => any;
18
+ declare const InputGroup: React.FC<InputGroupProps>;
19
+ export { InputGroup };
@@ -0,0 +1,8 @@
1
+ import { default as React } from 'react';
2
+ import { FieldConfig } from './form-generator';
3
+ interface InputGroupProps {
4
+ columns?: 1 | 2 | 3 | 4;
5
+ config: FieldConfig;
6
+ }
7
+ declare const InputNestedGroup: React.FC<InputGroupProps>;
8
+ export { InputNestedGroup };
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ import { Option } from './input/select-input';
3
+ export type InputType = "text" | "email" | "file" | "number" | "phone-number" | "country" | "textarea" | "select" | "switch" | "array" | "object" | "time";
4
+ interface InputProps {
5
+ name: string;
6
+ type: InputType;
7
+ prefix?: string;
8
+ placeholder?: string;
9
+ multiple?: boolean;
10
+ options?: Option[];
11
+ }
12
+ declare const Input: React.FC<InputProps>;
13
+ export { Input };
@@ -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,35 @@
1
+ import { default as React } from 'react';
2
+ import { AvailableChartColorsKeys } from '../../lib/chartUtils';
3
+ type BaseEventProps = {
4
+ eventType: 'dot' | 'category';
5
+ categoryClicked: string;
6
+ [key: string]: number | string;
7
+ };
8
+ type LineChartEventProps = BaseEventProps | null | undefined;
9
+ interface LineChartProps extends React.HTMLAttributes<HTMLDivElement> {
10
+ data: Record<string, any>[];
11
+ index: string;
12
+ categories: string[];
13
+ colors?: AvailableChartColorsKeys[];
14
+ valueFormatter?: (value: number) => string;
15
+ startEndOnly?: boolean;
16
+ showXAxis?: boolean;
17
+ showYAxis?: boolean;
18
+ showGridLines?: boolean;
19
+ yAxisWidth?: number;
20
+ intervalType?: 'preserveStartEnd' | 'equidistantPreserveStart';
21
+ showTooltip?: boolean;
22
+ showLegend?: boolean;
23
+ autoMinValue?: boolean;
24
+ minValue?: number;
25
+ maxValue?: number;
26
+ allowDecimals?: boolean;
27
+ onValueChange?: (value: LineChartEventProps) => void;
28
+ enableLegendSlider?: boolean;
29
+ tickGap?: number;
30
+ connectNulls?: boolean;
31
+ xAxisLabel?: string;
32
+ yAxisLabel?: string;
33
+ }
34
+ declare const LineChart: React.ForwardRefExoticComponent<LineChartProps & React.RefAttributes<HTMLDivElement>>;
35
+ export { LineChart, type LineChartEventProps };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+ interface LogoProps {
3
+ }
4
+ declare const Logo: React.FC<LogoProps>;
5
+ export { Logo };
@@ -0,0 +1,73 @@
1
+ import { Command as CommandPrimitive } from 'cmdk';
2
+ import { Command } from './command';
3
+ import * as React from 'react';
4
+ export interface Option {
5
+ value: string;
6
+ label: string;
7
+ disable?: boolean;
8
+ /** fixed option that can't be removed. */
9
+ fixed?: boolean;
10
+ /** Group the options by providing key. */
11
+ [key: string]: string | boolean | undefined;
12
+ }
13
+ interface MultipleSelectorProps {
14
+ value?: Option[];
15
+ defaultOptions?: Option[];
16
+ /** manually controlled options */
17
+ options?: Option[];
18
+ placeholder?: string;
19
+ /** Loading component. */
20
+ loadingIndicator?: React.ReactNode;
21
+ /** Empty component. */
22
+ emptyIndicator?: React.ReactNode;
23
+ /** Debounce time for async search. Only work with `onSearch`. */
24
+ delay?: number;
25
+ /**
26
+ * Only work with `onSearch` prop. Trigger search when `onFocus`.
27
+ * For example, when user click on the input, it will trigger the search to get initial options.
28
+ **/
29
+ triggerSearchOnFocus?: boolean;
30
+ /** async search */
31
+ onSearch?: (value: string) => Promise<Option[]>;
32
+ /**
33
+ * sync search. This search will not showing loadingIndicator.
34
+ * The rest props are the same as async search.
35
+ * i.e.: creatable, groupBy, delay.
36
+ **/
37
+ onSearchSync?: (value: string) => Option[];
38
+ onChange?: (options: Option[]) => void;
39
+ /** Limit the maximum number of selected options. */
40
+ maxSelected?: number;
41
+ /** When the number of selected options exceeds the limit, the onMaxSelected will be called. */
42
+ onMaxSelected?: (maxLimit: number) => void;
43
+ /** Hide the placeholder when there are options selected. */
44
+ hidePlaceholderWhenSelected?: boolean;
45
+ disabled?: boolean;
46
+ /** Group the options base on provided key. */
47
+ groupBy?: string;
48
+ className?: string;
49
+ /**
50
+ * First item selected is a default behavior by cmdk. That is why the default is true.
51
+ * This is a workaround solution by add a dummy item.
52
+ *
53
+ * @reference: https://github.com/pacocoursey/cmdk/issues/171
54
+ */
55
+ selectFirstItem?: boolean;
56
+ /** Allow user to create option when there is no option matched. */
57
+ creatable?: boolean;
58
+ /** Props of `Command` */
59
+ commandProps?: React.ComponentPropsWithoutRef<typeof Command>;
60
+ /** Props of `CommandInput` */
61
+ inputProps?: Omit<React.ComponentPropsWithoutRef<typeof CommandPrimitive.Input>, 'value' | 'placeholder' | 'disabled'>;
62
+ /** hide the clear all button. */
63
+ hideClearAllButton?: boolean;
64
+ }
65
+ export interface MultipleSelectorRef {
66
+ selectedValue: Option[];
67
+ input: HTMLInputElement;
68
+ focus: () => void;
69
+ reset: () => void;
70
+ }
71
+ export declare function useDebounce<T>(value: T, delay?: number): T;
72
+ declare const MultipleSelector: React.ForwardRefExoticComponent<MultipleSelectorProps & React.RefAttributes<MultipleSelectorRef>>;
73
+ export default MultipleSelector;
@@ -0,0 +1,6 @@
1
+ import * as React from "react";
2
+ export type DropdownUserProfileProps = {
3
+ children: React.ReactNode;
4
+ align?: "center" | "start" | "end";
5
+ };
6
+ export declare function DropdownUserProfile({ children, align, }: DropdownUserProfileProps): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export default function MobileSidebar(): import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1 @@
1
+ export declare function Sidebar(): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const WorkspacesDropdownDesktop: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const WorkspacesDropdownMobile: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ export declare const UserProfileDesktop: () => import("react/jsx-runtime").JSX.Element;
2
+ export declare const UserProfileMobile: () => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,13 @@
1
+ import { KpiEntryExtended } from './dashboard-types';
2
+ export type CardProps = {
3
+ title: string;
4
+ change: string;
5
+ value: string;
6
+ valueDescription: string;
7
+ subtitle: string;
8
+ ctaDescription: string;
9
+ ctaText: string;
10
+ ctaLink: string;
11
+ data: KpiEntryExtended[];
12
+ };
13
+ export declare function CategoryBarCard({ title, change, value, valueDescription, subtitle, ctaDescription, ctaText, ctaLink, data, }: CardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { DateRange } from 'react-day-picker';
2
+ import { PeriodValue } from './dashboard-types';
3
+ import { OverviewData } from '../../../data/schema';
4
+ export type CardProps = {
5
+ title: keyof OverviewData;
6
+ type: "currency" | "unit";
7
+ selectedDates: DateRange | undefined;
8
+ selectedPeriod: PeriodValue;
9
+ isThumbnail?: boolean;
10
+ };
11
+ export declare const getBadgeType: (value: number) => "error" | "success" | "neutral" | "warning";
12
+ export declare function ChartCard({ title, type, selectedDates, selectedPeriod, isThumbnail, }: CardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { DateRange } from 'react-day-picker';
2
+ import { PeriodValue } from './dashboard-types';
3
+ export declare const getPeriod: (dateRange: DateRange | undefined, value: PeriodValue) => DateRange | undefined;
4
+ type FilterbarProps = {
5
+ maxDate?: Date;
6
+ minDate?: Date;
7
+ selectedDates: DateRange | undefined;
8
+ onDatesChange: (dates: DateRange | undefined) => void;
9
+ selectedPeriod: PeriodValue;
10
+ onPeriodChange: (period: PeriodValue) => void;
11
+ categories: any[];
12
+ setSelectedCategories: any;
13
+ selectedCategories: any;
14
+ };
15
+ export declare function Filterbar({ maxDate, minDate, selectedDates, onDatesChange, selectedPeriod, onPeriodChange, categories, setSelectedCategories, selectedCategories, }: FilterbarProps): import("react/jsx-runtime").JSX.Element;
16
+ export {};
@@ -0,0 +1,12 @@
1
+ import { KpiEntry } from './dashboard-types';
2
+ export type CardProps = {
3
+ title: string;
4
+ change: string;
5
+ value: string;
6
+ valueDescription: string;
7
+ ctaDescription: string;
8
+ ctaText: string;
9
+ ctaLink: string;
10
+ data: KpiEntry[];
11
+ };
12
+ export declare function ProgressBarCard({ title, change, value, valueDescription, ctaDescription, ctaText, ctaLink, data, }: CardProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,12 @@
1
+ export type PeriodValue = 'previous-period' | 'last-year' | 'no-comparison';
2
+ export type KpiEntry = {
3
+ title: string;
4
+ percentage: number;
5
+ current: number;
6
+ allowed: number;
7
+ unit?: string;
8
+ };
9
+ export type KpiEntryExtended = Omit<KpiEntry, 'current' | 'allowed' | 'unit'> & {
10
+ value: string;
11
+ color: string;
12
+ };
@@ -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 };