nitro-web 0.0.3 → 0.0.4

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 (75) hide show
  1. package/_example/client/index.ts +0 -1
  2. package/_example/tsconfig.json +0 -5
  3. package/client/index.js +1 -0
  4. package/package.json +22 -7
  5. package/readme.md +1 -9
  6. package/types/client/app.d.ts +2 -0
  7. package/types/client/app.d.ts.map +1 -0
  8. package/types/client/index.d.ts +28 -0
  9. package/types/client/index.d.ts.map +1 -0
  10. package/types/components/auth/reset.d.ts +3 -0
  11. package/types/components/auth/reset.d.ts.map +1 -0
  12. package/types/components/auth/signin.d.ts +4 -0
  13. package/types/components/auth/signin.d.ts.map +1 -0
  14. package/types/components/auth/signup.d.ts +4 -0
  15. package/types/components/auth/signup.d.ts.map +1 -0
  16. package/types/components/partials/element/accordion.d.ts +7 -0
  17. package/types/components/partials/element/accordion.d.ts.map +1 -0
  18. package/types/components/partials/element/avatar.d.ts +8 -0
  19. package/types/components/partials/element/avatar.d.ts.map +1 -0
  20. package/types/components/partials/element/button.d.ts +11 -0
  21. package/types/components/partials/element/button.d.ts.map +1 -0
  22. package/types/components/partials/element/dropdown.d.ts +17 -0
  23. package/types/components/partials/element/dropdown.d.ts.map +1 -0
  24. package/types/components/partials/element/initials.d.ts +9 -0
  25. package/types/components/partials/element/initials.d.ts.map +1 -0
  26. package/types/components/partials/element/message.d.ts +2 -0
  27. package/types/components/partials/element/message.d.ts.map +1 -0
  28. package/types/components/partials/element/modal.d.ts +10 -0
  29. package/types/components/partials/element/modal.d.ts.map +1 -0
  30. package/types/components/partials/element/sidebar.d.ts +4 -0
  31. package/types/components/partials/element/sidebar.d.ts.map +1 -0
  32. package/types/components/partials/element/tooltip.d.ts +8 -0
  33. package/types/components/partials/element/tooltip.d.ts.map +1 -0
  34. package/types/components/partials/element/topbar.d.ts +8 -0
  35. package/types/components/partials/element/topbar.d.ts.map +1 -0
  36. package/types/components/partials/form/checkbox.d.ts +14 -0
  37. package/types/components/partials/form/checkbox.d.ts.map +1 -0
  38. package/types/components/partials/form/drop-handler.d.ts +6 -0
  39. package/types/components/partials/form/drop-handler.d.ts.map +1 -0
  40. package/types/components/partials/form/drop.d.ts +11 -0
  41. package/types/components/partials/form/drop.d.ts.map +1 -0
  42. package/types/components/partials/form/form-error.d.ts +6 -0
  43. package/types/components/partials/form/form-error.d.ts.map +1 -0
  44. package/types/components/partials/form/input-color.d.ts +10 -0
  45. package/types/components/partials/form/input-color.d.ts.map +1 -0
  46. package/types/components/partials/form/input-currency.d.ts +10 -0
  47. package/types/components/partials/form/input-currency.d.ts.map +1 -0
  48. package/types/components/partials/form/input.d.ts +9 -0
  49. package/types/components/partials/form/input.d.ts.map +1 -0
  50. package/types/components/partials/form/location.d.ts +12 -0
  51. package/types/components/partials/form/location.d.ts.map +1 -0
  52. package/types/components/partials/form/select.d.ts +27 -0
  53. package/types/components/partials/form/select.d.ts.map +1 -0
  54. package/types/components/partials/form/toggle.d.ts +9 -0
  55. package/types/components/partials/form/toggle.d.ts.map +1 -0
  56. package/types/components/partials/is-first-render.d.ts +2 -0
  57. package/types/components/partials/is-first-render.d.ts.map +1 -0
  58. package/types/components/partials/layout/layout1.d.ts +4 -0
  59. package/types/components/partials/layout/layout1.d.ts.map +1 -0
  60. package/types/components/partials/layout/layout2.d.ts +4 -0
  61. package/types/components/partials/layout/layout2.d.ts.map +1 -0
  62. package/types/components/partials/not-found.d.ts +2 -0
  63. package/types/components/partials/not-found.d.ts.map +1 -0
  64. package/types/components/partials/styleguide.d.ts +4 -0
  65. package/types/components/partials/styleguide.d.ts.map +1 -0
  66. package/types/components/settings/settings-account.d.ts +6 -0
  67. package/types/components/settings/settings-account.d.ts.map +1 -0
  68. package/types/components/settings/settings-business.d.ts +4 -0
  69. package/types/components/settings/settings-business.d.ts.map +1 -0
  70. package/types/components/settings/settings-team--member.d.ts +5 -0
  71. package/types/components/settings/settings-team--member.d.ts.map +1 -0
  72. package/types/components/settings/settings-team.d.ts +4 -0
  73. package/types/components/settings/settings-team.d.ts.map +1 -0
  74. package/types/util.d.ts +161 -0
  75. package/types/util.d.ts.map +1 -0
@@ -1,4 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
1
  import { useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react'
3
2
  import { Link, useLocation, useNavigate, useParams } from 'react-router-dom'
4
3
  import { setupApp, onChange } from 'nitro-web'
@@ -17,11 +17,6 @@
17
17
  "noImplicitThis": true,
18
18
  "noStrictGenericChecks": false,
19
19
  "outDir": "./dist",
20
- "paths": {
21
- "nitro-web": [
22
- "../client/index.js",
23
- ],
24
- },
25
20
  "resolveJsonModule": true,
26
21
  "skipLibCheck": true,
27
22
  "sourceMap": true,
package/client/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ // export const pi = parseFloat(3.142)
1
2
  export * from './app.js'
2
3
  export * from '../util.js'
3
4
  export * as util from '../util.js'
package/package.json CHANGED
@@ -2,8 +2,9 @@
2
2
  "name": "nitro-web",
3
3
  "description": "Nitro is a battle-tested, modular base project to turbocharge your projects, styled using Tailwind 🚀",
4
4
  "repository": "github:boycce/nitro-web",
5
- "version": "0.0.3",
6
- "main": "client.js",
5
+ "version": "0.0.4",
6
+ "main": "./client/index.js",
7
+ "types": "./types/client/index.d.ts",
7
8
  "type": "module",
8
9
  "keywords": [
9
10
  "express",
@@ -18,9 +19,21 @@
18
19
  "_example"
19
20
  ],
20
21
  "exports": {
21
- ".": "./client/index.js",
22
- "./server": "./server/index.js",
23
- "./util": "./util.js",
22
+ ".": {
23
+ "require": "./client/index.js",
24
+ "import": "./client/index.js",
25
+ "types": "./types/client/index.d.ts"
26
+ },
27
+ "./server": {
28
+ "require": "./server/index.js",
29
+ "import": "./server/index.js",
30
+ "types": "./types/server/index.d.ts"
31
+ },
32
+ "./util": {
33
+ "require": "./util.js",
34
+ "import": "./util.js",
35
+ "types": "./types/util.d.ts"
36
+ },
24
37
  "./.eslintrc.json": "./.eslintrc.json",
25
38
  "./webpack.config.js": "./webpack.config.js"
26
39
  },
@@ -28,7 +41,8 @@
28
41
  "dev": "npm run dev -w example",
29
42
  "major": "standard-version --release-as major && npm publish",
30
43
  "minor": "standard-version --release-as minor && npm publish",
31
- "patch": "standard-version --release-as patch && npm publish"
44
+ "patch": "standard-version --release-as patch && npm publish",
45
+ "types": "tsc client/*.js components/**/*.jsx --declaration --declarationMap --allowJs --emitDeclarationOnly --jsx react-jsx --esModuleInterop --outDir types"
32
46
  },
33
47
  "dependencies": {
34
48
  "@uiw/color-convert": "^2.3.0",
@@ -85,7 +99,8 @@
85
99
  "eslint-plugin-react": "^7.19.0",
86
100
  "eslint-plugin-react-hooks": "^4.0.0",
87
101
  "eslint-webpack-plugin": "^2.7.0",
88
- "standard-version": "^9.3.2"
102
+ "standard-version": "^9.3.2",
103
+ "typescript": "^5.7.3"
89
104
  },
90
105
  "engines": {
91
106
  "node": "^18"
package/readme.md CHANGED
@@ -13,15 +13,7 @@ npm i nitro-web
13
13
  1. Copy ./_example into your project
14
14
  2. In package.json, replace `"nitro-web": "file:.."` with `"nitro-web": "^0.0.1"`
15
15
  3. In package.json, replace `"../.eslintrc.json"` with `"./node_modules/nitro-web/.eslintrc.json"`
16
- 4. In tsconfig.json, remove
17
- ```json
18
- "paths": {
19
- "nitro-web": [
20
- "../client/index.js",
21
- ],
22
- },
23
- ```
24
- 5. Run `npm i`
16
+ 4. Run `npm i`
25
17
 
26
18
  ### Usage
27
19
 
@@ -0,0 +1,2 @@
1
+ export function setupApp(config: any, layouts: any): Promise<void>;
2
+ //# sourceMappingURL=app.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../client/app.js"],"names":[],"mappings":"AAKA,mEAcC"}
@@ -0,0 +1,28 @@
1
+ export * from "./app.js";
2
+ export * from "../util.js";
3
+ export * as util from "../util.js";
4
+ export { Signin } from "../components/auth/signin.jsx";
5
+ export { Signup } from "../components/auth/signup.jsx";
6
+ export { Accordion } from "../components/partials/element/accordion.jsx";
7
+ export { Avatar } from "../components/partials/element/avatar.jsx";
8
+ export { Button } from "../components/partials/element/button.jsx";
9
+ export { Dropdown } from "../components/partials/element/dropdown.jsx";
10
+ export { Initials } from "../components/partials/element/initials.jsx";
11
+ export { Message } from "../components/partials/element/message.jsx";
12
+ export { Sidebar } from "../components/partials/element/sidebar.jsx";
13
+ export { Tooltip } from "../components/partials/element/tooltip.jsx";
14
+ export { Topbar } from "../components/partials/element/topbar.jsx";
15
+ export { Checkbox } from "../components/partials/form/checkbox.jsx";
16
+ export { Drop } from "../components/partials/form/drop.jsx";
17
+ export { FormError } from "../components/partials/form/form-error.jsx";
18
+ export { Input } from "../components/partials/form/input.jsx";
19
+ export { Location } from "../components/partials/form/location.jsx";
20
+ export { Select } from "../components/partials/form/select.jsx";
21
+ export { Toggle } from "../components/partials/form/toggle.jsx";
22
+ export { Layout1 } from "../components/partials/layout/layout1.jsx";
23
+ export { Layout2 } from "../components/partials/layout/layout2.jsx";
24
+ export { IsFirstRender } from "../components/partials/is-first-render.js";
25
+ export { NotFound } from "../components/partials/not-found.jsx";
26
+ export { Styleguide } from "../components/partials/styleguide.jsx";
27
+ export { ResetInstructions, ResetPassword } from "../components/auth/reset.jsx";
28
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../client/index.js"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ export function ResetInstructions(): import("react/jsx-runtime").JSX.Element;
2
+ export function ResetPassword(): import("react/jsx-runtime").JSX.Element;
3
+ //# sourceMappingURL=reset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset.d.ts","sourceRoot":"","sources":["../../../components/auth/reset.jsx"],"names":[],"mappings":"AAMA,6EAmCC;AAED,yEA4CC"}
@@ -0,0 +1,4 @@
1
+ export function Signin({ config }: {
2
+ config: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=signin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signin.d.ts","sourceRoot":"","sources":["../../../components/auth/signin.jsx"],"names":[],"mappings":"AAOA;;4CAoEC"}
@@ -0,0 +1,4 @@
1
+ export function Signup({ config }: {
2
+ config: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=signup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"signup.d.ts","sourceRoot":"","sources":["../../../components/auth/signup.jsx"],"names":[],"mappings":"AAMA;;4CAuDC"}
@@ -0,0 +1,7 @@
1
+ export function Accordion({ children, className, expanded, onChange }: {
2
+ children: any;
3
+ className: any;
4
+ expanded: any;
5
+ onChange: any;
6
+ }): import("react/jsx-runtime").JSX.Element;
7
+ //# sourceMappingURL=accordion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/accordion.jsx"],"names":[],"mappings":"AAGA;;;;;4CA8EC"}
@@ -0,0 +1,8 @@
1
+ export function Avatar({ awsUrl, isRound, user, showPlaceholderImage, className }: {
2
+ awsUrl: any;
3
+ isRound: any;
4
+ user: any;
5
+ showPlaceholderImage: any;
6
+ className: any;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=avatar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"avatar.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/avatar.jsx"],"names":[],"mappings":"AAGA;;;;;;4CAwBC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @param {'primary'|'secondary'|'white'|'primary-sm'|'secondary-sm'|'white-sm'} [type='primary']
3
+ * @param {string} [className]
4
+ * @param {boolean} [isLoading]
5
+ * @param {React.ReactNode|string} [IconLeft]
6
+ * @param {React.ReactNode|string} [IconRight]
7
+ * @param {React.ReactNode|string} [IconRight2]
8
+ * @param {React.ReactNode|string} [children]
9
+ */
10
+ export function Button({ color, className, isLoading, IconLeft, IconRight, IconRight2, children, ...props }?: "primary" | "secondary" | "white" | "primary-sm" | "secondary-sm" | "white-sm"): import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/button.jsx"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,8GARW,SAAS,GAAC,WAAW,GAAC,OAAO,GAAC,YAAY,GAAC,cAAc,GAAC,UAAU,2CA8D9E"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Dropdown component
3
+ *
4
+ * @param {boolean} animate
5
+ * @param {React.ReactNode} children
6
+ * @param {string} className
7
+ * @param {'bottom-left'|'bottom-right'|'top-left'|'top-right'} [dir='bottom-left'] - The direction of the menu
8
+ * @param {[{ label, onClick, isSelected, icon, className }]} options - Menu options
9
+ * @param {boolean} isHoverable - Whether the dropdown is hoverable
10
+ * @param {number} minWidth - The minimum width of the menu
11
+ * @param {React.ReactNode} menuChildren - The content to render inside the top of the dropdown
12
+ * @param {boolean} menuIsOpen - Whether the menu is open
13
+ * @param {boolean} menuToggles - Whether the menu toggles
14
+ * @param {function} toggleCallback - The callback function to call when the menu is toggled
15
+ */
16
+ export const Dropdown: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
17
+ //# sourceMappingURL=dropdown.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dropdown.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/dropdown.jsx"],"names":[],"mappings":"AAQA;;;;;;;;;;;;;;GAcG;AACH,qGAyGE"}
@@ -0,0 +1,9 @@
1
+ export function Initials({ icon, isBig, isMedium, isSmall, isRound, className }: {
2
+ icon: any;
3
+ isBig: any;
4
+ isMedium: any;
5
+ isSmall: any;
6
+ isRound: any;
7
+ className: any;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=initials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initials.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/initials.jsx"],"names":[],"mappings":"AAEA;;;;;;;4CAkBC"}
@@ -0,0 +1,2 @@
1
+ export function Message(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=message.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"message.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/message.jsx"],"names":[],"mappings":"AAMA,mEAqHC"}
@@ -0,0 +1,10 @@
1
+ export function Modal({ show, setShow, children, className, maxWidth, minHeight, dismissable }: {
2
+ show: any;
3
+ setShow: any;
4
+ children: any;
5
+ className: any;
6
+ maxWidth: any;
7
+ minHeight: any;
8
+ dismissable?: boolean;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/modal.jsx"],"names":[],"mappings":"AAKA;;;;;;;;4CA4GC"}
@@ -0,0 +1,4 @@
1
+ export function Sidebar({ Logo }: {
2
+ Logo: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=sidebar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebar.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/sidebar.jsx"],"names":[],"mappings":"AAiBA;;4CA+CC"}
@@ -0,0 +1,8 @@
1
+ export function Tooltip({ text, children, className, classNamePopup, isSmall }: {
2
+ text: any;
3
+ children: any;
4
+ className: any;
5
+ classNamePopup: any;
6
+ isSmall: any;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/tooltip.jsx"],"names":[],"mappings":"AAGA;;;;;;4CAaC"}
@@ -0,0 +1,8 @@
1
+ export function Topbar({ title, subtitle, submenu, btns, className }: {
2
+ title: any;
3
+ subtitle: any;
4
+ submenu: any;
5
+ btns: any;
6
+ className: any;
7
+ }): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=topbar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"topbar.d.ts","sourceRoot":"","sources":["../../../../components/partials/element/topbar.jsx"],"names":[],"mappings":"AAAA;;;;;;4CAwBC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Checkbox/radio/toggle component
3
+ * @param {string} name - The name of the checkbox
4
+ * @param {string} [id] - The id of the checkbox (used for radios)
5
+ * @param {'sm' | 'md'} [size='sm'] - The size of the toggle
6
+ * @param {string} [subtext]
7
+ * @param {string} [text]
8
+ * @param {'checkbox' | 'radio' | 'toggle'} [type='checkbox']
9
+ * @param {object} [props] - input props
10
+ *
11
+ * @link https://tailwindui.com/components/application-ui/forms/checkboxes#component-744ed4fa65ba36b925701eb4da5c6e31
12
+ */
13
+ export function Checkbox({ name, id, size, subtext, text, type, ...props }: string): import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=checkbox.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/checkbox.jsx"],"names":[],"mappings":"AACA;;;;;;;;;;;GAWG;AACH,4EAVW,MAAM,2CAsEhB"}
@@ -0,0 +1,6 @@
1
+ export function DropHandler({ onDrop, children, className }: {
2
+ onDrop: any;
3
+ children: any;
4
+ className: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=drop-handler.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drop-handler.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/drop-handler.jsx"],"names":[],"mappings":"AAAO;;;;4CA6DN"}
@@ -0,0 +1,11 @@
1
+ export function Drop({ awsUrl, className, id, name, onChange, multiple, state, ...props }: {
2
+ [x: string]: any;
3
+ awsUrl: any;
4
+ className: any;
5
+ id: any;
6
+ name: any;
7
+ onChange: any;
8
+ multiple: any;
9
+ state: any;
10
+ }): import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=drop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"drop.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/drop.jsx"],"names":[],"mappings":"AAGA;;;;;;;;;4CAyHC"}
@@ -0,0 +1,6 @@
1
+ export function FormError({ state, fields, className }: {
2
+ state: any;
3
+ fields: any;
4
+ className: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=form-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"form-error.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/form-error.jsx"],"names":[],"mappings":"AAAA;;;;4CAoBC"}
@@ -0,0 +1,10 @@
1
+ export function InputColor({ className, defaultColor, iconEl, id, onChange, value, ...props }: {
2
+ [x: string]: any;
3
+ className: any;
4
+ defaultColor?: string;
5
+ iconEl: any;
6
+ id: any;
7
+ onChange: any;
8
+ value: any;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=input-color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-color.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/input-color.jsx"],"names":[],"mappings":"AAOA;;;;;;;;4CA+BC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @param {string} id - field name or path on state
3
+ * @param {object} config - e.g. { currencies: { nzd: { symbol: '$', digits: 2 } } }
4
+ * @param {string} [currency] - currency iso
5
+ * @param {function} [onChange] - e.g. (event) => onInputChange(event)
6
+ * @param {string} [placeholder] - e.g. 'Amount'
7
+ * @param {cents} [value] - e.g. 123 (input is always controlled if state is passed in)
8
+ */
9
+ export function InputCurrency({ id, config, className, currency, onChange, placeholder, value }: string): import("react/jsx-runtime").JSX.Element;
10
+ //# sourceMappingURL=input-currency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input-currency.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/input-currency.jsx"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,iGAPW,MAAM,2CAkIhB"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Input
3
+ * @param {string} name - field name or path on state (used to match errors), e.g. 'date', 'company.email'
4
+ * @param {object} state - State object to get the value, and check errors against
5
+ * @param {string} [id] - not required, name used if not provided
6
+ * @param {('password'|'email'|'text'|'date'|'filter'|'search'|'color'|'textarea'|'currency')} [type='text']
7
+ */
8
+ export function Input({ name, state, id, type, ...props }: string): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=input.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/input.jsx"],"names":[],"mappings":"AAcA;;;;;;GAMG;AACH,2DALW,MAAM,2CAkFhB"}
@@ -0,0 +1,12 @@
1
+ export function Location({ clear, id, name, onInput, onSelect, placeholder, placeTypes, value, googleMapsApiKey }: {
2
+ clear: any;
3
+ id: any;
4
+ name: any;
5
+ onInput: any;
6
+ onSelect: any;
7
+ placeholder: any;
8
+ placeTypes: any;
9
+ value: any;
10
+ googleMapsApiKey: any;
11
+ }): import("react/jsx-runtime").JSX.Element;
12
+ //# sourceMappingURL=location.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"location.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/location.jsx"],"names":[],"mappings":"AAGA;;;;;;;;;;4CA2KC"}
@@ -0,0 +1,27 @@
1
+ export function getSelectStyle({ name, isFocused, isSelected, hasError, usePrefixes }: {
2
+ name: any;
3
+ isFocused: any;
4
+ isSelected: any;
5
+ hasError: any;
6
+ usePrefixes: any;
7
+ }): string;
8
+ /**
9
+ * @param {string} name - field name or path on state (used to match errors), e.g. 'date', 'company.email'
10
+ * @param {string} [minMenuWidth] - width of the dropdown menu
11
+ * @param {string} [inputId] - name used if not provided
12
+ * @param {function} [onChange] - e.g. (event) => onInputChange(event)
13
+ * @param {object} [state] - object to get value from, and check errors against
14
+ * @param {string} [type] - speical types: 'country', 'customer', 'customer-big'
15
+ *
16
+ * react-select prop quick reference (https://react-select.com/props#api):
17
+ * isDisabled={false}
18
+ * isMulti={false}
19
+ * isSearchable={true}
20
+ * options={[{ value: 'chocolate', label: 'Chocolate' }]}
21
+ * placeholder="Select a color"
22
+ * value={options.find(o => o.code == state.color)} // to clear you need to set to null, not undefined
23
+ * isClearable={false}
24
+ * menuIsOpen={false}
25
+ */
26
+ export function Select({ inputId, minMenuWidth, name, prefix, onChange, options, state, type, ...props }: string): import("react/jsx-runtime").JSX.Element;
27
+ //# sourceMappingURL=select.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/select.jsx"],"names":[],"mappings":"AA8CA;;;;;;WAiBC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,0GAjBW,MAAM,2CA6IhB"}
@@ -0,0 +1,9 @@
1
+ export function Toggle({ name, id, subtext, text, type, ...props }: {
2
+ [x: string]: any;
3
+ name: any;
4
+ id: any;
5
+ subtext: any;
6
+ text: any;
7
+ type?: string;
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ //# sourceMappingURL=toggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../../components/partials/form/toggle.jsx"],"names":[],"mappings":"AAAA;;;;;;;4CA6CC"}
@@ -0,0 +1,2 @@
1
+ export function IsFirstRender(delay: any): any;
2
+ //# sourceMappingURL=is-first-render.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"is-first-render.d.ts","sourceRoot":"","sources":["../../../components/partials/is-first-render.js"],"names":[],"mappings":"AAAA,+CAcC"}
@@ -0,0 +1,4 @@
1
+ export function Layout1({ Logo }: {
2
+ Logo: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=layout1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout1.d.ts","sourceRoot":"","sources":["../../../../components/partials/layout/layout1.jsx"],"names":[],"mappings":"AAMA;;4CAgBC"}
@@ -0,0 +1,4 @@
1
+ export function Layout2({ Logo }: {
2
+ Logo: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=layout2.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"layout2.d.ts","sourceRoot":"","sources":["../../../../components/partials/layout/layout2.jsx"],"names":[],"mappings":"AAKA;;4CA4BC"}
@@ -0,0 +1,2 @@
1
+ export function NotFound(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=not-found.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"not-found.d.ts","sourceRoot":"","sources":["../../../components/partials/not-found.jsx"],"names":[],"mappings":"AAAA,oEAMC"}
@@ -0,0 +1,4 @@
1
+ export function Styleguide({ config }: {
2
+ config: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=styleguide.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styleguide.d.ts","sourceRoot":"","sources":["../../../components/partials/styleguide.jsx"],"names":[],"mappings":"AASA;;4CAiPC"}
@@ -0,0 +1,6 @@
1
+ export function SettingsAccount(): import("react/jsx-runtime").JSX.Element;
2
+ export function RemoveModal({ show, setShow }: {
3
+ show: any;
4
+ setShow: any;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ //# sourceMappingURL=settings-account.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-account.d.ts","sourceRoot":"","sources":["../../../components/settings/settings-account.jsx"],"names":[],"mappings":"AAUA,2EAyEC;AAED;;;4CA6CC"}
@@ -0,0 +1,4 @@
1
+ export function SettingsBusiness({ config }: {
2
+ config: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=settings-business.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-business.d.ts","sourceRoot":"","sources":["../../../components/settings/settings-business.jsx"],"names":[],"mappings":"AASA;;4CA2GC"}
@@ -0,0 +1,5 @@
1
+ export function SettingsTeamMember({ showModal, setShowModal }: {
2
+ showModal: any;
3
+ setShowModal: any;
4
+ }): import("react/jsx-runtime").JSX.Element;
5
+ //# sourceMappingURL=settings-team--member.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-team--member.d.ts","sourceRoot":"","sources":["../../../components/settings/settings-team--member.jsx"],"names":[],"mappings":"AASA;;;4CA+FC"}
@@ -0,0 +1,4 @@
1
+ export function SettingsTeam({ config }: {
2
+ config: any;
3
+ }): import("react/jsx-runtime").JSX.Element;
4
+ //# sourceMappingURL=settings-team.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"settings-team.d.ts","sourceRoot":"","sources":["../../../components/settings/settings-team.jsx"],"names":[],"mappings":"AAUA;;4CAiEC"}
@@ -0,0 +1,161 @@
1
+ export function addressSchema(): {
2
+ city: {
3
+ type: string;
4
+ };
5
+ country: {
6
+ type: string;
7
+ default: string;
8
+ };
9
+ full: {
10
+ type: string;
11
+ index: string;
12
+ };
13
+ line1: {
14
+ type: string;
15
+ };
16
+ line2: {
17
+ type: string;
18
+ };
19
+ number: {
20
+ type: string;
21
+ };
22
+ postcode: {
23
+ type: string;
24
+ };
25
+ suburb: {
26
+ type: string;
27
+ };
28
+ unit: {
29
+ type: string;
30
+ };
31
+ area: {
32
+ bottomLeft: {
33
+ type: string;
34
+ }[];
35
+ topRight: {
36
+ type: string;
37
+ }[];
38
+ };
39
+ location: {
40
+ index: string;
41
+ type: {
42
+ type: string;
43
+ default: string;
44
+ };
45
+ coordinates: any;
46
+ };
47
+ };
48
+ export function axios(): import("@hokify/axios").AxiosStatic;
49
+ export function buildUrl(url: any, parameters: any): string;
50
+ export function camelCase(str: any, capitaliseFirst: any, allowNumber: any): any;
51
+ export function camelCaseToTitle(str: any, captialiseFirstOnly: any): any;
52
+ export function camelCaseToHypen(str: any): any;
53
+ export function capitalise(str: any): any;
54
+ export function currency(cents: any, decimals: number, decimalsMinimum: any): string;
55
+ export function currencyToCents(currency: any): string;
56
+ export function date(date: any, format: any, timezone: any): any;
57
+ export function debounce(func: any, wait: any, options: any): {
58
+ (...args: any[]): any;
59
+ cancel: () => void;
60
+ flush: () => any;
61
+ };
62
+ export function deepCopy(obj: any): any;
63
+ export function deepFind(obj: any, path: any): any;
64
+ export function deepSave(obj: any, path: any, value: any): any;
65
+ export function each(obj: any, iteratee: any, context: any): any;
66
+ export function fileDownload(data: any, filename: any, mime: any, bom: any): void;
67
+ export function formatName(string: any, ignoreHyphen: any): any;
68
+ export function formatSlug(string: any): any;
69
+ export function formData(obj: any, cfg: any, fd: any, pre: any): any;
70
+ export function fullName(object: any): string;
71
+ export function fullNameSplit(string: any): any[];
72
+ export function getCountryOptions(countries: any): {
73
+ value: string;
74
+ label: any;
75
+ flag: string;
76
+ }[];
77
+ export function getCurrencyOptions(currencies: any): {
78
+ value: string;
79
+ label: any;
80
+ }[];
81
+ export function getCurrencyPrefixWidth(prefix: any, paddingRight?: number): number;
82
+ export function getDirectories(path: any, pwd: any): {
83
+ clientDir: any;
84
+ componentsDir: any;
85
+ distDir: any;
86
+ emailTemplateDir: any;
87
+ fontsDir: any;
88
+ imgsDir: any;
89
+ tmpDir: any;
90
+ };
91
+ export function getLink(obj: any, query: any): string;
92
+ export function getStripeClientPromise(stripePublishableKey: any): any;
93
+ export function getResponseErrors(errs: any): any;
94
+ export function inArray(array: any, key: any, value: any): any;
95
+ export function isArray(variable: any): variable is any[];
96
+ export function isDate(variable: any): boolean;
97
+ export function isDefined(variable: any): boolean;
98
+ export function isEmail(email: any): boolean;
99
+ export function isEmpty(obj: any, truthyValuesOnly: any): boolean;
100
+ export function isFunction(variable: any): boolean;
101
+ export function isHex24(value: any): boolean;
102
+ export function isNumber(variable: any): boolean;
103
+ export function isObject(variable: any): boolean;
104
+ export function isRegex(variable: any): boolean;
105
+ export function isString(variable: any): boolean;
106
+ export function lcFirst(string: any): any;
107
+ export function maxLength(string: any, len: any, showEllipsis: any): any;
108
+ export function mongoAddKmsToBox(km: any, bottomLeft: any, topRight: any): any[][];
109
+ export function mongoDocWithinPassedAddress(address: any, km: any, prefix: any): {
110
+ $geoNear: {
111
+ near: {
112
+ type: string;
113
+ coordinates: any[];
114
+ };
115
+ distanceField: string;
116
+ maxDistance: number;
117
+ spherical: boolean;
118
+ };
119
+ } | {
120
+ [x: string]: {
121
+ $geoWithin: {
122
+ $box: any[][];
123
+ };
124
+ };
125
+ $geoNear?: undefined;
126
+ } | {
127
+ [x: string]: {
128
+ $geoWithin: {
129
+ $centerSphere: (number | any[])[];
130
+ };
131
+ };
132
+ $geoNear?: undefined;
133
+ };
134
+ export function mongoPointDifference(point1: any, point2: any): string;
135
+ export function objectMap(object: any, fn: any): {};
136
+ export function omit(obj: any, fields: any): any;
137
+ export function onChange(setState: any, event: any, beforeSetState: any): any;
138
+ export function pad(num: any, padLeft: any, fixedRight: any): any;
139
+ export function pick(obj: any, keys: any): {};
140
+ export function queryObject(search: any, assignTrue: any): any;
141
+ export function queryString(obj: any): string;
142
+ export function request(event: any, route: any, data: any, isLoading: any): Promise<any>;
143
+ export function removeUndefined(variable: any): any;
144
+ export function s3Image(awsUrl: any, image: any, size: string, i: any): any;
145
+ export function sanitizeHTML(string: any): string;
146
+ export function scrollbar(paddingClass: any, marginClass: any, maxWidth: any): any;
147
+ export function secondsToTime(seconds: any, padMinute: any): string;
148
+ export function setTimeoutPromise(func: any, milliseconds: any): Promise<any>;
149
+ export function showError(setStore: any, errs: any): void;
150
+ export function sortByKey(objects: any, key: any): any;
151
+ export function sortFromQuery(req: any, sortMap: any, sortByDefault?: string): any;
152
+ export function throttle(func: any, wait: any, options: any): {
153
+ (...args: any[]): any;
154
+ cancel: () => void;
155
+ flush: () => any;
156
+ };
157
+ export function toArray(variable: any): any[];
158
+ export function trim(string: any): any;
159
+ export function ucFirst(string: any): any;
160
+ export const dateFormat: any;
161
+ //# sourceMappingURL=util.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../util.js"],"names":[],"mappings":"AAMA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8BC;AAED,6DAaC;AAED,4DAQC;AAED,iFAaC;AAED,0EAIC;AAED,gDAEC;AAED,0CAEC;AAED,qFAQC;AAED,uDAIC;AAED,iEAoBC;AAED;;;;EAgIC;AAED,wCASC;AAED,mDAYC;AAED,+DAyBC;AAED,iEAeC;AAED,kFA2BC;AAED,gEAIC;AAED,6CASC;AAED,qEAsEC;AAED,8CAGC;AAED,kDAQC;AAED;;;;IAOC;AAED;;;IAOC;AAED,mFAUC;AAED;;;;;;;;EAWC;AAED,sDAYC;AAED,uEAEC;AAED,kDAsBC;AAED,+DAaC;AAED,0DAEC;AAED,+CAEC;AAED,kDAEC;AAED,6CAIC;AAED,kEAOC;AAED,mDAEC;AAED,6CAiBC;AAED,iDAEC;AAED,iDAGC;AAED,gDAEC;AAED,iDAEC;AAED,0CAEC;AAED,yEAWC;AAED,mFAwCC;AAED;;;;;;;;;;;;;;;;;;;;;;;;EA0CC;AAED,uEAmBC;AAED,oDAKC;AAED,iDAOC;AAED,8EAqDC;AAED,kEAQC;AAED,8CAeC;AAED,+DAiCC;AAED,8CAcC;AAED,yFAiDC;AAED,oDAYC;AAED,4EAmBC;AAED,kDAUC;AAED,mFAiDC;AAED,oEAaC;AAED,8EAIC;AAED,0DAQC;AAED,uDAMC;AAED,mFAwBC;AAED;;;;EAyBC;AAED,8CAIC;AAED,uCAGC;AAED,0CAGC;AAjoCD,6BAAoC"}