botech-library 1.0.4 → 1.0.17

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.
@@ -0,0 +1,4 @@
1
+ import { MultiSelectorProps, SelectableItem } from './types';
2
+ declare const MultiSelector: <T extends SelectableItem>({ items, selectedItems, onSelectionChange, placeholder, searchPlaceholder, className, disabled, searchBy, caseSensitive, exactMatch, maxSelectedDisplay, renderItem, renderSelectedItem, renderSelectedBadge }: MultiSelectorProps<T>) => import("react/jsx-runtime").JSX.Element;
3
+ export default MultiSelector;
4
+ //# sourceMappingURL=MultiSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MultiSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/Selector/MultiSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE7D,QAAA,MAAM,aAAa,GAAI,CAAC,SAAS,cAAc,EAAE,gNAe9C,kBAAkB,CAAC,CAAC,CAAC,4CAwQvB,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -0,0 +1 @@
1
+ //# sourceMappingURL=SearchTest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SearchTest.d.ts","sourceRoot":"","sources":["../../../../src/components/Selector/SearchTest.tsx"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ declare const SelectorExample: React.FC;
3
+ export default SelectorExample;
4
+ //# sourceMappingURL=SelectorExample.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectorExample.d.ts","sourceRoot":"","sources":["../../../../src/components/Selector/SelectorExample.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAqCxC,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAqK5B,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { SingleSelectorProps, SelectableItem } from './types';
2
+ declare const SingleSelector: <T extends SelectableItem>({ items, selectedItem, onSelectionChange, placeholder, searchPlaceholder, className, disabled, searchBy, caseSensitive, exactMatch, renderItem, renderSelectedItem }: SingleSelectorProps<T>) => import("react/jsx-runtime").JSX.Element;
3
+ export default SingleSelector;
4
+ //# sourceMappingURL=SingleSelector.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SingleSelector.d.ts","sourceRoot":"","sources":["../../../../src/components/Selector/SingleSelector.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9D,QAAA,MAAM,cAAc,GAAI,CAAC,SAAS,cAAc,EAAE,sKAa/C,mBAAmB,CAAC,CAAC,CAAC,4CAmMxB,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { default as SingleSelector } from './SingleSelector';
2
+ export { default as MultiSelector } from './MultiSelector';
3
+ export type { SelectableItem, SingleSelectorProps, MultiSelectorProps } from './types';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Selector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,YAAY,EACR,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EACrB,MAAM,SAAS,CAAC"}
@@ -0,0 +1,36 @@
1
+ export interface SelectableItem {
2
+ id: string;
3
+ name: string;
4
+ [key: string]: any;
5
+ }
6
+ export interface SingleSelectorProps<T extends SelectableItem> {
7
+ items: T[];
8
+ selectedItem?: T | null;
9
+ onSelectionChange: (item: T | null) => void;
10
+ placeholder?: string;
11
+ searchPlaceholder?: string;
12
+ className?: string;
13
+ disabled?: boolean;
14
+ searchBy?: 'name' | 'id' | 'both';
15
+ caseSensitive?: boolean;
16
+ exactMatch?: boolean;
17
+ renderItem?: (item: T) => React.ReactNode;
18
+ renderSelectedItem?: (item: T) => React.ReactNode;
19
+ }
20
+ export interface MultiSelectorProps<T extends SelectableItem> {
21
+ items: T[];
22
+ selectedItems: T[];
23
+ onSelectionChange: (items: T[]) => void;
24
+ placeholder?: string;
25
+ searchPlaceholder?: string;
26
+ className?: string;
27
+ disabled?: boolean;
28
+ searchBy?: 'name' | 'id' | 'both';
29
+ caseSensitive?: boolean;
30
+ exactMatch?: boolean;
31
+ maxSelectedDisplay?: number;
32
+ renderItem?: (item: T) => React.ReactNode;
33
+ renderSelectedItem?: (item: T) => React.ReactNode;
34
+ renderSelectedBadge?: (item: T, onRemove: () => void) => React.ReactNode;
35
+ }
36
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/components/Selector/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACtB;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,SAAS,cAAc;IACzD,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACxB,iBAAiB,EAAE,CAAC,IAAI,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAC1C,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;CACrD;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC,SAAS,cAAc;IACxD,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,aAAa,EAAE,CAAC,EAAE,CAAC;IACnB,iBAAiB,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,IAAI,CAAC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAAC;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAC1C,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAClD,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,QAAQ,EAAE,MAAM,IAAI,KAAK,KAAK,CAAC,SAAS,CAAC;CAC5E"}
@@ -8,6 +8,8 @@ export { Sidebar } from './Sidebar';
8
8
  export type { SidebarProps, MenuItem, MenuFolder, MenuItemWithFolders } from './Sidebar/types';
9
9
  export { DownloadStudentsExcelButton, UploadStudentsExcelButton } from './StudentExcel';
10
10
  export type { DownloadStudentsExcelButtonProps, UploadStudentsExcelButtonProps } from './StudentExcel';
11
+ export { SingleSelector, MultiSelector } from './Selector';
12
+ export type { SelectableItem, SingleSelectorProps, MultiSelectorProps } from './Selector';
11
13
  export { GenericTable } from './Table';
12
14
  export type { TableProps, TableColumn, TableColumnAlignment, TableSize, TableRowVariant } from './Table';
13
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EACR,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,mBAAmB,EACtB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACH,2BAA2B,EAC3B,yBAAyB,EAC5B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACR,gCAAgC,EAChC,8BAA8B,EACjC,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,YAAY,EACR,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,eAAe,EAClB,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC5D,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAG3D,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,YAAY,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAGlD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,YAAY,EACR,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,mBAAmB,EACtB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACH,2BAA2B,EAC3B,yBAAyB,EAC5B,MAAM,gBAAgB,CAAC;AACxB,YAAY,EACR,gCAAgC,EAChC,8BAA8B,EACjC,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3D,YAAY,EACR,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EACrB,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,YAAY,EACR,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,SAAS,EACT,eAAe,EAClB,MAAM,SAAS,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "botech-library",
3
- "version": "1.0.4",
3
+ "version": "1.0.17",
4
4
  "type": "module",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -51,9 +51,11 @@
51
51
  "typescript": "^5.2.2"
52
52
  },
53
53
  "dependencies": {
54
+ "@headlessui/react": "^2.2.7",
54
55
  "framer-motion": "^12.18.1",
55
56
  "react-icons": "^5.5.0",
56
57
  "sweetalert2": ">=11.0.0",
58
+ "use-debounce": "^10.0.5",
57
59
  "yalc": "^1.0.0-pre.53"
58
60
  }
59
61
  }