@bergetai/ui 0.16.0 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/dist/components/alert-dialog/AlertDialog.cjs +26 -5
  2. package/dist/components/alert-dialog/AlertDialog.cjs.map +1 -1
  3. package/dist/components/alert-dialog/AlertDialog.d.cts.map +1 -1
  4. package/dist/components/alert-dialog/AlertDialog.d.mts.map +1 -1
  5. package/dist/components/alert-dialog/AlertDialog.mjs +26 -5
  6. package/dist/components/alert-dialog/AlertDialog.mjs.map +1 -1
  7. package/dist/components/badge/Badge.cjs +12 -3
  8. package/dist/components/badge/Badge.cjs.map +1 -1
  9. package/dist/components/badge/Badge.d.cts.map +1 -1
  10. package/dist/components/badge/Badge.d.mts.map +1 -1
  11. package/dist/components/badge/Badge.mjs +12 -3
  12. package/dist/components/badge/Badge.mjs.map +1 -1
  13. package/dist/components/box/Box.cjs +3 -1
  14. package/dist/components/box/Box.cjs.map +1 -1
  15. package/dist/components/box/Box.mjs +3 -1
  16. package/dist/components/box/Box.mjs.map +1 -1
  17. package/dist/components/button/Button.cjs +40 -6
  18. package/dist/components/button/Button.cjs.map +1 -1
  19. package/dist/components/button/Button.d.cts.map +1 -1
  20. package/dist/components/button/Button.d.mts.map +1 -1
  21. package/dist/components/button/Button.mjs +40 -6
  22. package/dist/components/button/Button.mjs.map +1 -1
  23. package/dist/components/card/Card.cjs +2 -2
  24. package/dist/components/card/Card.cjs.map +1 -1
  25. package/dist/components/card/Card.mjs +2 -2
  26. package/dist/components/card/Card.mjs.map +1 -1
  27. package/dist/components/checkbox/Checkbox.cjs +28 -11
  28. package/dist/components/checkbox/Checkbox.cjs.map +1 -1
  29. package/dist/components/checkbox/Checkbox.d.cts.map +1 -1
  30. package/dist/components/checkbox/Checkbox.d.mts.map +1 -1
  31. package/dist/components/checkbox/Checkbox.mjs +28 -11
  32. package/dist/components/checkbox/Checkbox.mjs.map +1 -1
  33. package/dist/components/code-block/CodeBlock.cjs +10 -7
  34. package/dist/components/code-block/CodeBlock.cjs.map +1 -1
  35. package/dist/components/code-block/CodeBlock.mjs +10 -7
  36. package/dist/components/code-block/CodeBlock.mjs.map +1 -1
  37. package/dist/components/container/Container.cjs +16 -5
  38. package/dist/components/container/Container.cjs.map +1 -1
  39. package/dist/components/container/Container.d.cts.map +1 -1
  40. package/dist/components/container/Container.d.mts.map +1 -1
  41. package/dist/components/container/Container.mjs +16 -5
  42. package/dist/components/container/Container.mjs.map +1 -1
  43. package/dist/components/country-select/CountrySelect.cjs +22 -13
  44. package/dist/components/country-select/CountrySelect.cjs.map +1 -1
  45. package/dist/components/country-select/CountrySelect.mjs +22 -13
  46. package/dist/components/country-select/CountrySelect.mjs.map +1 -1
  47. package/dist/components/dialog/Dialog.cjs +23 -5
  48. package/dist/components/dialog/Dialog.cjs.map +1 -1
  49. package/dist/components/dialog/Dialog.d.cts.map +1 -1
  50. package/dist/components/dialog/Dialog.d.mts.map +1 -1
  51. package/dist/components/dialog/Dialog.mjs +23 -5
  52. package/dist/components/dialog/Dialog.mjs.map +1 -1
  53. package/dist/components/divider/Divider.cjs +5 -5
  54. package/dist/components/divider/Divider.cjs.map +1 -1
  55. package/dist/components/divider/Divider.mjs +5 -5
  56. package/dist/components/divider/Divider.mjs.map +1 -1
  57. package/dist/components/dropdown-menu/DropdownMenu.cjs +8 -2
  58. package/dist/components/dropdown-menu/DropdownMenu.cjs.map +1 -1
  59. package/dist/components/dropdown-menu/DropdownMenu.d.cts.map +1 -1
  60. package/dist/components/dropdown-menu/DropdownMenu.d.mts.map +1 -1
  61. package/dist/components/dropdown-menu/DropdownMenu.mjs +8 -2
  62. package/dist/components/dropdown-menu/DropdownMenu.mjs.map +1 -1
  63. package/dist/components/empty/Empty.cjs +4 -1
  64. package/dist/components/empty/Empty.cjs.map +1 -1
  65. package/dist/components/empty/Empty.d.cts.map +1 -1
  66. package/dist/components/empty/Empty.d.mts.map +1 -1
  67. package/dist/components/empty/Empty.mjs +4 -1
  68. package/dist/components/empty/Empty.mjs.map +1 -1
  69. package/dist/components/grid/Grid.cjs +11 -1
  70. package/dist/components/grid/Grid.cjs.map +1 -1
  71. package/dist/components/grid/Grid.mjs +11 -1
  72. package/dist/components/grid/Grid.mjs.map +1 -1
  73. package/dist/components/input-group/InputGroup.cjs +11 -2
  74. package/dist/components/input-group/InputGroup.cjs.map +1 -1
  75. package/dist/components/input-group/InputGroup.d.cts.map +1 -1
  76. package/dist/components/input-group/InputGroup.d.mts.map +1 -1
  77. package/dist/components/input-group/InputGroup.mjs +11 -2
  78. package/dist/components/input-group/InputGroup.mjs.map +1 -1
  79. package/dist/components/item/Item.cjs +4 -1
  80. package/dist/components/item/Item.cjs.map +1 -1
  81. package/dist/components/item/Item.d.cts.map +1 -1
  82. package/dist/components/item/Item.d.mts.map +1 -1
  83. package/dist/components/item/Item.mjs +4 -1
  84. package/dist/components/item/Item.mjs.map +1 -1
  85. package/dist/components/link/Link.cjs +32 -8
  86. package/dist/components/link/Link.cjs.map +1 -1
  87. package/dist/components/link/Link.d.cts.map +1 -1
  88. package/dist/components/link/Link.d.mts.map +1 -1
  89. package/dist/components/link/Link.mjs +32 -8
  90. package/dist/components/link/Link.mjs.map +1 -1
  91. package/dist/components/list/List.cjs +15 -6
  92. package/dist/components/list/List.cjs.map +1 -1
  93. package/dist/components/list/List.d.cts.map +1 -1
  94. package/dist/components/list/List.d.mts.map +1 -1
  95. package/dist/components/list/List.mjs +15 -6
  96. package/dist/components/list/List.mjs.map +1 -1
  97. package/dist/components/model-card/ModelCard.cjs +12 -9
  98. package/dist/components/model-card/ModelCard.cjs.map +1 -1
  99. package/dist/components/model-card/ModelCard.mjs +12 -9
  100. package/dist/components/model-card/ModelCard.mjs.map +1 -1
  101. package/dist/components/navigation-menu/NavigationMenu.cjs +43 -7
  102. package/dist/components/navigation-menu/NavigationMenu.cjs.map +1 -1
  103. package/dist/components/navigation-menu/NavigationMenu.d.cts.map +1 -1
  104. package/dist/components/navigation-menu/NavigationMenu.d.mts.map +1 -1
  105. package/dist/components/navigation-menu/NavigationMenu.mjs +43 -7
  106. package/dist/components/navigation-menu/NavigationMenu.mjs.map +1 -1
  107. package/dist/components/progress/Progress.cjs +4 -1
  108. package/dist/components/progress/Progress.cjs.map +1 -1
  109. package/dist/components/progress/Progress.mjs +4 -1
  110. package/dist/components/progress/Progress.mjs.map +1 -1
  111. package/dist/components/search-input/SearchInput.cjs +1 -1
  112. package/dist/components/search-input/SearchInput.cjs.map +1 -1
  113. package/dist/components/search-input/SearchInput.mjs +1 -1
  114. package/dist/components/search-input/SearchInput.mjs.map +1 -1
  115. package/dist/components/sidebar/Sidebar.cjs +15 -6
  116. package/dist/components/sidebar/Sidebar.cjs.map +1 -1
  117. package/dist/components/sidebar/Sidebar.d.cts.map +1 -1
  118. package/dist/components/sidebar/Sidebar.d.mts.map +1 -1
  119. package/dist/components/sidebar/Sidebar.mjs +15 -6
  120. package/dist/components/sidebar/Sidebar.mjs.map +1 -1
  121. package/dist/components/slider/Slider.cjs +8 -6
  122. package/dist/components/slider/Slider.cjs.map +1 -1
  123. package/dist/components/slider/Slider.d.cts +7 -5
  124. package/dist/components/slider/Slider.d.cts.map +1 -1
  125. package/dist/components/slider/Slider.d.mts +7 -5
  126. package/dist/components/slider/Slider.d.mts.map +1 -1
  127. package/dist/components/slider/Slider.mjs +8 -6
  128. package/dist/components/slider/Slider.mjs.map +1 -1
  129. package/dist/components/switch/Switch.cjs +42 -11
  130. package/dist/components/switch/Switch.cjs.map +1 -1
  131. package/dist/components/switch/Switch.d.cts.map +1 -1
  132. package/dist/components/switch/Switch.d.mts.map +1 -1
  133. package/dist/components/switch/Switch.mjs +42 -11
  134. package/dist/components/switch/Switch.mjs.map +1 -1
  135. package/dist/components/table/Table.cjs +22 -5
  136. package/dist/components/table/Table.cjs.map +1 -1
  137. package/dist/components/table/Table.d.cts.map +1 -1
  138. package/dist/components/table/Table.d.mts.map +1 -1
  139. package/dist/components/table/Table.mjs +22 -5
  140. package/dist/components/table/Table.mjs.map +1 -1
  141. package/dist/components/theme-provider/ThemeToggle.cjs +9 -3
  142. package/dist/components/theme-provider/ThemeToggle.cjs.map +1 -1
  143. package/dist/components/theme-provider/ThemeToggle.mjs +9 -3
  144. package/dist/components/theme-provider/ThemeToggle.mjs.map +1 -1
  145. package/dist/components/typography/Typography.cjs +19 -13
  146. package/dist/components/typography/Typography.cjs.map +1 -1
  147. package/dist/components/typography/Typography.d.cts.map +1 -1
  148. package/dist/components/typography/Typography.d.mts.map +1 -1
  149. package/dist/components/typography/Typography.mjs +19 -13
  150. package/dist/components/typography/Typography.mjs.map +1 -1
  151. package/dist/components/window-frame/WindowFrame.cjs +18 -8
  152. package/dist/components/window-frame/WindowFrame.cjs.map +1 -1
  153. package/dist/components/window-frame/WindowFrame.mjs +18 -8
  154. package/dist/components/window-frame/WindowFrame.mjs.map +1 -1
  155. package/package.json +1 -1
@@ -18,23 +18,41 @@ AlertDialogTrigger.displayName = "AlertDialogTrigger";
18
18
  const AlertDialogPortal = _base_ui_react_alert_dialog.AlertDialog.Portal;
19
19
  const AlertDialogOverlay = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_alert_dialog.AlertDialog.Backdrop, {
20
20
  ref,
21
- className: require_utils.cn("fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0", className),
21
+ className: require_utils.cn(`
22
+ fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity
23
+ duration-200
24
+ data-ending-style:opacity-0
25
+ data-starting-style:opacity-0
26
+ `, className),
22
27
  ...props
23
28
  }));
24
29
  AlertDialogOverlay.displayName = "AlertDialogOverlay";
25
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, {
26
31
  ref,
27
- className: require_utils.cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg transition-[opacity,transform] duration-200 data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95", className),
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
36
+ transition-[opacity,transform] duration-200
37
+ data-ending-style:scale-95 data-ending-style:opacity-0
38
+ data-starting-style:scale-95 data-starting-style:opacity-0
39
+ `, className),
28
40
  ...props
29
41
  })] }));
30
42
  AlertDialogContent.displayName = "AlertDialogContent";
31
43
  const AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
32
- className: require_utils.cn("flex flex-col gap-1.5 text-center sm:text-left", className),
44
+ className: require_utils.cn(`
45
+ flex flex-col gap-1.5 text-center
46
+ sm:text-left
47
+ `, className),
33
48
  ...props
34
49
  });
35
50
  AlertDialogHeader.displayName = "AlertDialogHeader";
36
51
  const AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
37
- className: require_utils.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
52
+ className: require_utils.cn(`
53
+ flex flex-col-reverse gap-2
54
+ sm:flex-row sm:justify-end
55
+ `, className),
38
56
  ...props
39
57
  });
40
58
  AlertDialogFooter.displayName = "AlertDialogFooter";
@@ -73,7 +91,10 @@ AlertDialogAction.displayName = "AlertDialogAction";
73
91
  /** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */
74
92
  const AlertDialogCancel = react.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_alert_dialog.AlertDialog.Close, {
75
93
  ref,
76
- className: require_utils.cn("mt-2 sm:mt-0", className),
94
+ className: require_utils.cn(`
95
+ mt-2
96
+ sm:mt-0
97
+ `, className),
77
98
  render: require_utils.asChildRender(asChild, children),
78
99
  ...props,
79
100
  children: asChild ? void 0 : children
@@ -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 'fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0',\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 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg transition-[opacity,transform] duration-200 data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95',\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-1.5 text-center sm:text-left', className)} {...props} />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}\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('mt-2 sm:mt-0', className)}\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,8IACA,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,kBAAA,IAAA,CAAC,oBAAD,CAAqB,CAAA,GACrB,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,WAAWG,cAAAA,GACT,gWACA,SACF;CACA,GAAI;AACL,CAAA,CACgB,EAAA,CAAA,CACpB;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;CAAK,WAAWA,cAAAA,GAAG,kDAAkD,SAAS;CAAG,GAAI;AAAQ,CAAA;AAE/F,kBAAkB,cAAc;AAEhC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;CACE,WAAWA,cAAAA,GAAG,0DAA0D,SAAS;CACjF,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,MAAM,mBAAmBF,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,QAAQ,iBAAA,GAAA,kBAAA,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,GAAG,gBAAgB,SAAS;CACvC,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. 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,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,kBAAA,IAAA,CAAC,oBAAD,CAAqB,CAAA,GACrB,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,WAAWG,cAAAA,GACT;;;;;;;WAQA,SACF;CACA,GAAI;AACL,CAAA,CACgB,EAAA,CAAA,CACpB;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;CACE,WAAWA,cAAAA,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;CACE,WAAWA,cAAAA,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,MAAM,mBAAmBF,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,QAAQ,iBAAA,GAAA,kBAAA,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 +1 @@
1
- {"version":3,"file":"AlertDialog.d.cts","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"mappings":";;;cAQMA,sBAAWC,YAAA;KAEZ,0BAA0B,KAAKA,YAAqB,QAAQ;EAC/D;;EAEA;;cAGI,oBAAkB,MAAA,0BAAA,KAAA,kCAAA,MAAA,cAAA;cASlB,mBAAiB,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cAEjB,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAEiD;YAUvE,MAAA,cAAA;cAGI,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAE8C;YAapE,MAAA,cAAA;cAGI;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAKlF;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAQlF,kBAAgB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YASpE,MAAA,cAAA;cAGI,wBAAsB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YAS1E,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAWZ,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAWZ,MAAA,cAAA"}
1
+ {"version":3,"file":"AlertDialog.d.cts","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"mappings":";;;cAQMA,sBAAWC,YAAA;KAEZ,0BAA0B,KAAKA,YAAqB,QAAQ;EAC/D;;EAEA;;cAGI,oBAAkB,MAAA,0BAAA,KAAA,kCAAA,MAAA,cAAA;cASlB,mBAAiB,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cAEjB,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAEiD;YAevE,MAAA,cAAA;cAGI,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAE8C;YAoBpE,MAAA,cAAA;cAGI;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAclF;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAclF,kBAAgB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YASpE,MAAA,cAAA;cAGI,wBAAsB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YAS1E,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAWZ,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAiBZ,MAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"AlertDialog.d.mts","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"mappings":";;;cAQMA,sBAAWC,YAAA;KAEZ,0BAA0B,KAAKA,YAAqB,QAAQ;EAC/D;;EAEA;;cAGI,oBAAkB,MAAA,0BAAA,KAAA,kCAAA,MAAA,cAAA;cASlB,mBAAiB,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cAEjB,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAEiD;YAUvE,MAAA,cAAA;cAGI,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAE8C;YAapE,MAAA,cAAA;cAGI;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAKlF;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAQlF,kBAAgB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YASpE,MAAA,cAAA;cAGI,wBAAsB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YAS1E,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAWZ,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAWZ,MAAA,cAAA"}
1
+ {"version":3,"file":"AlertDialog.d.mts","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"mappings":";;;cAQMA,sBAAWC,YAAA;KAEZ,0BAA0B,KAAKA,YAAqB,QAAQ;EAC/D;;EAEA;;cAGI,oBAAkB,MAAA,0BAAA,KAAA,kCAAA,MAAA,cAAA;cASlB,mBAAiB,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cAEjB,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAEiD;YAevE,MAAA,cAAA;cAGI,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAE8C;YAoBpE,MAAA,cAAA;cAGI;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAclF;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAclF,kBAAgB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YASpE,MAAA,cAAA;cAGI,wBAAsB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YAS1E,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAWZ,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAiBZ,MAAA,cAAA"}
@@ -16,23 +16,41 @@ AlertDialogTrigger.displayName = "AlertDialogTrigger";
16
16
  const AlertDialogPortal = AlertDialog.Portal;
17
17
  const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialog.Backdrop, {
18
18
  ref,
19
- className: cn("fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0", className),
19
+ className: cn(`
20
+ fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity
21
+ duration-200
22
+ data-ending-style:opacity-0
23
+ data-starting-style:opacity-0
24
+ `, className),
20
25
  ...props
21
26
  }));
22
27
  AlertDialogOverlay.displayName = "AlertDialogOverlay";
23
28
  const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog.Popup, {
24
29
  ref,
25
- className: cn("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg transition-[opacity,transform] duration-200 data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95", className),
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
34
+ transition-[opacity,transform] duration-200
35
+ data-ending-style:scale-95 data-ending-style:opacity-0
36
+ data-starting-style:scale-95 data-starting-style:opacity-0
37
+ `, className),
26
38
  ...props
27
39
  })] }));
28
40
  AlertDialogContent.displayName = "AlertDialogContent";
29
41
  const AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
30
- className: cn("flex flex-col gap-1.5 text-center sm:text-left", className),
42
+ className: cn(`
43
+ flex flex-col gap-1.5 text-center
44
+ sm:text-left
45
+ `, className),
31
46
  ...props
32
47
  });
33
48
  AlertDialogHeader.displayName = "AlertDialogHeader";
34
49
  const AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
35
- className: cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end", className),
50
+ className: cn(`
51
+ flex flex-col-reverse gap-2
52
+ sm:flex-row sm:justify-end
53
+ `, className),
36
54
  ...props
37
55
  });
38
56
  AlertDialogFooter.displayName = "AlertDialogFooter";
@@ -71,7 +89,10 @@ AlertDialogAction.displayName = "AlertDialogAction";
71
89
  /** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */
72
90
  const AlertDialogCancel = React.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialog.Close, {
73
91
  ref,
74
- className: cn("mt-2 sm:mt-0", className),
92
+ className: cn(`
93
+ mt-2
94
+ sm:mt-0
95
+ `, className),
75
96
  render: asChildRender(asChild, children),
76
97
  ...props,
77
98
  children: asChild ? void 0 : children
@@ -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 'fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-[opacity] duration-200 data-starting-style:opacity-0 data-ending-style:opacity-0',\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 'fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-berget-dialog-bg border-berget-dialog-border rounded-berget-sm p-6 shadow-berget-lg transition-[opacity,transform] duration-200 data-starting-style:opacity-0 data-starting-style:scale-95 data-ending-style:opacity-0 data-ending-style:scale-95',\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-1.5 text-center sm:text-left', className)} {...props} />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn('flex flex-col-reverse gap-2 sm:flex-row sm:justify-end', className)}\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('mt-2 sm:mt-0', className)}\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,8IACA,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,gWACA,SACF;CACA,GAAI;AACL,CAAA,CACgB,EAAA,CAAA,CACpB;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAD;CAAK,WAAW,GAAG,kDAAkD,SAAS;CAAG,GAAI;AAAQ,CAAA;AAE/F,kBAAkB,cAAc;AAEhC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAD;CACE,WAAW,GAAG,0DAA0D,SAAS;CACjF,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,GAAG,gBAAgB,SAAS;CACvC,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. 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"}
@@ -5,7 +5,12 @@ let react = require("react");
5
5
  react = require_runtime.__toESM(react, 1);
6
6
  let react_jsx_runtime = require("react/jsx-runtime");
7
7
  //#region src/components/badge/Badge.tsx
8
- const badgeVariants = (0, require("class-variance-authority").cva)("inline-flex flex-shrink-0 items-center whitespace-nowrap rounded-[4px] py-[0.15rem] px-2 text-[0.65rem] font-semibold uppercase tracking-[0.05em] transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2", {
8
+ const badgeVariants = (0, require("class-variance-authority").cva)(`
9
+ inline-flex shrink-0 items-center rounded-[4px] px-2 py-[0.15rem]
10
+ text-[0.65rem] font-semibold tracking-[0.05em] whitespace-nowrap uppercase
11
+ transition-colors
12
+ focus:ring-1 focus:ring-ring focus:ring-offset-2 focus:outline-none
13
+ `, {
9
14
  variants: {
10
15
  variant: {
11
16
  default: "",
@@ -19,8 +24,12 @@ const badgeVariants = (0, require("class-variance-authority").cva)("inline-flex
19
24
  success: "bg-berget-badge-success-bg text-berget-badge-success-fg",
20
25
  warning: "bg-berget-badge-warning-bg text-berget-badge-warning-fg",
21
26
  error: "bg-berget-badge-error-bg text-berget-badge-error-fg",
22
- tagDefault: "bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg",
23
- tagActive: "bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg",
27
+ tagDefault: `
28
+ bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg
29
+ `,
30
+ tagActive: `
31
+ bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg
32
+ `,
24
33
  tagGhost: "bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg"
25
34
  },
26
35
  size: {
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.cjs","names":["cva","React","cn"],"sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst badgeVariants = cva(\n // Tinted status style: small uppercase label on a 15% brand tint.\n // `variant`/`size` are kept for API compatibility but no longer change\n // the appearance; `status` alone picks the tint.\n 'inline-flex flex-shrink-0 items-center whitespace-nowrap rounded-[4px] py-[0.15rem] px-2 text-[0.65rem] font-semibold uppercase tracking-[0.05em] transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2',\n {\n variants: {\n variant: {\n default: '',\n tag: '',\n semantic: '',\n },\n status: {\n default: 'bg-berget-badge-default-bg text-berget-badge-default-fg',\n active: 'bg-berget-badge-active-bg text-berget-badge-active-fg',\n info: 'bg-berget-badge-info-bg text-berget-badge-info-fg',\n success: 'bg-berget-badge-success-bg text-berget-badge-success-fg',\n warning: 'bg-berget-badge-warning-bg text-berget-badge-warning-fg',\n error: 'bg-berget-badge-error-bg text-berget-badge-error-fg',\n tagDefault: 'bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg',\n tagActive: 'bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg',\n tagGhost: 'bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg',\n },\n size: {\n sm: '',\n md: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n status: 'default',\n size: 'md',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {\n icon?: React.ReactNode;\n iconGap?: number;\n}\n\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n ({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {\n return (\n <div className={cn(badgeVariants({ variant, status, size }), className)} ref={ref} {...props}>\n {icon && <div style={{ marginRight: children ? `${iconGap * 0.25}rem` : '0' }}>{icon}</div>}\n {children}\n </div>\n );\n },\n);\nBadge.displayName = 'Badge';\n\nexport { Badge, badgeVariants };\n"],"mappings":";;;;;;;AAMA,MAAM,iBAAA,G,kCAAgBA,CAAAA,CAAAA,IAAAA,CAIpB,2OACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,KAAK;GACL,UAAU;EACZ;EACA,QAAQ;GACN,SAAS;GACT,QAAQ;GACR,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACP,YAAY;GACZ,WAAW;GACX,UAAU;EACZ;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,QAAQ;EACR,MAAM;CACR;AACF,CACF;AAQA,MAAM,QAAQC,MAAM,YACjB,EAAE,WAAW,SAAS,QAAQ,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,QAAQ;CACpF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAWC,cAAAA,GAAG,cAAc;GAAE;GAAS;GAAQ;EAAK,CAAC,GAAG,SAAS;EAAQ;EAAK,GAAI;EAAvF,UAAA,CACG,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,OAAO,EAAE,aAAa,WAAW,GAAG,UAAU,IAAK,OAAO,IAAI;GAAI,UAAA;EAAU,CAAA,GACzF,QACE;;AAET,CACF;AACA,MAAM,cAAc"}
1
+ {"version":3,"file":"Badge.cjs","names":["cva","React","cn"],"sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst badgeVariants = cva(\n // Tinted status style: small uppercase label on a 15% brand tint.\n // `variant`/`size` are kept for API compatibility but no longer change\n // the appearance; `status` alone picks the tint.\n `\n inline-flex shrink-0 items-center rounded-[4px] px-2 py-[0.15rem]\n text-[0.65rem] font-semibold tracking-[0.05em] whitespace-nowrap uppercase\n transition-colors\n focus:ring-1 focus:ring-ring focus:ring-offset-2 focus:outline-none\n `,\n {\n variants: {\n variant: {\n default: '',\n tag: '',\n semantic: '',\n },\n status: {\n default: 'bg-berget-badge-default-bg text-berget-badge-default-fg',\n active: 'bg-berget-badge-active-bg text-berget-badge-active-fg',\n info: 'bg-berget-badge-info-bg text-berget-badge-info-fg',\n success: 'bg-berget-badge-success-bg text-berget-badge-success-fg',\n warning: 'bg-berget-badge-warning-bg text-berget-badge-warning-fg',\n error: 'bg-berget-badge-error-bg text-berget-badge-error-fg',\n tagDefault: `\n bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg\n `,\n tagActive: `\n bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg\n `,\n tagGhost: 'bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg',\n },\n size: {\n sm: '',\n md: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n status: 'default',\n size: 'md',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {\n icon?: React.ReactNode;\n iconGap?: number;\n}\n\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n ({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {\n return (\n <div className={cn(badgeVariants({ variant, status, size }), className)} ref={ref} {...props}>\n {icon && <div style={{ marginRight: children ? `${iconGap * 0.25}rem` : '0' }}>{icon}</div>}\n {children}\n </div>\n );\n },\n);\nBadge.displayName = 'Badge';\n\nexport { Badge, badgeVariants };\n"],"mappings":";;;;;;;AAMA,MAAM,iBAAA,G,kCAAgBA,CAAAA,CAAAA,IAAAA,CAIpB;;;;;KAMA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,KAAK;GACL,UAAU;EACZ;EACA,QAAQ;GACN,SAAS;GACT,QAAQ;GACR,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACP,YAAY;;;GAGZ,WAAW;;;GAGX,UAAU;EACZ;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,QAAQ;EACR,MAAM;CACR;AACF,CACF;AAQA,MAAM,QAAQC,MAAM,YACjB,EAAE,WAAW,SAAS,QAAQ,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,QAAQ;CACpF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAWC,cAAAA,GAAG,cAAc;GAAE;GAAS;GAAQ;EAAK,CAAC,GAAG,SAAS;EAAQ;EAAK,GAAI;EAAvF,UAAA,CACG,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,OAAO,EAAE,aAAa,WAAW,GAAG,UAAU,IAAK,OAAO,IAAI;GAAI,UAAA;EAAU,CAAA,GACzF,QACE;;AAET,CACF;AACA,MAAM,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.cts","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"mappings":";;;cAMM,gBAAa;;;;6CAkClB;iBAEgB,mBACP,MAAM,eAAe,iBAAiB,oBAAoB;EAClE,OAAO,MAAM;EACb;;cAGI,OAAK,MAAA,0BAAA,aAAA,MAAA,cAAA"}
1
+ {"version":3,"file":"Badge.d.cts","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"mappings":";;;cAMM,gBAAa;;;;6CA2ClB;iBAEgB,mBACP,MAAM,eAAe,iBAAiB,oBAAoB;EAClE,OAAO,MAAM;EACb;;cAGI,OAAK,MAAA,0BAAA,aAAA,MAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.mts","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"mappings":";;;cAMM,gBAAa;;;;6CAkClB;iBAEgB,mBACP,MAAM,eAAe,iBAAiB,oBAAoB;EAClE,OAAO,MAAM;EACb;;cAGI,OAAK,MAAA,0BAAA,aAAA,MAAA,cAAA"}
1
+ {"version":3,"file":"Badge.d.mts","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"mappings":";;;cAMM,gBAAa;;;;6CA2ClB;iBAEgB,mBACP,MAAM,eAAe,iBAAiB,oBAAoB;EAClE,OAAO,MAAM;EACb;;cAGI,OAAK,MAAA,0BAAA,aAAA,MAAA,cAAA"}
@@ -4,7 +4,12 @@ import * as React from "react";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { cva } from "class-variance-authority";
6
6
  //#region src/components/badge/Badge.tsx
7
- const badgeVariants = cva("inline-flex flex-shrink-0 items-center whitespace-nowrap rounded-[4px] py-[0.15rem] px-2 text-[0.65rem] font-semibold uppercase tracking-[0.05em] transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2", {
7
+ const badgeVariants = cva(`
8
+ inline-flex shrink-0 items-center rounded-[4px] px-2 py-[0.15rem]
9
+ text-[0.65rem] font-semibold tracking-[0.05em] whitespace-nowrap uppercase
10
+ transition-colors
11
+ focus:ring-1 focus:ring-ring focus:ring-offset-2 focus:outline-none
12
+ `, {
8
13
  variants: {
9
14
  variant: {
10
15
  default: "",
@@ -18,8 +23,12 @@ const badgeVariants = cva("inline-flex flex-shrink-0 items-center whitespace-now
18
23
  success: "bg-berget-badge-success-bg text-berget-badge-success-fg",
19
24
  warning: "bg-berget-badge-warning-bg text-berget-badge-warning-fg",
20
25
  error: "bg-berget-badge-error-bg text-berget-badge-error-fg",
21
- tagDefault: "bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg",
22
- tagActive: "bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg",
26
+ tagDefault: `
27
+ bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg
28
+ `,
29
+ tagActive: `
30
+ bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg
31
+ `,
23
32
  tagGhost: "bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg"
24
33
  },
25
34
  size: {
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.mjs","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst badgeVariants = cva(\n // Tinted status style: small uppercase label on a 15% brand tint.\n // `variant`/`size` are kept for API compatibility but no longer change\n // the appearance; `status` alone picks the tint.\n 'inline-flex flex-shrink-0 items-center whitespace-nowrap rounded-[4px] py-[0.15rem] px-2 text-[0.65rem] font-semibold uppercase tracking-[0.05em] transition-colors focus:outline-none focus:ring-1 focus:ring-ring focus:ring-offset-2',\n {\n variants: {\n variant: {\n default: '',\n tag: '',\n semantic: '',\n },\n status: {\n default: 'bg-berget-badge-default-bg text-berget-badge-default-fg',\n active: 'bg-berget-badge-active-bg text-berget-badge-active-fg',\n info: 'bg-berget-badge-info-bg text-berget-badge-info-fg',\n success: 'bg-berget-badge-success-bg text-berget-badge-success-fg',\n warning: 'bg-berget-badge-warning-bg text-berget-badge-warning-fg',\n error: 'bg-berget-badge-error-bg text-berget-badge-error-fg',\n tagDefault: 'bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg',\n tagActive: 'bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg',\n tagGhost: 'bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg',\n },\n size: {\n sm: '',\n md: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n status: 'default',\n size: 'md',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {\n icon?: React.ReactNode;\n iconGap?: number;\n}\n\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n ({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {\n return (\n <div className={cn(badgeVariants({ variant, status, size }), className)} ref={ref} {...props}>\n {icon && <div style={{ marginRight: children ? `${iconGap * 0.25}rem` : '0' }}>{icon}</div>}\n {children}\n </div>\n );\n },\n);\nBadge.displayName = 'Badge';\n\nexport { Badge, badgeVariants };\n"],"mappings":";;;;;;AAMA,MAAM,gBAAgB,IAIpB,2OACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,KAAK;GACL,UAAU;EACZ;EACA,QAAQ;GACN,SAAS;GACT,QAAQ;GACR,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACP,YAAY;GACZ,WAAW;GACX,UAAU;EACZ;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,QAAQ;EACR,MAAM;CACR;AACF,CACF;AAQA,MAAM,QAAQ,MAAM,YACjB,EAAE,WAAW,SAAS,QAAQ,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,QAAQ;CACpF,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,cAAc;GAAE;GAAS;GAAQ;EAAK,CAAC,GAAG,SAAS;EAAQ;EAAK,GAAI;EAAvF,UAAA,CACG,QAAQ,oBAAC,OAAD;GAAK,OAAO,EAAE,aAAa,WAAW,GAAG,UAAU,IAAK,OAAO,IAAI;GAAI,UAAA;EAAU,CAAA,GACzF,QACE;;AAET,CACF;AACA,MAAM,cAAc"}
1
+ {"version":3,"file":"Badge.mjs","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst badgeVariants = cva(\n // Tinted status style: small uppercase label on a 15% brand tint.\n // `variant`/`size` are kept for API compatibility but no longer change\n // the appearance; `status` alone picks the tint.\n `\n inline-flex shrink-0 items-center rounded-[4px] px-2 py-[0.15rem]\n text-[0.65rem] font-semibold tracking-[0.05em] whitespace-nowrap uppercase\n transition-colors\n focus:ring-1 focus:ring-ring focus:ring-offset-2 focus:outline-none\n `,\n {\n variants: {\n variant: {\n default: '',\n tag: '',\n semantic: '',\n },\n status: {\n default: 'bg-berget-badge-default-bg text-berget-badge-default-fg',\n active: 'bg-berget-badge-active-bg text-berget-badge-active-fg',\n info: 'bg-berget-badge-info-bg text-berget-badge-info-fg',\n success: 'bg-berget-badge-success-bg text-berget-badge-success-fg',\n warning: 'bg-berget-badge-warning-bg text-berget-badge-warning-fg',\n error: 'bg-berget-badge-error-bg text-berget-badge-error-fg',\n tagDefault: `\n bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg\n `,\n tagActive: `\n bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg\n `,\n tagGhost: 'bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg',\n },\n size: {\n sm: '',\n md: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n status: 'default',\n size: 'md',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {\n icon?: React.ReactNode;\n iconGap?: number;\n}\n\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n ({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {\n return (\n <div className={cn(badgeVariants({ variant, status, size }), className)} ref={ref} {...props}>\n {icon && <div style={{ marginRight: children ? `${iconGap * 0.25}rem` : '0' }}>{icon}</div>}\n {children}\n </div>\n );\n },\n);\nBadge.displayName = 'Badge';\n\nexport { Badge, badgeVariants };\n"],"mappings":";;;;;;AAMA,MAAM,gBAAgB,IAIpB;;;;;KAMA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,KAAK;GACL,UAAU;EACZ;EACA,QAAQ;GACN,SAAS;GACT,QAAQ;GACR,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACP,YAAY;;;GAGZ,WAAW;;;GAGX,UAAU;EACZ;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,QAAQ;EACR,MAAM;CACR;AACF,CACF;AAQA,MAAM,QAAQ,MAAM,YACjB,EAAE,WAAW,SAAS,QAAQ,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,QAAQ;CACpF,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,cAAc;GAAE;GAAS;GAAQ;EAAK,CAAC,GAAG,SAAS;EAAQ;EAAK,GAAI;EAAvF,UAAA,CACG,QAAQ,oBAAC,OAAD;GAAK,OAAO,EAAE,aAAa,WAAW,GAAG,UAAU,IAAK,OAAO,IAAI;GAAI,UAAA;EAAU,CAAA,GACzF,QACE;;AAET,CACF;AACA,MAAM,cAAc"}
@@ -54,7 +54,9 @@ const Box = react.forwardRef(({ className, direction, align, justify, wrap, gap,
54
54
  align,
55
55
  justify,
56
56
  wrap
57
- }), gap !== void 0 && `gap-${gap}`, className),
57
+ }), gap !== void 0 && `
58
+ gap-${gap}
59
+ `, className),
58
60
  children: asChild ? void 0 : children
59
61
  }, props)
60
62
  });
@@ -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 && `gap-${gap}`,\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,KAAa,OAAO,OAC5B,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. 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"}
@@ -52,7 +52,9 @@ const Box = React.forwardRef(({ className, direction, align, justify, wrap, gap,
52
52
  align,
53
53
  justify,
54
54
  wrap
55
- }), gap !== void 0 && `gap-${gap}`, className),
55
+ }), gap !== void 0 && `
56
+ gap-${gap}
57
+ `, className),
56
58
  children: asChild ? void 0 : children
57
59
  }, props)
58
60
  });
@@ -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 && `gap-${gap}`,\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,KAAa,OAAO,OAC5B,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. 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"}
@@ -24,7 +24,13 @@ let react_jsx_runtime = require("react/jsx-runtime");
24
24
  * `dark:` is intentionally absent — it tracks `prefers-color-scheme`, not the
25
25
  * Berget theme. Theme switching is driven entirely by the semantic tokens.
26
26
  */
27
- const interactionClasses = require_utils.cn("focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-berget-button-focus-ring focus-visible:ring-0", "disabled:pointer-events-none disabled:opacity-100 disabled:cursor-not-allowed", "active:not-aria-[haspopup]:translate-y-0");
27
+ const interactionClasses = require_utils.cn(`
28
+ focus-visible:ring-0 focus-visible:outline-2 focus-visible:outline-offset-2
29
+ focus-visible:outline-berget-button-focus-ring focus-visible:outline-solid
30
+ `, `
31
+ disabled:pointer-events-none disabled:cursor-not-allowed
32
+ disabled:opacity-100
33
+ `, "active:not-aria-[haspopup]:translate-y-0");
28
34
  /** Disabled treatment shared by every variant. */
29
35
  const disabledClasses = "disabled:text-berget-button-disabled-fg disabled:shadow-none";
30
36
  /** Brand-specific classes applied *on top* of the upstream primitive. */
@@ -32,10 +38,33 @@ function brandVariantClasses(variant) {
32
38
  switch (variant) {
33
39
  case "primary": return require_utils.cn("bg-berget-button-primary-bg text-berget-button-primary-fg", "hover:bg-berget-button-primary-hover", "hover:text-berget-button-primary-fg", "active:bg-berget-button-primary-active", "focus-visible:border-transparent", disabledClasses, "disabled:bg-berget-button-primary-disabled-bg");
34
40
  case "destructive": return require_utils.cn("bg-berget-button-destructive-bg text-berget-button-destructive-fg", "hover:bg-berget-button-destructive-hover", "hover:text-berget-button-destructive-hover-fg", "active:bg-berget-button-destructive-active", "focus-visible:border-transparent", disabledClasses, "disabled:bg-berget-button-destructive-disabled-bg");
35
- case "outline": return require_utils.cn("bg-transparent border-berget-button-outline-border text-berget-button-outline-fg", "hover:bg-berget-button-outline-hover dark:hover:bg-berget-button-outline-hover", "active:bg-transparent dark:active:bg-transparent", "focus-visible:border-berget-button-outline-border", disabledClasses, "disabled:bg-transparent disabled:border-berget-button-disabled-border");
36
- case "ghost": return require_utils.cn("bg-transparent text-berget-button-ghost-fg", "hover:bg-berget-button-ghost-hover hover:text-berget-button-ghost-fg", "dark:hover:bg-berget-button-ghost-hover", "active:bg-berget-button-ghost-active dark:active:bg-berget-button-ghost-active", "focus-visible:border-transparent", disabledClasses, "disabled:bg-transparent");
37
- case "link": return require_utils.cn("h-auto bg-transparent p-0 text-berget-button-link-fg font-medium underline-offset-4 shadow-none", "hover:bg-transparent hover:text-berget-button-link-hover-fg", "active:text-berget-button-link-fg", "focus:bg-transparent", "focus-visible:border-transparent focus-visible:ring-0", "focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-berget-button-focus-ring focus-visible:rounded-berget-xs", "disabled:text-berget-button-disabled-fg disabled:no-underline", "disabled:opacity-100 disabled:cursor-not-allowed");
38
- default: return require_utils.cn("bg-berget-button-default-bg border-berget-button-default-border text-berget-button-default-fg", "hover:bg-berget-button-default-hover", "active:bg-berget-button-default-active", "focus-visible:border-transparent", disabledClasses, "disabled:bg-berget-button-default-disabled-bg");
41
+ case "outline": return require_utils.cn(`
42
+ border-berget-button-outline-border bg-transparent
43
+ text-berget-button-outline-fg
44
+ `, `
45
+ hover:bg-berget-button-outline-hover
46
+ dark:hover:bg-berget-button-outline-hover
47
+ `, `
48
+ active:bg-transparent
49
+ dark:active:bg-transparent
50
+ `, "focus-visible:border-berget-button-outline-border", disabledClasses, "disabled:border-berget-button-disabled-border disabled:bg-transparent");
51
+ case "ghost": return require_utils.cn("bg-transparent text-berget-button-ghost-fg", "hover:bg-berget-button-ghost-hover hover:text-berget-button-ghost-fg", "dark:hover:bg-berget-button-ghost-hover", `
52
+ active:bg-berget-button-ghost-active
53
+ dark:active:bg-berget-button-ghost-active
54
+ `, "focus-visible:border-transparent", disabledClasses, "disabled:bg-transparent");
55
+ case "link": return require_utils.cn(`
56
+ h-auto bg-transparent p-0 font-medium text-berget-button-link-fg
57
+ underline-offset-4 shadow-none
58
+ `, "hover:bg-transparent hover:text-berget-button-link-hover-fg", "active:text-berget-button-link-fg", "focus:bg-transparent", "focus-visible:border-transparent focus-visible:ring-0", `
59
+ focus-visible:rounded-berget-xs focus-visible:outline-2
60
+ focus-visible:outline-offset-2
61
+ focus-visible:outline-berget-button-focus-ring
62
+ focus-visible:outline-solid
63
+ `, "disabled:text-berget-button-disabled-fg disabled:no-underline", "disabled:cursor-not-allowed disabled:opacity-100");
64
+ default: return require_utils.cn(`
65
+ border-berget-button-default-border bg-berget-button-default-bg
66
+ text-berget-button-default-fg
67
+ `, "hover:bg-berget-button-default-hover", "active:bg-berget-button-default-active", "focus-visible:border-transparent", disabledClasses, "disabled:bg-berget-button-default-disabled-bg");
39
68
  }
40
69
  }
41
70
  /** Map custom variants to the closest upstream primitive variant. */
@@ -54,7 +83,12 @@ function Button({ className, variant = "default", size, asChild = false, width =
54
83
  const baseClass = require_utils.cn(!isLink && require_button.buttonVariants({
55
84
  variant: primitiveVariant(variant),
56
85
  size
57
- }), !isLink && (width === "full" ? "rounded-berget-xs" : "rounded-full"), !isLink && !isIcon && "py-[0.57em] px-[1.14em] h-auto", !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 && "rounded-full shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]", className);
86
+ }), !isLink && (width === "full" ? "rounded-berget-xs" : "rounded-full"), !isLink && !isIcon && "h-auto px-[1.14em] py-[0.57em]", !isLink && !isIcon && (size === "lg" ? "text-lg" : size === "sm" ? "text-sm" : size === "xs" ? "" : `
87
+ text-base
88
+ `), !isLink && "font-normal", brandVariantClasses(variant), interactionClasses, !isLink && width === "full" && "w-full", isIcon && `
89
+ rounded-full
90
+ shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]
91
+ `, className);
58
92
  const content = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
59
93
  className: require_utils.cn("inline-flex items-center", !isIcon && "gap-2"),
60
94
  children
@@ -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. */\ntype CustomVariant = 'default' | 'primary' | 'destructive' | 'outline' | 'ghost' | '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 */\nconst interactionClasses = cn(\n // Outline-based focus indicator; neutralise the primitive's ring (the\n // ring colour class is left — harmless at width 0).\n 'focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-berget-button-focus-ring focus-visible:ring-0',\n // Neutralise the primitive's disabled fade; variants apply their own tokens.\n 'disabled:pointer-events-none disabled:opacity-100 disabled:cursor-not-allowed',\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. */\nfunction 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 '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 'bg-transparent border-berget-button-outline-border text-berget-button-outline-fg',\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 'hover:bg-berget-button-outline-hover dark:hover:bg-berget-button-outline-hover',\n 'active:bg-transparent dark:active:bg-transparent',\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:bg-transparent disabled:border-berget-button-disabled-border',\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 'active:bg-berget-button-ghost-active dark:active:bg-berget-button-ghost-active',\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 'h-auto bg-transparent p-0 text-berget-button-link-fg font-medium underline-offset-4 shadow-none',\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 'focus-visible:outline-solid focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-berget-button-focus-ring focus-visible:rounded-berget-xs',\n 'disabled:text-berget-button-disabled-fg disabled:no-underline',\n 'disabled:opacity-100 disabled:cursor-not-allowed',\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 'bg-berget-button-default-bg border-berget-button-default-border text-berget-button-default-fg',\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. */\nfunction primitiveVariant(variant?: CustomVariant): VariantProps<typeof buttonVariants>['variant'] {\n switch (variant) {\n case 'primary':\n case 'destructive':\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 — matches the 8px/16px spacing-scale\n // values at the default text-sm (14px) and scales down/up with smaller or\n // larger button text. h-auto drops the primitive's fixed h-* so the\n // vertical paddings take effect.\n !isLink && !isIcon && 'py-[0.57em] px-[1.14em] h-auto',\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 && 'rounded-full shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]',\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":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAM,qBAAqBA,cAAAA,GAGzB,0JAEA,iFAGA,0CACF;;AAGA,MAAM,kBAAkB;;AAGxB,SAAS,oBAAoB,SAAiC;CAC5D,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,WACH,OAAOA,cAAAA,GAKL,oFAMA,kFACA,oDAEA,qDACA,iBACA,uEACF;EACF,KAAK,SAMH,OAAOA,cAAAA,GACL,8CAIA,wEAGA,2CACA,kFACA,oCACA,iBACA,yBACF;EACF,KAAK,QAGH,OAAOA,cAAAA,GACL,mGACA,+DAEA,qCACA,wBAIA,yDACA,qKACA,iEACA,kDACF;EAGF,SACE,OAAOA,cAAAA,GAGL,iGACA,wCACA,0CACA,oCACA,iBACA,+CACF;CACJ;AACF;;AAGA,SAAS,iBAAiB,SAAyE;CACjG,QAAQ,SAAR;EACE,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,iBAKrD,CAAC,UAAU,CAAC,UAAU,kCAItB,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,UAAU,sFACV,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. */\ntype CustomVariant = 'default' | 'primary' | 'destructive' | 'outline' | 'ghost' | '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 */\nconst 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. */\nfunction 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 '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. */\nfunction primitiveVariant(variant?: CustomVariant): VariantProps<typeof buttonVariants>['variant'] {\n switch (variant) {\n case 'primary':\n case 'destructive':\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 — matches the 8px/16px spacing-scale\n // values at the default text-sm (14px) and scales down/up with smaller or\n // larger button text. h-auto drops the primitive's fixed h-* so the\n // vertical paddings take effect.\n !isLink && !isIcon && 'h-auto px-[1.14em] py-[0.57em]',\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":";;;;;;;;;;;;;;;;;;;;;;;;;;AA6CA,MAAM,qBAAqBA,cAAAA,GAGzB;;;KAKA;;;KAMA,0CACF;;AAGA,MAAM,kBAAkB;;AAGxB,SAAS,oBAAoB,SAAiC;CAC5D,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,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,SAAS,iBAAiB,SAAyE;CACjG,QAAQ,SAAR;EACE,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,iBAKrD,CAAC,UAAU,CAAC,UAAU,kCAItB,CAAC,UACC,CAAC,WACA,SAAS,OACN,YACA,SAAS,OACP,YACA,SAAS,OACP,KACA;;UAMV,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 +1 @@
1
- {"version":3,"file":"Button.d.cts","names":["ButtonPrimitive"],"sources":["../../../src/components/button/Button.tsx"],"mappings":";;;;KAQK;;iBAGY,oBAAoB,KACnC,MAAM,sBAAsBA;;EAI5B,UAAU;;EAEV;;EAEA;EACA,MAAM,MAAM,IAAI;;wBAwJF,SACd,WACA,SACA,MACA,SACA,OACA,MACA,KACA,aACG,SACF,0CAAW,IAAA"}
1
+ {"version":3,"file":"Button.d.cts","names":["ButtonPrimitive"],"sources":["../../../src/components/button/Button.tsx"],"mappings":";;;;KAQK;;iBAGY,oBAAoB,KACnC,MAAM,sBAAsBA;;EAI5B,UAAU;;EAEV;;EAEA;EACA,MAAM,MAAM,IAAI;;wBAqLF,SACd,WACA,SACA,MACA,SACA,OACA,MACA,KACA,aACG,SACF,0CAAW,IAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Button.d.mts","names":["ButtonPrimitive"],"sources":["../../../src/components/button/Button.tsx"],"mappings":";;;;KAQK;;iBAGY,oBAAoB,KACnC,MAAM,sBAAsBA;;EAI5B,UAAU;;EAEV;;EAEA;EACA,MAAM,MAAM,IAAI;;wBAwJF,SACd,WACA,SACA,MACA,SACA,OACA,MACA,KACA,aACG,SACF,0CAAW,IAAA"}
1
+ {"version":3,"file":"Button.d.mts","names":["ButtonPrimitive"],"sources":["../../../src/components/button/Button.tsx"],"mappings":";;;;KAQK;;iBAGY,oBAAoB,KACnC,MAAM,sBAAsBA;;EAI5B,UAAU;;EAEV;;EAEA;EACA,MAAM,MAAM,IAAI;;wBAqLF,SACd,WACA,SACA,MACA,SACA,OACA,MACA,KACA,aACG,SACF,0CAAW,IAAA"}