jaci-ui 0.9.4 → 1.0.2

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 (182) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +11 -1
  3. package/dist/_virtual/_rolldown/runtime.cjs +1 -1
  4. package/dist/components/accordion/accordion.cjs.map +1 -1
  5. package/dist/components/accordion/accordion.js.map +1 -1
  6. package/dist/components/alert/alert.cjs.map +1 -1
  7. package/dist/components/alert/alert.js.map +1 -1
  8. package/dist/components/alert-dialog/alert-dialog.cjs.map +1 -1
  9. package/dist/components/alert-dialog/alert-dialog.js.map +1 -1
  10. package/dist/components/aspect-ratio/aspect-ratio.cjs.map +1 -1
  11. package/dist/components/avatar/avatar.cjs.map +1 -1
  12. package/dist/components/avatar/avatar.js.map +1 -1
  13. package/dist/components/breadcrumbs/breadcrumbs.cjs.map +1 -1
  14. package/dist/components/button/button.cjs +1 -0
  15. package/dist/components/button/button.cjs.map +1 -1
  16. package/dist/components/button/button.d.cts +2 -1
  17. package/dist/components/button/button.d.ts +2 -1
  18. package/dist/components/button/button.js +1 -0
  19. package/dist/components/button/button.js.map +1 -1
  20. package/dist/components/button-group/button-group.cjs.map +1 -1
  21. package/dist/components/calendar/calendar.cjs +4 -6
  22. package/dist/components/calendar/calendar.cjs.map +1 -1
  23. package/dist/components/calendar/calendar.js +4 -6
  24. package/dist/components/calendar/calendar.js.map +1 -1
  25. package/dist/components/card/card.cjs.map +1 -1
  26. package/dist/components/carousel/carousel.cjs.map +1 -1
  27. package/dist/components/carousel/carousel.js.map +1 -1
  28. package/dist/components/checkbox-group/checkbox-group.cjs +7 -3
  29. package/dist/components/checkbox-group/checkbox-group.cjs.map +1 -1
  30. package/dist/components/checkbox-group/checkbox-group.js +7 -3
  31. package/dist/components/checkbox-group/checkbox-group.js.map +1 -1
  32. package/dist/components/code/code.cjs.map +1 -1
  33. package/dist/components/code/code.js.map +1 -1
  34. package/dist/components/collapsible/collapsible.cjs.map +1 -1
  35. package/dist/components/collapsible/collapsible.js.map +1 -1
  36. package/dist/components/color-picker/color-picker.cjs.map +1 -1
  37. package/dist/components/color-picker/color-picker.js.map +1 -1
  38. package/dist/components/color-picker/color-utils.cjs +5 -3
  39. package/dist/components/color-picker/color-utils.cjs.map +1 -1
  40. package/dist/components/color-picker/color-utils.js +5 -3
  41. package/dist/components/color-picker/color-utils.js.map +1 -1
  42. package/dist/components/color-swatch/color-swatch.cjs.map +1 -1
  43. package/dist/components/combobox/combobox.cjs +2 -1
  44. package/dist/components/combobox/combobox.cjs.map +1 -1
  45. package/dist/components/combobox/combobox.js +2 -1
  46. package/dist/components/combobox/combobox.js.map +1 -1
  47. package/dist/components/command/command.cjs.map +1 -1
  48. package/dist/components/command/command.js.map +1 -1
  49. package/dist/components/context-menu/context-menu.cjs.map +1 -1
  50. package/dist/components/context-menu/context-menu.d.cts +2 -2
  51. package/dist/components/context-menu/context-menu.d.ts +2 -2
  52. package/dist/components/controls/checkbox.cjs.map +1 -1
  53. package/dist/components/controls/checkbox.js.map +1 -1
  54. package/dist/components/controls/input.cjs.map +1 -1
  55. package/dist/components/controls/input.js.map +1 -1
  56. package/dist/components/controls/radio.cjs.map +1 -1
  57. package/dist/components/controls/switch.cjs.map +1 -1
  58. package/dist/components/controls/switch.js.map +1 -1
  59. package/dist/components/controls/textarea.cjs.map +1 -1
  60. package/dist/components/controls/textarea.js.map +1 -1
  61. package/dist/components/copyable/copyable.cjs.map +1 -1
  62. package/dist/components/copyable/copyable.js.map +1 -1
  63. package/dist/components/data-toolbar/data-toolbar.cjs.map +1 -1
  64. package/dist/components/data-toolbar/data-toolbar.js.map +1 -1
  65. package/dist/components/data-view/data-view.cjs.map +1 -1
  66. package/dist/components/date-picker/date-picker.cjs +4 -7
  67. package/dist/components/date-picker/date-picker.cjs.map +1 -1
  68. package/dist/components/date-picker/date-picker.js +4 -7
  69. package/dist/components/date-picker/date-picker.js.map +1 -1
  70. package/dist/components/date-range-picker/date-range-picker.cjs +4 -6
  71. package/dist/components/date-range-picker/date-range-picker.cjs.map +1 -1
  72. package/dist/components/date-range-picker/date-range-picker.js +4 -6
  73. package/dist/components/date-range-picker/date-range-picker.js.map +1 -1
  74. package/dist/components/dialog/dialog.cjs.map +1 -1
  75. package/dist/components/dialog/dialog.js.map +1 -1
  76. package/dist/components/download-trigger/download-trigger.cjs.map +1 -1
  77. package/dist/components/drawer/drawer.cjs.map +1 -1
  78. package/dist/components/drawer/drawer.js.map +1 -1
  79. package/dist/components/empty-state/empty-state.cjs.map +1 -1
  80. package/dist/components/feedback/badge.cjs.map +1 -1
  81. package/dist/components/field/field.cjs.map +1 -1
  82. package/dist/components/field/field.js.map +1 -1
  83. package/dist/components/fieldset/fieldset.cjs.map +1 -1
  84. package/dist/components/figure/figure.cjs.map +1 -1
  85. package/dist/components/figure/figure.js.map +1 -1
  86. package/dist/components/form/form.cjs.map +1 -1
  87. package/dist/components/form/form.js.map +1 -1
  88. package/dist/components/icon-button/icon-button.cjs.map +1 -1
  89. package/dist/components/icon-button/icon-button.js.map +1 -1
  90. package/dist/components/image/image.cjs.map +1 -1
  91. package/dist/components/image/image.js.map +1 -1
  92. package/dist/components/input-group/input-group.cjs.map +1 -1
  93. package/dist/components/kbd/kbd.cjs.map +1 -1
  94. package/dist/components/layout/index.cjs.map +1 -1
  95. package/dist/components/list/list.cjs.map +1 -1
  96. package/dist/components/menu/menu.cjs.map +1 -1
  97. package/dist/components/menu/menu.d.cts +2 -2
  98. package/dist/components/menu/menu.d.ts +2 -2
  99. package/dist/components/menubar/menubar.cjs.map +1 -1
  100. package/dist/components/menubar/menubar.d.cts +2 -2
  101. package/dist/components/menubar/menubar.d.ts +2 -2
  102. package/dist/components/menubar/menubar.js.map +1 -1
  103. package/dist/components/meter/meter.cjs.map +1 -1
  104. package/dist/components/meter/meter.js.map +1 -1
  105. package/dist/components/navigation/navigation.cjs.map +1 -1
  106. package/dist/components/navigation/navigation.js.map +1 -1
  107. package/dist/components/navigation-menu/navigation-menu.cjs.map +1 -1
  108. package/dist/components/navigation-menu/navigation-menu.js.map +1 -1
  109. package/dist/components/number-field/number-field.cjs +2 -1
  110. package/dist/components/number-field/number-field.cjs.map +1 -1
  111. package/dist/components/number-field/number-field.js +2 -1
  112. package/dist/components/number-field/number-field.js.map +1 -1
  113. package/dist/components/option-selector/option-selector.cjs.map +1 -1
  114. package/dist/components/option-selector/option-selector.js.map +1 -1
  115. package/dist/components/pagination/pagination.cjs.map +1 -1
  116. package/dist/components/pagination/pagination.js.map +1 -1
  117. package/dist/components/pin-input/pin-input.cjs.map +1 -1
  118. package/dist/components/pin-input/pin-input.js.map +1 -1
  119. package/dist/components/popover/popover.cjs.map +1 -1
  120. package/dist/components/popover/popover.js.map +1 -1
  121. package/dist/components/progress/progress.cjs.map +1 -1
  122. package/dist/components/progress/progress.js.map +1 -1
  123. package/dist/components/qr-code/qr-code.cjs.map +1 -1
  124. package/dist/components/qr-code/qr-code.js.map +1 -1
  125. package/dist/components/quote/quote.cjs.map +1 -1
  126. package/dist/components/quote/quote.js.map +1 -1
  127. package/dist/components/radio-group/radio-group.cjs +7 -3
  128. package/dist/components/radio-group/radio-group.cjs.map +1 -1
  129. package/dist/components/radio-group/radio-group.js +7 -3
  130. package/dist/components/radio-group/radio-group.js.map +1 -1
  131. package/dist/components/range-slider/range-slider.cjs.map +1 -1
  132. package/dist/components/range-slider/range-slider.js.map +1 -1
  133. package/dist/components/scroll-area/scroll-area.cjs.map +1 -1
  134. package/dist/components/select/select.cjs.map +1 -1
  135. package/dist/components/select/select.js.map +1 -1
  136. package/dist/components/sidebar/sidebar.cjs.map +1 -1
  137. package/dist/components/sidebar/sidebar.js.map +1 -1
  138. package/dist/components/skeleton/skeleton.cjs.map +1 -1
  139. package/dist/components/slider/slider.cjs.map +1 -1
  140. package/dist/components/slider/slider.js.map +1 -1
  141. package/dist/components/spacer/spacer.cjs.map +1 -1
  142. package/dist/components/stat/stat.cjs.map +1 -1
  143. package/dist/components/stat/stat.js.map +1 -1
  144. package/dist/components/stepper/stepper.cjs +2 -1
  145. package/dist/components/stepper/stepper.cjs.map +1 -1
  146. package/dist/components/stepper/stepper.js +2 -1
  147. package/dist/components/stepper/stepper.js.map +1 -1
  148. package/dist/components/table/table.cjs.map +1 -1
  149. package/dist/components/table/table.js.map +1 -1
  150. package/dist/components/tabs/tabs.cjs.map +1 -1
  151. package/dist/components/tabs/tabs.js.map +1 -1
  152. package/dist/components/tags-input/tags-input.cjs +10 -9
  153. package/dist/components/tags-input/tags-input.cjs.map +1 -1
  154. package/dist/components/tags-input/tags-input.js +10 -9
  155. package/dist/components/tags-input/tags-input.js.map +1 -1
  156. package/dist/components/toast/toast.cjs.map +1 -1
  157. package/dist/components/toast/toast.js.map +1 -1
  158. package/dist/components/toggle/toggle.cjs.map +1 -1
  159. package/dist/components/toggle-group/toggle-group.cjs.map +1 -1
  160. package/dist/components/toolbar/toolbar.cjs.map +1 -1
  161. package/dist/components/tooltip/tooltip.cjs.map +1 -1
  162. package/dist/components/tree-view/tree-view.cjs.map +1 -1
  163. package/dist/components/tree-view/tree-view.js.map +1 -1
  164. package/dist/components/typography/heading.cjs.map +1 -1
  165. package/dist/components/typography/link.cjs.map +1 -1
  166. package/dist/components/typography/paragraph.cjs.map +1 -1
  167. package/dist/components/typography/text.cjs.map +1 -1
  168. package/dist/components/upload/upload.cjs +2 -2
  169. package/dist/components/upload/upload.cjs.map +1 -1
  170. package/dist/components/upload/upload.js +2 -2
  171. package/dist/components/upload/upload.js.map +1 -1
  172. package/dist/components/visually-hidden/visually-hidden.cjs.map +1 -1
  173. package/dist/panda-preset.cjs.map +1 -1
  174. package/dist/styles/theme.cjs +18 -18
  175. package/dist/styles/theme.cjs.map +1 -1
  176. package/dist/styles/theme.js +18 -18
  177. package/dist/styles/theme.js.map +1 -1
  178. package/dist/styles.css +12 -21
  179. package/dist/theme/theme-provider.cjs.map +1 -1
  180. package/dist/theme/theme-provider.js.map +1 -1
  181. package/dist/theme/theme-scope.cjs.map +1 -1
  182. package/package.json +9 -9
@@ -1 +1 @@
1
- {"version":3,"file":"input-group.cjs","names":["cx","inputGroup"],"sources":["../../../src/components/input-group/input-group.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { inputGroup } from \"../../styled-system/recipes\";\n\nexport interface InputGroupRootProps extends ComponentPropsWithoutRef<\"div\"> {\n children?: ReactNode;\n}\n\nexport const InputGroupRoot = forwardRef<HTMLDivElement, InputGroupRootProps>(\n function InputGroupRoot({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(inputGroup().root, className)}\n data-jaci-component=\"input-group\"\n data-slot=\"input-group\"\n />\n );\n },\n);\n\nexport type InputGroupAddonProps = ComponentPropsWithoutRef<\"span\">;\nexport const InputGroupAddon = forwardRef<HTMLSpanElement, InputGroupAddonProps>(\n function InputGroupAddon({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={cx(inputGroup().addon, className)}\n data-slot=\"input-group-addon\"\n />\n );\n },\n);\n\nexport const InputGroup = Object.assign(InputGroupRoot, {\n Root: InputGroupRoot,\n Addon: InputGroupAddon,\n});\n"],"mappings":";;;;;AAUA,MAAa,kBAAA,GAAA,MAAA,WAAA,CACX,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,mBAAA,GAAA,MAAA,WAAA,CACX,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,OAAO,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,aAAa,OAAO,OAAO,gBAAgB;CACtD,MAAM;CACN,OAAO;AACT,CAAC"}
1
+ {"version":3,"file":"input-group.cjs","names":["forwardRef","cx","inputGroup"],"sources":["../../../src/components/input-group/input-group.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { inputGroup } from \"../../styled-system/recipes\";\n\nexport interface InputGroupRootProps extends ComponentPropsWithoutRef<\"div\"> {\n children?: ReactNode;\n}\n\nexport const InputGroupRoot = forwardRef<HTMLDivElement, InputGroupRootProps>(\n function InputGroupRoot({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(inputGroup().root, className)}\n data-jaci-component=\"input-group\"\n data-slot=\"input-group\"\n />\n );\n },\n);\n\nexport type InputGroupAddonProps = ComponentPropsWithoutRef<\"span\">;\nexport const InputGroupAddon = forwardRef<HTMLSpanElement, InputGroupAddonProps>(\n function InputGroupAddon({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={cx(inputGroup().addon, className)}\n data-slot=\"input-group-addon\"\n />\n );\n },\n);\n\nexport const InputGroup = Object.assign(InputGroupRoot, {\n Root: InputGroupRoot,\n Addon: InputGroupAddon,\n});\n"],"mappings":";;;;;AAUA,MAAa,kBAAA,GAAiBA,MAAAA,WAAAA,CAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,MAAM,SAAS;EAC1C,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,mBAAA,GAAkBF,MAAAA,WAAAA,CAC7B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGC,oBAAAA,WAAW,CAAC,CAAC,OAAO,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,aAAa,OAAO,OAAO,gBAAgB;CACtD,MAAM;CACN,OAAO;AACT,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"kbd.cjs","names":["cx","kbd"],"sources":["../../../src/components/kbd/kbd.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { kbd } from \"../../styled-system/recipes\";\n\nexport type KbdSize = \"sm\" | \"md\" | \"lg\";\nexport type KbdVariant = \"solid\" | \"outline\" | \"subtle\";\n\nexport interface KbdProps extends ComponentPropsWithoutRef<\"kbd\"> {\n size?: KbdSize;\n variant?: KbdVariant;\n}\n\nexport const Kbd = forwardRef<HTMLElement, KbdProps>(function Kbd(\n { className, size = \"md\", variant = \"subtle\", ...props },\n ref,\n) {\n return (\n <kbd\n {...props}\n ref={ref}\n className={cx(kbd({ size, variant }), className)}\n data-jaci-component=\"kbd\"\n data-size={size}\n data-slot=\"kbd\"\n data-variant={variant}\n />\n );\n});\n"],"mappings":";;;;;AAcA,MAAa,OAAA,GAAA,MAAA,WAAA,CAAwC,SAAS,IAC5D,EAAE,WAAW,OAAO,MAAM,UAAU,UAAU,GAAG,SACjD,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAGC,YAAAA,IAAI;GAAE;GAAM;EAAQ,CAAC,GAAG,SAAS;EAC/C,uBAAoB;EACpB,aAAW;EACX,aAAU;EACV,gBAAc;CACf,CAAA;AAEL,CAAC"}
1
+ {"version":3,"file":"kbd.cjs","names":["forwardRef","cx","kbd"],"sources":["../../../src/components/kbd/kbd.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { kbd } from \"../../styled-system/recipes\";\n\nexport type KbdSize = \"sm\" | \"md\" | \"lg\";\nexport type KbdVariant = \"solid\" | \"outline\" | \"subtle\";\n\nexport interface KbdProps extends ComponentPropsWithoutRef<\"kbd\"> {\n size?: KbdSize;\n variant?: KbdVariant;\n}\n\nexport const Kbd = forwardRef<HTMLElement, KbdProps>(function Kbd(\n { className, size = \"md\", variant = \"subtle\", ...props },\n ref,\n) {\n return (\n <kbd\n {...props}\n ref={ref}\n className={cx(kbd({ size, variant }), className)}\n data-jaci-component=\"kbd\"\n data-size={size}\n data-slot=\"kbd\"\n data-variant={variant}\n />\n );\n});\n"],"mappings":";;;;;AAcA,MAAa,OAAA,GAAMA,MAAAA,WAAAA,CAAkC,SAAS,IAC5D,EAAE,WAAW,OAAO,MAAM,UAAU,UAAU,GAAG,SACjD,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGC,YAAAA,IAAI;GAAE;GAAM;EAAQ,CAAC,GAAG,SAAS;EAC/C,uBAAoB;EACpB,aAAW;EACX,aAAU;EACV,gBAAc;CACf,CAAA;AAEL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","names":["cx","layoutStack","layoutGrid","separator","spinner"],"sources":["../../../src/components/layout/index.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { layoutGrid, layoutStack, separator, spinner } from \"../../styled-system/recipes\";\n\nexport type LayoutGap = \"none\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type LayoutAlign = \"start\" | \"center\" | \"end\" | \"stretch\";\nexport type LayoutJustify = \"start\" | \"center\" | \"end\" | \"between\";\nexport type LayoutWrap = \"wrap\" | \"nowrap\";\n\nexport interface StackProps extends ComponentPropsWithoutRef<\"div\"> {\n direction?: \"vertical\" | \"horizontal\";\n gap?: LayoutGap;\n align?: LayoutAlign;\n justify?: LayoutJustify;\n wrap?: LayoutWrap;\n}\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(\n {\n className,\n direction = \"vertical\",\n gap = \"md\",\n align = \"stretch\",\n justify = \"start\",\n wrap = \"nowrap\",\n ...props\n },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(layoutStack({ direction, gap, align, justify, wrap }), className)}\n data-jaci-component=\"stack\"\n data-slot=\"stack\"\n />\n );\n});\n\nexport interface FlexProps extends Omit<StackProps, \"direction\"> {\n direction?: \"horizontal\" | \"vertical\";\n}\n\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>(function Flex(\n { direction = \"horizontal\", wrap = \"wrap\", ...props },\n ref,\n) {\n return (\n <Stack {...props} ref={ref} direction={direction} data-jaci-component=\"flex\" wrap={wrap} />\n );\n});\n\nexport interface GridProps extends ComponentPropsWithoutRef<\"div\"> {\n columns?: 1 | 2 | 3 | 4;\n gap?: LayoutGap;\n}\n\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(function Grid(\n { className, columns = 3, gap = \"md\", ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(\n layoutGrid({ columns: String(columns) as \"1\" | \"2\" | \"3\" | \"4\", gap }),\n className,\n )}\n data-jaci-component=\"grid\"\n data-slot=\"grid\"\n />\n );\n});\n\nexport interface SeparatorProps extends Omit<ComponentPropsWithoutRef<\"hr\">, \"orientation\"> {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nexport const Separator = forwardRef<HTMLHRElement, SeparatorProps>(function Separator(\n { className, orientation = \"horizontal\", ...props },\n ref,\n) {\n return (\n <hr\n {...props}\n aria-orientation={orientation}\n ref={ref}\n className={cx(separator({ orientation }), className)}\n data-jaci-component=\"separator\"\n data-slot=\"separator\"\n />\n );\n});\n\nexport interface SpinnerProps extends Omit<ComponentPropsWithoutRef<\"span\">, \"children\"> {\n label?: string;\n size?: \"sm\" | \"md\" | \"lg\";\n}\n\nexport const Spinner = forwardRef<HTMLSpanElement, SpinnerProps>(function Spinner(\n { className, label = \"Loading\", size = \"md\", ...props },\n ref,\n) {\n return (\n <span\n {...props}\n aria-label={label}\n className={cx(spinner({ size }), className)}\n data-jaci-component=\"spinner\"\n data-slot=\"spinner\"\n ref={ref}\n role=\"status\"\n />\n );\n});\n"],"mappings":";;;;;;;;AAmBA,MAAa,SAAA,GAAA,MAAA,WAAA,CAA+C,SAAS,MACnE,EACE,WACA,YAAY,YACZ,MAAM,MACN,QAAQ,WACR,UAAU,SACV,OAAO,UACP,GAAG,SAEL,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWA,WAAAA,GAAGC,qBAAAA,YAAY;GAAE;GAAW;GAAK;GAAO;GAAS;EAAK,CAAC,GAAG,SAAS;EAC9E,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAMD,MAAa,QAAA,GAAA,MAAA,WAAA,CAA6C,SAAS,KACjE,EAAE,YAAY,cAAc,OAAO,QAAQ,GAAG,SAC9C,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAO,GAAI;EAAY;EAAgB;EAAW,uBAAoB;EAAa;CAAO,CAAA;AAE9F,CAAC;AAOD,MAAa,QAAA,GAAA,MAAA,WAAA,CAA6C,SAAS,KACjE,EAAE,WAAW,UAAU,GAAG,MAAM,MAAM,GAAG,SACzC,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GACTE,oBAAAA,WAAW;GAAE,SAAS,OAAO,OAAO;GAA4B;EAAI,CAAC,GACrE,SACF;EACA,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAMD,MAAa,aAAA,GAAA,MAAA,WAAA,CAAsD,SAAS,UAC1E,EAAE,WAAW,cAAc,cAAc,GAAG,SAC5C,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;EACE,GAAI;EACJ,oBAAkB;EACb;EACL,WAAWF,WAAAA,GAAGG,kBAAAA,UAAU,EAAE,YAAY,CAAC,GAAG,SAAS;EACnD,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAOD,MAAa,WAAA,GAAA,MAAA,WAAA,CAAoD,SAAS,QACxE,EAAE,WAAW,QAAQ,WAAW,OAAO,MAAM,GAAG,SAChD,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACJ,cAAY;EACZ,WAAWH,WAAAA,GAAGI,gBAAAA,QAAQ,EAAE,KAAK,CAAC,GAAG,SAAS;EAC1C,uBAAoB;EACpB,aAAU;EACL;EACL,MAAK;CACN,CAAA;AAEL,CAAC"}
1
+ {"version":3,"file":"index.cjs","names":["forwardRef","cx","layoutStack","layoutGrid","separator","spinner"],"sources":["../../../src/components/layout/index.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { layoutGrid, layoutStack, separator, spinner } from \"../../styled-system/recipes\";\n\nexport type LayoutGap = \"none\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type LayoutAlign = \"start\" | \"center\" | \"end\" | \"stretch\";\nexport type LayoutJustify = \"start\" | \"center\" | \"end\" | \"between\";\nexport type LayoutWrap = \"wrap\" | \"nowrap\";\n\nexport interface StackProps extends ComponentPropsWithoutRef<\"div\"> {\n direction?: \"vertical\" | \"horizontal\";\n gap?: LayoutGap;\n align?: LayoutAlign;\n justify?: LayoutJustify;\n wrap?: LayoutWrap;\n}\n\nexport const Stack = forwardRef<HTMLDivElement, StackProps>(function Stack(\n {\n className,\n direction = \"vertical\",\n gap = \"md\",\n align = \"stretch\",\n justify = \"start\",\n wrap = \"nowrap\",\n ...props\n },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(layoutStack({ direction, gap, align, justify, wrap }), className)}\n data-jaci-component=\"stack\"\n data-slot=\"stack\"\n />\n );\n});\n\nexport interface FlexProps extends Omit<StackProps, \"direction\"> {\n direction?: \"horizontal\" | \"vertical\";\n}\n\nexport const Flex = forwardRef<HTMLDivElement, FlexProps>(function Flex(\n { direction = \"horizontal\", wrap = \"wrap\", ...props },\n ref,\n) {\n return (\n <Stack {...props} ref={ref} direction={direction} data-jaci-component=\"flex\" wrap={wrap} />\n );\n});\n\nexport interface GridProps extends ComponentPropsWithoutRef<\"div\"> {\n columns?: 1 | 2 | 3 | 4;\n gap?: LayoutGap;\n}\n\nexport const Grid = forwardRef<HTMLDivElement, GridProps>(function Grid(\n { className, columns = 3, gap = \"md\", ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(\n layoutGrid({ columns: String(columns) as \"1\" | \"2\" | \"3\" | \"4\", gap }),\n className,\n )}\n data-jaci-component=\"grid\"\n data-slot=\"grid\"\n />\n );\n});\n\nexport interface SeparatorProps extends Omit<ComponentPropsWithoutRef<\"hr\">, \"orientation\"> {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nexport const Separator = forwardRef<HTMLHRElement, SeparatorProps>(function Separator(\n { className, orientation = \"horizontal\", ...props },\n ref,\n) {\n return (\n <hr\n {...props}\n aria-orientation={orientation}\n ref={ref}\n className={cx(separator({ orientation }), className)}\n data-jaci-component=\"separator\"\n data-slot=\"separator\"\n />\n );\n});\n\nexport interface SpinnerProps extends Omit<ComponentPropsWithoutRef<\"span\">, \"children\"> {\n label?: string;\n size?: \"sm\" | \"md\" | \"lg\";\n}\n\nexport const Spinner = forwardRef<HTMLSpanElement, SpinnerProps>(function Spinner(\n { className, label = \"Loading\", size = \"md\", ...props },\n ref,\n) {\n return (\n <span\n {...props}\n aria-label={label}\n className={cx(spinner({ size }), className)}\n data-jaci-component=\"spinner\"\n data-slot=\"spinner\"\n ref={ref}\n role=\"status\"\n />\n );\n});\n"],"mappings":";;;;;;;;AAmBA,MAAa,SAAA,GAAQA,MAAAA,WAAAA,CAAuC,SAAS,MACnE,EACE,WACA,YAAY,YACZ,MAAM,MACN,QAAQ,WACR,UAAU,SACV,OAAO,UACP,GAAG,SAEL,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGC,qBAAAA,YAAY;GAAE;GAAW;GAAK;GAAO;GAAS;EAAK,CAAC,GAAG,SAAS;EAC9E,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAMD,MAAa,QAAA,GAAOF,MAAAA,WAAAA,CAAsC,SAAS,KACjE,EAAE,YAAY,cAAc,OAAO,QAAQ,GAAG,SAC9C,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAO,GAAI;EAAY;EAAgB;EAAW,uBAAoB;EAAa;CAAO,CAAA;AAE9F,CAAC;AAOD,MAAa,QAAA,GAAOA,MAAAA,WAAAA,CAAsC,SAAS,KACjE,EAAE,WAAW,UAAU,GAAG,MAAM,MAAM,GAAG,SACzC,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GACTE,oBAAAA,WAAW;GAAE,SAAS,OAAO,OAAO;GAA4B;EAAI,CAAC,GACrE,SACF;EACA,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAMD,MAAa,aAAA,GAAYH,MAAAA,WAAAA,CAA0C,SAAS,UAC1E,EAAE,WAAW,cAAc,cAAc,GAAG,SAC5C,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;EACE,GAAI;EACJ,oBAAkB;EACb;EACL,WAAWC,WAAAA,GAAGG,kBAAAA,UAAU,EAAE,YAAY,CAAC,GAAG,SAAS;EACnD,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAOD,MAAa,WAAA,GAAUJ,MAAAA,WAAAA,CAA0C,SAAS,QACxE,EAAE,WAAW,QAAQ,WAAW,OAAO,MAAM,GAAG,SAChD,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACJ,cAAY;EACZ,WAAWC,WAAAA,GAAGI,gBAAAA,QAAQ,EAAE,KAAK,CAAC,GAAG,SAAS;EAC1C,uBAAoB;EACpB,aAAU;EACL;EACL,MAAK;CACN,CAAA;AAEL,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"list.cjs","names":["list","cx"],"sources":["../../../src/components/list/list.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { list } from \"../../styled-system/recipes\";\n\nexport type ListVariant = \"plain\" | \"divided\" | \"card\";\nexport type ListGap = \"none\" | \"sm\" | \"md\" | \"lg\";\nexport type ListDensity = \"compact\" | \"comfortable\";\n\nexport interface ListRootProps extends Omit<ComponentPropsWithoutRef<\"ul\">, \"children\"> {\n children?: ReactNode;\n density?: ListDensity;\n gap?: ListGap;\n ordered?: boolean;\n variant?: ListVariant;\n}\n\nexport const ListRoot = forwardRef<HTMLElement, ListRootProps>(function ListRoot(\n {\n children,\n className,\n density = \"comfortable\",\n gap = \"md\",\n ordered = false,\n variant = \"plain\",\n ...props\n },\n ref,\n) {\n const styles = list({ density, gap, variant });\n const Component = ordered ? \"ol\" : \"ul\";\n\n return (\n <Component\n {...props}\n ref={ref as never}\n className={cx(styles.root, className)}\n data-gap={gap}\n data-density={density}\n data-jaci-component=\"list\"\n data-ordered={ordered || undefined}\n data-slot=\"list\"\n data-variant={variant}\n >\n {children}\n </Component>\n );\n});\n\nexport interface ListItemProps extends Omit<ComponentPropsWithoutRef<\"li\">, \"children\"> {\n children?: ReactNode;\n disabled?: boolean;\n interactive?: boolean;\n selected?: boolean;\n}\n\nexport const ListItem = forwardRef<HTMLLIElement, ListItemProps>(function ListItem(\n { children, className, disabled = false, interactive = false, selected = false, ...props },\n ref,\n) {\n const styles = list();\n\n return (\n <li\n {...props}\n ref={ref}\n aria-disabled={disabled || undefined}\n className={cx(styles.item, className)}\n data-disabled={disabled || undefined}\n data-interactive={interactive || undefined}\n data-selected={selected || undefined}\n data-slot=\"list-item\"\n >\n {children}\n </li>\n );\n});\n\nexport type ListItemContentProps = ComponentPropsWithoutRef<\"div\">;\nexport const ListItemContent = forwardRef<HTMLDivElement, ListItemContentProps>(\n function ListItemContent({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(list().content, className)}\n data-slot=\"list-item-content\"\n />\n );\n },\n);\n\nexport type ListItemTitleProps = ComponentPropsWithoutRef<\"span\">;\nexport const ListItemTitle = forwardRef<HTMLSpanElement, ListItemTitleProps>(function ListItemTitle(\n { className, ...props },\n ref,\n) {\n return (\n <span\n {...props}\n ref={ref}\n className={cx(list().title, className)}\n data-slot=\"list-item-title\"\n />\n );\n});\n\nexport type ListItemDescriptionProps = ComponentPropsWithoutRef<\"span\">;\nexport const ListItemDescription = forwardRef<HTMLSpanElement, ListItemDescriptionProps>(\n function ListItemDescription({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={cx(list().description, className)}\n data-slot=\"list-item-description\"\n />\n );\n },\n);\n\nexport type ListItemActionProps = ComponentPropsWithoutRef<\"div\">;\nexport const ListItemAction = forwardRef<HTMLDivElement, ListItemActionProps>(\n function ListItemAction({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(list().action, className)}\n data-slot=\"list-item-action\"\n />\n );\n },\n);\n\nexport const List = {\n Root: ListRoot,\n Item: ListItem,\n ItemContent: ListItemContent,\n ItemTitle: ListItemTitle,\n ItemDescription: ListItemDescription,\n ItemAction: ListItemA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AA,CAAC,QAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,OAAO,SAAS;EACrC,aAAU;CACX,CAAA;AAEL,CAAC;AAGD,MAAa,uBAAA,GAAA,MAAA,WAAA,CACX,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAS,KAAK;CACzD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,aAAa,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,kBAAA,GAAA,MAAA,WAAA,CACX,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,QAAQ,SAAS;EACtC,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,OAAO;CAClB,MAAM;CACN,MAAM;CACN,aAAa;CACb,WAAW;CACX,iBAAiB;CACjB,YAAY;AACd"}
1
+ {"version":3,"file":"list.cjs","names":["forwardRef","list","cx"],"sources":["../../../src/components/list/list.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { list } from \"../../styled-system/recipes\";\n\nexport type ListVariant = \"plain\" | \"divided\" | \"card\";\nexport type ListGap = \"none\" | \"sm\" | \"md\" | \"lg\";\nexport type ListDensity = \"compact\" | \"comfortable\";\n\nexport interface ListRootProps extends Omit<ComponentPropsWithoutRef<\"ul\">, \"children\"> {\n children?: ReactNode;\n density?: ListDensity;\n gap?: ListGap;\n ordered?: boolean;\n variant?: ListVariant;\n}\n\nexport const ListRoot = forwardRef<HTMLElement, ListRootProps>(function ListRoot(\n {\n children,\n className,\n density = \"comfortable\",\n gap = \"md\",\n ordered = false,\n variant = \"plain\",\n ...props\n },\n ref,\n) {\n const styles = list({ density, gap, variant });\n const Component = ordered ? \"ol\" : \"ul\";\n\n return (\n <Component\n {...props}\n ref={ref as never}\n className={cx(styles.root, className)}\n data-gap={gap}\n data-density={density}\n data-jaci-component=\"list\"\n data-ordered={ordered || undefined}\n data-slot=\"list\"\n data-variant={variant}\n >\n {children}\n </Component>\n );\n});\n\nexport interface ListItemProps extends Omit<ComponentPropsWithoutRef<\"li\">, \"children\"> {\n children?: ReactNode;\n disabled?: boolean;\n interactive?: boolean;\n selected?: boolean;\n}\n\nexport const ListItem = forwardRef<HTMLLIElement, ListItemProps>(function ListItem(\n { children, className, disabled = false, interactive = false, selected = false, ...props },\n ref,\n) {\n const styles = list();\n\n return (\n <li\n {...props}\n ref={ref}\n aria-disabled={disabled || undefined}\n className={cx(styles.item, className)}\n data-disabled={disabled || undefined}\n data-interactive={interactive || undefined}\n data-selected={selected || undefined}\n data-slot=\"list-item\"\n >\n {children}\n </li>\n );\n});\n\nexport type ListItemContentProps = ComponentPropsWithoutRef<\"div\">;\nexport const ListItemContent = forwardRef<HTMLDivElement, ListItemContentProps>(\n function ListItemContent({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(list().content, className)}\n data-slot=\"list-item-content\"\n />\n );\n },\n);\n\nexport type ListItemTitleProps = ComponentPropsWithoutRef<\"span\">;\nexport const ListItemTitle = forwardRef<HTMLSpanElement, ListItemTitleProps>(function ListItemTitle(\n { className, ...props },\n ref,\n) {\n return (\n <span\n {...props}\n ref={ref}\n className={cx(list().title, className)}\n data-slot=\"list-item-title\"\n />\n );\n});\n\nexport type ListItemDescriptionProps = ComponentPropsWithoutRef<\"span\">;\nexport const ListItemDescription = forwardRef<HTMLSpanElement, ListItemDescriptionProps>(\n function ListItemDescription({ className, ...props }, ref) {\n return (\n <span\n {...props}\n ref={ref}\n className={cx(list().description, className)}\n data-slot=\"list-item-description\"\n />\n );\n },\n);\n\nexport type ListItemActionProps = ComponentPropsWithoutRef<\"div\">;\nexport const ListItemAction = forwardRef<HTMLDivElement, ListItemActionProps>(\n function ListItemAction({ className, ...props }, ref) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(list().action, className)}\n data-slot=\"list-item-action\"\n />\n );\n },\n);\n\nexport const List = {\n Root: ListRoot,\n Item: ListItem,\n ItemContent: ListItemContent,\n ItemTitle: ListItemTitle,\n ItemDescription: ListItemDescription,\n ItemAction: ListItemAction,\n};\n"],"mappings":";;;;;AAkBA,MAAa,YAAA,GAAWA,MAAAA,WAAAA,CAAuC,SAAS,SACtE,EACE,UACA,WACA,UAAU,eACV,MAAM,MACN,UAAU,OACV,UAAU,SACV,GAAG,SAEL,KACA;CACA,MAAM,SAASC,aAAAA,KAAK;EAAE;EAAS;EAAK;CAAQ,CAAC;CAG7C,OACE,iBAAA,GAAA,kBAAA,IAAA,CAHgB,UAAU,OAAO,MAGjC;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAG,OAAO,MAAM,SAAS;EACpC,YAAU;EACV,gBAAc;EACd,uBAAoB;EACpB,gBAAc,WAAW,KAAA;EACzB,aAAU;EACV,gBAAc;EAEb;CACQ,CAAA;AAEf,CAAC;AASD,MAAa,YAAA,GAAWF,MAAAA,WAAAA,CAAyC,SAAS,SACxE,EAAE,UAAU,WAAW,WAAW,OAAO,cAAc,OAAO,WAAW,OAAO,GAAG,SACnF,KACA;CACA,MAAM,SAASC,aAAAA,KAAK;CAEpB,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,MAAD;EACE,GAAI;EACC;EACL,iBAAe,YAAY,KAAA;EAC3B,WAAWC,WAAAA,GAAG,OAAO,MAAM,SAAS;EACpC,iBAAe,YAAY,KAAA;EAC3B,oBAAkB,eAAe,KAAA;EACjC,iBAAe,YAAY,KAAA;EAC3B,aAAU;EAET;CACC,CAAA;AAER,CAAC;AAGD,MAAa,mBAAA,GAAkBF,MAAAA,WAAAA,CAC7B,SAAS,gBAAgB,EAAE,WAAW,GAAG,SAAS,KAAK;CACrD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWE,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,SAAS,SAAS;EACvC,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,iBAAA,GAAgBD,MAAAA,WAAAA,CAAgD,SAAS,cACpF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACC;EACL,WAAWE,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,OAAO,SAAS;EACrC,aAAU;CACX,CAAA;AAEL,CAAC;AAGD,MAAa,uBAAA,GAAsBD,MAAAA,WAAAA,CACjC,SAAS,oBAAoB,EAAE,WAAW,GAAG,SAAS,KAAK;CACzD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EACE,GAAI;EACC;EACL,WAAWE,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,aAAa,SAAS;EAC3C,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,kBAAA,GAAiBD,MAAAA,WAAAA,CAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWE,WAAAA,GAAGD,aAAAA,KAAK,CAAC,CAAC,QAAQ,SAAS;EACtC,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,OAAO;CAClB,MAAM;CACN,MAAM;CACN,aAAa;CACb,WAAW;CACX,iBAAiB;CACjB,YAAY;AACd"}
@@ -1 +1 @@
1
- {"version":3,"file":"menu.cjs","names":["BaseMenu","withRecipeClassName","menu","useThemePortalProps"],"sources":["../../../src/components/menu/menu.tsx"],"sourcesContent":["\"use client\";\n\nimport { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { MenuRoot as BaseMenuRoot, MenuTrigger as BaseMenuTrigger } from \"@base-ui/react/menu\";\n\nimport { menu } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\n/**\n * Groups the menu parts. It keeps Base UI's controlled `open`/\n * `onOpenChange` API and uncontrolled `defaultOpen` API intact.\n */\nexport type MenuRootProps<Payload = unknown> = BaseMenuRoot.Props<Payload>;\n\nexport function MenuRoot<Payload = unknown>(props: MenuRootProps<Payload>) {\n return <BaseMenu.Root {...props} />;\n}\n\nexport type MenuTriggerProps<Payload = unknown> = BaseMenuTrigger.Props<Payload>;\n\nexport const MenuTrigger = forwardRef<HTMLButtonElement, MenuTriggerProps>(function MenuTrigger(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().trigger, className)}\n data-jaci-component=\"menu\"\n data-slot=\"menu-trigger\"\n />\n );\n});\n\n/** Preserves Base UI's portal and optional container APIs. */\nexport function MenuPortal(props: ComponentPropsWithoutRef<typeof BaseMenu.Portal>) {\n return <BaseMenu.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type MenuPositionerProps = ComponentPropsWithoutRef<typeof BaseMenu.Positioner>;\n\nexport const MenuPositioner = forwardRef<HTMLDivElement, MenuPositionerProps>(\n function MenuPositioner({ className, ...props }, ref) {\n return (\n <BaseMenu.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().positioner, className)}\n data-slot=\"menu-positioner\"\n />\n );\n },\n);\n\nexport type MenuPopupProps = ComponentPropsWithoutRef<typeof BaseMenu.Popup>;\n\nexport const MenuPopup = forwardRef<HTMLDivElement, MenuPopupProps>(function MenuPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().popup, className)}\n data-slot=\"menu-popup\"\n />\n );\n});\n\nexport type MenuItemProps = ComponentPropsWithoutRef<typeof BaseMenu.Item>;\n\nexport const MenuItem = forwardRef<HTMLElement, MenuItemProps>(function MenuItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Item\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menu-item\"\n />\n );\n});\n\nexport type MenuLinkItemProps = ComponentPropsWithoutRef<typeof BaseMenu.LinkItem>;\n\n/**\n * A navigational item. It retains Base UI's keyboard navigation.\n */\nexport const MenuLinkItem = forwardRef<Element, MenuLinkItemProps>(function MenuLinkItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.LinkItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menu-link-item\"\n />\n );\n});\n\nexport type MenuSeparatorProps = ComponentPropsWithoutRef<typeof BaseMenu.Separator>;\n\nexport const MenuSeparator = forwardRef<HTMLDivElement, MenuSeparatorProps>(function MenuSeparator(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Separator\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().separator, className)}\n data-slot=\"menu-separator\"\n />\n );\n});\n\nexport type MenuGroupProps = ComponentPropsWithoutRef<typeof BaseMenu.Group>;\n\nexport const MenuGroup = forwardRef<HTMLDivElement, MenuGroupProps>(function MenuGroup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Group\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().group, className)}\n data-slot=\"menu-group\"\n />\n );\n});\n\nexport type MenuGroupLabelProps = ComponentPropsWithoutRef<typeof BaseMenu.GroupLabel>;\n\nexport const MenuGroupLabel = forwardRef<HTMLDivElement, MenuGroupLabelProps>(\n function MenuGroupLabel({ className, ...props }, ref) {\n return (\n <BaseMenu.GroupLabel\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().groupLabel, className)}\n data-slot=\"menu-group-label\"\n />\n );\n },\n);\n\nexport const Menu = {\n Root: MenuRoot,\n Trigger: MenuTrigger,\n Portal: MenuPortal,\n Positioner: MenuPositioner,\n Popup: MenuPopup,\n Item: MenuItem,\n LinkItem: MenuLinkItem,\n Separator: MenuSeparator,\n Group: MenuGroup,\n GroupLabel: MenuGroupLabel,\n createHandle: BaseMenu.createHandle,\n};\n"],"mappings":";;;;;;;;AAiBA,SAAgB,SAA4B,OAA+B;CACzE,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,oBAAAA,KAAS,MAAV,EAAe,GAAI,MAAQ,CAAA;AACpC;AAIA,MAAa,eAAA,GAAA,MAAA,WAAA,CAA8D,SAAS,YAClF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,oBAAAA,KAAS,SAAV;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,aAAAA,KAAK,CAAC,CAAC,SAAS,SAAS;EACxD,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;;AAGD,SAAgB,WAAW,OAAyD;CAClF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACF,oBAAAA,KAAS,QAAV,EAAiB,GAAIG,oBAAAA,oBAAoB,KAAK,EAAI,CAAA;AAC3D;AAIA,MAAa,kBAAA,GAAA,MAAA,WAAA,CACX,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACH,oBAAAA,KAAS,YAAV;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,aAAAA,KAAK,CAAC,CAAC,YAAY,SAAS;EAC3D,aAAU;CACX,CAAA;AAEL,CACF;AAIA,MAAa,aAAA,GAAA,MAAA,WAAA,CAAuD,SAAS,UAC3E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACF,oBAAAA,KAAS,OAAV;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,aAAAA,KAAK,CA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AA,IAAA,CAACF,oBAAAA,KAAS,YAAV;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoBC,aAAAA,KAAK,CAAC,CAAC,YAAY,SAAS;EAC3D,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,OAAO;CAClB,MAAM;CACN,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,MAAM;CACN,UAAU;CACV,WAAW;CACX,OAAO;CACP,YAAY;CACZ,cAAcF,oBAAAA,KAAS;AACzB"}
1
+ {"version":3,"file":"menu.cjs","names":["BaseMenu","forwardRef","withRecipeClassName","menu","useThemePortalProps"],"sources":["../../../src/components/menu/menu.tsx"],"sourcesContent":["\"use client\";\n\nimport { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { MenuRoot as BaseMenuRoot, MenuTrigger as BaseMenuTrigger } from \"@base-ui/react/menu\";\n\nimport { menu } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\n/**\n * Groups the menu parts. It keeps Base UI's controlled `open`/\n * `onOpenChange` API and uncontrolled `defaultOpen` API intact.\n */\nexport type MenuRootProps<Payload = unknown> = BaseMenuRoot.Props<Payload>;\n\nexport function MenuRoot<Payload = unknown>(props: MenuRootProps<Payload>) {\n return <BaseMenu.Root {...props} />;\n}\n\nexport type MenuTriggerProps<Payload = unknown> = BaseMenuTrigger.Props<Payload>;\n\nexport const MenuTrigger = forwardRef<HTMLButtonElement, MenuTriggerProps>(function MenuTrigger(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().trigger, className)}\n data-jaci-component=\"menu\"\n data-slot=\"menu-trigger\"\n />\n );\n});\n\n/** Preserves Base UI's portal and optional container APIs. */\nexport function MenuPortal(props: ComponentPropsWithoutRef<typeof BaseMenu.Portal>) {\n return <BaseMenu.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type MenuPositionerProps = ComponentPropsWithoutRef<typeof BaseMenu.Positioner>;\n\nexport const MenuPositioner = forwardRef<HTMLDivElement, MenuPositionerProps>(\n function MenuPositioner({ className, ...props }, ref) {\n return (\n <BaseMenu.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().positioner, className)}\n data-slot=\"menu-positioner\"\n />\n );\n },\n);\n\nexport type MenuPopupProps = ComponentPropsWithoutRef<typeof BaseMenu.Popup>;\n\nexport const MenuPopup = forwardRef<HTMLDivElement, MenuPopupProps>(function MenuPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().popup, className)}\n data-slot=\"menu-popup\"\n />\n );\n});\n\nexport type MenuItemProps = ComponentPropsWithoutRef<typeof BaseMenu.Item>;\n\nexport const MenuItem = forwardRef<HTMLElement, MenuItemProps>(function MenuItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Item\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menu-item\"\n />\n );\n});\n\nexport type MenuLinkItemProps = ComponentPropsWithoutRef<typeof BaseMenu.LinkItem>;\n\n/**\n * A navigational item. It retains Base UI's keyboard navigation.\n */\nexport const MenuLinkItem = forwardRef<Element, MenuLinkItemProps>(function MenuLinkItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.LinkItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menu-link-item\"\n />\n );\n});\n\nexport type MenuSeparatorProps = ComponentPropsWithoutRef<typeof BaseMenu.Separator>;\n\nexport const MenuSeparator = forwardRef<HTMLDivElement, MenuSeparatorProps>(function MenuSeparator(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Separator\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().separator, className)}\n data-slot=\"menu-separator\"\n />\n );\n});\n\nexport type MenuGroupProps = ComponentPropsWithoutRef<typeof BaseMenu.Group>;\n\nexport const MenuGroup = forwardRef<HTMLDivElement, MenuGroupProps>(function MenuGroup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Group\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().group, className)}\n data-slot=\"menu-group\"\n />\n );\n});\n\nexport type MenuGroupLabelProps = ComponentPropsWithoutRef<typeof BaseMenu.GroupLabel>;\n\nexport const MenuGroupLabel = forwardRef<HTMLDivElement, MenuGroupLabelProps>(\n function MenuGroupLabel({ className, ...props }, ref) {\n return (\n <BaseMenu.GroupLabel\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().groupLabel, className)}\n data-slot=\"menu-group-label\"\n />\n );\n },\n);\n\nexport const Menu = {\n Root: MenuRoot,\n Trigger: MenuTrigger,\n Portal: MenuPortal,\n Positioner: MenuPositioner,\n Popup: MenuPopup,\n Item: MenuItem,\n LinkItem: MenuLinkItem,\n Separator: MenuSeparator,\n Group: MenuGroup,\n GroupLabel: MenuGroupLabel,\n createHandle: BaseMenu.createHandle,\n};\n"],"mappings":";;;;;;;;AAiBA,SAAgB,SAA4B,OAA+B;CACzE,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,oBAAAA,KAAS,MAAV,EAAe,GAAI,MAAQ,CAAA;AACpC;AAIA,MAAa,eAAA,GAAcC,MAAAA,WAAAA,CAAgD,SAAS,YAClF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACD,oBAAAA,KAAS,SAAV;EACE,GAAI;EACC;EACL,WAAWE,gBAAAA,oBAAoBC,aAAAA,KAAK,CAAC,CAAC,SAAS,SAAS;EACxD,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;;AAGD,SAAgB,WAAW,OAAyD;CAClF,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACH,oBAAAA,KAAS,QAAV,EAAiB,GAAII,oBAAAA,oBAAoB,KAAK,EAA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BAAAA,KAAS,WAAV;EACE,GAAI;EACC;EACL,WAAWE,gBAAAA,oBAAoBC,aAAAA,KAAK,CAAC,CAAC,WAAW,SAAS;EAC1D,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,aAAA,GAAYF,MAAAA,WAAAA,CAA2C,SAAS,UAC3E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACD,oBAAAA,KAAS,OAAV;EACE,GAAI;EACC;EACL,WAAWE,gBAAAA,oBAAoBC,aAAAA,KAAK,CAAC,CAAC,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,kBAAA,GAAiBF,MAAAA,WAAAA,CAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACD,oBAAAA,KAAS,YAAV;EACE,GAAI;EACC;EACL,WAAWE,gBAAAA,oBAAoBC,aAAAA,KAAK,CAAC,CAAC,YAAY,SAAS;EAC3D,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,OAAO;CAClB,MAAM;CACN,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,MAAM;CACN,UAAU;CACV,WAAW;CACX,OAAO;CACP,YAAY;CACZ,cAAcH,oBAAAA,KAAS;AACzB"}
@@ -12,7 +12,7 @@ declare const MenuTrigger$1: import("react").ForwardRefExoticComponent<Omit<Menu
12
12
  /** Preserves Base UI's portal and optional container APIs. */
13
13
  declare function MenuPortal(props: ComponentPropsWithoutRef<typeof Menu.Portal>): import("react").JSX.Element;
14
14
  type MenuPositionerProps = ComponentPropsWithoutRef<typeof Menu.Positioner>;
15
- declare const MenuPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
+ declare const MenuPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
16
16
  type MenuPopupProps = ComponentPropsWithoutRef<typeof Menu.Popup>;
17
17
  declare const MenuPopup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
18
  type MenuItemProps = ComponentPropsWithoutRef<typeof Menu.Item>;
@@ -32,7 +32,7 @@ declare const Menu$1: {
32
32
  Root: typeof MenuRoot$1;
33
33
  Trigger: import("react").ForwardRefExoticComponent<Omit<MenuTriggerProps<unknown>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
34
34
  Portal: typeof MenuPortal;
35
- Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
35
+ Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
36
36
  Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
37
37
  Item: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuItemProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
38
38
  LinkItem: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuLinkItemProps, "ref"> & import("react").RefAttributes<Element>, "ref"> & import("react").RefAttributes<Element>>;
@@ -12,7 +12,7 @@ declare const MenuTrigger$1: import("react").ForwardRefExoticComponent<Omit<Menu
12
12
  /** Preserves Base UI's portal and optional container APIs. */
13
13
  declare function MenuPortal(props: ComponentPropsWithoutRef<typeof Menu.Portal>): import("react").JSX.Element;
14
14
  type MenuPositionerProps = ComponentPropsWithoutRef<typeof Menu.Positioner>;
15
- declare const MenuPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
15
+ declare const MenuPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
16
16
  type MenuPopupProps = ComponentPropsWithoutRef<typeof Menu.Popup>;
17
17
  declare const MenuPopup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
18
18
  type MenuItemProps = ComponentPropsWithoutRef<typeof Menu.Item>;
@@ -32,7 +32,7 @@ declare const Menu$1: {
32
32
  Root: typeof MenuRoot$1;
33
33
  Trigger: import("react").ForwardRefExoticComponent<Omit<MenuTriggerProps<unknown>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
34
34
  Portal: typeof MenuPortal;
35
- Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
35
+ Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
36
36
  Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
37
37
  Item: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuItemProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
38
38
  LinkItem: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuLinkItemProps, "ref"> & import("react").RefAttributes<Element>, "ref"> & import("react").RefAttributes<Element>>;
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.cjs","names":["menubar","BaseMenubar","withRecipeClassName","BaseMenu","useThemePortalProps","menu"],"sources":["../../../src/components/menubar/menubar.tsx"],"sourcesContent":["\"use client\";\n\nimport { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Menubar as BaseMenubar } from \"@base-ui/react/menubar\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { MenuRoot as BaseMenuRoot } from \"@base-ui/react/menu\";\n\nimport { menu, menubar } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\nexport type MenubarOrientation = \"horizontal\" | \"vertical\";\n\ninterface MenubarContextValue {\n orientation: MenubarOrientation;\n styles: ReturnType<typeof menubar>;\n}\n\nconst MenubarContext = createContext<MenubarContextValue | null>(null);\n\nfunction useMenubarContext() {\n const context = useContext(MenubarContext);\n if (!context) {\n throw new Error(\"Menubar parts must be rendered inside Menubar.Root.\");\n }\n\n return context;\n}\n\nexport interface MenubarRootProps extends ComponentPropsWithoutRef<typeof BaseMenubar> {\n orientation?: MenubarOrientation;\n}\n\n/**\n * A horizontal or vertical command bar. Each `Menubar.Menu` owns one\n * keyboard-navigable menu while the root coordinates arrow-key movement.\n */\nexport const MenubarRoot = forwardRef<HTMLDivElement, MenubarRootProps>(function MenubarRoot(\n { className, orientation = \"horizontal\", ...props },\n ref,\n) {\n const styles = menubar({ orientation });\n\n return (\n <MenubarContext.Provider value={{ orientation, styles }}>\n <BaseMenubar\n {...props}\n ref={ref}\n orientation={orientation}\n className={withRecipeClassName(styles.root, className)}\n data-jaci-component=\"menubar\"\n data-orientation={orientation}\n data-slot=\"menubar\"\n />\n </MenubarContext.Provider>\n );\n});\n\nexport interface MenubarMenuProps<Payload = unknown> extends BaseMenuRoot.Props<Payload> {}\n\nexport function MenubarMenu<Payload = unknown>(props: MenubarMenuProps<Payload>) {\n return <BaseMenu.Root {...props} />;\n}\n\nexport type MenubarTriggerProps = ComponentPropsWithoutRef<typeof BaseMenu.Trigger>;\n\nexport const MenubarTrigger = forwardRef<HTMLButtonElement, MenubarTriggerProps>(\n function MenubarTrigger({ className, ...props }, ref) {\n const { styles } = useMenubarContext();\n\n return (\n <BaseMenu.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.trigger, className)}\n data-jaci-component=\"menubar\"\n data-slot=\"menubar-trigger\"\n />\n );\n },\n);\n\nexport type MenubarPortalProps = ComponentPropsWithoutRef<typeof BaseMenu.Portal>;\nexport function MenubarPortal(props: MenubarPortalProps) {\n return <BaseMenu.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type MenubarPositionerProps = ComponentPropsWithoutRef<typeof BaseMenu.Positioner>;\n\nexport const MenubarPositioner = forwardRef<HTMLDivElement, MenubarPositionerProps>(\n function MenubarPositioner({ className, ...props }, ref) {\n return (\n <BaseMenu.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().positioner, className)}\n data-slot=\"menubar-positioner\"\n />\n );\n },\n);\n\nexport type MenubarPopupProps = ComponentPropsWithoutRef<typeof BaseMenu.Popup>;\n\nexport const MenubarPopup = forwardRef<HTMLDivElement, MenubarPopupProps>(function MenubarPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().popup, className)}\n data-slot=\"menubar-popup\"\n />\n );\n});\n\nexport type MenubarArrowProps = ComponentPropsWithoutRef<typeof BaseMenu.Arrow>;\n\nexport const MenubarArrow = forwardRef<HTMLDivElement, MenubarArrowProps>(function MenubarArrow(\n { className, ...props },\n ref,\n) {\n return <BaseMenu.Arrow {...props} ref={ref} className={className} data-slot=\"menubar-arrow\" />;\n});\n\nexport type MenubarItemProps = ComponentPropsWithoutRef<typeof BaseMenu.Item>;\n\nexport const MenubarItem = forwardRef<HTMLElement, MenubarItemProps>(function MenubarItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Item\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-item\"\n />\n );\n});\n\nexport type MenubarLinkItemProps = ComponentPropsWithoutRef<typeof BaseMenu.LinkItem>;\n\nexport const MenubarLinkItem = forwardRef<Element, MenubarLinkItemProps>(function MenubarLinkItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.LinkItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-link-item\"\n />\n );\n});\n\nexport type MenubarGroupProps = ComponentPropsWithoutRef<typeof BaseMenu.Group>;\n\nexport const MenubarGroup = forwardRef<HTMLDivElement, MenubarGroupProps>(function MenubarGroup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Group\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().group, className)}\n data-slot=\"menubar-group\"\n />\n );\n});\n\nexport type MenubarGroupLabelProps = ComponentPropsWithoutRef<typeof BaseMenu.GroupLabel>;\n\nexport const MenubarGroupLabel = forwardRef<HTMLDivElement, MenubarGroupLabelProps>(\n function MenubarGroupLabel({ className, ...props }, ref) {\n return (\n <BaseMenu.GroupLabel\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().groupLabel, className)}\n data-slot=\"menubar-group-label\"\n />\n );\n },\n);\n\nexport type MenubarSeparatorProps = ComponentPropsWithoutRef<typeof BaseMenu.Separator>;\n\nexport const MenubarSeparator = forwardRef<HTMLDivElement, MenubarSeparatorProps>(\n function MenubarSeparator({ className, ...props }, ref) {\n return (\n <BaseMenu.Separator\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().separator, className)}\n data-slot=\"menubar-separator\"\n />\n );\n },\n);\n\nexport type MenubarCheckboxItemProps = ComponentPropsWithoutRef<typeof BaseMenu.CheckboxItem>;\n\nexport const MenubarCheckboxItem = forwardRef<HTMLElement, MenubarCheckboxItemProps>(\n function MenubarCheckboxItem({ className, ...props }, ref) {\n return (\n <BaseMenu.CheckboxItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-checkbox-item\"\n />\n );\n },\n);\n\nexport type MenubarCheckboxItemIndicatorProps = ComponentPropsWithoutRef<\n typeof BaseMenu.CheckboxItemIndicator\n>;\n\nexport const MenubarCheckboxItemIndicator = forwardRef<\n HTMLSpanElement,\n MenubarCheckboxItemIndicatorProps\n>(function MenubarCheckboxItemIndicator({ children = \"✓\", className, ...props }, ref) {\n return (\n <BaseMenu.CheckboxItemIndicator\n {...props}\n ref={ref}\n className={className}\n data-slot=\"menubar-checkbox-indicator\"\n aria-hidden=\"true\"\n >\n {children}\n </BaseMenu.CheckboxItemIndicator>\n );\n});\n\nexport type MenubarRadioGroupProps = ComponentPropsWithoutRef<typeof BaseMenu.RadioGroup>;\nexport const MenubarRadioGroup: typeof BaseMenu.RadioGroup = BaseMenu.RadioGroup;\n\nexport type MenubarRadioItemProps = ComponentPropsWithoutRef<typeof BaseMenu.RadioItem>;\n\nexport const MenubarRadioItem = forwardRef<HTMLElement, MenubarRadioItemProps>(\n function MenubarRadioItem({ className, ...props }, ref) {\n return (\n <BaseMenu.RadioItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-radio-item\"\n />\n );\n },\n);\n\nexport type MenubarRadioItemIndicatorProps = ComponentPropsWithoutRef<\n typeof BaseMenu.RadioItemIndicator\n>;\n\nexport const MenubarRadioItemIndicator = forwardRef<\n HTMLSpanElement,\n MenubarRadioItemIndicatorProps\n>(function MenubarRadioItemIndicator({ children = \"•\", className, ...props }, ref) {\n return (\n <BaseMenu.RadioItemIndicator\n {...props}\n ref={ref}\n className={className}\n data-slot=\"menubar-radio-indicator\"\n aria-hidden=\"true\"\n >\n {children}\n </BaseMenu.RadioItemIndicator>\n );\n});\n\nexport type MenubarSubmenuRootProps = ComponentPropsWithoutRef<typeof BaseMenu.SubmenuRoot>;\nexport const MenubarSubmenuRoot: typeof BaseMenu.SubmenuRoot = BaseMenu.SubmenuRoot;\n\nexport type MenubarSubmenuTriggerProps = ComponentPropsWithoutRef<typeof BaseMenu.SubmenuTrigger>;\n\nexport const MenubarSubmenuTrigger = forwardRef<HTMLElement, MenubarSubmenuTriggerProps>(\n function MenubarSubmenuTrigger({ className, ...props }, ref) {\n return (\n <BaseMenu.SubmenuTrigger\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-submenu-trigger\"\n />\n );\n },\n);\n\nexport const Menubar = {\n Root: MenubarRoot,\n Menu: MenubarMenu,\n Trigger: MenubarTrigger,\n Portal: MenubarPortal,\n Positioner: MenubarPositioner,\n Popup: MenubarPopup,\n Arrow: MenubarArrow,\n Item: MenubarItem,\n LinkItem: MenubarLinkItem,\n Group: MenubarGroup,\n GroupLabel: MenubarGroupLabel,\n Separator: MenubarSeparator,\n CheckboxItem: MenubarCheckboxItem,\n CheckboxItemIndicator: MenubarCheckboxItemIndicator,\n RadioGroup: MenubarRadioGroup,\n RadioItem: MenubarRadioItem,\n RadioItemIndicator: MenubarRadioItemIndicator,\n SubmenuRoot: MenubarSubmenuRoot,\n SubmenuTrigger: MenubarSubmenuTrigger,\n createHandle: BaseMenu.createHandle,\n};\n"],"mappings":";;;;;;;;;;AAmBA,MAAM,kBAAA,GAAA,MAAA,cAAA,CAA2D,IAAI;AAErE,SAAS,oBAAoB;CAC3B,MAAM,WAAA,GAAA,MAAA,WAAA,CAAqB,cAAc;CACzC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,qDAAqD;C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B,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,oBAAAA,KAAS,WAAV;EACE,GAAI;EACC;EACL,WAAWD,gBAAAA,oBAAoBG,aAAAA,KAAK,CAAC,CAAC,MAAM,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;AAMA,MAAa,6BAAA,GAAA,MAAA,WAAA,CAGX,SAAS,0BAA0B,EAAE,WAAW,KAAK,WAAW,GAAG,SAAS,KAAK;CACjF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACF,oBAAAA,KAAS,oBAAV;EACE,GAAI;EACC;EACM;EACX,aAAU;EACV,eAAY;EAEX;CAC0B,CAAA;AAEjC,CAAC;AAGD,MAAa,qBAAkDA,oBAAAA,KAAS;AAIxE,MAAa,yBAAA,GAAA,MAAA,WAAA,CACX,SAAS,sBAAsB,EAAE,WAAW,GAAG,SAAS,KAAK;CAC3D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,oBAAAA,KAAS,gBAAV;EACE,GAAI;EACC;EACL,WAAWD,gBAAAA,oBAAoBG,aAAAA,KAAK,CAAC,CAAC,MAAM,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,UAAU;CACrB,MAAM;CACN,MAAM;CACN,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,MAAM;CACN,UAAU;CACV,OAAO;CACP,YAAY;CACZ,WAAW;CACX,cAAc;CACd,uBAAuB;CACvB,YAAY;CACZ,WAAW;CACX,oBAAoB;CACpB,aAAa;CACb,gBAAgB;CAChB,cAAcF,oBAAAA,KAAS;AACzB"}
1
+ {"version":3,"file":"menubar.cjs","names":["createContext","useContext","forwardRef","menubar","BaseMenubar","withRecipeClassName","BaseMenu","useThemePortalProps","menu"],"sources":["../../../src/components/menubar/menubar.tsx"],"sourcesContent":["\"use client\";\n\nimport { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Menubar as BaseMenubar } from \"@base-ui/react/menubar\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { MenuRoot as BaseMenuRoot } from \"@base-ui/react/menu\";\n\nimport { menu, menubar } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\nexport type MenubarOrientation = \"horizontal\" | \"vertical\";\n\ninterface MenubarContextValue {\n orientation: MenubarOrientation;\n styles: ReturnType<typeof menubar>;\n}\n\nconst MenubarContext = createContext<MenubarContextValue | null>(null);\n\nfunction useMenubarContext() {\n const context = useContext(MenubarContext);\n if (!context) {\n throw new Error(\"Menubar parts must be rendered inside Menubar.Root.\");\n }\n\n return context;\n}\n\nexport interface MenubarRootProps extends ComponentPropsWithoutRef<typeof BaseMenubar> {\n orientation?: MenubarOrientation;\n}\n\n/**\n * A horizontal or vertical command bar. Each `Menubar.Menu` owns one\n * keyboard-navigable menu while the root coordinates arrow-key movement.\n */\nexport const MenubarRoot = forwardRef<HTMLDivElement, MenubarRootProps>(function MenubarRoot(\n { className, orientation = \"horizontal\", ...props },\n ref,\n) {\n const styles = menubar({ orientation });\n\n return (\n <MenubarContext.Provider value={{ orientation, styles }}>\n <BaseMenubar\n {...props}\n ref={ref}\n orientation={orientation}\n className={withRecipeClassName(styles.root, className)}\n data-jaci-component=\"menubar\"\n data-orientation={orientation}\n data-slot=\"menubar\"\n />\n </MenubarContext.Provider>\n );\n});\n\nexport interface MenubarMenuProps<Payload = unknown> extends BaseMenuRoot.Props<Payload> {}\n\nexport function MenubarMenu<Payload = unknown>(props: MenubarMenuProps<Payload>) {\n return <BaseMenu.Root {...props} />;\n}\n\nexport type MenubarTriggerProps = ComponentPropsWithoutRef<typeof BaseMenu.Trigger>;\n\nexport const MenubarTrigger = forwardRef<HTMLButtonElement, MenubarTriggerProps>(\n function MenubarTrigger({ className, ...props }, ref) {\n const { styles } = useMenubarContext();\n\n return (\n <BaseMenu.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.trigger, className)}\n data-jaci-component=\"menubar\"\n data-slot=\"menubar-trigger\"\n />\n );\n },\n);\n\nexport type MenubarPortalProps = ComponentPropsWithoutRef<typeof BaseMenu.Portal>;\nexport function MenubarPortal(props: MenubarPortalProps) {\n return <BaseMenu.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type MenubarPositionerProps = ComponentPropsWithoutRef<typeof BaseMenu.Positioner>;\n\nexport const MenubarPositioner = forwardRef<HTMLDivElement, MenubarPositionerProps>(\n function MenubarPositioner({ className, ...props }, ref) {\n return (\n <BaseMenu.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().positioner, className)}\n data-slot=\"menubar-positioner\"\n />\n );\n },\n);\n\nexport type MenubarPopupProps = ComponentPropsWithoutRef<typeof BaseMenu.Popup>;\n\nexport const MenubarPopup = forwardRef<HTMLDivElement, MenubarPopupProps>(function MenubarPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().popup, className)}\n data-slot=\"menubar-popup\"\n />\n );\n});\n\nexport type MenubarArrowProps = ComponentPropsWithoutRef<typeof BaseMenu.Arrow>;\n\nexport const MenubarArrow = forwardRef<HTMLDivElement, MenubarArrowProps>(function MenubarArrow(\n { className, ...props },\n ref,\n) {\n return <BaseMenu.Arrow {...props} ref={ref} className={className} data-slot=\"menubar-arrow\" />;\n});\n\nexport type MenubarItemProps = ComponentPropsWithoutRef<typeof BaseMenu.Item>;\n\nexport const MenubarItem = forwardRef<HTMLElement, MenubarItemProps>(function MenubarItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Item\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-item\"\n />\n );\n});\n\nexport type MenubarLinkItemProps = ComponentPropsWithoutRef<typeof BaseMenu.LinkItem>;\n\nexport const MenubarLinkItem = forwardRef<Element, MenubarLinkItemProps>(function MenubarLinkItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.LinkItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-link-item\"\n />\n );\n});\n\nexport type MenubarGroupProps = ComponentPropsWithoutRef<typeof BaseMenu.Group>;\n\nexport const MenubarGroup = forwardRef<HTMLDivElement, MenubarGroupProps>(function MenubarGroup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Group\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().group, className)}\n data-slot=\"menubar-group\"\n />\n );\n});\n\nexport type MenubarGroupLabelProps = ComponentPropsWithoutRef<typeof BaseMenu.GroupLabel>;\n\nexport const MenubarGroupLabel = forwardRef<HTMLDivElement, MenubarGroupLabelProps>(\n function MenubarGroupLabel({ className, ...props }, ref) {\n return (\n <BaseMenu.GroupLabel\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().groupLabel, className)}\n data-slot=\"menubar-group-label\"\n />\n );\n },\n);\n\nexport type MenubarSeparatorProps = ComponentPropsWithoutRef<typeof BaseMenu.Separator>;\n\nexport const MenubarSeparator = forwardRef<HTMLDivElement, MenubarSeparatorProps>(\n function MenubarSeparator({ className, ...props }, ref) {\n return (\n <BaseMenu.Separator\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().separator, className)}\n data-slot=\"menubar-separator\"\n />\n );\n },\n);\n\nexport type MenubarCheckboxItemProps = ComponentPropsWithoutRef<typeof BaseMenu.CheckboxItem>;\n\nexport const MenubarCheckboxItem = forwardRef<HTMLElement, MenubarCheckboxItemProps>(\n function MenubarCheckboxItem({ className, ...props }, ref) {\n return (\n <BaseMenu.CheckboxItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-checkbox-item\"\n />\n );\n },\n);\n\nexport type MenubarCheckboxItemIndicatorProps = ComponentPropsWithoutRef<\n typeof BaseMenu.CheckboxItemIndicator\n>;\n\nexport const MenubarCheckboxItemIndicator = forwardRef<\n HTMLSpanElement,\n MenubarCheckboxItemIndicatorProps\n>(function MenubarCheckboxItemIndicator({ children = \"✓\", className, ...props }, ref) {\n return (\n <BaseMenu.CheckboxItemIndicator\n {...props}\n ref={ref}\n className={className}\n data-slot=\"menubar-checkbox-indicator\"\n aria-hidden=\"true\"\n >\n {children}\n </BaseMenu.CheckboxItemIndicator>\n );\n});\n\nexport type MenubarRadioGroupProps = ComponentPropsWithoutRef<typeof BaseMenu.RadioGroup>;\nexport const MenubarRadioGroup: typeof BaseMenu.RadioGroup = BaseMenu.RadioGroup;\n\nexport type MenubarRadioItemProps = ComponentPropsWithoutRef<typeof BaseMenu.RadioItem>;\n\nexport const MenubarRadioItem = forwardRef<HTMLElement, MenubarRadioItemProps>(\n function MenubarRadioItem({ className, ...props }, ref) {\n return (\n <BaseMenu.RadioItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-radio-item\"\n />\n );\n },\n);\n\nexport type MenubarRadioItemIndicatorProps = ComponentPropsWithoutRef<\n typeof BaseMenu.RadioItemIndicator\n>;\n\nexport const MenubarRadioItemIndicator = forwardRef<\n HTMLSpanElement,\n MenubarRadioItemIndicatorProps\n>(function MenubarRadioItemIndicator({ children = \"•\", className, ...props }, ref) {\n return (\n <BaseMenu.RadioItemIndicator\n {...props}\n ref={ref}\n className={className}\n data-slot=\"menubar-radio-indicator\"\n aria-hidden=\"true\"\n >\n {children}\n </BaseMenu.RadioItemIndicator>\n );\n});\n\nexport type MenubarSubmenuRootProps = ComponentPropsWithoutRef<typeof BaseMenu.SubmenuRoot>;\nexport const MenubarSubmenuRoot: typeof BaseMenu.SubmenuRoot = BaseMenu.SubmenuRoot;\n\nexport type MenubarSubmenuTriggerProps = ComponentPropsWithoutRef<typeof BaseMenu.SubmenuTrigger>;\n\nexport const MenubarSubmenuTrigger = forwardRef<HTMLElement, MenubarSubmenuTriggerProps>(\n function MenubarSubmenuTrigger({ className, ...props }, ref) {\n return (\n <BaseMenu.SubmenuTrigger\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-submenu-trigger\"\n />\n );\n },\n);\n\nexport const Menubar = {\n Root: MenubarRoot,\n Menu: MenubarMenu,\n Trigger: MenubarTrigger,\n Portal: MenubarPortal,\n Positioner: MenubarPositioner,\n Popup: MenubarPopup,\n Arrow: MenubarArrow,\n Item: MenubarItem,\n LinkItem: MenubarLinkItem,\n Group: MenubarGroup,\n GroupLabel: MenubarGroupLabel,\n Separator: MenubarSeparator,\n CheckboxItem: MenubarCheckboxItem,\n CheckboxItemIndicator: MenubarCheckboxItemIndicator,\n RadioGroup: MenubarRadioGroup,\n RadioItem: MenubarRadioItem,\n RadioItemIndicator: MenubarRadioItemIndicator,\n SubmenuRoot: MenubarSubmenuRoot,\n SubmenuTrigger: MenubarSubmenuTrigger,\n createHandle: BaseMenu.createHandle,\n};\n"],"mappings":";;;;;;;;;;AAmBA,MAAM,kBAAA,GAAiBA,MAAAA,cAAAA,CAA0C,IAAI;AAErE,SAAS,oBAAoB;CAC3B,MAAM,WAAA,GAAUC,MAAAA,WAAAA,CAAW,cAAc;CACzC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,qDAAqD;CAGvE,OAAO;AACT;;;;;AAUA,MAAa,eAAA,GAAcC,MAAAA,WAAAA,CAA6C,SAAS,YAC/E,EAAE,WAAW,cAAc,cAAc,GAAG,SAC5C,KACA;CACA,MAAM,SAASC,gBAAAA,QAAQ,EAAE,YAAY,CAAC;CAEtC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAe,UAAhB;EAAyB,OAAO;GAAE;GAAa;EAAO;EACpD,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,uBAAAA,SAAD;GACE,GAAI;GACC;GACQ;GACb,WAAWC,gBAAAA,oBAAoB,OAAO,MAAM,SAAS;GACrD,uBAAoB;GACpB,oBAAkB;GAClB,aAAU;EACX,CAAA;CACsB,CAAA;AAE7B,CAAC;AA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AAI;EACC;EACM;EACX,aAAU;EACV,eAAY;EAEX;CAC0B,CAAA;AAEjC,CAAC;AAGD,MAAa,qBAAkDA,oBAAAA,KAAS;AAIxE,MAAa,yBAAA,GAAwBJ,MAAAA,WAAAA,CACnC,SAAS,sBAAsB,EAAE,WAAW,GAAG,SAAS,KAAK;CAC3D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACI,oBAAAA,KAAS,gBAAV;EACE,GAAI;EACC;EACL,WAAWD,gBAAAA,oBAAoBG,aAAAA,KAAK,CAAC,CAAC,MAAM,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,UAAU;CACrB,MAAM;CACN,MAAM;CACN,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,MAAM;CACN,UAAU;CACV,OAAO;CACP,YAAY;CACZ,WAAW;CACX,cAAc;CACd,uBAAuB;CACvB,YAAY;CACZ,WAAW;CACX,oBAAoB;CACpB,aAAa;CACb,gBAAgB;CAChB,cAAcF,oBAAAA,KAAS;AACzB"}
@@ -18,7 +18,7 @@ declare const MenubarTrigger: import("react").ForwardRefExoticComponent<Omit<imp
18
18
  type MenubarPortalProps = ComponentPropsWithoutRef<typeof Menu.Portal>;
19
19
  declare function MenubarPortal(props: MenubarPortalProps): import("react").JSX.Element;
20
20
  type MenubarPositionerProps = ComponentPropsWithoutRef<typeof Menu.Positioner>;
21
- declare const MenubarPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
21
+ declare const MenubarPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
22
22
  type MenubarPopupProps = ComponentPropsWithoutRef<typeof Menu.Popup>;
23
23
  declare const MenubarPopup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
24
24
  type MenubarArrowProps = ComponentPropsWithoutRef<typeof Menu.Arrow>;
@@ -52,7 +52,7 @@ declare const Menubar$1: {
52
52
  Menu: typeof MenubarMenu;
53
53
  Trigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuTriggerProps<unknown> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
54
54
  Portal: typeof MenubarPortal;
55
- Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
55
+ Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
56
56
  Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
57
57
  Arrow: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuArrowProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
58
58
  Item: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuItemProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
@@ -18,7 +18,7 @@ declare const MenubarTrigger: import("react").ForwardRefExoticComponent<Omit<imp
18
18
  type MenubarPortalProps = ComponentPropsWithoutRef<typeof Menu.Portal>;
19
19
  declare function MenubarPortal(props: MenubarPortalProps): import("react").JSX.Element;
20
20
  type MenubarPositionerProps = ComponentPropsWithoutRef<typeof Menu.Positioner>;
21
- declare const MenubarPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
21
+ declare const MenubarPositioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
22
22
  type MenubarPopupProps = ComponentPropsWithoutRef<typeof Menu.Popup>;
23
23
  declare const MenubarPopup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
24
24
  type MenubarArrowProps = ComponentPropsWithoutRef<typeof Menu.Arrow>;
@@ -52,7 +52,7 @@ declare const Menubar$1: {
52
52
  Menu: typeof MenubarMenu;
53
53
  Trigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").MenuTriggerProps<unknown> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
54
54
  Portal: typeof MenubarPortal;
55
- Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
55
+ Positioner: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").MenuPositionerProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
56
56
  Popup: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuPopupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
57
57
  Arrow: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuArrowProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
58
58
  Item: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").ContextMenuItemProps, "ref"> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"menubar.js","names":["BaseMenubar","BaseMenu","Menubar"],"sources":["../../../src/components/menubar/menubar.tsx"],"sourcesContent":["\"use client\";\n\nimport { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Menubar as BaseMenubar } from \"@base-ui/react/menubar\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { MenuRoot as BaseMenuRoot } from \"@base-ui/react/menu\";\n\nimport { menu, menubar } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\nexport type MenubarOrientation = \"horizontal\" | \"vertical\";\n\ninterface MenubarContextValue {\n orientation: MenubarOrientation;\n styles: ReturnType<typeof menubar>;\n}\n\nconst MenubarContext = createContext<MenubarContextValue | null>(null);\n\nfunction useMenubarContext() {\n const context = useContext(MenubarContext);\n if (!context) {\n throw new Error(\"Menubar parts must be rendered inside Menubar.Root.\");\n }\n\n return context;\n}\n\nexport interface MenubarRootProps extends ComponentPropsWithoutRef<typeof BaseMenubar> {\n orientation?: MenubarOrientation;\n}\n\n/**\n * A horizontal or vertical command bar. Each `Menubar.Menu` owns one\n * keyboard-navigable menu while the root coordinates arrow-key movement.\n */\nexport const MenubarRoot = forwardRef<HTMLDivElement, MenubarRootProps>(function MenubarRoot(\n { className, orientation = \"horizontal\", ...props },\n ref,\n) {\n const styles = menubar({ orientation });\n\n return (\n <MenubarContext.Provider value={{ orientation, styles }}>\n <BaseMenubar\n {...props}\n ref={ref}\n orientation={orientation}\n className={withRecipeClassName(styles.root, className)}\n data-jaci-component=\"menubar\"\n data-orientation={orientation}\n data-slot=\"menubar\"\n />\n </MenubarContext.Provider>\n );\n});\n\nexport interface MenubarMenuProps<Payload = unknown> extends BaseMenuRoot.Props<Payload> {}\n\nexport function MenubarMenu<Payload = unknown>(props: MenubarMenuProps<Payload>) {\n return <BaseMenu.Root {...props} />;\n}\n\nexport type MenubarTriggerProps = ComponentPropsWithoutRef<typeof BaseMenu.Trigger>;\n\nexport const MenubarTrigger = forwardRef<HTMLButtonElement, MenubarTriggerProps>(\n function MenubarTrigger({ className, ...props }, ref) {\n const { styles } = useMenubarContext();\n\n return (\n <BaseMenu.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.trigger, className)}\n data-jaci-component=\"menubar\"\n data-slot=\"menubar-trigger\"\n />\n );\n },\n);\n\nexport type MenubarPortalProps = ComponentPropsWithoutRef<typeof BaseMenu.Portal>;\nexport function MenubarPortal(props: MenubarPortalProps) {\n return <BaseMenu.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type MenubarPositionerProps = ComponentPropsWithoutRef<typeof BaseMenu.Positioner>;\n\nexport const MenubarPositioner = forwardRef<HTMLDivElement, MenubarPositionerProps>(\n function MenubarPositioner({ className, ...props }, ref) {\n return (\n <BaseMenu.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().positioner, className)}\n data-slot=\"menubar-positioner\"\n />\n );\n },\n);\n\nexport type MenubarPopupProps = ComponentPropsWithoutRef<typeof BaseMenu.Popup>;\n\nexport const MenubarPopup = forwardRef<HTMLDivElement, MenubarPopupProps>(function MenubarPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().popup, className)}\n data-slot=\"menubar-popup\"\n />\n );\n});\n\nexport type MenubarArrowProps = ComponentPropsWithoutRef<typeof BaseMenu.Arrow>;\n\nexport const MenubarArrow = forwardRef<HTMLDivElement, MenubarArrowProps>(function MenubarArrow(\n { className, ...props },\n ref,\n) {\n return <BaseMenu.Arrow {...props} ref={ref} className={className} data-slot=\"menubar-arrow\" />;\n});\n\nexport type MenubarItemProps = ComponentPropsWithoutRef<typeof BaseMenu.Item>;\n\nexport const MenubarItem = forwardRef<HTMLElement, MenubarItemProps>(function MenubarItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Item\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-item\"\n />\n );\n});\n\nexport type MenubarLinkItemProps = ComponentPropsWithoutRef<typeof BaseMenu.LinkItem>;\n\nexport const MenubarLinkItem = forwardRef<Element, MenubarLinkItemProps>(function MenubarLinkItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.LinkItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-link-item\"\n />\n );\n});\n\nexport type MenubarGroupProps = ComponentPropsWithoutRef<typeof BaseMenu.Group>;\n\nexport const MenubarGroup = forwardRef<HTMLDivElement, MenubarGroupProps>(function MenubarGroup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Group\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().group, className)}\n data-slot=\"menubar-group\"\n />\n );\n});\n\nexport type MenubarGroupLabelProps = ComponentPropsWithoutRef<typeof BaseMenu.GroupLabel>;\n\nexport const MenubarGroupLabel = forwardRef<HTMLDivElement, MenubarGroupLabelProps>(\n function MenubarGroupLabel({ className, ...props }, ref) {\n return (\n <BaseMenu.GroupLabel\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().groupLabel, className)}\n data-slot=\"menubar-group-label\"\n />\n );\n },\n);\n\nexport type MenubarSeparatorProps = ComponentPropsWithoutRef<typeof BaseMenu.Separator>;\n\nexport const MenubarSeparator = forwardRef<HTMLDivElement, MenubarSeparatorProps>(\n function MenubarSeparator({ className, ...props }, ref) {\n return (\n <BaseMenu.Separator\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().separator, className)}\n data-slot=\"menubar-separator\"\n />\n );\n },\n);\n\nexport type MenubarCheckboxItemProps = ComponentPropsWithoutRef<typeof BaseMenu.CheckboxItem>;\n\nexport const MenubarCheckboxItem = forwardRef<HTMLElement, MenubarCheckboxItemProps>(\n function MenubarCheckboxItem({ className, ...props }, ref) {\n return (\n <BaseMenu.CheckboxItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-checkbox-item\"\n />\n );\n },\n);\n\nexport type MenubarCheckboxItemIndicatorProps = ComponentPropsWithoutRef<\n typeof BaseMenu.CheckboxItemIndicator\n>;\n\nexport const MenubarCheckboxItemIndicator = forwardRef<\n HTMLSpanElement,\n MenubarCheckboxItemIndicatorProps\n>(function MenubarCheckboxItemIndicator({ children = \"✓\", className, ...props }, ref) {\n return (\n <BaseMenu.CheckboxItemIndicator\n {...props}\n ref={ref}\n className={className}\n data-slot=\"menubar-checkbox-indicator\"\n aria-hidden=\"true\"\n >\n {children}\n </BaseMenu.CheckboxItemIndicator>\n );\n});\n\nexport type MenubarRadioGroupProps = ComponentPropsWithoutRef<typeof BaseMenu.RadioGroup>;\nexport const MenubarRadioGroup: typeof BaseMenu.RadioGroup = BaseMenu.RadioGroup;\n\nexport type MenubarRadioItemProps = ComponentPropsWithoutRef<typeof BaseMenu.RadioItem>;\n\nexport const MenubarRadioItem = forwardRef<HTMLElement, MenubarRadioItemProps>(\n function MenubarRadioItem({ className, ...props }, ref) {\n return (\n <BaseMenu.RadioItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-radio-item\"\n />\n );\n },\n);\n\nexport type MenubarRadioItemIndicatorProps = ComponentPropsWithoutRef<\n typeof BaseMenu.RadioItemIndicator\n>;\n\nexport const MenubarRadioItemIndicator = forwardRef<\n HTMLSpanElement,\n MenubarRadioItemIndicatorProps\n>(function MenubarRadioItemIndicator({ children = \"•\", className, ...props }, ref) {\n return (\n <BaseMenu.RadioItemIndicator\n {...props}\n ref={ref}\n className={className}\n data-slot=\"menubar-radio-indicator\"\n aria-hidden=\"true\"\n >\n {children}\n </BaseMenu.RadioItemIndicator>\n );\n});\n\nexport type MenubarSubmenuRootProps = ComponentPropsWithoutRef<typeof BaseMenu.SubmenuRoot>;\nexport const MenubarSubmenuRoot: typeof BaseMenu.SubmenuRoot = BaseMenu.SubmenuRoot;\n\nexport type MenubarSubmenuTriggerProps = ComponentPropsWithoutRef<typeof BaseMenu.SubmenuTrigger>;\n\nexport const MenubarSubmenuTrigger = forwardRef<HTMLElement, MenubarSubmenuTriggerProps>(\n function MenubarSubmenuTrigger({ className, ...props }, ref) {\n return (\n <BaseMenu.SubmenuTrigger\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-submenu-trigger\"\n />\n );\n },\n);\n\nexport const Menubar = {\n Root: MenubarRoot,\n Menu: MenubarMenu,\n Trigger: MenubarTrigger,\n Portal: MenubarPortal,\n Positioner: MenubarPositioner,\n Popup: MenubarPopup,\n Arrow: MenubarArrow,\n Item: MenubarItem,\n LinkItem: MenubarLinkItem,\n Group: MenubarGroup,\n GroupLabel: MenubarGroupLabel,\n Separator: MenubarSeparator,\n CheckboxItem: MenubarCheckboxItem,\n CheckboxItemIndicator: MenubarCheckboxItemIndicator,\n RadioGroup: MenubarRadioGroup,\n RadioItem: MenubarRadioItem,\n RadioItemIndicator: MenubarRadioItemIndicator,\n SubmenuRoot: MenubarSubmenuRoot,\n SubmenuTrigger: MenubarSubmenuTrigger,\n createHandle: BaseMenu.createHandle,\n};\n"],"mappings":";;;;;;;;;;AAmBA,MAAM,iBAAiB,cAA0C,IAAI;AAErE,SAAS,oBAAoB;CAC3B,MAAM,UAAU,WAAW,cAAc;CACzC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,qDAAqD;CAGvE,OAAO;AACT;;;;;AAUA,MAAa,cAAc,WAA6C,SAAS,YAC/E,EAAE,WAAW,cAAc,cAAc,GAAG,SAC5C,KACA;CACA,MAAM,SAAS,QAAQ,EAAE,YAA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AW,GAAG,SAAS,KAAK;CACpF,OACE,oBAACA,KAAS,uBAAV;EACE,GAAI;EACC;EACM;EACX,aAAU;EACV,eAAY;EAEX;CAC6B,CAAA;AAEpC,CAAC;AAGD,MAAa,oBAAgDA,KAAS;AAItE,MAAa,mBAAmB,WAC9B,SAAS,iBAAiB,EAAE,WAAW,GAAG,SAAS,KAAK;CACtD,OACE,oBAACA,KAAS,WAAV;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,KAAK,CAAC,CAAC,MAAM,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;AAMA,MAAa,4BAA4B,WAGvC,SAAS,0BAA0B,EAAE,WAAW,KAAK,WAAW,GAAG,SAAS,KAAK;CACjF,OACE,oBAACA,KAAS,oBAAV;EACE,GAAI;EACC;EACM;EACX,aAAU;EACV,eAAY;EAEX;CAC0B,CAAA;AAEjC,CAAC;AAGD,MAAa,qBAAkDA,KAAS;AAIxE,MAAa,wBAAwB,WACnC,SAAS,sBAAsB,EAAE,WAAW,GAAG,SAAS,KAAK;CAC3D,OACE,oBAACA,KAAS,gBAAV;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,KAAK,CAAC,CAAC,MAAM,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAaC,YAAU;CACrB,MAAM;CACN,MAAM;CACN,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,MAAM;CACN,UAAU;CACV,OAAO;CACP,YAAY;CACZ,WAAW;CACX,cAAc;CACd,uBAAuB;CACvB,YAAY;CACZ,WAAW;CACX,oBAAoB;CACpB,aAAa;CACb,gBAAgB;CAChB,cAAcD,KAAS;AACzB"}
1
+ {"version":3,"file":"menubar.js","names":["BaseMenubar","BaseMenu","Menubar"],"sources":["../../../src/components/menubar/menubar.tsx"],"sourcesContent":["\"use client\";\n\nimport { Menu as BaseMenu } from \"@base-ui/react/menu\";\nimport { Menubar as BaseMenubar } from \"@base-ui/react/menubar\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { MenuRoot as BaseMenuRoot } from \"@base-ui/react/menu\";\n\nimport { menu, menubar } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\nexport type MenubarOrientation = \"horizontal\" | \"vertical\";\n\ninterface MenubarContextValue {\n orientation: MenubarOrientation;\n styles: ReturnType<typeof menubar>;\n}\n\nconst MenubarContext = createContext<MenubarContextValue | null>(null);\n\nfunction useMenubarContext() {\n const context = useContext(MenubarContext);\n if (!context) {\n throw new Error(\"Menubar parts must be rendered inside Menubar.Root.\");\n }\n\n return context;\n}\n\nexport interface MenubarRootProps extends ComponentPropsWithoutRef<typeof BaseMenubar> {\n orientation?: MenubarOrientation;\n}\n\n/**\n * A horizontal or vertical command bar. Each `Menubar.Menu` owns one\n * keyboard-navigable menu while the root coordinates arrow-key movement.\n */\nexport const MenubarRoot = forwardRef<HTMLDivElement, MenubarRootProps>(function MenubarRoot(\n { className, orientation = \"horizontal\", ...props },\n ref,\n) {\n const styles = menubar({ orientation });\n\n return (\n <MenubarContext.Provider value={{ orientation, styles }}>\n <BaseMenubar\n {...props}\n ref={ref}\n orientation={orientation}\n className={withRecipeClassName(styles.root, className)}\n data-jaci-component=\"menubar\"\n data-orientation={orientation}\n data-slot=\"menubar\"\n />\n </MenubarContext.Provider>\n );\n});\n\nexport interface MenubarMenuProps<Payload = unknown> extends BaseMenuRoot.Props<Payload> {}\n\nexport function MenubarMenu<Payload = unknown>(props: MenubarMenuProps<Payload>) {\n return <BaseMenu.Root {...props} />;\n}\n\nexport type MenubarTriggerProps = ComponentPropsWithoutRef<typeof BaseMenu.Trigger>;\n\nexport const MenubarTrigger = forwardRef<HTMLButtonElement, MenubarTriggerProps>(\n function MenubarTrigger({ className, ...props }, ref) {\n const { styles } = useMenubarContext();\n\n return (\n <BaseMenu.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.trigger, className)}\n data-jaci-component=\"menubar\"\n data-slot=\"menubar-trigger\"\n />\n );\n },\n);\n\nexport type MenubarPortalProps = ComponentPropsWithoutRef<typeof BaseMenu.Portal>;\nexport function MenubarPortal(props: MenubarPortalProps) {\n return <BaseMenu.Portal {...useThemePortalProps(props)} />;\n}\n\nexport type MenubarPositionerProps = ComponentPropsWithoutRef<typeof BaseMenu.Positioner>;\n\nexport const MenubarPositioner = forwardRef<HTMLDivElement, MenubarPositionerProps>(\n function MenubarPositioner({ className, ...props }, ref) {\n return (\n <BaseMenu.Positioner\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().positioner, className)}\n data-slot=\"menubar-positioner\"\n />\n );\n },\n);\n\nexport type MenubarPopupProps = ComponentPropsWithoutRef<typeof BaseMenu.Popup>;\n\nexport const MenubarPopup = forwardRef<HTMLDivElement, MenubarPopupProps>(function MenubarPopup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().popup, className)}\n data-slot=\"menubar-popup\"\n />\n );\n});\n\nexport type MenubarArrowProps = ComponentPropsWithoutRef<typeof BaseMenu.Arrow>;\n\nexport const MenubarArrow = forwardRef<HTMLDivElement, MenubarArrowProps>(function MenubarArrow(\n { className, ...props },\n ref,\n) {\n return <BaseMenu.Arrow {...props} ref={ref} className={className} data-slot=\"menubar-arrow\" />;\n});\n\nexport type MenubarItemProps = ComponentPropsWithoutRef<typeof BaseMenu.Item>;\n\nexport const MenubarItem = forwardRef<HTMLElement, MenubarItemProps>(function MenubarItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Item\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-item\"\n />\n );\n});\n\nexport type MenubarLinkItemProps = ComponentPropsWithoutRef<typeof BaseMenu.LinkItem>;\n\nexport const MenubarLinkItem = forwardRef<Element, MenubarLinkItemProps>(function MenubarLinkItem(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.LinkItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-link-item\"\n />\n );\n});\n\nexport type MenubarGroupProps = ComponentPropsWithoutRef<typeof BaseMenu.Group>;\n\nexport const MenubarGroup = forwardRef<HTMLDivElement, MenubarGroupProps>(function MenubarGroup(\n { className, ...props },\n ref,\n) {\n return (\n <BaseMenu.Group\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().group, className)}\n data-slot=\"menubar-group\"\n />\n );\n});\n\nexport type MenubarGroupLabelProps = ComponentPropsWithoutRef<typeof BaseMenu.GroupLabel>;\n\nexport const MenubarGroupLabel = forwardRef<HTMLDivElement, MenubarGroupLabelProps>(\n function MenubarGroupLabel({ className, ...props }, ref) {\n return (\n <BaseMenu.GroupLabel\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().groupLabel, className)}\n data-slot=\"menubar-group-label\"\n />\n );\n },\n);\n\nexport type MenubarSeparatorProps = ComponentPropsWithoutRef<typeof BaseMenu.Separator>;\n\nexport const MenubarSeparator = forwardRef<HTMLDivElement, MenubarSeparatorProps>(\n function MenubarSeparator({ className, ...props }, ref) {\n return (\n <BaseMenu.Separator\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().separator, className)}\n data-slot=\"menubar-separator\"\n />\n );\n },\n);\n\nexport type MenubarCheckboxItemProps = ComponentPropsWithoutRef<typeof BaseMenu.CheckboxItem>;\n\nexport const MenubarCheckboxItem = forwardRef<HTMLElement, MenubarCheckboxItemProps>(\n function MenubarCheckboxItem({ className, ...props }, ref) {\n return (\n <BaseMenu.CheckboxItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-checkbox-item\"\n />\n );\n },\n);\n\nexport type MenubarCheckboxItemIndicatorProps = ComponentPropsWithoutRef<\n typeof BaseMenu.CheckboxItemIndicator\n>;\n\nexport const MenubarCheckboxItemIndicator = forwardRef<\n HTMLSpanElement,\n MenubarCheckboxItemIndicatorProps\n>(function MenubarCheckboxItemIndicator({ children = \"✓\", className, ...props }, ref) {\n return (\n <BaseMenu.CheckboxItemIndicator\n {...props}\n ref={ref}\n className={className}\n data-slot=\"menubar-checkbox-indicator\"\n aria-hidden=\"true\"\n >\n {children}\n </BaseMenu.CheckboxItemIndicator>\n );\n});\n\nexport type MenubarRadioGroupProps = ComponentPropsWithoutRef<typeof BaseMenu.RadioGroup>;\nexport const MenubarRadioGroup: typeof BaseMenu.RadioGroup = BaseMenu.RadioGroup;\n\nexport type MenubarRadioItemProps = ComponentPropsWithoutRef<typeof BaseMenu.RadioItem>;\n\nexport const MenubarRadioItem = forwardRef<HTMLElement, MenubarRadioItemProps>(\n function MenubarRadioItem({ className, ...props }, ref) {\n return (\n <BaseMenu.RadioItem\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-radio-item\"\n />\n );\n },\n);\n\nexport type MenubarRadioItemIndicatorProps = ComponentPropsWithoutRef<\n typeof BaseMenu.RadioItemIndicator\n>;\n\nexport const MenubarRadioItemIndicator = forwardRef<\n HTMLSpanElement,\n MenubarRadioItemIndicatorProps\n>(function MenubarRadioItemIndicator({ children = \"•\", className, ...props }, ref) {\n return (\n <BaseMenu.RadioItemIndicator\n {...props}\n ref={ref}\n className={className}\n data-slot=\"menubar-radio-indicator\"\n aria-hidden=\"true\"\n >\n {children}\n </BaseMenu.RadioItemIndicator>\n );\n});\n\nexport type MenubarSubmenuRootProps = ComponentPropsWithoutRef<typeof BaseMenu.SubmenuRoot>;\nexport const MenubarSubmenuRoot: typeof BaseMenu.SubmenuRoot = BaseMenu.SubmenuRoot;\n\nexport type MenubarSubmenuTriggerProps = ComponentPropsWithoutRef<typeof BaseMenu.SubmenuTrigger>;\n\nexport const MenubarSubmenuTrigger = forwardRef<HTMLElement, MenubarSubmenuTriggerProps>(\n function MenubarSubmenuTrigger({ className, ...props }, ref) {\n return (\n <BaseMenu.SubmenuTrigger\n {...props}\n ref={ref}\n className={withRecipeClassName(menu().item, className)}\n data-slot=\"menubar-submenu-trigger\"\n />\n );\n },\n);\n\nexport const Menubar = {\n Root: MenubarRoot,\n Menu: MenubarMenu,\n Trigger: MenubarTrigger,\n Portal: MenubarPortal,\n Positioner: MenubarPositioner,\n Popup: MenubarPopup,\n Arrow: MenubarArrow,\n Item: MenubarItem,\n LinkItem: MenubarLinkItem,\n Group: MenubarGroup,\n GroupLabel: MenubarGroupLabel,\n Separator: MenubarSeparator,\n CheckboxItem: MenubarCheckboxItem,\n CheckboxItemIndicator: MenubarCheckboxItemIndicator,\n RadioGroup: MenubarRadioGroup,\n RadioItem: MenubarRadioItem,\n RadioItemIndicator: MenubarRadioItemIndicator,\n SubmenuRoot: MenubarSubmenuRoot,\n SubmenuTrigger: MenubarSubmenuTrigger,\n createHandle: BaseMenu.createHandle,\n};\n"],"mappings":";;;;;;;;;;AAmBA,MAAM,iBAAiB,cAA0C,IAAI;AAErE,SAAS,oBAAoB;CAC3B,MAAM,UAAU,WAAW,cAAc;CACzC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,qDAAqD;CAGvE,OAAO;AACT;;;;;AAUA,MAAa,cAAc,WAA6C,SAAS,YAC/E,EAAE,WAAW,cAAc,cAAc,GAAG,SAC5C,KACA;CACA,MAAM,SAAS,QAAQ,EAAE,YAAY,CAAC;CAEtC,OACE,oBAAC,eAAe,UAAhB;EAAyB,OAAO;GAAE;GAAa;EAAO;EACpD,UAAA,oBAACA,SAAD;GACE,GAAI;GACC;GACQ;GACb,WAAW,oBAAoB,OAAO,MAAM,SAAS;GACrD,uBAAoB;GACpB,oBAAkB;GAClB,aAAU;EACX,CAAA;CACsB,CAAA;AAE7B,CAAC;AAID,SAAgB,YAA+B,OAAkC;CAC/E,OAAO,oBAACC,KAAS,MAAV,EAAe,GAAI,MAAQ,CAAA;AACpC;AAIA,MAAa,iBAAiB,WAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,MAAM,EAAE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WAAW,KAAK,WAAW,GAAG,SAAS,KAAK;CACjF,OACE,oBAACA,KAAS,oBAAV;EACE,GAAI;EACC;EACM;EACX,aAAU;EACV,eAAY;EAEX;CAC0B,CAAA;AAEjC,CAAC;AAGD,MAAa,qBAAkDA,KAAS;AAIxE,MAAa,wBAAwB,WACnC,SAAS,sBAAsB,EAAE,WAAW,GAAG,SAAS,KAAK;CAC3D,OACE,oBAACA,KAAS,gBAAV;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,KAAK,CAAC,CAAC,MAAM,SAAS;EACrD,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAaC,YAAU;CACrB,MAAM;CACN,MAAM;CACN,SAAS;CACT,QAAQ;CACR,YAAY;CACZ,OAAO;CACP,OAAO;CACP,MAAM;CACN,UAAU;CACV,OAAO;CACP,YAAY;CACZ,WAAW;CACX,cAAc;CACd,uBAAuB;CACvB,YAAY;CACZ,WAAW;CACX,oBAAoB;CACpB,aAAa;CACb,gBAAgB;CAChB,cAAcD,KAAS;AACzB"}
@@ -1 +1 @@
1
- {"version":3,"file":"meter.cjs","names":["meter","BaseMeter","withRecipeClassName"],"sources":["../../../src/components/meter/meter.tsx"],"sourcesContent":["import { Meter as BaseMeter } from \"@base-ui/react/meter\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { CSSProperties, ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { meter } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\nexport type MeterSize = \"sm\" | \"md\" | \"lg\";\nexport type MeterTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\n\ninterface MeterContextValue {\n styles: ReturnType<typeof meter>;\n}\n\nconst MeterContext = createContext<MeterContextValue | null>(null);\n\nfunction useMeterContext() {\n const context = useContext(MeterContext);\n if (!context) {\n throw new Error(\"Meter parts must be rendered inside Meter.Root.\");\n }\n\n return context;\n}\n\nexport interface MeterRootProps extends Omit<BaseMeter.Root.Props, \"children\" | \"className\"> {\n size?: MeterSize;\n tone?: MeterTone;\n children?: ReactNode;\n className?: string;\n}\n\nexport const MeterRoot = forwardRef<HTMLDivElement, MeterRootProps>(function MeterRoot(\n { children, className, size = \"md\", tone = \"accent\", value, min = 0, max = 100, ...props },\n ref,\n) {\n const styles = meter({ size, tone });\n const safeMax = Number.isFinite(max) && max > min ? max : min + 1;\n const safeValue = Number.isFinite(value) ? Math.min(Math.max(value, min), safeMax) : min;\n const percentage = ((safeValue - min) / (safeMax - min)) * 100;\n\n return (\n <MeterContext.Provider value={{ styles }}>\n <BaseMeter.Root\n {...props}\n ref={ref}\n max={safeMax}\n min={min}\n value={safeValue}\n className={withRecipeClassName(styles.root, className)}\n data-jaci-component=\"meter\"\n data-slot=\"meter\"\n style={{ \"--meter-value\": `${percentage}%`, ...props.style } as unknown as CSSProperties}\n >\n {children}\n </BaseMeter.Root>\n </MeterContext.Provider>\n );\n});\n\nexport type MeterLabelProps = ComponentPropsWithoutRef<typeof BaseMeter.Label>;\nexport const MeterLabel = forwardRef<HTMLSpanElement, MeterLabelProps>(function MeterLabel(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Label\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.label, className)}\n data-slot=\"meter-label\"\n />\n );\n});\n\nexport type MeterTrackProps = ComponentPropsWithoutRef<typeof BaseMeter.Track>;\nexport const MeterTrack = forwardRef<HTMLDivElement, MeterTrackProps>(function MeterTrack(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Track\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.track, className)}\n data-slot=\"meter-track\"\n />\n );\n});\n\nexport type MeterIndicatorProps = ComponentPropsWithoutRef<typeof BaseMeter.Indicator>;\nexport const MeterIndicator = forwardRef<HTMLDivElement, MeterIndicatorProps>(\n function MeterIndicator({ className, ...props }, ref) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Indicator\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.indicator, className)}\n data-slot=\"meter-indicator\"\n />\n );\n },\n);\n\nexport type MeterValueProps = ComponentPropsWithoutRef<typeof BaseMeter.Value>;\nexport const MeterValue = forwardRef<HTMLSpanElement, MeterValueProps>(function MeterValue(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Value\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.value, className)}\n data-slot=\"meter-value\"\n />\n );\n});\n\nexport const Meter = {\n Root: MeterRoot,\n Label: MeterLabel,\n Track: MeterTrack,\n Indicator: MeterIndicator,\n Value: MeterValue,\n};\n"],"mappings":";;;;;;AAcA,MAAM,gBAAA,GAAA,MAAA,cAAA,CAAuD,IAAI;AAEjE,SAAS,kBAAkB;CACzB,MAAM,WAAA,GAAA,MAAA,WAAA,CAAqB,YAAY;CACvC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,iDAAiD;CAGnE,OAAO;AACT;AASA,MAAa,aAAA,GAAA,MAAA,WAAA,CAAuD,SAAS,UAC3E,EAAE,UAAU,WAAW,OAAO,MAAM,OAAO,UAAU,OAAO,MAAM,GAAG,MAAM,KAAK,GAAG,SACnF,KACA;CACA,MAAM,SAASA,cAAAA,MAAM;EAAE;EAAM;CAAK,CAAC;CACnC,MAAM,UAAU,OAAO,SAAS,GAAG,KAAK,MAAM,MAAM,MAAM,MAAM;CAChE,MAAM,YAAY,OAAO,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,OAAO,IAAI;CACrF,MAAM,cAAe,YAAY,QAAQ,UAAU,OAAQ;CAE3D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAa,UAAd;EAAuB,OAAO,EAAE,OAAO;YACrC,iBAAA,GAAA,kBAAA,IAAA,CAACC,qBAAAA,MAAU,MAAX;GACE,GAAI;GACC;GACL,KAAK;GACA;GACL,OAAO;GACP,WAAWC,gBAAAA,oBAAoB,OAAO,MAAM,SAAS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AEL,CAAC;AAED,MAAa,QAAQ;CACnB,MAAM;CACN,OAAO;CACP,OAAO;CACP,WAAW;CACX,OAAO;AACT"}
1
+ {"version":3,"file":"meter.cjs","names":["createContext","useContext","forwardRef","meter","BaseMeter","withRecipeClassName"],"sources":["../../../src/components/meter/meter.tsx"],"sourcesContent":["import { Meter as BaseMeter } from \"@base-ui/react/meter\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { CSSProperties, ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { meter } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\nexport type MeterSize = \"sm\" | \"md\" | \"lg\";\nexport type MeterTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\n\ninterface MeterContextValue {\n styles: ReturnType<typeof meter>;\n}\n\nconst MeterContext = createContext<MeterContextValue | null>(null);\n\nfunction useMeterContext() {\n const context = useContext(MeterContext);\n if (!context) {\n throw new Error(\"Meter parts must be rendered inside Meter.Root.\");\n }\n\n return context;\n}\n\nexport interface MeterRootProps extends Omit<BaseMeter.Root.Props, \"children\" | \"className\"> {\n size?: MeterSize;\n tone?: MeterTone;\n children?: ReactNode;\n className?: string;\n}\n\nexport const MeterRoot = forwardRef<HTMLDivElement, MeterRootProps>(function MeterRoot(\n { children, className, size = \"md\", tone = \"accent\", value, min = 0, max = 100, ...props },\n ref,\n) {\n const styles = meter({ size, tone });\n const safeMax = Number.isFinite(max) && max > min ? max : min + 1;\n const safeValue = Number.isFinite(value) ? Math.min(Math.max(value, min), safeMax) : min;\n const percentage = ((safeValue - min) / (safeMax - min)) * 100;\n\n return (\n <MeterContext.Provider value={{ styles }}>\n <BaseMeter.Root\n {...props}\n ref={ref}\n max={safeMax}\n min={min}\n value={safeValue}\n className={withRecipeClassName(styles.root, className)}\n data-jaci-component=\"meter\"\n data-slot=\"meter\"\n style={{ \"--meter-value\": `${percentage}%`, ...props.style } as unknown as CSSProperties}\n >\n {children}\n </BaseMeter.Root>\n </MeterContext.Provider>\n );\n});\n\nexport type MeterLabelProps = ComponentPropsWithoutRef<typeof BaseMeter.Label>;\nexport const MeterLabel = forwardRef<HTMLSpanElement, MeterLabelProps>(function MeterLabel(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Label\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.label, className)}\n data-slot=\"meter-label\"\n />\n );\n});\n\nexport type MeterTrackProps = ComponentPropsWithoutRef<typeof BaseMeter.Track>;\nexport const MeterTrack = forwardRef<HTMLDivElement, MeterTrackProps>(function MeterTrack(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Track\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.track, className)}\n data-slot=\"meter-track\"\n />\n );\n});\n\nexport type MeterIndicatorProps = ComponentPropsWithoutRef<typeof BaseMeter.Indicator>;\nexport const MeterIndicator = forwardRef<HTMLDivElement, MeterIndicatorProps>(\n function MeterIndicator({ className, ...props }, ref) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Indicator\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.indicator, className)}\n data-slot=\"meter-indicator\"\n />\n );\n },\n);\n\nexport type MeterValueProps = ComponentPropsWithoutRef<typeof BaseMeter.Value>;\nexport const MeterValue = forwardRef<HTMLSpanElement, MeterValueProps>(function MeterValue(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Value\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.value, className)}\n data-slot=\"meter-value\"\n />\n );\n});\n\nexport const Meter = {\n Root: MeterRoot,\n Label: MeterLabel,\n Track: MeterTrack,\n Indicator: MeterIndicator,\n Value: MeterValue,\n};\n"],"mappings":";;;;;;AAcA,MAAM,gBAAA,GAAeA,MAAAA,cAAAA,CAAwC,IAAI;AAEjE,SAAS,kBAAkB;CACzB,MAAM,WAAA,GAAUC,MAAAA,WAAAA,CAAW,YAAY;CACvC,IAA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B;CACnC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACE,qBAAAA,MAAU,OAAX;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoB,OAAO,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CAAC;AAGD,MAAa,kBAAA,GAAiBH,MAAAA,WAAAA,CAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,MAAM,EAAE,WAAW,gBAAgB;CACnC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACE,qBAAAA,MAAU,WAAX;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoB,OAAO,WAAW,SAAS;EAC1D,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,cAAA,GAAaH,MAAAA,WAAAA,CAA6C,SAAS,WAC9E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,MAAM,EAAE,WAAW,gBAAgB;CACnC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACE,qBAAAA,MAAU,OAAX;EACE,GAAI;EACC;EACL,WAAWC,gBAAAA,oBAAoB,OAAO,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAa,QAAQ;CACnB,MAAM;CACN,OAAO;CACP,OAAO;CACP,WAAW;CACX,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"meter.js","names":["BaseMeter","Meter"],"sources":["../../../src/components/meter/meter.tsx"],"sourcesContent":["import { Meter as BaseMeter } from \"@base-ui/react/meter\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { CSSProperties, ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { meter } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\nexport type MeterSize = \"sm\" | \"md\" | \"lg\";\nexport type MeterTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\n\ninterface MeterContextValue {\n styles: ReturnType<typeof meter>;\n}\n\nconst MeterContext = createContext<MeterContextValue | null>(null);\n\nfunction useMeterContext() {\n const context = useContext(MeterContext);\n if (!context) {\n throw new Error(\"Meter parts must be rendered inside Meter.Root.\");\n }\n\n return context;\n}\n\nexport interface MeterRootProps extends Omit<BaseMeter.Root.Props, \"children\" | \"className\"> {\n size?: MeterSize;\n tone?: MeterTone;\n children?: ReactNode;\n className?: string;\n}\n\nexport const MeterRoot = forwardRef<HTMLDivElement, MeterRootProps>(function MeterRoot(\n { children, className, size = \"md\", tone = \"accent\", value, min = 0, max = 100, ...props },\n ref,\n) {\n const styles = meter({ size, tone });\n const safeMax = Number.isFinite(max) && max > min ? max : min + 1;\n const safeValue = Number.isFinite(value) ? Math.min(Math.max(value, min), safeMax) : min;\n const percentage = ((safeValue - min) / (safeMax - min)) * 100;\n\n return (\n <MeterContext.Provider value={{ styles }}>\n <BaseMeter.Root\n {...props}\n ref={ref}\n max={safeMax}\n min={min}\n value={safeValue}\n className={withRecipeClassName(styles.root, className)}\n data-jaci-component=\"meter\"\n data-slot=\"meter\"\n style={{ \"--meter-value\": `${percentage}%`, ...props.style } as unknown as CSSProperties}\n >\n {children}\n </BaseMeter.Root>\n </MeterContext.Provider>\n );\n});\n\nexport type MeterLabelProps = ComponentPropsWithoutRef<typeof BaseMeter.Label>;\nexport const MeterLabel = forwardRef<HTMLSpanElement, MeterLabelProps>(function MeterLabel(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Label\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.label, className)}\n data-slot=\"meter-label\"\n />\n );\n});\n\nexport type MeterTrackProps = ComponentPropsWithoutRef<typeof BaseMeter.Track>;\nexport const MeterTrack = forwardRef<HTMLDivElement, MeterTrackProps>(function MeterTrack(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Track\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.track, className)}\n data-slot=\"meter-track\"\n />\n );\n});\n\nexport type MeterIndicatorProps = ComponentPropsWithoutRef<typeof BaseMeter.Indicator>;\nexport const MeterIndicator = forwardRef<HTMLDivElement, MeterIndicatorProps>(\n function MeterIndicator({ className, ...props }, ref) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Indicator\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.indicator, className)}\n data-slot=\"meter-indicator\"\n />\n );\n },\n);\n\nexport type MeterValueProps = ComponentPropsWithoutRef<typeof BaseMeter.Value>;\nexport const MeterValue = forwardRef<HTMLSpanElement, MeterValueProps>(function MeterValue(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Value\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.value, className)}\n data-slot=\"meter-value\"\n />\n );\n});\n\nexport const Meter = {\n Root: MeterRoot,\n Label: MeterLabel,\n Track: MeterTrack,\n Indicator: MeterIndicator,\n Value: MeterValue,\n};\n"],"mappings":";;;;;;AAcA,MAAM,eAAe,cAAwC,IAAI;AAEjE,SAAS,kBAAkB;CACzB,MAAM,UAAU,WAAW,YAAY;CACvC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,iDAAiD;CAGnE,OAAO;AACT;AASA,MAAa,YAAY,WAA2C,SAAS,UAC3E,EAAE,UAAU,WAAW,OAAO,MAAM,OAAO,UAAU,OAAO,MAAM,GAAG,MAAM,KAAK,GAAG,SACnF,KACA;CACA,MAAM,SAAS,MAAM;EAAE;EAAM;CAAK,CAAC;CACnC,MAAM,UAAU,OAAO,SAAS,GAAG,KAAK,MAAM,MAAM,MAAM,MAAM;CAChE,MAAM,YAAY,OAAO,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,OAAO,IAAI;CACrF,MAAM,cAAe,YAAY,QAAQ,UAAU,OAAQ;CAE3D,OACE,oBAAC,aAAa,UAAd;EAAuB,OAAO,EAAE,OAAO;YACrC,oBAACA,MAAU,MAAX;GACE,GAAI;GACC;GACL,KAAK;GACA;GACL,OAAO;GACP,WAAW,oBAAoB,OAAO,MAAM,SAAS;GACrD,uBAAoB;GACpB,aAAU;GACV,OAAO;IAAE,iBAAiB,GAAG,WAAW;IAAI,GAAG,MAAM;GAAM;GAE1D;EACa,CAAA;CACK,CAAA;AAE3B,CAAC;AAGD,MAAa,aAAa,WAA6C,SAAS,WAC9E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,MAAM,EAAE,WAAW,gBAAgB;CACnC,OACE,oBAACA,MAAU,OAAX;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CAAC;AAGD,MAAa,aAAa,WAA4C,SAAS,WAC7E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,MAAM,EAAE,WAAW,gBAAgB;CACnC,OACE,oBAACA,MAAU,OAAX;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CAAC;AAGD,MAAa,iBAAiB,WAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,MAAM,EAAE,WAAW,gBAAgB;CACnC,OACE,oBAACA,MAAU,WAAX;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,WAAW,SAAS;EAC1D,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,aAAa,WAA6C,SAAS,WAC9E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,MAAM,EAAE,WAAW,gBAAgB;CACnC,OACE,oBAACA,MAAU,OAAX;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAaC,UAAQ;CACnB,MAAM;CACN,OAAO;CACP,OAAO;CACP,WAAW;CACX,OAAO;AACT"}
1
+ {"version":3,"file":"meter.js","names":["BaseMeter","Meter"],"sources":["../../../src/components/meter/meter.tsx"],"sourcesContent":["import { Meter as BaseMeter } from \"@base-ui/react/meter\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { CSSProperties, ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { meter } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\nexport type MeterSize = \"sm\" | \"md\" | \"lg\";\nexport type MeterTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\n\ninterface MeterContextValue {\n styles: ReturnType<typeof meter>;\n}\n\nconst MeterContext = createContext<MeterContextValue | null>(null);\n\nfunction useMeterContext() {\n const context = useContext(MeterContext);\n if (!context) {\n throw new Error(\"Meter parts must be rendered inside Meter.Root.\");\n }\n\n return context;\n}\n\nexport interface MeterRootProps extends Omit<BaseMeter.Root.Props, \"children\" | \"className\"> {\n size?: MeterSize;\n tone?: MeterTone;\n children?: ReactNode;\n className?: string;\n}\n\nexport const MeterRoot = forwardRef<HTMLDivElement, MeterRootProps>(function MeterRoot(\n { children, className, size = \"md\", tone = \"accent\", value, min = 0, max = 100, ...props },\n ref,\n) {\n const styles = meter({ size, tone });\n const safeMax = Number.isFinite(max) && max > min ? max : min + 1;\n const safeValue = Number.isFinite(value) ? Math.min(Math.max(value, min), safeMax) : min;\n const percentage = ((safeValue - min) / (safeMax - min)) * 100;\n\n return (\n <MeterContext.Provider value={{ styles }}>\n <BaseMeter.Root\n {...props}\n ref={ref}\n max={safeMax}\n min={min}\n value={safeValue}\n className={withRecipeClassName(styles.root, className)}\n data-jaci-component=\"meter\"\n data-slot=\"meter\"\n style={{ \"--meter-value\": `${percentage}%`, ...props.style } as unknown as CSSProperties}\n >\n {children}\n </BaseMeter.Root>\n </MeterContext.Provider>\n );\n});\n\nexport type MeterLabelProps = ComponentPropsWithoutRef<typeof BaseMeter.Label>;\nexport const MeterLabel = forwardRef<HTMLSpanElement, MeterLabelProps>(function MeterLabel(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Label\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.label, className)}\n data-slot=\"meter-label\"\n />\n );\n});\n\nexport type MeterTrackProps = ComponentPropsWithoutRef<typeof BaseMeter.Track>;\nexport const MeterTrack = forwardRef<HTMLDivElement, MeterTrackProps>(function MeterTrack(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Track\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.track, className)}\n data-slot=\"meter-track\"\n />\n );\n});\n\nexport type MeterIndicatorProps = ComponentPropsWithoutRef<typeof BaseMeter.Indicator>;\nexport const MeterIndicator = forwardRef<HTMLDivElement, MeterIndicatorProps>(\n function MeterIndicator({ className, ...props }, ref) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Indicator\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.indicator, className)}\n data-slot=\"meter-indicator\"\n />\n );\n },\n);\n\nexport type MeterValueProps = ComponentPropsWithoutRef<typeof BaseMeter.Value>;\nexport const MeterValue = forwardRef<HTMLSpanElement, MeterValueProps>(function MeterValue(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Value\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.value, className)}\n data-slot=\"meter-value\"\n />\n );\n});\n\nexport const Meter = {\n Root: MeterRoot,\n Label: MeterLabel,\n Track: MeterTrack,\n Indicator: MeterIndicator,\n Value: MeterValue,\n};\n"],"mappings":";;;;;;AAcA,MAAM,eAAe,cAAwC,IAAI;AAEjE,SAAS,kBAAkB;CACzB,MAAM,UAAU,WAAW,YAAY;CACvC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,iDAAiD;CAGnE,OAAO;AACT;AASA,MAAa,YAAY,WAA2C,SAAS,UAC3E,EAAE,UAAU,WAAW,OAAO,MAAM,OAAO,UAAU,OAAO,MAAM,GAAG,MAAM,KAAK,GAAG,SACnF,KACA;CACA,MAAM,SAAS,MAAM;EAAE;EAAM;CAAK,CAAC;CACnC,MAAM,UAAU,OAAO,SAAS,GAAG,KAAK,MAAM,MAAM,MAA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,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAaC,UAAQ;CACnB,MAAM;CACN,OAAO;CACP,OAAO;CACP,WAAW;CACX,OAAO;AACT"}
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.cjs","names":["BaseDialog","cx","navbar","withRecipeClassName","useThemePortalProps","bottomNavigation"],"sources":["../../../src/components/navigation/navigation.tsx"],"sourcesContent":["\"use client\";\n\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { DialogRoot as BaseDialogRoot } from \"@base-ui/react/dialog\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { bottomNavigation, navbar } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\n/**\n * Groups a responsive navigation bar and its mobile drawer. The `open`,\n * `defaultOpen`, and `onOpenChange` props are forwarded to Base UI's Dialog\n * root, which supplies focus management, Escape handling, and backdrop\n * dismissal for `Navbar.Drawer`.\n */\nexport type NavbarRootProps<Payload = unknown> = BaseDialogRoot.Props<Payload>;\n\nexport function NavbarRoot<Payload = unknown>(props: NavbarRootProps<Payload>) {\n return <BaseDialog.Root {...props} />;\n}\n\nexport const NavbarCreateHandle = BaseDialog.createHandle;\n\nexport type NavbarBarProps = ComponentPropsWithoutRef<\"nav\">;\n\n/** A fixed, translucent zinc navigation surface. */\nexport const NavbarBar = forwardRef<HTMLElement, NavbarBarProps>(function NavbarBar(\n { className, ...props },\n ref,\n) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(navbar().bar, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-bar\"\n />\n );\n});\n\nexport type NavbarStartProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarStart = forwardRef<HTMLDivElement, NavbarStartProps>(function NavbarStart(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().start, className)} data-slot=\"navbar-start\" />\n );\n});\n\nexport type NavbarCenterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarCenter = forwardRef<HTMLDivElement, NavbarCenterProps>(function NavbarCenter(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(navbar().center, className)}\n data-slot=\"navbar-center\"\n />\n );\n});\n\nexport type NavbarEndProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarEnd = forwardRef<HTMLDivElement, NavbarEndProps>(function NavbarEnd(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().end, className)} data-slot=\"navbar-end\" />\n );\n});\n\nexport type NavbarToggleProps = ComponentPropsWithoutRef<typeof BaseDialog.Trigger>;\n\n/**\n * Opens the responsive drawer. It is hidden at the large breakpoint by\n * default, while still allowing a controlled host to render a drawer anywhere.\n */\nexport const NavbarToggle = forwardRef<HTMLButtonElement, NavbarToggleProps>(function NavbarToggle(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Trigger\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Open navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().toggle, className)}\n data-slot=\"navbar-toggle\"\n >\n {children ?? \"☰\"}\n </BaseDialog.Trigger>\n );\n});\n\nexport type NavbarDrawerPortalProps = Omit<\n ComponentPropsWithoutRef<typeof BaseDialog.Portal>,\n \"children\"\n>;\n\nexport interface NavbarDrawerProps extends ComponentPropsWithoutRef<typeof BaseDialog.Popup> {\n /** Optional controls for the underlying Base UI portal. */\n portalProps?: NavbarDrawerPortalProps;\n}\n\n/**\n * A left-aligned mobile drawer. It intentionally owns the Dialog portal,\n * backdrop, viewport, and popup so consumers cannot accidentally omit the\n * pieces required for focus trapping and Escape/backdrop dismissal.\n */\nexport const NavbarDrawer = forwardRef<HTMLDivElement, NavbarDrawerProps>(function NavbarDrawer(\n { \"aria-label\": ariaLabel, children, className, portalProps, ...props },\n ref,\n) {\n const styles = navbar();\n const scopedPortalProps = useThemePortalProps(portalProps ?? {});\n\n return (\n <BaseDialog.Portal {...scopedPortalProps}>\n <BaseDialog.Backdrop\n className={withRecipeClassName(styles.drawerBackdrop, undefined)}\n data-slot=\"navbar-drawer-backdrop\"\n />\n <BaseDialog.Viewport\n className={withRecipeClassName(styles.drawerViewport, undefined)}\n data-slot=\"navbar-drawer-viewport\"\n >\n <BaseDialog.Popup\n {...props}\n aria-label={ariaLabel ?? \"Navigation menu\"}\n ref={ref}\n className={withRecipeClassName(styles.drawer, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-drawer\"\n >\n {children}\n </BaseDialog.Popup>\n </BaseDialog.Viewport>\n </BaseDialog.Portal>\n );\n});\n\nexport type NavbarCloseProps = ComponentPropsWithoutRef<typeof BaseDialog.Close>;\n\n/** A close affordance for use inside `Navbar.Drawer`. */\nexport const NavbarClose = forwardRef<HTMLButtonElement, NavbarCloseProps>(function NavbarClose(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().close, className)}\n data-slot=\"navbar-close\"\n >\n {children ?? \"×\"}\n </BaseDialog.Close>\n );\n});\n\nexport interface NavbarItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\n/** A semantic navigation link for either the fixed bar or mobile drawer. */\nexport const NavbarItem = forwardRef<HTMLAnchorElement, NavbarItemProps>(function NavbarItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(navbar({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"navbar-item\"\n />\n );\n});\n\nexport type BottomNavigationProps = ComponentPropsWithoutRef<\"nav\">;\n\n/**\n * A compact floating navigation bar for small-screen destinations. It is\n * independent from `Navbar` so it can be used in layouts without a drawer.\n */\nexport const BottomNavigationRoot = forwardRef<HTMLElement, BottomNavigationProps>(\n function BottomNavigationRoot({ className, ...props }, ref) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(bottomNavigation().root, className)}\n data-jaci-component=\"bottom-navigation\"\n data-slot=\"bottom-navigation\"\n />\n );\n },\n);\n\nexport interface BottomNavigationItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\nexport const BottomNavigationItem = forwardRef<HTMLAnchorElement, BottomNavigationItemProps>(\n function BottomNavigationItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n ) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(bottomNavigation({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"bottom-navigation-item\"\n />\n );\n },\n);\n\nexport const BottomNavigation = Object.assign(BottomNavigationRoot, {\n Item: BottomNavigationItem,\n});\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,WAA8B,OAAiC;CAC7E,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,sBAAAA,OAAW,MAAZ,EAAiB,GAAI,MAAQ,CAAA;AACtC;AAEA,MAAa,qBAAqBA,sBAAAA,OAAW;;AAK7C,MAAa,aAAA,GAAA,MAAA,WAAA,CAAoD,SAAS,UACxE,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGC,eAAAA,OAAO,CAAC,CAAC,KAAK,SAAS;EACrC,uBAAoB;EACpB,aAAU;CACX,CAAA;AAE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AAS,SAAS,KAAA;EAC3C;EACL,WAAWD,WAAAA,GAAGC,eAAAA,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,SAAS;EAChD,eAAa,UAAU,KAAA;EACvB,aAAU;CACX,CAAA;AAEL,CAAC;;;;;AAQD,MAAa,wBAAA,GAAA,MAAA,WAAA,CACX,SAAS,qBAAqB,EAAE,WAAW,GAAG,SAAS,KAAK;CAC1D,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWD,WAAAA,GAAGI,0BAAAA,iBAAiB,CAAC,CAAC,MAAM,SAAS;EAChD,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CACF;AAOA,MAAa,wBAAA,GAAA,MAAA,WAAA,CACX,SAAS,qBACP,EAAE,gBAAgB,aAAa,SAAS,OAAO,WAAW,GAAG,SAC7D,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;EACE,GAAI;EACJ,gBAAc,gBAAgB,SAAS,SAAS,KAAA;EAC3C;EACL,WAAWJ,WAAAA,GAAGI,0BAAAA,iBAAiB,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,SAAS;EAC1D,eAAa,UAAU,KAAA;EACvB,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,mBAAmB,OAAO,OAAO,sBAAsB,EAClE,MAAM,qBACR,CAAC"}
1
+ {"version":3,"file":"navigation.cjs","names":["BaseDialog","forwardRef","cx","navbar","withRecipeClassName","useThemePortalProps","bottomNavigation"],"sources":["../../../src/components/navigation/navigation.tsx"],"sourcesContent":["\"use client\";\n\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { DialogRoot as BaseDialogRoot } from \"@base-ui/react/dialog\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { bottomNavigation, navbar } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\n/**\n * Groups a responsive navigation bar and its mobile drawer. The `open`,\n * `defaultOpen`, and `onOpenChange` props are forwarded to Base UI's Dialog\n * root, which supplies focus management, Escape handling, and backdrop\n * dismissal for `Navbar.Drawer`.\n */\nexport type NavbarRootProps<Payload = unknown> = BaseDialogRoot.Props<Payload>;\n\nexport function NavbarRoot<Payload = unknown>(props: NavbarRootProps<Payload>) {\n return <BaseDialog.Root {...props} />;\n}\n\nexport const NavbarCreateHandle = BaseDialog.createHandle;\n\nexport type NavbarBarProps = ComponentPropsWithoutRef<\"nav\">;\n\n/** A fixed, translucent zinc navigation surface. */\nexport const NavbarBar = forwardRef<HTMLElement, NavbarBarProps>(function NavbarBar(\n { className, ...props },\n ref,\n) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(navbar().bar, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-bar\"\n />\n );\n});\n\nexport type NavbarStartProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarStart = forwardRef<HTMLDivElement, NavbarStartProps>(function NavbarStart(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().start, className)} data-slot=\"navbar-start\" />\n );\n});\n\nexport type NavbarCenterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarCenter = forwardRef<HTMLDivElement, NavbarCenterProps>(function NavbarCenter(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(navbar().center, className)}\n data-slot=\"navbar-center\"\n />\n );\n});\n\nexport type NavbarEndProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarEnd = forwardRef<HTMLDivElement, NavbarEndProps>(function NavbarEnd(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().end, className)} data-slot=\"navbar-end\" />\n );\n});\n\nexport type NavbarToggleProps = ComponentPropsWithoutRef<typeof BaseDialog.Trigger>;\n\n/**\n * Opens the responsive drawer. It is hidden at the large breakpoint by\n * default, while still allowing a controlled host to render a drawer anywhere.\n */\nexport const NavbarToggle = forwardRef<HTMLButtonElement, NavbarToggleProps>(function NavbarToggle(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Trigger\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Open navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().toggle, className)}\n data-slot=\"navbar-toggle\"\n >\n {children ?? \"☰\"}\n </BaseDialog.Trigger>\n );\n});\n\nexport type NavbarDrawerPortalProps = Omit<\n ComponentPropsWithoutRef<typeof BaseDialog.Portal>,\n \"children\"\n>;\n\nexport interface NavbarDrawerProps extends ComponentPropsWithoutRef<typeof BaseDialog.Popup> {\n /** Optional controls for the underlying Base UI portal. */\n portalProps?: NavbarDrawerPortalProps;\n}\n\n/**\n * A left-aligned mobile drawer. It intentionally owns the Dialog portal,\n * backdrop, viewport, and popup so consumers cannot accidentally omit the\n * pieces required for focus trapping and Escape/backdrop dismissal.\n */\nexport const NavbarDrawer = forwardRef<HTMLDivElement, NavbarDrawerProps>(function NavbarDrawer(\n { \"aria-label\": ariaLabel, children, className, portalProps, ...props },\n ref,\n) {\n const styles = navbar();\n const scopedPortalProps = useThemePortalProps(portalProps ?? {});\n\n return (\n <BaseDialog.Portal {...scopedPortalProps}>\n <BaseDialog.Backdrop\n className={withRecipeClassName(styles.drawerBackdrop, undefined)}\n data-slot=\"navbar-drawer-backdrop\"\n />\n <BaseDialog.Viewport\n className={withRecipeClassName(styles.drawerViewport, undefined)}\n data-slot=\"navbar-drawer-viewport\"\n >\n <BaseDialog.Popup\n {...props}\n aria-label={ariaLabel ?? \"Navigation menu\"}\n ref={ref}\n className={withRecipeClassName(styles.drawer, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-drawer\"\n >\n {children}\n </BaseDialog.Popup>\n </BaseDialog.Viewport>\n </BaseDialog.Portal>\n );\n});\n\nexport type NavbarCloseProps = ComponentPropsWithoutRef<typeof BaseDialog.Close>;\n\n/** A close affordance for use inside `Navbar.Drawer`. */\nexport const NavbarClose = forwardRef<HTMLButtonElement, NavbarCloseProps>(function NavbarClose(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().close, className)}\n data-slot=\"navbar-close\"\n >\n {children ?? \"×\"}\n </BaseDialog.Close>\n );\n});\n\nexport interface NavbarItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\n/** A semantic navigation link for either the fixed bar or mobile drawer. */\nexport const NavbarItem = forwardRef<HTMLAnchorElement, NavbarItemProps>(function NavbarItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(navbar({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"navbar-item\"\n />\n );\n});\n\nexport type BottomNavigationProps = ComponentPropsWithoutRef<\"nav\">;\n\n/**\n * A compact floating navigation bar for small-screen destinations. It is\n * independent from `Navbar` so it can be used in layouts without a drawer.\n */\nexport const BottomNavigationRoot = forwardRef<HTMLElement, BottomNavigationProps>(\n function BottomNavigationRoot({ className, ...props }, ref) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(bottomNavigation().root, className)}\n data-jaci-component=\"bottom-navigation\"\n data-slot=\"bottom-navigation\"\n />\n );\n },\n);\n\nexport interface BottomNavigationItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\nexport const BottomNavigationItem = forwardRef<HTMLAnchorElement, BottomNavigationItemProps>(\n function BottomNavigationItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n ) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(bottomNavigation({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"bottom-navigation-item\"\n />\n );\n },\n);\n\nexport const BottomNavigation = Object.assign(BottomNavigationRoot, {\n Item: BottomNavigationItem,\n});\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,WAA8B,OAAiC;CAC7E,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,sBAAAA,OAAW,MAAZ,EAAiB,GAAI,MAAQ,CAAA;AACtC;AAEA,MAAa,qBAAqBA,sBAAAA,OAAW;;AAK7C,MAAa,aAAA,GAAYC,MAAAA,WAAAA,CAAwC,SAAS,UACxE,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGC,eAAAA,OAAO,CAAC,CAAC,KAAK,SAAS;EACrC,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,eAAA,GAAcF,MAAAA,WAAAA,CAA6C,SAAS,YAC/E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EAAK,GAAI;EAAY;EAAK,WAAWC,WAAAA,GAAGC,eAAAA,OAAO,CAAC,CAAC,OAAO,SAAS;EAAG,aAAU;CAAgB,CAAA;AAElG,CAAC;AAID,MAAa,gBAAA,GAAeF,MAAAA,WAAAA,CAA8C,SAAS,aACjF,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;EACE,GAAI;EACC;EACL,WAAWC,WAAAA,GAAGC,eAAAA,OAAO,CAAC,CAAC,QAAQ,SAAS;EACxC,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,aAAA,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AA,CAClC,SAAS,qBACP,EAAE,gBAAgB,aAAa,SAAS,OAAO,WAAW,GAAG,SAC7D,KACA;CACA,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,KAAD;EACE,GAAI;EACJ,gBAAc,gBAAgB,SAAS,SAAS,KAAA;EAC3C;EACL,WAAWC,WAAAA,GAAGI,0BAAAA,iBAAiB,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,SAAS;EAC1D,eAAa,UAAU,KAAA;EACvB,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,mBAAmB,OAAO,OAAO,sBAAsB,EAClE,MAAM,qBACR,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.js","names":["BaseDialog"],"sources":["../../../src/components/navigation/navigation.tsx"],"sourcesContent":["\"use client\";\n\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { DialogRoot as BaseDialogRoot } from \"@base-ui/react/dialog\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { bottomNavigation, navbar } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\n/**\n * Groups a responsive navigation bar and its mobile drawer. The `open`,\n * `defaultOpen`, and `onOpenChange` props are forwarded to Base UI's Dialog\n * root, which supplies focus management, Escape handling, and backdrop\n * dismissal for `Navbar.Drawer`.\n */\nexport type NavbarRootProps<Payload = unknown> = BaseDialogRoot.Props<Payload>;\n\nexport function NavbarRoot<Payload = unknown>(props: NavbarRootProps<Payload>) {\n return <BaseDialog.Root {...props} />;\n}\n\nexport const NavbarCreateHandle = BaseDialog.createHandle;\n\nexport type NavbarBarProps = ComponentPropsWithoutRef<\"nav\">;\n\n/** A fixed, translucent zinc navigation surface. */\nexport const NavbarBar = forwardRef<HTMLElement, NavbarBarProps>(function NavbarBar(\n { className, ...props },\n ref,\n) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(navbar().bar, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-bar\"\n />\n );\n});\n\nexport type NavbarStartProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarStart = forwardRef<HTMLDivElement, NavbarStartProps>(function NavbarStart(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().start, className)} data-slot=\"navbar-start\" />\n );\n});\n\nexport type NavbarCenterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarCenter = forwardRef<HTMLDivElement, NavbarCenterProps>(function NavbarCenter(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(navbar().center, className)}\n data-slot=\"navbar-center\"\n />\n );\n});\n\nexport type NavbarEndProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarEnd = forwardRef<HTMLDivElement, NavbarEndProps>(function NavbarEnd(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().end, className)} data-slot=\"navbar-end\" />\n );\n});\n\nexport type NavbarToggleProps = ComponentPropsWithoutRef<typeof BaseDialog.Trigger>;\n\n/**\n * Opens the responsive drawer. It is hidden at the large breakpoint by\n * default, while still allowing a controlled host to render a drawer anywhere.\n */\nexport const NavbarToggle = forwardRef<HTMLButtonElement, NavbarToggleProps>(function NavbarToggle(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Trigger\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Open navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().toggle, className)}\n data-slot=\"navbar-toggle\"\n >\n {children ?? \"☰\"}\n </BaseDialog.Trigger>\n );\n});\n\nexport type NavbarDrawerPortalProps = Omit<\n ComponentPropsWithoutRef<typeof BaseDialog.Portal>,\n \"children\"\n>;\n\nexport interface NavbarDrawerProps extends ComponentPropsWithoutRef<typeof BaseDialog.Popup> {\n /** Optional controls for the underlying Base UI portal. */\n portalProps?: NavbarDrawerPortalProps;\n}\n\n/**\n * A left-aligned mobile drawer. It intentionally owns the Dialog portal,\n * backdrop, viewport, and popup so consumers cannot accidentally omit the\n * pieces required for focus trapping and Escape/backdrop dismissal.\n */\nexport const NavbarDrawer = forwardRef<HTMLDivElement, NavbarDrawerProps>(function NavbarDrawer(\n { \"aria-label\": ariaLabel, children, className, portalProps, ...props },\n ref,\n) {\n const styles = navbar();\n const scopedPortalProps = useThemePortalProps(portalProps ?? {});\n\n return (\n <BaseDialog.Portal {...scopedPortalProps}>\n <BaseDialog.Backdrop\n className={withRecipeClassName(styles.drawerBackdrop, undefined)}\n data-slot=\"navbar-drawer-backdrop\"\n />\n <BaseDialog.Viewport\n className={withRecipeClassName(styles.drawerViewport, undefined)}\n data-slot=\"navbar-drawer-viewport\"\n >\n <BaseDialog.Popup\n {...props}\n aria-label={ariaLabel ?? \"Navigation menu\"}\n ref={ref}\n className={withRecipeClassName(styles.drawer, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-drawer\"\n >\n {children}\n </BaseDialog.Popup>\n </BaseDialog.Viewport>\n </BaseDialog.Portal>\n );\n});\n\nexport type NavbarCloseProps = ComponentPropsWithoutRef<typeof BaseDialog.Close>;\n\n/** A close affordance for use inside `Navbar.Drawer`. */\nexport const NavbarClose = forwardRef<HTMLButtonElement, NavbarCloseProps>(function NavbarClose(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().close, className)}\n data-slot=\"navbar-close\"\n >\n {children ?? \"×\"}\n </BaseDialog.Close>\n );\n});\n\nexport interface NavbarItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\n/** A semantic navigation link for either the fixed bar or mobile drawer. */\nexport const NavbarItem = forwardRef<HTMLAnchorElement, NavbarItemProps>(function NavbarItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(navbar({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"navbar-item\"\n />\n );\n});\n\nexport type BottomNavigationProps = ComponentPropsWithoutRef<\"nav\">;\n\n/**\n * A compact floating navigation bar for small-screen destinations. It is\n * independent from `Navbar` so it can be used in layouts without a drawer.\n */\nexport const BottomNavigationRoot = forwardRef<HTMLElement, BottomNavigationProps>(\n function BottomNavigationRoot({ className, ...props }, ref) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(bottomNavigation().root, className)}\n data-jaci-component=\"bottom-navigation\"\n data-slot=\"bottom-navigation\"\n />\n );\n },\n);\n\nexport interface BottomNavigationItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\nexport const BottomNavigationItem = forwardRef<HTMLAnchorElement, BottomNavigationItemProps>(\n function BottomNavigationItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n ) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(bottomNavigation({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"bottom-navigation-item\"\n />\n );\n },\n);\n\nexport const BottomNavigation = Object.assign(BottomNavigationRoot, {\n Item: BottomNavigationItem,\n});\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,WAA8B,OAAiC;CAC7E,OAAO,oBAACA,OAAW,MAAZ,EAAiB,GAAI,MAAQ,CAAA;AACtC;AAEA,MAAa,qBAAqBA,OAAW;;AAK7C,MAAa,YAAY,WAAwC,SAAS,UACxE,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EAC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ACE,GAAI;EACJ,gBAAc,gBAAgB,SAAS,SAAS,KAAA;EAC3C;EACL,WAAW,GAAG,iBAAiB,EAAE,OAAO,CAAC,CAAC,CAAC,MAAM,SAAS;EAC1D,eAAa,UAAU,KAAA;EACvB,aAAU;CACX,CAAA;AAEL,CACF;AAEA,MAAa,mBAAmB,OAAO,OAAO,sBAAsB,EAClE,MAAM,qBACR,CAAC"}
1
+ {"version":3,"file":"navigation.js","names":["BaseDialog"],"sources":["../../../src/components/navigation/navigation.tsx"],"sourcesContent":["\"use client\";\n\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { DialogRoot as BaseDialogRoot } from \"@base-ui/react/dialog\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { bottomNavigation, navbar } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\nimport { useThemePortalProps } from \"../../theme/theme-scope\";\n\n/**\n * Groups a responsive navigation bar and its mobile drawer. The `open`,\n * `defaultOpen`, and `onOpenChange` props are forwarded to Base UI's Dialog\n * root, which supplies focus management, Escape handling, and backdrop\n * dismissal for `Navbar.Drawer`.\n */\nexport type NavbarRootProps<Payload = unknown> = BaseDialogRoot.Props<Payload>;\n\nexport function NavbarRoot<Payload = unknown>(props: NavbarRootProps<Payload>) {\n return <BaseDialog.Root {...props} />;\n}\n\nexport const NavbarCreateHandle = BaseDialog.createHandle;\n\nexport type NavbarBarProps = ComponentPropsWithoutRef<\"nav\">;\n\n/** A fixed, translucent zinc navigation surface. */\nexport const NavbarBar = forwardRef<HTMLElement, NavbarBarProps>(function NavbarBar(\n { className, ...props },\n ref,\n) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(navbar().bar, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-bar\"\n />\n );\n});\n\nexport type NavbarStartProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarStart = forwardRef<HTMLDivElement, NavbarStartProps>(function NavbarStart(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().start, className)} data-slot=\"navbar-start\" />\n );\n});\n\nexport type NavbarCenterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarCenter = forwardRef<HTMLDivElement, NavbarCenterProps>(function NavbarCenter(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(navbar().center, className)}\n data-slot=\"navbar-center\"\n />\n );\n});\n\nexport type NavbarEndProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarEnd = forwardRef<HTMLDivElement, NavbarEndProps>(function NavbarEnd(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().end, className)} data-slot=\"navbar-end\" />\n );\n});\n\nexport type NavbarToggleProps = ComponentPropsWithoutRef<typeof BaseDialog.Trigger>;\n\n/**\n * Opens the responsive drawer. It is hidden at the large breakpoint by\n * default, while still allowing a controlled host to render a drawer anywhere.\n */\nexport const NavbarToggle = forwardRef<HTMLButtonElement, NavbarToggleProps>(function NavbarToggle(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Trigger\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Open navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().toggle, className)}\n data-slot=\"navbar-toggle\"\n >\n {children ?? \"☰\"}\n </BaseDialog.Trigger>\n );\n});\n\nexport type NavbarDrawerPortalProps = Omit<\n ComponentPropsWithoutRef<typeof BaseDialog.Portal>,\n \"children\"\n>;\n\nexport interface NavbarDrawerProps extends ComponentPropsWithoutRef<typeof BaseDialog.Popup> {\n /** Optional controls for the underlying Base UI portal. */\n portalProps?: NavbarDrawerPortalProps;\n}\n\n/**\n * A left-aligned mobile drawer. It intentionally owns the Dialog portal,\n * backdrop, viewport, and popup so consumers cannot accidentally omit the\n * pieces required for focus trapping and Escape/backdrop dismissal.\n */\nexport const NavbarDrawer = forwardRef<HTMLDivElement, NavbarDrawerProps>(function NavbarDrawer(\n { \"aria-label\": ariaLabel, children, className, portalProps, ...props },\n ref,\n) {\n const styles = navbar();\n const scopedPortalProps = useThemePortalProps(portalProps ?? {});\n\n return (\n <BaseDialog.Portal {...scopedPortalProps}>\n <BaseDialog.Backdrop\n className={withRecipeClassName(styles.drawerBackdrop, undefined)}\n data-slot=\"navbar-drawer-backdrop\"\n />\n <BaseDialog.Viewport\n className={withRecipeClassName(styles.drawerViewport, undefined)}\n data-slot=\"navbar-drawer-viewport\"\n >\n <BaseDialog.Popup\n {...props}\n aria-label={ariaLabel ?? \"Navigation menu\"}\n ref={ref}\n className={withRecipeClassName(styles.drawer, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-drawer\"\n >\n {children}\n </BaseDialog.Popup>\n </BaseDialog.Viewport>\n </BaseDialog.Portal>\n );\n});\n\nexport type NavbarCloseProps = ComponentPropsWithoutRef<typeof BaseDialog.Close>;\n\n/** A close affordance for use inside `Navbar.Drawer`. */\nexport const NavbarClose = forwardRef<HTMLButtonElement, NavbarCloseProps>(function NavbarClose(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().close, className)}\n data-slot=\"navbar-close\"\n >\n {children ?? \"×\"}\n </BaseDialog.Close>\n );\n});\n\nexport interface NavbarItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\n/** A semantic navigation link for either the fixed bar or mobile drawer. */\nexport const NavbarItem = forwardRef<HTMLAnchorElement, NavbarItemProps>(function NavbarItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(navbar({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"navbar-item\"\n />\n );\n});\n\nexport type BottomNavigationProps = ComponentPropsWithoutRef<\"nav\">;\n\n/**\n * A compact floating navigation bar for small-screen destinations. It is\n * independent from `Navbar` so it can be used in layouts without a drawer.\n */\nexport const BottomNavigationRoot = forwardRef<HTMLElement, BottomNavigationProps>(\n function BottomNavigationRoot({ className, ...props }, ref) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(bottomNavigation().root, className)}\n data-jaci-component=\"bottom-navigation\"\n data-slot=\"bottom-navigation\"\n />\n );\n },\n);\n\nexport interface BottomNavigationItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\nexport const BottomNavigationItem = forwardRef<HTMLAnchorElement, BottomNavigationItemProps>(\n function BottomNavigationItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n ) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(bottomNavigation({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"bottom-navigation-item\"\n />\n );\n },\n);\n\nexport const BottomNavigation = Object.assign(BottomNavigationRoot, {\n Item: BottomNavigationItem,\n});\n"],"mappings":";;;;;;;;;;AAoBA,SAAgB,WAA8B,OAAiC;CAC7E,OAAO,oBAACA,OAAW,MAAZ,EAAiB,GAAI,MAAQ,CAAA;AACtC;AAEA,MAAa,qBAAqBA,OAAW;;AAK7C,MAAa,YAAY,WAAwC,SAAS,UACxE,EAAE,WAAW,GAAG,SAChB,KACA;CACA,OACE,oBAAC,OAAD;EACE,GAAI;EACC;EACL,WAAW,GAAG,OAAO,CAAC,CAAC,KAAK,SAAS;EACrC,uBAAoB;EACpB,aAAU;CACX,CAAA;AAEL,CAAC;AAID,MAAa,cAAc,WAA6C,SAAS,YAC/E,EAAE,WAAW,GAAG,SAChB,KACA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