@coveord/plasma-mantine 51.1.2 → 51.1.7

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.
@@ -81,8 +81,7 @@ var HeaderBreadcrumbs = function(param) {
81
81
  return {
82
82
  breadcrumb: {
83
83
  fontSize: theme.fontSizes.sm,
84
- fontWeight: 300,
85
- color: theme.colors.action[6]
84
+ fontWeight: 300
86
85
  },
87
86
  separator: {
88
87
  color: theme.colors.gray[5]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/header/Header.tsx"],"sourcesContent":["import {QuestionSize16Px} from '@coveord/plasma-react-icons';\nimport {Anchor, Breadcrumbs, DefaultProps, Divider, Flex, 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 <Flex align=\"center\">\n <Title order={variant === 'page' ? 1 : 3} color={variant === 'page' ? 'gray.5' : undefined}>\n {otherChildren}\n </Title>\n {docAnchor}\n </Flex>\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, color: theme.colors.action[6]},\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\">\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","Flex","align","Title","order","color","Text","size","Divider","Breadcrumbs","styles","theme","breadcrumb","fontSize","fontSizes","sm","fontWeight","colors","action","separator","gray","href","docLink","label","docLinkTooltipLabel","Tooltip","disabled","Anchor","inline","target","ml","QuestionSize16Px","height","Actions","DocAnchor"],"mappings":";;;;+BAgCaA;;;eAAAA;;;;;;;gCAhCkB;oBACoE;qBAChC;AA8B5D,IAAMA,SAAqB,iBAAwE;QAAtEC,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,SAAS;gBACxCC,IAAIpB,YAAY,SAAS,OAAOmB,SAAS;eACrClB;;kCAEJ,sBAACoB,WAAK;wBAACC,SAAS;;4BACXjB;0CACD,sBAACkB,UAAI;gCAACC,OAAM;;kDACR,qBAACC,WAAK;wCAACC,OAAO1B,YAAY,SAAS,IAAI,CAAC;wCAAE2B,OAAO3B,YAAY,SAAS,WAAWmB,SAAS;kDACrFL;;oCAEJF;;;0CAEL,qBAACgB,UAAI;gCAACC,MAAM7B,YAAY,SAAS,OAAO,IAAI;gCAAE2B,OAAM;0CAC/C9B;;;;oBAGRa;;;YAEJZ,6BAAe,qBAACgC,aAAO;gBAACD,MAAK;iBAAU,IAAI;;;AAGxD;AAEA,IAAMpB,oBAA8D;QAAEV,iBAAAA;yBAClE,qBAACgC,iBAAW;QACRC,QAAQ,SAACC;mBAAW;gBAChBC,YAAY;oBAACC,UAAUF,MAAMG,SAAS,CAACC,EAAE;oBAAEC,YAAY;oBAAKX,OAAOM,MAAMM,MAAM,CAACC,MAAM,CAAC,EAAE;gBAAA;gBACzFC,WAAW;oBAACd,OAAOM,MAAMM,MAAM,CAACG,IAAI,CAAC,EAAE;gBAAA;YAC3C;;kBAEC3C;;;AAIT,IAAMY,gBAA0D;QAAEZ,iBAAAA;yBAAc,qBAACiB,WAAK;QAACM,SAAQ;kBAAMvB;;;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;sBAC7C,cAAA,qBAACC,kCAAgB;gBAACC,QAAQ;;;;;AAKtC1D,OAAOmC,WAAW,GAAGtB;AACrBb,OAAO2D,OAAO,GAAG5C;AACjBf,OAAO4D,SAAS,GAAG3C"}
1
+ {"version":3,"sources":["../../../../src/components/header/Header.tsx"],"sourcesContent":["import {QuestionSize16Px} from '@coveord/plasma-react-icons';\nimport {Anchor, Breadcrumbs, DefaultProps, Divider, Flex, 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 <Flex align=\"center\">\n <Title order={variant === 'page' ? 1 : 3} color={variant === 'page' ? 'gray.5' : undefined}>\n {otherChildren}\n </Title>\n {docAnchor}\n </Flex>\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\">\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","Flex","align","Title","order","color","Text","size","Divider","Breadcrumbs","styles","theme","breadcrumb","fontSize","fontSizes","sm","fontWeight","separator","colors","gray","href","docLink","label","docLinkTooltipLabel","Tooltip","disabled","Anchor","inline","target","ml","QuestionSize16Px","height","Actions","DocAnchor"],"mappings":";;;;+BAgCaA;;;eAAAA;;;;;;;gCAhCkB;oBACoE;qBAChC;AA8B5D,IAAMA,SAAqB,iBAAwE;QAAtEC,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,SAAS;gBACxCC,IAAIpB,YAAY,SAAS,OAAOmB,SAAS;eACrClB;;kCAEJ,sBAACoB,WAAK;wBAACC,SAAS;;4BACXjB;0CACD,sBAACkB,UAAI;gCAACC,OAAM;;kDACR,qBAACC,WAAK;wCAACC,OAAO1B,YAAY,SAAS,IAAI,CAAC;wCAAE2B,OAAO3B,YAAY,SAAS,WAAWmB,SAAS;kDACrFL;;oCAEJF;;;0CAEL,qBAACgB,UAAI;gCAACC,MAAM7B,YAAY,SAAS,OAAO,IAAI;gCAAE2B,OAAM;0CAC/C9B;;;;oBAGRa;;;YAEJZ,6BAAe,qBAACgC,aAAO;gBAACD,MAAK;iBAAU,IAAI;;;AAGxD;AAEA,IAAMpB,oBAA8D;QAAEV,iBAAAA;yBAClE,qBAACgC,iBAAW;QACRC,QAAQ,SAACC;mBAAW;gBAChBC,YAAY;oBAACC,UAAUF,MAAMG,SAAS,CAACC,EAAE;oBAAEC,YAAY;gBAAG;gBAC1DC,WAAW;oBAACZ,OAAOM,MAAMO,MAAM,CAACC,IAAI,CAAC,EAAE;gBAAA;YAC3C;;kBAEC1C;;;AAIT,IAAMY,gBAA0D;QAAEZ,iBAAAA;yBAAc,qBAACiB,WAAK;QAACM,SAAQ;kBAAMvB;;;AAcrG,IAAMc,kBAA2D;QAAE6B,AAAMC,gBAAND,MAAeE,AAAOC,4BAAPD;yBAC9E,qBAACE,aAAO;QAACF,OAAOC;QAAqBE,UAAU,CAACF;QAAqB5B,UAAS;kBAC1E,cAAA,qBAAC+B,YAAM;YAACC,MAAM;YAACP,MAAMC;YAASO,QAAO;YAASC,IAAG;sBAC7C,cAAA,qBAACC,kCAAgB;gBAACC,QAAQ;;;;;AAKtCzD,OAAOmC,WAAW,GAAGtB;AACrBb,OAAO0D,OAAO,GAAG3C;AACjBf,OAAO2D,SAAS,GAAG1C"}
@@ -12,7 +12,7 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
12
12
  class="mantine-Breadcrumbs-root mantine-1ujbd2v"
13
13
  >
14
14
  <a
15
- class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1rfg646"
15
+ class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-r41kyw"
16
16
  >
17
17
  One
18
18
  </a>
@@ -22,7 +22,7 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
22
22
  /
23
23
  </div>
24
24
  <a
25
- class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1rfg646"
25
+ class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-r41kyw"
26
26
  >
27
27
  Two
28
28
  </a>
@@ -32,7 +32,7 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
32
32
  /
33
33
  </div>
34
34
  <a
35
- class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1rfg646"
35
+ class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-r41kyw"
36
36
  >
37
37
  Three
38
38
  </a>
@@ -71,8 +71,7 @@ var HeaderBreadcrumbs = function(param) {
71
71
  return {
72
72
  breadcrumb: {
73
73
  fontSize: theme.fontSizes.sm,
74
- fontWeight: 300,
75
- color: theme.colors.action[6]
74
+ fontWeight: 300
76
75
  },
77
76
  separator: {
78
77
  color: theme.colors.gray[5]
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/components/header/Header.tsx"],"sourcesContent":["import {QuestionSize16Px} from '@coveord/plasma-react-icons';\nimport {Anchor, Breadcrumbs, DefaultProps, Divider, Flex, 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 <Flex align=\"center\">\n <Title order={variant === 'page' ? 1 : 3} color={variant === 'page' ? 'gray.5' : undefined}>\n {otherChildren}\n </Title>\n {docAnchor}\n </Flex>\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, color: theme.colors.action[6]},\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\">\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","Flex","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","align","order","color","size","styles","theme","breadcrumb","fontSize","fontSizes","sm","fontWeight","colors","action","separator","gray","href","docLink","label","docLinkTooltipLabel","disabled","inline","target","ml","height","Actions","DocAnchor"],"mappings":";;;;AAAA,SAAQA,gBAAgB,QAAO,8BAA8B;AAC7D,SAAQC,MAAM,EAAEC,WAAW,EAAgBC,OAAO,EAAEC,IAAI,EAAEC,KAAK,EAAEC,KAAK,EAAEC,IAAI,EAAEC,KAAK,EAAEC,OAAO,QAAO,gBAAgB;AACnH,SAAQC,QAAQ,QAAmD,QAAQ;AA8B3E,OAAO,IAAMC,SAAqB,iBAAwE;QAAtEC,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,K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7C,cAAA,KAACzD;gBAAiB0D,QAAQ;;;;;AAKtC/C,OAAOT,WAAW,GAAGqB;AACrBZ,OAAOgD,OAAO,GAAGlC;AACjBd,OAAOiD,SAAS,GAAGjC"}
1
+ {"version":3,"sources":["../../../../src/components/header/Header.tsx"],"sourcesContent":["import {QuestionSize16Px} from '@coveord/plasma-react-icons';\nimport {Anchor, Breadcrumbs, DefaultProps, Divider, Flex, 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 <Flex align=\"center\">\n <Title order={variant === 'page' ? 1 : 3} color={variant === 'page' ? 'gray.5' : undefined}>\n {otherChildren}\n </Title>\n {docAnchor}\n </Flex>\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\">\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","Flex","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","align","order","color","size","styles","theme","breadcrumb","fontSize","fontSizes","sm","fontWeight","separator","colors","gray","href","docLink","label","docLinkTooltipLabel","disabled","inline","target","ml","height","Actions","DocAnchor"],"mappings":";;;;AAAA,SAAQA,gBAAgB,QAAO,8BAA8B;AAC7D,SAAQC,MAAM,EAAEC,WAAW,EAAgBC,OAAO,EAAEC,IAAI,EAAEC,KAAK,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;gBAChBC,YAAY;oBAACC,UAAUF,MAAMG,SAAS,CAACC,EAAE;oBAAEC,YAAY;gBAAG;gBAC1DC,WAAW;oBAACT,OAAOG,MAAMO,MAAM,CAACC,IAAI,CAAC,EAAE;gBAAA;YAC3C;;kBAEClC;;;AAIT,IAAMW,gBAA0D;QAAEX,iBAAAA;yBAAc,KAACT;QAAM6B,SAAQ;kBAAMpB;;;AAcrG,IAAMa,kBAA2D;QAAEsB,AAAMC,gBAAND,MAAeE,AAAOC,4BAAPD;yBAC9E,KAAC1C;QAAQ0C,OAAOC;QAAqBC,UAAU,CAACD;QAAqBtB,UAAS;kBAC1E,cAAA,KAAC7B;YAAOqD,MAAM;YAACL,MAAMC;YAASK,QAAO;YAASC,IAAG;sBAC7C,cAAA,KAACxD;gBAAiByD,QAAQ;;;;;AAKtC9C,OAAOT,WAAW,GAAGqB;AACrBZ,OAAO+C,OAAO,GAAGjC;AACjBd,OAAOgD,SAAS,GAAGhC"}
@@ -12,7 +12,7 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
12
12
  class="mantine-Breadcrumbs-root mantine-1ujbd2v"
13
13
  >
14
14
  <a
15
- class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1rfg646"
15
+ class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-r41kyw"
16
16
  >
17
17
  One
18
18
  </a>
@@ -22,7 +22,7 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
22
22
  /
23
23
  </div>
24
24
  <a
25
- class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1rfg646"
25
+ class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-r41kyw"
26
26
  >
27
27
  Two
28
28
  </a>
@@ -32,7 +32,7 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
32
32
  /
33
33
  </div>
34
34
  <a
35
- class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1rfg646"
35
+ class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-r41kyw"
36
36
  >
37
37
  Three
38
38
  </a>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coveord/plasma-mantine",
3
- "version": "51.1.2",
3
+ "version": "51.1.7",
4
4
  "description": "A Plasma flavoured Mantine theme",
5
5
  "keywords": [
6
6
  "plasma",
@@ -19,7 +19,7 @@
19
19
  "@swc/helpers": "0.4.14",
20
20
  "@tanstack/react-table": "8.7.9",
21
21
  "@tanstack/table-core": "8.7.9",
22
- "dayjs": "1.11.3",
22
+ "dayjs": "1.11.7",
23
23
  "fast-deep-equal": "3.1.3",
24
24
  "lodash.debounce": "4.0.8",
25
25
  "lodash.defaultsdeep": "4.6.1",
@@ -68,7 +68,7 @@ export const Header: HeaderType = ({description, borderBottom, children, variant
68
68
  const HeaderBreadcrumbs: FunctionComponent<{children: ReactNode}> = ({children}) => (
69
69
  <Breadcrumbs
70
70
  styles={(theme) => ({
71
- breadcrumb: {fontSize: theme.fontSizes.sm, fontWeight: 300, color: theme.colors.action[6]},
71
+ breadcrumb: {fontSize: theme.fontSizes.sm, fontWeight: 300},
72
72
  separator: {color: theme.colors.gray[5]},
73
73
  })}
74
74
  >
@@ -12,7 +12,7 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
12
12
  class="mantine-Breadcrumbs-root mantine-1ujbd2v"
13
13
  >
14
14
  <a
15
- class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1rfg646"
15
+ class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-r41kyw"
16
16
  >
17
17
  One
18
18
  </a>
@@ -22,7 +22,7 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
22
22
  /
23
23
  </div>
24
24
  <a
25
- class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1rfg646"
25
+ class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-r41kyw"
26
26
  >
27
27
  Two
28
28
  </a>
@@ -32,7 +32,7 @@ exports[`Header > renders the specified breadcrumbs above the title 1`] = `
32
32
  /
33
33
  </div>
34
34
  <a
35
- class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-1rfg646"
35
+ class="mantine-Text-root mantine-Anchor-root mantine-Breadcrumbs-breadcrumb mantine-r41kyw"
36
36
  >
37
37
  Three
38
38
  </a>