react-restyle-components 0.4.12 → 0.4.14
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/AccordionSection/elements.js +71 -20
- 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 +12 -7
- 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/ModalDocxContent/gemini.service.d.ts +4 -0
- package/lib/src/core-components/src/components/Modal/ModalDocxContent/gemini.service.d.ts.map +1 -0
- package/lib/src/core-components/src/components/Modal/ModalDocxContent/gemini.service.js +70 -0
- package/lib/src/core-components/src/components/Modal/ModalDocxContent/modal-docx-content.component.d.ts +43 -0
- package/lib/src/core-components/src/components/Modal/ModalDocxContent/modal-docx-content.component.d.ts.map +1 -0
- package/lib/src/core-components/src/components/Modal/ModalDocxContent/modal-docx-content.component.js +841 -0
- package/lib/src/core-components/src/components/Modal/index.d.ts +1 -0
- package/lib/src/core-components/src/components/Modal/index.d.ts.map +1 -1
- package/lib/src/core-components/src/components/Modal/index.js +1 -0
- 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 +4 -2
- package/lib/src/core-components/src/tc.module.css +2 -2
- package/lib/src/core-components/src/utils/index.d.ts +1 -0
- package/lib/src/core-components/src/utils/index.d.ts.map +1 -1
- package/lib/src/core-components/src/utils/index.js +1 -0
- package/lib/src/core-components/src/utils/jodit-editor-config.util.d.ts +189 -0
- package/lib/src/core-components/src/utils/jodit-editor-config.util.d.ts.map +1 -0
- package/lib/src/core-components/src/utils/jodit-editor-config.util.js +333 -0
- package/package.json +3 -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;
|
|
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;YAkBpD,CAAC;AAEF,eAAO,MAAM,uBAAuB;cACxB,gBAAgB,GAAG,QAAQ,GAAG,WAAW;aAC1C,OAAO;YAoBjB,CAAC;AAEF,eAAO,MAAM,aAAa;;;YAiDzB,CAAC;AAEF,eAAO,MAAM,oBAAoB,6NAchC,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;YAelC,CAAC;AAmBF,eAAO,MAAM,8BAA8B;aAChC,OAAO;yBACK,MAAM;+BACA,MAAM;YAqBlC,CAAC;AAEF,eAAO,MAAM,uBAAuB,iQAWnC,CAAC;AAEF,eAAO,MAAM,qBAAqB;;YAejC,CAAC;AAEF,eAAO,MAAM,gBAAgB;;mBAI5B,CAAC;AAEF,eAAO,MAAM,YAAY;iBACV,OAAO;oKAWrB,CAAC"}
|
|
@@ -10,13 +10,16 @@ const Divider = styled.hr `
|
|
|
10
10
|
`;
|
|
11
11
|
export const AccordionElement = styled.div `
|
|
12
12
|
display: flex;
|
|
13
|
-
justify-content:
|
|
14
|
-
align-items:
|
|
13
|
+
justify-content: flex-start;
|
|
14
|
+
align-items: stretch;
|
|
15
15
|
flex-direction: column;
|
|
16
|
+
gap: ${tokens.spacing050};
|
|
16
17
|
${({ $variant }) => $variant === 'inline' &&
|
|
17
18
|
css `
|
|
18
19
|
border: 1px solid ${tokens.outline};
|
|
19
20
|
border-radius: ${tokens.borderRadius100};
|
|
21
|
+
padding: ${tokens.spacing100};
|
|
22
|
+
background: ${tokens.surface || '#ffffff'};
|
|
20
23
|
`};
|
|
21
24
|
overflow: hidden;
|
|
22
25
|
width: 100%;
|
|
@@ -26,8 +29,16 @@ export const AccordionSectionWrapper = styled.div `
|
|
|
26
29
|
overflow: hidden;
|
|
27
30
|
width: 100%;
|
|
28
31
|
isolation: isolate;
|
|
29
|
-
|
|
32
|
+
transition: all 0.3s ease;
|
|
33
|
+
|
|
34
|
+
${({ $variant, $isOpen }) => $variant === 'inline' &&
|
|
30
35
|
css `
|
|
36
|
+
border-radius: ${tokens.borderRadius100};
|
|
37
|
+
margin-bottom: ${$isOpen ? tokens.spacing100 : '0'};
|
|
38
|
+
box-shadow: ${$isOpen
|
|
39
|
+
? '0 4px 12px rgba(0, 0, 0, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1)'
|
|
40
|
+
: 'none'};
|
|
41
|
+
|
|
31
42
|
&:last-child ${AccordionDivider} {
|
|
32
43
|
display: none;
|
|
33
44
|
}
|
|
@@ -42,32 +53,44 @@ export const ButtonElement = styled.button `
|
|
|
42
53
|
cursor: pointer;
|
|
43
54
|
width: 100%;
|
|
44
55
|
|
|
45
|
-
background
|
|
56
|
+
background: ${({ $isOpen }) => $isOpen
|
|
57
|
+
? `linear-gradient(135deg, ${tokens.darkGray || '#4a4a4a'} 0%, #3a3a3a 100%)`
|
|
58
|
+
: tokens.darkGray || '#4a4a4a'} !important;
|
|
46
59
|
color: ${tokens.white || '#ffffff'} !important;
|
|
47
60
|
|
|
48
61
|
display: flex;
|
|
49
62
|
gap: ${tokens.spacing100};
|
|
50
63
|
align-items: center;
|
|
51
|
-
padding
|
|
52
|
-
padding-right: ${tokens.spacing200};
|
|
53
|
-
padding-bottom: ${tokens.spacing200};
|
|
54
|
-
padding-left: ${tokens.spacing200};
|
|
64
|
+
padding: ${tokens.spacing200} ${tokens.spacing200};
|
|
55
65
|
|
|
56
|
-
|
|
66
|
+
transition: all 0.25s ease;
|
|
67
|
+
|
|
68
|
+
${({ $variant, $isOpen }) => $variant === 'inline' &&
|
|
57
69
|
css `
|
|
58
|
-
border-radius: ${
|
|
70
|
+
border-radius: ${$isOpen
|
|
71
|
+
? `${tokens.borderRadius100} ${tokens.borderRadius100} 0 0`
|
|
72
|
+
: tokens.borderRadius100};
|
|
59
73
|
`}
|
|
60
74
|
|
|
61
|
-
&:hover:not(:disabled)
|
|
62
|
-
|
|
75
|
+
&:hover:not(:disabled) {
|
|
76
|
+
background: linear-gradient(135deg, #555555 0%, #3f3f3f 100%) !important;
|
|
77
|
+
|
|
78
|
+
${StateLayer} {
|
|
79
|
+
opacity: ${tokens.stateLayerHover};
|
|
80
|
+
}
|
|
63
81
|
}
|
|
64
82
|
|
|
65
83
|
&:active:not(:disabled) ${StateLayer} {
|
|
66
84
|
opacity: ${tokens.stateLayerPress};
|
|
67
85
|
}
|
|
86
|
+
|
|
87
|
+
&:focus-visible {
|
|
88
|
+
outline: 2px solid ${tokens.primary || '#454cbf'};
|
|
89
|
+
outline-offset: 2px;
|
|
90
|
+
}
|
|
68
91
|
`;
|
|
69
92
|
export const AccordionSectionText = styled.div `
|
|
70
|
-
line-height: 1.
|
|
93
|
+
line-height: 1.4;
|
|
71
94
|
flex-grow: 1;
|
|
72
95
|
padding-right: ${tokens.spacing100};
|
|
73
96
|
position: relative;
|
|
@@ -76,14 +99,25 @@ export const AccordionSectionText = styled.div `
|
|
|
76
99
|
flex-direction: column;
|
|
77
100
|
gap: ${tokens.spacing050};
|
|
78
101
|
color: ${tokens.white};
|
|
102
|
+
|
|
103
|
+
/* Better text rendering */
|
|
104
|
+
-webkit-font-smoothing: antialiased;
|
|
105
|
+
-moz-osx-font-smoothing: grayscale;
|
|
79
106
|
`;
|
|
80
107
|
export const AccordionFade = styled.div `
|
|
81
108
|
z-index: 0;
|
|
82
109
|
position: relative;
|
|
83
|
-
background: linear-gradient(
|
|
110
|
+
background: linear-gradient(
|
|
111
|
+
to bottom,
|
|
112
|
+
transparent,
|
|
113
|
+
${tokens.surface || '#ffffff'}
|
|
114
|
+
);
|
|
84
115
|
width: 100%;
|
|
85
|
-
height: ${tokens.
|
|
86
|
-
margin-top: calc(${tokens.
|
|
116
|
+
height: ${tokens.spacing200};
|
|
117
|
+
margin-top: calc(${tokens.spacing200} * -1);
|
|
118
|
+
opacity: ${({ $isOpen }) => ($isOpen ? 1 : 0)};
|
|
119
|
+
transition: opacity ${({ $transitionDuration }) => $transitionDuration} ease;
|
|
120
|
+
pointer-events: none;
|
|
87
121
|
`;
|
|
88
122
|
const getTransitionTimingFunction = (transitionTimingFunction, isOpen) => {
|
|
89
123
|
if (transitionTimingFunction !== 'ease-in' &&
|
|
@@ -101,13 +135,23 @@ export const AccordionSectionContentWrapper = styled.div `
|
|
|
101
135
|
display: grid;
|
|
102
136
|
grid-template-rows: ${({ $isOpen }) => ($isOpen ? '1fr' : '0fr')};
|
|
103
137
|
transition: ${({ $transitionDuration, $transitionTimingFunction, $isOpen }) => `grid-template-rows ${$transitionDuration} ${getTransitionTimingFunction($transitionTimingFunction, $isOpen)}`};
|
|
138
|
+
background: ${({ $isOpen }) => $isOpen
|
|
139
|
+
? `linear-gradient(180deg, rgba(74, 74, 74, 0.05) 0%, transparent 100%)`
|
|
140
|
+
: 'transparent'};
|
|
141
|
+
border-left: ${({ $isOpen }) => $isOpen
|
|
142
|
+
? `3px solid ${tokens.primary || '#454cbf'}`
|
|
143
|
+
: '3px solid transparent'};
|
|
144
|
+
margin-left: ${({ $isOpen }) => ($isOpen ? tokens.spacing100 : '0')};
|
|
145
|
+
transition: all 0.3s ease;
|
|
104
146
|
`;
|
|
105
147
|
export const AccordionSectionContent = styled.div `
|
|
106
148
|
overflow-y: hidden;
|
|
107
|
-
transition: ${({ $transitionDuration }) => `opacity ${$transitionDuration} linear`};
|
|
108
|
-
line-height: 1.
|
|
149
|
+
transition: ${({ $transitionDuration }) => `opacity ${$transitionDuration} linear, transform ${$transitionDuration} ease`};
|
|
150
|
+
line-height: 1.6;
|
|
109
151
|
opacity: ${({ $isOpen }) => ($isOpen ? 1 : 0)};
|
|
110
|
-
|
|
152
|
+
transform: ${({ $isOpen }) => ($isOpen ? 'translateY(0)' : 'translateY(-8px)')};
|
|
153
|
+
padding-top: ${({ $isOpen }) => ($isOpen ? tokens.spacing150 : '0')};
|
|
154
|
+
padding-right: ${tokens.spacing200};
|
|
111
155
|
padding-left: ${({ $hasLeader }) => $hasLeader ? tokens.spacing600 : tokens.spacing200};
|
|
112
156
|
`;
|
|
113
157
|
export const StyledLeadingTrailing = styled.div `
|
|
@@ -125,10 +169,17 @@ export const StyledLeadingTrailing = styled.div `
|
|
|
125
169
|
`;
|
|
126
170
|
export const AccordionDivider = styled(Divider) `
|
|
127
171
|
border-color: ${tokens.outline};
|
|
172
|
+
opacity: 0.5;
|
|
173
|
+
margin: ${tokens.spacing025} 0;
|
|
128
174
|
`;
|
|
129
175
|
export const RotatingIcon = styled(Icon.SSR) `
|
|
130
176
|
overflow: hidden;
|
|
131
177
|
flex-shrink: 0;
|
|
132
|
-
transition: transform 0.
|
|
178
|
+
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
133
179
|
transform: ${({ $rotateIcon }) => `rotate(${$rotateIcon ? -180 : 0}deg)`};
|
|
180
|
+
opacity: 0.9;
|
|
181
|
+
|
|
182
|
+
&:hover {
|
|
183
|
+
opacity: 1;
|
|
184
|
+
}
|
|
134
185
|
`;
|
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"}
|