@harpercollins/harpercollins-design-system 1.8.65 → 1.8.67

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- export declare const NULL_DISPLAY_VALUE = "-";
1
+ export declare const NULL_DISPLAY_VALUE: string;
@@ -2,7 +2,7 @@
2
2
  * Format date to locale
3
3
  * @param dateString - The date string to format
4
4
  * @param format - The format to display the date in. Default is "dd MMM yyyy"
5
- * @returns - The formatted date
5
+ * @returns The formatted date
6
6
  */
7
7
  export declare const formatDate: (dateString: string | null | undefined, format?: string) => string;
8
8
  /**
@@ -12,7 +12,7 @@ export declare const formatDate: (dateString: string | null | undefined, format?
12
12
  */
13
13
  export declare const formatNumber: (number: number | string | null | undefined) => string;
14
14
  /**
15
- * Format text to display NULL_DISPLAY_VALUE if text is empty, null or undefined
15
+ * Format text
16
16
  * @param text
17
17
  * @returns The formatted text
18
18
  */
@@ -24,4 +24,4 @@ export declare const formatText: (text: string | null | undefined) => string;
24
24
  * @param currency - The currency to format the value to
25
25
  * @returns The formatted currency value
26
26
  * */
27
- export declare const formatCurrency: (value: number | string | null | undefined, locale?: string, currency?: string) => string;
27
+ export declare const formatCurrency: (value: number | string | null | undefined, locale?: string | undefined, options?: Intl.NumberFormatOptions) => string;
package/dist/index.d.ts CHANGED
@@ -299,7 +299,7 @@ declare const useFetch: <T = unknown>(url: string, options?: RequestInit, deboun
299
299
  * Format date to locale
300
300
  * @param dateString - The date string to format
301
301
  * @param format - The format to display the date in. Default is "dd MMM yyyy"
302
- * @returns - The formatted date
302
+ * @returns The formatted date
303
303
  */
304
304
  declare const formatDate: (dateString: string | null | undefined, format?: string) => string;
305
305
  /**
@@ -309,7 +309,7 @@ declare const formatDate: (dateString: string | null | undefined, format?: strin
309
309
  */
310
310
  declare const formatNumber: (number: number | string | null | undefined) => string;
311
311
  /**
312
- * Format text to display NULL_DISPLAY_VALUE if text is empty, null or undefined
312
+ * Format text
313
313
  * @param text
314
314
  * @returns The formatted text
315
315
  */
@@ -321,6 +321,6 @@ declare const formatText: (text: string | null | undefined) => string;
321
321
  * @param currency - The currency to format the value to
322
322
  * @returns The formatted currency value
323
323
  * */
324
- declare const formatCurrency: (value: number | string | null | undefined, locale?: string, currency?: string) => string;
324
+ declare const formatCurrency: (value: number | string | null | undefined, locale?: string | undefined, options?: Intl.NumberFormatOptions) => string;
325
325
 
326
326
  export { Accordion, AppBar, AutoComplete as Autocomplete, AutocompleteSelectMultiple, Badge, Breadcrumb, Button, Divider, Modal as Drawer, DropDownMenu, Heading, Icon, Input, Layout, LoadingSpinner, Logo, ProgressBar, ProgressCircle, ReadMore, RelativeTime, StatusIcon, Table, Tabs, TextBlock, ToastMessages, Tooltip, formatCurrency, formatDate, formatNumber, formatText, useFetch, useLocalStorage, useToggle };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@harpercollins/harpercollins-design-system",
3
- "version": "1.8.65",
3
+ "version": "1.8.67",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git@ssh.dev.azure.com:v3/HarperCollinsUK/HCDesignSystem/HCDesignSystem"