@veeqo/ui 13.1.0 → 13.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,17 +1,21 @@
1
1
  'use strict';
2
2
 
3
- var styled = require('styled-components');
4
- var colors = require('../../theme/modules/colors.cjs');
5
- var BaseContainer = require('../BaseContainer/BaseContainer.cjs');
3
+ var React = require('react');
4
+ var buildClassnames = require('../../utils/buildClassnames.cjs');
5
+ require('uid/secure');
6
+ var assignCssVars = require('../../utils/assignCssVars.cjs');
7
+ var FlexRow = require('../Flex/FlexRow/FlexRow.cjs');
8
+ var Text = require('../Text/Text.cjs');
9
+ var Tag_module = require('./Tag.module.scss.cjs');
6
10
 
7
11
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
8
12
 
9
- var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
13
+ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
14
 
11
- const Tag = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Tag", componentId: "vui--1rdo7hk" }) `display:inline-flex;flex-direction:row;justify-content:center;align-items:center;border-radius:4px;padding:4px 8px;${({ backgroundColor, color }) => `
12
- color: ${color !== null && color !== undefined ? color : colors.colors.neutral.ink.base};
13
- background-color: ${backgroundColor !== null && backgroundColor !== undefined ? backgroundColor : colors.colors.neutral.grey.base};
14
- `}`;
15
+ const Tag = ({ className, backgroundColor, textColor, children, label, compact = false, leftIconSlot, rightIconSlot, ...otherProps }) => (React__default.default.createElement(FlexRow.FlexRow, { flexWrap: "nowrap", justifyContent: "center", gap: "xs", className: buildClassnames.buildClassnames([Tag_module.tag, compact && Tag_module.compact, className]), style: { ...assignCssVars.assignCssVars({ customTextColor: textColor }), backgroundColor }, ...otherProps },
16
+ leftIconSlot,
17
+ children || React__default.default.createElement(Text.Text, { variant: "body" }, label),
18
+ rightIconSlot));
15
19
 
16
20
  exports.Tag = Tag;
17
21
  //# sourceMappingURL=Tag.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.cjs","sources":["../../../src/components/Tag/Tag.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { colors } from '../../theme/modules/colors';\nimport { BaseContainer } from '../BaseContainer';\n\nexport interface TagProps {\n backgroundColor?: string;\n color?: string;\n}\n\nexport const Tag = styled(BaseContainer)<TagProps>`\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n padding: 4px 8px;\n\n ${({ backgroundColor, color }) => `\n color: ${color ?? colors.neutral.ink.base};\n background-color: ${backgroundColor ?? colors.neutral.grey.base};\n `}\n`;\n"],"names":["styled","BaseContainer","colors"],"mappings":";;;;;;;;;;AAUa,MAAA,GAAG,GAAGA,uBAAM,CAACC,2BAAa,CAAC,CAQpC,UAAA,CAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,mHAAA,EAAA,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK;aACvB,KAAK,KAAA,IAAA,IAAL,KAAK,KAAA,SAAA,GAAL,KAAK,GAAIC,aAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA;wBACrB,eAAe,KAAA,IAAA,IAAf,eAAe,KAAA,SAAA,GAAf,eAAe,GAAIA,aAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA;AAChE,EAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"Tag.cjs","sources":["../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\n\nimport { assignCssVars, buildClassnames } from '../../utils';\nimport { FlexRow } from '../Flex/FlexRow';\nimport { FlexProps } from '../Flex/types';\nimport { Text } from '../Text';\n\nimport styles from './Tag.module.scss';\n\ntype TagProps = Omit<FlexProps, 'color'> & {\n backgroundColor?: string;\n textColor?: string;\n label?: string;\n compact?: boolean;\n leftIconSlot?: React.ReactNode;\n rightIconSlot?: React.ReactNode;\n};\n\nexport const Tag = ({\n className,\n backgroundColor,\n textColor,\n children,\n label,\n compact = false,\n leftIconSlot,\n rightIconSlot,\n ...otherProps\n}: TagProps) => (\n <FlexRow\n flexWrap=\"nowrap\"\n justifyContent=\"center\"\n gap=\"xs\"\n className={buildClassnames([styles.tag, compact && styles.compact, className])}\n style={{ ...assignCssVars({ customTextColor: textColor }), backgroundColor }}\n {...otherProps}\n >\n {leftIconSlot}\n {children || <Text variant=\"body\">{label}</Text>}\n {rightIconSlot}\n </FlexRow>\n);\n"],"names":["React","FlexRow","buildClassnames","styles","assignCssVars","Text"],"mappings":";;;;;;;;;;;;;;AAkBa,MAAA,GAAG,GAAG,CAAC,EAClB,SAAS,EACT,eAAe,EACf,SAAS,EACT,QAAQ,EACR,KAAK,EACL,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,aAAa,EACb,GAAG,UAAU,EACJ,MACTA,qCAACC,eAAO,EAAA,EACN,QAAQ,EAAC,QAAQ,EACjB,cAAc,EAAC,QAAQ,EACvB,GAAG,EAAC,IAAI,EACR,SAAS,EAAEC,+BAAe,CAAC,CAACC,UAAM,CAAC,GAAG,EAAE,OAAO,IAAIA,UAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,EAC9E,KAAK,EAAE,EAAE,GAAGC,2BAAa,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,CAAC,EAAE,eAAe,EAAE,KACxE,UAAU,EAAA;IAEb,YAAY;IACZ,QAAQ,IAAIJ,qCAACK,SAAI,EAAA,EAAC,OAAO,EAAC,MAAM,EAAE,EAAA,KAAK,CAAQ;IAC/C,aAAa,CACN;;;;"}
@@ -1,5 +1,12 @@
1
- export interface TagProps {
1
+ import React from 'react';
2
+ import { FlexProps } from '../Flex/types';
3
+ type TagProps = Omit<FlexProps, 'color'> & {
2
4
  backgroundColor?: string;
3
- color?: string;
4
- }
5
- export declare const Tag: import("styled-components").StyledComponent<"div", any, TagProps, never>;
5
+ textColor?: string;
6
+ label?: string;
7
+ compact?: boolean;
8
+ leftIconSlot?: React.ReactNode;
9
+ rightIconSlot?: React.ReactNode;
10
+ };
11
+ export declare const Tag: ({ className, backgroundColor, textColor, children, label, compact, leftIconSlot, rightIconSlot, ...otherProps }: TagProps) => React.JSX.Element;
12
+ export {};
@@ -1,11 +1,15 @@
1
- import styled from 'styled-components';
2
- import { colors } from '../../theme/modules/colors.js';
3
- import { BaseContainer } from '../BaseContainer/BaseContainer.js';
1
+ import React__default from 'react';
2
+ import { buildClassnames } from '../../utils/buildClassnames.js';
3
+ import 'uid/secure';
4
+ import { assignCssVars } from '../../utils/assignCssVars.js';
5
+ import { FlexRow } from '../Flex/FlexRow/FlexRow.js';
6
+ import { Text } from '../Text/Text.js';
7
+ import styles from './Tag.module.scss.js';
4
8
 
5
- const Tag = styled(BaseContainer).withConfig({ displayName: "vui--Tag", componentId: "vui--1rdo7hk" }) `display:inline-flex;flex-direction:row;justify-content:center;align-items:center;border-radius:4px;padding:4px 8px;${({ backgroundColor, color }) => `
6
- color: ${color !== null && color !== undefined ? color : colors.neutral.ink.base};
7
- background-color: ${backgroundColor !== null && backgroundColor !== undefined ? backgroundColor : colors.neutral.grey.base};
8
- `}`;
9
+ const Tag = ({ className, backgroundColor, textColor, children, label, compact = false, leftIconSlot, rightIconSlot, ...otherProps }) => (React__default.createElement(FlexRow, { flexWrap: "nowrap", justifyContent: "center", gap: "xs", className: buildClassnames([styles.tag, compact && styles.compact, className]), style: { ...assignCssVars({ customTextColor: textColor }), backgroundColor }, ...otherProps },
10
+ leftIconSlot,
11
+ children || React__default.createElement(Text, { variant: "body" }, label),
12
+ rightIconSlot));
9
13
 
10
14
  export { Tag };
11
15
  //# sourceMappingURL=Tag.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","sources":["../../../src/components/Tag/Tag.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { colors } from '../../theme/modules/colors';\nimport { BaseContainer } from '../BaseContainer';\n\nexport interface TagProps {\n backgroundColor?: string;\n color?: string;\n}\n\nexport const Tag = styled(BaseContainer)<TagProps>`\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n padding: 4px 8px;\n\n ${({ backgroundColor, color }) => `\n color: ${color ?? colors.neutral.ink.base};\n background-color: ${backgroundColor ?? colors.neutral.grey.base};\n `}\n`;\n"],"names":[],"mappings":";;;;AAUa,MAAA,GAAG,GAAG,MAAM,CAAC,aAAa,CAAC,CAQpC,UAAA,CAAA,EAAA,WAAA,EAAA,UAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,mHAAA,EAAA,CAAC,EAAE,eAAe,EAAE,KAAK,EAAE,KAAK;aACvB,KAAK,KAAA,IAAA,IAAL,KAAK,KAAA,SAAA,GAAL,KAAK,GAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA;wBACrB,eAAe,KAAA,IAAA,IAAf,eAAe,KAAA,SAAA,GAAf,eAAe,GAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAA;AAChE,EAAA,CAAA,CAAA;;;;"}
1
+ {"version":3,"file":"Tag.js","sources":["../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import React from 'react';\n\nimport { assignCssVars, buildClassnames } from '../../utils';\nimport { FlexRow } from '../Flex/FlexRow';\nimport { FlexProps } from '../Flex/types';\nimport { Text } from '../Text';\n\nimport styles from './Tag.module.scss';\n\ntype TagProps = Omit<FlexProps, 'color'> & {\n backgroundColor?: string;\n textColor?: string;\n label?: string;\n compact?: boolean;\n leftIconSlot?: React.ReactNode;\n rightIconSlot?: React.ReactNode;\n};\n\nexport const Tag = ({\n className,\n backgroundColor,\n textColor,\n children,\n label,\n compact = false,\n leftIconSlot,\n rightIconSlot,\n ...otherProps\n}: TagProps) => (\n <FlexRow\n flexWrap=\"nowrap\"\n justifyContent=\"center\"\n gap=\"xs\"\n className={buildClassnames([styles.tag, compact && styles.compact, className])}\n style={{ ...assignCssVars({ customTextColor: textColor }), backgroundColor }}\n {...otherProps}\n >\n {leftIconSlot}\n {children || <Text variant=\"body\">{label}</Text>}\n {rightIconSlot}\n </FlexRow>\n);\n"],"names":["React"],"mappings":";;;;;;;;AAkBa,MAAA,GAAG,GAAG,CAAC,EAClB,SAAS,EACT,eAAe,EACf,SAAS,EACT,QAAQ,EACR,KAAK,EACL,OAAO,GAAG,KAAK,EACf,YAAY,EACZ,aAAa,EACb,GAAG,UAAU,EACJ,MACTA,6BAAC,OAAO,EAAA,EACN,QAAQ,EAAC,QAAQ,EACjB,cAAc,EAAC,QAAQ,EACvB,GAAG,EAAC,IAAI,EACR,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,OAAO,IAAI,MAAM,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,EAC9E,KAAK,EAAE,EAAE,GAAG,aAAa,CAAC,EAAE,eAAe,EAAE,SAAS,EAAE,CAAC,EAAE,eAAe,EAAE,KACxE,UAAU,EAAA;IAEb,YAAY;IACZ,QAAQ,IAAIA,6BAAC,IAAI,EAAA,EAAC,OAAO,EAAC,MAAM,EAAE,EAAA,KAAK,CAAQ;IAC/C,aAAa,CACN;;;;"}
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var ___$insertStyle = require('../../_virtual/____insertStyle.cjs');
4
+
5
+ ___$insertStyle("._tag_81al6_1 {\n border-radius: var(--sizes-xs);\n padding: 2px var(--sizes-xs);\n display: inline-flex;\n min-width: var(--sizes-3);\n min-height: var(--sizes-5);\n color: var(--custom-text-color, var(--text-body-color));\n font-size: var(--text-body-font-size);\n}\n._tag_81al6_1 span {\n color: inherit;\n}\n._tag_81al6_1 svg {\n width: var(--sizes-5);\n height: var(--sizes-5);\n}\n._tag_81al6_1._compact_81al6_17 {\n font-size: var(--text-body-small-font-size);\n}\n._tag_81al6_1._compact_81al6_17 span {\n font-size: var(--text-body-small-font-size);\n}\n._tag_81al6_1._compact_81al6_17 svg {\n width: var(--sizes-base);\n height: var(--sizes-base);\n}");
6
+ var styles = {"tag":"_tag_81al6_1","compact":"_compact_81al6_17"};
7
+
8
+ module.exports = styles;
9
+ //# sourceMappingURL=Tag.module.scss.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.module.scss.cjs","sources":["../../../src/components/Tag/Tag.module.scss"],"sourcesContent":[".tag {\n border-radius: var(--sizes-xs);\n padding: 2px var(--sizes-xs);\n display: inline-flex;\n min-width: var(--sizes-3);\n min-height: var(--sizes-5);\n\n // applies color and font-size for direct text children\n color: var(--custom-text-color, var(--text-body-color));\n font-size: var(--text-body-font-size);\n\n // ensure Text components (spans) inherit the color\n span {\n color: inherit;\n }\n\n svg {\n width: var(--sizes-5);\n height: var(--sizes-5);\n }\n\n &.compact {\n font-size: var(--text-body-small-font-size);\n\n span {\n font-size: var(--text-body-small-font-size);\n }\n\n svg {\n width: var(--sizes-base);\n height: var(--sizes-base);\n }\n }\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,mqBAAA;AACA,aAAA,CAAA,KAAA,CAAA,cAAA,CAAA,SAAA,CAAA,mBAAA;;;;"}
@@ -0,0 +1,7 @@
1
+ import insertStyle from '../../_virtual/____insertStyle.js';
2
+
3
+ insertStyle("._tag_81al6_1 {\n border-radius: var(--sizes-xs);\n padding: 2px var(--sizes-xs);\n display: inline-flex;\n min-width: var(--sizes-3);\n min-height: var(--sizes-5);\n color: var(--custom-text-color, var(--text-body-color));\n font-size: var(--text-body-font-size);\n}\n._tag_81al6_1 span {\n color: inherit;\n}\n._tag_81al6_1 svg {\n width: var(--sizes-5);\n height: var(--sizes-5);\n}\n._tag_81al6_1._compact_81al6_17 {\n font-size: var(--text-body-small-font-size);\n}\n._tag_81al6_1._compact_81al6_17 span {\n font-size: var(--text-body-small-font-size);\n}\n._tag_81al6_1._compact_81al6_17 svg {\n width: var(--sizes-base);\n height: var(--sizes-base);\n}");
4
+ var styles = {"tag":"_tag_81al6_1","compact":"_compact_81al6_17"};
5
+
6
+ export { styles as default };
7
+ //# sourceMappingURL=Tag.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Tag.module.scss.js","sources":["../../../src/components/Tag/Tag.module.scss"],"sourcesContent":[".tag {\n border-radius: var(--sizes-xs);\n padding: 2px var(--sizes-xs);\n display: inline-flex;\n min-width: var(--sizes-3);\n min-height: var(--sizes-5);\n\n // applies color and font-size for direct text children\n color: var(--custom-text-color, var(--text-body-color));\n font-size: var(--text-body-font-size);\n\n // ensure Text components (spans) inherit the color\n span {\n color: inherit;\n }\n\n svg {\n width: var(--sizes-5);\n height: var(--sizes-5);\n }\n\n &.compact {\n font-size: var(--text-body-small-font-size);\n\n span {\n font-size: var(--text-body-small-font-size);\n }\n\n svg {\n width: var(--sizes-base);\n height: var(--sizes-base);\n }\n }\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,mqBAAA;AACA,aAAA,CAAA,KAAA,CAAA,cAAA,CAAA,SAAA,CAAA,mBAAA;;;;"}
@@ -1,30 +1,23 @@
1
1
  'use strict';
2
2
 
3
3
  var React = require('react');
4
- require('../../hooks/useFocusVisible.cjs');
5
- var useHover = require('../../hooks/useHover.cjs');
4
+ var CrossIcon = require('../../icons/design-system/components/CrossIcon.cjs');
5
+ var ThreeDotsIcon = require('../../icons/custom/components/ThreeDotsIcon.cjs');
6
+ var colors = require('../../theme/modules/colors.cjs');
6
7
  var buildClassnames = require('../../utils/buildClassnames.cjs');
7
8
  require('uid/secure');
8
- require('lodash.throttle');
9
- var colors = require('../../theme/modules/colors.cjs');
9
+ var assignCssVars = require('../../utils/assignCssVars.cjs');
10
10
  var types = require('./types.cjs');
11
- var styled = require('./styled.cjs');
11
+ var ViewTab_module = require('./ViewTab.module.scss.cjs');
12
+ var FlexRow = require('../Flex/FlexRow/FlexRow.cjs');
12
13
  var Text = require('../Text/Text.cjs');
14
+ var Button = require('../Button/Button.cjs');
13
15
 
14
16
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
15
17
 
16
18
  var React__default = /*#__PURE__*/_interopDefaultCompat(React);
17
19
 
18
- const generateClassNames = (prefix) => ({
19
- delete: prefix ? `${prefix}-delete` : undefined,
20
- edit: prefix ? `${prefix}-edit` : undefined,
21
- container: prefix ? `${prefix}-view` : undefined,
22
- active: prefix ? `${prefix}-active` : undefined,
23
- counter: prefix ? `${prefix}-counter` : undefined,
24
- });
25
20
  const ViewTab = React__default.default.forwardRef(({ id, iconSlot, name, type, className, colourPalette = colors.colors.secondary.blue, customTextColour, count, countSlot, active = false, onClick, subAction, ariaContext, ariaDescribedBy, ...props }, ref) => {
26
- const classNames = generateClassNames(className);
27
- const [isHovered, handleEnter, handleLeave] = useHover.useHover();
28
21
  const action = active && subAction ? subAction : onClick;
29
22
  const handleAction = () => action(id);
30
23
  const isDraft = type === types.ViewTabTypes.draft;
@@ -36,13 +29,17 @@ const ViewTab = React__default.default.forwardRef(({ id, iconSlot, name, type, c
36
29
  return 'Edit';
37
30
  return '';
38
31
  };
39
- return (React__default.default.createElement(styled.ViewButton, { className: buildClassnames.buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.container]), onClick: handleAction, role: "tab", "aria-selected": active, "aria-label": `${getLabelAction()} ${name} view ${count && ariaContext ? `with ${count} ${ariaContext}` : ''}`, customTextColour: customTextColour, ref: ref, "aria-describedby": ariaDescribedBy, ...props },
40
- React__default.default.createElement(styled.Contour, { active: active, onMouseEnter: handleEnter, onMouseLeave: handleLeave, colourPalette: colourPalette, customTextColour: customTextColour },
41
- iconSlot && React__default.default.createElement(styled.CustomIconWrapper, null, iconSlot),
32
+ const paletteColours = {
33
+ colourPaletteLightest: colourPalette.lightest,
34
+ colourPaletteDark: colourPalette.dark,
35
+ };
36
+ return (React__default.default.createElement(Button.Button, { variant: "flat", className: buildClassnames.buildClassnames([className, ViewTab_module.viewButton, active && ViewTab_module.active]), onClick: handleAction, role: "tab", "aria-selected": active, "aria-label": `${getLabelAction()} ${name} view ${count && ariaContext ? `with ${count} ${ariaContext}` : ''}`, ref: ref, "aria-describedby": ariaDescribedBy, style: assignCssVars.assignCssVars({ customTextColour, ...paletteColours }), ...props },
37
+ React__default.default.createElement(FlexRow.FlexRow, { gap: "none", flexWrap: "nowrap", className: buildClassnames.buildClassnames([ViewTab_module.contour]) },
38
+ iconSlot && (React__default.default.createElement(FlexRow.FlexRow, { flexWrap: "nowrap", className: ViewTab_module.iconWrapper }, iconSlot)),
42
39
  React__default.default.createElement(Text.Text, { variant: "bodyBold" }, name),
43
- (countSlot || (count !== undefined && count !== null)) && (React__default.default.createElement(styled.CounterContainer, { "data-testid": "countContainer", active: active || isHovered, colourPalette: colourPalette, customTextColour: customTextColour }, countSlot || React__default.default.createElement(styled.CounterText, { variant: "subheadingSmall" }, count))),
44
- isDraft && React__default.default.createElement(styled.CrossIconStyling, { ...styled.IconStyling, "aria-label": "delete icon" }),
45
- isSaved && active && React__default.default.createElement(styled.ThreeDotsIconStyling, { ...styled.IconStyling, "aria-label": "edit icon" }))));
40
+ (countSlot || (count !== undefined && count !== null)) && (React__default.default.createElement(FlexRow.FlexRow, { flexWrap: "nowrap", justifyContent: "center", gap: "none", className: buildClassnames.buildClassnames([ViewTab_module.counterContainer]), "data-testid": "countContainer" }, countSlot || (React__default.default.createElement(Text.Text, { variant: "subheadingSmall", className: ViewTab_module.counterText }, count)))),
41
+ isDraft && React__default.default.createElement(CrossIcon.ReactComponent, { className: ViewTab_module.iconStyling, "aria-label": "delete icon" }),
42
+ isSaved && active && (React__default.default.createElement(ThreeDotsIcon.ThreeDotsIcon, { className: ViewTab_module.iconStyling, "aria-label": "edit icon" })))));
46
43
  });
47
44
 
48
45
  exports.ViewTab = ViewTab;
@@ -1 +1 @@
1
- {"version":3,"file":"ViewTab.cjs","sources":["../../../src/components/ViewTab/ViewTab.tsx"],"sourcesContent":["import React, { Ref } from 'react';\n\nimport { useHover } from '../../hooks';\nimport { colors } from '../../theme/modules/colors';\n\nimport { ViewTabProps, ViewTabTypes } from './types';\n\nimport {\n Contour,\n CounterContainer,\n CounterText,\n CrossIconStyling,\n CustomIconWrapper,\n IconStyling,\n Text,\n ThreeDotsIconStyling,\n ViewButton,\n} from './styled';\nimport { buildClassnames } from '../../utils/buildClassnames';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n edit?: string;\n container?: string;\n active?: string;\n counter?: string;\n}\n\nconst generateClassNames = (prefix?: string): ClassNamesReturnPayload => ({\n delete: prefix ? `${prefix}-delete` : undefined,\n edit: prefix ? `${prefix}-edit` : undefined,\n container: prefix ? `${prefix}-view` : undefined,\n active: prefix ? `${prefix}-active` : undefined,\n counter: prefix ? `${prefix}-counter` : undefined,\n});\n\nexport const ViewTab = React.forwardRef<HTMLButtonElement, ViewTabProps>(\n (\n {\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n countSlot,\n active = false,\n onClick,\n subAction,\n ariaContext,\n ariaDescribedBy,\n ...props\n }: ViewTabProps,\n ref: Ref<HTMLButtonElement>,\n ) => {\n const classNames = generateClassNames(className);\n const [isHovered, handleEnter, handleLeave] = useHover();\n\n const action = active && subAction ? subAction : onClick;\n const handleAction = () => action(id);\n\n const isDraft = type === ViewTabTypes.draft;\n const isSaved = type === ViewTabTypes.saved;\n\n const getLabelAction = () => {\n if (active && isDraft) return 'Delete';\n if (active && isSaved) return 'Edit';\n return '';\n };\n\n return (\n <ViewButton\n className={buildClassnames([classNames?.container])}\n onClick={handleAction}\n role=\"tab\"\n aria-selected={active}\n aria-label={`${getLabelAction()} ${name} view ${\n count && ariaContext ? `with ${count} ${ariaContext}` : ''\n }`}\n customTextColour={customTextColour}\n ref={ref}\n aria-describedby={ariaDescribedBy}\n {...props}\n >\n <Contour\n active={active}\n onMouseEnter={handleEnter}\n onMouseLeave={handleLeave}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n {iconSlot && <CustomIconWrapper>{iconSlot}</CustomIconWrapper>}\n <Text variant=\"bodyBold\">{name}</Text>\n {(countSlot || (count !== undefined && count !== null)) && (\n <CounterContainer\n data-testid=\"countContainer\"\n active={active || isHovered}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n {countSlot || <CounterText variant=\"subheadingSmall\">{count}</CounterText>}\n </CounterContainer>\n )}\n {isDraft && <CrossIconStyling {...IconStyling} aria-label=\"delete icon\" />}\n {isSaved && active && <ThreeDotsIconStyling {...IconStyling} aria-label=\"edit icon\" />}\n </Contour>\n </ViewButton>\n );\n },\n);\n"],"names":["React","colors","useHover","ViewTabTypes","ViewButton","buildClassnames","Contour","CustomIconWrapper","Text","CounterContainer","CounterText","CrossIconStyling","IconStyling","ThreeDotsIconStyling"],"mappings":";;;;;;;;;;;;;;;;;AA4BA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IACxE,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA,GAAG,SAAS;IAC/C,IAAI,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAO,KAAA,CAAA,GAAG,SAAS;IAC3C,SAAS,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAO,KAAA,CAAA,GAAG,SAAS;IAChD,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAU,QAAA,CAAA,GAAG,SAAS;AAClD,CAAA,CAAC;AAEW,MAAA,OAAO,GAAGA,sBAAK,CAAC,UAAU,CACrC,CACE,EACE,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,aAAa,GAAGC,aAAM,CAAC,SAAS,CAAC,IAAI,EACrC,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,MAAM,GAAG,KAAK,EACd,OAAO,EACP,SAAS,EACT,WAAW,EACX,eAAe,EACf,GAAG,KAAK,EACK,EACf,G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AAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAAA;AAEjC,YAAA,QAAQ,IAAIN,sBAAA,CAAA,aAAA,CAACO,wBAAiB,EAAA,IAAA,EAAE,QAAQ,CAAqB;AAC9D,YAAAP,sBAAA,CAAA,aAAA,CAACQ,SAAI,EAAC,EAAA,OAAO,EAAC,UAAU,EAAA,EAAE,IAAI,CAAQ;YACrC,CAAC,SAAS,KAAK,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI,CAAC,MACpDR,sBAAC,CAAA,aAAA,CAAAS,uBAAgB,mBACH,gBAAgB,EAC5B,MAAM,EAAE,MAAM,IAAI,SAAS,EAC3B,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAEjC,EAAA,SAAS,IAAIT,sBAAC,CAAA,aAAA,CAAAU,kBAAW,IAAC,OAAO,EAAC,iBAAiB,EAAE,EAAA,KAAK,CAAe,CACzD,CACpB;AACA,YAAA,OAAO,IAAIV,sBAAC,CAAA,aAAA,CAAAW,uBAAgB,OAAKC,kBAAW,EAAA,YAAA,EAAa,aAAa,EAAG,CAAA;AACzE,YAAA,OAAO,IAAI,MAAM,IAAIZ,sBAAA,CAAA,aAAA,CAACa,2BAAoB,EAAA,EAAA,GAAKD,kBAAW,EAAA,YAAA,EAAa,WAAW,EAAA,CAAG,CAC9E,CACC;AAEjB,CAAC;;;;"}
1
+ {"version":3,"file":"ViewTab.cjs","sources":["../../../src/components/ViewTab/ViewTab.tsx"],"sourcesContent":["import React, { Ref } from 'react';\n\nimport { CrossIcon, ThreeDotsIcon } from '../../icons';\nimport { colors } from '../../theme/modules/colors';\nimport { buildClassnames, assignCssVars } from '../../utils';\n\nimport { ViewTabProps, ViewTabTypes } from './types';\n\nimport styles from './ViewTab.module.scss';\nimport { FlexRow } from '../Flex/FlexRow';\nimport { Text } from '../Text';\nimport { Button } from '../Button';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n edit?: string;\n container?: string;\n active?: string;\n counter?: string;\n}\n\nexport const ViewTab = React.forwardRef<HTMLButtonElement, ViewTabProps>(\n (\n {\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n countSlot,\n active = false,\n onClick,\n subAction,\n ariaContext,\n ariaDescribedBy,\n ...props\n }: ViewTabProps,\n ref: Ref<HTMLButtonElement>,\n ) => {\n const action = active && subAction ? subAction : onClick;\n const handleAction = () => action(id);\n\n const isDraft = type === ViewTabTypes.draft;\n const isSaved = type === ViewTabTypes.saved;\n\n const getLabelAction = () => {\n if (active && isDraft) return 'Delete';\n if (active && isSaved) return 'Edit';\n return '';\n };\n\n const paletteColours = {\n colourPaletteLightest: colourPalette.lightest,\n colourPaletteDark: colourPalette.dark,\n };\n\n return (\n <Button\n variant=\"flat\"\n className={buildClassnames([className, styles.viewButton, active && styles.active])}\n onClick={handleAction}\n role=\"tab\"\n aria-selected={active}\n aria-label={`${getLabelAction()} ${name} view ${\n count && ariaContext ? `with ${count} ${ariaContext}` : ''\n }`}\n ref={ref}\n aria-describedby={ariaDescribedBy}\n style={assignCssVars({ customTextColour, ...paletteColours })}\n {...props}\n >\n <FlexRow gap=\"none\" flexWrap=\"nowrap\" className={buildClassnames([styles.contour])}>\n {iconSlot && (\n <FlexRow flexWrap=\"nowrap\" className={styles.iconWrapper}>\n {iconSlot}\n </FlexRow>\n )}\n <Text variant=\"bodyBold\">{name}</Text>\n {(countSlot || (count !== undefined && count !== null)) && (\n <FlexRow\n flexWrap=\"nowrap\"\n justifyContent=\"center\"\n gap=\"none\"\n className={buildClassnames([styles.counterContainer])}\n data-testid=\"countContainer\"\n >\n {countSlot || (\n <Text variant=\"subheadingSmall\" className={styles.counterText}>\n {count}\n </Text>\n )}\n </FlexRow>\n )}\n {isDraft && <CrossIcon className={styles.iconStyling} aria-label=\"delete icon\" />}\n {isSaved && active && (\n <ThreeDotsIcon className={styles.iconStyling} aria-label=\"edit icon\" />\n )}\n </FlexRow>\n </Button>\n );\n },\n);\n"],"names":["React","colors","ViewTabTypes","Button","buildClassnames","styles","assignCssVars","FlexRow","Text","CrossIcon","ThreeDotsIcon"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBa,MAAA,OAAO,GAAGA,sBAAK,CAAC,UAAU,CACrC,CACE,EACE,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,aAAa,GAAGC,aAAM,CAAC,SAAS,CAAC,IAAI,EACrC,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,MAAM,GAAG,KAAK,EACd,OAAO,EACP,SAAS,EACT,WAAW,EACX,eAAe,EACf,GAAG,KAAK,EACK,EACf,GAA2B,KACzB;AACF,IAAA,MAAM,MAAM,GAAG,MAAM,IAAI,SAAS,GAAG,SAAS,GAAG,OAAO;IACxD,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,EAAE,CAAC;AAErC,IAAA,MAAM,OAAO,GAAG,IAAI,KAAKC,kBAAY,CAAC,KAAK;AAC3C,IAAA,MAAM,OAAO,GAAG,IAAI,KAAKA,kBAAY,CAAC,KAAK;IAE3C,MAAM,cAAc,GAAG,MAAK;QAC1B,IAAI,MAAM,IAAI,OAAO;AAAE,YAAA,OAAO,QAAQ;QACtC,IAAI,MAAM,IAAI,OAAO;AAAE,YAAA,OAAO,MAAM;AACpC,QAAA,OAAO,EAAE;AACX,KAAC;AAED,IAAA,MAAM,cAAc,GAAG;QACrB,qBAAqB,EAAE,aAAa,CAAC,QAAQ;QAC7C,iBAAiB,EAAE,aAAa,CAAC,IAAI;KACtC;AAED,IAAA,QACEF,sBAAC,CAAA,aAAA,CAAAG,aAAM,EACL,EAAA,OAAO,EAAC,MAAM,EACd,SAAS,EAAEC,+BAAe,CAAC,CAAC,SAAS,EAAEC,cAAM,CAAC,UAAU,EAAE,MAAM,IAAIA,cAAM,CAAC,MAAM,CAAC,CAAC,EACnF,OAAO,EAAE,YAAY,EACrB,IAAI,EAAC,KAAK,EACK,eAAA,EAAA,MAAM,gB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A,aAAA,CAAAS,wBAAS,EAAC,EAAA,SAAS,EAAEJ,cAAM,CAAC,WAAW,EAAa,YAAA,EAAA,aAAa,EAAG,CAAA;AAChF,YAAA,OAAO,IAAI,MAAM,KAChBL,sBAAC,CAAA,aAAA,CAAAU,2BAAa,IAAC,SAAS,EAAEL,cAAM,CAAC,WAAW,gBAAa,WAAW,EAAA,CAAG,CACxE,CACO,CACH;AAEb,CAAC;;;;"}
@@ -1,24 +1,17 @@
1
1
  import React__default from 'react';
2
- import '../../hooks/useFocusVisible.js';
3
- import { useHover } from '../../hooks/useHover.js';
2
+ import { ReactComponent as CrossIcon } from '../../icons/design-system/components/CrossIcon.js';
3
+ import { ThreeDotsIcon } from '../../icons/custom/components/ThreeDotsIcon.js';
4
+ import { colors } from '../../theme/modules/colors.js';
4
5
  import { buildClassnames } from '../../utils/buildClassnames.js';
5
6
  import 'uid/secure';
6
- import 'lodash.throttle';
7
- import { colors } from '../../theme/modules/colors.js';
7
+ import { assignCssVars } from '../../utils/assignCssVars.js';
8
8
  import { ViewTabTypes } from './types.js';
9
- import { ViewButton, Contour, CustomIconWrapper, CounterContainer, CounterText, CrossIconStyling, IconStyling, ThreeDotsIconStyling } from './styled.js';
9
+ import styles from './ViewTab.module.scss.js';
10
+ import { FlexRow } from '../Flex/FlexRow/FlexRow.js';
10
11
  import { Text } from '../Text/Text.js';
12
+ import { Button } from '../Button/Button.js';
11
13
 
12
- const generateClassNames = (prefix) => ({
13
- delete: prefix ? `${prefix}-delete` : undefined,
14
- edit: prefix ? `${prefix}-edit` : undefined,
15
- container: prefix ? `${prefix}-view` : undefined,
16
- active: prefix ? `${prefix}-active` : undefined,
17
- counter: prefix ? `${prefix}-counter` : undefined,
18
- });
19
14
  const ViewTab = React__default.forwardRef(({ id, iconSlot, name, type, className, colourPalette = colors.secondary.blue, customTextColour, count, countSlot, active = false, onClick, subAction, ariaContext, ariaDescribedBy, ...props }, ref) => {
20
- const classNames = generateClassNames(className);
21
- const [isHovered, handleEnter, handleLeave] = useHover();
22
15
  const action = active && subAction ? subAction : onClick;
23
16
  const handleAction = () => action(id);
24
17
  const isDraft = type === ViewTabTypes.draft;
@@ -30,13 +23,17 @@ const ViewTab = React__default.forwardRef(({ id, iconSlot, name, type, className
30
23
  return 'Edit';
31
24
  return '';
32
25
  };
33
- return (React__default.createElement(ViewButton, { className: buildClassnames([classNames === null || classNames === undefined ? undefined : classNames.container]), onClick: handleAction, role: "tab", "aria-selected": active, "aria-label": `${getLabelAction()} ${name} view ${count && ariaContext ? `with ${count} ${ariaContext}` : ''}`, customTextColour: customTextColour, ref: ref, "aria-describedby": ariaDescribedBy, ...props },
34
- React__default.createElement(Contour, { active: active, onMouseEnter: handleEnter, onMouseLeave: handleLeave, colourPalette: colourPalette, customTextColour: customTextColour },
35
- iconSlot && React__default.createElement(CustomIconWrapper, null, iconSlot),
26
+ const paletteColours = {
27
+ colourPaletteLightest: colourPalette.lightest,
28
+ colourPaletteDark: colourPalette.dark,
29
+ };
30
+ return (React__default.createElement(Button, { variant: "flat", className: buildClassnames([className, styles.viewButton, active && styles.active]), onClick: handleAction, role: "tab", "aria-selected": active, "aria-label": `${getLabelAction()} ${name} view ${count && ariaContext ? `with ${count} ${ariaContext}` : ''}`, ref: ref, "aria-describedby": ariaDescribedBy, style: assignCssVars({ customTextColour, ...paletteColours }), ...props },
31
+ React__default.createElement(FlexRow, { gap: "none", flexWrap: "nowrap", className: buildClassnames([styles.contour]) },
32
+ iconSlot && (React__default.createElement(FlexRow, { flexWrap: "nowrap", className: styles.iconWrapper }, iconSlot)),
36
33
  React__default.createElement(Text, { variant: "bodyBold" }, name),
37
- (countSlot || (count !== undefined && count !== null)) && (React__default.createElement(CounterContainer, { "data-testid": "countContainer", active: active || isHovered, colourPalette: colourPalette, customTextColour: customTextColour }, countSlot || React__default.createElement(CounterText, { variant: "subheadingSmall" }, count))),
38
- isDraft && React__default.createElement(CrossIconStyling, { ...IconStyling, "aria-label": "delete icon" }),
39
- isSaved && active && React__default.createElement(ThreeDotsIconStyling, { ...IconStyling, "aria-label": "edit icon" }))));
34
+ (countSlot || (count !== undefined && count !== null)) && (React__default.createElement(FlexRow, { flexWrap: "nowrap", justifyContent: "center", gap: "none", className: buildClassnames([styles.counterContainer]), "data-testid": "countContainer" }, countSlot || (React__default.createElement(Text, { variant: "subheadingSmall", className: styles.counterText }, count)))),
35
+ isDraft && React__default.createElement(CrossIcon, { className: styles.iconStyling, "aria-label": "delete icon" }),
36
+ isSaved && active && (React__default.createElement(ThreeDotsIcon, { className: styles.iconStyling, "aria-label": "edit icon" })))));
40
37
  });
41
38
 
42
39
  export { ViewTab };
@@ -1 +1 @@
1
- {"version":3,"file":"ViewTab.js","sources":["../../../src/components/ViewTab/ViewTab.tsx"],"sourcesContent":["import React, { Ref } from 'react';\n\nimport { useHover } from '../../hooks';\nimport { colors } from '../../theme/modules/colors';\n\nimport { ViewTabProps, ViewTabTypes } from './types';\n\nimport {\n Contour,\n CounterContainer,\n CounterText,\n CrossIconStyling,\n CustomIconWrapper,\n IconStyling,\n Text,\n ThreeDotsIconStyling,\n ViewButton,\n} from './styled';\nimport { buildClassnames } from '../../utils/buildClassnames';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n edit?: string;\n container?: string;\n active?: string;\n counter?: string;\n}\n\nconst generateClassNames = (prefix?: string): ClassNamesReturnPayload => ({\n delete: prefix ? `${prefix}-delete` : undefined,\n edit: prefix ? `${prefix}-edit` : undefined,\n container: prefix ? `${prefix}-view` : undefined,\n active: prefix ? `${prefix}-active` : undefined,\n counter: prefix ? `${prefix}-counter` : undefined,\n});\n\nexport const ViewTab = React.forwardRef<HTMLButtonElement, ViewTabProps>(\n (\n {\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n countSlot,\n active = false,\n onClick,\n subAction,\n ariaContext,\n ariaDescribedBy,\n ...props\n }: ViewTabProps,\n ref: Ref<HTMLButtonElement>,\n ) => {\n const classNames = generateClassNames(className);\n const [isHovered, handleEnter, handleLeave] = useHover();\n\n const action = active && subAction ? subAction : onClick;\n const handleAction = () => action(id);\n\n const isDraft = type === ViewTabTypes.draft;\n const isSaved = type === ViewTabTypes.saved;\n\n const getLabelAction = () => {\n if (active && isDraft) return 'Delete';\n if (active && isSaved) return 'Edit';\n return '';\n };\n\n return (\n <ViewButton\n className={buildClassnames([classNames?.container])}\n onClick={handleAction}\n role=\"tab\"\n aria-selected={active}\n aria-label={`${getLabelAction()} ${name} view ${\n count && ariaContext ? `with ${count} ${ariaContext}` : ''\n }`}\n customTextColour={customTextColour}\n ref={ref}\n aria-describedby={ariaDescribedBy}\n {...props}\n >\n <Contour\n active={active}\n onMouseEnter={handleEnter}\n onMouseLeave={handleLeave}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n {iconSlot && <CustomIconWrapper>{iconSlot}</CustomIconWrapper>}\n <Text variant=\"bodyBold\">{name}</Text>\n {(countSlot || (count !== undefined && count !== null)) && (\n <CounterContainer\n data-testid=\"countContainer\"\n active={active || isHovered}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n {countSlot || <CounterText variant=\"subheadingSmall\">{count}</CounterText>}\n </CounterContainer>\n )}\n {isDraft && <CrossIconStyling {...IconStyling} aria-label=\"delete icon\" />}\n {isSaved && active && <ThreeDotsIconStyling {...IconStyling} aria-label=\"edit icon\" />}\n </Contour>\n </ViewButton>\n );\n },\n);\n"],"names":["React"],"mappings":";;;;;;;;;;;AA4BA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IACxE,MAAM,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA,GAAG,SAAS;IAC/C,IAAI,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAO,KAAA,CAAA,GAAG,SAAS;IAC3C,SAAS,EAAE,MAAM,GAAG,CAAG,EAAA,MAAM,CAAO,KAAA,CAAA,GAAG,SAAS;IAChD,MAAM,EAAE,MAAM,GAAG,CAAG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C;AAEjB,CAAC;;;;"}
1
+ {"version":3,"file":"ViewTab.js","sources":["../../../src/components/ViewTab/ViewTab.tsx"],"sourcesContent":["import React, { Ref } from 'react';\n\nimport { CrossIcon, ThreeDotsIcon } from '../../icons';\nimport { colors } from '../../theme/modules/colors';\nimport { buildClassnames, assignCssVars } from '../../utils';\n\nimport { ViewTabProps, ViewTabTypes } from './types';\n\nimport styles from './ViewTab.module.scss';\nimport { FlexRow } from '../Flex/FlexRow';\nimport { Text } from '../Text';\nimport { Button } from '../Button';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n edit?: string;\n container?: string;\n active?: string;\n counter?: string;\n}\n\nexport const ViewTab = React.forwardRef<HTMLButtonElement, ViewTabProps>(\n (\n {\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n countSlot,\n active = false,\n onClick,\n subAction,\n ariaContext,\n ariaDescribedBy,\n ...props\n }: ViewTabProps,\n ref: Ref<HTMLButtonElement>,\n ) => {\n const action = active && subAction ? subAction : onClick;\n const handleAction = () => action(id);\n\n const isDraft = type === ViewTabTypes.draft;\n const isSaved = type === ViewTabTypes.saved;\n\n const getLabelAction = () => {\n if (active && isDraft) return 'Delete';\n if (active && isSaved) return 'Edit';\n return '';\n };\n\n const paletteColours = {\n colourPaletteLightest: colourPalette.lightest,\n colourPaletteDark: colourPalette.dark,\n };\n\n return (\n <Button\n variant=\"flat\"\n className={buildClassnames([className, styles.viewButton, active && styles.active])}\n onClick={handleAction}\n role=\"tab\"\n aria-selected={active}\n aria-label={`${getLabelAction()} ${name} view ${\n count && ariaContext ? `with ${count} ${ariaContext}` : ''\n }`}\n ref={ref}\n aria-describedby={ariaDescribedBy}\n style={assignCssVars({ customTextColour, ...paletteColours })}\n {...props}\n >\n <FlexRow gap=\"none\" flexWrap=\"nowrap\" className={buildClassnames([styles.contour])}>\n {iconSlot && (\n <FlexRow flexWrap=\"nowrap\" className={styles.iconWrapper}>\n {iconSlot}\n </FlexRow>\n )}\n <Text variant=\"bodyBold\">{name}</Text>\n {(countSlot || (count !== undefined && count !== null)) && (\n <FlexRow\n flexWrap=\"nowrap\"\n justifyContent=\"center\"\n gap=\"none\"\n className={buildClassnames([styles.counterContainer])}\n data-testid=\"countContainer\"\n >\n {countSlot || (\n <Text variant=\"subheadingSmall\" className={styles.counterText}>\n {count}\n </Text>\n )}\n </FlexRow>\n )}\n {isDraft && <CrossIcon className={styles.iconStyling} aria-label=\"delete icon\" />}\n {isSaved && active && (\n <ThreeDotsIcon className={styles.iconStyling} aria-label=\"edit icon\" />\n )}\n </FlexRow>\n </Button>\n );\n },\n);\n"],"names":["React"],"mappings":";;;;;;;;;;;;;AAqBa,MAAA,OAAO,GAAGA,cAAK,CAAC,UAAU,CACrC,CACE,EACE,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,EACrC,gBAAgB,EAChB,KAAK,EACL,SAAS,EACT,MAAM,GAAG,KAAK,EACd,OAAO,EACP,SAAS,EACT,WAAW,EACX,eAAe,EACf,GAAG,KAAK,EACK,EACf,GAA2B,KACzB;AACF,IAAA,MAAM,MAAM,GAAG,MAAM,IAAI,SAAS,GAAG,SAAS,GAAG,OAAO;IACxD,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,EAAE,CAAC;AAErC,IAAA,MAAM,OAAO,GAAG,IAAI,KAAK,YAAY,CAAC,KAAK;AAC3C,IAAA,MAAM,OAAO,GAAG,IAAI,KAAK,YAAY,CAAC,KAAK;IAE3C,MAAM,cAAc,GAAG,MAAK;QAC1B,IAAI,MAAM,IAAI,OAAO;AAAE,YAAA,OAAO,QAAQ;QACtC,IAAI,MAAM,IAAI,OAAO;AAAE,YAAA,OAAO,MAAM;AACpC,QAAA,OAAO,EAAE;AACX,KAAC;AAED,IAAA,MAAM,cAAc,GAAG;QACrB,qBAAqB,EAAE,aAAa,CAAC,QAAQ;QAC7C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,SAAS,EAAE,eAAe,CAAC,CAAC,MAAM,CAAC,gBAAgB,CAAC,CAAC,EACzC,aAAA,EAAA,gBAAgB,EAE3B,EAAA,SAAS,KACRA,cAAC,CAAA,aAAA,CAAA,IAAI,EAAC,EAAA,OAAO,EAAC,iBAAiB,EAAC,SAAS,EAAE,MAAM,CAAC,WAAW,EAC1D,EAAA,KAAK,CACD,CACR,CACO,CACX;YACA,OAAO,IAAIA,cAAC,CAAA,aAAA,CAAA,SAAS,EAAC,EAAA,SAAS,EAAE,MAAM,CAAC,WAAW,EAAa,YAAA,EAAA,aAAa,EAAG,CAAA;AAChF,YAAA,OAAO,IAAI,MAAM,KAChBA,cAAC,CAAA,aAAA,CAAA,aAAa,IAAC,SAAS,EAAE,MAAM,CAAC,WAAW,gBAAa,WAAW,EAAA,CAAG,CACxE,CACO,CACH;AAEb,CAAC;;;;"}
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var ___$insertStyle = require('../../_virtual/____insertStyle.cjs');
4
+
5
+ ___$insertStyle("._contour_q7k9b_1 {\n position: relative;\n height: var(--sizes-10);\n border-radius: var(--sizes-xs);\n padding: var(--sizes-sm);\n border: var(--sizes-line) solid transparent;\n cursor: pointer;\n background-color: transparent;\n}\n._contour_q7k9b_1 > span {\n color: var(--custom-text-colour, var(--colors-neutral-ink-dark));\n}\n\n._counterContainer_q7k9b_14 {\n display: inline-flex;\n border-radius: var(--sizes-xs);\n padding: 2px var(--sizes-xs);\n min-width: var(--sizes-5);\n height: var(--sizes-5);\n margin-left: var(--sizes-sm);\n}\n\n._counterText_q7k9b_23 {\n line-height: 1;\n}\n\nbutton[role=tab]._viewButton_q7k9b_27 {\n box-sizing: border-box;\n border-radius: var(--sizes-xs);\n border: none;\n padding: 0;\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 {\n background-color: var(--colour-palette-lightest);\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 > svg {\n color: var(--colour-palette-dark);\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 > span {\n color: var(--custom-text-colour, var(--colour-palette-dark));\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 ._counterContainer_q7k9b_14 {\n background-color: var(--colour-palette-dark);\n /* Force all text elements to be white when active, used when using slot */\n /* Force all SVG icons to be white when active, used when using slot */\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 ._counterContainer_q7k9b_14 ._counterText_q7k9b_23 {\n color: var(--colors-neutral-grey-lightest);\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 ._counterContainer_q7k9b_14 span {\n color: var(--colors-neutral-grey-lightest) !important;\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 ._counterContainer_q7k9b_14 svg {\n fill: var(--colors-neutral-grey-lightest);\n color: var(--colors-neutral-grey-lightest);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 {\n background-color: var(--colors-neutral-grey-base);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 {\n background-color: var(--colors-neutral-grey-base);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 ._counterText_q7k9b_23, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 ._counterText_q7k9b_23, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 ._counterText_q7k9b_23, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 ._counterText_q7k9b_23 {\n color: var(--colors-neutral-ink-base);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 span, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 span, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 span, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 span {\n color: var(--colors-neutral-ink-base);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 svg, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 svg, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 svg, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 svg {\n fill: var(--colors-neutral-ink-base);\n color: var(--colors-neutral-ink-base);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 span, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 span, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 span, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 span {\n color: var(--custom-text-colour, var(--colors-neutral-ink-dark));\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 svg, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 svg, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 svg, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 svg {\n color: var(--colors-neutral-ink-dark);\n}\n\n._iconWrapper_q7k9b_80 {\n margin-right: var(--sizes-sm);\n}\n._iconWrapper_q7k9b_80 svg {\n height: var(--sizes-base);\n width: var(--sizes-base);\n}\n\n._iconStyling_q7k9b_88 {\n margin-left: var(--sizes-xs);\n padding: var(--sizes-xs);\n height: var(--sizes-base);\n width: var(--sizes-base);\n}");
6
+ var styles = {"contour":"_contour_q7k9b_1","counterContainer":"_counterContainer_q7k9b_14","counterText":"_counterText_q7k9b_23","viewButton":"_viewButton_q7k9b_27","active":"_active_q7k9b_33","iconWrapper":"_iconWrapper_q7k9b_80","iconStyling":"_iconStyling_q7k9b_88"};
7
+
8
+ module.exports = styles;
9
+ //# sourceMappingURL=ViewTab.module.scss.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewTab.module.scss.cjs","sources":["../../../src/components/ViewTab/ViewTab.module.scss"],"sourcesContent":[".contour {\n position: relative;\n height: var(--sizes-10);\n border-radius: var(--sizes-xs);\n padding: var(--sizes-sm);\n border: var(--sizes-line) solid transparent;\n cursor: pointer;\n background-color: transparent;\n\n & > span {\n color: var(--custom-text-colour, var(--colors-neutral-ink-dark));\n }\n}\n\n.counterContainer {\n display: inline-flex;\n border-radius: var(--sizes-xs);\n padding: 2px var(--sizes-xs);\n min-width: var(--sizes-5);\n height: var(--sizes-5);\n margin-left: var(--sizes-sm);\n}\n\n.counterText {\n line-height: 1;\n}\n\n// important is needed to override button styles\nbutton[role='tab'].viewButton {\n box-sizing: border-box;\n border-radius: var(--sizes-xs);\n border: none;\n padding: 0;\n\n &.active {\n .contour {\n background-color: var(--colour-palette-lightest);\n\n & > svg {\n color: var(--colour-palette-dark);\n }\n\n > span {\n color: var(--custom-text-colour, var(--colour-palette-dark));\n }\n\n .counterContainer {\n background-color: var(--colour-palette-dark);\n\n .counterText {\n color: var(--colors-neutral-grey-lightest);\n }\n\n /* Force all text elements to be white when active, used when using slot */\n & span {\n color: var(--colors-neutral-grey-lightest) !important;\n }\n\n /* Force all SVG icons to be white when active, used when using slot */\n & svg {\n fill: var(--colors-neutral-grey-lightest);\n color: var(--colors-neutral-grey-lightest);\n }\n }\n }\n }\n\n &:hover,\n &:focus-visible,\n &.active:hover,\n &.active:focus-visible {\n .contour {\n background-color: var(--colors-neutral-grey-base);\n .counterContainer {\n background-color: var(--colors-neutral-grey-base);\n .counterText {\n color: var(--colors-neutral-ink-base);\n }\n & span {\n color: var(--colors-neutral-ink-base);\n }\n & svg {\n fill: var(--colors-neutral-ink-base);\n color: var(--colors-neutral-ink-base);\n }\n }\n\n & span {\n color: var(--custom-text-colour, var(--colors-neutral-ink-dark));\n }\n & svg {\n color: var(--colors-neutral-ink-dark);\n }\n }\n }\n}\n\n.iconWrapper {\n margin-right: var(--sizes-sm);\n\n svg {\n height: var(--sizes-base);\n width: var(--sizes-base);\n }\n}\n\n.iconStyling {\n margin-left: var(--sizes-xs);\n padding: var(--sizes-xs);\n height: var(--sizes-base);\n width: var(--sizes-base);\n}\n"],"names":[],"mappings":";;;;AACE,eAAA,CAAA,i2KAAA;AACA,aAAA,CAAA,SAAA,CAAA,kBAAA,CAAA,kBAAA,CAAA,4BAAA,CAAA,aAAA,CAAA,uBAAA,CAAA,YAAA,CAAA,sBAAA,CAAA,QAAA,CAAA,kBAAA,CAAA,aAAA,CAAA,uBAAA,CAAA,aAAA,CAAA,uBAAA;;;;"}
@@ -0,0 +1,7 @@
1
+ import insertStyle from '../../_virtual/____insertStyle.js';
2
+
3
+ insertStyle("._contour_q7k9b_1 {\n position: relative;\n height: var(--sizes-10);\n border-radius: var(--sizes-xs);\n padding: var(--sizes-sm);\n border: var(--sizes-line) solid transparent;\n cursor: pointer;\n background-color: transparent;\n}\n._contour_q7k9b_1 > span {\n color: var(--custom-text-colour, var(--colors-neutral-ink-dark));\n}\n\n._counterContainer_q7k9b_14 {\n display: inline-flex;\n border-radius: var(--sizes-xs);\n padding: 2px var(--sizes-xs);\n min-width: var(--sizes-5);\n height: var(--sizes-5);\n margin-left: var(--sizes-sm);\n}\n\n._counterText_q7k9b_23 {\n line-height: 1;\n}\n\nbutton[role=tab]._viewButton_q7k9b_27 {\n box-sizing: border-box;\n border-radius: var(--sizes-xs);\n border: none;\n padding: 0;\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 {\n background-color: var(--colour-palette-lightest);\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 > svg {\n color: var(--colour-palette-dark);\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 > span {\n color: var(--custom-text-colour, var(--colour-palette-dark));\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 ._counterContainer_q7k9b_14 {\n background-color: var(--colour-palette-dark);\n /* Force all text elements to be white when active, used when using slot */\n /* Force all SVG icons to be white when active, used when using slot */\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 ._counterContainer_q7k9b_14 ._counterText_q7k9b_23 {\n color: var(--colors-neutral-grey-lightest);\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 ._counterContainer_q7k9b_14 span {\n color: var(--colors-neutral-grey-lightest) !important;\n}\nbutton[role=tab]._viewButton_q7k9b_27._active_q7k9b_33 ._contour_q7k9b_1 ._counterContainer_q7k9b_14 svg {\n fill: var(--colors-neutral-grey-lightest);\n color: var(--colors-neutral-grey-lightest);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 {\n background-color: var(--colors-neutral-grey-base);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 {\n background-color: var(--colors-neutral-grey-base);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 ._counterText_q7k9b_23, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 ._counterText_q7k9b_23, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 ._counterText_q7k9b_23, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 ._counterText_q7k9b_23 {\n color: var(--colors-neutral-ink-base);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 span, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 span, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 span, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 span {\n color: var(--colors-neutral-ink-base);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 svg, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 svg, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 ._counterContainer_q7k9b_14 svg, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 ._counterContainer_q7k9b_14 svg {\n fill: var(--colors-neutral-ink-base);\n color: var(--colors-neutral-ink-base);\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 span, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 span, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 span, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 span {\n color: var(--custom-text-colour, var(--colors-neutral-ink-dark));\n}\nbutton[role=tab]._viewButton_q7k9b_27:hover ._contour_q7k9b_1 svg, button[role=tab]._viewButton_q7k9b_27:focus-visible ._contour_q7k9b_1 svg, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:hover ._contour_q7k9b_1 svg, button[role=tab]._viewButton_q7k9b_27._active_q7k9b_33:focus-visible ._contour_q7k9b_1 svg {\n color: var(--colors-neutral-ink-dark);\n}\n\n._iconWrapper_q7k9b_80 {\n margin-right: var(--sizes-sm);\n}\n._iconWrapper_q7k9b_80 svg {\n height: var(--sizes-base);\n width: var(--sizes-base);\n}\n\n._iconStyling_q7k9b_88 {\n margin-left: var(--sizes-xs);\n padding: var(--sizes-xs);\n height: var(--sizes-base);\n width: var(--sizes-base);\n}");
4
+ var styles = {"contour":"_contour_q7k9b_1","counterContainer":"_counterContainer_q7k9b_14","counterText":"_counterText_q7k9b_23","viewButton":"_viewButton_q7k9b_27","active":"_active_q7k9b_33","iconWrapper":"_iconWrapper_q7k9b_80","iconStyling":"_iconStyling_q7k9b_88"};
5
+
6
+ export { styles as default };
7
+ //# sourceMappingURL=ViewTab.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ViewTab.module.scss.js","sources":["../../../src/components/ViewTab/ViewTab.module.scss"],"sourcesContent":[".contour {\n position: relative;\n height: var(--sizes-10);\n border-radius: var(--sizes-xs);\n padding: var(--sizes-sm);\n border: var(--sizes-line) solid transparent;\n cursor: pointer;\n background-color: transparent;\n\n & > span {\n color: var(--custom-text-colour, var(--colors-neutral-ink-dark));\n }\n}\n\n.counterContainer {\n display: inline-flex;\n border-radius: var(--sizes-xs);\n padding: 2px var(--sizes-xs);\n min-width: var(--sizes-5);\n height: var(--sizes-5);\n margin-left: var(--sizes-sm);\n}\n\n.counterText {\n line-height: 1;\n}\n\n// important is needed to override button styles\nbutton[role='tab'].viewButton {\n box-sizing: border-box;\n border-radius: var(--sizes-xs);\n border: none;\n padding: 0;\n\n &.active {\n .contour {\n background-color: var(--colour-palette-lightest);\n\n & > svg {\n color: var(--colour-palette-dark);\n }\n\n > span {\n color: var(--custom-text-colour, var(--colour-palette-dark));\n }\n\n .counterContainer {\n background-color: var(--colour-palette-dark);\n\n .counterText {\n color: var(--colors-neutral-grey-lightest);\n }\n\n /* Force all text elements to be white when active, used when using slot */\n & span {\n color: var(--colors-neutral-grey-lightest) !important;\n }\n\n /* Force all SVG icons to be white when active, used when using slot */\n & svg {\n fill: var(--colors-neutral-grey-lightest);\n color: var(--colors-neutral-grey-lightest);\n }\n }\n }\n }\n\n &:hover,\n &:focus-visible,\n &.active:hover,\n &.active:focus-visible {\n .contour {\n background-color: var(--colors-neutral-grey-base);\n .counterContainer {\n background-color: var(--colors-neutral-grey-base);\n .counterText {\n color: var(--colors-neutral-ink-base);\n }\n & span {\n color: var(--colors-neutral-ink-base);\n }\n & svg {\n fill: var(--colors-neutral-ink-base);\n color: var(--colors-neutral-ink-base);\n }\n }\n\n & span {\n color: var(--custom-text-colour, var(--colors-neutral-ink-dark));\n }\n & svg {\n color: var(--colors-neutral-ink-dark);\n }\n }\n }\n}\n\n.iconWrapper {\n margin-right: var(--sizes-sm);\n\n svg {\n height: var(--sizes-base);\n width: var(--sizes-base);\n }\n}\n\n.iconStyling {\n margin-left: var(--sizes-xs);\n padding: var(--sizes-xs);\n height: var(--sizes-base);\n width: var(--sizes-base);\n}\n"],"names":["___$insertStyle"],"mappings":";;AACEA,WAAA,CAAA,i2KAAA;AACA,aAAA,CAAA,SAAA,CAAA,kBAAA,CAAA,kBAAA,CAAA,4BAAA,CAAA,aAAA,CAAA,uBAAA,CAAA,YAAA,CAAA,sBAAA,CAAA,QAAA,CAAA,kBAAA,CAAA,aAAA,CAAA,uBAAA,CAAA,aAAA,CAAA,uBAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veeqo/ui",
3
- "version": "13.1.0",
3
+ "version": "13.2.1",
4
4
  "description": "New optimised component library for Veeqo.",
5
5
  "author": "Robert Wealthall",
6
6
  "license": "ISC",
@@ -1,133 +0,0 @@
1
- 'use strict';
2
-
3
- var styled = require('styled-components');
4
- var colors = require('../../theme/modules/colors.cjs');
5
- var Text = require('../Text/Text.cjs');
6
- var BaseContainer = require('../BaseContainer/BaseContainer.cjs');
7
- var sizes = require('../../theme/modules/sizes.cjs');
8
- require('react');
9
- var CrossIcon = require('../../icons/design-system/components/CrossIcon.cjs');
10
- var ThreeDotsIcon = require('../../icons/custom/components/ThreeDotsIcon.cjs');
11
- var styled$1 = require('../Button/components/styled.cjs');
12
- var index = require('../../theme/index.cjs');
13
-
14
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
15
-
16
- var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
17
-
18
- const CounterText = styled__default.default(Text.Text).withConfig({ displayName: "vui--CounterText", componentId: "vui--13z4q4k" }) `line-height:1;`;
19
- const ThreeDotsIconStyling = styled__default.default(ThreeDotsIcon.ThreeDotsIcon).withConfig({ displayName: "vui--ThreeDotsIconStyling", componentId: "vui--lo8tpb" }) ``;
20
- const CrossIconStyling = styled__default.default(CrossIcon.ReactComponent).withConfig({ displayName: "vui--CrossIconStyling", componentId: "vui--u5oj4b" }) ``;
21
- const CounterContainer = styled__default.default.div.withConfig({ displayName: "vui--CounterContainer", componentId: "vui--1nbpnol" }) `display:inline-flex;flex-direction:row;justify-content:center;align-items:center;border-radius:4px;padding:2px 4px;min-width:20px;height:20px;margin-left:8px;${({ active, colourPalette }) => active &&
22
- `
23
- background-color: ${colourPalette.dark};
24
-
25
- & ${CounterText} {
26
- color: ${colors.colors.neutral.grey.lightest};
27
- }
28
-
29
- /* Force all text elements to be white when active, used when using slot */
30
- & ${Text.Text} {
31
- color: ${colors.colors.neutral.grey.lightest} !important;
32
- }
33
-
34
- /* Force all SVG icons to be white when active, used when using slot */
35
- & svg {
36
- fill: ${colors.colors.neutral.grey.lightest};
37
- color: ${colors.colors.neutral.grey.lightest};
38
- }
39
- `}`;
40
- const Contour = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Contour", componentId: "vui--1fc3r48" }) `position:relative;display:flex;flex-direction:row;align-items:center;height:40px;border-radius:4px;padding:${index.theme.sizes.sm};border:1px solid transparent;cursor:pointer;background-color:transparent;${({ customTextColour }) => `
41
-
42
- &:hover {
43
- background-color: ${colors.colors.neutral.grey.base};
44
- & > ${CounterContainer} {
45
- background-color: ${colors.colors.neutral.grey.base};
46
- & > ${CounterText} {
47
- color: ${colors.colors.neutral.ink.base};
48
- }
49
- & ${Text.Text} {
50
- color: ${colors.colors.neutral.ink.base} !important;
51
- }
52
- & svg {
53
- fill: ${colors.colors.neutral.ink.base};
54
- color: ${colors.colors.neutral.ink.base};
55
- }
56
- }
57
- & > ${Text.Text} {
58
- color: ${customTextColour !== null && customTextColour !== undefined ? customTextColour : colors.colors.neutral.ink.dark};
59
- }
60
- & > ${ThreeDotsIconStyling} {
61
- color: ${colors.colors.neutral.ink.dark};
62
- }
63
- & > ${CrossIconStyling} {
64
- color: ${colors.colors.neutral.ink.dark};
65
- }
66
- }
67
-
68
- & > ${Text.Text} {
69
- color: ${customTextColour !== null && customTextColour !== undefined ? customTextColour : colors.colors.neutral.ink.dark};
70
- }
71
- `} ${({ active, colourPalette, customTextColour }) => active &&
72
- `
73
- background-color: ${colourPalette.lightest};
74
-
75
- & > ${ThreeDotsIconStyling} {
76
- color: ${colourPalette.dark};
77
- }
78
- & > ${CrossIconStyling} {
79
- color: ${colourPalette.dark};
80
- }
81
-
82
- & > ${Text.Text} {
83
- color: ${customTextColour !== null && customTextColour !== undefined ? customTextColour : colourPalette.dark};
84
- }
85
- `}`;
86
- const ViewButton = styled__default.default(styled$1.FlatButton).withConfig({ displayName: "vui--ViewButton", componentId: "vui--i4ro1b" }) `padding:${index.theme.sizes.sm};box-sizing:border-box;border-radius:4px;border:none;position:relative;margin:0;padding:0;${({ customTextColour }) => `
87
- &:focus-visible {
88
- ${Contour} {
89
- background-color: ${colors.colors.neutral.grey.base};
90
- & > ${CounterContainer} {
91
- background-color: ${colors.colors.neutral.grey.base};
92
- & > ${CounterText} {
93
- color: ${colors.colors.neutral.ink.base};
94
- }
95
- & ${Text.Text} {
96
- color: ${colors.colors.neutral.ink.base} !important;
97
- }
98
- & svg {
99
- fill: ${colors.colors.neutral.ink.base};
100
- color: ${colors.colors.neutral.ink.base};
101
- }
102
- }
103
- & > ${Text.Text} {
104
- color: ${customTextColour !== null && customTextColour !== undefined ? customTextColour : colors.colors.neutral.ink.dark};
105
- }
106
- & > ${ThreeDotsIconStyling} {
107
- color: ${colors.colors.neutral.ink.dark};
108
- }
109
- & > ${CrossIconStyling} {
110
- color: ${colors.colors.neutral.ink.dark};
111
- }
112
- }
113
- `}`;
114
- const IconStyling = {
115
- style: {
116
- marginLeft: sizes.sizes.xs,
117
- padding: sizes.sizes.xs,
118
- height: sizes.sizes.base,
119
- width: sizes.sizes.base,
120
- },
121
- };
122
- const CustomIconWrapper = styled__default.default.div.withConfig({ displayName: "vui--CustomIconWrapper", componentId: "vui--1cuc9yu" }) `display:flex;align-items:center;margin-right:${sizes.sizes.sm};svg{height:${sizes.sizes.base};width:${sizes.sizes.base};}`;
123
-
124
- exports.Text = Text.Text;
125
- exports.Contour = Contour;
126
- exports.CounterContainer = CounterContainer;
127
- exports.CounterText = CounterText;
128
- exports.CrossIconStyling = CrossIconStyling;
129
- exports.CustomIconWrapper = CustomIconWrapper;
130
- exports.IconStyling = IconStyling;
131
- exports.ThreeDotsIconStyling = ThreeDotsIconStyling;
132
- exports.ViewButton = ViewButton;
133
- //# sourceMappingURL=styled.cjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styled.cjs","sources":["../../../src/components/ViewTab/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { CSSProperties } from 'react';\nimport { ColourPalette, colors } from '../../theme/modules/colors';\n\nimport { Text } from '../Text';\nimport { BaseContainer } from '../BaseContainer';\n\nimport { ViewTabProps } from './types';\nimport { sizes } from '../../theme/modules/sizes';\nimport { ThreeDotsIcon, CrossIcon } from '../../icons';\nimport { FlatButton } from '../Button/components/styled';\nimport { theme } from '../../theme';\n\ntype RequiredPalette = { colourPalette: ColourPalette };\nexport type ContourProps = Pick<ViewTabProps, 'active' | 'customTextColour'> & RequiredPalette;\nexport type CounterProps = Pick<ViewTabProps, 'active' | 'customTextColour'> & RequiredPalette;\nexport type ViewButtonProps = Pick<ViewTabProps, 'customTextColour'>;\n\nconst CounterText = styled(Text)`\n line-height: 1;\n`;\n\nconst ThreeDotsIconStyling = styled(ThreeDotsIcon)``;\nconst CrossIconStyling = styled(CrossIcon)``;\n\nconst CounterContainer = styled.div<CounterProps>`\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n padding: 2px 4px;\n min-width: 20px;\n height: 20px;\n margin-left: 8px;\n\n ${({ active, colourPalette }) =>\n active &&\n `\n background-color: ${colourPalette.dark};\n\n & ${CounterText} {\n color: ${colors.neutral.grey.lightest};\n }\n\n /* Force all text elements to be white when active, used when using slot */\n & ${Text} {\n color: ${colors.neutral.grey.lightest} !important;\n }\n\n /* Force all SVG icons to be white when active, used when using slot */\n & svg {\n fill: ${colors.neutral.grey.lightest};\n color: ${colors.neutral.grey.lightest};\n }\n `}\n`;\n\nconst Contour = styled(BaseContainer)<ContourProps>`\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 40px;\n border-radius: 4px;\n padding: ${theme.sizes.sm};\n border: 1px solid transparent;\n cursor: pointer;\n background-color: transparent;\n\n ${({ customTextColour }) => `\n\n &:hover {\n background-color: ${colors.neutral.grey.base};\n & > ${CounterContainer} {\n background-color: ${colors.neutral.grey.base};\n & > ${CounterText} {\n color: ${colors.neutral.ink.base};\n }\n & ${Text} {\n color: ${colors.neutral.ink.base} !important;\n }\n & svg {\n fill: ${colors.neutral.ink.base};\n color: ${colors.neutral.ink.base};\n }\n }\n & > ${Text} {\n color: ${customTextColour ?? colors.neutral.ink.dark};\n }\n & > ${ThreeDotsIconStyling} {\n color: ${colors.neutral.ink.dark};\n }\n & > ${CrossIconStyling} {\n color: ${colors.neutral.ink.dark};\n }\n }\n\n & > ${Text} {\n color: ${customTextColour ?? colors.neutral.ink.dark};\n }\n `}\n\n ${({ active, colourPalette, customTextColour }) =>\n active &&\n `\n background-color: ${colourPalette.lightest};\n\n & > ${ThreeDotsIconStyling} {\n color: ${colourPalette.dark};\n }\n & > ${CrossIconStyling} {\n color: ${colourPalette.dark};\n }\n\n & > ${Text} {\n color: ${customTextColour ?? colourPalette.dark};\n }\n `}\n`;\n\nconst ViewButton = styled(FlatButton)<ViewButtonProps>`\n padding: ${theme.sizes.sm};\n box-sizing: border-box;\n border-radius: 4px;\n border: none;\n position: relative;\n margin: 0;\n padding: 0;\n\n ${({ customTextColour }) => `\n &:focus-visible {\n ${Contour} {\n background-color: ${colors.neutral.grey.base};\n & > ${CounterContainer} {\n background-color: ${colors.neutral.grey.base};\n & > ${CounterText} {\n color: ${colors.neutral.ink.base};\n }\n & ${Text} {\n color: ${colors.neutral.ink.base} !important;\n }\n & svg {\n fill: ${colors.neutral.ink.base};\n color: ${colors.neutral.ink.base};\n }\n }\n & > ${Text} {\n color: ${customTextColour ?? colors.neutral.ink.dark};\n }\n & > ${ThreeDotsIconStyling} {\n color: ${colors.neutral.ink.dark};\n }\n & > ${CrossIconStyling} {\n color: ${colors.neutral.ink.dark};\n }\n }\n `}\n`;\n\nconst IconStyling = {\n style: {\n marginLeft: sizes.xs,\n padding: sizes.xs,\n height: sizes.base,\n width: sizes.base,\n } as CSSProperties,\n};\n\nexport const CustomIconWrapper = styled.div`\n display: flex;\n align-items: center;\n margin-right: ${sizes.sm};\n\n svg {\n height: ${sizes.base};\n width: ${sizes.base};\n }\n`;\n\nexport {\n ViewButton,\n Contour,\n Text,\n CounterContainer,\n CounterText,\n IconStyling,\n ThreeDotsIconStyling,\n CrossIconStyling,\n};\n"],"names":["styled","Text","ThreeDotsIcon","CrossIcon","colors","BaseContainer","theme","FlatButton","sizes"],"mappings":";;;;;;;;;;;;;;;;;AAmBA,MAAM,WAAW,GAAGA,uBAAM,CAACC,SAAI,CAAC;AAIhC,MAAM,oBAAoB,GAAGD,uBAAM,CAACE,2BAAa,CAAC;AAClD,MAAM,gBAAgB,GAAGF,uBAAM,CAACG,wBAAS,CAAC;AAE1C,MAAM,gBAAgB,GAAGH,uBAAM,CAAC,GAAG,CAW/B,UAAA,CAAA,EAAA,WAAA,EAAA,uBAAA,EAAA,WAAA,EAAA,cAAA,EAAA,CAAA,CAAA,CAAA,8JAAA,EAAA,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,KAC1B,MAAM;AACN,IAAA;AACsB,wBAAA,EAAA,aAAa,CAAC,IAAI,CAAA;;UAElC,WAAW,CAAA;AACJ,eAAA,EAAAI,aAAM,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAA;;;;UAInCH,SAA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AM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA;;YAEhD,oBAAoB,CAAA;AACf,eAAA,EAAAA,aAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA;;YAE5B,gBAAgB,CAAA;AACX,eAAA,EAAAA,aAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA;;;AAGrC,EAAA,CAAA,CAAA;AAGH,MAAM,WAAW,GAAG;AAClB,IAAA,KAAK,EAAE;QACL,UAAU,EAAEI,WAAK,CAAC,EAAE;QACpB,OAAO,EAAEA,WAAK,CAAC,EAAE;QACjB,MAAM,EAAEA,WAAK,CAAC,IAAI;QAClB,KAAK,EAAEA,WAAK,CAAC,IAAI;AACD,KAAA;;MAGP,iBAAiB,GAAGR,uBAAM,CAAC,GAAG,oIAGzBQ,WAAK,CAAC,EAAE,CAGZ,YAAA,EAAAA,WAAK,CAAC,IAAI,CAAA,OAAA,EACXA,WAAK,CAAC,IAAI;;;;;;;;;;;;"}
@@ -1,21 +0,0 @@
1
- import { CSSProperties } from 'react';
2
- import { ColourPalette } from '../../theme/modules/colors';
3
- import { Text } from '../Text';
4
- import { ViewTabProps } from './types';
5
- type RequiredPalette = {
6
- colourPalette: ColourPalette;
7
- };
8
- export type ContourProps = Pick<ViewTabProps, 'active' | 'customTextColour'> & RequiredPalette;
9
- export type CounterProps = Pick<ViewTabProps, 'active' | 'customTextColour'> & RequiredPalette;
10
- export type ViewButtonProps = Pick<ViewTabProps, 'customTextColour'>;
11
- declare const CounterText: import("styled-components").StyledComponent<"span", any, {} & import("../Text/types").TextProps, never>;
12
- declare const ThreeDotsIconStyling: import("styled-components").StyledComponent<(props: import("../../icons/types").IconComponentProps) => import("react").JSX.Element, any, {}, never>;
13
- declare const CrossIconStyling: import("styled-components").StyledComponent<(props: import("react").SVGProps<SVGSVGElement>) => import("react").JSX.Element, any, {}, never>;
14
- declare const CounterContainer: import("styled-components").StyledComponent<"div", any, Pick<ViewTabProps, "active" | "customTextColour"> & RequiredPalette, never>;
15
- declare const Contour: import("styled-components").StyledComponent<"div", any, Pick<ViewTabProps, "active" | "customTextColour"> & RequiredPalette, never>;
16
- declare const ViewButton: import("styled-components").StyledComponent<any, any, object & ViewButtonProps, string | number | symbol>;
17
- declare const IconStyling: {
18
- style: CSSProperties;
19
- };
20
- export declare const CustomIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
21
- export { ViewButton, Contour, Text, CounterContainer, CounterText, IconStyling, ThreeDotsIconStyling, CrossIconStyling, };
@@ -1,119 +0,0 @@
1
- import styled from 'styled-components';
2
- import { colors } from '../../theme/modules/colors.js';
3
- import { Text } from '../Text/Text.js';
4
- import { BaseContainer } from '../BaseContainer/BaseContainer.js';
5
- import { sizes } from '../../theme/modules/sizes.js';
6
- import 'react';
7
- import { ReactComponent as CrossIcon } from '../../icons/design-system/components/CrossIcon.js';
8
- import { ThreeDotsIcon } from '../../icons/custom/components/ThreeDotsIcon.js';
9
- import { FlatButton } from '../Button/components/styled.js';
10
- import { theme } from '../../theme/index.js';
11
-
12
- const CounterText = styled(Text).withConfig({ displayName: "vui--CounterText", componentId: "vui--13z4q4k" }) `line-height:1;`;
13
- const ThreeDotsIconStyling = styled(ThreeDotsIcon).withConfig({ displayName: "vui--ThreeDotsIconStyling", componentId: "vui--lo8tpb" }) ``;
14
- const CrossIconStyling = styled(CrossIcon).withConfig({ displayName: "vui--CrossIconStyling", componentId: "vui--u5oj4b" }) ``;
15
- const CounterContainer = styled.div.withConfig({ displayName: "vui--CounterContainer", componentId: "vui--1nbpnol" }) `display:inline-flex;flex-direction:row;justify-content:center;align-items:center;border-radius:4px;padding:2px 4px;min-width:20px;height:20px;margin-left:8px;${({ active, colourPalette }) => active &&
16
- `
17
- background-color: ${colourPalette.dark};
18
-
19
- & ${CounterText} {
20
- color: ${colors.neutral.grey.lightest};
21
- }
22
-
23
- /* Force all text elements to be white when active, used when using slot */
24
- & ${Text} {
25
- color: ${colors.neutral.grey.lightest} !important;
26
- }
27
-
28
- /* Force all SVG icons to be white when active, used when using slot */
29
- & svg {
30
- fill: ${colors.neutral.grey.lightest};
31
- color: ${colors.neutral.grey.lightest};
32
- }
33
- `}`;
34
- const Contour = styled(BaseContainer).withConfig({ displayName: "vui--Contour", componentId: "vui--1fc3r48" }) `position:relative;display:flex;flex-direction:row;align-items:center;height:40px;border-radius:4px;padding:${theme.sizes.sm};border:1px solid transparent;cursor:pointer;background-color:transparent;${({ customTextColour }) => `
35
-
36
- &:hover {
37
- background-color: ${colors.neutral.grey.base};
38
- & > ${CounterContainer} {
39
- background-color: ${colors.neutral.grey.base};
40
- & > ${CounterText} {
41
- color: ${colors.neutral.ink.base};
42
- }
43
- & ${Text} {
44
- color: ${colors.neutral.ink.base} !important;
45
- }
46
- & svg {
47
- fill: ${colors.neutral.ink.base};
48
- color: ${colors.neutral.ink.base};
49
- }
50
- }
51
- & > ${Text} {
52
- color: ${customTextColour !== null && customTextColour !== undefined ? customTextColour : colors.neutral.ink.dark};
53
- }
54
- & > ${ThreeDotsIconStyling} {
55
- color: ${colors.neutral.ink.dark};
56
- }
57
- & > ${CrossIconStyling} {
58
- color: ${colors.neutral.ink.dark};
59
- }
60
- }
61
-
62
- & > ${Text} {
63
- color: ${customTextColour !== null && customTextColour !== undefined ? customTextColour : colors.neutral.ink.dark};
64
- }
65
- `} ${({ active, colourPalette, customTextColour }) => active &&
66
- `
67
- background-color: ${colourPalette.lightest};
68
-
69
- & > ${ThreeDotsIconStyling} {
70
- color: ${colourPalette.dark};
71
- }
72
- & > ${CrossIconStyling} {
73
- color: ${colourPalette.dark};
74
- }
75
-
76
- & > ${Text} {
77
- color: ${customTextColour !== null && customTextColour !== undefined ? customTextColour : colourPalette.dark};
78
- }
79
- `}`;
80
- const ViewButton = styled(FlatButton).withConfig({ displayName: "vui--ViewButton", componentId: "vui--i4ro1b" }) `padding:${theme.sizes.sm};box-sizing:border-box;border-radius:4px;border:none;position:relative;margin:0;padding:0;${({ customTextColour }) => `
81
- &:focus-visible {
82
- ${Contour} {
83
- background-color: ${colors.neutral.grey.base};
84
- & > ${CounterContainer} {
85
- background-color: ${colors.neutral.grey.base};
86
- & > ${CounterText} {
87
- color: ${colors.neutral.ink.base};
88
- }
89
- & ${Text} {
90
- color: ${colors.neutral.ink.base} !important;
91
- }
92
- & svg {
93
- fill: ${colors.neutral.ink.base};
94
- color: ${colors.neutral.ink.base};
95
- }
96
- }
97
- & > ${Text} {
98
- color: ${customTextColour !== null && customTextColour !== undefined ? customTextColour : colors.neutral.ink.dark};
99
- }
100
- & > ${ThreeDotsIconStyling} {
101
- color: ${colors.neutral.ink.dark};
102
- }
103
- & > ${CrossIconStyling} {
104
- color: ${colors.neutral.ink.dark};
105
- }
106
- }
107
- `}`;
108
- const IconStyling = {
109
- style: {
110
- marginLeft: sizes.xs,
111
- padding: sizes.xs,
112
- height: sizes.base,
113
- width: sizes.base,
114
- },
115
- };
116
- const CustomIconWrapper = styled.div.withConfig({ displayName: "vui--CustomIconWrapper", componentId: "vui--1cuc9yu" }) `display:flex;align-items:center;margin-right:${sizes.sm};svg{height:${sizes.base};width:${sizes.base};}`;
117
-
118
- export { Contour, CounterContainer, CounterText, CrossIconStyling, CustomIconWrapper, IconStyling, Text, ThreeDotsIconStyling, ViewButton };
119
- //# sourceMappingURL=styled.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"styled.js","sources":["../../../src/components/ViewTab/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { CSSProperties } from 'react';\nimport { ColourPalette, colors } from '../../theme/modules/colors';\n\nimport { Text } from '../Text';\nimport { BaseContainer } from '../BaseContainer';\n\nimport { ViewTabProps } from './types';\nimport { sizes } from '../../theme/modules/sizes';\nimport { ThreeDotsIcon, CrossIcon } from '../../icons';\nimport { FlatButton } from '../Button/components/styled';\nimport { theme } from '../../theme';\n\ntype RequiredPalette = { colourPalette: ColourPalette };\nexport type ContourProps = Pick<ViewTabProps, 'active' | 'customTextColour'> & RequiredPalette;\nexport type CounterProps = Pick<ViewTabProps, 'active' | 'customTextColour'> & RequiredPalette;\nexport type ViewButtonProps = Pick<ViewTabProps, 'customTextColour'>;\n\nconst CounterText = styled(Text)`\n line-height: 1;\n`;\n\nconst ThreeDotsIconStyling = styled(ThreeDotsIcon)``;\nconst CrossIconStyling = styled(CrossIcon)``;\n\nconst CounterContainer = styled.div<CounterProps>`\n display: inline-flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n border-radius: 4px;\n padding: 2px 4px;\n min-width: 20px;\n height: 20px;\n margin-left: 8px;\n\n ${({ active, colourPalette }) =>\n active &&\n `\n background-color: ${colourPalette.dark};\n\n & ${CounterText} {\n color: ${colors.neutral.grey.lightest};\n }\n\n /* Force all text elements to be white when active, used when using slot */\n & ${Text} {\n color: ${colors.neutral.grey.lightest} !important;\n }\n\n /* Force all SVG icons to be white when active, used when using slot */\n & svg {\n fill: ${colors.neutral.grey.lightest};\n color: ${colors.neutral.grey.lightest};\n }\n `}\n`;\n\nconst Contour = styled(BaseContainer)<ContourProps>`\n position: relative;\n display: flex;\n flex-direction: row;\n align-items: center;\n height: 40px;\n border-radius: 4px;\n padding: ${theme.sizes.sm};\n border: 1px solid transparent;\n cursor: pointer;\n background-color: transparent;\n\n ${({ customTextColour }) => `\n\n &:hover {\n background-color: ${colors.neutral.grey.base};\n & > ${CounterContainer} {\n background-color: ${colors.neutral.grey.base};\n & > ${CounterText} {\n color: ${colors.neutral.ink.base};\n }\n & ${Text} {\n color: ${colors.neutral.ink.base} !important;\n }\n & svg {\n fill: ${colors.neutral.ink.base};\n color: ${colors.neutral.ink.base};\n }\n }\n & > ${Text} {\n color: ${customTextColour ?? colors.neutral.ink.dark};\n }\n & > ${ThreeDotsIconStyling} {\n color: ${colors.neutral.ink.dark};\n }\n & > ${CrossIconStyling} {\n color: ${colors.neutral.ink.dark};\n }\n }\n\n & > ${Text} {\n color: ${customTextColour ?? colors.neutral.ink.dark};\n }\n `}\n\n ${({ active, colourPalette, customTextColour }) =>\n active &&\n `\n background-color: ${colourPalette.lightest};\n\n & > ${ThreeDotsIconStyling} {\n color: ${colourPalette.dark};\n }\n & > ${CrossIconStyling} {\n color: ${colourPalette.dark};\n }\n\n & > ${Text} {\n color: ${customTextColour ?? colourPalette.dark};\n }\n `}\n`;\n\nconst ViewButton = styled(FlatButton)<ViewButtonProps>`\n padding: ${theme.sizes.sm};\n box-sizing: border-box;\n border-radius: 4px;\n border: none;\n position: relative;\n margin: 0;\n padding: 0;\n\n ${({ customTextColour }) => `\n &:focus-visible {\n ${Contour} {\n background-color: ${colors.neutral.grey.base};\n & > ${CounterContainer} {\n background-color: ${colors.neutral.grey.base};\n & > ${CounterText} {\n color: ${colors.neutral.ink.base};\n }\n & ${Text} {\n color: ${colors.neutral.ink.base} !important;\n }\n & svg {\n fill: ${colors.neutral.ink.base};\n color: ${colors.neutral.ink.base};\n }\n }\n & > ${Text} {\n color: ${customTextColour ?? colors.neutral.ink.dark};\n }\n & > ${ThreeDotsIconStyling} {\n color: ${colors.neutral.ink.dark};\n }\n & > ${CrossIconStyling} {\n color: ${colors.neutral.ink.dark};\n }\n }\n `}\n`;\n\nconst IconStyling = {\n style: {\n marginLeft: sizes.xs,\n padding: sizes.xs,\n height: sizes.base,\n width: sizes.base,\n } as CSSProperties,\n};\n\nexport const CustomIconWrapper = styled.div`\n display: flex;\n align-items: center;\n margin-right: ${sizes.sm};\n\n svg {\n height: ${sizes.base};\n width: ${sizes.base};\n }\n`;\n\nexport {\n ViewButton,\n Contour,\n Text,\n CounterContainer,\n CounterText,\n IconStyling,\n ThreeDotsIconStyling,\n CrossIconStyling,\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAmBA,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC;AAIhC,MAAM,oBAAoB,GAAG,MAAM,CAAC,aAAa,CAAC;AAClD,MAAM,gBAAgB,GAAG,MAAM,CAAC,SAAS,CAAC;AAE1C,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAW/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