carbon-react 105.1.2 → 105.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 (96) hide show
  1. package/esm/__internal__/tooltip-provider/index.d.ts +19 -24
  2. package/esm/__internal__/tooltip-provider/index.js +0 -10
  3. package/esm/components/app-wrapper/app-wrapper.component.d.ts +4 -0
  4. package/esm/components/badge/badge.style.d.ts +4 -2
  5. package/esm/components/button/button-types.style.d.ts +1 -2
  6. package/esm/components/button/button-types.style.js +3 -1
  7. package/esm/components/button/button.component.d.ts +67 -36
  8. package/esm/components/button/button.component.js +3314 -165
  9. package/esm/components/button/button.config.d.ts +4 -3
  10. package/esm/components/button/button.style.d.ts +6 -8
  11. package/esm/components/button/button.style.js +51 -95
  12. package/esm/components/button/index.d.ts +2 -2
  13. package/esm/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -2
  14. package/esm/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
  15. package/esm/components/heading/heading.component.d.ts +5 -0
  16. package/esm/components/icon/index.d.ts +1 -0
  17. package/esm/components/multi-action-button/multi-action-button.component.d.ts +3 -1
  18. package/esm/components/multi-action-button/multi-action-button.component.js +7 -5
  19. package/esm/components/multi-action-button/multi-action-button.d.ts +4 -2
  20. package/esm/components/multi-step-wizard/multi-step-wizard.d.ts +22 -0
  21. package/esm/components/multi-step-wizard/step/step.d.ts +6 -0
  22. package/esm/components/multi-step-wizard/step/step.style.d.ts +4 -2
  23. package/esm/components/radio-button/radio-button-svg.component.js +29 -16
  24. package/esm/components/scrollable-list/scrollable-list.component.d.ts +8 -0
  25. package/esm/components/split-button/split-button-toggle.style.d.ts +2 -6
  26. package/esm/components/split-button/split-button.component.d.ts +3 -1
  27. package/esm/components/split-button/split-button.component.js +7 -4
  28. package/esm/components/split-button/split-button.d.ts +5 -2
  29. package/esm/components/tooltip/index.d.ts +2 -1
  30. package/esm/components/tooltip/tooltip-pointer.style.d.ts +10 -1
  31. package/esm/components/tooltip/tooltip-pointer.style.js +5 -12
  32. package/esm/components/tooltip/tooltip.component.d.ts +33 -2
  33. package/esm/components/tooltip/tooltip.component.js +255 -110
  34. package/esm/components/tooltip/tooltip.config.d.ts +2 -1
  35. package/esm/components/tooltip/tooltip.style.d.ts +7 -2
  36. package/esm/components/tooltip/tooltip.style.js +7 -21
  37. package/esm/components/typography/typography.component.d.ts +1 -1
  38. package/esm/locales/en-gb.d.ts +3 -5
  39. package/esm/locales/en-gb.js +5 -4
  40. package/esm/locales/index.d.ts +1 -1
  41. package/esm/locales/index.js +2 -0
  42. package/esm/locales/locale.d.ts +99 -105
  43. package/esm/locales/locale.js +1 -0
  44. package/esm/locales/pl-pl.d.ts +3 -5
  45. package/esm/locales/pl-pl.js +5 -4
  46. package/lib/__internal__/tooltip-provider/index.d.ts +19 -24
  47. package/lib/__internal__/tooltip-provider/index.js +1 -12
  48. package/lib/components/app-wrapper/app-wrapper.component.d.ts +4 -0
  49. package/lib/components/badge/badge.style.d.ts +4 -2
  50. package/lib/components/button/button-types.style.d.ts +1 -2
  51. package/lib/components/button/button-types.style.js +0 -1
  52. package/lib/components/button/button.component.d.ts +67 -36
  53. package/lib/components/button/button.component.js +3381 -172
  54. package/lib/components/button/button.config.d.ts +4 -3
  55. package/lib/components/button/button.style.d.ts +6 -8
  56. package/lib/components/button/button.style.js +52 -101
  57. package/lib/components/button/index.d.ts +2 -2
  58. package/lib/components/duelling-picklist/picklist-group/picklist-group.style.d.ts +1 -2
  59. package/lib/components/duelling-picklist/picklist-item/picklist-item.style.d.ts +1 -2
  60. package/lib/components/heading/heading.component.d.ts +5 -0
  61. package/lib/components/icon/index.d.ts +1 -0
  62. package/lib/components/multi-action-button/multi-action-button.component.d.ts +3 -1
  63. package/lib/components/multi-action-button/multi-action-button.component.js +6 -4
  64. package/lib/components/multi-action-button/multi-action-button.d.ts +4 -2
  65. package/lib/components/multi-step-wizard/multi-step-wizard.d.ts +22 -0
  66. package/lib/components/multi-step-wizard/step/step.d.ts +6 -0
  67. package/lib/components/multi-step-wizard/step/step.style.d.ts +4 -2
  68. package/lib/components/radio-button/radio-button-svg.component.js +38 -20
  69. package/lib/components/scrollable-list/scrollable-list.component.d.ts +8 -0
  70. package/lib/components/split-button/split-button-toggle.style.d.ts +2 -6
  71. package/lib/components/split-button/split-button.component.d.ts +3 -1
  72. package/lib/components/split-button/split-button.component.js +6 -3
  73. package/lib/components/split-button/split-button.d.ts +5 -2
  74. package/lib/components/tooltip/index.d.ts +2 -1
  75. package/lib/components/tooltip/tooltip-pointer.style.d.ts +10 -1
  76. package/lib/components/tooltip/tooltip-pointer.style.js +7 -15
  77. package/lib/components/tooltip/tooltip.component.d.ts +33 -2
  78. package/lib/components/tooltip/tooltip.component.js +221 -130
  79. package/lib/components/tooltip/tooltip.config.d.ts +2 -1
  80. package/lib/components/tooltip/tooltip.style.d.ts +7 -2
  81. package/lib/components/tooltip/tooltip.style.js +7 -22
  82. package/lib/components/typography/typography.component.d.ts +1 -1
  83. package/lib/locales/en-gb.d.ts +3 -5
  84. package/lib/locales/en-gb.js +2 -1
  85. package/lib/locales/index.d.ts +1 -1
  86. package/lib/locales/index.js +23 -0
  87. package/lib/locales/locale.d.ts +99 -105
  88. package/lib/locales/locale.js +5 -0
  89. package/lib/locales/package.json +6 -0
  90. package/lib/locales/pl-pl.d.ts +3 -5
  91. package/lib/locales/pl-pl.js +2 -1
  92. package/package.json +7 -4
  93. package/esm/components/button/button.d.ts +0 -85
  94. package/esm/components/tooltip/tooltip.d.ts +0 -40
  95. package/lib/components/button/button.d.ts +0 -85
  96. package/lib/components/tooltip/tooltip.d.ts +0 -40
@@ -1,134 +1,279 @@
1
- function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() {
2
+ _extends =
3
+ Object.assign ||
4
+ function (target) {
5
+ for (var i = 1; i < arguments.length; i++) {
6
+ var source = arguments[i];
7
+ for (var key in source) {
8
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
9
+ target[key] = source[key];
10
+ }
11
+ }
12
+ }
13
+ return target;
14
+ };
15
+ return _extends.apply(this, arguments);
16
+ }
2
17
 
3
- import React, { useRef } from "react";
18
+ import React from "react";
4
19
  import PropTypes from "prop-types";
5
20
  import Tippy from "@tippyjs/react/headless";
6
21
  import { sticky } from "tippy.js";
22
+ import invariant from "invariant";
7
23
  import StyledTooltip from "./tooltip.style";
8
24
  import StyledPointer from "./tooltip-pointer.style";
25
+ import { TOOLTIP_POSITIONS } from "./tooltip.config";
9
26
  import tagComponent from "../../__internal__/utils/helpers/tags/tags";
10
27
  import CarbonScopedTokensProvider from "../../style/design-tokens/carbon-scoped-tokens-provider/carbon-scoped-tokens-provider.component";
11
28
  const TOOLTIP_DELAY = 100;
12
29
  const tippyPlugins = [sticky];
13
- const Tooltip = /*#__PURE__*/React.forwardRef(({
14
- children,
15
- isVisible,
16
- position = "top",
17
- message,
18
- type,
19
- size = "medium",
20
- isPartOfInput,
21
- inputSize,
22
- id,
23
- bgColor,
24
- fontColor,
25
- flipOverrides,
26
- target,
27
- ...rest
28
- }, ref) => {
29
- const tooltipRef = useRef(ref || null);
30
+ const Tooltip = /*#__PURE__*/ React.forwardRef(
31
+ (
32
+ {
33
+ children,
34
+ isVisible,
35
+ position = "top",
36
+ message,
37
+ type,
38
+ size = "medium",
39
+ isPartOfInput,
40
+ inputSize,
41
+ id,
42
+ bgColor,
43
+ fontColor,
44
+ flipOverrides,
45
+ target,
46
+ ...rest
47
+ },
48
+ ref
49
+ ) => {
50
+ const isFlipOverridesValid =
51
+ !flipOverrides ||
52
+ (Array.isArray(flipOverrides) &&
53
+ flipOverrides.every((placement) =>
54
+ TOOLTIP_POSITIONS.includes(placement)
55
+ ));
56
+ invariant(
57
+ isFlipOverridesValid,
58
+ `The flipOverrides prop supplied to Tooltip must be an array containing some or all of ["top", "bottom", "left", "right"].`
59
+ );
30
60
 
31
- const tooltip = (attrs, content) => {
32
- const currentPosition = attrs["data-placement"] || position;
33
- return /*#__PURE__*/React.createElement(CarbonScopedTokensProvider, null, /*#__PURE__*/React.createElement(StyledTooltip, _extends({
34
- "data-element": "tooltip",
35
- role: "tooltip",
36
- tabIndex: "-1",
37
- type: type,
38
- size: size,
39
- id: id
40
- }, tagComponent("tooltip", rest), {
41
- isPartOfInput: isPartOfInput,
42
- inputSize: inputSize
43
- }, attrs, {
44
- position: currentPosition,
45
- ref: tooltipRef,
46
- bgColor: bgColor,
47
- fontColor: fontColor
48
- }), /*#__PURE__*/React.createElement(StyledPointer, _extends({
49
- key: "pointer",
50
- type: type
51
- }, attrs, {
52
- position: currentPosition,
53
- "data-popper-arrow": "",
54
- "data-element": "tooltip-pointer",
55
- bgColor: bgColor
56
- })), content));
57
- };
61
+ const tooltip = (attrs, content) => {
62
+ const currentPosition = attrs["data-placement"] || position;
63
+ return /*#__PURE__*/ React.createElement(
64
+ CarbonScopedTokensProvider,
65
+ null,
66
+ /*#__PURE__*/ React.createElement(
67
+ StyledTooltip,
68
+ _extends(
69
+ {
70
+ "data-element": "tooltip",
71
+ role: "tooltip",
72
+ tabIndex: -1,
73
+ type: type,
74
+ size: size,
75
+ id: id,
76
+ },
77
+ tagComponent("tooltip", rest),
78
+ {
79
+ isPartOfInput: isPartOfInput,
80
+ inputSize: inputSize,
81
+ },
82
+ attrs,
83
+ {
84
+ position: currentPosition,
85
+ ref: ref,
86
+ bgColor: bgColor,
87
+ fontColor: fontColor,
88
+ }
89
+ ),
90
+ /*#__PURE__*/ React.createElement(
91
+ StyledPointer,
92
+ _extends(
93
+ {
94
+ key: "pointer",
95
+ type: type,
96
+ },
97
+ attrs,
98
+ {
99
+ position: currentPosition,
100
+ "data-popper-arrow": "",
101
+ "data-element": "tooltip-pointer",
102
+ bgColor: bgColor,
103
+ }
104
+ )
105
+ ),
106
+ content
107
+ )
108
+ );
109
+ };
58
110
 
59
- return /*#__PURE__*/React.createElement(Tippy, _extends({
60
- placement: position,
61
- delay: TOOLTIP_DELAY
62
- }, isVisible !== undefined && {
63
- visible: isVisible
64
- }, {
65
- plugins: tippyPlugins,
66
- sticky: true,
67
- render: attrs => tooltip(attrs, message),
68
- reference: target,
69
- popperOptions: {
70
- modifiers: [...(flipOverrides ? [{
71
- name: "flip",
72
- options: {
73
- fallbackPlacements: flipOverrides
74
- }
75
- }] : []), {
76
- name: "computeStyles",
77
- options: {
78
- gpuAcceleration: false
111
+ return /*#__PURE__*/ React.createElement(
112
+ Tippy,
113
+ _extends(
114
+ {
115
+ placement: position,
116
+ delay: TOOLTIP_DELAY,
117
+ },
118
+ isVisible !== undefined && {
119
+ visible: isVisible,
120
+ },
121
+ {
122
+ plugins: tippyPlugins,
123
+ sticky: true,
124
+ render: (attrs) => tooltip(attrs, message),
125
+ reference: target,
126
+ popperOptions: {
127
+ modifiers: [
128
+ ...(flipOverrides
129
+ ? [
130
+ {
131
+ name: "flip",
132
+ options: {
133
+ fallbackPlacements: flipOverrides,
134
+ },
135
+ },
136
+ ]
137
+ : []),
138
+ {
139
+ name: "computeStyles",
140
+ options: {
141
+ gpuAcceleration: false,
142
+ },
143
+ },
144
+ ],
145
+ },
79
146
  }
80
- }]
81
- }
82
- }), children);
83
- });
84
- const placements = ["top", "bottom", "left", "right"];
85
- Tooltip.propTypes = {
86
- /** The message to be displayed within the tooltip */
87
- message: PropTypes.node.isRequired,
147
+ ),
148
+ children
149
+ );
150
+ }
151
+ );
88
152
 
89
- /** The id attribute to use for the tooltip */
153
+ Tooltip.propTypes = {
154
+ /**
155
+ * Override background color of the Tooltip, provide any color from palette or any valid css color value.
156
+ */
157
+ bgColor: PropTypes.string,
158
+ /**
159
+ * Children elements
160
+ */
161
+ children: PropTypes.element.isRequired,
162
+ /**
163
+ * Overrides the default flip behaviour of the Tooltip,
164
+ * must be an array containing some or all of ["top", "bottom", "left", "right"]
165
+ * (see https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements)
166
+ */
167
+ flipOverrides: PropTypes.arrayOf(
168
+ PropTypes.oneOf(["bottom", "left", "right", "top"])
169
+ ),
170
+ /**
171
+ * Override font color of the Tooltip, provide any color from palette or any valid css color value.
172
+ */
173
+ fontColor: PropTypes.string,
174
+ /**
175
+ * The id attribute to use for the tooltip
176
+ */
90
177
  id: PropTypes.string,
91
-
92
- /** Whether to to show the Tooltip */
178
+ inputSize: PropTypes.oneOf(["large", "medium", "small"]),
179
+ isPartOfInput: PropTypes.bool,
180
+ /**
181
+ * Whether to to show the Tooltip
182
+ */
93
183
  isVisible: PropTypes.bool,
94
-
95
- /** Sets position of the tooltip */
96
- position: PropTypes.oneOf(placements),
97
-
98
- /** Defines the message type */
184
+ key: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
185
+ /**
186
+ * The message to be displayed within the tooltip
187
+ */
188
+ message: PropTypes.node,
189
+ /**
190
+ * Sets position of the tooltip
191
+ */
192
+ position: PropTypes.oneOf(["bottom", "left", "right", "top"]),
193
+ /**
194
+ * Defines the size of the tooltip content
195
+ */
196
+ size: PropTypes.oneOf(["large", "medium"]),
197
+ target: function (props, propName) {
198
+ if (props[propName] == null) {
199
+ return null;
200
+ } else if (
201
+ typeof props[propName] !== "object" ||
202
+ props[propName].nodeType !== 1
203
+ ) {
204
+ return new Error(
205
+ "Expected prop '" + propName + "' to be of type Element"
206
+ );
207
+ }
208
+ },
209
+ /**
210
+ * Defines the message type
211
+ */
99
212
  type: PropTypes.string,
213
+ };
100
214
 
101
- /** Children elements */
102
- children: PropTypes.node.isRequired,
103
-
104
- /** Defines the size of the tooltip content */
105
- size: PropTypes.oneOf(["medium", "large"]),
106
- // Reference element, tooltip will be positioned in relation to this element
107
- target: PropTypes.instanceOf(Element),
108
-
109
- /** Override background color of the Tooltip, provide design token, any color from palette or any valid css color value. */
215
+ Tooltip.propTypes = {
216
+ /**
217
+ * Override background color of the Tooltip, provide any color from palette or any valid css color value.
218
+ */
110
219
  bgColor: PropTypes.string,
111
-
112
- /** Override font color of the Tooltip, provide design token, any color from palette or any valid css color value. */
220
+ /**
221
+ * Children elements
222
+ */
223
+ children: PropTypes.element.isRequired,
224
+ /**
225
+ * Overrides the default flip behaviour of the Tooltip,
226
+ * must be an array containing some or all of ["top", "bottom", "left", "right"]
227
+ * (see https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements)
228
+ */
229
+ flipOverrides: PropTypes.arrayOf(
230
+ PropTypes.oneOf(["bottom", "left", "right", "top"])
231
+ ),
232
+ /**
233
+ * Override font color of the Tooltip, provide any color from palette or any valid css color value.
234
+ */
113
235
  fontColor: PropTypes.string,
114
-
115
- /** @ignore @private */
236
+ /**
237
+ * The id attribute to use for the tooltip
238
+ */
239
+ id: PropTypes.string,
240
+ inputSize: PropTypes.oneOf(["large", "medium", "small"]),
116
241
  isPartOfInput: PropTypes.bool,
117
-
118
- /** @ignore @private */
119
- inputSize: PropTypes.oneOf(["small", "medium", "large"]),
120
-
121
- /** Overrides the default flip behaviour of the Tooltip, must be an array containing some or all of ["top", "bottom", "left", "right"] (see https://popper.js.org/docs/v2/modifiers/flip/#fallbackplacements) */
122
- flipOverrides: (props, propName) => {
123
- const prop = props[propName];
124
- const isValid = prop && Array.isArray(prop) && prop.every(placement => placements.includes(placement));
125
-
126
- if (!prop || isValid) {
242
+ /**
243
+ * Whether to to show the Tooltip
244
+ */
245
+ isVisible: PropTypes.bool,
246
+ key: PropTypes.oneOfType([PropTypes.number, PropTypes.string]),
247
+ /**
248
+ * The message to be displayed within the tooltip
249
+ */
250
+ message: PropTypes.node,
251
+ /**
252
+ * Sets position of the tooltip
253
+ */
254
+ position: PropTypes.oneOf(["bottom", "left", "right", "top"]),
255
+ /**
256
+ * Defines the size of the tooltip content
257
+ */
258
+ size: PropTypes.oneOf(["large", "medium"]),
259
+ target: function (props, propName) {
260
+ if (props[propName] == null) {
127
261
  return null;
262
+ } else if (
263
+ typeof props[propName] !== "object" ||
264
+ props[propName].nodeType !== 1
265
+ ) {
266
+ return new Error(
267
+ "Expected prop '" + propName + "' to be of type Element"
268
+ );
128
269
  }
129
-
130
- return new Error( // eslint-disable-next-line max-len
131
- `The \`${propName}\` prop supplied to \`Tooltip\` must be an array containing some or all of ["top", "bottom", "left", "right"].`);
132
- }
270
+ },
271
+ /**
272
+ * Defines the message type
273
+ */
274
+ type: PropTypes.string,
133
275
  };
134
- export default Tooltip;
276
+
277
+ export { Tooltip };
278
+ Tooltip.displayName = "Tooltip";
279
+ export default Tooltip;
@@ -1 +1,2 @@
1
- export const TOOLTIP_POSITIONS: string[];
1
+ export declare const TOOLTIP_POSITIONS: string[];
2
+ export declare type TooltipPositions = "top" | "bottom" | "left" | "right";
@@ -1,2 +1,7 @@
1
- export default StyledTooltipWrapper;
2
- declare const StyledTooltipWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
1
+ import { Placement } from "tippy.js";
2
+ import { TooltipProps } from "./tooltip.component";
3
+ interface StyledTooltipProps extends Omit<TooltipProps, "children" | "message" | "position"> {
4
+ position: Placement;
5
+ }
6
+ declare const StyledTooltip: import("styled-components").StyledComponent<"div", any, StyledTooltipProps, never>;
7
+ export default StyledTooltip;
@@ -1,5 +1,4 @@
1
1
  import styled, { css, keyframes } from "styled-components";
2
- import PropTypes from "prop-types";
3
2
  import baseTheme from "../../style/themes/base";
4
3
  import { toColor } from "../../style/utils/color";
5
4
  const fadeIn = keyframes`
@@ -12,7 +11,7 @@ const fadeIn = keyframes`
12
11
  }
13
12
  `;
14
13
 
15
- const tooltipColor = (type, theme, bgColor) => {
14
+ const tooltipColor = (theme, bgColor, type) => {
16
15
  if (bgColor) return toColor(theme, bgColor);
17
16
  return type === "error" ? "var(--colorsSemanticNegative500)" : "var(--colorsSemanticNeutral500)";
18
17
  };
@@ -51,14 +50,14 @@ const tooltipOffset = (position, inputSize, isPartOfInput) => {
51
50
  }
52
51
  };
53
52
 
54
- const StyledTooltipWrapper = styled.div`
53
+ const StyledTooltip = styled.div`
55
54
  ${({
56
55
  position,
57
56
  size,
58
57
  theme,
59
58
  type,
60
59
  isPartOfInput,
61
- inputSize,
60
+ inputSize = "medium",
62
61
  bgColor,
63
62
  fontColor
64
63
  }) => css`
@@ -77,24 +76,11 @@ const StyledTooltipWrapper = styled.div`
77
76
  font-size: ${size === "medium" ? "14px" : "16px"};
78
77
  line-height: 1.5rem;
79
78
  font-weight: 400;
80
- background-color: ${tooltipColor(type, theme, bgColor)};
79
+ background-color: ${tooltipColor(theme, bgColor, type)};
81
80
  ${tooltipOffset(position, inputSize, isPartOfInput)};
82
81
  `}
83
82
  `;
84
- StyledTooltipWrapper.propTypes = {
85
- position: PropTypes.oneOf(["top", "bottom", "left", "right"]),
86
- size: PropTypes.oneOf(["medium", "large"]),
87
- theme: PropTypes.object,
88
- type: PropTypes.string,
89
- isPartOfInput: PropTypes.bool,
90
- inputSize: PropTypes.oneOf(["small", "medium", "large"]),
91
- bgColor: PropTypes.string,
92
- fontColor: PropTypes.string
83
+ StyledTooltip.defaultProps = {
84
+ theme: baseTheme
93
85
  };
94
- StyledTooltipWrapper.defaultProps = {
95
- theme: baseTheme,
96
- size: "medium",
97
- inputSize: "medium",
98
- position: "top"
99
- };
100
- export default StyledTooltipWrapper;
86
+ export default StyledTooltip;
@@ -12,4 +12,4 @@ declare const Typography: import("styled-components").StyledComponent<"span", an
12
12
  color: any;
13
13
  bg: any;
14
14
  backgroundColor: any;
15
- }, "as" | "size" | "textDecoration" | "lineHeight" | "textTransform" | "weight" | "defaultMargin">;
15
+ }, "as" | "textDecoration" | "size" | "lineHeight" | "textTransform" | "weight" | "defaultMargin">;
@@ -1,5 +1,3 @@
1
- import Locale from ".";
2
-
3
- declare const EnGb: Locale;
4
-
5
- export default EnGb;
1
+ import Locale from "./locale";
2
+ declare const enGB: Locale;
3
+ export default enGB;
@@ -1,8 +1,8 @@
1
- import { enGB } from "./date-fns-locales";
1
+ import { enGB as enGBDateLocale } from "./date-fns-locales";
2
2
 
3
3
  const isSingular = count => (typeof count === "string" ? parseInt(count) : count) === 1;
4
4
 
5
- export default {
5
+ const enGB = {
6
6
  locale: () => "en-GB",
7
7
  actions: {
8
8
  edit: () => "Edit",
@@ -19,7 +19,7 @@ export default {
19
19
  yes: () => "Yes"
20
20
  },
21
21
  date: {
22
- dateFnsLocale: () => enGB
22
+ dateFnsLocale: () => enGBDateLocale
23
23
  },
24
24
  dialog: {
25
25
  ariaLabels: {
@@ -128,4 +128,5 @@ export default {
128
128
  }
129
129
  }
130
130
  }
131
- };
131
+ };
132
+ export default enGB;
@@ -1,3 +1,3 @@
1
- export { default } from "./locale";
1
+ export type { default } from "./locale";
2
2
  export { default as EnGb } from "./en-gb";
3
3
  export { default as PlPl } from "./pl-pl";
@@ -0,0 +1,2 @@
1
+ export { default as EnGb } from "./en-gb";
2
+ export { default as PlPl } from "./pl-pl";