@graphcommerce/next-ui 6.2.0-canary.76 → 6.2.0-canary.78

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 6.2.0-canary.78
4
+
5
+ ## 6.2.0-canary.77
6
+
3
7
  ## 6.2.0-canary.76
4
8
 
5
9
  ### Patch Changes
@@ -5,6 +5,13 @@ export type DateTimeFormatProps = Intl.DateTimeFormatOptions
5
5
 
6
6
  export function useDateTimeFormat(props?: DateTimeFormatProps) {
7
7
  const { locale } = useRouter()
8
- const formatter = useMemo(() => new Intl.DateTimeFormat(locale, props), [locale, props])
8
+
9
+ // Remove optional dialect from locale, which Intl.NumberFormat does not support.
10
+ const strippedLocale = locale?.split('-', 2).join('-')
11
+
12
+ const formatter = useMemo(
13
+ () => new Intl.DateTimeFormat(strippedLocale, props),
14
+ [strippedLocale, props],
15
+ )
9
16
  return formatter
10
17
  }
@@ -5,6 +5,13 @@ export type NumberFormatProps = Intl.NumberFormatOptions
5
5
 
6
6
  export function useNumberFormat(props?: NumberFormatProps) {
7
7
  const { locale } = useRouter()
8
- const formatter = useMemo(() => new Intl.NumberFormat(locale, props), [locale, props])
8
+
9
+ // Remove optional dialect from locale, which Intl.NumberFormat does not support.
10
+ const strippedLocale = locale?.split('-', 2).join('-')
11
+
12
+ const formatter = useMemo(
13
+ () => new Intl.NumberFormat(strippedLocale, props),
14
+ [strippedLocale, props],
15
+ )
9
16
  return formatter
10
17
  }
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@graphcommerce/next-ui",
3
3
  "homepage": "https://www.graphcommerce.org/",
4
4
  "repository": "github:graphcommerce-org/graphcommerce",
5
- "version": "6.2.0-canary.76",
5
+ "version": "6.2.0-canary.78",
6
6
  "author": "",
7
7
  "license": "MIT",
8
8
  "sideEffects": false,
@@ -18,18 +18,18 @@
18
18
  "@emotion/react": "^11.11.1",
19
19
  "@emotion/server": "^11.11.0",
20
20
  "@emotion/styled": "^11.11.0",
21
- "@graphcommerce/framer-next-pages": "6.2.0-canary.76",
22
- "@graphcommerce/framer-scroller": "6.2.0-canary.76",
23
- "@graphcommerce/framer-utils": "6.2.0-canary.76",
24
- "@graphcommerce/image": "6.2.0-canary.76",
21
+ "@graphcommerce/framer-next-pages": "6.2.0-canary.78",
22
+ "@graphcommerce/framer-scroller": "6.2.0-canary.78",
23
+ "@graphcommerce/framer-utils": "6.2.0-canary.78",
24
+ "@graphcommerce/image": "6.2.0-canary.78",
25
25
  "cookie": "^0.5.0",
26
26
  "react-is": "^18.2.0",
27
27
  "schema-dts": "^1.1.0"
28
28
  },
29
29
  "devDependencies": {
30
- "@graphcommerce/eslint-config-pwa": "6.2.0-canary.76",
31
- "@graphcommerce/prettier-config-pwa": "6.2.0-canary.76",
32
- "@graphcommerce/typescript-config-pwa": "6.2.0-canary.76",
30
+ "@graphcommerce/eslint-config-pwa": "6.2.0-canary.78",
31
+ "@graphcommerce/prettier-config-pwa": "6.2.0-canary.78",
32
+ "@graphcommerce/typescript-config-pwa": "6.2.0-canary.78",
33
33
  "@types/cookie": "^0.5.1",
34
34
  "@types/react-is": "^18.2.0",
35
35
  "typescript": "5.1.3"