@chayns-components/person-finder 5.0.25 → 5.0.27
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/cjs/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.js +1 -5
- package/lib/cjs/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.js.map +1 -1
- package/lib/cjs/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.styles.js +2 -37
- package/lib/cjs/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.styles.js.map +1 -1
- package/lib/esm/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.js +1 -5
- package/lib/esm/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.js.map +1 -1
- package/lib/esm/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.styles.js +1 -36
- package/lib/esm/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.styles.js.map +1 -1
- package/lib/types/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.styles.d.ts +3 -6
- package/package.json +3 -3
|
@@ -7,7 +7,6 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _PersonFinderBody = require("./PersonFinderBody.styles");
|
|
9
9
|
var _PersonFinderProvider = require("../../../PersonFinderProvider");
|
|
10
|
-
var _chaynsApi = require("chayns-api");
|
|
11
10
|
var _personFinder = require("../../../../utils/personFinder");
|
|
12
11
|
var _personFinder2 = require("../../../../hooks/personFinder");
|
|
13
12
|
var _PersonFinderGroup = _interopRequireDefault(require("./person-finder-group/PersonFinderGroup"));
|
|
@@ -24,9 +23,6 @@ const PersonFinderBody = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
24
23
|
activeFilter,
|
|
25
24
|
data
|
|
26
25
|
} = (0, _PersonFinderProvider.usePersonFinder)();
|
|
27
|
-
const {
|
|
28
|
-
browser
|
|
29
|
-
} = (0, _chaynsApi.useDevice)();
|
|
30
26
|
const [isScrollTop, setIsScrollTop] = (0, _react.useState)(true);
|
|
31
27
|
const contentRef = (0, _react.useRef)(null);
|
|
32
28
|
const currentGroupName = (0, _personFinder2.useClosestElementAbove)(contentRef, 'person-finder-group-name');
|
|
@@ -63,7 +59,7 @@ const PersonFinderBody = /*#__PURE__*/(0, _react.forwardRef)(({
|
|
|
63
59
|
shouldShowShadow: !isScrollTop && !shouldRenderInline
|
|
64
60
|
}), /*#__PURE__*/_react.default.createElement(_PersonFinderBody.StyledPersonFinderBodyContent, {
|
|
65
61
|
ref: contentRef,
|
|
66
|
-
|
|
62
|
+
className: "chayns-scrollbar",
|
|
67
63
|
onScroll: handleContentScroll
|
|
68
64
|
}, content));
|
|
69
65
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonFinderBody.js","names":["_react","_interopRequireWildcard","require","_PersonFinderBody","_PersonFinderProvider","
|
|
1
|
+
{"version":3,"file":"PersonFinderBody.js","names":["_react","_interopRequireWildcard","require","_PersonFinderBody","_PersonFinderProvider","_personFinder","_personFinder2","_PersonFinderGroup","_interopRequireDefault","_PersonFinderHeader","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","PersonFinderBody","forwardRef","onAdd","filterTypes","onRemove","shouldRenderInline","ref","activeFilter","data","usePersonFinder","isScrollTop","setIsScrollTop","useState","contentRef","useRef","currentGroupName","useClosestElementAbove","shouldShowGroupNames","length","defaultGroupName","getGroupName","keys","handleContentScroll","event","target","scrollTop","content","useMemo","entries","map","key","singleData","index","count","searchString","createElement","filterKey","search","shouldShowGroupName","StyledPersonFinderBody","$shouldRenderInline","shouldShowShadow","StyledPersonFinderBodyContent","className","onScroll","displayName","_default","exports"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.tsx"],"sourcesContent":["import React, { forwardRef, UIEvent, useMemo, useRef, useState } from 'react';\nimport { StyledPersonFinderBody, StyledPersonFinderBodyContent } from './PersonFinderBody.styles';\nimport { PersonFinderFilterTypes } from '../../../../types/personFinder';\nimport { usePersonFinder } from '../../../PersonFinderProvider';\nimport { getGroupName } from '../../../../utils/personFinder';\nimport { useClosestElementAbove } from '../../../../hooks/personFinder';\nimport PersonFinderGroup from './person-finder-group/PersonFinderGroup';\nimport PersonFinderHeader from './person-finder-header/PersonFinderHeader';\n\nexport type PersonFinderBodyProps = {\n onAdd: (id: string) => void;\n onRemove: (id: string) => void;\n filterTypes?: PersonFinderFilterTypes[];\n shouldRenderInline?: boolean;\n};\n\nconst PersonFinderBody = forwardRef<HTMLDivElement, PersonFinderBodyProps>(\n ({ onAdd, filterTypes, onRemove, shouldRenderInline }, ref) => {\n const { activeFilter, data } = usePersonFinder();\n\n const [isScrollTop, setIsScrollTop] = useState(true);\n\n const contentRef = useRef<HTMLDivElement>(null);\n\n const currentGroupName = useClosestElementAbove(contentRef, 'person-finder-group-name');\n\n const shouldShowGroupNames = (activeFilter?.length ?? 0) !== 1;\n\n const defaultGroupName = getGroupName(Object.keys(data ?? {})[0] ?? '');\n\n const handleContentScroll = (event: UIEvent<HTMLDivElement>) => {\n setIsScrollTop((event.target as HTMLElement).scrollTop === 0);\n };\n\n const content = useMemo(\n () =>\n Object.entries(data ?? {}).map(([key, singleData], index) => {\n const { count, entries, searchString } = singleData;\n\n return (\n <PersonFinderGroup\n key={`person-finder-group--${key}`}\n filterKey={key as PersonFinderFilterTypes}\n onAdd={onAdd}\n onRemove={onRemove}\n entries={entries}\n count={count}\n search={searchString}\n shouldShowGroupName={shouldShowGroupNames && index !== 0}\n />\n );\n }),\n [data, onAdd, onRemove, shouldShowGroupNames],\n );\n\n return (\n <StyledPersonFinderBody ref={ref} $shouldRenderInline={shouldRenderInline}>\n <PersonFinderHeader\n currentGroupName={currentGroupName}\n defaultGroupName={defaultGroupName}\n filterTypes={filterTypes}\n shouldShowGroupNames={shouldShowGroupNames}\n shouldShowShadow={!isScrollTop && !shouldRenderInline}\n />\n <StyledPersonFinderBodyContent\n ref={contentRef}\n className=\"chayns-scrollbar\"\n onScroll={handleContentScroll}\n >\n {content}\n </StyledPersonFinderBodyContent>\n </StyledPersonFinderBody>\n );\n },\n);\n\nPersonFinderBody.displayName = 'PersonFinderBody';\n\nexport default PersonFinderBody;\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAD,OAAA;AAEA,IAAAE,qBAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,mBAAA,GAAAD,sBAAA,CAAAN,OAAA;AAA2E,SAAAM,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAb,uBAAA,YAAAA,CAAAS,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAA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AED1B,gBAAgB,CAAC6C,WAAW,GAAG,kBAAkB;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAhE,OAAA,GAEnCiB,gBAAgB","ignoreList":[]}
|
|
@@ -4,8 +4,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.StyledPersonFinderBodyContent = exports.StyledPersonFinderBody = void 0;
|
|
7
|
-
var _styledComponents =
|
|
8
|
-
function
|
|
7
|
+
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
const StyledPersonFinderBody = exports.StyledPersonFinderBody = _styledComponents.default.div`
|
|
10
10
|
display: flex;
|
|
11
11
|
flex-direction: column;
|
|
@@ -17,40 +17,5 @@ const StyledPersonFinderBodyContent = exports.StyledPersonFinderBodyContent = _s
|
|
|
17
17
|
height: 100%;
|
|
18
18
|
overflow-y: auto;
|
|
19
19
|
padding-bottom: 10px;
|
|
20
|
-
|
|
21
|
-
// Styles for custom scrollbar
|
|
22
|
-
${({
|
|
23
|
-
$browser,
|
|
24
|
-
theme
|
|
25
|
-
}) => $browser === 'firefox' ? (0, _styledComponents.css)`
|
|
26
|
-
scrollbar-color: rgba(${theme['text-rgb']}, 0.15) transparent;
|
|
27
|
-
scrollbar-width: thin;
|
|
28
|
-
` : (0, _styledComponents.css)`
|
|
29
|
-
&::-webkit-scrollbar {
|
|
30
|
-
width: 10px;
|
|
31
|
-
height: 10px;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&::-webkit-scrollbar-track {
|
|
35
|
-
background-color: transparent;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&::-webkit-scrollbar-button {
|
|
39
|
-
background-color: transparent;
|
|
40
|
-
height: 5px;
|
|
41
|
-
width: 5px;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&::-webkit-scrollbar-thumb {
|
|
45
|
-
background-color: rgba(${theme['text-rgb']}, 0.15);
|
|
46
|
-
border-radius: 20px;
|
|
47
|
-
background-clip: padding-box;
|
|
48
|
-
border: solid 3px transparent;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&::-webkit-scrollbar-corner {
|
|
52
|
-
background-color: transparent;
|
|
53
|
-
}
|
|
54
|
-
`}
|
|
55
20
|
`;
|
|
56
21
|
//# sourceMappingURL=PersonFinderBody.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonFinderBody.styles.js","names":["_styledComponents","
|
|
1
|
+
{"version":3,"file":"PersonFinderBody.styles.js","names":["_styledComponents","_interopRequireDefault","require","e","__esModule","default","StyledPersonFinderBody","exports","styled","div","$shouldRenderInline","StyledPersonFinderBodyContent"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { WithTheme } from '@chayns-components/core';\n\nexport const StyledPersonFinderBody = styled.div<{ $shouldRenderInline?: boolean }>`\n display: flex;\n flex-direction: column;\n height: ${({ $shouldRenderInline }) => ($shouldRenderInline ? 'auto' : '300px')};\n`;\n\ntype StyledPersonFinderBodyContentProps = WithTheme<unknown>;\n\nexport const StyledPersonFinderBodyContent = styled.div<StyledPersonFinderBodyContentProps>`\n height: 100%;\n overflow-y: auto;\n padding-bottom: 10px;\n`;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGhC,MAAMG,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAGE,yBAAM,CAACC,GAAsC;AACnF;AACA;AACA,cAAc,CAAC;EAAEC;AAAoB,CAAC,KAAMA,mBAAmB,GAAG,MAAM,GAAG,OAAQ;AACnF,CAAC;AAIM,MAAMC,6BAA6B,GAAAJ,OAAA,CAAAI,6BAAA,GAAGH,yBAAM,CAACC,GAAuC;AAC3F;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef, useMemo, useRef, useState } from 'react';
|
|
2
2
|
import { StyledPersonFinderBody, StyledPersonFinderBodyContent } from './PersonFinderBody.styles';
|
|
3
3
|
import { usePersonFinder } from '../../../PersonFinderProvider';
|
|
4
|
-
import { useDevice } from 'chayns-api';
|
|
5
4
|
import { getGroupName } from '../../../../utils/personFinder';
|
|
6
5
|
import { useClosestElementAbove } from '../../../../hooks/personFinder';
|
|
7
6
|
import PersonFinderGroup from './person-finder-group/PersonFinderGroup';
|
|
@@ -16,9 +15,6 @@ const PersonFinderBody = /*#__PURE__*/forwardRef(({
|
|
|
16
15
|
activeFilter,
|
|
17
16
|
data
|
|
18
17
|
} = usePersonFinder();
|
|
19
|
-
const {
|
|
20
|
-
browser
|
|
21
|
-
} = useDevice();
|
|
22
18
|
const [isScrollTop, setIsScrollTop] = useState(true);
|
|
23
19
|
const contentRef = useRef(null);
|
|
24
20
|
const currentGroupName = useClosestElementAbove(contentRef, 'person-finder-group-name');
|
|
@@ -55,7 +51,7 @@ const PersonFinderBody = /*#__PURE__*/forwardRef(({
|
|
|
55
51
|
shouldShowShadow: !isScrollTop && !shouldRenderInline
|
|
56
52
|
}), /*#__PURE__*/React.createElement(StyledPersonFinderBodyContent, {
|
|
57
53
|
ref: contentRef,
|
|
58
|
-
|
|
54
|
+
className: "chayns-scrollbar",
|
|
59
55
|
onScroll: handleContentScroll
|
|
60
56
|
}, content));
|
|
61
57
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonFinderBody.js","names":["React","forwardRef","useMemo","useRef","useState","StyledPersonFinderBody","StyledPersonFinderBodyContent","usePersonFinder","
|
|
1
|
+
{"version":3,"file":"PersonFinderBody.js","names":["React","forwardRef","useMemo","useRef","useState","StyledPersonFinderBody","StyledPersonFinderBodyContent","usePersonFinder","getGroupName","useClosestElementAbove","PersonFinderGroup","PersonFinderHeader","PersonFinderBody","onAdd","filterTypes","onRemove","shouldRenderInline","ref","activeFilter","data","isScrollTop","setIsScrollTop","contentRef","currentGroupName","shouldShowGroupNames","length","defaultGroupName","Object","keys","handleContentScroll","event","target","scrollTop","content","entries","map","key","singleData","index","count","searchString","createElement","filterKey","search","shouldShowGroupName","$shouldRenderInline","shouldShowShadow","className","onScroll","displayName"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.tsx"],"sourcesContent":["import React, { forwardRef, UIEvent, useMemo, useRef, useState } from 'react';\nimport { StyledPersonFinderBody, StyledPersonFinderBodyContent } from './PersonFinderBody.styles';\nimport { PersonFinderFilterTypes } from '../../../../types/personFinder';\nimport { usePersonFinder } from '../../../PersonFinderProvider';\nimport { getGroupName } from '../../../../utils/personFinder';\nimport { useClosestElementAbove } from '../../../../hooks/personFinder';\nimport PersonFinderGroup from './person-finder-group/PersonFinderGroup';\nimport PersonFinderHeader from './person-finder-header/PersonFinderHeader';\n\nexport type PersonFinderBodyProps = {\n onAdd: (id: string) => void;\n onRemove: (id: string) => void;\n filterTypes?: PersonFinderFilterTypes[];\n shouldRenderInline?: boolean;\n};\n\nconst PersonFinderBody = forwardRef<HTMLDivElement, PersonFinderBodyProps>(\n ({ onAdd, filterTypes, onRemove, shouldRenderInline }, ref) => {\n const { activeFilter, data } = usePersonFinder();\n\n const [isScrollTop, setIsScrollTop] = useState(true);\n\n const contentRef = useRef<HTMLDivElement>(null);\n\n const currentGroupName = useClosestElementAbove(contentRef, 'person-finder-group-name');\n\n const shouldShowGroupNames = (activeFilter?.length ?? 0) !== 1;\n\n const defaultGroupName = getGroupName(Object.keys(data ?? {})[0] ?? '');\n\n const handleContentScroll = (event: UIEvent<HTMLDivElement>) => {\n setIsScrollTop((event.target as HTMLElement).scrollTop === 0);\n };\n\n const content = useMemo(\n () =>\n Object.entries(data ?? {}).map(([key, singleData], index) => {\n const { count, entries, searchString } = singleData;\n\n return (\n <PersonFinderGroup\n key={`person-finder-group--${key}`}\n filterKey={key as PersonFinderFilterTypes}\n onAdd={onAdd}\n onRemove={onRemove}\n entries={entries}\n count={count}\n search={searchString}\n shouldShowGroupName={shouldShowGroupNames && index !== 0}\n />\n );\n }),\n [data, onAdd, onRemove, shouldShowGroupNames],\n );\n\n return (\n <StyledPersonFinderBody ref={ref} $shouldRenderInline={shouldRenderInline}>\n <PersonFinderHeader\n currentGroupName={currentGroupName}\n defaultGroupName={defaultGroupName}\n filterTypes={filterTypes}\n shouldShowGroupNames={shouldShowGroupNames}\n shouldShowShadow={!isScrollTop && !shouldRenderInline}\n />\n <StyledPersonFinderBodyContent\n ref={contentRef}\n className=\"chayns-scrollbar\"\n onScroll={handleContentScroll}\n >\n {content}\n </StyledPersonFinderBodyContent>\n </StyledPersonFinderBody>\n );\n },\n);\n\nPersonFinderBody.displayName = 'PersonFinderBody';\n\nexport default PersonFinderBody;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,UAAU,EAAWC,OAAO,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC7E,SAASC,sBAAsB,EAAEC,6BAA6B,QAAQ,2BAA2B;AAEjG,SAASC,eAAe,QAAQ,+BAA+B;AAC/D,SAASC,YAAY,QAAQ,gCAAgC;AAC7D,SAASC,sBAAsB,QAAQ,gCAAgC;AACvE,OAAOC,iBAAiB,MAAM,yCAAyC;AACvE,OAAOC,kBAAkB,MAAM,2CAA2C;AAS1E,MAAMC,gBAAgB,gBAAGX,UAAU,CAC/B,CAAC;EAAEY,KAAK;EAAEC,WAAW;EAAEC,QAAQ;EAAEC;AAAmB,CAAC,EAAEC,GAAG,KAAK;EAC3D,MAAM;IAAEC,YAAY;IAAEC;EAAK,CAAC,GAAGZ,eAAe,CAAC,CAAC;EAEhD,MAAM,CAACa,WAAW,EAAEC,cAAc,CAAC,GAAGjB,QAAQ,C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BAAmB,EAAE7B;EAAmB,gBACtEhB,KAAA,CAAAyC,aAAA,CAAC9B,kBAAkB;IACfY,gBAAgB,EAAEA,gBAAiB;IACnCG,gBAAgB,EAAEA,gBAAiB;IACnCZ,WAAW,EAAEA,WAAY;IACzBU,oBAAoB,EAAEA,oBAAqB;IAC3CsB,gBAAgB,EAAE,CAAC1B,WAAW,IAAI,CAACJ;EAAmB,CACzD,CAAC,eACFhB,KAAA,CAAAyC,aAAA,CAACnC,6BAA6B;IAC1BW,GAAG,EAAEK,UAAW;IAChByB,SAAS,EAAC,kBAAkB;IAC5BC,QAAQ,EAAEnB;EAAoB,GAE7BI,OAC0B,CACX,CAAC;AAEjC,CACJ,CAAC;AAEDrB,gBAAgB,CAACqC,WAAW,GAAG,kBAAkB;AAEjD,eAAerC,gBAAgB","ignoreList":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import styled
|
|
1
|
+
import styled from 'styled-components';
|
|
2
2
|
export const StyledPersonFinderBody = styled.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
@@ -10,40 +10,5 @@ export const StyledPersonFinderBodyContent = styled.div`
|
|
|
10
10
|
height: 100%;
|
|
11
11
|
overflow-y: auto;
|
|
12
12
|
padding-bottom: 10px;
|
|
13
|
-
|
|
14
|
-
// Styles for custom scrollbar
|
|
15
|
-
${({
|
|
16
|
-
$browser,
|
|
17
|
-
theme
|
|
18
|
-
}) => $browser === 'firefox' ? css`
|
|
19
|
-
scrollbar-color: rgba(${theme['text-rgb']}, 0.15) transparent;
|
|
20
|
-
scrollbar-width: thin;
|
|
21
|
-
` : css`
|
|
22
|
-
&::-webkit-scrollbar {
|
|
23
|
-
width: 10px;
|
|
24
|
-
height: 10px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&::-webkit-scrollbar-track {
|
|
28
|
-
background-color: transparent;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&::-webkit-scrollbar-button {
|
|
32
|
-
background-color: transparent;
|
|
33
|
-
height: 5px;
|
|
34
|
-
width: 5px;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
&::-webkit-scrollbar-thumb {
|
|
38
|
-
background-color: rgba(${theme['text-rgb']}, 0.15);
|
|
39
|
-
border-radius: 20px;
|
|
40
|
-
background-clip: padding-box;
|
|
41
|
-
border: solid 3px transparent;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
&::-webkit-scrollbar-corner {
|
|
45
|
-
background-color: transparent;
|
|
46
|
-
}
|
|
47
|
-
`}
|
|
48
13
|
`;
|
|
49
14
|
//# sourceMappingURL=PersonFinderBody.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonFinderBody.styles.js","names":["styled","
|
|
1
|
+
{"version":3,"file":"PersonFinderBody.styles.js","names":["styled","StyledPersonFinderBody","div","$shouldRenderInline","StyledPersonFinderBodyContent"],"sources":["../../../../../../src/components/person-finder/person-finder-wrapper/person-finder-body/PersonFinderBody.styles.ts"],"sourcesContent":["import styled from 'styled-components';\nimport { WithTheme } from '@chayns-components/core';\n\nexport const StyledPersonFinderBody = styled.div<{ $shouldRenderInline?: boolean }>`\n display: flex;\n flex-direction: column;\n height: ${({ $shouldRenderInline }) => ($shouldRenderInline ? 'auto' : '300px')};\n`;\n\ntype StyledPersonFinderBodyContentProps = WithTheme<unknown>;\n\nexport const StyledPersonFinderBodyContent = styled.div<StyledPersonFinderBodyContentProps>`\n height: 100%;\n overflow-y: auto;\n padding-bottom: 10px;\n`;\n"],"mappings":"AAAA,OAAOA,MAAM,MAAM,mBAAmB;AAGtC,OAAO,MAAMC,sBAAsB,GAAGD,MAAM,CAACE,GAAsC;AACnF;AACA;AACA,cAAc,CAAC;EAAEC;AAAoB,CAAC,KAAMA,mBAAmB,GAAG,MAAM,GAAG,OAAQ;AACnF,CAAC;AAID,OAAO,MAAMC,6BAA6B,GAAGJ,MAAM,CAACE,GAAuC;AAC3F;AACA;AACA;AACA,CAAC","ignoreList":[]}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { BrowserName, WithTheme } from '@chayns-components/core';
|
|
2
1
|
export declare const StyledPersonFinderBody: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
2
|
$shouldRenderInline?: boolean;
|
|
4
3
|
}>> & string;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
export declare const StyledPersonFinderBodyContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledPersonFinderBodyContentProps>> & string;
|
|
9
|
-
export {};
|
|
4
|
+
export declare const StyledPersonFinderBodyContent: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
5
|
+
theme: import("@chayns-components/core").Theme;
|
|
6
|
+
}>> & string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chayns-components/person-finder",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.27",
|
|
4
4
|
"description": "A set of beautiful React components for developing your own applications with chayns.",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"browserslist": [
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"typescript": "^5.9.3"
|
|
72
72
|
},
|
|
73
73
|
"dependencies": {
|
|
74
|
-
"@chayns-components/core": "^5.0.
|
|
74
|
+
"@chayns-components/core": "^5.0.27",
|
|
75
75
|
"@chayns/uac-service": "~0.0.62",
|
|
76
76
|
"lodash.throttle": "^4.1.1",
|
|
77
77
|
"uuid": "^10.0.0"
|
|
@@ -86,5 +86,5 @@
|
|
|
86
86
|
"publishConfig": {
|
|
87
87
|
"access": "public"
|
|
88
88
|
},
|
|
89
|
-
"gitHead": "
|
|
89
|
+
"gitHead": "da89ab43781279c12a460450c8a9533c0093ff1b"
|
|
90
90
|
}
|