unovue / radix-vue

Vue port of Radix UI Primitives. An open-source UI component library for building high-quality, accessible design systems and web apps.
https://radix-vue.com
MIT License
3.66k stars 226 forks source link

[Bug]: Number Field Doesn't working well if locale is 'ar' #1204

Open peter-emad99 opened 3 months ago

peter-emad99 commented 3 months ago

Environment

Developement/Production OS: Windows 10 19043.1110
Node version: 16.0.0
Package manager: pnpm@8.6.0
Radix Vue version: 1.0.0
Vue version: 3.0.0
Nuxt version: 3.0.0
Nuxt mode: universal
Nuxt target: server
CSS framework: tailwindcss@3.3.3
Client OS: Windows 10 19043.1110
Browser: Chrome 90.0.4430.212

Link to minimal reproduction

https://stackblitz.com/edit/9vt2xh?file=src%2FApp.vue

Steps to reproduce

use these props on NumberFieldRotte Component

:format-options="{
      style: 'unit',
      unit:'day',
      unitDisplay: 'long',
    }"
:locale="ar"
:min="0"

Describe the bug

i'm using this option on number-field it working well if locale is en or fr but when locale is ar increment and decrement start the unexpected beheviour if value less than 3 ( that's what i get with trial)

Expected behavior

No response

Context & Screenshots (if applicable)

No response

zernonia commented 3 months ago

Thanks for the issue @peter-emad99 . I believe it might be upstream issue with @internationalized/number. seeing the same issue with react-aria-components

zernonia commented 2 months ago

upstream issue https://github.com/adobe/react-spectrum/issues/6861

peter-emad99 commented 2 months ago

https://formkit.com/playground?fkv=latest&fileTab=unit.vue&css-framework=genesis&imports=jc%28%27name%21%27ImportMap%27%7Elang%21%27json%27%7Eeditor%21%27%28*+1vue%5C%211https%3A%2F%2Fcdn.jsdelivr.net%2Fnpm%2Fvue%403%2Fdist%2Fvue.esm-browser.min.js0*%29*%27%29*%5Cn0%5C%271+0%0110*_&files=jc%5B%28%27naS%21%279.vue%27%7Eedqor%21%27%3Cscript+setupJconst+R+%3D+%28*dN7*tH7*dayZ2%2C*vY7*%22dP-9%2276%296IscriptJ6%3C_%3E*%3CO*Ev-slot5QWEtype5formWE%3Aactions5fzseWE%3AvM5RWXkiloSUrAdN8DNBSUrGXcelsiusAtH8THBCelsiuG3displayLocze5ar-egW95dayAday8DayGXfluid-ounceAvY8VYBfluid+ounceGXjAdP-98DP+9BjGJ%3Cpre+wrap%3E%28Q%29Ipre%3E*IOJI_J%27%7Esyntax%21%27html%27%7Eadded%21true%29%5D*6E3J%3CO*type59W4%5C%275%3D46%5Cn7Z100%2C8Wlabel59unqAWnaS5B+in+E++Gs46%2FHemperatureI%3C%2FJ%3E6MzueNistanceOFormKqPigqzQ%28+vM+%29RinqizVMsSmeUteW4*X395YoluSZ%3A+_UmplaUjSgabyUqitzal%01zqj_ZYXWUSRQPONMJIHGEBA9876543*_

it seems formkit unit input working with singular and dual number in unit formating ..