@bergetai/ui 0.18.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/components/alert-dialog/AlertDialog.cjs +3 -3
  2. package/dist/components/alert-dialog/AlertDialog.cjs.map +1 -1
  3. package/dist/components/alert-dialog/AlertDialog.d.cts +3 -3
  4. package/dist/components/alert-dialog/AlertDialog.d.mts +3 -3
  5. package/dist/components/alert-dialog/AlertDialog.mjs +3 -3
  6. package/dist/components/alert-dialog/AlertDialog.mjs.map +1 -1
  7. package/dist/components/box/Box.cjs.map +1 -1
  8. package/dist/components/box/Box.d.cts +3 -3
  9. package/dist/components/box/Box.d.mts +3 -3
  10. package/dist/components/box/Box.mjs.map +1 -1
  11. package/dist/components/button/Button.cjs +3 -1
  12. package/dist/components/button/Button.cjs.map +1 -1
  13. package/dist/components/button/Button.d.cts +1 -1
  14. package/dist/components/button/Button.d.mts +1 -1
  15. package/dist/components/button/Button.mjs +3 -1
  16. package/dist/components/button/Button.mjs.map +1 -1
  17. package/dist/components/container/Container.cjs.map +1 -1
  18. package/dist/components/container/Container.d.cts +1 -1
  19. package/dist/components/container/Container.d.mts +1 -1
  20. package/dist/components/container/Container.mjs.map +1 -1
  21. package/dist/components/country-select/CountrySelect.cjs +2 -2
  22. package/dist/components/country-select/CountrySelect.cjs.map +1 -1
  23. package/dist/components/country-select/CountrySelect.mjs +2 -2
  24. package/dist/components/country-select/CountrySelect.mjs.map +1 -1
  25. package/dist/components/dialog/Dialog.cjs +3 -3
  26. package/dist/components/dialog/Dialog.cjs.map +1 -1
  27. package/dist/components/dialog/Dialog.d.cts +1 -1
  28. package/dist/components/dialog/Dialog.d.mts +1 -1
  29. package/dist/components/dialog/Dialog.mjs +3 -3
  30. package/dist/components/dialog/Dialog.mjs.map +1 -1
  31. package/dist/components/dropdown-menu/DropdownMenu.cjs.map +1 -1
  32. package/dist/components/dropdown-menu/DropdownMenu.d.cts +9 -9
  33. package/dist/components/dropdown-menu/DropdownMenu.d.mts +9 -9
  34. package/dist/components/dropdown-menu/DropdownMenu.mjs.map +1 -1
  35. package/dist/components/grid/Grid.cjs.map +1 -1
  36. package/dist/components/grid/Grid.d.cts +3 -3
  37. package/dist/components/grid/Grid.d.mts +3 -3
  38. package/dist/components/grid/Grid.mjs.map +1 -1
  39. package/dist/components/item/Item.cjs.map +1 -1
  40. package/dist/components/item/Item.d.cts +1 -1
  41. package/dist/components/item/Item.d.mts +1 -1
  42. package/dist/components/item/Item.mjs.map +1 -1
  43. package/dist/components/typography/Typography.d.cts +1 -1
  44. package/dist/components/typography/Typography.d.mts +1 -1
  45. package/dist/index.cjs +2 -0
  46. package/dist/index.d.cts +2 -1
  47. package/dist/index.d.mts +2 -1
  48. package/dist/index.mjs +2 -1
  49. package/dist/lib/utils.cjs +4 -4
  50. package/dist/lib/utils.cjs.map +1 -1
  51. package/dist/lib/utils.d.cts +6 -0
  52. package/dist/lib/utils.d.cts.map +1 -0
  53. package/dist/lib/utils.d.mts +6 -0
  54. package/dist/lib/utils.d.mts.map +1 -0
  55. package/dist/lib/utils.mjs +4 -4
  56. package/dist/lib/utils.mjs.map +1 -1
  57. package/dist/primitives/button.d.cts +1 -1
  58. package/dist/primitives/button.d.mts +1 -1
  59. package/dist/styles/index.css +99 -0
  60. package/package.json +1 -1
@@ -30,9 +30,9 @@ AlertDialogOverlay.displayName = "AlertDialogOverlay";
30
30
  const AlertDialogContent = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AlertDialogPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertDialogOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_alert_dialog.AlertDialog.Popup, {
31
31
  ref,
32
32
  className: require_utils.cn(`
33
- fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg
34
- translate-x-[-50%] translate-y-[-50%] gap-4 rounded-berget-sm border
35
- border-berget-dialog-border bg-berget-dialog-bg p-6 shadow-berget-lg
33
+ fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-[-50%]
34
+ gap-4 rounded-berget-sm border border-berget-dialog-border
35
+ bg-berget-dialog-bg p-6 shadow-berget-lg
36
36
  transition-[opacity,transform] duration-200
37
37
  data-ending-style:scale-95 data-ending-style:opacity-0
38
38
  data-starting-style:scale-95 data-starting-style:opacity-0
@@ -1 +1 @@
1
- {"version":3,"file":"AlertDialog.cjs","names":["AlertDialogPrimitive","React","asChildRender","cn","Typography"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\ntype AlertDialogTriggerProps = Omit<AlertDialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Trigger>\n ),\n);\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n `\n fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity\n duration-200\n data-ending-style:opacity-0\n data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n));\nAlertDialogOverlay.displayName = 'AlertDialogOverlay';\n\nconst AlertDialogContent = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Popup.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n ref={ref}\n className={cn(\n `\n fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg\n translate-x-[-50%] translate-y-[-50%] gap-4 rounded-berget-sm border\n border-berget-dialog-border bg-berget-dialog-bg p-6 shadow-berget-lg\n transition-[opacity,transform] duration-200\n data-ending-style:scale-95 data-ending-style:opacity-0\n data-starting-style:scale-95 data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col gap-1.5 text-center\n sm:text-left\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col-reverse gap-2\n sm:flex-row sm:justify-end\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n HTMLHeadingElement,\n Omit<AlertDialogPrimitive.Title.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n render={<Typography variant=\"h5\" color=\"default\" as=\"h2\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Title>\n));\nAlertDialogTitle.displayName = 'AlertDialogTitle';\n\nconst AlertDialogDescription = React.forwardRef<\n HTMLParagraphElement,\n Omit<AlertDialogPrimitive.Description.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n render={<Typography variant=\"small\" color=\"muted\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialogDescription';\n\n/** Action button — compose with `<Button>` via `asChild` for consistent styling. */\nconst AlertDialogAction = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogAction.displayName = 'AlertDialogAction';\n\n/** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */\nconst AlertDialogCancel = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(\n `\n mt-2\n sm:mt-0\n `,\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogCancel.displayName = 'AlertDialogCancel';\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"],"mappings":";;;;;;;;;AAQA,MAAM,cAAcA,4BAAAA,YAAqB;AAQzC,MAAM,qBAAqBC,MAAM,YAC9B,EAAE,SAAS,UAAU,GAAG,SAAS,QAChC,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAA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AAA,IAAA,CAACI,mBAAAA,YAAD;EAAY,SAAQ;EAAK,OAAM;EAAU,IAAG;EAAgB;CAAY,CAAA;CAChF,GAAI;CAEH;AACyB,CAAA,CAC7B;AACD,iBAAiB,cAAc;AAE/B,MAAM,yBAAyBH,MAAM,YAGlC,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,aAAtB;CACO;CACL,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAACI,mBAAAA,YAAD;EAAY,SAAQ;EAAQ,OAAM;EAAmB;CAAY,CAAA;CACzE,GAAI;CAEH;AAC+B,CAAA,CACnC;AACD,uBAAuB,cAAc;;AAGrC,MAAM,oBAAoBH,MAAM,YAO7B,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,QAC7C,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,WAAWG,cAAAA,GAAG,SAAS;CACvB,QAAQD,cAAAA,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc;;AAGhC,MAAM,oBAAoBD,MAAM,YAO7B,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,QAC7C,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,WAAWG,cAAAA,GACT;;;SAIA,SACF;CACA,QAAQD,cAAAA,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc"}
1
+ {"version":3,"file":"AlertDialog.cjs","names":["AlertDialogPrimitive","React","asChildRender","cn","Typography"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\ntype AlertDialogTriggerProps = Omit<AlertDialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n};\n\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Trigger>\n ),\n);\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n `\n fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity\n duration-200\n data-ending-style:opacity-0\n data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n));\nAlertDialogOverlay.displayName = 'AlertDialogOverlay';\n\nconst AlertDialogContent = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Popup.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n ref={ref}\n className={cn(\n `\n fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-[-50%]\n gap-4 rounded-berget-sm border border-berget-dialog-border\n bg-berget-dialog-bg p-6 shadow-berget-lg\n transition-[opacity,transform] duration-200\n data-ending-style:scale-95 data-ending-style:opacity-0\n data-starting-style:scale-95 data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col gap-1.5 text-center\n sm:text-left\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col-reverse gap-2\n sm:flex-row sm:justify-end\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n HTMLHeadingElement,\n Omit<AlertDialogPrimitive.Title.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n render={<Typography variant=\"h5\" color=\"default\" as=\"h2\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Title>\n));\nAlertDialogTitle.displayName = 'AlertDialogTitle';\n\nconst AlertDialogDescription = React.forwardRef<\n HTMLParagraphElement,\n Omit<AlertDialogPrimitive.Description.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n render={<Typography variant=\"small\" color=\"muted\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialogDescription';\n\n/** Action button — compose with `<Button>` via `asChild` for consistent styling. */\nconst AlertDialogAction = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogAction.displayName = 'AlertDialogAction';\n\n/** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */\nconst AlertDialogCancel = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(\n `\n mt-2\n sm:mt-0\n `,\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogCancel.displayName = 'AlertDialogCancel';\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"],"mappings":";;;;;;;;;AAQA,MAAM,cAAcA,4BAAAA,YAAqB;AAQzC,MAAM,qBAAqBC,MAAM,YAC9B,EAAE,SAAS,UAAU,GAAG,SAAS,QAChC,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,SAAtB;CAAmC;CAAK,QAAQE,cAAAA,cAAc,SAAS,QAAQ;CAAG,GAAI;CACnF,UAAA,UAAU,KAAA,IAAY;AACK,CAAA,CAElC;AACA,mBAAmB,cAAc;AAEjC,MAAM,oBAAoBF,4BAAAA,YAAqB;AAE/C,MAAM,qBAAqBC,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,UAAtB;CACO;CACL,WAAWG,cAAAA,GACT;;;;;SAMA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqBF,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,KAAA,CAAC,mBAAD,EAAA,UAAA,CACE,iBAAA,GAAA,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kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,WAAWG,cAAAA,GAAG,SAAS;CACvB,QAAQD,cAAAA,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc;;AAGhC,MAAM,oBAAoBD,MAAM,YAO7B,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,QAC7C,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,WAAWG,cAAAA,GACT;;;SAIA,SACF;CACA,QAAQD,cAAAA,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc"}
@@ -4,7 +4,7 @@ import { AlertDialog } from "@base-ui/react/alert-dialog";
4
4
  declare const AlertDialog$1: typeof AlertDialog.Root;
5
5
  type AlertDialogTriggerProps = Omit<AlertDialog.Trigger.Props, 'className' | 'render'> & {
6
6
  className?: string;
7
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
7
+ /** Render as a different element/component by merging props onto the child. */
8
8
  asChild?: boolean;
9
9
  };
10
10
  declare const AlertDialogTrigger: React.ForwardRefExoticComponent<Omit<AlertDialogTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -32,13 +32,13 @@ declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<Omit<
32
32
  /** Action button — compose with `<Button>` via `asChild` for consistent styling. */
33
33
  declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "className" | "render"> & {
34
34
  className?: string;
35
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
35
+ /** Render as a different element/component by merging props onto the child. */
36
36
  asChild?: boolean;
37
37
  }, "ref"> & React.RefAttributes<HTMLButtonElement>>;
38
38
  /** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */
39
39
  declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "className" | "render"> & {
40
40
  className?: string;
41
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
41
+ /** Render as a different element/component by merging props onto the child. */
42
42
  asChild?: boolean;
43
43
  }, "ref"> & React.RefAttributes<HTMLButtonElement>>;
44
44
  //#endregion
@@ -4,7 +4,7 @@ import { AlertDialog } from "@base-ui/react/alert-dialog";
4
4
  declare const AlertDialog$1: typeof AlertDialog.Root;
5
5
  type AlertDialogTriggerProps = Omit<AlertDialog.Trigger.Props, 'className' | 'render'> & {
6
6
  className?: string;
7
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
7
+ /** Render as a different element/component by merging props onto the child. */
8
8
  asChild?: boolean;
9
9
  };
10
10
  declare const AlertDialogTrigger: React.ForwardRefExoticComponent<Omit<AlertDialogTriggerProps, "ref"> & React.RefAttributes<HTMLButtonElement>>;
@@ -32,13 +32,13 @@ declare const AlertDialogDescription: React.ForwardRefExoticComponent<Omit<Omit<
32
32
  /** Action button — compose with `<Button>` via `asChild` for consistent styling. */
33
33
  declare const AlertDialogAction: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "className" | "render"> & {
34
34
  className?: string;
35
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
35
+ /** Render as a different element/component by merging props onto the child. */
36
36
  asChild?: boolean;
37
37
  }, "ref"> & React.RefAttributes<HTMLButtonElement>>;
38
38
  /** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */
39
39
  declare const AlertDialogCancel: React.ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "className" | "render"> & {
40
40
  className?: string;
41
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
41
+ /** Render as a different element/component by merging props onto the child. */
42
42
  asChild?: boolean;
43
43
  }, "ref"> & React.RefAttributes<HTMLButtonElement>>;
44
44
  //#endregion
@@ -28,9 +28,9 @@ AlertDialogOverlay.displayName = "AlertDialogOverlay";
28
28
  const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog.Popup, {
29
29
  ref,
30
30
  className: cn(`
31
- fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg
32
- translate-x-[-50%] translate-y-[-50%] gap-4 rounded-berget-sm border
33
- border-berget-dialog-border bg-berget-dialog-bg p-6 shadow-berget-lg
31
+ fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-[-50%]
32
+ gap-4 rounded-berget-sm border border-berget-dialog-border
33
+ bg-berget-dialog-bg p-6 shadow-berget-lg
34
34
  transition-[opacity,transform] duration-200
35
35
  data-ending-style:scale-95 data-ending-style:opacity-0
36
36
  data-starting-style:scale-95 data-starting-style:opacity-0
@@ -1 +1 @@
1
- {"version":3,"file":"AlertDialog.mjs","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\ntype AlertDialogTriggerProps = Omit<AlertDialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Trigger>\n ),\n);\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n `\n fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity\n duration-200\n data-ending-style:opacity-0\n data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n));\nAlertDialogOverlay.displayName = 'AlertDialogOverlay';\n\nconst AlertDialogContent = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Popup.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n ref={ref}\n className={cn(\n `\n fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg\n translate-x-[-50%] translate-y-[-50%] gap-4 rounded-berget-sm border\n border-berget-dialog-border bg-berget-dialog-bg p-6 shadow-berget-lg\n transition-[opacity,transform] duration-200\n data-ending-style:scale-95 data-ending-style:opacity-0\n data-starting-style:scale-95 data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col gap-1.5 text-center\n sm:text-left\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col-reverse gap-2\n sm:flex-row sm:justify-end\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n HTMLHeadingElement,\n Omit<AlertDialogPrimitive.Title.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n render={<Typography variant=\"h5\" color=\"default\" as=\"h2\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Title>\n));\nAlertDialogTitle.displayName = 'AlertDialogTitle';\n\nconst AlertDialogDescription = React.forwardRef<\n HTMLParagraphElement,\n Omit<AlertDialogPrimitive.Description.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n render={<Typography variant=\"small\" color=\"muted\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialogDescription';\n\n/** Action button — compose with `<Button>` via `asChild` for consistent styling. */\nconst AlertDialogAction = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogAction.displayName = 'AlertDialogAction';\n\n/** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */\nconst AlertDialogCancel = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(\n `\n mt-2\n sm:mt-0\n `,\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogCancel.displayName = 'AlertDialogCancel';\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"],"mappings":";;;;;;;AAQA,MAAMA,gBAAcC,YAAqB;AAQzC,MAAM,qBAAqB,MAAM,YAC9B,EAAE,SAAS,UAAU,GAAG,SAAS,QAChC,oBAACA,YAAqB,SAAtB;CAAmC;CAAK,QAAQ,cAAc,SAAS,QAAQ;CAAG,GAAI;CACnF,UAAA,UAAU,KAAA,IAAY;AACK,CAAA,CAElC;AACA,mBAAmB,cAAc;AAEjC,MAAM,oBAAoBA,YAAqB;AAE/C,MAAM,qBAAqB,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAACA,YAAqB,UAAtB;CACO;CACL,WAAW,GACT;;;;;SAMA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqB,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,qBAAC,mBAAD,EAAA,UAAA,CACE,oBAAC,oBAAD,CAAqB,CAAA,GACrB,oBAACA,YAAqB,OAAtB;CACO;CACL,WAAW,GACT;;;;;;;WAQA,SACF;CACA,GAAI;AACL,CAAA,CACgB,EAAA,CAAA,CACpB;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAD;CACE,WAAW,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAD;CACE,WAAW,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,MAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAACA,YAAqB,OAAtB;CACO;CACL,QAAQ,oBAAC,YAAD;EAAY,SAAQ;EAAK,OAAM;EAAU,IAAG;EAAgB;CAAY,CAAA;CAChF,GAAI;CAEH;AACyB,CAAA,CAC7B;AACD,iBAAiB,cAAc;AAE/B,MAAM,yBAAyB,MAAM,YAGlC,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAACA,YAAqB,aAAtB;CACO;CACL,QAAQ,oBAAC,YAAD;EAAY,SAAQ;EAAQ,OAAM;EAAmB;CAAY,CAAA;CACzE,GAAI;CAEH;AAC+B,CAAA,CACnC;AACD,uBAAuB,cAAc;;AAGrC,MAAM,oBAAoB,MAAM,YAO7B,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,QAC7C,oBAACA,YAAqB,OAAtB;CACO;CACL,WAAW,GAAG,SAAS;CACvB,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc;;AAGhC,MAAM,oBAAoB,MAAM,YAO7B,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,QAC7C,oBAACA,YAAqB,OAAtB;CACO;CACL,WAAW,GACT;;;SAIA,SACF;CACA,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc"}
1
+ {"version":3,"file":"AlertDialog.mjs","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\ntype AlertDialogTriggerProps = Omit<AlertDialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n};\n\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Trigger>\n ),\n);\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n `\n fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity\n duration-200\n data-ending-style:opacity-0\n data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n));\nAlertDialogOverlay.displayName = 'AlertDialogOverlay';\n\nconst AlertDialogContent = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Popup.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n ref={ref}\n className={cn(\n `\n fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg translate-[-50%]\n gap-4 rounded-berget-sm border border-berget-dialog-border\n bg-berget-dialog-bg p-6 shadow-berget-lg\n transition-[opacity,transform] duration-200\n data-ending-style:scale-95 data-ending-style:opacity-0\n data-starting-style:scale-95 data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col gap-1.5 text-center\n sm:text-left\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col-reverse gap-2\n sm:flex-row sm:justify-end\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n HTMLHeadingElement,\n Omit<AlertDialogPrimitive.Title.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n render={<Typography variant=\"h5\" color=\"default\" as=\"h2\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Title>\n));\nAlertDialogTitle.displayName = 'AlertDialogTitle';\n\nconst AlertDialogDescription = React.forwardRef<\n HTMLParagraphElement,\n Omit<AlertDialogPrimitive.Description.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n render={<Typography variant=\"small\" color=\"muted\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialogDescription';\n\n/** Action button — compose with `<Button>` via `asChild` for consistent styling. */\nconst AlertDialogAction = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogAction.displayName = 'AlertDialogAction';\n\n/** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */\nconst AlertDialogCancel = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(\n `\n mt-2\n sm:mt-0\n `,\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogCancel.displayName = 'AlertDialogCancel';\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"],"mappings":";;;;;;;AAQA,MAAMA,gBAAcC,YAAqB;AAQzC,MAAM,qBAAqB,MAAM,YAC9B,EAAE,SAAS,UAAU,GAAG,SAAS,QAChC,oBAACA,YAAqB,SAAtB;CAAmC;CAAK,QAAQ,cAAc,SAAS,QAAQ;CAAG,GAAI;CACnF,UAAA,UAAU,KAAA,IAAY;AACK,CAAA,CAElC;AACA,mBAAmB,cAAc;AAEjC,MAAM,oBAAoBA,YAAqB;AAE/C,MAAM,qBAAqB,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAACA,YAAqB,UAAtB;CACO;CACL,WAAW,GACT;;;;;SAMA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqB,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,qBAAC,mBAAD,EAAA,UAAA,CACE,oBAAC,oBAAD,CAAqB,CAAA,GACrB,oBAACA,YAAqB,OAAtB;CACO;CACL,WAAW,GACT;;;;;;;WAQA,SACF;CACA,GAAI;AACL,CAAA,CACgB,EAAA,CAAA,CACpB;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAD;CACE,WAAW,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAD;CACE,WAAW,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,MAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAACA,YAAqB,OAAtB;CACO;CACL,QAAQ,oBAAC,YAAD;EAAY,SAAQ;EAAK,OAAM;EAAU,IAAG;EAAgB;CAAY,CAAA;CAChF,GAAI;CAEH;AACyB,CAAA,CAC7B;AACD,iBAAiB,cAAc;AAE/B,MAAM,yBAAyB,MAAM,YAGlC,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAACA,YAAqB,aAAtB;CACO;CACL,QAAQ,oBAAC,YAAD;EAAY,SAAQ;EAAQ,OAAM;EAAmB;CAAY,CAAA;CACzE,GAAI;CAEH;AAC+B,CAAA,CACnC;AACD,uBAAuB,cAAc;;AAGrC,MAAM,oBAAoB,MAAM,YAO7B,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,QAC7C,oBAACA,YAAqB,OAAtB;CACO;CACL,WAAW,GAAG,SAAS;CACvB,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc;;AAGhC,MAAM,oBAAoB,MAAM,YAO7B,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,QAC7C,oBAACA,YAAqB,OAAtB;CACO;CACL,WAAW,GACT;;;SAIA,SACF;CACA,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Box.cjs","names":["cva","React","useRender","mergeProps","cn"],"sources":["../../../src/components/box/Box.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst boxVariants = cva('flex', {\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n wrap: {\n nowrap: 'flex-nowrap',\n wrap: 'flex-wrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n align: 'start',\n justify: 'start',\n wrap: 'nowrap',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport interface BoxProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {\n children?: React.ReactNode;\n gap?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Box = React.forwardRef<HTMLElement, BoxProps>(\n (\n { className, direction, align, justify, wrap, gap, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n boxVariants({ direction, align, justify, wrap }),\n gap !== undefined &&\n `\n gap-${gap}\n `,\n className,\n ),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nBox.displayName = 'Box';\n\nexport { Box, boxVariants };\n"],"mappings":";;;;;;;;;AAQA,MAAM,eAAA,GAAcA,yBAAAA,IAAAA,CAAI,QAAQ;CAC9B,UAAU;EACR,WAAW;GACT,KAAK;GACL,QAAQ;GACR,eAAe;GACf,kBAAkB;EACpB;EACA,OAAO;GACL,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,UAAU;EACZ;EACA,SAAS;GACP,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,QAAQ;GACR,QAAQ;EACV;EACA,MAAM;GACJ,QAAQ;GACR,MAAM;GACN,gBAAgB;EAClB;CACF;CACA,iBAAiB;EACf,WAAW;EACX,OAAO;EACP,SAAS;EACT,MAAM;CACR;AACF,CAAC;AAiCD,MAAM,MAAMC,MAAM,YAEd,EAAE,WAAW,WAAW,OAAO,SAAS,MAAM,KAAK,UAAU,OAAO,UAAU,GAAG,SACjF,QACG;CACH,QAAA,GAAOC,0BAAAA,UAAAA,CAAU;EACf;EACA,gBAAgB;EAChB,QAAQ,UAAW,WAAkC,KAAA;EACrD,QAAA,GAAOC,2BAAAA,WAAAA,CACL;GACE,WAAWC,cAAAA,GACT,YAAY;IAAE;IAAW;IAAO;IAAS;GAAK,CAAC,GAC/C,QAAQ,KAAA,KACN;sBACQ,IAAI;iBAEd,SACF;GACA,UAAU,UAAU,KAAA,IAAY;EAClC,GACA,KACF;CACF,CAAC;AACH,CACF;AACA,IAAI,cAAc"}
1
+ {"version":3,"file":"Box.cjs","names":["cva","React","useRender","mergeProps","cn"],"sources":["../../../src/components/box/Box.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst boxVariants = cva('flex', {\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n wrap: {\n nowrap: 'flex-nowrap',\n wrap: 'flex-wrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n align: 'start',\n justify: 'start',\n wrap: 'nowrap',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport interface BoxProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {\n children?: React.ReactNode;\n gap?: SpacingScale;\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n}\n\nconst Box = React.forwardRef<HTMLElement, BoxProps>(\n (\n { className, direction, align, justify, wrap, gap, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n boxVariants({ direction, align, justify, wrap }),\n gap !== undefined &&\n `\n gap-${gap}\n `,\n className,\n ),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nBox.displayName = 'Box';\n\nexport { Box, boxVariants };\n"],"mappings":";;;;;;;;;AAQA,MAAM,eAAA,GAAcA,yBAAAA,IAAAA,CAAI,QAAQ;CAC9B,UAAU;EACR,WAAW;GACT,KAAK;GACL,QAAQ;GACR,eAAe;GACf,kBAAkB;EACpB;EACA,OAAO;GACL,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,UAAU;EACZ;EACA,SAAS;GACP,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,QAAQ;GACR,QAAQ;EACV;EACA,MAAM;GACJ,QAAQ;GACR,MAAM;GACN,gBAAgB;EAClB;CACF;CACA,iBAAiB;EACf,WAAW;EACX,OAAO;EACP,SAAS;EACT,MAAM;CACR;AACF,CAAC;AAiCD,MAAM,MAAMC,MAAM,YAEd,EAAE,WAAW,WAAW,OAAO,SAAS,MAAM,KAAK,UAAU,OAAO,UAAU,GAAG,SACjF,QACG;CACH,QAAA,GAAOC,0BAAAA,UAAAA,CAAU;EACf;EACA,gBAAgB;EAChB,QAAQ,UAAW,WAAkC,KAAA;EACrD,QAAA,GAAOC,2BAAAA,WAAAA,CACL;GACE,WAAWC,cAAAA,GACT,YAAY;IAAE;IAAW;IAAO;IAAS;GAAK,CAAC,GAC/C,QAAQ,KAAA,KACN;sBACQ,IAAI;iBAEd,SACF;GACA,UAAU,UAAU,KAAA,IAAY;EAClC,GACA,KACF;CACF,CAAC;AACH,CACF;AACA,IAAI,cAAc"}
@@ -4,15 +4,15 @@ import { useRender } from "@base-ui/react/use-render";
4
4
  //#region src/components/box/Box.d.ts
5
5
  declare const boxVariants: (props?: ({
6
6
  direction?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
7
- align?: "center" | "end" | "start" | "stretch" | "baseline" | null | undefined;
8
- justify?: "center" | "end" | "start" | "between" | "around" | "evenly" | null | undefined;
7
+ align?: "end" | "start" | "center" | "stretch" | "baseline" | null | undefined;
8
+ justify?: "end" | "start" | "center" | "between" | "around" | "evenly" | null | undefined;
9
9
  wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
10
10
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
11
  export type SpacingScale = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 96;
12
12
  export interface BoxProps extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {
13
13
  children?: React.ReactNode;
14
14
  gap?: SpacingScale;
15
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
15
+ /** Render as a different element/component by merging props onto the child. */
16
16
  asChild?: boolean;
17
17
  }
18
18
  declare const Box: React.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & React.RefAttributes<HTMLElement>>;
@@ -4,15 +4,15 @@ import { useRender } from "@base-ui/react/use-render";
4
4
  //#region src/components/box/Box.d.ts
5
5
  declare const boxVariants: (props?: ({
6
6
  direction?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
7
- align?: "center" | "end" | "start" | "stretch" | "baseline" | null | undefined;
8
- justify?: "center" | "end" | "start" | "between" | "around" | "evenly" | null | undefined;
7
+ align?: "end" | "start" | "center" | "stretch" | "baseline" | null | undefined;
8
+ justify?: "end" | "start" | "center" | "between" | "around" | "evenly" | null | undefined;
9
9
  wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
10
10
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
11
11
  export type SpacingScale = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 96;
12
12
  export interface BoxProps extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {
13
13
  children?: React.ReactNode;
14
14
  gap?: SpacingScale;
15
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
15
+ /** Render as a different element/component by merging props onto the child. */
16
16
  asChild?: boolean;
17
17
  }
18
18
  declare const Box: React.ForwardRefExoticComponent<Omit<BoxProps, "ref"> & React.RefAttributes<HTMLElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Box.mjs","names":[],"sources":["../../../src/components/box/Box.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst boxVariants = cva('flex', {\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n wrap: {\n nowrap: 'flex-nowrap',\n wrap: 'flex-wrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n align: 'start',\n justify: 'start',\n wrap: 'nowrap',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport interface BoxProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {\n children?: React.ReactNode;\n gap?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Box = React.forwardRef<HTMLElement, BoxProps>(\n (\n { className, direction, align, justify, wrap, gap, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n boxVariants({ direction, align, justify, wrap }),\n gap !== undefined &&\n `\n gap-${gap}\n `,\n className,\n ),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nBox.displayName = 'Box';\n\nexport { Box, boxVariants };\n"],"mappings":";;;;;;;AAQA,MAAM,cAAc,IAAI,QAAQ;CAC9B,UAAU;EACR,WAAW;GACT,KAAK;GACL,QAAQ;GACR,eAAe;GACf,kBAAkB;EACpB;EACA,OAAO;GACL,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,UAAU;EACZ;EACA,SAAS;GACP,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,QAAQ;GACR,QAAQ;EACV;EACA,MAAM;GACJ,QAAQ;GACR,MAAM;GACN,gBAAgB;EAClB;CACF;CACA,iBAAiB;EACf,WAAW;EACX,OAAO;EACP,SAAS;EACT,MAAM;CACR;AACF,CAAC;AAiCD,MAAM,MAAM,MAAM,YAEd,EAAE,WAAW,WAAW,OAAO,SAAS,MAAM,KAAK,UAAU,OAAO,UAAU,GAAG,SACjF,QACG;CACH,OAAO,UAAU;EACf;EACA,gBAAgB;EAChB,QAAQ,UAAW,WAAkC,KAAA;EACrD,OAAO,WACL;GACE,WAAW,GACT,YAAY;IAAE;IAAW;IAAO;IAAS;GAAK,CAAC,GAC/C,QAAQ,KAAA,KACN;sBACQ,IAAI;iBAEd,SACF;GACA,UAAU,UAAU,KAAA,IAAY;EAClC,GACA,KACF;CACF,CAAC;AACH,CACF;AACA,IAAI,cAAc"}
1
+ {"version":3,"file":"Box.mjs","names":[],"sources":["../../../src/components/box/Box.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst boxVariants = cva('flex', {\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n wrap: {\n nowrap: 'flex-nowrap',\n wrap: 'flex-wrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n align: 'start',\n justify: 'start',\n wrap: 'nowrap',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport interface BoxProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {\n children?: React.ReactNode;\n gap?: SpacingScale;\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n}\n\nconst Box = React.forwardRef<HTMLElement, BoxProps>(\n (\n { className, direction, align, justify, wrap, gap, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n boxVariants({ direction, align, justify, wrap }),\n gap !== undefined &&\n `\n gap-${gap}\n `,\n className,\n ),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nBox.displayName = 'Box';\n\nexport { Box, boxVariants };\n"],"mappings":";;;;;;;AAQA,MAAM,cAAc,IAAI,QAAQ;CAC9B,UAAU;EACR,WAAW;GACT,KAAK;GACL,QAAQ;GACR,eAAe;GACf,kBAAkB;EACpB;EACA,OAAO;GACL,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,UAAU;EACZ;EACA,SAAS;GACP,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,QAAQ;GACR,QAAQ;EACV;EACA,MAAM;GACJ,QAAQ;GACR,MAAM;GACN,gBAAgB;EAClB;CACF;CACA,iBAAiB;EACf,WAAW;EACX,OAAO;EACP,SAAS;EACT,MAAM;CACR;AACF,CAAC;AAiCD,MAAM,MAAM,MAAM,YAEd,EAAE,WAAW,WAAW,OAAO,SAAS,MAAM,KAAK,UAAU,OAAO,UAAU,GAAG,SACjF,QACG;CACH,OAAO,UAAU;EACf;EACA,gBAAgB;EAChB,QAAQ,UAAW,WAAkC,KAAA;EACrD,OAAO,WACL;GACE,WAAW,GACT,YAAY;IAAE;IAAW;IAAO;IAAS;GAAK,CAAC,GAC/C,QAAQ,KAAA,KACN;sBACQ,IAAI;iBAEd,SACF;GACA,UAAU,UAAU,KAAA,IAAY;EAClC,GACA,KACF;CACF,CAAC;AACH,CACF;AACA,IAAI,cAAc"}
@@ -99,7 +99,9 @@ function Button({ className, variant = "default", size, asChild = false, width =
99
99
  const baseClass = require_utils.cn(!isLink && require_button.buttonVariants({
100
100
  variant: primitiveVariant(variant),
101
101
  size
102
- }), !isLink && (width === "full" ? "rounded-berget-xs" : "rounded-full"), !isLink && !isIcon && "h-auto px-[0.8em] py-[0.4em]", !isLink && !isIcon && (size === "lg" ? "text-lg" : size === "sm" ? "text-sm" : size === "xs" ? "" : `text-base`), !isLink && "font-normal", brandVariantClasses(variant), interactionClasses, !isLink && width === "full" && "w-full", isIcon && `
102
+ }), !isLink && (width === "full" ? "rounded-berget-xs" : "rounded-full"), !isLink && !isIcon && "h-auto px-[0.8em] py-[0.4em]", !isLink && !isIcon && (size === "lg" ? "text-lg" : size === "sm" ? "text-sm" : size === "xs" ? "" : `
103
+ text-base
104
+ `), !isLink && "font-normal", brandVariantClasses(variant), interactionClasses, !isLink && width === "full" && "w-full", isIcon && `
103
105
  rounded-full
104
106
  shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]
105
107
  `, className);
@@ -1 +1 @@
1
- {"version":3,"file":"Button.cjs","names":["cn","buttonVariants","ButtonPrimitive","asChildRender"],"sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Button as ButtonPrimitive, buttonVariants } from '../../primitives/button';\nimport type { VariantProps } from 'class-variance-authority';\n\n/** Variants exposed by the Berget wrapper. */\nexport type CustomVariant =\n | 'default'\n | 'primary'\n | 'destructive'\n | 'destructive-outline'\n | 'outline'\n | 'ghost'\n | 'link';\n\n/** Props for the Berget Button wrapper. */\nexport interface ButtonProps extends Omit<\n React.ComponentProps<typeof ButtonPrimitive>,\n 'variant' | 'ref'\n> {\n /** Visual style variant. `primary` is Berget-specific. */\n variant?: CustomVariant;\n /** Full width or auto width. */\n width?: 'default' | 'full';\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n ref?: React.Ref<HTMLButtonElement>;\n}\n\n/**\n * Shared interaction chrome for every variant.\n *\n * The primitive already provides hover/focus/disabled plumbing via shadcn\n * tokens (`--primary`, `--muted`, `--ring`, …), which the shadcn bridge in\n * `styles/index.css` maps to brand values. These classes neutralise the bits\n * that don't fit the Berget system and apply the component-scoped\n * `--berget-button-*` state tokens:\n *\n * - Focus: always visible on keyboard focus (`focus-visible`), drawn as a\n * real CSS **outline** (2px, offset 2px) in `--berget-button-focus-ring`\n * (moss-300 dark / moss-600 light, ≥3:1 against the surface per\n * WCAG 2.4.7) — not a ring/box-shadow hugging the edge, and the control's\n * own border keeps its resting colour.\n * - Disabled: replaces the primitive's flat `opacity-50` fade with explicit\n * muted tokens so every variant stays legible (≥3:1, and disabled UI is\n * exempt from AA text contrast per WCAG 1.4.3).\n *\n * `dark:` is intentionally absent — it tracks `prefers-color-scheme`, not the\n * Berget theme. Theme switching is driven entirely by the semantic tokens.\n */\n/** Shared interaction chrome for every variant.\n * (Exported for `anchorVariants`, which replicates the wrapper chrome on\n * real `<a>` elements without dragging in button semantics.) */\nexport const interactionClasses = cn(\n // Outline-based focus indicator; neutralise the primitive's ring (the\n // ring colour class is left — harmless at width 0).\n `\n focus-visible:ring-0 focus-visible:outline-2 focus-visible:outline-offset-2\n focus-visible:outline-berget-button-focus-ring focus-visible:outline-solid\n `,\n // Neutralise the primitive's disabled fade; variants apply their own tokens.\n `\n disabled:pointer-events-none disabled:cursor-not-allowed\n disabled:opacity-100\n `,\n // No press movement: same compound selector as the primitive base's 1px\n // active translate so tailwind-merge strips it down to 0.\n 'active:not-aria-[haspopup]:translate-y-0',\n);\n\n/** Disabled treatment shared by every variant. */\nconst disabledClasses = 'disabled:text-berget-button-disabled-fg disabled:shadow-none';\n\n/** Brand-specific classes applied *on top* of the upstream primitive.\n * (Exported for `anchorVariants` — keep in lockstep with the `Button` wrapper.) */\nexport function brandVariantClasses(variant?: CustomVariant): string {\n switch (variant) {\n case 'primary':\n return cn(\n // Flat tinted-glass fill; the alpha carries the state, so no shadow lift.\n 'bg-berget-button-primary-bg text-berget-button-primary-fg',\n 'hover:bg-berget-button-primary-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the primary fg token.\n 'hover:text-berget-button-primary-fg',\n 'active:bg-berget-button-primary-active',\n // Keep the resting (transparent) border on focus — the outline is the indicator.\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-primary-disabled-bg',\n );\n case 'destructive':\n return cn(\n 'bg-berget-button-destructive-bg text-berget-button-destructive-fg',\n 'hover:bg-berget-button-destructive-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the destructive fg token.\n 'hover:text-berget-button-destructive-hover-fg',\n 'active:bg-berget-button-destructive-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-destructive-disabled-bg',\n );\n case 'destructive-outline':\n // Muscaria-tinted outline: transparent fill, red border + red text;\n // hover adds a subtle red fill (10% in both colour schemes). Follows\n // the outline case's static-state shape, with token hues swapped.\n return cn(\n `\n border-berget-button-destructive-outline-border bg-transparent\n text-berget-button-destructive-outline-fg\n `,\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the destructive fg token.\n `\n hover:bg-berget-button-destructive-outline-hover\n hover:text-berget-button-destructive-outline-fg\n dark:hover:bg-berget-button-destructive-outline-hover\n `,\n `\n active:bg-transparent\n dark:active:bg-transparent\n `,\n // Keep the resting border on focus — the shared outline is the indicator.\n 'focus-visible:border-berget-button-destructive-outline-border',\n disabledClasses,\n 'disabled:border-berget-button-disabled-border disabled:bg-transparent',\n );\n case 'outline':\n return cn(\n // Transparent fill with a theme-foreground-derived border (25% of the\n // foreground). The state treatment is static: hover, press and\n // keyboard focus render identically to rest — only the shared focus\n // outline and the disabled treatment deviate.\n `\n border-berget-button-outline-border bg-transparent\n text-berget-button-outline-fg\n `,\n // Hover: slight brightening (hover bg token); the border and\n // foreground stay at rest. The dark:hover twin also neutralises\n // the primitive ghost's dark:hover:bg-muted/50. Pressed drops the\n // fill back to transparent (a pressed element is still hovered, so\n // an explicit active override is needed in both colour schemes).\n `\n hover:bg-berget-button-outline-hover\n dark:hover:bg-berget-button-outline-hover\n `,\n `\n active:bg-transparent\n dark:active:bg-transparent\n `,\n // Keep the resting border on focus — the shared outline is the indicator.\n 'focus-visible:border-berget-button-outline-border',\n disabledClasses,\n 'disabled:border-berget-button-disabled-border disabled:bg-transparent',\n );\n case 'ghost':\n // Transparent fill with foreground text; hover and press add subtle\n // theme-foreground-derived fills (10% / 5%). No border of its own —\n // the primitive's resting transparent border persists. The primitive\n // ghost variant's aria-expanded state (bg-muted + foreground text)\n // passes through for dropdown-trigger use.\n return cn(\n 'bg-transparent text-berget-button-ghost-fg',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which is the same value here but pinned\n // explicitly for parity with the other fg-token variants.\n 'hover:bg-berget-button-ghost-hover hover:text-berget-button-ghost-fg',\n // The dark:hover twin neutralises the primitive ghost's\n // dark:hover:bg-muted/50 so only the token fill applies.\n 'dark:hover:bg-berget-button-ghost-hover',\n `\n active:bg-berget-button-ghost-active\n dark:active:bg-berget-button-ghost-active\n `,\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-transparent',\n );\n case 'link':\n // Rendered without buttonVariants — needs its own sizing, focus ring and\n // disabled treatment (the primitive's fade is not legible on text links).\n return cn(\n `\n h-auto bg-transparent p-0 font-medium text-berget-button-link-fg\n underline-offset-4 shadow-none\n `,\n 'hover:bg-transparent hover:text-berget-button-link-hover-fg',\n // On press, return to the resting foreground (hover fg otherwise sticks).\n 'active:text-berget-button-link-fg',\n 'focus:bg-transparent',\n // Neutralise the primitive base's focus-visible:border-ring + ring-3,\n // which land on link too (the primitive merges its cva base under\n // every variant): the outline above is the only focus indicator.\n 'focus-visible:border-transparent focus-visible:ring-0',\n `\n focus-visible:rounded-berget-xs focus-visible:outline-2\n focus-visible:outline-offset-2\n focus-visible:outline-berget-button-focus-ring\n focus-visible:outline-solid\n `,\n 'disabled:text-berget-button-disabled-fg disabled:no-underline',\n 'disabled:cursor-not-allowed disabled:opacity-100',\n );\n\n case 'default':\n default:\n return cn(\n // Solid granite-800 fill with a granite-700 border on dark surfaces\n // (ink glass in light theme).\n `\n border-berget-button-default-border bg-berget-button-default-bg\n text-berget-button-default-fg\n `,\n 'hover:bg-berget-button-default-hover',\n 'active:bg-berget-button-default-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-default-disabled-bg',\n );\n }\n}\n\n/** Map custom variants to the closest upstream primitive variant. */\nexport function primitiveVariant(\n variant?: CustomVariant,\n): VariantProps<typeof buttonVariants>['variant'] {\n switch (variant) {\n case 'primary':\n case 'destructive':\n case 'destructive-outline':\n case 'outline':\n case 'ghost':\n return 'ghost';\n default:\n return variant;\n }\n}\n\nexport function Button({\n className,\n variant = 'default',\n size,\n asChild = false,\n width = 'default',\n type = 'button',\n ref,\n children,\n ...props\n}: ButtonProps) {\n const isIcon = typeof size === 'string' && size.startsWith('icon');\n const isLink = variant === 'link';\n\n const baseClass = cn(\n !isLink && buttonVariants({ variant: primitiveVariant(variant), size }),\n // Berget brand overrides — full-width buttons use the square radius;\n // everything else stays pill-shaped.\n !isLink && (width === 'full' ? 'rounded-berget-xs' : 'rounded-full'),\n // Em-based padding, inline = 2× block, so the ratio holds as the padding\n // scales down/up with smaller or larger button text. h-auto drops the\n // primitive's fixed h-* so the vertical paddings take effect.\n !isLink && !isIcon && 'h-auto px-[0.8em] py-[0.4em]',\n // Text ladder: size = typography scale; the em-based padding above\n // follows automatically, so no per-size paddings are needed. Only\n // default/lg/sm need overrides — xs keeps the primitive's text-xs.\n !isLink &&\n !isIcon &&\n (size === 'lg' ? 'text-lg' : size === 'sm' ? 'text-sm' : size === 'xs' ? '' : `text-base`),\n // Normal weight for every non-link variant — tailwind-merge strips the\n // primitive's font-medium (font-weight: var(--font-weight-medium)); the\n // link variant keeps medium via its own classes above.\n !isLink && 'font-normal',\n brandVariantClasses(variant),\n interactionClasses,\n !isLink && width === 'full' && 'w-full',\n isIcon &&\n `\n rounded-full\n shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]\n `,\n className,\n );\n\n const content = (\n <span className={cn('inline-flex items-center', !isIcon && 'gap-2')}>{children}</span>\n );\n\n return (\n <ButtonPrimitive\n className={baseClass}\n ref={ref}\n render={asChildRender(asChild, children)}\n type={type}\n {...props}\n >\n {asChild ? undefined : content}\n </ButtonPrimitive>\n );\n}\n\nexport { buttonVariants };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,MAAa,qBAAqBA,cAAAA,GAGhC;;;KAKA;;;KAMA,0CACF;;AAGA,MAAM,kBAAkB;;;AAIxB,SAAgB,oBAAoB,SAAiC;CACnE,QAAQ,SAAR;EACE,KAAK,WACH,OAAOA,cAAAA,GAEL,6DACA,wCAGA,uCACA,0CAEA,oCACA,iBACA,+CACF;EACF,KAAK,eACH,OAAOA,cAAAA,GACL,qEACA,4CAGA,iDACA,8CACA,oCACA,iBACA,mDACF;EACF,KAAK,uBAIH,OAAOA,cAAAA,GACL;;;WAMA;;;;WAKA;;;WAKA,iEACA,iBACA,uEACF;EACF,KAAK,WACH,OAAOA,cAAAA,GAKL;;;WASA;;;WAIA;;;WAKA,qDACA,iBACA,uEACF;EACF,KAAK,SAMH,OAAOA,cAAAA,GACL,8CAIA,wEAGA,2CACA;;;WAIA,oCACA,iBACA,yBACF;EACF,KAAK,QAGH,OAAOA,cAAAA,GACL;;;WAIA,+DAEA,qCACA,wBAIA,yDACA;;;;;WAMA,iEACA,kDACF;EAGF,SACE,OAAOA,cAAAA,GAGL;;;WAIA,wCACA,0CACA,oCACA,iBACA,+CACF;CACJ;AACF;;AAGA,SAAgB,iBACd,SACgD;CAChD,QAAQ,SAAR;EACE,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK;EACL,KAAK,SACH,OAAO;EACT,SACE,OAAO;CACX;AACF;AAEA,SAAgB,OAAO,EACrB,WACA,UAAU,WACV,MACA,UAAU,OACV,QAAQ,WACR,OAAO,UACP,KACA,UACA,GAAG,SACW;CACd,MAAM,SAAS,OAAO,SAAS,YAAY,KAAK,WAAW,MAAM;CACjE,MAAM,SAAS,YAAY;CAE3B,MAAM,YAAYA,cAAAA,GAChB,CAAC,UAAUC,eAAAA,eAAe;EAAE,SAAS,iBAAiB,OAAO;EAAG;CAAK,CAAC,GAGtE,CAAC,WAAW,UAAU,SAAS,sBAAsB,iBAIrD,CAAC,UAAU,CAAC,UAAU,gCAItB,CAAC,UACC,CAAC,WACA,SAAS,OAAO,YAAY,SAAS,OAAO,YAAY,SAAS,OAAO,KAAK,cAIhF,CAAC,UAAU,eACX,oBAAoB,OAAO,GAC3B,oBACA,CAAC,UAAU,UAAU,UAAU,UAC/B,UACE;;;SAIF,SACF;CAEA,MAAM,UACJ,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;EAAM,WAAWD,cAAAA,GAAG,4BAA4B,CAAC,UAAU,OAAO;EAAI;CAAe,CAAA;CAGvF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACE,eAAAA,QAAD;EACE,WAAW;EACN;EACL,QAAQC,cAAAA,cAAc,SAAS,QAAQ;EACjC;EACN,GAAI;EAEH,UAAA,UAAU,KAAA,IAAY;CACR,CAAA;AAErB"}
1
+ {"version":3,"file":"Button.cjs","names":["cn","buttonVariants","ButtonPrimitive","asChildRender"],"sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Button as ButtonPrimitive, buttonVariants } from '../../primitives/button';\nimport type { VariantProps } from 'class-variance-authority';\n\n/** Variants exposed by the Berget wrapper. */\nexport type CustomVariant =\n | 'default'\n | 'primary'\n | 'destructive'\n | 'destructive-outline'\n | 'outline'\n | 'ghost'\n | 'link';\n\n/** Props for the Berget Button wrapper. */\nexport interface ButtonProps extends Omit<\n React.ComponentProps<typeof ButtonPrimitive>,\n 'variant' | 'ref'\n> {\n /** Visual style variant. `primary` is Berget-specific. */\n variant?: CustomVariant;\n /** Full width or auto width. */\n width?: 'default' | 'full';\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n ref?: React.Ref<HTMLButtonElement>;\n}\n\n/**\n * Shared interaction chrome for every variant.\n *\n * The primitive already provides hover/focus/disabled plumbing via shadcn\n * tokens (`--primary`, `--muted`, `--ring`, …), which the shadcn bridge in\n * `styles/index.css` maps to brand values. These classes neutralise the bits\n * that don't fit the Berget system and apply the component-scoped\n * `--berget-button-*` state tokens:\n *\n * - Focus: always visible on keyboard focus (`focus-visible`), drawn as a\n * real CSS **outline** (2px, offset 2px) in `--berget-button-focus-ring`\n * (moss-300 dark / moss-600 light, ≥3:1 against the surface per\n * WCAG 2.4.7) — not a ring/box-shadow hugging the edge, and the control's\n * own border keeps its resting colour.\n * - Disabled: replaces the primitive's flat `opacity-50` fade with explicit\n * muted tokens so every variant stays legible (≥3:1, and disabled UI is\n * exempt from AA text contrast per WCAG 1.4.3).\n *\n * `dark:` is intentionally absent — it tracks `prefers-color-scheme`, not the\n * Berget theme. Theme switching is driven entirely by the semantic tokens.\n */\n/** Shared interaction chrome for every variant.\n * (Exported for `anchorVariants`, which replicates the wrapper chrome on\n * real `<a>` elements without dragging in button semantics.) */\nexport const interactionClasses = cn(\n // Outline-based focus indicator; neutralise the primitive's ring (the\n // ring colour class is left — harmless at width 0).\n `\n focus-visible:ring-0 focus-visible:outline-2 focus-visible:outline-offset-2\n focus-visible:outline-berget-button-focus-ring focus-visible:outline-solid\n `,\n // Neutralise the primitive's disabled fade; variants apply their own tokens.\n `\n disabled:pointer-events-none disabled:cursor-not-allowed\n disabled:opacity-100\n `,\n // No press movement: same compound selector as the primitive base's 1px\n // active translate so tailwind-merge strips it down to 0.\n 'active:not-aria-[haspopup]:translate-y-0',\n);\n\n/** Disabled treatment shared by every variant. */\nconst disabledClasses = 'disabled:text-berget-button-disabled-fg disabled:shadow-none';\n\n/** Brand-specific classes applied *on top* of the upstream primitive.\n * (Exported for `anchorVariants` — keep in lockstep with the `Button` wrapper.) */\nexport function brandVariantClasses(variant?: CustomVariant): string {\n switch (variant) {\n case 'primary':\n return cn(\n // Flat tinted-glass fill; the alpha carries the state, so no shadow lift.\n 'bg-berget-button-primary-bg text-berget-button-primary-fg',\n 'hover:bg-berget-button-primary-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the primary fg token.\n 'hover:text-berget-button-primary-fg',\n 'active:bg-berget-button-primary-active',\n // Keep the resting (transparent) border on focus — the outline is the indicator.\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-primary-disabled-bg',\n );\n case 'destructive':\n return cn(\n 'bg-berget-button-destructive-bg text-berget-button-destructive-fg',\n 'hover:bg-berget-button-destructive-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the destructive fg token.\n 'hover:text-berget-button-destructive-hover-fg',\n 'active:bg-berget-button-destructive-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-destructive-disabled-bg',\n );\n case 'destructive-outline':\n // Muscaria-tinted outline: transparent fill, red border + red text;\n // hover adds a subtle red fill (10% in both colour schemes). Follows\n // the outline case's static-state shape, with token hues swapped.\n return cn(\n `\n border-berget-button-destructive-outline-border bg-transparent\n text-berget-button-destructive-outline-fg\n `,\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the destructive fg token.\n `\n hover:bg-berget-button-destructive-outline-hover\n hover:text-berget-button-destructive-outline-fg\n dark:hover:bg-berget-button-destructive-outline-hover\n `,\n `\n active:bg-transparent\n dark:active:bg-transparent\n `,\n // Keep the resting border on focus — the shared outline is the indicator.\n 'focus-visible:border-berget-button-destructive-outline-border',\n disabledClasses,\n 'disabled:border-berget-button-disabled-border disabled:bg-transparent',\n );\n case 'outline':\n return cn(\n // Transparent fill with a theme-foreground-derived border (25% of the\n // foreground). The state treatment is static: hover, press and\n // keyboard focus render identically to rest — only the shared focus\n // outline and the disabled treatment deviate.\n `\n border-berget-button-outline-border bg-transparent\n text-berget-button-outline-fg\n `,\n // Hover: slight brightening (hover bg token); the border and\n // foreground stay at rest. The dark:hover twin also neutralises\n // the primitive ghost's dark:hover:bg-muted/50. Pressed drops the\n // fill back to transparent (a pressed element is still hovered, so\n // an explicit active override is needed in both colour schemes).\n `\n hover:bg-berget-button-outline-hover\n dark:hover:bg-berget-button-outline-hover\n `,\n `\n active:bg-transparent\n dark:active:bg-transparent\n `,\n // Keep the resting border on focus — the shared outline is the indicator.\n 'focus-visible:border-berget-button-outline-border',\n disabledClasses,\n 'disabled:border-berget-button-disabled-border disabled:bg-transparent',\n );\n case 'ghost':\n // Transparent fill with foreground text; hover and press add subtle\n // theme-foreground-derived fills (10% / 5%). No border of its own —\n // the primitive's resting transparent border persists. The primitive\n // ghost variant's aria-expanded state (bg-muted + foreground text)\n // passes through for dropdown-trigger use.\n return cn(\n 'bg-transparent text-berget-button-ghost-fg',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which is the same value here but pinned\n // explicitly for parity with the other fg-token variants.\n 'hover:bg-berget-button-ghost-hover hover:text-berget-button-ghost-fg',\n // The dark:hover twin neutralises the primitive ghost's\n // dark:hover:bg-muted/50 so only the token fill applies.\n 'dark:hover:bg-berget-button-ghost-hover',\n `\n active:bg-berget-button-ghost-active\n dark:active:bg-berget-button-ghost-active\n `,\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-transparent',\n );\n case 'link':\n // Rendered without buttonVariants — needs its own sizing, focus ring and\n // disabled treatment (the primitive's fade is not legible on text links).\n return cn(\n `\n h-auto bg-transparent p-0 font-medium text-berget-button-link-fg\n underline-offset-4 shadow-none\n `,\n 'hover:bg-transparent hover:text-berget-button-link-hover-fg',\n // On press, return to the resting foreground (hover fg otherwise sticks).\n 'active:text-berget-button-link-fg',\n 'focus:bg-transparent',\n // Neutralise the primitive base's focus-visible:border-ring + ring-3,\n // which land on link too (the primitive merges its cva base under\n // every variant): the outline above is the only focus indicator.\n 'focus-visible:border-transparent focus-visible:ring-0',\n `\n focus-visible:rounded-berget-xs focus-visible:outline-2\n focus-visible:outline-offset-2\n focus-visible:outline-berget-button-focus-ring\n focus-visible:outline-solid\n `,\n 'disabled:text-berget-button-disabled-fg disabled:no-underline',\n 'disabled:cursor-not-allowed disabled:opacity-100',\n );\n\n case 'default':\n default:\n return cn(\n // Solid granite-800 fill with a granite-700 border on dark surfaces\n // (ink glass in light theme).\n `\n border-berget-button-default-border bg-berget-button-default-bg\n text-berget-button-default-fg\n `,\n 'hover:bg-berget-button-default-hover',\n 'active:bg-berget-button-default-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-default-disabled-bg',\n );\n }\n}\n\n/** Map custom variants to the closest upstream primitive variant. */\nexport function primitiveVariant(\n variant?: CustomVariant,\n): VariantProps<typeof buttonVariants>['variant'] {\n switch (variant) {\n case 'primary':\n case 'destructive':\n case 'destructive-outline':\n case 'outline':\n case 'ghost':\n return 'ghost';\n default:\n return variant;\n }\n}\n\nexport function Button({\n className,\n variant = 'default',\n size,\n asChild = false,\n width = 'default',\n type = 'button',\n ref,\n children,\n ...props\n}: ButtonProps) {\n const isIcon = typeof size === 'string' && size.startsWith('icon');\n const isLink = variant === 'link';\n\n const baseClass = cn(\n !isLink && buttonVariants({ variant: primitiveVariant(variant), size }),\n // Berget brand overrides — full-width buttons use the square radius;\n // everything else stays pill-shaped.\n !isLink && (width === 'full' ? 'rounded-berget-xs' : 'rounded-full'),\n // Em-based padding, inline = 2× block, so the ratio holds as the padding\n // scales down/up with smaller or larger button text. h-auto drops the\n // primitive's fixed h-* so the vertical paddings take effect.\n !isLink && !isIcon && 'h-auto px-[0.8em] py-[0.4em]',\n // Text ladder: size = typography scale; the em-based padding above\n // follows automatically, so no per-size paddings are needed. Only\n // default/lg/sm need overrides — xs keeps the primitive's text-xs.\n !isLink &&\n !isIcon &&\n (size === 'lg'\n ? 'text-lg'\n : size === 'sm'\n ? 'text-sm'\n : size === 'xs'\n ? ''\n : `\n text-base\n `),\n // Normal weight for every non-link variant — tailwind-merge strips the\n // primitive's font-medium (font-weight: var(--font-weight-medium)); the\n // link variant keeps medium via its own classes above.\n !isLink && 'font-normal',\n brandVariantClasses(variant),\n interactionClasses,\n !isLink && width === 'full' && 'w-full',\n isIcon &&\n `\n rounded-full\n shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]\n `,\n className,\n );\n\n const content = (\n <span className={cn('inline-flex items-center', !isIcon && 'gap-2')}>{children}</span>\n );\n\n return (\n <ButtonPrimitive\n className={baseClass}\n ref={ref}\n render={asChildRender(asChild, children)}\n type={type}\n {...props}\n >\n {asChild ? undefined : content}\n </ButtonPrimitive>\n );\n}\n\nexport { buttonVariants };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,MAAa,qBAAqBA,cAAAA,GAGhC;;;KAKA;;;KAMA,0CACF;;AAGA,MAAM,kBAAkB;;;AAIxB,SAAgB,oBAAoB,SAAiC;CACnE,QAAQ,SAAR;EACE,KAAK,WACH,OAAOA,cAAAA,GAEL,6DACA,wCAGA,uCACA,0CAEA,oCACA,iBACA,+CACF;EACF,KAAK,eACH,OAAOA,cAAAA,GACL,qEACA,4CAGA,iDACA,8CACA,oCACA,iBACA,mDACF;EACF,KAAK,uBAIH,OAAOA,cAAAA,GACL;;;WAMA;;;;WAKA;;;WAKA,iEACA,iBACA,uEACF;EACF,KAAK,WACH,OAAOA,cAAAA,GAKL;;;WASA;;;WAIA;;;WAKA,qDACA,i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AAErB"}
@@ -10,7 +10,7 @@ export interface ButtonProps extends Omit<React.ComponentProps<typeof Button$1>,
10
10
  variant?: CustomVariant;
11
11
  /** Full width or auto width. */
12
12
  width?: 'default' | 'full';
13
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
13
+ /** Render as a different element/component by merging props onto the child. */
14
14
  asChild?: boolean;
15
15
  ref?: React.Ref<HTMLButtonElement>;
16
16
  }
@@ -10,7 +10,7 @@ export interface ButtonProps extends Omit<React.ComponentProps<typeof Button$1>,
10
10
  variant?: CustomVariant;
11
11
  /** Full width or auto width. */
12
12
  width?: 'default' | 'full';
13
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
13
+ /** Render as a different element/component by merging props onto the child. */
14
14
  asChild?: boolean;
15
15
  ref?: React.Ref<HTMLButtonElement>;
16
16
  }
@@ -99,7 +99,9 @@ function Button({ className, variant = "default", size, asChild = false, width =
99
99
  const baseClass = cn(!isLink && buttonVariants({
100
100
  variant: primitiveVariant(variant),
101
101
  size
102
- }), !isLink && (width === "full" ? "rounded-berget-xs" : "rounded-full"), !isLink && !isIcon && "h-auto px-[0.8em] py-[0.4em]", !isLink && !isIcon && (size === "lg" ? "text-lg" : size === "sm" ? "text-sm" : size === "xs" ? "" : `text-base`), !isLink && "font-normal", brandVariantClasses(variant), interactionClasses, !isLink && width === "full" && "w-full", isIcon && `
102
+ }), !isLink && (width === "full" ? "rounded-berget-xs" : "rounded-full"), !isLink && !isIcon && "h-auto px-[0.8em] py-[0.4em]", !isLink && !isIcon && (size === "lg" ? "text-lg" : size === "sm" ? "text-sm" : size === "xs" ? "" : `
103
+ text-base
104
+ `), !isLink && "font-normal", brandVariantClasses(variant), interactionClasses, !isLink && width === "full" && "w-full", isIcon && `
103
105
  rounded-full
104
106
  shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]
105
107
  `, className);
@@ -1 +1 @@
1
- {"version":3,"file":"Button.mjs","names":["ButtonPrimitive"],"sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Button as ButtonPrimitive, buttonVariants } from '../../primitives/button';\nimport type { VariantProps } from 'class-variance-authority';\n\n/** Variants exposed by the Berget wrapper. */\nexport type CustomVariant =\n | 'default'\n | 'primary'\n | 'destructive'\n | 'destructive-outline'\n | 'outline'\n | 'ghost'\n | 'link';\n\n/** Props for the Berget Button wrapper. */\nexport interface ButtonProps extends Omit<\n React.ComponentProps<typeof ButtonPrimitive>,\n 'variant' | 'ref'\n> {\n /** Visual style variant. `primary` is Berget-specific. */\n variant?: CustomVariant;\n /** Full width or auto width. */\n width?: 'default' | 'full';\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n ref?: React.Ref<HTMLButtonElement>;\n}\n\n/**\n * Shared interaction chrome for every variant.\n *\n * The primitive already provides hover/focus/disabled plumbing via shadcn\n * tokens (`--primary`, `--muted`, `--ring`, …), which the shadcn bridge in\n * `styles/index.css` maps to brand values. These classes neutralise the bits\n * that don't fit the Berget system and apply the component-scoped\n * `--berget-button-*` state tokens:\n *\n * - Focus: always visible on keyboard focus (`focus-visible`), drawn as a\n * real CSS **outline** (2px, offset 2px) in `--berget-button-focus-ring`\n * (moss-300 dark / moss-600 light, ≥3:1 against the surface per\n * WCAG 2.4.7) — not a ring/box-shadow hugging the edge, and the control's\n * own border keeps its resting colour.\n * - Disabled: replaces the primitive's flat `opacity-50` fade with explicit\n * muted tokens so every variant stays legible (≥3:1, and disabled UI is\n * exempt from AA text contrast per WCAG 1.4.3).\n *\n * `dark:` is intentionally absent — it tracks `prefers-color-scheme`, not the\n * Berget theme. Theme switching is driven entirely by the semantic tokens.\n */\n/** Shared interaction chrome for every variant.\n * (Exported for `anchorVariants`, which replicates the wrapper chrome on\n * real `<a>` elements without dragging in button semantics.) */\nexport const interactionClasses = cn(\n // Outline-based focus indicator; neutralise the primitive's ring (the\n // ring colour class is left — harmless at width 0).\n `\n focus-visible:ring-0 focus-visible:outline-2 focus-visible:outline-offset-2\n focus-visible:outline-berget-button-focus-ring focus-visible:outline-solid\n `,\n // Neutralise the primitive's disabled fade; variants apply their own tokens.\n `\n disabled:pointer-events-none disabled:cursor-not-allowed\n disabled:opacity-100\n `,\n // No press movement: same compound selector as the primitive base's 1px\n // active translate so tailwind-merge strips it down to 0.\n 'active:not-aria-[haspopup]:translate-y-0',\n);\n\n/** Disabled treatment shared by every variant. */\nconst disabledClasses = 'disabled:text-berget-button-disabled-fg disabled:shadow-none';\n\n/** Brand-specific classes applied *on top* of the upstream primitive.\n * (Exported for `anchorVariants` — keep in lockstep with the `Button` wrapper.) */\nexport function brandVariantClasses(variant?: CustomVariant): string {\n switch (variant) {\n case 'primary':\n return cn(\n // Flat tinted-glass fill; the alpha carries the state, so no shadow lift.\n 'bg-berget-button-primary-bg text-berget-button-primary-fg',\n 'hover:bg-berget-button-primary-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the primary fg token.\n 'hover:text-berget-button-primary-fg',\n 'active:bg-berget-button-primary-active',\n // Keep the resting (transparent) border on focus — the outline is the indicator.\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-primary-disabled-bg',\n );\n case 'destructive':\n return cn(\n 'bg-berget-button-destructive-bg text-berget-button-destructive-fg',\n 'hover:bg-berget-button-destructive-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the destructive fg token.\n 'hover:text-berget-button-destructive-hover-fg',\n 'active:bg-berget-button-destructive-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-destructive-disabled-bg',\n );\n case 'destructive-outline':\n // Muscaria-tinted outline: transparent fill, red border + red text;\n // hover adds a subtle red fill (10% in both colour schemes). Follows\n // the outline case's static-state shape, with token hues swapped.\n return cn(\n `\n border-berget-button-destructive-outline-border bg-transparent\n text-berget-button-destructive-outline-fg\n `,\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the destructive fg token.\n `\n hover:bg-berget-button-destructive-outline-hover\n hover:text-berget-button-destructive-outline-fg\n dark:hover:bg-berget-button-destructive-outline-hover\n `,\n `\n active:bg-transparent\n dark:active:bg-transparent\n `,\n // Keep the resting border on focus — the shared outline is the indicator.\n 'focus-visible:border-berget-button-destructive-outline-border',\n disabledClasses,\n 'disabled:border-berget-button-disabled-border disabled:bg-transparent',\n );\n case 'outline':\n return cn(\n // Transparent fill with a theme-foreground-derived border (25% of the\n // foreground). The state treatment is static: hover, press and\n // keyboard focus render identically to rest — only the shared focus\n // outline and the disabled treatment deviate.\n `\n border-berget-button-outline-border bg-transparent\n text-berget-button-outline-fg\n `,\n // Hover: slight brightening (hover bg token); the border and\n // foreground stay at rest. The dark:hover twin also neutralises\n // the primitive ghost's dark:hover:bg-muted/50. Pressed drops the\n // fill back to transparent (a pressed element is still hovered, so\n // an explicit active override is needed in both colour schemes).\n `\n hover:bg-berget-button-outline-hover\n dark:hover:bg-berget-button-outline-hover\n `,\n `\n active:bg-transparent\n dark:active:bg-transparent\n `,\n // Keep the resting border on focus — the shared outline is the indicator.\n 'focus-visible:border-berget-button-outline-border',\n disabledClasses,\n 'disabled:border-berget-button-disabled-border disabled:bg-transparent',\n );\n case 'ghost':\n // Transparent fill with foreground text; hover and press add subtle\n // theme-foreground-derived fills (10% / 5%). No border of its own —\n // the primitive's resting transparent border persists. The primitive\n // ghost variant's aria-expanded state (bg-muted + foreground text)\n // passes through for dropdown-trigger use.\n return cn(\n 'bg-transparent text-berget-button-ghost-fg',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which is the same value here but pinned\n // explicitly for parity with the other fg-token variants.\n 'hover:bg-berget-button-ghost-hover hover:text-berget-button-ghost-fg',\n // The dark:hover twin neutralises the primitive ghost's\n // dark:hover:bg-muted/50 so only the token fill applies.\n 'dark:hover:bg-berget-button-ghost-hover',\n `\n active:bg-berget-button-ghost-active\n dark:active:bg-berget-button-ghost-active\n `,\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-transparent',\n );\n case 'link':\n // Rendered without buttonVariants — needs its own sizing, focus ring and\n // disabled treatment (the primitive's fade is not legible on text links).\n return cn(\n `\n h-auto bg-transparent p-0 font-medium text-berget-button-link-fg\n underline-offset-4 shadow-none\n `,\n 'hover:bg-transparent hover:text-berget-button-link-hover-fg',\n // On press, return to the resting foreground (hover fg otherwise sticks).\n 'active:text-berget-button-link-fg',\n 'focus:bg-transparent',\n // Neutralise the primitive base's focus-visible:border-ring + ring-3,\n // which land on link too (the primitive merges its cva base under\n // every variant): the outline above is the only focus indicator.\n 'focus-visible:border-transparent focus-visible:ring-0',\n `\n focus-visible:rounded-berget-xs focus-visible:outline-2\n focus-visible:outline-offset-2\n focus-visible:outline-berget-button-focus-ring\n focus-visible:outline-solid\n `,\n 'disabled:text-berget-button-disabled-fg disabled:no-underline',\n 'disabled:cursor-not-allowed disabled:opacity-100',\n );\n\n case 'default':\n default:\n return cn(\n // Solid granite-800 fill with a granite-700 border on dark surfaces\n // (ink glass in light theme).\n `\n border-berget-button-default-border bg-berget-button-default-bg\n text-berget-button-default-fg\n `,\n 'hover:bg-berget-button-default-hover',\n 'active:bg-berget-button-default-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-default-disabled-bg',\n );\n }\n}\n\n/** Map custom variants to the closest upstream primitive variant. */\nexport function primitiveVariant(\n variant?: CustomVariant,\n): VariantProps<typeof buttonVariants>['variant'] {\n switch (variant) {\n case 'primary':\n case 'destructive':\n case 'destructive-outline':\n case 'outline':\n case 'ghost':\n return 'ghost';\n default:\n return variant;\n }\n}\n\nexport function Button({\n className,\n variant = 'default',\n size,\n asChild = false,\n width = 'default',\n type = 'button',\n ref,\n children,\n ...props\n}: ButtonProps) {\n const isIcon = typeof size === 'string' && size.startsWith('icon');\n const isLink = variant === 'link';\n\n const baseClass = cn(\n !isLink && buttonVariants({ variant: primitiveVariant(variant), size }),\n // Berget brand overrides — full-width buttons use the square radius;\n // everything else stays pill-shaped.\n !isLink && (width === 'full' ? 'rounded-berget-xs' : 'rounded-full'),\n // Em-based padding, inline = 2× block, so the ratio holds as the padding\n // scales down/up with smaller or larger button text. h-auto drops the\n // primitive's fixed h-* so the vertical paddings take effect.\n !isLink && !isIcon && 'h-auto px-[0.8em] py-[0.4em]',\n // Text ladder: size = typography scale; the em-based padding above\n // follows automatically, so no per-size paddings are needed. Only\n // default/lg/sm need overrides — xs keeps the primitive's text-xs.\n !isLink &&\n !isIcon &&\n (size === 'lg' ? 'text-lg' : size === 'sm' ? 'text-sm' : size === 'xs' ? '' : `text-base`),\n // Normal weight for every non-link variant — tailwind-merge strips the\n // primitive's font-medium (font-weight: var(--font-weight-medium)); the\n // link variant keeps medium via its own classes above.\n !isLink && 'font-normal',\n brandVariantClasses(variant),\n interactionClasses,\n !isLink && width === 'full' && 'w-full',\n isIcon &&\n `\n rounded-full\n shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]\n `,\n className,\n );\n\n const content = (\n <span className={cn('inline-flex items-center', !isIcon && 'gap-2')}>{children}</span>\n );\n\n return (\n <ButtonPrimitive\n className={baseClass}\n ref={ref}\n render={asChildRender(asChild, children)}\n type={type}\n {...props}\n >\n {asChild ? undefined : content}\n </ButtonPrimitive>\n );\n}\n\nexport { buttonVariants };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,MAAa,qBAAqB,GAGhC;;;KAKA;;;KAMA,0CACF;;AAGA,MAAM,kBAAkB;;;AAIxB,SAAgB,oBAAoB,SAAiC;CACnE,QAAQ,SAAR;EACE,KAAK,WACH,OAAO,GAEL,6DACA,wCAGA,uCACA,0CAEA,oCACA,iBACA,+CACF;EACF,KAAK,eACH,OAAO,GACL,qEACA,4CAGA,iDACA,8CACA,oCACA,iBACA,mDACF;EACF,KAAK,uBAIH,OAAO,GACL;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"}
1
+ {"version":3,"file":"Button.mjs","names":["ButtonPrimitive"],"sources":["../../../src/components/button/Button.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Button as ButtonPrimitive, buttonVariants } from '../../primitives/button';\nimport type { VariantProps } from 'class-variance-authority';\n\n/** Variants exposed by the Berget wrapper. */\nexport type CustomVariant =\n | 'default'\n | 'primary'\n | 'destructive'\n | 'destructive-outline'\n | 'outline'\n | 'ghost'\n | 'link';\n\n/** Props for the Berget Button wrapper. */\nexport interface ButtonProps extends Omit<\n React.ComponentProps<typeof ButtonPrimitive>,\n 'variant' | 'ref'\n> {\n /** Visual style variant. `primary` is Berget-specific. */\n variant?: CustomVariant;\n /** Full width or auto width. */\n width?: 'default' | 'full';\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n ref?: React.Ref<HTMLButtonElement>;\n}\n\n/**\n * Shared interaction chrome for every variant.\n *\n * The primitive already provides hover/focus/disabled plumbing via shadcn\n * tokens (`--primary`, `--muted`, `--ring`, …), which the shadcn bridge in\n * `styles/index.css` maps to brand values. These classes neutralise the bits\n * that don't fit the Berget system and apply the component-scoped\n * `--berget-button-*` state tokens:\n *\n * - Focus: always visible on keyboard focus (`focus-visible`), drawn as a\n * real CSS **outline** (2px, offset 2px) in `--berget-button-focus-ring`\n * (moss-300 dark / moss-600 light, ≥3:1 against the surface per\n * WCAG 2.4.7) — not a ring/box-shadow hugging the edge, and the control's\n * own border keeps its resting colour.\n * - Disabled: replaces the primitive's flat `opacity-50` fade with explicit\n * muted tokens so every variant stays legible (≥3:1, and disabled UI is\n * exempt from AA text contrast per WCAG 1.4.3).\n *\n * `dark:` is intentionally absent — it tracks `prefers-color-scheme`, not the\n * Berget theme. Theme switching is driven entirely by the semantic tokens.\n */\n/** Shared interaction chrome for every variant.\n * (Exported for `anchorVariants`, which replicates the wrapper chrome on\n * real `<a>` elements without dragging in button semantics.) */\nexport const interactionClasses = cn(\n // Outline-based focus indicator; neutralise the primitive's ring (the\n // ring colour class is left — harmless at width 0).\n `\n focus-visible:ring-0 focus-visible:outline-2 focus-visible:outline-offset-2\n focus-visible:outline-berget-button-focus-ring focus-visible:outline-solid\n `,\n // Neutralise the primitive's disabled fade; variants apply their own tokens.\n `\n disabled:pointer-events-none disabled:cursor-not-allowed\n disabled:opacity-100\n `,\n // No press movement: same compound selector as the primitive base's 1px\n // active translate so tailwind-merge strips it down to 0.\n 'active:not-aria-[haspopup]:translate-y-0',\n);\n\n/** Disabled treatment shared by every variant. */\nconst disabledClasses = 'disabled:text-berget-button-disabled-fg disabled:shadow-none';\n\n/** Brand-specific classes applied *on top* of the upstream primitive.\n * (Exported for `anchorVariants` — keep in lockstep with the `Button` wrapper.) */\nexport function brandVariantClasses(variant?: CustomVariant): string {\n switch (variant) {\n case 'primary':\n return cn(\n // Flat tinted-glass fill; the alpha carries the state, so no shadow lift.\n 'bg-berget-button-primary-bg text-berget-button-primary-fg',\n 'hover:bg-berget-button-primary-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the primary fg token.\n 'hover:text-berget-button-primary-fg',\n 'active:bg-berget-button-primary-active',\n // Keep the resting (transparent) border on focus — the outline is the indicator.\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-primary-disabled-bg',\n );\n case 'destructive':\n return cn(\n 'bg-berget-button-destructive-bg text-berget-button-destructive-fg',\n 'hover:bg-berget-button-destructive-hover',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the destructive fg token.\n 'hover:text-berget-button-destructive-hover-fg',\n 'active:bg-berget-button-destructive-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-destructive-disabled-bg',\n );\n case 'destructive-outline':\n // Muscaria-tinted outline: transparent fill, red border + red text;\n // hover adds a subtle red fill (10% in both colour schemes). Follows\n // the outline case's static-state shape, with token hues swapped.\n return cn(\n `\n border-berget-button-destructive-outline-border bg-transparent\n text-berget-button-destructive-outline-fg\n `,\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which would override the destructive fg token.\n `\n hover:bg-berget-button-destructive-outline-hover\n hover:text-berget-button-destructive-outline-fg\n dark:hover:bg-berget-button-destructive-outline-hover\n `,\n `\n active:bg-transparent\n dark:active:bg-transparent\n `,\n // Keep the resting border on focus — the shared outline is the indicator.\n 'focus-visible:border-berget-button-destructive-outline-border',\n disabledClasses,\n 'disabled:border-berget-button-disabled-border disabled:bg-transparent',\n );\n case 'outline':\n return cn(\n // Transparent fill with a theme-foreground-derived border (25% of the\n // foreground). The state treatment is static: hover, press and\n // keyboard focus render identically to rest — only the shared focus\n // outline and the disabled treatment deviate.\n `\n border-berget-button-outline-border bg-transparent\n text-berget-button-outline-fg\n `,\n // Hover: slight brightening (hover bg token); the border and\n // foreground stay at rest. The dark:hover twin also neutralises\n // the primitive ghost's dark:hover:bg-muted/50. Pressed drops the\n // fill back to transparent (a pressed element is still hovered, so\n // an explicit active override is needed in both colour schemes).\n `\n hover:bg-berget-button-outline-hover\n dark:hover:bg-berget-button-outline-hover\n `,\n `\n active:bg-transparent\n dark:active:bg-transparent\n `,\n // Keep the resting border on focus — the shared outline is the indicator.\n 'focus-visible:border-berget-button-outline-border',\n disabledClasses,\n 'disabled:border-berget-button-disabled-border disabled:bg-transparent',\n );\n case 'ghost':\n // Transparent fill with foreground text; hover and press add subtle\n // theme-foreground-derived fills (10% / 5%). No border of its own —\n // the primitive's resting transparent border persists. The primitive\n // ghost variant's aria-expanded state (bg-muted + foreground text)\n // passes through for dropdown-trigger use.\n return cn(\n 'bg-transparent text-berget-button-ghost-fg',\n // Pin the foreground on hover — the underlying primitive ghost adds\n // hover:text-foreground, which is the same value here but pinned\n // explicitly for parity with the other fg-token variants.\n 'hover:bg-berget-button-ghost-hover hover:text-berget-button-ghost-fg',\n // The dark:hover twin neutralises the primitive ghost's\n // dark:hover:bg-muted/50 so only the token fill applies.\n 'dark:hover:bg-berget-button-ghost-hover',\n `\n active:bg-berget-button-ghost-active\n dark:active:bg-berget-button-ghost-active\n `,\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-transparent',\n );\n case 'link':\n // Rendered without buttonVariants — needs its own sizing, focus ring and\n // disabled treatment (the primitive's fade is not legible on text links).\n return cn(\n `\n h-auto bg-transparent p-0 font-medium text-berget-button-link-fg\n underline-offset-4 shadow-none\n `,\n 'hover:bg-transparent hover:text-berget-button-link-hover-fg',\n // On press, return to the resting foreground (hover fg otherwise sticks).\n 'active:text-berget-button-link-fg',\n 'focus:bg-transparent',\n // Neutralise the primitive base's focus-visible:border-ring + ring-3,\n // which land on link too (the primitive merges its cva base under\n // every variant): the outline above is the only focus indicator.\n 'focus-visible:border-transparent focus-visible:ring-0',\n `\n focus-visible:rounded-berget-xs focus-visible:outline-2\n focus-visible:outline-offset-2\n focus-visible:outline-berget-button-focus-ring\n focus-visible:outline-solid\n `,\n 'disabled:text-berget-button-disabled-fg disabled:no-underline',\n 'disabled:cursor-not-allowed disabled:opacity-100',\n );\n\n case 'default':\n default:\n return cn(\n // Solid granite-800 fill with a granite-700 border on dark surfaces\n // (ink glass in light theme).\n `\n border-berget-button-default-border bg-berget-button-default-bg\n text-berget-button-default-fg\n `,\n 'hover:bg-berget-button-default-hover',\n 'active:bg-berget-button-default-active',\n 'focus-visible:border-transparent',\n disabledClasses,\n 'disabled:bg-berget-button-default-disabled-bg',\n );\n }\n}\n\n/** Map custom variants to the closest upstream primitive variant. */\nexport function primitiveVariant(\n variant?: CustomVariant,\n): VariantProps<typeof buttonVariants>['variant'] {\n switch (variant) {\n case 'primary':\n case 'destructive':\n case 'destructive-outline':\n case 'outline':\n case 'ghost':\n return 'ghost';\n default:\n return variant;\n }\n}\n\nexport function Button({\n className,\n variant = 'default',\n size,\n asChild = false,\n width = 'default',\n type = 'button',\n ref,\n children,\n ...props\n}: ButtonProps) {\n const isIcon = typeof size === 'string' && size.startsWith('icon');\n const isLink = variant === 'link';\n\n const baseClass = cn(\n !isLink && buttonVariants({ variant: primitiveVariant(variant), size }),\n // Berget brand overrides — full-width buttons use the square radius;\n // everything else stays pill-shaped.\n !isLink && (width === 'full' ? 'rounded-berget-xs' : 'rounded-full'),\n // Em-based padding, inline = 2× block, so the ratio holds as the padding\n // scales down/up with smaller or larger button text. h-auto drops the\n // primitive's fixed h-* so the vertical paddings take effect.\n !isLink && !isIcon && 'h-auto px-[0.8em] py-[0.4em]',\n // Text ladder: size = typography scale; the em-based padding above\n // follows automatically, so no per-size paddings are needed. Only\n // default/lg/sm need overrides — xs keeps the primitive's text-xs.\n !isLink &&\n !isIcon &&\n (size === 'lg'\n ? 'text-lg'\n : size === 'sm'\n ? 'text-sm'\n : size === 'xs'\n ? ''\n : `\n text-base\n `),\n // Normal weight for every non-link variant — tailwind-merge strips the\n // primitive's font-medium (font-weight: var(--font-weight-medium)); the\n // link variant keeps medium via its own classes above.\n !isLink && 'font-normal',\n brandVariantClasses(variant),\n interactionClasses,\n !isLink && width === 'full' && 'w-full',\n isIcon &&\n `\n rounded-full\n shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]\n `,\n className,\n );\n\n const content = (\n <span className={cn('inline-flex items-center', !isIcon && 'gap-2')}>{children}</span>\n );\n\n return (\n <ButtonPrimitive\n className={baseClass}\n ref={ref}\n render={asChildRender(asChild, children)}\n type={type}\n {...props}\n >\n {asChild ? undefined : content}\n </ButtonPrimitive>\n );\n}\n\nexport { buttonVariants };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,MAAa,qBAAqB,GAGhC;;;KAKA;;;KAMA,0CACF;;AAGA,MAAM,kBAAkB;;;AAIxB,SAAgB,oBAAoB,SAAiC;CACnE,QAAQ,SAAR;EACE,KAAK,WACH,OAAO,GAEL,6DACA,wCAGA,uCACA,0CAEA,oCACA,iBACA,+CACF;EACF,KAAK,eACH,OAAO,GACL,qEACA,4CAGA,iD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AI;EAEH,UAAA,UAAU,KAAA,IAAY;CACR,CAAA;AAErB"}
@@ -1 +1 @@
1
- {"version":3,"file":"Container.cjs","names":["cva","React","useRender","mergeProps","cn"],"sources":["../../../src/components/container/Container.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst containerVariants = cva('mx-auto w-full', {\n variants: {\n size: {\n sm: 'max-w-3xl',\n md: 'max-w-5xl',\n lg: 'max-w-7xl',\n xl: 'max-w-7xl',\n full: 'max-w-full',\n },\n padding: {\n none: 'px-0',\n sm: `\n px-4\n sm:px-6\n `,\n md: `\n px-4\n sm:px-6\n lg:px-8\n `,\n lg: `\n px-4\n sm:px-8\n lg:px-12\n `,\n },\n },\n defaultVariants: {\n size: 'lg',\n padding: 'md',\n },\n});\n\nexport interface ContainerProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof containerVariants> {\n children?: React.ReactNode;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n ({ className, size, padding, asChild = false, children, ...props }, ref) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(containerVariants({ size, padding }), className),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nContainer.displayName = 'Container';\n\nexport { Container, containerVariants };\n"],"mappings":";;;;;;;;;AAQA,MAAM,qBAAA,GAAoBA,yBAAAA,IAAAA,CAAI,kBAAkB;CAC9C,UAAU;EACR,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,MAAM;EACR;EACA,SAAS;GACP,MAAM;GACN,IAAI;;;;GAIJ,IAAI;;;;;GAKJ,IAAI;;;;;EAKN;CACF;CACA,iBAAiB;EACf,MAAM;EACN,SAAS;CACX;AACF,CAAC;AASD,MAAM,YAAYC,MAAM,YACrB,EAAE,WAAW,MAAM,SAAS,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CAC1E,QAAA,GAAOC,0BAAAA,UAAAA,CAAU;EACf;EACA,gBAAgB;EAChB,QAAQ,UAAW,WAAkC,KAAA;EACrD,QAAA,GAAOC,2BAAAA,WAAAA,CACL;GACE,WAAWC,cAAAA,GAAG,kBAAkB;IAAE;IAAM;GAAQ,CAAC,GAAG,SAAS;GAC7D,UAAU,UAAU,KAAA,IAAY;EAClC,GACA,KACF;CACF,CAAC;AACH,CACF;AACA,UAAU,cAAc"}
1
+ {"version":3,"file":"Container.cjs","names":["cva","React","useRender","mergeProps","cn"],"sources":["../../../src/components/container/Container.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst containerVariants = cva('mx-auto w-full', {\n variants: {\n size: {\n sm: 'max-w-3xl',\n md: 'max-w-5xl',\n lg: 'max-w-7xl',\n xl: 'max-w-7xl',\n full: 'max-w-full',\n },\n padding: {\n none: 'px-0',\n sm: `\n px-4\n sm:px-6\n `,\n md: `\n px-4\n sm:px-6\n lg:px-8\n `,\n lg: `\n px-4\n sm:px-8\n lg:px-12\n `,\n },\n },\n defaultVariants: {\n size: 'lg',\n padding: 'md',\n },\n});\n\nexport interface ContainerProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof containerVariants> {\n children?: React.ReactNode;\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n}\n\nconst Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n ({ className, size, padding, asChild = false, children, ...props }, ref) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(containerVariants({ size, padding }), className),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nContainer.displayName = 'Container';\n\nexport { Container, containerVariants };\n"],"mappings":";;;;;;;;;AAQA,MAAM,qBAAA,GAAoBA,yBAAAA,IAAAA,CAAI,kBAAkB;CAC9C,UAAU;EACR,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,MAAM;EACR;EACA,SAAS;GACP,MAAM;GACN,IAAI;;;;GAIJ,IAAI;;;;;GAKJ,IAAI;;;;;EAKN;CACF;CACA,iBAAiB;EACf,MAAM;EACN,SAAS;CACX;AACF,CAAC;AASD,MAAM,YAAYC,MAAM,YACrB,EAAE,WAAW,MAAM,SAAS,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CAC1E,QAAA,GAAOC,0BAAAA,UAAAA,CAAU;EACf;EACA,gBAAgB;EAChB,QAAQ,UAAW,WAAkC,KAAA;EACrD,QAAA,GAAOC,2BAAAA,WAAAA,CACL;GACE,WAAWC,cAAAA,GAAG,kBAAkB;IAAE;IAAM;GAAQ,CAAC,GAAG,SAAS;GAC7D,UAAU,UAAU,KAAA,IAAY;EAClC,GACA,KACF;CACF,CAAC;AACH,CACF;AACA,UAAU,cAAc"}
@@ -8,7 +8,7 @@ declare const containerVariants: (props?: ({
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  export interface ContainerProps extends useRender.ComponentProps<'div'>, VariantProps<typeof containerVariants> {
10
10
  children?: React.ReactNode;
11
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
11
+ /** Render as a different element/component by merging props onto the child. */
12
12
  asChild?: boolean;
13
13
  }
14
14
  declare const Container: React.ForwardRefExoticComponent<Omit<ContainerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -8,7 +8,7 @@ declare const containerVariants: (props?: ({
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  export interface ContainerProps extends useRender.ComponentProps<'div'>, VariantProps<typeof containerVariants> {
10
10
  children?: React.ReactNode;
11
- /** Render as a different element/component. Replaces the Radix `asChild` prop. */
11
+ /** Render as a different element/component by merging props onto the child. */
12
12
  asChild?: boolean;
13
13
  }
14
14
  declare const Container: React.ForwardRefExoticComponent<Omit<ContainerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"Container.mjs","names":[],"sources":["../../../src/components/container/Container.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst containerVariants = cva('mx-auto w-full', {\n variants: {\n size: {\n sm: 'max-w-3xl',\n md: 'max-w-5xl',\n lg: 'max-w-7xl',\n xl: 'max-w-7xl',\n full: 'max-w-full',\n },\n padding: {\n none: 'px-0',\n sm: `\n px-4\n sm:px-6\n `,\n md: `\n px-4\n sm:px-6\n lg:px-8\n `,\n lg: `\n px-4\n sm:px-8\n lg:px-12\n `,\n },\n },\n defaultVariants: {\n size: 'lg',\n padding: 'md',\n },\n});\n\nexport interface ContainerProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof containerVariants> {\n children?: React.ReactNode;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n ({ className, size, padding, asChild = false, children, ...props }, ref) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(containerVariants({ size, padding }), className),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nContainer.displayName = 'Container';\n\nexport { Container, containerVariants };\n"],"mappings":";;;;;;;AAQA,MAAM,oBAAoB,IAAI,kBAAkB;CAC9C,UAAU;EACR,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,MAAM;EACR;EACA,SAAS;GACP,MAAM;GACN,IAAI;;;;GAIJ,IAAI;;;;;GAKJ,IAAI;;;;;EAKN;CACF;CACA,iBAAiB;EACf,MAAM;EACN,SAAS;CACX;AACF,CAAC;AASD,MAAM,YAAY,MAAM,YACrB,EAAE,WAAW,MAAM,SAAS,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CAC1E,OAAO,UAAU;EACf;EACA,gBAAgB;EAChB,QAAQ,UAAW,WAAkC,KAAA;EACrD,OAAO,WACL;GACE,WAAW,GAAG,kBAAkB;IAAE;IAAM;GAAQ,CAAC,GAAG,SAAS;GAC7D,UAAU,UAAU,KAAA,IAAY;EAClC,GACA,KACF;CACF,CAAC;AACH,CACF;AACA,UAAU,cAAc"}
1
+ {"version":3,"file":"Container.mjs","names":[],"sources":["../../../src/components/container/Container.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst containerVariants = cva('mx-auto w-full', {\n variants: {\n size: {\n sm: 'max-w-3xl',\n md: 'max-w-5xl',\n lg: 'max-w-7xl',\n xl: 'max-w-7xl',\n full: 'max-w-full',\n },\n padding: {\n none: 'px-0',\n sm: `\n px-4\n sm:px-6\n `,\n md: `\n px-4\n sm:px-6\n lg:px-8\n `,\n lg: `\n px-4\n sm:px-8\n lg:px-12\n `,\n },\n },\n defaultVariants: {\n size: 'lg',\n padding: 'md',\n },\n});\n\nexport interface ContainerProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof containerVariants> {\n children?: React.ReactNode;\n /** Render as a different element/component by merging props onto the child. */\n asChild?: boolean;\n}\n\nconst Container = React.forwardRef<HTMLDivElement, ContainerProps>(\n ({ className, size, padding, asChild = false, children, ...props }, ref) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(containerVariants({ size, padding }), className),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nContainer.displayName = 'Container';\n\nexport { Container, containerVariants };\n"],"mappings":";;;;;;;AAQA,MAAM,oBAAoB,IAAI,kBAAkB;CAC9C,UAAU;EACR,MAAM;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,IAAI;GACJ,MAAM;EACR;EACA,SAAS;GACP,MAAM;GACN,IAAI;;;;GAIJ,IAAI;;;;;GAKJ,IAAI;;;;;EAKN;CACF;CACA,iBAAiB;EACf,MAAM;EACN,SAAS;CACX;AACF,CAAC;AASD,MAAM,YAAY,MAAM,YACrB,EAAE,WAAW,MAAM,SAAS,UAAU,OAAO,UAAU,GAAG,SAAS,QAAQ;CAC1E,OAAO,UAAU;EACf;EACA,gBAAgB;EAChB,QAAQ,UAAW,WAAkC,KAAA;EACrD,OAAO,WACL;GACE,WAAW,GAAG,kBAAkB;IAAE;IAAM;GAAQ,CAAC,GAAG,SAAS;GAC7D,UAAU,UAAU,KAAA,IAAY;EAClC,GACA,KACF;CACF,CAAC;AACH,CACF;AACA,UAAU,cAAc"}
@@ -52,7 +52,7 @@ const CountrySelect = react.forwardRef(({ value, onValueChange, placeholder = "S
52
52
  ] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Icon.Icon, {
53
53
  icon: lucide_react.Globe,
54
54
  size: 16,
55
- className: "shrink-0 text-berget-muted-foreground"
55
+ className: "\n shrink-0 text-berget-muted-foreground\n "
56
56
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
57
57
  className: "truncate text-berget-muted-foreground",
58
58
  children: placeholder
@@ -65,7 +65,7 @@ const CountrySelect = react.forwardRef(({ value, onValueChange, placeholder = "S
65
65
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_popover.PopoverContent, {
66
66
  align,
67
67
  sideOffset,
68
- className: "w-(--radix-popover-trigger-width) p-0",
68
+ className: "\n w-(--trigger-width) p-0\n ",
69
69
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_command.Command, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_command.CommandInput, { placeholder: "Search country..." }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_command.CommandList, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_command.CommandEmpty, { children: "No countries found." }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_command.CommandGroup, { children: require_countries.COUNTRIES.map((country) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_command.CommandItem, {
70
70
  value: `${country.name} ${country.code}`,
71
71
  onSelect: () => {
@@ -1 +1 @@
1
- {"version":3,"file":"CountrySelect.cjs","names":["React","COUNTRIES","Popover","PopoverTrigger","cn","Icon","Globe","ChevronDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem"],"sources":["../../../src/components/country-select/CountrySelect.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChevronDown, Globe } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Icon } from '@/components/icon';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/primitives/popover';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/primitives/command';\nimport { type Country, COUNTRIES } from './countries';\n\nexport interface CountrySelectProps {\n value?: string | null;\n onValueChange?: (code: string) => void;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n align?: 'center' | 'start' | 'end';\n sideOffset?: number;\n}\n\nconst CountrySelect = React.forwardRef<React.ElementRef<'button'>, CountrySelectProps>(\n (\n {\n value,\n onValueChange,\n placeholder = 'Select country',\n disabled = false,\n className,\n align = 'center',\n sideOffset = 4,\n },\n ref,\n ) => {\n const [open, setOpen] = React.useState(false);\n const selectedCountry = React.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n ref={ref}\n render={\n <button\n type=\"button\"\n disabled={disabled}\n aria-expanded={open}\n className={cn(\n // Base layout — consistent with Select trigger\n 'flex w-full items-center justify-between',\n 'rounded-berget-xs border bg-card',\n 'px-4 py-3 text-sm',\n 'transition-colors duration-200',\n 'focus-visible:ring-0 focus-visible:outline-none',\n `\n focus-visible:border-berget-form-focus-border\n focus-visible:ring-offset-0\n `,\n 'disabled:cursor-not-allowed disabled:opacity-50',\n // Default border & hover matching Select variant \"default\"\n `\n border-berget-border-interactive\n hover:bg-berget-surface-hover\n `,\n className,\n )}\n />\n }\n >\n <div className=\"flex min-w-0 flex-1 items-center gap-2\">\n {selectedCountry ? (\n <>\n <span className=\"shrink-0 text-xl\">{selectedCountry.flag}</span>\n <span className=\"truncate\">{selectedCountry.name}</span>\n <span className=\"shrink-0 text-xs text-berget-muted-foreground\">\n ({selectedCountry.code})\n </span>\n </>\n ) : (\n <>\n <Icon icon={Globe} size={16} className=\"shrink-0 text-berget-muted-foreground\" />\n <span className=\"truncate text-berget-muted-foreground\">{placeholder}</span>\n </>\n )}\n </div>\n <Icon\n icon={ChevronDown}\n size={16}\n className={cn(\n 'shrink-0 text-berget-muted-foreground',\n 'transition-transform duration-200',\n open && 'rotate-180',\n )}\n />\n </PopoverTrigger>\n\n <PopoverContent\n align={align}\n sideOffset={sideOffset}\n className=\"w-(--radix-popover-trigger-width) p-0\"\n >\n <Command>\n <CommandInput placeholder=\"Search country...\" />\n <CommandList>\n <CommandEmpty>No countries found.</CommandEmpty>\n <CommandGroup>\n {COUNTRIES.map((country) => (\n <CommandItem\n key={country.code}\n value={`${country.name} ${country.code}`}\n onSelect={() => {\n onValueChange?.(country.code);\n setOpen(false);\n }}\n className={cn(\n 'flex items-center gap-3 px-3 py-2.5',\n `\n data-[selected='true']:bg-berget-brand-granite-700/40!\n data-[selected=true]:text-berget-foreground\n `,\n value === country.code && 'bg-berget-brand-granite-800/40',\n )}\n >\n <span className=\"shrink-0 text-xl\">{country.flag}</span>\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-sm\">{country.name}</div>\n <div className=\"text-xs text-berget-muted-foreground\">{country.code}</div>\n </div>\n {value === country.code && (\n <div\n className=\"\n size-2 shrink-0 rounded-full\n bg-berget-brand-granite-400\n \"\n />\n )}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n },\n);\n\nCountrySelect.displayName = 'CountrySelect';\n\nexport { CountrySelect };\nexport type { Country };\nexport {\n COUNTRIES,\n EU_COUNTRY_CODES,\n getCountryByCode,\n getCountryByName,\n isEUCountry,\n} from './countries';\n"],"mappings":";;;;;;;;;;;;AA4BA,MAAM,gBAAgBA,MAAM,YAExB,EACE,OACA,eACA,cAAc,kBACd,WAAW,OACX,WACA,QAAQ,UACR,aAAa,KAEf,QACG;CACH,MAAM,CAAC,MAAM,WAAWA,MAAM,SAAS,KAAK;CAC5C,MAAM,kBAAkBA,MAAM,cAAcC,kBAAAA,UAAU,MAAM,MAAM,EAAE,SAAS,KAAK,GAAG,CAAC,KAAK,CAAC;CAE5F,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,gBAAAA,SAAD;EAAe;EAAM,cAAc;EAAnC,UAAA,CACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,gBAAAA,gBAAD;GACO;GACL,QACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;IACE,MAAK;IACK;IACV,iBAAe;IACf,WAAWC,cAAAA,GAET,4CACA,oCACA,qBACA,kCACA,mDACA;;;mBAIA,mDAEA;;;mBAIA,SACF;GACD,CAAA;GA1BL,UAAA,CA6BE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD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AA,CAACC,gBAAAA,cAAD,EAAA,UACGZ,kBAAAA,UAAU,KAAK,YACd,iBAAA,GAAA,kBAAA,KAAA,CAACa,gBAAAA,aAAD;IAEE,OAAO,GAAG,QAAQ,KAAK,GAAG,QAAQ;IAClC,gBAAgB;KACd,gBAAgB,QAAQ,IAAI;KAC5B,QAAQ,KAAK;IACf;IACA,WAAWV,cAAAA,GACT,uCACA;;;yBAIA,UAAU,QAAQ,QAAQ,gCAC5B;IAdF,UAAA;KAgBE,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;MAAM,WAAU;MAAoB,UAAA,QAAQ;KAAW,CAAA;KACvD,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;MAAK,WAAU;MAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;OAAK,WAAU;OAAoB,UAAA,QAAQ;MAAU,CAAA,GACrD,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;OAAK,WAAU;OAAwC,UAAA,QAAQ;MAAU,CAAA,CACtE;;KACJ,UAAU,QAAQ,QACjB,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD,EACE,WAAU,4IAIX,CAAA;IAEQ;GA5BN,GAAA,QAAQ,IA4BF,CACd,EACW,CAAA,CACH,EAAA,CAAA,CACN,EAAA,CAAA;EACK,CAAA,CACT;;AAEb,CACF;AAEA,cAAc,cAAc"}
1
+ {"version":3,"file":"CountrySelect.cjs","names":["React","COUNTRIES","Popover","PopoverTrigger","cn","Icon","Globe","ChevronDown","PopoverContent","Command","CommandInput","CommandList","CommandEmpty","CommandGroup","CommandItem"],"sources":["../../../src/components/country-select/CountrySelect.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ChevronDown, Globe } from 'lucide-react';\n\nimport { cn } from '@/lib/utils';\nimport { Icon } from '@/components/icon';\nimport { Popover, PopoverContent, PopoverTrigger } from '@/primitives/popover';\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandInput,\n CommandItem,\n CommandList,\n} from '@/primitives/command';\nimport { type Country, COUNTRIES } from './countries';\n\nexport interface CountrySelectProps {\n value?: string | null;\n onValueChange?: (code: string) => void;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n align?: 'center' | 'start' | 'end';\n sideOffset?: number;\n}\n\nconst CountrySelect = React.forwardRef<React.ElementRef<'button'>, CountrySelectProps>(\n (\n {\n value,\n onValueChange,\n placeholder = 'Select country',\n disabled = false,\n className,\n align = 'center',\n sideOffset = 4,\n },\n ref,\n ) => {\n const [open, setOpen] = React.useState(false);\n const selectedCountry = React.useMemo(() => COUNTRIES.find((c) => c.code === value), [value]);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <PopoverTrigger\n ref={ref}\n render={\n <button\n type=\"button\"\n disabled={disabled}\n aria-expanded={open}\n className={cn(\n // Base layout — consistent with Select trigger\n 'flex w-full items-center justify-between',\n 'rounded-berget-xs border bg-card',\n 'px-4 py-3 text-sm',\n 'transition-colors duration-200',\n 'focus-visible:ring-0 focus-visible:outline-none',\n `\n focus-visible:border-berget-form-focus-border\n focus-visible:ring-offset-0\n `,\n 'disabled:cursor-not-allowed disabled:opacity-50',\n // Default border & hover matching Select variant \"default\"\n `\n border-berget-border-interactive\n hover:bg-berget-surface-hover\n `,\n className,\n )}\n />\n }\n >\n <div className=\"flex min-w-0 flex-1 items-center gap-2\">\n {selectedCountry ? (\n <>\n <span className=\"shrink-0 text-xl\">{selectedCountry.flag}</span>\n <span className=\"truncate\">{selectedCountry.name}</span>\n <span className=\"shrink-0 text-xs text-berget-muted-foreground\">\n ({selectedCountry.code})\n </span>\n </>\n ) : (\n <>\n <Icon\n icon={Globe}\n size={16}\n className=\"\n shrink-0 text-berget-muted-foreground\n \"\n />\n <span className=\"truncate text-berget-muted-foreground\">{placeholder}</span>\n </>\n )}\n </div>\n <Icon\n icon={ChevronDown}\n size={16}\n className={cn(\n 'shrink-0 text-berget-muted-foreground',\n 'transition-transform duration-200',\n open && 'rotate-180',\n )}\n />\n </PopoverTrigger>\n\n <PopoverContent\n align={align}\n sideOffset={sideOffset}\n className=\"\n w-(--trigger-width) p-0\n \"\n >\n <Command>\n <CommandInput placeholder=\"Search country...\" />\n <CommandList>\n <CommandEmpty>No countries found.</CommandEmpty>\n <CommandGroup>\n {COUNTRIES.map((country) => (\n <CommandItem\n key={country.code}\n value={`${country.name} ${country.code}`}\n onSelect={() => {\n onValueChange?.(country.code);\n setOpen(false);\n }}\n className={cn(\n 'flex items-center gap-3 px-3 py-2.5',\n `\n data-[selected='true']:bg-berget-brand-granite-700/40!\n data-[selected=true]:text-berget-foreground\n `,\n value === country.code && 'bg-berget-brand-granite-800/40',\n )}\n >\n <span className=\"shrink-0 text-xl\">{country.flag}</span>\n <div className=\"min-w-0 flex-1\">\n <div className=\"truncate text-sm\">{country.name}</div>\n <div className=\"text-xs text-berget-muted-foreground\">{country.code}</div>\n </div>\n {value === country.code && (\n <div\n className=\"\n size-2 shrink-0 rounded-full\n bg-berget-brand-granite-400\n \"\n />\n )}\n </CommandItem>\n ))}\n </CommandGroup>\n </CommandList>\n </Command>\n </PopoverContent>\n </Popover>\n );\n },\n);\n\nCountrySelect.displayName = 'CountrySelect';\n\nexport { CountrySelect };\nexport type { Country };\nexport {\n COUNTRIES,\n EU_COUNTRY_CODES,\n getCountryByCode,\n getCountryByName,\n isEUCountry,\n} from './countries';\n"],"mappings":";;;;;;;;;;;;AA4BA,MAAM,gBAAgBA,MAAM,YAExB,EACE,OACA,eACA,cAAc,kBACd,WAAW,OACX,WACA,QAAQ,UACR,aAAa,KAEf,QACG;CACH,MAAM,CAAC,MAAM,WAAWA,MAAM,SAAS,KAAK;CAC5C,MAAM,kBAAkBA,MAAM,cAAcC,kBAAAA,UAAU,MAAM,MAAM,EAAE,SAAS,KAAK,GAAG,CAAC,KAAK,CAAC;CAE5F,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACC,gBAAAA,SAAD;EAAe;EAAM,cAAc;EAAnC,UAAA,CACE,iBAA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