@bergetai/ui 0.15.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/alert/Alert.d.cts +1 -1
- package/dist/components/alert/Alert.d.mts +1 -1
- package/dist/components/alert-dialog/AlertDialog.cjs +26 -5
- package/dist/components/alert-dialog/AlertDialog.cjs.map +1 -1
- package/dist/components/alert-dialog/AlertDialog.d.cts.map +1 -1
- package/dist/components/alert-dialog/AlertDialog.d.mts.map +1 -1
- package/dist/components/alert-dialog/AlertDialog.mjs +26 -5
- package/dist/components/alert-dialog/AlertDialog.mjs.map +1 -1
- package/dist/components/badge/Badge.cjs +12 -3
- package/dist/components/badge/Badge.cjs.map +1 -1
- package/dist/components/badge/Badge.d.cts +1 -1
- package/dist/components/badge/Badge.d.cts.map +1 -1
- package/dist/components/badge/Badge.d.mts +1 -1
- package/dist/components/badge/Badge.d.mts.map +1 -1
- package/dist/components/badge/Badge.mjs +12 -3
- package/dist/components/badge/Badge.mjs.map +1 -1
- package/dist/components/box/Box.cjs +3 -1
- package/dist/components/box/Box.cjs.map +1 -1
- package/dist/components/box/Box.d.cts +2 -2
- package/dist/components/box/Box.d.mts +2 -2
- package/dist/components/box/Box.mjs +3 -1
- package/dist/components/box/Box.mjs.map +1 -1
- package/dist/components/bubble/index.d.cts +2 -0
- package/dist/components/bubble/index.d.mts +2 -0
- package/dist/components/button/Button.cjs +40 -6
- package/dist/components/button/Button.cjs.map +1 -1
- package/dist/components/button/Button.d.cts.map +1 -1
- package/dist/components/button/Button.d.mts.map +1 -1
- package/dist/components/button/Button.mjs +40 -6
- package/dist/components/button/Button.mjs.map +1 -1
- package/dist/components/card/Card.cjs +2 -2
- package/dist/components/card/Card.cjs.map +1 -1
- package/dist/components/card/Card.mjs +2 -2
- package/dist/components/card/Card.mjs.map +1 -1
- package/dist/components/checkbox/Checkbox.cjs +28 -11
- package/dist/components/checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/checkbox/Checkbox.d.cts.map +1 -1
- package/dist/components/checkbox/Checkbox.d.mts.map +1 -1
- package/dist/components/checkbox/Checkbox.mjs +28 -11
- package/dist/components/checkbox/Checkbox.mjs.map +1 -1
- package/dist/components/code-block/CodeBlock.cjs +10 -7
- package/dist/components/code-block/CodeBlock.cjs.map +1 -1
- package/dist/components/code-block/CodeBlock.mjs +10 -7
- package/dist/components/code-block/CodeBlock.mjs.map +1 -1
- package/dist/components/container/Container.cjs +16 -5
- package/dist/components/container/Container.cjs.map +1 -1
- package/dist/components/container/Container.d.cts.map +1 -1
- package/dist/components/container/Container.d.mts.map +1 -1
- package/dist/components/container/Container.mjs +16 -5
- package/dist/components/container/Container.mjs.map +1 -1
- package/dist/components/country-select/CountrySelect.cjs +22 -13
- package/dist/components/country-select/CountrySelect.cjs.map +1 -1
- package/dist/components/country-select/CountrySelect.mjs +22 -13
- package/dist/components/country-select/CountrySelect.mjs.map +1 -1
- package/dist/components/dialog/Dialog.cjs +23 -5
- package/dist/components/dialog/Dialog.cjs.map +1 -1
- package/dist/components/dialog/Dialog.d.cts.map +1 -1
- package/dist/components/dialog/Dialog.d.mts.map +1 -1
- package/dist/components/dialog/Dialog.mjs +23 -5
- package/dist/components/dialog/Dialog.mjs.map +1 -1
- package/dist/components/divider/Divider.cjs +5 -5
- package/dist/components/divider/Divider.cjs.map +1 -1
- package/dist/components/divider/Divider.mjs +5 -5
- package/dist/components/divider/Divider.mjs.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.cjs +8 -2
- package/dist/components/dropdown-menu/DropdownMenu.cjs.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.d.cts +2 -2
- package/dist/components/dropdown-menu/DropdownMenu.d.cts.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.d.mts +2 -2
- package/dist/components/dropdown-menu/DropdownMenu.d.mts.map +1 -1
- package/dist/components/dropdown-menu/DropdownMenu.mjs +8 -2
- package/dist/components/dropdown-menu/DropdownMenu.mjs.map +1 -1
- package/dist/components/empty/Empty.cjs +4 -1
- package/dist/components/empty/Empty.cjs.map +1 -1
- package/dist/components/empty/Empty.d.cts.map +1 -1
- package/dist/components/empty/Empty.d.mts.map +1 -1
- package/dist/components/empty/Empty.mjs +4 -1
- package/dist/components/empty/Empty.mjs.map +1 -1
- package/dist/components/grid/Grid.cjs +11 -1
- package/dist/components/grid/Grid.cjs.map +1 -1
- package/dist/components/grid/Grid.d.cts +2 -2
- package/dist/components/grid/Grid.d.mts +2 -2
- package/dist/components/grid/Grid.mjs +11 -1
- package/dist/components/grid/Grid.mjs.map +1 -1
- package/dist/components/input-group/InputGroup.cjs +50 -0
- package/dist/components/input-group/InputGroup.cjs.map +1 -0
- package/dist/components/input-group/InputGroup.d.cts +33 -0
- package/dist/components/input-group/InputGroup.d.cts.map +1 -0
- package/dist/components/input-group/InputGroup.d.mts +33 -0
- package/dist/components/input-group/InputGroup.d.mts.map +1 -0
- package/dist/components/input-group/InputGroup.mjs +45 -0
- package/dist/components/input-group/InputGroup.mjs.map +1 -0
- package/dist/components/input-group/index.d.cts +3 -0
- package/dist/components/input-group/index.d.mts +3 -0
- package/dist/components/item/Item.cjs +4 -1
- package/dist/components/item/Item.cjs.map +1 -1
- package/dist/components/item/Item.d.cts.map +1 -1
- package/dist/components/item/Item.d.mts.map +1 -1
- package/dist/components/item/Item.mjs +4 -1
- package/dist/components/item/Item.mjs.map +1 -1
- package/dist/components/link/Link.cjs +32 -8
- package/dist/components/link/Link.cjs.map +1 -1
- package/dist/components/link/Link.d.cts +1 -1
- package/dist/components/link/Link.d.cts.map +1 -1
- package/dist/components/link/Link.d.mts +1 -1
- package/dist/components/link/Link.d.mts.map +1 -1
- package/dist/components/link/Link.mjs +32 -8
- package/dist/components/link/Link.mjs.map +1 -1
- package/dist/components/list/List.cjs +15 -6
- package/dist/components/list/List.cjs.map +1 -1
- package/dist/components/list/List.d.cts.map +1 -1
- package/dist/components/list/List.d.mts.map +1 -1
- package/dist/components/list/List.mjs +15 -6
- package/dist/components/list/List.mjs.map +1 -1
- package/dist/components/message/index.d.cts +2 -0
- package/dist/components/message/index.d.mts +2 -0
- package/dist/components/message-scroller/index.d.cts +2 -0
- package/dist/components/message-scroller/index.d.mts +2 -0
- package/dist/components/model-card/ModelCard.cjs +12 -9
- package/dist/components/model-card/ModelCard.cjs.map +1 -1
- package/dist/components/model-card/ModelCard.mjs +12 -9
- package/dist/components/model-card/ModelCard.mjs.map +1 -1
- package/dist/components/navigation-menu/NavigationMenu.cjs +43 -7
- package/dist/components/navigation-menu/NavigationMenu.cjs.map +1 -1
- package/dist/components/navigation-menu/NavigationMenu.d.cts.map +1 -1
- package/dist/components/navigation-menu/NavigationMenu.d.mts.map +1 -1
- package/dist/components/navigation-menu/NavigationMenu.mjs +43 -7
- package/dist/components/navigation-menu/NavigationMenu.mjs.map +1 -1
- package/dist/components/progress/Progress.cjs +4 -1
- package/dist/components/progress/Progress.cjs.map +1 -1
- package/dist/components/progress/Progress.mjs +4 -1
- package/dist/components/progress/Progress.mjs.map +1 -1
- package/dist/components/search-input/SearchInput.cjs +1 -1
- package/dist/components/search-input/SearchInput.cjs.map +1 -1
- package/dist/components/search-input/SearchInput.mjs +1 -1
- package/dist/components/search-input/SearchInput.mjs.map +1 -1
- package/dist/components/sidebar/Sidebar.cjs +15 -6
- package/dist/components/sidebar/Sidebar.cjs.map +1 -1
- package/dist/components/sidebar/Sidebar.d.cts.map +1 -1
- package/dist/components/sidebar/Sidebar.d.mts.map +1 -1
- package/dist/components/sidebar/Sidebar.mjs +15 -6
- package/dist/components/sidebar/Sidebar.mjs.map +1 -1
- package/dist/components/slider/Slider.cjs +23 -0
- package/dist/components/slider/Slider.cjs.map +1 -0
- package/dist/components/slider/Slider.d.cts +20 -0
- package/dist/components/slider/Slider.d.cts.map +1 -0
- package/dist/components/slider/Slider.d.mts +20 -0
- package/dist/components/slider/Slider.d.mts.map +1 -0
- package/dist/components/slider/Slider.mjs +23 -0
- package/dist/components/slider/Slider.mjs.map +1 -0
- package/dist/components/slider/index.d.cts +2 -0
- package/dist/components/slider/index.d.mts +2 -0
- package/dist/components/switch/Switch.cjs +42 -11
- package/dist/components/switch/Switch.cjs.map +1 -1
- package/dist/components/switch/Switch.d.cts.map +1 -1
- package/dist/components/switch/Switch.d.mts.map +1 -1
- package/dist/components/switch/Switch.mjs +42 -11
- package/dist/components/switch/Switch.mjs.map +1 -1
- package/dist/components/table/Table.cjs +22 -5
- package/dist/components/table/Table.cjs.map +1 -1
- package/dist/components/table/Table.d.cts.map +1 -1
- package/dist/components/table/Table.d.mts.map +1 -1
- package/dist/components/table/Table.mjs +22 -5
- package/dist/components/table/Table.mjs.map +1 -1
- package/dist/components/theme-provider/ThemeToggle.cjs +9 -3
- package/dist/components/theme-provider/ThemeToggle.cjs.map +1 -1
- package/dist/components/theme-provider/ThemeToggle.mjs +9 -3
- package/dist/components/theme-provider/ThemeToggle.mjs.map +1 -1
- package/dist/components/tooltip/Tooltip.d.cts +1 -1
- package/dist/components/tooltip/Tooltip.d.mts +1 -1
- package/dist/components/typography/Typography.cjs +19 -13
- package/dist/components/typography/Typography.cjs.map +1 -1
- package/dist/components/typography/Typography.d.cts.map +1 -1
- package/dist/components/typography/Typography.d.mts.map +1 -1
- package/dist/components/typography/Typography.mjs +19 -13
- package/dist/components/typography/Typography.mjs.map +1 -1
- package/dist/components/window-frame/WindowFrame.cjs +18 -8
- package/dist/components/window-frame/WindowFrame.cjs.map +1 -1
- package/dist/components/window-frame/WindowFrame.mjs +18 -8
- package/dist/components/window-frame/WindowFrame.mjs.map +1 -1
- package/dist/index.cjs +49 -1
- package/dist/index.d.cts +12 -1
- package/dist/index.d.mts +12 -1
- package/dist/index.mjs +8 -2
- package/dist/primitives/bubble.cjs +80 -0
- package/dist/primitives/bubble.cjs.map +1 -0
- package/dist/primitives/bubble.d.cts +19 -0
- package/dist/primitives/bubble.d.cts.map +1 -0
- package/dist/primitives/bubble.d.mts +19 -0
- package/dist/primitives/bubble.d.mts.map +1 -0
- package/dist/primitives/bubble.mjs +75 -0
- package/dist/primitives/bubble.mjs.map +1 -0
- package/dist/primitives/button.cjs +1 -2
- package/dist/primitives/button.cjs.map +1 -1
- package/dist/primitives/button.d.cts +2 -2
- package/dist/primitives/button.d.cts.map +1 -1
- package/dist/primitives/button.d.mts +2 -2
- package/dist/primitives/button.d.mts.map +1 -1
- package/dist/primitives/button.mjs +1 -2
- package/dist/primitives/button.mjs.map +1 -1
- package/dist/primitives/field.d.cts +1 -1
- package/dist/primitives/field.d.mts +1 -1
- package/dist/primitives/input-group.cjs +37 -1
- package/dist/primitives/input-group.cjs.map +1 -1
- package/dist/primitives/input-group.d.cts +21 -0
- package/dist/primitives/input-group.d.cts.map +1 -0
- package/dist/primitives/input-group.d.mts +21 -0
- package/dist/primitives/input-group.d.mts.map +1 -0
- package/dist/primitives/input-group.mjs +34 -2
- package/dist/primitives/input-group.mjs.map +1 -1
- package/dist/primitives/item.d.cts +1 -1
- package/dist/primitives/item.d.mts +1 -1
- package/dist/primitives/message-scroller.cjs +69 -0
- package/dist/primitives/message-scroller.cjs.map +1 -0
- package/dist/primitives/message-scroller.d.cts +13 -0
- package/dist/primitives/message-scroller.d.cts.map +1 -0
- package/dist/primitives/message-scroller.d.mts +13 -0
- package/dist/primitives/message-scroller.d.mts.map +1 -0
- package/dist/primitives/message-scroller.mjs +62 -0
- package/dist/primitives/message-scroller.mjs.map +1 -0
- package/dist/primitives/message.cjs +58 -0
- package/dist/primitives/message.cjs.map +1 -0
- package/dist/primitives/message.d.cts +13 -0
- package/dist/primitives/message.d.cts.map +1 -0
- package/dist/primitives/message.d.mts +13 -0
- package/dist/primitives/message.d.mts.map +1 -0
- package/dist/primitives/message.mjs +51 -0
- package/dist/primitives/message.mjs.map +1 -0
- package/dist/primitives/sidebar.cjs +1 -1
- package/dist/primitives/sidebar.mjs +1 -1
- package/dist/primitives/slider.cjs +35 -0
- package/dist/primitives/slider.cjs.map +1 -0
- package/dist/primitives/slider.d.cts +6 -0
- package/dist/primitives/slider.d.cts.map +1 -0
- package/dist/primitives/slider.d.mts +6 -0
- package/dist/primitives/slider.d.mts.map +1 -0
- package/dist/primitives/slider.mjs +35 -0
- package/dist/primitives/slider.mjs.map +1 -0
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenu.mjs","names":["NavigationMenu","NavigationMenuPrimitive"],"sources":["../../../src/components/navigation-menu/NavigationMenu.tsx"],"sourcesContent":["'use client';\n\nimport { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';\nimport { cva } from 'class-variance-authority';\nimport { ChevronDown } from 'lucide-react';\n\nimport { cn } from '../../lib/utils';\nimport {\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuIndicator,\n} from '../../primitives/navigation-menu';\n\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nfunction NavigationMenu({\n align = 'start',\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Root.Props & Pick<NavigationMenuPrimitive.Positioner.Props, 'align'>) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n className={cn(\n
|
|
1
|
+
{"version":3,"file":"NavigationMenu.mjs","names":["NavigationMenu","NavigationMenuPrimitive"],"sources":["../../../src/components/navigation-menu/NavigationMenu.tsx"],"sourcesContent":["'use client';\n\nimport { NavigationMenu as NavigationMenuPrimitive } from '@base-ui/react/navigation-menu';\nimport { cva } from 'class-variance-authority';\nimport { ChevronDown } from 'lucide-react';\n\nimport { cn } from '../../lib/utils';\nimport {\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuIndicator,\n} from '../../primitives/navigation-menu';\n\n/* ------------------------------------------------------------------ */\n/* Root */\n/* ------------------------------------------------------------------ */\n\nfunction NavigationMenu({\n align = 'start',\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Root.Props & Pick<NavigationMenuPrimitive.Positioner.Props, 'align'>) {\n return (\n <NavigationMenuPrimitive.Root\n data-slot=\"navigation-menu\"\n className={cn(\n `\n group/navigation-menu relative flex max-w-max flex-1 items-center\n justify-center\n `,\n className,\n )}\n {...props}\n >\n {children}\n <NavigationMenuPositioner align={align} />\n </NavigationMenuPrimitive.Root>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Trigger */\n/* ------------------------------------------------------------------ */\n\nconst navigationMenuTriggerStyle = cva(\n `\n group/navigation-menu-trigger inline-flex h-9 w-max items-center\n justify-center rounded-berget-xs px-2.5 py-1.5 text-sm font-medium\n transition-all outline-none\n hover:bg-berget-surface-02\n focus:bg-berget-surface-02\n focus-visible:ring-3 focus-visible:ring-berget-ring/50\n focus-visible:outline-1\n disabled:pointer-events-none disabled:opacity-50\n data-open:bg-berget-surface-02/50\n data-open:hover:bg-berget-surface-02\n data-open:focus:bg-berget-surface-02\n data-popup-open:bg-berget-surface-02/50\n data-popup-open:hover:bg-berget-surface-02\n `,\n);\n\nfunction NavigationMenuTrigger({\n className,\n children,\n ...props\n}: NavigationMenuPrimitive.Trigger.Props) {\n return (\n <NavigationMenuPrimitive.Trigger\n data-slot=\"navigation-menu-trigger\"\n className={cn(navigationMenuTriggerStyle(), 'group', className)}\n {...props}\n >\n {children}{' '}\n <ChevronDown\n className=\"\n relative top-px ml-1 size-3 transition duration-300\n group-data-open/navigation-menu-trigger:rotate-180\n group-data-popup-open/navigation-menu-trigger:rotate-180\n \"\n aria-hidden=\"true\"\n />\n </NavigationMenuPrimitive.Trigger>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Link */\n/* ------------------------------------------------------------------ */\n\nfunction NavigationMenuLink({ className, ...props }: NavigationMenuPrimitive.Link.Props) {\n return (\n <NavigationMenuPrimitive.Link\n data-slot=\"navigation-menu-link\"\n className={cn(\n `\n flex items-center gap-2 rounded-berget-xs p-2 text-sm transition-all\n outline-none\n hover:bg-berget-surface-02\n focus:bg-berget-surface-02\n focus-visible:ring-3 focus-visible:ring-berget-ring/50\n focus-visible:outline-1\n in-data-[slot=navigation-menu-content]:rounded-berget-xs\n data-active:bg-berget-surface-02/50\n data-active:hover:bg-berget-surface-02\n data-active:focus:bg-berget-surface-02\n [&_svg:not([class*='size-'])]:size-4\n `,\n className,\n )}\n {...props}\n />\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Positioner (portal + popup + viewport) */\n/* ------------------------------------------------------------------ */\n\nfunction NavigationMenuPositioner({\n className,\n side = 'bottom',\n sideOffset = 8,\n align = 'start',\n alignOffset = 0,\n ...props\n}: NavigationMenuPrimitive.Positioner.Props) {\n return (\n <NavigationMenuPrimitive.Portal>\n <NavigationMenuPrimitive.Positioner\n side={side}\n sideOffset={sideOffset}\n align={align}\n alignOffset={alignOffset}\n className={cn(\n `\n isolate z-50 h-(--positioner-height) w-(--positioner-width)\n max-w-(--available-width) transition-[top,left,right,bottom]\n duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)]\n data-instant:transition-none\n data-[side=bottom]:before:inset-x-0\n data-[side=bottom]:before:top-[-10px]\n `,\n className,\n )}\n {...props}\n >\n <NavigationMenuPrimitive.Popup\n className=\"\n data-[ending-style]:easing-[ease]\n xs:w-(--popup-width)\n relative h-(--popup-height) w-(--popup-width)\n origin-(--transform-origin) rounded-berget-xs bg-berget-popover\n text-berget-popover-foreground shadow-berget-lg ring-1\n ring-berget-border\n transition-[opacity,transform,width,height,scale,translate]\n duration-[0.35s] ease-[cubic-bezier(0.22,1,0.36,1)] outline-none\n data-ending-style:scale-90 data-ending-style:opacity-0\n data-ending-style:duration-150\n data-starting-style:scale-90 data-starting-style:opacity-0\n \"\n >\n <NavigationMenuPrimitive.Viewport\n className=\"\n relative size-full overflow-hidden\n \"\n />\n </NavigationMenuPrimitive.Popup>\n </NavigationMenuPrimitive.Positioner>\n </NavigationMenuPrimitive.Portal>\n );\n}\n\n/* ------------------------------------------------------------------ */\n/* Exports */\n/* ------------------------------------------------------------------ */\n\nexport {\n navigationMenuTriggerStyle,\n NavigationMenu,\n NavigationMenuList,\n NavigationMenuItem,\n NavigationMenuContent,\n NavigationMenuTrigger,\n NavigationMenuLink,\n NavigationMenuIndicator,\n NavigationMenuPositioner,\n};\n"],"mappings":";;;;;;;;AAkBA,SAASA,iBAAe,EACtB,QAAQ,SACR,WACA,UACA,GAAG,SAC4F;CAC/F,OACE,qBAACC,eAAwB,MAAzB;EACE,aAAU;EACV,WAAW,GACT;;;WAIA,SACF;EACA,GAAI;EATN,UAAA,CAWG,UACD,oBAAC,0BAAD,EAAiC,MAAQ,CAAA,CACb;;AAElC;AAMA,MAAM,6BAA6B,IACjC;;;;;;;;;;;;;;GAeF;AAEA,SAAS,sBAAsB,EAC7B,WACA,UACA,GAAG,SACqC;CACxC,OACE,qBAACA,eAAwB,SAAzB;EACE,aAAU;EACV,WAAW,GAAG,2BAA2B,GAAG,SAAS,SAAS;EAC9D,GAAI;EAHN,UAAA;GAKG;GAAU;GACX,oBAAC,aAAD;IACE,WAAU;IAKV,eAAY;GACb,CAAA;EAC8B;;AAErC;AAMA,SAAS,mBAAmB,EAAE,WAAW,GAAG,SAA6C;CACvF,OACE,oBAACA,eAAwB,MAAzB;EACE,aAAU;EACV,WAAW,GACT;;;;;;;;;;;;WAaA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAMA,SAAS,yBAAyB,EAChC,WACA,OAAO,UACP,aAAa,GACb,QAAQ,SACR,cAAc,GACd,GAAG,SACwC;CAC3C,OACE,oBAACA,eAAwB,QAAzB,EAAA,UACE,oBAACA,eAAwB,YAAzB;EACQ;EACM;EACL;EACM;EACb,WAAW,GACT;;;;;;;aAQA,SACF;EACA,GAAI;EAEJ,UAAA,oBAACA,eAAwB,OAAzB;GACE,WAAU;GAcV,UAAA,oBAACA,eAAwB,UAAzB,EACE,WAAU,+DAGX,CAAA;EAC4B,CAAA;CACG,CAAA,EACN,CAAA;AAEpC"}
|
|
@@ -10,7 +10,10 @@ const Progress = react.forwardRef(({ className, value, ...props }, ref) => {
|
|
|
10
10
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_progress.Progress, {
|
|
11
11
|
ref,
|
|
12
12
|
value,
|
|
13
|
-
className: require_utils.cn(value == null &&
|
|
13
|
+
className: require_utils.cn(value == null && `
|
|
14
|
+
**:data-[slot=progress-indicator]:w-1/3
|
|
15
|
+
**:data-[slot=progress-indicator]:animate-progress-indeterminate
|
|
16
|
+
`, className),
|
|
14
17
|
...props
|
|
15
18
|
});
|
|
16
19
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.cjs","names":["React","ProgressPrimitive","cn"],"sources":["../../../src/components/progress/Progress.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n ProgressIndicator,\n ProgressLabel,\n Progress as ProgressPrimitive,\n ProgressTrack,\n ProgressValue,\n} from '../../primitives/progress';\n\nexport type ProgressProps = React.ComponentProps<typeof ProgressPrimitive>;\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value, ...props }, ref) => {\n const indeterminate = value == null;\n return (\n <ProgressPrimitive\n ref={ref}\n value={value}\n className={cn(\n indeterminate &&\n
|
|
1
|
+
{"version":3,"file":"Progress.cjs","names":["React","ProgressPrimitive","cn"],"sources":["../../../src/components/progress/Progress.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n ProgressIndicator,\n ProgressLabel,\n Progress as ProgressPrimitive,\n ProgressTrack,\n ProgressValue,\n} from '../../primitives/progress';\n\nexport type ProgressProps = React.ComponentProps<typeof ProgressPrimitive>;\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value, ...props }, ref) => {\n const indeterminate = value == null;\n return (\n <ProgressPrimitive\n ref={ref}\n value={value}\n className={cn(\n indeterminate &&\n `\n **:data-[slot=progress-indicator]:w-1/3\n **:data-[slot=progress-indicator]:animate-progress-indeterminate\n `,\n className,\n )}\n {...props}\n />\n );\n },\n);\nProgress.displayName = 'Progress';\n\nexport { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue };\n"],"mappings":";;;;;;;;AAcA,MAAM,WAAWA,MAAM,YACpB,EAAE,WAAW,OAAO,GAAG,SAAS,QAAQ;CAEvC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,iBAAAA,UAAD;EACO;EACE;EACP,WAAWC,cAAAA,GALO,SAAS,QAOvB;;;eAIF,SACF;EACA,GAAI;CACL,CAAA;AAEL,CACF;AACA,SAAS,cAAc"}
|
|
@@ -8,7 +8,10 @@ const Progress = React.forwardRef(({ className, value, ...props }, ref) => {
|
|
|
8
8
|
return /* @__PURE__ */ jsx(Progress$1, {
|
|
9
9
|
ref,
|
|
10
10
|
value,
|
|
11
|
-
className: cn(value == null &&
|
|
11
|
+
className: cn(value == null && `
|
|
12
|
+
**:data-[slot=progress-indicator]:w-1/3
|
|
13
|
+
**:data-[slot=progress-indicator]:animate-progress-indeterminate
|
|
14
|
+
`, className),
|
|
12
15
|
...props
|
|
13
16
|
});
|
|
14
17
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Progress.mjs","names":["ProgressPrimitive"],"sources":["../../../src/components/progress/Progress.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n ProgressIndicator,\n ProgressLabel,\n Progress as ProgressPrimitive,\n ProgressTrack,\n ProgressValue,\n} from '../../primitives/progress';\n\nexport type ProgressProps = React.ComponentProps<typeof ProgressPrimitive>;\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value, ...props }, ref) => {\n const indeterminate = value == null;\n return (\n <ProgressPrimitive\n ref={ref}\n value={value}\n className={cn(\n indeterminate &&\n
|
|
1
|
+
{"version":3,"file":"Progress.mjs","names":["ProgressPrimitive"],"sources":["../../../src/components/progress/Progress.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n ProgressIndicator,\n ProgressLabel,\n Progress as ProgressPrimitive,\n ProgressTrack,\n ProgressValue,\n} from '../../primitives/progress';\n\nexport type ProgressProps = React.ComponentProps<typeof ProgressPrimitive>;\n\nconst Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ className, value, ...props }, ref) => {\n const indeterminate = value == null;\n return (\n <ProgressPrimitive\n ref={ref}\n value={value}\n className={cn(\n indeterminate &&\n `\n **:data-[slot=progress-indicator]:w-1/3\n **:data-[slot=progress-indicator]:animate-progress-indeterminate\n `,\n className,\n )}\n {...props}\n />\n );\n },\n);\nProgress.displayName = 'Progress';\n\nexport { Progress, ProgressIndicator, ProgressLabel, ProgressTrack, ProgressValue };\n"],"mappings":";;;;;;AAcA,MAAM,WAAW,MAAM,YACpB,EAAE,WAAW,OAAO,GAAG,SAAS,QAAQ;CAEvC,OACE,oBAACA,YAAD;EACO;EACE;EACP,WAAW,GALO,SAAS,QAOvB;;;eAIF,SACF;EACA,GAAI;CACL,CAAA;AAEL,CACF;AACA,SAAS,cAAc"}
|
|
@@ -12,7 +12,7 @@ const SearchInput = ({ type = "search", placeholder = "Search...", className, re
|
|
|
12
12
|
"data-slot": "search-input",
|
|
13
13
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.Search, {
|
|
14
14
|
"aria-hidden": "true",
|
|
15
|
-
className: "pointer-events-none absolute left-2.5 size-4
|
|
15
|
+
className: "\n pointer-events-none absolute left-2.5 size-4\n text-berget-muted-foreground\n "
|
|
16
16
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_input.Input, {
|
|
17
17
|
ref,
|
|
18
18
|
type,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.cjs","names":["Search","Input","cn"],"sources":["../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Search } from 'lucide-react';\nimport { cn } from '../../lib/utils';\nimport { Input } from '../../primitives/input';\n\nexport type SearchInputProps = React.ComponentProps<'input'>;\n\nconst SearchInput = ({\n type = 'search',\n placeholder = 'Search...',\n className,\n ref,\n ...props\n}: SearchInputProps) => (\n <div className=\"relative flex w-full items-center\" data-slot=\"search-input\">\n <Search\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-2.5 size-4
|
|
1
|
+
{"version":3,"file":"SearchInput.cjs","names":["Search","Input","cn"],"sources":["../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Search } from 'lucide-react';\nimport { cn } from '../../lib/utils';\nimport { Input } from '../../primitives/input';\n\nexport type SearchInputProps = React.ComponentProps<'input'>;\n\nconst SearchInput = ({\n type = 'search',\n placeholder = 'Search...',\n className,\n ref,\n ...props\n}: SearchInputProps) => (\n <div className=\"relative flex w-full items-center\" data-slot=\"search-input\">\n <Search\n aria-hidden=\"true\"\n className=\"\n pointer-events-none absolute left-2.5 size-4\n text-berget-muted-foreground\n \"\n />\n <Input\n ref={ref}\n type={type}\n placeholder={placeholder}\n className={cn('rounded-full pl-8', className)}\n {...props}\n />\n </div>\n);\nSearchInput.displayName = 'SearchInput';\n\nexport { SearchInput };\n"],"mappings":";;;;;;;;;AASA,MAAM,eAAe,EACnB,OAAO,UACP,cAAc,aACd,WACA,KACA,GAAG,YAEH,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;CAAK,WAAU;CAAoC,aAAU;CAA7D,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACA,aAAAA,QAAD;EACE,eAAY;EACZ,WAAU;CAIX,CAAA,GACD,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,OAAD;EACO;EACC;EACO;EACb,WAAWC,cAAAA,GAAG,qBAAqB,SAAS;EAC5C,GAAI;CACL,CAAA,CACE;;AAEP,YAAY,cAAc"}
|
|
@@ -10,7 +10,7 @@ const SearchInput = ({ type = "search", placeholder = "Search...", className, re
|
|
|
10
10
|
"data-slot": "search-input",
|
|
11
11
|
children: [/* @__PURE__ */ jsx(Search, {
|
|
12
12
|
"aria-hidden": "true",
|
|
13
|
-
className: "pointer-events-none absolute left-2.5 size-4
|
|
13
|
+
className: "\n pointer-events-none absolute left-2.5 size-4\n text-berget-muted-foreground\n "
|
|
14
14
|
}), /* @__PURE__ */ jsx(Input, {
|
|
15
15
|
ref,
|
|
16
16
|
type,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SearchInput.mjs","names":[],"sources":["../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Search } from 'lucide-react';\nimport { cn } from '../../lib/utils';\nimport { Input } from '../../primitives/input';\n\nexport type SearchInputProps = React.ComponentProps<'input'>;\n\nconst SearchInput = ({\n type = 'search',\n placeholder = 'Search...',\n className,\n ref,\n ...props\n}: SearchInputProps) => (\n <div className=\"relative flex w-full items-center\" data-slot=\"search-input\">\n <Search\n aria-hidden=\"true\"\n className=\"pointer-events-none absolute left-2.5 size-4
|
|
1
|
+
{"version":3,"file":"SearchInput.mjs","names":[],"sources":["../../../src/components/search-input/SearchInput.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Search } from 'lucide-react';\nimport { cn } from '../../lib/utils';\nimport { Input } from '../../primitives/input';\n\nexport type SearchInputProps = React.ComponentProps<'input'>;\n\nconst SearchInput = ({\n type = 'search',\n placeholder = 'Search...',\n className,\n ref,\n ...props\n}: SearchInputProps) => (\n <div className=\"relative flex w-full items-center\" data-slot=\"search-input\">\n <Search\n aria-hidden=\"true\"\n className=\"\n pointer-events-none absolute left-2.5 size-4\n text-berget-muted-foreground\n \"\n />\n <Input\n ref={ref}\n type={type}\n placeholder={placeholder}\n className={cn('rounded-full pl-8', className)}\n {...props}\n />\n </div>\n);\nSearchInput.displayName = 'SearchInput';\n\nexport { SearchInput };\n"],"mappings":";;;;;;;AASA,MAAM,eAAe,EACnB,OAAO,UACP,cAAc,aACd,WACA,KACA,GAAG,YAEH,qBAAC,OAAD;CAAK,WAAU;CAAoC,aAAU;CAA7D,UAAA,CACE,oBAAC,QAAD;EACE,eAAY;EACZ,WAAU;CAIX,CAAA,GACD,oBAAC,OAAD;EACO;EACC;EACO;EACb,WAAW,GAAG,qBAAqB,SAAS;EAC5C,GAAI;CACL,CAAA,CACE;;AAEP,YAAY,cAAc"}
|
|
@@ -49,7 +49,7 @@ const sizingSubButtonClasses = "data-[size=md]:text-base data-[size=sm]:text-bas
|
|
|
49
49
|
* set in small uppercase type with wide tracking. */
|
|
50
50
|
function SidebarGroupLabel({ className, ...props }) {
|
|
51
51
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sidebar.SidebarGroupLabel, {
|
|
52
|
-
className: require_utils.cn("px-3
|
|
52
|
+
className: require_utils.cn("px-3 tracking-caption uppercase", className),
|
|
53
53
|
...props
|
|
54
54
|
});
|
|
55
55
|
}
|
|
@@ -91,7 +91,10 @@ function SidebarGroup({ className, ...props }) {
|
|
|
91
91
|
* group). */
|
|
92
92
|
function SidebarFooter({ className, ...props }) {
|
|
93
93
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sidebar.SidebarFooter, {
|
|
94
|
-
className: require_utils.cn(
|
|
94
|
+
className: require_utils.cn(`
|
|
95
|
+
border-t border-berget-border
|
|
96
|
+
group-data-[collapsible=icon]:px-2.5
|
|
97
|
+
`, className),
|
|
95
98
|
...props
|
|
96
99
|
});
|
|
97
100
|
}
|
|
@@ -102,7 +105,10 @@ function SidebarFooter({ className, ...props }) {
|
|
|
102
105
|
* against the full 60px rail width. */
|
|
103
106
|
function SidebarHeader({ className, ...props }) {
|
|
104
107
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_sidebar.SidebarHeader, {
|
|
105
|
-
className: require_utils.cn(
|
|
108
|
+
className: require_utils.cn(`
|
|
109
|
+
border-b border-berget-border py-0
|
|
110
|
+
group-data-[collapsible=icon]:px-0
|
|
111
|
+
`, className),
|
|
106
112
|
...props
|
|
107
113
|
});
|
|
108
114
|
}
|
|
@@ -139,9 +145,9 @@ function SidebarLogo() {
|
|
|
139
145
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_BergetLogo.BergetLogo, {
|
|
140
146
|
variant: "logotype",
|
|
141
147
|
size: 32,
|
|
142
|
-
className: "shrink-0 transition-[opacity,visibility] duration-150
|
|
148
|
+
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 "
|
|
143
149
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
144
|
-
className: "pointer-events-none invisible absolute inset-y-0 left-0 flex w-15
|
|
150
|
+
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 ",
|
|
145
151
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_BergetLogo.BergetLogo, {
|
|
146
152
|
variant: "symbol",
|
|
147
153
|
size: 32
|
|
@@ -156,7 +162,10 @@ function SidebarLogo() {
|
|
|
156
162
|
* square. Compose the SidebarTrigger and a title inside. */
|
|
157
163
|
function SidebarPageHeader({ className, ...props }) {
|
|
158
164
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("header", {
|
|
159
|
-
className: require_utils.cn(
|
|
165
|
+
className: require_utils.cn(`
|
|
166
|
+
flex h-[calc(3.75rem+1px)] items-center gap-2 border-b
|
|
167
|
+
border-berget-border px-4
|
|
168
|
+
`, className),
|
|
160
169
|
...props
|
|
161
170
|
});
|
|
162
171
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.cjs","names":["SidebarGroupLabelPrimitive","cn","SidebarProviderPrimitive","SidebarInsetPrimitive","SidebarGroupPrimitive","SidebarFooterPrimitive","SidebarHeaderPrimitive","BergetLogo","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,iBAAA,GAAA,kBAAA,IAAA,CAACA,gBAAAA,mBAAD;EACE,WAAWC,cAAAA,GAAG,mCAAmC,SAAS;EAC1D,GAAI;CACL,CAAA;AAEL;;;AAIA,SAAS,gBAAgB,EACvB,WACA,OACA,GAAG,SACqD;CACxD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,iBAAD;EACa;EACX,OACE;GACE,wBAAwB;GACxB,GAAG;EACL;EAEF,GAAI;CACL,CAAA;AAEL;;;;;;;;;AAUA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA6D;CACjG,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,cAAD;EAAuB,WAAWF,cAAAA,GAAG,WAAW,SAAS;EAAG,GAAI;CAAQ,CAAA;AACjF;;AAGA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA6D;CACjG,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACG,gBAAAA,cAAD;EACE,WAAWH,cAAAA,GAAG,wCAAwC,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL;;;;AAKA,SAAS,cAAc,EACrB,WACA,GAAG,SACmD;CACtD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACI,gBAAAA,eAAD;EACE,WAAWJ,cAAAA,GACT,sEACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;;;;;AAOA,SAAS,cAAc,EACrB,WACA,GAAG,SACmD;CACtD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACK,gBAAAA,eAAD;EACE,WAAWL,cAAAA,GACT,yEACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,cAAc;CACrB,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACK,gBAAAA,eAAD;EAAwB,WAAU;EAChC,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,YAAD;IACE,SAAQ;IACR,MAAM;IACN,WAAU;GACX,CAAA,GACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IAAM,WAAU;IACd,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACA,mBAAAA,YAAD;KAAY,SAAQ;KAAS,MAAM;IAAK,CAAA;GACpC,CAAA,CACH;;CACiB,CAAA;AAE5B;;;;;AAMA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAyC;CAClF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;EACE,WAAWN,cAAAA,GACT,oFACA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAMA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAiC;CAC1E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACO,gBAAAA,mBAAD;EACE,WAAWP,cAAAA,GAAG,yBAAyB,uBAAuB,SAAS;EACvE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,qBAAqB,EAAE,WAAW,GAAG,SAAoC;CAChF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACQ,gBAAAA,sBAAD;EACE,WAAWR,cAAAA,GAAG,wBAAwB,wBAAwB,SAAS;EACvE,GAAI;CACL,CAAA;AAEL"}
|
|
1
|
+
{"version":3,"file":"Sidebar.cjs","names":["SidebarGroupLabelPrimitive","cn","SidebarProviderPrimitive","SidebarInsetPrimitive","SidebarGroupPrimitive","SidebarFooterPrimitive","SidebarHeaderPrimitive","BergetLogo","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,iBAAA,GAAA,kBAAA,IAAA,CAACA,gBAAAA,mBAAD;EACE,WAAWC,cAAAA,GAAG,mCAAmC,SAAS;EAC1D,GAAI;CACL,CAAA;AAEL;;;AAIA,SAAS,gBAAgB,EACvB,WACA,OACA,GAAG,SACqD;CACxD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,iBAAD;EACa;EACX,OACE;GACE,wBAAwB;GACxB,GAAG;EACL;EAEF,GAAI;CACL,CAAA;AAEL;;;;;;;;;AAUA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA6D;CACjG,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACC,gBAAAA,cAAD;EAAuB,WAAWF,cAAAA,GAAG,WAAW,SAAS;EAAG,GAAI;CAAQ,CAAA;AACjF;;AAGA,SAAS,aAAa,EAAE,WAAW,GAAG,SAA6D;CACjG,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACG,gBAAAA,cAAD;EACE,WAAWH,cAAAA,GAAG,wCAAwC,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL;;;;AAKA,SAAS,cAAc,EACrB,WACA,GAAG,SACmD;CACtD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACI,gBAAAA,eAAD;EACE,WAAWJ,cAAAA,GACT;;;WAIA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;;;;;AAOA,SAAS,cAAc,EACrB,WACA,GAAG,SACmD;CACtD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACK,gBAAAA,eAAD;EACE,WAAWL,cAAAA,GACT;;;WAIA,SACF;EACA,GAAI;CACL,CAAA;AAEL;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,cAAc;CACrB,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACK,gBAAAA,eAAD;EAAwB,WAAU;EAChC,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;GAAK,WAAU;GAAf,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,YAAD;IACE,SAAQ;IACR,MAAM;IACN,WAAU;GAMX,CAAA,GACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,QAAD;IACE,WAAU;IAUV,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACA,mBAAAA,YAAD;KAAY,SAAQ;KAAS,MAAM;IAAK,CAAA;GACpC,CAAA,CACH;;CACiB,CAAA;AAE5B;;;;;AAMA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAyC;CAClF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,UAAD;EACE,WAAWN,cAAAA,GACT;;;WAIA,SACF;EACA,GAAI;CACL,CAAA;AAEL;AAMA,SAAS,kBAAkB,EAAE,WAAW,GAAG,SAAiC;CAC1E,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACO,gBAAAA,mBAAD;EACE,WAAWP,cAAAA,GAAG,yBAAyB,uBAAuB,SAAS;EACvE,GAAI;CACL,CAAA;AAEL;AAEA,SAAS,qBAAqB,EAAE,WAAW,GAAG,SAAoC;CAChF,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACQ,gBAAAA,sBAAD;EACE,WAAWR,cAAAA,GAAG,wBAAwB,wBAAwB,SAAS;EACvE,GAAI;CACL,CAAA;AAEL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.cts","names":["SidebarGroupLabelPrimitive","SidebarProviderPrimitive","SidebarInsetPrimitive","SidebarGroupPrimitive","SidebarFooterPrimitive","SidebarHeaderPrimitive","SidebarMenuButtonPrimitive","SidebarMenuSubButtonPrimitive"],"sources":["../../../src/components/sidebar/Sidebar.tsx"],"mappings":";;;;;;iBA4DS,oBACP,cACG,SACF,MAAM,sBAAsBA,mDAA2B,IAAA;;;iBAWjD,kBACP,WACA,UACG,SACF,MAAM,sBAAsBC,iDAAyB,IAAA;;;;;;;;;iBAuB/C,eAAe,cAAc,SAAS,MAAM,sBAAsBC,8CAAsB,IAAA;;iBAKxF,eAAe,cAAc,SAAS,MAAM,sBAAsBC,8CAAsB,IAAA;;;;iBAYxF,gBACP,cACG,SACF,MAAM,sBAAsBC,+CAAuB,IAAA;;;;;;
|
|
1
|
+
{"version":3,"file":"Sidebar.d.cts","names":["SidebarGroupLabelPrimitive","SidebarProviderPrimitive","SidebarInsetPrimitive","SidebarGroupPrimitive","SidebarFooterPrimitive","SidebarHeaderPrimitive","SidebarMenuButtonPrimitive","SidebarMenuSubButtonPrimitive"],"sources":["../../../src/components/sidebar/Sidebar.tsx"],"mappings":";;;;;;iBA4DS,oBACP,cACG,SACF,MAAM,sBAAsBA,mDAA2B,IAAA;;;iBAWjD,kBACP,WACA,UACG,SACF,MAAM,sBAAsBC,iDAAyB,IAAA;;;;;;;;;iBAuB/C,eAAe,cAAc,SAAS,MAAM,sBAAsBC,8CAAsB,IAAA;;iBAKxF,eAAe,cAAc,SAAS,MAAM,sBAAsBC,8CAAsB,IAAA;;;;iBAYxF,gBACP,cACG,SACF,MAAM,sBAAsBC,+CAAuB,IAAA;;;;;;iBAoB7C,gBACP,cACG,SACF,MAAM,sBAAsBC,+CAAuB,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwC7C,2CAAW,IAAA;;;;;iBAoCX,oBAAoB,cAAc,SAAS,MAAM,uDAAwB,IAAA;KAe7E,yBAAyB,MAAM,sBAAsBC;KAErD,4BAA4B,MAAM,sBAAsBC;iBAEpD,oBAAoB,cAAc,SAAS,qDAAsB,IAAA;iBASjE,uBAAuB,cAAc,SAAS,wDAAyB,IAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.d.mts","names":["SidebarGroupLabelPrimitive","SidebarProviderPrimitive","SidebarInsetPrimitive","SidebarGroupPrimitive","SidebarFooterPrimitive","SidebarHeaderPrimitive","SidebarMenuButtonPrimitive","SidebarMenuSubButtonPrimitive"],"sources":["../../../src/components/sidebar/Sidebar.tsx"],"mappings":";;;;;;iBA4DS,oBACP,cACG,SACF,MAAM,sBAAsBA,mDAA2B,IAAA;;;iBAWjD,kBACP,WACA,UACG,SACF,MAAM,sBAAsBC,iDAAyB,IAAA;;;;;;;;;iBAuB/C,eAAe,cAAc,SAAS,MAAM,sBAAsBC,8CAAsB,IAAA;;iBAKxF,eAAe,cAAc,SAAS,MAAM,sBAAsBC,8CAAsB,IAAA;;;;iBAYxF,gBACP,cACG,SACF,MAAM,sBAAsBC,+CAAuB,IAAA;;;;;;
|
|
1
|
+
{"version":3,"file":"Sidebar.d.mts","names":["SidebarGroupLabelPrimitive","SidebarProviderPrimitive","SidebarInsetPrimitive","SidebarGroupPrimitive","SidebarFooterPrimitive","SidebarHeaderPrimitive","SidebarMenuButtonPrimitive","SidebarMenuSubButtonPrimitive"],"sources":["../../../src/components/sidebar/Sidebar.tsx"],"mappings":";;;;;;iBA4DS,oBACP,cACG,SACF,MAAM,sBAAsBA,mDAA2B,IAAA;;;iBAWjD,kBACP,WACA,UACG,SACF,MAAM,sBAAsBC,iDAAyB,IAAA;;;;;;;;;iBAuB/C,eAAe,cAAc,SAAS,MAAM,sBAAsBC,8CAAsB,IAAA;;iBAKxF,eAAe,cAAc,SAAS,MAAM,sBAAsBC,8CAAsB,IAAA;;;;iBAYxF,gBACP,cACG,SACF,MAAM,sBAAsBC,+CAAuB,IAAA;;;;;;iBAoB7C,gBACP,cACG,SACF,MAAM,sBAAsBC,+CAAuB,IAAA;;;;;;;;;;;;;;;;;;;;;;;;;;iBAwC7C,2CAAW,IAAA;;;;;iBAoCX,oBAAoB,cAAc,SAAS,MAAM,uDAAwB,IAAA;KAe7E,yBAAyB,MAAM,sBAAsBC;KAErD,4BAA4B,MAAM,sBAAsBC;iBAEpD,oBAAoB,cAAc,SAAS,qDAAsB,IAAA;iBASjE,uBAAuB,cAAc,SAAS,wDAAyB,IAAA"}
|
|
@@ -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
|
|
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(
|
|
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(
|
|
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
|
|
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
|
|
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(
|
|
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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_utils = require("../../lib/utils.cjs");
|
|
3
|
+
const require_slider = require("../../primitives/slider.cjs");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
//#region src/components/slider/Slider.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Berget wrapper for the base-nova Slider primitive.
|
|
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.
|
|
14
|
+
*/
|
|
15
|
+
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),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
Slider.displayName = "Slider";
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.Slider = Slider;
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=Slider.cjs.map
|
|
@@ -0,0 +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,0DAA0D,SAAS;CACjF,GAAI;AACL,CAAA;AAEH,OAAO,cAAc"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Slider as Slider$1 } from "../../primitives/slider.cjs";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/components/slider/Slider.d.ts
|
|
4
|
+
export type SliderProps = React.ComponentProps<typeof Slider$1>;
|
|
5
|
+
/**
|
|
6
|
+
* Berget wrapper for the base-nova Slider primitive.
|
|
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.
|
|
13
|
+
*/
|
|
14
|
+
declare const Slider: {
|
|
15
|
+
({ className, ...props }: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Slider };
|
|
20
|
+
//# sourceMappingURL=Slider.d.cts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { Slider as Slider$1 } from "../../primitives/slider.mjs";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
//#region src/components/slider/Slider.d.ts
|
|
4
|
+
export type SliderProps = React.ComponentProps<typeof Slider$1>;
|
|
5
|
+
/**
|
|
6
|
+
* Berget wrapper for the base-nova Slider primitive.
|
|
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.
|
|
13
|
+
*/
|
|
14
|
+
declare const Slider: {
|
|
15
|
+
({ className, ...props }: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
//#endregion
|
|
19
|
+
export { Slider };
|
|
20
|
+
//# sourceMappingURL=Slider.d.mts.map
|
|
@@ -0,0 +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"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.mjs";
|
|
3
|
+
import { Slider as Slider$1 } from "../../primitives/slider.mjs";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/components/slider/Slider.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Berget wrapper for the base-nova Slider primitive.
|
|
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.
|
|
14
|
+
*/
|
|
15
|
+
const Slider = ({ className, ...props }) => /* @__PURE__ */ jsx(Slider$1, {
|
|
16
|
+
className: cn("**:data-[slot=slider-thumb]:bg-berget-brand-granite-50", className),
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
Slider.displayName = "Slider";
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Slider };
|
|
22
|
+
|
|
23
|
+
//# sourceMappingURL=Slider.mjs.map
|
|
@@ -0,0 +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,0DAA0D,SAAS;CACjF,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)(
|
|
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:
|
|
15
|
-
|
|
16
|
-
|
|
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)(
|
|
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:
|
|
32
|
-
|
|
33
|
-
|
|
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
|
|
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
|
|
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
|
]
|