@coveord/plasma-mantine 52.13.2 → 52.14.0
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/.turbo/turbo-build.log +3 -3
- package/.turbo/turbo-test.log +30 -30
- package/dist/.tsbuildinfo +1 -1
- package/dist/cjs/components/copyToClipboard/CopyToClipboard.d.ts.map +1 -1
- package/dist/cjs/components/copyToClipboard/CopyToClipboard.js +1 -0
- package/dist/cjs/components/copyToClipboard/CopyToClipboard.js.map +1 -1
- package/dist/cjs/components/header/Header.d.ts.map +1 -1
- package/dist/cjs/components/header/Header.js +2 -1
- package/dist/cjs/components/header/Header.js.map +1 -1
- package/dist/cjs/components/header/__tests__/__snapshots__/Header.spec.tsx.snap +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirm.d.ts +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirm.d.ts.map +1 -1
- package/dist/cjs/components/inline-confirm/InlineConfirm.js.map +1 -1
- package/dist/cjs/components/table/TableFilter.d.ts.map +1 -1
- package/dist/cjs/components/table/TableFilter.js +17 -8
- package/dist/cjs/components/table/TableFilter.js.map +1 -1
- package/dist/cjs/theme/Plasmantine.d.ts +1 -1
- package/dist/cjs/theme/Plasmantine.d.ts.map +1 -1
- package/dist/cjs/theme/Plasmantine.js.map +1 -1
- package/dist/esm/components/copyToClipboard/CopyToClipboard.d.ts.map +1 -1
- package/dist/esm/components/copyToClipboard/CopyToClipboard.js +1 -0
- package/dist/esm/components/copyToClipboard/CopyToClipboard.js.map +1 -1
- package/dist/esm/components/header/Header.d.ts.map +1 -1
- package/dist/esm/components/header/Header.js +2 -1
- package/dist/esm/components/header/Header.js.map +1 -1
- package/dist/esm/components/header/__tests__/__snapshots__/Header.spec.tsx.snap +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirm.d.ts +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirm.d.ts.map +1 -1
- package/dist/esm/components/inline-confirm/InlineConfirm.js.map +1 -1
- package/dist/esm/components/table/TableFilter.d.ts.map +1 -1
- package/dist/esm/components/table/TableFilter.js +18 -9
- package/dist/esm/components/table/TableFilter.js.map +1 -1
- package/dist/esm/theme/Plasmantine.d.ts +1 -1
- package/dist/esm/theme/Plasmantine.d.ts.map +1 -1
- package/dist/esm/theme/Plasmantine.js.map +1 -1
- package/package.json +16 -16
- package/src/components/copyToClipboard/CopyToClipboard.tsx +1 -0
- package/src/components/header/Header.tsx +1 -0
- package/src/components/header/__tests__/__snapshots__/Header.spec.tsx.snap +1 -1
- package/src/components/inline-confirm/InlineConfirm.tsx +1 -1
- package/src/components/table/TableFilter.tsx +15 -10
- package/src/components/table/__tests__/TableFilter.spec.tsx +20 -5
- package/src/theme/Plasmantine.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipboard.d.ts","sourceRoot":"","sources":["../../../../src/components/copyToClipboard/CopyToClipboard.tsx"],"names":[],"mappings":";AAGA,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AA0BD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.d.ts","sourceRoot":"","sources":["../../../../src/components/copyToClipboard/CopyToClipboard.tsx"],"names":[],"mappings":";AAGA,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AA0BD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAgBzE,CAAC"}
|
|
@@ -57,6 +57,7 @@ var CopyToClipboard = function(_param) {
|
|
|
57
57
|
},
|
|
58
58
|
value: others.value,
|
|
59
59
|
readOnly: true,
|
|
60
|
+
autoComplete: "off",
|
|
60
61
|
rightSection: /*#__PURE__*/ (0, _jsxruntime.jsx)(CopyToClipboardButton, _object_spread._({}, others))
|
|
61
62
|
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(CopyToClipboardButton, _object_spread._({}, others));
|
|
62
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/copyToClipboard/CopyToClipboard.tsx"],"sourcesContent":["import {CheckSize16Px, CopySize16Px} from '@coveord/plasma-react-icons';\nimport {ActionIcon, CopyButton, createStyles, TextInput, Tooltip} from '@mantine/core';\n\nexport interface CopyToClipboardProps {\n /**\n * The value to be copied to the clipboard.\n */\n value: string;\n /**\n * Whether to display the string to be copied alongside the button.\n *\n * @default false\n */\n withLabel?: boolean;\n /**\n * Called each time the value is copied to the clipboard\n */\n onCopy?: () => void;\n}\n\nconst useStyles = createStyles((theme) => ({\n input: {\n color: theme.colors.gray[7],\n },\n}));\n\nconst CopyToClipboardButton: React.FunctionComponent<Omit<CopyToClipboardProps, 'withLabel'>> = ({value, onCopy}) => (\n <CopyButton value={value} timeout={2000}>\n {({copied, copy}) => (\n <Tooltip label={copied ? 'Copied' : 'Copy'}>\n <ActionIcon\n color={copied ? 'success' : 'gray'}\n onClick={() => {\n copy();\n onCopy?.();\n }}\n >\n {copied ? <CheckSize16Px height={16} /> : <CopySize16Px height={16} />}\n </ActionIcon>\n </Tooltip>\n )}\n </CopyButton>\n);\n\nexport const CopyToClipboard: React.FunctionComponent<CopyToClipboardProps> = ({withLabel, ...others}) => {\n const {classes} = useStyles();\n\n return withLabel ? (\n <TextInput\n classNames={{\n input: classes.input,\n }}\n value={others.value}\n readOnly\n rightSection={<CopyToClipboardButton {...others} />}\n />\n ) : (\n <CopyToClipboardButton {...others} />\n );\n};\n"],"names":["CopyToClipboard","useStyles","createStyles","theme","input","color","colors","gray","CopyToClipboardButton","value","onCopy","CopyButton","timeout","copied","copy","Tooltip","label","ActionIcon","onClick","CheckSize16Px","height","CopySize16Px","withLabel","others","classes","TextInput","classNames","readOnly","rightSection"],"mappings":";;;;+BA4CaA;;;eAAAA;;;;;;gCA5C6B;oBAC6B;AAmBvE,IAAMC,YAAYC,IAAAA,kBAAY,EAAC,SAACC;WAAW;QACvCC,OAAO;YACHC,OAAOF,MAAMG,MAAM,CAACC,IAAI,CAAC,EAAE;QAC/B;IACJ;;AAEA,IAAMC,wBAA0F;QAAEC,cAAAA,OAAOC,eAAAA;yBACrG,qBAACC,gBAAU;QAACF,OAAOA;QAAOG,SAAS;kBAC9B;gBAAEC,eAAAA,QAAQC,aAAAA;iCACP,qBAACC,aAAO;gBAACC,OAAOH,SAAS,WAAW;0BAChC,cAAA,qBAACI,gBAAU;oBACPZ,OAAOQ,SAAS,YAAY;oBAC5BK,SAAS;4BAELR;wBADAI;yBACAJ,UAAAA,oBAAAA,8BAAAA;oBACJ;8BAECG,uBAAS,qBAACM,+BAAa;wBAACC,QAAQ;uCAAS,qBAACC,8BAAY;wBAACD,QAAQ;;;;;;;AAO7E,IAAMpB,kBAAiE;QAAEsB,mBAAAA,WAAcC;QAAdD;;IAC5E,IAAM,AAACE,UAAWvB,YAAXuB;IAEP,OAAOF,0BACH,qBAACG,eAAS;QACNC,YAAY;YACRtB,OAAOoB,QAAQpB,KAAK;QACxB;QACAK,OAAOc,OAAOd,KAAK;QACnBkB,QAAQ;QACRC,4BAAc,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/copyToClipboard/CopyToClipboard.tsx"],"sourcesContent":["import {CheckSize16Px, CopySize16Px} from '@coveord/plasma-react-icons';\nimport {ActionIcon, CopyButton, createStyles, TextInput, Tooltip} from '@mantine/core';\n\nexport interface CopyToClipboardProps {\n /**\n * The value to be copied to the clipboard.\n */\n value: string;\n /**\n * Whether to display the string to be copied alongside the button.\n *\n * @default false\n */\n withLabel?: boolean;\n /**\n * Called each time the value is copied to the clipboard\n */\n onCopy?: () => void;\n}\n\nconst useStyles = createStyles((theme) => ({\n input: {\n color: theme.colors.gray[7],\n },\n}));\n\nconst CopyToClipboardButton: React.FunctionComponent<Omit<CopyToClipboardProps, 'withLabel'>> = ({value, onCopy}) => (\n <CopyButton value={value} timeout={2000}>\n {({copied, copy}) => (\n <Tooltip label={copied ? 'Copied' : 'Copy'}>\n <ActionIcon\n color={copied ? 'success' : 'gray'}\n onClick={() => {\n copy();\n onCopy?.();\n }}\n >\n {copied ? <CheckSize16Px height={16} /> : <CopySize16Px height={16} />}\n </ActionIcon>\n </Tooltip>\n )}\n </CopyButton>\n);\n\nexport const CopyToClipboard: React.FunctionComponent<CopyToClipboardProps> = ({withLabel, ...others}) => {\n const {classes} = useStyles();\n\n return withLabel ? (\n <TextInput\n classNames={{\n input: classes.input,\n }}\n value={others.value}\n readOnly\n autoComplete=\"off\"\n rightSection={<CopyToClipboardButton {...others} />}\n />\n ) : (\n <CopyToClipboardButton {...others} />\n );\n};\n"],"names":["CopyToClipboard","useStyles","createStyles","theme","input","color","colors","gray","CopyToClipboardButton","value","onCopy","CopyButton","timeout","copied","copy","Tooltip","label","ActionIcon","onClick","CheckSize16Px","height","CopySize16Px","withLabel","others","classes","TextInput","classNames","readOnly","autoComplete","rightSection"],"mappings":";;;;+BA4CaA;;;eAAAA;;;;;;gCA5C6B;oBAC6B;AAmBvE,IAAMC,YAAYC,IAAAA,kBAAY,EAAC,SAACC;WAAW;QACvCC,OAAO;YACHC,OAAOF,MAAMG,MAAM,CAACC,IAAI,CAAC,EAAE;QAC/B;IACJ;;AAEA,IAAMC,wBAA0F;QAAEC,cAAAA,OAAOC,eAAAA;yBACrG,qBAACC,gBAAU;QAACF,OAAOA;QAAOG,SAAS;kBAC9B;gBAAEC,eAAAA,QAAQC,aAAAA;iCACP,qBAACC,aAAO;gBAACC,OAAOH,SAAS,WAAW;0BAChC,cAAA,qBAACI,gBAAU;oBACPZ,OAAOQ,SAAS,YAAY;oBAC5BK,SAAS;4BAELR;wBADAI;yBACAJ,UAAAA,oBAAAA,8BAAAA;oBACJ;8BAECG,uBAAS,qBAACM,+BAAa;wBAACC,QAAQ;uCAAS,qBAACC,8BAAY;wBAACD,QAAQ;;;;;;;AAO7E,IAAMpB,kBAAiE;QAAEsB,mBAAAA,WAAcC;QAAdD;;IAC5E,IAAM,AAACE,UAAWvB,YAAXuB;IAEP,OAAOF,0BACH,qBAACG,eAAS;QACNC,YAAY;YACRtB,OAAOoB,QAAQpB,KAAK;QACxB;QACAK,OAAOc,OAAOd,KAAK;QACnBkB,QAAQ;QACRC,cAAa;QACbC,4BAAc,qBAACrB,4CAA0Be;uBAG7C,qBAACf,4CAA0Be;AAEnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/header/Header.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAA8C,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAW,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAE3E,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC7C;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,UAAU,UAAU;IAChB,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;IACnC,WAAW,EAAE,OAAO,iBAAiB,CAAC;IACtC,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,SAAS,EAAE,OAAO,eAAe,CAAC;CACrC;AAED,eAAO,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/header/Header.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAA8C,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAW,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAE3E,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC7C;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,UAAU,UAAU;IAChB,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;IACnC,WAAW,EAAE,OAAO,iBAAiB,CAAC;IACtC,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,SAAS,EAAE,OAAO,eAAe,CAAC;CACrC;AAED,eAAO,MAAM,MAAM,EAAE,UAoCpB,CAAC;AAEF,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,CAS/D,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,CAA0D,CAAC;AAEvH,MAAM,WAAW,oBAAoB;IACjC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,CAM5D,CAAC"}
|
|
@@ -40,7 +40,8 @@ var Header = function(_param) {
|
|
|
40
40
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Group, _object_spread_props._(_object_spread._({
|
|
41
41
|
position: "apart",
|
|
42
42
|
p: variant === "page" ? "xl" : undefined,
|
|
43
|
-
pb: variant === "page" ? "lg" : undefined
|
|
43
|
+
pb: variant === "page" ? "lg" : undefined,
|
|
44
|
+
noWrap: true
|
|
44
45
|
}, others), {
|
|
45
46
|
children: [
|
|
46
47
|
/*#__PURE__*/ (0, _jsxruntime.jsxs)(_core.Stack, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/header/Header.tsx"],"sourcesContent":["import {QuestionSize16Px} from '@coveord/plasma-react-icons';\nimport {Anchor, Breadcrumbs, DefaultProps, Divider, Group, Stack, Text, Title, Tooltip} from '@mantine/core';\nimport {Children, FunctionComponent, ReactElement, ReactNode} from 'react';\n\nexport interface HeaderProps extends DefaultProps {\n /**\n * The description text displayed inside the header underneath the title\n */\n description?: ReactNode;\n /**\n * Whether the header should have a border on the bottom\n */\n borderBottom?: boolean;\n /**\n * Use the modal variant when displaying the header inside a modal\n *\n * @default 'page'\n */\n variant?: 'page' | 'modal';\n /**\n * The title of the header.\n */\n children: ReactNode;\n}\n\ninterface HeaderType {\n (props: HeaderProps): ReactElement;\n Breadcrumbs: typeof HeaderBreadcrumbs;\n Actions: typeof HeaderActions;\n DocAnchor: typeof HeaderDocAnchor;\n}\n\nexport const Header: HeaderType = ({description, borderBottom, children, variant = 'page', ...others}) => {\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const breadcrumbs = convertedChildren.find((child) => child.type === HeaderBreadcrumbs);\n const actions = convertedChildren.find((child) => child.type === HeaderActions);\n const docAnchor = convertedChildren.find((child) => child.type === HeaderDocAnchor);\n const otherChildren = convertedChildren.filter(\n (child) => child.type !== HeaderBreadcrumbs && child.type !== HeaderActions && child.type !== HeaderDocAnchor,\n );\n return (\n <>\n <Group\n position=\"apart\"\n p={variant === 'page' ? 'xl' : undefined}\n pb={variant === 'page' ? 'lg' : undefined}\n {...others}\n >\n <Stack spacing={0}>\n {breadcrumbs}\n <Title\n order={variant === 'page' ? 1 : 3}\n color={variant === 'page' ? 'gray.5' : undefined}\n sx={{wordBreak: 'break-word'}}\n >\n {otherChildren}\n {docAnchor}\n </Title>\n <Text size={variant === 'page' ? 'md' : 'sm'} color=\"gray.6\">\n {description}\n </Text>\n </Stack>\n {actions}\n </Group>\n {borderBottom ? <Divider size=\"xs\" /> : null}\n </>\n );\n};\n\nconst HeaderBreadcrumbs: FunctionComponent<{children: ReactNode}> = ({children}) => (\n <Breadcrumbs\n styles={(theme) => ({\n breadcrumb: {fontSize: theme.fontSizes.sm, fontWeight: 300},\n separator: {color: theme.colors.gray[5]},\n })}\n >\n {children}\n </Breadcrumbs>\n);\n\nconst HeaderActions: FunctionComponent<{children: ReactNode}> = ({children}) => <Group spacing=\"sm\">{children}</Group>;\n\nexport interface HeaderDocAnchorProps {\n /**\n * A href pointing to documentation related to the current panel.\n * When provided, an info icon is rendered next to the title as link to this documentation\n */\n href: string;\n /**\n * The tooltip text shown when hovering over the doc link icon\n */\n label?: string;\n}\n\nconst HeaderDocAnchor: FunctionComponent<HeaderDocAnchorProps> = ({href: docLink, label: docLinkTooltipLabel}) => (\n <Tooltip label={docLinkTooltipLabel} disabled={!docLinkTooltipLabel} position=\"right\">\n <Anchor inline href={docLink} target=\"_blank\" ml=\"xs\" style={{verticalAlign: 'middle'}}>\n <QuestionSize16Px height={16} />\n </Anchor>\n </Tooltip>\n);\n\nHeader.Breadcrumbs = HeaderBreadcrumbs;\nHeader.Actions = HeaderActions;\nHeader.DocAnchor = HeaderDocAnchor;\n"],"names":["Header","description","borderBottom","children","variant","others","convertedChildren","Children","toArray","breadcrumbs","find","child","type","HeaderBreadcrumbs","actions","HeaderActions","docAnchor","HeaderDocAnchor","otherChildren","filter","Group","position","p","undefined","pb","Stack","spacing","Title","order","color","sx","wordBreak","Text","size","Divider","Breadcrumbs","styles","theme","breadcrumb","fontSize","fontSizes","sm","fontWeight","separator","colors","gray","href","docLink","label","docLinkTooltipLabel","Tooltip","disabled","Anchor","inline","target","ml","style","verticalAlign","QuestionSize16Px","height","Actions","DocAnchor"],"mappings":";;;;+BAgCaA;;;eAAAA;;;;;;;gCAhCkB;oBAC8D;qBAC1B;AA8B5D,IAAMA,SAAqB;QAAEC,qBAAAA,aAAaC,sBAAAA,cAAcC,kBAAAA,kCAAUC,SAAAA,sCAAU,yBAAWC;QAA1DJ;QAAaC;QAAcC;QAAUC;;IACrE,IAAME,oBAAoBC,eAAQ,CAACC,OAAO,CAACL;IAC3C,IAAMM,cAAcH,kBAAkBI,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKC;;IACrE,IAAMC,UAAUR,kBAAkBI,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKG;;IACjE,IAAMC,YAAYV,kBAAkBI,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKK;;IACnE,IAAMC,gBAAgBZ,kBAAkBa,MAAM,CAC1C,SAACR;eAAUA,MAAMC,IAAI,KAAKC,qBAAqBF,MAAMC,IAAI,KAAKG,iBAAiBJ,MAAMC,IAAI,KAAKK;;IAElG,qBACI;;0BACI,sBAACG,WAAK;gBACFC,UAAS;gBACTC,GAAGlB,YAAY,SAAS,OAAOmB;gBAC/BC,IAAIpB,YAAY,SAAS,OAAOmB;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/header/Header.tsx"],"sourcesContent":["import {QuestionSize16Px} from '@coveord/plasma-react-icons';\nimport {Anchor, Breadcrumbs, DefaultProps, Divider, Group, Stack, Text, Title, Tooltip} from '@mantine/core';\nimport {Children, FunctionComponent, ReactElement, ReactNode} from 'react';\n\nexport interface HeaderProps extends DefaultProps {\n /**\n * The description text displayed inside the header underneath the title\n */\n description?: ReactNode;\n /**\n * Whether the header should have a border on the bottom\n */\n borderBottom?: boolean;\n /**\n * Use the modal variant when displaying the header inside a modal\n *\n * @default 'page'\n */\n variant?: 'page' | 'modal';\n /**\n * The title of the header.\n */\n children: ReactNode;\n}\n\ninterface HeaderType {\n (props: HeaderProps): ReactElement;\n Breadcrumbs: typeof HeaderBreadcrumbs;\n Actions: typeof HeaderActions;\n DocAnchor: typeof HeaderDocAnchor;\n}\n\nexport const Header: HeaderType = ({description, borderBottom, children, variant = 'page', ...others}) => {\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const breadcrumbs = convertedChildren.find((child) => child.type === HeaderBreadcrumbs);\n const actions = convertedChildren.find((child) => child.type === HeaderActions);\n const docAnchor = convertedChildren.find((child) => child.type === HeaderDocAnchor);\n const otherChildren = convertedChildren.filter(\n (child) => child.type !== HeaderBreadcrumbs && child.type !== HeaderActions && child.type !== HeaderDocAnchor,\n );\n return (\n <>\n <Group\n position=\"apart\"\n p={variant === 'page' ? 'xl' : undefined}\n pb={variant === 'page' ? 'lg' : undefined}\n noWrap\n {...others}\n >\n <Stack spacing={0}>\n {breadcrumbs}\n <Title\n order={variant === 'page' ? 1 : 3}\n color={variant === 'page' ? 'gray.5' : undefined}\n sx={{wordBreak: 'break-word'}}\n >\n {otherChildren}\n {docAnchor}\n </Title>\n <Text size={variant === 'page' ? 'md' : 'sm'} color=\"gray.6\">\n {description}\n </Text>\n </Stack>\n {actions}\n </Group>\n {borderBottom ? <Divider size=\"xs\" /> : null}\n </>\n );\n};\n\nconst HeaderBreadcrumbs: FunctionComponent<{children: ReactNode}> = ({children}) => (\n <Breadcrumbs\n styles={(theme) => ({\n breadcrumb: {fontSize: theme.fontSizes.sm, fontWeight: 300},\n separator: {color: theme.colors.gray[5]},\n })}\n >\n {children}\n </Breadcrumbs>\n);\n\nconst HeaderActions: FunctionComponent<{children: ReactNode}> = ({children}) => <Group spacing=\"sm\">{children}</Group>;\n\nexport interface HeaderDocAnchorProps {\n /**\n * A href pointing to documentation related to the current panel.\n * When provided, an info icon is rendered next to the title as link to this documentation\n */\n href: string;\n /**\n * The tooltip text shown when hovering over the doc link icon\n */\n label?: string;\n}\n\nconst HeaderDocAnchor: FunctionComponent<HeaderDocAnchorProps> = ({href: docLink, label: docLinkTooltipLabel}) => (\n <Tooltip label={docLinkTooltipLabel} disabled={!docLinkTooltipLabel} position=\"right\">\n <Anchor inline href={docLink} target=\"_blank\" ml=\"xs\" style={{verticalAlign: 'middle'}}>\n <QuestionSize16Px height={16} />\n </Anchor>\n </Tooltip>\n);\n\nHeader.Breadcrumbs = HeaderBreadcrumbs;\nHeader.Actions = HeaderActions;\nHeader.DocAnchor = HeaderDocAnchor;\n"],"names":["Header","description","borderBottom","children","variant","others","convertedChildren","Children","toArray","breadcrumbs","find","child","type","HeaderBreadcrumbs","actions","HeaderActions","docAnchor","HeaderDocAnchor","otherChildren","filter","Group","position","p","undefined","pb","noWrap","Stack","spacing","Title","order","color","sx","wordBreak","Text","size","Divider","Breadcrumbs","styles","theme","breadcrumb","fontSize","fontSizes","sm","fontWeight","separator","colors","gray","href","docLink","label","docLinkTooltipLabel","Tooltip","disabled","Anchor","inline","target","ml","style","verticalAlign","QuestionSize16Px","height","Actions","DocAnchor"],"mappings":";;;;+BAgCaA;;;eAAAA;;;;;;;gCAhCkB;oBAC8D;qBAC1B;AA8B5D,IAAMA,SAAqB;QAAEC,qBAAAA,aAAaC,sBAAAA,cAAcC,kBAAAA,kCAAUC,SAAAA,sCAAU,yBAAWC;QAA1DJ;QAAaC;QAAcC;QAAUC;;IACrE,IAAME,oBAAoBC,eAAQ,CAACC,OAAO,CAACL;IAC3C,IAAMM,cAAcH,kBAAkBI,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKC;;IACrE,IAAMC,UAAUR,kBAAkBI,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKG;;IACjE,IAAMC,YAAYV,kBAAkBI,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKK;;IACnE,IAAMC,gBAAgBZ,kBAAkBa,MAAM,CAC1C,SAACR;eAAUA,MAAMC,IAAI,KAAKC,qBAAqBF,MAAMC,IAAI,KAAKG,iBAAiBJ,MAAMC,IAAI,KAAKK;;IAElG,qBACI;;0BACI,sBAACG,WAAK;gBACFC,UAAS;gBACTC,GAAGlB,YAAY,SAAS,OAAOmB;gBAC/BC,IAAIpB,YAAY,SAAS,OAAOmB;gBAChCE,MAAM;eACFpB;;kCAEJ,sBAACqB,WAAK;wBAACC,SAAS;;4BACXlB;0CACD,sBAACmB,WAAK;gCACFC,OAAOzB,YAAY,SAAS,IAAI;gCAChC0B,OAAO1B,YAAY,SAAS,WAAWmB;gCACvCQ,IAAI;oCAACC,WAAW;gCAAY;;oCAE3Bd;oCACAF;;;0CAEL,qBAACiB,UAAI;gCAACC,MAAM9B,YAAY,SAAS,OAAO;gCAAM0B,OAAM;0CAC/C7B;;;;oBAGRa;;;YAEJZ,6BAAe,qBAACiC,aAAO;gBAACD,MAAK;iBAAU;;;AAGpD;AAEA,IAAMrB,oBAA8D;QAAEV,iBAAAA;yBAClE,qBAACiC,iBAAW;QACRC,QAAQ,SAACC;mBAAW;gBAChBC,YAAY;oBAACC,UAAUF,MAAMG,SAAS,CAACC,EAAE;oBAAEC,YAAY;gBAAG;gBAC1DC,WAAW;oBAACd,OAAOQ,MAAMO,MAAM,CAACC,IAAI,CAAC,EAAE;gBAAA;YAC3C;;kBAEC3C;;;AAIT,IAAMY,gBAA0D;QAAEZ,iBAAAA;yBAAc,qBAACiB,WAAK;QAACO,SAAQ;kBAAMxB;;;AAcrG,IAAMc,kBAA2D;QAAE8B,AAAMC,gBAAND,MAAeE,AAAOC,4BAAPD;yBAC9E,qBAACE,aAAO;QAACF,OAAOC;QAAqBE,UAAU,CAACF;QAAqB7B,UAAS;kBAC1E,cAAA,qBAACgC,YAAM;YAACC,MAAM;YAACP,MAAMC;YAASO,QAAO;YAASC,IAAG;YAAKC,OAAO;gBAACC,eAAe;YAAQ;sBACjF,cAAA,qBAACC,kCAAgB;gBAACC,QAAQ;;;;;AAKtC5D,OAAOoC,WAAW,GAAGvB;AACrBb,OAAO6D,OAAO,GAAG9C;AACjBf,OAAO8D,SAAS,GAAG7C"}
|
|
@@ -2,7 +2,7 @@ import { FunctionComponent, PropsWithChildren } from 'react';
|
|
|
2
2
|
import { InlineConfirmButton } from './InlineConfirmButton';
|
|
3
3
|
import { InlineConfirmMenuItem } from './InlineConfirmMenuItem';
|
|
4
4
|
import { InlineConfirmPrompt } from './InlineConfirmPrompt';
|
|
5
|
-
type InlineConfirmType = FunctionComponent<PropsWithChildren
|
|
5
|
+
type InlineConfirmType = FunctionComponent<PropsWithChildren<unknown>> & {
|
|
6
6
|
Prompt: typeof InlineConfirmPrompt;
|
|
7
7
|
Button: typeof InlineConfirmButton;
|
|
8
8
|
MenuItem: typeof InlineConfirmMenuItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineConfirm.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAE7F,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"InlineConfirm.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAE7F,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,GAAG;IACrE,MAAM,EAAE,OAAO,mBAAmB,CAAC;IACnC,MAAM,EAAE,OAAO,mBAAmB,CAAC;IACnC,QAAQ,EAAE,OAAO,qBAAqB,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAc3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"sourcesContent":["import {Children, FunctionComponent, PropsWithChildren, ReactElement, useState} from 'react';\n\nimport {InlineConfirmButton} from './InlineConfirmButton';\nimport {InlineConfirmContext} from './InlineConfirmContext';\nimport {InlineConfirmMenuItem} from './InlineConfirmMenuItem';\nimport {InlineConfirmPrompt} from './InlineConfirmPrompt';\n\ntype InlineConfirmType = FunctionComponent<PropsWithChildren
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"sourcesContent":["import {Children, FunctionComponent, PropsWithChildren, ReactElement, useState} from 'react';\n\nimport {InlineConfirmButton} from './InlineConfirmButton';\nimport {InlineConfirmContext} from './InlineConfirmContext';\nimport {InlineConfirmMenuItem} from './InlineConfirmMenuItem';\nimport {InlineConfirmPrompt} from './InlineConfirmPrompt';\n\ntype InlineConfirmType = FunctionComponent<PropsWithChildren<unknown>> & {\n Prompt: typeof InlineConfirmPrompt;\n Button: typeof InlineConfirmButton;\n MenuItem: typeof InlineConfirmMenuItem;\n};\n\nexport const InlineConfirm: InlineConfirmType = ({children}) => {\n const [confirmingId, setConfirmingId] = useState<string | null>(null);\n\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const prompt = convertedChildren.find(\n (child) => child.type === InlineConfirmPrompt && child.props.id === confirmingId,\n );\n const clearConfirm = () => setConfirmingId(null);\n\n return (\n <InlineConfirmContext.Provider value={{confirmingId, setConfirmingId, clearConfirm}}>\n {prompt ?? children}\n </InlineConfirmContext.Provider>\n );\n};\n\nInlineConfirm.Prompt = InlineConfirmPrompt;\nInlineConfirm.Button = InlineConfirmButton;\nInlineConfirm.MenuItem = InlineConfirmMenuItem;\n"],"names":["InlineConfirm","children","useState","confirmingId","setConfirmingId","convertedChildren","Children","toArray","prompt","find","child","type","InlineConfirmPrompt","props","id","clearConfirm","InlineConfirmContext","Provider","value","Prompt","Button","InlineConfirmButton","MenuItem","InlineConfirmMenuItem"],"mappings":";;;;+BAaaA;;;eAAAA;;;;;qBAbwE;mCAEnD;oCACC;qCACC;mCACF;AAQ3B,IAAMA,gBAAmC;QAAEC,iBAAAA;IAC9C,IAAwCC,+BAAAA,IAAAA,eAAQ,EAAgB,WAAzDC,eAAiCD,cAAnBE,kBAAmBF;IAExC,IAAMG,oBAAoBC,eAAQ,CAACC,OAAO,CAACN;IAC3C,IAAMO,SAASH,kBAAkBI,IAAI,CACjC,SAACC;eAAUA,MAAMC,IAAI,KAAKC,wCAAmB,IAAIF,MAAMG,KAAK,CAACC,EAAE,KAAKX;;IAExE,IAAMY,eAAe;eAAMX,gBAAgB;;IAE3C,qBACI,qBAACY,0CAAoB,CAACC,QAAQ;QAACC,OAAO;YAACf,cAAAA;YAAcC,iBAAAA;YAAiBW,cAAAA;QAAY;kBAC7EP,mBAAAA,oBAAAA,SAAUP;;AAGvB;AAEAD,cAAcmB,MAAM,GAAGP,wCAAmB;AAC1CZ,cAAcoB,MAAM,GAAGC,wCAAmB;AAC1CrB,cAAcsB,QAAQ,GAAGC,4CAAqB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableFilter.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"TableFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,YAAY,EAAQ,SAAS,EAA0B,MAAM,eAAe,CAAC;AACjG,OAAO,EAAqB,iBAAiB,EAA8B,MAAM,OAAO,CAAC;AAMzF,QAAA,MAAM,SAAS;;;;;;;;CAQZ,CAAC;AAEJ,KAAK,sBAAsB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAC1D,UAAU,gBAAiB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IACnE;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CAsD3D,CAAC"}
|
|
@@ -11,9 +11,12 @@ Object.defineProperty(exports, "TableFilter", {
|
|
|
11
11
|
var _object_spread = require("@swc/helpers/_/_object_spread");
|
|
12
12
|
var _object_spread_props = require("@swc/helpers/_/_object_spread_props");
|
|
13
13
|
var _object_without_properties = require("@swc/helpers/_/_object_without_properties");
|
|
14
|
+
var _sliced_to_array = require("@swc/helpers/_/_sliced_to_array");
|
|
14
15
|
var _jsxruntime = require("react/jsx-runtime");
|
|
15
16
|
var _plasmareacticons = require("@coveord/plasma-react-icons");
|
|
16
17
|
var _core = require("@mantine/core");
|
|
18
|
+
var _react = require("react");
|
|
19
|
+
var _hooks = require("@mantine/hooks");
|
|
17
20
|
var _Tablestyles = require("./Table.styles");
|
|
18
21
|
var _TableContext = require("./TableContext");
|
|
19
22
|
var useStyles = (0, _core.createStyles)(function(theme) {
|
|
@@ -41,23 +44,28 @@ var TableFilter = function(_param) {
|
|
|
41
44
|
unstyled: unstyled
|
|
42
45
|
}).classes;
|
|
43
46
|
var _useTable = (0, _TableContext.useTable)(), state = _useTable.state, setState = _useTable.setState;
|
|
44
|
-
var
|
|
47
|
+
var _useState = _sliced_to_array._((0, _react.useState)(state.globalFilter), 2), filter = _useState[0], setFilter = _useState[1];
|
|
48
|
+
var _useDebouncedValue = _sliced_to_array._((0, _hooks.useDebouncedValue)(filter, 300), 2), debounced = _useDebouncedValue[0], cancel = _useDebouncedValue[1];
|
|
49
|
+
(0, _hooks.useDidUpdate)(function() {
|
|
45
50
|
setState(function(prevState) {
|
|
46
51
|
return _object_spread_props._(_object_spread._({}, prevState), {
|
|
47
52
|
pagination: prevState.pagination ? {
|
|
48
53
|
pageIndex: 0,
|
|
49
54
|
pageSize: prevState.pagination.pageSize
|
|
50
55
|
} : prevState.pagination,
|
|
51
|
-
globalFilter:
|
|
56
|
+
globalFilter: debounced
|
|
52
57
|
});
|
|
53
58
|
});
|
|
54
|
-
|
|
59
|
+
return cancel;
|
|
60
|
+
}, [
|
|
61
|
+
debounced
|
|
62
|
+
]);
|
|
55
63
|
var handleChange = function(event) {
|
|
56
64
|
var value = event.currentTarget.value;
|
|
57
|
-
|
|
65
|
+
setFilter(value);
|
|
58
66
|
};
|
|
59
67
|
var handleClear = function() {
|
|
60
|
-
|
|
68
|
+
setFilter("");
|
|
61
69
|
};
|
|
62
70
|
return /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.Grid.Col, {
|
|
63
71
|
span: "content",
|
|
@@ -67,17 +75,18 @@ var TableFilter = function(_param) {
|
|
|
67
75
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.TextInput, _object_spread._({
|
|
68
76
|
className: classes.wrapper,
|
|
69
77
|
placeholder: placeholder,
|
|
78
|
+
autoComplete: "off",
|
|
70
79
|
mb: "md",
|
|
71
|
-
rightSection:
|
|
80
|
+
rightSection: filter ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_core.ActionIcon, {
|
|
72
81
|
onClick: handleClear,
|
|
73
82
|
children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_plasmareacticons.CrossSize16Px, {
|
|
74
83
|
height: 16
|
|
75
84
|
})
|
|
76
85
|
}) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_plasmareacticons.SearchSize16Px, {
|
|
77
|
-
height:
|
|
86
|
+
height: 16,
|
|
78
87
|
className: classes.empty
|
|
79
88
|
}),
|
|
80
|
-
value:
|
|
89
|
+
value: filter,
|
|
81
90
|
onChange: handleChange
|
|
82
91
|
}, others))
|
|
83
92
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/table/TableFilter.tsx"],"sourcesContent":["import {CrossSize16Px, SearchSize16Px} from '@coveord/plasma-react-icons';\nimport {ActionIcon,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/table/TableFilter.tsx"],"sourcesContent":["import {CrossSize16Px, SearchSize16Px} from '@coveord/plasma-react-icons';\nimport {ActionIcon, DefaultProps, Grid, Selectors, TextInput, createStyles} from '@mantine/core';\nimport {ChangeEventHandler, FunctionComponent, MouseEventHandler, useState} from 'react';\n\nimport {useDebouncedValue, useDidUpdate} from '@mantine/hooks';\nimport {TableComponentsOrder} from './Table.styles';\nimport {useTable} from './TableContext';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n wrapper: {\n marginBottom: '0 !important',\n },\n empty: {\n color: theme.colors.gray[4],\n },\n}));\n\ntype TableFilterStylesNames = Selectors<typeof useStyles>;\ninterface TableFilterProps extends DefaultProps<TableFilterStylesNames> {\n /**\n * The placeholder for the filter input\n *\n * @default \"Search by any field\"\n */\n placeholder?: string;\n}\n\nexport const TableFilter: FunctionComponent<TableFilterProps> = ({\n placeholder = 'Search by any field',\n classNames,\n styles,\n unstyled,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TableFilter', classNames, styles, unstyled});\n const {state, setState} = useTable();\n const [filter, setFilter] = useState(state.globalFilter);\n const [debounced, cancel] = useDebouncedValue(filter, 300);\n\n useDidUpdate(() => {\n setState((prevState) => ({\n ...prevState,\n pagination: prevState.pagination\n ? {pageIndex: 0, pageSize: prevState.pagination.pageSize}\n : prevState.pagination,\n globalFilter: debounced,\n }));\n return cancel;\n }, [debounced]);\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const {value} = event.currentTarget;\n setFilter(value);\n };\n\n const handleClear: MouseEventHandler<HTMLButtonElement> = () => {\n setFilter('');\n };\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Filter} py=\"sm\" className={classes.root}>\n <TextInput\n className={classes.wrapper}\n placeholder={placeholder}\n autoComplete=\"off\"\n mb=\"md\"\n rightSection={\n filter ? (\n <ActionIcon onClick={handleClear}>\n <CrossSize16Px height={16} />\n </ActionIcon>\n ) : (\n <SearchSize16Px height={16} className={classes.empty} />\n )\n }\n value={filter}\n onChange={handleChange}\n {...others}\n />\n </Grid.Col>\n );\n};\n"],"names":["TableFilter","useStyles","createStyles","theme","root","wrapper","marginBottom","empty","color","colors","gray","placeholder","classNames","styles","unstyled","others","classes","name","useTable","state","setState","useState","globalFilter","filter","setFilter","useDebouncedValue","debounced","cancel","useDidUpdate","prevState","pagination","pageIndex","pageSize","handleChange","event","value","currentTarget","handleClear","Grid","Col","span","order","TableComponentsOrder","Filter","py","className","TextInput","autoComplete","mb","rightSection","ActionIcon","onClick","CrossSize16Px","height","SearchSize16Px","onChange"],"mappings":";;;;+BA4BaA;;;eAAAA;;;;;;;;gCA5B+B;oBACqC;qBACA;qBAEnC;2BACX;4BACZ;AAEvB,IAAMC,YAAYC,IAAAA,kBAAY,EAAC,SAACC;WAAW;QACvCC,MAAM,CAAC;QACPC,SAAS;YACLC,cAAc;QAClB;QACAC,OAAO;YACHC,OAAOL,MAAMM,MAAM,CAACC,IAAI,CAAC,EAAE;QAC/B;IACJ;;AAYO,IAAMV,cAAmD;oCAC5DW,aAAAA,8CAAc,4CACdC,oBAAAA,YACAC,gBAAAA,QACAC,kBAAAA,UACGC;QAJHJ;QACAC;QACAC;QACAC;;IAGA,IAAM,AAACE,UAAWf,UAAU,MAAM;QAACgB,MAAM;QAAeL,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,GAA7EE;IACP,IAA0BE,YAAAA,IAAAA,sBAAQ,KAA3BC,QAAmBD,UAAnBC,OAAOC,WAAYF,UAAZE;IACd,IAA4BC,+BAAAA,IAAAA,eAAQ,EAACF,MAAMG,YAAY,OAAhDC,SAAqBF,cAAbG,YAAaH;IAC5B,IAA4BI,wCAAAA,IAAAA,wBAAiB,EAACF,QAAQ,UAA/CG,YAAqBD,uBAAVE,SAAUF;IAE5BG,IAAAA,mBAAY,EAAC;QACTR,SAAS,SAACS;mBAAe,4CAClBA;gBACHC,YAAYD,UAAUC,UAAU,GAC1B;oBAACC,WAAW;oBAAGC,UAAUH,UAAUC,UAAU,CAACE,QAAQ;gBAAA,IACtDH,UAAUC,UAAU;gBAC1BR,cAAcI;;;QAElB,OAAOC;IACX,GAAG;QAACD;KAAU;IAEd,IAAMO,eAAqD,SAACC;QACxD,IAAM,AAACC,QAASD,MAAME,aAAa,CAA5BD;QACPX,UAAUW;IACd;IAEA,IAAME,cAAoD;QACtDb,UAAU;IACd;IAEA,qBACI,qBAACc,UAAI,CAACC,GAAG;QAACC,MAAK;QAAUC,OAAOC,iCAAoB,CAACC,MAAM;QAAEC,IAAG;QAAKC,WAAW7B,QAAQZ,IAAI;kBACxF,cAAA,qBAAC0C,eAAS;YACND,WAAW7B,QAAQX,OAAO;YAC1BM,aAAaA;YACboC,cAAa;YACbC,IAAG;YACHC,cACI1B,uBACI,qBAAC2B,gBAAU;gBAACC,SAASd;0BACjB,cAAA,qBAACe,+BAAa;oBAACC,QAAQ;;+BAG3B,qBAACC,gCAAc;gBAACD,QAAQ;gBAAIR,WAAW7B,QAAQT,KAAK;;YAG5D4B,OAAOZ;YACPgC,UAAUtB;WACNlB;;AAIpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plasmantine.d.ts","sourceRoot":"","sources":["../../../src/theme/Plasmantine.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAI3D,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Plasmantine.d.ts","sourceRoot":"","sources":["../../../src/theme/Plasmantine.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAI3D,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAIrE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/theme/Plasmantine.tsx"],"sourcesContent":["import {MantineProvider} from '@mantine/core';\nimport {FunctionComponent, PropsWithChildren} from 'react';\n\nimport {plasmaTheme} from './Theme';\n\nexport const Plasmantine: FunctionComponent<PropsWithChildren
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/Plasmantine.tsx"],"sourcesContent":["import {MantineProvider} from '@mantine/core';\nimport {FunctionComponent, PropsWithChildren} from 'react';\n\nimport {plasmaTheme} from './Theme';\n\nexport const Plasmantine: FunctionComponent<PropsWithChildren<unknown>> = ({children}) => (\n <MantineProvider withGlobalStyles withNormalizeCSS theme={plasmaTheme}>\n {children}\n </MantineProvider>\n);\n"],"names":["Plasmantine","children","MantineProvider","withGlobalStyles","withNormalizeCSS","theme","plasmaTheme"],"mappings":";;;;+BAKaA;;;eAAAA;;;;oBALiB;qBAGJ;AAEnB,IAAMA,cAA6D;QAAEC,iBAAAA;yBACxE,qBAACC,qBAAe;QAACC,gBAAgB;QAACC,gBAAgB;QAACC,OAAOC,kBAAW;kBAChEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToClipboard.d.ts","sourceRoot":"","sources":["../../../../src/components/copyToClipboard/CopyToClipboard.tsx"],"names":[],"mappings":";AAGA,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AA0BD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,
|
|
1
|
+
{"version":3,"file":"CopyToClipboard.d.ts","sourceRoot":"","sources":["../../../../src/components/copyToClipboard/CopyToClipboard.tsx"],"names":[],"mappings":";AAGA,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AA0BD,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAgBzE,CAAC"}
|
|
@@ -47,6 +47,7 @@ export var CopyToClipboard = function(_param) {
|
|
|
47
47
|
},
|
|
48
48
|
value: others.value,
|
|
49
49
|
readOnly: true,
|
|
50
|
+
autoComplete: "off",
|
|
50
51
|
rightSection: /*#__PURE__*/ _jsx(CopyToClipboardButton, _object_spread({}, others))
|
|
51
52
|
}) : /*#__PURE__*/ _jsx(CopyToClipboardButton, _object_spread({}, others));
|
|
52
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/copyToClipboard/CopyToClipboard.tsx"],"sourcesContent":["import {CheckSize16Px, CopySize16Px} from '@coveord/plasma-react-icons';\nimport {ActionIcon, CopyButton, createStyles, TextInput, Tooltip} from '@mantine/core';\n\nexport interface CopyToClipboardProps {\n /**\n * The value to be copied to the clipboard.\n */\n value: string;\n /**\n * Whether to display the string to be copied alongside the button.\n *\n * @default false\n */\n withLabel?: boolean;\n /**\n * Called each time the value is copied to the clipboard\n */\n onCopy?: () => void;\n}\n\nconst useStyles = createStyles((theme) => ({\n input: {\n color: theme.colors.gray[7],\n },\n}));\n\nconst CopyToClipboardButton: React.FunctionComponent<Omit<CopyToClipboardProps, 'withLabel'>> = ({value, onCopy}) => (\n <CopyButton value={value} timeout={2000}>\n {({copied, copy}) => (\n <Tooltip label={copied ? 'Copied' : 'Copy'}>\n <ActionIcon\n color={copied ? 'success' : 'gray'}\n onClick={() => {\n copy();\n onCopy?.();\n }}\n >\n {copied ? <CheckSize16Px height={16} /> : <CopySize16Px height={16} />}\n </ActionIcon>\n </Tooltip>\n )}\n </CopyButton>\n);\n\nexport const CopyToClipboard: React.FunctionComponent<CopyToClipboardProps> = ({withLabel, ...others}) => {\n const {classes} = useStyles();\n\n return withLabel ? (\n <TextInput\n classNames={{\n input: classes.input,\n }}\n value={others.value}\n readOnly\n rightSection={<CopyToClipboardButton {...others} />}\n />\n ) : (\n <CopyToClipboardButton {...others} />\n );\n};\n"],"names":["CheckSize16Px","CopySize16Px","ActionIcon","CopyButton","createStyles","TextInput","Tooltip","useStyles","theme","input","color","colors","gray","CopyToClipboardButton","value","onCopy","timeout","copied","copy","label","onClick","height","CopyToClipboard","withLabel","others","classes","classNames","readOnly","rightSection"],"mappings":";;;AAAA,SAAQA,aAAa,EAAEC,YAAY,QAAO,8BAA8B;AACxE,SAAQC,UAAU,EAAEC,UAAU,EAAEC,YAAY,EAAEC,SAAS,EAAEC,OAAO,QAAO,gBAAgB;AAmBvF,IAAMC,YAAYH,aAAa,SAACI;WAAW;QACvCC,OAAO;YACHC,OAAOF,MAAMG,MAAM,CAACC,IAAI,CAAC,EAAE;QAC/B;IACJ;;AAEA,IAAMC,wBAA0F;QAAEC,cAAAA,OAAOC,eAAAA;yBACrG,KAACZ;QAAWW,OAAOA;QAAOE,SAAS;kBAC9B;gBAAEC,eAAAA,QAAQC,aAAAA;iCACP,KAACZ;gBAAQa,OAAOF,SAAS,WAAW;0BAChC,cAAA,KAACf;oBACGQ,OAAOO,SAAS,YAAY;oBAC5BG,SAAS;4BAELL;wBADAG;yBACAH,UAAAA,oBAAAA,8BAAAA;oBACJ;8BAECE,uBAAS,KAACjB;wBAAcqB,QAAQ;uCAAS,KAACpB;wBAAaoB,QAAQ;;;;;;;AAOpF,OAAO,IAAMC,kBAAiE;QAAEC,mBAAAA,WAAcC;QAAdD;;IAC5E,IAAM,AAACE,UAAWlB,YAAXkB;IAEP,OAAOF,0BACH,KAAClB;QACGqB,YAAY;YACRjB,OAAOgB,QAAQhB,KAAK;QACxB;QACAK,OAAOU,OAAOV,KAAK;QACnBa,QAAQ;QACRC,4BAAc,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/copyToClipboard/CopyToClipboard.tsx"],"sourcesContent":["import {CheckSize16Px, CopySize16Px} from '@coveord/plasma-react-icons';\nimport {ActionIcon, CopyButton, createStyles, TextInput, Tooltip} from '@mantine/core';\n\nexport interface CopyToClipboardProps {\n /**\n * The value to be copied to the clipboard.\n */\n value: string;\n /**\n * Whether to display the string to be copied alongside the button.\n *\n * @default false\n */\n withLabel?: boolean;\n /**\n * Called each time the value is copied to the clipboard\n */\n onCopy?: () => void;\n}\n\nconst useStyles = createStyles((theme) => ({\n input: {\n color: theme.colors.gray[7],\n },\n}));\n\nconst CopyToClipboardButton: React.FunctionComponent<Omit<CopyToClipboardProps, 'withLabel'>> = ({value, onCopy}) => (\n <CopyButton value={value} timeout={2000}>\n {({copied, copy}) => (\n <Tooltip label={copied ? 'Copied' : 'Copy'}>\n <ActionIcon\n color={copied ? 'success' : 'gray'}\n onClick={() => {\n copy();\n onCopy?.();\n }}\n >\n {copied ? <CheckSize16Px height={16} /> : <CopySize16Px height={16} />}\n </ActionIcon>\n </Tooltip>\n )}\n </CopyButton>\n);\n\nexport const CopyToClipboard: React.FunctionComponent<CopyToClipboardProps> = ({withLabel, ...others}) => {\n const {classes} = useStyles();\n\n return withLabel ? (\n <TextInput\n classNames={{\n input: classes.input,\n }}\n value={others.value}\n readOnly\n autoComplete=\"off\"\n rightSection={<CopyToClipboardButton {...others} />}\n />\n ) : (\n <CopyToClipboardButton {...others} />\n );\n};\n"],"names":["CheckSize16Px","CopySize16Px","ActionIcon","CopyButton","createStyles","TextInput","Tooltip","useStyles","theme","input","color","colors","gray","CopyToClipboardButton","value","onCopy","timeout","copied","copy","label","onClick","height","CopyToClipboard","withLabel","others","classes","classNames","readOnly","autoComplete","rightSection"],"mappings":";;;AAAA,SAAQA,aAAa,EAAEC,YAAY,QAAO,8BAA8B;AACxE,SAAQC,UAAU,EAAEC,UAAU,EAAEC,YAAY,EAAEC,SAAS,EAAEC,OAAO,QAAO,gBAAgB;AAmBvF,IAAMC,YAAYH,aAAa,SAACI;WAAW;QACvCC,OAAO;YACHC,OAAOF,MAAMG,MAAM,CAACC,IAAI,CAAC,EAAE;QAC/B;IACJ;;AAEA,IAAMC,wBAA0F;QAAEC,cAAAA,OAAOC,eAAAA;yBACrG,KAACZ;QAAWW,OAAOA;QAAOE,SAAS;kBAC9B;gBAAEC,eAAAA,QAAQC,aAAAA;iCACP,KAACZ;gBAAQa,OAAOF,SAAS,WAAW;0BAChC,cAAA,KAACf;oBACGQ,OAAOO,SAAS,YAAY;oBAC5BG,SAAS;4BAELL;wBADAG;yBACAH,UAAAA,oBAAAA,8BAAAA;oBACJ;8BAECE,uBAAS,KAACjB;wBAAcqB,QAAQ;uCAAS,KAACpB;wBAAaoB,QAAQ;;;;;;;AAOpF,OAAO,IAAMC,kBAAiE;QAAEC,mBAAAA,WAAcC;QAAdD;;IAC5E,IAAM,AAACE,UAAWlB,YAAXkB;IAEP,OAAOF,0BACH,KAAClB;QACGqB,YAAY;YACRjB,OAAOgB,QAAQhB,KAAK;QACxB;QACAK,OAAOU,OAAOV,KAAK;QACnBa,QAAQ;QACRC,cAAa;QACbC,4BAAc,KAAChB,0CAA0BW;uBAG7C,KAACX,0CAA0BW;AAEnC,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/header/Header.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAA8C,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAW,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAE3E,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC7C;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,UAAU,UAAU;IAChB,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;IACnC,WAAW,EAAE,OAAO,iBAAiB,CAAC;IACtC,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,SAAS,EAAE,OAAO,eAAe,CAAC;CACrC;AAED,eAAO,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/header/Header.tsx"],"names":[],"mappings":"AACA,OAAO,EAAsB,YAAY,EAA8C,MAAM,eAAe,CAAC;AAC7G,OAAO,EAAW,iBAAiB,EAAE,YAAY,EAAE,SAAS,EAAC,MAAM,OAAO,CAAC;AAE3E,MAAM,WAAW,WAAY,SAAQ,YAAY;IAC7C;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC3B;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,UAAU,UAAU;IAChB,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;IACnC,WAAW,EAAE,OAAO,iBAAiB,CAAC;IACtC,OAAO,EAAE,OAAO,aAAa,CAAC;IAC9B,SAAS,EAAE,OAAO,eAAe,CAAC;CACrC;AAED,eAAO,MAAM,MAAM,EAAE,UAoCpB,CAAC;AAEF,QAAA,MAAM,iBAAiB,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,CAS/D,CAAC;AAEF,QAAA,MAAM,aAAa,EAAE,iBAAiB,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAC,CAA0D,CAAC;AAEvH,MAAM,WAAW,oBAAoB;IACjC;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,eAAe,EAAE,iBAAiB,CAAC,oBAAoB,CAM5D,CAAC"}
|
|
@@ -30,7 +30,8 @@ export var Header = function(_param) {
|
|
|
30
30
|
/*#__PURE__*/ _jsxs(Group, _object_spread_props(_object_spread({
|
|
31
31
|
position: "apart",
|
|
32
32
|
p: variant === "page" ? "xl" : undefined,
|
|
33
|
-
pb: variant === "page" ? "lg" : undefined
|
|
33
|
+
pb: variant === "page" ? "lg" : undefined,
|
|
34
|
+
noWrap: true
|
|
34
35
|
}, others), {
|
|
35
36
|
children: [
|
|
36
37
|
/*#__PURE__*/ _jsxs(Stack, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/header/Header.tsx"],"sourcesContent":["import {QuestionSize16Px} from '@coveord/plasma-react-icons';\nimport {Anchor, Breadcrumbs, DefaultProps, Divider, Group, Stack, Text, Title, Tooltip} from '@mantine/core';\nimport {Children, FunctionComponent, ReactElement, ReactNode} from 'react';\n\nexport interface HeaderProps extends DefaultProps {\n /**\n * The description text displayed inside the header underneath the title\n */\n description?: ReactNode;\n /**\n * Whether the header should have a border on the bottom\n */\n borderBottom?: boolean;\n /**\n * Use the modal variant when displaying the header inside a modal\n *\n * @default 'page'\n */\n variant?: 'page' | 'modal';\n /**\n * The title of the header.\n */\n children: ReactNode;\n}\n\ninterface HeaderType {\n (props: HeaderProps): ReactElement;\n Breadcrumbs: typeof HeaderBreadcrumbs;\n Actions: typeof HeaderActions;\n DocAnchor: typeof HeaderDocAnchor;\n}\n\nexport const Header: HeaderType = ({description, borderBottom, children, variant = 'page', ...others}) => {\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const breadcrumbs = convertedChildren.find((child) => child.type === HeaderBreadcrumbs);\n const actions = convertedChildren.find((child) => child.type === HeaderActions);\n const docAnchor = convertedChildren.find((child) => child.type === HeaderDocAnchor);\n const otherChildren = convertedChildren.filter(\n (child) => child.type !== HeaderBreadcrumbs && child.type !== HeaderActions && child.type !== HeaderDocAnchor,\n );\n return (\n <>\n <Group\n position=\"apart\"\n p={variant === 'page' ? 'xl' : undefined}\n pb={variant === 'page' ? 'lg' : undefined}\n {...others}\n >\n <Stack spacing={0}>\n {breadcrumbs}\n <Title\n order={variant === 'page' ? 1 : 3}\n color={variant === 'page' ? 'gray.5' : undefined}\n sx={{wordBreak: 'break-word'}}\n >\n {otherChildren}\n {docAnchor}\n </Title>\n <Text size={variant === 'page' ? 'md' : 'sm'} color=\"gray.6\">\n {description}\n </Text>\n </Stack>\n {actions}\n </Group>\n {borderBottom ? <Divider size=\"xs\" /> : null}\n </>\n );\n};\n\nconst HeaderBreadcrumbs: FunctionComponent<{children: ReactNode}> = ({children}) => (\n <Breadcrumbs\n styles={(theme) => ({\n breadcrumb: {fontSize: theme.fontSizes.sm, fontWeight: 300},\n separator: {color: theme.colors.gray[5]},\n })}\n >\n {children}\n </Breadcrumbs>\n);\n\nconst HeaderActions: FunctionComponent<{children: ReactNode}> = ({children}) => <Group spacing=\"sm\">{children}</Group>;\n\nexport interface HeaderDocAnchorProps {\n /**\n * A href pointing to documentation related to the current panel.\n * When provided, an info icon is rendered next to the title as link to this documentation\n */\n href: string;\n /**\n * The tooltip text shown when hovering over the doc link icon\n */\n label?: string;\n}\n\nconst HeaderDocAnchor: FunctionComponent<HeaderDocAnchorProps> = ({href: docLink, label: docLinkTooltipLabel}) => (\n <Tooltip label={docLinkTooltipLabel} disabled={!docLinkTooltipLabel} position=\"right\">\n <Anchor inline href={docLink} target=\"_blank\" ml=\"xs\" style={{verticalAlign: 'middle'}}>\n <QuestionSize16Px height={16} />\n </Anchor>\n </Tooltip>\n);\n\nHeader.Breadcrumbs = HeaderBreadcrumbs;\nHeader.Actions = HeaderActions;\nHeader.DocAnchor = HeaderDocAnchor;\n"],"names":["QuestionSize16Px","Anchor","Breadcrumbs","Divider","Group","Stack","Text","Title","Tooltip","Children","Header","description","borderBottom","children","variant","others","convertedChildren","toArray","breadcrumbs","find","child","type","HeaderBreadcrumbs","actions","HeaderActions","docAnchor","HeaderDocAnchor","otherChildren","filter","position","p","undefined","pb","spacing","order","color","sx","wordBreak","size","styles","theme","breadcrumb","fontSize","fontSizes","sm","fontWeight","separator","colors","gray","href","docLink","label","docLinkTooltipLabel","disabled","inline","target","ml","style","verticalAlign","height","Actions","DocAnchor"],"mappings":";;;;AAAA,SAAQA,gBAAgB,QAAO,8BAA8B;AAC7D,SAAQC,MAAM,EAAEC,WAAW,EAAgBC,OAAO,EAAEC,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,KAAK,EAAEC,OAAO,QAAO,gBAAgB;AAC7G,SAAQC,QAAQ,QAAmD,QAAQ;AA8B3E,OAAO,IAAMC,SAAqB;QAAEC,qBAAAA,aAAaC,sBAAAA,cAAcC,kBAAAA,kCAAUC,SAAAA,sCAAU,yBAAWC;QAA1DJ;QAAaC;QAAcC;QAAUC;;IACrE,IAAME,oBAAoBP,SAASQ,OAAO,CAACJ;IAC3C,IAAMK,cAAcF,kBAAkBG,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKC;;IACrE,IAAMC,UAAUP,kBAAkBG,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKG;;IACjE,IAAMC,YAAYT,kBAAkBG,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKK;;IACnE,IAAMC,gBAAgBX,kBAAkBY,MAAM,CAC1C,SAACR;eAAUA,MAAMC,IAAI,KAAKC,qBAAqBF,MAAMC,IAAI,KAAKG,iBAAiBJ,MAAMC,IAAI,KAAKK;;IAElG,qBACI;;0BACI,MAACtB;gBACGyB,UAAS;gBACTC,GAAGhB,YAAY,SAAS,OAAOiB;gBAC/BC,IAAIlB,YAAY,SAAS,OAAOiB;
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/header/Header.tsx"],"sourcesContent":["import {QuestionSize16Px} from '@coveord/plasma-react-icons';\nimport {Anchor, Breadcrumbs, DefaultProps, Divider, Group, Stack, Text, Title, Tooltip} from '@mantine/core';\nimport {Children, FunctionComponent, ReactElement, ReactNode} from 'react';\n\nexport interface HeaderProps extends DefaultProps {\n /**\n * The description text displayed inside the header underneath the title\n */\n description?: ReactNode;\n /**\n * Whether the header should have a border on the bottom\n */\n borderBottom?: boolean;\n /**\n * Use the modal variant when displaying the header inside a modal\n *\n * @default 'page'\n */\n variant?: 'page' | 'modal';\n /**\n * The title of the header.\n */\n children: ReactNode;\n}\n\ninterface HeaderType {\n (props: HeaderProps): ReactElement;\n Breadcrumbs: typeof HeaderBreadcrumbs;\n Actions: typeof HeaderActions;\n DocAnchor: typeof HeaderDocAnchor;\n}\n\nexport const Header: HeaderType = ({description, borderBottom, children, variant = 'page', ...others}) => {\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const breadcrumbs = convertedChildren.find((child) => child.type === HeaderBreadcrumbs);\n const actions = convertedChildren.find((child) => child.type === HeaderActions);\n const docAnchor = convertedChildren.find((child) => child.type === HeaderDocAnchor);\n const otherChildren = convertedChildren.filter(\n (child) => child.type !== HeaderBreadcrumbs && child.type !== HeaderActions && child.type !== HeaderDocAnchor,\n );\n return (\n <>\n <Group\n position=\"apart\"\n p={variant === 'page' ? 'xl' : undefined}\n pb={variant === 'page' ? 'lg' : undefined}\n noWrap\n {...others}\n >\n <Stack spacing={0}>\n {breadcrumbs}\n <Title\n order={variant === 'page' ? 1 : 3}\n color={variant === 'page' ? 'gray.5' : undefined}\n sx={{wordBreak: 'break-word'}}\n >\n {otherChildren}\n {docAnchor}\n </Title>\n <Text size={variant === 'page' ? 'md' : 'sm'} color=\"gray.6\">\n {description}\n </Text>\n </Stack>\n {actions}\n </Group>\n {borderBottom ? <Divider size=\"xs\" /> : null}\n </>\n );\n};\n\nconst HeaderBreadcrumbs: FunctionComponent<{children: ReactNode}> = ({children}) => (\n <Breadcrumbs\n styles={(theme) => ({\n breadcrumb: {fontSize: theme.fontSizes.sm, fontWeight: 300},\n separator: {color: theme.colors.gray[5]},\n })}\n >\n {children}\n </Breadcrumbs>\n);\n\nconst HeaderActions: FunctionComponent<{children: ReactNode}> = ({children}) => <Group spacing=\"sm\">{children}</Group>;\n\nexport interface HeaderDocAnchorProps {\n /**\n * A href pointing to documentation related to the current panel.\n * When provided, an info icon is rendered next to the title as link to this documentation\n */\n href: string;\n /**\n * The tooltip text shown when hovering over the doc link icon\n */\n label?: string;\n}\n\nconst HeaderDocAnchor: FunctionComponent<HeaderDocAnchorProps> = ({href: docLink, label: docLinkTooltipLabel}) => (\n <Tooltip label={docLinkTooltipLabel} disabled={!docLinkTooltipLabel} position=\"right\">\n <Anchor inline href={docLink} target=\"_blank\" ml=\"xs\" style={{verticalAlign: 'middle'}}>\n <QuestionSize16Px height={16} />\n </Anchor>\n </Tooltip>\n);\n\nHeader.Breadcrumbs = HeaderBreadcrumbs;\nHeader.Actions = HeaderActions;\nHeader.DocAnchor = HeaderDocAnchor;\n"],"names":["QuestionSize16Px","Anchor","Breadcrumbs","Divider","Group","Stack","Text","Title","Tooltip","Children","Header","description","borderBottom","children","variant","others","convertedChildren","toArray","breadcrumbs","find","child","type","HeaderBreadcrumbs","actions","HeaderActions","docAnchor","HeaderDocAnchor","otherChildren","filter","position","p","undefined","pb","noWrap","spacing","order","color","sx","wordBreak","size","styles","theme","breadcrumb","fontSize","fontSizes","sm","fontWeight","separator","colors","gray","href","docLink","label","docLinkTooltipLabel","disabled","inline","target","ml","style","verticalAlign","height","Actions","DocAnchor"],"mappings":";;;;AAAA,SAAQA,gBAAgB,QAAO,8BAA8B;AAC7D,SAAQC,MAAM,EAAEC,WAAW,EAAgBC,OAAO,EAAEC,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,KAAK,EAAEC,OAAO,QAAO,gBAAgB;AAC7G,SAAQC,QAAQ,QAAmD,QAAQ;AA8B3E,OAAO,IAAMC,SAAqB;QAAEC,qBAAAA,aAAaC,sBAAAA,cAAcC,kBAAAA,kCAAUC,SAAAA,sCAAU,yBAAWC;QAA1DJ;QAAaC;QAAcC;QAAUC;;IACrE,IAAME,oBAAoBP,SAASQ,OAAO,CAACJ;IAC3C,IAAMK,cAAcF,kBAAkBG,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKC;;IACrE,IAAMC,UAAUP,kBAAkBG,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKG;;IACjE,IAAMC,YAAYT,kBAAkBG,IAAI,CAAC,SAACC;eAAUA,MAAMC,IAAI,KAAKK;;IACnE,IAAMC,gBAAgBX,kBAAkBY,MAAM,CAC1C,SAACR;eAAUA,MAAMC,IAAI,KAAKC,qBAAqBF,MAAMC,IAAI,KAAKG,iBAAiBJ,MAAMC,IAAI,KAAKK;;IAElG,qBACI;;0BACI,MAACtB;gBACGyB,UAAS;gBACTC,GAAGhB,YAAY,SAAS,OAAOiB;gBAC/BC,IAAIlB,YAAY,SAAS,OAAOiB;gBAChCE,MAAM;eACFlB;;kCAEJ,MAACV;wBAAM6B,SAAS;;4BACXhB;0CACD,MAACX;gCACG4B,OAAOrB,YAAY,SAAS,IAAI;gCAChCsB,OAAOtB,YAAY,SAAS,WAAWiB;gCACvCM,IAAI;oCAACC,WAAW;gCAAY;;oCAE3BX;oCACAF;;;0CAEL,KAACnB;gCAAKiC,MAAMzB,YAAY,SAAS,OAAO;gCAAMsB,OAAM;0CAC/CzB;;;;oBAGRY;;;YAEJX,6BAAe,KAACT;gBAAQoC,MAAK;iBAAU;;;AAGpD,EAAE;AAEF,IAAMjB,oBAA8D;QAAET,iBAAAA;yBAClE,KAACX;QACGsC,QAAQ,SAACC;mBAAW;gBAChBC,YAAY;oBAACC,UAAUF,MAAMG,SAAS,CAACC,EAAE;oBAAEC,YAAY;gBAAG;gBAC1DC,WAAW;oBAACX,OAAOK,MAAMO,MAAM,CAACC,IAAI,CAAC,EAAE;gBAAA;YAC3C;;kBAECpC;;;AAIT,IAAMW,gBAA0D;QAAEX,iBAAAA;yBAAc,KAACT;QAAM8B,SAAQ;kBAAMrB;;;AAcrG,IAAMa,kBAA2D;QAAEwB,AAAMC,gBAAND,MAAeE,AAAOC,4BAAPD;yBAC9E,KAAC5C;QAAQ4C,OAAOC;QAAqBC,UAAU,CAACD;QAAqBxB,UAAS;kBAC1E,cAAA,KAAC5B;YAAOsD,MAAM;YAACL,MAAMC;YAASK,QAAO;YAASC,IAAG;YAAKC,OAAO;gBAACC,eAAe;YAAQ;sBACjF,cAAA,KAAC3D;gBAAiB4D,QAAQ;;;;;AAKtClD,OAAOR,WAAW,GAAGoB;AACrBZ,OAAOmD,OAAO,GAAGrC;AACjBd,OAAOoD,SAAS,GAAGpC"}
|
|
@@ -2,7 +2,7 @@ import { FunctionComponent, PropsWithChildren } from 'react';
|
|
|
2
2
|
import { InlineConfirmButton } from './InlineConfirmButton';
|
|
3
3
|
import { InlineConfirmMenuItem } from './InlineConfirmMenuItem';
|
|
4
4
|
import { InlineConfirmPrompt } from './InlineConfirmPrompt';
|
|
5
|
-
type InlineConfirmType = FunctionComponent<PropsWithChildren
|
|
5
|
+
type InlineConfirmType = FunctionComponent<PropsWithChildren<unknown>> & {
|
|
6
6
|
Prompt: typeof InlineConfirmPrompt;
|
|
7
7
|
Button: typeof InlineConfirmButton;
|
|
8
8
|
MenuItem: typeof InlineConfirmMenuItem;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineConfirm.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAE7F,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"InlineConfirm.d.ts","sourceRoot":"","sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,iBAAiB,EAAE,iBAAiB,EAAyB,MAAM,OAAO,CAAC;AAE7F,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAC,qBAAqB,EAAC,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE1D,KAAK,iBAAiB,GAAG,iBAAiB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAAC,GAAG;IACrE,MAAM,EAAE,OAAO,mBAAmB,CAAC;IACnC,MAAM,EAAE,OAAO,mBAAmB,CAAC;IACnC,QAAQ,EAAE,OAAO,qBAAqB,CAAC;CAC1C,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,iBAc3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"sourcesContent":["import {Children, FunctionComponent, PropsWithChildren, ReactElement, useState} from 'react';\n\nimport {InlineConfirmButton} from './InlineConfirmButton';\nimport {InlineConfirmContext} from './InlineConfirmContext';\nimport {InlineConfirmMenuItem} from './InlineConfirmMenuItem';\nimport {InlineConfirmPrompt} from './InlineConfirmPrompt';\n\ntype InlineConfirmType = FunctionComponent<PropsWithChildren
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/inline-confirm/InlineConfirm.tsx"],"sourcesContent":["import {Children, FunctionComponent, PropsWithChildren, ReactElement, useState} from 'react';\n\nimport {InlineConfirmButton} from './InlineConfirmButton';\nimport {InlineConfirmContext} from './InlineConfirmContext';\nimport {InlineConfirmMenuItem} from './InlineConfirmMenuItem';\nimport {InlineConfirmPrompt} from './InlineConfirmPrompt';\n\ntype InlineConfirmType = FunctionComponent<PropsWithChildren<unknown>> & {\n Prompt: typeof InlineConfirmPrompt;\n Button: typeof InlineConfirmButton;\n MenuItem: typeof InlineConfirmMenuItem;\n};\n\nexport const InlineConfirm: InlineConfirmType = ({children}) => {\n const [confirmingId, setConfirmingId] = useState<string | null>(null);\n\n const convertedChildren = Children.toArray(children) as ReactElement[];\n const prompt = convertedChildren.find(\n (child) => child.type === InlineConfirmPrompt && child.props.id === confirmingId,\n );\n const clearConfirm = () => setConfirmingId(null);\n\n return (\n <InlineConfirmContext.Provider value={{confirmingId, setConfirmingId, clearConfirm}}>\n {prompt ?? children}\n </InlineConfirmContext.Provider>\n );\n};\n\nInlineConfirm.Prompt = InlineConfirmPrompt;\nInlineConfirm.Button = InlineConfirmButton;\nInlineConfirm.MenuItem = InlineConfirmMenuItem;\n"],"names":["Children","useState","InlineConfirmButton","InlineConfirmContext","InlineConfirmMenuItem","InlineConfirmPrompt","InlineConfirm","children","confirmingId","setConfirmingId","convertedChildren","toArray","prompt","find","child","type","props","id","clearConfirm","Provider","value","Prompt","Button","MenuItem"],"mappings":";;AAAA,SAAQA,QAAQ,EAAsDC,QAAQ,QAAO,QAAQ;AAE7F,SAAQC,mBAAmB,QAAO,wBAAwB;AAC1D,SAAQC,oBAAoB,QAAO,yBAAyB;AAC5D,SAAQC,qBAAqB,QAAO,0BAA0B;AAC9D,SAAQC,mBAAmB,QAAO,wBAAwB;AAQ1D,OAAO,IAAMC,gBAAmC;QAAEC,iBAAAA;IAC9C,IAAwCN,6BAAAA,SAAwB,WAAzDO,eAAiCP,cAAnBQ,kBAAmBR;IAExC,IAAMS,oBAAoBV,SAASW,OAAO,CAACJ;IAC3C,IAAMK,SAASF,kBAAkBG,IAAI,CACjC,SAACC;eAAUA,MAAMC,IAAI,KAAKV,uBAAuBS,MAAME,KAAK,CAACC,EAAE,KAAKT;;IAExE,IAAMU,eAAe;eAAMT,gBAAgB;;IAE3C,qBACI,KAACN,qBAAqBgB,QAAQ;QAACC,OAAO;YAACZ,cAAAA;YAAcC,iBAAAA;YAAiBS,cAAAA;QAAY;kBAC7EN,mBAAAA,oBAAAA,SAAUL;;AAGvB,EAAE;AAEFD,cAAce,MAAM,GAAGhB;AACvBC,cAAcgB,MAAM,GAAGpB;AACvBI,cAAciB,QAAQ,GAAGnB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableFilter.tsx"],"names":[],"mappings":"AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"TableFilter.d.ts","sourceRoot":"","sources":["../../../../src/components/table/TableFilter.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,YAAY,EAAQ,SAAS,EAA0B,MAAM,eAAe,CAAC;AACjG,OAAO,EAAqB,iBAAiB,EAA8B,MAAM,OAAO,CAAC;AAMzF,QAAA,MAAM,SAAS;;;;;;;;CAQZ,CAAC;AAEJ,KAAK,sBAAsB,GAAG,SAAS,CAAC,OAAO,SAAS,CAAC,CAAC;AAC1D,UAAU,gBAAiB,SAAQ,YAAY,CAAC,sBAAsB,CAAC;IACnE;;;;OAIG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,gBAAgB,CAsD3D,CAAC"}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { _ as _object_spread } from "@swc/helpers/_/_object_spread";
|
|
2
2
|
import { _ as _object_spread_props } from "@swc/helpers/_/_object_spread_props";
|
|
3
3
|
import { _ as _object_without_properties } from "@swc/helpers/_/_object_without_properties";
|
|
4
|
+
import { _ as _sliced_to_array } from "@swc/helpers/_/_sliced_to_array";
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
import { CrossSize16Px, SearchSize16Px } from "@coveord/plasma-react-icons";
|
|
6
|
-
import { ActionIcon,
|
|
7
|
+
import { ActionIcon, Grid, TextInput, createStyles } from "@mantine/core";
|
|
8
|
+
import { useState } from "react";
|
|
9
|
+
import { useDebouncedValue, useDidUpdate } from "@mantine/hooks";
|
|
7
10
|
import { TableComponentsOrder } from "./Table.styles";
|
|
8
11
|
import { useTable } from "./TableContext";
|
|
9
12
|
var useStyles = createStyles(function(theme) {
|
|
@@ -31,23 +34,28 @@ export var TableFilter = function(_param) {
|
|
|
31
34
|
unstyled: unstyled
|
|
32
35
|
}).classes;
|
|
33
36
|
var _useTable = useTable(), state = _useTable.state, setState = _useTable.setState;
|
|
34
|
-
var
|
|
37
|
+
var _useState = _sliced_to_array(useState(state.globalFilter), 2), filter = _useState[0], setFilter = _useState[1];
|
|
38
|
+
var _useDebouncedValue = _sliced_to_array(useDebouncedValue(filter, 300), 2), debounced = _useDebouncedValue[0], cancel = _useDebouncedValue[1];
|
|
39
|
+
useDidUpdate(function() {
|
|
35
40
|
setState(function(prevState) {
|
|
36
41
|
return _object_spread_props(_object_spread({}, prevState), {
|
|
37
42
|
pagination: prevState.pagination ? {
|
|
38
43
|
pageIndex: 0,
|
|
39
44
|
pageSize: prevState.pagination.pageSize
|
|
40
45
|
} : prevState.pagination,
|
|
41
|
-
globalFilter:
|
|
46
|
+
globalFilter: debounced
|
|
42
47
|
});
|
|
43
48
|
});
|
|
44
|
-
|
|
49
|
+
return cancel;
|
|
50
|
+
}, [
|
|
51
|
+
debounced
|
|
52
|
+
]);
|
|
45
53
|
var handleChange = function(event) {
|
|
46
54
|
var value = event.currentTarget.value;
|
|
47
|
-
|
|
55
|
+
setFilter(value);
|
|
48
56
|
};
|
|
49
57
|
var handleClear = function() {
|
|
50
|
-
|
|
58
|
+
setFilter("");
|
|
51
59
|
};
|
|
52
60
|
return /*#__PURE__*/ _jsx(Grid.Col, {
|
|
53
61
|
span: "content",
|
|
@@ -57,17 +65,18 @@ export var TableFilter = function(_param) {
|
|
|
57
65
|
children: /*#__PURE__*/ _jsx(TextInput, _object_spread({
|
|
58
66
|
className: classes.wrapper,
|
|
59
67
|
placeholder: placeholder,
|
|
68
|
+
autoComplete: "off",
|
|
60
69
|
mb: "md",
|
|
61
|
-
rightSection:
|
|
70
|
+
rightSection: filter ? /*#__PURE__*/ _jsx(ActionIcon, {
|
|
62
71
|
onClick: handleClear,
|
|
63
72
|
children: /*#__PURE__*/ _jsx(CrossSize16Px, {
|
|
64
73
|
height: 16
|
|
65
74
|
})
|
|
66
75
|
}) : /*#__PURE__*/ _jsx(SearchSize16Px, {
|
|
67
|
-
height:
|
|
76
|
+
height: 16,
|
|
68
77
|
className: classes.empty
|
|
69
78
|
}),
|
|
70
|
-
value:
|
|
79
|
+
value: filter,
|
|
71
80
|
onChange: handleChange
|
|
72
81
|
}, others))
|
|
73
82
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/components/table/TableFilter.tsx"],"sourcesContent":["import {CrossSize16Px, SearchSize16Px} from '@coveord/plasma-react-icons';\nimport {ActionIcon,
|
|
1
|
+
{"version":3,"sources":["../../../../src/components/table/TableFilter.tsx"],"sourcesContent":["import {CrossSize16Px, SearchSize16Px} from '@coveord/plasma-react-icons';\nimport {ActionIcon, DefaultProps, Grid, Selectors, TextInput, createStyles} from '@mantine/core';\nimport {ChangeEventHandler, FunctionComponent, MouseEventHandler, useState} from 'react';\n\nimport {useDebouncedValue, useDidUpdate} from '@mantine/hooks';\nimport {TableComponentsOrder} from './Table.styles';\nimport {useTable} from './TableContext';\n\nconst useStyles = createStyles((theme) => ({\n root: {},\n wrapper: {\n marginBottom: '0 !important',\n },\n empty: {\n color: theme.colors.gray[4],\n },\n}));\n\ntype TableFilterStylesNames = Selectors<typeof useStyles>;\ninterface TableFilterProps extends DefaultProps<TableFilterStylesNames> {\n /**\n * The placeholder for the filter input\n *\n * @default \"Search by any field\"\n */\n placeholder?: string;\n}\n\nexport const TableFilter: FunctionComponent<TableFilterProps> = ({\n placeholder = 'Search by any field',\n classNames,\n styles,\n unstyled,\n ...others\n}) => {\n const {classes} = useStyles(null, {name: 'TableFilter', classNames, styles, unstyled});\n const {state, setState} = useTable();\n const [filter, setFilter] = useState(state.globalFilter);\n const [debounced, cancel] = useDebouncedValue(filter, 300);\n\n useDidUpdate(() => {\n setState((prevState) => ({\n ...prevState,\n pagination: prevState.pagination\n ? {pageIndex: 0, pageSize: prevState.pagination.pageSize}\n : prevState.pagination,\n globalFilter: debounced,\n }));\n return cancel;\n }, [debounced]);\n\n const handleChange: ChangeEventHandler<HTMLInputElement> = (event) => {\n const {value} = event.currentTarget;\n setFilter(value);\n };\n\n const handleClear: MouseEventHandler<HTMLButtonElement> = () => {\n setFilter('');\n };\n\n return (\n <Grid.Col span=\"content\" order={TableComponentsOrder.Filter} py=\"sm\" className={classes.root}>\n <TextInput\n className={classes.wrapper}\n placeholder={placeholder}\n autoComplete=\"off\"\n mb=\"md\"\n rightSection={\n filter ? (\n <ActionIcon onClick={handleClear}>\n <CrossSize16Px height={16} />\n </ActionIcon>\n ) : (\n <SearchSize16Px height={16} className={classes.empty} />\n )\n }\n value={filter}\n onChange={handleChange}\n {...others}\n />\n </Grid.Col>\n );\n};\n"],"names":["CrossSize16Px","SearchSize16Px","ActionIcon","Grid","TextInput","createStyles","useState","useDebouncedValue","useDidUpdate","TableComponentsOrder","useTable","useStyles","theme","root","wrapper","marginBottom","empty","color","colors","gray","TableFilter","placeholder","classNames","styles","unstyled","others","classes","name","state","setState","globalFilter","filter","setFilter","debounced","cancel","prevState","pagination","pageIndex","pageSize","handleChange","event","value","currentTarget","handleClear","Col","span","order","Filter","py","className","autoComplete","mb","rightSection","onClick","height","onChange"],"mappings":";;;;;AAAA,SAAQA,aAAa,EAAEC,cAAc,QAAO,8BAA8B;AAC1E,SAAQC,UAAU,EAAgBC,IAAI,EAAaC,SAAS,EAAEC,YAAY,QAAO,gBAAgB;AACjG,SAAkEC,QAAQ,QAAO,QAAQ;AAEzF,SAAQC,iBAAiB,EAAEC,YAAY,QAAO,iBAAiB;AAC/D,SAAQC,oBAAoB,QAAO,iBAAiB;AACpD,SAAQC,QAAQ,QAAO,iBAAiB;AAExC,IAAMC,YAAYN,aAAa,SAACO;WAAW;QACvCC,MAAM,CAAC;QACPC,SAAS;YACLC,cAAc;QAClB;QACAC,OAAO;YACHC,OAAOL,MAAMM,MAAM,CAACC,IAAI,CAAC,EAAE;QAC/B;IACJ;;AAYA,OAAO,IAAMC,cAAmD;oCAC5DC,aAAAA,8CAAc,4CACdC,oBAAAA,YACAC,gBAAAA,QACAC,kBAAAA,UACGC;QAJHJ;QACAC;QACAC;QACAC;;IAGA,IAAM,AAACE,UAAWf,UAAU,MAAM;QAACgB,MAAM;QAAeL,YAAAA;QAAYC,QAAAA;QAAQC,UAAAA;IAAQ,GAA7EE;IACP,IAA0BhB,YAAAA,YAAnBkB,QAAmBlB,UAAnBkB,OAAOC,WAAYnB,UAAZmB;IACd,IAA4BvB,6BAAAA,SAASsB,MAAME,YAAY,OAAhDC,SAAqBzB,cAAb0B,YAAa1B;IAC5B,IAA4BC,sCAAAA,kBAAkBwB,QAAQ,UAA/CE,YAAqB1B,uBAAV2B,SAAU3B;IAE5BC,aAAa;QACTqB,SAAS,SAACM;mBAAe,wCAClBA;gBACHC,YAAYD,UAAUC,UAAU,GAC1B;oBAACC,WAAW;oBAAGC,UAAUH,UAAUC,UAAU,CAACE,QAAQ;gBAAA,IACtDH,UAAUC,UAAU;gBAC1BN,cAAcG;;;QAElB,OAAOC;IACX,GAAG;QAACD;KAAU;IAEd,IAAMM,eAAqD,SAACC;QACxD,IAAM,AAACC,QAASD,MAAME,aAAa,CAA5BD;QACPT,UAAUS;IACd;IAEA,IAAME,cAAoD;QACtDX,UAAU;IACd;IAEA,qBACI,KAAC7B,KAAKyC,GAAG;QAACC,MAAK;QAAUC,OAAOrC,qBAAqBsC,MAAM;QAAEC,IAAG;QAAKC,WAAWvB,QAAQb,IAAI;kBACxF,cAAA,KAACT;YACG6C,WAAWvB,QAAQZ,OAAO;YAC1BO,aAAaA;YACb6B,cAAa;YACbC,IAAG;YACHC,cACIrB,uBACI,KAAC7B;gBAAWmD,SAASV;0BACjB,cAAA,KAAC3C;oBAAcsD,QAAQ;;+BAG3B,KAACrD;gBAAeqD,QAAQ;gBAAIL,WAAWvB,QAAQV,KAAK;;YAG5DyB,OAAOV;YACPwB,UAAUhB;WACNd;;AAIpB,EAAE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Plasmantine.d.ts","sourceRoot":"","sources":["../../../src/theme/Plasmantine.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAI3D,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,iBAAiB,
|
|
1
|
+
{"version":3,"file":"Plasmantine.d.ts","sourceRoot":"","sources":["../../../src/theme/Plasmantine.tsx"],"names":[],"mappings":"AACA,OAAO,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,OAAO,CAAC;AAI3D,eAAO,MAAM,WAAW,EAAE,iBAAiB,CAAC,iBAAiB,CAAC,OAAO,CAAC,CAIrE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/theme/Plasmantine.tsx"],"sourcesContent":["import {MantineProvider} from '@mantine/core';\nimport {FunctionComponent, PropsWithChildren} from 'react';\n\nimport {plasmaTheme} from './Theme';\n\nexport const Plasmantine: FunctionComponent<PropsWithChildren
|
|
1
|
+
{"version":3,"sources":["../../../src/theme/Plasmantine.tsx"],"sourcesContent":["import {MantineProvider} from '@mantine/core';\nimport {FunctionComponent, PropsWithChildren} from 'react';\n\nimport {plasmaTheme} from './Theme';\n\nexport const Plasmantine: FunctionComponent<PropsWithChildren<unknown>> = ({children}) => (\n <MantineProvider withGlobalStyles withNormalizeCSS theme={plasmaTheme}>\n {children}\n </MantineProvider>\n);\n"],"names":["MantineProvider","plasmaTheme","Plasmantine","children","withGlobalStyles","withNormalizeCSS","theme"],"mappings":";AAAA,SAAQA,eAAe,QAAO,gBAAgB;AAG9C,SAAQC,WAAW,QAAO,UAAU;AAEpC,OAAO,IAAMC,cAA6D;QAAEC,iBAAAA;yBACxE,KAACH;QAAgBI,gBAAgB;QAACC,gBAAgB;QAACC,OAAOL;kBACrDE;;EAEP"}
|