@cloudflare/kumo 2.13.1 → 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 +31 -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-ob6c9b8fq0hx7uke.js → sidebar-in9zhvr473afsjpp.js} +118 -33
- 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-CMiftS8L2.d.ts → index-ChGFA5-n.d.ts} +10 -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,79 +1,71 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { t as __exportAll } from "./rolldown-runtime-hi7ti5xiuxsegr96.js";
|
|
3
|
-
import { c as warn,
|
|
4
|
-
import { n as useIsoLayoutEffect } from "./safeReact-
|
|
5
|
-
import {
|
|
6
|
-
import { E as isHTMLElement, T as isElement, w as getWindow } from "./vendor-floating-ui-
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import { t as
|
|
10
|
-
import { t as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import { t as
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import { n as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import { t as
|
|
20
|
-
import { t as
|
|
21
|
-
import { t as
|
|
22
|
-
import { t as
|
|
23
|
-
import { t as
|
|
24
|
-
import {
|
|
25
|
-
import { t as
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import { t as
|
|
29
|
-
import { t as
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
3
|
+
import { c as warn, d as useMergedRefs, r as mergeProps, t as useRenderElement } from "./useRenderElement-lrvp2pwrpt5zq1zd.js";
|
|
4
|
+
import { n as useIsoLayoutEffect } from "./safeReact-hpp4cck3y2s5jg75.js";
|
|
5
|
+
import { E as matchesFocusVisible, J as getTarget, K as activeElement, q as contains, v as ownerDocument } from "./vendor-utils-ecfbsk425x1bm0gh.js";
|
|
6
|
+
import { E as isHTMLElement, T as isElement, w as getWindow } from "./vendor-floating-ui-fqblx3wa0r71mjoo.js";
|
|
7
|
+
import { A as trackPress, b as keyboard, c as drag, h as inputChange, w as none } from "./reason-parts-m5ishukzeux3q0pc.js";
|
|
8
|
+
import { n as createGenericEventDetails, t as createChangeEventDetails } from "./createBaseUIEventDetails-3ob3qgs95ffm8l0w.js";
|
|
9
|
+
import { t as addEventListener } from "./addEventListener-l40nxvf06iukgvnj.js";
|
|
10
|
+
import { t as useValueAsRef } from "./useValueAsRef-o4s9ohb3aczypmnk.js";
|
|
11
|
+
import { t as useStableCallback } from "./useStableCallback-b1i1ghzd9k75bb85.js";
|
|
12
|
+
import { n as useAnimationFrame } from "./useAnimationFrame-0tt315hl9n3jzl86.js";
|
|
13
|
+
import { t as visuallyHidden } from "./visuallyHidden-nous086atnlxtf74.js";
|
|
14
|
+
import { t as useBaseUiId } from "./useBaseUiId-lg1teubxudgin0w2.js";
|
|
15
|
+
import { n as useDirection } from "./DirectionContext-opvqcb794uxicri4.js";
|
|
16
|
+
import { a as useFieldRootContext, c as fieldValidityMapping, n as useLabelableContext } from "./LabelableContext-ccxbhu73vrk089m1.js";
|
|
17
|
+
import { n as useFormContext } from "./FormContext-bsu99v8i8pwu1yxc.js";
|
|
18
|
+
import { t as useLabelableId } from "./useLabelableId-gqiiuqqn2k0u62r4.js";
|
|
19
|
+
import { n as useLabel, t as focusElementWithVisible } from "./useLabel-kcggu762z3z2taeb.js";
|
|
20
|
+
import { t as useControlled } from "./useControlled-lfns1ot6kwowa4t4.js";
|
|
21
|
+
import { t as useRegisterFieldControl } from "./useRegisterFieldControl-lvusf6vc963clx02.js";
|
|
22
|
+
import { t as useValueChanged } from "./useValueChanged-cz5wflhe8g15n6w1.js";
|
|
23
|
+
import { t as areArraysEqual } from "./areArraysEqual-bcx201k1x9ziizym.js";
|
|
24
|
+
import { t as clamp } from "./clamp-jcjhzx71s6wt1rnc.js";
|
|
25
|
+
import { n as resolveAriaLabelledBy, t as getDefaultLabelId } from "./resolveAriaLabelledBy-nc8mdie5shy87nsb.js";
|
|
26
|
+
import { t as CompositeList } from "./CompositeList-lbr4enu6yzek7oa9.js";
|
|
27
|
+
import { t as useCompositeListItem } from "./useCompositeListItem-odg6yo4h8866b37o.js";
|
|
28
|
+
import { a as COMPOSITE_KEYS, c as PAGE_DOWN, i as ARROW_UP, l as PAGE_UP, n as ARROW_LEFT, o as HOME, r as ARROW_RIGHT, t as ARROW_DOWN } from "./composite-ab8dmdfoj6tmhcn1.js";
|
|
29
|
+
import { t as formatNumber } from "./formatNumber-kcnmauoqxku5a84c.js";
|
|
30
|
+
import { t as valueToPercent } from "./valueToPercent-d7gbqk1umostj7ch.js";
|
|
31
|
+
import { n as useIsHydrating, t as PrehydrationScript } from "./PrehydrationScript-j6zlrxmojrqni6b9.js";
|
|
32
32
|
import * as React$1 from "react";
|
|
33
33
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
34
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
34
|
+
//#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/slider/utils/asc.mjs
|
|
35
35
|
function asc(a, b) {
|
|
36
36
|
return a - b;
|
|
37
37
|
}
|
|
38
38
|
//#endregion
|
|
39
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
40
|
-
function replaceArrayItemAtIndex(array, index, newValue) {
|
|
41
|
-
const output = array.slice();
|
|
42
|
-
output[index] = newValue;
|
|
43
|
-
return output.sort(asc);
|
|
44
|
-
}
|
|
45
|
-
//#endregion
|
|
46
|
-
//#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/slider/utils/getSliderValue.mjs
|
|
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/slider/utils/getSliderValue.mjs
|
|
47
40
|
function getSliderValue(valueInput, index, min, max, range, values) {
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
41
|
+
const clamped = clamp(valueInput, min, max);
|
|
42
|
+
if (!range) return clamped;
|
|
43
|
+
const output = values.slice();
|
|
44
|
+
output[index] = clamp(clamped, values[index - 1] ?? -Infinity, values[index + 1] ?? Infinity);
|
|
45
|
+
return output.sort(asc);
|
|
52
46
|
}
|
|
53
47
|
//#endregion
|
|
54
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
48
|
+
//#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/slider/utils/validateMinimumDistance.mjs
|
|
55
49
|
function validateMinimumDistance(values, step, minStepsBetweenValues) {
|
|
56
50
|
if (!Array.isArray(values)) return true;
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
return acc;
|
|
61
|
-
}, []);
|
|
62
|
-
return Math.min(...distances) >= step * minStepsBetweenValues;
|
|
51
|
+
const minDistance = step * minStepsBetweenValues;
|
|
52
|
+
for (let i = 0; i < values.length - 1; i += 1) if (!(Math.abs(values[i] - values[i + 1]) >= minDistance)) return false;
|
|
53
|
+
return true;
|
|
63
54
|
}
|
|
64
55
|
//#endregion
|
|
65
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
56
|
+
//#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/slider/root/stateAttributesMapping.mjs
|
|
57
|
+
const nullMapping = () => null;
|
|
66
58
|
const sliderStateAttributesMapping = {
|
|
67
|
-
activeThumbIndex:
|
|
68
|
-
max:
|
|
69
|
-
min:
|
|
70
|
-
minStepsBetweenValues:
|
|
71
|
-
step:
|
|
72
|
-
values:
|
|
59
|
+
activeThumbIndex: nullMapping,
|
|
60
|
+
max: nullMapping,
|
|
61
|
+
min: nullMapping,
|
|
62
|
+
minStepsBetweenValues: nullMapping,
|
|
63
|
+
step: nullMapping,
|
|
64
|
+
values: nullMapping,
|
|
73
65
|
...fieldValidityMapping
|
|
74
66
|
};
|
|
75
67
|
//#endregion
|
|
76
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
68
|
+
//#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/slider/root/SliderRootContext.mjs
|
|
77
69
|
const SliderRootContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
78
70
|
SliderRootContext.displayName = "SliderRootContext";
|
|
79
71
|
function useSliderRootContext() {
|
|
@@ -82,14 +74,9 @@ function useSliderRootContext() {
|
|
|
82
74
|
return context;
|
|
83
75
|
}
|
|
84
76
|
//#endregion
|
|
85
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
86
|
-
function getSliderChangeEventReason(event) {
|
|
87
|
-
return "key" in event ? keyboard : inputChange;
|
|
88
|
-
}
|
|
77
|
+
//#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/slider/root/SliderRoot.mjs
|
|
89
78
|
function areValuesEqual(newValue, oldValue) {
|
|
90
|
-
|
|
91
|
-
if (Array.isArray(newValue) && Array.isArray(oldValue)) return areArraysEqual(newValue, oldValue);
|
|
92
|
-
return false;
|
|
79
|
+
return newValue === oldValue || Array.isArray(newValue) && Array.isArray(oldValue) && areArraysEqual(newValue, oldValue);
|
|
93
80
|
}
|
|
94
81
|
/**
|
|
95
82
|
* Groups all parts of the slider.
|
|
@@ -118,12 +105,10 @@ const SliderRoot = /*#__PURE__*/ React$1.forwardRef(function SliderRoot(componen
|
|
|
118
105
|
const sliderRef = React$1.useRef(null);
|
|
119
106
|
const controlRef = React$1.useRef(null);
|
|
120
107
|
const thumbRefs = React$1.useRef([]);
|
|
121
|
-
const pressedInputRef = React$1.useRef(null);
|
|
122
108
|
const pressedThumbCenterOffsetRef = React$1.useRef(null);
|
|
123
109
|
const pressedThumbIndexRef = React$1.useRef(-1);
|
|
124
110
|
const pressedValuesRef = React$1.useRef(null);
|
|
125
|
-
const lastChangeReasonRef = React$1.useRef(
|
|
126
|
-
const formatOptionsRef = useValueAsRef(format);
|
|
111
|
+
const lastChangeReasonRef = React$1.useRef(none);
|
|
127
112
|
const [active, setActiveState] = React$1.useState(-1);
|
|
128
113
|
const [lastUsedThumbIndex, setLastUsedThumbIndex] = React$1.useState(-1);
|
|
129
114
|
const [dragging, setDragging] = React$1.useState(false);
|
|
@@ -133,34 +118,35 @@ const SliderRoot = /*#__PURE__*/ React$1.forwardRef(function SliderRoot(componen
|
|
|
133
118
|
setActiveState(value);
|
|
134
119
|
if (value !== -1) setLastUsedThumbIndex(value);
|
|
135
120
|
});
|
|
136
|
-
useRegisterFieldControl(validation.inputRef, id, valueUnwrapped, void 0, !disabled, nameProp);
|
|
137
|
-
useValueChanged(valueUnwrapped, () => {
|
|
138
|
-
clearErrors(name);
|
|
139
|
-
validation.change(valueUnwrapped);
|
|
140
|
-
const initialValue = validityData.initialValue;
|
|
141
|
-
let isDirty;
|
|
142
|
-
if (Array.isArray(valueUnwrapped) && Array.isArray(initialValue)) isDirty = !areArraysEqual(valueUnwrapped, initialValue);
|
|
143
|
-
else isDirty = valueUnwrapped !== initialValue;
|
|
144
|
-
setDirty(isDirty);
|
|
145
|
-
});
|
|
146
121
|
const registerFieldControlRef = useStableCallback((element) => {
|
|
147
122
|
if (element) controlRef.current = element;
|
|
148
123
|
});
|
|
149
124
|
const range = Array.isArray(valueUnwrapped);
|
|
150
125
|
const values = React$1.useMemo(() => {
|
|
151
126
|
if (!range) return [clamp(valueUnwrapped, min, max)];
|
|
152
|
-
return valueUnwrapped.
|
|
127
|
+
return valueUnwrapped.map((value) => clamp(value, min, max)).sort(asc);
|
|
153
128
|
}, [
|
|
154
129
|
max,
|
|
155
130
|
min,
|
|
156
131
|
range,
|
|
157
132
|
valueUnwrapped
|
|
158
133
|
]);
|
|
134
|
+
const fieldValue = range ? values : values[0];
|
|
135
|
+
useRegisterFieldControl(validation.inputRef, id, fieldValue, void 0, !disabled, nameProp);
|
|
136
|
+
useValueChanged(fieldValue, () => {
|
|
137
|
+
clearErrors(name);
|
|
138
|
+
validation.change(fieldValue);
|
|
139
|
+
const initialValue = validityData.initialValue;
|
|
140
|
+
let isDirty;
|
|
141
|
+
if (Array.isArray(fieldValue) && Array.isArray(initialValue)) isDirty = !areArraysEqual(fieldValue, initialValue);
|
|
142
|
+
else isDirty = fieldValue !== initialValue;
|
|
143
|
+
setDirty(isDirty);
|
|
144
|
+
});
|
|
159
145
|
const setValue = useStableCallback((newValue, details) => {
|
|
160
146
|
if (Number.isNaN(newValue) || areValuesEqual(newValue, valueUnwrapped)) return false;
|
|
161
|
-
const
|
|
162
|
-
const
|
|
163
|
-
const clonedEvent = new (nativeEvent.
|
|
147
|
+
const nativeEvent = details.event;
|
|
148
|
+
const EventConstructor = nativeEvent.constructor;
|
|
149
|
+
const clonedEvent = new EventConstructor(nativeEvent.type, nativeEvent);
|
|
164
150
|
Object.defineProperty(clonedEvent, "target", {
|
|
165
151
|
writable: true,
|
|
166
152
|
value: {
|
|
@@ -168,17 +154,17 @@ const SliderRoot = /*#__PURE__*/ React$1.forwardRef(function SliderRoot(componen
|
|
|
168
154
|
name
|
|
169
155
|
}
|
|
170
156
|
});
|
|
171
|
-
|
|
172
|
-
onValueChange(newValue,
|
|
173
|
-
if (
|
|
174
|
-
lastChangeReasonRef.current =
|
|
157
|
+
details.event = clonedEvent;
|
|
158
|
+
onValueChange(newValue, details);
|
|
159
|
+
if (details.isCanceled) return false;
|
|
160
|
+
lastChangeReasonRef.current = details.reason;
|
|
175
161
|
setValueUnwrapped(newValue);
|
|
176
162
|
return true;
|
|
177
163
|
});
|
|
178
164
|
const handleInputChange = useStableCallback((valueInput, index, event) => {
|
|
179
165
|
const newValue = getSliderValue(valueInput, index, min, max, range, values);
|
|
180
166
|
if (validateMinimumDistance(newValue, step, minStepsBetweenValues)) {
|
|
181
|
-
const reason =
|
|
167
|
+
const reason = "key" in event ? keyboard : inputChange;
|
|
182
168
|
const applied = setValue(newValue, createChangeEventDetails(reason, event.nativeEvent, void 0, { activeThumbIndex: index }));
|
|
183
169
|
setTouched(true);
|
|
184
170
|
if (applied) onValueCommitted(newValue, createGenericEventDetails(reason, event.nativeEvent));
|
|
@@ -186,10 +172,15 @@ const SliderRoot = /*#__PURE__*/ React$1.forwardRef(function SliderRoot(componen
|
|
|
186
172
|
});
|
|
187
173
|
if (min >= max) warn("Slider `max` must be greater than `min`.");
|
|
188
174
|
useIsoLayoutEffect(() => {
|
|
175
|
+
if (!disabled) return;
|
|
189
176
|
const activeEl = activeElement(ownerDocument(sliderRef.current));
|
|
190
|
-
if (
|
|
191
|
-
|
|
192
|
-
|
|
177
|
+
if (contains(sliderRef.current, activeEl)) activeEl.blur();
|
|
178
|
+
if (active !== -1) setActive(-1);
|
|
179
|
+
}, [
|
|
180
|
+
active,
|
|
181
|
+
disabled,
|
|
182
|
+
setActive
|
|
183
|
+
]);
|
|
193
184
|
const state = React$1.useMemo(() => ({
|
|
194
185
|
...fieldState,
|
|
195
186
|
activeThumbIndex: active,
|
|
@@ -219,7 +210,7 @@ const SliderRoot = /*#__PURE__*/ React$1.forwardRef(function SliderRoot(componen
|
|
|
219
210
|
disabled,
|
|
220
211
|
dragging,
|
|
221
212
|
validation,
|
|
222
|
-
|
|
213
|
+
format,
|
|
223
214
|
handleInputChange,
|
|
224
215
|
indicatorPosition,
|
|
225
216
|
inset: thumbAlignment !== "center",
|
|
@@ -236,7 +227,6 @@ const SliderRoot = /*#__PURE__*/ React$1.forwardRef(function SliderRoot(componen
|
|
|
236
227
|
name,
|
|
237
228
|
onValueCommitted,
|
|
238
229
|
orientation,
|
|
239
|
-
pressedInputRef,
|
|
240
230
|
pressedThumbCenterOffsetRef,
|
|
241
231
|
pressedThumbIndexRef,
|
|
242
232
|
pressedValuesRef,
|
|
@@ -255,18 +245,16 @@ const SliderRoot = /*#__PURE__*/ React$1.forwardRef(function SliderRoot(componen
|
|
|
255
245
|
values
|
|
256
246
|
}), [
|
|
257
247
|
active,
|
|
258
|
-
controlRef,
|
|
259
248
|
ariaLabelledby,
|
|
260
249
|
defaultLabelId,
|
|
261
250
|
disabled,
|
|
262
251
|
dragging,
|
|
263
252
|
validation,
|
|
264
|
-
|
|
253
|
+
format,
|
|
265
254
|
handleInputChange,
|
|
266
255
|
indicatorPosition,
|
|
267
256
|
largeStep,
|
|
268
257
|
lastUsedThumbIndex,
|
|
269
|
-
lastChangeReasonRef,
|
|
270
258
|
form,
|
|
271
259
|
locale,
|
|
272
260
|
max,
|
|
@@ -275,22 +263,14 @@ const SliderRoot = /*#__PURE__*/ React$1.forwardRef(function SliderRoot(componen
|
|
|
275
263
|
name,
|
|
276
264
|
onValueCommitted,
|
|
277
265
|
orientation,
|
|
278
|
-
pressedInputRef,
|
|
279
|
-
pressedThumbCenterOffsetRef,
|
|
280
|
-
pressedThumbIndexRef,
|
|
281
|
-
pressedValuesRef,
|
|
282
266
|
registerFieldControlRef,
|
|
283
267
|
setActive,
|
|
284
|
-
setDragging,
|
|
285
|
-
setIndicatorPosition,
|
|
286
|
-
setLabelId,
|
|
287
268
|
setValue,
|
|
288
269
|
state,
|
|
289
270
|
step,
|
|
290
271
|
thumbCollisionBehavior,
|
|
291
272
|
thumbAlignment,
|
|
292
273
|
thumbMap,
|
|
293
|
-
thumbRefs,
|
|
294
274
|
values
|
|
295
275
|
]);
|
|
296
276
|
const element = useRenderElement("div", componentProps, {
|
|
@@ -318,7 +298,7 @@ const SliderRoot = /*#__PURE__*/ React$1.forwardRef(function SliderRoot(componen
|
|
|
318
298
|
});
|
|
319
299
|
SliderRoot.displayName = "SliderRoot";
|
|
320
300
|
//#endregion
|
|
321
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
301
|
+
//#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/slider/label/SliderLabel.mjs
|
|
322
302
|
/**
|
|
323
303
|
* An accessible label that is automatically associated with the slider thumbs.
|
|
324
304
|
* Renders a `<div>` element.
|
|
@@ -342,20 +322,21 @@ const SliderLabel = /*#__PURE__*/ React$1.forwardRef(function SliderLabel(compon
|
|
|
342
322
|
const fallbackInput = fallbackInputs?.length === 1 ? fallbackInputs[0] : null;
|
|
343
323
|
if (isHTMLElement(fallbackInput)) focusElementWithVisible(fallbackInput);
|
|
344
324
|
}
|
|
325
|
+
const labelProps = useLabel({
|
|
326
|
+
id: rootLabelId,
|
|
327
|
+
setLabelId,
|
|
328
|
+
focusControl
|
|
329
|
+
});
|
|
345
330
|
return useRenderElement("div", componentProps, {
|
|
346
331
|
ref: forwardedRef,
|
|
347
332
|
state,
|
|
348
|
-
props: [
|
|
349
|
-
id: rootLabelId,
|
|
350
|
-
setLabelId,
|
|
351
|
-
focusControl
|
|
352
|
-
}), elementProps],
|
|
333
|
+
props: [labelProps, elementProps],
|
|
353
334
|
stateAttributesMapping: sliderStateAttributesMapping
|
|
354
335
|
});
|
|
355
336
|
});
|
|
356
337
|
SliderLabel.displayName = "SliderLabel";
|
|
357
338
|
//#endregion
|
|
358
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
339
|
+
//#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/slider/value/SliderValue.mjs
|
|
359
340
|
/**
|
|
360
341
|
* Displays the current value of the slider as text.
|
|
361
342
|
* Renders an `<output>` element.
|
|
@@ -364,20 +345,14 @@ SliderLabel.displayName = "SliderLabel";
|
|
|
364
345
|
*/
|
|
365
346
|
const SliderValue = /*#__PURE__*/ React$1.forwardRef(function SliderValue(componentProps, forwardedRef) {
|
|
366
347
|
const { "aria-live": ariaLive = "off", render, className, children, style, ...elementProps } = componentProps;
|
|
367
|
-
const { thumbMap, state, values,
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
const formattedValues = React$1.useMemo(() => {
|
|
372
|
-
const arr = [];
|
|
373
|
-
for (let i = 0; i < values.length; i += 1) arr.push(formatNumber(values[i], locale, formatOptionsRef.current ?? void 0));
|
|
374
|
-
return arr;
|
|
375
|
-
}, [
|
|
376
|
-
formatOptionsRef,
|
|
348
|
+
const { thumbMap, state, values, format, locale } = useSliderRootContext();
|
|
349
|
+
const outputFor = Array.from(thumbMap.values(), ({ inputId }) => inputId).join(" ").trim() || void 0;
|
|
350
|
+
const formattedValues = React$1.useMemo(() => values.map((v) => formatNumber(v, locale, format)), [
|
|
351
|
+
format,
|
|
377
352
|
locale,
|
|
378
353
|
values
|
|
379
354
|
]);
|
|
380
|
-
const defaultDisplayValue =
|
|
355
|
+
const defaultDisplayValue = formattedValues.join(" – ");
|
|
381
356
|
return useRenderElement("output", componentProps, {
|
|
382
357
|
state,
|
|
383
358
|
ref: forwardedRef,
|
|
@@ -391,16 +366,13 @@ const SliderValue = /*#__PURE__*/ React$1.forwardRef(function SliderValue(compon
|
|
|
391
366
|
});
|
|
392
367
|
SliderValue.displayName = "SliderValue";
|
|
393
368
|
//#endregion
|
|
394
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
395
|
-
function getMidpoint(element) {
|
|
369
|
+
//#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/slider/utils/getMidpoint.mjs
|
|
370
|
+
function getMidpoint(element, vertical) {
|
|
396
371
|
const rect = element.getBoundingClientRect();
|
|
397
|
-
return
|
|
398
|
-
x: (rect.left + rect.right) / 2,
|
|
399
|
-
y: (rect.top + rect.bottom) / 2
|
|
400
|
-
};
|
|
372
|
+
return vertical ? (rect.top + rect.bottom) / 2 : (rect.left + rect.right) / 2;
|
|
401
373
|
}
|
|
402
374
|
//#endregion
|
|
403
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
375
|
+
//#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/slider/utils/roundValueToStep.mjs
|
|
404
376
|
function getDecimalPrecision(num) {
|
|
405
377
|
if (num === 0) return 0;
|
|
406
378
|
if (Math.abs(num) < 1) {
|
|
@@ -416,22 +388,26 @@ function roundValueToStep(value, step, min) {
|
|
|
416
388
|
return Number(nearest.toFixed(Math.max(getDecimalPrecision(step), getDecimalPrecision(min))));
|
|
417
389
|
}
|
|
418
390
|
//#endregion
|
|
419
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
391
|
+
//#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/slider/utils/getPushedThumbValues.mjs
|
|
420
392
|
/**
|
|
421
393
|
* Returns a new array of slider values where attempting to move the thumb at `index`
|
|
422
394
|
* beyond its neighbours "pushes" them while respecting `minStepsBetweenValues`.
|
|
395
|
+
*
|
|
396
|
+
* Positional arguments are deliberate: property names of an options object don't
|
|
397
|
+
* minify, so passing them positionally keeps this internal helper smaller in the bundle.
|
|
423
398
|
*/
|
|
424
|
-
function getPushedThumbValues(
|
|
425
|
-
if (values.length === 0) return [];
|
|
399
|
+
function getPushedThumbValues(values, index, nextValue, min, max, step, minStepsBetweenValues, initialValues) {
|
|
426
400
|
const nextValues = values.slice();
|
|
427
401
|
const minValueDifference = step * minStepsBetweenValues;
|
|
428
402
|
const lastIndex = nextValues.length - 1;
|
|
429
403
|
const baseInitialValues = initialValues ?? values;
|
|
430
|
-
|
|
404
|
+
const indexMin = min + index * minValueDifference;
|
|
405
|
+
const indexMax = max - (lastIndex - index) * minValueDifference;
|
|
406
|
+
nextValues[index] = clamp(nextValue, indexMin, indexMax);
|
|
431
407
|
for (let i = index + 1; i <= lastIndex; i += 1) {
|
|
432
408
|
const minAllowed = nextValues[i - 1] + minValueDifference;
|
|
433
409
|
const maxAllowed = max - (lastIndex - i) * minValueDifference;
|
|
434
|
-
const initialValue = baseInitialValues[i]
|
|
410
|
+
const initialValue = baseInitialValues[i];
|
|
435
411
|
let candidate = Math.max(nextValues[i], minAllowed);
|
|
436
412
|
if (initialValue < candidate) candidate = Math.max(initialValue, minAllowed);
|
|
437
413
|
nextValues[i] = clamp(candidate, minAllowed, maxAllowed);
|
|
@@ -439,7 +415,7 @@ function getPushedThumbValues({ values, index, nextValue, min, max, step, minSte
|
|
|
439
415
|
for (let i = index - 1; i >= 0; i -= 1) {
|
|
440
416
|
const maxAllowed = nextValues[i + 1] - minValueDifference;
|
|
441
417
|
const minAllowed = min + i * minValueDifference;
|
|
442
|
-
const initialValue = baseInitialValues[i]
|
|
418
|
+
const initialValue = baseInitialValues[i];
|
|
443
419
|
let candidate = Math.min(nextValues[i], maxAllowed);
|
|
444
420
|
if (initialValue > candidate) candidate = Math.min(initialValue, maxAllowed);
|
|
445
421
|
nextValues[i] = clamp(candidate, minAllowed, maxAllowed);
|
|
@@ -448,8 +424,12 @@ function getPushedThumbValues({ values, index, nextValue, min, max, step, minSte
|
|
|
448
424
|
return nextValues;
|
|
449
425
|
}
|
|
450
426
|
//#endregion
|
|
451
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
452
|
-
|
|
427
|
+
//#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/slider/utils/resolveThumbCollision.mjs
|
|
428
|
+
/**
|
|
429
|
+
* Positional arguments are deliberate: property names of an options object don't
|
|
430
|
+
* minify, so passing them positionally keeps this internal helper smaller in the bundle.
|
|
431
|
+
*/
|
|
432
|
+
function resolveThumbCollision(behavior, values, currentValues, initialValues, pressedIndex, nextValue, min, max, step, minStepsBetweenValues) {
|
|
453
433
|
const activeValues = currentValues ?? values;
|
|
454
434
|
const baselineValues = initialValues ?? values;
|
|
455
435
|
if (!(activeValues.length > 1)) return {
|
|
@@ -458,16 +438,22 @@ function resolveThumbCollision({ behavior, values, currentValues, initialValues,
|
|
|
458
438
|
didSwap: false
|
|
459
439
|
};
|
|
460
440
|
const minValueDifference = step * minStepsBetweenValues;
|
|
441
|
+
if (behavior === "push") return {
|
|
442
|
+
value: getPushedThumbValues(activeValues, pressedIndex, nextValue, min, max, step, minStepsBetweenValues),
|
|
443
|
+
thumbIndex: pressedIndex,
|
|
444
|
+
didSwap: false
|
|
445
|
+
};
|
|
446
|
+
const candidateValues = activeValues.slice();
|
|
447
|
+
const previousNeighbor = candidateValues[pressedIndex - 1];
|
|
448
|
+
const nextNeighbor = candidateValues[pressedIndex + 1];
|
|
449
|
+
const lowerBound = previousNeighbor != null ? previousNeighbor + minValueDifference : min;
|
|
450
|
+
const upperBound = nextNeighbor != null ? nextNeighbor - minValueDifference : max;
|
|
451
|
+
const pressedValueAfterClamp = Number(clamp(nextValue, lowerBound, upperBound).toFixed(12));
|
|
452
|
+
candidateValues[pressedIndex] = pressedValueAfterClamp;
|
|
461
453
|
switch (behavior) {
|
|
462
454
|
case "swap": {
|
|
463
455
|
const pressedInitialValue = activeValues[pressedIndex];
|
|
464
456
|
const epsilon = 1e-7;
|
|
465
|
-
const candidateValues = activeValues.slice();
|
|
466
|
-
const previousNeighbor = candidateValues[pressedIndex - 1];
|
|
467
|
-
const nextNeighbor = candidateValues[pressedIndex + 1];
|
|
468
|
-
const constrainedValue = clamp(nextValue, previousNeighbor != null ? previousNeighbor + minValueDifference : min, nextNeighbor != null ? nextNeighbor - minValueDifference : max);
|
|
469
|
-
const pressedValueAfterClamp = Number(constrainedValue.toFixed(12));
|
|
470
|
-
candidateValues[pressedIndex] = pressedValueAfterClamp;
|
|
471
457
|
const movingForward = nextValue > pressedInitialValue;
|
|
472
458
|
const movingBackward = nextValue < pressedInitialValue;
|
|
473
459
|
const shouldSwapForward = movingForward && nextNeighbor != null && nextValue >= nextNeighbor - epsilon;
|
|
@@ -487,62 +473,31 @@ function resolveThumbCollision({ behavior, values, currentValues, initialValues,
|
|
|
487
473
|
let nextValueForTarget = nextValue;
|
|
488
474
|
if (shouldSwapForward) nextValueForTarget = Math.max(nextValue, candidateValues[targetIndex]);
|
|
489
475
|
else nextValueForTarget = Math.min(nextValue, candidateValues[targetIndex]);
|
|
490
|
-
const adjustedValues = getPushedThumbValues(
|
|
491
|
-
values: candidateValues,
|
|
492
|
-
index: targetIndex,
|
|
493
|
-
nextValue: nextValueForTarget,
|
|
494
|
-
min,
|
|
495
|
-
max,
|
|
496
|
-
step,
|
|
497
|
-
minStepsBetweenValues,
|
|
498
|
-
initialValues: initialValuesForPush
|
|
499
|
-
});
|
|
476
|
+
const adjustedValues = getPushedThumbValues(candidateValues, targetIndex, nextValueForTarget, min, max, step, minStepsBetweenValues, initialValuesForPush);
|
|
500
477
|
const neighborIndex = shouldSwapForward ? targetIndex - 1 : targetIndex + 1;
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
adjustedValues[neighborIndex] = Number(restoredValue.toFixed(12));
|
|
510
|
-
}
|
|
478
|
+
const previousValue = adjustedValues[neighborIndex - 1];
|
|
479
|
+
const nextValueAfter = adjustedValues[neighborIndex + 1];
|
|
480
|
+
let neighborLowerBound = previousValue != null ? previousValue + minValueDifference : min;
|
|
481
|
+
neighborLowerBound = Math.max(neighborLowerBound, min + neighborIndex * minValueDifference);
|
|
482
|
+
let neighborUpperBound = nextValueAfter != null ? nextValueAfter - minValueDifference : max;
|
|
483
|
+
neighborUpperBound = Math.min(neighborUpperBound, max - (adjustedValues.length - 1 - neighborIndex) * minValueDifference);
|
|
484
|
+
const restoredValue = clamp(pressedValueAfterClamp, neighborLowerBound, neighborUpperBound);
|
|
485
|
+
adjustedValues[neighborIndex] = Number(restoredValue.toFixed(12));
|
|
511
486
|
return {
|
|
512
487
|
value: adjustedValues,
|
|
513
488
|
thumbIndex: targetIndex,
|
|
514
489
|
didSwap: true
|
|
515
490
|
};
|
|
516
491
|
}
|
|
517
|
-
|
|
518
|
-
value:
|
|
519
|
-
values: activeValues,
|
|
520
|
-
index: pressedIndex,
|
|
521
|
-
nextValue,
|
|
522
|
-
min,
|
|
523
|
-
max,
|
|
524
|
-
step,
|
|
525
|
-
minStepsBetweenValues
|
|
526
|
-
}),
|
|
492
|
+
default: return {
|
|
493
|
+
value: candidateValues,
|
|
527
494
|
thumbIndex: pressedIndex,
|
|
528
495
|
didSwap: false
|
|
529
496
|
};
|
|
530
|
-
default: {
|
|
531
|
-
const candidateValues = activeValues.slice();
|
|
532
|
-
const previousNeighbor = candidateValues[pressedIndex - 1];
|
|
533
|
-
const nextNeighbor = candidateValues[pressedIndex + 1];
|
|
534
|
-
const constrainedValue = clamp(nextValue, previousNeighbor != null ? previousNeighbor + minValueDifference : min, nextNeighbor != null ? nextNeighbor - minValueDifference : max);
|
|
535
|
-
candidateValues[pressedIndex] = Number(constrainedValue.toFixed(12));
|
|
536
|
-
return {
|
|
537
|
-
value: candidateValues,
|
|
538
|
-
thumbIndex: pressedIndex,
|
|
539
|
-
didSwap: false
|
|
540
|
-
};
|
|
541
|
-
}
|
|
542
497
|
}
|
|
543
498
|
}
|
|
544
499
|
//#endregion
|
|
545
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
500
|
+
//#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/slider/control/SliderControl.mjs
|
|
546
501
|
const INTENTIONAL_DRAG_COUNT_THRESHOLD = 2;
|
|
547
502
|
function getControlOffset(styles, vertical) {
|
|
548
503
|
if (!styles) return {
|
|
@@ -585,7 +540,7 @@ function getFingerCoords(event, touchIdRef) {
|
|
|
585
540
|
*/
|
|
586
541
|
const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(componentProps, forwardedRef) {
|
|
587
542
|
const { render: renderProp, className, style, ...elementProps } = componentProps;
|
|
588
|
-
const { disabled, dragging, inset, lastChangeReasonRef, max, min, minStepsBetweenValues, onValueCommitted, orientation,
|
|
543
|
+
const { disabled, dragging, inset, lastChangeReasonRef, max, min, minStepsBetweenValues, onValueCommitted, orientation, pressedThumbCenterOffsetRef, pressedThumbIndexRef, pressedValuesRef, registerFieldControlRef, renderBeforeHydration, setActive, setDragging, setValue, state, step, thumbCollisionBehavior, thumbRefs, values } = useSliderRootContext();
|
|
589
544
|
const direction = useDirection();
|
|
590
545
|
const range = values.length > 1;
|
|
591
546
|
const vertical = orientation === "vertical";
|
|
@@ -599,32 +554,31 @@ const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(co
|
|
|
599
554
|
const insetThumbOffsetRef = React$1.useRef(0);
|
|
600
555
|
const currentInteractionValueRef = React$1.useRef(null);
|
|
601
556
|
const latestValuesRef = useValueAsRef(values);
|
|
557
|
+
function getThumbInput(el) {
|
|
558
|
+
return el?.querySelector("input[type=\"range\"]");
|
|
559
|
+
}
|
|
602
560
|
function updatePressedThumb(nextIndex) {
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
if (!thumbElement) {
|
|
606
|
-
pressedThumbCenterOffsetRef.current = null;
|
|
607
|
-
pressedInputRef.current = null;
|
|
608
|
-
return;
|
|
609
|
-
}
|
|
610
|
-
pressedInputRef.current = thumbElement.querySelector("input[type=\"range\"]");
|
|
561
|
+
pressedThumbIndexRef.current = nextIndex;
|
|
562
|
+
if (!thumbRefs.current[nextIndex]) pressedThumbCenterOffsetRef.current = null;
|
|
611
563
|
}
|
|
612
564
|
function resetPressedThumb() {
|
|
613
565
|
pressedThumbIndexRef.current = -1;
|
|
614
566
|
pressedThumbCenterOffsetRef.current = null;
|
|
615
|
-
pressedInputRef.current = null;
|
|
616
567
|
}
|
|
617
568
|
function isTargetDisabledThumb(target) {
|
|
618
569
|
if (!isElement(target)) return false;
|
|
619
570
|
return thumbRefs.current.some((thumbEl) => {
|
|
620
571
|
if (!isElement(thumbEl) || !contains(thumbEl, target)) return false;
|
|
621
|
-
return thumbEl
|
|
572
|
+
return getThumbInput(thumbEl)?.disabled === true;
|
|
622
573
|
});
|
|
623
574
|
}
|
|
624
575
|
function getFingerState(fingerCoords) {
|
|
625
576
|
const control = controlRef.current;
|
|
626
577
|
const thumbIndex = pressedThumbIndexRef.current;
|
|
627
|
-
if (!control ||
|
|
578
|
+
if (!control || thumbIndex < 0 || thumbIndex >= values.length) {
|
|
579
|
+
if (thumbIndex >= values.length) currentInteractionValueRef.current = null;
|
|
580
|
+
return null;
|
|
581
|
+
}
|
|
628
582
|
const { width, height, bottom, left, right } = control.getBoundingClientRect();
|
|
629
583
|
const controlOffset = getControlOffset(stylesRef.current, vertical);
|
|
630
584
|
const insetThumbOffset = insetThumbOffsetRef.current;
|
|
@@ -632,7 +586,8 @@ const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(co
|
|
|
632
586
|
const thumbCenterOffset = pressedThumbCenterOffsetRef.current ?? 0;
|
|
633
587
|
const fingerX = fingerCoords.x - thumbCenterOffset;
|
|
634
588
|
const fingerY = fingerCoords.y - thumbCenterOffset;
|
|
635
|
-
const
|
|
589
|
+
const valueSize = vertical ? bottom - fingerY - controlOffset.end : (direction === "rtl" ? right - fingerX : fingerX - left) - controlOffset.start;
|
|
590
|
+
const valueRescaled = clamp((valueSize - insetThumbOffset) / controlSize, 0, 1);
|
|
636
591
|
let newValue = (max - min) * valueRescaled + min;
|
|
637
592
|
newValue = roundValueToStep(newValue, step, min);
|
|
638
593
|
newValue = clamp(newValue, min, max);
|
|
@@ -641,19 +596,7 @@ const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(co
|
|
|
641
596
|
thumbIndex,
|
|
642
597
|
didSwap: false
|
|
643
598
|
};
|
|
644
|
-
|
|
645
|
-
return resolveThumbCollision({
|
|
646
|
-
behavior: thumbCollisionBehavior,
|
|
647
|
-
values,
|
|
648
|
-
currentValues: latestValuesRef.current ?? values,
|
|
649
|
-
initialValues: pressedValuesRef.current,
|
|
650
|
-
pressedIndex: thumbIndex,
|
|
651
|
-
nextValue: newValue,
|
|
652
|
-
min,
|
|
653
|
-
max,
|
|
654
|
-
step,
|
|
655
|
-
minStepsBetweenValues
|
|
656
|
-
});
|
|
599
|
+
return resolveThumbCollision(thumbCollisionBehavior, values, latestValuesRef.current, pressedValuesRef.current, thumbIndex, newValue, min, max, step, minStepsBetweenValues);
|
|
657
600
|
}
|
|
658
601
|
function startPressing(fingerCoords) {
|
|
659
602
|
pressedValuesRef.current = range ? values.slice() : null;
|
|
@@ -673,9 +616,9 @@ const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(co
|
|
|
673
616
|
closestThumbIndex = -1;
|
|
674
617
|
for (let i = 0; i < thumbRefs.current.length; i += 1) {
|
|
675
618
|
const thumbEl = thumbRefs.current[i];
|
|
676
|
-
if (isElement(thumbEl) && !thumbEl
|
|
677
|
-
const midpoint = getMidpoint(thumbEl);
|
|
678
|
-
const distance = Math.abs(fingerCoords[axis] - midpoint
|
|
619
|
+
if (isElement(thumbEl) && !getThumbInput(thumbEl)?.disabled) {
|
|
620
|
+
const midpoint = getMidpoint(thumbEl, vertical);
|
|
621
|
+
const distance = Math.abs(fingerCoords[axis] - midpoint);
|
|
679
622
|
if (minDistance === void 0 || distance <= minDistance) {
|
|
680
623
|
closestThumbIndex = i;
|
|
681
624
|
minDistance = distance;
|
|
@@ -693,7 +636,7 @@ const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(co
|
|
|
693
636
|
}
|
|
694
637
|
}
|
|
695
638
|
function focusThumb(thumbIndex) {
|
|
696
|
-
const input = thumbRefs.current?.[thumbIndex]
|
|
639
|
+
const input = getThumbInput(thumbRefs.current?.[thumbIndex]);
|
|
697
640
|
if (!input) return;
|
|
698
641
|
input.focus({
|
|
699
642
|
preventScroll: true,
|
|
@@ -705,7 +648,10 @@ const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(co
|
|
|
705
648
|
if (applied) {
|
|
706
649
|
currentInteractionValueRef.current = finger.value;
|
|
707
650
|
latestValuesRef.current = Array.isArray(finger.value) ? finger.value : [finger.value];
|
|
708
|
-
if (finger.didSwap)
|
|
651
|
+
if (finger.didSwap) {
|
|
652
|
+
updatePressedThumb(finger.thumbIndex);
|
|
653
|
+
focusThumb(finger.thumbIndex);
|
|
654
|
+
}
|
|
709
655
|
}
|
|
710
656
|
return applied;
|
|
711
657
|
}
|
|
@@ -721,14 +667,15 @@ const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(co
|
|
|
721
667
|
if (finger == null) return;
|
|
722
668
|
if (validateMinimumDistance(finger.value, step, minStepsBetweenValues)) {
|
|
723
669
|
if (!dragging && moveCountRef.current > INTENTIONAL_DRAG_COUNT_THRESHOLD) setDragging(true);
|
|
724
|
-
|
|
670
|
+
setValueFromPointer(finger, drag, nativeEvent);
|
|
725
671
|
}
|
|
726
672
|
});
|
|
727
673
|
const handleTouchEnd = useStableCallback((nativeEvent) => {
|
|
728
674
|
setActive(-1);
|
|
729
675
|
setDragging(false);
|
|
730
|
-
pressedInputRef.current = null;
|
|
731
676
|
pressedThumbCenterOffsetRef.current = null;
|
|
677
|
+
const interactionValue = currentInteractionValueRef.current;
|
|
678
|
+
if (Array.isArray(interactionValue) && interactionValue.length !== values.length) currentInteractionValueRef.current = null;
|
|
732
679
|
if (currentInteractionValueRef.current != null) {
|
|
733
680
|
const commitReason = lastChangeReasonRef.current;
|
|
734
681
|
onValueCommitted(currentInteractionValueRef.current, createGenericEventDetails(commitReason, nativeEvent));
|
|
@@ -736,8 +683,6 @@ const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(co
|
|
|
736
683
|
if ("pointerType" in nativeEvent && controlRef.current?.hasPointerCapture(nativeEvent.pointerId)) controlRef.current?.releasePointerCapture(nativeEvent.pointerId);
|
|
737
684
|
pressedThumbIndexRef.current = -1;
|
|
738
685
|
touchIdRef.current = null;
|
|
739
|
-
pressedValuesRef.current = null;
|
|
740
|
-
currentInteractionValueRef.current = null;
|
|
741
686
|
stopListening();
|
|
742
687
|
});
|
|
743
688
|
const handleTouchStart = useStableCallback((nativeEvent) => {
|
|
@@ -747,15 +692,17 @@ const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(co
|
|
|
747
692
|
return;
|
|
748
693
|
}
|
|
749
694
|
const touch = nativeEvent.changedTouches[0];
|
|
750
|
-
if (touch
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
695
|
+
if (touch == null) return;
|
|
696
|
+
touchIdRef.current = touch.identifier;
|
|
697
|
+
const fingerCoords = {
|
|
698
|
+
x: touch.clientX,
|
|
699
|
+
y: touch.clientY
|
|
700
|
+
};
|
|
701
|
+
startPressing(fingerCoords);
|
|
702
|
+
const finger = getFingerState(fingerCoords);
|
|
703
|
+
if (finger == null) return;
|
|
704
|
+
focusThumb(finger.thumbIndex);
|
|
705
|
+
setValueFromPointer(finger, trackPress, nativeEvent);
|
|
759
706
|
moveCountRef.current = 0;
|
|
760
707
|
const doc = ownerDocument(controlRef.current);
|
|
761
708
|
doc.addEventListener("touchmove", handleTouchMove, { passive: true });
|
|
@@ -807,23 +754,22 @@ const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(co
|
|
|
807
754
|
resetPressedThumb();
|
|
808
755
|
return;
|
|
809
756
|
}
|
|
810
|
-
const fingerCoords =
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
}
|
|
757
|
+
const fingerCoords = {
|
|
758
|
+
x: event.clientX,
|
|
759
|
+
y: event.clientY
|
|
760
|
+
};
|
|
761
|
+
startPressing(fingerCoords);
|
|
762
|
+
const finger = getFingerState(fingerCoords);
|
|
763
|
+
if (finger == null) return;
|
|
764
|
+
if (contains(thumbRefs.current[finger.thumbIndex], activeElement(ownerDocument(control)))) event.preventDefault();
|
|
765
|
+
else focusFrame.request(() => {
|
|
766
|
+
focusThumb(finger.thumbIndex);
|
|
767
|
+
});
|
|
768
|
+
setDragging(true);
|
|
769
|
+
if (!(pressedThumbCenterOffsetRef.current != null)) setValueFromPointer(finger, trackPress, event.nativeEvent);
|
|
824
770
|
if (event.nativeEvent.pointerId) control.setPointerCapture(event.nativeEvent.pointerId);
|
|
825
771
|
moveCountRef.current = 0;
|
|
826
|
-
const doc = ownerDocument(
|
|
772
|
+
const doc = ownerDocument(control);
|
|
827
773
|
doc.addEventListener("pointermove", handleTouchMove, { passive: true });
|
|
828
774
|
doc.addEventListener("pointerup", handleTouchEnd, { once: true });
|
|
829
775
|
}
|
|
@@ -833,7 +779,7 @@ const SliderControl = /*#__PURE__*/ React$1.forwardRef(function SliderControl(co
|
|
|
833
779
|
});
|
|
834
780
|
SliderControl.displayName = "SliderControl";
|
|
835
781
|
//#endregion
|
|
836
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
782
|
+
//#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/slider/track/SliderTrack.mjs
|
|
837
783
|
/**
|
|
838
784
|
* Contains the slider indicator and represents the entire range of the slider.
|
|
839
785
|
* Renders a `<div>` element.
|
|
@@ -852,49 +798,14 @@ const SliderTrack = /*#__PURE__*/ React$1.forwardRef(function SliderTrack(compon
|
|
|
852
798
|
});
|
|
853
799
|
SliderTrack.displayName = "SliderTrack";
|
|
854
800
|
//#endregion
|
|
855
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
SliderThumbDataAttributes["index"] = "data-index";
|
|
861
|
-
/**
|
|
862
|
-
* Present while the user is dragging.
|
|
863
|
-
*/
|
|
864
|
-
SliderThumbDataAttributes["dragging"] = "data-dragging";
|
|
865
|
-
/**
|
|
866
|
-
* Indicates the orientation of the slider.
|
|
867
|
-
* @type {'horizontal' | 'vertical'}
|
|
868
|
-
*/
|
|
869
|
-
SliderThumbDataAttributes["orientation"] = "data-orientation";
|
|
870
|
-
/**
|
|
871
|
-
* Present when the slider is disabled.
|
|
872
|
-
*/
|
|
873
|
-
SliderThumbDataAttributes["disabled"] = "data-disabled";
|
|
874
|
-
/**
|
|
875
|
-
* Present when the slider is in a valid state (when wrapped in Field.Root).
|
|
876
|
-
*/
|
|
877
|
-
SliderThumbDataAttributes["valid"] = "data-valid";
|
|
878
|
-
/**
|
|
879
|
-
* Present when the slider is in an invalid state (when wrapped in Field.Root).
|
|
880
|
-
*/
|
|
881
|
-
SliderThumbDataAttributes["invalid"] = "data-invalid";
|
|
882
|
-
/**
|
|
883
|
-
* Present when the slider has been touched (when wrapped in Field.Root).
|
|
884
|
-
*/
|
|
885
|
-
SliderThumbDataAttributes["touched"] = "data-touched";
|
|
886
|
-
/**
|
|
887
|
-
* Present when the slider's value has changed (when wrapped in Field.Root).
|
|
888
|
-
*/
|
|
889
|
-
SliderThumbDataAttributes["dirty"] = "data-dirty";
|
|
890
|
-
/**
|
|
891
|
-
* Present when the slider is focused (when wrapped in Field.Root).
|
|
892
|
-
*/
|
|
893
|
-
SliderThumbDataAttributes["focused"] = "data-focused";
|
|
894
|
-
return SliderThumbDataAttributes;
|
|
895
|
-
}({});
|
|
801
|
+
//#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/slider/thumb/SliderThumbDataAttributes.mjs
|
|
802
|
+
/**
|
|
803
|
+
* Indicates the index of the thumb in range sliders.
|
|
804
|
+
*/
|
|
805
|
+
const index = "data-index";
|
|
896
806
|
//#endregion
|
|
897
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
807
|
+
//#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/slider/thumb/SliderThumb.mjs
|
|
808
|
+
var _PrehydrationScript;
|
|
898
809
|
const ALL_KEYS = /* @__PURE__ */ new Set([
|
|
899
810
|
...COMPOSITE_KEYS,
|
|
900
811
|
PAGE_UP,
|
|
@@ -902,15 +813,13 @@ const ALL_KEYS = /* @__PURE__ */ new Set([
|
|
|
902
813
|
]);
|
|
903
814
|
function getDefaultAriaValueText(values, index, format, locale) {
|
|
904
815
|
if (index < 0) return;
|
|
905
|
-
if (values.length === 2) {
|
|
906
|
-
if (index === 0) return `${formatNumber(values[index], locale, format)} start range`;
|
|
907
|
-
return `${formatNumber(values[index], locale, format)} end range`;
|
|
908
|
-
}
|
|
816
|
+
if (values.length === 2) return `${formatNumber(values[index], locale, format)} ${index === 0 ? "start" : "end"} range`;
|
|
909
817
|
return format ? formatNumber(values[index], locale, format) : void 0;
|
|
910
818
|
}
|
|
911
819
|
function getNewValue(thumbValue, increment, direction, min, max) {
|
|
912
|
-
const value =
|
|
913
|
-
|
|
820
|
+
const value = thumbValue + increment * direction;
|
|
821
|
+
const roundedValue = Number(value.toFixed(Math.max(getDecimalPrecision(thumbValue), getDecimalPrecision(increment), getDecimalPrecision(min))));
|
|
822
|
+
return clamp(roundedValue, min, max);
|
|
914
823
|
}
|
|
915
824
|
/**
|
|
916
825
|
* The draggable part of the slider at the tip of the indicator.
|
|
@@ -920,9 +829,8 @@ function getNewValue(thumbValue, increment, direction, min, max) {
|
|
|
920
829
|
*/
|
|
921
830
|
const SliderThumb = /*#__PURE__*/ React$1.forwardRef(function SliderThumb(componentProps, forwardedRef) {
|
|
922
831
|
const { render, children: childrenProp, className, "aria-describedby": ariaDescribedByProp, "aria-label": ariaLabelProp, "aria-labelledby": ariaLabelledByProp, "aria-valuetext": ariaValueTextProp, disabled: disabledProp = false, getAriaLabel: getAriaLabelProp, getAriaValueText: getAriaValueTextProp, id: idProp, index: indexProp, inputRef: inputRefProp, onBlur: onBlurProp, onFocus: onFocusProp, onKeyDown: onKeyDownProp, tabIndex: tabIndexProp, style, ...elementProps } = componentProps;
|
|
923
|
-
const { nonce } = useCSPContext();
|
|
924
832
|
const id = useBaseUiId(idProp);
|
|
925
|
-
const { active: activeIndex, lastUsedThumbIndex, controlRef, disabled: contextDisabled, validation,
|
|
833
|
+
const { active: activeIndex, lastUsedThumbIndex, controlRef, disabled: contextDisabled, validation, format, handleInputChange, inset, labelId, largeStep, locale, max, min, minStepsBetweenValues, form, name, orientation, pressedThumbCenterOffsetRef, pressedThumbIndexRef, renderBeforeHydration, setActive, setIndicatorPosition, state, step, thumbRefs, values: sliderValues } = useSliderRootContext();
|
|
926
834
|
const direction = useDirection();
|
|
927
835
|
const disabled = disabledProp || contextDisabled;
|
|
928
836
|
const range = sliderValues.length > 1;
|
|
@@ -932,13 +840,22 @@ const SliderThumb = /*#__PURE__*/ React$1.forwardRef(function SliderThumb(compon
|
|
|
932
840
|
const thumbRef = React$1.useRef(null);
|
|
933
841
|
const inputRef = React$1.useRef(null);
|
|
934
842
|
const restoringFocusVisibleRef = React$1.useRef(false);
|
|
843
|
+
const handleFocusProp = useStableCallback((event) => {
|
|
844
|
+
if (restoringFocusVisibleRef.current) return;
|
|
845
|
+
onFocusProp?.(event);
|
|
846
|
+
});
|
|
847
|
+
const handleBlurProp = useStableCallback((event) => {
|
|
848
|
+
if (restoringFocusVisibleRef.current) return;
|
|
849
|
+
onBlurProp?.(event);
|
|
850
|
+
});
|
|
935
851
|
const defaultInputId = useBaseUiId();
|
|
936
852
|
const labelableId = useLabelableId();
|
|
937
853
|
const inputId = range ? defaultInputId : labelableId;
|
|
938
|
-
const
|
|
939
|
-
const index
|
|
940
|
-
const
|
|
941
|
-
const
|
|
854
|
+
const thumbMetadata = React$1.useMemo(() => ({ inputId }), [inputId]);
|
|
855
|
+
const { ref: listItemRef, index: compositeIndex } = useCompositeListItem({ metadata: thumbMetadata });
|
|
856
|
+
const index$1 = !range ? 0 : indexProp ?? compositeIndex;
|
|
857
|
+
const last = index$1 === sliderValues.length - 1;
|
|
858
|
+
const thumbValue = sliderValues[index$1];
|
|
942
859
|
const thumbValuePercent = valueToPercent(thumbValue, min, max);
|
|
943
860
|
const [positionPercent, setPositionPercent] = React$1.useState();
|
|
944
861
|
const isHydrating = useIsHydrating();
|
|
@@ -954,7 +871,7 @@ const SliderThumb = /*#__PURE__*/ React$1.forwardRef(function SliderThumb(compon
|
|
|
954
871
|
const nextPositionPercent = (thumbRect[side] / 2 + controlSize * thumbValuePercent / 100) / controlRect[side] * 100;
|
|
955
872
|
const nextInsetPosition = Number.isFinite(nextPositionPercent) ? nextPositionPercent : void 0;
|
|
956
873
|
setPositionPercent(nextInsetPosition);
|
|
957
|
-
if (index === 0) setIndicatorPosition((prevPosition) => [nextInsetPosition, prevPosition[1]]);
|
|
874
|
+
if (index$1 === 0) setIndicatorPosition((prevPosition) => [nextInsetPosition, prevPosition[1]]);
|
|
958
875
|
else if (last) setIndicatorPosition((prevPosition) => [prevPosition[0], nextInsetPosition]);
|
|
959
876
|
});
|
|
960
877
|
useIsoLayoutEffect(() => {
|
|
@@ -989,36 +906,32 @@ const SliderThumb = /*#__PURE__*/ React$1.forwardRef(function SliderThumb(compon
|
|
|
989
906
|
const crossOffsetProperty = vertical ? "left" : "top";
|
|
990
907
|
let zIndex;
|
|
991
908
|
if (range) {
|
|
992
|
-
if (activeIndex === index) zIndex = 2;
|
|
993
|
-
else if (safeLastUsedThumbIndex === index) zIndex = 1;
|
|
994
|
-
} else if (activeIndex === index) zIndex = 1;
|
|
909
|
+
if (activeIndex === index$1) zIndex = 2;
|
|
910
|
+
else if (safeLastUsedThumbIndex === index$1) zIndex = 1;
|
|
911
|
+
} else if (activeIndex === index$1) zIndex = 1;
|
|
995
912
|
let thumbStyle;
|
|
996
|
-
if (inset) thumbStyle =
|
|
997
|
-
|
|
998
|
-
visibility: renderBeforeHydration && isHydrating || positionPercent === void 0 ? "hidden" : void 0,
|
|
999
|
-
position: "absolute",
|
|
1000
|
-
[startEdge]: "var(--position)",
|
|
1001
|
-
[crossOffsetProperty]: "50%",
|
|
1002
|
-
translate: `${(vertical || !rtl ? -1 : 1) * 50}% ${(vertical ? 1 : -1) * 50}%`,
|
|
1003
|
-
zIndex
|
|
1004
|
-
};
|
|
1005
|
-
else thumbStyle = !Number.isFinite(thumbValuePercent) ? visuallyHidden : {
|
|
913
|
+
if (!inset && !Number.isFinite(thumbValuePercent)) thumbStyle = visuallyHidden;
|
|
914
|
+
else thumbStyle = {
|
|
1006
915
|
position: "absolute",
|
|
1007
|
-
[startEdge]: `${thumbValuePercent}%`,
|
|
916
|
+
[startEdge]: inset ? "var(--position)" : `${thumbValuePercent}%`,
|
|
1008
917
|
[crossOffsetProperty]: "50%",
|
|
1009
918
|
translate: `${(vertical || !rtl ? -1 : 1) * 50}% ${(vertical ? 1 : -1) * 50}%`,
|
|
1010
|
-
zIndex
|
|
919
|
+
zIndex,
|
|
920
|
+
...inset && {
|
|
921
|
+
["--position"]: `${positionPercent ?? 0}%`,
|
|
922
|
+
visibility: renderBeforeHydration && isHydrating || positionPercent === void 0 ? "hidden" : void 0
|
|
923
|
+
}
|
|
1011
924
|
};
|
|
1012
925
|
let cssWritingMode;
|
|
1013
|
-
if (
|
|
1014
|
-
const ariaLabel = typeof getAriaLabelProp === "function" ? getAriaLabelProp(index) : ariaLabelProp;
|
|
926
|
+
if (vertical) cssWritingMode = rtl ? "vertical-rl" : "vertical-lr";
|
|
927
|
+
const ariaLabel = typeof getAriaLabelProp === "function" ? getAriaLabelProp(index$1) : ariaLabelProp;
|
|
1015
928
|
const inputProps = mergeProps({
|
|
1016
929
|
"aria-label": ariaLabel,
|
|
1017
930
|
"aria-labelledby": ariaLabelledByProp ?? (ariaLabel == null ? labelId : void 0),
|
|
1018
931
|
"aria-describedby": ariaDescribedByProp,
|
|
1019
932
|
"aria-orientation": orientation,
|
|
1020
933
|
"aria-valuenow": thumbValue,
|
|
1021
|
-
"aria-valuetext": typeof getAriaValueTextProp === "function" ? getAriaValueTextProp(formatNumber(thumbValue, locale,
|
|
934
|
+
"aria-valuetext": typeof getAriaValueTextProp === "function" ? getAriaValueTextProp(formatNumber(thumbValue, locale, format), thumbValue, index$1) : ariaValueTextProp ?? getDefaultAriaValueText(sliderValues, index$1, format, locale),
|
|
1022
935
|
disabled,
|
|
1023
936
|
form,
|
|
1024
937
|
id: inputId,
|
|
@@ -1026,12 +939,12 @@ const SliderThumb = /*#__PURE__*/ React$1.forwardRef(function SliderThumb(compon
|
|
|
1026
939
|
min,
|
|
1027
940
|
name,
|
|
1028
941
|
onChange(event) {
|
|
1029
|
-
handleInputChange(event.currentTarget.valueAsNumber, index, event);
|
|
942
|
+
handleInputChange(event.currentTarget.valueAsNumber, index$1, event);
|
|
1030
943
|
},
|
|
1031
944
|
onFocus(event) {
|
|
1032
945
|
const isRestoringFocusVisible = restoringFocusVisibleRef.current;
|
|
1033
946
|
restoringFocusVisibleRef.current = false;
|
|
1034
|
-
setActive(index);
|
|
947
|
+
setActive(index$1);
|
|
1035
948
|
setFocused(true);
|
|
1036
949
|
if (isRestoringFocusVisible) event.stopPropagation();
|
|
1037
950
|
},
|
|
@@ -1040,47 +953,47 @@ const SliderThumb = /*#__PURE__*/ React$1.forwardRef(function SliderThumb(compon
|
|
|
1040
953
|
event.stopPropagation();
|
|
1041
954
|
return;
|
|
1042
955
|
}
|
|
1043
|
-
if (!thumbRef.current) return;
|
|
1044
956
|
setActive(-1);
|
|
957
|
+
if (thumbRefs.current.some((thumb) => contains(thumb, event.relatedTarget))) return;
|
|
1045
958
|
setTouched(true);
|
|
1046
959
|
setFocused(false);
|
|
1047
|
-
if (validationMode === "onBlur") validation.commit(getSliderValue(thumbValue, index, min, max, range, sliderValues));
|
|
960
|
+
if (validationMode === "onBlur") validation.commit(getSliderValue(thumbValue, index$1, min, max, range, sliderValues));
|
|
1048
961
|
},
|
|
1049
962
|
onKeyDown(event) {
|
|
1050
963
|
if (event.defaultPrevented) return;
|
|
1051
964
|
if (!ALL_KEYS.has(event.key)) return;
|
|
1052
965
|
if (COMPOSITE_KEYS.has(event.key)) event.stopPropagation();
|
|
1053
966
|
let newValue = null;
|
|
967
|
+
let direction = 0;
|
|
968
|
+
let increment = event.shiftKey ? largeStep : step;
|
|
1054
969
|
const roundedValue = roundValueToStep(thumbValue, step, min);
|
|
1055
970
|
switch (event.key) {
|
|
1056
971
|
case ARROW_UP:
|
|
1057
|
-
|
|
972
|
+
direction = 1;
|
|
1058
973
|
break;
|
|
1059
974
|
case ARROW_RIGHT:
|
|
1060
|
-
|
|
975
|
+
direction = rtl ? -1 : 1;
|
|
1061
976
|
break;
|
|
1062
977
|
case ARROW_DOWN:
|
|
1063
|
-
|
|
978
|
+
direction = -1;
|
|
1064
979
|
break;
|
|
1065
980
|
case ARROW_LEFT:
|
|
1066
|
-
|
|
981
|
+
direction = rtl ? 1 : -1;
|
|
1067
982
|
break;
|
|
1068
983
|
case PAGE_UP:
|
|
1069
|
-
|
|
984
|
+
increment = largeStep;
|
|
985
|
+
direction = 1;
|
|
1070
986
|
break;
|
|
1071
987
|
case PAGE_DOWN:
|
|
1072
|
-
|
|
988
|
+
increment = largeStep;
|
|
989
|
+
direction = -1;
|
|
1073
990
|
break;
|
|
1074
991
|
case "End":
|
|
1075
|
-
newValue = max;
|
|
1076
|
-
if (range) newValue = Number.isFinite(sliderValues[index + 1]) ? sliderValues[index + 1] - step * minStepsBetweenValues : max;
|
|
992
|
+
newValue = range && Number.isFinite(sliderValues[index$1 + 1]) ? sliderValues[index$1 + 1] - step * minStepsBetweenValues : max;
|
|
1077
993
|
break;
|
|
1078
|
-
case HOME:
|
|
1079
|
-
newValue = min;
|
|
1080
|
-
if (range) newValue = Number.isFinite(sliderValues[index - 1]) ? sliderValues[index - 1] + step * minStepsBetweenValues : min;
|
|
1081
|
-
break;
|
|
1082
|
-
default: break;
|
|
994
|
+
case HOME: newValue = range && Number.isFinite(sliderValues[index$1 - 1]) ? sliderValues[index$1 - 1] + step * minStepsBetweenValues : min;
|
|
1083
995
|
}
|
|
996
|
+
if (direction !== 0) newValue = getNewValue(roundedValue, increment, direction, min, max);
|
|
1084
997
|
if (newValue !== null) {
|
|
1085
998
|
const input = event.currentTarget;
|
|
1086
999
|
if (!matchesFocusVisible(input)) {
|
|
@@ -1091,7 +1004,7 @@ const SliderThumb = /*#__PURE__*/ React$1.forwardRef(function SliderThumb(compon
|
|
|
1091
1004
|
focusVisible: true
|
|
1092
1005
|
});
|
|
1093
1006
|
}
|
|
1094
|
-
handleInputChange(newValue, index, event);
|
|
1007
|
+
handleInputChange(newValue, index$1, event);
|
|
1095
1008
|
event.preventDefault();
|
|
1096
1009
|
}
|
|
1097
1010
|
},
|
|
@@ -1102,10 +1015,14 @@ const SliderThumb = /*#__PURE__*/ React$1.forwardRef(function SliderThumb(compon
|
|
|
1102
1015
|
height: "100%",
|
|
1103
1016
|
writingMode: cssWritingMode
|
|
1104
1017
|
},
|
|
1105
|
-
tabIndex: tabIndexProp
|
|
1018
|
+
tabIndex: tabIndexProp,
|
|
1106
1019
|
type: "range",
|
|
1107
1020
|
value: thumbValue ?? ""
|
|
1108
|
-
}, (props) => validation.getValidationProps(disabled, props), {
|
|
1021
|
+
}, (props) => validation.getValidationProps(disabled, props), {
|
|
1022
|
+
onFocus: handleFocusProp,
|
|
1023
|
+
onBlur: handleBlurProp,
|
|
1024
|
+
onKeyDown: onKeyDownProp
|
|
1025
|
+
});
|
|
1109
1026
|
const mergedInputRef = useMergedRefs(inputRef, validation.inputRef, inputRefProp);
|
|
1110
1027
|
return useRenderElement("div", componentProps, {
|
|
1111
1028
|
state,
|
|
@@ -1115,7 +1032,7 @@ const SliderThumb = /*#__PURE__*/ React$1.forwardRef(function SliderThumb(compon
|
|
|
1115
1032
|
thumbRef
|
|
1116
1033
|
],
|
|
1117
1034
|
props: [{
|
|
1118
|
-
[
|
|
1035
|
+
[index]: index$1,
|
|
1119
1036
|
children: /*#__PURE__*/ jsxs(React$1.Fragment, { children: [
|
|
1120
1037
|
childrenProp,
|
|
1121
1038
|
/*#__PURE__*/ jsx("input", {
|
|
@@ -1123,25 +1040,14 @@ const SliderThumb = /*#__PURE__*/ React$1.forwardRef(function SliderThumb(compon
|
|
|
1123
1040
|
...inputProps,
|
|
1124
1041
|
suppressHydrationWarning: true
|
|
1125
1042
|
}),
|
|
1126
|
-
inset &&
|
|
1127
|
-
nonce,
|
|
1128
|
-
dangerouslySetInnerHTML: { __html: "!function(){const t=document.currentScript?.parentElement;if(!t)return;const e=t.closest(\"[data-base-ui-slider-control]\");if(!e)return;const r=e.querySelector(\"[data-base-ui-slider-indicator]\"),i=e.getBoundingClientRect(),n=\"vertical\"===e.getAttribute(\"data-orientation\")?\"height\":\"width\",o=e.querySelectorAll('input[type=\"range\"]'),l=o.length>1,s=o.length-1;let a=null,u=null;for(let t=0;t<o.length;t+=1){const e=o[t],y=parseFloat(e.getAttribute(\"value\")??\"\");if(Number.isNaN(y))return;const c=e.parentElement;if(!c)return;const p=parseFloat(e.getAttribute(\"max\")??\"100\"),g=parseFloat(e.getAttribute(\"min\")??\"0\"),b=c?.getBoundingClientRect(),d=i[n]-b[n],m=100*(y-g)/(p-g),v=(b[n]/2+d*m/100)/i[n]*100;c.style.setProperty(\"--position\",`${v}%`),Number.isFinite(v)&&(c.style.removeProperty(\"visibility\"),r&&(0===t?(a=v,r.style.setProperty(\"--start-position\",`${v}%`),l||r.style.removeProperty(\"visibility\")):t===s&&(u=v-(a??0),r.style.setProperty(\"--end-position\",`${v}%`),r.style.setProperty(\"--relative-size\",`${u}%`),r.style.removeProperty(\"visibility\"))))}}();" },
|
|
1129
|
-
suppressHydrationWarning: true
|
|
1130
|
-
})
|
|
1043
|
+
inset && last && renderBeforeHydration && (_PrehydrationScript || (_PrehydrationScript = /*#__PURE__*/ jsx(PrehydrationScript, { script: "" })))
|
|
1131
1044
|
] }),
|
|
1132
1045
|
id,
|
|
1133
|
-
onBlur: onBlurProp,
|
|
1134
|
-
onFocus: onFocusProp,
|
|
1135
1046
|
onPointerDown(event) {
|
|
1136
1047
|
if (disabled) return;
|
|
1137
|
-
pressedThumbIndexRef.current = index;
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
const midpoint = getMidpoint(thumbRef.current);
|
|
1141
|
-
const offset = (orientation === "horizontal" ? event.clientX : event.clientY) - midpoint[axis];
|
|
1142
|
-
pressedThumbCenterOffsetRef.current = offset;
|
|
1143
|
-
}
|
|
1144
|
-
if (inputRef.current != null && pressedInputRef.current !== inputRef.current) pressedInputRef.current = inputRef.current;
|
|
1048
|
+
pressedThumbIndexRef.current = index$1;
|
|
1049
|
+
const midpoint = getMidpoint(event.currentTarget, vertical);
|
|
1050
|
+
pressedThumbCenterOffsetRef.current = (vertical ? event.clientY : event.clientX) - midpoint;
|
|
1145
1051
|
},
|
|
1146
1052
|
style: thumbStyle,
|
|
1147
1053
|
suppressHydrationWarning: renderBeforeHydration || void 0
|
|
@@ -1151,42 +1057,25 @@ const SliderThumb = /*#__PURE__*/ React$1.forwardRef(function SliderThumb(compon
|
|
|
1151
1057
|
});
|
|
1152
1058
|
SliderThumb.displayName = "SliderThumb";
|
|
1153
1059
|
//#endregion
|
|
1154
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
1155
|
-
function
|
|
1156
|
-
const visibility = start === void 0 || range && end === void 0 ? "hidden" : void 0;
|
|
1157
|
-
const startEdge = vertical ? "bottom" : "insetInlineStart";
|
|
1158
|
-
const mainSide = vertical ? "height" : "width";
|
|
1060
|
+
//#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/slider/indicator/SliderIndicator.mjs
|
|
1061
|
+
function getIndicatorStyles(vertical, range, inset, start, end, forceHidden) {
|
|
1159
1062
|
const styles = {
|
|
1160
|
-
visibility:
|
|
1063
|
+
visibility: forceHidden || inset && (start === void 0 || range && end === void 0) ? "hidden" : void 0,
|
|
1161
1064
|
position: vertical ? "absolute" : "relative",
|
|
1162
1065
|
[vertical ? "width" : "height"]: "inherit"
|
|
1163
1066
|
};
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
styles[
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
return styles;
|
|
1174
|
-
}
|
|
1175
|
-
function getCenteredStyles(vertical, range, start, end) {
|
|
1176
|
-
const startEdge = vertical ? "bottom" : "insetInlineStart";
|
|
1177
|
-
const mainSide = vertical ? "height" : "width";
|
|
1178
|
-
const styles = {
|
|
1179
|
-
position: vertical ? "absolute" : "relative",
|
|
1180
|
-
[vertical ? "width" : "height"]: "inherit"
|
|
1181
|
-
};
|
|
1182
|
-
if (!range) {
|
|
1183
|
-
styles[startEdge] = 0;
|
|
1184
|
-
styles[mainSide] = `${start}%`;
|
|
1185
|
-
return styles;
|
|
1067
|
+
let startValue = `${start ?? 0}%`;
|
|
1068
|
+
let sizeValue = `${(end ?? 0) - (start ?? 0)}%`;
|
|
1069
|
+
if (inset) {
|
|
1070
|
+
styles["--start-position"] = startValue;
|
|
1071
|
+
startValue = "var(--start-position)";
|
|
1072
|
+
if (range) {
|
|
1073
|
+
styles["--relative-size"] = sizeValue;
|
|
1074
|
+
sizeValue = "var(--relative-size)";
|
|
1075
|
+
}
|
|
1186
1076
|
}
|
|
1187
|
-
|
|
1188
|
-
styles[
|
|
1189
|
-
styles[mainSide] = `${size}%`;
|
|
1077
|
+
styles[vertical ? "bottom" : "insetInlineStart"] = range ? startValue : 0;
|
|
1078
|
+
styles[vertical ? "height" : "width"] = range ? sizeValue : startValue;
|
|
1190
1079
|
return styles;
|
|
1191
1080
|
}
|
|
1192
1081
|
/**
|
|
@@ -1199,9 +1088,7 @@ const SliderIndicator = /*#__PURE__*/ React$1.forwardRef(function SliderIndicato
|
|
|
1199
1088
|
const { render, className, style: styleProp, ...elementProps } = componentProps;
|
|
1200
1089
|
const { indicatorPosition, inset, max, min, orientation, renderBeforeHydration, state, values } = useSliderRootContext();
|
|
1201
1090
|
const isHydrating = useIsHydrating();
|
|
1202
|
-
const
|
|
1203
|
-
const range = values.length > 1;
|
|
1204
|
-
const style = inset ? getInsetStyles(vertical, range, indicatorPosition[0], indicatorPosition[1], renderBeforeHydration, isHydrating) : getCenteredStyles(vertical, range, valueToPercent(values[0], min, max), valueToPercent(values[values.length - 1], min, max));
|
|
1091
|
+
const style = getIndicatorStyles(orientation === "vertical", values.length > 1, inset, inset ? indicatorPosition[0] : valueToPercent(values[0], min, max), inset ? indicatorPosition[1] : valueToPercent(values[values.length - 1], min, max), inset && renderBeforeHydration && isHydrating);
|
|
1205
1092
|
return useRenderElement("div", componentProps, {
|
|
1206
1093
|
state,
|
|
1207
1094
|
ref: forwardedRef,
|
|
@@ -1215,7 +1102,7 @@ const SliderIndicator = /*#__PURE__*/ React$1.forwardRef(function SliderIndicato
|
|
|
1215
1102
|
});
|
|
1216
1103
|
SliderIndicator.displayName = "SliderIndicator";
|
|
1217
1104
|
//#endregion
|
|
1218
|
-
//#region ../../node_modules/.pnpm/@base-ui+react@1.
|
|
1105
|
+
//#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/slider/index.parts.mjs
|
|
1219
1106
|
var index_parts_exports = /* @__PURE__ */ __exportAll({
|
|
1220
1107
|
Control: () => SliderControl,
|
|
1221
1108
|
Indicator: () => SliderIndicator,
|