@zydon/common 2.7.75 → 2.7.77
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/dist/{chunk-VPKUUY5Q.js → chunk-74KBZX6F.js} +2 -2
- package/dist/chunk-QKKARUG5.js +20 -0
- package/dist/chunk-QKKARUG5.js.map +1 -0
- package/dist/{chunk-3UDEH2DM.js → chunk-YDLDZVF5.js} +3 -3
- package/dist/components/AvatarButton/index.js +3 -3
- package/dist/components/Common/index.js +3 -3
- package/dist/components/DynamicDataView/index.js +2 -2
- package/dist/components/FileUpload/index.js +3 -3
- package/dist/components/SelectableCards/index.d.ts +2 -2
- package/dist/components/SelectableCards/index.js +1 -1
- package/dist/components/ToggleTheme/index.js +3 -3
- package/dist/components/form/Address/index.js +1 -1
- package/dist/components/form/FileUpload/index.js +3 -3
- package/dist/components/form/SelectableCards/index.d.ts +1 -1
- package/dist/components/form/SelectableCards/index.js +1 -1
- package/dist/hooks/useScreenSize.d.ts +6 -0
- package/dist/hooks/useScreenSize.js +7 -0
- package/dist/hooks/useScreenSize.js.map +1 -0
- package/dist/hooks/useSnackbar.d.ts +7 -7
- package/dist/hooks/useThemeToggle.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/{props-c546afde.d.ts → props-3c81e5f4.d.ts} +1 -0
- package/dist/theme/core/index.d.ts +1 -1
- package/dist/theme/styles/index.d.ts +12 -12
- package/dist/theme/theme-provider.js +3 -3
- package/dist/types/sectionProps.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-KQTA6B4Y.js +0 -20
- package/dist/chunk-KQTA6B4Y.js.map +0 -1
- package/dist/{chunk-VPKUUY5Q.js.map → chunk-74KBZX6F.js.map} +0 -0
- package/dist/{chunk-3UDEH2DM.js.map → chunk-YDLDZVF5.js.map} +0 -0
- package/dist/{index-5a5e5dc8.d.ts → index-c8f1e6e7.d.ts} +12 -12
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a } from './chunk-LDGBS7ZI.js';
|
|
2
|
+
import { a as a$3, b } from './chunk-TWSAWMZ3.js';
|
|
2
3
|
import { a as a$5 } from './chunk-WUFEPE2G.js';
|
|
3
4
|
import { c, b as b$1 } from './chunk-2WG6OWB4.js';
|
|
4
5
|
import { a as a$1, e } from './chunk-6W52DPH4.js';
|
|
5
|
-
import { a as a$3, b } from './chunk-TWSAWMZ3.js';
|
|
6
6
|
import { p, r, a as a$2 } from './chunk-EQYL7U3J.js';
|
|
7
7
|
import { d, a as a$4 } from './chunk-GLRLKFPS.js';
|
|
8
8
|
import { useEffect, useMemo } from 'react';
|
|
@@ -15,4 +15,4 @@ var W=t=>({lighter:lighten(t,.815),light:lighten(t,.225),main:t,dark:darken(t,.1
|
|
|
15
15
|
|
|
16
16
|
export { x as a, te as b };
|
|
17
17
|
//# sourceMappingURL=out.js.map
|
|
18
|
-
//# sourceMappingURL=chunk-
|
|
18
|
+
//# sourceMappingURL=chunk-74KBZX6F.js.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { a as a$4 } from './chunk-6ZSTKYGL.js';
|
|
2
|
+
import { a as a$1 } from './chunk-RPPQBAVO.js';
|
|
3
|
+
import { a as a$3 } from './chunk-IJZCVZ32.js';
|
|
4
|
+
import { a as a$5 } from './chunk-NQNNMRLC.js';
|
|
5
|
+
import { a as a$2 } from './chunk-XWUVJ22J.js';
|
|
6
|
+
import { useState } from 'react';
|
|
7
|
+
import W from '@mui/material/Button';
|
|
8
|
+
import z from '@mui/material/CircularProgress';
|
|
9
|
+
import v from '@mui/material/Grid';
|
|
10
|
+
import a from '@mui/material/Stack';
|
|
11
|
+
import c from '@mui/material/Typography';
|
|
12
|
+
import $ from '@mui/material/Card';
|
|
13
|
+
import { styled, alpha } from '@mui/material/styles';
|
|
14
|
+
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
15
|
+
|
|
16
|
+
var b=styled($,{shouldForwardProp:t=>t!=="active"})(({theme:t,active:n})=>({boxShadow:"none",cursor:"pointer",borderRadius:8,borderStyle:"solid",borderWidth:1.5,borderColor:n?t.palette.primary.main:t.palette.grey[300],color:t.palette.primary.main,backgroundColor:n?alpha(t.palette.primary.main,.04):"white","&:hover":{borderColor:t.palette.primary.main}}));var D=({title:t,action:n,loading:w,items:i,values:l,onChange:y,disabled:s=!1})=>{let[m,x]=useState(),f=e=>l.includes(e),k=m?i.filter(e=>e.title.toLowerCase().includes(m.toLowerCase())):i,I=e=>{if(s)return;let o=f(e.value),p;o?p=l.filter(O=>O!==e.value):p=[...l,e.value],y(p);},P=()=>{s||(l.length===i.length?y([]):y(i.map(e=>e.value)));},R=new Intl.PluralRules("pt-BR"),T=new Map([["one","selecionado"],["other","selecionados"]]),E=e=>{let o=R.select(e),p=T.get(o);return `${e} ${p}`};return jsxs(a,{gap:1.5,height:450,children:[jsxs(a,{direction:"row",justifyContent:"space-between",children:[typeof t=="string"?jsx(c,{variant:"overline",color:"text.disabled",children:t}):t,jsx(c,{variant:"overline",color:"text.disabled",children:l.length===0?"nenhum selecionado":E(l.length)})]}),jsxs(a,{direction:"row",alignItems:"center",spacing:1.5,children:[jsx(a$1,{fullWidth:!0,size:"small",iconPosition:"start",placeholder:"Buscar",trigger:"change",onSearch:e=>x(e),onKeyDown:e=>{e.key==="Enter"&&e.preventDefault();}}),n?jsx(Fragment,{children:n}):jsx(W,{onClick:P,size:"small",disabled:s,children:jsx(c,{variant:"overline",children:"TODOS"})})]}),jsx(a$2,{children:jsx(a,{flex:1,mb:2,children:jsx(a$3,{isLoading:w,loading:jsx(a,{alignItems:"center",mt:3,children:jsx(z,{})}),isEmpty:i.length===0,empty:jsx(a$4,{sx:{svg:{height:140}},text:m?`N\xE3o foi possivel encontrar o item "${m}"`:"Nenhum item dispon\xEDvel"}),children:jsx(v,{container:!0,spacing:1.5,children:k.map(e=>jsx(v,{item:!0,xs:4,children:jsx(b,{active:f(e.value),onClick:()=>I(e),sx:{cursor:s?"default":"pointer",opacity:s?.6:1},children:jsxs(a,{padding:1.5,width:"100%",children:[jsxs(a,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[jsx(c,{color:f(e.value)?"primary.main":"text.primary",variant:"subtitle2",textAlign:"left",noWrap:!0,children:e.title}),f(e.value)&&jsx(a$5,{icon:"CHECK_CIRCLE",width:24})]}),e.options.map(o=>jsx(c,{mt:1,variant:"body2",color:"text.disabled",fontSize:12,textAlign:"left",noWrap:!0,children:`${o.label}: ${o.value}`},o.label))]})})},e.title))})})})})]})},ee=D;
|
|
17
|
+
|
|
18
|
+
export { ee as a };
|
|
19
|
+
//# sourceMappingURL=out.js.map
|
|
20
|
+
//# sourceMappingURL=chunk-QKKARUG5.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/SelectableCards/index.tsx","../src/components/SelectableCards/style.ts"],"names":["useState","Button","CircularProgress","Grid","Stack","Typography","Card","alpha","styled","StyledCard","prop","theme","active","Fragment","jsx","jsxs","SelectableCards","title","action","loading","items","values","onChange","disabled","search","setSearch","isSelected","itemId","filteredItems","item","onSelectItem","isItemAlreadySelected","newSelectedOptions","element","selectAllItems","enCardinalRules","strings","formatStrings","n","rule","suffix","SearchInput_default","value","event","Scrollbar_default","Result_default","EmptyView_default","Icon_default","option","SelectableCards_default"],"mappings":"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","sourcesContent":["import { useState } from 'react';\nimport Button from '@mui/material/Button';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Grid from '@mui/material/Grid';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport EmptyView from 'components/EmptyView';\nimport Icon from 'components/Icon';\nimport Result from 'components/Result';\nimport Scrollbar from 'components/Scrollbar';\nimport SearchInput from 'components/SearchInput';\n\nimport { Option, SelectableCardsProps } from './props';\nimport { StyledCard } from './style';\n\nconst SelectableCards = ({\n title,\n action,\n loading,\n items,\n values,\n onChange,\n disabled = false,\n}: SelectableCardsProps) => {\n const [search, setSearch] = useState<string>();\n\n const isSelected = (itemId: string) => {\n return values.includes(itemId);\n };\n\n const filteredItems = search\n ? items.filter(item =>\n item.title.toLowerCase().includes(search.toLowerCase()),\n )\n : items;\n\n const onSelectItem = (item: Option) => {\n if (disabled) return;\n const isItemAlreadySelected = isSelected(item.value);\n\n let newSelectedOptions: string[];\n\n if (isItemAlreadySelected) {\n newSelectedOptions = values.filter(element => element !== item.value);\n } else {\n newSelectedOptions = [...values, item.value];\n }\n\n onChange(newSelectedOptions);\n };\n\n const selectAllItems = () => {\n if (disabled) return;\n if (values.length === items.length) {\n onChange([]);\n } else {\n onChange(items.map(item => item.value));\n }\n };\n\n const enCardinalRules = new Intl.PluralRules('pt-BR');\n\n const strings = new Map([\n ['one', 'selecionado'],\n ['other', 'selecionados'],\n ]);\n\n const formatStrings = (n: number) => {\n const rule = enCardinalRules.select(n);\n const suffix = strings.get(rule);\n return `${n} ${suffix}`;\n };\n\n return (\n <Stack gap={1.5} height={450}>\n <Stack direction=\"row\" justifyContent=\"space-between\">\n {typeof title === 'string' ? (\n <Typography variant=\"overline\" color=\"text.disabled\">\n {title}\n </Typography>\n ) : (\n title\n )}\n <Typography variant=\"overline\" color=\"text.disabled\">\n {values.length === 0\n ? 'nenhum selecionado'\n : formatStrings(values.length)}\n </Typography>\n </Stack>\n <Stack direction=\"row\" alignItems=\"center\" spacing={1.5}>\n <SearchInput\n fullWidth\n size=\"small\"\n iconPosition=\"start\"\n placeholder=\"Buscar\"\n trigger=\"change\"\n onSearch={value => setSearch(value)}\n onKeyDown={event => {\n if (event.key === 'Enter') {\n event.preventDefault();\n }\n }}\n />\n\n {action ? (\n <>{action}</>\n ) : (\n <Button onClick={selectAllItems} size=\"small\" disabled={disabled}>\n <Typography variant=\"overline\">TODOS</Typography>\n </Button>\n )}\n </Stack>\n\n <Scrollbar>\n <Stack flex={1} mb={2}>\n <Result\n isLoading={loading}\n loading={\n <Stack alignItems=\"center\" mt={3}>\n <CircularProgress />\n </Stack>\n }\n isEmpty={items.length === 0}\n empty={\n <EmptyView\n sx={{ svg: { height: 140 } }}\n text={\n search\n ? `Não foi possivel encontrar o item \"${search}\"`\n : 'Nenhum item disponível'\n }\n />\n }\n >\n <Grid container spacing={1.5}>\n {filteredItems.map(item => (\n <Grid key={item.title} item xs={4}>\n <StyledCard\n active={isSelected(item.value)}\n onClick={() => onSelectItem(item)}\n sx={{\n cursor: disabled ? 'default' : 'pointer',\n opacity: disabled ? 0.6 : 1,\n }}\n >\n <Stack padding={1.5} width=\"100%\">\n <Stack\n direction=\"row\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n >\n <Typography\n color={\n isSelected(item.value)\n ? 'primary.main'\n : 'text.primary'\n }\n variant=\"subtitle2\"\n textAlign=\"left\"\n noWrap\n >\n {item.title}\n </Typography>\n\n {isSelected(item.value) && (\n <Icon icon=\"CHECK_CIRCLE\" width={24} />\n )}\n </Stack>\n\n {item.options.map(option => (\n <Typography\n key={option.label}\n mt={1}\n variant=\"body2\"\n color=\"text.disabled\"\n fontSize={12}\n textAlign=\"left\"\n noWrap\n >\n {`${option.label}: ${option.value}`}\n </Typography>\n ))}\n </Stack>\n </StyledCard>\n </Grid>\n ))}\n </Grid>\n </Result>\n </Stack>\n </Scrollbar>\n </Stack>\n );\n};\n\nexport default SelectableCards;\n","import Card from '@mui/material/Card';\nimport { alpha, styled } from '@mui/material/styles';\n\nexport type CardProps = {\n active: boolean;\n};\n\nexport const StyledCard = styled(Card, {\n shouldForwardProp: prop => prop !== 'active',\n})<CardProps>(({ theme, active }) => ({\n boxShadow: 'none',\n cursor: 'pointer',\n\n borderRadius: 8,\n borderStyle: 'solid',\n borderWidth: 1.5,\n borderColor: active ? theme.palette.primary.main : theme.palette.grey[300],\n\n color: theme.palette.primary.main,\n backgroundColor: active ? alpha(theme.palette.primary.main, 0.04) : 'white',\n\n '&:hover': {\n borderColor: theme.palette.primary.main,\n },\n}));\n"]}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { a } from './chunk-LNXA53QR.js';
|
|
2
2
|
import { a as a$5 } from './chunk-KEOOC3EL.js';
|
|
3
|
-
import { e } from './chunk-OF6623HG.js';
|
|
4
3
|
import { a as a$2 } from './chunk-N4DW7EIC.js';
|
|
4
|
+
import { e } from './chunk-OF6623HG.js';
|
|
5
5
|
import { a as a$3 } from './chunk-45OMMG7D.js';
|
|
6
6
|
import { a as a$6 } from './chunk-6U5LS7MP.js';
|
|
7
|
-
import { a as a$4 } from './chunk-NQNNMRLC.js';
|
|
8
7
|
import { j } from './chunk-VITOOMKK.js';
|
|
8
|
+
import { a as a$4 } from './chunk-NQNNMRLC.js';
|
|
9
9
|
import { a as a$7 } from './chunk-SVX7EWV4.js';
|
|
10
10
|
import { a as a$1 } from './chunk-XNKYJHNL.js';
|
|
11
11
|
import { memo, forwardRef, useMemo, useLayoutEffect, useState, useCallback, useRef, useEffect, useId } from 'react';
|
|
@@ -32,4 +32,4 @@ var Jo=({helperText:e,disabled:o,isError:r})=>e?jsx(Ko,{error:r,sx:n=>({mx:"14px
|
|
|
32
32
|
|
|
33
33
|
export { _ as a, ye as b, Ke as c, Je as d, _o as e, Do as f, ma as g, Be as h, Ee as i, Ea as j, Lo as k, So as l, To as m, Oo as n, q as o, Qe as p, We as q, V as r, Rt as s, Lt as t, Nt as u, Xt as v, oi as w, ni as x };
|
|
34
34
|
//# sourceMappingURL=out.js.map
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-YDLDZVF5.js.map
|
|
@@ -6,13 +6,13 @@ import { a as a$3 } from '../../chunk-NQNNMRLC.js';
|
|
|
6
6
|
import '../../chunk-CIGSMWKF.js';
|
|
7
7
|
import { a as a$1 } from '../../chunk-LQRRMVFN.js';
|
|
8
8
|
import '../../chunk-UHXAPEIF.js';
|
|
9
|
-
import '../../chunk-
|
|
9
|
+
import '../../chunk-74KBZX6F.js';
|
|
10
10
|
import '../../chunk-LDGBS7ZI.js';
|
|
11
|
+
import '../../chunk-TWSAWMZ3.js';
|
|
12
|
+
import '../../chunk-ROVD7OGE.js';
|
|
11
13
|
import '../../chunk-WUFEPE2G.js';
|
|
12
14
|
import '../../chunk-2WG6OWB4.js';
|
|
13
15
|
import '../../chunk-6W52DPH4.js';
|
|
14
|
-
import '../../chunk-TWSAWMZ3.js';
|
|
15
|
-
import '../../chunk-ROVD7OGE.js';
|
|
16
16
|
import '../../chunk-EQYL7U3J.js';
|
|
17
17
|
import '../../chunk-GLRLKFPS.js';
|
|
18
18
|
import j from '@mui/material/Avatar';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { a } from '../../chunk-NQNNMRLC.js';
|
|
2
2
|
import '../../chunk-CIGSMWKF.js';
|
|
3
|
-
import { b } from '../../chunk-
|
|
3
|
+
import { b } from '../../chunk-74KBZX6F.js';
|
|
4
4
|
import '../../chunk-LDGBS7ZI.js';
|
|
5
|
+
import '../../chunk-TWSAWMZ3.js';
|
|
6
|
+
import '../../chunk-ROVD7OGE.js';
|
|
5
7
|
import '../../chunk-WUFEPE2G.js';
|
|
6
8
|
import '../../chunk-2WG6OWB4.js';
|
|
7
9
|
import '../../chunk-6W52DPH4.js';
|
|
8
|
-
import '../../chunk-TWSAWMZ3.js';
|
|
9
|
-
import '../../chunk-ROVD7OGE.js';
|
|
10
10
|
import '../../chunk-EQYL7U3J.js';
|
|
11
11
|
import { k } from '../../chunk-GLRLKFPS.js';
|
|
12
12
|
import 'dayjs/locale/pt-br';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { d, c as c$1 } from '../../chunk-N7IK5EUP.js';
|
|
2
2
|
import { a } from '../../chunk-FK4XGRYF.js';
|
|
3
3
|
import { h, a as a$3 } from '../../chunk-OF6623HG.js';
|
|
4
|
-
import { a as a$2 } from '../../chunk-ZGSSTXUO.js';
|
|
5
|
-
import '../../chunk-45OMMG7D.js';
|
|
6
4
|
import { b } from '../../chunk-U7SYDDK7.js';
|
|
7
5
|
import '../../chunk-RPPQBAVO.js';
|
|
8
6
|
import '../../chunk-IJZCVZ32.js';
|
|
7
|
+
import { a as a$2 } from '../../chunk-ZGSSTXUO.js';
|
|
8
|
+
import '../../chunk-45OMMG7D.js';
|
|
9
9
|
import '../../chunk-IDFJFFIV.js';
|
|
10
10
|
import '../../chunk-6U5LS7MP.js';
|
|
11
11
|
import '../../chunk-BNBE2OMA.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
export { p as ContentType, q as FileContentType, i as FileThumbnail, a as HelperText, b as MultiFilePreview, s as MultipleFileUpload, t as MultipleImageUpload, c as SingleFilePreview, u as SingleFileUpload, v as SingleImageUpload, w as UploadAvatar, x as UploadSimpleBox, l as compressImageWithoutCrop, k as convertToWebP, n as encodeFilenameForHeader, d as fileFormat, g as fileNameByUrl, e as fileThumb, h as fileThumbnailClasses, f as fileTypeByUrl, m as getFileNameFromContentDisposition, j as isImageFile, o as useDropzoneUploader, r as useFileUploadService } from '../../chunk-
|
|
1
|
+
export { p as ContentType, q as FileContentType, i as FileThumbnail, a as HelperText, b as MultiFilePreview, s as MultipleFileUpload, t as MultipleImageUpload, c as SingleFilePreview, u as SingleFileUpload, v as SingleImageUpload, w as UploadAvatar, x as UploadSimpleBox, l as compressImageWithoutCrop, k as convertToWebP, n as encodeFilenameForHeader, d as fileFormat, g as fileNameByUrl, e as fileThumb, h as fileThumbnailClasses, f as fileTypeByUrl, m as getFileNameFromContentDisposition, j as isImageFile, o as useDropzoneUploader, r as useFileUploadService } from '../../chunk-YDLDZVF5.js';
|
|
2
2
|
import '../../chunk-LNXA53QR.js';
|
|
3
3
|
import '../../chunk-KEOOC3EL.js';
|
|
4
4
|
import '../../chunk-ATVM2YRB.js';
|
|
5
5
|
import '../../chunk-KGLU4CR2.js';
|
|
6
|
-
import '../../chunk-OF6623HG.js';
|
|
7
6
|
import '../../chunk-N4DW7EIC.js';
|
|
7
|
+
import '../../chunk-OF6623HG.js';
|
|
8
8
|
import '../../chunk-45OMMG7D.js';
|
|
9
9
|
import '../../chunk-6U5LS7MP.js';
|
|
10
|
+
import '../../chunk-VITOOMKK.js';
|
|
10
11
|
import '../../chunk-NQNNMRLC.js';
|
|
11
12
|
import '../../chunk-CIGSMWKF.js';
|
|
12
|
-
import '../../chunk-VITOOMKK.js';
|
|
13
13
|
import '../../chunk-RPO7AI5K.js';
|
|
14
14
|
import '../../chunk-SVX7EWV4.js';
|
|
15
15
|
import '../../chunk-XNKYJHNL.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { S as SelectableCardsProps } from '../../props-
|
|
2
|
+
import { S as SelectableCardsProps } from '../../props-3c81e5f4.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
|
|
5
|
-
declare const SelectableCards: ({ title, action, loading, items, values, onChange, }: SelectableCardsProps) => react_jsx_runtime.JSX.Element;
|
|
5
|
+
declare const SelectableCards: ({ title, action, loading, items, values, onChange, disabled, }: SelectableCardsProps) => react_jsx_runtime.JSX.Element;
|
|
6
6
|
|
|
7
7
|
export { SelectableCards as default };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
export { a as default } from '../../chunk-VCHDZXTF.js';
|
|
2
2
|
import '../../chunk-UHXAPEIF.js';
|
|
3
|
-
import '../../chunk-
|
|
3
|
+
import '../../chunk-74KBZX6F.js';
|
|
4
4
|
import '../../chunk-LDGBS7ZI.js';
|
|
5
|
+
import '../../chunk-TWSAWMZ3.js';
|
|
6
|
+
import '../../chunk-ROVD7OGE.js';
|
|
5
7
|
import '../../chunk-WUFEPE2G.js';
|
|
6
8
|
import '../../chunk-2WG6OWB4.js';
|
|
7
9
|
import '../../chunk-6W52DPH4.js';
|
|
8
|
-
import '../../chunk-TWSAWMZ3.js';
|
|
9
|
-
import '../../chunk-ROVD7OGE.js';
|
|
10
10
|
import '../../chunk-EQYL7U3J.js';
|
|
11
11
|
import '../../chunk-GLRLKFPS.js';
|
|
12
12
|
//# sourceMappingURL=out.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as a$2 } from '../../../chunk-YXRL4O4H.js';
|
|
2
1
|
import { a as a$1 } from '../../../chunk-P6HORLPW.js';
|
|
2
|
+
import { a as a$2 } from '../../../chunk-YXRL4O4H.js';
|
|
3
3
|
import '../../../chunk-DHRVSWFW.js';
|
|
4
4
|
import { a as a$3 } from '../../../chunk-JZ55NEMI.js';
|
|
5
5
|
import '../../../chunk-LY3IB5VH.js';
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { v, s, t, u } from '../../../chunk-
|
|
1
|
+
import { v, s, t, u } from '../../../chunk-YDLDZVF5.js';
|
|
2
2
|
import '../../../chunk-LNXA53QR.js';
|
|
3
3
|
import '../../../chunk-KEOOC3EL.js';
|
|
4
4
|
import '../../../chunk-ATVM2YRB.js';
|
|
5
5
|
import '../../../chunk-KGLU4CR2.js';
|
|
6
|
-
import '../../../chunk-OF6623HG.js';
|
|
7
6
|
import '../../../chunk-N4DW7EIC.js';
|
|
7
|
+
import '../../../chunk-OF6623HG.js';
|
|
8
8
|
import '../../../chunk-45OMMG7D.js';
|
|
9
9
|
import '../../../chunk-6U5LS7MP.js';
|
|
10
|
+
import '../../../chunk-VITOOMKK.js';
|
|
10
11
|
import '../../../chunk-NQNNMRLC.js';
|
|
11
12
|
import '../../../chunk-CIGSMWKF.js';
|
|
12
|
-
import '../../../chunk-VITOOMKK.js';
|
|
13
13
|
import '../../../chunk-RPO7AI5K.js';
|
|
14
14
|
import '../../../chunk-SVX7EWV4.js';
|
|
15
15
|
import '../../../chunk-XNKYJHNL.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { S as SelectableCardsProps$1 } from '../../../props-
|
|
2
|
+
import { S as SelectableCardsProps$1 } from '../../../props-3c81e5f4.js';
|
|
3
3
|
import { BaseField } from '../../../types/baseField.js';
|
|
4
4
|
import 'react';
|
|
5
5
|
import 'react-hook-form';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { useState, useEffect } from 'react';
|
|
2
|
+
|
|
3
|
+
var d=()=>{let[i,n]=useState({width:window.innerWidth,height:window.innerHeight});return useEffect(()=>{let e=()=>{n({width:window.innerWidth,height:window.innerHeight});};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e);}},[]),i},o=d;
|
|
4
|
+
|
|
5
|
+
export { o as default };
|
|
6
|
+
//# sourceMappingURL=out.js.map
|
|
7
|
+
//# sourceMappingURL=useScreenSize.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/hooks/useScreenSize.ts"],"names":["useState","useEffect","useScreenSize","screenSize","setScreenSize","handleResize","useScreenSize_default"],"mappings":"AAAA,OAAS,YAAAA,EAAU,aAAAC,MAAiB,QAEpC,IAAMC,EAAgB,IAAM,CAC1B,GAAM,CAACC,EAAYC,CAAa,EAAIJ,EAAS,CAC3C,MAAO,OAAO,WACd,OAAQ,OAAO,WACjB,CAAC,EAED,OAAAC,EAAU,IAAM,CACd,IAAMI,EAAe,IAAM,CACzBD,EAAc,CACZ,MAAO,OAAO,WACd,OAAQ,OAAO,WACjB,CAAC,CACH,EAEA,cAAO,iBAAiB,SAAUC,CAAY,EAEvC,IAAM,CACX,OAAO,oBAAoB,SAAUA,CAAY,CACnD,CACF,EAAG,CAAC,CAAC,EAEEF,CACT,EAEOG,EAAQJ","sourcesContent":["import { useState, useEffect } from 'react';\n\nconst useScreenSize = () => {\n const [screenSize, setScreenSize] = useState({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n\n useEffect(() => {\n const handleResize = () => {\n setScreenSize({\n width: window.innerWidth,\n height: window.innerHeight,\n });\n };\n\n window.addEventListener('resize', handleResize);\n\n return () => {\n window.removeEventListener('resize', handleResize);\n };\n }, []);\n\n return screenSize;\n};\n\nexport default useScreenSize;\n"]}
|
|
@@ -4,13 +4,13 @@ import * as react from 'react';
|
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
|
|
6
6
|
declare const useSnackbar: () => {
|
|
7
|
-
toast: ((message:
|
|
8
|
-
success: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal |
|
|
9
|
-
info: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal |
|
|
10
|
-
warning: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal |
|
|
11
|
-
error: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal |
|
|
7
|
+
toast: ((message: (() => ReactNode) | ReactNode, data?: ExternalToast | undefined) => string | number) & {
|
|
8
|
+
success: (message: string | number | boolean | (() => ReactNode) | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
9
|
+
info: (message: string | number | boolean | (() => ReactNode) | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
10
|
+
warning: (message: string | number | boolean | (() => ReactNode) | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
11
|
+
error: (message: string | number | boolean | (() => ReactNode) | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
12
12
|
custom: (jsx: (id: string | number) => react.ReactElement<any, string | react.JSXElementConstructor<any>>, data?: ExternalToast | undefined) => string | number;
|
|
13
|
-
message: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal |
|
|
13
|
+
message: (message: string | number | boolean | (() => ReactNode) | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
14
14
|
promise: <ToastData>(promise: Promise<ToastData> | (() => Promise<ToastData>), data?: ({
|
|
15
15
|
className?: string | undefined;
|
|
16
16
|
style?: react.CSSProperties | undefined;
|
|
@@ -45,7 +45,7 @@ declare const useSnackbar: () => {
|
|
|
45
45
|
unwrap: () => Promise<ToastData>;
|
|
46
46
|
};
|
|
47
47
|
dismiss: (id?: string | number | undefined) => string | number;
|
|
48
|
-
loading: (message: string | number | boolean | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal |
|
|
48
|
+
loading: (message: string | number | boolean | (() => ReactNode) | react.ReactElement<any, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | react.ReactPortal | null | undefined, data?: ExternalToast | undefined) => string | number;
|
|
49
49
|
} & {
|
|
50
50
|
getHistory: () => (sonner.ToastT | sonner.ToastToDismiss)[];
|
|
51
51
|
getToasts: () => (sonner.ToastT | sonner.ToastToDismiss)[];
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { a as useThemeToggle } from '../chunk-UHXAPEIF.js';
|
|
2
|
-
import '../chunk-
|
|
2
|
+
import '../chunk-74KBZX6F.js';
|
|
3
3
|
import '../chunk-LDGBS7ZI.js';
|
|
4
|
+
import '../chunk-TWSAWMZ3.js';
|
|
5
|
+
import '../chunk-ROVD7OGE.js';
|
|
4
6
|
import '../chunk-WUFEPE2G.js';
|
|
5
7
|
import '../chunk-2WG6OWB4.js';
|
|
6
8
|
import '../chunk-6W52DPH4.js';
|
|
7
|
-
import '../chunk-TWSAWMZ3.js';
|
|
8
|
-
import '../chunk-ROVD7OGE.js';
|
|
9
9
|
import '../chunk-EQYL7U3J.js';
|
|
10
10
|
import '../chunk-GLRLKFPS.js';
|
|
11
11
|
//# sourceMappingURL=out.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CustomShadows } from './index-
|
|
2
|
-
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-
|
|
1
|
+
import { C as CustomShadows } from './index-c8f1e6e7.js';
|
|
2
|
+
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from './index-c8f1e6e7.js';
|
|
3
3
|
export { S as SettingsContextValue, _ as SettingsProvider, T as ThemeProviderProps, u as useSettingsContext } from './settings-provider-38d09283.js';
|
|
4
4
|
export { THEME_CONFIG, default as ThemeProvider } from './theme/theme-provider.js';
|
|
5
5
|
import { S as SettingsState } from './settings-583c107c.js';
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
export { a as useThemeToggle } from './chunk-UHXAPEIF.js';
|
|
2
|
-
export { b as ThemeProvider, a as createTheme } from './chunk-
|
|
2
|
+
export { b as ThemeProvider, a as createTheme } from './chunk-74KBZX6F.js';
|
|
3
3
|
import './chunk-LDGBS7ZI.js';
|
|
4
|
+
import './chunk-TWSAWMZ3.js';
|
|
5
|
+
import './chunk-ROVD7OGE.js';
|
|
4
6
|
import './chunk-WUFEPE2G.js';
|
|
5
7
|
export { c as SettingsProvider, b as useSettingsContext } from './chunk-2WG6OWB4.js';
|
|
6
8
|
export { b as defaultFont, c as primaryFont, d as secondaryFont, a as shadows, e as typography } from './chunk-6W52DPH4.js';
|
|
7
|
-
import './chunk-TWSAWMZ3.js';
|
|
8
|
-
import './chunk-ROVD7OGE.js';
|
|
9
9
|
export { l as action, k as background, m as basePalette, p as colorSchemes, i as common, a as components, q as createShadowColor, r as customShadows, o as darkPalette, h as error, b as grey, e as info, n as lightPalette, c as primary, d as secondary, f as success, j as text, g as warning } from './chunk-EQYL7U3J.js';
|
|
10
10
|
export { a as THEME_CONFIG, q as bgBlur, p as bgGradient, o as borderGradient, j as createPaletteChannel, h as hexToRgbChannel, i as hexToRgbaChannel, l as hideScrollX, m as hideScrollY, r as maxLine, c as mediaQueries, t as menuItem, s as paper, f as pxToRem, e as remToPx, g as responsiveFontSizes, d as setFont, b as stylesMode, n as textGradient, k as varAlpha } from './chunk-GLRLKFPS.js';
|
|
11
11
|
//# sourceMappingURL=out.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-
|
|
1
|
+
export { d as ColorType, k as action, j as background, l as basePalette, o as colorSchemes, h as common, c as components, a as createShadowColor, b as customShadows, n as darkPalette, r as defaultFont, f as error, g as grey, i as info, m as lightPalette, p as primary, u as primaryFont, s as secondary, v as secondaryFont, q as shadows, e as success, t as text, x as typography, w as warning } from '../../index-c8f1e6e7.js';
|
|
2
2
|
import '@mui/lab/TimelineConnector';
|
|
3
3
|
import '@mui/system';
|
|
4
4
|
import '@mui/lab/TimelineDot';
|
|
@@ -164,7 +164,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
164
164
|
flexShrink?: readonly ((string & {}) | csstype.Globals)[] | csstype.Property.FlexShrink | readonly NonNullable<csstype.Property.FlexShrink | undefined>[] | undefined;
|
|
165
165
|
flexWrap?: csstype.Property.FlexWrap | readonly NonNullable<csstype.Property.FlexWrap | undefined>[] | readonly csstype.Property.FlexWrap[] | undefined;
|
|
166
166
|
float?: csstype.Property.Float | readonly NonNullable<csstype.Property.Float | undefined>[] | readonly csstype.Property.Float[] | undefined;
|
|
167
|
-
fontFamily?: csstype.Property.FontFamily | readonly
|
|
167
|
+
fontFamily?: readonly string[] | csstype.Property.FontFamily | readonly csstype.Property.FontFamily[] | undefined;
|
|
168
168
|
fontFeatureSettings?: readonly string[] | csstype.Property.FontFeatureSettings | readonly csstype.Property.FontFeatureSettings[] | undefined;
|
|
169
169
|
fontKerning?: csstype.Property.FontKerning | readonly NonNullable<csstype.Property.FontKerning | undefined>[] | readonly csstype.Property.FontKerning[] | undefined;
|
|
170
170
|
fontLanguageOverride?: readonly string[] | csstype.Property.FontLanguageOverride | readonly csstype.Property.FontLanguageOverride[] | undefined;
|
|
@@ -189,7 +189,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
189
189
|
fontVariantNumeric?: readonly string[] | csstype.Property.FontVariantNumeric | readonly csstype.Property.FontVariantNumeric[] | undefined;
|
|
190
190
|
fontVariantPosition?: csstype.Property.FontVariantPosition | readonly NonNullable<csstype.Property.FontVariantPosition | undefined>[] | readonly csstype.Property.FontVariantPosition[] | undefined;
|
|
191
191
|
fontVariationSettings?: readonly string[] | csstype.Property.FontVariationSettings | readonly csstype.Property.FontVariationSettings[] | undefined;
|
|
192
|
-
fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
192
|
+
fontWeight?: csstype.Property.FontWeight | readonly NonNullable<csstype.Property.FontWeight | undefined>[] | readonly ("bold" | (string & {}) | csstype.Globals | "normal" | "bolder" | "lighter")[] | undefined;
|
|
193
193
|
forcedColorAdjust?: csstype.Property.ForcedColorAdjust | readonly NonNullable<csstype.Property.ForcedColorAdjust | undefined>[] | readonly csstype.Property.ForcedColorAdjust[] | undefined;
|
|
194
194
|
gridAutoColumns?: readonly (string | (string & {}))[] | csstype.Property.GridAutoColumns<string | number> | readonly NonNullable<csstype.Property.GridAutoColumns<string | number> | undefined>[] | undefined;
|
|
195
195
|
gridAutoFlow?: readonly string[] | csstype.Property.GridAutoFlow | readonly csstype.Property.GridAutoFlow[] | undefined;
|
|
@@ -416,7 +416,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
416
416
|
zIndex?: readonly ((string & {}) | csstype.Globals | "auto")[] | csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | undefined;
|
|
417
417
|
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reset")[] | undefined;
|
|
418
418
|
all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
|
|
419
|
-
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
419
|
+
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
420
420
|
animationRange?: readonly (string | (string & {}))[] | csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | undefined;
|
|
421
421
|
background?: readonly (string | (string & {}))[] | csstype.Property.Background<string | number> | readonly NonNullable<csstype.Property.Background<string | number> | undefined>[] | undefined;
|
|
422
422
|
border?: readonly (string | (string & {}))[] | csstype.Property.Border<string | number> | readonly NonNullable<csstype.Property.Border<string | number> | undefined>[] | undefined;
|
|
@@ -425,7 +425,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
425
425
|
borderBlockStart?: readonly (string | (string & {}))[] | csstype.Property.BorderBlockStart<string | number> | readonly NonNullable<csstype.Property.BorderBlockStart<string | number> | undefined>[] | undefined;
|
|
426
426
|
borderBottom?: readonly (string | (string & {}))[] | csstype.Property.BorderBottom<string | number> | readonly NonNullable<csstype.Property.BorderBottom<string | number> | undefined>[] | undefined;
|
|
427
427
|
borderColor?: readonly string[] | csstype.Property.BorderColor | readonly csstype.Property.BorderColor[] | undefined;
|
|
428
|
-
borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
428
|
+
borderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
429
429
|
borderInline?: readonly (string | (string & {}))[] | csstype.Property.BorderInline<string | number> | readonly NonNullable<csstype.Property.BorderInline<string | number> | undefined>[] | undefined;
|
|
430
430
|
borderInlineEnd?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineEnd<string | number> | readonly NonNullable<csstype.Property.BorderInlineEnd<string | number> | undefined>[] | undefined;
|
|
431
431
|
borderInlineStart?: readonly (string | (string & {}))[] | csstype.Property.BorderInlineStart<string | number> | readonly NonNullable<csstype.Property.BorderInlineStart<string | number> | undefined>[] | undefined;
|
|
@@ -457,7 +457,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
457
457
|
marginBlock?: readonly (string | (string & {}))[] | csstype.Property.MarginBlock<string | number> | readonly NonNullable<csstype.Property.MarginBlock<string | number> | undefined>[] | undefined;
|
|
458
458
|
marginInline?: readonly (string | (string & {}))[] | csstype.Property.MarginInline<string | number> | readonly NonNullable<csstype.Property.MarginInline<string | number> | undefined>[] | undefined;
|
|
459
459
|
mask?: readonly (string | (string & {}))[] | csstype.Property.Mask<string | number> | readonly NonNullable<csstype.Property.Mask<string | number> | undefined>[] | undefined;
|
|
460
|
-
maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
460
|
+
maskBorder?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
|
|
461
461
|
motion?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
|
|
462
462
|
offset?: readonly (string | (string & {}))[] | csstype.Property.Offset<string | number> | readonly NonNullable<csstype.Property.Offset<string | number> | undefined>[] | undefined;
|
|
463
463
|
outline?: readonly (string | (string & {}))[] | csstype.Property.Outline<string | number> | readonly NonNullable<csstype.Property.Outline<string | number> | undefined>[] | undefined;
|
|
@@ -700,8 +700,8 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
700
700
|
WebkitUserModify?: csstype.Property.WebkitUserModify | readonly NonNullable<csstype.Property.WebkitUserModify | undefined>[] | readonly csstype.Property.WebkitUserModify[] | undefined;
|
|
701
701
|
WebkitUserSelect?: csstype.Property.UserSelect | readonly NonNullable<csstype.Property.UserSelect | undefined>[] | readonly csstype.Property.UserSelect[] | undefined;
|
|
702
702
|
WebkitWritingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
|
|
703
|
-
MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
704
|
-
MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
703
|
+
MozAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
704
|
+
MozBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
705
705
|
MozColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
|
|
706
706
|
MozColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
|
|
707
707
|
MozOutlineRadius?: readonly (string | (string & {}))[] | csstype.Property.MozOutlineRadius<string | number> | readonly NonNullable<csstype.Property.MozOutlineRadius<string | number> | undefined>[] | undefined;
|
|
@@ -712,16 +712,16 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
712
712
|
msScrollSnapX?: readonly string[] | csstype.Property.MsScrollSnapX | readonly csstype.Property.MsScrollSnapX[] | undefined;
|
|
713
713
|
msScrollSnapY?: readonly string[] | csstype.Property.MsScrollSnapY | readonly csstype.Property.MsScrollSnapY[] | undefined;
|
|
714
714
|
msTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
|
|
715
|
-
WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
715
|
+
WebkitAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
716
716
|
WebkitBorderBefore?: readonly (string | (string & {}))[] | csstype.Property.WebkitBorderBefore<string | number> | readonly NonNullable<csstype.Property.WebkitBorderBefore<string | number> | undefined>[] | undefined;
|
|
717
|
-
WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
717
|
+
WebkitBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
718
718
|
WebkitBorderRadius?: readonly (string | (string & {}))[] | csstype.Property.BorderRadius<string | number> | readonly NonNullable<csstype.Property.BorderRadius<string | number> | undefined>[] | undefined;
|
|
719
719
|
WebkitColumnRule?: readonly (string | (string & {}))[] | csstype.Property.ColumnRule<string | number> | readonly NonNullable<csstype.Property.ColumnRule<string | number> | undefined>[] | undefined;
|
|
720
720
|
WebkitColumns?: readonly (string | (string & {}))[] | csstype.Property.Columns<string | number> | readonly NonNullable<csstype.Property.Columns<string | number> | undefined>[] | undefined;
|
|
721
721
|
WebkitFlex?: readonly (string | (string & {}))[] | csstype.Property.Flex<string | number> | readonly NonNullable<csstype.Property.Flex<string | number> | undefined>[] | undefined;
|
|
722
722
|
WebkitFlexFlow?: readonly string[] | csstype.Property.FlexFlow | readonly csstype.Property.FlexFlow[] | undefined;
|
|
723
723
|
WebkitMask?: readonly (string | (string & {}))[] | csstype.Property.WebkitMask<string | number> | readonly NonNullable<csstype.Property.WebkitMask<string | number> | undefined>[] | undefined;
|
|
724
|
-
WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
724
|
+
WebkitMaskBoxImage?: csstype.Property.MaskBorder | readonly NonNullable<csstype.Property.MaskBorder | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "alpha" | "luminance" | "stretch")[] | undefined;
|
|
725
725
|
WebkitTextEmphasis?: readonly string[] | csstype.Property.TextEmphasis | readonly csstype.Property.TextEmphasis[] | undefined;
|
|
726
726
|
WebkitTextStroke?: readonly (string | (string & {}))[] | csstype.Property.WebkitTextStroke<string | number> | readonly NonNullable<csstype.Property.WebkitTextStroke<string | number> | undefined>[] | undefined;
|
|
727
727
|
WebkitTransition?: readonly string[] | csstype.Property.Transition<string & {}> | readonly csstype.Property.Transition<string & {}>[] | undefined;
|
|
@@ -802,7 +802,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
802
802
|
MozTransitionTimingFunction?: readonly string[] | csstype.Property.TransitionTimingFunction | readonly csstype.Property.TransitionTimingFunction[] | undefined;
|
|
803
803
|
MozUserInput?: csstype.Property.MozUserInput | readonly NonNullable<csstype.Property.MozUserInput | undefined>[] | readonly csstype.Property.MozUserInput[] | undefined;
|
|
804
804
|
msImeMode?: csstype.Property.ImeMode | readonly NonNullable<csstype.Property.ImeMode | undefined>[] | readonly csstype.Property.ImeMode[] | undefined;
|
|
805
|
-
OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
805
|
+
OAnimation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "none" | "auto" | "normal" | "alternate" | "alternate-reverse" | "reverse" | "backwards" | "both" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
806
806
|
OAnimationDelay?: readonly string[] | csstype.Property.AnimationDelay<string & {}> | readonly csstype.Property.AnimationDelay<string & {}>[] | undefined;
|
|
807
807
|
OAnimationDirection?: readonly string[] | csstype.Property.AnimationDirection | readonly csstype.Property.AnimationDirection[] | undefined;
|
|
808
808
|
OAnimationDuration?: readonly string[] | csstype.Property.AnimationDuration<string & {}> | readonly csstype.Property.AnimationDuration<string & {}>[] | undefined;
|
|
@@ -812,7 +812,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
812
812
|
OAnimationPlayState?: readonly string[] | csstype.Property.AnimationPlayState | readonly csstype.Property.AnimationPlayState[] | undefined;
|
|
813
813
|
OAnimationTimingFunction?: readonly string[] | csstype.Property.AnimationTimingFunction | readonly csstype.Property.AnimationTimingFunction[] | undefined;
|
|
814
814
|
OBackgroundSize?: readonly (string | (string & {}))[] | csstype.Property.BackgroundSize<string | number> | readonly NonNullable<csstype.Property.BackgroundSize<string | number> | undefined>[] | undefined;
|
|
815
|
-
OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ((string & {}) | csstype.Globals | "
|
|
815
|
+
OBorderImage?: csstype.Property.BorderImage | readonly NonNullable<csstype.Property.BorderImage | undefined>[] | readonly ("repeat" | (string & {}) | csstype.Globals | "none" | "round" | "space" | "stretch")[] | undefined;
|
|
816
816
|
OObjectFit?: csstype.Property.ObjectFit | readonly NonNullable<csstype.Property.ObjectFit | undefined>[] | readonly csstype.Property.ObjectFit[] | undefined;
|
|
817
817
|
OObjectPosition?: readonly (string | (string & {}))[] | csstype.Property.ObjectPosition<string | number> | readonly NonNullable<csstype.Property.ObjectPosition<string | number> | undefined>[] | undefined;
|
|
818
818
|
OTabSize?: readonly (string | (string & {}))[] | csstype.Property.TabSize<string | number> | readonly NonNullable<csstype.Property.TabSize<string | number> | undefined>[] | undefined;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { b as default } from '../chunk-
|
|
1
|
+
export { b as default } from '../chunk-74KBZX6F.js';
|
|
2
2
|
import '../chunk-LDGBS7ZI.js';
|
|
3
|
+
import '../chunk-TWSAWMZ3.js';
|
|
4
|
+
import '../chunk-ROVD7OGE.js';
|
|
3
5
|
import '../chunk-WUFEPE2G.js';
|
|
4
6
|
export { b as useSettingsContext } from '../chunk-2WG6OWB4.js';
|
|
5
7
|
import '../chunk-6W52DPH4.js';
|
|
6
|
-
import '../chunk-TWSAWMZ3.js';
|
|
7
|
-
import '../chunk-ROVD7OGE.js';
|
|
8
8
|
import '../chunk-EQYL7U3J.js';
|
|
9
9
|
export { a as THEME_CONFIG } from '../chunk-GLRLKFPS.js';
|
|
10
10
|
//# sourceMappingURL=out.js.map
|
package/package.json
CHANGED
package/dist/chunk-KQTA6B4Y.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { a as a$4 } from './chunk-6ZSTKYGL.js';
|
|
2
|
-
import { a as a$1 } from './chunk-RPPQBAVO.js';
|
|
3
|
-
import { a as a$3 } from './chunk-IJZCVZ32.js';
|
|
4
|
-
import { a as a$5 } from './chunk-NQNNMRLC.js';
|
|
5
|
-
import { a as a$2 } from './chunk-XWUVJ22J.js';
|
|
6
|
-
import { useState } from 'react';
|
|
7
|
-
import L from '@mui/material/Button';
|
|
8
|
-
import W from '@mui/material/CircularProgress';
|
|
9
|
-
import C from '@mui/material/Grid';
|
|
10
|
-
import a from '@mui/material/Stack';
|
|
11
|
-
import p from '@mui/material/Typography';
|
|
12
|
-
import O from '@mui/material/Card';
|
|
13
|
-
import { styled, alpha } from '@mui/material/styles';
|
|
14
|
-
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
15
|
-
|
|
16
|
-
var b=styled(O,{shouldForwardProp:t=>t!=="active"})(({theme:t,active:i})=>({boxShadow:"none",cursor:"pointer",borderRadius:8,borderStyle:"solid",borderWidth:1.5,borderColor:i?t.palette.primary.main:t.palette.grey[300],color:t.palette.primary.main,backgroundColor:i?alpha(t.palette.primary.main,.04):"white","&:hover":{borderColor:t.palette.primary.main}}));var z=({title:t,action:i,loading:v,items:n,values:l,onChange:y})=>{let[d,w]=useState(),m=e=>l.includes(e),k=d?n.filter(e=>e.title.toLowerCase().includes(d.toLowerCase())):n,x=e=>{let o=m(e.value),s;o?s=l.filter(E=>E!==e.value):s=[...l,e.value],y(s);},I=()=>{l.length===n.length?y([]):y(n.map(e=>e.value));},P=new Intl.PluralRules("pt-BR"),R=new Map([["one","selecionado"],["other","selecionados"]]),T=e=>{let o=P.select(e),s=R.get(o);return `${e} ${s}`};return jsxs(a,{gap:1.5,height:450,children:[jsxs(a,{direction:"row",justifyContent:"space-between",children:[typeof t=="string"?jsx(p,{variant:"overline",color:"text.disabled",children:t}):t,jsx(p,{variant:"overline",color:"text.disabled",children:l.length===0?"nenhum selecionado":T(l.length)})]}),jsxs(a,{direction:"row",alignItems:"center",spacing:1.5,children:[jsx(a$1,{fullWidth:!0,size:"small",iconPosition:"start",placeholder:"Buscar",trigger:"change",onSearch:e=>w(e),onKeyDown:e=>{e.key==="Enter"&&e.preventDefault();}}),i?jsx(Fragment,{children:i}):jsx(L,{onClick:I,size:"small",children:jsx(p,{variant:"overline",children:"TODOS"})})]}),jsx(a$2,{children:jsx(a,{flex:1,mb:2,children:jsx(a$3,{isLoading:v,loading:jsx(a,{alignItems:"center",mt:3,children:jsx(W,{})}),isEmpty:n.length===0,empty:jsx(a$4,{sx:{svg:{height:140}},text:d?`N\xE3o foi possivel encontrar o item "${d}"`:"Nenhum item dispon\xEDvel"}),children:jsx(C,{container:!0,spacing:1.5,children:k.map(e=>jsx(C,{item:!0,xs:4,children:jsx(b,{active:m(e.value),onClick:()=>x(e),children:jsxs(a,{padding:1.5,width:"100%",children:[jsxs(a,{direction:"row",alignItems:"center",justifyContent:"space-between",children:[jsx(p,{color:m(e.value)?"primary.main":"text.primary",variant:"subtitle2",textAlign:"left",noWrap:!0,children:e.title}),m(e.value)&&jsx(a$5,{icon:"CHECK_CIRCLE",width:24})]}),e.options.map(o=>jsx(p,{mt:1,variant:"body2",color:"text.disabled",fontSize:12,textAlign:"left",noWrap:!0,children:`${o.label}: ${o.value}`},o.label))]})})},e.title))})})})})]})},Z=z;
|
|
17
|
-
|
|
18
|
-
export { Z as a };
|
|
19
|
-
//# sourceMappingURL=out.js.map
|
|
20
|
-
//# sourceMappingURL=chunk-KQTA6B4Y.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/SelectableCards/index.tsx","../src/components/SelectableCards/style.ts"],"names":["useState","Button","CircularProgress","Grid","Stack","Typography","Card","alpha","styled","StyledCard","prop","theme","active","Fragment","jsx","jsxs","SelectableCards","title","action","loading","items","values","onChange","search","setSearch","isSelected","itemId","filteredItems","item","onSelectItem","isItemAlreadySelected","newSelectedOptions","element","selectAllItems","enCardinalRules","strings","formatStrings","n","rule","suffix","SearchInput_default","value","event","Scrollbar_default","Result_default","EmptyView_default","Icon_default","option","SelectableCards_default"],"mappings":"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","sourcesContent":["import { useState } from 'react';\nimport Button from '@mui/material/Button';\nimport CircularProgress from '@mui/material/CircularProgress';\nimport Grid from '@mui/material/Grid';\nimport Stack from '@mui/material/Stack';\nimport Typography from '@mui/material/Typography';\n\nimport EmptyView from 'components/EmptyView';\nimport Icon from 'components/Icon';\nimport Result from 'components/Result';\nimport Scrollbar from 'components/Scrollbar';\nimport SearchInput from 'components/SearchInput';\n\nimport { Option, SelectableCardsProps } from './props';\nimport { StyledCard } from './style';\n\nconst SelectableCards = ({\n title,\n action,\n loading,\n items,\n values,\n onChange,\n}: SelectableCardsProps) => {\n const [search, setSearch] = useState<string>();\n\n const isSelected = (itemId: string) => {\n return values.includes(itemId);\n };\n\n const filteredItems = search\n ? items.filter(item =>\n item.title.toLowerCase().includes(search.toLowerCase()),\n )\n : items;\n\n const onSelectItem = (item: Option) => {\n const isItemAlreadySelected = isSelected(item.value);\n\n let newSelectedOptions: string[];\n\n if (isItemAlreadySelected) {\n newSelectedOptions = values.filter(element => element !== item.value);\n } else {\n newSelectedOptions = [...values, item.value];\n }\n\n onChange(newSelectedOptions);\n };\n\n const selectAllItems = () => {\n if (values.length === items.length) {\n onChange([]);\n } else {\n onChange(items.map(item => item.value));\n }\n };\n\n const enCardinalRules = new Intl.PluralRules('pt-BR');\n\n const strings = new Map([\n ['one', 'selecionado'],\n ['other', 'selecionados'],\n ]);\n\n const formatStrings = (n: number) => {\n const rule = enCardinalRules.select(n);\n const suffix = strings.get(rule);\n return `${n} ${suffix}`;\n };\n\n return (\n <Stack gap={1.5} height={450}>\n <Stack direction=\"row\" justifyContent=\"space-between\">\n {typeof title === 'string' ? (\n <Typography variant=\"overline\" color=\"text.disabled\">\n {title}\n </Typography>\n ) : (\n title\n )}\n <Typography variant=\"overline\" color=\"text.disabled\">\n {values.length === 0\n ? 'nenhum selecionado'\n : formatStrings(values.length)}\n </Typography>\n </Stack>\n <Stack direction=\"row\" alignItems=\"center\" spacing={1.5}>\n <SearchInput\n fullWidth\n size=\"small\"\n iconPosition=\"start\"\n placeholder=\"Buscar\"\n trigger=\"change\"\n onSearch={value => setSearch(value)}\n onKeyDown={event => {\n if (event.key === 'Enter') {\n event.preventDefault();\n }\n }}\n />\n\n {action ? (\n <>{action}</>\n ) : (\n <Button onClick={selectAllItems} size=\"small\">\n <Typography variant=\"overline\">TODOS</Typography>\n </Button>\n )}\n </Stack>\n\n <Scrollbar>\n <Stack flex={1} mb={2}>\n <Result\n isLoading={loading}\n loading={\n <Stack alignItems=\"center\" mt={3}>\n <CircularProgress />\n </Stack>\n }\n isEmpty={items.length === 0}\n empty={\n <EmptyView\n sx={{ svg: { height: 140 } }}\n text={\n search\n ? `Não foi possivel encontrar o item \"${search}\"`\n : 'Nenhum item disponível'\n }\n />\n }\n >\n <Grid container spacing={1.5}>\n {filteredItems.map(item => (\n <Grid key={item.title} item xs={4}>\n <StyledCard\n active={isSelected(item.value)}\n onClick={() => onSelectItem(item)}\n >\n <Stack padding={1.5} width=\"100%\">\n <Stack\n direction=\"row\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n >\n <Typography\n color={\n isSelected(item.value)\n ? 'primary.main'\n : 'text.primary'\n }\n variant=\"subtitle2\"\n textAlign=\"left\"\n noWrap\n >\n {item.title}\n </Typography>\n\n {isSelected(item.value) && (\n <Icon icon=\"CHECK_CIRCLE\" width={24} />\n )}\n </Stack>\n\n {item.options.map(option => (\n <Typography\n key={option.label}\n mt={1}\n variant=\"body2\"\n color=\"text.disabled\"\n fontSize={12}\n textAlign=\"left\"\n noWrap\n >\n {`${option.label}: ${option.value}`}\n </Typography>\n ))}\n </Stack>\n </StyledCard>\n </Grid>\n ))}\n </Grid>\n </Result>\n </Stack>\n </Scrollbar>\n </Stack>\n );\n};\n\nexport default SelectableCards;\n","import Card from '@mui/material/Card';\nimport { alpha, styled } from '@mui/material/styles';\n\nexport type CardProps = {\n active: boolean;\n};\n\nexport const StyledCard = styled(Card, {\n shouldForwardProp: prop => prop !== 'active',\n})<CardProps>(({ theme, active }) => ({\n boxShadow: 'none',\n cursor: 'pointer',\n\n borderRadius: 8,\n borderStyle: 'solid',\n borderWidth: 1.5,\n borderColor: active ? theme.palette.primary.main : theme.palette.grey[300],\n\n color: theme.palette.primary.main,\n backgroundColor: active ? alpha(theme.palette.primary.main, 0.04) : 'white',\n\n '&:hover': {\n borderColor: theme.palette.primary.main,\n },\n}));\n"]}
|
|
File without changes
|
|
File without changes
|
|
@@ -286,10 +286,13 @@ declare const components: {
|
|
|
286
286
|
MuiTimelineDot: {
|
|
287
287
|
defaultProps?: Partial<_mui_lab_TimelineDot.TimelineDotProps> | undefined;
|
|
288
288
|
styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<keyof _mui_lab_TimelineDot.TimelineDotClasses, "MuiTimelineDot", {
|
|
289
|
-
|
|
289
|
+
cssVarPrefix: string;
|
|
290
|
+
zIndex: _mui_material.ZIndex;
|
|
291
|
+
direction: _mui_system.Direction;
|
|
292
|
+
opacity: _mui_material.Opacity;
|
|
293
|
+
typography: _mui_material.TypographyVariants;
|
|
290
294
|
palette: _mui_material.Palette;
|
|
291
295
|
colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
|
|
292
|
-
cssVarPrefix: string;
|
|
293
296
|
vars: _mui_material.ThemeVars;
|
|
294
297
|
getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
|
|
295
298
|
getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
|
|
@@ -300,16 +303,13 @@ declare const components: {
|
|
|
300
303
|
spacing: _mui_system.Spacing;
|
|
301
304
|
breakpoints: _mui_system.Breakpoints;
|
|
302
305
|
shape: _mui_system.Shape;
|
|
303
|
-
|
|
306
|
+
transitions: _mui_material.Transitions;
|
|
304
307
|
shadows: _mui_material.Shadows;
|
|
305
308
|
mixins: _mui_material.Mixins;
|
|
306
|
-
zIndex: _mui_material.ZIndex;
|
|
307
|
-
direction: _mui_system.Direction;
|
|
308
309
|
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
309
310
|
unstable_sxConfig: _mui_system.SxConfig;
|
|
310
311
|
unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
|
|
311
312
|
applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
|
|
312
|
-
opacity: _mui_material.Opacity;
|
|
313
313
|
overlays: _mui_material.Overlays;
|
|
314
314
|
customShadows: CustomShadows;
|
|
315
315
|
unstable_strictMode?: boolean | undefined;
|
|
@@ -326,10 +326,13 @@ declare const components: {
|
|
|
326
326
|
MuiTimelineConnector: {
|
|
327
327
|
defaultProps?: Partial<_mui_lab_TimelineConnector.TimelineConnectorProps> | undefined;
|
|
328
328
|
styleOverrides?: Partial<_mui_material_styles_overrides.OverridesStyleRules<"root", "MuiTimelineConnector", {
|
|
329
|
-
|
|
329
|
+
cssVarPrefix: string;
|
|
330
|
+
zIndex: _mui_material.ZIndex;
|
|
331
|
+
direction: _mui_system.Direction;
|
|
332
|
+
opacity: _mui_material.Opacity;
|
|
333
|
+
typography: _mui_material.TypographyVariants;
|
|
330
334
|
palette: _mui_material.Palette;
|
|
331
335
|
colorSchemes: Record<_mui_material.SupportedColorScheme, _mui_material.ColorSystem>;
|
|
332
|
-
cssVarPrefix: string;
|
|
333
336
|
vars: _mui_material.ThemeVars;
|
|
334
337
|
getCssVar: (field: _mui_material.ThemeCssVar, ...vars: _mui_material.ThemeCssVar[]) => string;
|
|
335
338
|
getColorSchemeSelector: (colorScheme: _mui_material.SupportedColorScheme) => string;
|
|
@@ -340,16 +343,13 @@ declare const components: {
|
|
|
340
343
|
spacing: _mui_system.Spacing;
|
|
341
344
|
breakpoints: _mui_system.Breakpoints;
|
|
342
345
|
shape: _mui_system.Shape;
|
|
343
|
-
|
|
346
|
+
transitions: _mui_material.Transitions;
|
|
344
347
|
shadows: _mui_material.Shadows;
|
|
345
348
|
mixins: _mui_material.Mixins;
|
|
346
|
-
zIndex: _mui_material.ZIndex;
|
|
347
|
-
direction: _mui_system.Direction;
|
|
348
349
|
shouldSkipGeneratingVar: (keys: string[], value: string | number) => boolean;
|
|
349
350
|
unstable_sxConfig: _mui_system.SxConfig;
|
|
350
351
|
unstable_sx: (props: _mui_system.SxProps<_mui_material.Theme>) => _mui_styled_engine.CSSObject;
|
|
351
352
|
applyStyles: _mui_system.ApplyStyles<"light" | "dark">;
|
|
352
|
-
opacity: _mui_material.Opacity;
|
|
353
353
|
overlays: _mui_material.Overlays;
|
|
354
354
|
customShadows: CustomShadows;
|
|
355
355
|
unstable_strictMode?: boolean | undefined;
|