@veeqo/ui 14.1.0 → 14.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (75) hide show
  1. package/dist/components/Accordion/styled.d.ts +5 -1
  2. package/dist/components/Action/Action.cjs +19 -10
  3. package/dist/components/Action/Action.cjs.map +1 -1
  4. package/dist/components/Action/Action.d.ts +66 -19
  5. package/dist/components/Action/Action.js +19 -11
  6. package/dist/components/Action/Action.js.map +1 -1
  7. package/dist/components/Action/styles/button.module.scss.cjs +2 -2
  8. package/dist/components/Action/styles/button.module.scss.cjs.map +1 -1
  9. package/dist/components/Action/styles/button.module.scss.js +2 -2
  10. package/dist/components/Action/styles/button.module.scss.js.map +1 -1
  11. package/dist/components/Action/styles/link.module.scss.cjs +2 -2
  12. package/dist/components/Action/styles/link.module.scss.cjs.map +1 -1
  13. package/dist/components/Action/styles/link.module.scss.js +2 -2
  14. package/dist/components/Action/styles/link.module.scss.js.map +1 -1
  15. package/dist/components/Action/types.d.ts +17 -1
  16. package/dist/components/Action/utils.cjs +4 -2
  17. package/dist/components/Action/utils.cjs.map +1 -1
  18. package/dist/components/Action/utils.d.ts +3 -2
  19. package/dist/components/Action/utils.js +4 -2
  20. package/dist/components/Action/utils.js.map +1 -1
  21. package/dist/components/Anchor/Anchor.module.scss.cjs +2 -2
  22. package/dist/components/Anchor/Anchor.module.scss.cjs.map +1 -1
  23. package/dist/components/Anchor/Anchor.module.scss.js +2 -2
  24. package/dist/components/Anchor/Anchor.module.scss.js.map +1 -1
  25. package/dist/components/Banner/styled.d.ts +5 -1
  26. package/dist/components/DimensionsInput/DimensionsInput.d.ts +22 -22
  27. package/dist/components/FilterTag/styled.d.ts +5 -1
  28. package/dist/components/LegacyDataTable/SpecificState/styled.d.ts +11 -2
  29. package/dist/components/Pagination/styled.d.ts +22 -22
  30. package/dist/components/PhoneInput/index.d.ts +22 -22
  31. package/dist/components/Search/Search.d.ts +22 -22
  32. package/dist/components/Search/styled.d.ts +22 -22
  33. package/dist/components/Stack/Stack.cjs +2 -4
  34. package/dist/components/Stack/Stack.cjs.map +1 -1
  35. package/dist/components/Stack/Stack.js +2 -4
  36. package/dist/components/Stack/Stack.js.map +1 -1
  37. package/dist/components/Text/Text.cjs +27 -27
  38. package/dist/components/Text/Text.cjs.map +1 -1
  39. package/dist/components/Text/Text.d.ts +11 -2
  40. package/dist/components/Text/Text.js +25 -25
  41. package/dist/components/Text/Text.js.map +1 -1
  42. package/dist/components/Text/Text.module.scss.cjs +9 -0
  43. package/dist/components/Text/Text.module.scss.cjs.map +1 -0
  44. package/dist/components/Text/Text.module.scss.js +7 -0
  45. package/dist/components/Text/Text.module.scss.js.map +1 -0
  46. package/dist/components/Text/index.d.ts +1 -0
  47. package/dist/components/Text/textVariants.cjs +14 -0
  48. package/dist/components/Text/textVariants.cjs.map +1 -0
  49. package/dist/components/Text/textVariants.js +12 -0
  50. package/dist/components/Text/textVariants.js.map +1 -0
  51. package/dist/components/Text/types.d.ts +7 -8
  52. package/dist/components/Text/utils.cjs +2 -2
  53. package/dist/components/Text/utils.cjs.map +1 -1
  54. package/dist/components/Text/utils.d.ts +3 -2
  55. package/dist/components/Text/utils.js +2 -2
  56. package/dist/components/Text/utils.js.map +1 -1
  57. package/dist/components/TextField/TextField.d.ts +22 -22
  58. package/dist/components/TextField/index.d.ts +22 -22
  59. package/dist/components/ToastsLayout/components/styled.d.ts +6 -1
  60. package/dist/components/View/View.cjs +3 -3
  61. package/dist/components/View/View.cjs.map +1 -1
  62. package/dist/components/View/View.js +3 -3
  63. package/dist/components/View/View.js.map +1 -1
  64. package/dist/components/View/styled.cjs +11 -11
  65. package/dist/components/View/styled.cjs.map +1 -1
  66. package/dist/components/View/styled.d.ts +27 -8
  67. package/dist/components/View/styled.js +11 -11
  68. package/dist/components/View/styled.js.map +1 -1
  69. package/dist/components/ViewTab/ViewTab.d.ts +1 -1
  70. package/dist/components/index.d.ts +1 -0
  71. package/dist/theme/scss/text.module.scss.cjs +9 -0
  72. package/dist/theme/scss/text.module.scss.cjs.map +1 -0
  73. package/dist/theme/scss/text.module.scss.js +7 -0
  74. package/dist/theme/scss/text.module.scss.js.map +1 -0
  75. package/package.json +3 -1
@@ -5,16 +5,18 @@ export declare const TextField: React.ForwardRefExoticComponent<{
5
5
  style?: React.CSSProperties | undefined;
6
6
  title?: string | undefined;
7
7
  pattern?: string | undefined;
8
+ rel?: string | undefined;
8
9
  placeholder?: string | undefined;
9
- name?: string | undefined;
10
+ list?: string | undefined;
11
+ className?: string | undefined;
12
+ children?: React.ReactNode;
10
13
  defaultChecked?: boolean | undefined;
11
14
  defaultValue?: string | number | readonly string[] | undefined;
12
15
  suppressContentEditableWarning?: boolean | undefined;
13
16
  suppressHydrationWarning?: boolean | undefined;
14
17
  accessKey?: string | undefined;
15
18
  autoFocus?: boolean | undefined;
16
- className?: string | undefined;
17
- contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
19
+ contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
18
20
  contextMenu?: string | undefined;
19
21
  dir?: string | undefined;
20
22
  draggable?: (boolean | "true" | "false") | undefined;
@@ -24,7 +26,7 @@ export declare const TextField: React.ForwardRefExoticComponent<{
24
26
  nonce?: string | undefined;
25
27
  spellCheck?: (boolean | "true" | "false") | undefined;
26
28
  tabIndex?: number | undefined;
27
- translate?: "no" | "yes" | undefined;
29
+ translate?: "yes" | "no" | undefined;
28
30
  radioGroup?: string | undefined;
29
31
  role?: React.AriaRole | undefined;
30
32
  about?: string | undefined;
@@ -33,7 +35,6 @@ export declare const TextField: React.ForwardRefExoticComponent<{
33
35
  inlist?: any;
34
36
  prefix?: string | undefined;
35
37
  property?: string | undefined;
36
- rel?: string | undefined;
37
38
  resource?: string | undefined;
38
39
  rev?: string | undefined;
39
40
  typeof?: string | undefined;
@@ -50,27 +51,27 @@ export declare const TextField: React.ForwardRefExoticComponent<{
50
51
  results?: number | undefined;
51
52
  security?: string | undefined;
52
53
  unselectable?: "on" | "off" | undefined;
53
- inputMode?: "text" | "none" | "search" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
54
+ inputMode?: "text" | "none" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
54
55
  is?: string | undefined;
55
56
  'aria-activedescendant'?: string | undefined;
56
57
  'aria-atomic'?: (boolean | "true" | "false") | undefined;
57
- 'aria-autocomplete'?: "none" | "list" | "inline" | "both" | undefined;
58
+ 'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
58
59
  'aria-busy'?: (boolean | "true" | "false") | undefined;
59
60
  'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
60
61
  'aria-colcount'?: number | undefined;
61
62
  'aria-colindex'?: number | undefined;
62
63
  'aria-colspan'?: number | undefined;
63
64
  'aria-controls'?: string | undefined;
64
- 'aria-current'?: boolean | "time" | "step" | "date" | "true" | "false" | "page" | "location" | undefined;
65
+ 'aria-current'?: boolean | "time" | "true" | "false" | "step" | "date" | "page" | "location" | undefined;
65
66
  'aria-describedby'?: string | undefined;
66
67
  'aria-details'?: string | undefined;
67
68
  'aria-disabled'?: (boolean | "true" | "false") | undefined;
68
- 'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
69
+ 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
69
70
  'aria-errormessage'?: string | undefined;
70
71
  'aria-expanded'?: (boolean | "true" | "false") | undefined;
71
72
  'aria-flowto'?: string | undefined;
72
73
  'aria-grabbed'?: (boolean | "true" | "false") | undefined;
73
- 'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined;
74
+ 'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
74
75
  'aria-hidden'?: (boolean | "true" | "false") | undefined;
75
76
  'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
76
77
  'aria-keyshortcuts'?: string | undefined;
@@ -87,7 +88,7 @@ export declare const TextField: React.ForwardRefExoticComponent<{
87
88
  'aria-posinset'?: number | undefined;
88
89
  'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
89
90
  'aria-readonly'?: (boolean | "true" | "false") | undefined;
90
- 'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
91
+ 'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
91
92
  'aria-required'?: (boolean | "true" | "false") | undefined;
92
93
  'aria-roledescription'?: string | undefined;
93
94
  'aria-rowcount'?: number | undefined;
@@ -95,12 +96,11 @@ export declare const TextField: React.ForwardRefExoticComponent<{
95
96
  'aria-rowspan'?: number | undefined;
96
97
  'aria-selected'?: (boolean | "true" | "false") | undefined;
97
98
  'aria-setsize'?: number | undefined;
98
- 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
99
+ 'aria-sort'?: "other" | "none" | "ascending" | "descending" | undefined;
99
100
  'aria-valuemax'?: number | undefined;
100
101
  'aria-valuemin'?: number | undefined;
101
102
  'aria-valuenow'?: number | undefined;
102
103
  'aria-valuetext'?: string | undefined;
103
- children?: React.ReactNode;
104
104
  dangerouslySetInnerHTML?: {
105
105
  __html: string | TrustedHTML;
106
106
  } | undefined;
@@ -263,12 +263,7 @@ export declare const TextField: React.ForwardRefExoticComponent<{
263
263
  onAnimationIterationCapture?: (React.AnimationEventHandler<HTMLInputElement> & React.AnimationEventHandler<HTMLTextAreaElement>) | undefined;
264
264
  onTransitionEnd?: (React.TransitionEventHandler<HTMLInputElement> & React.TransitionEventHandler<HTMLTextAreaElement>) | undefined;
265
265
  onTransitionEndCapture?: (React.TransitionEventHandler<HTMLInputElement> & React.TransitionEventHandler<HTMLTextAreaElement>) | undefined;
266
- height?: string | number | undefined;
267
- max?: string | number | undefined;
268
- min?: string | number | undefined;
269
- width?: string | number | undefined;
270
266
  alt?: string | undefined;
271
- src?: string | undefined;
272
267
  disabled?: boolean | undefined;
273
268
  formAction?: string | undefined;
274
269
  formEncType?: string | undefined;
@@ -280,15 +275,20 @@ export declare const TextField: React.ForwardRefExoticComponent<{
280
275
  capture?: boolean | "user" | "environment" | undefined;
281
276
  checked?: boolean | undefined;
282
277
  enterKeyHint?: "search" | "previous" | "next" | "enter" | "done" | "go" | "send" | undefined;
283
- list?: string | undefined;
278
+ multiple?: boolean | undefined;
279
+ cols?: number | undefined;
280
+ dirName?: string | undefined;
284
281
  maxLength?: number | undefined;
285
282
  minLength?: number | undefined;
286
- multiple?: boolean | undefined;
283
+ src?: string | undefined;
284
+ name?: string | undefined;
285
+ height?: string | number | undefined;
286
+ max?: string | number | undefined;
287
+ min?: string | number | undefined;
288
+ width?: string | number | undefined;
287
289
  readOnly?: boolean | undefined;
288
290
  required?: boolean | undefined;
289
291
  step?: string | number | undefined;
290
- cols?: number | undefined;
291
- dirName?: string | undefined;
292
292
  rows?: number | undefined;
293
293
  wrap?: string | undefined;
294
294
  } & {
@@ -6,16 +6,18 @@ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<{
6
6
  style?: import("react").CSSProperties | undefined;
7
7
  title?: string | undefined;
8
8
  pattern?: string | undefined;
9
+ rel?: string | undefined;
9
10
  placeholder?: string | undefined;
10
- name?: string | undefined;
11
+ list?: string | undefined;
12
+ className?: string | undefined;
13
+ children?: import("react").ReactNode;
11
14
  defaultChecked?: boolean | undefined;
12
15
  defaultValue?: string | number | readonly string[] | undefined;
13
16
  suppressContentEditableWarning?: boolean | undefined;
14
17
  suppressHydrationWarning?: boolean | undefined;
15
18
  accessKey?: string | undefined;
16
19
  autoFocus?: boolean | undefined;
17
- className?: string | undefined;
18
- contentEditable?: "inherit" | (boolean | "true" | "false") | undefined;
20
+ contentEditable?: (boolean | "true" | "false") | "inherit" | undefined;
19
21
  contextMenu?: string | undefined;
20
22
  dir?: string | undefined;
21
23
  draggable?: (boolean | "true" | "false") | undefined;
@@ -25,7 +27,7 @@ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<{
25
27
  nonce?: string | undefined;
26
28
  spellCheck?: (boolean | "true" | "false") | undefined;
27
29
  tabIndex?: number | undefined;
28
- translate?: "no" | "yes" | undefined;
30
+ translate?: "yes" | "no" | undefined;
29
31
  radioGroup?: string | undefined;
30
32
  role?: import("react").AriaRole | undefined;
31
33
  about?: string | undefined;
@@ -34,7 +36,6 @@ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<{
34
36
  inlist?: any;
35
37
  prefix?: string | undefined;
36
38
  property?: string | undefined;
37
- rel?: string | undefined;
38
39
  resource?: string | undefined;
39
40
  rev?: string | undefined;
40
41
  typeof?: string | undefined;
@@ -51,27 +52,27 @@ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<{
51
52
  results?: number | undefined;
52
53
  security?: string | undefined;
53
54
  unselectable?: "on" | "off" | undefined;
54
- inputMode?: "text" | "none" | "search" | "email" | "tel" | "url" | "numeric" | "decimal" | undefined;
55
+ inputMode?: "text" | "none" | "search" | "tel" | "url" | "email" | "numeric" | "decimal" | undefined;
55
56
  is?: string | undefined;
56
57
  'aria-activedescendant'?: string | undefined;
57
58
  'aria-atomic'?: (boolean | "true" | "false") | undefined;
58
- 'aria-autocomplete'?: "none" | "list" | "inline" | "both" | undefined;
59
+ 'aria-autocomplete'?: "list" | "none" | "inline" | "both" | undefined;
59
60
  'aria-busy'?: (boolean | "true" | "false") | undefined;
60
61
  'aria-checked'?: boolean | "true" | "false" | "mixed" | undefined;
61
62
  'aria-colcount'?: number | undefined;
62
63
  'aria-colindex'?: number | undefined;
63
64
  'aria-colspan'?: number | undefined;
64
65
  'aria-controls'?: string | undefined;
65
- 'aria-current'?: boolean | "time" | "step" | "date" | "true" | "false" | "page" | "location" | undefined;
66
+ 'aria-current'?: boolean | "time" | "true" | "false" | "step" | "date" | "page" | "location" | undefined;
66
67
  'aria-describedby'?: string | undefined;
67
68
  'aria-details'?: string | undefined;
68
69
  'aria-disabled'?: (boolean | "true" | "false") | undefined;
69
- 'aria-dropeffect'?: "link" | "none" | "copy" | "execute" | "move" | "popup" | undefined;
70
+ 'aria-dropeffect'?: "link" | "none" | "copy" | "move" | "execute" | "popup" | undefined;
70
71
  'aria-errormessage'?: string | undefined;
71
72
  'aria-expanded'?: (boolean | "true" | "false") | undefined;
72
73
  'aria-flowto'?: string | undefined;
73
74
  'aria-grabbed'?: (boolean | "true" | "false") | undefined;
74
- 'aria-haspopup'?: boolean | "dialog" | "menu" | "grid" | "listbox" | "tree" | "true" | "false" | undefined;
75
+ 'aria-haspopup'?: boolean | "dialog" | "menu" | "true" | "false" | "grid" | "listbox" | "tree" | undefined;
75
76
  'aria-hidden'?: (boolean | "true" | "false") | undefined;
76
77
  'aria-invalid'?: boolean | "true" | "false" | "grammar" | "spelling" | undefined;
77
78
  'aria-keyshortcuts'?: string | undefined;
@@ -88,7 +89,7 @@ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<{
88
89
  'aria-posinset'?: number | undefined;
89
90
  'aria-pressed'?: boolean | "true" | "false" | "mixed" | undefined;
90
91
  'aria-readonly'?: (boolean | "true" | "false") | undefined;
91
- 'aria-relevant'?: "text" | "additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
92
+ 'aria-relevant'?: "text" | "all" | "additions" | "additions removals" | "additions text" | "removals" | "removals additions" | "removals text" | "text additions" | "text removals" | undefined;
92
93
  'aria-required'?: (boolean | "true" | "false") | undefined;
93
94
  'aria-roledescription'?: string | undefined;
94
95
  'aria-rowcount'?: number | undefined;
@@ -96,12 +97,11 @@ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<{
96
97
  'aria-rowspan'?: number | undefined;
97
98
  'aria-selected'?: (boolean | "true" | "false") | undefined;
98
99
  'aria-setsize'?: number | undefined;
99
- 'aria-sort'?: "none" | "ascending" | "descending" | "other" | undefined;
100
+ 'aria-sort'?: "other" | "none" | "ascending" | "descending" | undefined;
100
101
  'aria-valuemax'?: number | undefined;
101
102
  'aria-valuemin'?: number | undefined;
102
103
  'aria-valuenow'?: number | undefined;
103
104
  'aria-valuetext'?: string | undefined;
104
- children?: import("react").ReactNode;
105
105
  dangerouslySetInnerHTML?: {
106
106
  __html: string | TrustedHTML;
107
107
  } | undefined;
@@ -264,12 +264,7 @@ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<{
264
264
  onAnimationIterationCapture?: (import("react").AnimationEventHandler<HTMLInputElement> & import("react").AnimationEventHandler<HTMLTextAreaElement>) | undefined;
265
265
  onTransitionEnd?: (import("react").TransitionEventHandler<HTMLInputElement> & import("react").TransitionEventHandler<HTMLTextAreaElement>) | undefined;
266
266
  onTransitionEndCapture?: (import("react").TransitionEventHandler<HTMLInputElement> & import("react").TransitionEventHandler<HTMLTextAreaElement>) | undefined;
267
- height?: string | number | undefined;
268
- max?: string | number | undefined;
269
- min?: string | number | undefined;
270
- width?: string | number | undefined;
271
267
  alt?: string | undefined;
272
- src?: string | undefined;
273
268
  disabled?: boolean | undefined;
274
269
  formAction?: string | undefined;
275
270
  formEncType?: string | undefined;
@@ -281,15 +276,20 @@ export declare const TextField: import("react").ForwardRefExoticComponent<Omit<{
281
276
  capture?: boolean | "user" | "environment" | undefined;
282
277
  checked?: boolean | undefined;
283
278
  enterKeyHint?: "search" | "previous" | "next" | "enter" | "done" | "go" | "send" | undefined;
284
- list?: string | undefined;
279
+ multiple?: boolean | undefined;
280
+ cols?: number | undefined;
281
+ dirName?: string | undefined;
285
282
  maxLength?: number | undefined;
286
283
  minLength?: number | undefined;
287
- multiple?: boolean | undefined;
284
+ src?: string | undefined;
285
+ name?: string | undefined;
286
+ height?: string | number | undefined;
287
+ max?: string | number | undefined;
288
+ min?: string | number | undefined;
289
+ width?: string | number | undefined;
288
290
  readOnly?: boolean | undefined;
289
291
  required?: boolean | undefined;
290
292
  step?: string | number | undefined;
291
- cols?: number | undefined;
292
- dirName?: string | undefined;
293
293
  rows?: number | undefined;
294
294
  wrap?: string | undefined;
295
295
  } & {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const ToastsLayoutContainer: import("styled-components").StyledComponent<"div", any, import("../../Stack").StackProps, never>;
2
3
  export declare const Toast: import("styled-components").StyledComponent<"div", any, import("../../Stack").StackProps & {
3
4
  minWidth: number | string;
@@ -7,4 +8,8 @@ export declare const IconWrap: import("styled-components").StyledComponent<"div"
7
8
  color: string;
8
9
  }, never>;
9
10
  export declare const ContentStack: import("styled-components").StyledComponent<"div", any, import("../../Stack").StackProps, never>;
10
- export declare const StyledText: import("styled-components").StyledComponent<"span", any, {} & import("../../Text/types").TextProps, never>;
11
+ export declare const StyledText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
12
+ as?: import("../../Text").ValidTextTag | undefined;
13
+ muted?: boolean | undefined;
14
+ variant?: "body" | "button" | "link" | "headingXXL" | "headingXL" | "headingLarge" | "headingMedium" | "headingSmall" | "headingTable" | "subheadingLarge" | "subheadingMedium" | "subheadingSmall" | "subheadingSmallBold" | "bodySmall" | "bodyBold" | "bodyBoldDark" | "bodySmallBold" | "inputLabel" | "inputLabelSmall" | "hintText" | "placeholder" | "placeholderSmall" | "placeholderCode" | "placeholderCodeSmall" | "error" | "errorSmall" | "successSmall" | "buttonSmall" | "linkLarge" | "linkMedium" | "linkSmall" | undefined;
15
+ } & import("react").HTMLAttributes<HTMLElement> & import("react").LabelHTMLAttributes<HTMLLabelElement> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
@@ -8,9 +8,9 @@ require('uid/secure');
8
8
  require('lodash.throttle');
9
9
  var colors = require('../../theme/modules/colors.cjs');
10
10
  var types = require('./types.cjs');
11
- var styled = require('./styled.cjs');
12
11
  var CrossIcon = require('../../icons/design-system/components/CrossIcon.cjs');
13
12
  var EditIcon = require('../../icons/design-system/components/EditIcon.cjs');
13
+ var styled = require('./styled.cjs');
14
14
  var Text = require('../Text/Text.cjs');
15
15
 
16
16
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
@@ -51,10 +51,10 @@ const View = ({ id, iconSlot, name, type, className, colourPalette = colors.colo
51
51
  const isSaved = type === types.ViewTypes.saved;
52
52
  const fill = active ? colors.colors.neutral.ink.dark : colors.colors.neutral.ink.base;
53
53
  return (React__default.default.createElement(styled.Container, { className: `${buildClassnames.buildClassnames([classNames === null || classNames === void 0 ? void 0 : classNames.container, e2eClassNames === null || e2eClassNames === void 0 ? void 0 : e2eClassNames.container])} ${(active && (e2eClassNames === null || e2eClassNames === void 0 ? void 0 : e2eClassNames.active)) || ''}`, onClick: handleClick },
54
- React__default.default.createElement(styled.Contour, { active: active, onMouseEnter: handleEnter, onMouseLeave: handleLeave, colourPalette: colourPalette, customTextColour: customTextColour },
54
+ React__default.default.createElement(styled.Contour, { "$active": active, onMouseEnter: handleEnter, onMouseLeave: handleLeave, "$colourPalette": colourPalette, "$customTextColour": customTextColour },
55
55
  iconSlot && React__default.default.createElement(styled.CustomIconWrapper, null, iconSlot),
56
56
  React__default.default.createElement(Text.Text, { variant: "bodyBold" }, name),
57
- count && (React__default.default.createElement(styled.CounterContainer, { active: active || isHovered, colourPalette: colourPalette, customTextColour: customTextColour },
57
+ count && (React__default.default.createElement(styled.CounterContainer, { "$active": active || isHovered, "$colourPalette": colourPalette, "$customTextColour": customTextColour },
58
58
  React__default.default.createElement(styled.CounterText, { className: e2eClassNames === null || e2eClassNames === void 0 ? void 0 : e2eClassNames.counter, variant: "subheadingSmall" }, count))),
59
59
  isDraft && (React__default.default.createElement(CrossIcon.ReactComponent, { ...styled.IconStyling, color: fill, className: e2eClassNames === null || e2eClassNames === void 0 ? void 0 : e2eClassNames.delete, onClick: handleDelete })),
60
60
  isSaved && active && (React__default.default.createElement(EditIcon.ReactComponent, { ...styled.IconStyling, color: fill, className: e2eClassNames === null || e2eClassNames === void 0 ? void 0 : e2eClassNames.edit, onClick: handleEdit })))));
@@ -1 +1 @@
1
- {"version":3,"file":"View.cjs","sources":["../../../src/components/View/View.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { useHover } from '../../hooks';\nimport { colors } from '../../theme/modules/colors';\n\nimport { ViewProps, ViewTypes } from './types';\n\nimport {\n Container,\n Contour,\n CounterContainer,\n CounterText,\n CustomIconWrapper,\n IconStyling,\n Text,\n} from './styled';\nimport { buildClassnames } from '../../utils/buildClassnames';\nimport { CrossIcon, EditIcon } from '../../icons';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n options?: 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 options: prefix ? `${prefix}-options` : undefined,\n edit: prefix ? `${prefix}-edit` : undefined,\n container: prefix ? `${prefix}-container` : undefined,\n active: prefix ? `${prefix}-active` : undefined,\n counter: prefix ? `${prefix}-counter` : undefined,\n});\n\n/**\n *\n * @deprecated\n *\n * use ViewTab component instead\n *\n */\nexport const View = ({\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n active = false,\n onClick,\n onDelete,\n onEdit,\n e2eClassName,\n}: ViewProps) => {\n const classNames = generateClassNames(className);\n const e2eClassNames = generateClassNames(e2eClassName);\n const [isHovered, handleEnter, handleLeave] = useHover();\n\n const handleClick = useCallback(() => onClick(id), [id, onClick]);\n const handleDelete = useCallback(\n (event) => {\n event.stopPropagation();\n if (onDelete) onDelete(id);\n },\n [onDelete, id],\n );\n const handleEdit = useCallback(\n (event) => {\n event.stopPropagation();\n if (onEdit) onEdit(id);\n },\n [onEdit, id],\n );\n\n const isDraft = type === ViewTypes.draft;\n const isSaved = type === ViewTypes.saved;\n const fill = active ? colors.neutral.ink.dark : colors.neutral.ink.base;\n\n return (\n <Container\n className={`${buildClassnames([classNames?.container, e2eClassNames?.container])} ${\n (active && e2eClassNames?.active) || ''\n }`}\n onClick={handleClick}\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 {count && (\n <CounterContainer\n active={active || isHovered}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n <CounterText className={e2eClassNames?.counter} variant=\"subheadingSmall\">\n {count}\n </CounterText>\n </CounterContainer>\n )}\n {isDraft && (\n <CrossIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.delete}\n onClick={handleDelete}\n />\n )}\n {isSaved && active && (\n <EditIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.edit}\n onClick={handleEdit}\n />\n )}\n </Contour>\n </Container>\n );\n};\n"],"names":["colors","useHover","useCallback","ViewTypes","React","Container","buildClassnames","Contour","CustomIconWrapper","Text","CounterContainer","CounterText","CrossIcon","IconStyling","EditIcon"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IACxE,MAAM,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,OAAA,CAAS,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,QAAA,CAAU,GAAG,SAAS;IACjD,IAAI,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,KAAA,CAAO,GAAG,SAAS;IAC3C,SAAS,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,UAAA,CAAY,GAAG,SAAS;IACrD,MAAM,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,OAAA,CAAS,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,QAAA,CAAU,GAAG,SAAS;AAClD,CAAA,CAAC;AAEF;;;;;;AAMG;AACI,MAAM,IAAI,GAAG,CAAC,EACnB,EAA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,GAAb,aAAa,CAAE,MAAM,EAChC,OAAO,EAAE,YAAY,EAAA,CACrB,CACH;AACA,YAAA,OAAO,IAAI,MAAM,KAChBT,sBAAA,CAAA,aAAA,CAACU,uBAAQ,EAAA,EAAA,GACHD,kBAAW,EACf,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,IAAI,EAC9B,OAAO,EAAE,UAAU,EAAA,CACnB,CACH,CACO,CACA;AAEhB;;;;"}
1
+ {"version":3,"file":"View.cjs","sources":["../../../src/components/View/View.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { useHover } from '../../hooks';\nimport { colors } from '../../theme/modules/colors';\n\nimport { ViewProps, ViewTypes } from './types';\n\nimport { CrossIcon, EditIcon } from '../../icons';\nimport { buildClassnames } from '../../utils/buildClassnames';\nimport {\n Container,\n Contour,\n CounterContainer,\n CounterText,\n CustomIconWrapper,\n IconStyling,\n Text,\n} from './styled';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n options?: 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 options: prefix ? `${prefix}-options` : undefined,\n edit: prefix ? `${prefix}-edit` : undefined,\n container: prefix ? `${prefix}-container` : undefined,\n active: prefix ? `${prefix}-active` : undefined,\n counter: prefix ? `${prefix}-counter` : undefined,\n});\n\n/**\n *\n * @deprecated\n *\n * use ViewTab component instead\n *\n */\nexport const View = ({\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n active = false,\n onClick,\n onDelete,\n onEdit,\n e2eClassName,\n}: ViewProps) => {\n const classNames = generateClassNames(className);\n const e2eClassNames = generateClassNames(e2eClassName);\n const [isHovered, handleEnter, handleLeave] = useHover();\n\n const handleClick = useCallback(() => onClick(id), [id, onClick]);\n const handleDelete = useCallback(\n (event) => {\n event.stopPropagation();\n if (onDelete) onDelete(id);\n },\n [onDelete, id],\n );\n const handleEdit = useCallback(\n (event) => {\n event.stopPropagation();\n if (onEdit) onEdit(id);\n },\n [onEdit, id],\n );\n\n const isDraft = type === ViewTypes.draft;\n const isSaved = type === ViewTypes.saved;\n const fill = active ? colors.neutral.ink.dark : colors.neutral.ink.base;\n\n return (\n <Container\n className={`${buildClassnames([classNames?.container, e2eClassNames?.container])} ${\n (active && e2eClassNames?.active) || ''\n }`}\n onClick={handleClick}\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 {count && (\n <CounterContainer\n $active={active || isHovered}\n $colourPalette={colourPalette}\n $customTextColour={customTextColour}\n >\n <CounterText className={e2eClassNames?.counter} variant=\"subheadingSmall\">\n {count}\n </CounterText>\n </CounterContainer>\n )}\n {isDraft && (\n <CrossIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.delete}\n onClick={handleDelete}\n />\n )}\n {isSaved && active && (\n <EditIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.edit}\n onClick={handleEdit}\n />\n )}\n </Contour>\n </Container>\n );\n};\n"],"names":["colors","useHover","useCallback","ViewTypes","React","Container","buildClassnames","Contour","CustomIconWrapper","Text","CounterContainer","CounterText","CrossIcon","IconStyling","EditIcon"],"mappings":";;;;;;;;;;;;;;;;;;;AA4BA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IACxE,MAAM,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,OAAA,CAAS,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,QAAA,CAAU,GAAG,SAAS;IACjD,IAAI,EAAE,MAAM,GAAG,C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,aAAA,CAACO,kBAAW,EAAA,EAAC,SAAS,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,OAAO,EAAE,OAAO,EAAC,iBAAiB,IACtE,KAAK,CACM,CACG,CACpB;YACA,OAAO,KACNP,sBAAA,CAAA,aAAA,CAACQ,wBAAS,EAAA,EAAA,GACJC,kBAAW,EACf,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,MAAM,EAChC,OAAO,EAAE,YAAY,EAAA,CACrB,CACH;AACA,YAAA,OAAO,IAAI,MAAM,KAChBT,sBAAA,CAAA,aAAA,CAACU,uBAAQ,EAAA,EAAA,GACHD,kBAAW,EACf,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,IAAI,EAC9B,OAAO,EAAE,UAAU,EAAA,CACnB,CACH,CACO,CACA;AAEhB;;;;"}
@@ -6,9 +6,9 @@ import 'uid/secure';
6
6
  import 'lodash.throttle';
7
7
  import { colors } from '../../theme/modules/colors.js';
8
8
  import { ViewTypes } from './types.js';
9
- import { Container, Contour, CustomIconWrapper, CounterContainer, CounterText, IconStyling } from './styled.js';
10
9
  import { ReactComponent as CrossIcon } from '../../icons/design-system/components/CrossIcon.js';
11
10
  import { ReactComponent as EditIcon } from '../../icons/design-system/components/EditIcon.js';
11
+ import { Container, Contour, CustomIconWrapper, CounterContainer, CounterText, IconStyling } from './styled.js';
12
12
  import { Text } from '../Text/Text.js';
13
13
 
14
14
  const generateClassNames = (prefix) => ({
@@ -45,10 +45,10 @@ const View = ({ id, iconSlot, name, type, className, colourPalette = colors.seco
45
45
  const isSaved = type === ViewTypes.saved;
46
46
  const fill = active ? colors.neutral.ink.dark : colors.neutral.ink.base;
47
47
  return (React__default.createElement(Container, { className: `${buildClassnames([classNames === null || classNames === void 0 ? void 0 : classNames.container, e2eClassNames === null || e2eClassNames === void 0 ? void 0 : e2eClassNames.container])} ${(active && (e2eClassNames === null || e2eClassNames === void 0 ? void 0 : e2eClassNames.active)) || ''}`, onClick: handleClick },
48
- React__default.createElement(Contour, { active: active, onMouseEnter: handleEnter, onMouseLeave: handleLeave, colourPalette: colourPalette, customTextColour: customTextColour },
48
+ React__default.createElement(Contour, { "$active": active, onMouseEnter: handleEnter, onMouseLeave: handleLeave, "$colourPalette": colourPalette, "$customTextColour": customTextColour },
49
49
  iconSlot && React__default.createElement(CustomIconWrapper, null, iconSlot),
50
50
  React__default.createElement(Text, { variant: "bodyBold" }, name),
51
- count && (React__default.createElement(CounterContainer, { active: active || isHovered, colourPalette: colourPalette, customTextColour: customTextColour },
51
+ count && (React__default.createElement(CounterContainer, { "$active": active || isHovered, "$colourPalette": colourPalette, "$customTextColour": customTextColour },
52
52
  React__default.createElement(CounterText, { className: e2eClassNames === null || e2eClassNames === void 0 ? void 0 : e2eClassNames.counter, variant: "subheadingSmall" }, count))),
53
53
  isDraft && (React__default.createElement(CrossIcon, { ...IconStyling, color: fill, className: e2eClassNames === null || e2eClassNames === void 0 ? void 0 : e2eClassNames.delete, onClick: handleDelete })),
54
54
  isSaved && active && (React__default.createElement(EditIcon, { ...IconStyling, color: fill, className: e2eClassNames === null || e2eClassNames === void 0 ? void 0 : e2eClassNames.edit, onClick: handleEdit })))));
@@ -1 +1 @@
1
- {"version":3,"file":"View.js","sources":["../../../src/components/View/View.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { useHover } from '../../hooks';\nimport { colors } from '../../theme/modules/colors';\n\nimport { ViewProps, ViewTypes } from './types';\n\nimport {\n Container,\n Contour,\n CounterContainer,\n CounterText,\n CustomIconWrapper,\n IconStyling,\n Text,\n} from './styled';\nimport { buildClassnames } from '../../utils/buildClassnames';\nimport { CrossIcon, EditIcon } from '../../icons';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n options?: 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 options: prefix ? `${prefix}-options` : undefined,\n edit: prefix ? `${prefix}-edit` : undefined,\n container: prefix ? `${prefix}-container` : undefined,\n active: prefix ? `${prefix}-active` : undefined,\n counter: prefix ? `${prefix}-counter` : undefined,\n});\n\n/**\n *\n * @deprecated\n *\n * use ViewTab component instead\n *\n */\nexport const View = ({\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n active = false,\n onClick,\n onDelete,\n onEdit,\n e2eClassName,\n}: ViewProps) => {\n const classNames = generateClassNames(className);\n const e2eClassNames = generateClassNames(e2eClassName);\n const [isHovered, handleEnter, handleLeave] = useHover();\n\n const handleClick = useCallback(() => onClick(id), [id, onClick]);\n const handleDelete = useCallback(\n (event) => {\n event.stopPropagation();\n if (onDelete) onDelete(id);\n },\n [onDelete, id],\n );\n const handleEdit = useCallback(\n (event) => {\n event.stopPropagation();\n if (onEdit) onEdit(id);\n },\n [onEdit, id],\n );\n\n const isDraft = type === ViewTypes.draft;\n const isSaved = type === ViewTypes.saved;\n const fill = active ? colors.neutral.ink.dark : colors.neutral.ink.base;\n\n return (\n <Container\n className={`${buildClassnames([classNames?.container, e2eClassNames?.container])} ${\n (active && e2eClassNames?.active) || ''\n }`}\n onClick={handleClick}\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 {count && (\n <CounterContainer\n active={active || isHovered}\n colourPalette={colourPalette}\n customTextColour={customTextColour}\n >\n <CounterText className={e2eClassNames?.counter} variant=\"subheadingSmall\">\n {count}\n </CounterText>\n </CounterContainer>\n )}\n {isDraft && (\n <CrossIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.delete}\n onClick={handleDelete}\n />\n )}\n {isSaved && active && (\n <EditIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.edit}\n onClick={handleEdit}\n />\n )}\n </Contour>\n </Container>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IACxE,MAAM,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,OAAA,CAAS,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,QAAA,CAAU,GAAG,SAAS;IACjD,IAAI,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,KAAA,CAAO,GAAG,SAAS;IAC3C,SAAS,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,UAAA,CAAY,GAAG,SAAS;IACrD,MAAM,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,OAAA,CAAS,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,QAAA,CAAU,GAAG,SAAS;AAClD,CAAA,CAAC;AAEF;;;;;;AAMG;AACI,MAAM,IAAI,GAAG,CAAC,EACnB,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,EACrC,gBAAgB,EAChB,KAAK,EACL,MAAM,GAAG,KAAK,EACd,OAAO,EACP,QAAQ,EACR,MAAM,EACN,YAAY,GACF,KAAI;AACd,IAAA,MAAM,UAAU,GAAG,kBAAkB,CAAC,SAAS,CAAC;AAChD,IAAA,MAAM,aAAa,GAAG,kBAAkB,CAAC,YAAY,CAAC;IACtD,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,WAAW,CAAC,GAAG,QAAQ,EAAE;AAExD,IAAA,MAAM,WAAW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Y,EAAE,WAAW,EACzB,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAAA;AAEjC,YAAA,QAAQ,IAAIA,cAAA,CAAA,aAAA,CAAC,iBAAiB,EAAA,IAAA,EAAE,QAAQ,CAAqB;AAC9D,YAAAA,cAAA,CAAA,aAAA,CAAC,IAAI,EAAA,EAAC,OAAO,EAAC,UAAU,EAAA,EAAE,IAAI,CAAQ;AACrC,YAAA,KAAK,KACJA,cAAA,CAAA,aAAA,CAAC,gBAAgB,EAAA,EACf,MAAM,EAAE,MAAM,IAAI,SAAS,EAC3B,aAAa,EAAE,aAAa,EAC5B,gBAAgB,EAAE,gBAAgB,EAAA;AAElC,gBAAAA,cAAA,CAAA,aAAA,CAAC,WAAW,EAAA,EAAC,SAAS,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,OAAO,EAAE,OAAO,EAAC,iBAAiB,IACtE,KAAK,CACM,CACG,CACpB;YACA,OAAO,KACNA,cAAA,CAAA,aAAA,CAAC,SAAS,EAAA,EAAA,GACJ,WAAW,EACf,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,MAAM,EAChC,OAAO,EAAE,YAAY,EAAA,CACrB,CACH;AACA,YAAA,OAAO,IAAI,MAAM,KAChBA,cAAA,CAAA,aAAA,CAAC,QAAQ,EAAA,EAAA,GACH,WAAW,EACf,KAAK,EAAE,IAAI,EACX,SAAS,EAAE,aAAa,KAAA,IAAA,IAAb,aAAa,KAAA,MAAA,GAAA,MAAA,GAAb,aAAa,CAAE,IAAI,EAC9B,OAAO,EAAE,UAAU,EAAA,CACnB,CACH,CACO,CACA;AAEhB;;;;"}
1
+ {"version":3,"file":"View.js","sources":["../../../src/components/View/View.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\n\nimport { useHover } from '../../hooks';\nimport { colors } from '../../theme/modules/colors';\n\nimport { ViewProps, ViewTypes } from './types';\n\nimport { CrossIcon, EditIcon } from '../../icons';\nimport { buildClassnames } from '../../utils/buildClassnames';\nimport {\n Container,\n Contour,\n CounterContainer,\n CounterText,\n CustomIconWrapper,\n IconStyling,\n Text,\n} from './styled';\n\nexport interface ClassNamesReturnPayload {\n delete?: string;\n options?: 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 options: prefix ? `${prefix}-options` : undefined,\n edit: prefix ? `${prefix}-edit` : undefined,\n container: prefix ? `${prefix}-container` : undefined,\n active: prefix ? `${prefix}-active` : undefined,\n counter: prefix ? `${prefix}-counter` : undefined,\n});\n\n/**\n *\n * @deprecated\n *\n * use ViewTab component instead\n *\n */\nexport const View = ({\n id,\n iconSlot,\n name,\n type,\n className,\n colourPalette = colors.secondary.blue,\n customTextColour,\n count,\n active = false,\n onClick,\n onDelete,\n onEdit,\n e2eClassName,\n}: ViewProps) => {\n const classNames = generateClassNames(className);\n const e2eClassNames = generateClassNames(e2eClassName);\n const [isHovered, handleEnter, handleLeave] = useHover();\n\n const handleClick = useCallback(() => onClick(id), [id, onClick]);\n const handleDelete = useCallback(\n (event) => {\n event.stopPropagation();\n if (onDelete) onDelete(id);\n },\n [onDelete, id],\n );\n const handleEdit = useCallback(\n (event) => {\n event.stopPropagation();\n if (onEdit) onEdit(id);\n },\n [onEdit, id],\n );\n\n const isDraft = type === ViewTypes.draft;\n const isSaved = type === ViewTypes.saved;\n const fill = active ? colors.neutral.ink.dark : colors.neutral.ink.base;\n\n return (\n <Container\n className={`${buildClassnames([classNames?.container, e2eClassNames?.container])} ${\n (active && e2eClassNames?.active) || ''\n }`}\n onClick={handleClick}\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 {count && (\n <CounterContainer\n $active={active || isHovered}\n $colourPalette={colourPalette}\n $customTextColour={customTextColour}\n >\n <CounterText className={e2eClassNames?.counter} variant=\"subheadingSmall\">\n {count}\n </CounterText>\n </CounterContainer>\n )}\n {isDraft && (\n <CrossIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.delete}\n onClick={handleDelete}\n />\n )}\n {isSaved && active && (\n <EditIcon\n {...IconStyling}\n color={fill}\n className={e2eClassNames?.edit}\n onClick={handleEdit}\n />\n )}\n </Contour>\n </Container>\n );\n};\n"],"names":["React"],"mappings":";;;;;;;;;;;;;AA4BA,MAAM,kBAAkB,GAAG,CAAC,MAAe,MAA+B;IACxE,MAAM,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,OAAA,CAAS,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,QAAA,CAAU,GAAG,SAAS;IACjD,IAAI,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,KAAA,CAAO,GAAG,SAAS;IAC3C,SAAS,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,UAAA,CAAY,GAAG,SAAS;IACrD,MAAM,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,OAAA,CAAS,GAAG,SAAS;IAC/C,OAAO,EAAE,MAAM,GAAG,CAAA,EAAG,MAAM,CAAA,QAAA,CAAU,GAAG,SAAS;AAClD,CAAA,CAAC;AAEF;;;;;;AAMG;AACI,MAAM,IAAI,GAAG,CAAC,EACnB,EAAE,EACF,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,aAAa,GAAG,MAAM,CAAC,SAAS,CAAC,IAAI,EACrC,gBAAgB,EAChB,KAAK,EACL,MAAM,GAAG,KAAK,EACd,OAAO,EACP,QAAQ,EACR,MAAM,EACN,YAAY,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A,GAAA,MAAA,GAAb,aAAa,CAAE,IAAI,EAC9B,OAAO,EAAE,UAAU,EAAA,CACnB,CACH,CACO,CACA;AAEhB;;;;"}
@@ -2,8 +2,8 @@
2
2
 
3
3
  var styled = require('styled-components');
4
4
  var colors = require('../../theme/modules/colors.cjs');
5
- var Text = require('../Text/Text.cjs');
6
5
  var BaseContainer = require('../BaseContainer/BaseContainer.cjs');
6
+ var Text = require('../Text/Text.cjs');
7
7
  var sizes = require('../../theme/modules/sizes.cjs');
8
8
 
9
9
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
@@ -12,22 +12,22 @@ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
12
12
 
13
13
  const Container = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Container", componentId: "vui--1vyyfhh" }) `padding:14px 24px;`;
14
14
  const CounterText = styled__default.default(Text.Text).withConfig({ displayName: "vui--CounterText", componentId: "vui--ycgtn6" }) `line-height:1;`;
15
- const Contour = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Contour", componentId: "vui--zy3oaf" }) `position:relative;display:flex;flex-direction:row;align-items:center;height:40px;border-radius:4px;padding:0 12px;border:1px solid transparent;cursor:pointer;${({ colourPalette, customTextColour }) => `
15
+ const Contour = styled__default.default(BaseContainer.BaseContainer).withConfig({ displayName: "vui--Contour", componentId: "vui--zy3oaf" }) `position:relative;display:flex;flex-direction:row;align-items:center;height:40px;border-radius:4px;padding:0 12px;border:1px solid transparent;cursor:pointer;${({ $colourPalette, $customTextColour }) => `
16
16
  &:hover {
17
- border: 1px solid ${colourPalette.base};
18
- background-color: ${colourPalette.lightest};
17
+ border: 1px solid ${$colourPalette.base};
18
+ background-color: ${$colourPalette.lightest};
19
19
  }
20
20
 
21
- ${Text.Text} {
22
- color: ${customTextColour !== null && customTextColour !== void 0 ? customTextColour : colors.colors.neutral.ink.dark};
23
- }
24
- `} ${({ active, colourPalette }) => active &&
21
+ span {
22
+ color: ${$customTextColour !== null && $customTextColour !== void 0 ? $customTextColour : colors.colors.neutral.ink.dark};
23
+ }
24
+ `} ${({ $active, $colourPalette }) => $active &&
25
25
  `
26
- background-color: ${colourPalette.lightest};
26
+ background-color: ${$colourPalette.lightest};
27
27
  `}`;
28
- const CounterContainer = styled__default.default(Text.Text).withConfig({ displayName: "vui--CounterContainer", componentId: "vui--chq9kr" }) `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 &&
28
+ const CounterContainer = styled__default.default(Text.Text).withConfig({ displayName: "vui--CounterContainer", componentId: "vui--chq9kr" }) `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 &&
29
29
  `
30
- background-color: ${colourPalette.base};
30
+ background-color: ${$colourPalette.base};
31
31
 
32
32
  & > ${CounterText} {
33
33
  color: #fff;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.cjs","sources":["../../../src/components/View/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 { ViewProps } from './types';\nimport { sizes } from '../../theme/modules/sizes';\n\ntype RequiredPalette = { colourPalette: ColourPalette };\nexport type ContourProps = Pick<ViewProps, 'active' | 'customTextColour'> & RequiredPalette;\nexport type CounterProps = Pick<ViewProps, 'active' | 'customTextColour'> & RequiredPalette;\n\nconst Container = styled(BaseContainer)`\n padding: 14px 24px;\n`;\n\nconst CounterText = styled(Text)`\n line-height: 1;\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: 0 12px;\n border: 1px solid transparent;\n cursor: pointer;\n\n ${({ colourPalette, customTextColour }) => `\n &:hover {\n border: 1px solid ${colourPalette.base};\n background-color: ${colourPalette.lightest};\n }\n\n ${Text} {\n color: ${customTextColour ?? colors.neutral.ink.dark};\n }\n `}\n\n ${({ active, colourPalette }) =>\n active &&\n `\n background-color: ${colourPalette.lightest};\n `}\n`;\n\nconst CounterContainer = styled(Text)<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.base};\n\n & > ${CounterText} {\n color: #fff;\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 { Container, Contour, Text, CounterContainer, CounterText, IconStyling };\n"],"names":["styled","BaseContainer","Text","colors","sizes"],"mappings":";;;;;;;;;;;;AAeA,MAAM,SAAS,GAAGA,uBAAM,CAACC,2BAAa,CAAC;AAIvC,MAAM,WAAW,GAAGD,uBAAM,CAACE,SAAI,CAAC;AAIhC,MAAM,OAAO,GAAGF,uBAAM,CAACC,2BAAa,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,cAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,8JAAA,EAWjC,CAAC,EAAE,aAAa,EAAE,gBAAgB,EAAE,KAAK;;AAEnB,wBAAA,EAAA,aAAa,CAAC,IAAI,CAAA;AAClB,wBAAA,EAAA,aAAa,CAAC,QAAQ,CAAA;;;MAG1CC,SAAI,CAAA;eACK,gBAAgB,KAAA,IAAA,IAAhB,gBAAgB,KAAA,MAAA,GAAhB,gBAAgB,GAAIC,aAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA;;GAEvD,CAAA,CAAA,EAEC,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,KAC1B,MAAM;AACN,IAAA;AACoB,sBAAA,EAAA,aAAa,CAAC,QAAQ,CAAA;AAC3C,EAAA,CAAA,CAAA;AAGH,MAAM,gBAAgB,GAAGH,uBAAM,CAACE,SAAI,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,uBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,8JAAA,EAWjC,CAAC,EAAE,MAAM,EAAE,aAAa,EAAE,KAC1B,MAAM;AACN,IAAA;AACoB,sBAAA,EAAA,aAAa,CAAC,IAAI,CAAA;;UAEhC,WAAW,CAAA;;;AAGlB,EAAA,CAAA,CAAA;AAGH,MAAM,WAAW,GAAG;AAClB,IAAA,KAAK,EAAE;QACL,UAAU,EAAEE,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,GAAGJ,uBAAM,CAAC,GAAG,mIAGzBI,WAAK,CAAC,EAAE,CAAA,YAAA,EAGZA,WAAK,CAAC,IAAI,CAAA,OAAA,EACXA,WAAK,CAAC,IAAI;;;;;;;;;;"}
1
+ {"version":3,"file":"styled.cjs","sources":["../../../src/components/View/styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { CSSProperties } from 'react';\nimport { ColourPalette, colors } from '../../theme/modules/colors';\n\nimport { BaseContainer } from '../BaseContainer';\nimport { Text } from '../Text';\n\nimport { sizes } from '../../theme/modules/sizes';\n\ntype RequiredPalette = { $colourPalette: ColourPalette };\nexport type ContourProps = { $active?: boolean; $customTextColour?: string } & RequiredPalette;\nexport type CounterProps = { $active?: boolean; $customTextColour?: string } & RequiredPalette;\n\nconst Container = styled(BaseContainer)`\n padding: 14px 24px;\n`;\n\nconst CounterText = styled(Text)`\n line-height: 1;\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: 0 12px;\n border: 1px solid transparent;\n cursor: pointer;\n\n ${({ $colourPalette, $customTextColour }) => `\n &:hover {\n border: 1px solid ${$colourPalette.base};\n background-color: ${$colourPalette.lightest};\n }\n\n span { \n color: ${$customTextColour ?? colors.neutral.ink.dark}; \n } \n `}\n\n ${({ $active, $colourPalette }) =>\n $active &&\n `\n background-color: ${$colourPalette.lightest};\n `}\n`;\n\nconst CounterContainer = styled(Text)<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.base};\n\n & > ${CounterText} {\n color: #fff;\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 { Container, Contour, CounterContainer, CounterText, IconStyling, Text };\n"],"names":["styled","BaseContainer","Text","colors","sizes"],"mappings":";;;;;;;;;;;;AAcA,MAAM,SAAS,GAAGA,uBAAM,CAACC,2BAAa,CAAC;AAIvC,MAAM,WAAW,GAAGD,uBAAM,CAACE,SAAI,CAAC;AAIhC,MAAM,OAAO,GAAGF,uBAAM,CAACC,2BAAa,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,cAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,8JAAA,EAWjC,CAAC,EAAE,cAAc,EAAE,iBAAiB,EAAE,KAAK;;AAErB,wBAAA,EAAA,cAAc,CAAC,IAAI,CAAA;AACnB,wBAAA,EAAA,cAAc,CAAC,QAAQ,CAAA;;;;eAIlC,iBAAiB,KAAA,IAAA,IAAjB,iBAAiB,KAAA,MAAA,GAAjB,iBAAiB,GAAIE,aAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAA;;GAExD,CAAA,CAAA,EAEC,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,KAC5B,OAAO;AACP,IAAA;AACoB,sBAAA,EAAA,cAAc,CAAC,QAAQ,CAAA;AAC5C,EAAA,CAAA,CAAA;AAGH,MAAM,gBAAgB,GAAGH,uBAAM,CAACE,SAAI,CAAC,CAAA,UAAA,CAAA,EAAA,WAAA,EAAA,uBAAA,EAAA,WAAA,EAAA,aAAA,EAAA,CAAA,CAAA,CAAA,8JAAA,EAWjC,CAAC,EAAE,OAAO,EAAE,cAAc,EAAE,KAC5B,OAAO;AACP,IAAA;AACoB,sBAAA,EAAA,cAAc,CAAC,IAAI,CAAA;;UAEjC,WAAW,CAAA;;;AAGlB,EAAA,CAAA,CAAA;AAGH,MAAM,WAAW,GAAG;AAClB,IAAA,KAAK,EAAE;QACL,UAAU,EAAEE,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,GAAGJ,uBAAM,CAAC,GAAG,mIAGzBI,WAAK,CAAC,EAAE,CAAA,YAAA,EAGZA,WAAK,CAAC,IAAI,CAAA,OAAA,EACXA,WAAK,CAAC,IAAI;;;;;;;;;;"}
@@ -1,18 +1,37 @@
1
1
  import { CSSProperties } from 'react';
2
2
  import { ColourPalette } from '../../theme/modules/colors';
3
3
  import { Text } from '../Text';
4
- import { ViewProps } from './types';
5
4
  type RequiredPalette = {
6
- colourPalette: ColourPalette;
5
+ $colourPalette: ColourPalette;
7
6
  };
8
- export type ContourProps = Pick<ViewProps, 'active' | 'customTextColour'> & RequiredPalette;
9
- export type CounterProps = Pick<ViewProps, 'active' | 'customTextColour'> & RequiredPalette;
7
+ export type ContourProps = {
8
+ $active?: boolean;
9
+ $customTextColour?: string;
10
+ } & RequiredPalette;
11
+ export type CounterProps = {
12
+ $active?: boolean;
13
+ $customTextColour?: string;
14
+ } & RequiredPalette;
10
15
  declare const Container: import("styled-components").StyledComponent<"div", any, {}, never>;
11
- declare const CounterText: import("styled-components").StyledComponent<"span", any, {} & import("../Text/types").TextProps, never>;
12
- declare const Contour: import("styled-components").StyledComponent<"div", any, Pick<ViewProps, "active" | "customTextColour"> & RequiredPalette, never>;
13
- declare const CounterContainer: import("styled-components").StyledComponent<"span", any, ({} & import("../Text/types").TextProps) & Pick<ViewProps, "active" | "customTextColour"> & RequiredPalette, never>;
16
+ declare const CounterText: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
17
+ as?: import("../Text").ValidTextTag | undefined;
18
+ muted?: boolean | undefined;
19
+ variant?: "body" | "button" | "link" | "headingXXL" | "headingXL" | "headingLarge" | "headingMedium" | "headingSmall" | "headingTable" | "subheadingLarge" | "subheadingMedium" | "subheadingSmall" | "subheadingSmallBold" | "bodySmall" | "bodyBold" | "bodyBoldDark" | "bodySmallBold" | "inputLabel" | "inputLabelSmall" | "hintText" | "placeholder" | "placeholderSmall" | "placeholderCode" | "placeholderCodeSmall" | "error" | "errorSmall" | "successSmall" | "buttonSmall" | "linkLarge" | "linkMedium" | "linkSmall" | undefined;
20
+ } & import("react").HTMLAttributes<HTMLElement> & import("react").LabelHTMLAttributes<HTMLLabelElement> & import("react").RefAttributes<HTMLElement>>, any, {}, never>;
21
+ declare const Contour: import("styled-components").StyledComponent<"div", any, {
22
+ $active?: boolean | undefined;
23
+ $customTextColour?: string | undefined;
24
+ } & RequiredPalette, never>;
25
+ declare const CounterContainer: import("styled-components").StyledComponent<import("react").ForwardRefExoticComponent<{
26
+ as?: import("../Text").ValidTextTag | undefined;
27
+ muted?: boolean | undefined;
28
+ variant?: "body" | "button" | "link" | "headingXXL" | "headingXL" | "headingLarge" | "headingMedium" | "headingSmall" | "headingTable" | "subheadingLarge" | "subheadingMedium" | "subheadingSmall" | "subheadingSmallBold" | "bodySmall" | "bodyBold" | "bodyBoldDark" | "bodySmallBold" | "inputLabel" | "inputLabelSmall" | "hintText" | "placeholder" | "placeholderSmall" | "placeholderCode" | "placeholderCodeSmall" | "error" | "errorSmall" | "successSmall" | "buttonSmall" | "linkLarge" | "linkMedium" | "linkSmall" | undefined;
29
+ } & import("react").HTMLAttributes<HTMLElement> & import("react").LabelHTMLAttributes<HTMLLabelElement> & import("react").RefAttributes<HTMLElement>>, any, {
30
+ $active?: boolean | undefined;
31
+ $customTextColour?: string | undefined;
32
+ } & RequiredPalette, never>;
14
33
  declare const IconStyling: {
15
34
  style: CSSProperties;
16
35
  };
17
36
  export declare const CustomIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
18
- export { Container, Contour, Text, CounterContainer, CounterText, IconStyling };
37
+ export { Container, Contour, CounterContainer, CounterText, IconStyling, Text };
@@ -1,27 +1,27 @@
1
1
  import styled from 'styled-components';
2
2
  import { colors } from '../../theme/modules/colors.js';
3
- import { Text } from '../Text/Text.js';
4
3
  import { BaseContainer } from '../BaseContainer/BaseContainer.js';
4
+ import { Text } from '../Text/Text.js';
5
5
  import { sizes } from '../../theme/modules/sizes.js';
6
6
 
7
7
  const Container = styled(BaseContainer).withConfig({ displayName: "vui--Container", componentId: "vui--1vyyfhh" }) `padding:14px 24px;`;
8
8
  const CounterText = styled(Text).withConfig({ displayName: "vui--CounterText", componentId: "vui--ycgtn6" }) `line-height:1;`;
9
- const Contour = styled(BaseContainer).withConfig({ displayName: "vui--Contour", componentId: "vui--zy3oaf" }) `position:relative;display:flex;flex-direction:row;align-items:center;height:40px;border-radius:4px;padding:0 12px;border:1px solid transparent;cursor:pointer;${({ colourPalette, customTextColour }) => `
9
+ const Contour = styled(BaseContainer).withConfig({ displayName: "vui--Contour", componentId: "vui--zy3oaf" }) `position:relative;display:flex;flex-direction:row;align-items:center;height:40px;border-radius:4px;padding:0 12px;border:1px solid transparent;cursor:pointer;${({ $colourPalette, $customTextColour }) => `
10
10
  &:hover {
11
- border: 1px solid ${colourPalette.base};
12
- background-color: ${colourPalette.lightest};
11
+ border: 1px solid ${$colourPalette.base};
12
+ background-color: ${$colourPalette.lightest};
13
13
  }
14
14
 
15
- ${Text} {
16
- color: ${customTextColour !== null && customTextColour !== void 0 ? customTextColour : colors.neutral.ink.dark};
17
- }
18
- `} ${({ active, colourPalette }) => active &&
15
+ span {
16
+ color: ${$customTextColour !== null && $customTextColour !== void 0 ? $customTextColour : colors.neutral.ink.dark};
17
+ }
18
+ `} ${({ $active, $colourPalette }) => $active &&
19
19
  `
20
- background-color: ${colourPalette.lightest};
20
+ background-color: ${$colourPalette.lightest};
21
21
  `}`;
22
- const CounterContainer = styled(Text).withConfig({ displayName: "vui--CounterContainer", componentId: "vui--chq9kr" }) `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
+ const CounterContainer = styled(Text).withConfig({ displayName: "vui--CounterContainer", componentId: "vui--chq9kr" }) `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 &&
23
23
  `
24
- background-color: ${colourPalette.base};
24
+ background-color: ${$colourPalette.base};
25
25
 
26
26
  & > ${CounterText} {
27
27
  color: #fff;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../src/components/View/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 { ViewProps } from './types';\nimport { sizes } from '../../theme/modules/sizes';\n\ntype RequiredPalette = { colourPalette: ColourPalette };\nexport type ContourProps = Pick<ViewProps, 'active' | 'customTextColour'> & RequiredPalette;\nexport type CounterProps = Pick<ViewProps, 'active' | 'customTextColour'> & RequiredPalette;\n\nconst Container = styled(BaseContainer)`\n padding: 14px 24px;\n`;\n\nconst CounterText = styled(Text)`\n line-height: 1;\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: 0 12px;\n border: 1px solid transparent;\n cursor: pointer;\n\n ${({ colourPalette, customTextColour }) => `\n &:hover {\n border: 1px solid ${colourPalette.base};\n background-color: ${colourPalette.lightest};\n }\n\n ${Text} {\n color: ${customTextColour ?? colors.neutral.ink.dark};\n }\n `}\n\n ${({ active, colourPalette }) =>\n active &&\n `\n background-color: ${colourPalette.lightest};\n `}\n`;\n\nconst CounterContainer = styled(Text)<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.base};\n\n & > ${CounterText} {\n color: #fff;\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 { Container, Contour, Text, CounterContainer, CounterText, IconStyling };\n"],"names":[],"mappings":";;;;;;AAeA,MAAM,SAAS,GAAG,MAAM,CAAC,aAAa,CAAC;AAIvC,MAAM,WAAW,GAAG,MAAM,CAAC,IAAI,CAAC;AAIhC,MAAM,OAAO,GAAG,MAAM,CAAC,aAAa,CAAC,CAAA,U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ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { CSSProperties } from 'react';\nimport { ColourPalette, colors } from '../../theme/modules/colors';\n\nimport { BaseContainer } from '../BaseContainer';\nimport { Text } from '../Text';\n\nimport { sizes } from '../../theme/modules/sizes';\n\ntype RequiredPalette = { $colourPalette: ColourPalette };\nexport type ContourProps = { $active?: boolean; $customTextColour?: string } & RequiredPalette;\nexport type CounterProps = { $active?: boolean; $customTextColour?: string } & RequiredPalette;\n\nconst Container = styled(BaseContainer)`\n padding: 14px 24px;\n`;\n\nconst CounterText = styled(Text)`\n line-height: 1;\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: 0 12px;\n border: 1px solid transparent;\n cursor: pointer;\n\n ${({ $colourPalette, $customTextColour }) => `\n &:hover {\n border: 1px solid ${$colourPalette.base};\n background-color: ${$colourPalette.lightest};\n }\n\n span { \n color: ${$customTextColour ?? colors.neutral.ink.dark}; \n } \n `}\n\n ${({ $active, $colourPalette }) =>\n $active &&\n `\n background-color: ${$colourPalette.lightest};\n `}\n`;\n\nconst CounterContainer = styled(Text)<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.base};\n\n & > ${CounterText} {\n color: #fff;\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 { Container, Contour, CounterContainer, CounterText, IconStyling, Text };\n"],"names":[],"mappings":";;;;;;AAcA,MAAM,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,CAAA,YAAA,EAGZ,KAAK,CAAC,IAAI,CAAA,OAAA,EACX,KAAK,CAAC,IAAI;;;;"}
@@ -6,7 +6,7 @@ export interface ClassNamesReturnPayload {
6
6
  active?: string;
7
7
  counter?: string;
8
8
  }
9
- export declare const ViewTab: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "name" | "id" | "onClick"> & {
9
+ export declare const ViewTab: React.ForwardRefExoticComponent<Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, "type" | "id" | "onClick" | "name"> & {
10
10
  colourPalette?: import("../../theme/modules/colors").ColourPalette | undefined;
11
11
  customTextColour?: string | undefined;
12
12
  active?: boolean | undefined;