@fiscozen/composables 0.1.29 → 0.1.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiscozen/composables",
3
- "version": "0.1.29",
3
+ "version": "0.1.30",
4
4
  "description": "Design System utility composables",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -14,7 +14,7 @@ export const useCurrency = (options: FzUseCurrencyOptions) => {
14
14
  }
15
15
  const safeOptions: Intl.NumberFormatOptions = {
16
16
  minimumFractionDigits: options.minimumFractionDigits,
17
- useGrouping: false
17
+ useGrouping: options.useGrouping || false
18
18
  }
19
19
  if (options.maximumFractionDigits !== null) {
20
20
  safeOptions.maximumFractionDigits = options.maximumFractionDigits
@@ -82,11 +82,7 @@ export const useFloating = (
82
82
  let translateY = 0
83
83
  let translateX = 0
84
84
 
85
- if (
86
- args.opener?.value &&
87
- safeOpenerDomRef.value &&
88
- openerRect?.value
89
- ) {
85
+ if (args.opener?.value && safeOpenerDomRef.value && openerRect?.value) {
90
86
  const leftWithoutXMargin =
91
87
  openerRect.value.left - parseFloat(elStyle.marginLeft) - parseFloat(elStyle.marginRight)
92
88
  const leftWithoutLeftMargin = openerRect.value.left - parseFloat(elStyle.marginLeft)
@@ -310,7 +306,7 @@ export const useFloating = (
310
306
 
311
307
  if (args.callback?.value) {
312
308
  args.callback.value(rect, openerRect, containerRect, position, actualPosition)
313
- }
309
+ }
314
310
  })
315
311
 
316
312
  onUnmounted(() => {
package/src/types.ts CHANGED
@@ -55,4 +55,5 @@ export interface FzUseFloatingArgs {
55
55
  export interface FzUseCurrencyOptions {
56
56
  minimumFractionDigits: number
57
57
  maximumFractionDigits: number | null
58
+ useGrouping?: boolean
58
59
  }