@ews-admin/global-design-system 1.0.0 → 1.1.0

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 (68) hide show
  1. package/README.md +50 -1
  2. package/dist/components/Button/Button.d.ts.map +1 -1
  3. package/dist/components/Input/Input.d.ts +4 -0
  4. package/dist/components/Input/Input.d.ts.map +1 -1
  5. package/dist/components/Logo/Logo.d.ts +29 -0
  6. package/dist/components/Logo/Logo.d.ts.map +1 -0
  7. package/dist/components/Logo/index.d.ts +3 -0
  8. package/dist/components/Logo/index.d.ts.map +1 -0
  9. package/dist/components/Modal/Modal.d.ts +72 -0
  10. package/dist/components/Modal/Modal.d.ts.map +1 -0
  11. package/dist/components/Modal/index.d.ts +3 -0
  12. package/dist/components/Modal/index.d.ts.map +1 -0
  13. package/dist/components/MultiSearchAutocomplete/MultiSearchAutocomplete.d.ts +25 -0
  14. package/dist/components/MultiSearchAutocomplete/MultiSearchAutocomplete.d.ts.map +1 -0
  15. package/dist/components/MultiSearchAutocomplete/index.d.ts +2 -0
  16. package/dist/components/MultiSearchAutocomplete/index.d.ts.map +1 -0
  17. package/dist/components/SearchAutocomplete/SearchAutocomplete.d.ts +22 -0
  18. package/dist/components/SearchAutocomplete/SearchAutocomplete.d.ts.map +1 -0
  19. package/dist/components/SearchAutocomplete/index.d.ts +3 -0
  20. package/dist/components/SearchAutocomplete/index.d.ts.map +1 -0
  21. package/dist/hooks/index.d.ts +2 -0
  22. package/dist/hooks/index.d.ts.map +1 -0
  23. package/dist/hooks/useDebounce.d.ts +15 -0
  24. package/dist/hooks/useDebounce.d.ts.map +1 -0
  25. package/dist/icons/Icon.d.ts +5 -4
  26. package/dist/icons/Icon.d.ts.map +1 -1
  27. package/dist/icons/index.d.ts +1 -3
  28. package/dist/icons/index.d.ts.map +1 -1
  29. package/dist/index.css +3 -1
  30. package/dist/index.d.ts +185 -12
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.esm.css +3 -1
  33. package/dist/index.esm.js +763 -29
  34. package/dist/index.esm.js.map +1 -1
  35. package/dist/index.js +768 -27
  36. package/dist/index.js.map +1 -1
  37. package/dist/molecules/SpecialtySearchAutocomplete/SpecialtySearchAutocomplete.d.ts +18 -0
  38. package/dist/molecules/SpecialtySearchAutocomplete/SpecialtySearchAutocomplete.d.ts.map +1 -0
  39. package/dist/molecules/SpecialtySearchAutocomplete/index.d.ts +3 -0
  40. package/dist/molecules/SpecialtySearchAutocomplete/index.d.ts.map +1 -0
  41. package/dist/molecules/index.d.ts +3 -0
  42. package/dist/molecules/index.d.ts.map +1 -0
  43. package/dist/utils/index.d.ts +5 -1
  44. package/dist/utils/index.d.ts.map +1 -1
  45. package/package.json +17 -2
  46. package/src/assets/favicon.svg +6 -0
  47. package/src/assets/logo.svg +17 -0
  48. package/src/components/Button/Button.tsx +22 -8
  49. package/src/components/Input/Input.tsx +42 -16
  50. package/src/components/Logo/Logo.tsx +100 -0
  51. package/src/components/Logo/index.ts +2 -0
  52. package/src/components/Modal/Modal.tsx +257 -0
  53. package/src/components/Modal/index.ts +2 -0
  54. package/src/components/MultiSearchAutocomplete/MultiSearchAutocomplete.tsx +319 -0
  55. package/src/components/MultiSearchAutocomplete/index.ts +1 -0
  56. package/src/components/SearchAutocomplete/SearchAutocomplete.tsx +315 -0
  57. package/src/components/SearchAutocomplete/index.ts +2 -0
  58. package/src/hooks/index.ts +1 -0
  59. package/src/hooks/useDebounce.ts +64 -0
  60. package/src/icons/Icon.tsx +15 -16
  61. package/src/icons/index.ts +39 -3
  62. package/src/index.ts +19 -0
  63. package/src/molecules/SpecialtySearchAutocomplete/SpecialtySearchAutocomplete.tsx +203 -0
  64. package/src/molecules/SpecialtySearchAutocomplete/index.ts +5 -0
  65. package/src/molecules/index.ts +5 -0
  66. package/src/styles/index.css +8 -5
  67. package/src/styles/tailwind.css +3 -0
  68. package/src/utils/index.ts +7 -2
package/README.md CHANGED
@@ -148,11 +148,60 @@ pnpm type-check
148
148
  The design system includes a comprehensive Storybook for component documentation and testing:
149
149
 
150
150
  ```bash
151
- npm run storybook
151
+ pnpm storybook
152
152
  ```
153
153
 
154
154
  Visit `http://localhost:6006` to view the Storybook.
155
155
 
156
+ ## Publishing
157
+
158
+ ### Prerequisites for Publishing
159
+
160
+ 1. **Login to npm:**
161
+
162
+ ```bash
163
+ npm login
164
+ ```
165
+
166
+ 2. **Create @ews-admin organization** (if not already created):
167
+ - Go to: https://www.npmjs.com/org/create
168
+ - Organization name: `ews-admin`
169
+ - Choose **Free** plan
170
+
171
+ ### Publishing Steps
172
+
173
+ 1. **Build the package:**
174
+
175
+ ```bash
176
+ pnpm build
177
+ ```
178
+
179
+ 2. **Publish to npm:**
180
+
181
+ ```bash
182
+ pnpm publish:public
183
+ ```
184
+
185
+ 3. **Verify publication:**
186
+ ```bash
187
+ pnpm view
188
+ ```
189
+
190
+ ### Version Management
191
+
192
+ - **Patch version** (bug fixes): `pnpm publish:patch`
193
+ - **Minor version** (new features): `pnpm publish:minor`
194
+ - **Major version** (breaking changes): `pnpm publish:major`
195
+
196
+ ### Additional Scripts
197
+
198
+ - **Clean build directory**: `pnpm clean`
199
+ - **Rebuild from scratch**: `pnpm rebuild`
200
+ - **Version only** (without publishing):
201
+ - `pnpm version:patch`
202
+ - `pnpm version:minor`
203
+ - `pnpm version:major`
204
+
156
205
  ## Project Structure
157
206
 
158
207
  ```
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;IAC9E;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,QAAA,MAAM,MAAM,uFAiFX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IACrD;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,CAAC;IAC9E;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,QAAA,MAAM,MAAM,uFA+FX,CAAC;AAIF,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -32,6 +32,10 @@ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElem
32
32
  * Whether the input should take full width
33
33
  */
34
34
  fullWidth?: boolean;
35
+ /**
36
+ * Whether to show password toggle for password inputs
37
+ */
38
+ showPasswordToggle?: boolean;
35
39
  }
36
40
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
37
41
  export { Input };
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACjE;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC1C;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,QAAA,MAAM,KAAK,qFAqGV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAIxC,MAAM,WAAW,UACf,SAAQ,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACjE;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC1C;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC5B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAED,QAAA,MAAM,KAAK,qFA0HV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,29 @@
1
+ export interface LogoProps {
2
+ /**
3
+ * Logo size
4
+ */
5
+ size?: "sm" | "md" | "lg" | "xl";
6
+ /**
7
+ * Whether to show the tagline
8
+ */
9
+ showTagline?: boolean;
10
+ /**
11
+ * Whether to show only the icon (favicon version)
12
+ */
13
+ iconOnly?: boolean;
14
+ /**
15
+ * Logo variant - normal, white, or favicon
16
+ */
17
+ variant?: "normal" | "white" | "favicon";
18
+ /**
19
+ * Custom className
20
+ */
21
+ className?: string;
22
+ /**
23
+ * Click handler
24
+ */
25
+ onClick?: () => void;
26
+ }
27
+ declare const Logo: ({ size, showTagline, iconOnly, variant, className, onClick, }: LogoProps) => import("react/jsx-runtime").JSX.Element;
28
+ export { Logo };
29
+ //# sourceMappingURL=Logo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Logo.d.ts","sourceRoot":"","sources":["../../../src/components/Logo/Logo.tsx"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACxB;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC;IACzC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,QAAA,MAAM,IAAI,GAAI,+DAOX,SAAS,4CA6DX,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Logo } from "./Logo";
2
+ export type { LogoProps } from "./Logo";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Logo/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC"}
@@ -0,0 +1,72 @@
1
+ import React from "react";
2
+ export interface ErrorField {
3
+ name: string;
4
+ message: string;
5
+ path: string;
6
+ }
7
+ export interface ErrorObject {
8
+ code: string;
9
+ message: string;
10
+ fields: ErrorField[];
11
+ }
12
+ export interface ModalProps {
13
+ /**
14
+ * Whether the modal is open
15
+ */
16
+ isOpen: boolean;
17
+ /**
18
+ * Function to call when modal should be closed
19
+ */
20
+ onClose: () => void;
21
+ /**
22
+ * Modal title
23
+ */
24
+ title: string;
25
+ /**
26
+ * Modal content/description
27
+ */
28
+ children: React.ReactNode;
29
+ /**
30
+ * Modal variant
31
+ */
32
+ variant?: "error" | "warning" | "confirmation" | "info";
33
+ /**
34
+ * Primary action button text
35
+ */
36
+ primaryAction?: string;
37
+ /**
38
+ * Secondary action button text
39
+ */
40
+ secondaryAction?: string;
41
+ /**
42
+ * Function to call when primary action is clicked
43
+ */
44
+ onPrimaryAction?: () => void;
45
+ /**
46
+ * Function to call when secondary action is clicked
47
+ */
48
+ onSecondaryAction?: () => void;
49
+ /**
50
+ * Whether the primary action button is loading
51
+ */
52
+ isLoading?: boolean;
53
+ /**
54
+ * Whether the modal can be closed by clicking outside or pressing escape
55
+ */
56
+ closeOnOverlayClick?: boolean;
57
+ /**
58
+ * Custom className for the modal
59
+ */
60
+ className?: string;
61
+ /**
62
+ * Custom className for the content
63
+ */
64
+ contentClassName?: string;
65
+ /**
66
+ * Error object for error modals
67
+ */
68
+ error?: ErrorObject;
69
+ }
70
+ declare const Modal: ({ isOpen, onClose, title, children, variant, primaryAction, secondaryAction, onPrimaryAction, onSecondaryAction, isLoading, closeOnOverlayClick, className, contentClassName, error, }: ModalProps) => import("react/jsx-runtime").JSX.Element | null;
71
+ export { Modal };
72
+ //# sourceMappingURL=Modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAIzC,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,GAAG,SAAS,GAAG,cAAc,GAAG,MAAM,CAAC;IACxD;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE,WAAW,CAAC;CACrB;AAED,QAAA,MAAM,KAAK,GAAI,wLAeZ,UAAU,mDAmKZ,CAAC;AAEF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { Modal } from "./Modal";
2
+ export type { ErrorField, ErrorObject, ModalProps } from "./Modal";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ import { SearchableEntity } from "../SearchAutocomplete/SearchAutocomplete";
3
+ interface MultiSearchAutocompleteProps<T extends SearchableEntity> {
4
+ items: T[];
5
+ selectedItems: T[];
6
+ onSelectionChange: (items: T[]) => void;
7
+ onSearch: (searchTerm: string) => Promise<void>;
8
+ getEntityById?: (id: string) => Promise<T | undefined>;
9
+ getPrimaryText: (entity: T) => string;
10
+ getSecondaryText?: (entity: T) => string | null;
11
+ placeholder: string;
12
+ disabled?: boolean;
13
+ loading?: boolean;
14
+ multiple?: boolean;
15
+ className?: string;
16
+ renderSelectedItem?: (entity: T) => React.ReactNode;
17
+ renderListItem?: (entity: T, isSelected: boolean) => React.ReactNode;
18
+ keepOpenOnSelect?: boolean;
19
+ error?: string;
20
+ minSearchLength?: number;
21
+ debounceTime?: number;
22
+ }
23
+ export declare function MultiSearchAutocomplete<T extends SearchableEntity>({ items, selectedItems, onSelectionChange, onSearch, getEntityById, getPrimaryText, getSecondaryText, placeholder, disabled, loading, multiple, className, renderSelectedItem, renderListItem, keepOpenOnSelect, error, minSearchLength, debounceTime, }: MultiSearchAutocompleteProps<T>): import("react/jsx-runtime").JSX.Element;
24
+ export {};
25
+ //# sourceMappingURL=MultiSearchAutocomplete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSearchAutocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSearchAutocomplete/MultiSearchAutocomplete.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmD,MAAM,OAAO,CAAC;AAIxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0CAA0C,CAAC;AAE5E,UAAU,4BAA4B,CAAC,CAAC,SAAS,gBAAgB;IAC/D,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,aAAa,EAAE,CAAC,EAAE,CAAC;IACnB,iBAAiB,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IACxC,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IACvD,cAAc,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM,CAAC;IACtC,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IACpD,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,EAAE,UAAU,EAAE,OAAO,KAAK,KAAK,CAAC,SAAS,CAAC;IACrE,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,gBAAgB,EAAE,EAClE,KAAK,EACL,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,aAAa,EACb,cAAc,EACd,gBAAgB,EAChB,WAAW,EACX,QAAgB,EAChB,OAAe,EACf,QAAe,EACf,SAAS,EACT,kBAAkB,EAClB,cAAc,EACd,gBAAuB,EACvB,KAAK,EACL,eAAmB,EACnB,YAAkB,GACnB,EAAE,4BAA4B,CAAC,CAAC,CAAC,2CA+QjC"}
@@ -0,0 +1,2 @@
1
+ export { MultiSearchAutocomplete } from "./MultiSearchAutocomplete";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/MultiSearchAutocomplete/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { LucideIcon } from "lucide-react";
2
+ export interface SearchableEntity {
3
+ id: string;
4
+ [key: string]: string | number | boolean | undefined;
5
+ }
6
+ interface SearchAutocompleteProps<T extends SearchableEntity> {
7
+ onSelect: (id: string) => void;
8
+ selectedId: string;
9
+ searchFunction: (keyword: string) => Promise<T[]>;
10
+ getEntityById?: (id: string) => Promise<T | undefined>;
11
+ getDisplayValue: (entity: T) => string;
12
+ getSecondaryText?: (entity: T) => string | null;
13
+ placeholder: string;
14
+ icon?: LucideIcon;
15
+ disabled?: boolean;
16
+ minSearchLength?: number;
17
+ debounceTime?: number;
18
+ error?: string;
19
+ }
20
+ export declare function SearchAutocomplete<T extends SearchableEntity>({ onSelect, selectedId, searchFunction, getEntityById, getDisplayValue, getSecondaryText, placeholder, icon, disabled, minSearchLength, debounceTime, error, }: SearchAutocompleteProps<T>): import("react/jsx-runtime").JSX.Element;
21
+ export {};
22
+ //# sourceMappingURL=SearchAutocomplete.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchAutocomplete.d.ts","sourceRoot":"","sources":["../../../src/components/SearchAutocomplete/SearchAutocomplete.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,cAAc,CAAC;AAMrD,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;CACtD;AAED,UAAU,uBAAuB,CAAC,CAAC,SAAS,gBAAgB;IAC1D,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/B,UAAU,EAAE,MAAM,CAAC;IACnB,cAAc,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;IAClD,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,GAAG,SAAS,CAAC,CAAC;IACvD,eAAe,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM,CAAC;IACvC,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,MAAM,GAAG,IAAI,CAAC;IAChD,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,gBAAgB,EAAE,EAC7D,QAAQ,EACR,UAAU,EACV,cAAc,EACd,aAAa,EACb,eAAe,EACf,gBAAgB,EAChB,WAAW,EACX,IAAa,EACb,QAAgB,EAChB,eAAmB,EACnB,YAAkB,EAClB,KAAK,GACN,EAAE,uBAAuB,CAAC,CAAC,CAAC,2CAmR5B"}
@@ -0,0 +1,3 @@
1
+ export { SearchAutocomplete } from "./SearchAutocomplete";
2
+ export type { SearchableEntity } from "./SearchAutocomplete";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/SearchAutocomplete/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { useDebounce, useDebouncedCallback } from "./useDebounce";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * A custom hook that debounces a value
3
+ * @param value - The value to debounce
4
+ * @param delay - The delay in milliseconds (optional, defaults to 300ms)
5
+ * @returns The debounced value
6
+ */
7
+ export declare function useDebounce<T>(value: T, delay?: number): T;
8
+ /**
9
+ * A custom hook that provides a debounced callback function
10
+ * @param callback - The function to debounce
11
+ * @param delay - The delay in milliseconds (optional, defaults to 300ms)
12
+ * @returns A debounced version of the callback
13
+ */
14
+ export declare function useDebouncedCallback<T extends (...args: unknown[]) => unknown>(callback: T, delay?: number): T;
15
+ //# sourceMappingURL=useDebounce.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../../src/hooks/useDebounce.ts"],"names":[],"mappings":"AAIA;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,CAe1D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,EAC5E,QAAQ,EAAE,CAAC,EACX,KAAK,CAAC,EAAE,MAAM,GACb,CAAC,CA2BH"}
@@ -1,13 +1,14 @@
1
+ import { LucideProps } from "lucide-react";
1
2
  import React from "react";
2
- export interface IconProps extends React.SVGProps<SVGSVGElement> {
3
+ export interface IconProps extends Omit<LucideProps, "size"> {
3
4
  /**
4
5
  * Icon size
5
6
  */
6
- size?: "sm" | "md" | "lg" | "xl";
7
+ size?: "sm" | "md" | "lg" | "xl" | number;
7
8
  /**
8
- * Icon color
9
+ * The Lucide icon component to render
9
10
  */
10
- color?: string;
11
+ icon: React.ComponentType<LucideProps>;
11
12
  }
12
13
  declare const Icon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
13
14
  export { Icon };
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/icons/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,SAAU,SAAQ,KAAK,CAAC,QAAQ,CAAC,aAAa,CAAC;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IACjC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,QAAA,MAAM,IAAI,8FAsBT,CAAC;AAIF,OAAO,EAAE,IAAI,EAAE,CAAC"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/icons/Icon.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,WAAW,SAAU,SAAQ,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC;IAC1D;;OAEG;IACH,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;IAC1C;;OAEG;IACH,IAAI,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;CACxC;AAED,QAAA,MAAM,IAAI,8FAoBT,CAAC;AAIF,OAAO,EAAE,IAAI,EAAE,CAAC"}
@@ -1,6 +1,4 @@
1
- export { ArrowRight } from "./ArrowRight";
2
- export { Check } from "./Check";
1
+ export { ArrowRight, Bell, Building, Calendar, Check, ChevronDown, ChevronLeft, ChevronRight, ChevronUp, Clock, Download, Edit, Eye, EyeOff, Filter, Heart, Home, Lock, Mail, MapPin, Menu, Minus, Phone, Plus, Search, Settings, Share, Star, Trash2, Unlock, Upload, User, X, type LucideProps, } from "lucide-react";
3
2
  export { Icon } from "./Icon";
4
3
  export type { IconProps } from "./Icon";
5
- export { Search } from "./Search";
6
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,UAAU,EACV,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,WAAW,EACX,WAAW,EACX,YAAY,EACZ,SAAS,EACT,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,GAAG,EACH,MAAM,EACN,MAAM,EACN,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,MAAM,EACN,IAAI,EACJ,KAAK,EACL,KAAK,EACL,IAAI,EACJ,MAAM,EACN,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,MAAM,EACN,MAAM,EACN,MAAM,EACN,IAAI,EACJ,CAAC,EACD,KAAK,WAAW,GACjB,MAAM,cAAc,CAAC;AAGtB,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC"}
package/dist/index.css CHANGED
@@ -1 +1,3 @@
1
- :root{--ews-primary:#2563eb;--ews-primary-hover:#1d4ed8;--ews-primary-light:#dbeafe;--ews-secondary:#64748b;--ews-secondary-hover:#475569;--ews-success:#059669;--ews-success-hover:#047857;--ews-warning:#d97706;--ews-warning-hover:#b45309;--ews-error:#dc2626;--ews-error-hover:#b91c1c;--ews-white:#fff;--ews-gray-50:#f8fafc;--ews-gray-100:#f1f5f9;--ews-gray-200:#e2e8f0;--ews-gray-300:#cbd5e1;--ews-gray-400:#94a3b8;--ews-gray-500:#64748b;--ews-gray-600:#475569;--ews-gray-700:#334155;--ews-gray-800:#1e293b;--ews-gray-900:#0f172a;--ews-space-1:0.25rem;--ews-space-2:0.5rem;--ews-space-3:0.75rem;--ews-space-4:1rem;--ews-space-5:1.25rem;--ews-space-6:1.5rem;--ews-space-8:2rem;--ews-space-10:2.5rem;--ews-space-12:3rem;--ews-radius-sm:0.25rem;--ews-radius-md:0.375rem;--ews-radius-lg:0.5rem;--ews-radius-xl:0.75rem;--ews-font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;--ews-font-mono:"SF Mono","Monaco","Inconsolata","Roboto Mono","Oxygen Mono","Ubuntu Monospace","Source Code Pro","Fira Code","Droid Sans Mono","Courier New",monospace;--ews-text-xs:0.75rem;--ews-text-sm:0.875rem;--ews-text-base:1rem;--ews-text-lg:1.125rem;--ews-text-xl:1.25rem;--ews-text-2xl:1.5rem;--ews-text-3xl:1.875rem;--ews-shadow-sm:0 1px 2px 0 #0000000d;--ews-shadow-md:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--ews-shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}*{box-sizing:border-box}body{background-color:var(--ews-white);color:var(--ews-gray-900);font-family:var(--ews-font-sans);line-height:1.5}.ews-sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}
1
+ /*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */.focus\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:ring-offset-0{&:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}}.focus\:ring-offset-2{&:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}}.focus\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.disabled\:pointer-events-none{&:disabled{pointer-events:none}}.disabled\:opacity-50{&:disabled{opacity:50%}}:root{--ews-primary:#21596c;--ews-primary-hover:#1a4756;--ews-primary-light:#c0d0d4;--ews-secondary:#3ba1a1;--ews-secondary-hover:#308181;--ews-success:#059669;--ews-success-hover:#047857;--ews-warning:#d97706;--ews-warning-hover:#b45309;--ews-error:#dc2626;--ews-error-hover:#b91c1c;--ews-white:#fff;--ews-gray-50:#f8fafc;--ews-gray-100:#f1f5f9;--ews-gray-200:#e2e8f0;--ews-gray-300:#cbd5e1;--ews-gray-400:#94a3b8;--ews-gray-500:#64748b;--ews-gray-600:#475569;--ews-gray-700:#334155;--ews-gray-800:#1e293b;--ews-gray-900:#0f172a;--ews-space-1:0.25rem;--ews-space-2:0.5rem;--ews-space-3:0.75rem;--ews-space-4:1rem;--ews-space-5:1.25rem;--ews-space-6:1.5rem;--ews-space-8:2rem;--ews-space-10:2.5rem;--ews-space-12:3rem;--ews-radius-sm:0.25rem;--ews-radius-md:0.375rem;--ews-radius-lg:0.5rem;--ews-radius-xl:0.75rem;--ews-font-sans:-apple-system,BlinkMacSystemFont,"Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;--ews-font-mono:"SF Mono","Monaco","Inconsolata","Roboto Mono","Oxygen Mono","Ubuntu Monospace","Source Code Pro","Fira Code","Droid Sans Mono","Courier New",monospace;--ews-text-xs:0.75rem;--ews-text-sm:0.875rem;--ews-text-base:1rem;--ews-text-lg:1.125rem;--ews-text-xl:1.25rem;--ews-text-2xl:1.5rem;--ews-text-3xl:1.875rem;--ews-shadow-sm:0 1px 2px 0 #0000000d;--ews-shadow-md:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a;--ews-shadow-lg:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}*{box-sizing:border-box}body{background-color:var(--ews-white);color:var(--ews-gray-900);font-family:var(--ews-font-sans);line-height:1.5}.ews-sr-only{clip:rect(0,0,0,0);border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}
2
+
3
+ /*! tailwindcss v4.1.13 | MIT License | https://tailwindcss.com */.pointer-events-none{pointer-events:none}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.z-10{z-index:10}.z-50{z-index:50}.mx-auto{margin-inline:auto}.block{display:block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-flex{display:inline-flex}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-auto{width:auto}.w-full{width:100%}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.cursor-pointer{cursor:pointer}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.overflow-auto{overflow:auto}.rounded-full{border-radius:calc(infinity * 1px)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-2{border-bottom-style:var(--tw-border-style);border-bottom-width:2px}.border-l-4{border-left-style:var(--tw-border-style);border-left-width:4px}.bg-transparent{background-color:initial}.object-contain{object-fit:contain}.object-cover{object-fit:cover}.text-center{text-align:center}.text-left{text-align:left}.opacity-25{opacity:25%}.opacity-75{opacity:75%}.transition-all{transition-duration:var(--tw-duration,0s);transition-property:all;transition-timing-function:var(--tw-ease,ease)}.transition-colors{transition-duration:var(--tw-duration,0s);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,ease)}.duration-200{--tw-duration:200ms;transition-duration:.2s}.focus\:ring-2{&:focus{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}}.focus\:ring-offset-0{&:focus{--tw-ring-offset-width:0px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}}.focus\:ring-offset-2{&:focus{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}}.focus\:outline-none{&:focus{--tw-outline-style:none;outline-style:none}}.disabled\:pointer-events-none{&:disabled{pointer-events:none}}.disabled\:opacity-50{&:disabled{opacity:50%}}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@layer properties{@supports ((-webkit-hyphens:none) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-border-style:solid;--tw-duration:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,7 @@
1
1
  import React from 'react';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import { LucideIcon, LucideProps } from 'lucide-react';
4
+ export { ArrowRight, Check, Search } from 'lucide-react';
2
5
  import { ClassValue } from 'clsx';
3
6
 
4
7
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
@@ -62,26 +65,181 @@ interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "
62
65
  * Whether the input should take full width
63
66
  */
64
67
  fullWidth?: boolean;
68
+ /**
69
+ * Whether to show password toggle for password inputs
70
+ */
71
+ showPasswordToggle?: boolean;
65
72
  }
66
73
  declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
67
74
 
68
- interface IconProps extends React.SVGProps<SVGSVGElement> {
75
+ interface SearchableEntity {
76
+ id: string;
77
+ [key: string]: string | number | boolean | undefined;
78
+ }
79
+ interface SearchAutocompleteProps<T extends SearchableEntity> {
80
+ onSelect: (id: string) => void;
81
+ selectedId: string;
82
+ searchFunction: (keyword: string) => Promise<T[]>;
83
+ getEntityById?: (id: string) => Promise<T | undefined>;
84
+ getDisplayValue: (entity: T) => string;
85
+ getSecondaryText?: (entity: T) => string | null;
86
+ placeholder: string;
87
+ icon?: LucideIcon;
88
+ disabled?: boolean;
89
+ minSearchLength?: number;
90
+ debounceTime?: number;
91
+ error?: string;
92
+ }
93
+ declare function SearchAutocomplete<T extends SearchableEntity>({ onSelect, selectedId, searchFunction, getEntityById, getDisplayValue, getSecondaryText, placeholder, icon, disabled, minSearchLength, debounceTime, error, }: SearchAutocompleteProps<T>): react_jsx_runtime.JSX.Element;
94
+
95
+ interface MultiSearchAutocompleteProps<T extends SearchableEntity> {
96
+ items: T[];
97
+ selectedItems: T[];
98
+ onSelectionChange: (items: T[]) => void;
99
+ onSearch: (searchTerm: string) => Promise<void>;
100
+ getEntityById?: (id: string) => Promise<T | undefined>;
101
+ getPrimaryText: (entity: T) => string;
102
+ getSecondaryText?: (entity: T) => string | null;
103
+ placeholder: string;
104
+ disabled?: boolean;
105
+ loading?: boolean;
106
+ multiple?: boolean;
107
+ className?: string;
108
+ renderSelectedItem?: (entity: T) => React.ReactNode;
109
+ renderListItem?: (entity: T, isSelected: boolean) => React.ReactNode;
110
+ keepOpenOnSelect?: boolean;
111
+ error?: string;
112
+ minSearchLength?: number;
113
+ debounceTime?: number;
114
+ }
115
+ declare function MultiSearchAutocomplete<T extends SearchableEntity>({ items, selectedItems, onSelectionChange, onSearch, getEntityById, getPrimaryText, getSecondaryText, placeholder, disabled, loading, multiple, className, renderSelectedItem, renderListItem, keepOpenOnSelect, error, minSearchLength, debounceTime, }: MultiSearchAutocompleteProps<T>): react_jsx_runtime.JSX.Element;
116
+
117
+ interface ErrorField {
118
+ name: string;
119
+ message: string;
120
+ path: string;
121
+ }
122
+ interface ErrorObject {
123
+ code: string;
124
+ message: string;
125
+ fields: ErrorField[];
126
+ }
127
+ interface ModalProps {
69
128
  /**
70
- * Icon size
129
+ * Whether the modal is open
71
130
  */
72
- size?: "sm" | "md" | "lg" | "xl";
131
+ isOpen: boolean;
132
+ /**
133
+ * Function to call when modal should be closed
134
+ */
135
+ onClose: () => void;
136
+ /**
137
+ * Modal title
138
+ */
139
+ title: string;
140
+ /**
141
+ * Modal content/description
142
+ */
143
+ children: React.ReactNode;
144
+ /**
145
+ * Modal variant
146
+ */
147
+ variant?: "error" | "warning" | "confirmation" | "info";
148
+ /**
149
+ * Primary action button text
150
+ */
151
+ primaryAction?: string;
152
+ /**
153
+ * Secondary action button text
154
+ */
155
+ secondaryAction?: string;
156
+ /**
157
+ * Function to call when primary action is clicked
158
+ */
159
+ onPrimaryAction?: () => void;
160
+ /**
161
+ * Function to call when secondary action is clicked
162
+ */
163
+ onSecondaryAction?: () => void;
164
+ /**
165
+ * Whether the primary action button is loading
166
+ */
167
+ isLoading?: boolean;
168
+ /**
169
+ * Whether the modal can be closed by clicking outside or pressing escape
170
+ */
171
+ closeOnOverlayClick?: boolean;
73
172
  /**
74
- * Icon color
173
+ * Custom className for the modal
75
174
  */
76
- color?: string;
175
+ className?: string;
176
+ /**
177
+ * Custom className for the content
178
+ */
179
+ contentClassName?: string;
180
+ /**
181
+ * Error object for error modals
182
+ */
183
+ error?: ErrorObject;
77
184
  }
78
- declare const Icon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
185
+ declare const Modal: ({ isOpen, onClose, title, children, variant, primaryAction, secondaryAction, onPrimaryAction, onSecondaryAction, isLoading, closeOnOverlayClick, className, contentClassName, error, }: ModalProps) => react_jsx_runtime.JSX.Element | null;
79
186
 
80
- declare const ArrowRight: React.FC<Omit<IconProps, "children">>;
187
+ interface LogoProps {
188
+ /**
189
+ * Logo size
190
+ */
191
+ size?: "sm" | "md" | "lg" | "xl";
192
+ /**
193
+ * Whether to show the tagline
194
+ */
195
+ showTagline?: boolean;
196
+ /**
197
+ * Whether to show only the icon (favicon version)
198
+ */
199
+ iconOnly?: boolean;
200
+ /**
201
+ * Logo variant - normal, white, or favicon
202
+ */
203
+ variant?: "normal" | "white" | "favicon";
204
+ /**
205
+ * Custom className
206
+ */
207
+ className?: string;
208
+ /**
209
+ * Click handler
210
+ */
211
+ onClick?: () => void;
212
+ }
213
+ declare const Logo: ({ size, showTagline, iconOnly, variant, className, onClick, }: LogoProps) => react_jsx_runtime.JSX.Element;
81
214
 
82
- declare const Check: React.FC<Omit<IconProps, "children">>;
215
+ interface Specialty {
216
+ id: string;
217
+ code: string;
218
+ label: string;
219
+ [key: string]: string | number | boolean | undefined;
220
+ }
221
+ interface SpecialtySearchAutocompleteProps {
222
+ selectedSpecialties: Specialty[];
223
+ onSpecialtiesChange: (specialties: Specialty[]) => void;
224
+ placeholder?: string;
225
+ className?: string;
226
+ disabled?: boolean;
227
+ maxSelections?: number;
228
+ showSelectedCount?: boolean;
229
+ }
230
+ declare const SpecialtySearchAutocomplete: React.FC<SpecialtySearchAutocompleteProps>;
83
231
 
84
- declare const Search: React.FC<Omit<IconProps, "children">>;
232
+ interface IconProps extends Omit<LucideProps, "size"> {
233
+ /**
234
+ * Icon size
235
+ */
236
+ size?: "sm" | "md" | "lg" | "xl" | number;
237
+ /**
238
+ * The Lucide icon component to render
239
+ */
240
+ icon: React.ComponentType<LucideProps>;
241
+ }
242
+ declare const Icon: React.ForwardRefExoticComponent<Omit<IconProps, "ref"> & React.RefAttributes<SVGSVGElement>>;
85
243
 
86
244
  /**
87
245
  * Utility function to merge class names
@@ -92,7 +250,7 @@ declare function cn(...inputs: ClassValue[]): string;
92
250
  /**
93
251
  * Utility function to format currency
94
252
  * @param amount - Amount to format
95
- * @param currency - Currency code (default: 'USD')
253
+ * @param currency - Currency code (default: CURRENCY constant)
96
254
  * @returns Formatted currency string
97
255
  */
98
256
  declare function formatCurrency(amount: number, currency?: string): string;
@@ -117,5 +275,20 @@ declare function debounce<T extends (...args: any[]) => any>(func: T, wait: numb
117
275
  */
118
276
  declare function generateId(prefix?: string): string;
119
277
 
120
- export { ArrowRight, Button, Check, Icon, Input, Search, cn, debounce, formatCurrency, formatDate, generateId };
121
- export type { ButtonProps, IconProps, InputProps };
278
+ /**
279
+ * A custom hook that debounces a value
280
+ * @param value - The value to debounce
281
+ * @param delay - The delay in milliseconds (optional, defaults to 300ms)
282
+ * @returns The debounced value
283
+ */
284
+ declare function useDebounce<T>(value: T, delay?: number): T;
285
+ /**
286
+ * A custom hook that provides a debounced callback function
287
+ * @param callback - The function to debounce
288
+ * @param delay - The delay in milliseconds (optional, defaults to 300ms)
289
+ * @returns A debounced version of the callback
290
+ */
291
+ declare function useDebouncedCallback<T extends (...args: unknown[]) => unknown>(callback: T, delay?: number): T;
292
+
293
+ export { Button, Icon, Input, Logo, Modal, MultiSearchAutocomplete, SearchAutocomplete, SpecialtySearchAutocomplete, cn, debounce, formatCurrency, formatDate, generateId, useDebounce, useDebouncedCallback };
294
+ export type { ButtonProps, ErrorField, ErrorObject, IconProps, InputProps, LogoProps, ModalProps, SearchableEntity, Specialty, SpecialtySearchAutocompleteProps };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG/E,OAAO,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAErD,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,YAAY,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAExE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,YAAY,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAE9E,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,gCAAgC,EAAE,MAAM,aAAa,CAAC;AAG/E,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAC1D,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,cAAc,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAG/E,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAG5D,OAAO,oBAAoB,CAAC;AAC5B,OAAO,uBAAuB,CAAC"}