@cloudflare/kumo 2.13.2 → 2.14.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.
- package/CHANGELOG.md +25 -0
- package/README.md +2 -2
- package/ai/component-registry.json +548 -8
- package/ai/component-registry.md +853 -19
- package/ai/schemas.ts +90 -2
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +311 -69
- package/dist/ai/schemas.js +185 -23
- package/dist/catalog.d.ts +11 -11
- package/dist/chunks/{AlertDialogTrigger-k3f8nevrda6awa4s.js → AlertDialogTrigger-dkihgpvj12si73w3.js} +5 -5
- package/dist/chunks/{AutocompleteItem-ksckpihly1c23f3j.js → AutocompleteItem-drxau0wm3735nihq.js} +17 -29
- package/dist/chunks/AutocompleteSeparator-hqtaxxxye1rfezfg.js +12 -0
- package/dist/chunks/{Button-oczevl8g75m85ew9.js → Button-ccl5r1xlbe3gh998.js} +3 -3
- package/dist/chunks/{CSPContext-guqghj8kxoukvlky.js → CSPContext-ctyrgg64girv38ls.js} +1 -7
- package/dist/chunks/{CSPProvider-f3it239kgztzgryk.js → CSPProvider-p9ensukmowjpkgc0.js} +2 -2
- package/dist/chunks/{CheckboxGroup-g5xn5gnq8ocqyoum.js → CheckboxGroup-knvypu2d1s0iz86k.js} +63 -45
- package/dist/chunks/{CheckboxGroupContext-f9wox07n2u5moq4h.js → CheckboxGroupContext-lgc9dwxou662i6zo.js} +3 -5
- package/dist/chunks/{CheckboxRoot-o5bfpje6e4p6pdgm.js → CheckboxIndicator-n982pbktfkxsa5zz.js} +128 -132
- package/dist/chunks/{CollapsiblePanel-e80n35tnsb2cskt9.js → CollapsiblePanel-jm0ni90g7wz7ppkc.js} +33 -36
- package/dist/chunks/{ComboboxClear-glm805v81uaaf3su.js → ComboboxClear-c2kvjkh9yc6xfl38.js} +83 -98
- package/dist/chunks/{ComboboxEmpty-hwv2kjxnf9un635e.js → ComboboxEmpty-o0q20j2l2syar9kx.js} +662 -586
- package/dist/chunks/{ComboboxPopup-fx7xex6g75t9u0gm.js → ComboboxPopup-oxgggc2wxy6bfmru.js} +57 -57
- package/dist/chunks/{CompositeItem-l7zee38lq5m224d5.js → CompositeItem-hzuk5x3e5zsfgnyj.js} +4 -7
- package/dist/chunks/CompositeList-lbr4enu6yzek7oa9.js +180 -0
- package/dist/chunks/{CompositeListContext-oetjj2x8li8678as.js → CompositeListContext-m9frxn53kkmr23d0.js} +2 -5
- package/dist/chunks/{CompositeRoot-l6ot8jo0umdics5m.js → CompositeRoot-g72lchaerolf5dc9.js} +61 -63
- package/dist/chunks/{CompositeRootContext-ofhzmevv7hadjhyy.js → CompositeRootContext-ixz4myr7uwvavx6w.js} +1 -1
- package/dist/chunks/DialogHandle-klk7uo1q1y8ghyx5.js +68 -0
- package/dist/chunks/{DialogPopup-mp89aob2nown2akq.js → DialogPopup-olsvyf7ulia6ekb1.js} +28 -71
- package/dist/chunks/DialogRoot-hl3genvzl9h8ridm.js +16 -0
- package/dist/chunks/{DialogTrigger-cmok07cf3ks0kzug.js → DialogTrigger-g44cuem7n4wez533.js} +23 -20
- package/dist/chunks/DialogViewport-e1tqfisqexc7o9z8.js +42 -0
- package/dist/chunks/{DirectionContext-jc1g0w645603sd6p.js → DirectionContext-opvqcb794uxicri4.js} +1 -4
- package/dist/chunks/{DirectionProvider-ihtfgxd5qpm6oth1.js → DirectionProvider-er2gibtc9a1f0kep.js} +2 -2
- package/dist/chunks/DrawerViewport-eqzib92gukr4qap3.js +1483 -0
- package/dist/chunks/{FieldControl-oz007qbkl6ejp7di.js → FieldControl-c5sahhd5xg3nr2x7.js} +58 -31
- package/dist/chunks/{FieldDescription-ju607ea6gwgzga8p.js → FieldDescription-ldfiii5bvssfib3d.js} +13 -12
- package/dist/chunks/{FieldItemContext-j85dc0ihramj5ezs.js → FieldItemContext-kpsmvqm5a98m8zpx.js} +1 -1
- package/dist/chunks/FieldLabel-j9teqs9f1exqv346.js +351 -0
- package/dist/chunks/{FieldsetLegend-j5piwq1giyhrr8s4.js → FieldsetLegend-jyy40ylt2ynkvgob.js} +7 -14
- package/dist/chunks/{FieldsetRootContext-b633e9uzilttuyfi.js → FieldsetRootContext-7nlstw7wronafxhw.js} +1 -1
- package/dist/chunks/{FloatingPortalLite-mlt7ztrvhzepwi5y.js → FloatingPortalLite-da0wdcmem7ahkle6.js} +3 -3
- package/dist/chunks/{FloatingTree-oosjswl1s9q4obvg.js → FloatingTree-lhdqtlu8s6m66n7l.js} +6 -6
- package/dist/chunks/Form-fjfbann47c7ws316.js +113 -0
- package/dist/chunks/{FormContext-xz0b4h7ue30fkkn1.js → FormContext-bsu99v8i8pwu1yxc.js} +4 -3
- package/dist/chunks/{Input-ovqfhsmpfcrg5czm.js → Input-irwtufp5t73pwnoj.js} +2 -2
- package/dist/chunks/{LabelableContext-hetas2e4y0kywfas.js → LabelableContext-ccxbhu73vrk089m1.js} +18 -45
- package/dist/chunks/ListboxSeparator-nfyv54r2v5qtmosj.js +21 -0
- package/dist/chunks/{MenuBackdrop-dlntmavtopj7wv0l.js → MenuBackdrop-ouznwyglg27bosoj.js} +7 -12
- package/dist/chunks/{MenuSubmenuTrigger-fzubf5xr7ohsgsi7.js → MenuSubmenuTrigger-mbbda6ucik6nphbq.js} +378 -292
- package/dist/chunks/{MenuTrigger-ntugq34yppc8ouwe.js → MenuTrigger-disngqnt74owi30p.js} +32 -41
- package/dist/chunks/{Menubar-d57cyjuztbge4dvv.js → Menubar-fluuxyn8c2zuz5pr.js} +12 -23
- package/dist/chunks/{MenubarContext-ei2r6vu6lmsspozo.js → MenubarContext-blatefsj42br7jh8.js} +1 -1
- package/dist/chunks/{MeterLabel-c40b0q8r81cftkjj.js → MeterLabel-k6no448jvaidaptf.js} +15 -18
- package/dist/chunks/NullStore-jwgpmovsgl47g9bv.js +109 -0
- package/dist/chunks/{PopoverClose-e91n3nkw16qnyese.js → PopoverClose-kpyt8hbqc52lnjb8.js} +183 -190
- package/dist/chunks/PrehydrationScript-j6zlrxmojrqni6b9.js +63 -0
- package/dist/chunks/{RadioGroup-lsix4haqxfigpuv8.js → RadioGroup-pok1e5qbnbujrz1e.js} +38 -35
- package/dist/chunks/{RadioGroupContext-ft0nndmzqynjz8a2.js → RadioGroupContext-galfnl2el7y2krov.js} +1 -1
- package/dist/chunks/{RadioIndicator-mwkahpwyqfc6yk1i.js → RadioIndicator-jd511oajbwmyjxbg.js} +49 -102
- package/dist/chunks/{ScrollAreaThumb-kmhan411yxfo0362.js → ScrollAreaThumb-eed3hf0pmrblshfw.js} +298 -385
- package/dist/chunks/{SelectGroupLabel-m4h5hrft9043nsd1.js → SelectSeparator-mrjooj7vmjez6fua.js} +447 -502
- package/dist/chunks/{Separator-b8wf5rea6m1cei8k.js → Separator-bcm4ezllqxvtpvuj.js} +2 -2
- package/dist/chunks/{SwitchRoot-e3hnyh3mf8qd30hj.js → SwitchRoot-gahuqddsq1s55p8m.js} +40 -85
- package/dist/chunks/{TabsList-c0inft3sf8gi2o4v.js → TabsList-ebl0v8gu8wn28zss.js} +204 -175
- package/dist/chunks/{Toggle-c8p9m3puz8l4mav7.js → Toggle-mbshs50266z9hgxp.js} +12 -13
- package/dist/chunks/{ToggleGroup-xz9zrh7t1htn6ht4.js → ToggleGroup-k2caz2ghv6zbzp5l.js} +13 -38
- package/dist/chunks/{ToggleGroupContext-cdk2zo6ciddpockn.js → ToggleGroupContext-h4v7jaf77rp2xng9.js} +3 -5
- package/dist/chunks/{ToolbarGroupContext-nriz3632ymugfj6h.js → ToolbarGroupContext-e5cg7needj0edodc.js} +3 -5
- package/dist/chunks/{ToolbarInput-er5t9irqvuwcjrir.js → ToolbarInput-i4h95tes75w0p5y2.js} +28 -33
- package/dist/chunks/{ToolbarRootContext-lvi96r1vvs93rhde.js → ToolbarRootContext-eqk40r8uh4h6r211.js} +1 -1
- package/dist/chunks/{TooltipPopup-l2zrbjavf1cqclfx.js → TooltipPopup-dm4y0hbdeylzp22y.js} +125 -127
- package/dist/chunks/{TooltipProvider-eyhgia63aq2x4frl.js → TooltipProvider-h40qf9wcn0atj15v.js} +14 -17
- package/dist/chunks/adaptiveOriginMiddleware-b8ztjthe278xq7lm.js +51 -0
- package/dist/chunks/{addEventListener-lhqvk2ahlzjsanyg.js → addEventListener-l40nxvf06iukgvnj.js} +1 -1
- package/dist/chunks/areArraysEqual-bcx201k1x9ziizym.js +15 -0
- package/dist/chunks/{autocomplete-dn6g4rc8bktdl4an.js → autocomplete-m6h1pbygknrz5div.js} +7 -7
- package/dist/chunks/{badge-xw5ydgdjx2o5qxbl.js → badge-dq8bx752b9dp7dst.js} +2 -1
- package/dist/chunks/{banner-n1ekcvrwashsgv93.js → banner-msnmqm7of2lck01x.js} +2 -2
- package/dist/chunks/{breadcrumbs-ffwe8tzqzmpyikq5.js → breadcrumbs-lhi1qrdh74mb4zsx.js} +4 -3
- package/dist/chunks/button-group-i9dh83xutyuxyry7.js +59 -0
- package/dist/chunks/{button-h36q7tklakhd38nx.js → button-pa1bq9b85hawg41a.js} +1 -1
- package/dist/chunks/{chart-qmls2klknm1pd6hs.js → chart-kd1xd6crso2i956o.js} +936 -49
- package/dist/chunks/{checkbox-jachq6akfh72x12r.js → checkbox-lbo436duy7krxcsk.js} +6 -7
- package/dist/chunks/clamp-jcjhzx71s6wt1rnc.js +7 -0
- package/dist/chunks/{clipboard-text-ms46uaujvkjmjnng.js → clipboard-text-gd6s3n1bqse9zgt8.js} +5 -5
- package/dist/chunks/{collapsible-jyajpe40jcca357s.js → collapsible-l8g94on4w7qfosmn.js} +1 -1
- package/dist/chunks/{combobox-hxarufzb1z61xnbv.js → combobox-hdxtsm2gqcxxgfju.js} +12 -11
- package/dist/chunks/{command-palette-iomiziccabzh4ogg.js → command-palette-crtm3nd32yjhuax1.js} +7 -7
- package/dist/chunks/{composite-o65hjzwwzb4kvl4w.js → composite-ab8dmdfoj6tmhcn1.js} +9 -21
- package/dist/chunks/{constants-j09lrtg73n4vlx5x.js → constants-flxfd6q03phtu007.js} +1 -1
- package/dist/chunks/{core-kjfqbvgicl9i3abf.js → core-n0de50o00ej2ecfe.js} +69 -55
- package/dist/chunks/createBaseUIEventDetails-3ob3qgs95ffm8l0w.js +49 -0
- package/dist/chunks/{ComboboxChipRemove-ksyozjezihhstmbu.js → createItems-b8n8vigg5nak6j9s.js} +113 -57
- package/dist/chunks/{createToastManager-kv89sv0xhhsvmq54.js → createToastManager-onmoqrmr8zo02rif.js} +305 -357
- package/dist/chunks/{css-d3t41yfupsmz7l1a.js → css-j501gxq1am2gnikh.js} +1 -1
- package/dist/chunks/{date-picker-fwe3vllwco4u1utz.js → date-picker-cotkexrpqu5tjikv.js} +54 -49
- package/dist/chunks/{date-range-picker-iymdx410i1hpvxai.js → date-range-picker-i6d8y1yemm7x5ins.js} +15 -14
- package/dist/chunks/{dialog-o0164pgcyc74lvp9.js → dialog-glpnivujociqs9lh.js} +13 -10
- package/dist/chunks/{dropdown-d5qrzj1w1a96w2we.js → dropdown-m53ji1d66mws89wh.js} +4 -4
- package/dist/chunks/{empty-ox60d384lkwbj5n4.js → empty-hkvg3is3uc6dj1at.js} +46 -38
- package/dist/chunks/{engine-io35xsj9fgfxtihg.js → engine-g5egnkub1ikv3wvy.js} +2 -2
- package/dist/chunks/{engine-javascript-d795u677f1802oaf.js → engine-javascript-e9xj8hhz9xfqhpnu.js} +200 -185
- package/dist/chunks/{engine-oniguruma-xjlw46ay321yj1av.js → engine-oniguruma-ias56ildu01gf939.js} +8 -7
- package/dist/chunks/error-f4f6l13zx6tynxmy.js +6 -0
- package/dist/chunks/{field-kgz7w7yixmtpg010.js → field-oqtso1v0oszlxi0e.js} +3 -3
- package/dist/chunks/{flow-fmfb3ri8cxo7w9ci.js → flow-iz8sn24h5q6q4b10.js} +76 -60
- package/dist/chunks/formatNumber-kcnmauoqxku5a84c.js +21 -0
- package/dist/chunks/{getCssDimensions-mi941fe1jvztqm6b.js → getCssDimensions-olosvhh5husavesv.js} +2 -2
- package/dist/chunks/getElementTransform-cuiqmjglkrz4db6c.js +38 -0
- package/dist/chunks/{getPseudoElementBounds-jg72lmrlwgbqhmjh.js → getPseudoElementBounds-x7b9uqi5hdb1lq2r.js} +13 -4
- package/dist/chunks/{github-light-kb466scjoy42qxpu.js → github-light-hir7yctc38258pwt.js} +1 -1
- package/dist/chunks/{graphql-gtqr4wytdf0qjybo.js → graphql-n9vlzkvcp2j19p7a.js} +1 -1
- package/dist/chunks/{html-ijyj3f9k0foag15c.js → html-nimj6ljkkifnc9ni.js} +2 -2
- package/dist/chunks/{index.parts-i4iu310eo65d7lfc.js → index.parts-b9zmk3ta77w8dy9f.js} +86 -34
- package/dist/chunks/{index.parts-mr7tgwe4pgfozkt5.js → index.parts-bq90erougcgrwlgk.js} +47 -50
- package/dist/chunks/{index.parts-7z8hqx6zl9yajzvs.js → index.parts-c1ocmbxanagpan6d.js} +206 -366
- package/dist/chunks/{index.parts-nd3mitrhxf806lsa.js → index.parts-cc0yi5vo7s4x3r9p.js} +140 -145
- package/dist/chunks/{index.parts-j2ecf25zajyd5ia3.js → index.parts-cdxa6fwtp3lpkpp4.js} +2 -2
- package/dist/chunks/{index.parts-komdbdvf823cm5jw.js → index.parts-cl2xux9bjec6cibd.js} +14 -11
- package/dist/chunks/{index.parts-bv57na43ve93uz3x.js → index.parts-d4wim8mcnl9a2n9d.js} +67 -36
- package/dist/chunks/{index.parts-gslyp9n88qdh38n1.js → index.parts-e9s1lqq3qa9l6ndm.js} +2 -2
- package/dist/chunks/{index.parts-i4lbjqdnhsnjtny6.js → index.parts-eks3uafpskcxle6j.js} +33 -22
- package/dist/chunks/{index2.parts-kiwz8e3k8utvm4zb.js → index.parts-fbip2x29k5okvypg.js} +9 -12
- package/dist/chunks/index.parts-fhza3s183grld7zq.js +102 -0
- package/dist/chunks/{index.parts-lz9cnngidxppvhz7.js → index.parts-ftxrjoy00esi3aau.js} +27 -40
- package/dist/chunks/{index.parts-kt0w73ciea6adi2i.js → index.parts-g390bxx23hdko02m.js} +2 -2
- package/dist/chunks/{index.parts-fl4zaorc97ed3keb.js → index.parts-gf9v1piz8xxt8ap1.js} +197 -244
- package/dist/chunks/{index.parts-ef9111sjk9e3al87.js → index.parts-h7wtkrxpz4m8eqn9.js} +63 -83
- package/dist/chunks/index.parts-hmx3qlh517ii56yi.js +116 -0
- package/dist/chunks/{index2.parts-mv7x6w0p2splvf6b.js → index.parts-i6gbeimeit8gzhvi.js} +2 -2
- package/dist/chunks/{index.parts-gj1k50tf9fcs7nru.js → index.parts-ioii4acz2bjrf6sb.js} +17 -21
- package/dist/chunks/{index.parts-i5twygaksh86erb7.js → index.parts-iq66xivmdw2mouvx.js} +7 -6
- package/dist/chunks/{index.parts-hxjt52jbictdzgad.js → index.parts-j6kbr29a542ya81m.js} +275 -388
- package/dist/chunks/{index.parts-lhpuh6pw7rjcddnl.js → index.parts-jjup1zgnozoxi7ky.js} +41 -57
- package/dist/chunks/index.parts-jknln7yxhdokkvd6.js +991 -0
- package/dist/chunks/{index.parts-nzwjx603vcq1kryz.js → index.parts-jpm6c0fe0gyky12m.js} +22 -54
- package/dist/chunks/{index.parts-jmb5ztstw4xlfyp9.js → index.parts-kgiqby97w6tn6jw7.js} +15 -20
- package/dist/chunks/{index.parts-c5yto0l67i7ok5fd.js → index.parts-lpafjiz853r94ydb.js} +59 -59
- package/dist/chunks/{index.parts-cpviii2nt413tb8k.js → index.parts-moguar0t0u4aumou.js} +6 -5
- package/dist/chunks/{index.parts-ieuelcd4z5e0mcb7.js → index.parts-mw0e646n3qp6v1qe.js} +11 -11
- package/dist/chunks/{index.parts-nc6jzjq91z2nye75.js → index.parts-olcmo45gi8e1qma1.js} +2 -3
- package/dist/chunks/{index.parts-bmzuqorz0tmneh7t.js → index.parts-p2lcxzhh1ll3584m.js} +41 -39
- package/dist/chunks/{inertValue-f9pgp32jxnm88df3.js → inertValue-e0o6qvuef83v78fk.js} +2 -2
- package/dist/chunks/inline-copy-text-gbd7jhwpor27l4rq.js +104 -0
- package/dist/chunks/{input-pehjmr1q131tz38w.js → input-c8lv9ulv0kortliq.js} +2 -2
- package/dist/chunks/{input-group-kshukialqry0fmra.js → input-group-fjr4r5ax0x78ppax.js} +10 -7
- package/dist/chunks/{input-ikfimmpl5sngvh9s.js → input-h5ox92gf13ge04hp.js} +11 -10
- package/dist/chunks/{isElementDisabled-ffsy1y4adxocmexb.js → isElementDisabled-o0j7po84u0xjuwgg.js} +1 -1
- package/dist/chunks/{label-ie2gpde0nco1avi7.js → label-gzyfw17u08irhdo8.js} +2 -2
- package/dist/chunks/{layer-card-dnikj7emx8qeaspz.js → layer-card-idh3863vdgprgqai.js} +5 -3
- package/dist/chunks/layer-dialog-j5ywmzs46ccg6oqy.js +381 -0
- package/dist/chunks/{link-gp4swsrd3vfnvori.js → link-cqyfjezntvr53rh7.js} +2 -2
- package/dist/chunks/locale-provider-kjlnws7jln3ak0dr.js +29 -0
- package/dist/chunks/{menubar-ljbsj2ulayebjyza.js → menubar-fjhotkmndttb8mua.js} +13 -12
- package/dist/chunks/{mergeCleanups-pexn3wul6a4zn873.js → mergeCleanups-ix8l84cgutsbotpd.js} +1 -1
- package/dist/chunks/{meter-fl03ece4glrrzizj.js → meter-majprsslwmpbmkzg.js} +1 -1
- package/dist/chunks/{pagination-i3jewbdolgru0xnr.js → pagination-oaenm9t7ou3lmcgw.js} +2 -2
- package/dist/chunks/{popover-jal8z9sv176703lf.js → popover-hr0bfgg48xzjggky.js} +2 -2
- package/dist/chunks/popupHandle-7ghmro8a5uerjwu5.js +177 -0
- package/dist/chunks/{popupStoreUtils-jrxqkz5jmlijlr91.js → popupStoreUtils-i0y57dvmcnqrh4pv.js} +178 -101
- package/dist/chunks/{popupStateMapping-hdv48wmkzb2mqful.js → popupTriggerMap-ehv0fuhnmy59j3pn.js} +167 -193
- package/dist/chunks/{portal-provider-gznk6snyqj6egd6d.js → portal-provider-eveknxf26oudn7pp.js} +4 -0
- package/dist/chunks/{radio-gvy6ekh5hu9awlru.js → radio-35dx7y6rjrezbjsp.js} +4 -4
- package/dist/chunks/reason-parts-m5ishukzeux3q0pc.js +39 -0
- package/dist/chunks/{resolveAriaLabelledBy-h9qwvo10ftlj6t9k.js → resolveAriaLabelledBy-nc8mdie5shy87nsb.js} +1 -1
- package/dist/chunks/{resolveValueLabel-bq3nrzord518kp9q.js → resolveValueLabel-hpmsash3ektitvnb.js} +44 -10
- package/dist/chunks/{safePolygon-szbj0u31i6mpt36d.js → safePolygon-kmd5wsz26l4xtj6c.js} +35 -29
- package/dist/chunks/{safeReact-bavzz23j5tex60z2.js → safeReact-hpp4cck3y2s5jg75.js} +2 -2
- package/dist/chunks/scrollable-b6m9ze1u7ps0q1qn.js +34 -0
- package/dist/chunks/{select-ndqpqpmqtmn497rq.js → select-futox5zqr3r80y9a.js} +8 -9
- package/dist/chunks/{sensitive-input-jtbp3mvdynz9wewu.js → sensitive-input-cw33yncetxk3fbrl.js} +3 -3
- package/dist/chunks/{serializeValue-ci3kihruew64i36f.js → serializeValue-ipcakiw32jb7kany.js} +1 -1
- package/dist/chunks/{sidebar-icky50wdc2b1biw8.js → sidebar-in9zhvr473afsjpp.js} +104 -31
- package/dist/chunks/{skeleton-line-hlk5vauzo7xsalbo.js → skeleton-line-m9dyh126t9k07jvg.js} +8 -5
- package/dist/chunks/{sql-do9h6435gka97c4c.js → sql-hqp2eekl7qhmxe92.js} +1 -1
- package/dist/chunks/{stringifyLocale-cl8et9xf6zon4qbs.js → stringifyLocale-bxsgxdnzaef2vcar.js} +1 -1
- package/dist/chunks/{styles-dbhgpd8fm76fdfo3.js → styles-kl02oyrlnld7arja.js} +2 -2
- package/dist/chunks/{surface-ef2kr5pn7r1y3ipk.js → surface-irf0af2mfglu4p0j.js} +1 -1
- package/dist/chunks/{switch-oghrd7f6i5jqar59.js → switch-cqsvolm7h69z7vgg.js} +3 -3
- package/dist/chunks/{table-miggde3uqhhrd5at.js → table-yf8ul2e5nbemioi1.js} +1 -1
- package/dist/chunks/{tabs-mr2dsloqfe0io4a5.js → tabs-gf57qqf1wcclaejq.js} +1 -1
- package/dist/chunks/tag-input-ohfybx5dbxy3houy.js +139 -0
- package/dist/chunks/{text-jzp4mdlr222iuzxt.js → text-f1wxz183ckq7qtl7.js} +3 -2
- package/dist/chunks/{toast-g435fvt74w5orxqo.js → toast-bzaothy2yrezh787.js} +7 -6
- package/dist/chunks/{toolbar-e0b61hr6ys6dmwhv.js → toolbar-h213d8e22yjh5cwq.js} +6 -5
- package/dist/chunks/{tooltip-jq15p5jzgfrhslpo.js → tooltip-o4natsv01lpq8oq2.js} +3 -3
- package/dist/chunks/{useAnchoredPopupScrollLock-lbrqp1zm5z821z20.js → useAnchoredPopupScrollLock-kp3kai20u91sdm7v.js} +4 -4
- package/dist/chunks/{useAnimationFrame-ssgc72hyq6sg3yit.js → useAnimationFrame-0tt315hl9n3jzl86.js} +5 -4
- package/dist/chunks/{useAriaLabelledBy-bvw56m1d7czf0w3f.js → useAriaLabelledBy-ox8dum59shmgypq1.js} +3 -6
- package/dist/chunks/{useBaseUiId-gqkl5ep5pn6hd0rw.js → useBaseUiId-lg1teubxudgin0w2.js} +2 -2
- package/dist/chunks/{useButton-cpo6u2idqcnou6vy.js → useButton-h7s9aq1sfw6arawe.js} +56 -21
- package/dist/chunks/{useClick-fvwb39qgead2jyft.js → useClick-l0p0endoxrlp0ae5.js} +8 -7
- package/dist/chunks/{useCollapsiblePanel-bw63vwvq9a3sj73q.js → useCollapsiblePanel-g6t146nqj521pild.js} +60 -71
- package/dist/chunks/{useCompositeItem-esr3n4pmlssiuxuy.js → useCompositeItem-p7090ga00dpqcg5j.js} +4 -4
- package/dist/chunks/useCompositeListItem-odg6yo4h8866b37o.js +54 -0
- package/dist/chunks/{useControlled-nlx0kk1ksgk0auvi.js → useControlled-lfns1ot6kwowa4t4.js} +3 -3
- package/dist/chunks/{useDismiss-kbtx2o3ruyh3jwgn.js → useDismiss-me91ertzzz3gly12.js} +54 -23
- package/dist/chunks/useFieldValidation-e5pc8loiwzd68g4f.js +224 -0
- package/dist/chunks/{useFilteredItems-ns32d3hpp626kt73.js → useFilteredItems-kw2za6m9bng7twr0.js} +36 -38
- package/dist/chunks/{useFloatingRootContext-o6mk8fvodtbbm2v1.js → useFloatingRootContext-c849wtis7gx013m8.js} +7 -7
- package/dist/chunks/{useFocus-gdfx28bn90keg8cf.js → useFocus-lqwrnfa1svv3bcx1.js} +14 -10
- package/dist/chunks/{useForcedRerendering-el1fbg3ib5yo0v7k.js → useForcedRerendering-i3n4ms0xose8borh.js} +1 -1
- package/dist/chunks/{useId-l9soitgw3e4jk5ie.js → useId-f8w657f9yys10abm.js} +2 -2
- package/dist/chunks/{useLabel-nh9hf8h7o6oquqn5.js → useLabel-kcggu762z3z2taeb.js} +10 -9
- package/dist/chunks/useLabelableId-gqiiuqqn2k0u62r4.js +56 -0
- package/dist/chunks/{useListNavigation-jnxpvegv3ak857b1.js → useListNavigation-3nyjs362qcau34in.js} +51 -39
- package/dist/chunks/{useOnMount-j4wobeq47l3u9olo.js → useOnMount-hadwgyauanbzrvem.js} +3 -3
- package/dist/chunks/{useOpenChangeComplete-dpkex2e23s1evpol.js → useOpenChangeComplete-lk2gfu250t7r20c6.js} +48 -38
- package/dist/chunks/usePopupHandleStore-hx871cmn66j0q7wz.js +27 -0
- package/dist/chunks/{usePopupViewport-hu0kn0ziyf1vqzrs.js → usePopupViewport-iy5j9zawjrr3pcs0.js} +89 -57
- package/dist/chunks/{usePositioner-fz9uswhkhg22lo42.js → usePositioner-k9nc7cl550bgfwzs.js} +151 -142
- package/dist/chunks/{usePreviousValue-le0grv8f43vmunn1.js → usePreviousValue-io5t1pdxehw21l85.js} +2 -2
- package/dist/chunks/{useRegisterFieldControl-m1rxsuvtpau2341n.js → useRegisterFieldControl-lvusf6vc963clx02.js} +16 -10
- package/dist/chunks/{useRegisteredLabelId-dh83mybmzy75waje.js → useRegisteredLabelId-hw6b87h1k7kow1o2.js} +4 -4
- package/dist/chunks/{useRender-gtnbrp1ityffi4xf.js → useRender-onwjigxa00uch2ip.js} +2 -2
- package/dist/chunks/{useRenderDialogRoot-hhowqeoreyr6uuc7.js → useRenderDialogRoot-lddunc01twftravv.js} +123 -110
- package/dist/chunks/{useRenderElement-m8kc7jyuczp71mq8.js → useRenderElement-lrvp2pwrpt5zq1zd.js} +56 -46
- package/dist/chunks/{useScrollLock-mpns3u42eks8hhex.js → useScrollLock-buonkbwuland9wl3.js} +65 -38
- package/dist/chunks/{useStableCallback-ninxmksdjvwl6ejj.js → useStableCallback-b1i1ghzd9k75bb85.js} +3 -3
- package/dist/chunks/{useSwipeDismiss-bpbyw2ihsw3fw6y9.js → useSwipeDismiss-m1s13x9t9ey9ax3p.js} +73 -175
- package/dist/chunks/{useTimeout-oqptmu2xmyv5ccic.js → useTimeout-cpql3c8p250cr093.js} +3 -3
- package/dist/chunks/{useTransitionStatus-ig4waxl2kervpyw4.js → useTransitionStatus-bwqaavnekreihom2.js} +9 -5
- package/dist/chunks/{useTriggerFocusGuards-j8nano0pqu9dscrz.js → useTriggerFocusGuards-lz7wt484xltizro4.js} +4 -3
- package/dist/chunks/{useTypeahead-onenwjyhgw955ygx.js → useTypeahead-kvag4w6hu2g1kbwt.js} +10 -17
- package/dist/chunks/{useValueAsRef-lrn42zari17368c9.js → useValueAsRef-o4s9ohb3aczypmnk.js} +3 -3
- package/dist/chunks/{useValueChanged-kthmz4wk7ywnjwtx.js → useValueChanged-cz5wflhe8g15n6w1.js} +5 -8
- package/dist/chunks/{valueToPercent-henpkkj3juy3ukeu.js → valueToPercent-d7gbqk1umostj7ch.js} +1 -1
- package/dist/chunks/{vendor-floating-ui-dsysdmve7iazaaes.js → vendor-floating-ui-fqblx3wa0r71mjoo.js} +87 -187
- package/dist/chunks/{vendor-utils-luqsvbyuig727bnr.js → vendor-utils-ecfbsk425x1bm0gh.js} +119 -29
- package/dist/chunks/vesper-g839e590k3dxnwh3.js +5 -0
- package/dist/chunks/{visuallyHidden-n14xllazfozg55ox.js → visuallyHidden-nous086atnlxtf74.js} +1 -1
- package/dist/chunks/{wasm-nfbosyhilcq70atf.js → wasm-cpasy0o9lsjrm39j.js} +1 -1
- package/dist/code/server.d.ts +9 -10
- package/dist/code/server.js +8 -7
- package/dist/code.d.ts +8 -8
- package/dist/code.js +18 -16
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/banner.js +1 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button-group.d.ts +2 -0
- package/dist/components/button-group.js +3 -0
- package/dist/components/button.js +1 -1
- package/dist/components/chart.d.ts +2 -2
- package/dist/components/chart.js +2 -2
- package/dist/components/checkbox.js +1 -1
- package/dist/components/clipboard-text.js +1 -1
- package/dist/components/collapsible.js +1 -1
- package/dist/components/combobox.d.ts +1 -1
- package/dist/components/combobox.js +1 -1
- package/dist/components/command-palette.d.ts +1 -1
- package/dist/components/command-palette.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/dropdown.d.ts +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/empty.js +1 -1
- package/dist/components/field.js +1 -1
- package/dist/components/flow.js +1 -1
- package/dist/components/inline-copy-text.d.ts +2 -0
- package/dist/components/inline-copy-text.js +3 -0
- package/dist/components/input-group.d.ts +1 -1
- package/dist/components/input-group.js +1 -1
- package/dist/components/input.d.ts +1 -1
- package/dist/components/input.js +3 -3
- package/dist/components/label.js +1 -1
- package/dist/components/layer-card.js +1 -1
- package/dist/components/layer-dialog.d.ts +2 -0
- package/dist/components/layer-dialog.js +3 -0
- package/dist/components/link.d.ts +8 -9
- package/dist/components/link.js +1 -1
- package/dist/components/loader.js +1 -1
- package/dist/components/menubar.js +1 -1
- package/dist/components/meter.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +1 -1
- package/dist/components/radio.d.ts +1 -1
- package/dist/components/radio.js +1 -1
- package/dist/components/select.d.ts +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/sensitive-input.d.ts +1 -1
- package/dist/components/sensitive-input.js +1 -1
- package/dist/components/sidebar.d.ts +1 -1
- package/dist/components/sidebar.js +1 -1
- package/dist/components/surface.js +1 -1
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/table-of-contents.d.ts +1 -1
- package/dist/components/table.d.ts +1 -1
- package/dist/components/table.js +1 -1
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/tag-input.d.ts +2 -0
- package/dist/components/tag-input.js +3 -0
- package/dist/components/text.d.ts +1 -1
- package/dist/components/text.js +1 -1
- package/dist/components/toast.d.ts +1 -1
- package/dist/components/toast.js +2 -2
- package/dist/components/toolbar.d.ts +1 -1
- package/dist/components/toolbar.js +1 -1
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/{index-BXsHCLB82.d.ts → index--RbAKeBL.d.ts} +1 -1
- package/dist/{index-CeBzVJP8.d.ts → index-BK1tZgmP.d.ts} +1 -1
- package/dist/{index-CGbkysYW2.d.ts → index-BMe3cpLB.d.ts} +5 -4
- package/dist/{index-Di3sC6UF.d.ts → index-C0d8uwYO.d.ts} +4 -4
- package/dist/index-C7RoG_CH.d.ts +57 -0
- package/dist/{index-DBlw3E9m.d.ts → index-CNJRbVxG.d.ts} +1 -1
- package/dist/{index-BcRyiNd72.d.ts → index-ChGFA5-n.d.ts} +5 -1
- package/dist/index-CiwC1j1N.d.ts +37 -0
- package/dist/{index-BoPqM1Ia2.d.ts → index-Cqrye3KD.d.ts} +1 -1
- package/dist/{index-Bw3M24Mi.d.ts → index-CrQi3QCY.d.ts} +2 -1
- package/dist/{index-BlEUcijd.d.ts → index-CtTNoYA2.d.ts} +69 -1
- package/dist/{index-D97n4Bpf2.d.ts → index-DWZia2ui.d.ts} +1 -1
- package/dist/index-NqlNd7cQ.d.ts +144 -0
- package/dist/index-jNWPjJl9.d.ts +75 -0
- package/dist/index.d.ts +31 -26
- package/dist/index.js +49 -44
- package/dist/{input-group-DpGSsAZy.d.ts → input-group-B3M_WRqm.d.ts} +1 -1
- package/dist/locale-provider-BLGya10h.d.ts +28 -0
- package/dist/{portal-provider-4AHCxYE6.d.ts → portal-provider-BAqPpq_a.d.ts} +4 -0
- package/dist/primitives/accordion.js +1 -1
- package/dist/primitives/alert-dialog.js +1 -1
- package/dist/primitives/autocomplete.js +1 -1
- package/dist/primitives/avatar.js +1 -1
- package/dist/primitives/button.js +1 -1
- package/dist/primitives/checkbox-group.js +1 -1
- package/dist/primitives/checkbox.js +1 -1
- package/dist/primitives/collapsible.js +1 -1
- package/dist/primitives/combobox.js +1 -1
- package/dist/primitives/context-menu.js +1 -1
- package/dist/primitives/csp-provider.js +1 -1
- package/dist/primitives/dialog.js +1 -1
- package/dist/primitives/direction-provider.js +2 -2
- package/dist/primitives/drawer.js +1 -1
- package/dist/primitives/field.js +1 -1
- package/dist/primitives/fieldset.js +1 -1
- package/dist/primitives/form.js +1 -1
- package/dist/primitives/input.js +1 -1
- package/dist/primitives/menu.js +1 -1
- package/dist/primitives/menubar.js +1 -1
- package/dist/primitives/meter.js +1 -1
- package/dist/primitives/navigation-menu.js +1 -1
- package/dist/primitives/number-field.js +1 -1
- package/dist/primitives/otp-field.js +1 -1
- package/dist/primitives/popover.js +1 -1
- package/dist/primitives/preview-card.js +1 -1
- package/dist/primitives/progress.js +1 -1
- package/dist/primitives/radio-group.js +1 -1
- package/dist/primitives/radio.js +1 -1
- package/dist/primitives/scroll-area.js +1 -1
- package/dist/primitives/select.js +1 -1
- package/dist/primitives/separator.js +1 -1
- package/dist/primitives/slider.js +1 -1
- package/dist/primitives/switch.js +1 -1
- package/dist/primitives/tabs.js +1 -1
- package/dist/primitives/toast.js +1 -1
- package/dist/primitives/toggle-group.js +1 -1
- package/dist/primitives/toggle.js +1 -1
- package/dist/primitives/toolbar.js +1 -1
- package/dist/primitives/tooltip.js +1 -1
- package/dist/primitives.d.ts +1 -1
- package/dist/primitives.js +41 -41
- package/dist/scripts/theme-generator/config.d.ts +4 -5
- package/dist/scripts/theme-generator/types.d.ts +12 -13
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/{index-Dzzi1o7w2.d.ts → text-B4l7S5Z0.d.ts} +60 -1
- package/dist/{tooltip-BuCo6Ki4.d.ts → tooltip-D_vhi1PN.d.ts} +1 -1
- package/dist/{types-C402rKiz.d.ts → types-C6in2C8V.d.ts} +6 -3
- package/dist/utils.d.ts +3 -3
- package/dist/utils.js +3 -2
- package/package.json +22 -5
- package/scripts/component-registry/discovery.ts +3 -0
- package/scripts/component-registry/metadata.ts +37 -0
- package/scripts/generate-globe-land-mask.mjs +80 -0
- package/dist/chunks/CheckboxIndicator-igofmpn0wcfdqooa.js +0 -49
- package/dist/chunks/CompositeList-tx08unuok7wsl2d9.js +0 -129
- package/dist/chunks/DialogHandle-b3froel96o9fwjmm.js +0 -139
- package/dist/chunks/DialogRoot-fp7d16uxogvye294.js +0 -15
- package/dist/chunks/FieldLabel-f6vwzm8nefzxwlh8.js +0 -558
- package/dist/chunks/Form-is7d5c1kbk1wn39s.js +0 -102
- package/dist/chunks/areArraysEqual-nlbeaqlzf4274zr3.js +0 -7
- package/dist/chunks/clamp-kvu4wtr1dw6b3pnd.js +0 -7
- package/dist/chunks/createBaseUIEventDetails-ddivuhl74gni72qn.js +0 -86
- package/dist/chunks/error-mm98alb8acdy93vq.js +0 -15
- package/dist/chunks/formatNumber-hjijm58g645q6a0n.js +0 -26
- package/dist/chunks/getEmptyRootContext-ekvv3rp5w16ewoqx.js +0 -18
- package/dist/chunks/index.parts-hve0zir3biaolih0.js +0 -128
- package/dist/chunks/index.parts-jv5kiaeixrjah9js.js +0 -119
- package/dist/chunks/index.parts-k7ezm98skegahepw.js +0 -2464
- package/dist/chunks/store-9b2cp7rx1dvq90fp.js +0 -88
- package/dist/chunks/useCompositeListItem-0exfww37ospqz69b.js +0 -75
- package/dist/chunks/useIsHydrating-b6whcsimonagru6u.js +0 -22
- package/dist/chunks/useLabelableId-b1kwq9st3rjrtakn.js +0 -60
- package/dist/chunks/vesper-ho3j3gt6ilwfuc1g.js +0 -5
- package/dist/cn-DCSItmT-.d.ts +0 -5
- /package/dist/{index-AMEc1MEg2.d.ts → index-AMEc1MEg.d.ts} +0 -0
- /package/dist/{index-D2Gvly0i2.d.ts → index-D2Gvly0i.d.ts} +0 -0
- /package/dist/{index-DIV3riUd2.d.ts → index-DIV3riUd.d.ts} +0 -0
- /package/dist/{index-FCkuxSvs2.d.ts → index-FCkuxSvs.d.ts} +0 -0
- /package/dist/{index-_Sl5wohy2.d.ts → index-_Sl5wohy.d.ts} +0 -0
- /package/dist/{index-bAud6rG22.d.ts → index-bAud6rG2.d.ts} +0 -0
|
@@ -1,32 +1,33 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as __exportAll } from "./rolldown-runtime-hi7ti5xiuxsegr96.js";
|
|
3
|
-
import { c as warn, d as useRefWithInit, s as NOOP, t as useRenderElement
|
|
4
|
-
import { n as useIsoLayoutEffect, t as SafeReact } from "./safeReact-
|
|
5
|
-
import { t as useOnMount } from "./useOnMount-
|
|
6
|
-
import { n as useTimeout, t as Timeout } from "./useTimeout-
|
|
7
|
-
import {
|
|
8
|
-
import { n as webkit, t as gecko } from "./engine-
|
|
9
|
-
import { w as getWindow } from "./vendor-floating-ui-
|
|
10
|
-
import {
|
|
11
|
-
import { t as
|
|
12
|
-
import { t as
|
|
13
|
-
import { t as
|
|
14
|
-
import { t as
|
|
15
|
-
import {
|
|
16
|
-
import { t as
|
|
17
|
-
import {
|
|
18
|
-
import { n as
|
|
19
|
-
import {
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as useValueChanged } from "./useValueChanged-
|
|
24
|
-
import { t as
|
|
25
|
-
import {
|
|
3
|
+
import { c as warn, d as useMergedRefs, f as useRefWithInit, s as NOOP, t as useRenderElement } from "./useRenderElement-lrvp2pwrpt5zq1zd.js";
|
|
4
|
+
import { n as useIsoLayoutEffect, t as SafeReact } from "./safeReact-hpp4cck3y2s5jg75.js";
|
|
5
|
+
import { t as useOnMount } from "./useOnMount-hadwgyauanbzrvem.js";
|
|
6
|
+
import { n as useTimeout, t as Timeout } from "./useTimeout-cpql3c8p250cr093.js";
|
|
7
|
+
import { J as getTarget, K as activeElement, it as ios, v as ownerDocument } from "./vendor-utils-ecfbsk425x1bm0gh.js";
|
|
8
|
+
import { n as webkit, t as gecko } from "./engine-g5egnkub1ikv3wvy.js";
|
|
9
|
+
import { w as getWindow } from "./vendor-floating-ui-fqblx3wa0r71mjoo.js";
|
|
10
|
+
import { D as scrub, P as wheel, _ as inputPaste, b as keyboard, f as incrementPress, g as inputClear, h as inputChange, m as inputBlur, o as decrementPress, w as none } from "./reason-parts-m5ishukzeux3q0pc.js";
|
|
11
|
+
import { n as createGenericEventDetails, t as createChangeEventDetails } from "./createBaseUIEventDetails-3ob3qgs95ffm8l0w.js";
|
|
12
|
+
import { t as addEventListener } from "./addEventListener-l40nxvf06iukgvnj.js";
|
|
13
|
+
import { t as mergeCleanups } from "./mergeCleanups-ix8l84cgutsbotpd.js";
|
|
14
|
+
import { t as useValueAsRef } from "./useValueAsRef-o4s9ohb3aczypmnk.js";
|
|
15
|
+
import { t as useStableCallback } from "./useStableCallback-b1i1ghzd9k75bb85.js";
|
|
16
|
+
import { n as visuallyHiddenInput, t as visuallyHidden } from "./visuallyHidden-nous086atnlxtf74.js";
|
|
17
|
+
import { t as useForcedRerendering } from "./useForcedRerendering-i3n4ms0xose8borh.js";
|
|
18
|
+
import { a as useFieldRootContext, c as fieldValidityMapping, n as useLabelableContext } from "./LabelableContext-ccxbhu73vrk089m1.js";
|
|
19
|
+
import { n as useFormContext } from "./FormContext-bsu99v8i8pwu1yxc.js";
|
|
20
|
+
import { t as useLabelableId } from "./useLabelableId-gqiiuqqn2k0u62r4.js";
|
|
21
|
+
import { t as useControlled } from "./useControlled-lfns1ot6kwowa4t4.js";
|
|
22
|
+
import { t as useRegisterFieldControl } from "./useRegisterFieldControl-lvusf6vc963clx02.js";
|
|
23
|
+
import { t as useValueChanged } from "./useValueChanged-cz5wflhe8g15n6w1.js";
|
|
24
|
+
import { t as useButton } from "./useButton-h7s9aq1sfw6arawe.js";
|
|
25
|
+
import { t as clamp } from "./clamp-jcjhzx71s6wt1rnc.js";
|
|
26
|
+
import { n as getFormatter, t as formatNumber } from "./formatNumber-kcnmauoqxku5a84c.js";
|
|
26
27
|
import * as React$1 from "react";
|
|
27
28
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
28
29
|
import * as ReactDOM from "react-dom";
|
|
29
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
30
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/root/NumberFieldRootContext.mjs
|
|
30
31
|
const NumberFieldRootContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
31
32
|
NumberFieldRootContext.displayName = "NumberFieldRootContext";
|
|
32
33
|
function useNumberFieldRootContext() {
|
|
@@ -35,76 +36,17 @@ function useNumberFieldRootContext() {
|
|
|
35
36
|
return context;
|
|
36
37
|
}
|
|
37
38
|
//#endregion
|
|
38
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
39
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/utils/stateAttributesMapping.mjs
|
|
39
40
|
const stateAttributesMapping = {
|
|
40
41
|
inputValue: () => null,
|
|
41
42
|
value: () => null,
|
|
42
43
|
...fieldValidityMapping
|
|
43
44
|
};
|
|
44
45
|
//#endregion
|
|
45
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
46
|
-
const HAN_NUMERALS =
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"一",
|
|
50
|
-
"二",
|
|
51
|
-
"三",
|
|
52
|
-
"四",
|
|
53
|
-
"五",
|
|
54
|
-
"六",
|
|
55
|
-
"七",
|
|
56
|
-
"八",
|
|
57
|
-
"九"
|
|
58
|
-
];
|
|
59
|
-
const HAN_NUMERAL_TO_DIGIT = {
|
|
60
|
-
零: "0",
|
|
61
|
-
〇: "0",
|
|
62
|
-
一: "1",
|
|
63
|
-
二: "2",
|
|
64
|
-
三: "3",
|
|
65
|
-
四: "4",
|
|
66
|
-
五: "5",
|
|
67
|
-
六: "6",
|
|
68
|
-
七: "7",
|
|
69
|
-
八: "8",
|
|
70
|
-
九: "9"
|
|
71
|
-
};
|
|
72
|
-
const ARABIC_NUMERALS = [
|
|
73
|
-
"٠",
|
|
74
|
-
"١",
|
|
75
|
-
"٢",
|
|
76
|
-
"٣",
|
|
77
|
-
"٤",
|
|
78
|
-
"٥",
|
|
79
|
-
"٦",
|
|
80
|
-
"٧",
|
|
81
|
-
"٨",
|
|
82
|
-
"٩"
|
|
83
|
-
];
|
|
84
|
-
const PERSIAN_NUMERALS = [
|
|
85
|
-
"۰",
|
|
86
|
-
"۱",
|
|
87
|
-
"۲",
|
|
88
|
-
"۳",
|
|
89
|
-
"۴",
|
|
90
|
-
"۵",
|
|
91
|
-
"۶",
|
|
92
|
-
"۷",
|
|
93
|
-
"۸",
|
|
94
|
-
"۹"
|
|
95
|
-
];
|
|
96
|
-
const FULLWIDTH_NUMERALS = [
|
|
97
|
-
"0",
|
|
98
|
-
"1",
|
|
99
|
-
"2",
|
|
100
|
-
"3",
|
|
101
|
-
"4",
|
|
102
|
-
"5",
|
|
103
|
-
"6",
|
|
104
|
-
"7",
|
|
105
|
-
"8",
|
|
106
|
-
"9"
|
|
107
|
-
];
|
|
46
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/utils/parse.mjs
|
|
47
|
+
const HAN_NUMERALS = "零〇一二三四五六七八九";
|
|
48
|
+
const NON_ASCII_DIGIT_RE = /[٠-٩۰-۹0-9]/g;
|
|
49
|
+
const HAN_RE = /[零〇一二三四五六七八九]/g;
|
|
108
50
|
const PERCENTAGES = [
|
|
109
51
|
"%",
|
|
110
52
|
"٪",
|
|
@@ -112,29 +54,15 @@ const PERCENTAGES = [
|
|
|
112
54
|
"﹪"
|
|
113
55
|
];
|
|
114
56
|
const PERMILLE = ["‰", "؉"];
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
];
|
|
123
|
-
const UNICODE_PLUS_SIGNS = ["+", "﹢"];
|
|
124
|
-
const ARABIC_RE = new RegExp(`[${ARABIC_NUMERALS.join("")}]`, "g");
|
|
125
|
-
const PERSIAN_RE = new RegExp(`[${PERSIAN_NUMERALS.join("")}]`, "g");
|
|
126
|
-
const FULLWIDTH_RE = new RegExp(`[${FULLWIDTH_NUMERALS.join("")}]`, "g");
|
|
127
|
-
const HAN_RE = new RegExp(`[${HAN_NUMERALS.join("")}]`, "g");
|
|
128
|
-
const PERCENT_RE = new RegExp(`[${PERCENTAGES.join("")}]`);
|
|
129
|
-
const PERMILLE_RE = new RegExp(`[${PERMILLE.join("")}]`);
|
|
130
|
-
const PERCENT_GLOBAL_RE = new RegExp(PERCENT_RE.source, "g");
|
|
131
|
-
const PERMILLE_GLOBAL_RE = new RegExp(PERMILLE_RE.source, "g");
|
|
132
|
-
const ARABIC_DETECT_RE = new RegExp(`[${ARABIC_NUMERALS.join("")}]`);
|
|
133
|
-
const PERSIAN_DETECT_RE = new RegExp(`[${PERSIAN_NUMERALS.join("")}]`);
|
|
134
|
-
const HAN_DETECT_RE = new RegExp(`[${HAN_NUMERALS.join("")}]`);
|
|
135
|
-
const FULLWIDTH_DETECT_RE = new RegExp(`[${FULLWIDTH_NUMERALS.join("")}]`);
|
|
57
|
+
const PERCENT_RE = /[%٪%﹪]/;
|
|
58
|
+
const PERMILLE_RE = /[‰؉]/;
|
|
59
|
+
const PERCENT_GLOBAL_RE = /[%٪%﹪]/g;
|
|
60
|
+
const PERMILLE_GLOBAL_RE = /[‰؉]/g;
|
|
61
|
+
const ARABIC_PERSIAN_DETECT_RE = /[٠-٩۰-۹]/;
|
|
62
|
+
const HAN_DETECT_RE = /[零〇一二三四五六七八九]/;
|
|
63
|
+
const ANY_NUMERAL_DETECT_RE = /[0-9٠-٩۰-۹0-9零〇一二三四五六七八九]/;
|
|
136
64
|
function isNumeralChar(char) {
|
|
137
|
-
return
|
|
65
|
+
return ANY_NUMERAL_DETECT_RE.test(char);
|
|
138
66
|
}
|
|
139
67
|
const BASE_NON_NUMERIC_SYMBOLS = [
|
|
140
68
|
".",
|
|
@@ -145,50 +73,66 @@ const BASE_NON_NUMERIC_SYMBOLS = [
|
|
|
145
73
|
"٬"
|
|
146
74
|
];
|
|
147
75
|
const SPACE_SEPARATOR_RE = /\p{Zs}/u;
|
|
148
|
-
const
|
|
149
|
-
const
|
|
76
|
+
const FORMAT_CONTROL_DETECT_RE = /\p{Cf}/u;
|
|
77
|
+
const FORMAT_CONTROL_GLOBAL_RE = /\p{Cf}/gu;
|
|
78
|
+
const PLUS_SIGNS_WITH_ASCII = [
|
|
79
|
+
"+",
|
|
80
|
+
"+",
|
|
81
|
+
"﹢"
|
|
82
|
+
];
|
|
83
|
+
const MINUS_SIGNS_WITH_ASCII = [
|
|
84
|
+
"-",
|
|
85
|
+
"−",
|
|
86
|
+
"-",
|
|
87
|
+
"‒",
|
|
88
|
+
"–",
|
|
89
|
+
"—",
|
|
90
|
+
"﹣"
|
|
91
|
+
];
|
|
150
92
|
const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
151
|
-
const escapeClassChar = (s) => s.replace(/[-\\\]^]/g, (m) => `\\${m}`);
|
|
152
93
|
function shiftDecimal(value, exponentDelta) {
|
|
153
94
|
const [coefficient, exponent = "0"] = String(value).split("e");
|
|
154
95
|
return Number(`${coefficient}e${Number(exponent) + exponentDelta}`);
|
|
155
96
|
}
|
|
156
|
-
const
|
|
157
|
-
const
|
|
158
|
-
const
|
|
159
|
-
const
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
97
|
+
const ANY_MINUS_RE = /[-−-‒–—﹣]/gu;
|
|
98
|
+
const ANY_PLUS_RE = /[++﹢]/gu;
|
|
99
|
+
const ANY_MINUS_DETECT_RE = /[-−-‒–—﹣]/;
|
|
100
|
+
const ANY_PLUS_DETECT_RE = /[++﹢]/;
|
|
101
|
+
const SAMPLE_FORMAT_NUMBER = 11111.1;
|
|
102
|
+
/**
|
|
103
|
+
* Returns the `Intl.NumberFormat` parts of a representative number, which surface every
|
|
104
|
+
* non-numeric symbol a given locale/format renders.
|
|
105
|
+
*/
|
|
106
|
+
function getFormatParts(locale, options) {
|
|
107
|
+
return getFormatter(locale, options).formatToParts(SAMPLE_FORMAT_NUMBER);
|
|
108
|
+
}
|
|
163
109
|
function getNumberLocaleDetails(locale, options) {
|
|
164
|
-
const parts =
|
|
110
|
+
const parts = getFormatParts(locale, options);
|
|
165
111
|
const result = {};
|
|
166
112
|
parts.forEach((part) => {
|
|
167
113
|
result[part.type] = part.value;
|
|
168
114
|
});
|
|
115
|
+
let decimal = ".";
|
|
169
116
|
getFormatter(locale).formatToParts(.1).forEach((part) => {
|
|
170
|
-
if (part.type === "decimal")
|
|
117
|
+
if (part.type === "decimal") decimal = part.value;
|
|
171
118
|
});
|
|
172
|
-
return
|
|
119
|
+
return {
|
|
120
|
+
...result,
|
|
121
|
+
decimal
|
|
122
|
+
};
|
|
173
123
|
}
|
|
174
124
|
function parseNumber(formattedNumber, locale, options) {
|
|
175
|
-
|
|
176
|
-
let input = String(formattedNumber).replace(/\p{Cf}/gu, "").trim();
|
|
125
|
+
let input = formattedNumber.replace(FORMAT_CONTROL_GLOBAL_RE, "").trim();
|
|
177
126
|
input = input.replace(ANY_MINUS_RE, "-").replace(ANY_PLUS_RE, "+");
|
|
178
127
|
let isNegative = false;
|
|
179
|
-
const
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
const leading = input.match(/^\s*([+-])/);
|
|
185
|
-
if (leading) {
|
|
186
|
-
if (leading[1] === "-") isNegative = true;
|
|
187
|
-
input = input.replace(/^\s*[+-]/, "");
|
|
188
|
-
}
|
|
128
|
+
const takeSign = (match, sign) => {
|
|
129
|
+
if (sign === "-") isNegative = true;
|
|
130
|
+
return "";
|
|
131
|
+
};
|
|
132
|
+
input = input.replace(/([+-])\s*$/, takeSign).replace(/^\s*([+-])/, takeSign);
|
|
189
133
|
let computedLocale = locale;
|
|
190
134
|
if (computedLocale === void 0) {
|
|
191
|
-
if (
|
|
135
|
+
if (ARABIC_PERSIAN_DETECT_RE.test(input)) computedLocale = "ar";
|
|
192
136
|
else if (HAN_DETECT_RE.test(input)) computedLocale = "zh";
|
|
193
137
|
}
|
|
194
138
|
const { group, decimal, currency, exponentSeparator } = getNumberLocaleDetails(computedLocale, options);
|
|
@@ -203,67 +147,18 @@ function parseNumber(formattedNumber, locale, options) {
|
|
|
203
147
|
else groupRegex = new RegExp(escapeRegExp(group), "g");
|
|
204
148
|
}
|
|
205
149
|
let unformatted = [
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
{
|
|
219
|
-
regex: /,/g,
|
|
220
|
-
replacement: ""
|
|
221
|
-
},
|
|
222
|
-
{
|
|
223
|
-
regex: /٫/g,
|
|
224
|
-
replacement: "."
|
|
225
|
-
},
|
|
226
|
-
{
|
|
227
|
-
regex: /٬/g,
|
|
228
|
-
replacement: ""
|
|
229
|
-
},
|
|
230
|
-
{
|
|
231
|
-
regex: currency ? new RegExp(escapeRegExp(currency), "g") : null,
|
|
232
|
-
replacement: ""
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
regex: unitRegex,
|
|
236
|
-
replacement: ""
|
|
237
|
-
},
|
|
238
|
-
{
|
|
239
|
-
regex: PERCENT_GLOBAL_RE,
|
|
240
|
-
replacement: ""
|
|
241
|
-
},
|
|
242
|
-
{
|
|
243
|
-
regex: PERMILLE_GLOBAL_RE,
|
|
244
|
-
replacement: ""
|
|
245
|
-
},
|
|
246
|
-
{
|
|
247
|
-
regex: exponentSeparator ? new RegExp(escapeRegExp(exponentSeparator), "g") : null,
|
|
248
|
-
replacement: "e"
|
|
249
|
-
},
|
|
250
|
-
{
|
|
251
|
-
regex: ARABIC_RE,
|
|
252
|
-
replacement: (ch) => String(ARABIC_NUMERALS.indexOf(ch))
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
regex: PERSIAN_RE,
|
|
256
|
-
replacement: (ch) => String(PERSIAN_NUMERALS.indexOf(ch))
|
|
257
|
-
},
|
|
258
|
-
{
|
|
259
|
-
regex: FULLWIDTH_RE,
|
|
260
|
-
replacement: (ch) => String(FULLWIDTH_NUMERALS.indexOf(ch))
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
regex: HAN_RE,
|
|
264
|
-
replacement: (ch) => HAN_NUMERAL_TO_DIGIT[ch]
|
|
265
|
-
}
|
|
266
|
-
].reduce((acc, { regex, replacement }) => {
|
|
150
|
+
[groupRegex, ""],
|
|
151
|
+
[new RegExp(escapeRegExp(decimal), "g"), "."],
|
|
152
|
+
[/[.٫]/g, "."],
|
|
153
|
+
[/[,٬]/g, ""],
|
|
154
|
+
[currency ? new RegExp(escapeRegExp(currency), "g") : null, ""],
|
|
155
|
+
[unitRegex, ""],
|
|
156
|
+
[PERCENT_GLOBAL_RE, ""],
|
|
157
|
+
[PERMILLE_GLOBAL_RE, ""],
|
|
158
|
+
[exponentSeparator ? new RegExp(escapeRegExp(exponentSeparator), "g") : null, "e"],
|
|
159
|
+
[NON_ASCII_DIGIT_RE, (ch) => String(ch.charCodeAt(0) % 16)],
|
|
160
|
+
[HAN_RE, (ch) => String(Math.max(HAN_NUMERALS.indexOf(ch) - 1, 0))]
|
|
161
|
+
].reduce((acc, [regex, replacement]) => {
|
|
267
162
|
return regex ? acc.replace(regex, replacement) : acc;
|
|
268
163
|
}, input);
|
|
269
164
|
const lastDot = unformatted.lastIndexOf(".");
|
|
@@ -280,7 +175,7 @@ function parseNumber(formattedNumber, locale, options) {
|
|
|
280
175
|
return num;
|
|
281
176
|
}
|
|
282
177
|
//#endregion
|
|
283
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
178
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/utils/validate.mjs
|
|
284
179
|
const STEP_EPSILON_FACTOR = 1e-10;
|
|
285
180
|
const MAX_FLOATING_POINT_CLEANUP_DELTA = 1e-10;
|
|
286
181
|
function hasNumberFormatRoundingOptions(format) {
|
|
@@ -304,20 +199,20 @@ function removeFloatingPointErrors(value, format) {
|
|
|
304
199
|
if (roundedValue === null) return value;
|
|
305
200
|
return formatter.format(roundedValue) === roundedText ? roundedValue : value;
|
|
306
201
|
}
|
|
307
|
-
function snapToStep(value, base, step,
|
|
202
|
+
function snapToStep(value, base, step, nearest) {
|
|
308
203
|
const stepSize = Math.abs(step);
|
|
309
204
|
const direction = Math.sign(step);
|
|
310
205
|
const tolerance = stepSize * STEP_EPSILON_FACTOR * direction;
|
|
311
206
|
const rawSteps = value - base + tolerance;
|
|
312
|
-
if (
|
|
207
|
+
if (nearest) return base + Math.round(rawSteps / step) * step;
|
|
313
208
|
return base + (direction > 0 ? Math.floor(rawSteps / stepSize) : Math.ceil(rawSteps / stepSize)) * stepSize;
|
|
314
209
|
}
|
|
315
|
-
function toValidatedNumber(value,
|
|
210
|
+
function toValidatedNumber(value, step, minWithDefault, maxWithDefault, minWithZeroDefault, format, snapOnStep, small, shouldClamp) {
|
|
316
211
|
if (value === null) return value;
|
|
317
212
|
let nextValue = value;
|
|
318
213
|
if (step != null && snapOnStep && step !== 0) {
|
|
319
214
|
const base = small || minWithDefault === Number.MIN_SAFE_INTEGER ? minWithZeroDefault : minWithDefault;
|
|
320
|
-
nextValue = snapToStep(nextValue, base, step, small
|
|
215
|
+
nextValue = snapToStep(nextValue, base, step, small);
|
|
321
216
|
}
|
|
322
217
|
if (shouldClamp) nextValue = clamp(nextValue, minWithDefault, maxWithDefault);
|
|
323
218
|
if (step == null && !hasNumberFormatRoundingOptions(format)) return nextValue;
|
|
@@ -325,7 +220,7 @@ function toValidatedNumber(value, { step, minWithDefault, maxWithDefault, minWit
|
|
|
325
220
|
return shouldClamp ? clamp(roundedValue, minWithDefault, maxWithDefault) : roundedValue;
|
|
326
221
|
}
|
|
327
222
|
//#endregion
|
|
328
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
223
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/root/NumberFieldRoot.mjs
|
|
329
224
|
/**
|
|
330
225
|
* Groups all parts of the number field and manages its state.
|
|
331
226
|
* Renders a `<div>` element.
|
|
@@ -333,8 +228,8 @@ function toValidatedNumber(value, { step, minWithDefault, maxWithDefault, minWit
|
|
|
333
228
|
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
334
229
|
*/
|
|
335
230
|
const NumberFieldRoot = /*#__PURE__*/ React$1.forwardRef(function NumberFieldRoot(componentProps, forwardedRef) {
|
|
336
|
-
const { id: idProp, min, max, smallStep = .1, step: stepProp = 1, largeStep = 10, required = false, disabled: disabledProp = false, readOnly = false, form, name: nameProp, defaultValue, value: valueProp, onValueChange: onValueChangeProp, onValueCommitted: onValueCommittedProp, allowWheelScrub = false, snapOnStep = false, allowOutOfRange = false, format, locale, render, className, inputRef: inputRefProp, style, ...elementProps } = componentProps;
|
|
337
|
-
const { setDirty, validityData, disabled: fieldDisabled, setFilled,
|
|
231
|
+
const { id: idProp, min, max, smallStep = .1, step: stepProp = 1, largeStep = 10, required = false, disabled: disabledProp = false, readOnly = false, form, name: nameProp, defaultValue = null, value: valueProp, onValueChange: onValueChangeProp, onValueCommitted: onValueCommittedProp, allowWheelScrub = false, snapOnStep = false, allowOutOfRange = false, format, locale, render, className, inputRef: inputRefProp, style, ...elementProps } = componentProps;
|
|
232
|
+
const { setDirty, validityData, disabled: fieldDisabled, setFilled, name: fieldName, state: fieldState, validation } = useFieldRootContext();
|
|
338
233
|
const { clearErrors } = useFormContext();
|
|
339
234
|
const disabled = fieldDisabled || disabledProp;
|
|
340
235
|
const name = fieldName ?? nameProp;
|
|
@@ -347,13 +242,12 @@ const NumberFieldRoot = /*#__PURE__*/ React$1.forwardRef(function NumberFieldRoo
|
|
|
347
242
|
const inputRef = React$1.useRef(null);
|
|
348
243
|
const hiddenInputRef = useMergedRefs(inputRefProp, validation.inputRef);
|
|
349
244
|
const id = useLabelableId({ id: idProp });
|
|
350
|
-
const [
|
|
245
|
+
const [value, setValueUnwrapped] = useControlled({
|
|
351
246
|
controlled: valueProp,
|
|
352
247
|
default: defaultValue,
|
|
353
248
|
name: "NumberField",
|
|
354
249
|
state: "value"
|
|
355
250
|
});
|
|
356
|
-
const value = valueUnwrapped ?? null;
|
|
357
251
|
const valueRef = useValueAsRef(value);
|
|
358
252
|
useIsoLayoutEffect(() => {
|
|
359
253
|
setFilled(value !== null);
|
|
@@ -370,25 +264,22 @@ const NumberFieldRoot = /*#__PURE__*/ React$1.forwardRef(function NumberFieldRoo
|
|
|
370
264
|
const [inputValue, setInputValue] = React$1.useState(() => formatNumber(value, locale, format));
|
|
371
265
|
const [inputMode, setInputMode] = React$1.useState("numeric");
|
|
372
266
|
const getAllowedNonNumericKeys = useStableCallback(() => {
|
|
373
|
-
const
|
|
374
|
-
const keys =
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
if (
|
|
380
|
-
|
|
267
|
+
const parts = getFormatParts(locale, format);
|
|
268
|
+
const keys = new Set(BASE_NON_NUMERIC_SYMBOLS);
|
|
269
|
+
const addAll = (chars) => chars.forEach((char) => keys.add(char));
|
|
270
|
+
const decimal = parts.find((part) => part.type === "decimal")?.value ?? getNumberLocaleDetails(locale, format).decimal;
|
|
271
|
+
keys.add(decimal);
|
|
272
|
+
parts.forEach((part) => {
|
|
273
|
+
if (part.type === "integer" || part.type === "fraction" || part.type === "exponentInteger" || part.type === "compact") return;
|
|
274
|
+
addAll(Array.from(part.value));
|
|
275
|
+
if (SPACE_SEPARATOR_RE.test(part.value)) keys.add(" ");
|
|
276
|
+
});
|
|
381
277
|
const allowPercentSymbols = formatStyle === "percent" || formatStyle === "unit" && format?.unit === "percent";
|
|
382
278
|
const allowPermilleSymbols = formatStyle === "percent" || formatStyle === "unit" && format?.unit === "permille";
|
|
383
|
-
if (allowPercentSymbols) PERCENTAGES
|
|
384
|
-
if (allowPermilleSymbols) PERMILLE
|
|
385
|
-
|
|
386
|
-
if (
|
|
387
|
-
Array.from(literal).forEach((char) => keys.add(char));
|
|
388
|
-
if (SPACE_SEPARATOR_RE.test(literal)) keys.add(" ");
|
|
389
|
-
}
|
|
390
|
-
PLUS_SIGNS_WITH_ASCII.forEach((key) => keys.add(key));
|
|
391
|
-
if (minWithDefault < 0 || allowOutOfRange) MINUS_SIGNS_WITH_ASCII.forEach((key) => keys.add(key));
|
|
279
|
+
if (allowPercentSymbols) addAll(PERCENTAGES);
|
|
280
|
+
if (allowPermilleSymbols) addAll(PERMILLE);
|
|
281
|
+
addAll(PLUS_SIGNS_WITH_ASCII);
|
|
282
|
+
if (minWithDefault < 0 || allowOutOfRange) addAll(MINUS_SIGNS_WITH_ASCII);
|
|
392
283
|
return keys;
|
|
393
284
|
});
|
|
394
285
|
const getStepAmount = useStableCallback((event) => {
|
|
@@ -399,18 +290,9 @@ const NumberFieldRoot = /*#__PURE__*/ React$1.forwardRef(function NumberFieldRoo
|
|
|
399
290
|
const setValue = useStableCallback((unvalidatedValue, details) => {
|
|
400
291
|
const eventWithOptionalKeyState = details.event;
|
|
401
292
|
const dir = details.direction;
|
|
402
|
-
const isInputReason = details.reason
|
|
293
|
+
const isInputReason = details.reason.startsWith("input-") || details.reason === "none";
|
|
403
294
|
const shouldClampValue = !allowOutOfRange || !isInputReason;
|
|
404
|
-
const validatedValue = toValidatedNumber(unvalidatedValue,
|
|
405
|
-
step: dir ? getStepAmount(eventWithOptionalKeyState) * dir : void 0,
|
|
406
|
-
format: formatOptionsRef.current,
|
|
407
|
-
minWithDefault,
|
|
408
|
-
maxWithDefault,
|
|
409
|
-
minWithZeroDefault,
|
|
410
|
-
snapOnStep,
|
|
411
|
-
small: eventWithOptionalKeyState?.altKey ?? false,
|
|
412
|
-
clamp: shouldClampValue
|
|
413
|
-
});
|
|
295
|
+
const validatedValue = toValidatedNumber(unvalidatedValue, dir ? getStepAmount(eventWithOptionalKeyState) * dir : void 0, minWithDefault, maxWithDefault, minWithZeroDefault, formatOptionsRef.current, snapOnStep, eventWithOptionalKeyState?.altKey ?? false, shouldClampValue);
|
|
414
296
|
const shouldFireChange = validatedValue !== value || isInputReason && (unvalidatedValue !== value || allowInputSyncRef.current === false);
|
|
415
297
|
if (shouldFireChange) {
|
|
416
298
|
onValueChangeProp?.(validatedValue, details);
|
|
@@ -441,19 +323,29 @@ const NumberFieldRoot = /*#__PURE__*/ React$1.forwardRef(function NumberFieldRoo
|
|
|
441
323
|
if (minWithDefault >= 0) computedInputMode = "decimal";
|
|
442
324
|
setInputMode(computedInputMode);
|
|
443
325
|
}, [minWithDefault]);
|
|
326
|
+
const focusInput = useStableCallback(() => {
|
|
327
|
+
const input = inputRef.current;
|
|
328
|
+
if (!input) return;
|
|
329
|
+
const length = input.value.length;
|
|
330
|
+
input.setSelectionRange(length, length);
|
|
331
|
+
input.focus();
|
|
332
|
+
});
|
|
444
333
|
React$1.useEffect(function registerElementWheelListener() {
|
|
445
334
|
const element = inputRef.current;
|
|
446
335
|
if (disabled || readOnly || !allowWheelScrub || !element) return;
|
|
447
336
|
function handleWheel(event) {
|
|
448
337
|
if (event.ctrlKey || activeElement(ownerDocument(inputRef.current)) !== inputRef.current) return;
|
|
338
|
+
const isHorizontal = Math.abs(event.deltaX) > Math.abs(event.deltaY);
|
|
339
|
+
const delta = event.shiftKey && isHorizontal ? event.deltaX : event.deltaY;
|
|
340
|
+
if (delta === 0 || !event.shiftKey && isHorizontal) return;
|
|
449
341
|
event.preventDefault();
|
|
450
342
|
allowInputSyncRef.current = true;
|
|
451
343
|
const amount = getStepAmount(event);
|
|
452
344
|
if (incrementValue(amount, {
|
|
453
|
-
direction:
|
|
345
|
+
direction: delta > 0 ? -1 : 1,
|
|
454
346
|
event,
|
|
455
347
|
reason: "wheel"
|
|
456
|
-
})) onValueCommitted(lastChangedValueRef.current
|
|
348
|
+
})) onValueCommitted(lastChangedValueRef.current, createGenericEventDetails(wheel, event));
|
|
457
349
|
}
|
|
458
350
|
return addEventListener(element, "wheel", handleWheel);
|
|
459
351
|
}, [
|
|
@@ -485,12 +377,9 @@ const NumberFieldRoot = /*#__PURE__*/ React$1.forwardRef(function NumberFieldRoo
|
|
|
485
377
|
]);
|
|
486
378
|
const contextValue = React$1.useMemo(() => ({
|
|
487
379
|
inputRef,
|
|
488
|
-
|
|
489
|
-
value,
|
|
380
|
+
focusInput,
|
|
490
381
|
minWithDefault,
|
|
491
382
|
maxWithDefault,
|
|
492
|
-
disabled,
|
|
493
|
-
readOnly,
|
|
494
383
|
id,
|
|
495
384
|
setValue,
|
|
496
385
|
incrementValue,
|
|
@@ -502,26 +391,20 @@ const NumberFieldRoot = /*#__PURE__*/ React$1.forwardRef(function NumberFieldRoo
|
|
|
502
391
|
hasPendingCommitRef,
|
|
503
392
|
name,
|
|
504
393
|
nameProp,
|
|
505
|
-
required,
|
|
506
|
-
invalid,
|
|
507
394
|
inputMode,
|
|
508
395
|
getAllowedNonNumericKeys,
|
|
509
396
|
min,
|
|
510
397
|
max,
|
|
511
398
|
setInputValue,
|
|
512
399
|
locale,
|
|
513
|
-
isScrubbing,
|
|
514
400
|
setIsScrubbing,
|
|
515
401
|
state,
|
|
516
402
|
onValueCommitted
|
|
517
403
|
}), [
|
|
518
404
|
inputRef,
|
|
519
|
-
|
|
520
|
-
value,
|
|
405
|
+
focusInput,
|
|
521
406
|
minWithDefault,
|
|
522
407
|
maxWithDefault,
|
|
523
|
-
disabled,
|
|
524
|
-
readOnly,
|
|
525
408
|
id,
|
|
526
409
|
setValue,
|
|
527
410
|
incrementValue,
|
|
@@ -530,15 +413,12 @@ const NumberFieldRoot = /*#__PURE__*/ React$1.forwardRef(function NumberFieldRoo
|
|
|
530
413
|
valueRef,
|
|
531
414
|
name,
|
|
532
415
|
nameProp,
|
|
533
|
-
required,
|
|
534
|
-
invalid,
|
|
535
416
|
inputMode,
|
|
536
417
|
getAllowedNonNumericKeys,
|
|
537
418
|
min,
|
|
538
419
|
max,
|
|
539
420
|
setInputValue,
|
|
540
421
|
locale,
|
|
541
|
-
isScrubbing,
|
|
542
422
|
state,
|
|
543
423
|
onValueCommitted
|
|
544
424
|
]);
|
|
@@ -553,7 +433,7 @@ const NumberFieldRoot = /*#__PURE__*/ React$1.forwardRef(function NumberFieldRoo
|
|
|
553
433
|
children: [element, /*#__PURE__*/ jsx("input", {
|
|
554
434
|
...validation.getValidationProps(disabled, {
|
|
555
435
|
onFocus() {
|
|
556
|
-
|
|
436
|
+
focusInput();
|
|
557
437
|
},
|
|
558
438
|
onChange(event) {
|
|
559
439
|
if (event.nativeEvent.defaultPrevented || disabled || readOnly) return;
|
|
@@ -585,7 +465,7 @@ const NumberFieldRoot = /*#__PURE__*/ React$1.forwardRef(function NumberFieldRoo
|
|
|
585
465
|
});
|
|
586
466
|
NumberFieldRoot.displayName = "NumberFieldRoot";
|
|
587
467
|
//#endregion
|
|
588
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
468
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/group/NumberFieldGroup.mjs
|
|
589
469
|
/**
|
|
590
470
|
* Groups the input with the increment and decrement buttons.
|
|
591
471
|
* Renders a `<div>` element.
|
|
@@ -604,7 +484,7 @@ const NumberFieldGroup = /*#__PURE__*/ React$1.forwardRef(function NumberFieldGr
|
|
|
604
484
|
});
|
|
605
485
|
NumberFieldGroup.displayName = "NumberFieldGroup";
|
|
606
486
|
//#endregion
|
|
607
|
-
//#region ../../node_modules/.pnpm/@base-ui+utils@0.
|
|
487
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.4.0_@types+react@19.2.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/utils/useInterval.mjs
|
|
608
488
|
const EMPTY = 0;
|
|
609
489
|
var Interval = class Interval extends Timeout {
|
|
610
490
|
static create() {
|
|
@@ -635,7 +515,7 @@ function useInterval() {
|
|
|
635
515
|
return timeout;
|
|
636
516
|
}
|
|
637
517
|
//#endregion
|
|
638
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
518
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/internals/usePressAndHold.mjs
|
|
639
519
|
const DEFAULT_TICK_DELAY = 60;
|
|
640
520
|
const DEFAULT_START_DELAY = 400;
|
|
641
521
|
const DEFAULT_SCROLL_DISTANCE = 8;
|
|
@@ -651,7 +531,7 @@ function isTouchLikePointerType(pointerType) {
|
|
|
651
531
|
* inputs correctly, including Android-specific quirks.
|
|
652
532
|
*/
|
|
653
533
|
function usePressAndHold(params) {
|
|
654
|
-
const { disabled,
|
|
534
|
+
const { disabled, tick, onStop, tickDelay = DEFAULT_TICK_DELAY, startDelay = DEFAULT_START_DELAY, scrollDistance = DEFAULT_SCROLL_DISTANCE, elementRef } = params;
|
|
655
535
|
const startTickTimeout = useTimeout();
|
|
656
536
|
const tickInterval = useInterval();
|
|
657
537
|
const intentionalTouchCheckTimeout = useTimeout();
|
|
@@ -702,6 +582,14 @@ function usePressAndHold(params) {
|
|
|
702
582
|
stopAutoChange();
|
|
703
583
|
unsubscribeFromGlobalPointerUpRef.current();
|
|
704
584
|
}, [stopAutoChange]);
|
|
585
|
+
React$1.useEffect(() => {
|
|
586
|
+
if (disabled) {
|
|
587
|
+
isPressedRef.current = false;
|
|
588
|
+
isTouchingButtonRef.current = false;
|
|
589
|
+
pointerTypeRef.current = "";
|
|
590
|
+
stopAutoChange();
|
|
591
|
+
}
|
|
592
|
+
}, [disabled, stopAutoChange]);
|
|
705
593
|
return {
|
|
706
594
|
pointerHandlers: {
|
|
707
595
|
onTouchStart() {
|
|
@@ -711,8 +599,7 @@ function usePressAndHold(params) {
|
|
|
711
599
|
isTouchingButtonRef.current = false;
|
|
712
600
|
},
|
|
713
601
|
onPointerDown(event) {
|
|
714
|
-
|
|
715
|
-
if (event.defaultPrevented || !isMainButton || disabled || readOnly) return;
|
|
602
|
+
if (event.defaultPrevented || event.button || disabled) return;
|
|
716
603
|
pointerTypeRef.current = event.pointerType;
|
|
717
604
|
ignoreClickRef.current = false;
|
|
718
605
|
isPressedRef.current = true;
|
|
@@ -739,15 +626,15 @@ function usePressAndHold(params) {
|
|
|
739
626
|
if (isTouchLikePointerType(event.pointerType)) isPressedRef.current = false;
|
|
740
627
|
},
|
|
741
628
|
onPointerMove(event) {
|
|
742
|
-
if (disabled ||
|
|
743
|
-
|
|
629
|
+
if (disabled || !isTouchLikePointerType(event.pointerType) || !isPressedRef.current) return;
|
|
630
|
+
movesAfterTouchRef.current += 1;
|
|
744
631
|
const { x, y } = downCoordsRef.current;
|
|
745
632
|
const dx = x - event.clientX;
|
|
746
633
|
const dy = y - event.clientY;
|
|
747
634
|
if (dx ** 2 + dy ** 2 > scrollDistance ** 2) stopAutoChange();
|
|
748
635
|
},
|
|
749
636
|
onMouseEnter(event) {
|
|
750
|
-
if (event.defaultPrevented || disabled ||
|
|
637
|
+
if (event.defaultPrevented || disabled || !isPressedRef.current || isTouchingButtonRef.current || isTouchLikePointerType(pointerTypeRef.current)) return;
|
|
751
638
|
startAutoChange(event.nativeEvent);
|
|
752
639
|
},
|
|
753
640
|
onMouseLeave() {
|
|
@@ -767,13 +654,20 @@ function usePressAndHold(params) {
|
|
|
767
654
|
};
|
|
768
655
|
}
|
|
769
656
|
//#endregion
|
|
770
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
657
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/root/useNumberFieldStepperButton.mjs
|
|
771
658
|
const SELECT_NONE_STYLE = {
|
|
772
659
|
WebkitUserSelect: "none",
|
|
773
660
|
userSelect: "none"
|
|
774
661
|
};
|
|
775
|
-
|
|
776
|
-
|
|
662
|
+
/**
|
|
663
|
+
* Shared implementation for the increment and decrement stepper buttons. They differ only in the
|
|
664
|
+
* direction they step and the boundary (`max` vs `min`) at which they become disabled.
|
|
665
|
+
*/
|
|
666
|
+
function useNumberFieldStepperButton(componentProps, forwardedRef, isIncrement) {
|
|
667
|
+
const { render, className, disabled: disabledProp = false, nativeButton = true, style, ...elementProps } = componentProps;
|
|
668
|
+
const { allowInputSyncRef, formatOptionsRef, getStepAmount, id, incrementValue, inputRef, focusInput, maxWithDefault, minWithDefault, setValue, state, valueRef, locale, lastChangedValueRef, onValueCommitted } = useNumberFieldRootContext();
|
|
669
|
+
const { disabled: contextDisabled, readOnly, value, inputValue } = state;
|
|
670
|
+
const disabled = disabledProp || contextDisabled || value != null && (isIncrement ? value >= maxWithDefault : value <= minWithDefault);
|
|
777
671
|
const pressReason = isIncrement ? incrementPress : decrementPress;
|
|
778
672
|
function commitValue(nativeEvent) {
|
|
779
673
|
const shouldCommitInputValue = !allowInputSyncRef.current;
|
|
@@ -792,9 +686,6 @@ function useNumberFieldButton(params) {
|
|
|
792
686
|
const { pointerHandlers, shouldSkipClick } = usePressAndHold({
|
|
793
687
|
disabled: disabled || readOnly,
|
|
794
688
|
elementRef: inputRef,
|
|
795
|
-
tickDelay: 60,
|
|
796
|
-
startDelay: 400,
|
|
797
|
-
scrollDistance: 8,
|
|
798
689
|
tick(triggerEvent) {
|
|
799
690
|
const amount = getStepAmount(triggerEvent);
|
|
800
691
|
return incrementValue(amount, {
|
|
@@ -808,7 +699,7 @@ function useNumberFieldButton(params) {
|
|
|
808
699
|
onValueCommitted(committed, createGenericEventDetails(pressReason, nativeEvent));
|
|
809
700
|
}
|
|
810
701
|
});
|
|
811
|
-
|
|
702
|
+
const props = {
|
|
812
703
|
disabled,
|
|
813
704
|
"aria-label": isIncrement ? "Increase" : "Decrease",
|
|
814
705
|
"aria-controls": id,
|
|
@@ -830,42 +721,13 @@ function useNumberFieldButton(params) {
|
|
|
830
721
|
if (committed !== prev) onValueCommitted(committed, createGenericEventDetails(pressReason, event.nativeEvent));
|
|
831
722
|
},
|
|
832
723
|
onPointerDown(event) {
|
|
833
|
-
|
|
834
|
-
if (event.defaultPrevented || readOnly || !isMainButton || disabled) return;
|
|
724
|
+
if (event.defaultPrevented || readOnly || event.button || disabled) return;
|
|
835
725
|
commitValue(event.nativeEvent);
|
|
836
726
|
lastChangedValueRef.current = null;
|
|
837
|
-
if (!isTouchLikePointerType(event.pointerType))
|
|
727
|
+
if (!isTouchLikePointerType(event.pointerType)) focusInput();
|
|
838
728
|
pointerHandlers.onPointerDown(event);
|
|
839
729
|
}
|
|
840
730
|
};
|
|
841
|
-
}
|
|
842
|
-
//#endregion
|
|
843
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/root/useNumberFieldStepperButton.mjs
|
|
844
|
-
/**
|
|
845
|
-
* Shared implementation for the increment and decrement stepper buttons. They differ only in the
|
|
846
|
-
* direction they step and the boundary (`max` vs `min`) at which they become disabled.
|
|
847
|
-
*/
|
|
848
|
-
function useNumberFieldStepperButton(componentProps, forwardedRef, isIncrement) {
|
|
849
|
-
const { render, className, disabled: disabledProp = false, nativeButton = true, style, ...elementProps } = componentProps;
|
|
850
|
-
const { allowInputSyncRef, disabled: contextDisabled, formatOptionsRef, getStepAmount, id, incrementValue, inputRef, inputValue, maxWithDefault, minWithDefault, readOnly, setValue, state, value, valueRef, locale, lastChangedValueRef, onValueCommitted } = useNumberFieldRootContext();
|
|
851
|
-
const disabled = disabledProp || contextDisabled || value != null && (isIncrement ? value >= maxWithDefault : value <= minWithDefault);
|
|
852
|
-
const props = useNumberFieldButton({
|
|
853
|
-
isIncrement,
|
|
854
|
-
inputRef,
|
|
855
|
-
inputValue,
|
|
856
|
-
disabled,
|
|
857
|
-
readOnly,
|
|
858
|
-
id,
|
|
859
|
-
setValue,
|
|
860
|
-
getStepAmount,
|
|
861
|
-
incrementValue,
|
|
862
|
-
allowInputSyncRef,
|
|
863
|
-
formatOptionsRef,
|
|
864
|
-
valueRef,
|
|
865
|
-
locale,
|
|
866
|
-
lastChangedValueRef,
|
|
867
|
-
onValueCommitted
|
|
868
|
-
});
|
|
869
731
|
const { getButtonProps, buttonRef } = useButton({
|
|
870
732
|
disabled: disabled || readOnly,
|
|
871
733
|
native: nativeButton,
|
|
@@ -887,7 +749,7 @@ function useNumberFieldStepperButton(componentProps, forwardedRef, isIncrement)
|
|
|
887
749
|
});
|
|
888
750
|
}
|
|
889
751
|
//#endregion
|
|
890
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
752
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/increment/NumberFieldIncrement.mjs
|
|
891
753
|
/**
|
|
892
754
|
* A stepper button that increases the field value when clicked.
|
|
893
755
|
* Renders a `<button>` element.
|
|
@@ -899,7 +761,7 @@ const NumberFieldIncrement = /*#__PURE__*/ React$1.forwardRef(function NumberFie
|
|
|
899
761
|
});
|
|
900
762
|
NumberFieldIncrement.displayName = "NumberFieldIncrement";
|
|
901
763
|
//#endregion
|
|
902
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
764
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/decrement/NumberFieldDecrement.mjs
|
|
903
765
|
/**
|
|
904
766
|
* A stepper button that decreases the field value when clicked.
|
|
905
767
|
* Renders a `<button>` element.
|
|
@@ -911,7 +773,7 @@ const NumberFieldDecrement = /*#__PURE__*/ React$1.forwardRef(function NumberFie
|
|
|
911
773
|
});
|
|
912
774
|
NumberFieldDecrement.displayName = "NumberFieldDecrement";
|
|
913
775
|
//#endregion
|
|
914
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
776
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/input/NumberFieldInput.mjs
|
|
915
777
|
const NAVIGATE_KEYS = /* @__PURE__ */ new Set([
|
|
916
778
|
"Backspace",
|
|
917
779
|
"Delete",
|
|
@@ -929,11 +791,11 @@ const NAVIGATE_KEYS = /* @__PURE__ */ new Set([
|
|
|
929
791
|
*/
|
|
930
792
|
const NumberFieldInput = /*#__PURE__*/ React$1.forwardRef(function NumberFieldInput(componentProps, forwardedRef) {
|
|
931
793
|
const { render, className, style, ...elementProps } = componentProps;
|
|
932
|
-
const { allowInputSyncRef,
|
|
794
|
+
const { allowInputSyncRef, formatOptionsRef, getAllowedNonNumericKeys, getStepAmount, id, incrementValue, inputMode, max, min, name, nameProp, setValue, state, setInputValue, locale, inputRef, onValueCommitted, lastChangedValueRef, hasPendingCommitRef, valueRef } = useNumberFieldRootContext();
|
|
795
|
+
const { disabled, readOnly, required, value, inputValue } = state;
|
|
933
796
|
const { clearErrors } = useFormContext();
|
|
934
797
|
const { validationMode, setTouched, setFocused, invalid, shouldValidateOnChange, validation } = useFieldRootContext();
|
|
935
798
|
const { labelId } = useLabelableContext();
|
|
936
|
-
const hasTouchedInputRef = React$1.useRef(false);
|
|
937
799
|
const blockRevalidationRef = React$1.useRef(false);
|
|
938
800
|
const pendingCaretRef = React$1.useRef(null);
|
|
939
801
|
useRegisterFieldControl(inputRef, id, value, void 0, !disabled, nameProp);
|
|
@@ -974,11 +836,6 @@ const NumberFieldInput = /*#__PURE__*/ React$1.forwardRef(function NumberFieldIn
|
|
|
974
836
|
onFocus(event) {
|
|
975
837
|
if (event.defaultPrevented || disabled) return;
|
|
976
838
|
setFocused(true);
|
|
977
|
-
if (hasTouchedInputRef.current) return;
|
|
978
|
-
hasTouchedInputRef.current = true;
|
|
979
|
-
const target = event.currentTarget;
|
|
980
|
-
const length = target.value.length;
|
|
981
|
-
target.setSelectionRange(length, length);
|
|
982
839
|
},
|
|
983
840
|
onBlur(event) {
|
|
984
841
|
if (event.defaultPrevented || disabled) return;
|
|
@@ -1016,7 +873,7 @@ const NumberFieldInput = /*#__PURE__*/ React$1.forwardRef(function NumberFieldIn
|
|
|
1016
873
|
blockRevalidationRef.current = false;
|
|
1017
874
|
return;
|
|
1018
875
|
}
|
|
1019
|
-
committedValue = lastChangedValueRef.current
|
|
876
|
+
committedValue = lastChangedValueRef.current;
|
|
1020
877
|
if (committedValue === value) blockRevalidationRef.current = false;
|
|
1021
878
|
}
|
|
1022
879
|
if (validationMode === "onBlur") validation.commit(committedValue);
|
|
@@ -1034,7 +891,7 @@ const NumberFieldInput = /*#__PURE__*/ React$1.forwardRef(function NumberFieldIn
|
|
|
1034
891
|
return;
|
|
1035
892
|
}
|
|
1036
893
|
const allowedNonNumericKeys = getAllowedNonNumericKeys();
|
|
1037
|
-
if (!Array.from(targetValue).every((ch) => isNumeralChar(ch) || ANY_MINUS_DETECT_RE.test(ch) || allowedNonNumericKeys.has(ch))) return;
|
|
894
|
+
if (!Array.from(targetValue).every((ch) => isNumeralChar(ch) || ANY_MINUS_DETECT_RE.test(ch) || allowedNonNumericKeys.has(ch) || FORMAT_CONTROL_DETECT_RE.test(ch))) return;
|
|
1038
895
|
const parsedValue = parseNumber(targetValue, locale, formatOptionsRef.current);
|
|
1039
896
|
setInputValue(targetValue);
|
|
1040
897
|
if (parsedValue !== null) setValue(parsedValue, createChangeEventDetails(inputChange, event.nativeEvent));
|
|
@@ -1065,22 +922,24 @@ const NumberFieldInput = /*#__PURE__*/ React$1.forwardRef(function NumberFieldIn
|
|
|
1065
922
|
if (event.key === symbol) {
|
|
1066
923
|
const symbolIndex = inputValue.indexOf(symbol);
|
|
1067
924
|
const isSymbolHighlighted = selectionContainsIndex(symbolIndex);
|
|
1068
|
-
isAllowedNonNumericKey =
|
|
925
|
+
isAllowedNonNumericKey = symbolIndex === -1 || isAllSelected || isSymbolHighlighted;
|
|
1069
926
|
}
|
|
1070
927
|
});
|
|
1071
928
|
const isNavigateKey = NAVIGATE_KEYS.has(event.key);
|
|
1072
929
|
const isStepKey = event.key === "ArrowUp" || event.key === "ArrowDown";
|
|
1073
930
|
if (event.which === 229 || event.altKey && !isStepKey || event.ctrlKey || event.metaKey || isAllowedNonNumericKey || isNumeralChar(event.key) || isNavigateKey) return;
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
if (event.key
|
|
931
|
+
let boundaryValue = null;
|
|
932
|
+
if (event.key === "Home" && min != null) boundaryValue = min;
|
|
933
|
+
else if (event.key === "End" && max != null) boundaryValue = max;
|
|
934
|
+
if (event.key.length > 1 && !isStepKey && boundaryValue === null) return;
|
|
1077
935
|
const currentValue = hadManualInput ? parseNumber(inputValue, locale, formatOptionsRef.current) : null;
|
|
1078
936
|
const amount = getStepAmount(event);
|
|
1079
|
-
|
|
937
|
+
event.preventDefault();
|
|
938
|
+
event.stopPropagation();
|
|
1080
939
|
const commitDetails = createGenericEventDetails(keyboard, nativeEvent);
|
|
1081
940
|
let changed = false;
|
|
1082
|
-
if (
|
|
1083
|
-
|
|
941
|
+
if (isStepKey || boundaryValue !== null) allowInputSyncRef.current = true;
|
|
942
|
+
if (isStepKey) {
|
|
1084
943
|
if (!hadManualInput) lastChangedValueRef.current = valueRef.current;
|
|
1085
944
|
changed = incrementValue(amount, {
|
|
1086
945
|
direction: event.key === "ArrowUp" ? 1 : -1,
|
|
@@ -1088,14 +947,8 @@ const NumberFieldInput = /*#__PURE__*/ React$1.forwardRef(function NumberFieldIn
|
|
|
1088
947
|
event: nativeEvent,
|
|
1089
948
|
reason: keyboard
|
|
1090
949
|
});
|
|
1091
|
-
} else if (
|
|
1092
|
-
|
|
1093
|
-
changed = setValue(min, createChangeEventDetails(keyboard, nativeEvent));
|
|
1094
|
-
} else if (willSetEnd) {
|
|
1095
|
-
allowInputSyncRef.current = true;
|
|
1096
|
-
changed = setValue(max, createChangeEventDetails(keyboard, nativeEvent));
|
|
1097
|
-
}
|
|
1098
|
-
if (changed) onValueCommitted(lastChangedValueRef.current ?? valueRef.current, commitDetails);
|
|
950
|
+
} else if (boundaryValue !== null) changed = setValue(boundaryValue, createChangeEventDetails(keyboard, nativeEvent));
|
|
951
|
+
if (changed) onValueCommitted(lastChangedValueRef.current, commitDetails);
|
|
1099
952
|
},
|
|
1100
953
|
onPaste(event) {
|
|
1101
954
|
if (event.defaultPrevented || readOnly || disabled) return;
|
|
@@ -1103,13 +956,16 @@ const NumberFieldInput = /*#__PURE__*/ React$1.forwardRef(function NumberFieldIn
|
|
|
1103
956
|
try {
|
|
1104
957
|
pastedData = event.clipboardData?.getData("text/plain") ?? "";
|
|
1105
958
|
} catch {
|
|
1106
|
-
|
|
959
|
+
{
|
|
960
|
+
const ownerStackMessage = SafeReact.captureOwnerStack?.() || "";
|
|
961
|
+
warn("<NumberField.Input> could not read clipboard text during paste handling.", ownerStackMessage);
|
|
962
|
+
}
|
|
1107
963
|
return;
|
|
1108
964
|
}
|
|
1109
965
|
event.preventDefault();
|
|
1110
966
|
const input = event.currentTarget;
|
|
1111
|
-
const selectionStart = input.selectionStart
|
|
1112
|
-
const selectionEnd = input.selectionEnd
|
|
967
|
+
const selectionStart = input.selectionStart;
|
|
968
|
+
const selectionEnd = input.selectionEnd;
|
|
1113
969
|
const nextText = inputValue.slice(0, selectionStart) + pastedData + inputValue.slice(selectionEnd);
|
|
1114
970
|
const parsedValue = parseNumber(nextText, locale, formatOptionsRef.current);
|
|
1115
971
|
if (parsedValue !== null) {
|
|
@@ -1128,7 +984,7 @@ const NumberFieldInput = /*#__PURE__*/ React$1.forwardRef(function NumberFieldIn
|
|
|
1128
984
|
});
|
|
1129
985
|
NumberFieldInput.displayName = "NumberFieldInput";
|
|
1130
986
|
//#endregion
|
|
1131
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
987
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/scrub-area/NumberFieldScrubAreaContext.mjs
|
|
1132
988
|
const NumberFieldScrubAreaContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
1133
989
|
NumberFieldScrubAreaContext.displayName = "NumberFieldScrubAreaContext";
|
|
1134
990
|
function useNumberFieldScrubAreaContext() {
|
|
@@ -1137,7 +993,7 @@ function useNumberFieldScrubAreaContext() {
|
|
|
1137
993
|
return context;
|
|
1138
994
|
}
|
|
1139
995
|
//#endregion
|
|
1140
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
996
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/utils/getViewportRect.mjs
|
|
1141
997
|
function getViewportRect(teleportDistance, scrubAreaEl) {
|
|
1142
998
|
const win = getWindow(scrubAreaEl);
|
|
1143
999
|
if (teleportDistance != null) {
|
|
@@ -1164,18 +1020,7 @@ function getViewportRect(teleportDistance, scrubAreaEl) {
|
|
|
1164
1020
|
};
|
|
1165
1021
|
}
|
|
1166
1022
|
//#endregion
|
|
1167
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
1168
|
-
function subscribeToVisualViewportResize(element, visualScaleRef) {
|
|
1169
|
-
const vV = getWindow(element).visualViewport;
|
|
1170
|
-
if (!vV) return () => {};
|
|
1171
|
-
function handleVisualResize() {
|
|
1172
|
-
if (vV) visualScaleRef.current = vV.scale;
|
|
1173
|
-
}
|
|
1174
|
-
handleVisualResize();
|
|
1175
|
-
return addEventListener(vV, "resize", handleVisualResize);
|
|
1176
|
-
}
|
|
1177
|
-
//#endregion
|
|
1178
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/scrub-area/NumberFieldScrubArea.mjs
|
|
1023
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/scrub-area/NumberFieldScrubArea.mjs
|
|
1179
1024
|
const SCRUB_AREA_STYLE = {
|
|
1180
1025
|
touchAction: "none",
|
|
1181
1026
|
WebkitUserSelect: "none",
|
|
@@ -1189,7 +1034,8 @@ const SCRUB_AREA_STYLE = {
|
|
|
1189
1034
|
*/
|
|
1190
1035
|
const NumberFieldScrubArea = /*#__PURE__*/ React$1.forwardRef(function NumberFieldScrubArea(componentProps, forwardedRef) {
|
|
1191
1036
|
const { render, className, direction = "horizontal", pixelSensitivity = 2, teleportDistance, style, ...elementProps } = componentProps;
|
|
1192
|
-
const { state, setIsScrubbing: setRootScrubbing,
|
|
1037
|
+
const { state, setIsScrubbing: setRootScrubbing, inputRef, focusInput, incrementValue, allowInputSyncRef, getStepAmount, onValueCommitted, lastChangedValueRef, valueRef } = useNumberFieldRootContext();
|
|
1038
|
+
const { disabled, readOnly } = state;
|
|
1193
1039
|
const scrubAreaRef = React$1.useRef(null);
|
|
1194
1040
|
const isScrubbingRef = React$1.useRef(false);
|
|
1195
1041
|
const didMoveRef = React$1.useRef(false);
|
|
@@ -1199,17 +1045,13 @@ const NumberFieldScrubArea = /*#__PURE__*/ React$1.forwardRef(function NumberFie
|
|
|
1199
1045
|
x: 0,
|
|
1200
1046
|
y: 0
|
|
1201
1047
|
});
|
|
1202
|
-
const visualScaleRef = React$1.useRef(1);
|
|
1203
1048
|
const exitPointerLockTimeout = useTimeout();
|
|
1204
1049
|
const [isTouchInput, setIsTouchInput] = React$1.useState(false);
|
|
1205
1050
|
const [isPointerLockDenied, setIsPointerLockDenied] = React$1.useState(false);
|
|
1206
1051
|
const [isScrubbing, setIsScrubbing] = React$1.useState(false);
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
}, [isScrubbing]);
|
|
1211
|
-
function updateCursorTransform(x, y) {
|
|
1212
|
-
if (scrubAreaCursorRef.current) scrubAreaCursorRef.current.style.transform = `translate3d(${x}px,${y}px,0) scale(${1 / visualScaleRef.current})`;
|
|
1052
|
+
function updateCursorTransform(virtualCursor, x, y) {
|
|
1053
|
+
const scale = getWindow(virtualCursor).visualViewport?.scale ?? 1;
|
|
1054
|
+
virtualCursor.style.transform = `translate3d(${x}px,${y}px,0) scale(${1 / scale})`;
|
|
1213
1055
|
}
|
|
1214
1056
|
const onScrub = useStableCallback(({ movementX, movementY }) => {
|
|
1215
1057
|
const virtualCursor = scrubAreaCursorRef.current;
|
|
@@ -1217,18 +1059,17 @@ const NumberFieldScrubArea = /*#__PURE__*/ React$1.forwardRef(function NumberFie
|
|
|
1217
1059
|
if (!virtualCursor || !scrubAreaEl) return;
|
|
1218
1060
|
const rect = getViewportRect(teleportDistance, scrubAreaEl);
|
|
1219
1061
|
const coords = virtualCursorCoords.current;
|
|
1062
|
+
const wrap = (coord, halfSize, low, high) => {
|
|
1063
|
+
if (coord + halfSize < low) return high - halfSize;
|
|
1064
|
+
if (coord + halfSize > high) return low - halfSize;
|
|
1065
|
+
return coord;
|
|
1066
|
+
};
|
|
1220
1067
|
const newCoords = {
|
|
1221
|
-
x: Math.round(coords.x + movementX),
|
|
1222
|
-
y: Math.round(coords.y + movementY)
|
|
1068
|
+
x: wrap(Math.round(coords.x + movementX), virtualCursor.offsetWidth / 2, rect.left, rect.right),
|
|
1069
|
+
y: wrap(Math.round(coords.y + movementY), virtualCursor.offsetHeight / 2, rect.top, rect.bottom)
|
|
1223
1070
|
};
|
|
1224
|
-
const cursorWidth = virtualCursor.offsetWidth;
|
|
1225
|
-
const cursorHeight = virtualCursor.offsetHeight;
|
|
1226
|
-
if (newCoords.x + cursorWidth / 2 < rect.left) newCoords.x = rect.right - cursorWidth / 2;
|
|
1227
|
-
else if (newCoords.x + cursorWidth / 2 > rect.right) newCoords.x = rect.left - cursorWidth / 2;
|
|
1228
|
-
if (newCoords.y + cursorHeight / 2 < rect.top) newCoords.y = rect.bottom - cursorHeight / 2;
|
|
1229
|
-
else if (newCoords.y + cursorHeight / 2 > rect.bottom) newCoords.y = rect.top - cursorHeight / 2;
|
|
1230
1071
|
virtualCursorCoords.current = newCoords;
|
|
1231
|
-
updateCursorTransform(newCoords.x, newCoords.y);
|
|
1072
|
+
updateCursorTransform(virtualCursor, newCoords.x, newCoords.y);
|
|
1232
1073
|
});
|
|
1233
1074
|
const onScrubbingChange = useStableCallback((scrubbingValue, { clientX, clientY }) => {
|
|
1234
1075
|
ReactDOM.flushSync(() => {
|
|
@@ -1242,7 +1083,7 @@ const NumberFieldScrubArea = /*#__PURE__*/ React$1.forwardRef(function NumberFie
|
|
|
1242
1083
|
y: clientY - virtualCursor.offsetHeight / 2
|
|
1243
1084
|
};
|
|
1244
1085
|
virtualCursorCoords.current = initialCoords;
|
|
1245
|
-
updateCursorTransform(initialCoords.x, initialCoords.y);
|
|
1086
|
+
updateCursorTransform(virtualCursor, initialCoords.x, initialCoords.y);
|
|
1246
1087
|
});
|
|
1247
1088
|
React$1.useEffect(function registerGlobalScrubbingEventListeners() {
|
|
1248
1089
|
if (!inputRef.current || disabled || readOnly || !isScrubbing) return;
|
|
@@ -1335,13 +1176,12 @@ const NumberFieldScrubArea = /*#__PURE__*/ React$1.forwardRef(function NumberFie
|
|
|
1335
1176
|
role: "presentation",
|
|
1336
1177
|
style: SCRUB_AREA_STYLE,
|
|
1337
1178
|
async onPointerDown(event) {
|
|
1338
|
-
|
|
1339
|
-
if (event.defaultPrevented || readOnly || !isMainButton || disabled) return;
|
|
1179
|
+
if (event.defaultPrevented || readOnly || event.button || disabled) return;
|
|
1340
1180
|
const isTouch = event.pointerType === "touch";
|
|
1341
1181
|
setIsTouchInput(isTouch);
|
|
1342
1182
|
if (event.pointerType === "mouse") {
|
|
1343
1183
|
event.preventDefault();
|
|
1344
|
-
|
|
1184
|
+
focusInput();
|
|
1345
1185
|
}
|
|
1346
1186
|
isScrubbingRef.current = true;
|
|
1347
1187
|
didMoveRef.current = false;
|
|
@@ -1376,7 +1216,7 @@ const NumberFieldScrubArea = /*#__PURE__*/ React$1.forwardRef(function NumberFie
|
|
|
1376
1216
|
});
|
|
1377
1217
|
NumberFieldScrubArea.displayName = "NumberFieldScrubArea";
|
|
1378
1218
|
//#endregion
|
|
1379
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
1219
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.mjs
|
|
1380
1220
|
const CURSOR_STYLE = {
|
|
1381
1221
|
position: "fixed",
|
|
1382
1222
|
top: 0,
|
|
@@ -1415,7 +1255,7 @@ const NumberFieldScrubAreaCursor = /*#__PURE__*/ React$1.forwardRef(function Num
|
|
|
1415
1255
|
});
|
|
1416
1256
|
NumberFieldScrubAreaCursor.displayName = "NumberFieldScrubAreaCursor";
|
|
1417
1257
|
//#endregion
|
|
1418
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
1258
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.8.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/index.parts.mjs
|
|
1419
1259
|
var index_parts_exports = /* @__PURE__ */ __exportAll({
|
|
1420
1260
|
Decrement: () => NumberFieldDecrement,
|
|
1421
1261
|
Group: () => NumberFieldGroup,
|