@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
|
@@ -18,16 +18,28 @@ const DialogPortal = Dialog.Portal;
|
|
|
18
18
|
const DialogClose = Dialog.Close;
|
|
19
19
|
const DialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
20
20
|
ref,
|
|
21
|
-
className: cn(
|
|
21
|
+
className: cn(`
|
|
22
|
+
fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity
|
|
23
|
+
duration-200
|
|
24
|
+
data-ending-style:opacity-0
|
|
25
|
+
data-starting-style:opacity-0
|
|
26
|
+
`, className),
|
|
22
27
|
...props
|
|
23
28
|
}));
|
|
24
29
|
DialogOverlay.displayName = "DialogOverlay";
|
|
25
30
|
const DialogContent = React.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
26
31
|
ref,
|
|
27
|
-
className: cn(
|
|
32
|
+
className: cn(`
|
|
33
|
+
fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg
|
|
34
|
+
translate-x-[-50%] translate-y-[-50%] gap-4 rounded-berget-sm border
|
|
35
|
+
border-berget-dialog-border bg-berget-dialog-bg p-6 shadow-berget-lg
|
|
36
|
+
transition-[opacity,transform] duration-200
|
|
37
|
+
data-ending-style:scale-95 data-ending-style:opacity-0
|
|
38
|
+
data-starting-style:scale-95 data-starting-style:opacity-0
|
|
39
|
+
`, className),
|
|
28
40
|
...props,
|
|
29
41
|
children: [children, /* @__PURE__ */ jsxs(Dialog.Close, {
|
|
30
|
-
className: "absolute
|
|
42
|
+
className: "\n focus:ring-berget-focus-ring\n absolute top-4 right-4 rounded-berget-xs opacity-70\n ring-offset-berget-dialog-bg transition-opacity\n hover:opacity-100\n focus:ring-2 focus:ring-offset-2 focus:outline-none\n disabled:pointer-events-none\n data-open:bg-berget-muted data-open:text-berget-muted-foreground\n ",
|
|
31
43
|
children: [/* @__PURE__ */ jsx(X, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
32
44
|
className: "sr-only",
|
|
33
45
|
children: "Close"
|
|
@@ -36,12 +48,18 @@ const DialogContent = React.forwardRef(({ className, children, ...props }, ref)
|
|
|
36
48
|
})] }));
|
|
37
49
|
DialogContent.displayName = "DialogContent";
|
|
38
50
|
const DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
39
|
-
className: cn(
|
|
51
|
+
className: cn(`
|
|
52
|
+
flex flex-col gap-1.5 text-center
|
|
53
|
+
sm:text-left
|
|
54
|
+
`, className),
|
|
40
55
|
...props
|
|
41
56
|
});
|
|
42
57
|
DialogHeader.displayName = "DialogHeader";
|
|
43
58
|
const DialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
44
|
-
className: cn(
|
|
59
|
+
className: cn(`
|
|
60
|
+
flex flex-col-reverse gap-2
|
|
61
|
+
sm:flex-row sm:justify-end
|
|
62
|
+
`, className),
|
|
45
63
|
...props
|
|
46
64
|
});
|
|
47
65
|
DialogFooter.displayName = "DialogFooter";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.mjs","names":["Dialog","DialogPrimitive"],"sources":["../../../src/components/dialog/Dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Dialog as DialogPrimitive } from '@base-ui/react/dialog';\nimport { X } from 'lucide-react';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst Dialog = DialogPrimitive.Root;\n\ntype DialogTriggerProps = Omit<DialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DialogTrigger = React.forwardRef<HTMLButtonElement, DialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <DialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </DialogPrimitive.Trigger>\n ),\n);\nDialogTrigger.displayName = 'DialogTrigger';\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<DialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n
|
|
1
|
+
{"version":3,"file":"Dialog.mjs","names":["Dialog","DialogPrimitive"],"sources":["../../../src/components/dialog/Dialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { Dialog as DialogPrimitive } from '@base-ui/react/dialog';\nimport { X } from 'lucide-react';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst Dialog = DialogPrimitive.Root;\n\ntype DialogTriggerProps = Omit<DialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DialogTrigger = React.forwardRef<HTMLButtonElement, DialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <DialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </DialogPrimitive.Trigger>\n ),\n);\nDialogTrigger.displayName = 'DialogTrigger';\n\nconst DialogPortal = DialogPrimitive.Portal;\n\nconst DialogClose = DialogPrimitive.Close;\n\nconst DialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<DialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <DialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n `\n fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity\n duration-200\n data-ending-style:opacity-0\n data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n));\nDialogOverlay.displayName = 'DialogOverlay';\n\nconst DialogContent = React.forwardRef<\n HTMLDivElement,\n Omit<DialogPrimitive.Popup.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Popup\n ref={ref}\n className={cn(\n `\n fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg\n translate-x-[-50%] translate-y-[-50%] gap-4 rounded-berget-sm border\n border-berget-dialog-border bg-berget-dialog-bg p-6 shadow-berget-lg\n transition-[opacity,transform] duration-200\n data-ending-style:scale-95 data-ending-style:opacity-0\n data-starting-style:scale-95 data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n >\n {children}\n <DialogPrimitive.Close\n className=\"\n focus:ring-berget-focus-ring\n absolute top-4 right-4 rounded-berget-xs opacity-70\n ring-offset-berget-dialog-bg transition-opacity\n hover:opacity-100\n focus:ring-2 focus:ring-offset-2 focus:outline-none\n disabled:pointer-events-none\n data-open:bg-berget-muted data-open:text-berget-muted-foreground\n \"\n >\n <X className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </DialogPrimitive.Close>\n </DialogPrimitive.Popup>\n </DialogPortal>\n));\nDialogContent.displayName = 'DialogContent';\n\nconst DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col gap-1.5 text-center\n sm:text-left\n `,\n className,\n )}\n {...props}\n />\n);\nDialogHeader.displayName = 'DialogHeader';\n\nconst DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col-reverse gap-2\n sm:flex-row sm:justify-end\n `,\n className,\n )}\n {...props}\n />\n);\nDialogFooter.displayName = 'DialogFooter';\n\nconst DialogTitle = React.forwardRef<\n HTMLHeadingElement,\n Omit<DialogPrimitive.Title.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <DialogPrimitive.Title\n ref={ref}\n render={<Typography variant=\"h5\" color=\"default\" as=\"h2\" className={className} />}\n {...props}\n >\n {children}\n </DialogPrimitive.Title>\n));\nDialogTitle.displayName = 'DialogTitle';\n\nconst DialogDescription = React.forwardRef<\n HTMLParagraphElement,\n Omit<DialogPrimitive.Description.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <DialogPrimitive.Description\n ref={ref}\n render={<Typography variant=\"small\" color=\"muted\" className={className} />}\n {...props}\n >\n {children}\n </DialogPrimitive.Description>\n));\nDialogDescription.displayName = 'DialogDescription';\n\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n};\n"],"mappings":";;;;;;;;AASA,MAAMA,WAASC,OAAgB;AAQ/B,MAAM,gBAAgB,MAAM,YACzB,EAAE,SAAS,UAAU,GAAG,SAAS,QAChC,oBAACA,OAAgB,SAAjB;CAA8B;CAAK,QAAQ,cAAc,SAAS,QAAQ;CAAG,GAAI;CAC9E,UAAA,UAAU,KAAA,IAAY;AACA,CAAA,CAE7B;AACA,cAAc,cAAc;AAE5B,MAAM,eAAeA,OAAgB;AAErC,MAAM,cAAcA,OAAgB;AAEpC,MAAM,gBAAgB,MAAM,YAGzB,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAACA,OAAgB,UAAjB;CACO;CACL,WAAW,GACT;;;;;SAMA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,cAAc,cAAc;AAE5B,MAAM,gBAAgB,MAAM,YAGzB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,qBAAC,cAAD,EAAA,UAAA,CACE,oBAAC,eAAD,CAAgB,CAAA,GAChB,qBAACA,OAAgB,OAAjB;CACO;CACL,WAAW,GACT;;;;;;;WAQA,SACF;CACA,GAAI;CAbN,UAAA,CAeG,UACD,qBAACA,OAAgB,OAAjB;EACE,WAAU;EADZ,UAAA,CAWE,oBAAC,GAAD,EAAG,WAAU,SAAU,CAAA,GACvB,oBAAC,QAAD;GAAM,WAAU;GAAU,UAAA;EAAW,CAAA,CAChB;CACF,CAAA,CAAA;AACX,CAAA,CAAA,EAAA,CAAA,CACf;AACD,cAAc,cAAc;AAE5B,MAAM,gBAAgB,EAAE,WAAW,GAAG,YACpC,oBAAC,OAAD;CACE,WAAW,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,aAAa,cAAc;AAE3B,MAAM,gBAAgB,EAAE,WAAW,GAAG,YACpC,oBAAC,OAAD;CACE,WAAW,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,aAAa,cAAc;AAE3B,MAAM,cAAc,MAAM,YAGvB,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAACA,OAAgB,OAAjB;CACO;CACL,QAAQ,oBAAC,YAAD;EAAY,SAAQ;EAAK,OAAM;EAAU,IAAG;EAAgB;CAAY,CAAA;CAChF,GAAI;CAEH;AACoB,CAAA,CACxB;AACD,YAAY,cAAc;AAE1B,MAAM,oBAAoB,MAAM,YAG7B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAACA,OAAgB,aAAjB;CACO;CACL,QAAQ,oBAAC,YAAD;EAAY,SAAQ;EAAQ,OAAM;EAAmB;CAAY,CAAA;CACzE,GAAI;CAEH;AAC0B,CAAA,CAC9B;AACD,kBAAkB,cAAc"}
|
|
@@ -18,8 +18,8 @@ const dividerVariants = (0, require("class-variance-authority").cva)("", {
|
|
|
18
18
|
},
|
|
19
19
|
size: {
|
|
20
20
|
thin: "",
|
|
21
|
-
medium: "
|
|
22
|
-
thick: "
|
|
21
|
+
medium: "h-[2px]!",
|
|
22
|
+
thick: "h-[4px]!"
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
defaultVariants: {
|
|
@@ -30,7 +30,7 @@ const dividerVariants = (0, require("class-variance-authority").cva)("", {
|
|
|
30
30
|
const Divider = react.forwardRef(({ className, orientation = "horizontal", variant, size, label, labelPosition = "center", ...props }, ref) => {
|
|
31
31
|
if (label) return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
32
32
|
ref,
|
|
33
|
-
className: require_utils.cn("flex items-center
|
|
33
|
+
className: require_utils.cn("flex w-full items-center", className),
|
|
34
34
|
...props,
|
|
35
35
|
children: [
|
|
36
36
|
labelPosition !== "right" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_separator.Separator, {
|
|
@@ -43,7 +43,7 @@ const Divider = react.forwardRef(({ className, orientation = "horizontal", varia
|
|
|
43
43
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Typography.Typography, {
|
|
44
44
|
variant: "small",
|
|
45
45
|
color: "muted",
|
|
46
|
-
className: "px-4 whitespace-nowrap",
|
|
46
|
+
className: "\n px-4 whitespace-nowrap\n ",
|
|
47
47
|
children: label
|
|
48
48
|
}),
|
|
49
49
|
labelPosition !== "left" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_separator.Separator, {
|
|
@@ -61,7 +61,7 @@ const Divider = react.forwardRef(({ className, orientation = "horizontal", varia
|
|
|
61
61
|
className: require_utils.cn(dividerVariants({
|
|
62
62
|
variant,
|
|
63
63
|
size
|
|
64
|
-
}), orientation === "vertical" && "h-full
|
|
64
|
+
}), orientation === "vertical" && "h-full w-px!", className)
|
|
65
65
|
});
|
|
66
66
|
});
|
|
67
67
|
Divider.displayName = "Divider";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.cjs","names":["cva","React","cn","Separator","Typography"],"sources":["../../../src/components/divider/Divider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Separator } from '../../primitives/separator';\nimport { Typography } from '../typography';\n\nconst dividerVariants = cva('', {\n variants: {\n variant: {\n default: 'bg-berget-separator',\n subtle: 'bg-berget-separator-subtle',\n strong: 'bg-berget-border-interactive',\n primary: 'bg-berget-primary-border',\n muted: 'bg-berget-separator-subtle',\n },\n size: {\n thin: '',\n medium: '
|
|
1
|
+
{"version":3,"file":"Divider.cjs","names":["cva","React","cn","Separator","Typography"],"sources":["../../../src/components/divider/Divider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Separator } from '../../primitives/separator';\nimport { Typography } from '../typography';\n\nconst dividerVariants = cva('', {\n variants: {\n variant: {\n default: 'bg-berget-separator',\n subtle: 'bg-berget-separator-subtle',\n strong: 'bg-berget-border-interactive',\n primary: 'bg-berget-primary-border',\n muted: 'bg-berget-separator-subtle',\n },\n size: {\n thin: '',\n medium: 'h-[2px]!',\n thick: 'h-[4px]!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'thin',\n },\n});\n\nexport interface DividerProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dividerVariants> {\n orientation?: 'horizontal' | 'vertical';\n label?: string;\n labelPosition?: 'center' | 'left' | 'right';\n}\n\nconst Divider = React.forwardRef<HTMLDivElement, DividerProps>(\n (\n {\n className,\n orientation = 'horizontal',\n variant,\n size,\n label,\n labelPosition = 'center',\n ...props\n },\n ref,\n ) => {\n if (label) {\n return (\n <div ref={ref} className={cn('flex w-full items-center', className)} {...props}>\n {labelPosition !== 'right' && (\n <Separator\n orientation=\"horizontal\"\n className={cn(dividerVariants({ variant, size }), 'flex-1')}\n />\n )}\n <Typography\n variant=\"small\"\n color=\"muted\"\n className=\"\n px-4 whitespace-nowrap\n \"\n >\n {label}\n </Typography>\n {labelPosition !== 'left' && (\n <Separator\n orientation=\"horizontal\"\n className={cn(dividerVariants({ variant, size }), 'flex-1')}\n />\n )}\n </div>\n );\n }\n\n return (\n <Separator\n ref={ref as React.Ref<never>}\n orientation={orientation}\n className={cn(\n dividerVariants({ variant, size }),\n orientation === 'vertical' && 'h-full w-px!',\n className,\n )}\n />\n );\n },\n);\nDivider.displayName = 'Divider';\n\nexport { Divider, dividerVariants };\n"],"mappings":";;;;;;;;;AAQA,MAAM,mBAAA,G,kCAAkBA,CAAAA,CAAAA,IAAAA,CAAI,IAAI;CAC9B,UAAU;EACR,SAAS;GACP,SAAS;GACT,QAAQ;GACR,QAAQ;GACR,SAAS;GACT,OAAO;EACT;EACA,MAAM;GACJ,MAAM;GACN,QAAQ;GACR,OAAO;EACT;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CAAC;AASD,MAAM,UAAUC,MAAM,YAElB,EACE,WACA,cAAc,cACd,SACA,MACA,OACA,gBAAgB,UAChB,GAAG,SAEL,QACG;CACH,IAAI,OACF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAU;EAAK,WAAWC,cAAAA,GAAG,4BAA4B,SAAS;EAAG,GAAI;EAAzE,UAAA;GACG,kBAAkB,WACjB,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,WAAD;IACE,aAAY;IACZ,WAAWD,cAAAA,GAAG,gBAAgB;KAAE;KAAS;IAAK,CAAC,GAAG,QAAQ;GAC3D,CAAA;GAEH,iBAAA,GAAA,kBAAA,IAAA,CAACE,mBAAAA,YAAD;IACE,SAAQ;IACR,OAAM;IACN,WAAU;IAIT,UAAA;GACS,CAAA;GACX,kBAAkB,UACjB,iBAAA,GAAA,kBAAA,IAAA,CAACD,kBAAAA,WAAD;IACE,aAAY;IACZ,WAAWD,cAAAA,GAAG,gBAAgB;KAAE;KAAS;IAAK,CAAC,GAAG,QAAQ;GAC3D,CAAA;EAEA;;CAIT,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,WAAD;EACO;EACQ;EACb,WAAWD,cAAAA,GACT,gBAAgB;GAAE;GAAS;EAAK,CAAC,GACjC,gBAAgB,cAAc,gBAC9B,SACF;CACD,CAAA;AAEL,CACF;AACA,QAAQ,cAAc"}
|
|
@@ -17,8 +17,8 @@ const dividerVariants = cva("", {
|
|
|
17
17
|
},
|
|
18
18
|
size: {
|
|
19
19
|
thin: "",
|
|
20
|
-
medium: "
|
|
21
|
-
thick: "
|
|
20
|
+
medium: "h-[2px]!",
|
|
21
|
+
thick: "h-[4px]!"
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
24
|
defaultVariants: {
|
|
@@ -29,7 +29,7 @@ const dividerVariants = cva("", {
|
|
|
29
29
|
const Divider = React.forwardRef(({ className, orientation = "horizontal", variant, size, label, labelPosition = "center", ...props }, ref) => {
|
|
30
30
|
if (label) return /* @__PURE__ */ jsxs("div", {
|
|
31
31
|
ref,
|
|
32
|
-
className: cn("flex items-center
|
|
32
|
+
className: cn("flex w-full items-center", className),
|
|
33
33
|
...props,
|
|
34
34
|
children: [
|
|
35
35
|
labelPosition !== "right" && /* @__PURE__ */ jsx(Separator, {
|
|
@@ -42,7 +42,7 @@ const Divider = React.forwardRef(({ className, orientation = "horizontal", varia
|
|
|
42
42
|
/* @__PURE__ */ jsx(Typography, {
|
|
43
43
|
variant: "small",
|
|
44
44
|
color: "muted",
|
|
45
|
-
className: "px-4 whitespace-nowrap",
|
|
45
|
+
className: "\n px-4 whitespace-nowrap\n ",
|
|
46
46
|
children: label
|
|
47
47
|
}),
|
|
48
48
|
labelPosition !== "left" && /* @__PURE__ */ jsx(Separator, {
|
|
@@ -60,7 +60,7 @@ const Divider = React.forwardRef(({ className, orientation = "horizontal", varia
|
|
|
60
60
|
className: cn(dividerVariants({
|
|
61
61
|
variant,
|
|
62
62
|
size
|
|
63
|
-
}), orientation === "vertical" && "h-full
|
|
63
|
+
}), orientation === "vertical" && "h-full w-px!", className)
|
|
64
64
|
});
|
|
65
65
|
});
|
|
66
66
|
Divider.displayName = "Divider";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Divider.mjs","names":[],"sources":["../../../src/components/divider/Divider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Separator } from '../../primitives/separator';\nimport { Typography } from '../typography';\n\nconst dividerVariants = cva('', {\n variants: {\n variant: {\n default: 'bg-berget-separator',\n subtle: 'bg-berget-separator-subtle',\n strong: 'bg-berget-border-interactive',\n primary: 'bg-berget-primary-border',\n muted: 'bg-berget-separator-subtle',\n },\n size: {\n thin: '',\n medium: '
|
|
1
|
+
{"version":3,"file":"Divider.mjs","names":[],"sources":["../../../src/components/divider/Divider.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\nimport { Separator } from '../../primitives/separator';\nimport { Typography } from '../typography';\n\nconst dividerVariants = cva('', {\n variants: {\n variant: {\n default: 'bg-berget-separator',\n subtle: 'bg-berget-separator-subtle',\n strong: 'bg-berget-border-interactive',\n primary: 'bg-berget-primary-border',\n muted: 'bg-berget-separator-subtle',\n },\n size: {\n thin: '',\n medium: 'h-[2px]!',\n thick: 'h-[4px]!',\n },\n },\n defaultVariants: {\n variant: 'default',\n size: 'thin',\n },\n});\n\nexport interface DividerProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof dividerVariants> {\n orientation?: 'horizontal' | 'vertical';\n label?: string;\n labelPosition?: 'center' | 'left' | 'right';\n}\n\nconst Divider = React.forwardRef<HTMLDivElement, DividerProps>(\n (\n {\n className,\n orientation = 'horizontal',\n variant,\n size,\n label,\n labelPosition = 'center',\n ...props\n },\n ref,\n ) => {\n if (label) {\n return (\n <div ref={ref} className={cn('flex w-full items-center', className)} {...props}>\n {labelPosition !== 'right' && (\n <Separator\n orientation=\"horizontal\"\n className={cn(dividerVariants({ variant, size }), 'flex-1')}\n />\n )}\n <Typography\n variant=\"small\"\n color=\"muted\"\n className=\"\n px-4 whitespace-nowrap\n \"\n >\n {label}\n </Typography>\n {labelPosition !== 'left' && (\n <Separator\n orientation=\"horizontal\"\n className={cn(dividerVariants({ variant, size }), 'flex-1')}\n />\n )}\n </div>\n );\n }\n\n return (\n <Separator\n ref={ref as React.Ref<never>}\n orientation={orientation}\n className={cn(\n dividerVariants({ variant, size }),\n orientation === 'vertical' && 'h-full w-px!',\n className,\n )}\n />\n );\n },\n);\nDivider.displayName = 'Divider';\n\nexport { Divider, dividerVariants };\n"],"mappings":";;;;;;;;AAQA,MAAM,kBAAkB,IAAI,IAAI;CAC9B,UAAU;EACR,SAAS;GACP,SAAS;GACT,QAAQ;GACR,QAAQ;GACR,SAAS;GACT,OAAO;EACT;EACA,MAAM;GACJ,MAAM;GACN,QAAQ;GACR,OAAO;EACT;CACF;CACA,iBAAiB;EACf,SAAS;EACT,MAAM;CACR;AACF,CAAC;AASD,MAAM,UAAU,MAAM,YAElB,EACE,WACA,cAAc,cACd,SACA,MACA,OACA,gBAAgB,UAChB,GAAG,SAEL,QACG;CACH,IAAI,OACF,OACE,qBAAC,OAAD;EAAU;EAAK,WAAW,GAAG,4BAA4B,SAAS;EAAG,GAAI;EAAzE,UAAA;GACG,kBAAkB,WACjB,oBAAC,WAAD;IACE,aAAY;IACZ,WAAW,GAAG,gBAAgB;KAAE;KAAS;IAAK,CAAC,GAAG,QAAQ;GAC3D,CAAA;GAEH,oBAAC,YAAD;IACE,SAAQ;IACR,OAAM;IACN,WAAU;IAIT,UAAA;GACS,CAAA;GACX,kBAAkB,UACjB,oBAAC,WAAD;IACE,aAAY;IACZ,WAAW,GAAG,gBAAgB;KAAE;KAAS;IAAK,CAAC,GAAG,QAAQ;GAC3D,CAAA;EAEA;;CAIT,OACE,oBAAC,WAAD;EACO;EACQ;EACb,WAAW,GACT,gBAAgB;GAAE;GAAS;EAAK,CAAC,GACjC,gBAAgB,cAAc,gBAC9B,SACF;CACD,CAAA;AAEL,CACF;AACA,QAAQ,cAAc"}
|
|
@@ -23,13 +23,19 @@ const DropdownMenuSubTrigger = react.forwardRef(({ className, inset, asChild, ch
|
|
|
23
23
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
24
24
|
const DropdownMenuSubContent = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dropdown_menu.DropdownMenuSubContent, {
|
|
25
25
|
ref,
|
|
26
|
-
className: require_utils.cn(
|
|
26
|
+
className: require_utils.cn(`
|
|
27
|
+
rounded-berget-xs bg-berget-popover text-berget-popover-foreground
|
|
28
|
+
shadow-berget-lg
|
|
29
|
+
`, className),
|
|
27
30
|
...props
|
|
28
31
|
}));
|
|
29
32
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
30
33
|
const DropdownMenuContent = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_dropdown_menu.DropdownMenuContent, {
|
|
31
34
|
ref,
|
|
32
|
-
className: require_utils.cn(
|
|
35
|
+
className: require_utils.cn(`
|
|
36
|
+
rounded-berget-xs bg-berget-popover text-berget-popover-foreground
|
|
37
|
+
shadow-berget-md
|
|
38
|
+
`, className),
|
|
33
39
|
...props
|
|
34
40
|
}));
|
|
35
41
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.cjs","names":["React","DropdownMenuTriggerPrimitive","asChildRender","DropdownMenuSubTriggerPrimitive","cn","DropdownMenuSubContentPrimitive","DropdownMenuContentPrimitive","DropdownMenuItemPrimitive","DropdownMenuCheckboxItemPrimitive","DropdownMenuRadioItemPrimitive","DropdownMenuLabelPrimitive","DropdownMenuSeparatorPrimitive","DropdownMenuShortcutPrimitive"],"sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport {\n DropdownMenuCheckboxItem as DropdownMenuCheckboxItemPrimitive,\n DropdownMenuContent as DropdownMenuContentPrimitive,\n DropdownMenuItem as DropdownMenuItemPrimitive,\n DropdownMenuLabel as DropdownMenuLabelPrimitive,\n DropdownMenuRadioItem as DropdownMenuRadioItemPrimitive,\n DropdownMenuSeparator as DropdownMenuSeparatorPrimitive,\n DropdownMenuShortcut as DropdownMenuShortcutPrimitive,\n DropdownMenuSubContent as DropdownMenuSubContentPrimitive,\n DropdownMenuSubTrigger as DropdownMenuSubTriggerPrimitive,\n DropdownMenuTrigger as DropdownMenuTriggerPrimitive,\n} from '../../primitives/dropdown-menu';\nimport { cn, asChildRender } from '../../lib/utils';\n\n/* ------------------------------------------------------------------ */\n/* Root & inert sub-components (re-exported from the primitive) */\n/* ------------------------------------------------------------------ */\n\nexport {\n DropdownMenu,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuRadioGroup,\n} from '../../primitives/dropdown-menu';\n\n/* ------------------------------------------------------------------ */\n/* Trigger */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuTriggerProps = Omit<\n React.ComponentProps<typeof DropdownMenuTriggerPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuTrigger = React.forwardRef<HTMLButtonElement, DropdownMenuTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <DropdownMenuTriggerPrimitive ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </DropdownMenuTriggerPrimitive>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenuTrigger';\n\n/* ------------------------------------------------------------------ */\n/* SubTrigger */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSubTriggerProps = Omit<\n React.ComponentProps<typeof DropdownMenuSubTriggerPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuSubTrigger = React.forwardRef<HTMLDivElement, DropdownMenuSubTriggerProps>(\n ({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuSubTriggerPrimitive\n ref={ref}\n className={cn(\n // Berget density & radius; focus/accent styling comes from the primitive.\n 'gap-2 rounded-berget-xs px-2 py-1.5',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuSubTriggerPrimitive>\n ),\n);\nDropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';\n\n/* ------------------------------------------------------------------ */\n/* SubContent */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSubContentProps = React.ComponentProps<typeof DropdownMenuSubContentPrimitive>;\n\nconst DropdownMenuSubContent = React.forwardRef<HTMLDivElement, DropdownMenuSubContentProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuSubContentPrimitive\n ref={ref}\n className={cn(\n 'rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-lg',\n className,\n )}\n {...props}\n />\n ),\n);\nDropdownMenuSubContent.displayName = 'DropdownMenuSubContent';\n\n/* ------------------------------------------------------------------ */\n/* Content */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuContentProps = React.ComponentProps<typeof DropdownMenuContentPrimitive>;\n\nconst DropdownMenuContent = React.forwardRef<HTMLDivElement, DropdownMenuContentProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuContentPrimitive\n ref={ref}\n className={cn(\n 'rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-md',\n className,\n )}\n {...props}\n />\n ),\n);\nDropdownMenuContent.displayName = 'DropdownMenuContent';\n\n/* ------------------------------------------------------------------ */\n/* Item */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n inset?: boolean;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuItem = React.forwardRef<HTMLDivElement, DropdownMenuItemProps>(\n ({ className, inset, asChild, children, textValue, ...props }, ref) => (\n <DropdownMenuItemPrimitive\n ref={ref}\n label={textValue}\n className={cn(\n // Berget density & radius; focus accent and destructive variant from the primitive.\n 'gap-2 rounded-berget-xs px-2 py-1.5',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuItemPrimitive>\n ),\n);\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n\n/* ------------------------------------------------------------------ */\n/* CheckboxItem */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuCheckboxItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuCheckboxItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuCheckboxItem = React.forwardRef<HTMLDivElement, DropdownMenuCheckboxItemProps>(\n ({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuCheckboxItemPrimitive\n ref={ref}\n label={textValue}\n className={cn('rounded-berget-xs', className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuCheckboxItemPrimitive>\n ),\n);\nDropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem';\n\n/* ------------------------------------------------------------------ */\n/* RadioItem */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuRadioItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuRadioItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuRadioItem = React.forwardRef<HTMLDivElement, DropdownMenuRadioItemProps>(\n ({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuRadioItemPrimitive\n ref={ref}\n label={textValue}\n className={cn('rounded-berget-xs', className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuRadioItemPrimitive>\n ),\n);\nDropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';\n\n/* ------------------------------------------------------------------ */\n/* Label */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuLabelProps = Omit<\n React.ComponentProps<typeof DropdownMenuLabelPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuLabel = React.forwardRef<HTMLDivElement, DropdownMenuLabelProps>(\n ({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuLabelPrimitive\n ref={ref}\n className={cn(\n 'px-2 py-1.5 text-sm font-semibold text-berget-foreground',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuLabelPrimitive>\n ),\n);\nDropdownMenuLabel.displayName = 'DropdownMenuLabel';\n\n/* ------------------------------------------------------------------ */\n/* Separator */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSeparatorProps = Omit<\n React.ComponentProps<typeof DropdownMenuSeparatorPrimitive>,\n 'className'\n> & { className?: string };\n\nconst DropdownMenuSeparator = React.forwardRef<HTMLDivElement, DropdownMenuSeparatorProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuSeparatorPrimitive\n ref={ref}\n className={cn('bg-berget-separator', className)}\n {...props}\n />\n ),\n);\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator';\n\n/* ------------------------------------------------------------------ */\n/* Shortcut */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuShortcutProps = React.ComponentProps<typeof DropdownMenuShortcutPrimitive>;\n\nconst DropdownMenuShortcut = ({ className, ...props }: DropdownMenuShortcutProps) => {\n return (\n <DropdownMenuShortcutPrimitive\n className={cn('text-berget-muted-foreground', className)}\n {...props}\n />\n );\n};\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\n/* ------------------------------------------------------------------ */\n/* Exports */\n/* ------------------------------------------------------------------ */\n\nexport {\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"DropdownMenu.cjs","names":["React","DropdownMenuTriggerPrimitive","asChildRender","DropdownMenuSubTriggerPrimitive","cn","DropdownMenuSubContentPrimitive","DropdownMenuContentPrimitive","DropdownMenuItemPrimitive","DropdownMenuCheckboxItemPrimitive","DropdownMenuRadioItemPrimitive","DropdownMenuLabelPrimitive","DropdownMenuSeparatorPrimitive","DropdownMenuShortcutPrimitive"],"sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport {\n DropdownMenuCheckboxItem as DropdownMenuCheckboxItemPrimitive,\n DropdownMenuContent as DropdownMenuContentPrimitive,\n DropdownMenuItem as DropdownMenuItemPrimitive,\n DropdownMenuLabel as DropdownMenuLabelPrimitive,\n DropdownMenuRadioItem as DropdownMenuRadioItemPrimitive,\n DropdownMenuSeparator as DropdownMenuSeparatorPrimitive,\n DropdownMenuShortcut as DropdownMenuShortcutPrimitive,\n DropdownMenuSubContent as DropdownMenuSubContentPrimitive,\n DropdownMenuSubTrigger as DropdownMenuSubTriggerPrimitive,\n DropdownMenuTrigger as DropdownMenuTriggerPrimitive,\n} from '../../primitives/dropdown-menu';\nimport { cn, asChildRender } from '../../lib/utils';\n\n/* ------------------------------------------------------------------ */\n/* Root & inert sub-components (re-exported from the primitive) */\n/* ------------------------------------------------------------------ */\n\nexport {\n DropdownMenu,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuRadioGroup,\n} from '../../primitives/dropdown-menu';\n\n/* ------------------------------------------------------------------ */\n/* Trigger */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuTriggerProps = Omit<\n React.ComponentProps<typeof DropdownMenuTriggerPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuTrigger = React.forwardRef<HTMLButtonElement, DropdownMenuTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <DropdownMenuTriggerPrimitive ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </DropdownMenuTriggerPrimitive>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenuTrigger';\n\n/* ------------------------------------------------------------------ */\n/* SubTrigger */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSubTriggerProps = Omit<\n React.ComponentProps<typeof DropdownMenuSubTriggerPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuSubTrigger = React.forwardRef<HTMLDivElement, DropdownMenuSubTriggerProps>(\n ({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuSubTriggerPrimitive\n ref={ref}\n className={cn(\n // Berget density & radius; focus/accent styling comes from the primitive.\n 'gap-2 rounded-berget-xs px-2 py-1.5',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuSubTriggerPrimitive>\n ),\n);\nDropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';\n\n/* ------------------------------------------------------------------ */\n/* SubContent */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSubContentProps = React.ComponentProps<typeof DropdownMenuSubContentPrimitive>;\n\nconst DropdownMenuSubContent = React.forwardRef<HTMLDivElement, DropdownMenuSubContentProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuSubContentPrimitive\n ref={ref}\n className={cn(\n `\n rounded-berget-xs bg-berget-popover text-berget-popover-foreground\n shadow-berget-lg\n `,\n className,\n )}\n {...props}\n />\n ),\n);\nDropdownMenuSubContent.displayName = 'DropdownMenuSubContent';\n\n/* ------------------------------------------------------------------ */\n/* Content */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuContentProps = React.ComponentProps<typeof DropdownMenuContentPrimitive>;\n\nconst DropdownMenuContent = React.forwardRef<HTMLDivElement, DropdownMenuContentProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuContentPrimitive\n ref={ref}\n className={cn(\n `\n rounded-berget-xs bg-berget-popover text-berget-popover-foreground\n shadow-berget-md\n `,\n className,\n )}\n {...props}\n />\n ),\n);\nDropdownMenuContent.displayName = 'DropdownMenuContent';\n\n/* ------------------------------------------------------------------ */\n/* Item */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n inset?: boolean;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuItem = React.forwardRef<HTMLDivElement, DropdownMenuItemProps>(\n ({ className, inset, asChild, children, textValue, ...props }, ref) => (\n <DropdownMenuItemPrimitive\n ref={ref}\n label={textValue}\n className={cn(\n // Berget density & radius; focus accent and destructive variant from the primitive.\n 'gap-2 rounded-berget-xs px-2 py-1.5',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuItemPrimitive>\n ),\n);\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n\n/* ------------------------------------------------------------------ */\n/* CheckboxItem */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuCheckboxItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuCheckboxItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuCheckboxItem = React.forwardRef<HTMLDivElement, DropdownMenuCheckboxItemProps>(\n ({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuCheckboxItemPrimitive\n ref={ref}\n label={textValue}\n className={cn('rounded-berget-xs', className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuCheckboxItemPrimitive>\n ),\n);\nDropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem';\n\n/* ------------------------------------------------------------------ */\n/* RadioItem */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuRadioItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuRadioItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuRadioItem = React.forwardRef<HTMLDivElement, DropdownMenuRadioItemProps>(\n ({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuRadioItemPrimitive\n ref={ref}\n label={textValue}\n className={cn('rounded-berget-xs', className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuRadioItemPrimitive>\n ),\n);\nDropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';\n\n/* ------------------------------------------------------------------ */\n/* Label */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuLabelProps = Omit<\n React.ComponentProps<typeof DropdownMenuLabelPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuLabel = React.forwardRef<HTMLDivElement, DropdownMenuLabelProps>(\n ({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuLabelPrimitive\n ref={ref}\n className={cn(\n 'px-2 py-1.5 text-sm font-semibold text-berget-foreground',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuLabelPrimitive>\n ),\n);\nDropdownMenuLabel.displayName = 'DropdownMenuLabel';\n\n/* ------------------------------------------------------------------ */\n/* Separator */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSeparatorProps = Omit<\n React.ComponentProps<typeof DropdownMenuSeparatorPrimitive>,\n 'className'\n> & { className?: string };\n\nconst DropdownMenuSeparator = React.forwardRef<HTMLDivElement, DropdownMenuSeparatorProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuSeparatorPrimitive\n ref={ref}\n className={cn('bg-berget-separator', className)}\n {...props}\n />\n ),\n);\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator';\n\n/* ------------------------------------------------------------------ */\n/* Shortcut */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuShortcutProps = React.ComponentProps<typeof DropdownMenuShortcutPrimitive>;\n\nconst DropdownMenuShortcut = ({ className, ...props }: DropdownMenuShortcutProps) => {\n return (\n <DropdownMenuShortcutPrimitive\n className={cn('text-berget-muted-foreground', className)}\n {...props}\n />\n );\n};\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\n/* ------------------------------------------------------------------ */\n/* Exports */\n/* ------------------------------------------------------------------ */\n\nexport {\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n};\n"],"mappings":"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"}
|
|
@@ -14,8 +14,8 @@ type DropdownMenuSubTriggerProps = Omit<React.ComponentProps<typeof DropdownMenu
|
|
|
14
14
|
asChild?: boolean;
|
|
15
15
|
};
|
|
16
16
|
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuSubTriggerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "
|
|
18
|
-
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "
|
|
17
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "side" | "align" | "alignOffset" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "side" | "align" | "alignOffset" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
19
|
type DropdownMenuItemProps = Omit<React.ComponentProps<typeof DropdownMenuItem$1>, 'className' | 'render' | 'label'> & {
|
|
20
20
|
className?: string;
|
|
21
21
|
inset?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.cts","names":["DropdownMenuTriggerPrimitive","DropdownMenuSubTriggerPrimitive","DropdownMenuItemPrimitive","DropdownMenuCheckboxItemPrimitive","DropdownMenuRadioItemPrimitive","DropdownMenuLabelPrimitive","DropdownMenuSeparatorPrimitive","DropdownMenuShortcutPrimitive"],"sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"mappings":";;;KAkCK,2BAA2B,KAC9B,MAAM,sBAAsBA;EAG5B;;EAEA;;cAGI,qBAAmB,MAAA,0BAAA,KAAA,mCAAA,MAAA,cAAA;KAapB,8BAA8B,KACjC,MAAM,sBAAsBC;EAG5B;EACA;;EAEA;;cAGI,wBAAsB,MAAA,0BAAA,KAAA,sCAAA,MAAA,cAAA;cAyBtB,wBAAsB,MAAA,0BAAA,8BAAA,wBAAA,8BAAA,gFAAA,MAAA,cAAA;
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.cts","names":["DropdownMenuTriggerPrimitive","DropdownMenuSubTriggerPrimitive","DropdownMenuItemPrimitive","DropdownMenuCheckboxItemPrimitive","DropdownMenuRadioItemPrimitive","DropdownMenuLabelPrimitive","DropdownMenuSeparatorPrimitive","DropdownMenuShortcutPrimitive"],"sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"mappings":";;;KAkCK,2BAA2B,KAC9B,MAAM,sBAAsBA;EAG5B;;EAEA;;cAGI,qBAAmB,MAAA,0BAAA,KAAA,mCAAA,MAAA,cAAA;KAapB,8BAA8B,KACjC,MAAM,sBAAsBC;EAG5B;EACA;;EAEA;;cAGI,wBAAsB,MAAA,0BAAA,KAAA,sCAAA,MAAA,cAAA;cAyBtB,wBAAsB,MAAA,0BAAA,8BAAA,wBAAA,8BAAA,gFAAA,MAAA,cAAA;cAuBtB,qBAAmB,MAAA,0BAAA,8BAAA,wBAAA,8BAAA,gFAAA,MAAA,cAAA;KAqBpB,wBAAwB,KAC3B,MAAM,sBAAsBC;EAG5B;EACA;;EAEA;;EAEA;;cAGI,kBAAgB,MAAA,0BAAA,KAAA,gCAAA,MAAA,cAAA;KAwBjB,gCAAgC,KACnC,MAAM,sBAAsBC;EAG5B;;EAEA;;EAEA;;cAGI,0BAAwB,MAAA,0BAAA,KAAA,wCAAA,MAAA,cAAA;KAmBzB,6BAA6B,KAChC,MAAM,sBAAsBC;EAG5B;;EAEA;;EAEA;;cAGI,uBAAqB,MAAA,0BAAA,KAAA,qCAAA,MAAA,cAAA;KAmBtB,yBAAyB,KAC5B,MAAM,sBAAsBC;EAG5B;EACA;;EAEA;;cAGI,mBAAiB,MAAA,0BAAA,KAAA,iCAAA,MAAA,cAAA;KAsBlB,6BAA6B,KAChC,MAAM,sBAAsBC;EAExB;;cAEA,uBAAqB,MAAA,0BAAA,KAAA,qCAAA,MAAA,cAAA;KAetB,4BAA4B,MAAM,sBAAsBC;cAEvD;KAAiD,cAAA,SAAA,wDAAyB,IAAA"}
|
|
@@ -14,8 +14,8 @@ type DropdownMenuSubTriggerProps = Omit<React.ComponentProps<typeof DropdownMenu
|
|
|
14
14
|
asChild?: boolean;
|
|
15
15
|
};
|
|
16
16
|
declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuSubTriggerProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
17
|
-
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "
|
|
18
|
-
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "
|
|
17
|
+
declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "side" | "align" | "alignOffset" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<import("@base-ui/react").ContextMenuPopupProps & Pick<import("@base-ui/react").MenuPositionerProps, "side" | "align" | "alignOffset" | "sideOffset">, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
19
|
type DropdownMenuItemProps = Omit<React.ComponentProps<typeof DropdownMenuItem$1>, 'className' | 'render' | 'label'> & {
|
|
20
20
|
className?: string;
|
|
21
21
|
inset?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.d.mts","names":["DropdownMenuTriggerPrimitive","DropdownMenuSubTriggerPrimitive","DropdownMenuItemPrimitive","DropdownMenuCheckboxItemPrimitive","DropdownMenuRadioItemPrimitive","DropdownMenuLabelPrimitive","DropdownMenuSeparatorPrimitive","DropdownMenuShortcutPrimitive"],"sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"mappings":";;;KAkCK,2BAA2B,KAC9B,MAAM,sBAAsBA;EAG5B;;EAEA;;cAGI,qBAAmB,MAAA,0BAAA,KAAA,mCAAA,MAAA,cAAA;KAapB,8BAA8B,KACjC,MAAM,sBAAsBC;EAG5B;EACA;;EAEA;;cAGI,wBAAsB,MAAA,0BAAA,KAAA,sCAAA,MAAA,cAAA;cAyBtB,wBAAsB,MAAA,0BAAA,8BAAA,wBAAA,8BAAA,gFAAA,MAAA,cAAA;
|
|
1
|
+
{"version":3,"file":"DropdownMenu.d.mts","names":["DropdownMenuTriggerPrimitive","DropdownMenuSubTriggerPrimitive","DropdownMenuItemPrimitive","DropdownMenuCheckboxItemPrimitive","DropdownMenuRadioItemPrimitive","DropdownMenuLabelPrimitive","DropdownMenuSeparatorPrimitive","DropdownMenuShortcutPrimitive"],"sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"mappings":";;;KAkCK,2BAA2B,KAC9B,MAAM,sBAAsBA;EAG5B;;EAEA;;cAGI,qBAAmB,MAAA,0BAAA,KAAA,mCAAA,MAAA,cAAA;KAapB,8BAA8B,KACjC,MAAM,sBAAsBC;EAG5B;EACA;;EAEA;;cAGI,wBAAsB,MAAA,0BAAA,KAAA,sCAAA,MAAA,cAAA;cAyBtB,wBAAsB,MAAA,0BAAA,8BAAA,wBAAA,8BAAA,gFAAA,MAAA,cAAA;cAuBtB,qBAAmB,MAAA,0BAAA,8BAAA,wBAAA,8BAAA,gFAAA,MAAA,cAAA;KAqBpB,wBAAwB,KAC3B,MAAM,sBAAsBC;EAG5B;EACA;;EAEA;;EAEA;;cAGI,kBAAgB,MAAA,0BAAA,KAAA,gCAAA,MAAA,cAAA;KAwBjB,gCAAgC,KACnC,MAAM,sBAAsBC;EAG5B;;EAEA;;EAEA;;cAGI,0BAAwB,MAAA,0BAAA,KAAA,wCAAA,MAAA,cAAA;KAmBzB,6BAA6B,KAChC,MAAM,sBAAsBC;EAG5B;;EAEA;;EAEA;;cAGI,uBAAqB,MAAA,0BAAA,KAAA,qCAAA,MAAA,cAAA;KAmBtB,yBAAyB,KAC5B,MAAM,sBAAsBC;EAG5B;EACA;;EAEA;;cAGI,mBAAiB,MAAA,0BAAA,KAAA,iCAAA,MAAA,cAAA;KAsBlB,6BAA6B,KAChC,MAAM,sBAAsBC;EAExB;;cAEA,uBAAqB,MAAA,0BAAA,KAAA,qCAAA,MAAA,cAAA;KAetB,4BAA4B,MAAM,sBAAsBC;cAEvD;KAAiD,cAAA,SAAA,wDAAyB,IAAA"}
|
|
@@ -21,13 +21,19 @@ const DropdownMenuSubTrigger = React.forwardRef(({ className, inset, asChild, ch
|
|
|
21
21
|
DropdownMenuSubTrigger.displayName = "DropdownMenuSubTrigger";
|
|
22
22
|
const DropdownMenuSubContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuSubContent$1, {
|
|
23
23
|
ref,
|
|
24
|
-
className: cn(
|
|
24
|
+
className: cn(`
|
|
25
|
+
rounded-berget-xs bg-berget-popover text-berget-popover-foreground
|
|
26
|
+
shadow-berget-lg
|
|
27
|
+
`, className),
|
|
25
28
|
...props
|
|
26
29
|
}));
|
|
27
30
|
DropdownMenuSubContent.displayName = "DropdownMenuSubContent";
|
|
28
31
|
const DropdownMenuContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuContent$1, {
|
|
29
32
|
ref,
|
|
30
|
-
className: cn(
|
|
33
|
+
className: cn(`
|
|
34
|
+
rounded-berget-xs bg-berget-popover text-berget-popover-foreground
|
|
35
|
+
shadow-berget-md
|
|
36
|
+
`, className),
|
|
31
37
|
...props
|
|
32
38
|
}));
|
|
33
39
|
DropdownMenuContent.displayName = "DropdownMenuContent";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DropdownMenu.mjs","names":["DropdownMenuTriggerPrimitive","DropdownMenuSubTriggerPrimitive","DropdownMenuSubContentPrimitive","DropdownMenuContentPrimitive","DropdownMenuItemPrimitive","DropdownMenuCheckboxItemPrimitive","DropdownMenuRadioItemPrimitive","DropdownMenuLabelPrimitive","DropdownMenuSeparatorPrimitive","DropdownMenuShortcutPrimitive"],"sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport {\n DropdownMenuCheckboxItem as DropdownMenuCheckboxItemPrimitive,\n DropdownMenuContent as DropdownMenuContentPrimitive,\n DropdownMenuItem as DropdownMenuItemPrimitive,\n DropdownMenuLabel as DropdownMenuLabelPrimitive,\n DropdownMenuRadioItem as DropdownMenuRadioItemPrimitive,\n DropdownMenuSeparator as DropdownMenuSeparatorPrimitive,\n DropdownMenuShortcut as DropdownMenuShortcutPrimitive,\n DropdownMenuSubContent as DropdownMenuSubContentPrimitive,\n DropdownMenuSubTrigger as DropdownMenuSubTriggerPrimitive,\n DropdownMenuTrigger as DropdownMenuTriggerPrimitive,\n} from '../../primitives/dropdown-menu';\nimport { cn, asChildRender } from '../../lib/utils';\n\n/* ------------------------------------------------------------------ */\n/* Root & inert sub-components (re-exported from the primitive) */\n/* ------------------------------------------------------------------ */\n\nexport {\n DropdownMenu,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuRadioGroup,\n} from '../../primitives/dropdown-menu';\n\n/* ------------------------------------------------------------------ */\n/* Trigger */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuTriggerProps = Omit<\n React.ComponentProps<typeof DropdownMenuTriggerPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuTrigger = React.forwardRef<HTMLButtonElement, DropdownMenuTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <DropdownMenuTriggerPrimitive ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </DropdownMenuTriggerPrimitive>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenuTrigger';\n\n/* ------------------------------------------------------------------ */\n/* SubTrigger */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSubTriggerProps = Omit<\n React.ComponentProps<typeof DropdownMenuSubTriggerPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuSubTrigger = React.forwardRef<HTMLDivElement, DropdownMenuSubTriggerProps>(\n ({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuSubTriggerPrimitive\n ref={ref}\n className={cn(\n // Berget density & radius; focus/accent styling comes from the primitive.\n 'gap-2 rounded-berget-xs px-2 py-1.5',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuSubTriggerPrimitive>\n ),\n);\nDropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';\n\n/* ------------------------------------------------------------------ */\n/* SubContent */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSubContentProps = React.ComponentProps<typeof DropdownMenuSubContentPrimitive>;\n\nconst DropdownMenuSubContent = React.forwardRef<HTMLDivElement, DropdownMenuSubContentProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuSubContentPrimitive\n ref={ref}\n className={cn(\n 'rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-lg',\n className,\n )}\n {...props}\n />\n ),\n);\nDropdownMenuSubContent.displayName = 'DropdownMenuSubContent';\n\n/* ------------------------------------------------------------------ */\n/* Content */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuContentProps = React.ComponentProps<typeof DropdownMenuContentPrimitive>;\n\nconst DropdownMenuContent = React.forwardRef<HTMLDivElement, DropdownMenuContentProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuContentPrimitive\n ref={ref}\n className={cn(\n 'rounded-berget-xs bg-berget-popover text-berget-popover-foreground shadow-berget-md',\n className,\n )}\n {...props}\n />\n ),\n);\nDropdownMenuContent.displayName = 'DropdownMenuContent';\n\n/* ------------------------------------------------------------------ */\n/* Item */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n inset?: boolean;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuItem = React.forwardRef<HTMLDivElement, DropdownMenuItemProps>(\n ({ className, inset, asChild, children, textValue, ...props }, ref) => (\n <DropdownMenuItemPrimitive\n ref={ref}\n label={textValue}\n className={cn(\n // Berget density & radius; focus accent and destructive variant from the primitive.\n 'gap-2 rounded-berget-xs px-2 py-1.5',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuItemPrimitive>\n ),\n);\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n\n/* ------------------------------------------------------------------ */\n/* CheckboxItem */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuCheckboxItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuCheckboxItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuCheckboxItem = React.forwardRef<HTMLDivElement, DropdownMenuCheckboxItemProps>(\n ({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuCheckboxItemPrimitive\n ref={ref}\n label={textValue}\n className={cn('rounded-berget-xs', className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuCheckboxItemPrimitive>\n ),\n);\nDropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem';\n\n/* ------------------------------------------------------------------ */\n/* RadioItem */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuRadioItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuRadioItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuRadioItem = React.forwardRef<HTMLDivElement, DropdownMenuRadioItemProps>(\n ({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuRadioItemPrimitive\n ref={ref}\n label={textValue}\n className={cn('rounded-berget-xs', className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuRadioItemPrimitive>\n ),\n);\nDropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';\n\n/* ------------------------------------------------------------------ */\n/* Label */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuLabelProps = Omit<\n React.ComponentProps<typeof DropdownMenuLabelPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuLabel = React.forwardRef<HTMLDivElement, DropdownMenuLabelProps>(\n ({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuLabelPrimitive\n ref={ref}\n className={cn(\n 'px-2 py-1.5 text-sm font-semibold text-berget-foreground',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuLabelPrimitive>\n ),\n);\nDropdownMenuLabel.displayName = 'DropdownMenuLabel';\n\n/* ------------------------------------------------------------------ */\n/* Separator */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSeparatorProps = Omit<\n React.ComponentProps<typeof DropdownMenuSeparatorPrimitive>,\n 'className'\n> & { className?: string };\n\nconst DropdownMenuSeparator = React.forwardRef<HTMLDivElement, DropdownMenuSeparatorProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuSeparatorPrimitive\n ref={ref}\n className={cn('bg-berget-separator', className)}\n {...props}\n />\n ),\n);\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator';\n\n/* ------------------------------------------------------------------ */\n/* Shortcut */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuShortcutProps = React.ComponentProps<typeof DropdownMenuShortcutPrimitive>;\n\nconst DropdownMenuShortcut = ({ className, ...props }: DropdownMenuShortcutProps) => {\n return (\n <DropdownMenuShortcutPrimitive\n className={cn('text-berget-muted-foreground', className)}\n {...props}\n />\n );\n};\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\n/* ------------------------------------------------------------------ */\n/* Exports */\n/* ------------------------------------------------------------------ */\n\nexport {\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n};\n"],"mappings":";;;;;;AA2CA,MAAM,sBAAsB,MAAM,YAC/B,EAAE,SAAS,UAAU,GAAG,SAAS,QAChC,oBAACA,uBAAD;CAAmC;CAAK,QAAQ,cAAc,SAAS,QAAQ;CAAG,GAAI;CACnF,UAAA,UAAU,KAAA,IAAY;AACK,CAAA,CAElC;AACA,oBAAoB,cAAc;AAgBlC,MAAM,yBAAyB,MAAM,YAClC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,SAAS,QAClD,oBAACC,0BAAD;CACO;CACL,WAAW,GAET,uCACA,SAAS,QACT,SACF;CACA,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACQ,CAAA,CAErC;AACA,uBAAuB,cAAc;AAQrC,MAAM,yBAAyB,MAAM,YAClC,EAAE,WAAW,GAAG,SAAS,QACxB,oBAACC,0BAAD;CACO;CACL,WAAW,GACT,uFACA,SACF;CACA,GAAI;AACL,CAAA,CAEL;AACA,uBAAuB,cAAc;AAQrC,MAAM,sBAAsB,MAAM,YAC/B,EAAE,WAAW,GAAG,SAAS,QACxB,oBAACC,uBAAD;CACO;CACL,WAAW,GACT,uFACA,SACF;CACA,GAAI;AACL,CAAA,CAEL;AACA,oBAAoB,cAAc;AAkBlC,MAAM,mBAAmB,MAAM,YAC5B,EAAE,WAAW,OAAO,SAAS,UAAU,WAAW,GAAG,SAAS,QAC7D,oBAACC,oBAAD;CACO;CACL,OAAO;CACP,WAAW,GAET,uCACA,SAAS,QACT,SACF;CACA,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACE,CAAA,CAE/B;AACA,iBAAiB,cAAc;AAiB/B,MAAM,2BAA2B,MAAM,YACpC,EAAE,WAAW,UAAU,SAAS,WAAW,GAAG,SAAS,QACtD,oBAACC,4BAAD;CACO;CACL,OAAO;CACP,WAAW,GAAG,qBAAqB,SAAS;CAC5C,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACU,CAAA,CAEvC;AACA,yBAAyB,cAAc;AAiBvC,MAAM,wBAAwB,MAAM,YACjC,EAAE,WAAW,UAAU,SAAS,WAAW,GAAG,SAAS,QACtD,oBAACC,yBAAD;CACO;CACL,OAAO;CACP,WAAW,GAAG,qBAAqB,SAAS;CAC5C,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACO,CAAA,CAEpC;AACA,sBAAsB,cAAc;AAgBpC,MAAM,oBAAoB,MAAM,YAC7B,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,SAAS,QAClD,oBAACC,qBAAD;CACO;CACL,WAAW,GACT,4DACA,SAAS,QACT,SACF;CACA,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAEhC;AACA,kBAAkB,cAAc;AAWhC,MAAM,wBAAwB,MAAM,YACjC,EAAE,WAAW,GAAG,SAAS,QACxB,oBAACC,yBAAD;CACO;CACL,WAAW,GAAG,uBAAuB,SAAS;CAC9C,GAAI;AACL,CAAA,CAEL;AACA,sBAAsB,cAAc;AAQpC,MAAM,wBAAwB,EAAE,WAAW,GAAG,YAAuC;CACnF,OACE,oBAACC,wBAAD;EACE,WAAW,GAAG,gCAAgC,SAAS;EACvD,GAAI;CACL,CAAA;AAEL;AACA,qBAAqB,cAAc"}
|
|
1
|
+
{"version":3,"file":"DropdownMenu.mjs","names":["DropdownMenuTriggerPrimitive","DropdownMenuSubTriggerPrimitive","DropdownMenuSubContentPrimitive","DropdownMenuContentPrimitive","DropdownMenuItemPrimitive","DropdownMenuCheckboxItemPrimitive","DropdownMenuRadioItemPrimitive","DropdownMenuLabelPrimitive","DropdownMenuSeparatorPrimitive","DropdownMenuShortcutPrimitive"],"sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\n\nimport {\n DropdownMenuCheckboxItem as DropdownMenuCheckboxItemPrimitive,\n DropdownMenuContent as DropdownMenuContentPrimitive,\n DropdownMenuItem as DropdownMenuItemPrimitive,\n DropdownMenuLabel as DropdownMenuLabelPrimitive,\n DropdownMenuRadioItem as DropdownMenuRadioItemPrimitive,\n DropdownMenuSeparator as DropdownMenuSeparatorPrimitive,\n DropdownMenuShortcut as DropdownMenuShortcutPrimitive,\n DropdownMenuSubContent as DropdownMenuSubContentPrimitive,\n DropdownMenuSubTrigger as DropdownMenuSubTriggerPrimitive,\n DropdownMenuTrigger as DropdownMenuTriggerPrimitive,\n} from '../../primitives/dropdown-menu';\nimport { cn, asChildRender } from '../../lib/utils';\n\n/* ------------------------------------------------------------------ */\n/* Root & inert sub-components (re-exported from the primitive) */\n/* ------------------------------------------------------------------ */\n\nexport {\n DropdownMenu,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuRadioGroup,\n} from '../../primitives/dropdown-menu';\n\n/* ------------------------------------------------------------------ */\n/* Trigger */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuTriggerProps = Omit<\n React.ComponentProps<typeof DropdownMenuTriggerPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuTrigger = React.forwardRef<HTMLButtonElement, DropdownMenuTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <DropdownMenuTriggerPrimitive ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </DropdownMenuTriggerPrimitive>\n ),\n);\nDropdownMenuTrigger.displayName = 'DropdownMenuTrigger';\n\n/* ------------------------------------------------------------------ */\n/* SubTrigger */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSubTriggerProps = Omit<\n React.ComponentProps<typeof DropdownMenuSubTriggerPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuSubTrigger = React.forwardRef<HTMLDivElement, DropdownMenuSubTriggerProps>(\n ({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuSubTriggerPrimitive\n ref={ref}\n className={cn(\n // Berget density & radius; focus/accent styling comes from the primitive.\n 'gap-2 rounded-berget-xs px-2 py-1.5',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuSubTriggerPrimitive>\n ),\n);\nDropdownMenuSubTrigger.displayName = 'DropdownMenuSubTrigger';\n\n/* ------------------------------------------------------------------ */\n/* SubContent */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSubContentProps = React.ComponentProps<typeof DropdownMenuSubContentPrimitive>;\n\nconst DropdownMenuSubContent = React.forwardRef<HTMLDivElement, DropdownMenuSubContentProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuSubContentPrimitive\n ref={ref}\n className={cn(\n `\n rounded-berget-xs bg-berget-popover text-berget-popover-foreground\n shadow-berget-lg\n `,\n className,\n )}\n {...props}\n />\n ),\n);\nDropdownMenuSubContent.displayName = 'DropdownMenuSubContent';\n\n/* ------------------------------------------------------------------ */\n/* Content */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuContentProps = React.ComponentProps<typeof DropdownMenuContentPrimitive>;\n\nconst DropdownMenuContent = React.forwardRef<HTMLDivElement, DropdownMenuContentProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuContentPrimitive\n ref={ref}\n className={cn(\n `\n rounded-berget-xs bg-berget-popover text-berget-popover-foreground\n shadow-berget-md\n `,\n className,\n )}\n {...props}\n />\n ),\n);\nDropdownMenuContent.displayName = 'DropdownMenuContent';\n\n/* ------------------------------------------------------------------ */\n/* Item */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n inset?: boolean;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuItem = React.forwardRef<HTMLDivElement, DropdownMenuItemProps>(\n ({ className, inset, asChild, children, textValue, ...props }, ref) => (\n <DropdownMenuItemPrimitive\n ref={ref}\n label={textValue}\n className={cn(\n // Berget density & radius; focus accent and destructive variant from the primitive.\n 'gap-2 rounded-berget-xs px-2 py-1.5',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuItemPrimitive>\n ),\n);\nDropdownMenuItem.displayName = 'DropdownMenuItem';\n\n/* ------------------------------------------------------------------ */\n/* CheckboxItem */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuCheckboxItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuCheckboxItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuCheckboxItem = React.forwardRef<HTMLDivElement, DropdownMenuCheckboxItemProps>(\n ({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuCheckboxItemPrimitive\n ref={ref}\n label={textValue}\n className={cn('rounded-berget-xs', className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuCheckboxItemPrimitive>\n ),\n);\nDropdownMenuCheckboxItem.displayName = 'DropdownMenuCheckboxItem';\n\n/* ------------------------------------------------------------------ */\n/* RadioItem */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuRadioItemProps = Omit<\n React.ComponentProps<typeof DropdownMenuRadioItemPrimitive>,\n 'className' | 'render' | 'label'\n> & {\n className?: string;\n /** Typeahead label. Replaces the Radix `textValue` prop. */\n textValue?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuRadioItem = React.forwardRef<HTMLDivElement, DropdownMenuRadioItemProps>(\n ({ className, children, asChild, textValue, ...props }, ref) => (\n <DropdownMenuRadioItemPrimitive\n ref={ref}\n label={textValue}\n className={cn('rounded-berget-xs', className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuRadioItemPrimitive>\n ),\n);\nDropdownMenuRadioItem.displayName = 'DropdownMenuRadioItem';\n\n/* ------------------------------------------------------------------ */\n/* Label */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuLabelProps = Omit<\n React.ComponentProps<typeof DropdownMenuLabelPrimitive>,\n 'className' | 'render'\n> & {\n className?: string;\n inset?: boolean;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst DropdownMenuLabel = React.forwardRef<HTMLDivElement, DropdownMenuLabelProps>(\n ({ className, inset, asChild, children, ...props }, ref) => (\n <DropdownMenuLabelPrimitive\n ref={ref}\n className={cn(\n 'px-2 py-1.5 text-sm font-semibold text-berget-foreground',\n inset && 'pl-8',\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </DropdownMenuLabelPrimitive>\n ),\n);\nDropdownMenuLabel.displayName = 'DropdownMenuLabel';\n\n/* ------------------------------------------------------------------ */\n/* Separator */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuSeparatorProps = Omit<\n React.ComponentProps<typeof DropdownMenuSeparatorPrimitive>,\n 'className'\n> & { className?: string };\n\nconst DropdownMenuSeparator = React.forwardRef<HTMLDivElement, DropdownMenuSeparatorProps>(\n ({ className, ...props }, ref) => (\n <DropdownMenuSeparatorPrimitive\n ref={ref}\n className={cn('bg-berget-separator', className)}\n {...props}\n />\n ),\n);\nDropdownMenuSeparator.displayName = 'DropdownMenuSeparator';\n\n/* ------------------------------------------------------------------ */\n/* Shortcut */\n/* ------------------------------------------------------------------ */\n\ntype DropdownMenuShortcutProps = React.ComponentProps<typeof DropdownMenuShortcutPrimitive>;\n\nconst DropdownMenuShortcut = ({ className, ...props }: DropdownMenuShortcutProps) => {\n return (\n <DropdownMenuShortcutPrimitive\n className={cn('text-berget-muted-foreground', className)}\n {...props}\n />\n );\n};\nDropdownMenuShortcut.displayName = 'DropdownMenuShortcut';\n\n/* ------------------------------------------------------------------ */\n/* Exports */\n/* ------------------------------------------------------------------ */\n\nexport {\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n};\n"],"mappings":";;;;;;AA2CA,MAAM,sBAAsB,MAAM,YAC/B,EAAE,SAAS,UAAU,GAAG,SAAS,QAChC,oBAACA,uBAAD;CAAmC;CAAK,QAAQ,cAAc,SAAS,QAAQ;CAAG,GAAI;CACnF,UAAA,UAAU,KAAA,IAAY;AACK,CAAA,CAElC;AACA,oBAAoB,cAAc;AAgBlC,MAAM,yBAAyB,MAAM,YAClC,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,SAAS,QAClD,oBAACC,0BAAD;CACO;CACL,WAAW,GAET,uCACA,SAAS,QACT,SACF;CACA,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACQ,CAAA,CAErC;AACA,uBAAuB,cAAc;AAQrC,MAAM,yBAAyB,MAAM,YAClC,EAAE,WAAW,GAAG,SAAS,QACxB,oBAACC,0BAAD;CACO;CACL,WAAW,GACT;;;WAIA,SACF;CACA,GAAI;AACL,CAAA,CAEL;AACA,uBAAuB,cAAc;AAQrC,MAAM,sBAAsB,MAAM,YAC/B,EAAE,WAAW,GAAG,SAAS,QACxB,oBAACC,uBAAD;CACO;CACL,WAAW,GACT;;;WAIA,SACF;CACA,GAAI;AACL,CAAA,CAEL;AACA,oBAAoB,cAAc;AAkBlC,MAAM,mBAAmB,MAAM,YAC5B,EAAE,WAAW,OAAO,SAAS,UAAU,WAAW,GAAG,SAAS,QAC7D,oBAACC,oBAAD;CACO;CACL,OAAO;CACP,WAAW,GAET,uCACA,SAAS,QACT,SACF;CACA,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACE,CAAA,CAE/B;AACA,iBAAiB,cAAc;AAiB/B,MAAM,2BAA2B,MAAM,YACpC,EAAE,WAAW,UAAU,SAAS,WAAW,GAAG,SAAS,QACtD,oBAACC,4BAAD;CACO;CACL,OAAO;CACP,WAAW,GAAG,qBAAqB,SAAS;CAC5C,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACU,CAAA,CAEvC;AACA,yBAAyB,cAAc;AAiBvC,MAAM,wBAAwB,MAAM,YACjC,EAAE,WAAW,UAAU,SAAS,WAAW,GAAG,SAAS,QACtD,oBAACC,yBAAD;CACO;CACL,OAAO;CACP,WAAW,GAAG,qBAAqB,SAAS;CAC5C,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACO,CAAA,CAEpC;AACA,sBAAsB,cAAc;AAgBpC,MAAM,oBAAoB,MAAM,YAC7B,EAAE,WAAW,OAAO,SAAS,UAAU,GAAG,SAAS,QAClD,oBAACC,qBAAD;CACO;CACL,WAAW,GACT,4DACA,SAAS,QACT,SACF;CACA,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAEhC;AACA,kBAAkB,cAAc;AAWhC,MAAM,wBAAwB,MAAM,YACjC,EAAE,WAAW,GAAG,SAAS,QACxB,oBAACC,yBAAD;CACO;CACL,WAAW,GAAG,uBAAuB,SAAS;CAC9C,GAAI;AACL,CAAA,CAEL;AACA,sBAAsB,cAAc;AAQpC,MAAM,wBAAwB,EAAE,WAAW,GAAG,YAAuC;CACnF,OACE,oBAACC,wBAAD;EACE,WAAW,GAAG,gCAAgC,SAAS;EACvD,GAAI;CACL,CAAA;AAEL;AACA,qBAAqB,cAAc"}
|
|
@@ -17,7 +17,10 @@ function Empty({ className, ...props }) {
|
|
|
17
17
|
const EmptyMedia = react.forwardRef(({ className, ...props }, ref) => {
|
|
18
18
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_empty.EmptyMedia, {
|
|
19
19
|
ref,
|
|
20
|
-
className: require_utils.cn(
|
|
20
|
+
className: require_utils.cn(`
|
|
21
|
+
data-[variant=icon]:bg-berget-empty-media-icon-bg
|
|
22
|
+
data-[variant=icon]:text-berget-empty-media-icon-fg
|
|
23
|
+
`, className),
|
|
21
24
|
...props
|
|
22
25
|
});
|
|
23
26
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Empty.cjs","names":["EmptyPrimitive","React","EmptyMediaPrimitive","cn","EmptyTitlePrimitive","EmptyDescriptionPrimitive"],"sources":["../../../src/components/empty/Empty.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n Empty as EmptyPrimitive,\n EmptyHeader,\n EmptyContent,\n EmptyMedia as EmptyMediaPrimitive,\n EmptyTitle as EmptyTitlePrimitive,\n EmptyDescription as EmptyDescriptionPrimitive,\n} from '@/primitives/empty';\n\nexport type EmptyProps = React.ComponentProps<typeof EmptyPrimitive>;\n\n/** Empty — pass-through; the primitive contains no Berget-incompatible styling. */\nexport function Empty({ className, ...props }: EmptyProps) {\n return <EmptyPrimitive className={className} {...props} />;\n}\n\n/** Re-export unchanged sub-components. */\nexport { EmptyHeader, EmptyContent };\n\n/** EmptyMedia — override icon-variant background/foreground with Berget tokens. */\nexport const EmptyMedia = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof EmptyMediaPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <EmptyMediaPrimitive\n ref={ref}\n className={cn(\n
|
|
1
|
+
{"version":3,"file":"Empty.cjs","names":["EmptyPrimitive","React","EmptyMediaPrimitive","cn","EmptyTitlePrimitive","EmptyDescriptionPrimitive"],"sources":["../../../src/components/empty/Empty.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n Empty as EmptyPrimitive,\n EmptyHeader,\n EmptyContent,\n EmptyMedia as EmptyMediaPrimitive,\n EmptyTitle as EmptyTitlePrimitive,\n EmptyDescription as EmptyDescriptionPrimitive,\n} from '@/primitives/empty';\n\nexport type EmptyProps = React.ComponentProps<typeof EmptyPrimitive>;\n\n/** Empty — pass-through; the primitive contains no Berget-incompatible styling. */\nexport function Empty({ className, ...props }: EmptyProps) {\n return <EmptyPrimitive className={className} {...props} />;\n}\n\n/** Re-export unchanged sub-components. */\nexport { EmptyHeader, EmptyContent };\n\n/** EmptyMedia — override icon-variant background/foreground with Berget tokens. */\nexport const EmptyMedia = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof EmptyMediaPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <EmptyMediaPrimitive\n ref={ref}\n className={cn(\n `\n data-[variant=icon]:bg-berget-empty-media-icon-bg\n data-[variant=icon]:text-berget-empty-media-icon-fg\n `,\n className,\n )}\n {...props}\n />\n );\n});\nEmptyMedia.displayName = 'EmptyMedia';\n\n/** EmptyTitle — explicit semantic foreground + larger size (primitive defaults to text-sm). */\nexport const EmptyTitle = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof EmptyTitlePrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <EmptyTitlePrimitive\n ref={ref}\n className={cn('text-base text-berget-empty-title-fg', className)}\n {...props}\n />\n );\n});\nEmptyTitle.displayName = 'EmptyTitle';\n\n/** EmptyDescription — override muted text colour. */\nexport const EmptyDescription = React.forwardRef<\n HTMLParagraphElement,\n React.ComponentProps<typeof EmptyDescriptionPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <EmptyDescriptionPrimitive\n ref={ref}\n className={cn('text-berget-empty-description-fg', className)}\n {...props}\n />\n );\n});\nEmptyDescription.displayName = 'EmptyDescription';\n"],"mappings":";;;;;;;;;AAgBA,SAAgB,MAAM,EAAE,WAAW,GAAG,SAAqB;CACzD,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACA,cAAAA,OAAD;EAA2B;EAAW,GAAI;CAAQ,CAAA;AAC3D;;AAMA,MAAa,aAAaC,MAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,cAAAA,YAAD;EACO;EACL,WAAWC,cAAAA,GACT;;;WAIA,SACF;EACA,GAAI;CACL,CAAA;AAEL,CAAC;AACD,WAAW,cAAc;;AAGzB,MAAa,aAAaF,MAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACG,cAAAA,YAAD;EACO;EACL,WAAWD,cAAAA,GAAG,wCAAwC,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL,CAAC;AACD,WAAW,cAAc;;AAGzB,MAAa,mBAAmBF,MAAM,YAGnC,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACI,cAAAA,kBAAD;EACO;EACL,WAAWF,cAAAA,GAAG,oCAAoC,SAAS;EAC3D,GAAI;CACL,CAAA;AAEL,CAAC;AACD,iBAAiB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Empty.d.cts","names":["EmptyPrimitive"],"sources":["../../../src/components/empty/Empty.tsx"],"mappings":";;;YAaY,aAAa,MAAM,sBAAsBA;;wBAGrC,QAAQ,cAAc,SAAS,yCAAU,IAAA;;qBAQ5C,YAAU,MAAA,0BAAA,KAAA,MAAA,gBAAA,kBAAA,MAAA,eAAA,qDAAA,cAAA;;
|
|
1
|
+
{"version":3,"file":"Empty.d.cts","names":["EmptyPrimitive"],"sources":["../../../src/components/empty/Empty.tsx"],"mappings":";;;YAaY,aAAa,MAAM,sBAAsBA;;wBAGrC,QAAQ,cAAc,SAAS,yCAAU,IAAA;;qBAQ5C,YAAU,MAAA,0BAAA,KAAA,MAAA,gBAAA,kBAAA,MAAA,eAAA,qDAAA,cAAA;;6CAiBrB,6CAAA,MAAA,cAAA;;qBAIW,YAAU,MAAA,0BAAA,KAAA,MAAA,gBAAA,kBAAA,MAAA,eAAA,0BAAA,MAAA,cAAA;;qBAeV,kBAAgB,MAAA,0BAAA,KAAA,MAAA,gBAAA,wBAAA,MAAA,eAAA,gCAAA,MAAA,cAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Empty.d.mts","names":["EmptyPrimitive"],"sources":["../../../src/components/empty/Empty.tsx"],"mappings":";;;YAaY,aAAa,MAAM,sBAAsBA;;wBAGrC,QAAQ,cAAc,SAAS,yCAAU,IAAA;;qBAQ5C,YAAU,MAAA,0BAAA,KAAA,MAAA,gBAAA,kBAAA,MAAA,eAAA,qDAAA,cAAA;;
|
|
1
|
+
{"version":3,"file":"Empty.d.mts","names":["EmptyPrimitive"],"sources":["../../../src/components/empty/Empty.tsx"],"mappings":";;;YAaY,aAAa,MAAM,sBAAsBA;;wBAGrC,QAAQ,cAAc,SAAS,yCAAU,IAAA;;qBAQ5C,YAAU,MAAA,0BAAA,KAAA,MAAA,gBAAA,kBAAA,MAAA,eAAA,qDAAA,cAAA;;6CAiBrB,6CAAA,MAAA,cAAA;;qBAIW,YAAU,MAAA,0BAAA,KAAA,MAAA,gBAAA,kBAAA,MAAA,eAAA,0BAAA,MAAA,cAAA;;qBAeV,kBAAgB,MAAA,0BAAA,KAAA,MAAA,gBAAA,wBAAA,MAAA,eAAA,gCAAA,MAAA,cAAA"}
|
|
@@ -15,7 +15,10 @@ function Empty({ className, ...props }) {
|
|
|
15
15
|
const EmptyMedia = React.forwardRef(({ className, ...props }, ref) => {
|
|
16
16
|
return /* @__PURE__ */ jsx(EmptyMedia$1, {
|
|
17
17
|
ref,
|
|
18
|
-
className: cn(
|
|
18
|
+
className: cn(`
|
|
19
|
+
data-[variant=icon]:bg-berget-empty-media-icon-bg
|
|
20
|
+
data-[variant=icon]:text-berget-empty-media-icon-fg
|
|
21
|
+
`, className),
|
|
19
22
|
...props
|
|
20
23
|
});
|
|
21
24
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Empty.mjs","names":["EmptyPrimitive","EmptyMediaPrimitive","EmptyTitlePrimitive","EmptyDescriptionPrimitive"],"sources":["../../../src/components/empty/Empty.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n Empty as EmptyPrimitive,\n EmptyHeader,\n EmptyContent,\n EmptyMedia as EmptyMediaPrimitive,\n EmptyTitle as EmptyTitlePrimitive,\n EmptyDescription as EmptyDescriptionPrimitive,\n} from '@/primitives/empty';\n\nexport type EmptyProps = React.ComponentProps<typeof EmptyPrimitive>;\n\n/** Empty — pass-through; the primitive contains no Berget-incompatible styling. */\nexport function Empty({ className, ...props }: EmptyProps) {\n return <EmptyPrimitive className={className} {...props} />;\n}\n\n/** Re-export unchanged sub-components. */\nexport { EmptyHeader, EmptyContent };\n\n/** EmptyMedia — override icon-variant background/foreground with Berget tokens. */\nexport const EmptyMedia = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof EmptyMediaPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <EmptyMediaPrimitive\n ref={ref}\n className={cn(\n
|
|
1
|
+
{"version":3,"file":"Empty.mjs","names":["EmptyPrimitive","EmptyMediaPrimitive","EmptyTitlePrimitive","EmptyDescriptionPrimitive"],"sources":["../../../src/components/empty/Empty.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cn } from '../../lib/utils';\nimport {\n Empty as EmptyPrimitive,\n EmptyHeader,\n EmptyContent,\n EmptyMedia as EmptyMediaPrimitive,\n EmptyTitle as EmptyTitlePrimitive,\n EmptyDescription as EmptyDescriptionPrimitive,\n} from '@/primitives/empty';\n\nexport type EmptyProps = React.ComponentProps<typeof EmptyPrimitive>;\n\n/** Empty — pass-through; the primitive contains no Berget-incompatible styling. */\nexport function Empty({ className, ...props }: EmptyProps) {\n return <EmptyPrimitive className={className} {...props} />;\n}\n\n/** Re-export unchanged sub-components. */\nexport { EmptyHeader, EmptyContent };\n\n/** EmptyMedia — override icon-variant background/foreground with Berget tokens. */\nexport const EmptyMedia = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof EmptyMediaPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <EmptyMediaPrimitive\n ref={ref}\n className={cn(\n `\n data-[variant=icon]:bg-berget-empty-media-icon-bg\n data-[variant=icon]:text-berget-empty-media-icon-fg\n `,\n className,\n )}\n {...props}\n />\n );\n});\nEmptyMedia.displayName = 'EmptyMedia';\n\n/** EmptyTitle — explicit semantic foreground + larger size (primitive defaults to text-sm). */\nexport const EmptyTitle = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof EmptyTitlePrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <EmptyTitlePrimitive\n ref={ref}\n className={cn('text-base text-berget-empty-title-fg', className)}\n {...props}\n />\n );\n});\nEmptyTitle.displayName = 'EmptyTitle';\n\n/** EmptyDescription — override muted text colour. */\nexport const EmptyDescription = React.forwardRef<\n HTMLParagraphElement,\n React.ComponentProps<typeof EmptyDescriptionPrimitive>\n>(({ className, ...props }, ref) => {\n return (\n <EmptyDescriptionPrimitive\n ref={ref}\n className={cn('text-berget-empty-description-fg', className)}\n {...props}\n />\n );\n});\nEmptyDescription.displayName = 'EmptyDescription';\n"],"mappings":";;;;;;;AAgBA,SAAgB,MAAM,EAAE,WAAW,GAAG,SAAqB;CACzD,OAAO,oBAACA,SAAD;EAA2B;EAAW,GAAI;CAAQ,CAAA;AAC3D;;AAMA,MAAa,aAAa,MAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,OACE,oBAACC,cAAD;EACO;EACL,WAAW,GACT;;;WAIA,SACF;EACA,GAAI;CACL,CAAA;AAEL,CAAC;AACD,WAAW,cAAc;;AAGzB,MAAa,aAAa,MAAM,YAG7B,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,OACE,oBAACC,cAAD;EACO;EACL,WAAW,GAAG,wCAAwC,SAAS;EAC/D,GAAI;CACL,CAAA;AAEL,CAAC;AACD,WAAW,cAAc;;AAGzB,MAAa,mBAAmB,MAAM,YAGnC,EAAE,WAAW,GAAG,SAAS,QAAQ;CAClC,OACE,oBAACC,oBAAD;EACO;EACL,WAAW,GAAG,oCAAoC,SAAS;EAC3D,GAAI;CACL,CAAA;AAEL,CAAC;AACD,iBAAiB,cAAc"}
|
|
@@ -38,7 +38,17 @@ const Grid = react.forwardRef(({ className, align, justify, cols, rows, gap, gap
|
|
|
38
38
|
className: require_utils.cn(gridVariants({
|
|
39
39
|
align,
|
|
40
40
|
justify
|
|
41
|
-
}), cols !== void 0 && `
|
|
41
|
+
}), cols !== void 0 && `
|
|
42
|
+
grid-cols-${cols}
|
|
43
|
+
`, rows !== void 0 && `
|
|
44
|
+
grid-rows-${rows}
|
|
45
|
+
`, gap !== void 0 && `
|
|
46
|
+
gap-${gap}
|
|
47
|
+
`, gapX !== void 0 && `
|
|
48
|
+
gap-x-${gapX}
|
|
49
|
+
`, gapY !== void 0 && `
|
|
50
|
+
gap-y-${gapY}
|
|
51
|
+
`, className),
|
|
42
52
|
children: asChild ? void 0 : children
|
|
43
53
|
}, props)
|
|
44
54
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.cjs","names":["cva","React","useRender","mergeProps","cn"],"sources":["../../../src/components/grid/Grid.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst gridVariants = cva('grid', {\n variants: {\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n },\n defaultVariants: {\n align: 'stretch',\n justify: 'start',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport type GridColsScale = 1 | 2 | 3 | 4 | 6 | 12;\n\nexport type GridRowsScale = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface GridProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof gridVariants> {\n children?: React.ReactNode;\n cols?: GridColsScale;\n rows?: GridRowsScale;\n gap?: SpacingScale;\n gapX?: SpacingScale;\n gapY?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Grid = React.forwardRef<HTMLElement, GridProps>(\n (\n { className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n gridVariants({ align, justify }),\n cols !== undefined
|
|
1
|
+
{"version":3,"file":"Grid.cjs","names":["cva","React","useRender","mergeProps","cn"],"sources":["../../../src/components/grid/Grid.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst gridVariants = cva('grid', {\n variants: {\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n },\n defaultVariants: {\n align: 'stretch',\n justify: 'start',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport type GridColsScale = 1 | 2 | 3 | 4 | 6 | 12;\n\nexport type GridRowsScale = 1 | 2 | 3 | 4 | 5 | 6;\n\nexport interface GridProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof gridVariants> {\n children?: React.ReactNode;\n cols?: GridColsScale;\n rows?: GridRowsScale;\n gap?: SpacingScale;\n gapX?: SpacingScale;\n gapY?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Grid = React.forwardRef<HTMLElement, GridProps>(\n (\n { className, align, justify, cols, rows, gap, gapX, gapY, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n gridVariants({ align, justify }),\n cols !== undefined &&\n `\n grid-cols-${cols}\n `,\n rows !== undefined &&\n `\n grid-rows-${rows}\n `,\n gap !== undefined &&\n `\n gap-${gap}\n `,\n gapX !== undefined &&\n `\n gap-x-${gapX}\n `,\n gapY !== undefined &&\n `\n gap-y-${gapY}\n `,\n className,\n ),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nGrid.displayName = 'Grid';\n\nexport { Grid, gridVariants };\n"],"mappings":";;;;;;;;;AAQA,MAAM,gBAAA,GAAeA,yBAAAA,IAAAA,CAAI,QAAQ;CAC/B,UAAU;EACR,OAAO;GACL,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;EACX;EACA,SAAS;GACP,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,QAAQ;GACR,QAAQ;EACV;CACF;CACA,iBAAiB;EACf,OAAO;EACP,SAAS;CACX;AACF,CAAC;AAyCD,MAAM,OAAOC,MAAM,YAEf,EAAE,WAAW,OAAO,SAAS,MAAM,MAAM,KAAK,MAAM,MAAM,UAAU,OAAO,UAAU,GAAG,SACxF,QACG;CACH,QAAA,GAAOC,0BAAAA,UAAAA,CAAU;EACf;EACA,gBAAgB;EAChB,QAAQ,UAAW,WAAkC,KAAA;EACrD,QAAA,GAAOC,2BAAAA,WAAAA,CACL;GACE,WAAWC,cAAAA,GACT,aAAa;IAAE;IAAO;GAAQ,CAAC,GAC/B,SAAS,KAAA,KACP;4BACc,KAAK;iBAErB,SAAS,KAAA,KACP;4BACc,KAAK;iBAErB,QAAQ,KAAA,KACN;sBACQ,IAAI;iBAEd,SAAS,KAAA,KACP;wBACU,KAAK;iBAEjB,SAAS,KAAA,KACP;wBACU,KAAK;iBAEjB,SACF;GACA,UAAU,UAAU,KAAA,IAAY;EAClC,GACA,KACF;CACF,CAAC;AACH,CACF;AACA,KAAK,cAAc"}
|
|
@@ -3,8 +3,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
//#region src/components/grid/Grid.d.ts
|
|
5
5
|
declare const gridVariants: (props?: ({
|
|
6
|
-
align?: "
|
|
7
|
-
justify?: "
|
|
6
|
+
align?: "center" | "start" | "end" | "stretch" | null | undefined;
|
|
7
|
+
justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
export type SpacingScale = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 96;
|
|
10
10
|
export type GridColsScale = 1 | 2 | 3 | 4 | 6 | 12;
|
|
@@ -3,8 +3,8 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
import { useRender } from "@base-ui/react/use-render";
|
|
4
4
|
//#region src/components/grid/Grid.d.ts
|
|
5
5
|
declare const gridVariants: (props?: ({
|
|
6
|
-
align?: "
|
|
7
|
-
justify?: "
|
|
6
|
+
align?: "center" | "start" | "end" | "stretch" | null | undefined;
|
|
7
|
+
justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
export type SpacingScale = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 96;
|
|
10
10
|
export type GridColsScale = 1 | 2 | 3 | 4 | 6 | 12;
|