@navecss/base-ui 0.2.0 → 0.4.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.
Files changed (80) hide show
  1. package/README.md +70 -8
  2. package/dist/accordion/index.js +0 -1
  3. package/dist/alert-dialog/index.js +0 -1
  4. package/dist/autocomplete/index.js +0 -1
  5. package/dist/avatar/index.js +0 -1
  6. package/dist/button/index.js +0 -1
  7. package/dist/checkbox/index.js +0 -1
  8. package/dist/checkbox-group/index.js +0 -1
  9. package/dist/collapsible/index.js +0 -1
  10. package/dist/combobox/index.js +0 -1
  11. package/dist/combobox/parts.generated.d.ts +0 -2
  12. package/dist/combobox/parts.generated.js +0 -1
  13. package/dist/context-menu/index.js +0 -1
  14. package/dist/css.d.ts +1 -0
  15. package/dist/dialog/index.js +0 -1
  16. package/dist/field/index.js +0 -1
  17. package/dist/fieldset/index.js +0 -1
  18. package/dist/form/index.js +0 -1
  19. package/dist/index.js +0 -1
  20. package/dist/input/index.js +0 -1
  21. package/dist/menu/index.js +0 -1
  22. package/dist/menubar/index.js +0 -1
  23. package/dist/meter/index.js +0 -1
  24. package/dist/navigation-menu/index.js +0 -1
  25. package/dist/number-field/index.js +0 -1
  26. package/dist/part.d.ts +0 -5
  27. package/dist/popover/index.js +0 -1
  28. package/dist/preview-card/index.js +0 -1
  29. package/dist/progress/index.js +0 -1
  30. package/dist/radio/index.js +0 -1
  31. package/dist/radio-group/index.js +0 -1
  32. package/dist/registry/base-ui-accordion.json +55 -0
  33. package/dist/registry/base-ui-alert-dialog.json +55 -0
  34. package/dist/registry/base-ui-autocomplete.json +55 -0
  35. package/dist/registry/base-ui-avatar.json +55 -0
  36. package/dist/registry/base-ui-button.json +55 -0
  37. package/dist/registry/base-ui-checkbox-group.json +55 -0
  38. package/dist/registry/base-ui-checkbox.json +55 -0
  39. package/dist/registry/base-ui-collapsible.json +55 -0
  40. package/dist/registry/base-ui-combobox.json +55 -0
  41. package/dist/registry/base-ui-context-menu.json +55 -0
  42. package/dist/registry/base-ui-dialog.json +55 -0
  43. package/dist/registry/base-ui-field.json +55 -0
  44. package/dist/registry/base-ui-fieldset.json +55 -0
  45. package/dist/registry/base-ui-input.json +55 -0
  46. package/dist/registry/base-ui-menu.json +55 -0
  47. package/dist/registry/base-ui-menubar.json +55 -0
  48. package/dist/registry/base-ui-meter.json +55 -0
  49. package/dist/registry/base-ui-navigation-menu.json +55 -0
  50. package/dist/registry/base-ui-number-field.json +55 -0
  51. package/dist/registry/base-ui-popover.json +55 -0
  52. package/dist/registry/base-ui-preview-card.json +55 -0
  53. package/dist/registry/base-ui-progress.json +55 -0
  54. package/dist/registry/base-ui-radio-group.json +55 -0
  55. package/dist/registry/base-ui-radio.json +55 -0
  56. package/dist/registry/base-ui-scroll-area.json +55 -0
  57. package/dist/registry/base-ui-select.json +55 -0
  58. package/dist/registry/base-ui-separator.json +55 -0
  59. package/dist/registry/base-ui-slider.json +55 -0
  60. package/dist/registry/base-ui-switch.json +55 -0
  61. package/dist/registry/base-ui-tabs.json +55 -0
  62. package/dist/registry/base-ui-toast.json +55 -0
  63. package/dist/registry/base-ui-toggle-group.json +55 -0
  64. package/dist/registry/base-ui-toggle.json +55 -0
  65. package/dist/registry/base-ui-toolbar.json +55 -0
  66. package/dist/registry/base-ui-tooltip.json +55 -0
  67. package/dist/registry/registry.json +1757 -0
  68. package/dist/scroll-area/index.js +0 -1
  69. package/dist/select/index.js +0 -1
  70. package/dist/separator/index.js +0 -1
  71. package/dist/slider/index.js +0 -1
  72. package/dist/styles.css +33 -15
  73. package/dist/switch/index.js +0 -1
  74. package/dist/tabs/index.js +0 -1
  75. package/dist/toast/index.js +0 -1
  76. package/dist/toggle/index.js +0 -1
  77. package/dist/toggle-group/index.js +0 -1
  78. package/dist/toolbar/index.js +0 -1
  79. package/dist/tooltip/index.js +0 -1
  80. package/package.json +31 -20
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "dependencies": [
4
+ "@base-ui/react",
5
+ "@navecss/tokens",
6
+ "react",
7
+ "react-dom"
8
+ ],
9
+ "description": "NaveCSS's styling of the Base UI Navigation Menu, as files copied into your project: Base UI's parts from @base-ui/react, which Base UI's maintainers publish, with Nave's classes from a CSS Module that reads Nave's tokens.",
10
+ "docs": "Import { NavigationMenu } from the nave-navigation-menu file just written, not from @navecss/base-ui/navigation-menu.\nKeep @navecss/tokens/css imported: the copied rules read Nave's tokens. They sit in a CSS Module, so your build needs CSS Modules.\nThe copy needs @base-ui/react 1.3 or later in the 1.x line, @navecss/tokens 0.5.0 or later before 1.0, and React 18 or 19. A version already in your package.json is kept; a missing package is installed at its latest version.\nGenerated from @navecss/base-ui 0.4.0. No later release changes these files.",
11
+ "files": [
12
+ {
13
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n\nexport * as NavigationMenu from './nave-navigation-menu.parts'\nexport type * from '@base-ui/react/navigation-menu'\n",
14
+ "path": "registry/nave/nave-navigation-menu.ts",
15
+ "target": "components/nave/nave-navigation-menu.ts",
16
+ "type": "registry:file"
17
+ },
18
+ {
19
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n/* eslint-disable @typescript-eslint/no-namespace -- the types keep the names and generic defaults @navecss/base-ui exports, so code typed against the package compiles here unchanged */\nimport { NavigationMenu as Base } from '@base-ui/react/navigation-menu'\nimport styles from './nave-navigation-menu.module.css'\n\nimport { wrapPart } from './nave-navigation-menu.wrap'\n\nexport const Root: typeof Base.Root = /*#__PURE__*/ (() => Base.Root)()\nexport declare namespace Root {\n export type State = Base.Root.State\n export type Props = Base.Root.Props\n export type Actions = Base.Root.Actions\n export type ChangeEventReason = Base.Root.ChangeEventReason\n export type ChangeEventDetails = Base.Root.ChangeEventDetails\n}\nexport const List: typeof Base.List = /*#__PURE__*/ (() => wrapPart(Base.List, styles.navigationMenuList))()\nexport declare namespace List {\n export type State = Base.List.State\n export type Props = Base.List.Props\n}\nexport const Item: typeof Base.Item = /*#__PURE__*/ (() => Base.Item)()\nexport declare namespace Item {\n export type State = Base.Item.State\n export type Props = Base.Item.Props\n}\nexport const Content: typeof Base.Content = /*#__PURE__*/ (() => Base.Content)()\nexport declare namespace Content {\n export type State = Base.Content.State\n export type Props = Base.Content.Props\n}\nexport const Trigger: typeof Base.Trigger = /*#__PURE__*/ (() => wrapPart(Base.Trigger, styles.navigationMenuTrigger))()\nexport declare namespace Trigger {\n export type State = Base.Trigger.State\n export type Props = Base.Trigger.Props\n}\nexport const Portal: typeof Base.Portal = /*#__PURE__*/ (() => Base.Portal)()\nexport declare namespace Portal {\n export type State = Base.Portal.State\n export type Props = Base.Portal.Props\n}\nexport const Positioner: typeof Base.Positioner = /*#__PURE__*/ (() => Base.Positioner)()\nexport declare namespace Positioner {\n export type State = Base.Positioner.State\n export type Props = Base.Positioner.Props\n}\nexport const Viewport: typeof Base.Viewport = /*#__PURE__*/ (() => Base.Viewport)()\nexport declare namespace Viewport {\n export type State = Base.Viewport.State\n export type Props = Base.Viewport.Props\n}\nexport const Backdrop: typeof Base.Backdrop = /*#__PURE__*/ (() => Base.Backdrop)()\nexport declare namespace Backdrop {\n export type State = Base.Backdrop.State\n export type Props = Base.Backdrop.Props\n}\nexport const Popup: typeof Base.Popup = /*#__PURE__*/ (() => wrapPart(Base.Popup, `${styles.popoverPopup} ${styles.navigationMenuFade}`))()\nexport declare namespace Popup {\n export type State = Base.Popup.State\n export type Props = Base.Popup.Props\n}\nexport const Arrow: typeof Base.Arrow = /*#__PURE__*/ (() => wrapPart(Base.Arrow, `${styles.arrow} ${styles.arrowInline}`))()\nexport declare namespace Arrow {\n export type State = Base.Arrow.State\n export type Props = Base.Arrow.Props\n}\nexport const Link: typeof Base.Link = /*#__PURE__*/ (() => wrapPart(Base.Link, `${styles.toolbarLink} ${styles.currentLink}`))()\nexport declare namespace Link {\n export type State = Base.Link.State\n export type Props = Base.Link.Props\n}\nexport const Icon: typeof Base.Icon = /*#__PURE__*/ (() => wrapPart(Base.Icon, styles.navigationMenuIcon))()\nexport declare namespace Icon {\n export type State = Base.Icon.State\n export type Props = Base.Icon.Props\n}\n",
20
+ "path": "registry/nave/nave-navigation-menu.parts.ts",
21
+ "target": "components/nave/nave-navigation-menu.parts.ts",
22
+ "type": "registry:file"
23
+ },
24
+ {
25
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n\n/**\n * The one helper every wrapped part is built with. A wrapped part is Base UI's part with Nave's\n * class added to its `className` (a string is joined after Nave's class, a function of state is\n * wrapped, never stringified) and, for the Button family, the typed `variant` and `size` props\n * turned into `data-nave-*` attributes (as `size` is for an Avatar). Everything else (every other\n * prop, the ref, `render`) goes to Base UI's part untouched, and nothing here reads state, layout\n * or style: what the wrapper adds is chosen by the props the consumer passed.\n */\nimport {\n createElement,\n type ElementType,\n forwardRef,\n type ForwardRefExoticComponent,\n type RefAttributes,\n useMemo,\n} from 'react'\n\n/**\n * The size an Avatar takes. It is not a Base UI prop of any Avatar part, so nothing is shadowed.\n */\nexport interface AvatarProps {\n size?: 'lg' | 'md' | 'sm'\n}\n\nexport interface VariantProps {\n size?: 'md' | 'sm'\n variant?: 'ghost' | 'primary' | 'secondary'\n}\n\nexport interface SizeProps {\n size?: 'md' | 'sm'\n}\n\ntype Variants = 'avatar' | 'size' | 'variant'\n\nconst isOffDefault = (size: unknown, variants: Variants): boolean =>\n size === 'sm' || (variants === 'avatar' && size === 'lg')\n\ntype ClassNameFunction = (state: unknown) => string | undefined\ntype ClassName = ClassNameFunction | string | undefined\ntype Props = Record<string, unknown>\n\nconst join = (own: string, consumer: string | undefined): string =>\n consumer === undefined || consumer === '' ? own : `${own} ${consumer}`\n\n/**\n * Nave's class composed with the consumer's. The result is memoized on the consumer's own value,\n * so a consumer that passes the same function gets the same function through and a memoized part\n * does not re-render for it.\n */\nconst useClassName = (own: string, consumer: ClassName): ClassName =>\n useMemo(\n () =>\n typeof consumer === 'function'\n ? (state: unknown) => join(own, consumer(state))\n : join(own, consumer),\n [own, consumer],\n )\n\n/**\n * The attributes a non-default variant or size renders as, and the props left over. `variant` and\n * `size` are consumed here and never reach Base UI's part, which has no such props.\n */\nconst variantAttributes = (props: Props, variants: Variants): Props => {\n const { size, variant, ...rest } = props\n return {\n ...rest,\n ...(variants === 'variant' &&\n (variant === 'primary' || variant === 'ghost') && { 'data-nave-variant': variant }),\n ...(isOffDefault(size, variants) && { 'data-nave-size': size }),\n }\n}\n\nconst build = (\n part: ElementType,\n own: string,\n variants: Variants | undefined,\n): ForwardRefExoticComponent<Props & RefAttributes<unknown>> =>\n forwardRef<unknown, Props>(function NaveBaseUiPart(props, ref) {\n const forwarded = variants === undefined ? props : variantAttributes(props, variants)\n const className = useClassName(own, forwarded.className as ClassName)\n return createElement(part, { ...forwarded, className, ref })\n })\n\n/**\n * The wrapped part, or nothing where the installed Base UI has no such part (one younger than the\n * peer floor): the export stays absent instead of becoming a component that throws when rendered.\n */\nconst wrap = <T>(part: unknown, className: string, variants: Variants | undefined): T =>\n part === undefined\n ? (part as T)\n : (build(part as ElementType, className, variants) as unknown as T)\n\n/**\n * A part that is Base UI's own, with `className` composed. Typed as the part it wraps. A part the\n * installed Base UI does not have stays absent.\n */\nexport const wrapPart = <P>(part: P, className: string): P => wrap<P>(part, className, undefined)\n\n/**\n * A part of the Button family: as `wrapPart`, and its props gain `variant` and `size`. The type it\n * is given is the type the generated module declares for it, written from Base UI's own public\n * `Props` so that a generic part (a trigger's `Payload`) stays generic.\n */\nexport const wrapVariantPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'variant')\n\n/**\n * A part that gains `size` alone, as the Toggle does. A part the installed Base UI does not have\n * stays absent, as for `wrapPart`.\n */\nexport const wrapSizePart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'size')\n\n/**\n * A part that gains `size` with the Avatar's three values. A part the installed Base UI does not\n * have stays absent, as for `wrapPart`.\n */\nexport const wrapAvatarPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'avatar')\n",
26
+ "path": "registry/nave/nave-navigation-menu.wrap.ts",
27
+ "target": "components/nave/nave-navigation-menu.wrap.ts",
28
+ "type": "registry:file"
29
+ },
30
+ {
31
+ "content": "/* SPDX-License-Identifier: MIT */\n/* Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE. */\n@layer tokens.defaults, tokens.presets, reset, atomic, components.nave, components.consumer, overrides;\n\n@layer components.consumer {\n .popoverPopup {\n box-sizing: border-box;\n background-color: var(--nave-color-surface-overlay);\n color: var(--nave-color-content-primary);\n border: var(--nave-border-width-sm) solid var(--nave-color-border-default);\n border-radius: var(--nave-radius-control);\n box-shadow: var(--nave-shadow-overlay);\n padding: var(--nave-spacing-content-md);\n font-size: var(--nave-font-size-sm);\n max-block-size: var(--available-height);\n overflow-y: auto;\n scroll-padding: var(--nave-spacing-content-md);\n }\n .arrow {\n &[data-side=\"top\"],\n &[data-side=\"bottom\"],\n &[data-side=\"left\"],\n &[data-side=\"right\"] {\n position: absolute;\n box-sizing: border-box;\n inline-size: 8px;\n block-size: 8px;\n background-color: inherit;\n border-style: inherit;\n border-width: inherit;\n border-color: inherit;\n border-top-style: none;\n border-left-style: none;\n }\n\n &[data-side=\"top\"] {\n bottom: -4px;\n rotate: 45deg;\n }\n\n &[data-side=\"bottom\"] {\n top: -4px;\n rotate: 225deg;\n }\n\n &[data-side=\"left\"] {\n right: -4px;\n rotate: -45deg;\n }\n\n &[data-side=\"right\"] {\n left: -4px;\n rotate: 135deg;\n }\n }\n .toolbarLink {\n display: inline-flex;\n align-items: center;\n padding-inline: var(--nave-spacing-control-sm);\n color: var(--nave-color-content-link);\n font-size: var(--nave-font-size-sm);\n /* stylelint-disable-next-line declaration-property-value-disallowed-list -- the outline the &:focus-visible rule for this class draws replaces the browser's default focus indicator; keep that rule while this declaration stays. */\n outline: none;\n &:focus-visible {\n outline-style: solid;\n outline-width: var(--nave-border-width-focus, 2px);\n outline-color: var(--nave-color-border-focus, currentColor);\n outline-offset: 2px;\n }\n }\n .arrowInline {\n &[data-side=\"inline-start\"],\n &[data-side=\"inline-end\"] {\n position: absolute;\n box-sizing: border-box;\n inline-size: 8px;\n block-size: 8px;\n background-color: inherit;\n border-style: inherit;\n border-width: inherit;\n border-color: inherit;\n border-top-style: none;\n border-left-style: none;\n }\n\n &[data-side=\"inline-start\"] {\n inset-inline-end: -4px;\n rotate: -45deg;\n }\n\n &[data-side=\"inline-end\"] {\n inset-inline-start: -4px;\n rotate: 135deg;\n }\n\n &[data-side=\"inline-start\"]:dir(rtl) {\n rotate: 135deg;\n }\n\n &[data-side=\"inline-end\"]:dir(rtl) {\n rotate: -45deg;\n }\n }\n .navigationMenuList {\n display: flex;\n align-items: center;\n gap: var(--nave-spacing-control-xs);\n margin: 0;\n padding: 0;\n list-style: none;\n }\n .navigationMenuTrigger {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--nave-spacing-control-sm);\n min-block-size: var(--nave-size-control-md);\n padding-block: 0;\n padding-inline: var(--nave-spacing-control-lg);\n border: var(--nave-border-width-sm) solid transparent;\n border-radius: var(--nave-radius-control);\n background-color: transparent;\n color: var(--nave-color-content-primary);\n font-family: inherit;\n font-size: var(--nave-font-size-sm);\n font-weight: var(--nave-font-weight-medium);\n line-height: var(--nave-line-height-tight);\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n &:hover:not(:disabled, [aria-disabled=\"true\"]),\n &:active:not(:disabled, [aria-disabled=\"true\"]) {\n background-color: var(--nave-color-action-highlight);\n }\n & {\n /* stylelint-disable-next-line declaration-property-value-disallowed-list -- the outline the &:focus-visible rule for this class draws replaces the browser's default focus indicator; keep that rule while this declaration stays. */\n outline: none;\n }\n &:focus-visible {\n outline-style: solid;\n outline-width: var(--nave-border-width-focus, 2px);\n outline-color: var(--nave-color-border-focus, currentColor);\n outline-offset: 2px;\n }\n }\n .navigationMenuIcon {\n display: inline-flex;\n flex: none;\n transition-property: rotate;\n transition-duration: var(--nave-motion-duration-fast);\n transition-timing-function: var(--nave-motion-easing-standard);\n [aria-expanded=\"true\"] > & {\n rotate: 180deg;\n }\n @media (prefers-reduced-motion: reduce) {\n & {\n transition-duration: calc(0 * var(--nave-motion-duration-fast));\n }\n }\n }\n .navigationMenuFade {\n transition-property: opacity;\n transition-duration: var(--nave-motion-duration-fast);\n transition-timing-function: var(--nave-motion-easing-decelerate);\n &[data-starting-style],\n &[data-ending-style] {\n opacity: 0;\n }\n &[data-ending-style] {\n transition-property: none;\n }\n @media (prefers-reduced-motion: reduce) {\n & {\n transition-duration: calc(0 * var(--nave-motion-duration-fast));\n }\n }\n }\n .currentLink {\n padding-block: var(--nave-border-width-lg);\n &[aria-current=\"page\"] {\n text-decoration-line: underline;\n text-decoration-thickness: var(--nave-border-width-lg);\n }\n }\n}\n",
32
+ "path": "registry/nave/nave-navigation-menu.module.css",
33
+ "target": "components/nave/nave-navigation-menu.module.css",
34
+ "type": "registry:file"
35
+ },
36
+ {
37
+ "content": "MIT License\n\nCopyright (c) 2026 Nave Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
38
+ "path": "registry/nave/NAVECSS-LICENSE",
39
+ "target": "components/nave/NAVECSS-LICENSE",
40
+ "type": "registry:file"
41
+ }
42
+ ],
43
+ "meta": {
44
+ "peerDependencies": {
45
+ "@base-ui/react": "^1.3.0",
46
+ "@navecss/tokens": ">=0.5.0 <1.0.0",
47
+ "react": "^18 || ^19",
48
+ "react-dom": "^18 || ^19"
49
+ },
50
+ "version": "0.4.0"
51
+ },
52
+ "name": "base-ui-navigation-menu",
53
+ "title": "NaveCSS styling of Base UI Navigation Menu",
54
+ "type": "registry:item"
55
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "dependencies": [
4
+ "@base-ui/react",
5
+ "@navecss/tokens",
6
+ "react",
7
+ "react-dom"
8
+ ],
9
+ "description": "NaveCSS's styling of the Base UI Number Field, as files copied into your project: Base UI's parts from @base-ui/react, which Base UI's maintainers publish, with Nave's classes from a CSS Module that reads Nave's tokens.",
10
+ "docs": "Import { NumberField } from the nave-number-field file just written, not from @navecss/base-ui/number-field.\nKeep @navecss/tokens/css imported: the copied rules read Nave's tokens. They sit in a CSS Module, so your build needs CSS Modules.\nThe copy needs @base-ui/react 1.3 or later in the 1.x line, @navecss/tokens 0.5.0 or later before 1.0, and React 18 or 19. A version already in your package.json is kept; a missing package is installed at its latest version.\nGenerated from @navecss/base-ui 0.4.0. No later release changes these files.",
11
+ "files": [
12
+ {
13
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n\nexport * as NumberField from './nave-number-field.parts'\nexport type * from '@base-ui/react/number-field'\n",
14
+ "path": "registry/nave/nave-number-field.ts",
15
+ "target": "components/nave/nave-number-field.ts",
16
+ "type": "registry:file"
17
+ },
18
+ {
19
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n/* eslint-disable @typescript-eslint/no-namespace -- the types keep the names and generic defaults @navecss/base-ui exports, so code typed against the package compiles here unchanged */\nimport { NumberField as Base } from '@base-ui/react/number-field'\nimport styles from './nave-number-field.module.css'\n\nimport { wrapPart } from './nave-number-field.wrap'\n\nexport const Root: typeof Base.Root = /*#__PURE__*/ (() => Base.Root)()\nexport declare namespace Root {\n export type State = Base.Root.State\n export type Props = Base.Root.Props\n export type ChangeEventReason = Base.Root.ChangeEventReason\n export type ChangeEventDetails = Base.Root.ChangeEventDetails\n export type CommitEventReason = Base.Root.CommitEventReason\n export type CommitEventDetails = Base.Root.CommitEventDetails\n}\nexport const Group: typeof Base.Group = /*#__PURE__*/ (() => wrapPart(Base.Group, styles.numberFieldGroup))()\nexport declare namespace Group {\n export type State = Base.Group.State\n export type Props = Base.Group.Props\n}\nexport const Increment: typeof Base.Increment = /*#__PURE__*/ (() => wrapPart(Base.Increment, styles.numberFieldStepper))()\nexport declare namespace Increment {\n export type State = Base.Increment.State\n export type Props = Base.Increment.Props\n}\nexport const Decrement: typeof Base.Decrement = /*#__PURE__*/ (() => wrapPart(Base.Decrement, styles.numberFieldStepper))()\nexport declare namespace Decrement {\n export type State = Base.Decrement.State\n export type Props = Base.Decrement.Props\n}\nexport const Input: typeof Base.Input = /*#__PURE__*/ (() => wrapPart(Base.Input, styles.numberFieldInput))()\nexport declare namespace Input {\n export type State = Base.Input.State\n export type Props = Base.Input.Props\n}\nexport const ScrubArea: typeof Base.ScrubArea = /*#__PURE__*/ (() => wrapPart(Base.ScrubArea, styles.numberFieldScrubArea))()\nexport declare namespace ScrubArea {\n export type State = Base.ScrubArea.State\n export type Props = Base.ScrubArea.Props\n}\nexport const ScrubAreaCursor: typeof Base.ScrubAreaCursor = /*#__PURE__*/ (() => Base.ScrubAreaCursor)()\nexport declare namespace ScrubAreaCursor {\n export type State = Base.ScrubAreaCursor.State\n export type Props = Base.ScrubAreaCursor.Props\n}\n",
20
+ "path": "registry/nave/nave-number-field.parts.ts",
21
+ "target": "components/nave/nave-number-field.parts.ts",
22
+ "type": "registry:file"
23
+ },
24
+ {
25
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n\n/**\n * The one helper every wrapped part is built with. A wrapped part is Base UI's part with Nave's\n * class added to its `className` (a string is joined after Nave's class, a function of state is\n * wrapped, never stringified) and, for the Button family, the typed `variant` and `size` props\n * turned into `data-nave-*` attributes (as `size` is for an Avatar). Everything else (every other\n * prop, the ref, `render`) goes to Base UI's part untouched, and nothing here reads state, layout\n * or style: what the wrapper adds is chosen by the props the consumer passed.\n */\nimport {\n createElement,\n type ElementType,\n forwardRef,\n type ForwardRefExoticComponent,\n type RefAttributes,\n useMemo,\n} from 'react'\n\n/**\n * The size an Avatar takes. It is not a Base UI prop of any Avatar part, so nothing is shadowed.\n */\nexport interface AvatarProps {\n size?: 'lg' | 'md' | 'sm'\n}\n\nexport interface VariantProps {\n size?: 'md' | 'sm'\n variant?: 'ghost' | 'primary' | 'secondary'\n}\n\nexport interface SizeProps {\n size?: 'md' | 'sm'\n}\n\ntype Variants = 'avatar' | 'size' | 'variant'\n\nconst isOffDefault = (size: unknown, variants: Variants): boolean =>\n size === 'sm' || (variants === 'avatar' && size === 'lg')\n\ntype ClassNameFunction = (state: unknown) => string | undefined\ntype ClassName = ClassNameFunction | string | undefined\ntype Props = Record<string, unknown>\n\nconst join = (own: string, consumer: string | undefined): string =>\n consumer === undefined || consumer === '' ? own : `${own} ${consumer}`\n\n/**\n * Nave's class composed with the consumer's. The result is memoized on the consumer's own value,\n * so a consumer that passes the same function gets the same function through and a memoized part\n * does not re-render for it.\n */\nconst useClassName = (own: string, consumer: ClassName): ClassName =>\n useMemo(\n () =>\n typeof consumer === 'function'\n ? (state: unknown) => join(own, consumer(state))\n : join(own, consumer),\n [own, consumer],\n )\n\n/**\n * The attributes a non-default variant or size renders as, and the props left over. `variant` and\n * `size` are consumed here and never reach Base UI's part, which has no such props.\n */\nconst variantAttributes = (props: Props, variants: Variants): Props => {\n const { size, variant, ...rest } = props\n return {\n ...rest,\n ...(variants === 'variant' &&\n (variant === 'primary' || variant === 'ghost') && { 'data-nave-variant': variant }),\n ...(isOffDefault(size, variants) && { 'data-nave-size': size }),\n }\n}\n\nconst build = (\n part: ElementType,\n own: string,\n variants: Variants | undefined,\n): ForwardRefExoticComponent<Props & RefAttributes<unknown>> =>\n forwardRef<unknown, Props>(function NaveBaseUiPart(props, ref) {\n const forwarded = variants === undefined ? props : variantAttributes(props, variants)\n const className = useClassName(own, forwarded.className as ClassName)\n return createElement(part, { ...forwarded, className, ref })\n })\n\n/**\n * The wrapped part, or nothing where the installed Base UI has no such part (one younger than the\n * peer floor): the export stays absent instead of becoming a component that throws when rendered.\n */\nconst wrap = <T>(part: unknown, className: string, variants: Variants | undefined): T =>\n part === undefined\n ? (part as T)\n : (build(part as ElementType, className, variants) as unknown as T)\n\n/**\n * A part that is Base UI's own, with `className` composed. Typed as the part it wraps. A part the\n * installed Base UI does not have stays absent.\n */\nexport const wrapPart = <P>(part: P, className: string): P => wrap<P>(part, className, undefined)\n\n/**\n * A part of the Button family: as `wrapPart`, and its props gain `variant` and `size`. The type it\n * is given is the type the generated module declares for it, written from Base UI's own public\n * `Props` so that a generic part (a trigger's `Payload`) stays generic.\n */\nexport const wrapVariantPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'variant')\n\n/**\n * A part that gains `size` alone, as the Toggle does. A part the installed Base UI does not have\n * stays absent, as for `wrapPart`.\n */\nexport const wrapSizePart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'size')\n\n/**\n * A part that gains `size` with the Avatar's three values. A part the installed Base UI does not\n * have stays absent, as for `wrapPart`.\n */\nexport const wrapAvatarPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'avatar')\n",
26
+ "path": "registry/nave/nave-number-field.wrap.ts",
27
+ "target": "components/nave/nave-number-field.wrap.ts",
28
+ "type": "registry:file"
29
+ },
30
+ {
31
+ "content": "/* SPDX-License-Identifier: MIT */\n/* Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE. */\n@layer tokens.defaults, tokens.presets, reset, atomic, components.nave, components.consumer, overrides;\n\n@layer components.consumer {\n .numberFieldGroup {\n box-sizing: border-box;\n display: flex;\n align-items: stretch;\n min-block-size: var(--nave-size-control-md);\n border: var(--nave-border-width-sm) solid var(--nave-color-border-control);\n border-radius: var(--nave-radius-control);\n padding: calc(var(--nave-border-width-mark) - var(--nave-border-width-sm));\n background-color: transparent;\n color: var(--nave-color-content-primary);\n &:has(> [aria-invalid=\"true\"]) {\n border-color: var(--nave-color-feedback-danger);\n border-width: var(--nave-border-width-mark);\n padding: 0;\n }\n &[data-disabled] {\n border-color: var(--nave-color-border-disabled);\n color: var(--nave-color-content-disabled);\n }\n }\n .numberFieldInput {\n flex: 1;\n min-inline-size: 0;\n padding-block: 0;\n padding-inline: var(--nave-spacing-control-md);\n border: 0;\n background-color: transparent;\n color: inherit;\n font-family: inherit;\n font-size: var(--nave-font-size-sm);\n &::placeholder {\n color: var(--nave-color-content-tertiary);\n opacity: 1;\n }\n & {\n /* stylelint-disable-next-line declaration-property-value-disallowed-list -- the outline the &:focus-visible rule for this class draws replaces the browser's default focus indicator; keep that rule while this declaration stays. */\n outline: none;\n }\n &:focus-visible {\n outline-style: solid;\n outline-width: var(--nave-border-width-focus, 2px);\n outline-color: var(--nave-color-border-focus, currentColor);\n outline-offset: 2px;\n }\n }\n .numberFieldStepper {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n inline-size: var(--nave-size-control-sm);\n padding: 0;\n border: 0;\n background-color: transparent;\n color: inherit;\n font-family: inherit;\n cursor: pointer;\n &:disabled,\n &[aria-disabled=\"true\"] {\n color: var(--nave-color-content-disabled);\n cursor: not-allowed;\n }\n }\n .numberFieldScrubArea {\n cursor: ew-resize;\n }\n}\n",
32
+ "path": "registry/nave/nave-number-field.module.css",
33
+ "target": "components/nave/nave-number-field.module.css",
34
+ "type": "registry:file"
35
+ },
36
+ {
37
+ "content": "MIT License\n\nCopyright (c) 2026 Nave Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
38
+ "path": "registry/nave/NAVECSS-LICENSE",
39
+ "target": "components/nave/NAVECSS-LICENSE",
40
+ "type": "registry:file"
41
+ }
42
+ ],
43
+ "meta": {
44
+ "peerDependencies": {
45
+ "@base-ui/react": "^1.3.0",
46
+ "@navecss/tokens": ">=0.5.0 <1.0.0",
47
+ "react": "^18 || ^19",
48
+ "react-dom": "^18 || ^19"
49
+ },
50
+ "version": "0.4.0"
51
+ },
52
+ "name": "base-ui-number-field",
53
+ "title": "NaveCSS styling of Base UI Number Field",
54
+ "type": "registry:item"
55
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "dependencies": [
4
+ "@base-ui/react",
5
+ "@navecss/tokens",
6
+ "react",
7
+ "react-dom"
8
+ ],
9
+ "description": "NaveCSS's styling of the Base UI Popover, as files copied into your project: Base UI's parts from @base-ui/react, which Base UI's maintainers publish, with Nave's classes from a CSS Module that reads Nave's tokens.",
10
+ "docs": "Import { Popover } from the nave-popover file just written, not from @navecss/base-ui/popover.\nKeep @navecss/tokens/css imported: the copied rules read Nave's tokens. They sit in a CSS Module, so your build needs CSS Modules.\nThe copy needs @base-ui/react 1.3 or later in the 1.x line, @navecss/tokens 0.5.0 or later before 1.0, and React 18 or 19. A version already in your package.json is kept; a missing package is installed at its latest version.\nGenerated from @navecss/base-ui 0.4.0. No later release changes these files.",
11
+ "files": [
12
+ {
13
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n\nexport * as Popover from './nave-popover.parts'\nexport type * from '@base-ui/react/popover'\n",
14
+ "path": "registry/nave/nave-popover.ts",
15
+ "target": "components/nave/nave-popover.ts",
16
+ "type": "registry:file"
17
+ },
18
+ {
19
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n/* eslint-disable @typescript-eslint/no-namespace -- the types keep the names and generic defaults @navecss/base-ui exports, so code typed against the package compiles here unchanged */\nimport type { ReactElement, RefAttributes } from 'react'\nimport { Popover as Base } from '@base-ui/react/popover'\nimport styles from './nave-popover.module.css'\n\nimport { wrapPart, wrapVariantPart, type VariantProps } from './nave-popover.wrap'\n\nexport const Root: typeof Base.Root = /*#__PURE__*/ (() => Base.Root)()\nexport declare namespace Root {\n export type State = Base.Root.State\n export type Props<Payload = unknown> = Base.Root.Props<Payload>\n export type Actions = Base.Root.Actions\n export type ChangeEventReason = Base.Root.ChangeEventReason\n export type ChangeEventDetails = Base.Root.ChangeEventDetails\n}\nexport const Trigger: <Payload>(props: Omit<Base.Trigger.Props<Payload>, 'ref'> & RefAttributes<HTMLElement> & VariantProps) => ReactElement = /*#__PURE__*/ (() => wrapVariantPart(Base.Trigger, styles.button))()\nexport type Trigger = typeof Trigger\nexport declare namespace Trigger {\n export type State = Base.Trigger.State\n export type Props<Payload = unknown> = Base.Trigger.Props<Payload> & VariantProps\n}\nexport const Portal: typeof Base.Portal = /*#__PURE__*/ (() => Base.Portal)()\nexport declare namespace Portal {\n export type State = Base.Portal.State\n export type Props = Base.Portal.Props\n}\nexport const Positioner: typeof Base.Positioner = /*#__PURE__*/ (() => Base.Positioner)()\nexport declare namespace Positioner {\n export type State = Base.Positioner.State\n export type Props = Base.Positioner.Props\n}\nexport const Popup: typeof Base.Popup = /*#__PURE__*/ (() => wrapPart(Base.Popup, `${styles.popoverPopup} ${styles.popupMotion}`))()\nexport declare namespace Popup {\n export type State = Base.Popup.State\n export type Props = Base.Popup.Props\n}\nexport const Arrow: typeof Base.Arrow = /*#__PURE__*/ (() => wrapPart(Base.Arrow, `${styles.arrow} ${styles.arrowInline}`))()\nexport declare namespace Arrow {\n export type State = Base.Arrow.State\n export type Props = Base.Arrow.Props\n}\nexport const Backdrop: typeof Base.Backdrop = /*#__PURE__*/ (() => Base.Backdrop)()\nexport declare namespace Backdrop {\n export type State = Base.Backdrop.State\n export type Props = Base.Backdrop.Props\n}\nexport const Title: typeof Base.Title = /*#__PURE__*/ (() => wrapPart(Base.Title, styles.title))()\nexport declare namespace Title {\n export type State = Base.Title.State\n export type Props = Base.Title.Props\n}\nexport const Description: typeof Base.Description = /*#__PURE__*/ (() => wrapPart(Base.Description, styles.description))()\nexport declare namespace Description {\n export type State = Base.Description.State\n export type Props = Base.Description.Props\n}\nexport const Close: (props: Omit<Base.Close.Props, 'ref'> & RefAttributes<HTMLButtonElement> & VariantProps) => ReactElement = /*#__PURE__*/ (() => wrapVariantPart(Base.Close, styles.button))()\nexport declare namespace Close {\n export type State = Base.Close.State\n export type Props = Base.Close.Props & VariantProps\n}\nexport const Viewport: typeof Base.Viewport = /*#__PURE__*/ (() => Base.Viewport)()\nexport declare namespace Viewport {\n export type Props = Base.Viewport.Props\n export type State = Base.Viewport.State\n}\nexport const createHandle: typeof Base.createHandle = /*#__PURE__*/ (() => Base.createHandle)()\nexport const Handle: typeof Base.Handle = /*#__PURE__*/ (() => Base.Handle)()\nexport type Handle<Payload> = Base.Handle<Payload>\n",
20
+ "path": "registry/nave/nave-popover.parts.ts",
21
+ "target": "components/nave/nave-popover.parts.ts",
22
+ "type": "registry:file"
23
+ },
24
+ {
25
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n\n/**\n * The one helper every wrapped part is built with. A wrapped part is Base UI's part with Nave's\n * class added to its `className` (a string is joined after Nave's class, a function of state is\n * wrapped, never stringified) and, for the Button family, the typed `variant` and `size` props\n * turned into `data-nave-*` attributes (as `size` is for an Avatar). Everything else (every other\n * prop, the ref, `render`) goes to Base UI's part untouched, and nothing here reads state, layout\n * or style: what the wrapper adds is chosen by the props the consumer passed.\n */\nimport {\n createElement,\n type ElementType,\n forwardRef,\n type ForwardRefExoticComponent,\n type RefAttributes,\n useMemo,\n} from 'react'\n\n/**\n * The size an Avatar takes. It is not a Base UI prop of any Avatar part, so nothing is shadowed.\n */\nexport interface AvatarProps {\n size?: 'lg' | 'md' | 'sm'\n}\n\nexport interface VariantProps {\n size?: 'md' | 'sm'\n variant?: 'ghost' | 'primary' | 'secondary'\n}\n\nexport interface SizeProps {\n size?: 'md' | 'sm'\n}\n\ntype Variants = 'avatar' | 'size' | 'variant'\n\nconst isOffDefault = (size: unknown, variants: Variants): boolean =>\n size === 'sm' || (variants === 'avatar' && size === 'lg')\n\ntype ClassNameFunction = (state: unknown) => string | undefined\ntype ClassName = ClassNameFunction | string | undefined\ntype Props = Record<string, unknown>\n\nconst join = (own: string, consumer: string | undefined): string =>\n consumer === undefined || consumer === '' ? own : `${own} ${consumer}`\n\n/**\n * Nave's class composed with the consumer's. The result is memoized on the consumer's own value,\n * so a consumer that passes the same function gets the same function through and a memoized part\n * does not re-render for it.\n */\nconst useClassName = (own: string, consumer: ClassName): ClassName =>\n useMemo(\n () =>\n typeof consumer === 'function'\n ? (state: unknown) => join(own, consumer(state))\n : join(own, consumer),\n [own, consumer],\n )\n\n/**\n * The attributes a non-default variant or size renders as, and the props left over. `variant` and\n * `size` are consumed here and never reach Base UI's part, which has no such props.\n */\nconst variantAttributes = (props: Props, variants: Variants): Props => {\n const { size, variant, ...rest } = props\n return {\n ...rest,\n ...(variants === 'variant' &&\n (variant === 'primary' || variant === 'ghost') && { 'data-nave-variant': variant }),\n ...(isOffDefault(size, variants) && { 'data-nave-size': size }),\n }\n}\n\nconst build = (\n part: ElementType,\n own: string,\n variants: Variants | undefined,\n): ForwardRefExoticComponent<Props & RefAttributes<unknown>> =>\n forwardRef<unknown, Props>(function NaveBaseUiPart(props, ref) {\n const forwarded = variants === undefined ? props : variantAttributes(props, variants)\n const className = useClassName(own, forwarded.className as ClassName)\n return createElement(part, { ...forwarded, className, ref })\n })\n\n/**\n * The wrapped part, or nothing where the installed Base UI has no such part (one younger than the\n * peer floor): the export stays absent instead of becoming a component that throws when rendered.\n */\nconst wrap = <T>(part: unknown, className: string, variants: Variants | undefined): T =>\n part === undefined\n ? (part as T)\n : (build(part as ElementType, className, variants) as unknown as T)\n\n/**\n * A part that is Base UI's own, with `className` composed. Typed as the part it wraps. A part the\n * installed Base UI does not have stays absent.\n */\nexport const wrapPart = <P>(part: P, className: string): P => wrap<P>(part, className, undefined)\n\n/**\n * A part of the Button family: as `wrapPart`, and its props gain `variant` and `size`. The type it\n * is given is the type the generated module declares for it, written from Base UI's own public\n * `Props` so that a generic part (a trigger's `Payload`) stays generic.\n */\nexport const wrapVariantPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'variant')\n\n/**\n * A part that gains `size` alone, as the Toggle does. A part the installed Base UI does not have\n * stays absent, as for `wrapPart`.\n */\nexport const wrapSizePart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'size')\n\n/**\n * A part that gains `size` with the Avatar's three values. A part the installed Base UI does not\n * have stays absent, as for `wrapPart`.\n */\nexport const wrapAvatarPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'avatar')\n",
26
+ "path": "registry/nave/nave-popover.wrap.ts",
27
+ "target": "components/nave/nave-popover.wrap.ts",
28
+ "type": "registry:file"
29
+ },
30
+ {
31
+ "content": "/* SPDX-License-Identifier: MIT */\n/* Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE. */\n@layer tokens.defaults, tokens.presets, reset, atomic, components.nave, components.consumer, overrides;\n\n@layer components.consumer {\n .popoverPopup {\n box-sizing: border-box;\n background-color: var(--nave-color-surface-overlay);\n color: var(--nave-color-content-primary);\n border: var(--nave-border-width-sm) solid var(--nave-color-border-default);\n border-radius: var(--nave-radius-control);\n box-shadow: var(--nave-shadow-overlay);\n padding: var(--nave-spacing-content-md);\n font-size: var(--nave-font-size-sm);\n max-block-size: var(--available-height);\n overflow-y: auto;\n scroll-padding: var(--nave-spacing-content-md);\n }\n .arrow {\n &[data-side=\"top\"],\n &[data-side=\"bottom\"],\n &[data-side=\"left\"],\n &[data-side=\"right\"] {\n position: absolute;\n box-sizing: border-box;\n inline-size: 8px;\n block-size: 8px;\n background-color: inherit;\n border-style: inherit;\n border-width: inherit;\n border-color: inherit;\n border-top-style: none;\n border-left-style: none;\n }\n\n &[data-side=\"top\"] {\n bottom: -4px;\n rotate: 45deg;\n }\n\n &[data-side=\"bottom\"] {\n top: -4px;\n rotate: 225deg;\n }\n\n &[data-side=\"left\"] {\n right: -4px;\n rotate: -45deg;\n }\n\n &[data-side=\"right\"] {\n left: -4px;\n rotate: 135deg;\n }\n }\n .title {\n margin: 0;\n font-size: var(--nave-font-size-lg);\n font-weight: var(--nave-font-weight-semibold);\n line-height: var(--nave-line-height-tight);\n }\n .description {\n margin: 0;\n font-size: var(--nave-font-size-sm);\n line-height: var(--nave-line-height-base);\n color: var(--nave-color-content-secondary);\n }\n .button {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--nave-spacing-control-sm);\n min-block-size: var(--nave-size-control-md);\n padding-block: 0;\n padding-inline: var(--nave-spacing-control-lg);\n border: var(--nave-border-width-sm) solid var(--nave-color-border-control);\n border-radius: var(--nave-radius-control);\n background-color: var(--nave-color-action-secondary);\n color: var(--nave-color-content-primary);\n font-family: inherit;\n font-size: var(--nave-font-size-sm);\n font-weight: var(--nave-font-weight-medium);\n line-height: var(--nave-line-height-tight);\n white-space: nowrap;\n cursor: pointer;\n user-select: none;\n &[data-nave-size=\"sm\"] {\n min-block-size: var(--nave-size-control-sm);\n padding-inline: var(--nave-spacing-control-md);\n }\n &[data-nave-variant=\"primary\"] {\n background-color: var(--nave-color-action-primary);\n border-color: transparent;\n color: var(--nave-color-on-action-primary);\n }\n &[data-nave-variant=\"primary\"]:hover:not(\n :disabled,\n [aria-disabled=\"true\"]\n ) {\n background-color: var(--nave-color-action-primary-hover);\n }\n &[data-nave-variant=\"primary\"]:active:not(\n :disabled,\n [aria-disabled=\"true\"]\n ) {\n background-color: var(--nave-color-action-primary-active);\n }\n &:disabled,\n &[aria-disabled=\"true\"] {\n background-color: transparent;\n border-color: var(--nave-color-border-disabled);\n color: var(--nave-color-content-disabled);\n cursor: not-allowed;\n }\n &[data-nave-variant=\"ghost\"] {\n background-color: transparent;\n border-color: transparent;\n }\n &[data-nave-variant=\"ghost\"]:hover:not(:disabled, [aria-disabled=\"true\"]) {\n background-color: var(--nave-color-action-highlight);\n }\n &[data-nave-variant=\"ghost\"]:active:not(:disabled, [aria-disabled=\"true\"]) {\n background-color: var(--nave-color-action-highlight);\n }\n &[data-nave-variant=\"ghost\"][aria-expanded=\"true\"]:is(\n [aria-haspopup=\"menu\"],\n [aria-haspopup=\"true\"],\n [aria-haspopup=\"dialog\"]\n ):not(:disabled, [aria-disabled=\"true\"]) {\n background-color: var(--nave-color-action-highlight);\n }\n &:not([data-nave-variant=\"primary\"], [data-nave-variant=\"ghost\"]):hover:not(\n :disabled,\n [aria-disabled=\"true\"]\n ) {\n background-color: var(--nave-color-action-secondary-hover);\n }\n &:not(\n [data-nave-variant=\"primary\"],\n [data-nave-variant=\"ghost\"]\n ):active:not(:disabled, [aria-disabled=\"true\"]) {\n background-color: var(--nave-color-action-secondary-active);\n }\n & {\n /* stylelint-disable-next-line declaration-property-value-disallowed-list -- the outline the &:focus-visible rule for this class draws replaces the browser's default focus indicator; keep that rule while this declaration stays. */\n outline: none;\n }\n &:focus-visible {\n outline-style: solid;\n outline-width: var(--nave-border-width-focus, 2px);\n outline-color: var(--nave-color-border-focus, currentColor);\n outline-offset: 2px;\n }\n }\n .popupMotion {\n transition-property: opacity;\n transition-duration: var(--nave-motion-duration-fast);\n transition-timing-function: var(--nave-motion-easing-decelerate);\n &[data-starting-style],\n &[data-ending-style] {\n opacity: 0;\n }\n &[data-ending-style] {\n transition-timing-function: var(--nave-motion-easing-accelerate);\n }\n &[data-instant] {\n transition-duration: var(--nave-motion-duration-instant);\n }\n @media (prefers-reduced-motion: reduce) {\n &,\n &[data-instant] {\n transition-duration: calc(0 * var(--nave-motion-duration-fast));\n }\n }\n }\n .arrowInline {\n &[data-side=\"inline-start\"],\n &[data-side=\"inline-end\"] {\n position: absolute;\n box-sizing: border-box;\n inline-size: 8px;\n block-size: 8px;\n background-color: inherit;\n border-style: inherit;\n border-width: inherit;\n border-color: inherit;\n border-top-style: none;\n border-left-style: none;\n }\n\n &[data-side=\"inline-start\"] {\n inset-inline-end: -4px;\n rotate: -45deg;\n }\n\n &[data-side=\"inline-end\"] {\n inset-inline-start: -4px;\n rotate: 135deg;\n }\n\n &[data-side=\"inline-start\"]:dir(rtl) {\n rotate: 135deg;\n }\n\n &[data-side=\"inline-end\"]:dir(rtl) {\n rotate: -45deg;\n }\n }\n}\n",
32
+ "path": "registry/nave/nave-popover.module.css",
33
+ "target": "components/nave/nave-popover.module.css",
34
+ "type": "registry:file"
35
+ },
36
+ {
37
+ "content": "MIT License\n\nCopyright (c) 2026 Nave Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
38
+ "path": "registry/nave/NAVECSS-LICENSE",
39
+ "target": "components/nave/NAVECSS-LICENSE",
40
+ "type": "registry:file"
41
+ }
42
+ ],
43
+ "meta": {
44
+ "peerDependencies": {
45
+ "@base-ui/react": "^1.3.0",
46
+ "@navecss/tokens": ">=0.5.0 <1.0.0",
47
+ "react": "^18 || ^19",
48
+ "react-dom": "^18 || ^19"
49
+ },
50
+ "version": "0.4.0"
51
+ },
52
+ "name": "base-ui-popover",
53
+ "title": "NaveCSS styling of Base UI Popover",
54
+ "type": "registry:item"
55
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "dependencies": [
4
+ "@base-ui/react",
5
+ "@navecss/tokens",
6
+ "react",
7
+ "react-dom"
8
+ ],
9
+ "description": "NaveCSS's styling of the Base UI Preview Card, as files copied into your project: Base UI's parts from @base-ui/react, which Base UI's maintainers publish, with Nave's classes from a CSS Module that reads Nave's tokens.",
10
+ "docs": "Import { PreviewCard } from the nave-preview-card file just written, not from @navecss/base-ui/preview-card.\nKeep @navecss/tokens/css imported: the copied rules read Nave's tokens. They sit in a CSS Module, so your build needs CSS Modules.\nThe copy needs @base-ui/react 1.3 or later in the 1.x line, @navecss/tokens 0.5.0 or later before 1.0, and React 18 or 19. A version already in your package.json is kept; a missing package is installed at its latest version.\nGenerated from @navecss/base-ui 0.4.0. No later release changes these files.",
11
+ "files": [
12
+ {
13
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n\nexport * as PreviewCard from './nave-preview-card.parts'\nexport type * from '@base-ui/react/preview-card'\n",
14
+ "path": "registry/nave/nave-preview-card.ts",
15
+ "target": "components/nave/nave-preview-card.ts",
16
+ "type": "registry:file"
17
+ },
18
+ {
19
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n/* eslint-disable @typescript-eslint/no-namespace -- the types keep the names and generic defaults @navecss/base-ui exports, so code typed against the package compiles here unchanged */\nimport { PreviewCard as Base } from '@base-ui/react/preview-card'\nimport styles from './nave-preview-card.module.css'\n\nimport { wrapPart } from './nave-preview-card.wrap'\n\nexport const Root: typeof Base.Root = /*#__PURE__*/ (() => Base.Root)()\nexport declare namespace Root {\n export type State = Base.Root.State\n export type Props<Payload = unknown> = Base.Root.Props<Payload>\n export type Actions = Base.Root.Actions\n export type ChangeEventReason = Base.Root.ChangeEventReason\n export type ChangeEventDetails = Base.Root.ChangeEventDetails\n}\nexport const Portal: typeof Base.Portal = /*#__PURE__*/ (() => Base.Portal)()\nexport declare namespace Portal {\n export type State = Base.Portal.State\n export type Props = Base.Portal.Props\n}\nexport const Trigger: typeof Base.Trigger = /*#__PURE__*/ (() => Base.Trigger)()\nexport type Trigger = typeof Trigger\nexport declare namespace Trigger {\n export type State = Base.Trigger.State\n export type Props<Payload = unknown> = Base.Trigger.Props<Payload>\n}\nexport const Positioner: typeof Base.Positioner = /*#__PURE__*/ (() => Base.Positioner)()\nexport declare namespace Positioner {\n export type State = Base.Positioner.State\n export type Props = Base.Positioner.Props\n}\nexport const Popup: typeof Base.Popup = /*#__PURE__*/ (() => wrapPart(Base.Popup, `${styles.popoverPopup} ${styles.popupFade}`))()\nexport declare namespace Popup {\n export type State = Base.Popup.State\n export type Props = Base.Popup.Props\n}\nexport const Arrow: typeof Base.Arrow = /*#__PURE__*/ (() => wrapPart(Base.Arrow, `${styles.arrow} ${styles.arrowInline}`))()\nexport declare namespace Arrow {\n export type State = Base.Arrow.State\n export type Props = Base.Arrow.Props\n}\nexport const Backdrop: typeof Base.Backdrop = /*#__PURE__*/ (() => Base.Backdrop)()\nexport declare namespace Backdrop {\n export type State = Base.Backdrop.State\n export type Props = Base.Backdrop.Props\n}\nexport const Viewport: typeof Base.Viewport = /*#__PURE__*/ (() => Base.Viewport)()\nexport declare namespace Viewport {\n export type Props = Base.Viewport.Props\n export type State = Base.Viewport.State\n}\nexport const createHandle: typeof Base.createHandle = /*#__PURE__*/ (() => Base.createHandle)()\nexport const Handle: typeof Base.Handle = /*#__PURE__*/ (() => Base.Handle)()\nexport type Handle<Payload> = Base.Handle<Payload>\n",
20
+ "path": "registry/nave/nave-preview-card.parts.ts",
21
+ "target": "components/nave/nave-preview-card.parts.ts",
22
+ "type": "registry:file"
23
+ },
24
+ {
25
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n\n/**\n * The one helper every wrapped part is built with. A wrapped part is Base UI's part with Nave's\n * class added to its `className` (a string is joined after Nave's class, a function of state is\n * wrapped, never stringified) and, for the Button family, the typed `variant` and `size` props\n * turned into `data-nave-*` attributes (as `size` is for an Avatar). Everything else (every other\n * prop, the ref, `render`) goes to Base UI's part untouched, and nothing here reads state, layout\n * or style: what the wrapper adds is chosen by the props the consumer passed.\n */\nimport {\n createElement,\n type ElementType,\n forwardRef,\n type ForwardRefExoticComponent,\n type RefAttributes,\n useMemo,\n} from 'react'\n\n/**\n * The size an Avatar takes. It is not a Base UI prop of any Avatar part, so nothing is shadowed.\n */\nexport interface AvatarProps {\n size?: 'lg' | 'md' | 'sm'\n}\n\nexport interface VariantProps {\n size?: 'md' | 'sm'\n variant?: 'ghost' | 'primary' | 'secondary'\n}\n\nexport interface SizeProps {\n size?: 'md' | 'sm'\n}\n\ntype Variants = 'avatar' | 'size' | 'variant'\n\nconst isOffDefault = (size: unknown, variants: Variants): boolean =>\n size === 'sm' || (variants === 'avatar' && size === 'lg')\n\ntype ClassNameFunction = (state: unknown) => string | undefined\ntype ClassName = ClassNameFunction | string | undefined\ntype Props = Record<string, unknown>\n\nconst join = (own: string, consumer: string | undefined): string =>\n consumer === undefined || consumer === '' ? own : `${own} ${consumer}`\n\n/**\n * Nave's class composed with the consumer's. The result is memoized on the consumer's own value,\n * so a consumer that passes the same function gets the same function through and a memoized part\n * does not re-render for it.\n */\nconst useClassName = (own: string, consumer: ClassName): ClassName =>\n useMemo(\n () =>\n typeof consumer === 'function'\n ? (state: unknown) => join(own, consumer(state))\n : join(own, consumer),\n [own, consumer],\n )\n\n/**\n * The attributes a non-default variant or size renders as, and the props left over. `variant` and\n * `size` are consumed here and never reach Base UI's part, which has no such props.\n */\nconst variantAttributes = (props: Props, variants: Variants): Props => {\n const { size, variant, ...rest } = props\n return {\n ...rest,\n ...(variants === 'variant' &&\n (variant === 'primary' || variant === 'ghost') && { 'data-nave-variant': variant }),\n ...(isOffDefault(size, variants) && { 'data-nave-size': size }),\n }\n}\n\nconst build = (\n part: ElementType,\n own: string,\n variants: Variants | undefined,\n): ForwardRefExoticComponent<Props & RefAttributes<unknown>> =>\n forwardRef<unknown, Props>(function NaveBaseUiPart(props, ref) {\n const forwarded = variants === undefined ? props : variantAttributes(props, variants)\n const className = useClassName(own, forwarded.className as ClassName)\n return createElement(part, { ...forwarded, className, ref })\n })\n\n/**\n * The wrapped part, or nothing where the installed Base UI has no such part (one younger than the\n * peer floor): the export stays absent instead of becoming a component that throws when rendered.\n */\nconst wrap = <T>(part: unknown, className: string, variants: Variants | undefined): T =>\n part === undefined\n ? (part as T)\n : (build(part as ElementType, className, variants) as unknown as T)\n\n/**\n * A part that is Base UI's own, with `className` composed. Typed as the part it wraps. A part the\n * installed Base UI does not have stays absent.\n */\nexport const wrapPart = <P>(part: P, className: string): P => wrap<P>(part, className, undefined)\n\n/**\n * A part of the Button family: as `wrapPart`, and its props gain `variant` and `size`. The type it\n * is given is the type the generated module declares for it, written from Base UI's own public\n * `Props` so that a generic part (a trigger's `Payload`) stays generic.\n */\nexport const wrapVariantPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'variant')\n\n/**\n * A part that gains `size` alone, as the Toggle does. A part the installed Base UI does not have\n * stays absent, as for `wrapPart`.\n */\nexport const wrapSizePart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'size')\n\n/**\n * A part that gains `size` with the Avatar's three values. A part the installed Base UI does not\n * have stays absent, as for `wrapPart`.\n */\nexport const wrapAvatarPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'avatar')\n",
26
+ "path": "registry/nave/nave-preview-card.wrap.ts",
27
+ "target": "components/nave/nave-preview-card.wrap.ts",
28
+ "type": "registry:file"
29
+ },
30
+ {
31
+ "content": "/* SPDX-License-Identifier: MIT */\n/* Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE. */\n@layer tokens.defaults, tokens.presets, reset, atomic, components.nave, components.consumer, overrides;\n\n@layer components.consumer {\n .popoverPopup {\n box-sizing: border-box;\n background-color: var(--nave-color-surface-overlay);\n color: var(--nave-color-content-primary);\n border: var(--nave-border-width-sm) solid var(--nave-color-border-default);\n border-radius: var(--nave-radius-control);\n box-shadow: var(--nave-shadow-overlay);\n padding: var(--nave-spacing-content-md);\n font-size: var(--nave-font-size-sm);\n max-block-size: var(--available-height);\n overflow-y: auto;\n scroll-padding: var(--nave-spacing-content-md);\n }\n .arrow {\n &[data-side=\"top\"],\n &[data-side=\"bottom\"],\n &[data-side=\"left\"],\n &[data-side=\"right\"] {\n position: absolute;\n box-sizing: border-box;\n inline-size: 8px;\n block-size: 8px;\n background-color: inherit;\n border-style: inherit;\n border-width: inherit;\n border-color: inherit;\n border-top-style: none;\n border-left-style: none;\n }\n\n &[data-side=\"top\"] {\n bottom: -4px;\n rotate: 45deg;\n }\n\n &[data-side=\"bottom\"] {\n top: -4px;\n rotate: 225deg;\n }\n\n &[data-side=\"left\"] {\n right: -4px;\n rotate: -45deg;\n }\n\n &[data-side=\"right\"] {\n left: -4px;\n rotate: 135deg;\n }\n }\n .popupFade {\n transition-property: opacity;\n transition-duration: var(--nave-motion-duration-fast);\n transition-timing-function: var(--nave-motion-easing-decelerate);\n &[data-starting-style],\n &[data-ending-style] {\n opacity: 0;\n }\n &[data-ending-style] {\n transition-timing-function: var(--nave-motion-easing-accelerate);\n }\n @media (prefers-reduced-motion: reduce) {\n &,\n &[data-instant] {\n transition-duration: calc(0 * var(--nave-motion-duration-fast));\n }\n }\n }\n .arrowInline {\n &[data-side=\"inline-start\"],\n &[data-side=\"inline-end\"] {\n position: absolute;\n box-sizing: border-box;\n inline-size: 8px;\n block-size: 8px;\n background-color: inherit;\n border-style: inherit;\n border-width: inherit;\n border-color: inherit;\n border-top-style: none;\n border-left-style: none;\n }\n\n &[data-side=\"inline-start\"] {\n inset-inline-end: -4px;\n rotate: -45deg;\n }\n\n &[data-side=\"inline-end\"] {\n inset-inline-start: -4px;\n rotate: 135deg;\n }\n\n &[data-side=\"inline-start\"]:dir(rtl) {\n rotate: 135deg;\n }\n\n &[data-side=\"inline-end\"]:dir(rtl) {\n rotate: -45deg;\n }\n }\n}\n",
32
+ "path": "registry/nave/nave-preview-card.module.css",
33
+ "target": "components/nave/nave-preview-card.module.css",
34
+ "type": "registry:file"
35
+ },
36
+ {
37
+ "content": "MIT License\n\nCopyright (c) 2026 Nave Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
38
+ "path": "registry/nave/NAVECSS-LICENSE",
39
+ "target": "components/nave/NAVECSS-LICENSE",
40
+ "type": "registry:file"
41
+ }
42
+ ],
43
+ "meta": {
44
+ "peerDependencies": {
45
+ "@base-ui/react": "^1.3.0",
46
+ "@navecss/tokens": ">=0.5.0 <1.0.0",
47
+ "react": "^18 || ^19",
48
+ "react-dom": "^18 || ^19"
49
+ },
50
+ "version": "0.4.0"
51
+ },
52
+ "name": "base-ui-preview-card",
53
+ "title": "NaveCSS styling of Base UI Preview Card",
54
+ "type": "registry:item"
55
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "dependencies": [
4
+ "@base-ui/react",
5
+ "@navecss/tokens",
6
+ "react",
7
+ "react-dom"
8
+ ],
9
+ "description": "NaveCSS's styling of the Base UI Progress, as files copied into your project: Base UI's parts from @base-ui/react, which Base UI's maintainers publish, with Nave's classes from a CSS Module that reads Nave's tokens.",
10
+ "docs": "Import { Progress } from the nave-progress file just written, not from @navecss/base-ui/progress.\nKeep @navecss/tokens/css imported: the copied rules read Nave's tokens. They sit in a CSS Module, so your build needs CSS Modules.\nThe copy needs @base-ui/react 1.3 or later in the 1.x line, @navecss/tokens 0.5.0 or later before 1.0, and React 18 or 19. A version already in your package.json is kept; a missing package is installed at its latest version.\nGenerated from @navecss/base-ui 0.4.0. No later release changes these files.",
11
+ "files": [
12
+ {
13
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n\nexport * as Progress from './nave-progress.parts'\nexport type * from '@base-ui/react/progress'\n",
14
+ "path": "registry/nave/nave-progress.ts",
15
+ "target": "components/nave/nave-progress.ts",
16
+ "type": "registry:file"
17
+ },
18
+ {
19
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n/* eslint-disable @typescript-eslint/no-namespace -- the types keep the names and generic defaults @navecss/base-ui exports, so code typed against the package compiles here unchanged */\nimport { Progress as Base } from '@base-ui/react/progress'\nimport styles from './nave-progress.module.css'\n\nimport { wrapPart } from './nave-progress.wrap'\n\nexport const Root: typeof Base.Root = /*#__PURE__*/ (() => wrapPart(Base.Root, styles.valueBar))()\nexport declare namespace Root {\n export type State = Base.Root.State\n export type Props = Base.Root.Props\n}\nexport const Track: typeof Base.Track = /*#__PURE__*/ (() => wrapPart(Base.Track, styles.valueBarTrack))()\nexport declare namespace Track {\n export type State = Base.Track.State\n export type Props = Base.Track.Props\n}\nexport const Indicator: typeof Base.Indicator = /*#__PURE__*/ (() => wrapPart(Base.Indicator, styles.valueBarIndicator))()\nexport declare namespace Indicator {\n export type State = Base.Indicator.State\n export type Props = Base.Indicator.Props\n}\nexport const Value: typeof Base.Value = /*#__PURE__*/ (() => wrapPart(Base.Value, styles.sliderValue))()\nexport declare namespace Value {\n export type State = Base.Value.State\n export type Props = Base.Value.Props\n}\nexport const Label: typeof Base.Label = /*#__PURE__*/ (() => wrapPart(Base.Label, styles.label))()\nexport declare namespace Label {\n export type State = Base.Label.State\n export type Props = Base.Label.Props\n}\nexport type Status = Base.Status\n",
20
+ "path": "registry/nave/nave-progress.parts.ts",
21
+ "target": "components/nave/nave-progress.parts.ts",
22
+ "type": "registry:file"
23
+ },
24
+ {
25
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n\n/**\n * The one helper every wrapped part is built with. A wrapped part is Base UI's part with Nave's\n * class added to its `className` (a string is joined after Nave's class, a function of state is\n * wrapped, never stringified) and, for the Button family, the typed `variant` and `size` props\n * turned into `data-nave-*` attributes (as `size` is for an Avatar). Everything else (every other\n * prop, the ref, `render`) goes to Base UI's part untouched, and nothing here reads state, layout\n * or style: what the wrapper adds is chosen by the props the consumer passed.\n */\nimport {\n createElement,\n type ElementType,\n forwardRef,\n type ForwardRefExoticComponent,\n type RefAttributes,\n useMemo,\n} from 'react'\n\n/**\n * The size an Avatar takes. It is not a Base UI prop of any Avatar part, so nothing is shadowed.\n */\nexport interface AvatarProps {\n size?: 'lg' | 'md' | 'sm'\n}\n\nexport interface VariantProps {\n size?: 'md' | 'sm'\n variant?: 'ghost' | 'primary' | 'secondary'\n}\n\nexport interface SizeProps {\n size?: 'md' | 'sm'\n}\n\ntype Variants = 'avatar' | 'size' | 'variant'\n\nconst isOffDefault = (size: unknown, variants: Variants): boolean =>\n size === 'sm' || (variants === 'avatar' && size === 'lg')\n\ntype ClassNameFunction = (state: unknown) => string | undefined\ntype ClassName = ClassNameFunction | string | undefined\ntype Props = Record<string, unknown>\n\nconst join = (own: string, consumer: string | undefined): string =>\n consumer === undefined || consumer === '' ? own : `${own} ${consumer}`\n\n/**\n * Nave's class composed with the consumer's. The result is memoized on the consumer's own value,\n * so a consumer that passes the same function gets the same function through and a memoized part\n * does not re-render for it.\n */\nconst useClassName = (own: string, consumer: ClassName): ClassName =>\n useMemo(\n () =>\n typeof consumer === 'function'\n ? (state: unknown) => join(own, consumer(state))\n : join(own, consumer),\n [own, consumer],\n )\n\n/**\n * The attributes a non-default variant or size renders as, and the props left over. `variant` and\n * `size` are consumed here and never reach Base UI's part, which has no such props.\n */\nconst variantAttributes = (props: Props, variants: Variants): Props => {\n const { size, variant, ...rest } = props\n return {\n ...rest,\n ...(variants === 'variant' &&\n (variant === 'primary' || variant === 'ghost') && { 'data-nave-variant': variant }),\n ...(isOffDefault(size, variants) && { 'data-nave-size': size }),\n }\n}\n\nconst build = (\n part: ElementType,\n own: string,\n variants: Variants | undefined,\n): ForwardRefExoticComponent<Props & RefAttributes<unknown>> =>\n forwardRef<unknown, Props>(function NaveBaseUiPart(props, ref) {\n const forwarded = variants === undefined ? props : variantAttributes(props, variants)\n const className = useClassName(own, forwarded.className as ClassName)\n return createElement(part, { ...forwarded, className, ref })\n })\n\n/**\n * The wrapped part, or nothing where the installed Base UI has no such part (one younger than the\n * peer floor): the export stays absent instead of becoming a component that throws when rendered.\n */\nconst wrap = <T>(part: unknown, className: string, variants: Variants | undefined): T =>\n part === undefined\n ? (part as T)\n : (build(part as ElementType, className, variants) as unknown as T)\n\n/**\n * A part that is Base UI's own, with `className` composed. Typed as the part it wraps. A part the\n * installed Base UI does not have stays absent.\n */\nexport const wrapPart = <P>(part: P, className: string): P => wrap<P>(part, className, undefined)\n\n/**\n * A part of the Button family: as `wrapPart`, and its props gain `variant` and `size`. The type it\n * is given is the type the generated module declares for it, written from Base UI's own public\n * `Props` so that a generic part (a trigger's `Payload`) stays generic.\n */\nexport const wrapVariantPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'variant')\n\n/**\n * A part that gains `size` alone, as the Toggle does. A part the installed Base UI does not have\n * stays absent, as for `wrapPart`.\n */\nexport const wrapSizePart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'size')\n\n/**\n * A part that gains `size` with the Avatar's three values. A part the installed Base UI does not\n * have stays absent, as for `wrapPart`.\n */\nexport const wrapAvatarPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'avatar')\n",
26
+ "path": "registry/nave/nave-progress.wrap.ts",
27
+ "target": "components/nave/nave-progress.wrap.ts",
28
+ "type": "registry:file"
29
+ },
30
+ {
31
+ "content": "/* SPDX-License-Identifier: MIT */\n/* Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE. */\n@layer tokens.defaults, tokens.presets, reset, atomic, components.nave, components.consumer, overrides;\n\n@layer components.consumer {\n .label {\n font-size: var(--nave-font-size-sm);\n font-weight: var(--nave-font-weight-medium);\n color: var(--nave-color-content-primary);\n }\n .sliderValue {\n font-size: var(--nave-font-size-sm);\n font-variant-numeric: tabular-nums;\n color: var(--nave-color-content-secondary);\n }\n .valueBar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n justify-content: space-between;\n gap: var(--nave-spacing-control-xs);\n }\n .valueBarTrack {\n box-sizing: border-box;\n flex: 0 0 100%;\n min-block-size: calc(\n var(--nave-border-width-lg) + 4 * var(--nave-border-width-sm)\n );\n padding: var(--nave-border-width-sm);\n border: var(--nave-border-width-sm) solid var(--nave-color-border-control);\n border-radius: var(--nave-radius-full);\n display: flex;\n align-items: center;\n }\n .valueBarIndicator {\n box-sizing: border-box;\n max-block-size: var(--nave-border-width-lg);\n border-block: calc(var(--nave-border-width-lg) / 2) solid currentColor;\n border-radius: var(--nave-radius-full);\n color: var(--nave-color-content-primary);\n &[data-indeterminate] {\n display: none;\n }\n }\n}\n",
32
+ "path": "registry/nave/nave-progress.module.css",
33
+ "target": "components/nave/nave-progress.module.css",
34
+ "type": "registry:file"
35
+ },
36
+ {
37
+ "content": "MIT License\n\nCopyright (c) 2026 Nave Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
38
+ "path": "registry/nave/NAVECSS-LICENSE",
39
+ "target": "components/nave/NAVECSS-LICENSE",
40
+ "type": "registry:file"
41
+ }
42
+ ],
43
+ "meta": {
44
+ "peerDependencies": {
45
+ "@base-ui/react": "^1.3.0",
46
+ "@navecss/tokens": ">=0.5.0 <1.0.0",
47
+ "react": "^18 || ^19",
48
+ "react-dom": "^18 || ^19"
49
+ },
50
+ "version": "0.4.0"
51
+ },
52
+ "name": "base-ui-progress",
53
+ "title": "NaveCSS styling of Base UI Progress",
54
+ "type": "registry:item"
55
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "dependencies": [
4
+ "@base-ui/react",
5
+ "@navecss/tokens",
6
+ "react",
7
+ "react-dom"
8
+ ],
9
+ "description": "NaveCSS's styling of the Base UI Radio Group, as files copied into your project: Base UI's parts from @base-ui/react, which Base UI's maintainers publish, with Nave's classes from a CSS Module that reads Nave's tokens.",
10
+ "docs": "Import { RadioGroup } from the nave-radio-group file just written, not from @navecss/base-ui/radio-group.\nKeep @navecss/tokens/css imported: the copied rules read Nave's tokens. They sit in a CSS Module, so your build needs CSS Modules.\nThe copy needs @base-ui/react 1.3 or later in the 1.x line, @navecss/tokens 0.5.0 or later before 1.0, and React 18 or 19. A version already in your package.json is kept; a missing package is installed at its latest version.\nGenerated from @navecss/base-ui 0.4.0. No later release changes these files.",
11
+ "files": [
12
+ {
13
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n\nexport { RadioGroup } from './nave-radio-group.parts'\nexport type * from '@base-ui/react/radio-group'\n",
14
+ "path": "registry/nave/nave-radio-group.ts",
15
+ "target": "components/nave/nave-radio-group.ts",
16
+ "type": "registry:file"
17
+ },
18
+ {
19
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n/* eslint-disable @typescript-eslint/no-namespace, @typescript-eslint/no-explicit-any -- the types keep the names and generic defaults @navecss/base-ui exports, so code typed against the package compiles here unchanged */\nimport { RadioGroup as Base } from '@base-ui/react/radio-group'\nimport styles from './nave-radio-group.module.css'\n\nimport { wrapPart } from './nave-radio-group.wrap'\n\nexport const RadioGroup: typeof Base = /*#__PURE__*/ (() => wrapPart(Base, styles.choiceGroup))()\nexport declare namespace RadioGroup {\n export type State = Base.State\n export type Props<TValue = any> = Base.Props<TValue>\n export type ChangeEventReason = Base.ChangeEventReason\n export type ChangeEventDetails = Base.ChangeEventDetails\n}\n",
20
+ "path": "registry/nave/nave-radio-group.parts.ts",
21
+ "target": "components/nave/nave-radio-group.parts.ts",
22
+ "type": "registry:file"
23
+ },
24
+ {
25
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n\n/**\n * The one helper every wrapped part is built with. A wrapped part is Base UI's part with Nave's\n * class added to its `className` (a string is joined after Nave's class, a function of state is\n * wrapped, never stringified) and, for the Button family, the typed `variant` and `size` props\n * turned into `data-nave-*` attributes (as `size` is for an Avatar). Everything else (every other\n * prop, the ref, `render`) goes to Base UI's part untouched, and nothing here reads state, layout\n * or style: what the wrapper adds is chosen by the props the consumer passed.\n */\nimport {\n createElement,\n type ElementType,\n forwardRef,\n type ForwardRefExoticComponent,\n type RefAttributes,\n useMemo,\n} from 'react'\n\n/**\n * The size an Avatar takes. It is not a Base UI prop of any Avatar part, so nothing is shadowed.\n */\nexport interface AvatarProps {\n size?: 'lg' | 'md' | 'sm'\n}\n\nexport interface VariantProps {\n size?: 'md' | 'sm'\n variant?: 'ghost' | 'primary' | 'secondary'\n}\n\nexport interface SizeProps {\n size?: 'md' | 'sm'\n}\n\ntype Variants = 'avatar' | 'size' | 'variant'\n\nconst isOffDefault = (size: unknown, variants: Variants): boolean =>\n size === 'sm' || (variants === 'avatar' && size === 'lg')\n\ntype ClassNameFunction = (state: unknown) => string | undefined\ntype ClassName = ClassNameFunction | string | undefined\ntype Props = Record<string, unknown>\n\nconst join = (own: string, consumer: string | undefined): string =>\n consumer === undefined || consumer === '' ? own : `${own} ${consumer}`\n\n/**\n * Nave's class composed with the consumer's. The result is memoized on the consumer's own value,\n * so a consumer that passes the same function gets the same function through and a memoized part\n * does not re-render for it.\n */\nconst useClassName = (own: string, consumer: ClassName): ClassName =>\n useMemo(\n () =>\n typeof consumer === 'function'\n ? (state: unknown) => join(own, consumer(state))\n : join(own, consumer),\n [own, consumer],\n )\n\n/**\n * The attributes a non-default variant or size renders as, and the props left over. `variant` and\n * `size` are consumed here and never reach Base UI's part, which has no such props.\n */\nconst variantAttributes = (props: Props, variants: Variants): Props => {\n const { size, variant, ...rest } = props\n return {\n ...rest,\n ...(variants === 'variant' &&\n (variant === 'primary' || variant === 'ghost') && { 'data-nave-variant': variant }),\n ...(isOffDefault(size, variants) && { 'data-nave-size': size }),\n }\n}\n\nconst build = (\n part: ElementType,\n own: string,\n variants: Variants | undefined,\n): ForwardRefExoticComponent<Props & RefAttributes<unknown>> =>\n forwardRef<unknown, Props>(function NaveBaseUiPart(props, ref) {\n const forwarded = variants === undefined ? props : variantAttributes(props, variants)\n const className = useClassName(own, forwarded.className as ClassName)\n return createElement(part, { ...forwarded, className, ref })\n })\n\n/**\n * The wrapped part, or nothing where the installed Base UI has no such part (one younger than the\n * peer floor): the export stays absent instead of becoming a component that throws when rendered.\n */\nconst wrap = <T>(part: unknown, className: string, variants: Variants | undefined): T =>\n part === undefined\n ? (part as T)\n : (build(part as ElementType, className, variants) as unknown as T)\n\n/**\n * A part that is Base UI's own, with `className` composed. Typed as the part it wraps. A part the\n * installed Base UI does not have stays absent.\n */\nexport const wrapPart = <P>(part: P, className: string): P => wrap<P>(part, className, undefined)\n\n/**\n * A part of the Button family: as `wrapPart`, and its props gain `variant` and `size`. The type it\n * is given is the type the generated module declares for it, written from Base UI's own public\n * `Props` so that a generic part (a trigger's `Payload`) stays generic.\n */\nexport const wrapVariantPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'variant')\n\n/**\n * A part that gains `size` alone, as the Toggle does. A part the installed Base UI does not have\n * stays absent, as for `wrapPart`.\n */\nexport const wrapSizePart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'size')\n\n/**\n * A part that gains `size` with the Avatar's three values. A part the installed Base UI does not\n * have stays absent, as for `wrapPart`.\n */\nexport const wrapAvatarPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'avatar')\n",
26
+ "path": "registry/nave/nave-radio-group.wrap.ts",
27
+ "target": "components/nave/nave-radio-group.wrap.ts",
28
+ "type": "registry:file"
29
+ },
30
+ {
31
+ "content": "/* SPDX-License-Identifier: MIT */\n/* Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE. */\n@layer tokens.defaults, tokens.presets, reset, atomic, components.nave, components.consumer, overrides;\n\n@layer components.consumer {\n .choiceGroup {\n display: flex;\n flex-direction: column;\n gap: var(--nave-spacing-control-sm);\n }\n}\n",
32
+ "path": "registry/nave/nave-radio-group.module.css",
33
+ "target": "components/nave/nave-radio-group.module.css",
34
+ "type": "registry:file"
35
+ },
36
+ {
37
+ "content": "MIT License\n\nCopyright (c) 2026 Nave Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
38
+ "path": "registry/nave/NAVECSS-LICENSE",
39
+ "target": "components/nave/NAVECSS-LICENSE",
40
+ "type": "registry:file"
41
+ }
42
+ ],
43
+ "meta": {
44
+ "peerDependencies": {
45
+ "@base-ui/react": "^1.3.0",
46
+ "@navecss/tokens": ">=0.5.0 <1.0.0",
47
+ "react": "^18 || ^19",
48
+ "react-dom": "^18 || ^19"
49
+ },
50
+ "version": "0.4.0"
51
+ },
52
+ "name": "base-ui-radio-group",
53
+ "title": "NaveCSS styling of Base UI Radio Group",
54
+ "type": "registry:item"
55
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json",
3
+ "dependencies": [
4
+ "@base-ui/react",
5
+ "@navecss/tokens",
6
+ "react",
7
+ "react-dom"
8
+ ],
9
+ "description": "NaveCSS's styling of the Base UI Radio, as files copied into your project: Base UI's parts from @base-ui/react, which Base UI's maintainers publish, with Nave's classes from a CSS Module that reads Nave's tokens.",
10
+ "docs": "Import { Radio } from the nave-radio file just written, not from @navecss/base-ui/radio.\nKeep @navecss/tokens/css imported: the copied rules read Nave's tokens. They sit in a CSS Module, so your build needs CSS Modules.\nThe copy needs @base-ui/react 1.3 or later in the 1.x line, @navecss/tokens 0.5.0 or later before 1.0, and React 18 or 19. A version already in your package.json is kept; a missing package is installed at its latest version.\nGenerated from @navecss/base-ui 0.4.0. No later release changes these files.",
11
+ "files": [
12
+ {
13
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n\nexport * as Radio from './nave-radio.parts'\nexport type * from '@base-ui/react/radio'\n",
14
+ "path": "registry/nave/nave-radio.ts",
15
+ "target": "components/nave/nave-radio.ts",
16
+ "type": "registry:file"
17
+ },
18
+ {
19
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n/* eslint-disable @typescript-eslint/no-namespace, @typescript-eslint/no-explicit-any -- the types keep the names and generic defaults @navecss/base-ui exports, so code typed against the package compiles here unchanged */\nimport { Radio as Base } from '@base-ui/react/radio'\nimport styles from './nave-radio.module.css'\n\nimport { wrapPart } from './nave-radio.wrap'\n\nexport const Root: typeof Base.Root = /*#__PURE__*/ (() => wrapPart(Base.Root, styles.radio))()\nexport declare namespace Root {\n export type State = Base.Root.State\n export type Props<TValue = any> = Base.Root.Props<TValue>\n}\nexport const Indicator: typeof Base.Indicator = /*#__PURE__*/ (() => wrapPart(Base.Indicator, styles.radioIndicator))()\nexport declare namespace Indicator {\n export type Props = Base.Indicator.Props\n export type State = Base.Indicator.State\n}\n",
20
+ "path": "registry/nave/nave-radio.parts.ts",
21
+ "target": "components/nave/nave-radio.parts.ts",
22
+ "type": "registry:file"
23
+ },
24
+ {
25
+ "content": "// SPDX-License-Identifier: MIT\n// Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE.\n'use client'\n\n/**\n * The one helper every wrapped part is built with. A wrapped part is Base UI's part with Nave's\n * class added to its `className` (a string is joined after Nave's class, a function of state is\n * wrapped, never stringified) and, for the Button family, the typed `variant` and `size` props\n * turned into `data-nave-*` attributes (as `size` is for an Avatar). Everything else (every other\n * prop, the ref, `render`) goes to Base UI's part untouched, and nothing here reads state, layout\n * or style: what the wrapper adds is chosen by the props the consumer passed.\n */\nimport {\n createElement,\n type ElementType,\n forwardRef,\n type ForwardRefExoticComponent,\n type RefAttributes,\n useMemo,\n} from 'react'\n\n/**\n * The size an Avatar takes. It is not a Base UI prop of any Avatar part, so nothing is shadowed.\n */\nexport interface AvatarProps {\n size?: 'lg' | 'md' | 'sm'\n}\n\nexport interface VariantProps {\n size?: 'md' | 'sm'\n variant?: 'ghost' | 'primary' | 'secondary'\n}\n\nexport interface SizeProps {\n size?: 'md' | 'sm'\n}\n\ntype Variants = 'avatar' | 'size' | 'variant'\n\nconst isOffDefault = (size: unknown, variants: Variants): boolean =>\n size === 'sm' || (variants === 'avatar' && size === 'lg')\n\ntype ClassNameFunction = (state: unknown) => string | undefined\ntype ClassName = ClassNameFunction | string | undefined\ntype Props = Record<string, unknown>\n\nconst join = (own: string, consumer: string | undefined): string =>\n consumer === undefined || consumer === '' ? own : `${own} ${consumer}`\n\n/**\n * Nave's class composed with the consumer's. The result is memoized on the consumer's own value,\n * so a consumer that passes the same function gets the same function through and a memoized part\n * does not re-render for it.\n */\nconst useClassName = (own: string, consumer: ClassName): ClassName =>\n useMemo(\n () =>\n typeof consumer === 'function'\n ? (state: unknown) => join(own, consumer(state))\n : join(own, consumer),\n [own, consumer],\n )\n\n/**\n * The attributes a non-default variant or size renders as, and the props left over. `variant` and\n * `size` are consumed here and never reach Base UI's part, which has no such props.\n */\nconst variantAttributes = (props: Props, variants: Variants): Props => {\n const { size, variant, ...rest } = props\n return {\n ...rest,\n ...(variants === 'variant' &&\n (variant === 'primary' || variant === 'ghost') && { 'data-nave-variant': variant }),\n ...(isOffDefault(size, variants) && { 'data-nave-size': size }),\n }\n}\n\nconst build = (\n part: ElementType,\n own: string,\n variants: Variants | undefined,\n): ForwardRefExoticComponent<Props & RefAttributes<unknown>> =>\n forwardRef<unknown, Props>(function NaveBaseUiPart(props, ref) {\n const forwarded = variants === undefined ? props : variantAttributes(props, variants)\n const className = useClassName(own, forwarded.className as ClassName)\n return createElement(part, { ...forwarded, className, ref })\n })\n\n/**\n * The wrapped part, or nothing where the installed Base UI has no such part (one younger than the\n * peer floor): the export stays absent instead of becoming a component that throws when rendered.\n */\nconst wrap = <T>(part: unknown, className: string, variants: Variants | undefined): T =>\n part === undefined\n ? (part as T)\n : (build(part as ElementType, className, variants) as unknown as T)\n\n/**\n * A part that is Base UI's own, with `className` composed. Typed as the part it wraps. A part the\n * installed Base UI does not have stays absent.\n */\nexport const wrapPart = <P>(part: P, className: string): P => wrap<P>(part, className, undefined)\n\n/**\n * A part of the Button family: as `wrapPart`, and its props gain `variant` and `size`. The type it\n * is given is the type the generated module declares for it, written from Base UI's own public\n * `Props` so that a generic part (a trigger's `Payload`) stays generic.\n */\nexport const wrapVariantPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'variant')\n\n/**\n * A part that gains `size` alone, as the Toggle does. A part the installed Base UI does not have\n * stays absent, as for `wrapPart`.\n */\nexport const wrapSizePart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'size')\n\n/**\n * A part that gains `size` with the Avatar's three values. A part the installed Base UI does not\n * have stays absent, as for `wrapPart`.\n */\nexport const wrapAvatarPart = <T>(part: unknown, className: string): T =>\n wrap<T>(part, className, 'avatar')\n",
26
+ "path": "registry/nave/nave-radio.wrap.ts",
27
+ "target": "components/nave/nave-radio.wrap.ts",
28
+ "type": "registry:file"
29
+ },
30
+ {
31
+ "content": "/* SPDX-License-Identifier: MIT */\n/* Copyright (c) 2026 Nave Contributors. From NaveCSS (https://github.com/navecss/navecss), under the MIT License; the full text is in NAVECSS-LICENSE. */\n@layer tokens.defaults, tokens.presets, reset, atomic, components.nave, components.consumer, overrides;\n\n@layer components.consumer {\n .radio {\n box-sizing: border-box;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex: none;\n inline-size: var(--nave-size-icon-sm);\n block-size: var(--nave-size-icon-sm);\n border: var(--nave-border-width-sm) solid var(--nave-color-border-control);\n border-radius: var(--nave-radius-full);\n background-color: transparent;\n color: var(--nave-color-content-primary);\n cursor: pointer;\n position: relative;\n &[aria-invalid=\"true\"] {\n border-color: var(--nave-color-feedback-danger);\n border-width: var(--nave-border-width-mark);\n }\n &[aria-disabled=\"true\"] {\n border-color: var(--nave-color-border-disabled);\n color: var(--nave-color-content-disabled);\n cursor: not-allowed;\n }\n &::before {\n content: \"\";\n position: absolute;\n inset-block-start: 50%;\n inset-inline-start: 50%;\n inline-size: var(--nave-size-control-xs);\n block-size: var(--nave-size-control-xs);\n margin-block-start: calc(var(--nave-size-control-xs) / -2);\n margin-inline-start: calc(var(--nave-size-control-xs) / -2);\n }\n & {\n /* stylelint-disable-next-line declaration-property-value-disallowed-list -- the outline the &:focus-visible rule for this class draws replaces the browser's default focus indicator; keep that rule while this declaration stays. */\n outline: none;\n }\n &:focus-visible {\n outline-style: solid;\n outline-width: var(--nave-border-width-focus, 2px);\n outline-color: var(--nave-color-border-focus, currentColor);\n outline-offset: 2px;\n }\n }\n .radioIndicator {\n box-sizing: border-box;\n display: block;\n inline-size: 0;\n block-size: 0;\n border: var(--nave-border-width-lg) solid currentColor;\n border-radius: var(--nave-radius-full);\n }\n}\n",
32
+ "path": "registry/nave/nave-radio.module.css",
33
+ "target": "components/nave/nave-radio.module.css",
34
+ "type": "registry:file"
35
+ },
36
+ {
37
+ "content": "MIT License\n\nCopyright (c) 2026 Nave Contributors\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n",
38
+ "path": "registry/nave/NAVECSS-LICENSE",
39
+ "target": "components/nave/NAVECSS-LICENSE",
40
+ "type": "registry:file"
41
+ }
42
+ ],
43
+ "meta": {
44
+ "peerDependencies": {
45
+ "@base-ui/react": "^1.3.0",
46
+ "@navecss/tokens": ">=0.5.0 <1.0.0",
47
+ "react": "^18 || ^19",
48
+ "react-dom": "^18 || ^19"
49
+ },
50
+ "version": "0.4.0"
51
+ },
52
+ "name": "base-ui-radio",
53
+ "title": "NaveCSS styling of Base UI Radio",
54
+ "type": "registry:item"
55
+ }