@cloudflare/kumo 2.8.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +88 -0
- package/README.md +3 -39
- package/ai/USAGE.md +89 -80
- package/ai/component-registry.json +165 -55
- package/ai/component-registry.md +484 -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 +347 -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-lj0glxe1hezap65x.js +178 -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-dz3fsnkrznrggilz.js +255 -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 +348 -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,1297 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as cn } from "./vendor-styling-da1xibnxfkjmtglr.js";
|
|
3
|
+
import { n as useLinkComponent } from "./link-provider-l9ohtet4pj559eg0.js";
|
|
4
|
+
import { n as TooltipProvider, t as Tooltip } from "./tooltip-maelyxs1y7a78vje.js";
|
|
5
|
+
import { t as Button } from "./button-eikucjpgqbsn5m5m.js";
|
|
6
|
+
import { t as SkeletonLine } from "./skeleton-line-f6sju1dxawm8h9tg.js";
|
|
7
|
+
import { a as ScrollAreaRoot, i as ScrollAreaViewport, n as ScrollAreaContent, r as ScrollAreaScrollbar, t as ScrollAreaThumb } from "./ScrollAreaThumb-jydo7azxxwjn1cqf.js";
|
|
8
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
import React, { createContext, forwardRef, useCallback, useContext, useEffect, useId, useMemo, useRef, useState } from "react";
|
|
10
|
+
import { CaretRightIcon, XIcon } from "@phosphor-icons/react";
|
|
11
|
+
//#region src/components/sidebar/sidebar.tsx
|
|
12
|
+
/** Sidebar variant definitions mapping layout, collapse, and side options. */
|
|
13
|
+
const KUMO_SIDEBAR_VARIANTS = {
|
|
14
|
+
variant: {
|
|
15
|
+
sidebar: {
|
|
16
|
+
classes: "",
|
|
17
|
+
description: "Standard sidebar with border separator"
|
|
18
|
+
},
|
|
19
|
+
floating: {
|
|
20
|
+
classes: "",
|
|
21
|
+
description: "Floating sidebar with shadow and rounded corners"
|
|
22
|
+
},
|
|
23
|
+
inset: {
|
|
24
|
+
classes: "",
|
|
25
|
+
description: "Inset sidebar within the content area"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
collapsible: {
|
|
29
|
+
icon: {
|
|
30
|
+
classes: "",
|
|
31
|
+
description: "Collapses to show icons only"
|
|
32
|
+
},
|
|
33
|
+
offcanvas: {
|
|
34
|
+
classes: "",
|
|
35
|
+
description: "Slides off screen when collapsed"
|
|
36
|
+
},
|
|
37
|
+
none: {
|
|
38
|
+
classes: "",
|
|
39
|
+
description: "Cannot be collapsed"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
side: {
|
|
43
|
+
left: {
|
|
44
|
+
classes: "",
|
|
45
|
+
description: "Left-aligned sidebar"
|
|
46
|
+
},
|
|
47
|
+
right: {
|
|
48
|
+
classes: "",
|
|
49
|
+
description: "Right-aligned sidebar"
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
const KUMO_SIDEBAR_DEFAULT_VARIANTS = {
|
|
54
|
+
variant: "sidebar",
|
|
55
|
+
collapsible: "icon",
|
|
56
|
+
side: "left"
|
|
57
|
+
};
|
|
58
|
+
const KUMO_SIDEBAR_STYLING = {
|
|
59
|
+
width: {
|
|
60
|
+
expanded: "16.25rem",
|
|
61
|
+
icon: "57px"
|
|
62
|
+
},
|
|
63
|
+
mobile: { breakpoint: 768 }
|
|
64
|
+
};
|
|
65
|
+
const SIDEBAR_WIDTH = "16.25rem";
|
|
66
|
+
const SIDEBAR_WIDTH_ICON = "57px";
|
|
67
|
+
const SIDEBAR_EASING = "cubic-bezier(0.77, 0, 0.175, 1)";
|
|
68
|
+
const SIDEBAR_ANIMATION_DURATION_MS = 250;
|
|
69
|
+
const MOBILE_BREAKPOINT = 768;
|
|
70
|
+
const FOCUSABLE_SELECTOR = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex=\"-1\"])";
|
|
71
|
+
function useIsMobile(breakpoint = MOBILE_BREAKPOINT) {
|
|
72
|
+
const [isMobile, setIsMobile] = useState(() => {
|
|
73
|
+
if (typeof window === "undefined") return false;
|
|
74
|
+
return window.matchMedia(`(max-width: ${breakpoint - 1}px)`).matches;
|
|
75
|
+
});
|
|
76
|
+
useEffect(() => {
|
|
77
|
+
const mql = window.matchMedia(`(max-width: ${breakpoint - 1}px)`);
|
|
78
|
+
const onChange = () => setIsMobile(mql.matches);
|
|
79
|
+
mql.addEventListener("change", onChange);
|
|
80
|
+
setIsMobile(mql.matches);
|
|
81
|
+
return () => mql.removeEventListener("change", onChange);
|
|
82
|
+
}, [breakpoint]);
|
|
83
|
+
return isMobile;
|
|
84
|
+
}
|
|
85
|
+
const SidebarContext = createContext(null);
|
|
86
|
+
/**
|
|
87
|
+
* Hook to access sidebar state and actions from any descendant component.
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```tsx
|
|
91
|
+
* const { state, open, toggleSidebar, isMobile } = useSidebar();
|
|
92
|
+
* ```
|
|
93
|
+
*
|
|
94
|
+
* @throws Error if used outside a `Sidebar.Provider`.
|
|
95
|
+
*/
|
|
96
|
+
function useSidebar() {
|
|
97
|
+
const context = useContext(SidebarContext);
|
|
98
|
+
if (!context) throw new Error("useSidebar must be used within a Sidebar.Provider");
|
|
99
|
+
return context;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Sidebar context provider. Manages expand/collapse state and mobile detection.
|
|
103
|
+
* Renders a flex wrapper div with CSS custom properties for sidebar width.
|
|
104
|
+
*
|
|
105
|
+
* @example
|
|
106
|
+
* ```tsx
|
|
107
|
+
* <Sidebar.Provider defaultOpen>
|
|
108
|
+
* <Sidebar>{...}</Sidebar>
|
|
109
|
+
* <main className="flex-1">{...}</main>
|
|
110
|
+
* </Sidebar.Provider>
|
|
111
|
+
* ```
|
|
112
|
+
*/
|
|
113
|
+
const DEFAULT_WIDTH_PX = 256;
|
|
114
|
+
const MIN_WIDTH_PX = 200;
|
|
115
|
+
const MAX_WIDTH_PX = 480;
|
|
116
|
+
function SidebarProvider({ defaultOpen = true, open: openProp, onOpenChange: setOpenProp, variant = KUMO_SIDEBAR_DEFAULT_VARIANTS.variant, side = KUMO_SIDEBAR_DEFAULT_VARIANTS.side, collapsible = KUMO_SIDEBAR_DEFAULT_VARIANTS.collapsible, resizable = false, defaultWidth = DEFAULT_WIDTH_PX, minWidth = MIN_WIDTH_PX, maxWidth = MAX_WIDTH_PX, onWidthChange, contained = false, peekable = false, animationDuration = SIDEBAR_ANIMATION_DURATION_MS, mobileBreakpoint, children, className, style }) {
|
|
117
|
+
const isMobile = useIsMobile(mobileBreakpoint);
|
|
118
|
+
const [_openMobile, _setOpenMobile] = useState(false);
|
|
119
|
+
const [width, setWidthState] = useState(defaultWidth);
|
|
120
|
+
const [isResizing, setIsResizing] = useState(false);
|
|
121
|
+
const [isPeeking, setIsPeeking] = useState(false);
|
|
122
|
+
const openMobile = isMobile && openProp !== void 0 ? openProp : _openMobile;
|
|
123
|
+
const setOpenMobile = useCallback((next) => {
|
|
124
|
+
_setOpenMobile(next);
|
|
125
|
+
if (isMobile && openProp !== void 0) setOpenProp?.(next);
|
|
126
|
+
}, [
|
|
127
|
+
isMobile,
|
|
128
|
+
openProp,
|
|
129
|
+
setOpenProp
|
|
130
|
+
]);
|
|
131
|
+
const setWidth = useCallback((newWidth) => {
|
|
132
|
+
const clamped = Math.min(maxWidth, Math.max(minWidth, newWidth));
|
|
133
|
+
setWidthState(clamped);
|
|
134
|
+
onWidthChange?.(clamped);
|
|
135
|
+
}, [
|
|
136
|
+
minWidth,
|
|
137
|
+
maxWidth,
|
|
138
|
+
onWidthChange
|
|
139
|
+
]);
|
|
140
|
+
const [_open, _setOpen] = useState(defaultOpen);
|
|
141
|
+
const open = openProp ?? _open;
|
|
142
|
+
const setOpen = useCallback((value) => {
|
|
143
|
+
const next = typeof value === "function" ? value(open) : value;
|
|
144
|
+
setOpenProp?.(next);
|
|
145
|
+
_setOpen(next);
|
|
146
|
+
}, [setOpenProp, open]);
|
|
147
|
+
const toggleSidebar = useCallback(() => {
|
|
148
|
+
if (isMobile) setOpenMobile(!openMobile);
|
|
149
|
+
else {
|
|
150
|
+
setIsPeeking(false);
|
|
151
|
+
setOpen((prev) => !prev);
|
|
152
|
+
}
|
|
153
|
+
}, [
|
|
154
|
+
isMobile,
|
|
155
|
+
openMobile,
|
|
156
|
+
setOpenMobile,
|
|
157
|
+
setOpen
|
|
158
|
+
]);
|
|
159
|
+
const startPeek = useCallback(() => {
|
|
160
|
+
if (peekable && !open && !isMobile) setIsPeeking(true);
|
|
161
|
+
}, [
|
|
162
|
+
peekable,
|
|
163
|
+
open,
|
|
164
|
+
isMobile
|
|
165
|
+
]);
|
|
166
|
+
const stopPeek = useCallback(() => {
|
|
167
|
+
setIsPeeking(false);
|
|
168
|
+
}, []);
|
|
169
|
+
const state = isPeeking ? "peeking" : open ? "expanded" : "collapsed";
|
|
170
|
+
const sidebarWidthValue = resizable ? `${width}px` : SIDEBAR_WIDTH;
|
|
171
|
+
const contextValue = useMemo(() => ({
|
|
172
|
+
state,
|
|
173
|
+
open,
|
|
174
|
+
setOpen,
|
|
175
|
+
openMobile,
|
|
176
|
+
setOpenMobile,
|
|
177
|
+
isMobile,
|
|
178
|
+
toggleSidebar,
|
|
179
|
+
variant,
|
|
180
|
+
side,
|
|
181
|
+
collapsible,
|
|
182
|
+
width,
|
|
183
|
+
resizable,
|
|
184
|
+
minWidth,
|
|
185
|
+
maxWidth,
|
|
186
|
+
isResizing,
|
|
187
|
+
setIsResizing,
|
|
188
|
+
setWidth,
|
|
189
|
+
isPeeking,
|
|
190
|
+
peekable,
|
|
191
|
+
startPeek,
|
|
192
|
+
stopPeek,
|
|
193
|
+
contained,
|
|
194
|
+
animationDuration
|
|
195
|
+
}), [
|
|
196
|
+
state,
|
|
197
|
+
open,
|
|
198
|
+
openMobile,
|
|
199
|
+
isMobile,
|
|
200
|
+
width,
|
|
201
|
+
isResizing,
|
|
202
|
+
isPeeking
|
|
203
|
+
]);
|
|
204
|
+
return /* @__PURE__ */ jsx(SidebarContext.Provider, {
|
|
205
|
+
value: contextValue,
|
|
206
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
207
|
+
"data-sidebar-wrapper": "",
|
|
208
|
+
"data-state": state,
|
|
209
|
+
"data-side": side,
|
|
210
|
+
style: {
|
|
211
|
+
"--sidebar-width": sidebarWidthValue,
|
|
212
|
+
"--sidebar-width-icon": SIDEBAR_WIDTH_ICON,
|
|
213
|
+
"--sidebar-animation-duration": `${animationDuration}ms`,
|
|
214
|
+
"--sidebar-easing": SIDEBAR_EASING,
|
|
215
|
+
...style
|
|
216
|
+
},
|
|
217
|
+
className: cn("group/sidebar-wrapper relative isolate flex w-full [--sidebar-active-bg:var(--color-kumo-tint)] [--sidebar-bg:var(--color-kumo-base)]", !contained && !isMobile && "min-h-svh", "has-data-[variant=inset]:bg-kumo-recessed", isResizing && "select-none", className),
|
|
218
|
+
children
|
|
219
|
+
})
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
SidebarProvider.displayName = "Sidebar.Provider";
|
|
223
|
+
/**
|
|
224
|
+
* Main sidebar container. Renders as `<aside>` on desktop, modal sidebar sheet on mobile.
|
|
225
|
+
* Must be used inside `Sidebar.Provider`.
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```tsx
|
|
229
|
+
* <Sidebar.Provider>
|
|
230
|
+
* <Sidebar>
|
|
231
|
+
* <Sidebar.Header>...</Sidebar.Header>
|
|
232
|
+
* <Sidebar.Content>...</Sidebar.Content>
|
|
233
|
+
* <Sidebar.Footer>...</Sidebar.Footer>
|
|
234
|
+
* </Sidebar>
|
|
235
|
+
* </Sidebar.Provider>
|
|
236
|
+
* ```
|
|
237
|
+
*/
|
|
238
|
+
const SidebarRoot = forwardRef(({ className, contentClassName, children, fullScreenOnMobile = false, ...props }, ref) => {
|
|
239
|
+
const { state, open, isMobile, openMobile, setOpenMobile, side, variant, collapsible, isResizing, resizable, width, isPeeking, startPeek, stopPeek, contained } = useSidebar();
|
|
240
|
+
const mobileAsideRef = useCallback((node) => {
|
|
241
|
+
if (node) if (!openMobile) node.setAttribute("inert", "");
|
|
242
|
+
else node.removeAttribute("inert");
|
|
243
|
+
}, [openMobile]);
|
|
244
|
+
const mergedMobileRef = useCallback((node) => {
|
|
245
|
+
mobileAsideRef(node);
|
|
246
|
+
if (typeof ref === "function") ref(node);
|
|
247
|
+
else if (ref) ref.current = node;
|
|
248
|
+
}, [ref, mobileAsideRef]);
|
|
249
|
+
const triggerRef = useRef(null);
|
|
250
|
+
const mobileNodeRef = useRef(null);
|
|
251
|
+
const shouldRestoreFocusRef = useRef(false);
|
|
252
|
+
useEffect(() => {
|
|
253
|
+
if (!isMobile || !openMobile) return;
|
|
254
|
+
const handleKeyDown = (e) => {
|
|
255
|
+
if (e.key === "Escape") {
|
|
256
|
+
shouldRestoreFocusRef.current = true;
|
|
257
|
+
setOpenMobile(false);
|
|
258
|
+
}
|
|
259
|
+
};
|
|
260
|
+
document.addEventListener("keydown", handleKeyDown);
|
|
261
|
+
return () => {
|
|
262
|
+
document.removeEventListener("keydown", handleKeyDown);
|
|
263
|
+
};
|
|
264
|
+
}, [
|
|
265
|
+
isMobile,
|
|
266
|
+
openMobile,
|
|
267
|
+
setOpenMobile
|
|
268
|
+
]);
|
|
269
|
+
useEffect(() => {
|
|
270
|
+
if (!isMobile) return;
|
|
271
|
+
if (openMobile) {
|
|
272
|
+
triggerRef.current = document.activeElement;
|
|
273
|
+
shouldRestoreFocusRef.current = false;
|
|
274
|
+
requestAnimationFrame(() => {
|
|
275
|
+
(mobileNodeRef.current?.querySelector(FOCUSABLE_SELECTOR) ?? mobileNodeRef.current)?.focus();
|
|
276
|
+
});
|
|
277
|
+
} else if (shouldRestoreFocusRef.current && triggerRef.current instanceof HTMLElement) {
|
|
278
|
+
triggerRef.current.focus();
|
|
279
|
+
shouldRestoreFocusRef.current = false;
|
|
280
|
+
triggerRef.current = null;
|
|
281
|
+
}
|
|
282
|
+
}, [isMobile, openMobile]);
|
|
283
|
+
const handlePeekBlur = useCallback((e) => {
|
|
284
|
+
if (!e.currentTarget.contains(e.relatedTarget)) stopPeek();
|
|
285
|
+
}, [stopPeek]);
|
|
286
|
+
if (collapsible === "none") return /* @__PURE__ */ jsx("aside", {
|
|
287
|
+
ref,
|
|
288
|
+
"data-state": "expanded",
|
|
289
|
+
"data-side": side,
|
|
290
|
+
"data-variant": variant,
|
|
291
|
+
"data-sidebar": "sidebar",
|
|
292
|
+
style: {
|
|
293
|
+
width: "var(--sidebar-width)",
|
|
294
|
+
minWidth: "var(--sidebar-width)",
|
|
295
|
+
maxWidth: "var(--sidebar-width)"
|
|
296
|
+
},
|
|
297
|
+
className: cn("relative flex h-full shrink-0 grow-0 flex-col overflow-hidden bg-(--sidebar-bg) text-kumo-default", variant === "sidebar" && (side === "left" ? "border-r border-kumo-line" : "border-l border-kumo-line"), variant === "floating" && "m-2 rounded-lg border border-kumo-line shadow-lg", className),
|
|
298
|
+
...props,
|
|
299
|
+
children
|
|
300
|
+
});
|
|
301
|
+
if (isMobile) return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
302
|
+
"data-sidebar-backdrop": "",
|
|
303
|
+
className: cn(contained ? "absolute inset-0 z-40 bg-kumo-recessed" : "fixed inset-0 z-40 bg-kumo-recessed", "transition-opacity duration-(--sidebar-animation-duration) ease-(--sidebar-easing)", "motion-reduce:transition-none", openMobile && !fullScreenOnMobile ? "opacity-80" : "pointer-events-none opacity-0"),
|
|
304
|
+
onClick: () => {
|
|
305
|
+
shouldRestoreFocusRef.current = true;
|
|
306
|
+
setOpenMobile(false);
|
|
307
|
+
},
|
|
308
|
+
"aria-hidden": "true"
|
|
309
|
+
}), /* @__PURE__ */ jsx("nav", {
|
|
310
|
+
ref: (node) => {
|
|
311
|
+
mergedMobileRef(node);
|
|
312
|
+
mobileNodeRef.current = node;
|
|
313
|
+
},
|
|
314
|
+
tabIndex: -1,
|
|
315
|
+
"aria-label": "Navigation",
|
|
316
|
+
"aria-hidden": !openMobile,
|
|
317
|
+
"data-state": openMobile ? "expanded" : "collapsed",
|
|
318
|
+
"data-side": side,
|
|
319
|
+
"data-variant": variant,
|
|
320
|
+
"data-collapsible": collapsible,
|
|
321
|
+
"data-sidebar": "sidebar",
|
|
322
|
+
"data-mobile": "true",
|
|
323
|
+
className: cn("group/sidebar inset-y-0 z-50 flex flex-col overflow-hidden", contained ? "absolute" : "fixed", fullScreenOnMobile ? "w-full" : "w-(--sidebar-width)", "bg-(--sidebar-bg) text-kumo-default", !fullScreenOnMobile && "border-r border-kumo-line", "transition-transform duration-(--sidebar-animation-duration) ease-(--sidebar-easing)", "motion-reduce:transition-none", side === "left" && "left-0", side === "right" && "right-0", side === "left" && (openMobile ? "translate-x-0" : "-translate-x-full"), side === "right" && (openMobile ? "translate-x-0" : "translate-x-full"), className),
|
|
324
|
+
...props,
|
|
325
|
+
children
|
|
326
|
+
})] });
|
|
327
|
+
const collapsedWidth = collapsible === "icon" ? "var(--sidebar-width-icon)" : "0px";
|
|
328
|
+
const expandedWidth = resizable ? `${width}px` : "var(--sidebar-width)";
|
|
329
|
+
const railWidth = open ? expandedWidth : collapsedWidth;
|
|
330
|
+
const contentWidth = open || isPeeking ? expandedWidth : collapsedWidth;
|
|
331
|
+
const borderClasses = variant === "sidebar" ? side === "left" ? "border-r border-kumo-line" : "border-l border-kumo-line" : variant === "floating" ? "border border-kumo-line" : "";
|
|
332
|
+
return /* @__PURE__ */ jsx("aside", {
|
|
333
|
+
ref,
|
|
334
|
+
"data-state": state,
|
|
335
|
+
"data-side": side,
|
|
336
|
+
"data-variant": variant,
|
|
337
|
+
"data-collapsible": collapsible,
|
|
338
|
+
"data-sidebar": "sidebar",
|
|
339
|
+
style: { width: railWidth },
|
|
340
|
+
className: cn("group/sidebar relative h-full shrink-0 grow-0", "overflow-visible", "transition-[width] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)", "motion-reduce:transition-none", isResizing && "transition-none!", variant === "floating" && "m-2 rounded-lg shadow-lg", className),
|
|
341
|
+
...props,
|
|
342
|
+
children: /* @__PURE__ */ jsx(TooltipProvider, { children: (() => {
|
|
343
|
+
const childArray = React.Children.toArray(children);
|
|
344
|
+
const footerChildren = childArray.filter((child) => React.isValidElement(child) && child.type?.displayName === "Sidebar.Footer");
|
|
345
|
+
const nonFooterChildren = childArray.filter((child) => !React.isValidElement(child) || child.type?.displayName !== "Sidebar.Footer");
|
|
346
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
347
|
+
"data-sidebar": "content-container",
|
|
348
|
+
style: { width: contentWidth },
|
|
349
|
+
className: cn("flex h-full flex-col", "min-w-0 overflow-hidden whitespace-nowrap", "bg-(--sidebar-bg) text-kumo-default", borderClasses, "transition-[width] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)", "motion-reduce:transition-none", isResizing && "transition-none!", !open && cn(contained ? "absolute" : "fixed", "inset-y-0 z-40", side === "left" && "left-0", side === "right" && "right-0"), open && "relative", contentClassName),
|
|
350
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
351
|
+
"data-sidebar": "peek-zone",
|
|
352
|
+
className: "flex min-h-0 flex-1 flex-col",
|
|
353
|
+
onMouseEnter: startPeek,
|
|
354
|
+
onMouseLeave: stopPeek,
|
|
355
|
+
onFocus: startPeek,
|
|
356
|
+
onBlur: handlePeekBlur,
|
|
357
|
+
children: nonFooterChildren
|
|
358
|
+
}), footerChildren]
|
|
359
|
+
});
|
|
360
|
+
})() })
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
SidebarRoot.displayName = "Sidebar";
|
|
364
|
+
/**
|
|
365
|
+
* Top section of the sidebar. Typically contains a logo, title, and action button.
|
|
366
|
+
*
|
|
367
|
+
* @example
|
|
368
|
+
* ```tsx
|
|
369
|
+
* <Sidebar.Header>
|
|
370
|
+
* <CloudflareLogo />
|
|
371
|
+
* <span>Design Engineering</span>
|
|
372
|
+
* <Button shape="square" icon={CaretUpDownIcon} aria-label="Switch" />
|
|
373
|
+
* </Sidebar.Header>
|
|
374
|
+
* ```
|
|
375
|
+
*/
|
|
376
|
+
const SidebarHeader = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
377
|
+
ref,
|
|
378
|
+
"data-sidebar": "header",
|
|
379
|
+
className: cn("flex h-[58px] shrink-0 items-center gap-1 border-b border-kumo-line", "overflow-hidden px-3", className),
|
|
380
|
+
...props
|
|
381
|
+
}));
|
|
382
|
+
SidebarHeader.displayName = "Sidebar.Header";
|
|
383
|
+
/**
|
|
384
|
+
* Scrollable middle section of the sidebar. Contains nav groups and menus.
|
|
385
|
+
*
|
|
386
|
+
* @example
|
|
387
|
+
* ```tsx
|
|
388
|
+
* <Sidebar.Content>
|
|
389
|
+
* <Sidebar.Group>...</Sidebar.Group>
|
|
390
|
+
* </Sidebar.Content>
|
|
391
|
+
* ```
|
|
392
|
+
*/
|
|
393
|
+
const SidebarContent = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(ScrollAreaRoot, {
|
|
394
|
+
ref,
|
|
395
|
+
"data-sidebar": "content",
|
|
396
|
+
className: cn("relative min-w-0 flex-1 overflow-hidden", className),
|
|
397
|
+
...props,
|
|
398
|
+
children: [/* @__PURE__ */ jsx(ScrollAreaViewport, {
|
|
399
|
+
tabIndex: -1,
|
|
400
|
+
className: cn("h-full px-[11px] py-3 group-not-data-[state=collapsed]/sidebar:px-3.5", "transition-[padding] duration-(--sidebar-animation-duration)", "overflow-x-hidden!", "[mask-image:linear-gradient(to_bottom,transparent_0,black_min(24px,var(--scroll-area-overflow-y-start,24px)),black_calc(100%-min(24px,var(--scroll-area-overflow-y-end,24px))),transparent_100%)]"),
|
|
401
|
+
children: /* @__PURE__ */ jsx(ScrollAreaContent, {
|
|
402
|
+
className: "flex min-w-0! flex-col",
|
|
403
|
+
children
|
|
404
|
+
})
|
|
405
|
+
}), /* @__PURE__ */ jsx(ScrollAreaScrollbar, {
|
|
406
|
+
orientation: "vertical",
|
|
407
|
+
className: cn("flex w-1.5 touch-none p-px select-none", "opacity-0 transition-opacity duration-150", "data-[hovering]:opacity-100 data-[scrolling]:opacity-100"),
|
|
408
|
+
children: /* @__PURE__ */ jsx(ScrollAreaThumb, { className: "flex-1 rounded-full bg-kumo-line" })
|
|
409
|
+
})]
|
|
410
|
+
}));
|
|
411
|
+
SidebarContent.displayName = "Sidebar.Content";
|
|
412
|
+
/**
|
|
413
|
+
* Bottom-pinned section of the sidebar. Rendered outside the peek zone
|
|
414
|
+
* so hovering the footer doesn't trigger a peek. Tracks sidebar width
|
|
415
|
+
* to stay aligned with the content container.
|
|
416
|
+
*
|
|
417
|
+
* @example
|
|
418
|
+
* ```tsx
|
|
419
|
+
* <Sidebar.Footer>
|
|
420
|
+
* <Sidebar.Trigger />
|
|
421
|
+
* </Sidebar.Footer>
|
|
422
|
+
* ```
|
|
423
|
+
*/
|
|
424
|
+
const SidebarFooter = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
425
|
+
ref,
|
|
426
|
+
"data-sidebar": "footer",
|
|
427
|
+
className: cn("flex h-12 shrink-0 items-center gap-4 overflow-hidden border-t border-kumo-line whitespace-nowrap", "px-[11px] group-not-data-[state=collapsed]/sidebar:px-4", "bg-(--sidebar-bg)", "w-(--sidebar-width)", "transition-[width,padding] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)", "motion-reduce:transition-none", "sticky bottom-0", "bg-clip-padding group-data-[state=collapsed]/sidebar:w-(--sidebar-width-icon)", "group-data-[state=collapsed]/sidebar:border-r group-data-[state=collapsed]/sidebar:border-kumo-line", className),
|
|
428
|
+
...props
|
|
429
|
+
}));
|
|
430
|
+
SidebarFooter.displayName = "Sidebar.Footer";
|
|
431
|
+
/**
|
|
432
|
+
* Placeholder rows for `Sidebar.Loading`, grouped like a real nav. Each string
|
|
433
|
+
* is a label-width utility; each group renders a group label above its items.
|
|
434
|
+
*/
|
|
435
|
+
const SIDEBAR_LOADING_GROUPS = [[
|
|
436
|
+
"w-28",
|
|
437
|
+
"w-40",
|
|
438
|
+
"w-24"
|
|
439
|
+
], [
|
|
440
|
+
"w-24",
|
|
441
|
+
"w-36",
|
|
442
|
+
"w-32"
|
|
443
|
+
]];
|
|
444
|
+
/**
|
|
445
|
+
* Loading state for the whole sidebar nav: nav-item-shaped placeholder rows
|
|
446
|
+
* (icon + label) grouped like the real nav, composed from `SkeletonLine` so it
|
|
447
|
+
* shares Kumo's skeleton shimmer. Drop it in place of the nav content while
|
|
448
|
+
* routes/permissions resolve. When collapsed only the icon squares remain.
|
|
449
|
+
*
|
|
450
|
+
* @example
|
|
451
|
+
* ```tsx
|
|
452
|
+
* <Sidebar>
|
|
453
|
+
* {isLoading ? <Sidebar.Loading /> : <Sidebar.Content>…</Sidebar.Content>}
|
|
454
|
+
* </Sidebar>
|
|
455
|
+
* ```
|
|
456
|
+
*/
|
|
457
|
+
const SidebarLoading = forwardRef(({ className, label = "Loading", ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
458
|
+
ref,
|
|
459
|
+
"data-sidebar": "loading",
|
|
460
|
+
role: "status",
|
|
461
|
+
"aria-label": label,
|
|
462
|
+
className: cn("flex min-h-0 w-full flex-1 flex-col gap-4 px-2 py-3", className),
|
|
463
|
+
...props,
|
|
464
|
+
children: SIDEBAR_LOADING_GROUPS.map((widths, groupIndex) => /* @__PURE__ */ jsxs("div", {
|
|
465
|
+
className: "flex flex-col gap-0.5",
|
|
466
|
+
children: [/* @__PURE__ */ jsx(SkeletonLine, { className: "mb-1 ml-2 h-2 w-16 rounded-full group-data-[state=collapsed]/sidebar:hidden" }), widths.map((width, itemIndex) => /* @__PURE__ */ jsxs("div", {
|
|
467
|
+
className: "flex min-h-8.5 items-center gap-3 rounded-lg px-3 group-data-[state=collapsed]/sidebar:justify-center group-data-[state=collapsed]/sidebar:px-0",
|
|
468
|
+
children: [/* @__PURE__ */ jsx(SkeletonLine, { className: "size-4.5 shrink-0 rounded-md" }), /* @__PURE__ */ jsx(SkeletonLine, { className: cn("h-2.5 rounded-full group-data-[state=collapsed]/sidebar:hidden", width) })]
|
|
469
|
+
}, itemIndex))]
|
|
470
|
+
}, groupIndex))
|
|
471
|
+
}));
|
|
472
|
+
SidebarLoading.displayName = "Sidebar.Loading";
|
|
473
|
+
/**
|
|
474
|
+
* Groups related menu items with an optional label.
|
|
475
|
+
*
|
|
476
|
+
* @example
|
|
477
|
+
* ```tsx
|
|
478
|
+
* <Sidebar.Group>
|
|
479
|
+
* <Sidebar.GroupLabel>Build</Sidebar.GroupLabel>
|
|
480
|
+
* <Sidebar.Menu>...</Sidebar.Menu>
|
|
481
|
+
* </Sidebar.Group>
|
|
482
|
+
* ```
|
|
483
|
+
*/
|
|
484
|
+
const SidebarGroup = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
485
|
+
ref,
|
|
486
|
+
"data-sidebar": "group",
|
|
487
|
+
className: cn("flex min-w-0 flex-col gap-y-px", className),
|
|
488
|
+
...props,
|
|
489
|
+
children
|
|
490
|
+
}));
|
|
491
|
+
SidebarGroup.displayName = "Sidebar.Group";
|
|
492
|
+
/**
|
|
493
|
+
* Section label for a sidebar group (e.g., "Build", "Protect & Connect").
|
|
494
|
+
* When the sidebar is collapsed, renders as a thin horizontal divider.
|
|
495
|
+
* When it's the first group, the divider is hidden (nothing above to separate from).
|
|
496
|
+
*
|
|
497
|
+
* @example
|
|
498
|
+
* ```tsx
|
|
499
|
+
* <Sidebar.GroupLabel>Build</Sidebar.GroupLabel>
|
|
500
|
+
* ```
|
|
501
|
+
*/
|
|
502
|
+
const SidebarGroupLabel = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
503
|
+
ref,
|
|
504
|
+
"data-sidebar": "group-label",
|
|
505
|
+
className: cn("grid overflow-hidden", "transition-[grid-template-rows,margin,border-color] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)", "group-data-[mobile=true]/sidebar:transition-none", "my-3 grid-rows-[0fr] border-b border-kumo-line", "[[data-sidebar=group]:first-child_&]:my-0 [[data-sidebar=group]:first-child_&]:border-transparent", "group-not-data-[state=collapsed]/sidebar:my-0 group-not-data-[state=collapsed]/sidebar:grid-rows-[1fr] group-not-data-[state=collapsed]/sidebar:border-transparent", "group-data-[mobile=true]/sidebar:my-0 group-data-[mobile=true]/sidebar:grid-rows-[1fr] group-data-[mobile=true]/sidebar:border-transparent", className),
|
|
506
|
+
...props,
|
|
507
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
508
|
+
className: "min-h-0 min-w-0",
|
|
509
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
510
|
+
className: cn("mt-4 mb-2 truncate px-3 text-sm font-medium text-kumo-subtle", "[[data-sidebar=group]:first-child_&]:mt-2"),
|
|
511
|
+
children
|
|
512
|
+
})
|
|
513
|
+
})
|
|
514
|
+
}));
|
|
515
|
+
SidebarGroupLabel.displayName = "Sidebar.GroupLabel";
|
|
516
|
+
/**
|
|
517
|
+
* When `true`, indicates the component is already wrapped in a `MenuItem` `<li>`.
|
|
518
|
+
* `MenuButton` checks this: if `false`, it auto-wraps itself in an `<li>`.
|
|
519
|
+
*/
|
|
520
|
+
const MenuItemContext = createContext(false);
|
|
521
|
+
/**
|
|
522
|
+
* When `true`, indicates the component is already wrapped in a `MenuSubItem` `<li>`.
|
|
523
|
+
* `MenuSubButton` checks this: if `false`, it auto-wraps itself in an `<li>`.
|
|
524
|
+
*/
|
|
525
|
+
const MenuSubItemContext = createContext(false);
|
|
526
|
+
/**
|
|
527
|
+
* Navigation menu list. Renders as `<ul>`.
|
|
528
|
+
*
|
|
529
|
+
* `MenuButton` auto-wraps in `<li>` so `MenuItem` is optional for simple items.
|
|
530
|
+
*
|
|
531
|
+
* @example Simple usage
|
|
532
|
+
* ```tsx
|
|
533
|
+
* <Sidebar.Menu>
|
|
534
|
+
* <Sidebar.MenuButton icon={HouseIcon} active>Account home</Sidebar.MenuButton>
|
|
535
|
+
* <Sidebar.MenuButton icon={GlobeIcon}>Domains</Sidebar.MenuButton>
|
|
536
|
+
* </Sidebar.Menu>
|
|
537
|
+
* ```
|
|
538
|
+
*
|
|
539
|
+
* @example With explicit MenuItem (needed for Collapsible wrapper)
|
|
540
|
+
* ```tsx
|
|
541
|
+
* <Sidebar.Menu>
|
|
542
|
+
* <Sidebar.MenuItem>
|
|
543
|
+
* <Sidebar.Collapsible>...</Sidebar.Collapsible>
|
|
544
|
+
* </Sidebar.MenuItem>
|
|
545
|
+
* </Sidebar.Menu>
|
|
546
|
+
* ```
|
|
547
|
+
*/
|
|
548
|
+
const SidebarMenu = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("ul", {
|
|
549
|
+
ref,
|
|
550
|
+
"data-sidebar": "menu",
|
|
551
|
+
className: cn("m-0 flex min-w-0 list-none flex-col items-stretch gap-y-px p-0", className),
|
|
552
|
+
...props
|
|
553
|
+
}));
|
|
554
|
+
SidebarMenu.displayName = "Sidebar.Menu";
|
|
555
|
+
/**
|
|
556
|
+
* Individual menu list item. Renders as `<li>`.
|
|
557
|
+
*
|
|
558
|
+
* **Optional when using `MenuButton` directly** — `MenuButton` auto-wraps
|
|
559
|
+
* itself in a `<li>` when not already inside a `MenuItem`. Use `MenuItem`
|
|
560
|
+
* explicitly when wrapping a `Collapsible`.
|
|
561
|
+
*
|
|
562
|
+
* @example Explicit usage (wrapping a Collapsible)
|
|
563
|
+
* ```tsx
|
|
564
|
+
* <Sidebar.MenuItem>
|
|
565
|
+
* <Sidebar.Collapsible>...</Sidebar.Collapsible>
|
|
566
|
+
* </Sidebar.MenuItem>
|
|
567
|
+
* ```
|
|
568
|
+
*/
|
|
569
|
+
const SidebarMenuItem = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(MenuItemContext.Provider, {
|
|
570
|
+
value: true,
|
|
571
|
+
children: /* @__PURE__ */ jsx("li", {
|
|
572
|
+
ref,
|
|
573
|
+
"data-sidebar": "menu-item",
|
|
574
|
+
className: cn("relative group-data-[state=collapsed]/sidebar:overflow-hidden", className),
|
|
575
|
+
...props,
|
|
576
|
+
children
|
|
577
|
+
})
|
|
578
|
+
}));
|
|
579
|
+
SidebarMenuItem.displayName = "Sidebar.MenuItem";
|
|
580
|
+
/**
|
|
581
|
+
* Primary interactive element inside a menu item. Renders as a `<button>` or link.
|
|
582
|
+
* Supports icons, active state, and auto-tooltip when the sidebar is collapsed.
|
|
583
|
+
*
|
|
584
|
+
* **Auto-wraps in `<li>`** when not already inside a `Sidebar.MenuItem`.
|
|
585
|
+
* Use `MenuItem` explicitly only when wrapping a `Collapsible`.
|
|
586
|
+
*
|
|
587
|
+
* @example Simple usage (auto-wrapped in `<li>`)
|
|
588
|
+
* ```tsx
|
|
589
|
+
* <Sidebar.Menu>
|
|
590
|
+
* <Sidebar.MenuButton icon={GlobeIcon} active>Domains</Sidebar.MenuButton>
|
|
591
|
+
* <Sidebar.MenuButton icon={ClockIcon} href="/recents">Recents</Sidebar.MenuButton>
|
|
592
|
+
* </Sidebar.Menu>
|
|
593
|
+
* ```
|
|
594
|
+
*
|
|
595
|
+
* @example With Collapsible (explicit MenuItem needed)
|
|
596
|
+
* ```tsx
|
|
597
|
+
* <Sidebar.MenuItem>
|
|
598
|
+
* <Sidebar.Collapsible>
|
|
599
|
+
* <Sidebar.CollapsibleTrigger render={<Sidebar.MenuButton icon={CodeIcon}>Compute<Sidebar.MenuChevron /></Sidebar.MenuButton>} />
|
|
600
|
+
* <Sidebar.CollapsibleContent>...</Sidebar.CollapsibleContent>
|
|
601
|
+
* </Sidebar.Collapsible>
|
|
602
|
+
* </Sidebar.MenuItem>
|
|
603
|
+
* ```
|
|
604
|
+
*/
|
|
605
|
+
const SidebarMenuButton = forwardRef(({ className, icon: IconProp, active = false, size = "base", href, target, tooltip, children, ...props }, ref) => {
|
|
606
|
+
const { state, peekable } = useSidebar();
|
|
607
|
+
const LinkComponent = useLinkComponent();
|
|
608
|
+
const isInsideMenuItem = useContext(MenuItemContext);
|
|
609
|
+
const iconNode = (() => {
|
|
610
|
+
if (!IconProp) return null;
|
|
611
|
+
if (React.isValidElement(IconProp)) return IconProp;
|
|
612
|
+
return /* @__PURE__ */ jsx(IconProp, { className: cn("shrink-0 opacity-40", size === "base" ? "size-4" : "size-3.5") });
|
|
613
|
+
})();
|
|
614
|
+
const content = /* @__PURE__ */ jsxs("div", {
|
|
615
|
+
className: cn("flex min-w-0 flex-1 items-center gap-3", "translate-x-[-3px] group-not-data-[state=collapsed]/sidebar:translate-x-0", "transition-transform duration-(--sidebar-animation-duration)"),
|
|
616
|
+
children: [iconNode, /* @__PURE__ */ jsx("span", {
|
|
617
|
+
className: cn("flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-left"),
|
|
618
|
+
children: React.Children.map(children, (child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ jsx("span", {
|
|
619
|
+
className: "truncate",
|
|
620
|
+
children: child
|
|
621
|
+
}) : child)
|
|
622
|
+
})]
|
|
623
|
+
});
|
|
624
|
+
const buttonClasses = cn("group/menu-button relative flex w-full min-w-0 cursor-pointer items-center gap-2.5 rounded-lg outline-none", "before:absolute before:inset-x-0 before:-inset-y-px", size === "base" && "min-h-8.5 px-3 py-0 text-sm font-medium", size === "sm" && "min-h-7 px-2 py-0 text-sm", "text-kumo-default", "transition-[color,box-shadow,outline] duration-(--sidebar-animation-duration)", !active && "hover:bg-(--sidebar-active-bg)", active && "bg-(--sidebar-active-bg)", "has-[[data-active]]:bg-transparent has-[[data-active]]:hover:bg-(--sidebar-active-bg)", "focus:outline-none focus-visible:bg-(--sidebar-active-bg) focus-visible:text-kumo-strong", className);
|
|
625
|
+
let button;
|
|
626
|
+
if (href) button = /* @__PURE__ */ jsx(LinkComponent, {
|
|
627
|
+
ref,
|
|
628
|
+
className: cn(buttonClasses, "no-underline!"),
|
|
629
|
+
href,
|
|
630
|
+
to: href,
|
|
631
|
+
target,
|
|
632
|
+
"data-active": active || void 0,
|
|
633
|
+
"data-sidebar": "menu-button",
|
|
634
|
+
"data-kumo-component": "Sidebar",
|
|
635
|
+
"data-kumo-part": "menu-button-link",
|
|
636
|
+
"data-size": size,
|
|
637
|
+
onClick: props.onClick,
|
|
638
|
+
children: content
|
|
639
|
+
});
|
|
640
|
+
else button = /* @__PURE__ */ jsx("button", {
|
|
641
|
+
ref,
|
|
642
|
+
type: "button",
|
|
643
|
+
className: buttonClasses,
|
|
644
|
+
"data-active": active || void 0,
|
|
645
|
+
"data-sidebar": "menu-button",
|
|
646
|
+
"data-kumo-component": "Sidebar",
|
|
647
|
+
"data-kumo-part": "menu-button",
|
|
648
|
+
"data-size": size,
|
|
649
|
+
...props,
|
|
650
|
+
children: content
|
|
651
|
+
});
|
|
652
|
+
const showTooltip = state === "collapsed" && !peekable;
|
|
653
|
+
if (tooltip) button = /* @__PURE__ */ jsx(Tooltip, {
|
|
654
|
+
content: tooltip,
|
|
655
|
+
disabled: !showTooltip,
|
|
656
|
+
side: "right",
|
|
657
|
+
render: button
|
|
658
|
+
});
|
|
659
|
+
if (!isInsideMenuItem) return /* @__PURE__ */ jsx("li", {
|
|
660
|
+
"data-sidebar": "menu-item",
|
|
661
|
+
className: "relative group-data-[state=collapsed]/sidebar:overflow-hidden",
|
|
662
|
+
children: button
|
|
663
|
+
});
|
|
664
|
+
return button;
|
|
665
|
+
});
|
|
666
|
+
SidebarMenuButton.displayName = "Sidebar.MenuButton";
|
|
667
|
+
/**
|
|
668
|
+
* Badge pill displayed inside a menu button (e.g., "Beta", "New").
|
|
669
|
+
* Uses dashed border styling matching the Cloudflare design system.
|
|
670
|
+
*
|
|
671
|
+
* @example
|
|
672
|
+
* ```tsx
|
|
673
|
+
* <Sidebar.MenuSubButton>
|
|
674
|
+
* Containers
|
|
675
|
+
* <Sidebar.MenuBadge>Beta</Sidebar.MenuBadge>
|
|
676
|
+
* </Sidebar.MenuSubButton>
|
|
677
|
+
* ```
|
|
678
|
+
*/
|
|
679
|
+
const SidebarMenuBadge = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("span", {
|
|
680
|
+
ref,
|
|
681
|
+
"data-sidebar": "menu-badge",
|
|
682
|
+
className: cn("inline-flex shrink-0 items-center rounded-full border border-dashed border-kumo-line", "px-1.5 py-0.5 text-[11px]/none font-medium text-kumo-strong select-none", "group-data-[state=collapsed]/sidebar:hidden", className),
|
|
683
|
+
...props
|
|
684
|
+
}));
|
|
685
|
+
SidebarMenuBadge.displayName = "Sidebar.MenuBadge";
|
|
686
|
+
/**
|
|
687
|
+
* Indented sub-menu container for child navigation items. Renders as `<ul>` with
|
|
688
|
+
* a left border accent for visual hierarchy.
|
|
689
|
+
*
|
|
690
|
+
* `MenuSubButton` auto-wraps in `<li>` so `MenuSubItem` is optional.
|
|
691
|
+
*
|
|
692
|
+
* @example
|
|
693
|
+
* ```tsx
|
|
694
|
+
* <Sidebar.MenuSub>
|
|
695
|
+
* <Sidebar.MenuSubButton active>Workers & Pages</Sidebar.MenuSubButton>
|
|
696
|
+
* <Sidebar.MenuSubButton>Durable Objects</Sidebar.MenuSubButton>
|
|
697
|
+
* </Sidebar.MenuSub>
|
|
698
|
+
* ```
|
|
699
|
+
*/
|
|
700
|
+
const SidebarMenuSub = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs("ul", {
|
|
701
|
+
ref,
|
|
702
|
+
"data-sidebar": "menu-sub",
|
|
703
|
+
className: cn("relative m-0 flex min-w-0 list-none flex-col gap-y-px overflow-hidden p-0 pr-0 pl-7", className),
|
|
704
|
+
...props,
|
|
705
|
+
children: [/* @__PURE__ */ jsx("div", { className: "absolute inset-y-px left-[19px] z-10 w-px bg-kumo-line" }), children]
|
|
706
|
+
}));
|
|
707
|
+
SidebarMenuSub.displayName = "Sidebar.MenuSub";
|
|
708
|
+
/**
|
|
709
|
+
* Individual item inside a sub-menu. Renders as `<li>`.
|
|
710
|
+
*
|
|
711
|
+
* **Optional when using `MenuSubButton` directly** — `MenuSubButton` auto-wraps
|
|
712
|
+
* itself in a `<li>` when not already inside a `MenuSubItem`.
|
|
713
|
+
*/
|
|
714
|
+
const SidebarMenuSubItem = forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(MenuSubItemContext.Provider, {
|
|
715
|
+
value: true,
|
|
716
|
+
children: /* @__PURE__ */ jsx("li", {
|
|
717
|
+
ref,
|
|
718
|
+
"data-sidebar": "menu-sub-item",
|
|
719
|
+
className: cn("relative", className),
|
|
720
|
+
...props,
|
|
721
|
+
children
|
|
722
|
+
})
|
|
723
|
+
}));
|
|
724
|
+
SidebarMenuSubItem.displayName = "Sidebar.MenuSubItem";
|
|
725
|
+
/**
|
|
726
|
+
* Button inside a sub-menu item. Does not render an icon (sub-items are
|
|
727
|
+
* indented instead). Supports active state and link rendering.
|
|
728
|
+
*
|
|
729
|
+
* **Auto-wraps in `<li>`** when not already inside a `Sidebar.MenuSubItem`.
|
|
730
|
+
*
|
|
731
|
+
* @example Simple usage (auto-wrapped in `<li>`)
|
|
732
|
+
* ```tsx
|
|
733
|
+
* <Sidebar.MenuSub>
|
|
734
|
+
* <Sidebar.MenuSubButton active>Workers & Pages</Sidebar.MenuSubButton>
|
|
735
|
+
* <Sidebar.MenuSubButton href="/observability">Observability</Sidebar.MenuSubButton>
|
|
736
|
+
* </Sidebar.MenuSub>
|
|
737
|
+
* ```
|
|
738
|
+
*/
|
|
739
|
+
const SidebarMenuSubButton = forwardRef(({ className, active = false, href, target, children, ...props }, ref) => {
|
|
740
|
+
const LinkComponent = useLinkComponent();
|
|
741
|
+
const isInsideMenuSubItem = useContext(MenuSubItemContext);
|
|
742
|
+
const buttonClasses = cn("group/menu-button relative flex min-h-8.5 w-full min-w-0 cursor-pointer items-center gap-2 rounded-lg px-3 py-0 text-sm font-medium outline-none", "before:absolute before:inset-x-0 before:-inset-y-px", "text-kumo-default transition-[color] duration-150", !active && "hover:bg-(--sidebar-active-bg)", active && "bg-(--sidebar-active-bg)", "focus:outline-none focus-visible:bg-(--sidebar-active-bg) focus-visible:text-kumo-strong", className);
|
|
743
|
+
const content = /* @__PURE__ */ jsx("span", {
|
|
744
|
+
className: "flex min-w-0 flex-1 items-center gap-2 overflow-hidden text-left",
|
|
745
|
+
children: React.Children.map(children, (child) => typeof child === "string" || typeof child === "number" ? /* @__PURE__ */ jsx("span", {
|
|
746
|
+
className: "truncate",
|
|
747
|
+
children: child
|
|
748
|
+
}) : child)
|
|
749
|
+
});
|
|
750
|
+
let button;
|
|
751
|
+
if (href) button = /* @__PURE__ */ jsx(LinkComponent, {
|
|
752
|
+
ref,
|
|
753
|
+
className: cn(buttonClasses, "no-underline!"),
|
|
754
|
+
href,
|
|
755
|
+
to: href,
|
|
756
|
+
target,
|
|
757
|
+
"data-active": active || void 0,
|
|
758
|
+
"data-sidebar": "menu-sub-button",
|
|
759
|
+
"data-kumo-component": "Sidebar",
|
|
760
|
+
"data-kumo-part": "menu-sub-button-link",
|
|
761
|
+
onClick: props.onClick,
|
|
762
|
+
children: content
|
|
763
|
+
});
|
|
764
|
+
else button = /* @__PURE__ */ jsx("button", {
|
|
765
|
+
ref,
|
|
766
|
+
type: "button",
|
|
767
|
+
className: buttonClasses,
|
|
768
|
+
"data-active": active || void 0,
|
|
769
|
+
"data-sidebar": "menu-sub-button",
|
|
770
|
+
"data-kumo-component": "Sidebar",
|
|
771
|
+
"data-kumo-part": "menu-sub-button",
|
|
772
|
+
...props,
|
|
773
|
+
children: content
|
|
774
|
+
});
|
|
775
|
+
if (!isInsideMenuSubItem) return /* @__PURE__ */ jsx("li", {
|
|
776
|
+
"data-sidebar": "menu-sub-item",
|
|
777
|
+
className: "relative",
|
|
778
|
+
children: button
|
|
779
|
+
});
|
|
780
|
+
return button;
|
|
781
|
+
});
|
|
782
|
+
SidebarMenuSubButton.displayName = "Sidebar.MenuSubButton";
|
|
783
|
+
/**
|
|
784
|
+
* Horizontal divider line between sidebar sections.
|
|
785
|
+
*/
|
|
786
|
+
const SidebarSeparator = forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
787
|
+
ref,
|
|
788
|
+
"data-sidebar": "separator",
|
|
789
|
+
className: cn("my-3 px-2", className),
|
|
790
|
+
...props,
|
|
791
|
+
children: /* @__PURE__ */ jsx("div", { className: "border-b border-kumo-line" })
|
|
792
|
+
}));
|
|
793
|
+
SidebarSeparator.displayName = "Sidebar.Separator";
|
|
794
|
+
/**
|
|
795
|
+
* Animated sidebar panel icon. The vertical divider line slides based
|
|
796
|
+
* on the sidebar's open/closed state.
|
|
797
|
+
*/
|
|
798
|
+
function SidebarPanelIcon({ className }) {
|
|
799
|
+
const { open } = useSidebar();
|
|
800
|
+
return /* @__PURE__ */ jsxs("svg", {
|
|
801
|
+
width: "18",
|
|
802
|
+
height: "18",
|
|
803
|
+
viewBox: "0 0 24 24",
|
|
804
|
+
fill: "none",
|
|
805
|
+
"aria-hidden": "true",
|
|
806
|
+
focusable: "false",
|
|
807
|
+
stroke: "currentColor",
|
|
808
|
+
strokeWidth: "1.5",
|
|
809
|
+
strokeLinecap: "round",
|
|
810
|
+
className: cn("shrink-0", className),
|
|
811
|
+
children: [/* @__PURE__ */ jsx("path", { d: "M21.25 6.72v10.56a2.97 2.97 0 0 1-2.97 2.97H5.72a2.97 2.97 0 0 1-2.97-2.97V6.72a2.97 2.97 0 0 1 2.97-2.97h12.56a2.97 2.97 0 0 1 2.97 2.97" }), /* @__PURE__ */ jsx("path", {
|
|
812
|
+
d: "M6.25 7.25v9.5",
|
|
813
|
+
className: cn("transition-transform duration-(--sidebar-animation-duration) ease-(--sidebar-easing)", open ? "translate-x-px" : "translate-x-[10.5px]")
|
|
814
|
+
})]
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
SidebarPanelIcon.displayName = "Sidebar.PanelIcon";
|
|
818
|
+
/**
|
|
819
|
+
* Button that toggles the sidebar open/collapsed. Uses `toggleSidebar()` from context.
|
|
820
|
+
* Defaults to an animated `SidebarPanelIcon`.
|
|
821
|
+
*
|
|
822
|
+
* @example
|
|
823
|
+
* ```tsx
|
|
824
|
+
* <Sidebar.Trigger />
|
|
825
|
+
* ```
|
|
826
|
+
*/
|
|
827
|
+
const SidebarTrigger = forwardRef(({ className, children, onClick, ...props }, ref) => {
|
|
828
|
+
const { open, toggleSidebar } = useSidebar();
|
|
829
|
+
return /* @__PURE__ */ jsx("button", {
|
|
830
|
+
ref,
|
|
831
|
+
type: "button",
|
|
832
|
+
"data-sidebar": "trigger",
|
|
833
|
+
"data-kumo-component": "Sidebar",
|
|
834
|
+
"data-kumo-part": "trigger",
|
|
835
|
+
"aria-expanded": open,
|
|
836
|
+
"aria-label": open ? "Collapse sidebar" : "Expand sidebar",
|
|
837
|
+
className: cn("flex size-8.5 shrink-0 cursor-pointer items-center justify-center rounded-lg", "text-kumo-subtle hover:bg-(--sidebar-active-bg) hover:text-kumo-default", "focus:outline-none focus-visible:ring-2 focus-visible:ring-kumo-brand focus-visible:ring-inset", className),
|
|
838
|
+
onClick: (e) => {
|
|
839
|
+
onClick?.(e);
|
|
840
|
+
toggleSidebar();
|
|
841
|
+
},
|
|
842
|
+
...props,
|
|
843
|
+
children: children ?? /* @__PURE__ */ jsx(SidebarPanelIcon, {})
|
|
844
|
+
});
|
|
845
|
+
});
|
|
846
|
+
SidebarTrigger.displayName = "Sidebar.Trigger";
|
|
847
|
+
/**
|
|
848
|
+
* Close button for the mobile sidebar sheet. Most useful inside
|
|
849
|
+
* `Sidebar.Header` when `fullScreenOnMobile` is true, where the backdrop is
|
|
850
|
+
* hidden and there is no adjacent page content to click.
|
|
851
|
+
*
|
|
852
|
+
* On desktop this is a no-op (the sidebar is not a sheet), so it can be
|
|
853
|
+
* rendered unconditionally without conditional checks.
|
|
854
|
+
*
|
|
855
|
+
* @example
|
|
856
|
+
* ```tsx
|
|
857
|
+
* <Sidebar.Header>
|
|
858
|
+
* <span className="flex-1">Navigation</span>
|
|
859
|
+
* <Sidebar.Close />
|
|
860
|
+
* </Sidebar.Header>
|
|
861
|
+
* ```
|
|
862
|
+
*/
|
|
863
|
+
const SidebarClose = forwardRef(({ className, onClick, ...props }, ref) => {
|
|
864
|
+
const { setOpenMobile } = useSidebar();
|
|
865
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
866
|
+
ref,
|
|
867
|
+
variant: "ghost",
|
|
868
|
+
shape: "square",
|
|
869
|
+
size: "sm",
|
|
870
|
+
"data-sidebar": "close",
|
|
871
|
+
"data-kumo-component": "Sidebar",
|
|
872
|
+
"data-kumo-part": "close",
|
|
873
|
+
"aria-label": "Close navigation",
|
|
874
|
+
className: cn("shrink-0", className),
|
|
875
|
+
onClick: (e) => {
|
|
876
|
+
onClick?.(e);
|
|
877
|
+
setOpenMobile(false);
|
|
878
|
+
},
|
|
879
|
+
...props,
|
|
880
|
+
children: /* @__PURE__ */ jsx(XIcon, { size: 18 })
|
|
881
|
+
});
|
|
882
|
+
});
|
|
883
|
+
SidebarClose.displayName = "Sidebar.Close";
|
|
884
|
+
/**
|
|
885
|
+
* Invisible interaction strip at the sidebar edge for click-to-toggle.
|
|
886
|
+
* Renders a thin hover-sensitive area between the sidebar and main content.
|
|
887
|
+
*/
|
|
888
|
+
const SidebarRail = forwardRef(({ className, ...props }, ref) => {
|
|
889
|
+
const { toggleSidebar } = useSidebar();
|
|
890
|
+
return /* @__PURE__ */ jsx("button", {
|
|
891
|
+
ref,
|
|
892
|
+
type: "button",
|
|
893
|
+
"data-sidebar": "rail",
|
|
894
|
+
"data-kumo-component": "Sidebar",
|
|
895
|
+
"data-kumo-part": "rail",
|
|
896
|
+
"aria-label": "Toggle sidebar",
|
|
897
|
+
tabIndex: -1,
|
|
898
|
+
className: cn("absolute inset-y-0 z-1 hidden w-4 -translate-x-1/2 cursor-pointer transition-all", "after:absolute after:inset-y-0 after:left-1/2 after:w-0.5", "hover:after:bg-kumo-brand/20", "group-data-[side=left]/sidebar-wrapper:right-0", "group-data-[side=right]/sidebar-wrapper:left-0", "sm:flex", className),
|
|
899
|
+
onClick: toggleSidebar,
|
|
900
|
+
...props
|
|
901
|
+
});
|
|
902
|
+
});
|
|
903
|
+
SidebarRail.displayName = "Sidebar.Rail";
|
|
904
|
+
/**
|
|
905
|
+
* Drag handle for resizing the sidebar. Renders when `resizable` is true in
|
|
906
|
+
* both expanded and collapsed states.
|
|
907
|
+
*
|
|
908
|
+
* - **Expanded → drag inward past `minWidth`**: auto-collapses to icon-only.
|
|
909
|
+
* - **Collapsed → drag outward past `minWidth`**: auto-expands and begins
|
|
910
|
+
* tracking width from `minWidth`.
|
|
911
|
+
*/
|
|
912
|
+
const SidebarResizeHandle = forwardRef(({ className, ...props }, ref) => {
|
|
913
|
+
const { side, resizable, setIsResizing, setWidth, setOpen, open, minWidth, width: currentWidth, maxWidth } = useSidebar();
|
|
914
|
+
const startX = useRef(0);
|
|
915
|
+
const startWidth = useRef(0);
|
|
916
|
+
const wasCollapsed = useRef(false);
|
|
917
|
+
if (!resizable) return null;
|
|
918
|
+
const KEYBOARD_STEP = 10;
|
|
919
|
+
const handlePointerDown = (e) => {
|
|
920
|
+
e.preventDefault();
|
|
921
|
+
setIsResizing(true);
|
|
922
|
+
startX.current = e.clientX;
|
|
923
|
+
wasCollapsed.current = !open;
|
|
924
|
+
const sidebar = e.currentTarget.closest("[data-sidebar-wrapper]")?.querySelector("[data-sidebar='sidebar']");
|
|
925
|
+
startWidth.current = sidebar?.getBoundingClientRect().width ?? 0;
|
|
926
|
+
const cleanup = () => {
|
|
927
|
+
setIsResizing(false);
|
|
928
|
+
document.removeEventListener("pointermove", handlePointerMove);
|
|
929
|
+
document.removeEventListener("pointerup", handlePointerUp);
|
|
930
|
+
};
|
|
931
|
+
const handlePointerMove = (moveEvent) => {
|
|
932
|
+
const delta = side === "left" ? moveEvent.clientX - startX.current : startX.current - moveEvent.clientX;
|
|
933
|
+
const rawWidth = startWidth.current + delta;
|
|
934
|
+
if (wasCollapsed.current) {
|
|
935
|
+
if (rawWidth >= minWidth) {
|
|
936
|
+
wasCollapsed.current = false;
|
|
937
|
+
setOpen(true);
|
|
938
|
+
setWidth(rawWidth);
|
|
939
|
+
}
|
|
940
|
+
return;
|
|
941
|
+
}
|
|
942
|
+
if (rawWidth < minWidth) {
|
|
943
|
+
setOpen(false);
|
|
944
|
+
wasCollapsed.current = true;
|
|
945
|
+
return;
|
|
946
|
+
}
|
|
947
|
+
setWidth(rawWidth);
|
|
948
|
+
};
|
|
949
|
+
const handlePointerUp = () => {
|
|
950
|
+
cleanup();
|
|
951
|
+
};
|
|
952
|
+
document.addEventListener("pointermove", handlePointerMove);
|
|
953
|
+
document.addEventListener("pointerup", handlePointerUp);
|
|
954
|
+
};
|
|
955
|
+
const handleKeyDown = (e) => {
|
|
956
|
+
const grow = side === "left" ? "ArrowRight" : "ArrowLeft";
|
|
957
|
+
const shrink = side === "left" ? "ArrowLeft" : "ArrowRight";
|
|
958
|
+
if (e.key === grow) {
|
|
959
|
+
e.preventDefault();
|
|
960
|
+
if (!open) {
|
|
961
|
+
setOpen(true);
|
|
962
|
+
setWidth(minWidth);
|
|
963
|
+
} else setWidth(Math.min(currentWidth + KEYBOARD_STEP, maxWidth));
|
|
964
|
+
} else if (e.key === shrink) {
|
|
965
|
+
e.preventDefault();
|
|
966
|
+
const next = currentWidth - KEYBOARD_STEP;
|
|
967
|
+
if (next < minWidth) setOpen(false);
|
|
968
|
+
else setWidth(next);
|
|
969
|
+
} else if (e.key === "Home") {
|
|
970
|
+
e.preventDefault();
|
|
971
|
+
setOpen(false);
|
|
972
|
+
} else if (e.key === "End") {
|
|
973
|
+
e.preventDefault();
|
|
974
|
+
setOpen(true);
|
|
975
|
+
setWidth(maxWidth);
|
|
976
|
+
}
|
|
977
|
+
};
|
|
978
|
+
return /* @__PURE__ */ jsx("button", {
|
|
979
|
+
ref,
|
|
980
|
+
type: "button",
|
|
981
|
+
"aria-label": "Resize sidebar",
|
|
982
|
+
tabIndex: 0,
|
|
983
|
+
"data-sidebar": "resize-handle",
|
|
984
|
+
className: cn("absolute inset-y-0 z-2 hidden w-3 cursor-col-resize sm:block", "after:absolute after:inset-y-0 after:w-0.5", "after:bg-transparent after:transition-colors", "hover:after:bg-kumo-hairline focus-visible:after:bg-kumo-hairline active:after:bg-kumo-hairline", "focus:outline-none", side === "left" && "right-0 after:right-0", side === "right" && "left-0 after:left-0", className),
|
|
985
|
+
onPointerDown: handlePointerDown,
|
|
986
|
+
onKeyDown: handleKeyDown,
|
|
987
|
+
...props
|
|
988
|
+
});
|
|
989
|
+
});
|
|
990
|
+
SidebarResizeHandle.displayName = "Sidebar.ResizeHandle";
|
|
991
|
+
const SidebarCollapseContext = createContext({
|
|
992
|
+
contentId: "",
|
|
993
|
+
isOpen: true,
|
|
994
|
+
isCollapsible: false,
|
|
995
|
+
autoScrollOnOpen: false,
|
|
996
|
+
toggle: () => {}
|
|
997
|
+
});
|
|
998
|
+
/**
|
|
999
|
+
* Collapsible wrapper for sidebar sub-menu expand/collapse.
|
|
1000
|
+
* Manages open/close state and provides context to Trigger and Content children.
|
|
1001
|
+
*
|
|
1002
|
+
* Keyboard behaviour: when a child receives keyboard focus (`focus-visible`)
|
|
1003
|
+
* while collapsed, the section auto-expands. It collapses again on blur
|
|
1004
|
+
* unless it was explicitly opened via click or a child has `data-active`.
|
|
1005
|
+
*
|
|
1006
|
+
* @example
|
|
1007
|
+
* ```tsx
|
|
1008
|
+
* <Sidebar.MenuItem>
|
|
1009
|
+
* <Sidebar.Collapsible defaultOpen>
|
|
1010
|
+
* <Sidebar.CollapsibleTrigger
|
|
1011
|
+
* render={<Sidebar.MenuButton icon={CodeIcon}>Compute<Sidebar.MenuChevron /></Sidebar.MenuButton>}
|
|
1012
|
+
* />
|
|
1013
|
+
* <Sidebar.CollapsibleContent>
|
|
1014
|
+
* <Sidebar.MenuSub>...</Sidebar.MenuSub>
|
|
1015
|
+
* </Sidebar.CollapsibleContent>
|
|
1016
|
+
* </Sidebar.Collapsible>
|
|
1017
|
+
* </Sidebar.MenuItem>
|
|
1018
|
+
* ```
|
|
1019
|
+
*/
|
|
1020
|
+
const SidebarCollapsible = forwardRef(({ defaultOpen = false, open: openProp, onOpenChange, autoScrollOnOpen = false, className, children, ...props }, ref) => {
|
|
1021
|
+
const [internalOpen, setInternalOpen] = useState(defaultOpen);
|
|
1022
|
+
const isOpen = openProp ?? internalOpen;
|
|
1023
|
+
const contentId = useId();
|
|
1024
|
+
const keyboardExpandedRef = useRef(false);
|
|
1025
|
+
const toggle = useCallback(() => {
|
|
1026
|
+
const next = !isOpen;
|
|
1027
|
+
setInternalOpen(next);
|
|
1028
|
+
onOpenChange?.(next);
|
|
1029
|
+
keyboardExpandedRef.current = false;
|
|
1030
|
+
}, [isOpen, onOpenChange]);
|
|
1031
|
+
const contextValue = useMemo(() => ({
|
|
1032
|
+
contentId,
|
|
1033
|
+
isOpen,
|
|
1034
|
+
isCollapsible: true,
|
|
1035
|
+
autoScrollOnOpen,
|
|
1036
|
+
toggle
|
|
1037
|
+
}), [
|
|
1038
|
+
contentId,
|
|
1039
|
+
isOpen,
|
|
1040
|
+
autoScrollOnOpen,
|
|
1041
|
+
toggle
|
|
1042
|
+
]);
|
|
1043
|
+
const handleFocusIn = useCallback((e) => {
|
|
1044
|
+
if (!isOpen && e.target.matches(":focus-visible")) {
|
|
1045
|
+
keyboardExpandedRef.current = true;
|
|
1046
|
+
setInternalOpen(true);
|
|
1047
|
+
onOpenChange?.(true);
|
|
1048
|
+
}
|
|
1049
|
+
}, [isOpen, onOpenChange]);
|
|
1050
|
+
const handleFocusOut = useCallback((e) => {
|
|
1051
|
+
if (keyboardExpandedRef.current && !e.currentTarget.contains(e.relatedTarget) && !e.currentTarget.querySelector("[data-active]")) {
|
|
1052
|
+
keyboardExpandedRef.current = false;
|
|
1053
|
+
setInternalOpen(false);
|
|
1054
|
+
onOpenChange?.(false);
|
|
1055
|
+
}
|
|
1056
|
+
}, [onOpenChange]);
|
|
1057
|
+
return /* @__PURE__ */ jsx(SidebarCollapseContext.Provider, {
|
|
1058
|
+
value: contextValue,
|
|
1059
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1060
|
+
ref,
|
|
1061
|
+
"data-open": isOpen || void 0,
|
|
1062
|
+
className: cn("min-w-0", className),
|
|
1063
|
+
onFocus: handleFocusIn,
|
|
1064
|
+
onBlur: handleFocusOut,
|
|
1065
|
+
...props,
|
|
1066
|
+
children
|
|
1067
|
+
})
|
|
1068
|
+
});
|
|
1069
|
+
});
|
|
1070
|
+
SidebarCollapsible.displayName = "Sidebar.Collapsible";
|
|
1071
|
+
/**
|
|
1072
|
+
* Trigger for a sidebar collapsible section. Uses `render` prop to compose
|
|
1073
|
+
* with `Sidebar.MenuButton` or `Sidebar.MenuSubButton`.
|
|
1074
|
+
*
|
|
1075
|
+
* @example
|
|
1076
|
+
* ```tsx
|
|
1077
|
+
* <Sidebar.CollapsibleTrigger
|
|
1078
|
+
* render={
|
|
1079
|
+
* <Sidebar.MenuButton icon={CodeIcon}>
|
|
1080
|
+
* Compute
|
|
1081
|
+
* <Sidebar.MenuChevron />
|
|
1082
|
+
* </Sidebar.MenuButton>
|
|
1083
|
+
* }
|
|
1084
|
+
* />
|
|
1085
|
+
* ```
|
|
1086
|
+
*/
|
|
1087
|
+
function SidebarCollapsibleTrigger({ render }) {
|
|
1088
|
+
const { contentId, isOpen, toggle } = useContext(SidebarCollapseContext);
|
|
1089
|
+
return React.cloneElement(render, {
|
|
1090
|
+
"aria-expanded": isOpen,
|
|
1091
|
+
"aria-controls": contentId,
|
|
1092
|
+
"data-open": isOpen || void 0,
|
|
1093
|
+
onClick: (e) => {
|
|
1094
|
+
const existingOnClick = render.props.onClick;
|
|
1095
|
+
existingOnClick?.(e);
|
|
1096
|
+
toggle();
|
|
1097
|
+
}
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
SidebarCollapsibleTrigger.displayName = "Sidebar.CollapsibleTrigger";
|
|
1101
|
+
/**
|
|
1102
|
+
* Animated collapsible content panel. Uses CSS grid-rows for smooth
|
|
1103
|
+
* height transitions without measuring DOM height.
|
|
1104
|
+
*
|
|
1105
|
+
* Always mounted (no unmount on close) so exit animations play.
|
|
1106
|
+
*/
|
|
1107
|
+
const SidebarCollapsibleContent = forwardRef(({ className, children, ...props }, ref) => {
|
|
1108
|
+
const { contentId, isOpen: isCollapsibleOpen } = useContext(SidebarCollapseContext);
|
|
1109
|
+
const { state, animationDuration } = useSidebar();
|
|
1110
|
+
const { autoScrollOnOpen } = useContext(SidebarCollapseContext);
|
|
1111
|
+
const contentRef = useRef(null);
|
|
1112
|
+
const isOpen = isCollapsibleOpen && state !== "collapsed";
|
|
1113
|
+
useEffect(() => {
|
|
1114
|
+
if (!isOpen || !autoScrollOnOpen) return;
|
|
1115
|
+
const timeout = window.setTimeout(() => {
|
|
1116
|
+
const prefersReducedMotion = window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1117
|
+
contentRef.current?.scrollIntoView({
|
|
1118
|
+
block: "nearest",
|
|
1119
|
+
behavior: prefersReducedMotion ? "auto" : "smooth"
|
|
1120
|
+
});
|
|
1121
|
+
}, animationDuration);
|
|
1122
|
+
return () => window.clearTimeout(timeout);
|
|
1123
|
+
}, [
|
|
1124
|
+
isOpen,
|
|
1125
|
+
autoScrollOnOpen,
|
|
1126
|
+
animationDuration
|
|
1127
|
+
]);
|
|
1128
|
+
const inertRef = useCallback((node) => {
|
|
1129
|
+
if (node) if (!isOpen) node.setAttribute("inert", "");
|
|
1130
|
+
else node.removeAttribute("inert");
|
|
1131
|
+
}, [isOpen]);
|
|
1132
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1133
|
+
ref: useCallback((node) => {
|
|
1134
|
+
contentRef.current = node;
|
|
1135
|
+
inertRef(node);
|
|
1136
|
+
if (typeof ref === "function") ref(node);
|
|
1137
|
+
else if (ref) ref.current = node;
|
|
1138
|
+
}, [ref, inertRef]),
|
|
1139
|
+
id: contentId,
|
|
1140
|
+
role: "region",
|
|
1141
|
+
"aria-hidden": !isOpen,
|
|
1142
|
+
className: cn("grid", "transition-[grid-template-rows] duration-(--sidebar-animation-duration) ease-(--sidebar-easing)", "motion-reduce:transition-none", isOpen ? "grid-rows-[1fr]" : "grid-rows-[0fr]", className),
|
|
1143
|
+
...props,
|
|
1144
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1145
|
+
className: "overflow-hidden",
|
|
1146
|
+
children
|
|
1147
|
+
})
|
|
1148
|
+
});
|
|
1149
|
+
});
|
|
1150
|
+
SidebarCollapsibleContent.displayName = "Sidebar.CollapsibleContent";
|
|
1151
|
+
/**
|
|
1152
|
+
* Auto-rotating chevron for collapsible menu items. Reads open state from
|
|
1153
|
+
* the nearest `SidebarCollapseContext` and rotates accordingly.
|
|
1154
|
+
*
|
|
1155
|
+
* @example
|
|
1156
|
+
* ```tsx
|
|
1157
|
+
* <Sidebar.CollapsibleTrigger
|
|
1158
|
+
* render={<Sidebar.MenuButton icon={CodeIcon}>Compute<Sidebar.MenuChevron /></Sidebar.MenuButton>}
|
|
1159
|
+
* />
|
|
1160
|
+
* ```
|
|
1161
|
+
*/
|
|
1162
|
+
function SidebarMenuChevron({ className }) {
|
|
1163
|
+
const { isOpen, isCollapsible } = useContext(SidebarCollapseContext);
|
|
1164
|
+
return /* @__PURE__ */ jsx(CaretRightIcon, {
|
|
1165
|
+
size: 12,
|
|
1166
|
+
weight: "bold",
|
|
1167
|
+
className: cn("ml-auto shrink-0 opacity-40 transition-[transform,rotate,opacity] duration-200 group-hover/menu-button:opacity-100", isCollapsible && isOpen && "rotate-90", "group-data-[state=collapsed]/sidebar:hidden", className)
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1170
|
+
SidebarMenuChevron.displayName = "Sidebar.MenuChevron";
|
|
1171
|
+
const SlidingViewActiveContext = createContext("");
|
|
1172
|
+
/**
|
|
1173
|
+
* Container for animated horizontal transitions between navigation surfaces
|
|
1174
|
+
* (e.g., account ↔ zone). Inactive views are marked `aria-hidden` and `inert`.
|
|
1175
|
+
*
|
|
1176
|
+
* Animation respects `prefers-reduced-motion`.
|
|
1177
|
+
*
|
|
1178
|
+
* @example
|
|
1179
|
+
* ```tsx
|
|
1180
|
+
* <Sidebar.SlidingViews activeKey={surface} direction="left">
|
|
1181
|
+
* <Sidebar.SlidingView value="account">
|
|
1182
|
+
* <Sidebar.Content>...account nav...</Sidebar.Content>
|
|
1183
|
+
* </Sidebar.SlidingView>
|
|
1184
|
+
* <Sidebar.SlidingView value="zone">
|
|
1185
|
+
* <Sidebar.Content>...zone nav...</Sidebar.Content>
|
|
1186
|
+
* </Sidebar.SlidingView>
|
|
1187
|
+
* </Sidebar.SlidingViews>
|
|
1188
|
+
* ```
|
|
1189
|
+
*/
|
|
1190
|
+
const SidebarSlidingViews = forwardRef(({ activeKey, direction: _direction = "left", className, children, ...props }, ref) => {
|
|
1191
|
+
const activeIndex = React.Children.toArray(children).findIndex((child) => React.isValidElement(child) && child.props.value === activeKey);
|
|
1192
|
+
const prefersReducedMotion = typeof window !== "undefined" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
|
|
1193
|
+
const translateX = activeIndex > 0 ? `-${activeIndex * 100}%` : "0%";
|
|
1194
|
+
return /* @__PURE__ */ jsx(SlidingViewActiveContext.Provider, {
|
|
1195
|
+
value: activeKey,
|
|
1196
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1197
|
+
ref,
|
|
1198
|
+
"data-sidebar": "sliding-views",
|
|
1199
|
+
className: cn("flex min-h-0 max-w-(--sidebar-width) flex-1 overflow-hidden", className),
|
|
1200
|
+
...props,
|
|
1201
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
1202
|
+
className: "flex min-h-0 w-full shrink-0",
|
|
1203
|
+
style: {
|
|
1204
|
+
transform: `translateX(${translateX})`,
|
|
1205
|
+
transition: prefersReducedMotion ? "none" : `transform var(--sidebar-animation-duration) var(--sidebar-easing)`
|
|
1206
|
+
},
|
|
1207
|
+
children
|
|
1208
|
+
})
|
|
1209
|
+
})
|
|
1210
|
+
});
|
|
1211
|
+
});
|
|
1212
|
+
SidebarSlidingViews.displayName = "Sidebar.SlidingViews";
|
|
1213
|
+
/**
|
|
1214
|
+
* Individual panel inside `SlidingViews`. Inactive views are automatically
|
|
1215
|
+
* marked `aria-hidden` and `inert` so they're unreachable by keyboard/screen readers.
|
|
1216
|
+
*/
|
|
1217
|
+
const SidebarSlidingView = forwardRef(({ value, className, children, ...props }, ref) => {
|
|
1218
|
+
const isActive = useContext(SlidingViewActiveContext) === value;
|
|
1219
|
+
const inertRef = useCallback((node) => {
|
|
1220
|
+
if (node) if (!isActive) node.setAttribute("inert", "");
|
|
1221
|
+
else node.removeAttribute("inert");
|
|
1222
|
+
}, [isActive]);
|
|
1223
|
+
return /* @__PURE__ */ jsx("div", {
|
|
1224
|
+
ref: useCallback((node) => {
|
|
1225
|
+
inertRef(node);
|
|
1226
|
+
if (typeof ref === "function") ref(node);
|
|
1227
|
+
else if (ref) ref.current = node;
|
|
1228
|
+
}, [ref, inertRef]),
|
|
1229
|
+
"data-sidebar": "sliding-view",
|
|
1230
|
+
"data-value": value,
|
|
1231
|
+
"aria-hidden": !isActive,
|
|
1232
|
+
className: cn("flex min-h-0 w-full shrink-0 flex-col", !isActive && "pointer-events-none", className),
|
|
1233
|
+
...props,
|
|
1234
|
+
children
|
|
1235
|
+
});
|
|
1236
|
+
});
|
|
1237
|
+
SidebarSlidingView.displayName = "Sidebar.SlidingView";
|
|
1238
|
+
/**
|
|
1239
|
+
* Sidebar — responsive navigation panel with expand/collapse support.
|
|
1240
|
+
*
|
|
1241
|
+
* Compound component: `Sidebar` (root `<aside>`), `.Provider`, `.Header`,
|
|
1242
|
+
* `.Content`, `.Footer`, `.Loading`, `.Group`, `.GroupLabel`,
|
|
1243
|
+
* `.Menu`, `.MenuItem`, `.MenuButton`, `.MenuBadge`,
|
|
1244
|
+
* `.MenuSub`, `.MenuSubItem`, `.MenuSubButton`, `.Separator`,
|
|
1245
|
+
* `.Trigger`, `.Close`, `.Rail`, `.ResizeHandle`, `.MenuChevron`,
|
|
1246
|
+
* `.Collapsible`, `.CollapsibleTrigger`, `.CollapsibleContent`,
|
|
1247
|
+
* `.SlidingViews`, `.SlidingView`.
|
|
1248
|
+
*
|
|
1249
|
+
* @example
|
|
1250
|
+
* ```tsx
|
|
1251
|
+
* <Sidebar.Provider defaultOpen>
|
|
1252
|
+
* <Sidebar>
|
|
1253
|
+
* <Sidebar.Content>
|
|
1254
|
+
* <Sidebar.Group>
|
|
1255
|
+
* <Sidebar.GroupLabel>Overview</Sidebar.GroupLabel>
|
|
1256
|
+
* <Sidebar.Menu>
|
|
1257
|
+
* <Sidebar.MenuButton icon={HouseIcon} active>Home</Sidebar.MenuButton>
|
|
1258
|
+
* <Sidebar.MenuButton icon={GlobeIcon}>Domains</Sidebar.MenuButton>
|
|
1259
|
+
* </Sidebar.Menu>
|
|
1260
|
+
* </Sidebar.Group>
|
|
1261
|
+
* </Sidebar.Content>
|
|
1262
|
+
* <Sidebar.Footer>
|
|
1263
|
+
* <Sidebar.Trigger />
|
|
1264
|
+
* </Sidebar.Footer>
|
|
1265
|
+
* </Sidebar>
|
|
1266
|
+
* </Sidebar.Provider>
|
|
1267
|
+
* ```
|
|
1268
|
+
*/
|
|
1269
|
+
const Sidebar = Object.assign(SidebarRoot, {
|
|
1270
|
+
Provider: SidebarProvider,
|
|
1271
|
+
Header: SidebarHeader,
|
|
1272
|
+
Content: SidebarContent,
|
|
1273
|
+
Footer: SidebarFooter,
|
|
1274
|
+
Loading: SidebarLoading,
|
|
1275
|
+
Group: SidebarGroup,
|
|
1276
|
+
GroupLabel: SidebarGroupLabel,
|
|
1277
|
+
Menu: SidebarMenu,
|
|
1278
|
+
MenuItem: SidebarMenuItem,
|
|
1279
|
+
MenuButton: SidebarMenuButton,
|
|
1280
|
+
MenuBadge: SidebarMenuBadge,
|
|
1281
|
+
MenuSub: SidebarMenuSub,
|
|
1282
|
+
MenuSubItem: SidebarMenuSubItem,
|
|
1283
|
+
MenuSubButton: SidebarMenuSubButton,
|
|
1284
|
+
Separator: SidebarSeparator,
|
|
1285
|
+
Trigger: SidebarTrigger,
|
|
1286
|
+
Close: SidebarClose,
|
|
1287
|
+
Rail: SidebarRail,
|
|
1288
|
+
ResizeHandle: SidebarResizeHandle,
|
|
1289
|
+
MenuChevron: SidebarMenuChevron,
|
|
1290
|
+
Collapsible: SidebarCollapsible,
|
|
1291
|
+
CollapsibleTrigger: SidebarCollapsibleTrigger,
|
|
1292
|
+
CollapsibleContent: SidebarCollapsibleContent,
|
|
1293
|
+
SlidingViews: SidebarSlidingViews,
|
|
1294
|
+
SlidingView: SidebarSlidingView
|
|
1295
|
+
});
|
|
1296
|
+
//#endregion
|
|
1297
|
+
export { useSidebar as A, SidebarRail as C, SidebarSlidingView as D, SidebarSeparator as E, SidebarSlidingViews as O, SidebarProvider as S, SidebarRoot as T, SidebarMenuChevron as _, SidebarCollapsible as a, SidebarMenuSubButton as b, SidebarContent as c, SidebarGroupLabel as d, SidebarHeader as f, SidebarMenuButton as g, SidebarMenuBadge as h, Sidebar as i, SidebarTrigger as k, SidebarFooter as l, SidebarMenu as m, KUMO_SIDEBAR_STYLING as n, SidebarCollapsibleContent as o, SidebarLoading as p, KUMO_SIDEBAR_VARIANTS as r, SidebarCollapsibleTrigger as s, KUMO_SIDEBAR_DEFAULT_VARIANTS as t, SidebarGroup as u, SidebarMenuItem as v, SidebarResizeHandle as w, SidebarMenuSubItem as x, SidebarMenuSub as y };
|