react-restyle-components 0.4.11 → 0.4.13
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.
- package/lib/src/core-components/src/components/Accordion/AccordionSection/elements.d.ts +1 -1
- package/lib/src/core-components/src/components/Accordion/AccordionSection/elements.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.d.ts +22 -2
- package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.js +2 -2
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts +58 -1
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.js +11 -11
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.d.ts +26 -1
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.js +11 -11
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.d.ts +28 -1
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/AutoComplete/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.js +7 -5
- package/lib/src/core-components/src/components/Avatar/Avatar.d.ts +25 -1
- package/lib/src/core-components/src/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Avatar/Avatar.js +4 -4
- package/lib/src/core-components/src/components/Badge/Badge.d.ts +17 -3
- package/lib/src/core-components/src/components/Badge/Badge.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Badge/Badge.js +2 -2
- package/lib/src/core-components/src/components/Button1/button.component.d.ts +13 -2
- package/lib/src/core-components/src/components/Button1/button.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Button1/button.component.js +2 -2
- package/lib/src/core-components/src/components/Button1/buttonGroup/buttonGroup.component.d.ts +18 -4
- package/lib/src/core-components/src/components/Button1/buttonGroup/buttonGroup.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Button1/buttonGroup/buttonGroup.component.js +1 -1
- package/lib/src/core-components/src/components/Icon/Icon.d.ts +27 -12
- package/lib/src/core-components/src/components/Icon/Icon.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Icon/Icon.js +8 -8
- package/lib/src/core-components/src/components/Loader/loader.component.d.ts +38 -1
- package/lib/src/core-components/src/components/Loader/loader.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Loader/loader.component.js +50 -10
- package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.d.ts +42 -2
- package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Modal/BasicModal/modal.component.js +15 -8
- package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.d.ts +54 -2
- package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Modal/modal-confirm/modal-confirm.component.js +5 -5
- package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.d.ts +26 -4
- package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Picker/color-picker/color-picker.component.js +2 -2
- package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.d.ts +42 -1
- package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Selection/multi-select/multi-select.component.js +4 -4
- package/lib/src/core-components/src/components/Selection/single-select/single-select.component.d.ts +38 -2
- package/lib/src/core-components/src/components/Selection/single-select/single-select.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Selection/single-select/single-select.component.js +8 -6
- package/lib/src/core-components/src/components/Stepper2/stepper.component.d.ts +38 -2
- package/lib/src/core-components/src/components/Stepper2/stepper.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Stepper2/stepper.component.js +12 -7
- package/lib/src/core-components/src/components/Tabs/tabs.component.d.ts +33 -3
- package/lib/src/core-components/src/components/Tabs/tabs.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Tabs/tabs.component.js +8 -5
- package/lib/src/core-components/src/components/Tags1/Tags.component.d.ts +46 -1
- package/lib/src/core-components/src/components/Tags1/Tags.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Tags1/Tags.component.js +5 -5
- package/lib/src/core-components/src/components/Tooltip/tooltip.component.d.ts +21 -2
- package/lib/src/core-components/src/components/Tooltip/tooltip.component.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Tooltip/tooltip.component.js +2 -2
- package/lib/src/core-components/src/tc.global.css +7 -2
- package/lib/src/core-components/src/tc.module.css +2 -2
- package/package.json +1 -1
|
@@ -36,6 +36,6 @@ export declare const AccordionDivider: import("styled-components/dist/types").IS
|
|
|
36
36
|
}, never>> & string;
|
|
37
37
|
export declare const RotatingIcon: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("../../Icon/Icon").IconProps, {
|
|
38
38
|
$rotateIcon: boolean;
|
|
39
|
-
}>> & string & Omit<({ nameIcon, ...props }: import("../../Icon/Icon").IconProps) => JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
39
|
+
}>> & string & Omit<({ nameIcon, classNames, styles, ...props }: import("../../Icon/Icon").IconProps) => JSX.Element, keyof import("react").Component<any, {}, any>>;
|
|
40
40
|
export {};
|
|
41
41
|
//# sourceMappingURL=elements.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/Accordion/AccordionSection/elements.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,gBAAgB,EAA2B,MAAM,SAAS,CAAC;AAUnE,eAAO,MAAM,gBAAgB;cACjB,gBAAgB,GAAG,QAAQ,GAAG,WAAW;YAepD,CAAC;AAEF,eAAO,MAAM,uBAAuB;cACxB,gBAAgB,GAAG,QAAQ,GAAG,WAAW;aAC1C,OAAO;YAYjB,CAAC;AAEF,eAAO,MAAM,aAAa;;;YAoCzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,6NAUhC,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,aAAa;aACf,OAAO;yBACK,MAAM;+BACA,MAAM;YAQlC,CAAC;AAmBF,eAAO,MAAM,8BAA8B;aAChC,OAAO;yBACK,MAAM;+BACA,MAAM;YAWlC,CAAC;AAEF,eAAO,MAAM,uBAAuB,iQASnC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;YAejC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;mBAE5B,CAAC;AAEF,eAAO,MAAM,YAAY;iBACV,OAAO;
|
|
1
|
+
{"version":3,"file":"elements.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/Accordion/AccordionSection/elements.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAC,gBAAgB,EAA2B,MAAM,SAAS,CAAC;AAUnE,eAAO,MAAM,gBAAgB;cACjB,gBAAgB,GAAG,QAAQ,GAAG,WAAW;YAepD,CAAC;AAEF,eAAO,MAAM,uBAAuB;cACxB,gBAAgB,GAAG,QAAQ,GAAG,WAAW;aAC1C,OAAO;YAYjB,CAAC;AAEF,eAAO,MAAM,aAAa;;;YAoCzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,6NAUhC,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;IACpB,mBAAmB,EAAE,MAAM,CAAC;CAC7B,CAAC;AAEF,eAAO,MAAM,aAAa;aACf,OAAO;yBACK,MAAM;+BACA,MAAM;YAQlC,CAAC;AAmBF,eAAO,MAAM,8BAA8B;aAChC,OAAO;yBACK,MAAM;+BACA,MAAM;YAWlC,CAAC;AAEF,eAAO,MAAM,uBAAuB,iQASnC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;YAejC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;mBAE5B,CAAC;AAEF,eAAO,MAAM,YAAY;iBACV,OAAO;oKAMrB,CAAC"}
|
package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.d.ts
CHANGED
|
@@ -1,12 +1,32 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
|
+
export interface CollapsibleClassNames {
|
|
3
|
+
/** Custom className for the root container */
|
|
4
|
+
container?: string;
|
|
5
|
+
/** Custom className for the toggle button */
|
|
6
|
+
button?: string;
|
|
7
|
+
/** Custom className for the content area */
|
|
8
|
+
content?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface CollapsibleStyles {
|
|
11
|
+
/** Custom style for the root container */
|
|
12
|
+
container?: CSSProperties;
|
|
13
|
+
/** Custom style for the toggle button */
|
|
14
|
+
button?: CSSProperties;
|
|
15
|
+
/** Custom style for the content area */
|
|
16
|
+
content?: CSSProperties;
|
|
17
|
+
}
|
|
2
18
|
interface CollapsibleProps {
|
|
3
19
|
label: string;
|
|
4
20
|
labelClassName?: string;
|
|
5
21
|
className?: string;
|
|
22
|
+
/** Custom classNames for component parts */
|
|
23
|
+
classNames?: CollapsibleClassNames;
|
|
24
|
+
/** Custom inline styles for component parts */
|
|
25
|
+
styles?: CollapsibleStyles;
|
|
6
26
|
onExpand?: (label: string) => void;
|
|
7
27
|
onCollapse?: (label: string) => void;
|
|
8
28
|
children: React.ReactNode;
|
|
9
29
|
}
|
|
10
|
-
export declare const Collapsible: ({ label, labelClassName, className, onExpand, onCollapse, children, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare const Collapsible: ({ label, labelClassName, className, classNames, styles, onExpand, onCollapse, children, }: CollapsibleProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
31
|
export {};
|
|
12
32
|
//# sourceMappingURL=collapsible.component.d.ts.map
|
package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collapsible.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/Accordion/collapsible/collapsible.component.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"collapsible.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/Accordion/collapsible/collapsible.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAW,aAAa,EAAC,MAAM,OAAO,CAAC;AAIrD,MAAM,WAAW,qBAAqB;IACpC,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,4CAA4C;IAC5C,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,0CAA0C;IAC1C,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,yCAAyC;IACzC,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,wCAAwC;IACxC,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,UAAU,gBAAgB;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,qBAAqB,CAAC;IACnC,+CAA+C;IAC/C,MAAM,CAAC,EAAE,iBAAiB,CAAC;IAC3B,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AACD,eAAO,MAAM,WAAW,8FASrB,gBAAgB,4CAsDlB,CAAC"}
|
package/lib/src/core-components/src/components/Accordion/collapsible/collapsible.component.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import s from '../../../tc.module.css';
|
|
4
4
|
import { cn } from '../../../utils';
|
|
5
|
-
export const Collapsible = ({ label, labelClassName, className, onExpand, onCollapse, children, }) => {
|
|
5
|
+
export const Collapsible = ({ label, labelClassName, className, classNames = {}, styles = {}, onExpand, onCollapse, children, }) => {
|
|
6
6
|
const [open, setOPen] = useState(false);
|
|
7
7
|
const toggle = () => {
|
|
8
8
|
if (open) {
|
|
@@ -13,5 +13,5 @@ export const Collapsible = ({ label, labelClassName, className, onExpand, onColl
|
|
|
13
13
|
}
|
|
14
14
|
setOPen(!open);
|
|
15
15
|
};
|
|
16
|
-
return (_jsxs("div", { className: cn(s.flx, s['flx-col'], s['w-full']), children: [_jsx("button", { className: cn(s.flx, s['items-center'], s['w-full'], s['p-1'], s['my-1'], s['text-base'], s['text-left'], s['bg-gray-200'], s['border-0'], s['transition'], s['focus:outline-none'], s['rounded-sm'], s['rounded-b-none'], labelClassName), type: "button", onClick: toggle, children: label?.toUpperCase() }), open && (_jsx("div", { className: cn(s['p-2'], s['bg-gray-200'], s['-my-2'], s['mb-1'], className), children: children }))] }));
|
|
16
|
+
return (_jsxs("div", { className: cn(s.flx, s['flx-col'], s['w-full'], classNames.container), style: styles.container, children: [_jsx("button", { className: cn(s.flx, s['items-center'], s['w-full'], s['p-1'], s['my-1'], s['text-base'], s['text-left'], s['bg-gray-200'], s['border-0'], s['transition'], s['focus:outline-none'], s['rounded-sm'], s['rounded-b-none'], labelClassName, classNames.button), style: styles.button, type: "button", onClick: toggle, children: label?.toUpperCase() }), open && (_jsx("div", { className: cn(s['p-2'], s['bg-gray-200'], s['-my-2'], s['mb-1'], className, classNames.content), style: styles.content, children: children }))] }));
|
|
17
17
|
};
|
|
@@ -1,3 +1,56 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface AutoCompleteFilterMultipleSelectMultipleFieldsDisplayClassNames {
|
|
3
|
+
/** Custom className for the root container */
|
|
4
|
+
container?: string;
|
|
5
|
+
/** Custom className for the input wrapper (contains input + icon) */
|
|
6
|
+
inputWrapper?: string;
|
|
7
|
+
/** Custom className for the input field */
|
|
8
|
+
input?: string;
|
|
9
|
+
/** Custom className for the dropdown container */
|
|
10
|
+
dropdown?: string;
|
|
11
|
+
/** Custom className for the dropdown list (ul element) */
|
|
12
|
+
list?: string;
|
|
13
|
+
/** Custom className for each list item (li element) */
|
|
14
|
+
listItem?: string;
|
|
15
|
+
/** Custom className for the label wrapper */
|
|
16
|
+
label?: string;
|
|
17
|
+
/** Custom className for the checkbox */
|
|
18
|
+
checkbox?: string;
|
|
19
|
+
/** Custom className for the item text/span */
|
|
20
|
+
itemText?: string;
|
|
21
|
+
/** Custom className for the empty state container */
|
|
22
|
+
emptyState?: string;
|
|
23
|
+
/** Custom className for the empty state text */
|
|
24
|
+
emptyStateText?: string;
|
|
25
|
+
/** Custom className for the chevron icon */
|
|
26
|
+
icon?: string;
|
|
27
|
+
}
|
|
28
|
+
export interface AutoCompleteFilterMultipleSelectMultipleFieldsDisplayStyles {
|
|
29
|
+
/** Custom style for the root container */
|
|
30
|
+
container?: CSSProperties;
|
|
31
|
+
/** Custom style for the input wrapper (contains input + icon) */
|
|
32
|
+
inputWrapper?: CSSProperties;
|
|
33
|
+
/** Custom style for the input field */
|
|
34
|
+
input?: CSSProperties;
|
|
35
|
+
/** Custom style for the dropdown container */
|
|
36
|
+
dropdown?: CSSProperties;
|
|
37
|
+
/** Custom style for the dropdown list (ul element) */
|
|
38
|
+
list?: CSSProperties;
|
|
39
|
+
/** Custom style for each list item (li element) */
|
|
40
|
+
listItem?: CSSProperties;
|
|
41
|
+
/** Custom style for the label wrapper */
|
|
42
|
+
label?: CSSProperties;
|
|
43
|
+
/** Custom style for the checkbox */
|
|
44
|
+
checkbox?: CSSProperties;
|
|
45
|
+
/** Custom style for the item text/span */
|
|
46
|
+
itemText?: CSSProperties;
|
|
47
|
+
/** Custom style for the empty state container */
|
|
48
|
+
emptyState?: CSSProperties;
|
|
49
|
+
/** Custom style for the empty state text */
|
|
50
|
+
emptyStateText?: CSSProperties;
|
|
51
|
+
/** Custom style for the chevron icon wrapper */
|
|
52
|
+
icon?: CSSProperties;
|
|
53
|
+
}
|
|
1
54
|
export interface AutoCompleteFilterMultipleSelectMultipleFieldsDisplayProps {
|
|
2
55
|
uniqueField?: string;
|
|
3
56
|
isSelectedStringArray?: boolean;
|
|
@@ -8,10 +61,14 @@ export interface AutoCompleteFilterMultipleSelectMultipleFieldsDisplayProps {
|
|
|
8
61
|
disable?: boolean;
|
|
9
62
|
isUpperCase?: boolean;
|
|
10
63
|
name?: string;
|
|
64
|
+
/** Custom classNames for component parts */
|
|
65
|
+
classNames?: AutoCompleteFilterMultipleSelectMultipleFieldsDisplayClassNames;
|
|
66
|
+
/** Custom inline styles for component parts */
|
|
67
|
+
styles?: AutoCompleteFilterMultipleSelectMultipleFieldsDisplayStyles;
|
|
11
68
|
onFilter?: (value: string) => void;
|
|
12
69
|
onUpdate: (item: any) => void;
|
|
13
70
|
onSelect: (item: any) => any;
|
|
14
71
|
onBlur?: (e: any) => void;
|
|
15
72
|
}
|
|
16
|
-
export declare const AutoCompleteFilterMultipleSelectMultipleFieldsDisplay: ({ uniqueField, isSelectedStringArray, loader, placeholder, data, hasError, disable, isUpperCase, name, onFilter, onUpdate, onSelect, onBlur, }: AutoCompleteFilterMultipleSelectMultipleFieldsDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
73
|
+
export declare const AutoCompleteFilterMultipleSelectMultipleFieldsDisplay: ({ uniqueField, isSelectedStringArray, loader, placeholder, data, hasError, disable, isUpperCase, name, classNames, styles, onFilter, onUpdate, onSelect, onBlur, }: AutoCompleteFilterMultipleSelectMultipleFieldsDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
74
|
//# sourceMappingURL=auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/AutoComplete/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auto-complete-filter-multiple-select-multiple-fields-display.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/AutoComplete/auto-complete-filter-multiple-select-multiple-fields-display/auto-complete-filter-multiple-select-multiple-fields-display.component.tsx"],"names":[],"mappings":"AACA,OAAc,EAA8B,aAAa,EAAC,MAAM,OAAO,CAAC;AAMxE,MAAM,WAAW,+DAA+D;IAC9E,8CAA8C;IAC9C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qEAAqE;IACrE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uDAAuD;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qDAAqD;IACrD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gDAAgD;IAChD,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,2DAA2D;IAC1E,0CAA0C;IAC1C,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,iEAAiE;IACjE,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,uCAAuC;IACvC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,8CAA8C;IAC9C,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,sDAAsD;IACtD,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,mDAAmD;IACnD,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,yCAAyC;IACzC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,0CAA0C;IAC1C,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,iDAAiD;IACjD,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,4CAA4C;IAC5C,cAAc,CAAC,EAAE,aAAa,CAAC;IAC/B,gDAAgD;IAChD,IAAI,CAAC,EAAE,aAAa,CAAC;CACtB;AAED,MAAM,WAAW,0DAA0D;IACzE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4CAA4C;IAC5C,UAAU,CAAC,EAAE,+DAA+D,CAAC;IAC7E,+CAA+C;IAC/C,MAAM,CAAC,EAAE,2DAA2D,CAAC;IACrE,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;IAC7B,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;CAC3B;AAED,eAAO,MAAM,qDAAqD,uKAgB/D,0DAA0D,4CAoP5D,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { Icon } from '../../Icon/Icon';
|
|
|
5
5
|
import s from '../../../tc.module.css';
|
|
6
6
|
import { cn } from '../../../utils';
|
|
7
7
|
import { debounce } from '@techabl/core-utils';
|
|
8
|
-
export const AutoCompleteFilterMultipleSelectMultipleFieldsDisplay = ({ uniqueField = '_id', isSelectedStringArray = false, loader = false, placeholder = 'Search...', data, hasError = false, disable = false, isUpperCase = false, name, onFilter, onUpdate, onSelect, onBlur, }) => {
|
|
8
|
+
export const AutoCompleteFilterMultipleSelectMultipleFieldsDisplay = ({ uniqueField = '_id', isSelectedStringArray = false, loader = false, placeholder = 'Search...', data, hasError = false, disable = false, isUpperCase = false, name, classNames = {}, styles = {}, onFilter, onUpdate, onSelect, onBlur, }) => {
|
|
9
9
|
const [value, setValue] = useState('');
|
|
10
10
|
const [options, setOptions] = useState();
|
|
11
11
|
const [originalOptions, setOriginalOptions] = useState();
|
|
@@ -77,22 +77,22 @@ export const AutoCompleteFilterMultipleSelectMultipleFieldsDisplay = ({ uniqueFi
|
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
79
|
};
|
|
80
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { ref: wrapperRef, className: cn(s['w-full'], s['relative']), children: [_jsxs("div", { className: cn(s['flex'], s['items-center'], s['leading-4'], s['p-2'], s['focus:outline-none'], s['focus:ring'], s['w-full'], s['shadow-sm'], s['sm:text-base'], s['border'], s['rounded-md'], {
|
|
80
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { ref: wrapperRef, className: cn(s['w-full'], s['relative'], classNames.container), style: styles.container, children: [_jsxs("div", { className: cn(s['flex'], s['items-center'], s['leading-4'], s['p-2'], s['focus:outline-none'], s['focus:ring'], s['w-full'], s['shadow-sm'], s['sm:text-base'], s['border'], s['rounded-md'], {
|
|
81
81
|
[s['border-red']]: hasError,
|
|
82
82
|
[s['border-gray-300']]: !hasError,
|
|
83
|
-
}), children: [_jsx("input", { placeholder: placeholder, disabled: disable, name: name, value: !isListOpen
|
|
83
|
+
}, classNames.inputWrapper), style: styles.inputWrapper, children: [_jsx("input", { placeholder: placeholder, disabled: disable, name: name, value: !isListOpen
|
|
84
84
|
? data?.selected?.length > 0
|
|
85
85
|
? `${(data.selected && data.selected.length) || 0} Items`
|
|
86
86
|
: value
|
|
87
87
|
: isUpperCase
|
|
88
88
|
? value?.toUpperCase()
|
|
89
|
-
: value, className: cn(s['w-full'], s['focus:outline-none'], s['bg-none']), onKeyUp: onKeyUp, onChange: onChange, onClick: () => setIsListOpen(true), onBlur: (e) => onBlur && onBlur(e) }), isListOpen ? (_jsx(Icon, { nameIcon: "FaChevronUp", propsIcon: {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
: value, className: cn(s['w-full'], s['focus:outline-none'], s['bg-none'], classNames.input), style: styles.input, onKeyUp: onKeyUp, onChange: onChange, onClick: () => setIsListOpen(true), onBlur: (e) => onBlur && onBlur(e) }), _jsx("span", { className: classNames.icon, style: styles.icon, children: isListOpen ? (_jsx(Icon, { nameIcon: "FaChevronUp", propsIcon: {
|
|
90
|
+
size: 16,
|
|
91
|
+
} })) : (_jsx(Icon, { nameIcon: "FaChevronDown", propsIcon: {
|
|
92
|
+
color: '#000000',
|
|
93
|
+
size: 16,
|
|
94
|
+
} })) })] }), options && isListOpen ? (options?.length > 0 ? (_jsx("div", { className: cn(s['flex'], s['mt-1'], s['absolute'], s['rounded-sm'], s['bg-gray-200'], s['z-500'], s['p-2'], s['w-full'], classNames.dropdown), style: { zIndex: 80, ...styles.dropdown }, children: _jsx("ul", { className: classNames.list, style: styles.list, children: options?.map((item, index) => (_jsx("li", { className: cn(s['flex'], s['gap-2'], s['p-1'], classNames.listItem), style: styles.listItem, children: _jsxs("label", { className: cn(s['flex'], s['items-center'], classNames.label), style: styles.label, children: [_jsx("input", { id: index?.toString(), className: cn(s['flex'], s['h-4'], s['w-4'], classNames.checkbox), style: styles.checkbox, type: "checkbox", checked: item.selected, onChange: () => onSelect(item) }), ' ', _jsx("span", { className: cn(s['flex'], s['ml-2'], classNames.itemText), style: styles.itemText, children: data.displayKey
|
|
95
|
+
.map((key) => `${item[key]}
|
|
96
96
|
`)
|
|
97
|
-
|
|
97
|
+
.join(' - ') })] }) }, index))) }) })) : (_jsx("div", { className: cn(s['mt-1'], s['absolute'], s['bg-gray-200'], s['p-2'], s['rounded-sm'], classNames.emptyState), style: { zIndex: 80, width: '100%', ...styles.emptyState }, children: _jsx("span", { className: classNames.emptyStateText, style: styles.emptyStateText, children: "Not Found Result!!" }) }))) : null] }) }));
|
|
98
98
|
};
|
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface AutoCompleteFilterSingleSelectClassNames {
|
|
3
|
+
container?: string;
|
|
4
|
+
inputWrapper?: string;
|
|
5
|
+
input?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
dropdown?: string;
|
|
8
|
+
list?: string;
|
|
9
|
+
listItem?: string;
|
|
10
|
+
itemLabel?: string;
|
|
11
|
+
emptyState?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AutoCompleteFilterSingleSelectStyles {
|
|
14
|
+
container?: CSSProperties;
|
|
15
|
+
inputWrapper?: CSSProperties;
|
|
16
|
+
input?: CSSProperties;
|
|
17
|
+
icon?: CSSProperties;
|
|
18
|
+
dropdown?: CSSProperties;
|
|
19
|
+
list?: CSSProperties;
|
|
20
|
+
listItem?: CSSProperties;
|
|
21
|
+
itemLabel?: CSSProperties;
|
|
22
|
+
emptyState?: CSSProperties;
|
|
23
|
+
}
|
|
1
24
|
interface AutoCompleteFilterSingleSelectProps {
|
|
2
25
|
loader?: boolean;
|
|
3
26
|
disable?: boolean;
|
|
@@ -5,9 +28,11 @@ interface AutoCompleteFilterSingleSelectProps {
|
|
|
5
28
|
placeholder?: string;
|
|
6
29
|
data: any;
|
|
7
30
|
hasError?: boolean;
|
|
31
|
+
classNames?: AutoCompleteFilterSingleSelectClassNames;
|
|
32
|
+
styles?: AutoCompleteFilterSingleSelectStyles;
|
|
8
33
|
onFilter: (item: any) => void;
|
|
9
34
|
onSelect: (item: any) => any;
|
|
10
35
|
}
|
|
11
|
-
export declare const AutoCompleteFilterSingleSelect: ({ disable, loader, displayValue, placeholder, data, hasError, onFilter, onSelect, }: AutoCompleteFilterSingleSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
export declare const AutoCompleteFilterSingleSelect: ({ disable, loader, displayValue, placeholder, data, hasError, classNames, styles, onFilter, onSelect, }: AutoCompleteFilterSingleSelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
37
|
export {};
|
|
13
38
|
//# sourceMappingURL=auto-complete-filter-single-select.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-complete-filter-single-select.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"auto-complete-filter-single-select.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/AutoComplete/auto-complete-filter-single-select/auto-complete-filter-single-select.component.tsx"],"names":[],"mappings":"AACA,OAAc,EAA8B,aAAa,EAAC,MAAM,OAAO,CAAC;AAMxE,MAAM,WAAW,wCAAwC;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,oCAAoC;IACnD,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B;AAED,UAAU,mCAAmC;IAC3C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,wCAAwC,CAAC;IACtD,MAAM,CAAC,EAAE,oCAAoC,CAAC;IAC9C,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC9B,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;CAC9B;AAED,eAAO,MAAM,8BAA8B,4GAWxC,mCAAmC,4CA0JrC,CAAC"}
|
|
@@ -5,7 +5,7 @@ import { Icon } from '../../Icon/Icon';
|
|
|
5
5
|
import { debounce } from '@techabl/core-utils';
|
|
6
6
|
import s from '../../../tc.module.css';
|
|
7
7
|
import { cn } from '../../../utils';
|
|
8
|
-
export const AutoCompleteFilterSingleSelect = ({ disable = false, loader = false, displayValue = '', placeholder = 'Search...', data, hasError = false, onFilter, onSelect, }) => {
|
|
8
|
+
export const AutoCompleteFilterSingleSelect = ({ disable = false, loader = false, displayValue = '', placeholder = 'Search...', data, hasError = false, classNames = {}, styles = {}, onFilter, onSelect, }) => {
|
|
9
9
|
const [value, setValue] = useState(displayValue);
|
|
10
10
|
const [options, setOptions] = useState();
|
|
11
11
|
const [isListOpen, setIsListOpen] = useState(false);
|
|
@@ -40,16 +40,16 @@ export const AutoCompleteFilterSingleSelect = ({ disable = false, loader = false
|
|
|
40
40
|
onFilter(search);
|
|
41
41
|
});
|
|
42
42
|
};
|
|
43
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { ref: wrapperRef, className: cn(s['w-full'], s['relative']), children: [_jsxs("div", { className: cn(s['flex'], s['items-center'], s['leading-4'], s['p-2'], s['focus:outline-none'], s['focus:ring'], s['w-full'], s['shadow-sm'], s['sm:text-base'], s['border'], s['rounded-md'], {
|
|
43
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { ref: wrapperRef, className: cn(s['w-full'], s['relative'], classNames.container), style: styles.container, children: [_jsxs("div", { className: cn(s['flex'], s['items-center'], s['leading-4'], s['p-2'], s['focus:outline-none'], s['focus:ring'], s['w-full'], s['shadow-sm'], s['sm:text-base'], s['border'], s['rounded-md'], {
|
|
44
44
|
[s['border-red']]: hasError,
|
|
45
45
|
[s['border-gray-300']]: !hasError,
|
|
46
|
-
}), children: [_jsx("input", { placeholder: placeholder, value: !isListOpen ? value : value, className: cn(s['w-full'], s['focus:outline-none'], s['bg-none']), onChange: handleInputChange, onClick: () => setIsListOpen(true), disabled: disable }), isListOpen ? (_jsx(Icon, { nameIcon: "FaChevronUp", propsIcon: {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
46
|
+
}, classNames.inputWrapper), style: styles.inputWrapper, children: [_jsx("input", { placeholder: placeholder, value: !isListOpen ? value : value, className: cn(s['w-full'], s['focus:outline-none'], s['bg-none'], classNames.input), style: styles.input, onChange: handleInputChange, onClick: () => setIsListOpen(true), disabled: disable }), _jsx("span", { className: classNames.icon, style: styles.icon, children: isListOpen ? (_jsx(Icon, { nameIcon: "FaChevronUp", propsIcon: {
|
|
47
|
+
size: 16,
|
|
48
|
+
} })) : (_jsx(Icon, { nameIcon: "FaChevronDown", propsIcon: {
|
|
49
|
+
size: 16,
|
|
50
|
+
} })) })] }), options && isListOpen ? (options.length > 0 ? (_jsx("div", { className: cn(s['mt-1'], s['absolute'], s['bg-gray-100'], s['p-2'], s['rounded-sm'], s['z-50'], classNames.dropdown), style: { zIndex: 80, width: '100%', ...styles.dropdown }, children: _jsx("ul", { className: classNames.list, style: styles.list, children: options?.map((item, index) => (_jsx("li", { className: cn(s['text-gray-400'], s['flex'], s['items-center'], classNames.listItem), style: styles.listItem, onClick: () => {
|
|
51
|
+
setValue(item[data.displayKey]);
|
|
52
|
+
setIsListOpen(false);
|
|
53
|
+
onSelect(item);
|
|
54
|
+
}, children: _jsx("label", { className: cn(s['ml-2'], s['mt-1'], s['text-black'], classNames.itemLabel), style: styles.itemLabel, children: item[data.displayKey] }) }, index))) }) })) : (_jsx("div", { className: cn(s['mt-1'], s['absolute'], s['bg-gray-100'], s['p-2'], s['rounded-sm'], classNames.emptyState), style: { zIndex: 80, width: '100%', ...styles.emptyState }, children: _jsx("span", { children: "Not Found Result!!" }) }))) : null] }) }));
|
|
55
55
|
};
|
|
@@ -1,3 +1,28 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface AutoCompleteFilterSingleSelectMultiFieldsDisplayClassNames {
|
|
3
|
+
container?: string;
|
|
4
|
+
inputWrapper?: string;
|
|
5
|
+
input?: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
dropdown?: string;
|
|
8
|
+
list?: string;
|
|
9
|
+
listItem?: string;
|
|
10
|
+
itemLabel?: string;
|
|
11
|
+
emptyState?: string;
|
|
12
|
+
loadingContainer?: string;
|
|
13
|
+
}
|
|
14
|
+
export interface AutoCompleteFilterSingleSelectMultiFieldsDisplayStyles {
|
|
15
|
+
container?: CSSProperties;
|
|
16
|
+
inputWrapper?: CSSProperties;
|
|
17
|
+
input?: CSSProperties;
|
|
18
|
+
icon?: CSSProperties;
|
|
19
|
+
dropdown?: CSSProperties;
|
|
20
|
+
list?: CSSProperties;
|
|
21
|
+
listItem?: CSSProperties;
|
|
22
|
+
itemLabel?: CSSProperties;
|
|
23
|
+
emptyState?: CSSProperties;
|
|
24
|
+
loadingContainer?: CSSProperties;
|
|
25
|
+
}
|
|
1
26
|
interface AutoCompleteFilterSingleSelectMultiFieldsDisplayProps {
|
|
2
27
|
loader?: boolean;
|
|
3
28
|
disable?: boolean;
|
|
@@ -8,10 +33,12 @@ interface AutoCompleteFilterSingleSelectMultiFieldsDisplayProps {
|
|
|
8
33
|
className?: string;
|
|
9
34
|
posstion?: string;
|
|
10
35
|
keyboard?: string;
|
|
36
|
+
classNames?: AutoCompleteFilterSingleSelectMultiFieldsDisplayClassNames;
|
|
37
|
+
styles?: AutoCompleteFilterSingleSelectMultiFieldsDisplayStyles;
|
|
11
38
|
onFilter?: (item: any) => void;
|
|
12
39
|
onSelect?: (item: any) => any;
|
|
13
40
|
onBlur?: (item: any) => any;
|
|
14
41
|
}
|
|
15
|
-
export declare const AutoCompleteFilterSingleSelectMultiFieldsDisplay: ({ disable, loader, displayValue, placeholder, data, hasError, className, posstion, keyboard, onFilter, onSelect, onBlur, }: AutoCompleteFilterSingleSelectMultiFieldsDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
42
|
+
export declare const AutoCompleteFilterSingleSelectMultiFieldsDisplay: ({ disable, loader, displayValue, placeholder, data, hasError, className, posstion, keyboard, classNames: customClassNames, styles: customStyles, onFilter, onSelect, onBlur, }: AutoCompleteFilterSingleSelectMultiFieldsDisplayProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
43
|
export {};
|
|
17
44
|
//# sourceMappingURL=auto-complete-filter-single-select-multiple-fields-display.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto-complete-filter-single-select-multiple-fields-display.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/AutoComplete/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.tsx"],"names":[],"mappings":"AAsIA,UAAU,qDAAqD;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;CAC7B;AAED,eAAO,MAAM,gDAAgD
|
|
1
|
+
{"version":3,"file":"auto-complete-filter-single-select-multiple-fields-display.component.d.ts","sourceRoot":"","sources":["../../../../../../../src/core-components/src/components/AutoComplete/auto-complete-filter-single-select-multiple-fields-display/auto-complete-filter-single-select-multiple-fields-display.component.tsx"],"names":[],"mappings":"AAsIA,OAAO,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAEpC,MAAM,WAAW,0DAA0D;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,sDAAsD;IACrE,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,YAAY,CAAC,EAAE,aAAa,CAAC;IAC7B,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,gBAAgB,CAAC,EAAE,aAAa,CAAC;CAClC;AAED,UAAU,qDAAqD;IAC7D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,GAAG,CAAC;IACV,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,0DAA0D,CAAC;IACxE,MAAM,CAAC,EAAE,sDAAsD,CAAC;IAChE,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,GAAG,CAAC;CAC7B;AAED,eAAO,MAAM,gDAAgD,mLAe1D,qDAAqD,4CA4WvD,CAAC"}
|
|
@@ -112,7 +112,7 @@ const SkeletonItem = ({ delay = 0 }) => (_jsxs("div", { style: {
|
|
|
112
112
|
} })] }));
|
|
113
113
|
// Loading spinner component
|
|
114
114
|
const LoadingSpinner = () => (_jsx("div", { style: animationStyles.spinner, role: "status", "aria-label": "Loading" }));
|
|
115
|
-
export const AutoCompleteFilterSingleSelectMultiFieldsDisplay = ({ disable = false, loader = false, displayValue = '', placeholder = 'Search...', data, hasError = false, className, posstion = 'absolute', keyboard = 'text', onFilter, onSelect, onBlur, }) => {
|
|
115
|
+
export const AutoCompleteFilterSingleSelectMultiFieldsDisplay = ({ disable = false, loader = false, displayValue = '', placeholder = 'Search...', data, hasError = false, className, posstion = 'absolute', keyboard = 'text', classNames: customClassNames = {}, styles: customStyles = {}, onFilter, onSelect, onBlur, }) => {
|
|
116
116
|
const [value, setValue] = useState(displayValue);
|
|
117
117
|
const [options, setOptions] = useState(data.list);
|
|
118
118
|
const [isListOpen, setIsListOpen] = useState(false);
|
|
@@ -258,13 +258,14 @@ export const AutoCompleteFilterSingleSelectMultiFieldsDisplay = ({ disable = fal
|
|
|
258
258
|
}, [data.displayKey, onSelect, handleCloseDropdown]);
|
|
259
259
|
// Show loading state
|
|
260
260
|
const isLoading = loader || isFiltering;
|
|
261
|
-
return (_jsx(_Fragment, { children: _jsxs("div", { ref: wrapperRef, className: cn(s['w-full'], s['relative']), children: [_jsxs("div", { className: cn(s['flex'], s['p-2'], s['leading-4'], s['focus:outline-none'], s['focus:ring'], s['w-full'], s['shadow-sm'], s['sm:text-base'], s['border'], s['rounded-md'], s['transition-all'], s['duration-200'], {
|
|
261
|
+
return (_jsx(_Fragment, { children: _jsxs("div", { ref: wrapperRef, className: cn(s['w-full'], s['relative'], customClassNames.container), style: customStyles.container, children: [_jsxs("div", { className: cn(s['flex'], s['p-2'], s['leading-4'], s['focus:outline-none'], s['focus:ring'], s['w-full'], s['shadow-sm'], s['sm:text-base'], s['border'], s['rounded-md'], s['transition-all'], s['duration-200'], {
|
|
262
262
|
[s['border-red']]: hasError,
|
|
263
263
|
[s['border-gray-300']]: !hasError,
|
|
264
264
|
[s['dark:text-black']]: true,
|
|
265
|
-
}), style: {
|
|
265
|
+
}, customClassNames.inputWrapper), style: {
|
|
266
266
|
transition: 'border-color 200ms ease, box-shadow 200ms ease',
|
|
267
|
-
|
|
267
|
+
...customStyles.inputWrapper,
|
|
268
|
+
}, children: [_jsx("input", { ref: inputRef, placeholder: placeholder, type: keyboard, value: value, className: cn(s['w-full'], s['focus:outline-none'], s['bg-none'], s['dark:text-black'], className, customClassNames.input), style: customStyles.input, onKeyUp: onKeyUp, onChange: onChange, onClick: handleOpenDropdown, disabled: disable, onMouseDown: () => setValue(''), onBlur: (e) => onBlur && onBlur(e), onKeyDown: onKeyDown }), _jsxs("div", { style: {
|
|
268
269
|
display: 'flex',
|
|
269
270
|
alignItems: 'center',
|
|
270
271
|
gap: '8px',
|
|
@@ -273,7 +274,7 @@ export const AutoCompleteFilterSingleSelectMultiFieldsDisplay = ({ disable = fal
|
|
|
273
274
|
transform: isListOpen ? 'rotate(180deg)' : 'rotate(0deg)',
|
|
274
275
|
}, children: _jsx(Icon, { nameIcon: "FaChevronDown", propsIcon: {
|
|
275
276
|
size: 16,
|
|
276
|
-
} }) })] })] }), isListOpen && (_jsx("div", { className: cn(s['absolute'], s['w-full'], s['bg-white'], s['rounded-md'], s['shadow-lg'], s['overflow-hidden']), style: {
|
|
277
|
+
} }) })] })] }), isListOpen && (_jsx("div", { className: cn(s['absolute'], s['w-full'], s['bg-white'], s['rounded-md'], s['shadow-lg'], s['overflow-hidden'], customClassNames.dropdown), style: {
|
|
277
278
|
...animationStyles.dropdown.base,
|
|
278
279
|
...(showDropdown
|
|
279
280
|
? animationStyles.dropdown.entering
|
|
@@ -281,6 +282,7 @@ export const AutoCompleteFilterSingleSelectMultiFieldsDisplay = ({ disable = fal
|
|
|
281
282
|
zIndex: 500,
|
|
282
283
|
marginTop: '4px',
|
|
283
284
|
border: '1px solid #e5e7eb',
|
|
285
|
+
...customStyles.dropdown,
|
|
284
286
|
}, children: _jsx("div", { className: cn(s['overflow-y-auto'], s['p-1']), style: {
|
|
285
287
|
maxHeight: `${calculateMaxHeight()}px`,
|
|
286
288
|
...animationStyles.fadeContent.base,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
2
|
declare const sizeMap: {
|
|
3
3
|
readonly sm: "2rem";
|
|
4
4
|
readonly md: "2.5rem";
|
|
@@ -7,6 +7,26 @@ declare const sizeMap: {
|
|
|
7
7
|
readonly xxl: "5rem";
|
|
8
8
|
};
|
|
9
9
|
export type AvatarSize = keyof typeof sizeMap;
|
|
10
|
+
export interface AvatarClassNames {
|
|
11
|
+
/** Custom className for the container */
|
|
12
|
+
container?: string;
|
|
13
|
+
/** Custom className for the image */
|
|
14
|
+
image?: string;
|
|
15
|
+
/** Custom className for the initials text */
|
|
16
|
+
initials?: string;
|
|
17
|
+
/** Custom className for the icon wrapper */
|
|
18
|
+
iconWrapper?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface AvatarStyles {
|
|
21
|
+
/** Custom style for the container */
|
|
22
|
+
container?: CSSProperties;
|
|
23
|
+
/** Custom style for the image */
|
|
24
|
+
image?: CSSProperties;
|
|
25
|
+
/** Custom style for the initials text */
|
|
26
|
+
initials?: CSSProperties;
|
|
27
|
+
/** Custom style for the icon wrapper */
|
|
28
|
+
iconWrapper?: CSSProperties;
|
|
29
|
+
}
|
|
10
30
|
export interface AvatarProps {
|
|
11
31
|
/** Full name to extract initials from */
|
|
12
32
|
name?: string;
|
|
@@ -26,6 +46,10 @@ export interface AvatarProps {
|
|
|
26
46
|
iconName?: string;
|
|
27
47
|
/** Custom className */
|
|
28
48
|
className?: string;
|
|
49
|
+
/** Custom classNames for component parts */
|
|
50
|
+
classNames?: AvatarClassNames;
|
|
51
|
+
/** Custom inline styles for component parts */
|
|
52
|
+
styles?: AvatarStyles;
|
|
29
53
|
/** Click handler */
|
|
30
54
|
onClick?: () => void;
|
|
31
55
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Avatar/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAK3C,QAAA,MAAM,OAAO;;;;;;CAMH,CAAC;AAEX,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,OAAO,CAAC;AAE9C,MAAM,WAAW,gBAAgB;IAC/B,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,qCAAqC;IACrC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,iCAAiC;IACjC,KAAK,CAAC,EAAE,aAAa,CAAC;IACtB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,aAAa,CAAC;IACzB,wCAAwC;IACxC,WAAW,CAAC,EAAE,aAAa,CAAC;CAC7B;AAED,MAAM,WAAW,WAAW;IAC1B,yCAAyC;IACzC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,uBAAuB;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,+CAA+C;IAC/C,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,oBAAoB;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AA8JD,eAAO,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,WAAW,CAgFxC,CAAC;AAGF,eAAO,MAAM,YAAY,uCAAuC,CAAC;AAGjE,eAAe,MAAM,CAAC"}
|
|
@@ -147,7 +147,7 @@ const getContrastColor = (backgroundColor) => {
|
|
|
147
147
|
return darkColors.includes(backgroundColor) ? '#ffffff' : '#ffffff';
|
|
148
148
|
};
|
|
149
149
|
// Main Avatar component
|
|
150
|
-
export const Avatar = ({ name = '', initials, src, alt, size = 'md', backgroundColor, textColor, iconName = 'FaUser', className, onClick, }) => {
|
|
150
|
+
export const Avatar = ({ name = '', initials, src, alt, size = 'md', backgroundColor, textColor, iconName = 'FaUser', className, classNames = {}, styles = {}, onClick, }) => {
|
|
151
151
|
// Determine what to display
|
|
152
152
|
const displayInitials = initials || getInitials(name);
|
|
153
153
|
const defaultBgColor = backgroundColor ||
|
|
@@ -155,14 +155,14 @@ export const Avatar = ({ name = '', initials, src, alt, size = 'md', backgroundC
|
|
|
155
155
|
const defaultTextColor = textColor || getContrastColor(defaultBgColor);
|
|
156
156
|
// Render image if src is provided
|
|
157
157
|
if (src) {
|
|
158
|
-
return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: className, onClick: onClick, title: name || alt, children: _jsx(AvatarImage, { src: src, alt: alt || name || 'Avatar' }) }));
|
|
158
|
+
return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: `${className || ''} ${classNames.container || ''}`, style: styles.container, onClick: onClick, title: name || alt, children: _jsx(AvatarImage, { src: src, alt: alt || name || 'Avatar', className: classNames.image, style: styles.image }) }));
|
|
159
159
|
}
|
|
160
160
|
// Render initials if name or initials are provided
|
|
161
161
|
if (displayInitials) {
|
|
162
|
-
return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: className, onClick: onClick, title: name || `${displayInitials} Avatar`, children: _jsx(InitialsText, { "$size": size, children: displayInitials }) }));
|
|
162
|
+
return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: `${className || ''} ${classNames.container || ''}`, style: styles.container, onClick: onClick, title: name || `${displayInitials} Avatar`, children: _jsx(InitialsText, { "$size": size, className: classNames.initials, style: styles.initials, children: displayInitials }) }));
|
|
163
163
|
}
|
|
164
164
|
// Render icon as fallback
|
|
165
|
-
return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: className, onClick: onClick, title: "User Avatar", children: _jsx(IconWrapper, { "$size": size, children: _jsx(Icon, { nameIcon: iconName, propsIcon: {
|
|
165
|
+
return (_jsx(AvatarContainer, { "$size": size, "$backgroundColor": defaultBgColor, "$textColor": defaultTextColor, "$clickable": !!onClick, className: `${className || ''} ${classNames.container || ''}`, style: styles.container, onClick: onClick, title: "User Avatar", children: _jsx(IconWrapper, { "$size": size, className: classNames.iconWrapper, style: styles.iconWrapper, children: _jsx(Icon, { nameIcon: iconName, propsIcon: {
|
|
166
166
|
color: defaultTextColor,
|
|
167
167
|
size: '100%',
|
|
168
168
|
} }) }) }));
|
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
2
|
import { BadgeProps } from './types';
|
|
3
|
-
export
|
|
3
|
+
export interface BadgeClassNames {
|
|
4
|
+
/** Custom className for the badge container */
|
|
5
|
+
container?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface BadgeStyles {
|
|
8
|
+
/** Custom style for the badge container */
|
|
9
|
+
container?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare const Badge: React.NamedExoticComponent<Omit<BadgeProps & {
|
|
12
|
+
classNames?: BadgeClassNames | undefined;
|
|
13
|
+
styles?: BadgeStyles | undefined;
|
|
14
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
4
15
|
ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
|
|
5
16
|
}> & {
|
|
6
|
-
readonly type: React.ForwardRefExoticComponent<BadgeProps &
|
|
17
|
+
readonly type: React.ForwardRefExoticComponent<BadgeProps & {
|
|
18
|
+
classNames?: BadgeClassNames | undefined;
|
|
19
|
+
styles?: BadgeStyles | undefined;
|
|
20
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
7
21
|
} & {
|
|
8
22
|
Inline: React.MemoExoticComponent<React.ForwardRefExoticComponent<{
|
|
9
23
|
children?: React.ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,aAAa,EAAC,MAAM,OAAO,CAAC;AAE1D,OAAO,EAAC,UAAU,EAAC,MAAM,SAAS,CAAC;AAKnC,MAAM,WAAW,eAAe;IAC9B,+CAA+C;IAC/C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,2CAA2C;IAC3C,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAoDD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAEhB,CAAC"}
|
|
@@ -9,7 +9,7 @@ const BadgeContainer = styled.div `
|
|
|
9
9
|
width: min-content;
|
|
10
10
|
display: inline-block;
|
|
11
11
|
`;
|
|
12
|
-
const BadgeComponent = React.forwardRef(({ size = 'hint', overlap = 'circular', children, position = 'bottom-right', variant = 'notification', iconSrc, count, 'aria-label': ariaLabel, ...props }, ref) => {
|
|
12
|
+
const BadgeComponent = React.forwardRef(({ size = 'hint', overlap = 'circular', children, position = 'bottom-right', variant = 'notification', iconSrc, count, 'aria-label': ariaLabel, classNames = {}, styles = {}, ...props }, ref) => {
|
|
13
13
|
// Generate accessible label for the badge
|
|
14
14
|
const badgeAriaLabel = useMemo(() => {
|
|
15
15
|
if (ariaLabel)
|
|
@@ -20,7 +20,7 @@ const BadgeComponent = React.forwardRef(({ size = 'hint', overlap = 'circular',
|
|
|
20
20
|
return `${count} notifications`;
|
|
21
21
|
return undefined;
|
|
22
22
|
}, [ariaLabel, count]);
|
|
23
|
-
return (_jsxs(BadgeContainer, { ref: ref, "data-aui": "badge", ...props, children: [_jsx(InnerBadge, { position: position, size: size, overlap: overlap, variant: variant, iconSrc: iconSrc, count: count, "aria-label": badgeAriaLabel }), children] }));
|
|
23
|
+
return (_jsxs(BadgeContainer, { ref: ref, "data-aui": "badge", className: classNames.container, style: styles.container, ...props, children: [_jsx(InnerBadge, { position: position, size: size, overlap: overlap, variant: variant, iconSrc: iconSrc, count: count, "aria-label": badgeAriaLabel }), children] }));
|
|
24
24
|
});
|
|
25
25
|
BadgeComponent.displayName = 'Badge';
|
|
26
26
|
export const Badge = attachSubComponents('Badge', memo(BadgeComponent), {
|
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { CSSProperties } from 'react';
|
|
2
2
|
import { ButtonProps } from './types';
|
|
3
|
-
export
|
|
3
|
+
export interface ButtonClassNames {
|
|
4
|
+
/** Custom className for the button element */
|
|
5
|
+
button?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ButtonStyles {
|
|
8
|
+
/** Custom style for the button element */
|
|
9
|
+
button?: CSSProperties;
|
|
10
|
+
}
|
|
11
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
12
|
+
classNames?: ButtonClassNames | undefined;
|
|
13
|
+
styles?: ButtonStyles | undefined;
|
|
14
|
+
} & React.RefAttributes<HTMLButtonElement>>;
|
|
4
15
|
//# sourceMappingURL=button.component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"button.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Button1/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"button.component.d.ts","sourceRoot":"","sources":["../../../../../../src/core-components/src/components/Button1/button.component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAC,aAAa,EAAC,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAC,WAAW,EAAC,MAAM,SAAS,CAAC;AAKpC,MAAM,WAAW,gBAAgB;IAC/B,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,0CAA0C;IAC1C,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AAED,eAAO,MAAM,MAAM;;;2CAiElB,CAAC"}
|
|
@@ -3,11 +3,11 @@ import { forwardRef } from 'react';
|
|
|
3
3
|
import { Tooltip } from '../Tooltip/tooltip.component';
|
|
4
4
|
import s from '../../tc.module.css';
|
|
5
5
|
import { cn } from '../../utils';
|
|
6
|
-
export const Button = forwardRef(({ variant = 'solid', tooltip, disabled = false, type = 'button', className, children, ...args }, ref) => {
|
|
6
|
+
export const Button = forwardRef(({ variant = 'solid', tooltip, disabled = false, type = 'button', className, classNames = {}, styles = {}, children, ...args }, ref) => {
|
|
7
7
|
const buttonColorClass = variant === 'solid'
|
|
8
8
|
? cn(s['text-white'], s['bg-[#007BFF]'], s['hover:bg-[#007BFF]'], s['hover:shadow-lg'], s['text-white'])
|
|
9
9
|
: cn(s['dark:text-white'], s['text-black'], s['border'], s['border-gray-400'], s['hover:shadow-lg']);
|
|
10
|
-
const button = (_jsx("button", { ref: ref, ...args, className: cn(s['rounded-100px'], s['px-3'], s['py-1'], s['text-md'], s['pt-2'], s['pb-2'], s['font-nunitoSansRegular'], disabled ? s['opacity-50'] : s['opacity-100'], buttonColorClass, className), type: type, disabled: disabled, children: children }));
|
|
10
|
+
const button = (_jsx("button", { ref: ref, ...args, className: cn(s['rounded-100px'], s['px-3'], s['py-1'], s['text-md'], s['pt-2'], s['pb-2'], s['font-nunitoSansRegular'], disabled ? s['opacity-50'] : s['opacity-100'], buttonColorClass, className, classNames.button), style: styles.button, type: type, disabled: disabled, children: children }));
|
|
11
11
|
if (tooltip) {
|
|
12
12
|
return _jsx(Tooltip, { content: tooltip, children: button });
|
|
13
13
|
}
|