@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
@@ -21,7 +21,7 @@ const sizingSubButtonClasses = "data-[size=md]:text-base data-[size=sm]:text-bas
21
21
  * set in small uppercase type with wide tracking. */
22
22
  function SidebarGroupLabel({ className, ...props }) {
23
23
  return /* @__PURE__ */ jsx(SidebarGroupLabel$1, {
24
- className: cn("px-3 uppercase tracking-caption", className),
24
+ className: cn("px-3 tracking-caption uppercase", className),
25
25
  ...props
26
26
  });
27
27
  }
@@ -63,7 +63,10 @@ function SidebarGroup({ className, ...props }) {
63
63
  * group). */
64
64
  function SidebarFooter({ className, ...props }) {
65
65
  return /* @__PURE__ */ jsx(SidebarFooter$1, {
66
- className: cn("group-data-[collapsible=icon]:px-2.5 border-t border-berget-border", className),
66
+ className: cn(`
67
+ border-t border-berget-border
68
+ group-data-[collapsible=icon]:px-2.5
69
+ `, className),
67
70
  ...props
68
71
  });
69
72
  }
@@ -74,7 +77,10 @@ function SidebarFooter({ className, ...props }) {
74
77
  * against the full 60px rail width. */
75
78
  function SidebarHeader({ className, ...props }) {
76
79
  return /* @__PURE__ */ jsx(SidebarHeader$1, {
77
- className: cn("py-0 group-data-[collapsible=icon]:px-0 border-b border-berget-border", className),
80
+ className: cn(`
81
+ border-b border-berget-border py-0
82
+ group-data-[collapsible=icon]:px-0
83
+ `, className),
78
84
  ...props
79
85
  });
80
86
  }
@@ -111,9 +117,9 @@ function SidebarLogo() {
111
117
  children: [/* @__PURE__ */ jsx(BergetLogo, {
112
118
  variant: "logotype",
113
119
  size: 32,
114
- className: "shrink-0 transition-[opacity,visibility] duration-150 group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:invisible group-data-[collapsible=icon]:opacity-0"
120
+ className: "\n shrink-0 transition-[opacity,visibility] duration-150\n group-data-[collapsible=icon]:pointer-events-none\n group-data-[collapsible=icon]:invisible\n group-data-[collapsible=icon]:opacity-0\n "
115
121
  }), /* @__PURE__ */ jsx("span", {
116
- className: "pointer-events-none invisible absolute inset-y-0 left-0 flex w-15 items-center pl-5 opacity-0 transition-[padding-left,opacity,visibility] duration-200 ease-linear group-data-[collapsible=icon]:visible group-data-[collapsible=icon]:pl-3 group-data-[collapsible=icon]:opacity-100",
122
+ className: "\n pointer-events-none invisible absolute inset-y-0 left-0 flex w-15\n items-center pl-5 opacity-0\n transition-[padding-left,opacity,visibility] duration-200\n ease-linear\n group-data-[collapsible=icon]:visible\n group-data-[collapsible=icon]:pl-3\n group-data-[collapsible=icon]:opacity-100\n ",
117
123
  children: /* @__PURE__ */ jsx(BergetLogo, {
118
124
  variant: "symbol",
119
125
  size: 32
@@ -128,7 +134,10 @@ function SidebarLogo() {
128
134
  * square. Compose the SidebarTrigger and a title inside. */
129
135
  function SidebarPageHeader({ className, ...props }) {
130
136
  return /* @__PURE__ */ jsx("header", {
131
- className: cn("flex h-[calc(3.75rem+1px)] items-center gap-2 border-b border-berget-border px-4", className),
137
+ className: cn(`
138
+ flex h-[calc(3.75rem+1px)] items-center gap-2 border-b
139
+ border-berget-border px-4
140
+ `, className),
132
141
  ...props
133
142
  });
134
143
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Sidebar.mjs","names":["SidebarGroupLabelPrimitive","SidebarProviderPrimitive","SidebarInsetPrimitive","SidebarGroupPrimitive","SidebarFooterPrimitive","SidebarHeaderPrimitive","SidebarMenuButtonPrimitive","SidebarMenuSubButtonPrimitive"],"sources":["../../../src/components/sidebar/Sidebar.tsx"],"sourcesContent":["'use client';\n\n/**\n * Sidebar — thin proxy over the shadcn sidebar primitive.\n *\n * All brand styling flows through the design-token bridge in\n * `src/styles/index.css` (`bg-sidebar`, `sidebar-border`, … resolve to\n * `--berget-sidebar-*`). The primitive itself is unmodified upstream\n * shadcn output and must never be edited — Berget-specific composition\n * belongs here.\n *\n * Menu buttons, group/menu actions and badges resolve their hover/active\n * states via the --berget-sidebar-accent tokens (a neutral surface step),\n * not a class-level override.\n *\n * Compose per app:\n *\n * <SidebarProvider>\n * <Sidebar>\n * <SidebarHeader>…</SidebarHeader>\n * <SidebarContent>…</SidebarContent>\n * <SidebarFooter>…</SidebarFooter>\n * </Sidebar>\n * <SidebarInset>…main content…</SidebarInset>\n * </SidebarProvider>\n *\n * Toggle with <SidebarTrigger />, the <SidebarRail />, or ⌘/Ctrl+B.\n */\nimport * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { BergetLogo } from '../berget-logo';\nimport {\n SidebarFooter as SidebarFooterPrimitive,\n SidebarGroup as SidebarGroupPrimitive,\n SidebarHeader as SidebarHeaderPrimitive,\n SidebarGroupLabel as SidebarGroupLabelPrimitive,\n SidebarInset as SidebarInsetPrimitive,\n SidebarMenuButton as SidebarMenuButtonPrimitive,\n SidebarMenuSubButton as SidebarMenuSubButtonPrimitive,\n SidebarProvider as SidebarProviderPrimitive,\n} from '../../primitives/sidebar';\n\n/** Icon-mode buttons: 40px square tiles (16px glyph + px-3, height matches\n * the expanded bar so the 24px content line doesn't collapse). The overrides\n * win over the primitive's size-8!/p-2! — w-10!/h-10! are emitted after\n * size-8! in the stylesheet, so both dimensions follow the overrides. */\nconst iconModeButtonClasses =\n 'group-data-[collapsible=icon]:w-10! group-data-[collapsible=icon]:h-10! group-data-[collapsible=icon]:px-3!';\n\n/** Menu-button typography: text-base with true 8px (p-2) padding on all\n * sides. h-auto releases the primitive's fixed heights (h-8/h-7/h-12) —\n * otherwise vertical padding has no room. Collapsed icon mode keeps its\n * important size/padding overrides from the primitive. */\nconst sizingMenuButtonClasses = 'text-base px-3 py-2 h-auto';\nconst sizingSubButtonClasses = 'data-[size=md]:text-base data-[size=sm]:text-base px-3 py-2 h-auto';\n\n/** Group label, indented to line up with the menu-button icons\n * (group p-2 + label px-3 = same 20px as group p-2 + button px-3) and\n * set in small uppercase type with wide tracking. */\nfunction SidebarGroupLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarGroupLabelPrimitive>) {\n return (\n <SidebarGroupLabelPrimitive\n className={cn('px-3 uppercase tracking-caption', className)}\n {...props}\n />\n );\n}\n\n/** Provider with the Berget icon-rail width (60px = 10px gutters + 40px\n * buttons). Consumers can still override via `style`. */\nfunction SidebarProvider({\n className,\n style,\n ...props\n}: React.ComponentProps<typeof SidebarProviderPrimitive>) {\n return (\n <SidebarProviderPrimitive\n className={className}\n style={\n {\n '--sidebar-width-icon': '3.75rem',\n ...style,\n } as React.CSSProperties\n }\n {...props}\n />\n );\n}\n\n/** Inset with min-w-0 so the content column can shrink below its min-content\n * width. Without it (flex items default to min-width:auto), wide content — a\n * nowrap table, a code block — makes the inset refuse to yield space: the\n * sidebar's gap spacer collapses and the inset (and its sticky page header)\n * slides under the fixed sidebar, painting over it on scroll. A scroll\n * wrapper on the wide child alone is not sufficient — block-level\n * overflow-x-auto still propagates min-content up to the flex item.\n * Upstream shadcn-ui/ui#11370; no-op for pages that don't overflow. */\nfunction SidebarInset({ className, ...props }: React.ComponentProps<typeof SidebarInsetPrimitive>) {\n return <SidebarInsetPrimitive className={cn('min-w-0', className)} {...props} />;\n}\n\n/** Group with 10px horizontal gutters in icon mode (10 + 40 + 10 = 60px). */\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<typeof SidebarGroupPrimitive>) {\n return (\n <SidebarGroupPrimitive\n className={cn('group-data-[collapsible=icon]:px-2.5', className)}\n {...props}\n />\n );\n}\n\n/** Footer with a top border mirroring the sidebar header's bottom border, and\n * the same 10px icon-mode gutters as SidebarGroup (its menu sits outside a\n * group). */\nfunction SidebarFooter({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarFooterPrimitive>) {\n return (\n <SidebarFooterPrimitive\n className={cn(\n 'group-data-[collapsible=icon]:px-2.5 border-t border-berget-border',\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Header without the primitive's block padding (its p-2 becomes py-0) and\n * with a bottom border matching the default page-header border; vertical\n * rhythm is consumer-controlled (e.g. a h-20 brand bar). Horizontal padding\n * is dropped in icon mode so rail content (logo slots etc.) can center\n * against the full 60px rail width. */\nfunction SidebarHeader({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarHeaderPrimitive>) {\n return (\n <SidebarHeaderPrimitive\n className={cn(\n 'py-0 group-data-[collapsible=icon]:px-0 border-b border-berget-border',\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Berget brand slot for the sidebar header. Fades between the full logo\n * (expanded) and the symbol (collapsed icon rail).\n *\n * Implementation notes — all load-bearing:\n * - The symbol glides instead of popping: at pl-5 its box sits pixel-perfect\n * under the leading glyph of the full logo (both 35.5x32 at x=20), and its\n * padding-left animates to pl-3 (centered in the 60px rail) over 200ms\n * linear — exactly matching the sidebar width transition. The mark never\n * jumps: collapse fades the logotype out while the symbol glides into its\n * gliding position; expand reverses it.\n * - Both layers stay mounted: display isn't animatable, so unmounting the\n * symbol on expand would blink it off in one frame while the logotype is\n * still fading in. visibility+opacity handle hiding instead; visibility is\n * discretely animatable, deferring its flip until the fade completes,\n * and removing the hidden layer from the accessibility tree.\n * - The row is overflow-hidden and the logo shrink-0: when the rail narrows,\n * the fading full logo is clipped at the moving edge instead of being\n * squeezed (the SVG viewBox would otherwise scale it down).\n * - px-5 aligns the logo's left edge with the 20px content line of the\n * expanded sidebar (menu icons and group-label text both sit at 20px).\n * The fading full logo clips under the shrinking rail edge while fading.\n *\n * Renders its own SidebarHeader (px-0 — the row owns all horizontal padding,\n * so its position can't jump when the header's icon-mode padding lands).\n */\nfunction SidebarLogo() {\n return (\n <SidebarHeaderPrimitive className=\"px-0\">\n <div className=\"relative flex h-15 items-center overflow-hidden px-5\">\n <BergetLogo\n variant=\"logotype\"\n size={32}\n className=\"shrink-0 transition-[opacity,visibility] duration-150 group-data-[collapsible=icon]:pointer-events-none group-data-[collapsible=icon]:invisible group-data-[collapsible=icon]:opacity-0\"\n />\n <span className=\"pointer-events-none invisible absolute inset-y-0 left-0 flex w-15 items-center pl-5 opacity-0 transition-[padding-left,opacity,visibility] duration-200 ease-linear group-data-[collapsible=icon]:visible group-data-[collapsible=icon]:pl-3 group-data-[collapsible=icon]:opacity-100\">\n <BergetLogo variant=\"symbol\" size={32} />\n </span>\n </div>\n </SidebarHeaderPrimitive>\n );\n}\n\n/** Page header for use inside <SidebarInset>. Its height (60px content + 1px)\n * keeps the bottom border on the same line as the sidebar header's border —\n * both occupy the 60-61px row, making the collapsed brand cell a 60x60\n * square. Compose the SidebarTrigger and a title inside. */\nfunction SidebarPageHeader({ className, ...props }: React.ComponentProps<'header'>) {\n return (\n <header\n className={cn(\n 'flex h-[calc(3.75rem+1px)] items-center gap-2 border-b border-berget-border px-4',\n className,\n )}\n {...props}\n />\n );\n}\n\ntype SidebarMenuButtonProps = React.ComponentProps<typeof SidebarMenuButtonPrimitive>;\n\ntype SidebarMenuSubButtonProps = React.ComponentProps<typeof SidebarMenuSubButtonPrimitive>;\n\nfunction SidebarMenuButton({ className, ...props }: SidebarMenuButtonProps) {\n return (\n <SidebarMenuButtonPrimitive\n className={cn(sizingMenuButtonClasses, iconModeButtonClasses, className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubButton({ className, ...props }: SidebarMenuSubButtonProps) {\n return (\n <SidebarMenuSubButtonPrimitive\n className={cn(sizingSubButtonClasses, '[&>svg]:text-inherit', className)}\n {...props}\n />\n );\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarInput,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubItem,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from '../../primitives/sidebar';\n\nexport {\n SidebarFooter,\n SidebarGroup,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarLogo,\n SidebarMenuButton,\n SidebarMenuSubButton,\n SidebarPageHeader,\n SidebarProvider,\n};\n"],"mappings":";;;;;;;;;;;AA+CA,MAAM,wBACJ;;;;;AAMF,MAAM,0BAA0B;AAChC,MAAM,yBAAyB;;;;AAK/B,SAAS,kBAAkB,EACzB,WACA,GAAG,SACuD;CAC1D,OACE,oBAACA,qBAAD;EACE,WAAW,GAAG,mCAAmC,SAAS;EAC1D,GAAI;CACL,CAAA;AAEL;;;AAIA,SAAS,gBAAgB,EACvB,WACA,OACA,GAAG,SACqD;CACxD,OACE,oBAACC,mBAAD;EACa;EACX,OACE;GACE,wBAAwB;GACxB,GAAG;EACL;EAEF,GAAI;CACL,CAAA;AAEL;;;;;;;;;AAUA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA6D;CACjG,OAAO,oBAACC,gBAAD;EAAuB,WAAW,GAAG,WAAW,SAAS;EAAG,GAAI;CAAQ,CAAA;AACjF;;AAGA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA6D;CACjG,OACE,oBAACC,gBAAD;EACE,WAAW,GAAG,wCAAwC,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL;;;;AAKA,SAAS,cAAc,EACrB,WACA,GAAG,SACmD;CACtD,OACE,oBAACC,iBAAD;EACE,WAAW,GACT,sEACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;;;;;AAOA,SAAS,cAAc,EACrB,WACA,GAAG,SACmD;CACtD,OACE,oBAACC,iBAAD;EACE,WAAW,GACT,yEACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,cAAc;CACrB,OACE,oBAACA,iBAAD;EAAwB,WAAU;EAChC,UAAA,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,YAAD;IACE,SAAQ;IACR,MAAM;IACN,WAAU;GACX,CAAA,GACD,oBAAC,QAAD;IAAM,WAAU;IACd,UAAA,oBAAC,YAAD;KAAY,SAAQ;KAAS,MAAM;IAAK,CAAA;GACpC,CAAA,CACH;;CACiB,CAAA;AAE5B;;;;;AAMA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAyC;CAClF,OACE,oBAAC,UAAD;EACE,WAAW,GACT,oFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAMA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAiC;CAC1E,OACE,oBAACC,qBAAD;EACE,WAAW,GAAG,yBAAyB,uBAAuB,SAAS;EACvE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,qBAAqB,EAAE,WAAW,GAAG,SAAoC;CAChF,OACE,oBAACC,wBAAD;EACE,WAAW,GAAG,wBAAwB,wBAAwB,SAAS;EACvE,GAAI;CACL,CAAA;AAEL"}
1
+ {"version":3,"file":"Sidebar.mjs","names":["SidebarGroupLabelPrimitive","SidebarProviderPrimitive","SidebarInsetPrimitive","SidebarGroupPrimitive","SidebarFooterPrimitive","SidebarHeaderPrimitive","SidebarMenuButtonPrimitive","SidebarMenuSubButtonPrimitive"],"sources":["../../../src/components/sidebar/Sidebar.tsx"],"sourcesContent":["'use client';\n\n/**\n * Sidebar — thin proxy over the shadcn sidebar primitive.\n *\n * All brand styling flows through the design-token bridge in\n * `src/styles/index.css` (`bg-sidebar`, `sidebar-border`, … resolve to\n * `--berget-sidebar-*`). The primitive itself is unmodified upstream\n * shadcn output and must never be edited — Berget-specific composition\n * belongs here.\n *\n * Menu buttons, group/menu actions and badges resolve their hover/active\n * states via the --berget-sidebar-accent tokens (a neutral surface step),\n * not a class-level override.\n *\n * Compose per app:\n *\n * <SidebarProvider>\n * <Sidebar>\n * <SidebarHeader>…</SidebarHeader>\n * <SidebarContent>…</SidebarContent>\n * <SidebarFooter>…</SidebarFooter>\n * </Sidebar>\n * <SidebarInset>…main content…</SidebarInset>\n * </SidebarProvider>\n *\n * Toggle with <SidebarTrigger />, the <SidebarRail />, or ⌘/Ctrl+B.\n */\nimport * as React from 'react';\n\nimport { cn } from '../../lib/utils';\nimport { BergetLogo } from '../berget-logo';\nimport {\n SidebarFooter as SidebarFooterPrimitive,\n SidebarGroup as SidebarGroupPrimitive,\n SidebarHeader as SidebarHeaderPrimitive,\n SidebarGroupLabel as SidebarGroupLabelPrimitive,\n SidebarInset as SidebarInsetPrimitive,\n SidebarMenuButton as SidebarMenuButtonPrimitive,\n SidebarMenuSubButton as SidebarMenuSubButtonPrimitive,\n SidebarProvider as SidebarProviderPrimitive,\n} from '../../primitives/sidebar';\n\n/** Icon-mode buttons: 40px square tiles (16px glyph + px-3, height matches\n * the expanded bar so the 24px content line doesn't collapse). The overrides\n * win over the primitive's size-8!/p-2! — w-10!/h-10! are emitted after\n * size-8! in the stylesheet, so both dimensions follow the overrides. */\nconst iconModeButtonClasses =\n 'group-data-[collapsible=icon]:w-10! group-data-[collapsible=icon]:h-10! group-data-[collapsible=icon]:px-3!';\n\n/** Menu-button typography: text-base with true 8px (p-2) padding on all\n * sides. h-auto releases the primitive's fixed heights (h-8/h-7/h-12) —\n * otherwise vertical padding has no room. Collapsed icon mode keeps its\n * important size/padding overrides from the primitive. */\nconst sizingMenuButtonClasses = 'text-base px-3 py-2 h-auto';\nconst sizingSubButtonClasses = 'data-[size=md]:text-base data-[size=sm]:text-base px-3 py-2 h-auto';\n\n/** Group label, indented to line up with the menu-button icons\n * (group p-2 + label px-3 = same 20px as group p-2 + button px-3) and\n * set in small uppercase type with wide tracking. */\nfunction SidebarGroupLabel({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarGroupLabelPrimitive>) {\n return (\n <SidebarGroupLabelPrimitive\n className={cn('px-3 tracking-caption uppercase', className)}\n {...props}\n />\n );\n}\n\n/** Provider with the Berget icon-rail width (60px = 10px gutters + 40px\n * buttons). Consumers can still override via `style`. */\nfunction SidebarProvider({\n className,\n style,\n ...props\n}: React.ComponentProps<typeof SidebarProviderPrimitive>) {\n return (\n <SidebarProviderPrimitive\n className={className}\n style={\n {\n '--sidebar-width-icon': '3.75rem',\n ...style,\n } as React.CSSProperties\n }\n {...props}\n />\n );\n}\n\n/** Inset with min-w-0 so the content column can shrink below its min-content\n * width. Without it (flex items default to min-width:auto), wide content — a\n * nowrap table, a code block — makes the inset refuse to yield space: the\n * sidebar's gap spacer collapses and the inset (and its sticky page header)\n * slides under the fixed sidebar, painting over it on scroll. A scroll\n * wrapper on the wide child alone is not sufficient — block-level\n * overflow-x-auto still propagates min-content up to the flex item.\n * Upstream shadcn-ui/ui#11370; no-op for pages that don't overflow. */\nfunction SidebarInset({ className, ...props }: React.ComponentProps<typeof SidebarInsetPrimitive>) {\n return <SidebarInsetPrimitive className={cn('min-w-0', className)} {...props} />;\n}\n\n/** Group with 10px horizontal gutters in icon mode (10 + 40 + 10 = 60px). */\nfunction SidebarGroup({ className, ...props }: React.ComponentProps<typeof SidebarGroupPrimitive>) {\n return (\n <SidebarGroupPrimitive\n className={cn('group-data-[collapsible=icon]:px-2.5', className)}\n {...props}\n />\n );\n}\n\n/** Footer with a top border mirroring the sidebar header's bottom border, and\n * the same 10px icon-mode gutters as SidebarGroup (its menu sits outside a\n * group). */\nfunction SidebarFooter({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarFooterPrimitive>) {\n return (\n <SidebarFooterPrimitive\n className={cn(\n `\n border-t border-berget-border\n group-data-[collapsible=icon]:px-2.5\n `,\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Header without the primitive's block padding (its p-2 becomes py-0) and\n * with a bottom border matching the default page-header border; vertical\n * rhythm is consumer-controlled (e.g. a h-20 brand bar). Horizontal padding\n * is dropped in icon mode so rail content (logo slots etc.) can center\n * against the full 60px rail width. */\nfunction SidebarHeader({\n className,\n ...props\n}: React.ComponentProps<typeof SidebarHeaderPrimitive>) {\n return (\n <SidebarHeaderPrimitive\n className={cn(\n `\n border-b border-berget-border py-0\n group-data-[collapsible=icon]:px-0\n `,\n className,\n )}\n {...props}\n />\n );\n}\n\n/** Berget brand slot for the sidebar header. Fades between the full logo\n * (expanded) and the symbol (collapsed icon rail).\n *\n * Implementation notes — all load-bearing:\n * - The symbol glides instead of popping: at pl-5 its box sits pixel-perfect\n * under the leading glyph of the full logo (both 35.5x32 at x=20), and its\n * padding-left animates to pl-3 (centered in the 60px rail) over 200ms\n * linear — exactly matching the sidebar width transition. The mark never\n * jumps: collapse fades the logotype out while the symbol glides into its\n * gliding position; expand reverses it.\n * - Both layers stay mounted: display isn't animatable, so unmounting the\n * symbol on expand would blink it off in one frame while the logotype is\n * still fading in. visibility+opacity handle hiding instead; visibility is\n * discretely animatable, deferring its flip until the fade completes,\n * and removing the hidden layer from the accessibility tree.\n * - The row is overflow-hidden and the logo shrink-0: when the rail narrows,\n * the fading full logo is clipped at the moving edge instead of being\n * squeezed (the SVG viewBox would otherwise scale it down).\n * - px-5 aligns the logo's left edge with the 20px content line of the\n * expanded sidebar (menu icons and group-label text both sit at 20px).\n * The fading full logo clips under the shrinking rail edge while fading.\n *\n * Renders its own SidebarHeader (px-0 — the row owns all horizontal padding,\n * so its position can't jump when the header's icon-mode padding lands).\n */\nfunction SidebarLogo() {\n return (\n <SidebarHeaderPrimitive className=\"px-0\">\n <div className=\"relative flex h-15 items-center overflow-hidden px-5\">\n <BergetLogo\n variant=\"logotype\"\n size={32}\n className=\"\n shrink-0 transition-[opacity,visibility] duration-150\n group-data-[collapsible=icon]:pointer-events-none\n group-data-[collapsible=icon]:invisible\n group-data-[collapsible=icon]:opacity-0\n \"\n />\n <span\n className=\"\n pointer-events-none invisible absolute inset-y-0 left-0 flex w-15\n items-center pl-5 opacity-0\n transition-[padding-left,opacity,visibility] duration-200\n ease-linear\n group-data-[collapsible=icon]:visible\n group-data-[collapsible=icon]:pl-3\n group-data-[collapsible=icon]:opacity-100\n \"\n >\n <BergetLogo variant=\"symbol\" size={32} />\n </span>\n </div>\n </SidebarHeaderPrimitive>\n );\n}\n\n/** Page header for use inside <SidebarInset>. Its height (60px content + 1px)\n * keeps the bottom border on the same line as the sidebar header's border —\n * both occupy the 60-61px row, making the collapsed brand cell a 60x60\n * square. Compose the SidebarTrigger and a title inside. */\nfunction SidebarPageHeader({ className, ...props }: React.ComponentProps<'header'>) {\n return (\n <header\n className={cn(\n `\n flex h-[calc(3.75rem+1px)] items-center gap-2 border-b\n border-berget-border px-4\n `,\n className,\n )}\n {...props}\n />\n );\n}\n\ntype SidebarMenuButtonProps = React.ComponentProps<typeof SidebarMenuButtonPrimitive>;\n\ntype SidebarMenuSubButtonProps = React.ComponentProps<typeof SidebarMenuSubButtonPrimitive>;\n\nfunction SidebarMenuButton({ className, ...props }: SidebarMenuButtonProps) {\n return (\n <SidebarMenuButtonPrimitive\n className={cn(sizingMenuButtonClasses, iconModeButtonClasses, className)}\n {...props}\n />\n );\n}\n\nfunction SidebarMenuSubButton({ className, ...props }: SidebarMenuSubButtonProps) {\n return (\n <SidebarMenuSubButtonPrimitive\n className={cn(sizingSubButtonClasses, '[&>svg]:text-inherit', className)}\n {...props}\n />\n );\n}\n\nexport {\n Sidebar,\n SidebarContent,\n SidebarGroupAction,\n SidebarGroupContent,\n SidebarInput,\n SidebarMenu,\n SidebarMenuAction,\n SidebarMenuBadge,\n SidebarMenuItem,\n SidebarMenuSkeleton,\n SidebarMenuSub,\n SidebarMenuSubItem,\n SidebarRail,\n SidebarSeparator,\n SidebarTrigger,\n useSidebar,\n} from '../../primitives/sidebar';\n\nexport {\n SidebarFooter,\n SidebarGroup,\n SidebarGroupLabel,\n SidebarHeader,\n SidebarInset,\n SidebarLogo,\n SidebarMenuButton,\n SidebarMenuSubButton,\n SidebarPageHeader,\n SidebarProvider,\n};\n"],"mappings":";;;;;;;;;;;AA+CA,MAAM,wBACJ;;;;;AAMF,MAAM,0BAA0B;AAChC,MAAM,yBAAyB;;;;AAK/B,SAAS,kBAAkB,EACzB,WACA,GAAG,SACuD;CAC1D,OACE,oBAACA,qBAAD;EACE,WAAW,GAAG,mCAAmC,SAAS;EAC1D,GAAI;CACL,CAAA;AAEL;;;AAIA,SAAS,gBAAgB,EACvB,WACA,OACA,GAAG,SACqD;CACxD,OACE,oBAACC,mBAAD;EACa;EACX,OACE;GACE,wBAAwB;GACxB,GAAG;EACL;EAEF,GAAI;CACL,CAAA;AAEL;;;;;;;;;AAUA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA6D;CACjG,OAAO,oBAACC,gBAAD;EAAuB,WAAW,GAAG,WAAW,SAAS;EAAG,GAAI;CAAQ,CAAA;AACjF;;AAGA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA6D;CACjG,OACE,oBAACC,gBAAD;EACE,WAAW,GAAG,wCAAwC,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL;;;;AAKA,SAAS,cAAc,EACrB,WACA,GAAG,SACmD;CACtD,OACE,oBAACC,iBAAD;EACE,WAAW,GACT;;;WAIA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;;;;;AAOA,SAAS,cAAc,EACrB,WACA,GAAG,SACmD;CACtD,OACE,oBAACC,iBAAD;EACE,WAAW,GACT;;;WAIA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,cAAc;CACrB,OACE,oBAACA,iBAAD;EAAwB,WAAU;EAChC,UAAA,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,oBAAC,YAAD;IACE,SAAQ;IACR,MAAM;IACN,WAAU;GAMX,CAAA,GACD,oBAAC,QAAD;IACE,WAAU;IAUV,UAAA,oBAAC,YAAD;KAAY,SAAQ;KAAS,MAAM;IAAK,CAAA;GACpC,CAAA,CACH;;CACiB,CAAA;AAE5B;;;;;AAMA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAyC;CAClF,OACE,oBAAC,UAAD;EACE,WAAW,GACT;;;WAIA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAMA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAiC;CAC1E,OACE,oBAACC,qBAAD;EACE,WAAW,GAAG,yBAAyB,uBAAuB,SAAS;EACvE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,qBAAqB,EAAE,WAAW,GAAG,SAAoC;CAChF,OACE,oBAACC,wBAAD;EACE,WAAW,GAAG,wBAAwB,wBAAwB,SAAS;EACvE,GAAI;CACL,CAAA;AAEL"}
@@ -6,14 +6,16 @@ let react_jsx_runtime = require("react/jsx-runtime");
6
6
  /**
7
7
  * Berget wrapper for the base-nova Slider primitive.
8
8
  *
9
- * Track (bg-muted) and range indicator (bg-primary) resolve through the
10
- * shadcn bridge in `styles/index.css` to Berget surfaces and Moss. The only
11
- * override needed is the thumb fill: the primitive hardcodes `bg-white`,
12
- * which is a raw value that doesn't track the theme — here it uses Peak
13
- * (granite-50), matching the primary button foreground treatment.
9
+ * Overrides the primitive's hardcoded surfaces, which don't resolve in the
10
+ * Berget themes: the track's `bg-muted` equals the dark page background
11
+ * (both granite-950), so the track is invisible; the thumb hardcodes
12
+ * `bg-white`. The track uses Raised (foreground-mix 10%, theme-aware) —
13
+ * the same treatment as InputGroup/Checkbox surfaces — and the thumb uses
14
+ * Peak (granite-50), matching the primary button foreground treatment.
15
+ * The range indicator keeps the primitive's `bg-primary` (Moss).
14
16
  */
15
17
  const Slider = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_slider.Slider, {
16
- className: require_utils.cn("[&_[data-slot=slider-thumb]]:bg-berget-brand-granite-50", className),
18
+ className: require_utils.cn("**:data-[slot=slider-track]:bg-berget-surface-raised", "**:data-[slot=slider-thumb]:bg-berget-brand-granite-50", className),
17
19
  ...props
18
20
  });
19
21
  Slider.displayName = "Slider";
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.cjs","names":["SliderPrimitive","cn"],"sources":["../../../src/components/slider/Slider.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { Slider as SliderPrimitive } from '../../primitives/slider';\n\nexport type SliderProps = React.ComponentProps<typeof SliderPrimitive>;\n\n/**\n * Berget wrapper for the base-nova Slider primitive.\n *\n * Track (bg-muted) and range indicator (bg-primary) resolve through the\n * shadcn bridge in `styles/index.css` to Berget surfaces and Moss. The only\n * override needed is the thumb fill: the primitive hardcodes `bg-white`,\n * which is a raw value that doesn't track the theme — here it uses Peak\n * (granite-50), matching the primary button foreground treatment.\n */\nconst Slider = ({ className, ...props }: SliderProps) => (\n <SliderPrimitive\n className={cn('[&_[data-slot=slider-thumb]]:bg-berget-brand-granite-50', className)}\n {...props}\n />\n);\nSlider.displayName = 'Slider';\n\nexport { Slider };\n"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAM,UAAU,EAAE,WAAW,GAAG,YAC9B,iBAAA,GAAA,kBAAA,IAAA,CAACA,eAAAA,QAAD;CACE,WAAWC,cAAAA,GAAG,2DAA2D,SAAS;CAClF,GAAI;AACL,CAAA;AAEH,OAAO,cAAc"}
1
+ {"version":3,"file":"Slider.cjs","names":["SliderPrimitive","cn"],"sources":["../../../src/components/slider/Slider.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { Slider as SliderPrimitive } from '../../primitives/slider';\n\nexport type SliderProps = React.ComponentProps<typeof SliderPrimitive>;\n\n/**\n * Berget wrapper for the base-nova Slider primitive.\n *\n * Overrides the primitive's hardcoded surfaces, which don't resolve in the\n * Berget themes: the track's `bg-muted` equals the dark page background\n * (both granite-950), so the track is invisible; the thumb hardcodes\n * `bg-white`. The track uses Raised (foreground-mix 10%, theme-aware) —\n * the same treatment as InputGroup/Checkbox surfaces — and the thumb uses\n * Peak (granite-50), matching the primary button foreground treatment.\n * The range indicator keeps the primitive's `bg-primary` (Moss).\n */\nconst Slider = ({ className, ...props }: SliderProps) => (\n <SliderPrimitive\n className={cn(\n '**:data-[slot=slider-track]:bg-berget-surface-raised',\n '**:data-[slot=slider-thumb]:bg-berget-brand-granite-50',\n className,\n )}\n {...props}\n />\n);\nSlider.displayName = 'Slider';\n\nexport { Slider };\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,MAAM,UAAU,EAAE,WAAW,GAAG,YAC9B,iBAAA,GAAA,kBAAA,IAAA,CAACA,eAAAA,QAAD;CACE,WAAWC,cAAAA,GACT,wDACA,0DACA,SACF;CACA,GAAI;AACL,CAAA;AAEH,OAAO,cAAc"}
@@ -5,11 +5,13 @@ export type SliderProps = React.ComponentProps<typeof Slider$1>;
5
5
  /**
6
6
  * Berget wrapper for the base-nova Slider primitive.
7
7
  *
8
- * Track (bg-muted) and range indicator (bg-primary) resolve through the
9
- * shadcn bridge in `styles/index.css` to Berget surfaces and Moss. The only
10
- * override needed is the thumb fill: the primitive hardcodes `bg-white`,
11
- * which is a raw value that doesn't track the theme — here it uses Peak
12
- * (granite-50), matching the primary button foreground treatment.
8
+ * Overrides the primitive's hardcoded surfaces, which don't resolve in the
9
+ * Berget themes: the track's `bg-muted` equals the dark page background
10
+ * (both granite-950), so the track is invisible; the thumb hardcodes
11
+ * `bg-white`. The track uses Raised (foreground-mix 10%, theme-aware) —
12
+ * the same treatment as InputGroup/Checkbox surfaces — and the thumb uses
13
+ * Peak (granite-50), matching the primary button foreground treatment.
14
+ * The range indicator keeps the primitive's `bg-primary` (Moss).
13
15
  */
14
16
  declare const Slider: {
15
17
  ({ className, ...props }: SliderProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.d.cts","names":["SliderPrimitive"],"sources":["../../../src/components/slider/Slider.tsx"],"mappings":";;;YAMY,cAAc,MAAM,sBAAsBA;;;;;;;;;;cAWhD;KAAmC,cAAA,SAAA,0CAAW,IAAA"}
1
+ {"version":3,"file":"Slider.d.cts","names":["SliderPrimitive"],"sources":["../../../src/components/slider/Slider.tsx"],"mappings":";;;YAMY,cAAc,MAAM,sBAAsBA;;;;;;;;;;;;cAahD;KAAmC,cAAA,SAAA,0CAAW,IAAA"}
@@ -5,11 +5,13 @@ export type SliderProps = React.ComponentProps<typeof Slider$1>;
5
5
  /**
6
6
  * Berget wrapper for the base-nova Slider primitive.
7
7
  *
8
- * Track (bg-muted) and range indicator (bg-primary) resolve through the
9
- * shadcn bridge in `styles/index.css` to Berget surfaces and Moss. The only
10
- * override needed is the thumb fill: the primitive hardcodes `bg-white`,
11
- * which is a raw value that doesn't track the theme — here it uses Peak
12
- * (granite-50), matching the primary button foreground treatment.
8
+ * Overrides the primitive's hardcoded surfaces, which don't resolve in the
9
+ * Berget themes: the track's `bg-muted` equals the dark page background
10
+ * (both granite-950), so the track is invisible; the thumb hardcodes
11
+ * `bg-white`. The track uses Raised (foreground-mix 10%, theme-aware) —
12
+ * the same treatment as InputGroup/Checkbox surfaces — and the thumb uses
13
+ * Peak (granite-50), matching the primary button foreground treatment.
14
+ * The range indicator keeps the primitive's `bg-primary` (Moss).
13
15
  */
14
16
  declare const Slider: {
15
17
  ({ className, ...props }: SliderProps): import("react/jsx-runtime").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.d.mts","names":["SliderPrimitive"],"sources":["../../../src/components/slider/Slider.tsx"],"mappings":";;;YAMY,cAAc,MAAM,sBAAsBA;;;;;;;;;;cAWhD;KAAmC,cAAA,SAAA,0CAAW,IAAA"}
1
+ {"version":3,"file":"Slider.d.mts","names":["SliderPrimitive"],"sources":["../../../src/components/slider/Slider.tsx"],"mappings":";;;YAMY,cAAc,MAAM,sBAAsBA;;;;;;;;;;;;cAahD;KAAmC,cAAA,SAAA,0CAAW,IAAA"}
@@ -6,14 +6,16 @@ import { jsx } from "react/jsx-runtime";
6
6
  /**
7
7
  * Berget wrapper for the base-nova Slider primitive.
8
8
  *
9
- * Track (bg-muted) and range indicator (bg-primary) resolve through the
10
- * shadcn bridge in `styles/index.css` to Berget surfaces and Moss. The only
11
- * override needed is the thumb fill: the primitive hardcodes `bg-white`,
12
- * which is a raw value that doesn't track the theme — here it uses Peak
13
- * (granite-50), matching the primary button foreground treatment.
9
+ * Overrides the primitive's hardcoded surfaces, which don't resolve in the
10
+ * Berget themes: the track's `bg-muted` equals the dark page background
11
+ * (both granite-950), so the track is invisible; the thumb hardcodes
12
+ * `bg-white`. The track uses Raised (foreground-mix 10%, theme-aware) —
13
+ * the same treatment as InputGroup/Checkbox surfaces — and the thumb uses
14
+ * Peak (granite-50), matching the primary button foreground treatment.
15
+ * The range indicator keeps the primitive's `bg-primary` (Moss).
14
16
  */
15
17
  const Slider = ({ className, ...props }) => /* @__PURE__ */ jsx(Slider$1, {
16
- className: cn("[&_[data-slot=slider-thumb]]:bg-berget-brand-granite-50", className),
18
+ className: cn("**:data-[slot=slider-track]:bg-berget-surface-raised", "**:data-[slot=slider-thumb]:bg-berget-brand-granite-50", className),
17
19
  ...props
18
20
  });
19
21
  Slider.displayName = "Slider";
@@ -1 +1 @@
1
- {"version":3,"file":"Slider.mjs","names":["SliderPrimitive"],"sources":["../../../src/components/slider/Slider.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { Slider as SliderPrimitive } from '../../primitives/slider';\n\nexport type SliderProps = React.ComponentProps<typeof SliderPrimitive>;\n\n/**\n * Berget wrapper for the base-nova Slider primitive.\n *\n * Track (bg-muted) and range indicator (bg-primary) resolve through the\n * shadcn bridge in `styles/index.css` to Berget surfaces and Moss. The only\n * override needed is the thumb fill: the primitive hardcodes `bg-white`,\n * which is a raw value that doesn't track the theme — here it uses Peak\n * (granite-50), matching the primary button foreground treatment.\n */\nconst Slider = ({ className, ...props }: SliderProps) => (\n <SliderPrimitive\n className={cn('[&_[data-slot=slider-thumb]]:bg-berget-brand-granite-50', className)}\n {...props}\n />\n);\nSlider.displayName = 'Slider';\n\nexport { Slider };\n"],"mappings":";;;;;;;;;;;;;;AAiBA,MAAM,UAAU,EAAE,WAAW,GAAG,YAC9B,oBAACA,UAAD;CACE,WAAW,GAAG,2DAA2D,SAAS;CAClF,GAAI;AACL,CAAA;AAEH,OAAO,cAAc"}
1
+ {"version":3,"file":"Slider.mjs","names":["SliderPrimitive"],"sources":["../../../src/components/slider/Slider.tsx"],"sourcesContent":["'use client';\n\nimport type * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport { Slider as SliderPrimitive } from '../../primitives/slider';\n\nexport type SliderProps = React.ComponentProps<typeof SliderPrimitive>;\n\n/**\n * Berget wrapper for the base-nova Slider primitive.\n *\n * Overrides the primitive's hardcoded surfaces, which don't resolve in the\n * Berget themes: the track's `bg-muted` equals the dark page background\n * (both granite-950), so the track is invisible; the thumb hardcodes\n * `bg-white`. The track uses Raised (foreground-mix 10%, theme-aware) —\n * the same treatment as InputGroup/Checkbox surfaces — and the thumb uses\n * Peak (granite-50), matching the primary button foreground treatment.\n * The range indicator keeps the primitive's `bg-primary` (Moss).\n */\nconst Slider = ({ className, ...props }: SliderProps) => (\n <SliderPrimitive\n className={cn(\n '**:data-[slot=slider-track]:bg-berget-surface-raised',\n '**:data-[slot=slider-thumb]:bg-berget-brand-granite-50',\n className,\n )}\n {...props}\n />\n);\nSlider.displayName = 'Slider';\n\nexport { Slider };\n"],"mappings":";;;;;;;;;;;;;;;;AAmBA,MAAM,UAAU,EAAE,WAAW,GAAG,YAC9B,oBAACA,UAAD;CACE,WAAW,GACT,wDACA,0DACA,SACF;CACA,GAAI;AACL,CAAA;AAEH,OAAO,cAAc"}
@@ -8,12 +8,28 @@ let react_jsx_runtime = require("react/jsx-runtime");
8
8
  let class_variance_authority = require("class-variance-authority");
9
9
  let _base_ui_react_switch = require("@base-ui/react/switch");
10
10
  //#region src/components/switch/Switch.tsx
11
- const switchRootVariants = (0, class_variance_authority.cva)("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50", {
11
+ const switchRootVariants = (0, class_variance_authority.cva)(`
12
+ peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2
13
+ border-transparent transition-colors
14
+ focus-visible:ring-2 focus-visible:ring-berget-ring
15
+ focus-visible:ring-offset-2 focus-visible:ring-offset-background
16
+ focus-visible:outline-none
17
+ disabled:cursor-not-allowed disabled:opacity-50
18
+ `, {
12
19
  variants: {
13
20
  variant: {
14
- default: "data-unchecked:bg-berget-border data-checked:bg-berget-primary",
15
- primary: "data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-primary-checked",
16
- subtle: "data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-subtle-checked"
21
+ default: `
22
+ data-checked:bg-berget-primary
23
+ data-unchecked:bg-berget-border
24
+ `,
25
+ primary: `
26
+ data-checked:bg-berget-switch-primary-checked
27
+ data-unchecked:bg-berget-border-subtle
28
+ `,
29
+ subtle: `
30
+ data-checked:bg-berget-switch-subtle-checked
31
+ data-unchecked:bg-berget-border-subtle
32
+ `
17
33
  },
18
34
  size: {
19
35
  sm: "h-5 w-9",
@@ -26,11 +42,26 @@ const switchRootVariants = (0, class_variance_authority.cva)("peer inline-flex s
26
42
  size: "default"
27
43
  }
28
44
  });
29
- const switchThumbVariants = (0, class_variance_authority.cva)("pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground", {
45
+ const switchThumbVariants = (0, class_variance_authority.cva)(`
46
+ pointer-events-none block rounded-full bg-berget-foreground shadow-berget-sm
47
+ ring-0 transition-transform
48
+ `, {
30
49
  variants: { size: {
31
- sm: "h-4 w-4 data-checked:translate-x-4 data-unchecked:translate-x-0",
32
- default: "h-5 w-5 data-checked:translate-x-5 data-unchecked:translate-x-0",
33
- lg: "h-6 w-6 data-checked:translate-x-6 data-unchecked:translate-x-0"
50
+ sm: `
51
+ size-4
52
+ data-checked:translate-x-4
53
+ data-unchecked:translate-x-0
54
+ `,
55
+ default: `
56
+ size-5
57
+ data-checked:translate-x-5
58
+ data-unchecked:translate-x-0
59
+ `,
60
+ lg: `
61
+ size-6
62
+ data-checked:translate-x-6
63
+ data-unchecked:translate-x-0
64
+ `
34
65
  } },
35
66
  defaultVariants: { size: "default" }
36
67
  });
@@ -50,7 +81,7 @@ const Switch = react.forwardRef(({ "aria-label": ariaLabel, className, variant,
50
81
  className: require_utils.cn(switchRootVariants({
51
82
  variant,
52
83
  size
53
- }), disabled && "cursor-not-allowed pointer-events-none", className),
84
+ }), disabled && "pointer-events-none cursor-not-allowed", className),
54
85
  ...props,
55
86
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_switch.Switch.Thumb, { className: require_utils.cn(switchThumbVariants({ size })) })
56
87
  }), (label || description || error) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
@@ -58,7 +89,7 @@ const Switch = react.forwardRef(({ "aria-label": ariaLabel, className, variant,
58
89
  children: [
59
90
  label && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("label", {
60
91
  htmlFor: switchId,
61
- className: require_utils.cn("text-sm font-sans leading-none", disabled ? "text-muted-foreground cursor-not-allowed" : error ? "text-berget-destructive-foreground cursor-pointer" : "text-foreground cursor-pointer"),
92
+ className: require_utils.cn("font-sans text-sm leading-none", disabled ? "cursor-not-allowed text-muted-foreground" : error ? "cursor-pointer text-berget-destructive-foreground" : "cursor-pointer text-foreground"),
62
93
  children: label
63
94
  }),
64
95
  description && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
@@ -69,7 +100,7 @@ const Switch = react.forwardRef(({ "aria-label": ariaLabel, className, variant,
69
100
  error && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
70
101
  variant: "xs",
71
102
  id: errorId,
72
- className: "text-berget-destructive-foreground",
103
+ className: "\n text-berget-destructive-foreground\n ",
73
104
  children: error
74
105
  })
75
106
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.cjs","names":["cva","React","SwitchPrimitives","cn","Typography"],"sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Switch as SwitchPrimitives } from '@base-ui/react/switch';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst switchRootVariants = cva(\n 'peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'data-unchecked:bg-berget-border data-checked:bg-berget-primary',\n primary:\n 'data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-primary-checked',\n subtle:\n 'data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-subtle-checked',\n },\n size: {\n sm: 'h-5 w-9',\n default: 'h-6 w-11',\n lg: 'h-7 w-[52px]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nconst switchThumbVariants = cva(\n 'pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground',\n {\n variants: {\n size: {\n sm: 'h-4 w-4 data-checked:translate-x-4 data-unchecked:translate-x-0',\n default: 'h-5 w-5 data-checked:translate-x-5 data-unchecked:translate-x-0',\n lg: 'h-6 w-6 data-checked:translate-x-6 data-unchecked:translate-x-0',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n },\n);\n\nexport interface SwitchProps\n extends Omit<SwitchPrimitives.Root.Props, 'className'>, VariantProps<typeof switchRootVariants> {\n label?: string;\n description?: string;\n error?: string;\n className?: string;\n}\n\nconst Switch = React.forwardRef<HTMLElement, SwitchProps>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n variant,\n size,\n label,\n description,\n error,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const switchId = id || generatedId;\n const errorId = `${switchId}-error`;\n\n return (\n <div className=\"flex items-center gap-3\">\n <SwitchPrimitives.Root\n ref={ref}\n id={switchId}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n aria-label={ariaLabel || label || undefined}\n className={cn(\n switchRootVariants({ variant, size }),\n disabled && 'cursor-not-allowed pointer-events-none',\n className,\n )}\n {...props}\n >\n <SwitchPrimitives.Thumb className={cn(switchThumbVariants({ size }))} />\n </SwitchPrimitives.Root>\n\n {(label || description || error) && (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={switchId}\n className={cn(\n 'text-sm font-sans leading-none',\n disabled\n ? 'text-muted-foreground cursor-not-allowed'\n : error\n ? 'text-berget-destructive-foreground cursor-pointer'\n : 'text-foreground cursor-pointer',\n )}\n >\n {label}\n </label>\n )}\n {description && (\n <Typography variant=\"xs\" color=\"muted\">\n {description}\n </Typography>\n )}\n {error && (\n <Typography variant=\"xs\" id={errorId} className=\"text-berget-destructive-foreground\">\n {error}\n </Typography>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nexport { Switch, switchRootVariants, switchThumbVariants };\n"],"mappings":";;;;;;;;;;AAQA,MAAM,sBAAA,GAAqBA,yBAAAA,IAAAA,CACzB,oTACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SACE;GACF,QACE;EACJ;EACA,MAAM;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CACF;AAEA,MAAM,uBAAA,GAAsBA,yBAAAA,IAAAA,CAC1B,4GACA;CACE,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,SAAS;EACT,IAAI;CACN,EACF;CACA,iBAAiB,EACf,MAAM,UACR;AACF,CACF;AAUA,MAAM,SAASC,MAAM,YAEjB,EACE,cAAc,WACd,WACA,SACA,MACA,OACA,aACA,OACA,IACA,UACA,GAAG,SAEL,QACG;CACH,MAAM,cAAcA,MAAM,MAAM;CAChC,MAAM,WAAW,MAAM;CACvB,MAAM,UAAU,GAAG,SAAS;CAE5B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,OAAiB,MAAlB;GACO;GACL,IAAI;GACM;GACV,gBAAc,CAAC,CAAC;GAChB,oBAAkB,QAAQ,UAAU,KAAA;GACpC,cAAY,aAAa,SAAS,KAAA;GAClC,WAAWC,cAAAA,GACT,mBAAmB;IAAE;IAAS;GAAK,CAAC,GACpC,YAAY,0CACZ,SACF;GACA,GAAI;GAEJ,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACD,sBAAAA,OAAiB,OAAlB,EAAwB,WAAWC,cAAAA,GAAG,oBAAoB,EAAE,KAAK,CAAC,CAAC,EAAI,CAAA;EAClD,CAAA,IAErB,SAAS,eAAe,UACxB,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACG,SACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;KACE,SAAS;KACT,WAAWA,cAAAA,GACT,kCACA,WACI,6CACA,QACE,sDACA,gCACR;KAEC,UAAA;IACI,CAAA;IAER,eACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,YAAD;KAAY,SAAQ;KAAK,OAAM;KAC5B,UAAA;IACS,CAAA;IAEb,SACC,iBAAA,GAAA,kBAAA,IAAA,CAACA,mBAAAA,YAAD;KAAY,SAAQ;KAAK,IAAI;KAAS,WAAU;KAC7C,UAAA;IACS,CAAA;GAEX;EAEJ,CAAA,CAAA;;AAET,CACF;AACA,OAAO,cAAc"}
1
+ {"version":3,"file":"Switch.cjs","names":["cva","React","SwitchPrimitives","cn","Typography"],"sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Switch as SwitchPrimitives } from '@base-ui/react/switch';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst switchRootVariants = cva(\n `\n peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2\n border-transparent transition-colors\n focus-visible:ring-2 focus-visible:ring-berget-ring\n focus-visible:ring-offset-2 focus-visible:ring-offset-background\n focus-visible:outline-none\n disabled:cursor-not-allowed disabled:opacity-50\n `,\n {\n variants: {\n variant: {\n default: `\n data-checked:bg-berget-primary\n data-unchecked:bg-berget-border\n `,\n primary: `\n data-checked:bg-berget-switch-primary-checked\n data-unchecked:bg-berget-border-subtle\n `,\n subtle: `\n data-checked:bg-berget-switch-subtle-checked\n data-unchecked:bg-berget-border-subtle\n `,\n },\n size: {\n sm: 'h-5 w-9',\n default: 'h-6 w-11',\n lg: 'h-7 w-[52px]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nconst switchThumbVariants = cva(\n `\n pointer-events-none block rounded-full bg-berget-foreground shadow-berget-sm\n ring-0 transition-transform\n `,\n {\n variants: {\n size: {\n sm: `\n size-4\n data-checked:translate-x-4\n data-unchecked:translate-x-0\n `,\n default: `\n size-5\n data-checked:translate-x-5\n data-unchecked:translate-x-0\n `,\n lg: `\n size-6\n data-checked:translate-x-6\n data-unchecked:translate-x-0\n `,\n },\n },\n defaultVariants: {\n size: 'default',\n },\n },\n);\n\nexport interface SwitchProps\n extends Omit<SwitchPrimitives.Root.Props, 'className'>, VariantProps<typeof switchRootVariants> {\n label?: string;\n description?: string;\n error?: string;\n className?: string;\n}\n\nconst Switch = React.forwardRef<HTMLElement, SwitchProps>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n variant,\n size,\n label,\n description,\n error,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const switchId = id || generatedId;\n const errorId = `${switchId}-error`;\n\n return (\n <div className=\"flex items-center gap-3\">\n <SwitchPrimitives.Root\n ref={ref}\n id={switchId}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n aria-label={ariaLabel || label || undefined}\n className={cn(\n switchRootVariants({ variant, size }),\n disabled && 'pointer-events-none cursor-not-allowed',\n className,\n )}\n {...props}\n >\n <SwitchPrimitives.Thumb className={cn(switchThumbVariants({ size }))} />\n </SwitchPrimitives.Root>\n\n {(label || description || error) && (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={switchId}\n className={cn(\n 'font-sans text-sm leading-none',\n disabled\n ? 'cursor-not-allowed text-muted-foreground'\n : error\n ? 'cursor-pointer text-berget-destructive-foreground'\n : 'cursor-pointer text-foreground',\n )}\n >\n {label}\n </label>\n )}\n {description && (\n <Typography variant=\"xs\" color=\"muted\">\n {description}\n </Typography>\n )}\n {error && (\n <Typography\n variant=\"xs\"\n id={errorId}\n className=\"\n text-berget-destructive-foreground\n \"\n >\n {error}\n </Typography>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nexport { Switch, switchRootVariants, switchThumbVariants };\n"],"mappings":";;;;;;;;;;AAQA,MAAM,sBAAA,GAAqBA,yBAAAA,IAAAA,CACzB;;;;;;;KAQA;CACE,UAAU;EACR,SAAS;GACP,SAAS;;;;GAIT,SAAS;;;;GAIT,QAAQ;;;;EAIV;EACA,MAAM;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CACF;AAEA,MAAM,uBAAA,GAAsBA,yBAAAA,IAAAA,CAC1B;;;KAIA;CACE,UAAU,EACR,MAAM;EACJ,IAAI;;;;;EAKJ,SAAS;;;;;EAKT,IAAI;;;;;CAKN,EACF;CACA,iBAAiB,EACf,MAAM,UACR;AACF,CACF;AAUA,MAAM,SAASC,MAAM,YAEjB,EACE,cAAc,WACd,WACA,SACA,MACA,OACA,aACA,OACA,IACA,UACA,GAAG,SAEL,QACG;CACH,MAAM,cAAcA,MAAM,MAAM;CAChC,MAAM,WAAW,MAAM;CACvB,MAAM,UAAU,GAAG,SAAS;CAE5B,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,OAAiB,MAAlB;GACO;GACL,IAAI;GACM;GACV,gBAAc,CAAC,CAAC;GAChB,oBAAkB,QAAQ,UAAU,KAAA;GACpC,cAAY,aAAa,SAAS,KAAA;GAClC,WAAWC,cAAAA,GACT,mBAAmB;IAAE;IAAS;GAAK,CAAC,GACpC,YAAY,0CACZ,SACF;GACA,GAAI;GAEJ,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACD,sBAAAA,OAAiB,OAAlB,EAAwB,WAAWC,cAAAA,GAAG,oBAAoB,EAAE,KAAK,CAAC,CAAC,EAAI,CAAA;EAClD,CAAA,IAErB,SAAS,eAAe,UACxB,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACG,SACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD;KACE,SAAS;KACT,WAAWA,cAAAA,GACT,kCACA,WACI,6CACA,QACE,sDACA,gCACR;KAEC,UAAA;IACI,CAAA;IAER,eACC,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,YAAD;KAAY,SAAQ;KAAK,OAAM;KAC5B,UAAA;IACS,CAAA;IAEb,SACC,iBAAA,GAAA,kBAAA,IAAA,CAACA,mBAAAA,YAAD;KACE,SAAQ;KACR,IAAI;KACJ,WAAU;KAIT,UAAA;IACS,CAAA;GAEX;EAEJ,CAAA,CAAA;;AAET,CACF;AACA,OAAO,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.cts","names":["SwitchPrimitives","Switch"],"sources":["../../../src/components/switch/Switch.tsx"],"mappings":";;;;cAQM,qBAAkB;;;6CAsBvB;cAEK,sBAAmB;;6CAcxB;iBAEgB,oBACP,KAAKA,OAAiB,KAAK,qBAAqB,oBAAoB;EAC5E;EACA;EACA;EACA;;cAGIC,UAAM,MAAA,0BAAA,KAAA,sBAAA,MAAA,cAAA"}
1
+ {"version":3,"file":"Switch.d.cts","names":["SwitchPrimitives","Switch"],"sources":["../../../src/components/switch/Switch.tsx"],"mappings":";;;;cAQM,qBAAkB;;;6CAoCvB;cAEK,sBAAmB;;6CA6BxB;iBAEgB,oBACP,KAAKA,OAAiB,KAAK,qBAAqB,oBAAoB;EAC5E;EACA;EACA;EACA;;cAGIC,UAAM,MAAA,0BAAA,KAAA,sBAAA,MAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.d.mts","names":["SwitchPrimitives","Switch"],"sources":["../../../src/components/switch/Switch.tsx"],"mappings":";;;;cAQM,qBAAkB;;;6CAsBvB;cAEK,sBAAmB;;6CAcxB;iBAEgB,oBACP,KAAKA,OAAiB,KAAK,qBAAqB,oBAAoB;EAC5E;EACA;EACA;EACA;;cAGIC,UAAM,MAAA,0BAAA,KAAA,sBAAA,MAAA,cAAA"}
1
+ {"version":3,"file":"Switch.d.mts","names":["SwitchPrimitives","Switch"],"sources":["../../../src/components/switch/Switch.tsx"],"mappings":";;;;cAQM,qBAAkB;;;6CAoCvB;cAEK,sBAAmB;;6CA6BxB;iBAEgB,oBACP,KAAKA,OAAiB,KAAK,qBAAqB,oBAAoB;EAC5E;EACA;EACA;EACA;;cAGIC,UAAM,MAAA,0BAAA,KAAA,sBAAA,MAAA,cAAA"}
@@ -6,12 +6,28 @@ import { jsx, jsxs } from "react/jsx-runtime";
6
6
  import { cva } from "class-variance-authority";
7
7
  import { Switch } from "@base-ui/react/switch";
8
8
  //#region src/components/switch/Switch.tsx
9
- const switchRootVariants = cva("peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50", {
9
+ const switchRootVariants = cva(`
10
+ peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2
11
+ border-transparent transition-colors
12
+ focus-visible:ring-2 focus-visible:ring-berget-ring
13
+ focus-visible:ring-offset-2 focus-visible:ring-offset-background
14
+ focus-visible:outline-none
15
+ disabled:cursor-not-allowed disabled:opacity-50
16
+ `, {
10
17
  variants: {
11
18
  variant: {
12
- default: "data-unchecked:bg-berget-border data-checked:bg-berget-primary",
13
- primary: "data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-primary-checked",
14
- subtle: "data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-subtle-checked"
19
+ default: `
20
+ data-checked:bg-berget-primary
21
+ data-unchecked:bg-berget-border
22
+ `,
23
+ primary: `
24
+ data-checked:bg-berget-switch-primary-checked
25
+ data-unchecked:bg-berget-border-subtle
26
+ `,
27
+ subtle: `
28
+ data-checked:bg-berget-switch-subtle-checked
29
+ data-unchecked:bg-berget-border-subtle
30
+ `
15
31
  },
16
32
  size: {
17
33
  sm: "h-5 w-9",
@@ -24,11 +40,26 @@ const switchRootVariants = cva("peer inline-flex shrink-0 cursor-pointer items-c
24
40
  size: "default"
25
41
  }
26
42
  });
27
- const switchThumbVariants = cva("pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground", {
43
+ const switchThumbVariants = cva(`
44
+ pointer-events-none block rounded-full bg-berget-foreground shadow-berget-sm
45
+ ring-0 transition-transform
46
+ `, {
28
47
  variants: { size: {
29
- sm: "h-4 w-4 data-checked:translate-x-4 data-unchecked:translate-x-0",
30
- default: "h-5 w-5 data-checked:translate-x-5 data-unchecked:translate-x-0",
31
- lg: "h-6 w-6 data-checked:translate-x-6 data-unchecked:translate-x-0"
48
+ sm: `
49
+ size-4
50
+ data-checked:translate-x-4
51
+ data-unchecked:translate-x-0
52
+ `,
53
+ default: `
54
+ size-5
55
+ data-checked:translate-x-5
56
+ data-unchecked:translate-x-0
57
+ `,
58
+ lg: `
59
+ size-6
60
+ data-checked:translate-x-6
61
+ data-unchecked:translate-x-0
62
+ `
32
63
  } },
33
64
  defaultVariants: { size: "default" }
34
65
  });
@@ -48,7 +79,7 @@ const Switch$1 = React.forwardRef(({ "aria-label": ariaLabel, className, variant
48
79
  className: cn(switchRootVariants({
49
80
  variant,
50
81
  size
51
- }), disabled && "cursor-not-allowed pointer-events-none", className),
82
+ }), disabled && "pointer-events-none cursor-not-allowed", className),
52
83
  ...props,
53
84
  children: /* @__PURE__ */ jsx(Switch.Thumb, { className: cn(switchThumbVariants({ size })) })
54
85
  }), (label || description || error) && /* @__PURE__ */ jsxs("div", {
@@ -56,7 +87,7 @@ const Switch$1 = React.forwardRef(({ "aria-label": ariaLabel, className, variant
56
87
  children: [
57
88
  label && /* @__PURE__ */ jsx("label", {
58
89
  htmlFor: switchId,
59
- className: cn("text-sm font-sans leading-none", disabled ? "text-muted-foreground cursor-not-allowed" : error ? "text-berget-destructive-foreground cursor-pointer" : "text-foreground cursor-pointer"),
90
+ className: cn("font-sans text-sm leading-none", disabled ? "cursor-not-allowed text-muted-foreground" : error ? "cursor-pointer text-berget-destructive-foreground" : "cursor-pointer text-foreground"),
60
91
  children: label
61
92
  }),
62
93
  description && /* @__PURE__ */ jsx(Typography, {
@@ -67,7 +98,7 @@ const Switch$1 = React.forwardRef(({ "aria-label": ariaLabel, className, variant
67
98
  error && /* @__PURE__ */ jsx(Typography, {
68
99
  variant: "xs",
69
100
  id: errorId,
70
- className: "text-berget-destructive-foreground",
101
+ className: "\n text-berget-destructive-foreground\n ",
71
102
  children: error
72
103
  })
73
104
  ]
@@ -1 +1 @@
1
- {"version":3,"file":"Switch.mjs","names":["Switch","SwitchPrimitives"],"sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Switch as SwitchPrimitives } from '@base-ui/react/switch';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst switchRootVariants = cva(\n 'peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-berget-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50',\n {\n variants: {\n variant: {\n default: 'data-unchecked:bg-berget-border data-checked:bg-berget-primary',\n primary:\n 'data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-primary-checked',\n subtle:\n 'data-unchecked:bg-berget-border-subtle data-checked:bg-berget-switch-subtle-checked',\n },\n size: {\n sm: 'h-5 w-9',\n default: 'h-6 w-11',\n lg: 'h-7 w-[52px]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nconst switchThumbVariants = cva(\n 'pointer-events-none block rounded-full ring-0 transition-transform shadow-berget-sm bg-berget-foreground',\n {\n variants: {\n size: {\n sm: 'h-4 w-4 data-checked:translate-x-4 data-unchecked:translate-x-0',\n default: 'h-5 w-5 data-checked:translate-x-5 data-unchecked:translate-x-0',\n lg: 'h-6 w-6 data-checked:translate-x-6 data-unchecked:translate-x-0',\n },\n },\n defaultVariants: {\n size: 'default',\n },\n },\n);\n\nexport interface SwitchProps\n extends Omit<SwitchPrimitives.Root.Props, 'className'>, VariantProps<typeof switchRootVariants> {\n label?: string;\n description?: string;\n error?: string;\n className?: string;\n}\n\nconst Switch = React.forwardRef<HTMLElement, SwitchProps>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n variant,\n size,\n label,\n description,\n error,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const switchId = id || generatedId;\n const errorId = `${switchId}-error`;\n\n return (\n <div className=\"flex items-center gap-3\">\n <SwitchPrimitives.Root\n ref={ref}\n id={switchId}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n aria-label={ariaLabel || label || undefined}\n className={cn(\n switchRootVariants({ variant, size }),\n disabled && 'cursor-not-allowed pointer-events-none',\n className,\n )}\n {...props}\n >\n <SwitchPrimitives.Thumb className={cn(switchThumbVariants({ size }))} />\n </SwitchPrimitives.Root>\n\n {(label || description || error) && (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={switchId}\n className={cn(\n 'text-sm font-sans leading-none',\n disabled\n ? 'text-muted-foreground cursor-not-allowed'\n : error\n ? 'text-berget-destructive-foreground cursor-pointer'\n : 'text-foreground cursor-pointer',\n )}\n >\n {label}\n </label>\n )}\n {description && (\n <Typography variant=\"xs\" color=\"muted\">\n {description}\n </Typography>\n )}\n {error && (\n <Typography variant=\"xs\" id={errorId} className=\"text-berget-destructive-foreground\">\n {error}\n </Typography>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nexport { Switch, switchRootVariants, switchThumbVariants };\n"],"mappings":";;;;;;;;AAQA,MAAM,qBAAqB,IACzB,oTACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SACE;GACF,QACE;EACJ;EACA,MAAM;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CACF;AAEA,MAAM,sBAAsB,IAC1B,4GACA;CACE,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,SAAS;EACT,IAAI;CACN,EACF;CACA,iBAAiB,EACf,MAAM,UACR;AACF,CACF;AAUA,MAAMA,WAAS,MAAM,YAEjB,EACE,cAAc,WACd,WACA,SACA,MACA,OACA,aACA,OACA,IACA,UACA,GAAG,SAEL,QACG;CACH,MAAM,cAAc,MAAM,MAAM;CAChC,MAAM,WAAW,MAAM;CACvB,MAAM,UAAU,GAAG,SAAS;CAE5B,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAACC,OAAiB,MAAlB;GACO;GACL,IAAI;GACM;GACV,gBAAc,CAAC,CAAC;GAChB,oBAAkB,QAAQ,UAAU,KAAA;GACpC,cAAY,aAAa,SAAS,KAAA;GAClC,WAAW,GACT,mBAAmB;IAAE;IAAS;GAAK,CAAC,GACpC,YAAY,0CACZ,SACF;GACA,GAAI;GAEJ,UAAA,oBAACA,OAAiB,OAAlB,EAAwB,WAAW,GAAG,oBAAoB,EAAE,KAAK,CAAC,CAAC,EAAI,CAAA;EAClD,CAAA,IAErB,SAAS,eAAe,UACxB,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACG,SACC,oBAAC,SAAD;KACE,SAAS;KACT,WAAW,GACT,kCACA,WACI,6CACA,QACE,sDACA,gCACR;KAEC,UAAA;IACI,CAAA;IAER,eACC,oBAAC,YAAD;KAAY,SAAQ;KAAK,OAAM;KAC5B,UAAA;IACS,CAAA;IAEb,SACC,oBAAC,YAAD;KAAY,SAAQ;KAAK,IAAI;KAAS,WAAU;KAC7C,UAAA;IACS,CAAA;GAEX;EAEJ,CAAA,CAAA;;AAET,CACF;AACA,SAAO,cAAc"}
1
+ {"version":3,"file":"Switch.mjs","names":["Switch","SwitchPrimitives"],"sources":["../../../src/components/switch/Switch.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Switch as SwitchPrimitives } from '@base-ui/react/switch';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst switchRootVariants = cva(\n `\n peer inline-flex shrink-0 cursor-pointer items-center rounded-full border-2\n border-transparent transition-colors\n focus-visible:ring-2 focus-visible:ring-berget-ring\n focus-visible:ring-offset-2 focus-visible:ring-offset-background\n focus-visible:outline-none\n disabled:cursor-not-allowed disabled:opacity-50\n `,\n {\n variants: {\n variant: {\n default: `\n data-checked:bg-berget-primary\n data-unchecked:bg-berget-border\n `,\n primary: `\n data-checked:bg-berget-switch-primary-checked\n data-unchecked:bg-berget-border-subtle\n `,\n subtle: `\n data-checked:bg-berget-switch-subtle-checked\n data-unchecked:bg-berget-border-subtle\n `,\n },\n size: {\n sm: 'h-5 w-9',\n default: 'h-6 w-11',\n lg: 'h-7 w-[52px]',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'default',\n },\n },\n);\n\nconst switchThumbVariants = cva(\n `\n pointer-events-none block rounded-full bg-berget-foreground shadow-berget-sm\n ring-0 transition-transform\n `,\n {\n variants: {\n size: {\n sm: `\n size-4\n data-checked:translate-x-4\n data-unchecked:translate-x-0\n `,\n default: `\n size-5\n data-checked:translate-x-5\n data-unchecked:translate-x-0\n `,\n lg: `\n size-6\n data-checked:translate-x-6\n data-unchecked:translate-x-0\n `,\n },\n },\n defaultVariants: {\n size: 'default',\n },\n },\n);\n\nexport interface SwitchProps\n extends Omit<SwitchPrimitives.Root.Props, 'className'>, VariantProps<typeof switchRootVariants> {\n label?: string;\n description?: string;\n error?: string;\n className?: string;\n}\n\nconst Switch = React.forwardRef<HTMLElement, SwitchProps>(\n (\n {\n 'aria-label': ariaLabel,\n className,\n variant,\n size,\n label,\n description,\n error,\n id,\n disabled,\n ...props\n },\n ref,\n ) => {\n const generatedId = React.useId();\n const switchId = id || generatedId;\n const errorId = `${switchId}-error`;\n\n return (\n <div className=\"flex items-center gap-3\">\n <SwitchPrimitives.Root\n ref={ref}\n id={switchId}\n disabled={disabled}\n aria-invalid={!!error}\n aria-describedby={error ? errorId : undefined}\n aria-label={ariaLabel || label || undefined}\n className={cn(\n switchRootVariants({ variant, size }),\n disabled && 'pointer-events-none cursor-not-allowed',\n className,\n )}\n {...props}\n >\n <SwitchPrimitives.Thumb className={cn(switchThumbVariants({ size }))} />\n </SwitchPrimitives.Root>\n\n {(label || description || error) && (\n <div className=\"flex flex-col gap-1\">\n {label && (\n <label\n htmlFor={switchId}\n className={cn(\n 'font-sans text-sm leading-none',\n disabled\n ? 'cursor-not-allowed text-muted-foreground'\n : error\n ? 'cursor-pointer text-berget-destructive-foreground'\n : 'cursor-pointer text-foreground',\n )}\n >\n {label}\n </label>\n )}\n {description && (\n <Typography variant=\"xs\" color=\"muted\">\n {description}\n </Typography>\n )}\n {error && (\n <Typography\n variant=\"xs\"\n id={errorId}\n className=\"\n text-berget-destructive-foreground\n \"\n >\n {error}\n </Typography>\n )}\n </div>\n )}\n </div>\n );\n },\n);\nSwitch.displayName = 'Switch';\n\nexport { Switch, switchRootVariants, switchThumbVariants };\n"],"mappings":";;;;;;;;AAQA,MAAM,qBAAqB,IACzB;;;;;;;KAQA;CACE,UAAU;EACR,SAAS;GACP,SAAS;;;;GAIT,SAAS;;;;GAIT,QAAQ;;;;EAIV;EACA,MAAM;GACJ,IAAI;GACJ,SAAS;GACT,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CACF;AAEA,MAAM,sBAAsB,IAC1B;;;KAIA;CACE,UAAU,EACR,MAAM;EACJ,IAAI;;;;;EAKJ,SAAS;;;;;EAKT,IAAI;;;;;CAKN,EACF;CACA,iBAAiB,EACf,MAAM,UACR;AACF,CACF;AAUA,MAAMA,WAAS,MAAM,YAEjB,EACE,cAAc,WACd,WACA,SACA,MACA,OACA,aACA,OACA,IACA,UACA,GAAG,SAEL,QACG;CACH,MAAM,cAAc,MAAM,MAAM;CAChC,MAAM,WAAW,MAAM;CACvB,MAAM,UAAU,GAAG,SAAS;CAE5B,OACE,qBAAC,OAAD;EAAK,WAAU;EAAf,UAAA,CACE,oBAACC,OAAiB,MAAlB;GACO;GACL,IAAI;GACM;GACV,gBAAc,CAAC,CAAC;GAChB,oBAAkB,QAAQ,UAAU,KAAA;GACpC,cAAY,aAAa,SAAS,KAAA;GAClC,WAAW,GACT,mBAAmB;IAAE;IAAS;GAAK,CAAC,GACpC,YAAY,0CACZ,SACF;GACA,GAAI;GAEJ,UAAA,oBAACA,OAAiB,OAAlB,EAAwB,WAAW,GAAG,oBAAoB,EAAE,KAAK,CAAC,CAAC,EAAI,CAAA;EAClD,CAAA,IAErB,SAAS,eAAe,UACxB,qBAAC,OAAD;GAAK,WAAU;GAAf,UAAA;IACG,SACC,oBAAC,SAAD;KACE,SAAS;KACT,WAAW,GACT,kCACA,WACI,6CACA,QACE,sDACA,gCACR;KAEC,UAAA;IACI,CAAA;IAER,eACC,oBAAC,YAAD;KAAY,SAAQ;KAAK,OAAM;KAC5B,UAAA;IACS,CAAA;IAEb,SACC,oBAAC,YAAD;KACE,SAAQ;KACR,IAAI;KACJ,WAAU;KAIT,UAAA;IACS,CAAA;GAEX;EAEJ,CAAA,CAAA;;AAET,CACF;AACA,SAAO,cAAc"}
@@ -14,7 +14,10 @@ const Table = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
14
14
  Table.displayName = "Table";
15
15
  const TableHeader = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_table.TableHeader, {
16
16
  ref,
17
- className: require_utils.cn("[&_tr]:border-b border-berget-table-border", className),
17
+ className: require_utils.cn(`
18
+ border-berget-table-border
19
+ [&_tr]:border-b
20
+ `, className),
18
21
  ...props
19
22
  }));
20
23
  TableHeader.displayName = "TableHeader";
@@ -26,25 +29,39 @@ const TableBody = react.forwardRef(({ className, ...props }, ref) => /* @__PURE_
26
29
  TableBody.displayName = "TableBody";
27
30
  const TableFooter = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_table.TableFooter, {
28
31
  ref,
29
- className: require_utils.cn("border-t border-berget-table-border bg-berget-table-footer-bg font-medium [&>tr]:last:border-0", className),
32
+ className: require_utils.cn(`
33
+ border-t border-berget-table-border bg-berget-table-footer-bg
34
+ font-medium
35
+ [&>tr]:last:border-0
36
+ `, className),
30
37
  ...props
31
38
  }));
32
39
  TableFooter.displayName = "TableFooter";
33
40
  const TableRow = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_table.TableRow, {
34
41
  ref,
35
- className: require_utils.cn("border-b border-berget-table-border transition-colors hover:bg-berget-table-row-hover data-[state=selected]:bg-berget-table-row-selected", className),
42
+ className: require_utils.cn(`
43
+ border-b border-berget-table-border transition-colors
44
+ hover:bg-berget-table-row-hover
45
+ data-[state=selected]:bg-berget-table-row-selected
46
+ `, className),
36
47
  ...props
37
48
  }));
38
49
  TableRow.displayName = "TableRow";
39
50
  const TableHead = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_table.TableHead, {
40
51
  ref,
41
- className: require_utils.cn("h-12 px-4 text-left align-middle font-medium text-berget-table-head-text [&:has([role=checkbox])]:pr-0", className),
52
+ className: require_utils.cn(`
53
+ h-12 px-4 text-left align-middle font-medium text-berget-table-head-text
54
+ [&:has([role=checkbox])]:pr-0
55
+ `, className),
42
56
  ...props
43
57
  }));
44
58
  TableHead.displayName = "TableHead";
45
59
  const TableCell = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_table.TableCell, {
46
60
  ref,
47
- className: require_utils.cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
61
+ className: require_utils.cn(`
62
+ p-4 align-middle
63
+ [&:has([role=checkbox])]:pr-0
64
+ `, className),
48
65
  ...props
49
66
  }));
50
67
  TableCell.displayName = "TableCell";
@@ -1 +1 @@
1
- {"version":3,"file":"Table.cjs","names":["React","TablePrimitive","TableHeaderPrimitive","cn","TableBodyPrimitive","TableFooterPrimitive","TableRowPrimitive","TableHeadPrimitive","TableCellPrimitive","TableCaptionPrimitive"],"sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n Table as TablePrimitive,\n TableHeader as TableHeaderPrimitive,\n TableBody as TableBodyPrimitive,\n TableFooter as TableFooterPrimitive,\n TableHead as TableHeadPrimitive,\n TableRow as TableRowPrimitive,\n TableCell as TableCellPrimitive,\n TableCaption as TableCaptionPrimitive,\n} from '../../primitives/table';\n\nconst Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => <TablePrimitive ref={ref} className={className} {...props} />,\n);\nTable.displayName = 'Table';\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableHeaderPrimitive\n ref={ref}\n className={cn('[&_tr]:border-b border-berget-table-border', className)}\n {...props}\n />\n));\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableBodyPrimitive\n ref={ref}\n className={cn('[&_tr:last-child]:border-0', className)}\n {...props}\n />\n));\nTableBody.displayName = 'TableBody';\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableFooterPrimitive\n ref={ref}\n className={cn(\n 'border-t border-berget-table-border bg-berget-table-footer-bg font-medium [&>tr]:last:border-0',\n className,\n )}\n {...props}\n />\n));\nTableFooter.displayName = 'TableFooter';\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <TableRowPrimitive\n ref={ref}\n className={cn(\n 'border-b border-berget-table-border transition-colors hover:bg-berget-table-row-hover data-[state=selected]:bg-berget-table-row-selected',\n className,\n )}\n {...props}\n />\n ),\n);\nTableRow.displayName = 'TableRow';\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <TableHeadPrimitive\n ref={ref}\n className={cn(\n 'h-12 px-4 text-left align-middle font-medium text-berget-table-head-text [&:has([role=checkbox])]:pr-0',\n className,\n )}\n {...props}\n />\n));\nTableHead.displayName = 'TableHead';\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <TableCellPrimitive\n ref={ref}\n className={cn('p-4 align-middle [&:has([role=checkbox])]:pr-0', className)}\n {...props}\n />\n));\nTableCell.displayName = 'TableCell';\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <TableCaptionPrimitive\n ref={ref}\n className={cn('mt-4 text-sm text-berget-table-caption-text', className)}\n {...props}\n />\n));\nTableCaption.displayName = 'TableCaption';\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n"],"mappings":";;;;;;;;AAeA,MAAM,QAAQA,MAAM,YACjB,EAAE,WAAW,GAAG,SAAS,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,OAAD;CAAqB;CAAgB;CAAW,GAAI;AAAQ,CAAA,CAChG;AACA,MAAM,cAAc;AAEpB,MAAM,cAAcD,MAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACE,cAAAA,aAAD;CACO;CACL,WAAWC,cAAAA,GAAG,8CAA8C,SAAS;CACrE,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc;AAE1B,MAAM,YAAYH,MAAM,YAGrB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACI,cAAAA,WAAD;CACO;CACL,WAAWD,cAAAA,GAAG,8BAA8B,SAAS;CACrD,GAAI;AACL,CAAA,CACF;AACD,UAAU,cAAc;AAExB,MAAM,cAAcH,MAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACK,cAAAA,aAAD;CACO;CACL,WAAWF,cAAAA,GACT,kGACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc;AAE1B,MAAM,WAAWH,MAAM,YACpB,EAAE,WAAW,GAAG,SAAS,QACxB,iBAAA,GAAA,kBAAA,IAAA,CAACM,cAAAA,UAAD;CACO;CACL,WAAWH,cAAAA,GACT,4IACA,SACF;CACA,GAAI;AACL,CAAA,CAEL;AACA,SAAS,cAAc;AAEvB,MAAM,YAAYH,MAAM,YAGrB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACO,cAAAA,WAAD;CACO;CACL,WAAWJ,cAAAA,GACT,0GACA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,UAAU,cAAc;AAExB,MAAM,YAAYH,MAAM,YAGrB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACQ,cAAAA,WAAD;CACO;CACL,WAAWL,cAAAA,GAAG,kDAAkD,SAAS;CACzE,GAAI;AACL,CAAA,CACF;AACD,UAAU,cAAc;AAExB,MAAM,eAAeH,MAAM,YAGxB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACS,cAAAA,cAAD;CACO;CACL,WAAWN,cAAAA,GAAG,+CAA+C,SAAS;CACtE,GAAI;AACL,CAAA,CACF;AACD,aAAa,cAAc"}
1
+ {"version":3,"file":"Table.cjs","names":["React","TablePrimitive","TableHeaderPrimitive","cn","TableBodyPrimitive","TableFooterPrimitive","TableRowPrimitive","TableHeadPrimitive","TableCellPrimitive","TableCaptionPrimitive"],"sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n Table as TablePrimitive,\n TableHeader as TableHeaderPrimitive,\n TableBody as TableBodyPrimitive,\n TableFooter as TableFooterPrimitive,\n TableHead as TableHeadPrimitive,\n TableRow as TableRowPrimitive,\n TableCell as TableCellPrimitive,\n TableCaption as TableCaptionPrimitive,\n} from '../../primitives/table';\n\nconst Table = React.forwardRef<HTMLTableElement, React.HTMLAttributes<HTMLTableElement>>(\n ({ className, ...props }, ref) => <TablePrimitive ref={ref} className={className} {...props} />,\n);\nTable.displayName = 'Table';\n\nconst TableHeader = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableHeaderPrimitive\n ref={ref}\n className={cn(\n `\n border-berget-table-border\n [&_tr]:border-b\n `,\n className,\n )}\n {...props}\n />\n));\nTableHeader.displayName = 'TableHeader';\n\nconst TableBody = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableBodyPrimitive\n ref={ref}\n className={cn('[&_tr:last-child]:border-0', className)}\n {...props}\n />\n));\nTableBody.displayName = 'TableBody';\n\nconst TableFooter = React.forwardRef<\n HTMLTableSectionElement,\n React.HTMLAttributes<HTMLTableSectionElement>\n>(({ className, ...props }, ref) => (\n <TableFooterPrimitive\n ref={ref}\n className={cn(\n `\n border-t border-berget-table-border bg-berget-table-footer-bg\n font-medium\n [&>tr]:last:border-0\n `,\n className,\n )}\n {...props}\n />\n));\nTableFooter.displayName = 'TableFooter';\n\nconst TableRow = React.forwardRef<HTMLTableRowElement, React.HTMLAttributes<HTMLTableRowElement>>(\n ({ className, ...props }, ref) => (\n <TableRowPrimitive\n ref={ref}\n className={cn(\n `\n border-b border-berget-table-border transition-colors\n hover:bg-berget-table-row-hover\n data-[state=selected]:bg-berget-table-row-selected\n `,\n className,\n )}\n {...props}\n />\n ),\n);\nTableRow.displayName = 'TableRow';\n\nconst TableHead = React.forwardRef<\n HTMLTableCellElement,\n React.ThHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <TableHeadPrimitive\n ref={ref}\n className={cn(\n `\n h-12 px-4 text-left align-middle font-medium text-berget-table-head-text\n [&:has([role=checkbox])]:pr-0\n `,\n className,\n )}\n {...props}\n />\n));\nTableHead.displayName = 'TableHead';\n\nconst TableCell = React.forwardRef<\n HTMLTableCellElement,\n React.TdHTMLAttributes<HTMLTableCellElement>\n>(({ className, ...props }, ref) => (\n <TableCellPrimitive\n ref={ref}\n className={cn(\n `\n p-4 align-middle\n [&:has([role=checkbox])]:pr-0\n `,\n className,\n )}\n {...props}\n />\n));\nTableCell.displayName = 'TableCell';\n\nconst TableCaption = React.forwardRef<\n HTMLTableCaptionElement,\n React.HTMLAttributes<HTMLTableCaptionElement>\n>(({ className, ...props }, ref) => (\n <TableCaptionPrimitive\n ref={ref}\n className={cn('mt-4 text-sm text-berget-table-caption-text', className)}\n {...props}\n />\n));\nTableCaption.displayName = 'TableCaption';\n\nexport { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption };\n"],"mappings":";;;;;;;;AAeA,MAAM,QAAQA,MAAM,YACjB,EAAE,WAAW,GAAG,SAAS,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,OAAD;CAAqB;CAAgB;CAAW,GAAI;AAAQ,CAAA,CAChG;AACA,MAAM,cAAc;AAEpB,MAAM,cAAcD,MAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACE,cAAAA,aAAD;CACO;CACL,WAAWC,cAAAA,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc;AAE1B,MAAM,YAAYH,MAAM,YAGrB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACI,cAAAA,WAAD;CACO;CACL,WAAWD,cAAAA,GAAG,8BAA8B,SAAS;CACrD,GAAI;AACL,CAAA,CACF;AACD,UAAU,cAAc;AAExB,MAAM,cAAcH,MAAM,YAGvB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACK,cAAAA,aAAD;CACO;CACL,WAAWF,cAAAA,GACT;;;;SAKA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,YAAY,cAAc;AAE1B,MAAM,WAAWH,MAAM,YACpB,EAAE,WAAW,GAAG,SAAS,QACxB,iBAAA,GAAA,kBAAA,IAAA,CAACM,cAAAA,UAAD;CACO;CACL,WAAWH,cAAAA,GACT;;;;WAKA,SACF;CACA,GAAI;AACL,CAAA,CAEL;AACA,SAAS,cAAc;AAEvB,MAAM,YAAYH,MAAM,YAGrB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACO,cAAAA,WAAD;CACO;CACL,WAAWJ,cAAAA,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,UAAU,cAAc;AAExB,MAAM,YAAYH,MAAM,YAGrB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACQ,cAAAA,WAAD;CACO;CACL,WAAWL,cAAAA,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,UAAU,cAAc;AAExB,MAAM,eAAeH,MAAM,YAGxB,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACS,cAAAA,cAAD;CACO;CACL,WAAWN,cAAAA,GAAG,+CAA+C,SAAS;CACtE,GAAI;AACL,CAAA,CACF;AACD,aAAa,cAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.cts","names":[],"sources":["../../../src/components/table/Table.tsx"],"mappings":";;cAeM,OAAK,MAAA,0BAAA,MAAA,eAAA,oBAAA,MAAA,cAAA;cAKL,aAAW,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAYX,WAAS,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAYT,aAAW,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAeX,UAAQ,MAAA,0BAAA,MAAA,eAAA,uBAAA,MAAA,cAAA;cAcR,WAAS,MAAA,0BAAA,MAAA,iBAAA,wBAAA,MAAA,cAAA;cAeT,WAAS,MAAA,0BAAA,MAAA,iBAAA,wBAAA,MAAA,cAAA;cAYT,cAAY,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA"}
1
+ {"version":3,"file":"Table.d.cts","names":[],"sources":["../../../src/components/table/Table.tsx"],"mappings":";;cAeM,OAAK,MAAA,0BAAA,MAAA,eAAA,oBAAA,MAAA,cAAA;cAKL,aAAW,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAkBX,WAAS,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAYT,aAAW,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAmBX,UAAQ,MAAA,0BAAA,MAAA,eAAA,uBAAA,MAAA,cAAA;cAkBR,WAAS,MAAA,0BAAA,MAAA,iBAAA,wBAAA,MAAA,cAAA;cAkBT,WAAS,MAAA,0BAAA,MAAA,iBAAA,wBAAA,MAAA,cAAA;cAkBT,cAAY,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"Table.d.mts","names":[],"sources":["../../../src/components/table/Table.tsx"],"mappings":";;cAeM,OAAK,MAAA,0BAAA,MAAA,eAAA,oBAAA,MAAA,cAAA;cAKL,aAAW,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAYX,WAAS,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAYT,aAAW,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAeX,UAAQ,MAAA,0BAAA,MAAA,eAAA,uBAAA,MAAA,cAAA;cAcR,WAAS,MAAA,0BAAA,MAAA,iBAAA,wBAAA,MAAA,cAAA;cAeT,WAAS,MAAA,0BAAA,MAAA,iBAAA,wBAAA,MAAA,cAAA;cAYT,cAAY,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA"}
1
+ {"version":3,"file":"Table.d.mts","names":[],"sources":["../../../src/components/table/Table.tsx"],"mappings":";;cAeM,OAAK,MAAA,0BAAA,MAAA,eAAA,oBAAA,MAAA,cAAA;cAKL,aAAW,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAkBX,WAAS,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAYT,aAAW,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA;cAmBX,UAAQ,MAAA,0BAAA,MAAA,eAAA,uBAAA,MAAA,cAAA;cAkBR,WAAS,MAAA,0BAAA,MAAA,iBAAA,wBAAA,MAAA,cAAA;cAkBT,WAAS,MAAA,0BAAA,MAAA,iBAAA,wBAAA,MAAA,cAAA;cAkBT,cAAY,MAAA,0BAAA,MAAA,eAAA,2BAAA,MAAA,cAAA"}