carbon-react 144.3.0 → 144.4.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.
Files changed (81) hide show
  1. package/esm/__internal__/utils/helpers/events/composedPath.js +1 -6
  2. package/esm/__internal__/utils/helpers/events/events.js +1 -1
  3. package/esm/components/action-popover/action-popover.style.js +8 -8
  4. package/esm/components/breadcrumbs/crumb/crumb.style.js +2 -2
  5. package/esm/components/button-toggle/button-toggle.style.js +19 -19
  6. package/esm/components/card/card.config.d.ts +2 -2
  7. package/esm/components/date/__internal__/date-picker/day-picker.style.js +6 -2
  8. package/esm/components/dialog/dialog.component.d.ts +1 -1
  9. package/esm/components/dialog/dialog.config.d.ts +1 -1
  10. package/esm/components/dialog/dialog.style.js +2 -2
  11. package/esm/components/drawer/drawer.style.js +16 -16
  12. package/esm/components/flat-table/flat-table.style.js +9 -9
  13. package/esm/components/form/form.config.d.ts +1 -1
  14. package/esm/components/hr/hr.component.d.ts +1 -0
  15. package/esm/components/loader-spinner/loader-spinner.config.d.ts +2 -2
  16. package/esm/components/loader-spinner/loader-spinner.style.js +5 -5
  17. package/esm/components/loader-star/internal/star.component.d.ts +1 -0
  18. package/esm/components/loader-star/loader-star.component.d.ts +1 -0
  19. package/esm/components/menu/menu-segment-title/menu-segment-title.component.d.ts +1 -1
  20. package/esm/components/note/note.component.d.ts +1 -1
  21. package/esm/components/note/note.component.js +10 -2
  22. package/esm/components/note/note.style.d.ts +2 -2
  23. package/esm/components/note/note.style.js +7 -4
  24. package/esm/components/numeral-date/numeral-date.component.d.ts +1 -1
  25. package/esm/components/pager/pager.style.js +2 -2
  26. package/esm/components/pod/pod.config.d.ts +3 -3
  27. package/esm/components/pod/pod.style.js +34 -34
  28. package/esm/components/progress-tracker/progress-tracker.style.js +2 -2
  29. package/esm/components/select/__internal__/list-action-button/list-action-button.style.js +3 -1
  30. package/esm/components/switch/switch.style.js +8 -8
  31. package/esm/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +2 -1
  32. package/esm/components/textbox/textbox.style.js +8 -8
  33. package/esm/components/tile/flex-tile-divider/flex-tile-divider.component.d.ts +1 -0
  34. package/esm/components/tile/tile.component.d.ts +1 -1
  35. package/esm/components/typography/typography.component.d.ts +1 -1
  36. package/esm/components/typography/typography.style.js +1 -1
  37. package/esm/components/vertical-divider/vertical-divider.component.d.ts +1 -0
  38. package/esm/global.d.ts +1 -1
  39. package/esm/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +1 -0
  40. package/esm/style/utils/box-gap.d.ts +1 -1
  41. package/lib/__internal__/utils/helpers/events/composedPath.js +1 -6
  42. package/lib/__internal__/utils/helpers/events/events.js +1 -1
  43. package/lib/components/action-popover/action-popover.style.js +8 -8
  44. package/lib/components/breadcrumbs/crumb/crumb.style.js +2 -2
  45. package/lib/components/button-toggle/button-toggle.style.js +19 -19
  46. package/lib/components/card/card.config.d.ts +2 -2
  47. package/lib/components/date/__internal__/date-picker/day-picker.style.js +6 -2
  48. package/lib/components/dialog/dialog.component.d.ts +1 -1
  49. package/lib/components/dialog/dialog.config.d.ts +1 -1
  50. package/lib/components/dialog/dialog.style.js +2 -2
  51. package/lib/components/drawer/drawer.style.js +16 -16
  52. package/lib/components/flat-table/flat-table.style.js +9 -9
  53. package/lib/components/form/form.config.d.ts +1 -1
  54. package/lib/components/hr/hr.component.d.ts +1 -0
  55. package/lib/components/loader-spinner/loader-spinner.config.d.ts +2 -2
  56. package/lib/components/loader-spinner/loader-spinner.style.js +5 -5
  57. package/lib/components/loader-star/internal/star.component.d.ts +1 -0
  58. package/lib/components/loader-star/loader-star.component.d.ts +1 -0
  59. package/lib/components/menu/menu-segment-title/menu-segment-title.component.d.ts +1 -1
  60. package/lib/components/note/note.component.d.ts +1 -1
  61. package/lib/components/note/note.component.js +9 -1
  62. package/lib/components/note/note.style.d.ts +2 -2
  63. package/lib/components/note/note.style.js +7 -4
  64. package/lib/components/numeral-date/numeral-date.component.d.ts +1 -1
  65. package/lib/components/pager/pager.style.js +2 -2
  66. package/lib/components/pod/pod.config.d.ts +3 -3
  67. package/lib/components/pod/pod.style.js +34 -34
  68. package/lib/components/progress-tracker/progress-tracker.style.js +2 -2
  69. package/lib/components/select/__internal__/list-action-button/list-action-button.style.js +3 -1
  70. package/lib/components/switch/switch.style.js +8 -8
  71. package/lib/components/text-editor/__internal__/toolbar/toolbar-button/toolbar-button.component.js +2 -1
  72. package/lib/components/textbox/textbox.style.js +8 -8
  73. package/lib/components/tile/flex-tile-divider/flex-tile-divider.component.d.ts +1 -0
  74. package/lib/components/tile/tile.component.d.ts +1 -1
  75. package/lib/components/typography/typography.component.d.ts +1 -1
  76. package/lib/components/typography/typography.style.js +1 -1
  77. package/lib/components/vertical-divider/vertical-divider.component.d.ts +1 -0
  78. package/lib/global.d.ts +1 -1
  79. package/lib/hooks/__internal__/useCharacterCount/useCharacterCount.d.ts +1 -0
  80. package/lib/style/utils/box-gap.d.ts +1 -1
  81. package/package.json +3 -10
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { SpaceProps } from "styled-system";
3
3
  import { TagProps } from "../../__internal__/utils/helpers/tags";
4
4
  export declare const VARIANT_TYPES: readonly ["h1-large", "h1", "h2", "h3", "h4", "h5", "segment-header", "segment-header-small", "segment-subheader", "segment-subheader-alt", "p", "span", "small", "big", "sup", "sub", "strong", "b", "em", "ul", "ol"];
5
- export declare type VariantTypes = typeof VARIANT_TYPES[number];
5
+ export declare type VariantTypes = (typeof VARIANT_TYPES)[number];
6
6
  export interface TypographyProps extends SpaceProps, TagProps {
7
7
  /** Override the variant component */
8
8
  as?: React.ElementType;
@@ -182,7 +182,7 @@ const StyledTypography = styled.span.attrs(({
182
182
  ${variant === "sup" && "vertical-align: super;"};
183
183
  ${variant === "sub" && "vertical-align: sub;"};
184
184
  ${display && `display: ${display};`};
185
- ${listStyleType && `list-style-type: ${listStyleType};`}; ;
185
+ ${listStyleType && `list-style-type: ${listStyleType};`};
186
186
  `}
187
187
  ${space}
188
188
  ${({
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { SpaceProps } from "styled-system";
2
3
  declare type TintRange = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100;
3
4
  export interface VerticalDividerProps extends SpaceProps {
package/esm/global.d.ts CHANGED
@@ -7,7 +7,7 @@ declare global {
7
7
  interface Window {
8
8
  __CARBON_INTERNALS_MODAL_LIST?: ModalList;
9
9
  __CARBON_INTERNALS_MODAL_SETTER_LIST?: ((
10
- topModal: HTMLElement | null
10
+ topModal: HTMLElement | null,
11
11
  ) => void)[];
12
12
  __CARBON_INTERNALS_SCROLL_BLOCKERS?: {
13
13
  components: {
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const useCharacterCount: (value?: string, characterLimit?: number, characterCountAriaLive?: "off" | "polite") => [JSX.Element | null, string | undefined];
2
3
  export default useCharacterCount;
@@ -1,5 +1,5 @@
1
1
  export declare const GAP_VALUES: number[];
2
- export declare type AllowedNumericalValues = typeof GAP_VALUES[number];
2
+ export declare type AllowedNumericalValues = (typeof GAP_VALUES)[number];
3
3
  export declare type Gap = AllowedNumericalValues | string;
4
4
  export declare const getGapValue: (gapValue: number | string) => string;
5
5
  export default function gap(gapValue: number | string): string;
@@ -9,14 +9,9 @@ exports.default = void 0;
9
9
  // IE does not support composedPath
10
10
  // https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath
11
11
  var _default = ev => {
12
- // When testing with enzyme, we want to trigger a listener on an element but pretend
13
- // that it bubbled from the enzymeTestingTarget
14
- // e.g. document.dispatchEvent(new MouseClick('click', {
15
- // detail: {enzymeTestingTarget: document.body}
16
- // }))
17
12
  // In this example composedPath would show that the event started at document.body
18
13
  // but it would trigger the eventListener on document
19
- let element = ev.detail && ev.detail.enzymeTestingTarget || ev.target || null;
14
+ let element = ev.target || null;
20
15
  if (!element || !element.parentElement) {
21
16
  return [];
22
17
  }
@@ -114,7 +114,7 @@ const Events = {
114
114
  * @see https://developer.mozilla.org/en-US/docs/Web/API/Event/composedPath
115
115
  */
116
116
  composedPath: ev => {
117
- return ev.detail?.enzymeTestingTarget && (0, _composedPath.default)(ev) || ev.composedPath && ev.composedPath() || (0, _composedPath.default)(ev);
117
+ return ev.composedPath?.() || (0, _composedPath.default)(ev);
118
118
  }
119
119
  };
120
120
  var _default = exports.default = Events;
@@ -97,18 +97,18 @@ const StyledMenuItem = exports.StyledMenuItem = _styledComponents.default.button
97
97
  childHasSubmenu,
98
98
  hasSubmenu
99
99
  }) => (0, _styledComponents.css)`
100
- justify-content: ${horizontalAlignment === "left" ? "flex-start" : "flex-end"};
100
+ justify-content: ${horizontalAlignment === "left" ? "flex-start" : "flex-end"};
101
101
 
102
- ${horizontalAlignment === "left" && submenuPosition === "right" && (0, _styledComponents.css)`
103
- justify-content: space-between;
104
- `}
102
+ ${horizontalAlignment === "left" && submenuPosition === "right" && (0, _styledComponents.css)`
103
+ justify-content: space-between;
104
+ `}
105
105
 
106
- ${horizontalAlignment === "right" && submenuPosition === "left" && (0, _styledComponents.css)`
107
- ${childHasSubmenu && hasSubmenu && (0, _styledComponents.css)`
108
- justify-content: space-between;
109
- `}
106
+ ${horizontalAlignment === "right" && submenuPosition === "left" && (0, _styledComponents.css)`
107
+ ${childHasSubmenu && hasSubmenu && (0, _styledComponents.css)`
108
+ justify-content: space-between;
110
109
  `}
111
110
  `}
111
+ `}
112
112
 
113
113
  text-decoration: none;
114
114
  background-color: var(--colorsActionMajorYang100);
@@ -39,8 +39,8 @@ const Divider = exports.Divider = _styledComponents.default.span`
39
39
  ${({
40
40
  isDarkBackground
41
41
  }) => (0, _styledComponents.css)`
42
- color: ${isDarkBackground ? "var(--colorsUtilityYang100)" : "var(--colorsUtilityYin055)"};
43
- `}
42
+ color: ${isDarkBackground ? "var(--colorsUtilityYang100)" : "var(--colorsUtilityYin055)"};
43
+ `}
44
44
  }
45
45
  `;
46
46
  var _default = exports.default = {
@@ -171,32 +171,32 @@ const StyledButtonToggleWrapper = exports.StyledButtonToggleWrapper = _styledCom
171
171
  ${({
172
172
  grouped
173
173
  }) => (0, _styledComponents.css)`
174
- ${!grouped && (0, _styledComponents.css)`
175
- &&&& {
176
- ${StyledButtonToggle} {
177
- border-radius: var(--borderRadius050);
178
- }
174
+ ${!grouped && (0, _styledComponents.css)`
175
+ &&&& {
176
+ ${StyledButtonToggle} {
177
+ border-radius: var(--borderRadius050);
179
178
  }
180
- `}
179
+ }
180
+ `}
181
181
 
182
- ${grouped && (0, _styledComponents.css)`
183
- &&&& {
184
- :first-of-type {
185
- ${StyledButtonToggle} {
186
- border-top-left-radius: var(--borderRadius050);
187
- border-bottom-left-radius: var(--borderRadius050);
188
- }
182
+ ${grouped && (0, _styledComponents.css)`
183
+ &&&& {
184
+ :first-of-type {
185
+ ${StyledButtonToggle} {
186
+ border-top-left-radius: var(--borderRadius050);
187
+ border-bottom-left-radius: var(--borderRadius050);
189
188
  }
189
+ }
190
190
 
191
- :last-of-type {
192
- ${StyledButtonToggle} {
193
- border-top-right-radius: var(--borderRadius050);
194
- border-bottom-right-radius: var(--borderRadius050);
195
- }
191
+ :last-of-type {
192
+ ${StyledButtonToggle} {
193
+ border-top-right-radius: var(--borderRadius050);
194
+ border-bottom-right-radius: var(--borderRadius050);
196
195
  }
197
196
  }
198
- `}
197
+ }
199
198
  `}
199
+ `}
200
200
 
201
201
  ${({
202
202
  grouped
@@ -1,4 +1,4 @@
1
1
  export declare const CARD_SPACING: readonly ["small", "medium", "large"];
2
2
  export declare const CARD_ALIGNS: readonly ["left", "center", "right"];
3
- export declare type CardAlign = typeof CARD_ALIGNS[number];
4
- export declare type CardSpacing = typeof CARD_SPACING[number];
3
+ export declare type CardAlign = (typeof CARD_ALIGNS)[number];
4
+ export declare type CardSpacing = (typeof CARD_SPACING)[number];
@@ -321,13 +321,17 @@ const StyledDayPicker = _styledComponents.default.div`
321
321
  }
322
322
  }
323
323
 
324
- .DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(.DayPicker-Day--outside) {
324
+ .DayPicker-Day--selected:not(.DayPicker-Day--disabled):not(
325
+ .DayPicker-Day--outside
326
+ ) {
325
327
  background-color: var(--colorsActionMajor500);
326
328
  color: var(--colorsUtilityYang100);
327
329
  border-radius: var(--borderRadius400);
328
330
  }
329
331
 
330
- .DayPicker-Day--selected.DayPicker-Day--disabled:not(.DayPicker-Day--outside) {
332
+ .DayPicker-Day--selected.DayPicker-Day--disabled:not(
333
+ .DayPicker-Day--outside
334
+ ) {
331
335
  background-color: var(--colorsActionMajor500);
332
336
  color: var(--colorsUtilityYang100);
333
337
  }
@@ -4,7 +4,7 @@ import { TagProps } from "../../__internal__/utils/helpers/tags";
4
4
  import { DialogSizes } from "./dialog.config";
5
5
  import { CustomRefObject } from "../../__internal__/focus-trap";
6
6
  declare const PADDING_VALUES: readonly [0, 1, 2, 3, 4, 5, 6, 7, 8];
7
- declare type PaddingValues = typeof PADDING_VALUES[number];
7
+ declare type PaddingValues = (typeof PADDING_VALUES)[number];
8
8
  export interface ContentPaddingInterface {
9
9
  p?: PaddingValues;
10
10
  py?: PaddingValues;
@@ -1,2 +1,2 @@
1
1
  export declare const DIALOG_SIZES: readonly ["auto", "extra-small", "small", "medium-small", "medium", "medium-large", "large", "extra-large", "maximise"];
2
- export declare type DialogSizes = typeof DIALOG_SIZES[number];
2
+ export declare type DialogSizes = (typeof DIALOG_SIZES)[number];
@@ -63,8 +63,8 @@ const StyledDialog = exports.StyledDialog = _styledComponents.default.div`
63
63
  ${({
64
64
  backgroundColor
65
65
  }) => (0, _styledComponents.css)`
66
- background-color: ${backgroundColor};
67
- `}
66
+ background-color: ${backgroundColor};
67
+ `}
68
68
 
69
69
  ${({
70
70
  dialogHeight
@@ -40,26 +40,26 @@ const StyledDrawerSidebar = exports.StyledDrawerSidebar = (0, _styledComponents.
40
40
  hasControls,
41
41
  isExpanded
42
42
  }) => (0, _styledComponents.css)`
43
- ${!isExpanded && (0, _styledComponents.css)`
44
- display: none;
45
- opacity: 0;
46
- `}
43
+ ${!isExpanded && (0, _styledComponents.css)`
44
+ display: none;
45
+ opacity: 0;
46
+ `}
47
47
 
48
- ${isExpanded && (0, _styledComponents.css)`
49
- display: flex;
50
- flex-direction: column;
51
- flex: 1 1 0%;
52
- `}
48
+ ${isExpanded && (0, _styledComponents.css)`
49
+ display: flex;
50
+ flex-direction: column;
51
+ flex: 1 1 0%;
52
+ `}
53
53
 
54
54
  ${hasControls && (0, _styledComponents.css)`
55
- ${_tabs.default} {
56
- margin-top: 48px;
57
- ${!isExpanded && (0, _styledComponents.css)`
58
- display: none;
59
- `}
60
- }
61
- `}
55
+ ${_tabs.default} {
56
+ margin-top: 48px;
57
+ ${!isExpanded && (0, _styledComponents.css)`
58
+ display: none;
59
+ `}
60
+ }
62
61
  `}
62
+ `}
63
63
 
64
64
  &::-webkit-scrollbar {
65
65
  width: 12px;
@@ -137,20 +137,20 @@ const StyledFlatTableWrapper = exports.StyledFlatTableWrapper = (0, _styledCompo
137
137
  theme,
138
138
  isFocused
139
139
  }) => (0, _styledComponents.css)`
140
- box-sizing: border-box;
140
+ box-sizing: border-box;
141
141
 
142
- /* istanbul ignore next */
143
- ${theme.focusRedesignOptOut && isFocused && /* istanbul ignore next */
142
+ /* istanbul ignore next */
143
+ ${theme.focusRedesignOptOut && isFocused && /* istanbul ignore next */
144
144
  (0, _styledComponents.css)`
145
- ${oldFocusStyling}
146
- `}
145
+ ${oldFocusStyling}
146
+ `}
147
147
 
148
- ${!theme.focusRedesignOptOut && isFocused && (0, _styledComponents.css)`
149
- ${(0, _addFocusStyling.default)()}
150
- `}
148
+ ${!theme.focusRedesignOptOut && isFocused && (0, _styledComponents.css)`
149
+ ${(0, _addFocusStyling.default)()}
150
+ `}
151
151
 
152
152
  ${isInSidebar ? "min-width: fit-content;" : ""}
153
- `}
153
+ `}
154
154
 
155
155
  ${({
156
156
  colorTheme
@@ -1,5 +1,5 @@
1
1
  export declare const FORM_BUTTON_ALIGNMENTS: readonly ["left", "right"];
2
- export declare type FormButtonAlignment = typeof FORM_BUTTON_ALIGNMENTS[number];
2
+ export declare type FormButtonAlignment = (typeof FORM_BUTTON_ALIGNMENTS)[number];
3
3
  export declare const formSpacing: {
4
4
  0: string;
5
5
  1: string;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { MarginProps } from "styled-system";
2
3
  export interface HrProps extends MarginProps {
3
4
  /** Set whether the component should be recognised by assistive technologies */
@@ -1,7 +1,7 @@
1
1
  declare const LOADER_SPINNER_VARIANTS: readonly ["action", "neutral", "inverse", "gradient-grey", "gradient-white"];
2
- declare type LoaderSpinnerVariants = typeof LOADER_SPINNER_VARIANTS[number];
2
+ declare type LoaderSpinnerVariants = (typeof LOADER_SPINNER_VARIANTS)[number];
3
3
  declare const LOADER_SPINNER_SIZES: readonly ["extra-small", "small", "medium", "large", "extra-large"];
4
- declare type LoaderSpinnerSizes = typeof LOADER_SPINNER_SIZES[number];
4
+ declare type LoaderSpinnerSizes = (typeof LOADER_SPINNER_SIZES)[number];
5
5
  declare type LoaderSpinnerSizeParams = Record<LoaderSpinnerSizes, {
6
6
  wrapperDimensions: number;
7
7
  strokeWidth: number;
@@ -36,11 +36,11 @@ const StyledLabel = exports.StyledLabel = (0, _styledComponents.default)(_typogr
36
36
  ${({
37
37
  size
38
38
  }) => (0, _styledComponents.css)`
39
- display: flex;
40
- justify-content: center;
41
- text-align: center;
42
- ${size === "extra-small" ? "margin-left: var(--spacing100)" : `margin-top: ${_loaderSpinner.LOADER_SPINNER_SIZE_PARAMS[size].labelMarginTop}px`};
43
- `}
39
+ display: flex;
40
+ justify-content: center;
41
+ text-align: center;
42
+ ${size === "extra-small" ? "margin-left: var(--spacing100)" : `margin-top: ${_loaderSpinner.LOADER_SPINNER_SIZE_PARAMS[size].labelMarginTop}px`};
43
+ `}
44
44
  `;
45
45
  const StyledSpinnerCircleSvg = exports.StyledSpinnerCircleSvg = _styledComponents.default.svg`
46
46
  ${({
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  interface StarProps {
2
3
  starContainerClassName: "star-1" | "star-2" | "star-3";
3
4
  gradientId: "gradient1" | "gradient2" | "gradient3";
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { TagProps } from "../../__internal__/utils/helpers/tags/tags";
2
3
  export interface LoaderStarProps extends Omit<TagProps, "data-component"> {
3
4
  /**
@@ -2,7 +2,7 @@ import React from "react";
2
2
  import { VariantType } from "../menu-item";
3
3
  import { TagProps } from "../../../__internal__/utils/helpers/tags";
4
4
  declare const AS_VALUES: readonly ["h2", "h3", "h4", "h5", "h6"];
5
- declare type AllowedAsValues = typeof AS_VALUES[number];
5
+ declare type AllowedAsValues = (typeof AS_VALUES)[number];
6
6
  export interface MenuTitleProps extends TagProps {
7
7
  children?: React.ReactNode;
8
8
  text: string;
@@ -20,7 +20,7 @@ export interface NoteProps extends MarginProps {
20
20
  timeStamp: string;
21
21
  };
22
22
  /** Adds a Title to the Note */
23
- title?: string;
23
+ title?: React.ReactNode;
24
24
  /** Set a percentage-based width for the whole Note component, relative to its parent. */
25
25
  width?: number;
26
26
  }
@@ -14,6 +14,7 @@ var _actionPopover = require("../action-popover");
14
14
  var _utils = require("../text-editor/__internal__/utils");
15
15
  var _editor = _interopRequireDefault(require("../text-editor/__internal__/editor.context"));
16
16
  var _linkPreview = _interopRequireDefault(require("../link-preview"));
17
+ var _typography = _interopRequireDefault(require("../typography"));
17
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
18
19
  function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
19
20
  function hasExpectedDisplayName(child, displayName) {
@@ -57,7 +58,14 @@ const Note = ({
57
58
  width: width
58
59
  }, rest, {
59
60
  "data-component": "note"
60
- }), /*#__PURE__*/_react.default.createElement(_note.StyledNoteMain, null, /*#__PURE__*/_react.default.createElement(_note.StyledNoteContent, null, title && /*#__PURE__*/_react.default.createElement(_note.StyledTitle, null, title), /*#__PURE__*/_react.default.createElement(_draftJs.Editor, {
61
+ }), /*#__PURE__*/_react.default.createElement(_note.StyledNoteMain, null, /*#__PURE__*/_react.default.createElement(_note.StyledNoteContent, null, title && (typeof title === "string" ? /*#__PURE__*/_react.default.createElement(_typography.default, {
62
+ "data-role": "note-title",
63
+ fontWeight: "700",
64
+ fontSize: "16px",
65
+ lineHeight: "21px",
66
+ paddingBottom: "16px",
67
+ variant: "h2"
68
+ }, title) : /*#__PURE__*/_react.default.createElement(_note.StyledTitleWrapper, null, title)), /*#__PURE__*/_react.default.createElement(_draftJs.Editor, {
61
69
  readOnly: true,
62
70
  editorState: (0, _utils.getDecoratedValue)(noteContent),
63
71
  onChange: /* istanbul ignore next */() => {}
@@ -3,7 +3,7 @@ declare const StyledNoteContent: import("styled-components").StyledComponent<"di
3
3
  }, never>;
4
4
  declare const StyledNoteMain: import("styled-components").StyledComponent<"div", any, {}, never>;
5
5
  declare const StyledInlineControl: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- declare const StyledTitle: import("styled-components").StyledComponent<"header", any, {}, never>;
6
+ declare const StyledTitleWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
7
7
  declare const StyledFooterContent: import("styled-components").StyledComponent<"div", any, {
8
8
  hasName: boolean;
9
9
  }, never>;
@@ -11,4 +11,4 @@ declare const StyledFooter: import("styled-components").StyledComponent<"div", a
11
11
  declare const StyledNote: import("styled-components").StyledComponent<"div", any, {
12
12
  width: number;
13
13
  }, never>;
14
- export { StyledNote, StyledNoteContent, StyledNoteMain, StyledInlineControl, StyledTitle, StyledFooter, StyledFooterContent, };
14
+ export { StyledNote, StyledNoteContent, StyledNoteMain, StyledInlineControl, StyledTitleWrapper, StyledFooter, StyledFooterContent, };
@@ -3,11 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyledTitle = exports.StyledNoteMain = exports.StyledNoteContent = exports.StyledNote = exports.StyledInlineControl = exports.StyledFooterContent = exports.StyledFooter = void 0;
6
+ exports.StyledTitleWrapper = exports.StyledNoteMain = exports.StyledNoteContent = exports.StyledNote = exports.StyledInlineControl = exports.StyledFooterContent = exports.StyledFooter = void 0;
7
7
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
8
  var _styledSystem = require("styled-system");
9
9
  var _base = _interopRequireDefault(require("../../style/themes/base"));
10
10
  var _linkPreview = require("../link-preview/link-preview.style");
11
+ var _typography = require("../typography/typography.component");
11
12
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
13
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -20,13 +21,11 @@ const StyledNoteContent = exports.StyledNoteContent = _styledComponents.default.
20
21
  }) => (0, _styledComponents.css)`
21
22
  div.DraftEditor-root {
22
23
  min-height: inherit;
23
- height: 100%;
24
24
  }
25
25
 
26
26
  div.DraftEditor-editorContainer,
27
27
  div.public-DraftEditor-content {
28
28
  min-height: inherit;
29
- height: 100%;
30
29
  background-color: var(--colorsUtilityYang100);
31
30
  line-height: 21px;
32
31
  }
@@ -49,11 +48,15 @@ const StyledInlineControl = exports.StyledInlineControl = _styledComponents.defa
49
48
  display: inline-block;
50
49
  min-width: fit-content;
51
50
  `;
52
- const StyledTitle = exports.StyledTitle = _styledComponents.default.header`
51
+ const StyledTitleWrapper = exports.StyledTitleWrapper = _styledComponents.default.div`
52
+ ${_typography.VARIANT_TYPES.map(variant => `
53
+ ${variant}{
53
54
  font-weight: 700;
54
55
  font-size: 16px;
55
56
  line-height: 21px;
56
57
  padding-bottom: 16px;
58
+ }
59
+ `)}
57
60
  `;
58
61
  const StyledFooterContent = exports.StyledFooterContent = _styledComponents.default.div`
59
62
  line-height: 21px;
@@ -93,6 +93,6 @@ export interface NumeralDateProps<DateType extends NumeralDateObject = FullDate>
93
93
  /** Flag to configure component as optional. */
94
94
  isOptional?: boolean;
95
95
  }
96
- export declare type ValidDateFormat = typeof ALLOWED_DATE_FORMATS[number];
96
+ export declare type ValidDateFormat = (typeof ALLOWED_DATE_FORMATS)[number];
97
97
  export declare const NumeralDate: <DateType extends NumeralDateObject = FullDate>({ dateFormat, defaultValue, disabled, error, warning, "data-component": dataComponent, "data-element": dataElement, "data-role": dataRole, info, id, name, onBlur, onChange, value, validationOnLabel, label, labelInline, labelWidth, labelAlign, labelHelp, labelSpacing, fieldHelp, adaptiveLabelBreakpoint, required, isOptional, readOnly, size, enableInternalError, enableInternalWarning, tooltipPosition, helpAriaLabel, dayRef, monthRef, yearRef, ...rest }: NumeralDateProps<DateType>) => React.JSX.Element;
98
98
  export default NumeralDate;
@@ -36,8 +36,8 @@ const StyledPagerContainer = exports.StyledPagerContainer = _styledComponents.de
36
36
  ${({
37
37
  variant
38
38
  }) => (0, _styledComponents.css)`
39
- background-color: ${variant === "alternate" ? "var(--colorsUtilityMajor040)" : "var(--colorsUtilityMajor010)"};
40
- `}
39
+ background-color: ${variant === "alternate" ? "var(--colorsUtilityMajor040)" : "var(--colorsUtilityMajor010)"};
40
+ `}
41
41
  `;
42
42
  const StyledPagerSizeOptions = exports.StyledPagerSizeOptions = _styledComponents.default.div`
43
43
  display: flex;
@@ -1,6 +1,6 @@
1
1
  export declare const POD_SIZES: readonly ["extra-small", "small", "medium", "large", "extra-large"];
2
2
  export declare const POD_ALIGNMENTS: readonly ["left", "center", "right"];
3
3
  export declare const POD_VARIANTS: readonly ["primary", "secondary", "tertiary", "tile", "transparent"];
4
- export declare type PodSize = typeof POD_SIZES[number];
5
- export declare type PodAlignment = typeof POD_ALIGNMENTS[number];
6
- export declare type PodVariant = typeof POD_VARIANTS[number];
4
+ export declare type PodSize = (typeof POD_SIZES)[number];
5
+ export declare type PodAlignment = (typeof POD_ALIGNMENTS)[number];
6
+ export declare type PodVariant = (typeof POD_VARIANTS)[number];
@@ -48,52 +48,52 @@ const StyledBlock = exports.StyledBlock = _styledComponents.default.div`
48
48
  isHovered,
49
49
  isFocused
50
50
  }) => (0, _styledComponents.css)`
51
- box-sizing: border-box;
52
- border-radius: var(--borderRadius100);
53
- display: flex;
54
- flex-direction: column;
55
- background-color: ${blockBackgrounds[variant]};
56
- width: 100%;
57
- height: 100%;
51
+ box-sizing: border-box;
52
+ border-radius: var(--borderRadius100);
53
+ display: flex;
54
+ flex-direction: column;
55
+ background-color: ${blockBackgrounds[variant]};
56
+ width: 100%;
57
+ height: 100%;
58
58
 
59
- ${variant === "tile" && "box-shadow: 0 2px 3px 0 rgba(2, 18, 36, 0.2)"};
59
+ ${variant === "tile" && "box-shadow: 0 2px 3px 0 rgba(2, 18, 36, 0.2)"};
60
60
 
61
- ${noBorder ? "border: none" : `border: 1px solid var(--colorsUtilityMajor100)`};
61
+ ${noBorder ? "border: none" : `border: 1px solid var(--colorsUtilityMajor100)`};
62
62
 
63
- ${hasButtons && !(fullWidth || internalEditButton) && "width: auto;"};
63
+ ${hasButtons && !(fullWidth || internalEditButton) && "width: auto;"};
64
64
 
65
- ${contentTriggersEdit && "cursor: pointer"};
65
+ ${contentTriggersEdit && "cursor: pointer"};
66
66
 
67
- ${(isHovered || isFocused) && (0, _styledComponents.css)`
68
- background-color: var(--colorsUtilityMajor075);
67
+ ${(isHovered || isFocused) && (0, _styledComponents.css)`
68
+ background-color: var(--colorsUtilityMajor075);
69
69
 
70
- ${internalEditButton && variant === "tile" && "background-color: var(--colorsUtilityMajorTransparent);"}
70
+ ${internalEditButton && variant === "tile" && "background-color: var(--colorsUtilityMajorTransparent);"}
71
71
 
72
- ${contentTriggersEdit && (0, _styledComponents.css)`
73
- background-color: var(--colorsActionMajor600);
74
- * {
75
- color: var(--colorsUtilityYang100);
76
- }
77
- `}
72
+ ${contentTriggersEdit && (0, _styledComponents.css)`
73
+ background-color: var(--colorsActionMajor600);
74
+ * {
75
+ color: var(--colorsUtilityYang100);
76
+ }
78
77
  `}
78
+ `}
79
79
 
80
- ${(!internalEditButton || contentTriggersEdit) && (isFocused ? (0, _styledComponents.css)`
81
- outline: 3px solid var(--colorsSemanticFocus500);
82
- border: none;
83
- padding: ${noBorder ? 0 : 1}px;
84
- ` : (0, _styledComponents.css)`
85
- outline: none;
86
- `)}
80
+ ${(!internalEditButton || contentTriggersEdit) && (isFocused ? (0, _styledComponents.css)`
81
+ outline: 3px solid var(--colorsSemanticFocus500);
82
+ border: none;
83
+ padding: ${noBorder ? 0 : 1}px;
84
+ ` : (0, _styledComponents.css)`
85
+ outline: none;
86
+ `)}
87
87
 
88
88
  ${softDelete && (0, _styledComponents.css)`
89
- border: none;
90
- background-color: var(--colorsActionDisabled500);
89
+ border: none;
90
+ background-color: var(--colorsActionDisabled500);
91
91
 
92
- & > * {
93
- color: var(--colorsUtilityYin065);
94
- }
95
- `};
96
- `}
92
+ & > * {
93
+ color: var(--colorsUtilityYin065);
94
+ }
95
+ `};
96
+ `}
97
97
  `;
98
98
  const contentPaddings = {
99
99
  "extra-small": "8px",
@@ -44,8 +44,8 @@ const StyledProgressTracker = exports.StyledProgressTracker = _styledComponents.
44
44
  ${({
45
45
  length
46
46
  }) => (0, _styledComponents.css)`
47
- width: ${length};
48
- `};
47
+ width: ${length};
48
+ `};
49
49
  ${({
50
50
  labelsPosition
51
51
  }) => labelsPosition === "left" && (0, _styledComponents.css)`
@@ -11,7 +11,9 @@ const StyledListActionButtonWrapper = _styledComponents.default.div`
11
11
  padding-top: var(--spacing100);
12
12
  padding-bottom: var(--spacing100);
13
13
  border-top: 1px solid var(--colorsUtilityDisabled600);
14
- box-shadow: 0 0px 0 0 rgba(0, 0, 0, 0), 0 -8px 8px 0 rgba(0, 0, 0, 0.03);
14
+ box-shadow:
15
+ 0 0px 0 0 rgba(0, 0, 0, 0),
16
+ 0 -8px 8px 0 rgba(0, 0, 0, 0.03);
15
17
  width: 100%;
16
18
  position: sticky;
17
19
  bottom: 0;