@corva/ui 3.69.0-3 → 3.69.0-4
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/cjs-bundle/components/Search/components/Listbox.js +1 -1
- package/cjs-bundle/components/Search/components/Listbox.js.map +1 -1
- package/components/Search/components/Listbox.js +1 -1
- package/components/Search/components/Listbox.js.map +1 -1
- package/mcp-server/server.mjs +1 -1
- package/package.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),
|
|
1
|
+
"use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/slicedToArray"),r=require("@babel/runtime/helpers/objectWithoutProperties"),o=require("react"),i=require("classnames"),n=require("@material-ui/core"),a=require("lodash"),l=require("../context/index.js"),c=require("react/jsx-runtime");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=u(e),d=u(t),p=u(r),b=u(i),f=["children"];function h(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function g(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?h(Object(r),!0).forEach((function(t){s.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):h(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var m=n.makeStyles((function(e){var t=e.palette,r=e.spacing;return{list:{height:"100%",padding:r(1,0),fontSize:16,"& .MuiAutocomplete-option":{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"}},'& .MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:"initial"},"& .MuiAutocomplete-option:active":{backgroundColor:"initial"}},noTopPadding:{paddingTop:0,"& $topShadow::before":{top:0}},shadow:{position:"sticky",display:"none",width:"100%",zIndex:1,"&::before":{content:"''",position:"absolute",width:"100%",height:r(1),zIndex:1}},bottomShadow:{bottom:0,"&::before":{bottom:r(-1),backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(t.background.b9," 100%)")}},topShadow:{top:0,"&::before":{top:r(-1),backgroundImage:"linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ".concat(t.background.b9," 100%)")}},visibleShadow:{display:"block"}}})),v=o.forwardRef((function(e,t){var r=e.children,i=p.default(e,f),u=o.useState(!1),s=d.default(u,2),h=s[0],v=s[1],w=o.useState(!1),y=d.default(w,2),j=y[0],O=y[1],S=o.useRef(),k=m(),P=l.default().AllSelectComponent,x=o.useCallback((function(e){S.current=e,"function"==typeof t?t(e):t&&(t.current=e)}),[t]);return o.useEffect((function(){var e=S.current,t=a.throttle((function(){v((null==e?void 0:e.scrollTop)>0),O((null==e?void 0:e.clientHeight)+(null==e?void 0:e.scrollTop)<(null==e?void 0:e.scrollHeight))}),100,{leading:!0});return t(),null==e||e.addEventListener("scroll",t),function(){null==e||e.removeEventListener("scroll",t)}})),c.jsxs(n.List,g(g({},i),{},{className:b.default(i.className,k.list,!!P&&k.noTopPadding),ref:x,role:"listbox",children:[c.jsx("div",{className:b.default(k.shadow,k.topShadow,h&&k.visibleShadow)}),r,c.jsx("div",{className:b.default(k.shadow,k.bottomShadow,j&&k.visibleShadow)})]}))})),w=o.memo(v);module.exports=w;
|
|
2
2
|
//# sourceMappingURL=Listbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listbox.js","sources":["../../../../../src/components/Search/components/Listbox.js"],"sourcesContent":["import { memo, useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport { List, makeStyles } from '@material-ui/core';\nimport { throttle } from 'lodash';\n\nimport usePaperContext from '~/components/Search/context';\n\nconst useStyles = makeStyles(({ palette, spacing }) => ({\n list: {\n height: '100%',\n padding: spacing(1, 0),\n fontSize: 16,\n '& .MuiAutocomplete-option': {\n display: 'block',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.16)',\n },\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"]': {\n backgroundColor: 'initial',\n },\n '& .MuiAutocomplete-option:active': {\n backgroundColor: 'initial',\n },\n },\n noTopPadding: {\n paddingTop: 0,\n\n '& $topShadow::before': {\n top: 0,\n },\n },\n shadow: {\n position: 'sticky',\n display: 'none',\n width: '100%',\n zIndex: 1,\n\n '&::before': {\n content: \"''\",\n position: 'absolute',\n width: '100%',\n height: spacing(1),\n zIndex: 1,\n },\n },\n bottomShadow: {\n bottom: 0,\n\n '&::before': {\n bottom: spacing(-1),\n backgroundImage: `linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n topShadow: {\n top: 0,\n\n '&::before': {\n top: spacing(-1),\n backgroundImage: `linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n visibleShadow: {\n display: 'block',\n },\n}));\n\n/**\n * @type {React.ForwardRefExoticComponent<React.ComponentProps<List>}\n */\nconst Listbox = ({ children, ...props }) => {\n const [topScrollShadow, setTopScrollShadow] = useState(false);\n const [bottomScrollShadow, setBottomScrollShadow] = useState(false);\n const listRef = useRef();\n const classes = useStyles();\n\n const { AllSelectComponent } = usePaperContext();\n\n useEffect(() => {\n const node = listRef.current;\n const onScroll = throttle(\n () => {\n setTopScrollShadow(node?.scrollTop > 0);\n setBottomScrollShadow(node?.clientHeight + node?.scrollTop < node?.scrollHeight);\n },\n 100,\n { leading: true }\n );\n\n onScroll();\n node?.addEventListener('scroll', onScroll);\n\n return () => {\n node?.removeEventListener('scroll', onScroll);\n };\n });\n\n return (\n <List\n {...props}\n className={classNames(\n props.className,\n classes.list,\n !!AllSelectComponent && classes.noTopPadding\n )}\n ref={
|
|
1
|
+
{"version":3,"file":"Listbox.js","sources":["../../../../../src/components/Search/components/Listbox.js"],"sourcesContent":["import { forwardRef, memo, useCallback, useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport { List, makeStyles } from '@material-ui/core';\nimport { throttle } from 'lodash';\n\nimport usePaperContext from '~/components/Search/context';\n\nconst useStyles = makeStyles(({ palette, spacing }) => ({\n list: {\n height: '100%',\n padding: spacing(1, 0),\n fontSize: 16,\n '& .MuiAutocomplete-option': {\n display: 'block',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.16)',\n },\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"]': {\n backgroundColor: 'initial',\n },\n '& .MuiAutocomplete-option:active': {\n backgroundColor: 'initial',\n },\n },\n noTopPadding: {\n paddingTop: 0,\n\n '& $topShadow::before': {\n top: 0,\n },\n },\n shadow: {\n position: 'sticky',\n display: 'none',\n width: '100%',\n zIndex: 1,\n\n '&::before': {\n content: \"''\",\n position: 'absolute',\n width: '100%',\n height: spacing(1),\n zIndex: 1,\n },\n },\n bottomShadow: {\n bottom: 0,\n\n '&::before': {\n bottom: spacing(-1),\n backgroundImage: `linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n topShadow: {\n top: 0,\n\n '&::before': {\n top: spacing(-1),\n backgroundImage: `linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n visibleShadow: {\n display: 'block',\n },\n}));\n\n/**\n * @type {React.ForwardRefExoticComponent<React.ComponentProps<List>}\n */\nconst Listbox = forwardRef(({ children, ...props }, ref) => {\n const [topScrollShadow, setTopScrollShadow] = useState(false);\n const [bottomScrollShadow, setBottomScrollShadow] = useState(false);\n const listRef = useRef();\n const classes = useStyles();\n\n const { AllSelectComponent } = usePaperContext();\n\n const setRef = useCallback(\n node => {\n listRef.current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n // eslint-disable-next-line no-param-reassign\n ref.current = node;\n }\n },\n [ref]\n );\n\n useEffect(() => {\n const node = listRef.current;\n const onScroll = throttle(\n () => {\n setTopScrollShadow(node?.scrollTop > 0);\n setBottomScrollShadow(node?.clientHeight + node?.scrollTop < node?.scrollHeight);\n },\n 100,\n { leading: true }\n );\n\n onScroll();\n node?.addEventListener('scroll', onScroll);\n\n return () => {\n node?.removeEventListener('scroll', onScroll);\n };\n });\n\n return (\n <List\n {...props}\n className={classNames(\n props.className,\n classes.list,\n !!AllSelectComponent && classes.noTopPadding\n )}\n ref={setRef}\n role=\"listbox\"\n >\n <div\n className={classNames(\n classes.shadow,\n classes.topShadow,\n topScrollShadow && classes.visibleShadow\n )}\n />\n {children}\n <div\n className={classNames(\n classes.shadow,\n classes.bottomShadow,\n bottomScrollShadow && classes.visibleShadow\n )}\n />\n </List>\n );\n});\n\nexport default memo(Listbox);\n"],"names":["useStyles","makeStyles","_ref","palette","spacing","list","height","padding","fontSize","display","overflow","whiteSpace","textOverflow","backgroundColor","noTopPadding","paddingTop","top","shadow","position","width","zIndex","content","bottomShadow","bottom","backgroundImage","background","b9","topShadow","visibleShadow","Listbox","forwardRef","_ref2","ref","children","props","_objectWithoutProperties","_excluded","useState","_useState2","_slicedToArray","_useState","topScrollShadow","setTopScrollShadow","_useState4","_useState3","bottomScrollShadow","setBottomScrollShadow","listRef","useRef","classes","AllSelectComponent","usePaperContext","setRef","useCallback","node","current","useEffect","onScroll","throttle","scrollTop","clientHeight","scrollHeight","leading","addEventListener","removeEventListener","_jsxs","List","_objectSpread","className","classNames","role","_jsx","jsx","memo"],"mappings":"8gCAOA,IAAMA,EAAYC,EAAAA,YAAW,SAAAC,GAAA,IAAGC,IAAAA,QAASC,IAAAA,QAAO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,IAAMF,EAAOP,EAAQQ,QACfE,EAAWC,EAAAA,UACf,WACEhB,GAAmBY,aAAAA,EAAAA,EAAMK,WAAY,GACrCb,GAAsBQ,eAAAA,EAAMM,eAAeN,aAAAA,EAAAA,EAAMK,YAAYL,aAAAA,EAAAA,EAAMO,cACpE,GACD,IACA,CAAEC,SAAS,IAMb,OAHAL,IACAH,SAAAA,EAAMS,iBAAiB,SAAUN,GAE1B,WACLH,SAAAA,EAAMU,oBAAoB,SAAUP,GAExC,IAGEQ,EAAAA,KAACC,EAAAA,KAAIC,EAAAA,EAAA,GACCjC,GAAK,GAAA,CACTkC,UAAWC,EAAAA,QACTnC,EAAMkC,UACNnB,EAAQ5C,OACN6C,GAAsBD,EAAQnC,cAElCkB,IAAKoB,EACLkB,KAAK,UAASrC,SAEd,CAAAsC,EAAAC,IAAA,MAAA,CACEJ,UAAWC,EAAAA,QACTpB,EAAQhC,OACRgC,EAAQtB,UACRc,GAAmBQ,EAAQrB,iBAG9BK,EACDsC,EAAAC,IAAA,MAAA,CACEJ,UAAWC,EAAAA,QACTpB,EAAQhC,OACRgC,EAAQ3B,aACRuB,GAAsBI,EAAQrB,oBAKxC,IAEe6C,EAAAA,EAAAA,KAAK5C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import{
|
|
1
|
+
import e from"@babel/runtime/helpers/defineProperty";import o from"@babel/runtime/helpers/slicedToArray";import t from"@babel/runtime/helpers/objectWithoutProperties";import{forwardRef as r,useState as i,useRef as n,useCallback as a,useEffect as l,memo as c}from"react";import p from"classnames";import{makeStyles as d,List as s}from"@material-ui/core";import{throttle as u}from"lodash";import b from"../context/index.js";import{jsxs as m,jsx as f}from"react/jsx-runtime";var h=["children"];function g(e,o){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);o&&(r=r.filter((function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable}))),t.push.apply(t,r)}return t}function v(o){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?g(Object(r),!0).forEach((function(t){e(o,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(r)):g(Object(r)).forEach((function(e){Object.defineProperty(o,e,Object.getOwnPropertyDescriptor(r,e))}))}return o}var w=d((function(e){var o=e.palette,t=e.spacing;return{list:{height:"100%",padding:t(1,0),fontSize:16,"& .MuiAutocomplete-option":{display:"block",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis","&:hover":{backgroundColor:"rgba(255, 255, 255, 0.16)"}},'& .MuiAutocomplete-option[aria-selected="true"]':{backgroundColor:"initial"},"& .MuiAutocomplete-option:active":{backgroundColor:"initial"}},noTopPadding:{paddingTop:0,"& $topShadow::before":{top:0}},shadow:{position:"sticky",display:"none",width:"100%",zIndex:1,"&::before":{content:"''",position:"absolute",width:"100%",height:t(1),zIndex:1}},bottomShadow:{bottom:0,"&::before":{bottom:t(-1),backgroundImage:"linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ".concat(o.background.b9," 100%)")}},topShadow:{top:0,"&::before":{top:t(-1),backgroundImage:"linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ".concat(o.background.b9," 100%)")}},visibleShadow:{display:"block"}}})),y=c(r((function(e,r){var c=e.children,d=t(e,h),g=i(!1),y=o(g,2),O=y[0],j=y[1],S=i(!1),P=o(S,2),k=P[0],x=P[1],T=n(),A=w(),C=b().AllSelectComponent,D=a((function(e){T.current=e,"function"==typeof r?r(e):r&&(r.current=e)}),[r]);return l((function(){var e=T.current,o=u((function(){j((null==e?void 0:e.scrollTop)>0),x((null==e?void 0:e.clientHeight)+(null==e?void 0:e.scrollTop)<(null==e?void 0:e.scrollHeight))}),100,{leading:!0});return o(),null==e||e.addEventListener("scroll",o),function(){null==e||e.removeEventListener("scroll",o)}})),m(s,v(v({},d),{},{className:p(d.className,A.list,!!C&&A.noTopPadding),ref:D,role:"listbox",children:[f("div",{className:p(A.shadow,A.topShadow,O&&A.visibleShadow)}),c,f("div",{className:p(A.shadow,A.bottomShadow,k&&A.visibleShadow)})]}))})));export{y as default};
|
|
2
2
|
//# sourceMappingURL=Listbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listbox.js","sources":["../../../../src/components/Search/components/Listbox.js"],"sourcesContent":["import { memo, useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport { List, makeStyles } from '@material-ui/core';\nimport { throttle } from 'lodash';\n\nimport usePaperContext from '~/components/Search/context';\n\nconst useStyles = makeStyles(({ palette, spacing }) => ({\n list: {\n height: '100%',\n padding: spacing(1, 0),\n fontSize: 16,\n '& .MuiAutocomplete-option': {\n display: 'block',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.16)',\n },\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"]': {\n backgroundColor: 'initial',\n },\n '& .MuiAutocomplete-option:active': {\n backgroundColor: 'initial',\n },\n },\n noTopPadding: {\n paddingTop: 0,\n\n '& $topShadow::before': {\n top: 0,\n },\n },\n shadow: {\n position: 'sticky',\n display: 'none',\n width: '100%',\n zIndex: 1,\n\n '&::before': {\n content: \"''\",\n position: 'absolute',\n width: '100%',\n height: spacing(1),\n zIndex: 1,\n },\n },\n bottomShadow: {\n bottom: 0,\n\n '&::before': {\n bottom: spacing(-1),\n backgroundImage: `linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n topShadow: {\n top: 0,\n\n '&::before': {\n top: spacing(-1),\n backgroundImage: `linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n visibleShadow: {\n display: 'block',\n },\n}));\n\n/**\n * @type {React.ForwardRefExoticComponent<React.ComponentProps<List>}\n */\nconst Listbox = ({ children, ...props }) => {\n const [topScrollShadow, setTopScrollShadow] = useState(false);\n const [bottomScrollShadow, setBottomScrollShadow] = useState(false);\n const listRef = useRef();\n const classes = useStyles();\n\n const { AllSelectComponent } = usePaperContext();\n\n useEffect(() => {\n const node = listRef.current;\n const onScroll = throttle(\n () => {\n setTopScrollShadow(node?.scrollTop > 0);\n setBottomScrollShadow(node?.clientHeight + node?.scrollTop < node?.scrollHeight);\n },\n 100,\n { leading: true }\n );\n\n onScroll();\n node?.addEventListener('scroll', onScroll);\n\n return () => {\n node?.removeEventListener('scroll', onScroll);\n };\n });\n\n return (\n <List\n {...props}\n className={classNames(\n props.className,\n classes.list,\n !!AllSelectComponent && classes.noTopPadding\n )}\n ref={
|
|
1
|
+
{"version":3,"file":"Listbox.js","sources":["../../../../src/components/Search/components/Listbox.js"],"sourcesContent":["import { forwardRef, memo, useCallback, useEffect, useRef, useState } from 'react';\nimport classNames from 'classnames';\nimport { List, makeStyles } from '@material-ui/core';\nimport { throttle } from 'lodash';\n\nimport usePaperContext from '~/components/Search/context';\n\nconst useStyles = makeStyles(({ palette, spacing }) => ({\n list: {\n height: '100%',\n padding: spacing(1, 0),\n fontSize: 16,\n '& .MuiAutocomplete-option': {\n display: 'block',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis',\n\n '&:hover': {\n backgroundColor: 'rgba(255, 255, 255, 0.16)',\n },\n },\n '& .MuiAutocomplete-option[aria-selected=\"true\"]': {\n backgroundColor: 'initial',\n },\n '& .MuiAutocomplete-option:active': {\n backgroundColor: 'initial',\n },\n },\n noTopPadding: {\n paddingTop: 0,\n\n '& $topShadow::before': {\n top: 0,\n },\n },\n shadow: {\n position: 'sticky',\n display: 'none',\n width: '100%',\n zIndex: 1,\n\n '&::before': {\n content: \"''\",\n position: 'absolute',\n width: '100%',\n height: spacing(1),\n zIndex: 1,\n },\n },\n bottomShadow: {\n bottom: 0,\n\n '&::before': {\n bottom: spacing(-1),\n backgroundImage: `linear-gradient(180deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n topShadow: {\n top: 0,\n\n '&::before': {\n top: spacing(-1),\n backgroundImage: `linear-gradient(0deg, rgba(65, 65, 65, 0) 0%, ${palette.background.b9} 100%)`,\n },\n },\n visibleShadow: {\n display: 'block',\n },\n}));\n\n/**\n * @type {React.ForwardRefExoticComponent<React.ComponentProps<List>}\n */\nconst Listbox = forwardRef(({ children, ...props }, ref) => {\n const [topScrollShadow, setTopScrollShadow] = useState(false);\n const [bottomScrollShadow, setBottomScrollShadow] = useState(false);\n const listRef = useRef();\n const classes = useStyles();\n\n const { AllSelectComponent } = usePaperContext();\n\n const setRef = useCallback(\n node => {\n listRef.current = node;\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n // eslint-disable-next-line no-param-reassign\n ref.current = node;\n }\n },\n [ref]\n );\n\n useEffect(() => {\n const node = listRef.current;\n const onScroll = throttle(\n () => {\n setTopScrollShadow(node?.scrollTop > 0);\n setBottomScrollShadow(node?.clientHeight + node?.scrollTop < node?.scrollHeight);\n },\n 100,\n { leading: true }\n );\n\n onScroll();\n node?.addEventListener('scroll', onScroll);\n\n return () => {\n node?.removeEventListener('scroll', onScroll);\n };\n });\n\n return (\n <List\n {...props}\n className={classNames(\n props.className,\n classes.list,\n !!AllSelectComponent && classes.noTopPadding\n )}\n ref={setRef}\n role=\"listbox\"\n >\n <div\n className={classNames(\n classes.shadow,\n classes.topShadow,\n topScrollShadow && classes.visibleShadow\n )}\n />\n {children}\n <div\n className={classNames(\n classes.shadow,\n classes.bottomShadow,\n bottomScrollShadow && classes.visibleShadow\n )}\n />\n </List>\n );\n});\n\nexport default memo(Listbox);\n"],"names":["useStyles","makeStyles","_ref","palette","spacing","list","height","padding","fontSize","display","overflow","whiteSpace","textOverflow","backgroundColor","noTopPadding","paddingTop","top","shadow","position","width","zIndex","content","bottomShadow","bottom","backgroundImage","background","b9","topShadow","visibleShadow","memo","forwardRef","_ref2","ref","children","props","_objectWithoutProperties","_excluded","useState","_useState2","_slicedToArray","_useState","topScrollShadow","setTopScrollShadow","_useState4","_useState3","bottomScrollShadow","setBottomScrollShadow","listRef","useRef","classes","AllSelectComponent","usePaperContext","setRef","useCallback","node","current","useEffect","onScroll","throttle","scrollTop","clientHeight","scrollHeight","leading","addEventListener","removeEventListener","_jsxs","List","_objectSpread","className","classNames","role","_jsx"],"mappings":"0iCAOA,IAAMA,EAAYC,GAAW,SAAAC,GAAA,IAAGC,IAAAA,QAASC,IAAAA,QAAO,MAAQ,CACtDC,KAAM,CACJC,OAAQ,OACRC,QAASH,EAAQ,EAAG,GACpBI,SAAU,GACV,4BAA6B,CAC3BC,QAAS,QACTC,SAAU,SACVC,WAAY,SACZC,aAAc,WAEd,UAAW,CACTC,gBAAiB,8BAGrB,kDAAmD,CACjDA,gBAAiB,WAEnB,mCAAoC,CAClCA,gBAAiB,YAGrBC,aAAc,CACZC,WAAY,EAEZ,uBAAwB,CACtBC,IAAK,IAGTC,OAAQ,CACNC,SAAU,SACVT,QAAS,OACTU,MAAO,OACPC,OAAQ,EAER,YAAa,CACXC,QAAS,KACTH,SAAU,WACVC,MAAO,OACPb,OAAQF,EAAQ,GAChBgB,OAAQ,IAGZE,aAAc,CACZC,OAAQ,EAER,YAAa,CACXA,OAAQnB,GAAS,GACjBoB,gBAAoErB,mDAAAA,OAAAA,EAAQsB,WAAWC,GAAE,YAG7FC,UAAW,CACTX,IAAK,EAEL,YAAa,CACXA,IAAKZ,GAAS,GACdoB,gBAAkErB,iDAAAA,OAAAA,EAAQsB,WAAWC,GAAE,YAG3FE,cAAe,CACbnB,QAAS,SAEZ,IA2EcoB,EAAAA,EAtECC,GAAW,SAAAC,EAAyBC,GAAQ,IAA9BC,IAAAA,SAAaC,EAAKC,EAAAJ,EAAAK,GACAC,EAAAA,GAAS,GAAMC,EAAAC,EAAAC,EAAA,GAAtDC,EAAeH,EAAA,GAAEI,EA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