@foxford/ui 2.132.0 → 2.133.1
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/components/Dropdown/Dropdown.js +1 -1
- package/components/Dropdown/Dropdown.js.map +1 -1
- package/components/Dropdown/Dropdown.mjs +1 -1
- package/components/Dropdown/Dropdown.mjs.map +1 -1
- package/components/Menu/Menu.js +1 -1
- package/components/Menu/Menu.js.map +1 -1
- package/components/Menu/Menu.mjs +1 -1
- package/components/Menu/Menu.mjs.map +1 -1
- package/components/MenuComponent/MenuComponent.js +1 -1
- package/components/MenuComponent/MenuComponent.js.map +1 -1
- package/components/MenuComponent/MenuComponent.mjs +1 -1
- package/components/MenuComponent/MenuComponent.mjs.map +1 -1
- package/components/MenuComponent/{constants.js → sizes.js} +1 -1
- package/components/MenuComponent/sizes.js.map +1 -0
- package/components/MenuComponent/{constants.mjs → sizes.mjs} +1 -1
- package/components/MenuComponent/sizes.mjs.map +1 -0
- package/components/MenuComponent/style.js +1 -1
- package/components/MenuComponent/style.js.map +1 -1
- package/components/MenuComponent/style.mjs +1 -1
- package/components/MenuComponent/style.mjs.map +1 -1
- package/components/MenuContainer/MenuContainer.js +1 -1
- package/components/MenuContainer/MenuContainer.js.map +1 -1
- package/components/MenuContainer/MenuContainer.mjs +1 -1
- package/components/MenuContainer/MenuContainer.mjs.map +1 -1
- package/components/MenuContainer/style.js +1 -1
- package/components/MenuContainer/style.js.map +1 -1
- package/components/MenuContainer/style.mjs +1 -1
- package/components/MenuContainer/style.mjs.map +1 -1
- package/components/MenuList/MenuList.js.map +1 -1
- package/components/MenuList/MenuList.mjs.map +1 -1
- package/components/MenuList/style.js +1 -1
- package/components/MenuList/style.js.map +1 -1
- package/components/MenuList/style.mjs +1 -1
- package/components/MenuList/style.mjs.map +1 -1
- package/dts/index.d.ts +394 -219
- package/package.json +2 -2
- package/components/MenuComponent/constants.js.map +0 -1
- package/components/MenuComponent/constants.mjs.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.mjs","sources":["../../../../src/components/Menu/Menu.tsx"],"sourcesContent":["import { forwardRef, useRef, useState, useLayoutEffect } from 'react'\nimport type { Styles } from 'react-floater'\nimport {
|
|
1
|
+
{"version":3,"file":"Menu.mjs","sources":["../../../../src/components/Menu/Menu.tsx"],"sourcesContent":["import { forwardRef, useRef, useState, useLayoutEffect } from 'react'\nimport type { Styles } from 'react-floater'\nimport { useMergedProps } from 'hooks/useMergedProps'\nimport { focusFirstFocusable } from 'shared/utils/dom'\nimport { deepmerge } from 'shared/utils/misc'\nimport { Tooltip } from 'components/Tooltip'\nimport { MenuComponent, SIZES } from 'components/MenuComponent'\nimport { MenuList } from 'components/MenuList'\nimport { MenuContainer } from 'components/MenuContainer'\nimport { MenuDivider } from 'components/MenuDivider'\nimport type { MenuProps } from './types'\n\nconst COMPONENT_NAME = 'Menu'\n\n/**\n *\n * *v1.0.0*\n *\n * Компонент выпадающего меню.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<div\\> элемента.\n */\nconst Menu: React.ForwardRefExoticComponent<MenuProps> & {\n Component: typeof MenuComponent\n List: typeof MenuList\n Container: typeof MenuContainer\n Divider: typeof MenuDivider\n} = Object.assign(\n forwardRef<HTMLDivElement, MenuProps>((props, ref) => {\n const {\n size = 'm',\n disableFlip = true,\n offset = 8,\n placement = 'bottom-start',\n styles = {},\n autoOpen,\n callback,\n children,\n open,\n portalElement,\n render,\n debug,\n getPopper,\n zIndex,\n closeOnClickOutside,\n ...restProps\n } = useMergedProps<MenuProps>(props, {\n componentName: COMPONENT_NAME,\n sizes: SIZES,\n })\n\n const [portal, setPortal] = useState<HTMLElement | null>(null)\n\n const trigger = useRef<HTMLElement | null>(null)\n\n useLayoutEffect(() => {\n let menuPortal: HTMLElement | null = null\n\n if (portalElement) {\n setPortal(null)\n } else if (document.body) {\n menuPortal = document.createElement('div')\n\n menuPortal.dataset.menuPortal = 'true'\n menuPortal.style.position = 'relative'\n\n document.body.appendChild(menuPortal)\n\n setPortal(menuPortal)\n }\n\n return () => {\n if (menuPortal && menuPortal.isConnected) {\n menuPortal.remove()\n }\n }\n }, [portalElement])\n\n if (!portalElement && !portal) {\n return null\n }\n\n return (\n <Tooltip\n ref={ref}\n preset='brand'\n hideArrow\n open={open}\n autoOpen={autoOpen}\n trigger={children}\n zIndex={zIndex}\n portalElement={portalElement ?? portal}\n getPopper={(popper, origin) => {\n if (popper.state.elements.reference instanceof HTMLElement) {\n trigger.current = popper.state.elements.reference\n }\n\n if (typeof getPopper === 'function') {\n getPopper(popper, origin)\n }\n }}\n callback={(action, tooltipProps) => {\n if (action === 'close' && trigger.current instanceof HTMLElement) {\n focusFirstFocusable(trigger.current)\n }\n\n if (typeof callback === 'function') {\n callback(action, tooltipProps)\n }\n }}\n disableFlip={disableFlip}\n offset={offset}\n position={placement}\n closeOnClickOutside={closeOnClickOutside}\n styles={deepmerge(\n (restProps.secondary\n ? { floater: { filter: 'none' }, wrapper: { cursor: 'pointer' } }\n : { wrapper: { cursor: 'pointer' } }) as Partial<Styles>,\n styles\n )}\n debug={debug}\n component={\n <MenuComponent {...restProps} size={size}>\n {render}\n </MenuComponent>\n }\n />\n )\n }),\n {\n Component: MenuComponent,\n List: MenuList,\n Container: MenuContainer,\n Divider: MenuDivider,\n }\n)\n\nMenu.displayName = COMPONENT_NAME\n\nexport { Menu }\n"],"names":["Menu","Object","assign","forwardRef","props","ref","size","disableFlip","offset","placement","styles","autoOpen","callback","children","open","portalElement","render","debug","getPopper","zIndex","closeOnClickOutside","restProps","useMergedProps","componentName","sizes","SIZES","portal","setPortal","useState","trigger","useRef","useLayoutEffect","menuPortal","document","body","createElement","dataset","style","position","appendChild","isConnected","remove","_jsx","Tooltip","preset","hideArrow","popper","origin","state","elements","reference","HTMLElement","current","action","tooltipProps","focusFirstFocusable","deepmerge","secondary","floater","filter","wrapper","cursor","component","MenuComponent","Component","List","MenuList","Container","MenuContainer","Divider","MenuDivider","displayName"],"mappings":"wkBAsBA,MAAMA,KAKFC,OAAOC,OACTC,WAAsC,CAACC,EAAOC,KAC5C,MAAMC,KACJA,EAAO,IAAGC,YACVA,GAAc,EAAIC,OAClBA,EAAS,EAACC,UACVA,EAAY,eAAcC,OAC1BA,EAAS,CAAA,EAAEC,SACXA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,KACRA,EAAIC,cACJA,EAAaC,OACbA,EAAMC,MACNA,EAAKC,UACLA,EAASC,OACTA,EAAMC,oBACNA,KACGC,GACDC,eAA0BlB,EAAO,CACnCmB,cAnCiB,OAoCjBC,MAAOC,QAGT,MAAOC,EAAQC,GAAaC,SAA6B,MAEzD,MAAMC,EAAUC,OAA2B,MAyB3C,OAvBAC,gBAAgB,KACd,IAAIC,EAAiC,KAerC,OAbIjB,EACFY,EAAU,MACDM,SAASC,OAClBF,EAAaC,SAASE,cAAc,OAEpCH,EAAWI,QAAQJ,WAAa,OAChCA,EAAWK,MAAMC,SAAW,WAE5BL,SAASC,KAAKK,YAAYP,GAE1BL,EAAUK,IAGL,KACDA,GAAcA,EAAWQ,aAC3BR,EAAWS,WAGd,CAAC1B,IAECA,GAAkBW,EAKrBgB,IAACC,QAAO,CACNtC,IAAKA,EACLuC,OAAO,QACPC,WAAS,EACT/B,KAAMA,EACNH,SAAUA,EACVkB,QAAShB,EACTM,OAAQA,EACRJ,cAAeA,GAAiBW,EAChCR,UAAWA,CAAC4B,EAAQC,KACdD,EAAOE,MAAMC,SAASC,qBAAqBC,cAC7CtB,EAAQuB,QAAUN,EAAOE,MAAMC,SAASC,kBAG/BhC,GAAc,YACvBA,EAAU4B,EAAQC,IAGtBnC,SAAUA,CAACyC,EAAQC,KACbD,IAAW,SAAWxB,EAAQuB,mBAAmBD,aACnDI,oBAAoB1B,EAAQuB,gBAGnBxC,GAAa,YACtBA,EAASyC,EAAQC,IAGrB/C,YAAaA,EACbC,OAAQA,EACR8B,SAAU7B,EACVW,oBAAqBA,EACrBV,OAAQ8C,UACLnC,EAAUoC,UACP,CAAEC,QAAS,CAAEC,OAAQ,QAAUC,QAAS,CAAEC,OAAQ,YAClD,CAAED,QAAS,CAAEC,OAAQ,YACzBnD,GAEFO,MAAOA,EACP6C,UACEpB,IAACqB,cAAa,IAAK1C,EAAWf,KAAMA,EAAKO,SACtCG,MA5CA,OAkDX,CACEgD,UAAWD,cACXE,KAAMC,SACNC,UAAWC,cACXC,QAASC,cAIbtE,KAAKuE,YA7HkB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var React=require('react');var
|
|
1
|
+
'use strict';var React=require('react');var dom=require('../../shared/utils/dom.js');var useMergedProps=require('../../hooks/useMergedProps.js');var sizes=require('./sizes.js');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');const noop=()=>{};const MenuComponent=React.forwardRef((e,s)=>{const{size:o="m",closeFn:t=noop,sizeXXS:r,sizeXS:n,sizeS:i,sizeM:u,sizeL:c,sizeXL:a,children:l,autoFocus:p,disableAutoFocus:m,showCloseButton:z,closeButtonProps:d,...R}=useMergedProps.useMergedProps(e,{componentName:"MenuComponent",sizes:sizes.SIZES});const S=React.useRef(null);React.useImperativeHandle(s,()=>S.current,[]),React.useEffect(()=>{const e=setTimeout(()=>{!m&&S.current&&dom.focusFirstFocusable(S.current)},0);return()=>{clearTimeout(e)}},[p,m]);const f={size:o,sizeXXS:r,sizeXS:n,sizeS:i,sizeM:u,sizeL:c,sizeXL:a};const M={showCloseButton:z,closeButtonProps:d,closeFn:t};const j=React.isValidElement(l)&&typeof l.props=='object'&&l.props!==null?l.props:{};return jsxRuntime.jsx(style.Root,{...R,...f,ref:S,children:React.isValidElement(l)?React.cloneElement(l,{...f,...M,...j}):typeof l=='function'?l({...f,...M}):void 0})});exports.SIZES=sizes.SIZES,exports.MenuComponent=MenuComponent;
|
|
2
2
|
//# sourceMappingURL=MenuComponent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuComponent.js","sources":["../../../../src/components/MenuComponent/MenuComponent.tsx"],"sourcesContent":["import { forwardRef, useRef, useImperativeHandle, useEffect, isValidElement, cloneElement } from 'react'\nimport {
|
|
1
|
+
{"version":3,"file":"MenuComponent.js","sources":["../../../../src/components/MenuComponent/MenuComponent.tsx"],"sourcesContent":["import { forwardRef, useRef, useImperativeHandle, useEffect, isValidElement, cloneElement } from 'react'\nimport { focusFirstFocusable } from 'shared/utils/dom'\nimport { useMergedProps } from 'hooks/useMergedProps'\nimport { SIZES } from './sizes'\nimport * as Styled from './style'\nimport type { MenuComponentProps } from './types'\n\nconst COMPONENT_NAME = 'MenuComponent'\n\nconst noop = () => undefined\n\n/**\n *\n * Компонент рутового блока выпадающего меню.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<div\\> элемента.\n */\nconst MenuComponent: React.ForwardRefExoticComponent<MenuComponentProps> = forwardRef<\n HTMLDivElement,\n MenuComponentProps\n>((props, forwardedRef) => {\n const {\n size = 'm',\n closeFn = noop,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n children,\n autoFocus,\n disableAutoFocus,\n showCloseButton,\n closeButtonProps,\n ...restProps\n } = useMergedProps<MenuComponentProps>(props, {\n componentName: COMPONENT_NAME,\n sizes: SIZES,\n })\n\n const ref = useRef<HTMLDivElement>(null)\n\n useImperativeHandle<HTMLDivElement | null, HTMLDivElement | null>(forwardedRef, () => ref.current, [])\n\n useEffect(() => {\n const timerId = setTimeout(() => {\n if (!disableAutoFocus && ref.current) focusFirstFocusable(ref.current)\n }, 0)\n\n return () => {\n clearTimeout(timerId)\n }\n }, [autoFocus, disableAutoFocus])\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const forwardProps = {\n showCloseButton,\n closeButtonProps,\n closeFn,\n }\n\n const elementProps =\n isValidElement(children) && typeof children.props === 'object' && children.props !== null ? children.props : {}\n\n return (\n <Styled.Root {...restProps} {...sizeProps} ref={ref}>\n {isValidElement(children)\n ? cloneElement(children, { ...sizeProps, ...forwardProps, ...elementProps })\n : typeof children === 'function'\n ? children({ ...sizeProps, ...forwardProps })\n : undefined}\n </Styled.Root>\n )\n})\n\nexport { MenuComponent }\n\nexport { SIZES }\n"],"names":["noop","MenuComponent","forwardRef","props","forwardedRef","size","closeFn","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","children","autoFocus","disableAutoFocus","showCloseButton","closeButtonProps","restProps","useMergedProps","componentName","sizes","SIZES","ref","useRef","useImperativeHandle","current","useEffect","timerId","setTimeout","focusFirstFocusable","clearTimeout","sizeProps","forwardProps","elementProps","isValidElement","_jsx","Styled","cloneElement","undefined"],"mappings":"6PASA,MAAMA,KAAOA,OAQb,MAAMC,cAAqEC,MAAAA,WAGzE,CAACC,EAAOC,KACR,MAAMC,KACJA,EAAO,IAAGC,QACVA,EAAUN,KAAIO,QACdA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,EAAMC,SACNA,EAAQC,UACRA,EAASC,iBACTA,EAAgBC,gBAChBA,EAAeC,iBACfA,KACGC,GACDC,eAAAA,eAAmChB,EAAO,CAC5CiB,cA9BmB,gBA+BnBC,MAAOC,MAAAA,QAGT,MAAMC,EAAMC,MAAAA,OAAuB,MAEnCC,MAAAA,oBAAkErB,EAAc,IAAMmB,EAAIG,QAAS,IAEnGC,MAAAA,UAAU,KACR,MAAMC,EAAUC,WAAW,MACpBd,GAAoBQ,EAAIG,SAASI,IAAAA,oBAAoBP,EAAIG,UAC7D,GAEH,MAAO,KACLK,aAAaH,KAEd,CAACd,EAAWC,IAEf,MAAMiB,EAAY,CAChB3B,OACAE,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMqB,EAAe,CACnBjB,kBACAC,mBACAX,WAGF,MAAM4B,EACJC,MAAAA,eAAetB,WAAoBA,EAASV,OAAU,UAAYU,EAASV,QAAU,KAAOU,EAASV,MAAQ,CAAA,EAE/G,OACEiC,WAAAA,IAACC,MAAAA,KAAW,IAAKnB,KAAec,EAAWT,IAAKA,EAAIV,SACjDsB,MAAAA,eAAetB,GACZyB,MAAAA,aAAazB,EAAU,IAAKmB,KAAcC,KAAiBC,WACpDrB,GAAa,WAClBA,EAAS,IAAKmB,KAAcC,SAC5BM"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{forwardRef,useRef,useImperativeHandle,useEffect,isValidElement,cloneElement}from'react';import{
|
|
1
|
+
import{forwardRef,useRef,useImperativeHandle,useEffect,isValidElement,cloneElement}from'react';import{focusFirstFocusable}from'../../shared/utils/dom.mjs';import{useMergedProps}from'../../hooks/useMergedProps.mjs';import{SIZES}from'./sizes.mjs';import{Root}from'./style.mjs';import{jsx}from'react/jsx-runtime';const noop=()=>{};const MenuComponent=forwardRef((e,o)=>{const{size:s="m",closeFn:t=noop,sizeXXS:r,sizeXS:n,sizeS:i,sizeM:u,sizeL:c,sizeXL:m,children:l,autoFocus:p,disableAutoFocus:f,showCloseButton:a,closeButtonProps:d,...z}=useMergedProps(e,{componentName:"MenuComponent",sizes:SIZES});const S=useRef(null);useImperativeHandle(o,()=>S.current,[]),useEffect(()=>{const e=setTimeout(()=>{!f&&S.current&&focusFirstFocusable(S.current)},0);return()=>{clearTimeout(e)}},[p,f]);const E={size:s,sizeXXS:r,sizeXS:n,sizeS:i,sizeM:u,sizeL:c,sizeXL:m};const j={showCloseButton:a,closeButtonProps:d,closeFn:t};const F=isValidElement(l)&&typeof l.props=='object'&&l.props!==null?l.props:{};return jsx(Root,{...z,...E,ref:S,children:isValidElement(l)?cloneElement(l,{...E,...j,...F}):typeof l=='function'?l({...E,...j}):void 0})});export{MenuComponent,SIZES};
|
|
2
2
|
//# sourceMappingURL=MenuComponent.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuComponent.mjs","sources":["../../../../src/components/MenuComponent/MenuComponent.tsx"],"sourcesContent":["import { forwardRef, useRef, useImperativeHandle, useEffect, isValidElement, cloneElement } from 'react'\nimport {
|
|
1
|
+
{"version":3,"file":"MenuComponent.mjs","sources":["../../../../src/components/MenuComponent/MenuComponent.tsx"],"sourcesContent":["import { forwardRef, useRef, useImperativeHandle, useEffect, isValidElement, cloneElement } from 'react'\nimport { focusFirstFocusable } from 'shared/utils/dom'\nimport { useMergedProps } from 'hooks/useMergedProps'\nimport { SIZES } from './sizes'\nimport * as Styled from './style'\nimport type { MenuComponentProps } from './types'\n\nconst COMPONENT_NAME = 'MenuComponent'\n\nconst noop = () => undefined\n\n/**\n *\n * Компонент рутового блока выпадающего меню.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<div\\> элемента.\n */\nconst MenuComponent: React.ForwardRefExoticComponent<MenuComponentProps> = forwardRef<\n HTMLDivElement,\n MenuComponentProps\n>((props, forwardedRef) => {\n const {\n size = 'm',\n closeFn = noop,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n children,\n autoFocus,\n disableAutoFocus,\n showCloseButton,\n closeButtonProps,\n ...restProps\n } = useMergedProps<MenuComponentProps>(props, {\n componentName: COMPONENT_NAME,\n sizes: SIZES,\n })\n\n const ref = useRef<HTMLDivElement>(null)\n\n useImperativeHandle<HTMLDivElement | null, HTMLDivElement | null>(forwardedRef, () => ref.current, [])\n\n useEffect(() => {\n const timerId = setTimeout(() => {\n if (!disableAutoFocus && ref.current) focusFirstFocusable(ref.current)\n }, 0)\n\n return () => {\n clearTimeout(timerId)\n }\n }, [autoFocus, disableAutoFocus])\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const forwardProps = {\n showCloseButton,\n closeButtonProps,\n closeFn,\n }\n\n const elementProps =\n isValidElement(children) && typeof children.props === 'object' && children.props !== null ? children.props : {}\n\n return (\n <Styled.Root {...restProps} {...sizeProps} ref={ref}>\n {isValidElement(children)\n ? cloneElement(children, { ...sizeProps, ...forwardProps, ...elementProps })\n : typeof children === 'function'\n ? children({ ...sizeProps, ...forwardProps })\n : undefined}\n </Styled.Root>\n )\n})\n\nexport { MenuComponent }\n\nexport { SIZES }\n"],"names":["noop","MenuComponent","forwardRef","props","forwardedRef","size","closeFn","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","children","autoFocus","disableAutoFocus","showCloseButton","closeButtonProps","restProps","useMergedProps","componentName","sizes","SIZES","ref","useRef","useImperativeHandle","current","useEffect","timerId","setTimeout","focusFirstFocusable","clearTimeout","sizeProps","forwardProps","elementProps","isValidElement","_jsx","Styled","cloneElement","undefined"],"mappings":"sTASA,MAAMA,KAAOA,OAQb,MAAMC,cAAqEC,WAGzE,CAACC,EAAOC,KACR,MAAMC,KACJA,EAAO,IAAGC,QACVA,EAAUN,KAAIO,QACdA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,EAAMC,SACNA,EAAQC,UACRA,EAASC,iBACTA,EAAgBC,gBAChBA,EAAeC,iBACfA,KACGC,GACDC,eAAmChB,EAAO,CAC5CiB,cA9BmB,gBA+BnBC,MAAOC,QAGT,MAAMC,EAAMC,OAAuB,MAEnCC,oBAAkErB,EAAc,IAAMmB,EAAIG,QAAS,IAEnGC,UAAU,KACR,MAAMC,EAAUC,WAAW,MACpBd,GAAoBQ,EAAIG,SAASI,oBAAoBP,EAAIG,UAC7D,GAEH,MAAO,KACLK,aAAaH,KAEd,CAACd,EAAWC,IAEf,MAAMiB,EAAY,CAChB3B,OACAE,UACAC,SACAC,QACAC,QACAC,QACAC,UAGF,MAAMqB,EAAe,CACnBjB,kBACAC,mBACAX,WAGF,MAAM4B,EACJC,eAAetB,WAAoBA,EAASV,OAAU,UAAYU,EAASV,QAAU,KAAOU,EAASV,MAAQ,CAAA,EAE/G,OACEiC,IAACC,KAAW,IAAKnB,KAAec,EAAWT,IAAKA,EAAIV,SACjDsB,eAAetB,GACZyB,aAAazB,EAAU,IAAKmB,KAAcC,KAAiBC,WACpDrB,GAAa,WAClBA,EAAS,IAAKmB,KAAcC,SAC5BM"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
'use strict';exports.SIZES={l:{maxWidth:560,minWidth:'min-content',maxHeight:240},m:{maxWidth:480,minWidth:'min-content',maxHeight:240},s:{maxWidth:280,minWidth:'min-content',maxHeight:240},fluid:{maxWidth:'100%',minWidth:'min-content',maxHeight:240}};
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=sizes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sizes.js","sources":["../../../../src/components/MenuComponent/sizes.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { MenuComponentSize } from './types'\n\nexport const SIZES: Record<MenuComponentSize, CSSProperties> = {\n l: {\n maxWidth: 560,\n minWidth: 'min-content',\n maxHeight: 240,\n },\n m: {\n maxWidth: 480,\n minWidth: 'min-content',\n maxHeight: 240,\n },\n s: {\n maxWidth: 280,\n minWidth: 'min-content',\n maxHeight: 240,\n },\n fluid: {\n maxWidth: '100%',\n minWidth: 'min-content',\n maxHeight: 240,\n },\n}\n"],"names":["l","maxWidth","minWidth","maxHeight","m","s","fluid"],"mappings":"2BAG+D,CAC7DA,EAAG,CACDC,SAAU,IACVC,SAAU,cACVC,UAAW,KAEbC,EAAG,CACDH,SAAU,IACVC,SAAU,cACVC,UAAW,KAEbE,EAAG,CACDJ,SAAU,IACVC,SAAU,cACVC,UAAW,KAEbG,MAAO,CACLL,SAAU,OACVC,SAAU,cACVC,UAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const SIZES={l:{maxWidth:560,minWidth:'min-content',maxHeight:240},m:{maxWidth:480,minWidth:'min-content',maxHeight:240},s:{maxWidth:280,minWidth:'min-content',maxHeight:240},fluid:{maxWidth:'100%',minWidth:'min-content',maxHeight:240}};export{SIZES};
|
|
2
|
-
//# sourceMappingURL=
|
|
2
|
+
//# sourceMappingURL=sizes.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sizes.mjs","sources":["../../../../src/components/MenuComponent/sizes.ts"],"sourcesContent":["import type { CSSProperties } from 'react'\nimport type { MenuComponentSize } from './types'\n\nexport const SIZES: Record<MenuComponentSize, CSSProperties> = {\n l: {\n maxWidth: 560,\n minWidth: 'min-content',\n maxHeight: 240,\n },\n m: {\n maxWidth: 480,\n minWidth: 'min-content',\n maxHeight: 240,\n },\n s: {\n maxWidth: 280,\n minWidth: 'min-content',\n maxHeight: 240,\n },\n fluid: {\n maxWidth: '100%',\n minWidth: 'min-content',\n maxHeight: 240,\n },\n}\n"],"names":["SIZES","l","maxWidth","minWidth","maxHeight","m","s","fluid"],"mappings":"AAGO,MAAMA,MAAkD,CAC7DC,EAAG,CACDC,SAAU,IACVC,SAAU,cACVC,UAAW,KAEbC,EAAG,CACDH,SAAU,IACVC,SAAU,cACVC,UAAW,KAEbE,EAAG,CACDJ,SAAU,IACVC,SAAU,cACVC,UAAW,KAEbG,MAAO,CACLL,SAAU,OACVC,SAAU,cACVC,UAAW"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var styled=require('styled-components');var style=require('../../shared/utils/style.js');var responsiveSize=require('../../mixins/responsive-size.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardMenuComponentProp=style.createShouldForwardProp(o=>!['black','elevated'].includes(o));const template=o=>`\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n box-shadow: 0 6px 20px ${o.shadowColor};\n`;const COLOR_SCHEMA={primary:styled.css(["",""],o=>template({backgroundColor:o.theme.colors['bg-onmain-primary'],borderColor:o.theme.colors.transparent,shadowColor:o.elevated?o.theme.colors['
|
|
1
|
+
'use strict';var styled=require('styled-components');var style=require('../../shared/utils/style.js');var responsiveSize=require('../../mixins/responsive-size.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardMenuComponentProp=style.createShouldForwardProp(o=>!['black','elevated'].includes(o));const template=o=>`\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n box-shadow: 0 6px 20px 0 ${o.shadowColor};\n`;const COLOR_SCHEMA={primary:styled.css(["",""],o=>template({backgroundColor:o.theme.colors['bg-onmain-primary'],borderColor:o.theme.colors.transparent,shadowColor:o.elevated?o.theme.colors['effect-shadow-medium']:o.theme.colors.transparent,...o.palette})),secondary:styled.css(["",""],o=>template({backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],shadowColor:o.elevated?o.theme.colors['effect-shadow-medium']:o.theme.colors.transparent,...o.palette}))};const Root=styled__default.default.div.withConfig({shouldForwardProp:shouldForwardMenuComponentProp}).withConfig({displayName:"MenuComponent__Root",componentId:"ui__sc-10iu45v-0"})(["box-sizing:border-box;isolation:isolate;border-radius:12px;border:1px solid transparent;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;"," ",""],o=>o.secondary?COLOR_SCHEMA.secondary:COLOR_SCHEMA.primary,responsiveSize.responsiveSize);exports.COLOR_SCHEMA=COLOR_SCHEMA,exports.Root=Root;
|
|
2
2
|
//# sourceMappingURL=style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../../src/components/MenuComponent/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport type { StyledMenuComponentProps, MenuComponentPalette } from './types'\n\nconst shouldForwardMenuComponentProp = createShouldForwardProp((propKey) => !['black', 'elevated'].includes(propKey))\n\nconst template = (palette: MenuComponentPalette) => `\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n box-shadow: 0 6px 20px ${palette.shadowColor};\n`\n\nexport const COLOR_SCHEMA = {\n primary: css<StyledMenuComponentProps>`\n ${(props) =>\n template({\n backgroundColor: props.theme.colors['bg-onmain-primary'],\n borderColor: props.theme.colors.transparent,\n shadowColor: props.elevated ? props.theme.colors['
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../../src/components/MenuComponent/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport type { StyledMenuComponentProps, MenuComponentPalette } from './types'\n\nconst shouldForwardMenuComponentProp = createShouldForwardProp((propKey) => !['black', 'elevated'].includes(propKey))\n\nconst template = (palette: MenuComponentPalette) => `\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n box-shadow: 0 6px 20px 0 ${palette.shadowColor};\n`\n\nexport const COLOR_SCHEMA = {\n primary: css<StyledMenuComponentProps>`\n ${(props) =>\n template({\n backgroundColor: props.theme.colors['bg-onmain-primary'],\n borderColor: props.theme.colors.transparent,\n shadowColor: props.elevated ? props.theme.colors['effect-shadow-medium'] : props.theme.colors.transparent,\n ...props.palette,\n })}\n `,\n secondary: css<StyledMenuComponentProps>`\n ${(props) =>\n template({\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n shadowColor: props.elevated ? props.theme.colors['effect-shadow-medium'] : props.theme.colors.transparent,\n ...props.palette,\n })}\n `,\n}\n\nexport const Root = styled.div.withConfig<StyledMenuComponentProps>({\n shouldForwardProp: shouldForwardMenuComponentProp,\n})`\n box-sizing: border-box;\n isolation: isolate;\n border-radius: 12px;\n border: 1px solid transparent;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-width: thin;\n\n ${(props) => {\n return props.secondary ? COLOR_SCHEMA.secondary : COLOR_SCHEMA.primary\n }}\n\n ${responsiveSize}\n`\n"],"names":["shouldForwardMenuComponentProp","createShouldForwardProp","propKey","includes","template","palette","backgroundColor","borderColor","shadowColor","COLOR_SCHEMA","primary","css","props","theme","colors","transparent","elevated","secondary","Root","styled","div","withConfig","shouldForwardProp","displayName","componentId","responsiveSize"],"mappings":"iRAKA,MAAMA,+BAAiCC,MAAAA,wBAAyBC,IAAa,CAAC,QAAS,YAAYC,SAASD,IAE5G,MAAME,SAAYC,GAAkC,yBAC9BA,EAAQC,qCACZD,EAAQE,4CACGF,EAAQG,iBAG9B,MAAMC,aAAe,CAC1BC,QAASC,OAAAA,IAAG,CAAA,GAAA,IACPC,GACDR,SAAS,CACPE,gBAAiBM,EAAMC,MAAMC,OAAO,qBACpCP,YAAaK,EAAMC,MAAMC,OAAOC,YAChCP,YAAaI,EAAMI,SAAWJ,EAAMC,MAAMC,OAAO,wBAA0BF,EAAMC,MAAMC,OAAOC,eAC3FH,EAAMP,WAGfY,UAAWN,OAAAA,IAAG,CAAA,GAAA,IACTC,GACDR,SAAS,CACPE,gBAAiBM,EAAMC,MAAMC,OAAO,uBACpCP,YAAaK,EAAMC,MAAMC,OAAO,+BAChCN,YAAaI,EAAMI,SAAWJ,EAAMC,MAAMC,OAAO,wBAA0BF,EAAMC,MAAMC,OAAOC,eAC3FH,EAAMP,YAKV,MAAMa,KAAOC,gBAAAA,QAAOC,IAAIC,WAAqC,CAClEC,kBAAmBtB,iCACnBqB,WAAA,CAAAE,YAAA,sBAAAC,YAAA,oBAFkBL,CAElB,CAAA,kJAAA,IAAA,IASGP,GACMA,EAAMK,UAAYR,aAAaQ,UAAYR,aAAaC,QAG/De,eAAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import styled,{css}from'styled-components';import{createShouldForwardProp}from'../../shared/utils/style.mjs';import{responsiveSize}from'../../mixins/responsive-size.mjs';const shouldForwardMenuComponentProp=createShouldForwardProp(o=>!['black','elevated'].includes(o));const template=o=>`\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n box-shadow: 0 6px 20px ${o.shadowColor};\n`;const COLOR_SCHEMA={primary:css(["",""],o=>template({backgroundColor:o.theme.colors['bg-onmain-primary'],borderColor:o.theme.colors.transparent,shadowColor:o.elevated?o.theme.colors['
|
|
1
|
+
import styled,{css}from'styled-components';import{createShouldForwardProp}from'../../shared/utils/style.mjs';import{responsiveSize}from'../../mixins/responsive-size.mjs';const shouldForwardMenuComponentProp=createShouldForwardProp(o=>!['black','elevated'].includes(o));const template=o=>`\n background-color: ${o.backgroundColor};\n border-color: ${o.borderColor};\n box-shadow: 0 6px 20px 0 ${o.shadowColor};\n`;const COLOR_SCHEMA={primary:css(["",""],o=>template({backgroundColor:o.theme.colors['bg-onmain-primary'],borderColor:o.theme.colors.transparent,shadowColor:o.elevated?o.theme.colors['effect-shadow-medium']:o.theme.colors.transparent,...o.palette})),secondary:css(["",""],o=>template({backgroundColor:o.theme.colors['bg-onmain-secondary'],borderColor:o.theme.colors['border-onmain-default-large'],shadowColor:o.elevated?o.theme.colors['effect-shadow-medium']:o.theme.colors.transparent,...o.palette}))};const Root=styled.div.withConfig({shouldForwardProp:shouldForwardMenuComponentProp}).withConfig({displayName:"MenuComponent__Root",componentId:"ui__sc-10iu45v-0"})(["box-sizing:border-box;isolation:isolate;border-radius:12px;border:1px solid transparent;overflow-x:hidden;overflow-y:auto;scrollbar-width:thin;"," ",""],o=>o.secondary?COLOR_SCHEMA.secondary:COLOR_SCHEMA.primary,responsiveSize);export{COLOR_SCHEMA,Root};
|
|
2
2
|
//# sourceMappingURL=style.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","sources":["../../../../src/components/MenuComponent/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport type { StyledMenuComponentProps, MenuComponentPalette } from './types'\n\nconst shouldForwardMenuComponentProp = createShouldForwardProp((propKey) => !['black', 'elevated'].includes(propKey))\n\nconst template = (palette: MenuComponentPalette) => `\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n box-shadow: 0 6px 20px ${palette.shadowColor};\n`\n\nexport const COLOR_SCHEMA = {\n primary: css<StyledMenuComponentProps>`\n ${(props) =>\n template({\n backgroundColor: props.theme.colors['bg-onmain-primary'],\n borderColor: props.theme.colors.transparent,\n shadowColor: props.elevated ? props.theme.colors['
|
|
1
|
+
{"version":3,"file":"style.mjs","sources":["../../../../src/components/MenuComponent/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport type { StyledMenuComponentProps, MenuComponentPalette } from './types'\n\nconst shouldForwardMenuComponentProp = createShouldForwardProp((propKey) => !['black', 'elevated'].includes(propKey))\n\nconst template = (palette: MenuComponentPalette) => `\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n box-shadow: 0 6px 20px 0 ${palette.shadowColor};\n`\n\nexport const COLOR_SCHEMA = {\n primary: css<StyledMenuComponentProps>`\n ${(props) =>\n template({\n backgroundColor: props.theme.colors['bg-onmain-primary'],\n borderColor: props.theme.colors.transparent,\n shadowColor: props.elevated ? props.theme.colors['effect-shadow-medium'] : props.theme.colors.transparent,\n ...props.palette,\n })}\n `,\n secondary: css<StyledMenuComponentProps>`\n ${(props) =>\n template({\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n shadowColor: props.elevated ? props.theme.colors['effect-shadow-medium'] : props.theme.colors.transparent,\n ...props.palette,\n })}\n `,\n}\n\nexport const Root = styled.div.withConfig<StyledMenuComponentProps>({\n shouldForwardProp: shouldForwardMenuComponentProp,\n})`\n box-sizing: border-box;\n isolation: isolate;\n border-radius: 12px;\n border: 1px solid transparent;\n overflow-x: hidden;\n overflow-y: auto;\n scrollbar-width: thin;\n\n ${(props) => {\n return props.secondary ? COLOR_SCHEMA.secondary : COLOR_SCHEMA.primary\n }}\n\n ${responsiveSize}\n`\n"],"names":["shouldForwardMenuComponentProp","createShouldForwardProp","propKey","includes","template","palette","backgroundColor","borderColor","shadowColor","COLOR_SCHEMA","primary","css","props","theme","colors","transparent","elevated","secondary","Root","styled","div","withConfig","shouldForwardProp","displayName","componentId","responsiveSize"],"mappings":"0KAKA,MAAMA,+BAAiCC,wBAAyBC,IAAa,CAAC,QAAS,YAAYC,SAASD,IAE5G,MAAME,SAAYC,GAAkC,yBAC9BA,EAAQC,qCACZD,EAAQE,4CACGF,EAAQG,iBAG9B,MAAMC,aAAe,CAC1BC,QAASC,IAAG,CAAA,GAAA,IACPC,GACDR,SAAS,CACPE,gBAAiBM,EAAMC,MAAMC,OAAO,qBACpCP,YAAaK,EAAMC,MAAMC,OAAOC,YAChCP,YAAaI,EAAMI,SAAWJ,EAAMC,MAAMC,OAAO,wBAA0BF,EAAMC,MAAMC,OAAOC,eAC3FH,EAAMP,WAGfY,UAAWN,IAAG,CAAA,GAAA,IACTC,GACDR,SAAS,CACPE,gBAAiBM,EAAMC,MAAMC,OAAO,uBACpCP,YAAaK,EAAMC,MAAMC,OAAO,+BAChCN,YAAaI,EAAMI,SAAWJ,EAAMC,MAAMC,OAAO,wBAA0BF,EAAMC,MAAMC,OAAOC,eAC3FH,EAAMP,YAKV,MAAMa,KAAOC,OAAOC,IAAIC,WAAqC,CAClEC,kBAAmBtB,iCACnBqB,WAAA,CAAAE,YAAA,sBAAAC,YAAA,oBAFkBL,CAElB,CAAA,kJAAA,IAAA,IASGP,GACMA,EAAMK,UAAYR,aAAaQ,UAAYR,aAAaC,QAG/De"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var React=require('react');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var index=require('../../icon-pack/src/icons/Close/index.js');exports.MenuContainer=React.forwardRef((e,s)=>{const{closeButtonProps:r={},children:n,showCloseButton:t,closeFn:i
|
|
1
|
+
'use strict';var React=require('react');var style=require('./style.js');var jsxRuntime=require('react/jsx-runtime');var index=require('../../icon-pack/src/icons/Close/index.js');exports.MenuContainer=React.forwardRef((e,s)=>{const{closeButtonProps:r={},children:n,showCloseButton:t,closeFn:o,...i}=e;return jsxRuntime.jsxs(style.Root,{...i,ref:s,children:[t?jsxRuntime.jsx(style.CloseButton,{square:!0,secondary:!0,size:"m",icon:jsxRuntime.jsx(index.Close,{}),...r,onClick:e=>{o&&o(),r.onClick&&r.onClick(e)}}):null,n]})});
|
|
2
2
|
//# sourceMappingURL=MenuContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuContainer.js","sources":["../../../../src/components/MenuContainer/MenuContainer.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { Close } from '@foxford/icon-pack'\nimport * as Styled from './style'\nimport type { MenuContainerProps } from './types'\n\n/**\n *\n *
|
|
1
|
+
{"version":3,"file":"MenuContainer.js","sources":["../../../../src/components/MenuContainer/MenuContainer.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { Close } from '@foxford/icon-pack'\nimport * as Styled from './style'\nimport type { MenuContainerProps } from './types'\n\n/**\n *\n * Компонент контейнера для произвольного контента в выпадающем меню.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<div\\> элемента.\n */\nconst MenuContainer: React.ForwardRefExoticComponent<MenuContainerProps> = forwardRef<\n HTMLDivElement,\n MenuContainerProps\n>((props, ref) => {\n const { closeButtonProps = {}, children, showCloseButton, closeFn, ...restProps } = props\n\n return (\n <Styled.Root {...restProps} ref={ref}>\n {showCloseButton ? (\n <Styled.CloseButton\n square\n secondary\n size='m'\n icon={<Close />}\n {...closeButtonProps}\n onClick={(evt) => {\n if (closeFn) closeFn()\n if (closeButtonProps.onClick) closeButtonProps.onClick(evt)\n }}\n />\n ) : null}\n {children}\n </Styled.Root>\n )\n})\n\nexport { MenuContainer }\n"],"names":["forwardRef","props","ref","closeButtonProps","children","showCloseButton","closeFn","restProps","_jsxs","Styled","_jsx","square","secondary","size","icon","Close","onClick","evt"],"mappings":"wMAW2EA,MAAAA,WAGzE,CAACC,EAAOC,KACR,MAAMC,iBAAEA,EAAmB,CAAA,EAAEC,SAAEA,EAAQC,gBAAEA,EAAeC,QAAEA,KAAYC,GAAcN,EAEpF,OACEO,WAAAA,KAACC,MAAAA,KAAW,IAAKF,EAAWL,IAAKA,EAAIE,UAClCC,EACCK,WAAAA,IAACD,kBAAkB,CACjBE,QAAM,EACNC,WAAS,EACTC,KAAK,IACLC,KAAMJ,WAAAA,IAACK,MAAAA,aACHZ,EACJa,QAAUC,IACJX,GAASA,IACTH,EAAiBa,SAASb,EAAiBa,QAAQC,MAGzD,KACHb"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{forwardRef}from'react';import{Root,CloseButton}from'./style.mjs';import{jsxs,jsx}from'react/jsx-runtime';import{Close}from'../../icon-pack/src/icons/Close/index.mjs';const MenuContainer=forwardRef((o,s)=>{const{closeButtonProps:e={},children:r,showCloseButton:n,closeFn:t,...
|
|
1
|
+
import{forwardRef}from'react';import{Root,CloseButton}from'./style.mjs';import{jsxs,jsx}from'react/jsx-runtime';import{Close}from'../../icon-pack/src/icons/Close/index.mjs';const MenuContainer=forwardRef((o,s)=>{const{closeButtonProps:e={},children:r,showCloseButton:n,closeFn:t,...c}=o;return jsxs(Root,{...c,ref:s,children:[n?jsx(CloseButton,{square:!0,secondary:!0,size:"m",icon:jsx(Close,{}),...e,onClick:o=>{t&&t(),e.onClick&&e.onClick(o)}}):null,r]})});export{MenuContainer};
|
|
2
2
|
//# sourceMappingURL=MenuContainer.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuContainer.mjs","sources":["../../../../src/components/MenuContainer/MenuContainer.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { Close } from '@foxford/icon-pack'\nimport * as Styled from './style'\nimport type { MenuContainerProps } from './types'\n\n/**\n *\n *
|
|
1
|
+
{"version":3,"file":"MenuContainer.mjs","sources":["../../../../src/components/MenuContainer/MenuContainer.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { Close } from '@foxford/icon-pack'\nimport * as Styled from './style'\nimport type { MenuContainerProps } from './types'\n\n/**\n *\n * Компонент контейнера для произвольного контента в выпадающем меню.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<div\\> элемента.\n */\nconst MenuContainer: React.ForwardRefExoticComponent<MenuContainerProps> = forwardRef<\n HTMLDivElement,\n MenuContainerProps\n>((props, ref) => {\n const { closeButtonProps = {}, children, showCloseButton, closeFn, ...restProps } = props\n\n return (\n <Styled.Root {...restProps} ref={ref}>\n {showCloseButton ? (\n <Styled.CloseButton\n square\n secondary\n size='m'\n icon={<Close />}\n {...closeButtonProps}\n onClick={(evt) => {\n if (closeFn) closeFn()\n if (closeButtonProps.onClick) closeButtonProps.onClick(evt)\n }}\n />\n ) : null}\n {children}\n </Styled.Root>\n )\n})\n\nexport { MenuContainer }\n"],"names":["MenuContainer","forwardRef","props","ref","closeButtonProps","children","showCloseButton","closeFn","restProps","_jsxs","Styled","_jsx","square","secondary","size","icon","Close","onClick","evt"],"mappings":"6KAWA,MAAMA,cAAqEC,WAGzE,CAACC,EAAOC,KACR,MAAMC,iBAAEA,EAAmB,CAAA,EAAEC,SAAEA,EAAQC,gBAAEA,EAAeC,QAAEA,KAAYC,GAAcN,EAEpF,OACEO,KAACC,KAAW,IAAKF,EAAWL,IAAKA,EAAIE,UAClCC,EACCK,IAACD,YAAkB,CACjBE,QAAM,EACNC,WAAS,EACTC,KAAK,IACLC,KAAMJ,IAACK,aACHZ,EACJa,QAAUC,IACJX,GAASA,IACTH,EAAiBa,SAASb,EAAiBa,QAAQC,MAGzD,KACHb"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';var styled=require('styled-components');var style=require('../../shared/utils/style.js');var IconButton=require('../IconButton/IconButton.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardMenuContainerProp=style.createShouldForwardProp();const Root=styled__default.default.div.withConfig({shouldForwardProp:shouldForwardMenuContainerProp}).withConfig({displayName:"MenuContainer__Root",componentId:"ui__sc-1u4llna-0"})(["box-sizing:border-box;position:relative;padding:8px;border-radius:inherit;"]);const CloseButton=styled__default.default(IconButton.IconButton).withConfig({displayName:"MenuContainer__CloseButton",componentId:"ui__sc-1u4llna-1"})(["position:absolute;top:
|
|
1
|
+
'use strict';var styled=require('styled-components');var style=require('../../shared/utils/style.js');var IconButton=require('../IconButton/IconButton.js');function _interopDefault(o){return o&&o.__esModule?o:{default:o}}var styled__default=_interopDefault(styled);const shouldForwardMenuContainerProp=style.createShouldForwardProp();const Root=styled__default.default.div.withConfig({shouldForwardProp:shouldForwardMenuContainerProp}).withConfig({displayName:"MenuContainer__Root",componentId:"ui__sc-1u4llna-0"})(["box-sizing:border-box;position:relative;padding:8px;border-radius:inherit;"]);const CloseButton=styled__default.default(IconButton.IconButton).withConfig({displayName:"MenuContainer__CloseButton",componentId:"ui__sc-1u4llna-1"})(["position:absolute;top:6px;right:8px;"]);exports.CloseButton=CloseButton,exports.Root=Root;
|
|
2
2
|
//# sourceMappingURL=style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../../src/components/MenuContainer/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { IconButton } from 'components/IconButton'\nimport type { StyledMenuContainerProps } from './types'\n\nconst shouldForwardMenuContainerProp = createShouldForwardProp()\n\nexport const Root = styled.div.withConfig<StyledMenuContainerProps>({\n shouldForwardProp: shouldForwardMenuContainerProp,\n})`\n box-sizing: border-box;\n position: relative;\n padding: 8px;\n border-radius: inherit;\n`\n\nexport const CloseButton = styled(IconButton)`\n position: absolute;\n top:
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../../src/components/MenuContainer/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { IconButton } from 'components/IconButton'\nimport type { StyledMenuContainerProps } from './types'\n\nconst shouldForwardMenuContainerProp = createShouldForwardProp()\n\nexport const Root = styled.div.withConfig<StyledMenuContainerProps>({\n shouldForwardProp: shouldForwardMenuContainerProp,\n})`\n box-sizing: border-box;\n position: relative;\n padding: 8px;\n border-radius: inherit;\n`\n\nexport const CloseButton = styled(IconButton)`\n position: absolute;\n top: 6px;\n right: 8px;\n`\n"],"names":["shouldForwardMenuContainerProp","createShouldForwardProp","Root","styled","div","withConfig","shouldForwardProp","displayName","componentId","CloseButton","IconButton"],"mappings":"yQAKA,MAAMA,+BAAiCC,MAAAA,0BAEhC,MAAMC,KAAOC,gBAAAA,QAAOC,IAAIC,WAAqC,CAClEC,kBAAmBN,iCACnBK,WAAA,CAAAE,YAAA,sBAAAC,YAAA,oBAFkBL,CAElB,CAAA,+EAOK,MAAMM,YAAcN,gBAAAA,QAAOO,uBAAWL,WAAA,CAAAE,YAAA,6BAAAC,YAAA,oBAAlBL,CAAkB,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import styled from'styled-components';import{createShouldForwardProp}from'../../shared/utils/style.mjs';import{IconButton}from'../IconButton/IconButton.mjs';const shouldForwardMenuContainerProp=createShouldForwardProp();const Root=styled.div.withConfig({shouldForwardProp:shouldForwardMenuContainerProp}).withConfig({displayName:"MenuContainer__Root",componentId:"ui__sc-1u4llna-0"})(["box-sizing:border-box;position:relative;padding:8px;border-radius:inherit;"]);const CloseButton=styled(IconButton).withConfig({displayName:"MenuContainer__CloseButton",componentId:"ui__sc-1u4llna-1"})(["position:absolute;top:
|
|
1
|
+
import styled from'styled-components';import{createShouldForwardProp}from'../../shared/utils/style.mjs';import{IconButton}from'../IconButton/IconButton.mjs';const shouldForwardMenuContainerProp=createShouldForwardProp();const Root=styled.div.withConfig({shouldForwardProp:shouldForwardMenuContainerProp}).withConfig({displayName:"MenuContainer__Root",componentId:"ui__sc-1u4llna-0"})(["box-sizing:border-box;position:relative;padding:8px;border-radius:inherit;"]);const CloseButton=styled(IconButton).withConfig({displayName:"MenuContainer__CloseButton",componentId:"ui__sc-1u4llna-1"})(["position:absolute;top:6px;right:8px;"]);export{CloseButton,Root};
|
|
2
2
|
//# sourceMappingURL=style.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","sources":["../../../../src/components/MenuContainer/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { IconButton } from 'components/IconButton'\nimport type { StyledMenuContainerProps } from './types'\n\nconst shouldForwardMenuContainerProp = createShouldForwardProp()\n\nexport const Root = styled.div.withConfig<StyledMenuContainerProps>({\n shouldForwardProp: shouldForwardMenuContainerProp,\n})`\n box-sizing: border-box;\n position: relative;\n padding: 8px;\n border-radius: inherit;\n`\n\nexport const CloseButton = styled(IconButton)`\n position: absolute;\n top:
|
|
1
|
+
{"version":3,"file":"style.mjs","sources":["../../../../src/components/MenuContainer/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { IconButton } from 'components/IconButton'\nimport type { StyledMenuContainerProps } from './types'\n\nconst shouldForwardMenuContainerProp = createShouldForwardProp()\n\nexport const Root = styled.div.withConfig<StyledMenuContainerProps>({\n shouldForwardProp: shouldForwardMenuContainerProp,\n})`\n box-sizing: border-box;\n position: relative;\n padding: 8px;\n border-radius: inherit;\n`\n\nexport const CloseButton = styled(IconButton)`\n position: absolute;\n top: 6px;\n right: 8px;\n`\n"],"names":["shouldForwardMenuContainerProp","createShouldForwardProp","Root","styled","div","withConfig","shouldForwardProp","displayName","componentId","CloseButton","IconButton"],"mappings":"6JAKA,MAAMA,+BAAiCC,0BAEhC,MAAMC,KAAOC,OAAOC,IAAIC,WAAqC,CAClEC,kBAAmBN,iCACnBK,WAAA,CAAAE,YAAA,sBAAAC,YAAA,oBAFkBL,CAElB,CAAA,+EAOK,MAAMM,YAAcN,OAAOO,YAAWL,WAAA,CAAAE,YAAA,6BAAAC,YAAA,oBAAlBL,CAAkB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.js","sources":["../../../../src/components/MenuList/MenuList.tsx"],"sourcesContent":["import { forwardRef, Children, isValidElement, cloneElement, Fragment } from 'react'\nimport { focusFirstFocusable } from 'shared/utils/dom'\nimport { keyboardKeys } from 'shared/constants'\nimport type { MenuListProps } from './types'\nimport * as Styled from './style'\n\nconst HOT_KEYS: string[] = [...keyboardKeys.ArrowUp.key, ...keyboardKeys.ArrowDown.key]\n\n/**\n *\n *
|
|
1
|
+
{"version":3,"file":"MenuList.js","sources":["../../../../src/components/MenuList/MenuList.tsx"],"sourcesContent":["import { forwardRef, Children, isValidElement, cloneElement, Fragment } from 'react'\nimport { focusFirstFocusable } from 'shared/utils/dom'\nimport { keyboardKeys } from 'shared/constants'\nimport type { MenuListProps } from './types'\nimport * as Styled from './style'\n\nconst HOT_KEYS: string[] = [...keyboardKeys.ArrowUp.key, ...keyboardKeys.ArrowDown.key]\n\n/**\n *\n * Компонент списка элементов в выпадающем меню.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<ul\\> элемента.\n */\nconst MenuList: React.ForwardRefExoticComponent<MenuListProps> = forwardRef<HTMLUListElement, MenuListProps>(\n (props, ref) => {\n const {\n role = 'list',\n gap = 4,\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n sizeUnits,\n sizes,\n ...restProps\n } = props\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n sizeUnits,\n sizes,\n }\n\n const children =\n isValidElement(restProps.children) &&\n restProps.children.type === Fragment &&\n typeof restProps.children.props === 'object' &&\n restProps.children.props !== null\n ? restProps.children.props.children\n : restProps.children\n\n return (\n <Styled.Root\n {...restProps}\n role={role}\n gap={gap}\n onKeyDown={(evt) => {\n if (restProps.onKeyDown) restProps.onKeyDown(evt)\n\n if (HOT_KEYS.includes(evt.key)) {\n evt.preventDefault()\n\n const listItems = [...evt.currentTarget.children]\n let idx = listItems.findIndex((item) => item.contains(evt.target as Node))\n\n do {\n // eslint-disable-next-line no-useless-assignment\n idx = keyboardKeys.ArrowUp.validate(evt.key) ? --idx : ++idx\n\n if (idx < 0) {\n idx = listItems.length - 1\n } else if (idx > listItems.length - 1) {\n idx = 0\n }\n } while (!(listItems[idx] instanceof HTMLElement && focusFirstFocusable(listItems[idx] as HTMLElement)))\n }\n }}\n ref={ref}\n >\n {Children.map(children, (child, idx) => {\n if (isValidElement(child)) {\n const childProps = typeof child.props === 'object' && child.props !== null ? child.props : {}\n\n return <li key={idx}>{cloneElement(child, { ...sizeProps, ...childProps })}</li>\n }\n\n return child === null || child === undefined || typeof child === 'boolean' ? (\n child\n ) : (\n <li key={idx}>{child}</li>\n )\n })}\n </Styled.Root>\n )\n }\n)\n\nexport { MenuList }\n"],"names":["HOT_KEYS","keyboardKeys","ArrowUp","key","ArrowDown","forwardRef","props","ref","role","gap","size","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","sizeUnits","sizes","restProps","sizeProps","children","isValidElement","type","Fragment","_jsx","Styled","onKeyDown","evt","includes","preventDefault","listItems","currentTarget","idx","findIndex","item","contains","target","validate","length","HTMLElement","focusFirstFocusable","Children","map","child","cloneElement","undefined"],"mappings":"oNAMA,MAAMA,SAAqB,IAAIC,UAAAA,aAAaC,QAAQC,OAAQF,UAAAA,aAAaG,UAAUD,sBAQlBE,MAAAA,WAC/D,CAACC,EAAOC,KACN,MAAMC,KACJA,EAAO,OAAMC,IACbA,EAAM,EAACC,KACPA,EAAIC,QACJA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,EAAMC,UACNA,EAASC,MACTA,KACGC,GACDb,EAEJ,MAAMc,EAAY,CAChBV,OACAC,UACAC,SACAC,QACAC,QACAC,QACAC,SACAC,YACAC,SAGF,MAAMG,EACJC,MAAAA,eAAeH,EAAUE,WACzBF,EAAUE,SAASE,OAASC,uBACrBL,EAAUE,SAASf,OAAU,UACpCa,EAAUE,SAASf,QAAU,KACzBa,EAAUE,SAASf,MAAMe,SACzBF,EAAUE,SAEhB,OACEI,WAAAA,IAACC,MAAAA,KAAW,IACNP,EACJX,KAAMA,EACNC,IAAKA,EACLkB,UAAYC,IAGV,GAFIT,EAAUQ,WAAWR,EAAUQ,UAAUC,GAEzC5B,SAAS6B,SAASD,EAAIzB,KAAM,CAC9ByB,EAAIE,iBAEJ,MAAMC,EAAY,IAAIH,EAAII,cAAcX,UACxC,IAAIY,EAAMF,EAAUG,UAAWC,GAASA,EAAKC,SAASR,EAAIS,SAE1D,GAEEJ,EAAMhC,UAAAA,aAAaC,QAAQoC,SAASV,EAAIzB,OAAS8B,IAAQA,EAErDA,EAAM,EACRA,EAAMF,EAAUQ,OAAS,EAChBN,EAAMF,EAAUQ,OAAS,IAClCN,EAAM,WAECF,EAAUE,aAAgBO,aAAeC,wBAAoBV,EAAUE,KACpF,GAEF1B,IAAKA,EAAIc,SAERqB,MAAAA,SAASC,IAAItB,EAAU,CAACuB,EAAOX,IAC1BX,MAAAA,eAAesB,GAGVnB,WAAAA,IAAA,KAAA,CAAAJ,SAAewB,MAAAA,aAAaD,EAAO,IAAKxB,YAFrBwB,EAAMtC,OAAU,UAAYsC,EAAMtC,QAAU,KAAOsC,EAAMtC,MAAQ,CAAA,KAE3E2B,GAGXW,IAAU,MAAQA,SAAUE,UAAoBF,GAAU,UAC/DA,EAEAnB,WAAAA,IAAA,KAAA,CAAAJ,SAAeuB,GAANX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuList.mjs","sources":["../../../../src/components/MenuList/MenuList.tsx"],"sourcesContent":["import { forwardRef, Children, isValidElement, cloneElement, Fragment } from 'react'\nimport { focusFirstFocusable } from 'shared/utils/dom'\nimport { keyboardKeys } from 'shared/constants'\nimport type { MenuListProps } from './types'\nimport * as Styled from './style'\n\nconst HOT_KEYS: string[] = [...keyboardKeys.ArrowUp.key, ...keyboardKeys.ArrowDown.key]\n\n/**\n *\n *
|
|
1
|
+
{"version":3,"file":"MenuList.mjs","sources":["../../../../src/components/MenuList/MenuList.tsx"],"sourcesContent":["import { forwardRef, Children, isValidElement, cloneElement, Fragment } from 'react'\nimport { focusFirstFocusable } from 'shared/utils/dom'\nimport { keyboardKeys } from 'shared/constants'\nimport type { MenuListProps } from './types'\nimport * as Styled from './style'\n\nconst HOT_KEYS: string[] = [...keyboardKeys.ArrowUp.key, ...keyboardKeys.ArrowDown.key]\n\n/**\n *\n * Компонент списка элементов в выпадающем меню.\n *\n * Поддерживается \"ref\" и все нативные атрибуты \\<ul\\> элемента.\n */\nconst MenuList: React.ForwardRefExoticComponent<MenuListProps> = forwardRef<HTMLUListElement, MenuListProps>(\n (props, ref) => {\n const {\n role = 'list',\n gap = 4,\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n sizeUnits,\n sizes,\n ...restProps\n } = props\n\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n sizeUnits,\n sizes,\n }\n\n const children =\n isValidElement(restProps.children) &&\n restProps.children.type === Fragment &&\n typeof restProps.children.props === 'object' &&\n restProps.children.props !== null\n ? restProps.children.props.children\n : restProps.children\n\n return (\n <Styled.Root\n {...restProps}\n role={role}\n gap={gap}\n onKeyDown={(evt) => {\n if (restProps.onKeyDown) restProps.onKeyDown(evt)\n\n if (HOT_KEYS.includes(evt.key)) {\n evt.preventDefault()\n\n const listItems = [...evt.currentTarget.children]\n let idx = listItems.findIndex((item) => item.contains(evt.target as Node))\n\n do {\n // eslint-disable-next-line no-useless-assignment\n idx = keyboardKeys.ArrowUp.validate(evt.key) ? --idx : ++idx\n\n if (idx < 0) {\n idx = listItems.length - 1\n } else if (idx > listItems.length - 1) {\n idx = 0\n }\n } while (!(listItems[idx] instanceof HTMLElement && focusFirstFocusable(listItems[idx] as HTMLElement)))\n }\n }}\n ref={ref}\n >\n {Children.map(children, (child, idx) => {\n if (isValidElement(child)) {\n const childProps = typeof child.props === 'object' && child.props !== null ? child.props : {}\n\n return <li key={idx}>{cloneElement(child, { ...sizeProps, ...childProps })}</li>\n }\n\n return child === null || child === undefined || typeof child === 'boolean' ? (\n child\n ) : (\n <li key={idx}>{child}</li>\n )\n })}\n </Styled.Root>\n )\n }\n)\n\nexport { MenuList }\n"],"names":["HOT_KEYS","keyboardKeys","ArrowUp","key","ArrowDown","MenuList","forwardRef","props","ref","role","gap","size","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","sizeUnits","sizes","restProps","sizeProps","children","isValidElement","type","Fragment","_jsx","Styled","onKeyDown","evt","includes","preventDefault","listItems","currentTarget","idx","findIndex","item","contains","target","validate","length","HTMLElement","focusFirstFocusable","Children","map","child","cloneElement","undefined"],"mappings":"8PAMA,MAAMA,SAAqB,IAAIC,aAAaC,QAAQC,OAAQF,aAAaG,UAAUD,KAQnF,MAAME,SAA2DC,WAC/D,CAACC,EAAOC,KACN,MAAMC,KACJA,EAAO,OAAMC,IACbA,EAAM,EAACC,KACPA,EAAIC,QACJA,EAAOC,OACPA,EAAMC,MACNA,EAAKC,MACLA,EAAKC,MACLA,EAAKC,OACLA,EAAMC,UACNA,EAASC,MACTA,KACGC,GACDb,EAEJ,MAAMc,EAAY,CAChBV,OACAC,UACAC,SACAC,QACAC,QACAC,QACAC,SACAC,YACAC,SAGF,MAAMG,EACJC,eAAeH,EAAUE,WACzBF,EAAUE,SAASE,OAASC,iBACrBL,EAAUE,SAASf,OAAU,UACpCa,EAAUE,SAASf,QAAU,KACzBa,EAAUE,SAASf,MAAMe,SACzBF,EAAUE,SAEhB,OACEI,IAACC,KAAW,IACNP,EACJX,KAAMA,EACNC,IAAKA,EACLkB,UAAYC,IAGV,GAFIT,EAAUQ,WAAWR,EAAUQ,UAAUC,GAEzC7B,SAAS8B,SAASD,EAAI1B,KAAM,CAC9B0B,EAAIE,iBAEJ,MAAMC,EAAY,IAAIH,EAAII,cAAcX,UACxC,IAAIY,EAAMF,EAAUG,UAAWC,GAASA,EAAKC,SAASR,EAAIS,SAE1D,GAEEJ,EAAMjC,aAAaC,QAAQqC,SAASV,EAAI1B,OAAS+B,IAAQA,EAErDA,EAAM,EACRA,EAAMF,EAAUQ,OAAS,EAChBN,EAAMF,EAAUQ,OAAS,IAClCN,EAAM,WAECF,EAAUE,aAAgBO,aAAeC,oBAAoBV,EAAUE,KACpF,GAEF1B,IAAKA,EAAIc,SAERqB,SAASC,IAAItB,EAAU,CAACuB,EAAOX,IAC1BX,eAAesB,GAGVnB,IAAA,KAAA,CAAAJ,SAAewB,aAAaD,EAAO,IAAKxB,YAFrBwB,EAAMtC,OAAU,UAAYsC,EAAMtC,QAAU,KAAOsC,EAAMtC,MAAQ,CAAA,KAE3E2B,GAGXW,IAAU,MAAQA,SAAUE,UAAoBF,GAAU,UAC/DA,EAEAnB,IAAA,KAAA,CAAAJ,SAAeuB,GAANX"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
'use strict';function _interopDefault(n){return n&&n.__esModule?n:{default:n}}const Root=_interopDefault(require('styled-components')).default.ul.withConfig({shouldForwardProp:n=>!['showCloseButton','closeButtonProps','closeFn','gap'].includes(n)}).withConfig({displayName:"MenuList__Root",componentId:"ui__sc-afqmnb-0"})(["",""],n=>`\n box-sizing: border-box;\n appearance: none;\n list-style-type: none;\n margin: 0;\n padding:
|
|
1
|
+
'use strict';function _interopDefault(n){return n&&n.__esModule?n:{default:n}}const Root=_interopDefault(require('styled-components')).default.ul.withConfig({shouldForwardProp:n=>!['showCloseButton','closeButtonProps','closeFn','gap'].includes(n)}).withConfig({displayName:"MenuList__Root",componentId:"ui__sc-afqmnb-0"})(["",""],n=>`\n box-sizing: border-box;\n appearance: none;\n list-style-type: none;\n margin: 0;\n padding: 6px;\n border-radius: inherit;\n\n & > li:not(:last-child) {\n margin-bottom: ${typeof n.gap=='string'?n.gap:`${n.gap}px`};\n } \n `);exports.Root=Root;
|
|
2
2
|
//# sourceMappingURL=style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../../src/components/MenuList/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport type { StyledMenuListProps } from './types'\n\nexport const Root = styled.ul.withConfig<StyledMenuListProps>({\n shouldForwardProp: (propKey) => !['showCloseButton', 'closeButtonProps', 'closeFn', 'gap'].includes(propKey),\n})`\n ${(props) => `\n box-sizing: border-box;\n appearance: none;\n list-style-type: none;\n margin: 0;\n padding:
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../../src/components/MenuList/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport type { StyledMenuListProps } from './types'\n\nexport const Root = styled.ul.withConfig<StyledMenuListProps>({\n shouldForwardProp: (propKey) => !['showCloseButton', 'closeButtonProps', 'closeFn', 'gap'].includes(propKey),\n})`\n ${(props) => `\n box-sizing: border-box;\n appearance: none;\n list-style-type: none;\n margin: 0;\n padding: 6px;\n border-radius: inherit;\n\n & > li:not(:last-child) {\n margin-bottom: ${typeof props.gap === 'string' ? props.gap : `${props.gap}px`};\n } \n `}\n`\n"],"names":["Root","styled","ul","withConfig","shouldForwardProp","propKey","includes","displayName","componentId","props","gap"],"mappings":"8EAGO,MAAMA,mDAAOC,QAAOC,GAAGC,WAAgC,CAC5DC,kBAAoBC,IAAa,CAAC,kBAAmB,mBAAoB,UAAW,OAAOC,SAASD,KACpGF,WAAA,CAAAI,YAAA,iBAAAC,YAAA,mBAFkBP,CAElB,CAAA,GAAA,IACGQ,GAAU,kNASeA,EAAMC,KAAQ,SAAWD,EAAMC,IAAM,GAAGD,EAAMC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import styled from'styled-components';const Root=styled.ul.withConfig({shouldForwardProp:n=>!['showCloseButton','closeButtonProps','closeFn','gap'].includes(n)}).withConfig({displayName:"MenuList__Root",componentId:"ui__sc-afqmnb-0"})(["",""],n=>`\n box-sizing: border-box;\n appearance: none;\n list-style-type: none;\n margin: 0;\n padding:
|
|
1
|
+
import styled from'styled-components';const Root=styled.ul.withConfig({shouldForwardProp:n=>!['showCloseButton','closeButtonProps','closeFn','gap'].includes(n)}).withConfig({displayName:"MenuList__Root",componentId:"ui__sc-afqmnb-0"})(["",""],n=>`\n box-sizing: border-box;\n appearance: none;\n list-style-type: none;\n margin: 0;\n padding: 6px;\n border-radius: inherit;\n\n & > li:not(:last-child) {\n margin-bottom: ${typeof n.gap=='string'?n.gap:`${n.gap}px`};\n } \n `);export{Root};
|
|
2
2
|
//# sourceMappingURL=style.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.mjs","sources":["../../../../src/components/MenuList/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport type { StyledMenuListProps } from './types'\n\nexport const Root = styled.ul.withConfig<StyledMenuListProps>({\n shouldForwardProp: (propKey) => !['showCloseButton', 'closeButtonProps', 'closeFn', 'gap'].includes(propKey),\n})`\n ${(props) => `\n box-sizing: border-box;\n appearance: none;\n list-style-type: none;\n margin: 0;\n padding:
|
|
1
|
+
{"version":3,"file":"style.mjs","sources":["../../../../src/components/MenuList/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport type { StyledMenuListProps } from './types'\n\nexport const Root = styled.ul.withConfig<StyledMenuListProps>({\n shouldForwardProp: (propKey) => !['showCloseButton', 'closeButtonProps', 'closeFn', 'gap'].includes(propKey),\n})`\n ${(props) => `\n box-sizing: border-box;\n appearance: none;\n list-style-type: none;\n margin: 0;\n padding: 6px;\n border-radius: inherit;\n\n & > li:not(:last-child) {\n margin-bottom: ${typeof props.gap === 'string' ? props.gap : `${props.gap}px`};\n } \n `}\n`\n"],"names":["Root","styled","ul","withConfig","shouldForwardProp","propKey","includes","displayName","componentId","props","gap"],"mappings":"sCAGO,MAAMA,KAAOC,OAAOC,GAAGC,WAAgC,CAC5DC,kBAAoBC,IAAa,CAAC,kBAAmB,mBAAoB,UAAW,OAAOC,SAASD,KACpGF,WAAA,CAAAI,YAAA,iBAAAC,YAAA,mBAFkBP,CAElB,CAAA,GAAA,IACGQ,GAAU,kNASeA,EAAMC,KAAQ,SAAWD,EAAMC,IAAM,GAAGD,EAAMC"}
|