@cloudflare/kumo 2.8.0 → 2.9.1
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 +108 -0
- package/README.md +3 -39
- package/ai/USAGE.md +89 -80
- package/ai/component-registry.json +166 -55
- package/ai/component-registry.md +504 -94
- package/ai/schemas.ts +4 -2
- package/bin/kumo.js +1 -1
- package/dist/.build-complete +1 -1
- package/dist/ai/schemas.d.ts +1928 -1916
- package/dist/ai/schemas.js +5550 -4085
- package/dist/blocks-source/delete-resource/delete-resource.tsx +5 -5
- package/dist/blocks-source/resource-list/resource-list.test.tsx +1 -1
- package/dist/blocks-source/resource-list/resource-list.tsx +1 -4
- package/dist/button-Bbi7gFL7.d.ts +227 -0
- package/dist/catalog.d.ts +377 -0
- package/dist/catalog.js +350 -215
- package/dist/chunks/AlertDialogTrigger-fn9yjykev9h5l12q.js +24 -0
- package/dist/chunks/AutocompleteItem-clgm7u7zzgjy1hvb.js +82 -0
- package/dist/chunks/Button-oczevl8g75m85ew9.js +27 -0
- package/dist/chunks/CSPContext-guqghj8kxoukvlky.js +17 -0
- package/dist/chunks/CSPProvider-ogozggb4nr6evned.js +24 -0
- package/dist/chunks/CheckboxGroup-h9w1c6bo2nlcc4uj.js +177 -0
- package/dist/chunks/CheckboxGroupContext-f9wox07n2u5moq4h.js +12 -0
- package/dist/chunks/CheckboxIndicator-gz18hapnzraxyz9a.js +49 -0
- package/dist/chunks/CheckboxRoot-g6fb44xqgc0qxusf.js +361 -0
- package/dist/chunks/CollapsiblePanel-mnjlf99v79k3yabx.js +177 -0
- package/dist/chunks/ComboboxChipRemove-opf1zyu9yyp98dqd.js +302 -0
- package/dist/chunks/ComboboxClear-fi4op1n12c99ktca.js +302 -0
- package/dist/chunks/ComboboxEmpty-dr78bn7zilhqbkgc.js +1882 -0
- package/dist/chunks/ComboboxPopup-bugeajuqjattk1n7.js +205 -0
- package/dist/chunks/CompositeItem-l7zee38lq5m224d5.js +23 -0
- package/dist/chunks/CompositeList-bek8pmx9o8cu36ig.js +129 -0
- package/dist/chunks/CompositeListContext-oetjj2x8li8678as.js +18 -0
- package/dist/chunks/CompositeRoot-jm9n0rrea12rfny1.js +225 -0
- package/dist/chunks/CompositeRootContext-ofhzmevv7hadjhyy.js +12 -0
- package/dist/chunks/DialogHandle-o964gplvp59qqv23.js +139 -0
- package/dist/chunks/DialogPopup-cz73mkiyi9c33mhn.js +174 -0
- package/dist/chunks/DialogRoot-kfhbouiouenljp3q.js +15 -0
- package/dist/chunks/DialogTrigger-gzxvssie7e5e1iba.js +139 -0
- package/dist/chunks/DirectionContext-jc1g0w645603sd6p.js +13 -0
- package/dist/chunks/DirectionProvider-gdktkteyrlpnokak.js +21 -0
- package/dist/chunks/FieldControl-oz007qbkl6ejp7di.js +104 -0
- package/dist/chunks/FieldDescription-go88jdymmj9o0ugi.js +121 -0
- package/dist/chunks/FieldItemContext-j85dc0ihramj5ezs.js +10 -0
- package/dist/chunks/FieldLabel-junk2aczkvogpv5d.js +558 -0
- package/dist/chunks/FieldsetLegend-ch85hugankjah152.js +68 -0
- package/dist/chunks/FieldsetRootContext-b633e9uzilttuyfi.js +12 -0
- package/dist/chunks/FloatingPortalLite-ld4o97z16w23x6za.js +25 -0
- package/dist/chunks/FloatingTree-jdm71b3m43e34hk7.js +115 -0
- package/dist/chunks/Form-f1ibju5npd1qqowg.js +102 -0
- package/dist/chunks/FormContext-xz0b4h7ue30fkkn1.js +17 -0
- package/dist/chunks/Input-opaph7rt3w2vx3c0.js +20 -0
- package/dist/chunks/LabelableContext-hetas2e4y0kywfas.js +131 -0
- package/dist/chunks/MenuBackdrop-m0tfcr6sg50f9sn5.js +78 -0
- package/dist/chunks/MenuSubmenuTrigger-n281iqpstcnacsk6.js +1532 -0
- package/dist/chunks/MenuTrigger-dwh2ewyxp5j3ml02.js +266 -0
- package/dist/chunks/Menubar-m8euwx8biy1qpo44.js +117 -0
- package/dist/chunks/MenubarContext-ei2r6vu6lmsspozo.js +12 -0
- package/dist/chunks/MeterLabel-efe4koezlgg05cv8.js +151 -0
- package/dist/chunks/PopoverClose-inm8xliypc51murq.js +666 -0
- package/dist/chunks/RadioGroup-h25jrjmet0gxrvex.js +165 -0
- package/dist/chunks/RadioGroupContext-ft0nndmzqynjz8a2.js +10 -0
- package/dist/chunks/RadioIndicator-lvpixnzpkxpq7rp1.js +296 -0
- package/dist/chunks/ScrollAreaThumb-jydo7azxxwjn1cqf.js +944 -0
- package/dist/chunks/SelectGroupLabel-mug19qcz2k67qule.js +1600 -0
- package/dist/chunks/Separator-b8wf5rea6m1cei8k.js +24 -0
- package/dist/chunks/SwitchRoot-gumgk7356eqv7dve.js +237 -0
- package/dist/chunks/TabsList-obzldrvfzo50uqr4.js +617 -0
- package/dist/chunks/Toggle-hlf7recxsq6mxvax.js +89 -0
- package/dist/chunks/ToggleGroup-l8tfcwe33tlqqm8a.js +106 -0
- package/dist/chunks/ToggleGroupContext-cdk2zo6ciddpockn.js +12 -0
- package/dist/chunks/ToolbarGroupContext-nriz3632ymugfj6h.js +12 -0
- package/dist/chunks/ToolbarInput-oy7o682hhn2jdjen.js +152 -0
- package/dist/chunks/ToolbarRootContext-lvi96r1vvs93rhde.js +12 -0
- package/dist/chunks/TooltipPopup-ehusafczcky9jvae.js +868 -0
- package/dist/chunks/TooltipProvider-iq6hgymrn3b68h50.js +64 -0
- package/dist/chunks/addEventListener-lhqvk2ahlzjsanyg.js +13 -0
- package/dist/chunks/areArraysEqual-nlbeaqlzf4274zr3.js +7 -0
- package/dist/chunks/autocomplete-m8n1c775n0iilomf.js +152 -0
- package/dist/chunks/badge-e16yhhe9xibra5k7.js +148 -0
- package/dist/chunks/banner-cu2mip76zfx0gf27.js +258 -0
- package/dist/chunks/bash-jpzh6zbf5237424t.js +3 -0
- package/dist/chunks/breadcrumbs-hxibrxjtvudy0ir9.js +164 -0
- package/dist/chunks/button-eikucjpgqbsn5m5m.js +260 -0
- package/dist/chunks/chart-bxxlck50zlsbj3kl.js +3083 -0
- package/dist/chunks/checkbox-fovnhs7f1sekaxrh.js +158 -0
- package/dist/chunks/clamp-kvu4wtr1dw6b3pnd.js +7 -0
- package/dist/chunks/clipboard-text-fuyj4apm2xry4hkk.js +198 -0
- package/dist/chunks/cloudflare-logo-g0aimzpllornl0rc.js +186 -0
- package/dist/chunks/code-eu8kzwqnlhoyin24.js +96 -0
- package/dist/chunks/collapsible-gjmdaxlo8t3vi14b.js +185 -0
- package/dist/chunks/combobox-m2nvbt0b1stb2syc.js +301 -0
- package/dist/chunks/command-palette-jjrbvylvvbj0qusg.js +507 -0
- package/dist/chunks/composite-o65hjzwwzb4kvl4w.js +102 -0
- package/dist/chunks/constants-j09lrtg73n4vlx5x.js +5 -0
- package/dist/chunks/core-kjfqbvgicl9i3abf.js +7163 -0
- package/dist/chunks/createBaseUIEventDetails-ddivuhl74gni72qn.js +86 -0
- package/dist/chunks/createToastManager-kjd838m8jog8pddj.js +1233 -0
- package/dist/chunks/css-d3t41yfupsmz7l1a.js +4 -0
- package/dist/chunks/date-picker-njfirc1m165k6yax.js +6786 -0
- package/dist/chunks/date-range-picker-g6sje1ua7n7jerkq.js +335 -0
- package/dist/chunks/dialog-b4r3dv8uvgl2pqem.js +170 -0
- package/dist/chunks/diff-g2re0kj6fh27rgg5.js +4 -0
- package/dist/chunks/dropdown-k0y5j6iuad7tvqgx.js +279 -0
- package/dist/chunks/empty-hmu7x39lnp0z2qm6.js +89 -0
- package/dist/chunks/engine-io35xsj9fgfxtihg.js +10 -0
- package/dist/chunks/engine-javascript-d795u677f1802oaf.js +3103 -0
- package/dist/chunks/engine-oniguruma-xjlw46ay321yj1av.js +388 -0
- package/dist/chunks/error-mm98alb8acdy93vq.js +15 -0
- package/dist/chunks/field-dxe9ne8fqy5whws2.js +70 -0
- package/dist/chunks/flow-fbsv3yek3w7v5a6p.js +10270 -0
- package/dist/chunks/formatNumber-hjijm58g645q6a0n.js +26 -0
- package/dist/chunks/getCssDimensions-mi941fe1jvztqm6b.js +21 -0
- package/dist/chunks/getEmptyRootContext-2utawetz04dqkzyn.js +18 -0
- package/dist/chunks/getPseudoElementBounds-jg72lmrlwgbqhmjh.js +28 -0
- package/dist/chunks/github-light-kb466scjoy42qxpu.js +5 -0
- package/dist/chunks/graphql-gtqr4wytdf0qjybo.js +16 -0
- package/dist/chunks/grid-d43q1qme6ffbbcl1.js +118 -0
- package/dist/chunks/hcl-ohpfnrffs96hzyj5.js +4 -0
- package/dist/chunks/html-ijyj3f9k0foag15c.js +12 -0
- package/dist/chunks/index.parts-9xtishx4m3j6sbg9.js +1429 -0
- package/dist/chunks/index.parts-bsarfaby0ttw67bb.js +206 -0
- package/dist/chunks/index.parts-buqjmx1pfsd225r7.js +30 -0
- package/dist/chunks/index.parts-bzlq2foymrigspiz.js +81 -0
- package/dist/chunks/index.parts-c4kz48uuogge3k9g.js +1462 -0
- package/dist/chunks/index.parts-cou5w8shwfwuk6wo.js +128 -0
- package/dist/chunks/index.parts-etb66t5m85rhhipe.js +11 -0
- package/dist/chunks/index.parts-f3xvfc67ai7txeru.js +127 -0
- package/dist/chunks/index.parts-g0wrrbkxyh0oo730.js +171 -0
- package/dist/chunks/index.parts-g27bw668q8dtcjz8.js +1229 -0
- package/dist/chunks/index.parts-gcwd6ds0od2n1i0p.js +10 -0
- package/dist/chunks/index.parts-ghwrm31fyo614381.js +23 -0
- package/dist/chunks/index.parts-giu46tgp0ypgfq6a.js +88 -0
- package/dist/chunks/index.parts-hi0bbzsnswj74v28.js +11 -0
- package/dist/chunks/index.parts-ixizrcasario34jo.js +213 -0
- package/dist/chunks/index.parts-j775zfdbhcd9ypeb.js +41 -0
- package/dist/chunks/index.parts-jmkwypigix07dit1.js +119 -0
- package/dist/chunks/index.parts-kdoulw17e9zk96yw.js +156 -0
- package/dist/chunks/index.parts-kh9waplhfwlszcyp.js +245 -0
- package/dist/chunks/index.parts-kwqb2nzc7u2zzxqs.js +2464 -0
- package/dist/chunks/index.parts-kwx43zlomuu96clc.js +46 -0
- package/dist/chunks/index.parts-lojnx790s6z0mi1f.js +388 -0
- package/dist/chunks/index.parts-n6t1aj932fytioz8.js +692 -0
- package/dist/chunks/index.parts-ngc39crwuz80oiij.js +13 -0
- package/dist/chunks/index.parts-nq06i1gji6fjnmln.js +192 -0
- package/dist/chunks/index.parts-omt7bu8mbte48ulb.js +73 -0
- package/dist/chunks/index.parts-pb65142mbin4hpc7.js +564 -0
- package/dist/chunks/index2.parts-k2au6nzued1wgy6t.js +95 -0
- package/dist/chunks/index2.parts-noiw2eweufmplfsp.js +10 -0
- package/dist/chunks/inertValue-f9pgp32jxnm88df3.js +9 -0
- package/dist/chunks/input-dwl9oy1f1ufah0bx.js +145 -0
- package/dist/chunks/input-group-otq3m9lach1jyxl0.js +452 -0
- package/dist/chunks/input-o3mtvvtqf69j5k10.js +85 -0
- package/dist/chunks/isElementDisabled-ffsy1y4adxocmexb.js +7 -0
- package/dist/chunks/javascript-b6fq9bl50fdj6813.js +4 -0
- package/dist/chunks/json-h2g0z143t3cs13d7.js +4 -0
- package/dist/chunks/jsonc-jxlzvingck161eej.js +4 -0
- package/dist/chunks/jsx-jp7a33937sef92sn.js +4 -0
- package/dist/chunks/label-opyibemromjwmd0s.js +72 -0
- package/dist/chunks/layer-card-nah241sxhj6i7i03.js +72 -0
- package/dist/chunks/link-1b3jda6cdzl4lkeo.js +112 -0
- package/dist/chunks/link-provider-l9ohtet4pj559eg0.js +60 -0
- package/dist/chunks/loader-j2v6fab8iucuxz1z.js +91 -0
- package/dist/chunks/markdown-eybeqjr58vfygtz1.js +4 -0
- package/dist/chunks/menubar-m0h31eymts6exeke.js +103 -0
- package/dist/chunks/mergeCleanups-pexn3wul6a4zn873.js +15 -0
- package/dist/chunks/meter-iauic8ww87xxqf74.js +35 -0
- package/dist/chunks/pagination-k0yll9ynbi8flc3b.js +290 -0
- package/dist/chunks/popover-l0xg7b854w7txyoz.js +152 -0
- package/dist/chunks/popupStateMapping-jpzw7eyzl8ghiv8s.js +868 -0
- package/dist/chunks/popupStoreUtils-fpjh6veok5pa2hd1.js +367 -0
- package/dist/chunks/portal-provider-langu3fqwfr9tlhm.js +59 -0
- package/dist/chunks/python-nrpnmxq4r6yp6fcd.js +4 -0
- package/dist/chunks/radio-igpo6t2t2tpe08d5.js +173 -0
- package/dist/chunks/resolve-variant-l6x5ksfrjtu4m66l.js +35 -0
- package/dist/chunks/resolveAriaLabelledBy-h9qwvo10ftlj6t9k.js +10 -0
- package/dist/chunks/resolveValueLabel-i36fqhi09ki67hx5.js +89 -0
- package/dist/chunks/rolldown-runtime-hi7ti5xiuxsegr96.js +18 -0
- package/dist/chunks/safePolygon-flrfpyc6fpidq4fb.js +659 -0
- package/dist/chunks/safeReact-bavzz23j5tex60z2.js +18 -0
- package/dist/chunks/select-ln6ibqbbs0n4tiig.js +262 -0
- package/dist/chunks/sensitive-input-karaei12un7z7nep.js +256 -0
- package/dist/chunks/serializeValue-ci3kihruew64i36f.js +13 -0
- package/dist/chunks/shellscript-i4m7lo8wi0f5bl8b.js +4 -0
- package/dist/chunks/sidebar-kvjzu0ya0b2z6eec.js +1297 -0
- package/dist/chunks/skeleton-line-f6sju1dxawm8h9tg.js +40 -0
- package/dist/chunks/sql-do9h6435gka97c4c.js +4 -0
- package/dist/chunks/store-i9l3lkcl6auhkpfl.js +88 -0
- package/dist/chunks/stringifyLocale-cl8et9xf6zon4qbs.js +9 -0
- package/dist/chunks/styles-dbhgpd8fm76fdfo3.js +35 -0
- package/dist/chunks/surface-jwwh5xl06kv9tp7b.js +30 -0
- package/dist/chunks/switch-cusffup6w3tan5ot.js +202 -0
- package/dist/chunks/table-ds3nzcffm3pu9o0l.js +238 -0
- package/dist/chunks/table-of-contents-l66abisn473qzd07.js +231 -0
- package/dist/chunks/tabs-lb4jj5mw26xtm2je.js +258 -0
- package/dist/chunks/text-e1ko7r96hsoz2tor.js +109 -0
- package/dist/chunks/toast-itl6qo5oy1vy6d36.js +324 -0
- package/dist/chunks/toml-oyqrgosuct25x413.js +4 -0
- package/dist/chunks/toolbar-gwd1orc8yl7lzaou.js +127 -0
- package/dist/chunks/tooltip-maelyxs1y7a78vje.js +90 -0
- package/dist/chunks/tsx-pem8x69upvmibv6l.js +4 -0
- package/dist/chunks/typescript-pe5y016phdwbgws7.js +4 -0
- package/dist/chunks/useAnchoredPopupScrollLock-bx8vvwcdp25ix0kj.js +31 -0
- package/dist/chunks/useAnimationFrame-ssgc72hyq6sg3yit.js +86 -0
- package/dist/chunks/useAriaLabelledBy-bvw56m1d7czf0w3f.js +38 -0
- package/dist/chunks/useBaseUiId-gqkl5ep5pn6hd0rw.js +13 -0
- package/dist/chunks/useButton-cpo6u2idqcnou6vy.js +149 -0
- package/dist/chunks/useClick-fvwb39qgead2jyft.js +86 -0
- package/dist/chunks/useCollapsiblePanel-bw63vwvq9a3sj73q.js +379 -0
- package/dist/chunks/useCompositeItem-esr3n4pmlssiuxuy.js +31 -0
- package/dist/chunks/useCompositeListItem-0exfww37ospqz69b.js +75 -0
- package/dist/chunks/useControlled-nlx0kk1ksgk0auvi.js +52 -0
- package/dist/chunks/useDismiss-l2gbj4cain4zqtne.js +353 -0
- package/dist/chunks/useFilteredItems-ckor5h4rcmztfgt1.js +183 -0
- package/dist/chunks/useFloatingRootContext-jo582qzez5k9gbgk.js +51 -0
- package/dist/chunks/useFocus-e8drzpkl9flxq1o1.js +122 -0
- package/dist/chunks/useForcedRerendering-el1fbg3ib5yo0v7k.js +14 -0
- package/dist/chunks/useId-l9soitgw3e4jk5ie.js +32 -0
- package/dist/chunks/useIsHydrating-b6whcsimonagru6u.js +22 -0
- package/dist/chunks/useLabel-nh9hf8h7o6oquqn5.js +47 -0
- package/dist/chunks/useLabelableId-b1kwq9st3rjrtakn.js +60 -0
- package/dist/chunks/useListNavigation-iyo9r9vug2g1clmc.js +447 -0
- package/dist/chunks/useOnMount-j4wobeq47l3u9olo.js +12 -0
- package/dist/chunks/useOpenChangeComplete-dpkex2e23s1evpol.js +117 -0
- package/dist/chunks/usePopupViewport-at3zpph46apa78a3.js +343 -0
- package/dist/chunks/usePositioner-h1n5q86am1sjo5hn.js +602 -0
- package/dist/chunks/usePreviousValue-le0grv8f43vmunn1.js +21 -0
- package/dist/chunks/useRegisterFieldControl-m1rxsuvtpau2341n.js +34 -0
- package/dist/chunks/useRegisteredLabelId-dh83mybmzy75waje.js +16 -0
- package/dist/chunks/useRender-gtnbrp1ityffi4xf.js +13 -0
- package/dist/chunks/useRenderDialogRoot-ecyv072j7yj8q0w3.js +262 -0
- package/dist/chunks/useRenderElement-m8kc7jyuczp71mq8.js +433 -0
- package/dist/chunks/useScrollLock-lj0spjth12xjeap0.js +854 -0
- package/dist/chunks/useStableCallback-ninxmksdjvwl6ejj.js +38 -0
- package/dist/chunks/useSwipeDismiss-bpbyw2ihsw3fw6y9.js +818 -0
- package/dist/chunks/useTimeout-oqptmu2xmyv5ccic.js +43 -0
- package/dist/chunks/useTransitionStatus-ig4waxl2kervpyw4.js +66 -0
- package/dist/chunks/useTriggerFocusGuards-j8nano0pqu9dscrz.js +49 -0
- package/dist/chunks/useTypeahead-onenwjyhgw955ygx.js +114 -0
- package/dist/chunks/useValueAsRef-lrn42zari17368c9.js +27 -0
- package/dist/chunks/useValueChanged-kthmz4wk7ywnjwtx.js +18 -0
- package/dist/chunks/utils-0i7gujfv3f3e9dqh.js +19 -0
- package/dist/chunks/valueToPercent-henpkkj3juy3ukeu.js +7 -0
- package/dist/chunks/vendor-floating-ui-dsysdmve7iazaaes.js +1558 -0
- package/dist/chunks/vendor-styling-da1xibnxfkjmtglr.js +3631 -0
- package/dist/chunks/vendor-utils-luqsvbyuig727bnr.js +512 -0
- package/dist/chunks/vesper-ho3j3gt6ilwfuc1g.js +5 -0
- package/dist/chunks/visuallyHidden-n14xllazfozg55ox.js +24 -0
- package/dist/chunks/wasm-nfbosyhilcq70atf.js +8 -0
- package/dist/chunks/yaml-kzk5ddyekbyha04v.js +4 -0
- package/dist/cn-DCSItmT-.d.ts +5 -0
- package/dist/code/server.d.ts +97 -0
- package/dist/code/server.js +146 -84
- package/dist/code.d.ts +82 -0
- package/dist/code.js +368 -248
- package/dist/components/autocomplete.d.ts +2 -0
- package/dist/components/autocomplete.js +2 -8
- package/dist/components/badge.d.ts +2 -0
- package/dist/components/badge.js +2 -6
- package/dist/components/banner.d.ts +2 -0
- package/dist/components/banner.js +2 -6
- package/dist/components/breadcrumbs.d.ts +2 -0
- package/dist/components/breadcrumbs.js +2 -8
- package/dist/components/button.d.ts +3 -0
- package/dist/components/button.js +2 -8
- package/dist/components/chart.d.ts +2 -0
- package/dist/components/chart.js +2 -11
- package/dist/components/checkbox.d.ts +2 -0
- package/dist/components/checkbox.js +2 -7
- package/dist/components/clipboard-text.d.ts +2 -0
- package/dist/components/clipboard-text.js +2 -5
- package/dist/components/cloudflare-logo.d.ts +2 -0
- package/dist/components/cloudflare-logo.js +2 -9
- package/dist/components/code.d.ts +2 -0
- package/dist/components/code.js +2 -6
- package/dist/components/collapsible.d.ts +2 -0
- package/dist/components/collapsible.js +2 -5
- package/dist/components/combobox.d.ts +2 -0
- package/dist/components/combobox.js +2 -5
- package/dist/components/command-palette.d.ts +2 -0
- package/dist/components/command-palette.js +2 -7
- package/dist/components/date-picker.d.ts +2 -0
- package/dist/components/date-picker.js +2 -5
- package/dist/components/date-range-picker.d.ts +2 -0
- package/dist/components/date-range-picker.js +2 -5
- package/dist/components/dialog.d.ts +2 -0
- package/dist/components/dialog.js +2 -10
- package/dist/components/dropdown.d.ts +2 -0
- package/dist/components/dropdown.js +2 -5
- package/dist/components/empty.d.ts +2 -0
- package/dist/components/empty.js +2 -8
- package/dist/components/field.d.ts +2 -0
- package/dist/components/field.js +2 -9
- package/dist/components/flow.d.ts +2 -0
- package/dist/components/flow.js +2 -5795
- package/dist/components/grid.d.ts +2 -0
- package/dist/components/grid.js +2 -10
- package/dist/components/input-group.d.ts +2 -0
- package/dist/components/input-group.js +2 -7
- package/dist/components/input.d.ts +4 -0
- package/dist/components/input.js +4 -13
- package/dist/components/label.d.ts +2 -0
- package/dist/components/label.js +2 -9
- package/dist/components/layer-card.d.ts +2 -0
- package/dist/components/layer-card.js +2 -5
- package/dist/components/link.d.ts +68 -0
- package/dist/components/link.js +2 -8
- package/dist/components/loader.d.ts +2 -0
- package/dist/components/loader.js +3 -7
- package/dist/components/menubar.d.ts +2 -0
- package/dist/components/menubar.js +2 -6
- package/dist/components/meter.d.ts +2 -0
- package/dist/components/meter.js +2 -5
- package/dist/components/pagination.d.ts +2 -0
- package/dist/components/pagination.js +2 -5
- package/dist/components/popover.d.ts +2 -0
- package/dist/components/popover.js +2 -13
- package/dist/components/radio.d.ts +2 -0
- package/dist/components/radio.js +2 -9
- package/dist/components/select.d.ts +2 -0
- package/dist/components/select.js +2 -5
- package/dist/components/sensitive-input.d.ts +2 -0
- package/dist/components/sensitive-input.js +2 -7
- package/dist/components/sidebar.d.ts +2 -0
- package/dist/components/sidebar.js +2 -33
- package/dist/components/surface.d.ts +2 -0
- package/dist/components/surface.js +2 -5
- package/dist/components/switch.d.ts +2 -0
- package/dist/components/switch.js +2 -7
- package/dist/components/table-of-contents.d.ts +2 -0
- package/dist/components/table-of-contents.js +2 -7
- package/dist/components/table.d.ts +2 -0
- package/dist/components/table.js +2 -7
- package/dist/components/tabs.d.ts +2 -0
- package/dist/components/tabs.js +2 -5
- package/dist/components/text.d.ts +2 -0
- package/dist/components/text.js +2 -5
- package/dist/components/toast.d.ts +2 -0
- package/dist/components/toast.js +3 -10
- package/dist/components/toolbar.d.ts +2 -0
- package/dist/components/toolbar.js +2 -7
- package/dist/components/tooltip.d.ts +2 -0
- package/dist/components/tooltip.js +2 -6
- package/dist/field-DIjlHM8W.d.ts +91 -0
- package/dist/index-AMEc1MEg2.d.ts +180 -0
- package/dist/index-B-hCpI5K.d.ts +1 -0
- package/dist/index-B6LJIy7_2.d.ts +52 -0
- package/dist/index-B9niVl3r.d.ts +140 -0
- package/dist/index-BAQwS4mL.d.ts +70 -0
- package/dist/index-BD-gTiEv.d.ts +71 -0
- package/dist/index-BVgXnR1V.d.ts +137 -0
- package/dist/index-Bgl_czT12.d.ts +140 -0
- package/dist/index-BkyMHk632.d.ts +110 -0
- package/dist/index-BlEUcijd.d.ts +795 -0
- package/dist/index-BoPqM1Ia2.d.ts +179 -0
- package/dist/index-BzE0aNpx.d.ts +143 -0
- package/dist/index-C3iraF8M2.d.ts +100 -0
- package/dist/index-CGbkysYW2.d.ts +161 -0
- package/dist/index-CLsBWiaS.d.ts +79 -0
- package/dist/index-CSWbPhke.d.ts +126 -0
- package/dist/index-CYoiniZ4.d.ts +135 -0
- package/dist/index-CeBzVJP8.d.ts +426 -0
- package/dist/index-ClS-eFxE.d.ts +104 -0
- package/dist/index-Cp0aQngm.d.ts +182 -0
- package/dist/index-CzIWigmH.d.ts +62 -0
- package/dist/index-CzTgKPh-.d.ts +105 -0
- package/dist/index-D-y1ktn-.d.ts +68 -0
- package/dist/index-D2Gvly0i2.d.ts +96 -0
- package/dist/index-DBlw3E9m.d.ts +166 -0
- package/dist/index-DCA5tjHa.d.ts +68 -0
- package/dist/index-DIV3riUd2.d.ts +148 -0
- package/dist/index-DJIRVD5B.d.ts +85 -0
- package/dist/index-DUCaDjfd.d.ts +240 -0
- package/dist/index-Di3sC6UF.d.ts +91 -0
- package/dist/index-DnbdiagK.d.ts +171 -0
- package/dist/index-DpzpArsi2.d.ts +614 -0
- package/dist/index-Dsn2VLZv.d.ts +238 -0
- package/dist/index-FZvrMcIo2.d.ts +158 -0
- package/dist/index-J1qdw9mL.d.ts +188 -0
- package/dist/index-Vj9ZzRh0.d.ts +66 -0
- package/dist/index-bAud6rG22.d.ts +278 -0
- package/dist/index-lOWfpkxK.d.ts +118 -0
- package/dist/index-yK3Hayg_.d.ts +40 -0
- package/dist/index.d.ts +102 -0
- package/dist/index.js +195 -348
- package/dist/input-BeWEb-jD.d.ts +122 -0
- package/dist/input-group-DpGSsAZy.d.ts +100 -0
- package/dist/layer-card-BNIn9pqy.d.ts +56 -0
- package/dist/link-provider-tz-NJp9x.d.ts +67 -0
- package/dist/portal-provider-4AHCxYE6.d.ts +51 -0
- package/dist/primitives/accordion.d.ts +1 -0
- package/dist/primitives/accordion.js +2 -5
- package/dist/primitives/alert-dialog.d.ts +1 -0
- package/dist/primitives/alert-dialog.js +2 -5
- package/dist/primitives/autocomplete.d.ts +1 -0
- package/dist/primitives/autocomplete.js +2 -5
- package/dist/primitives/avatar.d.ts +1 -0
- package/dist/primitives/avatar.js +2 -5
- package/dist/primitives/button.d.ts +1 -0
- package/dist/primitives/button.js +2 -5
- package/dist/primitives/checkbox-group.d.ts +1 -0
- package/dist/primitives/checkbox-group.js +2 -5
- package/dist/primitives/checkbox.d.ts +1 -0
- package/dist/primitives/checkbox.js +2 -5
- package/dist/primitives/collapsible.d.ts +1 -0
- package/dist/primitives/collapsible.js +2 -5
- package/dist/primitives/combobox.d.ts +1 -0
- package/dist/primitives/combobox.js +2 -5
- package/dist/primitives/context-menu.d.ts +1 -0
- package/dist/primitives/context-menu.js +2 -5
- package/dist/primitives/csp-provider.d.ts +1 -0
- package/dist/primitives/csp-provider.js +2 -5
- package/dist/primitives/dialog.d.ts +1 -0
- package/dist/primitives/dialog.js +2 -5
- package/dist/primitives/direction-provider.d.ts +1 -0
- package/dist/primitives/direction-provider.js +3 -6
- package/dist/primitives/drawer.d.ts +1 -0
- package/dist/primitives/drawer.js +2 -5
- package/dist/primitives/field.d.ts +1 -0
- package/dist/primitives/field.js +2 -5
- package/dist/primitives/fieldset.d.ts +1 -0
- package/dist/primitives/fieldset.js +2 -5
- package/dist/primitives/form.d.ts +1 -0
- package/dist/primitives/form.js +2 -5
- package/dist/primitives/input.d.ts +1 -0
- package/dist/primitives/input.js +2 -5
- package/dist/primitives/menu.d.ts +1 -0
- package/dist/primitives/menu.js +2 -5
- package/dist/primitives/menubar.d.ts +1 -0
- package/dist/primitives/menubar.js +2 -5
- package/dist/primitives/meter.d.ts +1 -0
- package/dist/primitives/meter.js +2 -5
- package/dist/primitives/navigation-menu.d.ts +1 -0
- package/dist/primitives/navigation-menu.js +2 -5
- package/dist/primitives/number-field.d.ts +1 -0
- package/dist/primitives/number-field.js +2 -5
- package/dist/primitives/otp-field.d.ts +3 -0
- package/dist/primitives/otp-field.js +2 -6
- package/dist/primitives/popover.d.ts +1 -0
- package/dist/primitives/popover.js +2 -5
- package/dist/primitives/preview-card.d.ts +1 -0
- package/dist/primitives/preview-card.js +2 -5
- package/dist/primitives/progress.d.ts +1 -0
- package/dist/primitives/progress.js +2 -5
- package/dist/primitives/radio-group.d.ts +1 -0
- package/dist/primitives/radio-group.js +2 -5
- package/dist/primitives/radio.d.ts +1 -0
- package/dist/primitives/radio.js +2 -5
- package/dist/primitives/scroll-area.d.ts +1 -0
- package/dist/primitives/scroll-area.js +2 -5
- package/dist/primitives/select.d.ts +1 -0
- package/dist/primitives/select.js +2 -5
- package/dist/primitives/separator.d.ts +1 -0
- package/dist/primitives/separator.js +2 -5
- package/dist/primitives/slider.d.ts +1 -0
- package/dist/primitives/slider.js +2 -5
- package/dist/primitives/switch.d.ts +1 -0
- package/dist/primitives/switch.js +2 -5
- package/dist/primitives/tabs.d.ts +1 -0
- package/dist/primitives/tabs.js +2 -5
- package/dist/primitives/toast.d.ts +1 -0
- package/dist/primitives/toast.js +2 -5
- package/dist/primitives/toggle-group.d.ts +1 -0
- package/dist/primitives/toggle-group.js +2 -5
- package/dist/primitives/toggle.d.ts +1 -0
- package/dist/primitives/toggle.js +2 -5
- package/dist/primitives/toolbar.d.ts +1 -0
- package/dist/primitives/toolbar.js +2 -5
- package/dist/primitives/tooltip.d.ts +1 -0
- package/dist/primitives/tooltip.js +2 -5
- package/dist/primitives.d.ts +42 -0
- package/dist/primitives.js +42 -46
- package/dist/registry.d.ts +2 -0
- package/dist/registry.js +0 -1
- package/dist/scripts/theme-generator/config.d.ts +7 -5
- package/dist/scripts/theme-generator/config.js +475 -627
- package/dist/scripts/theme-generator/types.d.ts +51 -49
- package/dist/scripts/theme-generator/types.js +0 -1
- package/dist/styles/kumo-binding.css +35 -8
- package/dist/styles/kumo-standalone.css +1 -1
- package/dist/styles/kumo.css +3 -5
- package/dist/styles/theme-fedramp.css +7 -15
- package/dist/styles/theme-kumo.css +101 -56
- package/dist/tooltip-BuCo6Ki4.d.ts +105 -0
- package/dist/types-C402rKiz.d.ts +132 -0
- package/dist/types-CdzJnnIl.d.ts +193 -0
- package/dist/utils.d.ts +4 -0
- package/dist/utils.js +5 -12
- package/package.json +231 -232
- package/scripts/component-registry/index.test.ts +1 -1
- package/scripts/component-registry/metadata.ts +3 -4
- package/scripts/component-registry/props-filter.ts +3 -1
- package/scripts/component-registry/variant-parser.ts +1 -0
- package/scripts/theme-generator/config.ts +21 -22
- package/scripts/theme-generator/generate-css.test.ts +1 -1
- package/dist/ai/schemas.d.ts.map +0 -1
- package/dist/ai/schemas.js.map +0 -1
- package/dist/catalog.js.map +0 -1
- package/dist/chunks/Maps-imwfwgb7do9lr3i5.js +0 -2448
- package/dist/chunks/Maps-imwfwgb7do9lr3i5.js.map +0 -1
- package/dist/chunks/autocomplete-a4gvspveibfuod24.js +0 -193
- package/dist/chunks/autocomplete-a4gvspveibfuod24.js.map +0 -1
- package/dist/chunks/badge-dfc1r37osagi3rs4.js +0 -163
- package/dist/chunks/badge-dfc1r37osagi3rs4.js.map +0 -1
- package/dist/chunks/banner-j52y8l13puk7dybi.js +0 -120
- package/dist/chunks/banner-j52y8l13puk7dybi.js.map +0 -1
- package/dist/chunks/bash-g5z23u7me5rx7bzt.js +0 -15
- package/dist/chunks/bash-g5z23u7me5rx7bzt.js.map +0 -1
- package/dist/chunks/breadcrumbs-js59m7m57bdsveew.js +0 -169
- package/dist/chunks/breadcrumbs-js59m7m57bdsveew.js.map +0 -1
- package/dist/chunks/button-ebfdg9mkhojue36n.js +0 -237
- package/dist/chunks/button-ebfdg9mkhojue36n.js.map +0 -1
- package/dist/chunks/checkbox-k355pnfisqt0h4eg.js +0 -216
- package/dist/chunks/checkbox-k355pnfisqt0h4eg.js.map +0 -1
- package/dist/chunks/clipboard-text-isb05zkg2aox0tp6.js +0 -191
- package/dist/chunks/clipboard-text-isb05zkg2aox0tp6.js.map +0 -1
- package/dist/chunks/cloudflare-logo-fiuocxdxqrxawjfv.js +0 -175
- package/dist/chunks/cloudflare-logo-fiuocxdxqrxawjfv.js.map +0 -1
- package/dist/chunks/cn-bo7ya7641lkickbt.js +0 -22
- package/dist/chunks/cn-bo7ya7641lkickbt.js.map +0 -1
- package/dist/chunks/code-pbkfdfat0yilg6dx.js +0 -61
- package/dist/chunks/code-pbkfdfat0yilg6dx.js.map +0 -1
- package/dist/chunks/collapsible-f9hgtc1u6xvqrgt8.js +0 -76
- package/dist/chunks/collapsible-f9hgtc1u6xvqrgt8.js.map +0 -1
- package/dist/chunks/combobox-hc9wi9nwsyyli8ur.js +0 -408
- package/dist/chunks/combobox-hc9wi9nwsyyli8ur.js.map +0 -1
- package/dist/chunks/command-palette-c03zze4ayuytwxjg.js +0 -403
- package/dist/chunks/command-palette-c03zze4ayuytwxjg.js.map +0 -1
- package/dist/chunks/core-dyku7qctyc40nnhh.js +0 -5464
- package/dist/chunks/core-dyku7qctyc40nnhh.js.map +0 -1
- package/dist/chunks/css-d1mi3wy1sl3fzekh.js +0 -8
- package/dist/chunks/css-d1mi3wy1sl3fzekh.js.map +0 -1
- package/dist/chunks/date-picker-bffp889exjixmgz3.js +0 -2921
- package/dist/chunks/date-picker-bffp889exjixmgz3.js.map +0 -1
- package/dist/chunks/date-range-picker-oks2r14lbbukd545.js +0 -408
- package/dist/chunks/date-range-picker-oks2r14lbbukd545.js.map +0 -1
- package/dist/chunks/dialog-ovhmzfuppr5xix0e.js +0 -134
- package/dist/chunks/dialog-ovhmzfuppr5xix0e.js.map +0 -1
- package/dist/chunks/diff-cpj1h9lg0bw716mj.js +0 -8
- package/dist/chunks/diff-cpj1h9lg0bw716mj.js.map +0 -1
- package/dist/chunks/dropdown-iey8f344rd5dgahz.js +0 -321
- package/dist/chunks/dropdown-iey8f344rd5dgahz.js.map +0 -1
- package/dist/chunks/empty-k83r53jh5utqvv7w.js +0 -94
- package/dist/chunks/empty-k83r53jh5utqvv7w.js.map +0 -1
- package/dist/chunks/engine-javascript-hi1kqifa6nkcridk.js +0 -2638
- package/dist/chunks/engine-javascript-hi1kqifa6nkcridk.js.map +0 -1
- package/dist/chunks/engine-oniguruma-g75h8oxao68cjmhg.js +0 -295
- package/dist/chunks/engine-oniguruma-g75h8oxao68cjmhg.js.map +0 -1
- package/dist/chunks/field-bmglk138wa8bf3ei.js +0 -77
- package/dist/chunks/field-bmglk138wa8bf3ei.js.map +0 -1
- package/dist/chunks/github-light-ulev8flhimfg79ob.js +0 -6
- package/dist/chunks/github-light-ulev8flhimfg79ob.js.map +0 -1
- package/dist/chunks/graphql-ft2h47erta7isqn4.js +0 -16
- package/dist/chunks/graphql-ft2h47erta7isqn4.js.map +0 -1
- package/dist/chunks/grid-jze04557ljywg3uc.js +0 -128
- package/dist/chunks/grid-jze04557ljywg3uc.js.map +0 -1
- package/dist/chunks/hcl-hcu7d6ja6t540ijn.js +0 -8
- package/dist/chunks/hcl-hcu7d6ja6t540ijn.js.map +0 -1
- package/dist/chunks/html-kl304jmqj4jxj777.js +0 -12
- package/dist/chunks/html-kl304jmqj4jxj777.js.map +0 -1
- package/dist/chunks/input-area-sg518xu4pyg4m0km.js +0 -144
- package/dist/chunks/input-area-sg518xu4pyg4m0km.js.map +0 -1
- package/dist/chunks/input-ckl5misj0jd9cu5r.js +0 -130
- package/dist/chunks/input-ckl5misj0jd9cu5r.js.map +0 -1
- package/dist/chunks/input-group-bflx1m6ki55e99vf.js +0 -505
- package/dist/chunks/input-group-bflx1m6ki55e99vf.js.map +0 -1
- package/dist/chunks/javascript-hhx3avh9uv2o27ay.js +0 -8
- package/dist/chunks/javascript-hhx3avh9uv2o27ay.js.map +0 -1
- package/dist/chunks/json-jovp9qemdkp5cziz.js +0 -8
- package/dist/chunks/json-jovp9qemdkp5cziz.js.map +0 -1
- package/dist/chunks/jsonc-jbkkgjer6ispw2u3.js +0 -8
- package/dist/chunks/jsonc-jbkkgjer6ispw2u3.js.map +0 -1
- package/dist/chunks/jsx-ij885l2li2lzfoss.js +0 -8
- package/dist/chunks/jsx-ij885l2li2lzfoss.js.map +0 -1
- package/dist/chunks/label-i1xbmg8y1n0tbtkx.js +0 -68
- package/dist/chunks/label-i1xbmg8y1n0tbtkx.js.map +0 -1
- package/dist/chunks/layer-card-m6h85dpadvee39h2.js +0 -47
- package/dist/chunks/layer-card-m6h85dpadvee39h2.js.map +0 -1
- package/dist/chunks/link-j93fl5m8zrcfivsr.js +0 -95
- package/dist/chunks/link-j93fl5m8zrcfivsr.js.map +0 -1
- package/dist/chunks/link-provider-mn2voeohon7cj9o4.js +0 -22
- package/dist/chunks/link-provider-mn2voeohon7cj9o4.js.map +0 -1
- package/dist/chunks/loader-g8a6j76ue5nq0lr8.js +0 -109
- package/dist/chunks/loader-g8a6j76ue5nq0lr8.js.map +0 -1
- package/dist/chunks/markdown-n2vyyq7l68fy32wc.js +0 -8
- package/dist/chunks/markdown-n2vyyq7l68fy32wc.js.map +0 -1
- package/dist/chunks/menubar-opzxfzylaatfz4nv.js +0 -98
- package/dist/chunks/menubar-opzxfzylaatfz4nv.js.map +0 -1
- package/dist/chunks/meter-6br6z5ekw41trxeh.js +0 -51
- package/dist/chunks/meter-6br6z5ekw41trxeh.js.map +0 -1
- package/dist/chunks/pagination-j33ntwqmm9qskfgv.js +0 -266
- package/dist/chunks/pagination-j33ntwqmm9qskfgv.js.map +0 -1
- package/dist/chunks/popover-cqdmpp8i4hg8gzzx.js +0 -181
- package/dist/chunks/popover-cqdmpp8i4hg8gzzx.js.map +0 -1
- package/dist/chunks/portal-provider-hwmkdmkpvct0cb76.js +0 -18
- package/dist/chunks/portal-provider-hwmkdmkpvct0cb76.js.map +0 -1
- package/dist/chunks/python-gg755pb8oe9ra1d1.js +0 -8
- package/dist/chunks/python-gg755pb8oe9ra1d1.js.map +0 -1
- package/dist/chunks/radio-ejey7i6r4tq314av.js +0 -226
- package/dist/chunks/radio-ejey7i6r4tq314av.js.map +0 -1
- package/dist/chunks/resolve-variant-gw6eh7fa4st8ej7m.js +0 -11
- package/dist/chunks/resolve-variant-gw6eh7fa4st8ej7m.js.map +0 -1
- package/dist/chunks/select-p8adn2tnpom25hpl.js +0 -237
- package/dist/chunks/select-p8adn2tnpom25hpl.js.map +0 -1
- package/dist/chunks/sensitive-input-it1hsswlccq3u7g6.js +0 -273
- package/dist/chunks/sensitive-input-it1hsswlccq3u7g6.js.map +0 -1
- package/dist/chunks/sidebar-7whsl7qwrw5b6ip8.js +0 -1144
- package/dist/chunks/sidebar-7whsl7qwrw5b6ip8.js.map +0 -1
- package/dist/chunks/skeleton-line-omxgxia23vpav94x.js +0 -33
- package/dist/chunks/skeleton-line-omxgxia23vpav94x.js.map +0 -1
- package/dist/chunks/sql-ovukp5mrfunfk5tv.js +0 -8
- package/dist/chunks/sql-ovukp5mrfunfk5tv.js.map +0 -1
- package/dist/chunks/surface-gc2gblserrxcb1eg.js +0 -29
- package/dist/chunks/surface-gc2gblserrxcb1eg.js.map +0 -1
- package/dist/chunks/switch-ljsq915e0l1a5mjd.js +0 -256
- package/dist/chunks/switch-ljsq915e0l1a5mjd.js.map +0 -1
- package/dist/chunks/table-of-contents-cghjqyk43nj5zmlw.js +0 -106
- package/dist/chunks/table-of-contents-cghjqyk43nj5zmlw.js.map +0 -1
- package/dist/chunks/table-ojjjeqszmt9jgnug.js +0 -208
- package/dist/chunks/table-ojjjeqszmt9jgnug.js.map +0 -1
- package/dist/chunks/tabs-kemdy19kfesj2xjr.js +0 -177
- package/dist/chunks/tabs-kemdy19kfesj2xjr.js.map +0 -1
- package/dist/chunks/text-oqp48b9m5u6t62b4.js +0 -103
- package/dist/chunks/text-oqp48b9m5u6t62b4.js.map +0 -1
- package/dist/chunks/toast-ldj9zi940w83ub90.js +0 -386
- package/dist/chunks/toast-ldj9zi940w83ub90.js.map +0 -1
- package/dist/chunks/toml-nczb2z9n0o23o3ci.js +0 -8
- package/dist/chunks/toml-nczb2z9n0o23o3ci.js.map +0 -1
- package/dist/chunks/toolbar-lmylyrod70sn0q4i.js +0 -172
- package/dist/chunks/toolbar-lmylyrod70sn0q4i.js.map +0 -1
- package/dist/chunks/tooltip-mooldq78tg77ekvv.js +0 -103
- package/dist/chunks/tooltip-mooldq78tg77ekvv.js.map +0 -1
- package/dist/chunks/tsx-ehy8lrzet6v54zur.js +0 -8
- package/dist/chunks/tsx-ehy8lrzet6v54zur.js.map +0 -1
- package/dist/chunks/typescript-k4ggjrxhrhcdni6u.js +0 -8
- package/dist/chunks/typescript-k4ggjrxhrhcdni6u.js.map +0 -1
- package/dist/chunks/vendor-base-ui-elpbzr8xeffrz4h2.js +0 -25027
- package/dist/chunks/vendor-base-ui-elpbzr8xeffrz4h2.js.map +0 -1
- package/dist/chunks/vendor-floating-ui-k1zjlb8fkwtcw4k5.js +0 -1310
- package/dist/chunks/vendor-floating-ui-k1zjlb8fkwtcw4k5.js.map +0 -1
- package/dist/chunks/vendor-styling-ofvnbcuht98q88oo.js +0 -3252
- package/dist/chunks/vendor-styling-ofvnbcuht98q88oo.js.map +0 -1
- package/dist/chunks/vendor-utils-m5h2xu7s2rs3pgk5.js +0 -217
- package/dist/chunks/vendor-utils-m5h2xu7s2rs3pgk5.js.map +0 -1
- package/dist/chunks/vesper-ebfu9ns65f2v830s.js +0 -6
- package/dist/chunks/vesper-ebfu9ns65f2v830s.js.map +0 -1
- package/dist/chunks/wasm-oj22f8usru9h7dzg.js +0 -9
- package/dist/chunks/wasm-oj22f8usru9h7dzg.js.map +0 -1
- package/dist/chunks/yaml-e2v22lr79tss2brj.js +0 -8
- package/dist/chunks/yaml-e2v22lr79tss2brj.js.map +0 -1
- package/dist/code/server.js.map +0 -1
- package/dist/code.js.map +0 -1
- package/dist/components/autocomplete.js.map +0 -1
- package/dist/components/badge.js.map +0 -1
- package/dist/components/banner.js.map +0 -1
- package/dist/components/breadcrumbs.js.map +0 -1
- package/dist/components/button.js.map +0 -1
- package/dist/components/chart.js.map +0 -1
- package/dist/components/checkbox.js.map +0 -1
- package/dist/components/clipboard-text.js.map +0 -1
- package/dist/components/cloudflare-logo.js.map +0 -1
- package/dist/components/code.js.map +0 -1
- package/dist/components/collapsible.js.map +0 -1
- package/dist/components/combobox.js.map +0 -1
- package/dist/components/command-palette.js.map +0 -1
- package/dist/components/date-picker.js.map +0 -1
- package/dist/components/date-range-picker.js.map +0 -1
- package/dist/components/dialog.js.map +0 -1
- package/dist/components/dropdown.js.map +0 -1
- package/dist/components/empty.js.map +0 -1
- package/dist/components/field.js.map +0 -1
- package/dist/components/flow.js.map +0 -1
- package/dist/components/grid.js.map +0 -1
- package/dist/components/input-group.js.map +0 -1
- package/dist/components/input.js.map +0 -1
- package/dist/components/label.js.map +0 -1
- package/dist/components/layer-card.js.map +0 -1
- package/dist/components/link.js.map +0 -1
- package/dist/components/loader.js.map +0 -1
- package/dist/components/menubar.js.map +0 -1
- package/dist/components/meter.js.map +0 -1
- package/dist/components/pagination.js.map +0 -1
- package/dist/components/popover.js.map +0 -1
- package/dist/components/radio.js.map +0 -1
- package/dist/components/select.js.map +0 -1
- package/dist/components/sensitive-input.js.map +0 -1
- package/dist/components/sidebar.js.map +0 -1
- package/dist/components/surface.js.map +0 -1
- package/dist/components/switch.js.map +0 -1
- package/dist/components/table-of-contents.js.map +0 -1
- package/dist/components/table.js.map +0 -1
- package/dist/components/tabs.js.map +0 -1
- package/dist/components/text.js.map +0 -1
- package/dist/components/toast.js.map +0 -1
- package/dist/components/toolbar.js.map +0 -1
- package/dist/components/tooltip.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/primitives/accordion.js.map +0 -1
- package/dist/primitives/alert-dialog.js.map +0 -1
- package/dist/primitives/autocomplete.js.map +0 -1
- package/dist/primitives/avatar.js.map +0 -1
- package/dist/primitives/button.js.map +0 -1
- package/dist/primitives/checkbox-group.js.map +0 -1
- package/dist/primitives/checkbox.js.map +0 -1
- package/dist/primitives/collapsible.js.map +0 -1
- package/dist/primitives/combobox.js.map +0 -1
- package/dist/primitives/context-menu.js.map +0 -1
- package/dist/primitives/csp-provider.js.map +0 -1
- package/dist/primitives/dialog.js.map +0 -1
- package/dist/primitives/direction-provider.js.map +0 -1
- package/dist/primitives/drawer.js.map +0 -1
- package/dist/primitives/field.js.map +0 -1
- package/dist/primitives/fieldset.js.map +0 -1
- package/dist/primitives/form.js.map +0 -1
- package/dist/primitives/input.js.map +0 -1
- package/dist/primitives/menu.js.map +0 -1
- package/dist/primitives/menubar.js.map +0 -1
- package/dist/primitives/meter.js.map +0 -1
- package/dist/primitives/navigation-menu.js.map +0 -1
- package/dist/primitives/number-field.js.map +0 -1
- package/dist/primitives/otp-field.js.map +0 -1
- package/dist/primitives/popover.js.map +0 -1
- package/dist/primitives/preview-card.js.map +0 -1
- package/dist/primitives/progress.js.map +0 -1
- package/dist/primitives/radio-group.js.map +0 -1
- package/dist/primitives/radio.js.map +0 -1
- package/dist/primitives/scroll-area.js.map +0 -1
- package/dist/primitives/select.js.map +0 -1
- package/dist/primitives/separator.js.map +0 -1
- package/dist/primitives/slider.js.map +0 -1
- package/dist/primitives/switch.js.map +0 -1
- package/dist/primitives/tabs.js.map +0 -1
- package/dist/primitives/toast.js.map +0 -1
- package/dist/primitives/toggle-group.js.map +0 -1
- package/dist/primitives/toggle.js.map +0 -1
- package/dist/primitives/toolbar.js.map +0 -1
- package/dist/primitives/tooltip.js.map +0 -1
- package/dist/primitives.js.map +0 -1
- package/dist/registry.js.map +0 -1
- package/dist/scripts/theme-generator/config.d.ts.map +0 -1
- package/dist/scripts/theme-generator/config.js.map +0 -1
- package/dist/scripts/theme-generator/generate-css.d.ts +0 -31
- package/dist/scripts/theme-generator/generate-css.d.ts.map +0 -1
- package/dist/scripts/theme-generator/index.d.ts +0 -13
- package/dist/scripts/theme-generator/index.d.ts.map +0 -1
- package/dist/scripts/theme-generator/migrate.d.ts +0 -56
- package/dist/scripts/theme-generator/migrate.d.ts.map +0 -1
- package/dist/scripts/theme-generator/types.d.ts.map +0 -1
- package/dist/scripts/theme-generator/types.js.map +0 -1
- package/dist/src/blocks/delete-resource/delete-resource.d.ts +0 -46
- package/dist/src/blocks/delete-resource/delete-resource.d.ts.map +0 -1
- package/dist/src/blocks/delete-resource/index.d.ts +0 -2
- package/dist/src/blocks/delete-resource/index.d.ts.map +0 -1
- package/dist/src/blocks/page-header/index.d.ts +0 -2
- package/dist/src/blocks/page-header/index.d.ts.map +0 -1
- package/dist/src/blocks/page-header/page-header.d.ts +0 -38
- package/dist/src/blocks/page-header/page-header.d.ts.map +0 -1
- package/dist/src/blocks/resource-list/index.d.ts +0 -2
- package/dist/src/blocks/resource-list/index.d.ts.map +0 -1
- package/dist/src/blocks/resource-list/resource-list.d.ts +0 -18
- package/dist/src/blocks/resource-list/resource-list.d.ts.map +0 -1
- package/dist/src/catalog/catalog.d.ts +0 -75
- package/dist/src/catalog/catalog.d.ts.map +0 -1
- package/dist/src/catalog/data.d.ts +0 -44
- package/dist/src/catalog/data.d.ts.map +0 -1
- package/dist/src/catalog/index.d.ts +0 -39
- package/dist/src/catalog/index.d.ts.map +0 -1
- package/dist/src/catalog/types.d.ts +0 -226
- package/dist/src/catalog/types.d.ts.map +0 -1
- package/dist/src/catalog/visibility.d.ts +0 -37
- package/dist/src/catalog/visibility.d.ts.map +0 -1
- package/dist/src/code/code-highlighted.d.ts +0 -32
- package/dist/src/code/code-highlighted.d.ts.map +0 -1
- package/dist/src/code/context.d.ts +0 -16
- package/dist/src/code/context.d.ts.map +0 -1
- package/dist/src/code/index.d.ts +0 -32
- package/dist/src/code/index.d.ts.map +0 -1
- package/dist/src/code/provider.d.ts +0 -13
- package/dist/src/code/provider.d.ts.map +0 -1
- package/dist/src/code/server.d.ts +0 -95
- package/dist/src/code/server.d.ts.map +0 -1
- package/dist/src/code/types.d.ts +0 -130
- package/dist/src/code/types.d.ts.map +0 -1
- package/dist/src/code/use-shiki-highlighter.d.ts +0 -36
- package/dist/src/code/use-shiki-highlighter.d.ts.map +0 -1
- package/dist/src/command-line/build-cli.d.ts +0 -7
- package/dist/src/command-line/build-cli.d.ts.map +0 -1
- package/dist/src/command-line/cli.d.ts +0 -13
- package/dist/src/command-line/cli.d.ts.map +0 -1
- package/dist/src/command-line/commands/add.d.ts +0 -10
- package/dist/src/command-line/commands/add.d.ts.map +0 -1
- package/dist/src/command-line/commands/ai.d.ts +0 -10
- package/dist/src/command-line/commands/ai.d.ts.map +0 -1
- package/dist/src/command-line/commands/blocks.d.ts +0 -10
- package/dist/src/command-line/commands/blocks.d.ts.map +0 -1
- package/dist/src/command-line/commands/doc.d.ts +0 -14
- package/dist/src/command-line/commands/doc.d.ts.map +0 -1
- package/dist/src/command-line/commands/init.d.ts +0 -18
- package/dist/src/command-line/commands/init.d.ts.map +0 -1
- package/dist/src/command-line/commands/ls.d.ts +0 -10
- package/dist/src/command-line/commands/ls.d.ts.map +0 -1
- package/dist/src/command-line/commands/migrate.d.ts +0 -10
- package/dist/src/command-line/commands/migrate.d.ts.map +0 -1
- package/dist/src/command-line/utils/config.d.ts +0 -42
- package/dist/src/command-line/utils/config.d.ts.map +0 -1
- package/dist/src/command-line/utils/transformer.d.ts +0 -21
- package/dist/src/command-line/utils/transformer.d.ts.map +0 -1
- package/dist/src/components/autocomplete/autocomplete.d.ts +0 -181
- package/dist/src/components/autocomplete/autocomplete.d.ts.map +0 -1
- package/dist/src/components/autocomplete/index.d.ts +0 -3
- package/dist/src/components/autocomplete/index.d.ts.map +0 -1
- package/dist/src/components/badge/badge.d.ts +0 -180
- package/dist/src/components/badge/badge.d.ts.map +0 -1
- package/dist/src/components/badge/index.d.ts +0 -2
- package/dist/src/components/badge/index.d.ts.map +0 -1
- package/dist/src/components/banner/banner.d.ts +0 -106
- package/dist/src/components/banner/banner.d.ts.map +0 -1
- package/dist/src/components/banner/index.d.ts +0 -2
- package/dist/src/components/banner/index.d.ts.map +0 -1
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts +0 -78
- package/dist/src/components/breadcrumbs/breadcrumbs.d.ts.map +0 -1
- package/dist/src/components/breadcrumbs/index.d.ts +0 -2
- package/dist/src/components/breadcrumbs/index.d.ts.map +0 -1
- package/dist/src/components/button/button.d.ts +0 -214
- package/dist/src/components/button/button.d.ts.map +0 -1
- package/dist/src/components/button/index.d.ts +0 -2
- package/dist/src/components/button/index.d.ts.map +0 -1
- package/dist/src/components/chart/Color.d.ts +0 -107
- package/dist/src/components/chart/Color.d.ts.map +0 -1
- package/dist/src/components/chart/EChart.d.ts +0 -166
- package/dist/src/components/chart/EChart.d.ts.map +0 -1
- package/dist/src/components/chart/Legend.d.ts +0 -51
- package/dist/src/components/chart/Legend.d.ts.map +0 -1
- package/dist/src/components/chart/Maps.d.ts +0 -211
- package/dist/src/components/chart/Maps.d.ts.map +0 -1
- package/dist/src/components/chart/SankeyChart.d.ts +0 -98
- package/dist/src/components/chart/SankeyChart.d.ts.map +0 -1
- package/dist/src/components/chart/TimeseriesChart.d.ts +0 -189
- package/dist/src/components/chart/TimeseriesChart.d.ts.map +0 -1
- package/dist/src/components/chart/index.d.ts +0 -7
- package/dist/src/components/chart/index.d.ts.map +0 -1
- package/dist/src/components/chart/timeseries-markers.d.ts +0 -107
- package/dist/src/components/chart/timeseries-markers.d.ts.map +0 -1
- package/dist/src/components/chart/timeseries-thresholds.d.ts +0 -61
- package/dist/src/components/chart/timeseries-thresholds.d.ts.map +0 -1
- package/dist/src/components/chart/timeseries-tooltip.d.ts +0 -28
- package/dist/src/components/chart/timeseries-tooltip.d.ts.map +0 -1
- package/dist/src/components/chart/tooltip-utils.d.ts +0 -4
- package/dist/src/components/chart/tooltip-utils.d.ts.map +0 -1
- package/dist/src/components/checkbox/checkbox.d.ts +0 -197
- package/dist/src/components/checkbox/checkbox.d.ts.map +0 -1
- package/dist/src/components/checkbox/index.d.ts +0 -2
- package/dist/src/components/checkbox/index.d.ts.map +0 -1
- package/dist/src/components/clipboard-text/clipboard-text.d.ts +0 -88
- package/dist/src/components/clipboard-text/clipboard-text.d.ts.map +0 -1
- package/dist/src/components/clipboard-text/index.d.ts +0 -2
- package/dist/src/components/clipboard-text/index.d.ts.map +0 -1
- package/dist/src/components/cloudflare-logo/cloudflare-logo.d.ts +0 -133
- package/dist/src/components/cloudflare-logo/cloudflare-logo.d.ts.map +0 -1
- package/dist/src/components/cloudflare-logo/index.d.ts +0 -2
- package/dist/src/components/cloudflare-logo/index.d.ts.map +0 -1
- package/dist/src/components/code/code.d.ts +0 -189
- package/dist/src/components/code/code.d.ts.map +0 -1
- package/dist/src/components/code/index.d.ts +0 -4
- package/dist/src/components/code/index.d.ts.map +0 -1
- package/dist/src/components/collapsible/collapsible.d.ts +0 -109
- package/dist/src/components/collapsible/collapsible.d.ts.map +0 -1
- package/dist/src/components/collapsible/index.d.ts +0 -2
- package/dist/src/components/collapsible/index.d.ts.map +0 -1
- package/dist/src/components/combobox/combobox.d.ts +0 -246
- package/dist/src/components/combobox/combobox.d.ts.map +0 -1
- package/dist/src/components/combobox/index.d.ts +0 -3
- package/dist/src/components/combobox/index.d.ts.map +0 -1
- package/dist/src/components/command-palette/command-palette.d.ts +0 -258
- package/dist/src/components/command-palette/command-palette.d.ts.map +0 -1
- package/dist/src/components/command-palette/index.d.ts +0 -3
- package/dist/src/components/command-palette/index.d.ts.map +0 -1
- package/dist/src/components/command-palette/types.d.ts +0 -168
- package/dist/src/components/command-palette/types.d.ts.map +0 -1
- package/dist/src/components/date-picker/date-picker.d.ts +0 -65
- package/dist/src/components/date-picker/date-picker.d.ts.map +0 -1
- package/dist/src/components/date-picker/index.d.ts +0 -4
- package/dist/src/components/date-picker/index.d.ts.map +0 -1
- package/dist/src/components/date-range-picker/date-range-picker.d.ts +0 -125
- package/dist/src/components/date-range-picker/date-range-picker.d.ts.map +0 -1
- package/dist/src/components/date-range-picker/index.d.ts +0 -5
- package/dist/src/components/date-range-picker/index.d.ts.map +0 -1
- package/dist/src/components/dialog/dialog.d.ts +0 -242
- package/dist/src/components/dialog/dialog.d.ts.map +0 -1
- package/dist/src/components/dialog/index.d.ts +0 -2
- package/dist/src/components/dialog/index.d.ts.map +0 -1
- package/dist/src/components/dropdown/dropdown.d.ts +0 -116
- package/dist/src/components/dropdown/dropdown.d.ts.map +0 -1
- package/dist/src/components/dropdown/index.d.ts +0 -2
- package/dist/src/components/dropdown/index.d.ts.map +0 -1
- package/dist/src/components/empty/empty.d.ts +0 -69
- package/dist/src/components/empty/empty.d.ts.map +0 -1
- package/dist/src/components/empty/index.d.ts +0 -2
- package/dist/src/components/empty/index.d.ts.map +0 -1
- package/dist/src/components/field/field.d.ts +0 -89
- package/dist/src/components/field/field.d.ts.map +0 -1
- package/dist/src/components/field/index.d.ts +0 -2
- package/dist/src/components/field/index.d.ts.map +0 -1
- package/dist/src/components/flow/connectors.d.ts +0 -59
- package/dist/src/components/flow/connectors.d.ts.map +0 -1
- package/dist/src/components/flow/diagram.d.ts +0 -105
- package/dist/src/components/flow/diagram.d.ts.map +0 -1
- package/dist/src/components/flow/flow-layout.d.ts +0 -77
- package/dist/src/components/flow/flow-layout.d.ts.map +0 -1
- package/dist/src/components/flow/index.d.ts +0 -26
- package/dist/src/components/flow/index.d.ts.map +0 -1
- package/dist/src/components/flow/node.d.ts +0 -61
- package/dist/src/components/flow/node.d.ts.map +0 -1
- package/dist/src/components/flow/parallel.d.ts +0 -9
- package/dist/src/components/flow/parallel.d.ts.map +0 -1
- package/dist/src/components/flow/use-children.d.ts +0 -27
- package/dist/src/components/flow/use-children.d.ts.map +0 -1
- package/dist/src/components/grid/grid.d.ts +0 -135
- package/dist/src/components/grid/grid.d.ts.map +0 -1
- package/dist/src/components/grid/index.d.ts +0 -2
- package/dist/src/components/grid/index.d.ts.map +0 -1
- package/dist/src/components/input/index.d.ts +0 -19
- package/dist/src/components/input/index.d.ts.map +0 -1
- package/dist/src/components/input/input-area.d.ts +0 -83
- package/dist/src/components/input/input-area.d.ts.map +0 -1
- package/dist/src/components/input/input.d.ts +0 -175
- package/dist/src/components/input/input.d.ts.map +0 -1
- package/dist/src/components/input-group/context.d.ts +0 -96
- package/dist/src/components/input-group/context.d.ts.map +0 -1
- package/dist/src/components/input-group/index.d.ts +0 -2
- package/dist/src/components/input-group/index.d.ts.map +0 -1
- package/dist/src/components/input-group/input-group-addon.d.ts +0 -15
- package/dist/src/components/input-group/input-group-addon.d.ts.map +0 -1
- package/dist/src/components/input-group/input-group-button.d.ts +0 -36
- package/dist/src/components/input-group/input-group-button.d.ts.map +0 -1
- package/dist/src/components/input-group/input-group-input.d.ts +0 -9
- package/dist/src/components/input-group/input-group-input.d.ts.map +0 -1
- package/dist/src/components/input-group/input-group-suffix.d.ts +0 -13
- package/dist/src/components/input-group/input-group-suffix.d.ts.map +0 -1
- package/dist/src/components/input-group/input-group.d.ts +0 -43
- package/dist/src/components/input-group/input-group.d.ts.map +0 -1
- package/dist/src/components/label/index.d.ts +0 -2
- package/dist/src/components/label/index.d.ts.map +0 -1
- package/dist/src/components/label/label.d.ts +0 -67
- package/dist/src/components/label/label.d.ts.map +0 -1
- package/dist/src/components/layer-card/index.d.ts +0 -2
- package/dist/src/components/layer-card/index.d.ts.map +0 -1
- package/dist/src/components/layer-card/layer-card.d.ts +0 -60
- package/dist/src/components/layer-card/layer-card.d.ts.map +0 -1
- package/dist/src/components/link/index.d.ts +0 -2
- package/dist/src/components/link/index.d.ts.map +0 -1
- package/dist/src/components/link/link.d.ts +0 -66
- package/dist/src/components/link/link.d.ts.map +0 -1
- package/dist/src/components/loader/index.d.ts +0 -3
- package/dist/src/components/loader/index.d.ts.map +0 -1
- package/dist/src/components/loader/loader.d.ts +0 -70
- package/dist/src/components/loader/loader.d.ts.map +0 -1
- package/dist/src/components/loader/skeleton-line.d.ts +0 -11
- package/dist/src/components/loader/skeleton-line.d.ts.map +0 -1
- package/dist/src/components/menubar/index.d.ts +0 -3
- package/dist/src/components/menubar/index.d.ts.map +0 -1
- package/dist/src/components/menubar/menubar.d.ts +0 -66
- package/dist/src/components/menubar/menubar.d.ts.map +0 -1
- package/dist/src/components/menubar/use-menu-navigation.d.ts +0 -8
- package/dist/src/components/menubar/use-menu-navigation.d.ts.map +0 -1
- package/dist/src/components/meter/index.d.ts +0 -2
- package/dist/src/components/meter/index.d.ts.map +0 -1
- package/dist/src/components/meter/meter.d.ts +0 -44
- package/dist/src/components/meter/meter.d.ts.map +0 -1
- package/dist/src/components/pagination/index.d.ts +0 -2
- package/dist/src/components/pagination/index.d.ts.map +0 -1
- package/dist/src/components/pagination/pagination.d.ts +0 -241
- package/dist/src/components/pagination/pagination.d.ts.map +0 -1
- package/dist/src/components/popover/index.d.ts +0 -3
- package/dist/src/components/popover/index.d.ts.map +0 -1
- package/dist/src/components/popover/popover.d.ts +0 -178
- package/dist/src/components/popover/popover.d.ts.map +0 -1
- package/dist/src/components/radio/index.d.ts +0 -2
- package/dist/src/components/radio/index.d.ts.map +0 -1
- package/dist/src/components/radio/radio.d.ts +0 -277
- package/dist/src/components/radio/radio.d.ts.map +0 -1
- package/dist/src/components/radio/radio.type-spec.d.ts +0 -12
- package/dist/src/components/radio/radio.type-spec.d.ts.map +0 -1
- package/dist/src/components/select/index.d.ts +0 -2
- package/dist/src/components/select/index.d.ts.map +0 -1
- package/dist/src/components/select/select.d.ts +0 -288
- package/dist/src/components/select/select.d.ts.map +0 -1
- package/dist/src/components/sensitive-input/index.d.ts +0 -2
- package/dist/src/components/sensitive-input/index.d.ts.map +0 -1
- package/dist/src/components/sensitive-input/sensitive-input.d.ts +0 -94
- package/dist/src/components/sensitive-input/sensitive-input.d.ts.map +0 -1
- package/dist/src/components/sidebar/index.d.ts +0 -2
- package/dist/src/components/sidebar/index.d.ts.map +0 -1
- package/dist/src/components/sidebar/sidebar.d.ts +0 -583
- package/dist/src/components/sidebar/sidebar.d.ts.map +0 -1
- package/dist/src/components/surface/index.d.ts +0 -5
- package/dist/src/components/surface/index.d.ts.map +0 -1
- package/dist/src/components/surface/surface.d.ts +0 -64
- package/dist/src/components/surface/surface.d.ts.map +0 -1
- package/dist/src/components/switch/index.d.ts +0 -2
- package/dist/src/components/switch/index.d.ts.map +0 -1
- package/dist/src/components/switch/switch.d.ts +0 -197
- package/dist/src/components/switch/switch.d.ts.map +0 -1
- package/dist/src/components/table/index.d.ts +0 -2
- package/dist/src/components/table/index.d.ts.map +0 -1
- package/dist/src/components/table/table.d.ts +0 -138
- package/dist/src/components/table/table.d.ts.map +0 -1
- package/dist/src/components/table-of-contents/index.d.ts +0 -2
- package/dist/src/components/table-of-contents/index.d.ts.map +0 -1
- package/dist/src/components/table-of-contents/table-of-contents.d.ts +0 -72
- package/dist/src/components/table-of-contents/table-of-contents.d.ts.map +0 -1
- package/dist/src/components/tabs/index.d.ts +0 -3
- package/dist/src/components/tabs/index.d.ts.map +0 -1
- package/dist/src/components/tabs/tabs.d.ts +0 -116
- package/dist/src/components/tabs/tabs.d.ts.map +0 -1
- package/dist/src/components/text/index.d.ts +0 -2
- package/dist/src/components/text/index.d.ts.map +0 -1
- package/dist/src/components/text/text.d.ts +0 -214
- package/dist/src/components/text/text.d.ts.map +0 -1
- package/dist/src/components/text/text.type-spec.d.ts +0 -44
- package/dist/src/components/text/text.type-spec.d.ts.map +0 -1
- package/dist/src/components/toast/index.d.ts +0 -5
- package/dist/src/components/toast/index.d.ts.map +0 -1
- package/dist/src/components/toast/toast.d.ts +0 -197
- package/dist/src/components/toast/toast.d.ts.map +0 -1
- package/dist/src/components/toolbar/index.d.ts +0 -2
- package/dist/src/components/toolbar/index.d.ts.map +0 -1
- package/dist/src/components/toolbar/toolbar.d.ts +0 -50
- package/dist/src/components/toolbar/toolbar.d.ts.map +0 -1
- package/dist/src/components/tooltip/index.d.ts +0 -2
- package/dist/src/components/tooltip/index.d.ts.map +0 -1
- package/dist/src/components/tooltip/tooltip.d.ts +0 -108
- package/dist/src/components/tooltip/tooltip.d.ts.map +0 -1
- package/dist/src/index.d.ts +0 -85
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/primitives/accordion.d.ts +0 -13
- package/dist/src/primitives/accordion.d.ts.map +0 -1
- package/dist/src/primitives/alert-dialog.d.ts +0 -13
- package/dist/src/primitives/alert-dialog.d.ts.map +0 -1
- package/dist/src/primitives/autocomplete.d.ts +0 -13
- package/dist/src/primitives/autocomplete.d.ts.map +0 -1
- package/dist/src/primitives/avatar.d.ts +0 -13
- package/dist/src/primitives/avatar.d.ts.map +0 -1
- package/dist/src/primitives/button.d.ts +0 -13
- package/dist/src/primitives/button.d.ts.map +0 -1
- package/dist/src/primitives/checkbox-group.d.ts +0 -13
- package/dist/src/primitives/checkbox-group.d.ts.map +0 -1
- package/dist/src/primitives/checkbox.d.ts +0 -13
- package/dist/src/primitives/checkbox.d.ts.map +0 -1
- package/dist/src/primitives/collapsible.d.ts +0 -13
- package/dist/src/primitives/collapsible.d.ts.map +0 -1
- package/dist/src/primitives/combobox.d.ts +0 -13
- package/dist/src/primitives/combobox.d.ts.map +0 -1
- package/dist/src/primitives/context-menu.d.ts +0 -13
- package/dist/src/primitives/context-menu.d.ts.map +0 -1
- package/dist/src/primitives/csp-provider.d.ts +0 -13
- package/dist/src/primitives/csp-provider.d.ts.map +0 -1
- package/dist/src/primitives/dialog.d.ts +0 -13
- package/dist/src/primitives/dialog.d.ts.map +0 -1
- package/dist/src/primitives/direction-provider.d.ts +0 -13
- package/dist/src/primitives/direction-provider.d.ts.map +0 -1
- package/dist/src/primitives/drawer.d.ts +0 -13
- package/dist/src/primitives/drawer.d.ts.map +0 -1
- package/dist/src/primitives/field.d.ts +0 -13
- package/dist/src/primitives/field.d.ts.map +0 -1
- package/dist/src/primitives/fieldset.d.ts +0 -13
- package/dist/src/primitives/fieldset.d.ts.map +0 -1
- package/dist/src/primitives/form.d.ts +0 -13
- package/dist/src/primitives/form.d.ts.map +0 -1
- package/dist/src/primitives/index.d.ts +0 -56
- package/dist/src/primitives/index.d.ts.map +0 -1
- package/dist/src/primitives/input.d.ts +0 -13
- package/dist/src/primitives/input.d.ts.map +0 -1
- package/dist/src/primitives/menu.d.ts +0 -13
- package/dist/src/primitives/menu.d.ts.map +0 -1
- package/dist/src/primitives/menubar.d.ts +0 -13
- package/dist/src/primitives/menubar.d.ts.map +0 -1
- package/dist/src/primitives/meter.d.ts +0 -13
- package/dist/src/primitives/meter.d.ts.map +0 -1
- package/dist/src/primitives/navigation-menu.d.ts +0 -13
- package/dist/src/primitives/navigation-menu.d.ts.map +0 -1
- package/dist/src/primitives/number-field.d.ts +0 -13
- package/dist/src/primitives/number-field.d.ts.map +0 -1
- package/dist/src/primitives/otp-field.d.ts +0 -14
- package/dist/src/primitives/otp-field.d.ts.map +0 -1
- package/dist/src/primitives/popover.d.ts +0 -13
- package/dist/src/primitives/popover.d.ts.map +0 -1
- package/dist/src/primitives/preview-card.d.ts +0 -13
- package/dist/src/primitives/preview-card.d.ts.map +0 -1
- package/dist/src/primitives/progress.d.ts +0 -13
- package/dist/src/primitives/progress.d.ts.map +0 -1
- package/dist/src/primitives/radio-group.d.ts +0 -13
- package/dist/src/primitives/radio-group.d.ts.map +0 -1
- package/dist/src/primitives/radio.d.ts +0 -13
- package/dist/src/primitives/radio.d.ts.map +0 -1
- package/dist/src/primitives/scroll-area.d.ts +0 -13
- package/dist/src/primitives/scroll-area.d.ts.map +0 -1
- package/dist/src/primitives/select.d.ts +0 -13
- package/dist/src/primitives/select.d.ts.map +0 -1
- package/dist/src/primitives/separator.d.ts +0 -13
- package/dist/src/primitives/separator.d.ts.map +0 -1
- package/dist/src/primitives/slider.d.ts +0 -13
- package/dist/src/primitives/slider.d.ts.map +0 -1
- package/dist/src/primitives/switch.d.ts +0 -13
- package/dist/src/primitives/switch.d.ts.map +0 -1
- package/dist/src/primitives/tabs.d.ts +0 -13
- package/dist/src/primitives/tabs.d.ts.map +0 -1
- package/dist/src/primitives/toast.d.ts +0 -13
- package/dist/src/primitives/toast.d.ts.map +0 -1
- package/dist/src/primitives/toggle-group.d.ts +0 -13
- package/dist/src/primitives/toggle-group.d.ts.map +0 -1
- package/dist/src/primitives/toggle.d.ts +0 -13
- package/dist/src/primitives/toggle.d.ts.map +0 -1
- package/dist/src/primitives/toolbar.d.ts +0 -13
- package/dist/src/primitives/toolbar.d.ts.map +0 -1
- package/dist/src/primitives/tooltip.d.ts +0 -13
- package/dist/src/primitives/tooltip.d.ts.map +0 -1
- package/dist/src/registry/index.d.ts +0 -8
- package/dist/src/registry/index.d.ts.map +0 -1
- package/dist/src/registry/types.d.ts +0 -191
- package/dist/src/registry/types.d.ts.map +0 -1
- package/dist/src/utils/cn.d.ts +0 -3
- package/dist/src/utils/cn.d.ts.map +0 -1
- package/dist/src/utils/index.d.ts +0 -4
- package/dist/src/utils/index.d.ts.map +0 -1
- package/dist/src/utils/link-provider.d.ts +0 -66
- package/dist/src/utils/link-provider.d.ts.map +0 -1
- package/dist/src/utils/portal-provider.d.ts +0 -56
- package/dist/src/utils/portal-provider.d.ts.map +0 -1
- package/dist/src/utils/prop-examples.d.ts +0 -36
- package/dist/src/utils/prop-examples.d.ts.map +0 -1
- package/dist/src/utils/resolve-variant.d.ts +0 -27
- package/dist/src/utils/resolve-variant.d.ts.map +0 -1
- package/dist/utils.js.map +0 -1
|
@@ -0,0 +1,1429 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-hi7ti5xiuxsegr96.js";
|
|
3
|
+
import { c as warn, d as useRefWithInit, s as NOOP, t as useRenderElement, u as useMergedRefs } from "./useRenderElement-m8kc7jyuczp71mq8.js";
|
|
4
|
+
import { n as useIsoLayoutEffect, t as SafeReact } from "./safeReact-bavzz23j5tex60z2.js";
|
|
5
|
+
import { t as useOnMount } from "./useOnMount-j4wobeq47l3u9olo.js";
|
|
6
|
+
import { n as useTimeout, t as Timeout } from "./useTimeout-oqptmu2xmyv5ccic.js";
|
|
7
|
+
import { B as stopEvent, D as activeElement, W as ios, k as getTarget, v as ownerDocument } from "./vendor-utils-luqsvbyuig727bnr.js";
|
|
8
|
+
import { n as webkit, t as gecko } from "./engine-io35xsj9fgfxtihg.js";
|
|
9
|
+
import { w as getWindow } from "./vendor-floating-ui-dsysdmve7iazaaes.js";
|
|
10
|
+
import { E as none, I as wheel, S as keyboard, _ as inputChange, c as decrementPress, g as inputBlur, k as scrub, m as incrementPress, n as createGenericEventDetails, t as createChangeEventDetails, v as inputClear, y as inputPaste } from "./createBaseUIEventDetails-ddivuhl74gni72qn.js";
|
|
11
|
+
import { t as addEventListener } from "./addEventListener-lhqvk2ahlzjsanyg.js";
|
|
12
|
+
import { t as mergeCleanups } from "./mergeCleanups-pexn3wul6a4zn873.js";
|
|
13
|
+
import { t as useValueAsRef } from "./useValueAsRef-lrn42zari17368c9.js";
|
|
14
|
+
import { t as useStableCallback } from "./useStableCallback-ninxmksdjvwl6ejj.js";
|
|
15
|
+
import { n as visuallyHiddenInput, t as visuallyHidden } from "./visuallyHidden-n14xllazfozg55ox.js";
|
|
16
|
+
import { t as useForcedRerendering } from "./useForcedRerendering-el1fbg3ib5yo0v7k.js";
|
|
17
|
+
import { a as useFieldRootContext, c as fieldValidityMapping, n as useLabelableContext } from "./LabelableContext-hetas2e4y0kywfas.js";
|
|
18
|
+
import { n as useFormContext } from "./FormContext-xz0b4h7ue30fkkn1.js";
|
|
19
|
+
import { t as useLabelableId } from "./useLabelableId-b1kwq9st3rjrtakn.js";
|
|
20
|
+
import { t as useControlled } from "./useControlled-nlx0kk1ksgk0auvi.js";
|
|
21
|
+
import { t as useRegisterFieldControl } from "./useRegisterFieldControl-m1rxsuvtpau2341n.js";
|
|
22
|
+
import { t as useButton } from "./useButton-cpo6u2idqcnou6vy.js";
|
|
23
|
+
import { t as useValueChanged } from "./useValueChanged-kthmz4wk7ywnjwtx.js";
|
|
24
|
+
import { t as clamp } from "./clamp-kvu4wtr1dw6b3pnd.js";
|
|
25
|
+
import { r as getFormatter, t as formatNumber } from "./formatNumber-hjijm58g645q6a0n.js";
|
|
26
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
27
|
+
import * as React$1 from "react";
|
|
28
|
+
import * as ReactDOM from "react-dom";
|
|
29
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/root/NumberFieldRootContext.mjs
|
|
30
|
+
const NumberFieldRootContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
31
|
+
NumberFieldRootContext.displayName = "NumberFieldRootContext";
|
|
32
|
+
function useNumberFieldRootContext() {
|
|
33
|
+
const context = React$1.useContext(NumberFieldRootContext);
|
|
34
|
+
if (context === void 0) throw new Error("Base UI: NumberFieldRootContext is missing. NumberField parts must be placed within <NumberField.Root>.");
|
|
35
|
+
return context;
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/utils/stateAttributesMapping.mjs
|
|
39
|
+
const stateAttributesMapping = {
|
|
40
|
+
inputValue: () => null,
|
|
41
|
+
value: () => null,
|
|
42
|
+
...fieldValidityMapping
|
|
43
|
+
};
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/utils/parse.mjs
|
|
46
|
+
const HAN_NUMERALS = [
|
|
47
|
+
"零",
|
|
48
|
+
"〇",
|
|
49
|
+
"一",
|
|
50
|
+
"二",
|
|
51
|
+
"三",
|
|
52
|
+
"四",
|
|
53
|
+
"五",
|
|
54
|
+
"六",
|
|
55
|
+
"七",
|
|
56
|
+
"八",
|
|
57
|
+
"九"
|
|
58
|
+
];
|
|
59
|
+
const HAN_NUMERAL_TO_DIGIT = {
|
|
60
|
+
零: "0",
|
|
61
|
+
〇: "0",
|
|
62
|
+
一: "1",
|
|
63
|
+
二: "2",
|
|
64
|
+
三: "3",
|
|
65
|
+
四: "4",
|
|
66
|
+
五: "5",
|
|
67
|
+
六: "6",
|
|
68
|
+
七: "7",
|
|
69
|
+
八: "8",
|
|
70
|
+
九: "9"
|
|
71
|
+
};
|
|
72
|
+
const ARABIC_NUMERALS = [
|
|
73
|
+
"٠",
|
|
74
|
+
"١",
|
|
75
|
+
"٢",
|
|
76
|
+
"٣",
|
|
77
|
+
"٤",
|
|
78
|
+
"٥",
|
|
79
|
+
"٦",
|
|
80
|
+
"٧",
|
|
81
|
+
"٨",
|
|
82
|
+
"٩"
|
|
83
|
+
];
|
|
84
|
+
const PERSIAN_NUMERALS = [
|
|
85
|
+
"۰",
|
|
86
|
+
"۱",
|
|
87
|
+
"۲",
|
|
88
|
+
"۳",
|
|
89
|
+
"۴",
|
|
90
|
+
"۵",
|
|
91
|
+
"۶",
|
|
92
|
+
"۷",
|
|
93
|
+
"۸",
|
|
94
|
+
"۹"
|
|
95
|
+
];
|
|
96
|
+
const FULLWIDTH_NUMERALS = [
|
|
97
|
+
"0",
|
|
98
|
+
"1",
|
|
99
|
+
"2",
|
|
100
|
+
"3",
|
|
101
|
+
"4",
|
|
102
|
+
"5",
|
|
103
|
+
"6",
|
|
104
|
+
"7",
|
|
105
|
+
"8",
|
|
106
|
+
"9"
|
|
107
|
+
];
|
|
108
|
+
const PERCENTAGES = [
|
|
109
|
+
"%",
|
|
110
|
+
"٪",
|
|
111
|
+
"%",
|
|
112
|
+
"﹪"
|
|
113
|
+
];
|
|
114
|
+
const PERMILLE = ["‰", "؉"];
|
|
115
|
+
const UNICODE_MINUS_SIGNS = [
|
|
116
|
+
"−",
|
|
117
|
+
"-",
|
|
118
|
+
"‒",
|
|
119
|
+
"–",
|
|
120
|
+
"—",
|
|
121
|
+
"﹣"
|
|
122
|
+
];
|
|
123
|
+
const UNICODE_PLUS_SIGNS = ["+", "﹢"];
|
|
124
|
+
const ARABIC_RE = new RegExp(`[${ARABIC_NUMERALS.join("")}]`, "g");
|
|
125
|
+
const PERSIAN_RE = new RegExp(`[${PERSIAN_NUMERALS.join("")}]`, "g");
|
|
126
|
+
const FULLWIDTH_RE = new RegExp(`[${FULLWIDTH_NUMERALS.join("")}]`, "g");
|
|
127
|
+
const HAN_RE = new RegExp(`[${HAN_NUMERALS.join("")}]`, "g");
|
|
128
|
+
const PERCENT_RE = new RegExp(`[${PERCENTAGES.join("")}]`);
|
|
129
|
+
const PERMILLE_RE = new RegExp(`[${PERMILLE.join("")}]`);
|
|
130
|
+
const PERCENT_GLOBAL_RE = new RegExp(PERCENT_RE.source, "g");
|
|
131
|
+
const PERMILLE_GLOBAL_RE = new RegExp(PERMILLE_RE.source, "g");
|
|
132
|
+
const ARABIC_DETECT_RE = new RegExp(`[${ARABIC_NUMERALS.join("")}]`);
|
|
133
|
+
const PERSIAN_DETECT_RE = new RegExp(`[${PERSIAN_NUMERALS.join("")}]`);
|
|
134
|
+
const HAN_DETECT_RE = new RegExp(`[${HAN_NUMERALS.join("")}]`);
|
|
135
|
+
const FULLWIDTH_DETECT_RE = new RegExp(`[${FULLWIDTH_NUMERALS.join("")}]`);
|
|
136
|
+
function isNumeralChar(char) {
|
|
137
|
+
return char >= "0" && char <= "9" || ARABIC_DETECT_RE.test(char) || PERSIAN_DETECT_RE.test(char) || HAN_DETECT_RE.test(char) || FULLWIDTH_DETECT_RE.test(char);
|
|
138
|
+
}
|
|
139
|
+
const BASE_NON_NUMERIC_SYMBOLS = [
|
|
140
|
+
".",
|
|
141
|
+
",",
|
|
142
|
+
".",
|
|
143
|
+
",",
|
|
144
|
+
"٫",
|
|
145
|
+
"٬"
|
|
146
|
+
];
|
|
147
|
+
const SPACE_SEPARATOR_RE = /\p{Zs}/u;
|
|
148
|
+
const PLUS_SIGNS_WITH_ASCII = ["+", ...UNICODE_PLUS_SIGNS];
|
|
149
|
+
const MINUS_SIGNS_WITH_ASCII = ["-", ...UNICODE_MINUS_SIGNS];
|
|
150
|
+
const escapeRegExp = (s) => s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
151
|
+
const escapeClassChar = (s) => s.replace(/[-\\\]^]/g, (m) => `\\${m}`);
|
|
152
|
+
function shiftDecimal(value, exponentDelta) {
|
|
153
|
+
const [coefficient, exponent = "0"] = String(value).split("e");
|
|
154
|
+
return Number(`${coefficient}e${Number(exponent) + exponentDelta}`);
|
|
155
|
+
}
|
|
156
|
+
const charClassFrom = (chars) => `[${chars.map(escapeClassChar).join("")}]`;
|
|
157
|
+
const ANY_MINUS_CLASS = charClassFrom(["-"].concat(UNICODE_MINUS_SIGNS));
|
|
158
|
+
const ANY_PLUS_CLASS = charClassFrom(["+"].concat(UNICODE_PLUS_SIGNS));
|
|
159
|
+
const ANY_MINUS_RE = new RegExp(ANY_MINUS_CLASS, "gu");
|
|
160
|
+
const ANY_PLUS_RE = new RegExp(ANY_PLUS_CLASS, "gu");
|
|
161
|
+
const ANY_MINUS_DETECT_RE = new RegExp(ANY_MINUS_CLASS);
|
|
162
|
+
const ANY_PLUS_DETECT_RE = new RegExp(ANY_PLUS_CLASS);
|
|
163
|
+
function getNumberLocaleDetails(locale, options) {
|
|
164
|
+
const parts = getFormatter(locale, options).formatToParts(11111.1);
|
|
165
|
+
const result = {};
|
|
166
|
+
parts.forEach((part) => {
|
|
167
|
+
result[part.type] = part.value;
|
|
168
|
+
});
|
|
169
|
+
getFormatter(locale).formatToParts(.1).forEach((part) => {
|
|
170
|
+
if (part.type === "decimal") result[part.type] = part.value;
|
|
171
|
+
});
|
|
172
|
+
return result;
|
|
173
|
+
}
|
|
174
|
+
function parseNumber(formattedNumber, locale, options) {
|
|
175
|
+
if (formattedNumber == null) return null;
|
|
176
|
+
let input = String(formattedNumber).replace(/\p{Cf}/gu, "").trim();
|
|
177
|
+
input = input.replace(ANY_MINUS_RE, "-").replace(ANY_PLUS_RE, "+");
|
|
178
|
+
let isNegative = false;
|
|
179
|
+
const trailing = input.match(/([+-])\s*$/);
|
|
180
|
+
if (trailing) {
|
|
181
|
+
if (trailing[1] === "-") isNegative = true;
|
|
182
|
+
input = input.replace(/([+-])\s*$/, "");
|
|
183
|
+
}
|
|
184
|
+
const leading = input.match(/^\s*([+-])/);
|
|
185
|
+
if (leading) {
|
|
186
|
+
if (leading[1] === "-") isNegative = true;
|
|
187
|
+
input = input.replace(/^\s*[+-]/, "");
|
|
188
|
+
}
|
|
189
|
+
let computedLocale = locale;
|
|
190
|
+
if (computedLocale === void 0) {
|
|
191
|
+
if (ARABIC_DETECT_RE.test(input) || PERSIAN_DETECT_RE.test(input)) computedLocale = "ar";
|
|
192
|
+
else if (HAN_DETECT_RE.test(input)) computedLocale = "zh";
|
|
193
|
+
}
|
|
194
|
+
const { group, decimal, currency, exponentSeparator } = getNumberLocaleDetails(computedLocale, options);
|
|
195
|
+
const unitParts = getFormatter(computedLocale, options).formatToParts(1).filter((p) => p.type === "unit").map((p) => escapeRegExp(p.value));
|
|
196
|
+
const unitRegex = unitParts.length ? new RegExp(unitParts.join("|"), "g") : null;
|
|
197
|
+
let groupRegex = null;
|
|
198
|
+
if (group) {
|
|
199
|
+
const isSpaceGroup = /\p{Zs}/u.test(group);
|
|
200
|
+
const isApostropheGroup = group === "'" || group === "’";
|
|
201
|
+
if (isSpaceGroup) groupRegex = /\p{Zs}/gu;
|
|
202
|
+
else if (isApostropheGroup) groupRegex = /['’]/g;
|
|
203
|
+
else groupRegex = new RegExp(escapeRegExp(group), "g");
|
|
204
|
+
}
|
|
205
|
+
let unformatted = [
|
|
206
|
+
{
|
|
207
|
+
regex: groupRegex,
|
|
208
|
+
replacement: ""
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
regex: decimal ? new RegExp(escapeRegExp(decimal), "g") : null,
|
|
212
|
+
replacement: "."
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
regex: /./g,
|
|
216
|
+
replacement: "."
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
regex: /,/g,
|
|
220
|
+
replacement: ""
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
regex: /٫/g,
|
|
224
|
+
replacement: "."
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
regex: /٬/g,
|
|
228
|
+
replacement: ""
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
regex: currency ? new RegExp(escapeRegExp(currency), "g") : null,
|
|
232
|
+
replacement: ""
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
regex: unitRegex,
|
|
236
|
+
replacement: ""
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
regex: PERCENT_GLOBAL_RE,
|
|
240
|
+
replacement: ""
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
regex: PERMILLE_GLOBAL_RE,
|
|
244
|
+
replacement: ""
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
regex: exponentSeparator ? new RegExp(escapeRegExp(exponentSeparator), "g") : null,
|
|
248
|
+
replacement: "e"
|
|
249
|
+
},
|
|
250
|
+
{
|
|
251
|
+
regex: ARABIC_RE,
|
|
252
|
+
replacement: (ch) => String(ARABIC_NUMERALS.indexOf(ch))
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
regex: PERSIAN_RE,
|
|
256
|
+
replacement: (ch) => String(PERSIAN_NUMERALS.indexOf(ch))
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
regex: FULLWIDTH_RE,
|
|
260
|
+
replacement: (ch) => String(FULLWIDTH_NUMERALS.indexOf(ch))
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
regex: HAN_RE,
|
|
264
|
+
replacement: (ch) => HAN_NUMERAL_TO_DIGIT[ch]
|
|
265
|
+
}
|
|
266
|
+
].reduce((acc, { regex, replacement }) => {
|
|
267
|
+
return regex ? acc.replace(regex, replacement) : acc;
|
|
268
|
+
}, input);
|
|
269
|
+
const lastDot = unformatted.lastIndexOf(".");
|
|
270
|
+
if (lastDot !== -1) unformatted = `${unformatted.slice(0, lastDot).replace(/\./g, "")}.${unformatted.slice(lastDot + 1).replace(/\./g, "")}`;
|
|
271
|
+
if (/^[-+]?Infinity$/i.test(input) || input.includes("∞")) return null;
|
|
272
|
+
const parseTarget = (isNegative ? "-" : "") + unformatted;
|
|
273
|
+
let num = parseFloat(parseTarget);
|
|
274
|
+
const style = options?.style;
|
|
275
|
+
const isUnitPercent = style === "unit" && options?.unit === "percent";
|
|
276
|
+
const hasPercentSymbol = PERCENT_RE.test(formattedNumber) || style === "percent";
|
|
277
|
+
if (PERMILLE_RE.test(formattedNumber)) num = shiftDecimal(num, -3);
|
|
278
|
+
else if (!isUnitPercent && hasPercentSymbol) num = shiftDecimal(num, -2);
|
|
279
|
+
if (!Number.isFinite(num)) return null;
|
|
280
|
+
return num;
|
|
281
|
+
}
|
|
282
|
+
//#endregion
|
|
283
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/utils/validate.mjs
|
|
284
|
+
const STEP_EPSILON_FACTOR = 1e-10;
|
|
285
|
+
const MAX_FLOATING_POINT_CLEANUP_DELTA = 1e-10;
|
|
286
|
+
function hasNumberFormatRoundingOptions(format) {
|
|
287
|
+
return format?.maximumFractionDigits != null || format?.minimumFractionDigits != null || format?.maximumSignificantDigits != null || format?.minimumSignificantDigits != null || format?.roundingIncrement != null || format?.roundingMode != null || format?.roundingPriority != null;
|
|
288
|
+
}
|
|
289
|
+
function removeFloatingPointErrors(value, format) {
|
|
290
|
+
if (!Number.isFinite(value)) return value;
|
|
291
|
+
if (!hasNumberFormatRoundingOptions(format)) {
|
|
292
|
+
const roundedValue = parseFloat(value.toPrecision(15));
|
|
293
|
+
return Math.abs(roundedValue - value) <= Math.min(Number.EPSILON * Math.max(1, Math.abs(value)), MAX_FLOATING_POINT_CLEANUP_DELTA) ? roundedValue : value;
|
|
294
|
+
}
|
|
295
|
+
const formatter = getFormatter("en-US", {
|
|
296
|
+
...format,
|
|
297
|
+
signDisplay: "auto",
|
|
298
|
+
currencySign: "standard",
|
|
299
|
+
notation: format.notation === "compact" ? "standard" : format.notation,
|
|
300
|
+
useGrouping: false
|
|
301
|
+
});
|
|
302
|
+
const roundedText = formatter.format(value);
|
|
303
|
+
const roundedValue = parseNumber(roundedText, "en-US", format);
|
|
304
|
+
if (roundedValue === null) return value;
|
|
305
|
+
return formatter.format(roundedValue) === roundedText ? roundedValue : value;
|
|
306
|
+
}
|
|
307
|
+
function snapToStep(value, base, step, mode = "directional") {
|
|
308
|
+
const stepSize = Math.abs(step);
|
|
309
|
+
const direction = Math.sign(step);
|
|
310
|
+
const tolerance = stepSize * STEP_EPSILON_FACTOR * direction;
|
|
311
|
+
const rawSteps = value - base + tolerance;
|
|
312
|
+
if (mode === "nearest") return base + Math.round(rawSteps / step) * step;
|
|
313
|
+
return base + (direction > 0 ? Math.floor(rawSteps / stepSize) : Math.ceil(rawSteps / stepSize)) * stepSize;
|
|
314
|
+
}
|
|
315
|
+
function toValidatedNumber(value, { step, minWithDefault, maxWithDefault, minWithZeroDefault, format, snapOnStep, small, clamp: shouldClamp }) {
|
|
316
|
+
if (value === null) return value;
|
|
317
|
+
let nextValue = value;
|
|
318
|
+
if (step != null && snapOnStep && step !== 0) {
|
|
319
|
+
const base = small || minWithDefault === Number.MIN_SAFE_INTEGER ? minWithZeroDefault : minWithDefault;
|
|
320
|
+
nextValue = snapToStep(nextValue, base, step, small ? "nearest" : "directional");
|
|
321
|
+
}
|
|
322
|
+
if (shouldClamp) nextValue = clamp(nextValue, minWithDefault, maxWithDefault);
|
|
323
|
+
if (step == null && !hasNumberFormatRoundingOptions(format)) return nextValue;
|
|
324
|
+
const roundedValue = removeFloatingPointErrors(nextValue, format);
|
|
325
|
+
return shouldClamp ? clamp(roundedValue, minWithDefault, maxWithDefault) : roundedValue;
|
|
326
|
+
}
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/root/NumberFieldRoot.mjs
|
|
329
|
+
/**
|
|
330
|
+
* Groups all parts of the number field and manages its state.
|
|
331
|
+
* Renders a `<div>` element.
|
|
332
|
+
*
|
|
333
|
+
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
334
|
+
*/
|
|
335
|
+
const NumberFieldRoot = /*#__PURE__*/ React$1.forwardRef(function NumberFieldRoot(componentProps, forwardedRef) {
|
|
336
|
+
const { id: idProp, min, max, smallStep = .1, step: stepProp = 1, largeStep = 10, required = false, disabled: disabledProp = false, readOnly = false, form, name: nameProp, defaultValue, value: valueProp, onValueChange: onValueChangeProp, onValueCommitted: onValueCommittedProp, allowWheelScrub = false, snapOnStep = false, allowOutOfRange = false, format, locale, render, className, inputRef: inputRefProp, style, ...elementProps } = componentProps;
|
|
337
|
+
const { setDirty, validityData, disabled: fieldDisabled, setFilled, invalid, name: fieldName, state: fieldState, validation } = useFieldRootContext();
|
|
338
|
+
const { clearErrors } = useFormContext();
|
|
339
|
+
const disabled = fieldDisabled || disabledProp;
|
|
340
|
+
const name = fieldName ?? nameProp;
|
|
341
|
+
const step = stepProp === "any" ? 1 : stepProp;
|
|
342
|
+
const [isScrubbing, setIsScrubbing] = React$1.useState(false);
|
|
343
|
+
const minWithDefault = min ?? Number.MIN_SAFE_INTEGER;
|
|
344
|
+
const maxWithDefault = max ?? Number.MAX_SAFE_INTEGER;
|
|
345
|
+
const minWithZeroDefault = min ?? 0;
|
|
346
|
+
const formatStyle = format?.style;
|
|
347
|
+
const inputRef = React$1.useRef(null);
|
|
348
|
+
const hiddenInputRef = useMergedRefs(inputRefProp, validation.inputRef);
|
|
349
|
+
const id = useLabelableId({ id: idProp });
|
|
350
|
+
const [valueUnwrapped, setValueUnwrapped] = useControlled({
|
|
351
|
+
controlled: valueProp,
|
|
352
|
+
default: defaultValue,
|
|
353
|
+
name: "NumberField",
|
|
354
|
+
state: "value"
|
|
355
|
+
});
|
|
356
|
+
const value = valueUnwrapped ?? null;
|
|
357
|
+
const valueRef = useValueAsRef(value);
|
|
358
|
+
useIsoLayoutEffect(() => {
|
|
359
|
+
setFilled(value !== null);
|
|
360
|
+
}, [setFilled, value]);
|
|
361
|
+
const forceRender = useForcedRerendering();
|
|
362
|
+
const formatOptionsRef = useValueAsRef(format);
|
|
363
|
+
const hasPendingCommitRef = React$1.useRef(false);
|
|
364
|
+
const onValueCommitted = useStableCallback((nextValue, eventDetails) => {
|
|
365
|
+
hasPendingCommitRef.current = false;
|
|
366
|
+
onValueCommittedProp?.(nextValue, eventDetails);
|
|
367
|
+
});
|
|
368
|
+
const allowInputSyncRef = React$1.useRef(true);
|
|
369
|
+
const lastChangedValueRef = React$1.useRef(null);
|
|
370
|
+
const [inputValue, setInputValue] = React$1.useState(() => formatNumber(value, locale, format));
|
|
371
|
+
const [inputMode, setInputMode] = React$1.useState("numeric");
|
|
372
|
+
const getAllowedNonNumericKeys = useStableCallback(() => {
|
|
373
|
+
const { decimal, group, currency, literal } = getNumberLocaleDetails(locale, format);
|
|
374
|
+
const keys = /* @__PURE__ */ new Set();
|
|
375
|
+
BASE_NON_NUMERIC_SYMBOLS.forEach((symbol) => keys.add(symbol));
|
|
376
|
+
if (decimal) keys.add(decimal);
|
|
377
|
+
if (group) {
|
|
378
|
+
keys.add(group);
|
|
379
|
+
if (SPACE_SEPARATOR_RE.test(group)) keys.add(" ");
|
|
380
|
+
}
|
|
381
|
+
const allowPercentSymbols = formatStyle === "percent" || formatStyle === "unit" && format?.unit === "percent";
|
|
382
|
+
const allowPermilleSymbols = formatStyle === "percent" || formatStyle === "unit" && format?.unit === "permille";
|
|
383
|
+
if (allowPercentSymbols) PERCENTAGES.forEach((key) => keys.add(key));
|
|
384
|
+
if (allowPermilleSymbols) PERMILLE.forEach((key) => keys.add(key));
|
|
385
|
+
if (formatStyle === "currency" && currency) keys.add(currency);
|
|
386
|
+
if (literal) {
|
|
387
|
+
Array.from(literal).forEach((char) => keys.add(char));
|
|
388
|
+
if (SPACE_SEPARATOR_RE.test(literal)) keys.add(" ");
|
|
389
|
+
}
|
|
390
|
+
PLUS_SIGNS_WITH_ASCII.forEach((key) => keys.add(key));
|
|
391
|
+
if (minWithDefault < 0 || allowOutOfRange) MINUS_SIGNS_WITH_ASCII.forEach((key) => keys.add(key));
|
|
392
|
+
return keys;
|
|
393
|
+
});
|
|
394
|
+
const getStepAmount = useStableCallback((event) => {
|
|
395
|
+
if (event?.altKey) return smallStep;
|
|
396
|
+
if (event?.shiftKey) return largeStep;
|
|
397
|
+
return step;
|
|
398
|
+
});
|
|
399
|
+
const setValue = useStableCallback((unvalidatedValue, details) => {
|
|
400
|
+
const eventWithOptionalKeyState = details.event;
|
|
401
|
+
const dir = details.direction;
|
|
402
|
+
const isInputReason = details.reason === "input-change" || details.reason === "input-clear" || details.reason === "input-blur" || details.reason === "input-paste" || details.reason === "none";
|
|
403
|
+
const shouldClampValue = !allowOutOfRange || !isInputReason;
|
|
404
|
+
const validatedValue = toValidatedNumber(unvalidatedValue, {
|
|
405
|
+
step: dir ? getStepAmount(eventWithOptionalKeyState) * dir : void 0,
|
|
406
|
+
format: formatOptionsRef.current,
|
|
407
|
+
minWithDefault,
|
|
408
|
+
maxWithDefault,
|
|
409
|
+
minWithZeroDefault,
|
|
410
|
+
snapOnStep,
|
|
411
|
+
small: eventWithOptionalKeyState?.altKey ?? false,
|
|
412
|
+
clamp: shouldClampValue
|
|
413
|
+
});
|
|
414
|
+
const shouldFireChange = validatedValue !== value || isInputReason && (unvalidatedValue !== value || allowInputSyncRef.current === false);
|
|
415
|
+
if (shouldFireChange) {
|
|
416
|
+
onValueChangeProp?.(validatedValue, details);
|
|
417
|
+
if (details.isCanceled) return false;
|
|
418
|
+
setValueUnwrapped(validatedValue);
|
|
419
|
+
setDirty(validatedValue !== validityData.initialValue);
|
|
420
|
+
hasPendingCommitRef.current = true;
|
|
421
|
+
}
|
|
422
|
+
lastChangedValueRef.current = validatedValue;
|
|
423
|
+
if (allowInputSyncRef.current) setInputValue(formatNumber(validatedValue, locale, format));
|
|
424
|
+
forceRender();
|
|
425
|
+
return shouldFireChange;
|
|
426
|
+
});
|
|
427
|
+
const incrementValue = useStableCallback((amount, { direction, currentValue, event, reason }) => {
|
|
428
|
+
const prevValue = currentValue == null ? valueRef.current : currentValue;
|
|
429
|
+
const nativeEvent = event;
|
|
430
|
+
if (typeof prevValue !== "number") return setValue(0, createChangeEventDetails(reason, nativeEvent));
|
|
431
|
+
return setValue(prevValue + amount * direction, createChangeEventDetails(reason, nativeEvent, void 0, { direction }));
|
|
432
|
+
});
|
|
433
|
+
useIsoLayoutEffect(function syncFormattedInputValueOnValueChange() {
|
|
434
|
+
if (!allowInputSyncRef.current) return;
|
|
435
|
+
const nextInputValue = formatNumber(value, locale, format);
|
|
436
|
+
if (nextInputValue !== inputValue) setInputValue(nextInputValue);
|
|
437
|
+
});
|
|
438
|
+
useIsoLayoutEffect(function setDynamicInputModeForIOS() {
|
|
439
|
+
if (!ios) return;
|
|
440
|
+
let computedInputMode = "text";
|
|
441
|
+
if (minWithDefault >= 0) computedInputMode = "decimal";
|
|
442
|
+
setInputMode(computedInputMode);
|
|
443
|
+
}, [minWithDefault]);
|
|
444
|
+
React$1.useEffect(function registerElementWheelListener() {
|
|
445
|
+
const element = inputRef.current;
|
|
446
|
+
if (disabled || readOnly || !allowWheelScrub || !element) return;
|
|
447
|
+
function handleWheel(event) {
|
|
448
|
+
if (event.ctrlKey || activeElement(ownerDocument(inputRef.current)) !== inputRef.current) return;
|
|
449
|
+
event.preventDefault();
|
|
450
|
+
allowInputSyncRef.current = true;
|
|
451
|
+
const amount = getStepAmount(event);
|
|
452
|
+
if (incrementValue(amount, {
|
|
453
|
+
direction: event.deltaY > 0 ? -1 : 1,
|
|
454
|
+
event,
|
|
455
|
+
reason: "wheel"
|
|
456
|
+
})) onValueCommitted(lastChangedValueRef.current ?? valueRef.current, createGenericEventDetails(wheel, event));
|
|
457
|
+
}
|
|
458
|
+
return addEventListener(element, "wheel", handleWheel);
|
|
459
|
+
}, [
|
|
460
|
+
allowWheelScrub,
|
|
461
|
+
incrementValue,
|
|
462
|
+
disabled,
|
|
463
|
+
readOnly,
|
|
464
|
+
getStepAmount,
|
|
465
|
+
onValueCommitted,
|
|
466
|
+
lastChangedValueRef,
|
|
467
|
+
valueRef
|
|
468
|
+
]);
|
|
469
|
+
const state = React$1.useMemo(() => ({
|
|
470
|
+
...fieldState,
|
|
471
|
+
disabled,
|
|
472
|
+
readOnly,
|
|
473
|
+
required,
|
|
474
|
+
value,
|
|
475
|
+
inputValue,
|
|
476
|
+
scrubbing: isScrubbing
|
|
477
|
+
}), [
|
|
478
|
+
fieldState,
|
|
479
|
+
disabled,
|
|
480
|
+
readOnly,
|
|
481
|
+
required,
|
|
482
|
+
value,
|
|
483
|
+
inputValue,
|
|
484
|
+
isScrubbing
|
|
485
|
+
]);
|
|
486
|
+
const contextValue = React$1.useMemo(() => ({
|
|
487
|
+
inputRef,
|
|
488
|
+
inputValue,
|
|
489
|
+
value,
|
|
490
|
+
minWithDefault,
|
|
491
|
+
maxWithDefault,
|
|
492
|
+
disabled,
|
|
493
|
+
readOnly,
|
|
494
|
+
id,
|
|
495
|
+
setValue,
|
|
496
|
+
incrementValue,
|
|
497
|
+
getStepAmount,
|
|
498
|
+
allowInputSyncRef,
|
|
499
|
+
formatOptionsRef,
|
|
500
|
+
valueRef,
|
|
501
|
+
lastChangedValueRef,
|
|
502
|
+
hasPendingCommitRef,
|
|
503
|
+
name,
|
|
504
|
+
nameProp,
|
|
505
|
+
required,
|
|
506
|
+
invalid,
|
|
507
|
+
inputMode,
|
|
508
|
+
getAllowedNonNumericKeys,
|
|
509
|
+
min,
|
|
510
|
+
max,
|
|
511
|
+
setInputValue,
|
|
512
|
+
locale,
|
|
513
|
+
isScrubbing,
|
|
514
|
+
setIsScrubbing,
|
|
515
|
+
state,
|
|
516
|
+
onValueCommitted
|
|
517
|
+
}), [
|
|
518
|
+
inputRef,
|
|
519
|
+
inputValue,
|
|
520
|
+
value,
|
|
521
|
+
minWithDefault,
|
|
522
|
+
maxWithDefault,
|
|
523
|
+
disabled,
|
|
524
|
+
readOnly,
|
|
525
|
+
id,
|
|
526
|
+
setValue,
|
|
527
|
+
incrementValue,
|
|
528
|
+
getStepAmount,
|
|
529
|
+
formatOptionsRef,
|
|
530
|
+
valueRef,
|
|
531
|
+
name,
|
|
532
|
+
nameProp,
|
|
533
|
+
required,
|
|
534
|
+
invalid,
|
|
535
|
+
inputMode,
|
|
536
|
+
getAllowedNonNumericKeys,
|
|
537
|
+
min,
|
|
538
|
+
max,
|
|
539
|
+
setInputValue,
|
|
540
|
+
locale,
|
|
541
|
+
isScrubbing,
|
|
542
|
+
state,
|
|
543
|
+
onValueCommitted
|
|
544
|
+
]);
|
|
545
|
+
const element = useRenderElement("div", componentProps, {
|
|
546
|
+
ref: forwardedRef,
|
|
547
|
+
state,
|
|
548
|
+
props: elementProps,
|
|
549
|
+
stateAttributesMapping
|
|
550
|
+
});
|
|
551
|
+
return /*#__PURE__*/ jsxs(NumberFieldRootContext.Provider, {
|
|
552
|
+
value: contextValue,
|
|
553
|
+
children: [element, /*#__PURE__*/ jsx("input", {
|
|
554
|
+
...validation.getValidationProps(disabled, {
|
|
555
|
+
onFocus() {
|
|
556
|
+
inputRef.current?.focus();
|
|
557
|
+
},
|
|
558
|
+
onChange(event) {
|
|
559
|
+
if (event.nativeEvent.defaultPrevented || disabled || readOnly) return;
|
|
560
|
+
const nextValue = event.currentTarget.valueAsNumber;
|
|
561
|
+
const parsedValue = Number.isNaN(nextValue) ? null : nextValue;
|
|
562
|
+
const details = createChangeEventDetails(none, event.nativeEvent);
|
|
563
|
+
setValue(parsedValue, details);
|
|
564
|
+
clearErrors(name);
|
|
565
|
+
validation.change(lastChangedValueRef.current ?? parsedValue);
|
|
566
|
+
}
|
|
567
|
+
}),
|
|
568
|
+
ref: hiddenInputRef,
|
|
569
|
+
type: "number",
|
|
570
|
+
form,
|
|
571
|
+
name,
|
|
572
|
+
value: value ?? "",
|
|
573
|
+
min,
|
|
574
|
+
max,
|
|
575
|
+
step: stepProp,
|
|
576
|
+
disabled,
|
|
577
|
+
readOnly,
|
|
578
|
+
required,
|
|
579
|
+
"aria-hidden": true,
|
|
580
|
+
tabIndex: -1,
|
|
581
|
+
style: name ? visuallyHiddenInput : visuallyHidden,
|
|
582
|
+
suppressHydrationWarning: true
|
|
583
|
+
})]
|
|
584
|
+
});
|
|
585
|
+
});
|
|
586
|
+
NumberFieldRoot.displayName = "NumberFieldRoot";
|
|
587
|
+
//#endregion
|
|
588
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/group/NumberFieldGroup.mjs
|
|
589
|
+
/**
|
|
590
|
+
* Groups the input with the increment and decrement buttons.
|
|
591
|
+
* Renders a `<div>` element.
|
|
592
|
+
*
|
|
593
|
+
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
594
|
+
*/
|
|
595
|
+
const NumberFieldGroup = /*#__PURE__*/ React$1.forwardRef(function NumberFieldGroup(componentProps, forwardedRef) {
|
|
596
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
597
|
+
const { state } = useNumberFieldRootContext();
|
|
598
|
+
return useRenderElement("div", componentProps, {
|
|
599
|
+
ref: forwardedRef,
|
|
600
|
+
state,
|
|
601
|
+
props: [{ role: "group" }, elementProps],
|
|
602
|
+
stateAttributesMapping
|
|
603
|
+
});
|
|
604
|
+
});
|
|
605
|
+
NumberFieldGroup.displayName = "NumberFieldGroup";
|
|
606
|
+
//#endregion
|
|
607
|
+
//#region ../../node_modules/.pnpm/@base-ui+utils@0.3.1_@types+react@19.2.4_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/utils/useInterval.mjs
|
|
608
|
+
const EMPTY = 0;
|
|
609
|
+
var Interval = class Interval extends Timeout {
|
|
610
|
+
static create() {
|
|
611
|
+
return new Interval();
|
|
612
|
+
}
|
|
613
|
+
/**
|
|
614
|
+
* Executes `fn` at `delay` interval, clearing any previously scheduled call.
|
|
615
|
+
*/
|
|
616
|
+
start(delay, fn) {
|
|
617
|
+
this.clear();
|
|
618
|
+
this.currentId = setInterval(() => {
|
|
619
|
+
fn();
|
|
620
|
+
}, delay);
|
|
621
|
+
}
|
|
622
|
+
clear = () => {
|
|
623
|
+
if (this.currentId !== EMPTY) {
|
|
624
|
+
clearInterval(this.currentId);
|
|
625
|
+
this.currentId = EMPTY;
|
|
626
|
+
}
|
|
627
|
+
};
|
|
628
|
+
};
|
|
629
|
+
/**
|
|
630
|
+
* A `setInterval` with automatic cleanup and guard.
|
|
631
|
+
*/
|
|
632
|
+
function useInterval() {
|
|
633
|
+
const timeout = useRefWithInit(Interval.create).current;
|
|
634
|
+
useOnMount(timeout.disposeEffect);
|
|
635
|
+
return timeout;
|
|
636
|
+
}
|
|
637
|
+
//#endregion
|
|
638
|
+
//#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/internals/usePressAndHold.mjs
|
|
639
|
+
const DEFAULT_TICK_DELAY = 60;
|
|
640
|
+
const DEFAULT_START_DELAY = 400;
|
|
641
|
+
const DEFAULT_SCROLL_DISTANCE = 8;
|
|
642
|
+
const TOUCH_TIMEOUT = 50;
|
|
643
|
+
const MAX_POINTER_MOVES_AFTER_TOUCH = 3;
|
|
644
|
+
function isTouchLikePointerType(pointerType) {
|
|
645
|
+
return pointerType === "touch" || pointerType === "pen";
|
|
646
|
+
}
|
|
647
|
+
/**
|
|
648
|
+
* Adds press-and-hold behavior to a button element.
|
|
649
|
+
* On pointer down, performs one action immediately, then after a delay starts
|
|
650
|
+
* continuous repeated actions at a fixed interval. Handles mouse, touch, and pen
|
|
651
|
+
* inputs correctly, including Android-specific quirks.
|
|
652
|
+
*/
|
|
653
|
+
function usePressAndHold(params) {
|
|
654
|
+
const { disabled, readOnly = false, tick, onStop, tickDelay = DEFAULT_TICK_DELAY, startDelay = DEFAULT_START_DELAY, scrollDistance = DEFAULT_SCROLL_DISTANCE, elementRef } = params;
|
|
655
|
+
const startTickTimeout = useTimeout();
|
|
656
|
+
const tickInterval = useInterval();
|
|
657
|
+
const intentionalTouchCheckTimeout = useTimeout();
|
|
658
|
+
const isPressedRef = React$1.useRef(false);
|
|
659
|
+
const movesAfterTouchRef = React$1.useRef(0);
|
|
660
|
+
const downCoordsRef = React$1.useRef({
|
|
661
|
+
x: 0,
|
|
662
|
+
y: 0
|
|
663
|
+
});
|
|
664
|
+
const isTouchingButtonRef = React$1.useRef(false);
|
|
665
|
+
const ignoreClickRef = React$1.useRef(false);
|
|
666
|
+
const pointerTypeRef = React$1.useRef("");
|
|
667
|
+
const unsubscribeFromGlobalContextMenuRef = React$1.useRef(NOOP);
|
|
668
|
+
const unsubscribeFromGlobalPointerUpRef = React$1.useRef(NOOP);
|
|
669
|
+
const stopAutoChange = useStableCallback(() => {
|
|
670
|
+
intentionalTouchCheckTimeout.clear();
|
|
671
|
+
startTickTimeout.clear();
|
|
672
|
+
tickInterval.clear();
|
|
673
|
+
unsubscribeFromGlobalContextMenuRef.current();
|
|
674
|
+
movesAfterTouchRef.current = 0;
|
|
675
|
+
});
|
|
676
|
+
function startAutoChange(triggerNativeEvent) {
|
|
677
|
+
stopAutoChange();
|
|
678
|
+
const element = elementRef.current;
|
|
679
|
+
if (!element) return;
|
|
680
|
+
const win = getWindow(element);
|
|
681
|
+
function handleContextMenu(event) {
|
|
682
|
+
event.preventDefault();
|
|
683
|
+
}
|
|
684
|
+
unsubscribeFromGlobalContextMenuRef.current = addEventListener(win, "contextmenu", handleContextMenu);
|
|
685
|
+
unsubscribeFromGlobalPointerUpRef.current();
|
|
686
|
+
unsubscribeFromGlobalPointerUpRef.current = addEventListener(win, "pointerup", (event) => {
|
|
687
|
+
isPressedRef.current = false;
|
|
688
|
+
stopAutoChange();
|
|
689
|
+
onStop?.(event);
|
|
690
|
+
}, { once: true });
|
|
691
|
+
if (!tick(triggerNativeEvent)) {
|
|
692
|
+
stopAutoChange();
|
|
693
|
+
return;
|
|
694
|
+
}
|
|
695
|
+
startTickTimeout.start(startDelay, () => {
|
|
696
|
+
tickInterval.start(tickDelay, () => {
|
|
697
|
+
if (!tick(triggerNativeEvent)) stopAutoChange();
|
|
698
|
+
});
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
React$1.useEffect(() => () => {
|
|
702
|
+
stopAutoChange();
|
|
703
|
+
unsubscribeFromGlobalPointerUpRef.current();
|
|
704
|
+
}, [stopAutoChange]);
|
|
705
|
+
return {
|
|
706
|
+
pointerHandlers: {
|
|
707
|
+
onTouchStart() {
|
|
708
|
+
isTouchingButtonRef.current = true;
|
|
709
|
+
},
|
|
710
|
+
onTouchEnd() {
|
|
711
|
+
isTouchingButtonRef.current = false;
|
|
712
|
+
},
|
|
713
|
+
onPointerDown(event) {
|
|
714
|
+
const isMainButton = !event.button || event.button === 0;
|
|
715
|
+
if (event.defaultPrevented || !isMainButton || disabled || readOnly) return;
|
|
716
|
+
pointerTypeRef.current = event.pointerType;
|
|
717
|
+
ignoreClickRef.current = false;
|
|
718
|
+
isPressedRef.current = true;
|
|
719
|
+
downCoordsRef.current = {
|
|
720
|
+
x: event.clientX,
|
|
721
|
+
y: event.clientY
|
|
722
|
+
};
|
|
723
|
+
if (!isTouchLikePointerType(event.pointerType)) {
|
|
724
|
+
event.preventDefault();
|
|
725
|
+
startAutoChange(event.nativeEvent);
|
|
726
|
+
} else intentionalTouchCheckTimeout.start(TOUCH_TIMEOUT, () => {
|
|
727
|
+
const moves = movesAfterTouchRef.current;
|
|
728
|
+
movesAfterTouchRef.current = 0;
|
|
729
|
+
if (isPressedRef.current && moves < MAX_POINTER_MOVES_AFTER_TOUCH) {
|
|
730
|
+
startAutoChange(event.nativeEvent);
|
|
731
|
+
ignoreClickRef.current = true;
|
|
732
|
+
} else {
|
|
733
|
+
ignoreClickRef.current = false;
|
|
734
|
+
stopAutoChange();
|
|
735
|
+
}
|
|
736
|
+
});
|
|
737
|
+
},
|
|
738
|
+
onPointerUp(event) {
|
|
739
|
+
if (isTouchLikePointerType(event.pointerType)) isPressedRef.current = false;
|
|
740
|
+
},
|
|
741
|
+
onPointerMove(event) {
|
|
742
|
+
if (disabled || readOnly || !isTouchLikePointerType(event.pointerType) || !isPressedRef.current) return;
|
|
743
|
+
if (movesAfterTouchRef.current != null) movesAfterTouchRef.current += 1;
|
|
744
|
+
const { x, y } = downCoordsRef.current;
|
|
745
|
+
const dx = x - event.clientX;
|
|
746
|
+
const dy = y - event.clientY;
|
|
747
|
+
if (dx ** 2 + dy ** 2 > scrollDistance ** 2) stopAutoChange();
|
|
748
|
+
},
|
|
749
|
+
onMouseEnter(event) {
|
|
750
|
+
if (event.defaultPrevented || disabled || readOnly || !isPressedRef.current || isTouchingButtonRef.current || isTouchLikePointerType(pointerTypeRef.current)) return;
|
|
751
|
+
startAutoChange(event.nativeEvent);
|
|
752
|
+
},
|
|
753
|
+
onMouseLeave() {
|
|
754
|
+
if (isTouchingButtonRef.current) return;
|
|
755
|
+
stopAutoChange();
|
|
756
|
+
},
|
|
757
|
+
onMouseUp() {
|
|
758
|
+
if (isTouchingButtonRef.current) return;
|
|
759
|
+
stopAutoChange();
|
|
760
|
+
}
|
|
761
|
+
},
|
|
762
|
+
shouldSkipClick: useStableCallback((event) => {
|
|
763
|
+
if (event.defaultPrevented) return true;
|
|
764
|
+
if (isTouchLikePointerType(pointerTypeRef.current)) return ignoreClickRef.current;
|
|
765
|
+
return event.detail !== 0;
|
|
766
|
+
})
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
//#endregion
|
|
770
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/root/useNumberFieldButton.mjs
|
|
771
|
+
const SELECT_NONE_STYLE = {
|
|
772
|
+
WebkitUserSelect: "none",
|
|
773
|
+
userSelect: "none"
|
|
774
|
+
};
|
|
775
|
+
function useNumberFieldButton(params) {
|
|
776
|
+
const { allowInputSyncRef, disabled, formatOptionsRef, getStepAmount, id, incrementValue, inputRef, inputValue, isIncrement, locale, readOnly, setValue, valueRef, lastChangedValueRef, onValueCommitted } = params;
|
|
777
|
+
const pressReason = isIncrement ? incrementPress : decrementPress;
|
|
778
|
+
function commitValue(nativeEvent) {
|
|
779
|
+
const shouldCommitInputValue = !allowInputSyncRef.current;
|
|
780
|
+
allowInputSyncRef.current = true;
|
|
781
|
+
if (!shouldCommitInputValue) {
|
|
782
|
+
lastChangedValueRef.current = valueRef.current;
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
const parsedValue = parseNumber(inputValue, locale, formatOptionsRef.current);
|
|
786
|
+
if (parsedValue !== null) {
|
|
787
|
+
const details = createChangeEventDetails(pressReason, nativeEvent);
|
|
788
|
+
setValue(parsedValue, details);
|
|
789
|
+
if (!details.isCanceled) valueRef.current = parsedValue;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
const { pointerHandlers, shouldSkipClick } = usePressAndHold({
|
|
793
|
+
disabled: disabled || readOnly,
|
|
794
|
+
elementRef: inputRef,
|
|
795
|
+
tickDelay: 60,
|
|
796
|
+
startDelay: 400,
|
|
797
|
+
scrollDistance: 8,
|
|
798
|
+
tick(triggerEvent) {
|
|
799
|
+
const amount = getStepAmount(triggerEvent);
|
|
800
|
+
return incrementValue(amount, {
|
|
801
|
+
direction: isIncrement ? 1 : -1,
|
|
802
|
+
event: triggerEvent,
|
|
803
|
+
reason: pressReason
|
|
804
|
+
});
|
|
805
|
+
},
|
|
806
|
+
onStop(nativeEvent) {
|
|
807
|
+
const committed = lastChangedValueRef.current ?? valueRef.current;
|
|
808
|
+
onValueCommitted(committed, createGenericEventDetails(pressReason, nativeEvent));
|
|
809
|
+
}
|
|
810
|
+
});
|
|
811
|
+
return {
|
|
812
|
+
disabled,
|
|
813
|
+
"aria-label": isIncrement ? "Increase" : "Decrease",
|
|
814
|
+
"aria-controls": id,
|
|
815
|
+
tabIndex: -1,
|
|
816
|
+
style: SELECT_NONE_STYLE,
|
|
817
|
+
...pointerHandlers,
|
|
818
|
+
onClick(event) {
|
|
819
|
+
const isDisabled = disabled || readOnly;
|
|
820
|
+
if (event.defaultPrevented || isDisabled || shouldSkipClick(event)) return;
|
|
821
|
+
commitValue(event.nativeEvent);
|
|
822
|
+
const amount = getStepAmount(event);
|
|
823
|
+
const prev = valueRef.current;
|
|
824
|
+
incrementValue(amount, {
|
|
825
|
+
direction: isIncrement ? 1 : -1,
|
|
826
|
+
event: event.nativeEvent,
|
|
827
|
+
reason: pressReason
|
|
828
|
+
});
|
|
829
|
+
const committed = lastChangedValueRef.current ?? valueRef.current;
|
|
830
|
+
if (committed !== prev) onValueCommitted(committed, createGenericEventDetails(pressReason, event.nativeEvent));
|
|
831
|
+
},
|
|
832
|
+
onPointerDown(event) {
|
|
833
|
+
const isMainButton = !event.button || event.button === 0;
|
|
834
|
+
if (event.defaultPrevented || readOnly || !isMainButton || disabled) return;
|
|
835
|
+
commitValue(event.nativeEvent);
|
|
836
|
+
lastChangedValueRef.current = null;
|
|
837
|
+
if (!isTouchLikePointerType(event.pointerType)) inputRef.current?.focus();
|
|
838
|
+
pointerHandlers.onPointerDown(event);
|
|
839
|
+
}
|
|
840
|
+
};
|
|
841
|
+
}
|
|
842
|
+
//#endregion
|
|
843
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/root/useNumberFieldStepperButton.mjs
|
|
844
|
+
/**
|
|
845
|
+
* Shared implementation for the increment and decrement stepper buttons. They differ only in the
|
|
846
|
+
* direction they step and the boundary (`max` vs `min`) at which they become disabled.
|
|
847
|
+
*/
|
|
848
|
+
function useNumberFieldStepperButton(componentProps, forwardedRef, isIncrement) {
|
|
849
|
+
const { render, className, disabled: disabledProp = false, nativeButton = true, style, ...elementProps } = componentProps;
|
|
850
|
+
const { allowInputSyncRef, disabled: contextDisabled, formatOptionsRef, getStepAmount, id, incrementValue, inputRef, inputValue, maxWithDefault, minWithDefault, readOnly, setValue, state, value, valueRef, locale, lastChangedValueRef, onValueCommitted } = useNumberFieldRootContext();
|
|
851
|
+
const disabled = disabledProp || contextDisabled || value != null && (isIncrement ? value >= maxWithDefault : value <= minWithDefault);
|
|
852
|
+
const props = useNumberFieldButton({
|
|
853
|
+
isIncrement,
|
|
854
|
+
inputRef,
|
|
855
|
+
inputValue,
|
|
856
|
+
disabled,
|
|
857
|
+
readOnly,
|
|
858
|
+
id,
|
|
859
|
+
setValue,
|
|
860
|
+
getStepAmount,
|
|
861
|
+
incrementValue,
|
|
862
|
+
allowInputSyncRef,
|
|
863
|
+
formatOptionsRef,
|
|
864
|
+
valueRef,
|
|
865
|
+
locale,
|
|
866
|
+
lastChangedValueRef,
|
|
867
|
+
onValueCommitted
|
|
868
|
+
});
|
|
869
|
+
const { getButtonProps, buttonRef } = useButton({
|
|
870
|
+
disabled: disabled || readOnly,
|
|
871
|
+
native: nativeButton,
|
|
872
|
+
focusableWhenDisabled: true
|
|
873
|
+
});
|
|
874
|
+
const buttonState = {
|
|
875
|
+
...state,
|
|
876
|
+
disabled
|
|
877
|
+
};
|
|
878
|
+
return useRenderElement("button", componentProps, {
|
|
879
|
+
ref: [forwardedRef, buttonRef],
|
|
880
|
+
state: buttonState,
|
|
881
|
+
props: [
|
|
882
|
+
props,
|
|
883
|
+
elementProps,
|
|
884
|
+
getButtonProps
|
|
885
|
+
],
|
|
886
|
+
stateAttributesMapping
|
|
887
|
+
});
|
|
888
|
+
}
|
|
889
|
+
//#endregion
|
|
890
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/increment/NumberFieldIncrement.mjs
|
|
891
|
+
/**
|
|
892
|
+
* A stepper button that increases the field value when clicked.
|
|
893
|
+
* Renders a `<button>` element.
|
|
894
|
+
*
|
|
895
|
+
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
896
|
+
*/
|
|
897
|
+
const NumberFieldIncrement = /*#__PURE__*/ React$1.forwardRef(function NumberFieldIncrement(componentProps, forwardedRef) {
|
|
898
|
+
return useNumberFieldStepperButton(componentProps, forwardedRef, true);
|
|
899
|
+
});
|
|
900
|
+
NumberFieldIncrement.displayName = "NumberFieldIncrement";
|
|
901
|
+
//#endregion
|
|
902
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/decrement/NumberFieldDecrement.mjs
|
|
903
|
+
/**
|
|
904
|
+
* A stepper button that decreases the field value when clicked.
|
|
905
|
+
* Renders a `<button>` element.
|
|
906
|
+
*
|
|
907
|
+
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
908
|
+
*/
|
|
909
|
+
const NumberFieldDecrement = /*#__PURE__*/ React$1.forwardRef(function NumberFieldDecrement(componentProps, forwardedRef) {
|
|
910
|
+
return useNumberFieldStepperButton(componentProps, forwardedRef, false);
|
|
911
|
+
});
|
|
912
|
+
NumberFieldDecrement.displayName = "NumberFieldDecrement";
|
|
913
|
+
//#endregion
|
|
914
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/input/NumberFieldInput.mjs
|
|
915
|
+
const NAVIGATE_KEYS = /* @__PURE__ */ new Set([
|
|
916
|
+
"Backspace",
|
|
917
|
+
"Delete",
|
|
918
|
+
"ArrowLeft",
|
|
919
|
+
"ArrowRight",
|
|
920
|
+
"Tab",
|
|
921
|
+
"Enter",
|
|
922
|
+
"Escape"
|
|
923
|
+
]);
|
|
924
|
+
/**
|
|
925
|
+
* The native input control in the number field.
|
|
926
|
+
* Renders an `<input>` element.
|
|
927
|
+
*
|
|
928
|
+
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
929
|
+
*/
|
|
930
|
+
const NumberFieldInput = /*#__PURE__*/ React$1.forwardRef(function NumberFieldInput(componentProps, forwardedRef) {
|
|
931
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
932
|
+
const { allowInputSyncRef, disabled, formatOptionsRef, getAllowedNonNumericKeys, getStepAmount, id, incrementValue, inputMode, inputValue, max, min, name, nameProp, readOnly, required, setValue, state, setInputValue, locale, inputRef, value, onValueCommitted, lastChangedValueRef, hasPendingCommitRef, valueRef } = useNumberFieldRootContext();
|
|
933
|
+
const { clearErrors } = useFormContext();
|
|
934
|
+
const { validationMode, setTouched, setFocused, invalid, shouldValidateOnChange, validation } = useFieldRootContext();
|
|
935
|
+
const { labelId } = useLabelableContext();
|
|
936
|
+
const hasTouchedInputRef = React$1.useRef(false);
|
|
937
|
+
const blockRevalidationRef = React$1.useRef(false);
|
|
938
|
+
const pendingCaretRef = React$1.useRef(null);
|
|
939
|
+
useRegisterFieldControl(inputRef, id, value, void 0, !disabled, nameProp);
|
|
940
|
+
useIsoLayoutEffect(() => {
|
|
941
|
+
if (pendingCaretRef.current != null) {
|
|
942
|
+
const caret = pendingCaretRef.current;
|
|
943
|
+
pendingCaretRef.current = null;
|
|
944
|
+
inputRef.current?.setSelectionRange(caret, caret);
|
|
945
|
+
}
|
|
946
|
+
});
|
|
947
|
+
useValueChanged(value, () => {
|
|
948
|
+
clearErrors(name);
|
|
949
|
+
if (blockRevalidationRef.current && !shouldValidateOnChange()) {
|
|
950
|
+
blockRevalidationRef.current = false;
|
|
951
|
+
return;
|
|
952
|
+
}
|
|
953
|
+
validation.change(value);
|
|
954
|
+
});
|
|
955
|
+
return useRenderElement("input", componentProps, {
|
|
956
|
+
ref: [forwardedRef, inputRef],
|
|
957
|
+
state,
|
|
958
|
+
props: [
|
|
959
|
+
{
|
|
960
|
+
id,
|
|
961
|
+
required,
|
|
962
|
+
disabled,
|
|
963
|
+
readOnly,
|
|
964
|
+
inputMode,
|
|
965
|
+
value: inputValue,
|
|
966
|
+
type: "text",
|
|
967
|
+
autoComplete: "off",
|
|
968
|
+
autoCorrect: "off",
|
|
969
|
+
spellCheck: "false",
|
|
970
|
+
"aria-roledescription": "Number field",
|
|
971
|
+
"aria-invalid": !disabled && invalid ? true : void 0,
|
|
972
|
+
"aria-labelledby": labelId,
|
|
973
|
+
suppressHydrationWarning: true,
|
|
974
|
+
onFocus(event) {
|
|
975
|
+
if (event.defaultPrevented || disabled) return;
|
|
976
|
+
setFocused(true);
|
|
977
|
+
if (hasTouchedInputRef.current) return;
|
|
978
|
+
hasTouchedInputRef.current = true;
|
|
979
|
+
const target = event.currentTarget;
|
|
980
|
+
const length = target.value.length;
|
|
981
|
+
target.setSelectionRange(length, length);
|
|
982
|
+
},
|
|
983
|
+
onBlur(event) {
|
|
984
|
+
if (event.defaultPrevented || disabled) return;
|
|
985
|
+
setTouched(true);
|
|
986
|
+
setFocused(false);
|
|
987
|
+
if (readOnly) return;
|
|
988
|
+
const hadManualInput = !allowInputSyncRef.current;
|
|
989
|
+
const hadPendingProgrammaticChange = hasPendingCommitRef.current;
|
|
990
|
+
allowInputSyncRef.current = true;
|
|
991
|
+
if (inputValue.trim() === "") {
|
|
992
|
+
const clearDetails = createChangeEventDetails(inputClear, event.nativeEvent);
|
|
993
|
+
setValue(null, clearDetails);
|
|
994
|
+
if (clearDetails.isCanceled) return;
|
|
995
|
+
if (validationMode === "onBlur") validation.commit(null);
|
|
996
|
+
if (hadManualInput || hadPendingProgrammaticChange || value !== null) onValueCommitted(null, createGenericEventDetails(inputClear, event.nativeEvent));
|
|
997
|
+
return;
|
|
998
|
+
}
|
|
999
|
+
const formatOptions = formatOptionsRef.current;
|
|
1000
|
+
const parsedValue = parseNumber(inputValue, locale, formatOptions);
|
|
1001
|
+
if (parsedValue === null) return;
|
|
1002
|
+
const hasRoundingOptions = hasNumberFormatRoundingOptions(formatOptions);
|
|
1003
|
+
let committed;
|
|
1004
|
+
if (!hadManualInput && !hasRoundingOptions) committed = value;
|
|
1005
|
+
else if (hasRoundingOptions) committed = removeFloatingPointErrors(parsedValue, formatOptions);
|
|
1006
|
+
else committed = parsedValue;
|
|
1007
|
+
const nextEventDetails = createGenericEventDetails(inputBlur, event.nativeEvent);
|
|
1008
|
+
const shouldUpdateValue = value !== committed;
|
|
1009
|
+
const shouldCommit = hadManualInput || shouldUpdateValue || hadPendingProgrammaticChange;
|
|
1010
|
+
let committedValue = committed;
|
|
1011
|
+
if (shouldUpdateValue) {
|
|
1012
|
+
const changeDetails = createChangeEventDetails(inputBlur, event.nativeEvent);
|
|
1013
|
+
blockRevalidationRef.current = true;
|
|
1014
|
+
setValue(committed, changeDetails);
|
|
1015
|
+
if (changeDetails.isCanceled) {
|
|
1016
|
+
blockRevalidationRef.current = false;
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
1019
|
+
committedValue = lastChangedValueRef.current ?? committed;
|
|
1020
|
+
if (committedValue === value) blockRevalidationRef.current = false;
|
|
1021
|
+
}
|
|
1022
|
+
if (validationMode === "onBlur") validation.commit(committedValue);
|
|
1023
|
+
if (shouldCommit) onValueCommitted(committedValue, nextEventDetails);
|
|
1024
|
+
const canonicalText = formatNumber(committedValue, locale, formatOptions);
|
|
1025
|
+
if (inputValue !== canonicalText) setInputValue(canonicalText);
|
|
1026
|
+
},
|
|
1027
|
+
onChange(event) {
|
|
1028
|
+
if (event.nativeEvent.defaultPrevented) return;
|
|
1029
|
+
allowInputSyncRef.current = false;
|
|
1030
|
+
const targetValue = event.currentTarget.value;
|
|
1031
|
+
if (targetValue.trim() === "") {
|
|
1032
|
+
setInputValue(targetValue);
|
|
1033
|
+
setValue(null, createChangeEventDetails(inputClear, event.nativeEvent));
|
|
1034
|
+
return;
|
|
1035
|
+
}
|
|
1036
|
+
const allowedNonNumericKeys = getAllowedNonNumericKeys();
|
|
1037
|
+
if (!Array.from(targetValue).every((ch) => isNumeralChar(ch) || ANY_MINUS_DETECT_RE.test(ch) || allowedNonNumericKeys.has(ch))) return;
|
|
1038
|
+
const parsedValue = parseNumber(targetValue, locale, formatOptionsRef.current);
|
|
1039
|
+
setInputValue(targetValue);
|
|
1040
|
+
if (parsedValue !== null) setValue(parsedValue, createChangeEventDetails(inputChange, event.nativeEvent));
|
|
1041
|
+
},
|
|
1042
|
+
onKeyDown(event) {
|
|
1043
|
+
if (event.defaultPrevented || readOnly || disabled) return;
|
|
1044
|
+
const nativeEvent = event.nativeEvent;
|
|
1045
|
+
const hadManualInput = !allowInputSyncRef.current;
|
|
1046
|
+
const allowedNonNumericKeys = getAllowedNonNumericKeys();
|
|
1047
|
+
let isAllowedNonNumericKey = allowedNonNumericKeys.has(event.key);
|
|
1048
|
+
const { decimal, currency, percentSign } = getNumberLocaleDetails(locale, formatOptionsRef.current);
|
|
1049
|
+
const selectionStart = event.currentTarget.selectionStart;
|
|
1050
|
+
const selectionEnd = event.currentTarget.selectionEnd;
|
|
1051
|
+
const isAllSelected = selectionStart === 0 && selectionEnd === inputValue.length;
|
|
1052
|
+
const selectionContainsIndex = (index) => selectionStart != null && selectionEnd != null && index >= selectionStart && index < selectionEnd;
|
|
1053
|
+
[[ANY_MINUS_DETECT_RE, ANY_MINUS_RE], [ANY_PLUS_DETECT_RE, ANY_PLUS_RE]].forEach(([detectRe, globalRe]) => {
|
|
1054
|
+
if (detectRe.test(event.key) && Array.from(allowedNonNumericKeys).some((k) => detectRe.test(k))) {
|
|
1055
|
+
const existingIndex = inputValue.search(globalRe);
|
|
1056
|
+
const isReplacingExisting = existingIndex !== -1 && selectionContainsIndex(existingIndex);
|
|
1057
|
+
isAllowedNonNumericKey = !(ANY_MINUS_DETECT_RE.test(inputValue) || ANY_PLUS_DETECT_RE.test(inputValue)) || isAllSelected || isReplacingExisting;
|
|
1058
|
+
}
|
|
1059
|
+
});
|
|
1060
|
+
[
|
|
1061
|
+
decimal,
|
|
1062
|
+
currency,
|
|
1063
|
+
percentSign
|
|
1064
|
+
].forEach((symbol) => {
|
|
1065
|
+
if (event.key === symbol) {
|
|
1066
|
+
const symbolIndex = inputValue.indexOf(symbol);
|
|
1067
|
+
const isSymbolHighlighted = selectionContainsIndex(symbolIndex);
|
|
1068
|
+
isAllowedNonNumericKey = !inputValue.includes(symbol) || isAllSelected || isSymbolHighlighted;
|
|
1069
|
+
}
|
|
1070
|
+
});
|
|
1071
|
+
const isNavigateKey = NAVIGATE_KEYS.has(event.key);
|
|
1072
|
+
const isStepKey = event.key === "ArrowUp" || event.key === "ArrowDown";
|
|
1073
|
+
if (event.which === 229 || event.altKey && !isStepKey || event.ctrlKey || event.metaKey || isAllowedNonNumericKey || isNumeralChar(event.key) || isNavigateKey) return;
|
|
1074
|
+
const willSetHome = event.key === "Home" && min != null;
|
|
1075
|
+
const willSetEnd = event.key === "End" && max != null;
|
|
1076
|
+
if (event.key.length > 1 && !isStepKey && !willSetHome && !willSetEnd) return;
|
|
1077
|
+
const currentValue = hadManualInput ? parseNumber(inputValue, locale, formatOptionsRef.current) : null;
|
|
1078
|
+
const amount = getStepAmount(event);
|
|
1079
|
+
stopEvent(event);
|
|
1080
|
+
const commitDetails = createGenericEventDetails(keyboard, nativeEvent);
|
|
1081
|
+
let changed = false;
|
|
1082
|
+
if (event.key === "ArrowUp" || event.key === "ArrowDown") {
|
|
1083
|
+
allowInputSyncRef.current = true;
|
|
1084
|
+
if (!hadManualInput) lastChangedValueRef.current = valueRef.current;
|
|
1085
|
+
changed = incrementValue(amount, {
|
|
1086
|
+
direction: event.key === "ArrowUp" ? 1 : -1,
|
|
1087
|
+
currentValue,
|
|
1088
|
+
event: nativeEvent,
|
|
1089
|
+
reason: keyboard
|
|
1090
|
+
});
|
|
1091
|
+
} else if (willSetHome) {
|
|
1092
|
+
allowInputSyncRef.current = true;
|
|
1093
|
+
changed = setValue(min, createChangeEventDetails(keyboard, nativeEvent));
|
|
1094
|
+
} else if (willSetEnd) {
|
|
1095
|
+
allowInputSyncRef.current = true;
|
|
1096
|
+
changed = setValue(max, createChangeEventDetails(keyboard, nativeEvent));
|
|
1097
|
+
}
|
|
1098
|
+
if (changed) onValueCommitted(lastChangedValueRef.current ?? valueRef.current, commitDetails);
|
|
1099
|
+
},
|
|
1100
|
+
onPaste(event) {
|
|
1101
|
+
if (event.defaultPrevented || readOnly || disabled) return;
|
|
1102
|
+
let pastedData = "";
|
|
1103
|
+
try {
|
|
1104
|
+
pastedData = event.clipboardData?.getData("text/plain") ?? "";
|
|
1105
|
+
} catch {
|
|
1106
|
+
warn("<NumberField.Input> could not read clipboard text during paste handling.", SafeReact.captureOwnerStack?.() || "");
|
|
1107
|
+
return;
|
|
1108
|
+
}
|
|
1109
|
+
event.preventDefault();
|
|
1110
|
+
const input = event.currentTarget;
|
|
1111
|
+
const selectionStart = input.selectionStart ?? inputValue.length;
|
|
1112
|
+
const selectionEnd = input.selectionEnd ?? inputValue.length;
|
|
1113
|
+
const nextText = inputValue.slice(0, selectionStart) + pastedData + inputValue.slice(selectionEnd);
|
|
1114
|
+
const parsedValue = parseNumber(nextText, locale, formatOptionsRef.current);
|
|
1115
|
+
if (parsedValue !== null) {
|
|
1116
|
+
allowInputSyncRef.current = false;
|
|
1117
|
+
pendingCaretRef.current = selectionStart + pastedData.length;
|
|
1118
|
+
setValue(parsedValue, createChangeEventDetails(inputPaste, event.nativeEvent));
|
|
1119
|
+
setInputValue(nextText);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
},
|
|
1123
|
+
elementProps,
|
|
1124
|
+
(props) => validation.getValidationProps(disabled, props)
|
|
1125
|
+
],
|
|
1126
|
+
stateAttributesMapping
|
|
1127
|
+
});
|
|
1128
|
+
});
|
|
1129
|
+
NumberFieldInput.displayName = "NumberFieldInput";
|
|
1130
|
+
//#endregion
|
|
1131
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/scrub-area/NumberFieldScrubAreaContext.mjs
|
|
1132
|
+
const NumberFieldScrubAreaContext = /*#__PURE__*/ React$1.createContext(void 0);
|
|
1133
|
+
NumberFieldScrubAreaContext.displayName = "NumberFieldScrubAreaContext";
|
|
1134
|
+
function useNumberFieldScrubAreaContext() {
|
|
1135
|
+
const context = React$1.useContext(NumberFieldScrubAreaContext);
|
|
1136
|
+
if (context === void 0) throw new Error("Base UI: NumberFieldScrubAreaContext is missing. NumberFieldScrubArea parts must be placed within <NumberField.ScrubArea>.");
|
|
1137
|
+
return context;
|
|
1138
|
+
}
|
|
1139
|
+
//#endregion
|
|
1140
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/utils/getViewportRect.mjs
|
|
1141
|
+
function getViewportRect(teleportDistance, scrubAreaEl) {
|
|
1142
|
+
const win = getWindow(scrubAreaEl);
|
|
1143
|
+
if (teleportDistance != null) {
|
|
1144
|
+
const rect = scrubAreaEl.getBoundingClientRect();
|
|
1145
|
+
return {
|
|
1146
|
+
left: rect.left - teleportDistance / 2,
|
|
1147
|
+
top: rect.top - teleportDistance / 2,
|
|
1148
|
+
right: rect.right + teleportDistance / 2,
|
|
1149
|
+
bottom: rect.bottom + teleportDistance / 2
|
|
1150
|
+
};
|
|
1151
|
+
}
|
|
1152
|
+
const vV = win.visualViewport;
|
|
1153
|
+
if (vV) return {
|
|
1154
|
+
left: vV.offsetLeft,
|
|
1155
|
+
top: vV.offsetTop,
|
|
1156
|
+
right: vV.offsetLeft + vV.width,
|
|
1157
|
+
bottom: vV.offsetTop + vV.height
|
|
1158
|
+
};
|
|
1159
|
+
return {
|
|
1160
|
+
left: 0,
|
|
1161
|
+
top: 0,
|
|
1162
|
+
right: win.document.documentElement.clientWidth,
|
|
1163
|
+
bottom: win.document.documentElement.clientHeight
|
|
1164
|
+
};
|
|
1165
|
+
}
|
|
1166
|
+
//#endregion
|
|
1167
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/utils/subscribeToVisualViewportResize.mjs
|
|
1168
|
+
function subscribeToVisualViewportResize(element, visualScaleRef) {
|
|
1169
|
+
const vV = getWindow(element).visualViewport;
|
|
1170
|
+
if (!vV) return () => {};
|
|
1171
|
+
function handleVisualResize() {
|
|
1172
|
+
if (vV) visualScaleRef.current = vV.scale;
|
|
1173
|
+
}
|
|
1174
|
+
handleVisualResize();
|
|
1175
|
+
return addEventListener(vV, "resize", handleVisualResize);
|
|
1176
|
+
}
|
|
1177
|
+
//#endregion
|
|
1178
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/scrub-area/NumberFieldScrubArea.mjs
|
|
1179
|
+
const SCRUB_AREA_STYLE = {
|
|
1180
|
+
touchAction: "none",
|
|
1181
|
+
WebkitUserSelect: "none",
|
|
1182
|
+
userSelect: "none"
|
|
1183
|
+
};
|
|
1184
|
+
/**
|
|
1185
|
+
* An interactive area where the user can click and drag to change the field value.
|
|
1186
|
+
* Renders a `<span>` element.
|
|
1187
|
+
*
|
|
1188
|
+
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
1189
|
+
*/
|
|
1190
|
+
const NumberFieldScrubArea = /*#__PURE__*/ React$1.forwardRef(function NumberFieldScrubArea(componentProps, forwardedRef) {
|
|
1191
|
+
const { render, className, direction = "horizontal", pixelSensitivity = 2, teleportDistance, style, ...elementProps } = componentProps;
|
|
1192
|
+
const { state, setIsScrubbing: setRootScrubbing, disabled, readOnly, inputRef, incrementValue, allowInputSyncRef, getStepAmount, onValueCommitted, lastChangedValueRef, valueRef } = useNumberFieldRootContext();
|
|
1193
|
+
const scrubAreaRef = React$1.useRef(null);
|
|
1194
|
+
const isScrubbingRef = React$1.useRef(false);
|
|
1195
|
+
const didMoveRef = React$1.useRef(false);
|
|
1196
|
+
const pointerDownTargetRef = React$1.useRef(null);
|
|
1197
|
+
const scrubAreaCursorRef = React$1.useRef(null);
|
|
1198
|
+
const virtualCursorCoords = React$1.useRef({
|
|
1199
|
+
x: 0,
|
|
1200
|
+
y: 0
|
|
1201
|
+
});
|
|
1202
|
+
const visualScaleRef = React$1.useRef(1);
|
|
1203
|
+
const exitPointerLockTimeout = useTimeout();
|
|
1204
|
+
const [isTouchInput, setIsTouchInput] = React$1.useState(false);
|
|
1205
|
+
const [isPointerLockDenied, setIsPointerLockDenied] = React$1.useState(false);
|
|
1206
|
+
const [isScrubbing, setIsScrubbing] = React$1.useState(false);
|
|
1207
|
+
React$1.useEffect(() => {
|
|
1208
|
+
if (!isScrubbing || !scrubAreaCursorRef.current) return;
|
|
1209
|
+
return subscribeToVisualViewportResize(scrubAreaCursorRef.current, visualScaleRef);
|
|
1210
|
+
}, [isScrubbing]);
|
|
1211
|
+
function updateCursorTransform(x, y) {
|
|
1212
|
+
if (scrubAreaCursorRef.current) scrubAreaCursorRef.current.style.transform = `translate3d(${x}px,${y}px,0) scale(${1 / visualScaleRef.current})`;
|
|
1213
|
+
}
|
|
1214
|
+
const onScrub = useStableCallback(({ movementX, movementY }) => {
|
|
1215
|
+
const virtualCursor = scrubAreaCursorRef.current;
|
|
1216
|
+
const scrubAreaEl = scrubAreaRef.current;
|
|
1217
|
+
if (!virtualCursor || !scrubAreaEl) return;
|
|
1218
|
+
const rect = getViewportRect(teleportDistance, scrubAreaEl);
|
|
1219
|
+
const coords = virtualCursorCoords.current;
|
|
1220
|
+
const newCoords = {
|
|
1221
|
+
x: Math.round(coords.x + movementX),
|
|
1222
|
+
y: Math.round(coords.y + movementY)
|
|
1223
|
+
};
|
|
1224
|
+
const cursorWidth = virtualCursor.offsetWidth;
|
|
1225
|
+
const cursorHeight = virtualCursor.offsetHeight;
|
|
1226
|
+
if (newCoords.x + cursorWidth / 2 < rect.left) newCoords.x = rect.right - cursorWidth / 2;
|
|
1227
|
+
else if (newCoords.x + cursorWidth / 2 > rect.right) newCoords.x = rect.left - cursorWidth / 2;
|
|
1228
|
+
if (newCoords.y + cursorHeight / 2 < rect.top) newCoords.y = rect.bottom - cursorHeight / 2;
|
|
1229
|
+
else if (newCoords.y + cursorHeight / 2 > rect.bottom) newCoords.y = rect.top - cursorHeight / 2;
|
|
1230
|
+
virtualCursorCoords.current = newCoords;
|
|
1231
|
+
updateCursorTransform(newCoords.x, newCoords.y);
|
|
1232
|
+
});
|
|
1233
|
+
const onScrubbingChange = useStableCallback((scrubbingValue, { clientX, clientY }) => {
|
|
1234
|
+
ReactDOM.flushSync(() => {
|
|
1235
|
+
setIsScrubbing(scrubbingValue);
|
|
1236
|
+
setRootScrubbing(scrubbingValue);
|
|
1237
|
+
});
|
|
1238
|
+
const virtualCursor = scrubAreaCursorRef.current;
|
|
1239
|
+
if (!virtualCursor || !scrubbingValue) return;
|
|
1240
|
+
const initialCoords = {
|
|
1241
|
+
x: clientX - virtualCursor.offsetWidth / 2,
|
|
1242
|
+
y: clientY - virtualCursor.offsetHeight / 2
|
|
1243
|
+
};
|
|
1244
|
+
virtualCursorCoords.current = initialCoords;
|
|
1245
|
+
updateCursorTransform(initialCoords.x, initialCoords.y);
|
|
1246
|
+
});
|
|
1247
|
+
React$1.useEffect(function registerGlobalScrubbingEventListeners() {
|
|
1248
|
+
if (!inputRef.current || disabled || readOnly || !isScrubbing) return;
|
|
1249
|
+
let cumulativeDelta = 0;
|
|
1250
|
+
function handleScrubPointerUp(event) {
|
|
1251
|
+
function handler() {
|
|
1252
|
+
try {
|
|
1253
|
+
ownerDocument(scrubAreaRef.current).exitPointerLock();
|
|
1254
|
+
} catch {} finally {
|
|
1255
|
+
isScrubbingRef.current = false;
|
|
1256
|
+
onScrubbingChange(false, event);
|
|
1257
|
+
onValueCommitted(lastChangedValueRef.current ?? valueRef.current, createGenericEventDetails(scrub, event));
|
|
1258
|
+
const pointerDownTarget = pointerDownTargetRef.current;
|
|
1259
|
+
const input = inputRef.current;
|
|
1260
|
+
if (!didMoveRef.current && pointerDownTarget != null && input) pointerDownTarget.dispatchEvent(new (getWindow(input)).MouseEvent("click", {
|
|
1261
|
+
bubbles: true,
|
|
1262
|
+
cancelable: true
|
|
1263
|
+
}));
|
|
1264
|
+
didMoveRef.current = false;
|
|
1265
|
+
pointerDownTargetRef.current = null;
|
|
1266
|
+
}
|
|
1267
|
+
}
|
|
1268
|
+
if (gecko) exitPointerLockTimeout.start(20, handler);
|
|
1269
|
+
else handler();
|
|
1270
|
+
}
|
|
1271
|
+
function handleScrubPointerMove(event) {
|
|
1272
|
+
if (!isScrubbingRef.current) return;
|
|
1273
|
+
event.preventDefault();
|
|
1274
|
+
onScrub(event);
|
|
1275
|
+
const { movementX, movementY } = event;
|
|
1276
|
+
cumulativeDelta += direction === "vertical" ? movementY : movementX;
|
|
1277
|
+
if (Math.abs(cumulativeDelta) >= pixelSensitivity) {
|
|
1278
|
+
cumulativeDelta = 0;
|
|
1279
|
+
didMoveRef.current = true;
|
|
1280
|
+
const rawAmount = (direction === "vertical" ? -movementY : movementX) * getStepAmount(event);
|
|
1281
|
+
if (rawAmount !== 0) {
|
|
1282
|
+
allowInputSyncRef.current = true;
|
|
1283
|
+
incrementValue(Math.abs(rawAmount), {
|
|
1284
|
+
direction: rawAmount >= 0 ? 1 : -1,
|
|
1285
|
+
event,
|
|
1286
|
+
reason: scrub
|
|
1287
|
+
});
|
|
1288
|
+
}
|
|
1289
|
+
}
|
|
1290
|
+
}
|
|
1291
|
+
const win = getWindow(inputRef.current);
|
|
1292
|
+
const unsubscribe = mergeCleanups(addEventListener(win, "pointerup", handleScrubPointerUp, true), addEventListener(win, "pointermove", handleScrubPointerMove, true));
|
|
1293
|
+
return () => {
|
|
1294
|
+
exitPointerLockTimeout.clear();
|
|
1295
|
+
unsubscribe();
|
|
1296
|
+
};
|
|
1297
|
+
}, [
|
|
1298
|
+
disabled,
|
|
1299
|
+
readOnly,
|
|
1300
|
+
allowInputSyncRef,
|
|
1301
|
+
incrementValue,
|
|
1302
|
+
isScrubbing,
|
|
1303
|
+
getStepAmount,
|
|
1304
|
+
inputRef,
|
|
1305
|
+
onScrubbingChange,
|
|
1306
|
+
onScrub,
|
|
1307
|
+
direction,
|
|
1308
|
+
pixelSensitivity,
|
|
1309
|
+
lastChangedValueRef,
|
|
1310
|
+
onValueCommitted,
|
|
1311
|
+
valueRef,
|
|
1312
|
+
exitPointerLockTimeout
|
|
1313
|
+
]);
|
|
1314
|
+
React$1.useEffect(() => () => {
|
|
1315
|
+
if (isScrubbingRef.current) {
|
|
1316
|
+
isScrubbingRef.current = false;
|
|
1317
|
+
setRootScrubbing(false);
|
|
1318
|
+
try {
|
|
1319
|
+
ownerDocument(scrubAreaRef.current).exitPointerLock();
|
|
1320
|
+
} catch {}
|
|
1321
|
+
}
|
|
1322
|
+
}, [setRootScrubbing]);
|
|
1323
|
+
React$1.useEffect(function registerScrubberTouchPreventListener() {
|
|
1324
|
+
const element = scrubAreaRef.current;
|
|
1325
|
+
if (!element || disabled || readOnly) return;
|
|
1326
|
+
function handleTouchStart(event) {
|
|
1327
|
+
if (event.touches.length === 1) event.preventDefault();
|
|
1328
|
+
}
|
|
1329
|
+
return addEventListener(element, "touchstart", handleTouchStart);
|
|
1330
|
+
}, [disabled, readOnly]);
|
|
1331
|
+
const element = useRenderElement("span", componentProps, {
|
|
1332
|
+
ref: [forwardedRef, scrubAreaRef],
|
|
1333
|
+
state,
|
|
1334
|
+
props: [{
|
|
1335
|
+
role: "presentation",
|
|
1336
|
+
style: SCRUB_AREA_STYLE,
|
|
1337
|
+
async onPointerDown(event) {
|
|
1338
|
+
const isMainButton = !event.button || event.button === 0;
|
|
1339
|
+
if (event.defaultPrevented || readOnly || !isMainButton || disabled) return;
|
|
1340
|
+
const isTouch = event.pointerType === "touch";
|
|
1341
|
+
setIsTouchInput(isTouch);
|
|
1342
|
+
if (event.pointerType === "mouse") {
|
|
1343
|
+
event.preventDefault();
|
|
1344
|
+
inputRef.current?.focus();
|
|
1345
|
+
}
|
|
1346
|
+
isScrubbingRef.current = true;
|
|
1347
|
+
didMoveRef.current = false;
|
|
1348
|
+
pointerDownTargetRef.current = getTarget(event.nativeEvent);
|
|
1349
|
+
onScrubbingChange(true, event.nativeEvent);
|
|
1350
|
+
if (!isTouch && !webkit) try {
|
|
1351
|
+
await ownerDocument(scrubAreaRef.current).body.requestPointerLock();
|
|
1352
|
+
setIsPointerLockDenied(false);
|
|
1353
|
+
} catch (error) {
|
|
1354
|
+
setIsPointerLockDenied(true);
|
|
1355
|
+
} finally {
|
|
1356
|
+
if (isScrubbingRef.current) onScrubbingChange(true, event.nativeEvent);
|
|
1357
|
+
}
|
|
1358
|
+
}
|
|
1359
|
+
}, elementProps],
|
|
1360
|
+
stateAttributesMapping
|
|
1361
|
+
});
|
|
1362
|
+
const contextValue = React$1.useMemo(() => ({
|
|
1363
|
+
isScrubbing,
|
|
1364
|
+
isTouchInput,
|
|
1365
|
+
isPointerLockDenied,
|
|
1366
|
+
scrubAreaCursorRef
|
|
1367
|
+
}), [
|
|
1368
|
+
isScrubbing,
|
|
1369
|
+
isTouchInput,
|
|
1370
|
+
isPointerLockDenied
|
|
1371
|
+
]);
|
|
1372
|
+
return /*#__PURE__*/ jsx(NumberFieldScrubAreaContext.Provider, {
|
|
1373
|
+
value: contextValue,
|
|
1374
|
+
children: element
|
|
1375
|
+
});
|
|
1376
|
+
});
|
|
1377
|
+
NumberFieldScrubArea.displayName = "NumberFieldScrubArea";
|
|
1378
|
+
//#endregion
|
|
1379
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/scrub-area-cursor/NumberFieldScrubAreaCursor.mjs
|
|
1380
|
+
const CURSOR_STYLE = {
|
|
1381
|
+
position: "fixed",
|
|
1382
|
+
top: 0,
|
|
1383
|
+
left: 0,
|
|
1384
|
+
pointerEvents: "none"
|
|
1385
|
+
};
|
|
1386
|
+
/**
|
|
1387
|
+
* A custom element to display instead of the native cursor while using the scrub area.
|
|
1388
|
+
* Renders a `<span>` element.
|
|
1389
|
+
*
|
|
1390
|
+
* This component uses the [Pointer Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API), which may prompt the browser to display a related notification. It is disabled
|
|
1391
|
+
* in Safari to avoid a layout shift that this notification causes there.
|
|
1392
|
+
*
|
|
1393
|
+
* Documentation: [Base UI Number Field](https://base-ui.com/react/components/number-field)
|
|
1394
|
+
*/
|
|
1395
|
+
const NumberFieldScrubAreaCursor = /*#__PURE__*/ React$1.forwardRef(function NumberFieldScrubAreaCursor(componentProps, forwardedRef) {
|
|
1396
|
+
const { render, className, style, ...elementProps } = componentProps;
|
|
1397
|
+
const { state } = useNumberFieldRootContext();
|
|
1398
|
+
const { isScrubbing, isTouchInput, isPointerLockDenied, scrubAreaCursorRef } = useNumberFieldScrubAreaContext();
|
|
1399
|
+
const [domElement, setDomElement] = React$1.useState(null);
|
|
1400
|
+
const element = useRenderElement("span", componentProps, {
|
|
1401
|
+
enabled: isScrubbing && !webkit && !isTouchInput && !isPointerLockDenied,
|
|
1402
|
+
ref: [
|
|
1403
|
+
forwardedRef,
|
|
1404
|
+
scrubAreaCursorRef,
|
|
1405
|
+
setDomElement
|
|
1406
|
+
],
|
|
1407
|
+
state,
|
|
1408
|
+
props: [{
|
|
1409
|
+
role: "presentation",
|
|
1410
|
+
style: CURSOR_STYLE
|
|
1411
|
+
}, elementProps],
|
|
1412
|
+
stateAttributesMapping
|
|
1413
|
+
});
|
|
1414
|
+
return element && /*#__PURE__*/ ReactDOM.createPortal(element, ownerDocument(domElement).body);
|
|
1415
|
+
});
|
|
1416
|
+
NumberFieldScrubAreaCursor.displayName = "NumberFieldScrubAreaCursor";
|
|
1417
|
+
//#endregion
|
|
1418
|
+
//#region ../../node_modules/.pnpm/@base-ui+react@1.6.0_@date-fns+tz@1.4.1_@types+react@19.2.4_date-fns@4.1.0_react-dom@19.2.0_react@19.2.0__react@19.2.0/node_modules/@base-ui/react/number-field/index.parts.mjs
|
|
1419
|
+
var index_parts_exports = /* @__PURE__ */ __exportAll({
|
|
1420
|
+
Decrement: () => NumberFieldDecrement,
|
|
1421
|
+
Group: () => NumberFieldGroup,
|
|
1422
|
+
Increment: () => NumberFieldIncrement,
|
|
1423
|
+
Input: () => NumberFieldInput,
|
|
1424
|
+
Root: () => NumberFieldRoot,
|
|
1425
|
+
ScrubArea: () => NumberFieldScrubArea,
|
|
1426
|
+
ScrubAreaCursor: () => NumberFieldScrubAreaCursor
|
|
1427
|
+
});
|
|
1428
|
+
//#endregion
|
|
1429
|
+
export { index_parts_exports as t };
|