@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
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
//#region src/components/alert/Alert.d.ts
|
|
5
5
|
declare const alertVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "info" | "default" | "destructive" | "success" | "warning" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {}
|
|
9
9
|
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -3,7 +3,7 @@ import * as React from "react";
|
|
|
3
3
|
import { VariantProps } from "class-variance-authority";
|
|
4
4
|
//#region src/components/alert/Alert.d.ts
|
|
5
5
|
declare const alertVariants: (props?: ({
|
|
6
|
-
variant?: "
|
|
6
|
+
variant?: "info" | "default" | "destructive" | "success" | "warning" | null | undefined;
|
|
7
7
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
8
|
export interface AlertProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof alertVariants> {}
|
|
9
9
|
declare const Alert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -18,23 +18,41 @@ AlertDialogTrigger.displayName = "AlertDialogTrigger";
|
|
|
18
18
|
const AlertDialogPortal = _base_ui_react_alert_dialog.AlertDialog.Portal;
|
|
19
19
|
const AlertDialogOverlay = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_alert_dialog.AlertDialog.Backdrop, {
|
|
20
20
|
ref,
|
|
21
|
-
className: require_utils.cn(
|
|
21
|
+
className: require_utils.cn(`
|
|
22
|
+
fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity
|
|
23
|
+
duration-200
|
|
24
|
+
data-ending-style:opacity-0
|
|
25
|
+
data-starting-style:opacity-0
|
|
26
|
+
`, className),
|
|
22
27
|
...props
|
|
23
28
|
}));
|
|
24
29
|
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
25
30
|
const AlertDialogContent = react.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(AlertDialogPortal, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(AlertDialogOverlay, {}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_alert_dialog.AlertDialog.Popup, {
|
|
26
31
|
ref,
|
|
27
|
-
className: require_utils.cn(
|
|
32
|
+
className: require_utils.cn(`
|
|
33
|
+
fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg
|
|
34
|
+
translate-x-[-50%] translate-y-[-50%] gap-4 rounded-berget-sm border
|
|
35
|
+
border-berget-dialog-border bg-berget-dialog-bg p-6 shadow-berget-lg
|
|
36
|
+
transition-[opacity,transform] duration-200
|
|
37
|
+
data-ending-style:scale-95 data-ending-style:opacity-0
|
|
38
|
+
data-starting-style:scale-95 data-starting-style:opacity-0
|
|
39
|
+
`, className),
|
|
28
40
|
...props
|
|
29
41
|
})] }));
|
|
30
42
|
AlertDialogContent.displayName = "AlertDialogContent";
|
|
31
43
|
const AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
32
|
-
className: require_utils.cn(
|
|
44
|
+
className: require_utils.cn(`
|
|
45
|
+
flex flex-col gap-1.5 text-center
|
|
46
|
+
sm:text-left
|
|
47
|
+
`, className),
|
|
33
48
|
...props
|
|
34
49
|
});
|
|
35
50
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
36
51
|
const AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
37
|
-
className: require_utils.cn(
|
|
52
|
+
className: require_utils.cn(`
|
|
53
|
+
flex flex-col-reverse gap-2
|
|
54
|
+
sm:flex-row sm:justify-end
|
|
55
|
+
`, className),
|
|
38
56
|
...props
|
|
39
57
|
});
|
|
40
58
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
@@ -73,7 +91,10 @@ AlertDialogAction.displayName = "AlertDialogAction";
|
|
|
73
91
|
/** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */
|
|
74
92
|
const AlertDialogCancel = react.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_alert_dialog.AlertDialog.Close, {
|
|
75
93
|
ref,
|
|
76
|
-
className: require_utils.cn(
|
|
94
|
+
className: require_utils.cn(`
|
|
95
|
+
mt-2
|
|
96
|
+
sm:mt-0
|
|
97
|
+
`, className),
|
|
77
98
|
render: require_utils.asChildRender(asChild, children),
|
|
78
99
|
...props,
|
|
79
100
|
children: asChild ? void 0 : children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.cjs","names":["AlertDialogPrimitive","React","asChildRender","cn","Typography"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\ntype AlertDialogTriggerProps = Omit<AlertDialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Trigger>\n ),\n);\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n
|
|
1
|
+
{"version":3,"file":"AlertDialog.cjs","names":["AlertDialogPrimitive","React","asChildRender","cn","Typography"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\ntype AlertDialogTriggerProps = Omit<AlertDialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Trigger>\n ),\n);\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n `\n fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity\n duration-200\n data-ending-style:opacity-0\n data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n));\nAlertDialogOverlay.displayName = 'AlertDialogOverlay';\n\nconst AlertDialogContent = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Popup.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n ref={ref}\n className={cn(\n `\n fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg\n translate-x-[-50%] translate-y-[-50%] gap-4 rounded-berget-sm border\n border-berget-dialog-border bg-berget-dialog-bg p-6 shadow-berget-lg\n transition-[opacity,transform] duration-200\n data-ending-style:scale-95 data-ending-style:opacity-0\n data-starting-style:scale-95 data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col gap-1.5 text-center\n sm:text-left\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col-reverse gap-2\n sm:flex-row sm:justify-end\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n HTMLHeadingElement,\n Omit<AlertDialogPrimitive.Title.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n render={<Typography variant=\"h5\" color=\"default\" as=\"h2\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Title>\n));\nAlertDialogTitle.displayName = 'AlertDialogTitle';\n\nconst AlertDialogDescription = React.forwardRef<\n HTMLParagraphElement,\n Omit<AlertDialogPrimitive.Description.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n render={<Typography variant=\"small\" color=\"muted\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialogDescription';\n\n/** Action button — compose with `<Button>` via `asChild` for consistent styling. */\nconst AlertDialogAction = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogAction.displayName = 'AlertDialogAction';\n\n/** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */\nconst AlertDialogCancel = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(\n `\n mt-2\n sm:mt-0\n `,\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogCancel.displayName = 'AlertDialogCancel';\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"],"mappings":";;;;;;;;;AAQA,MAAM,cAAcA,4BAAAA,YAAqB;AAQzC,MAAM,qBAAqBC,MAAM,YAC9B,EAAE,SAAS,UAAU,GAAG,SAAS,QAChC,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,SAAtB;CAAmC;CAAK,QAAQE,cAAAA,cAAc,SAAS,QAAQ;CAAG,GAAI;CACnF,UAAA,UAAU,KAAA,IAAY;AACK,CAAA,CAElC;AACA,mBAAmB,cAAc;AAEjC,MAAM,oBAAoBF,4BAAAA,YAAqB;AAE/C,MAAM,qBAAqBC,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,UAAtB;CACO;CACL,WAAWG,cAAAA,GACT;;;;;SAMA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqBF,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,iBAAA,GAAA,kBAAA,KAAA,CAAC,mBAAD,EAAA,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,oBAAD,CAAqB,CAAA,GACrB,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,WAAWG,cAAAA,GACT;;;;;;;WAQA,SACF;CACA,GAAI;AACL,CAAA,CACgB,EAAA,CAAA,CACpB;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;CACE,WAAWA,cAAAA,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;CACE,WAAWA,cAAAA,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,MAAM,mBAAmBF,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAACI,mBAAAA,YAAD;EAAY,SAAQ;EAAK,OAAM;EAAU,IAAG;EAAgB;CAAY,CAAA;CAChF,GAAI;CAEH;AACyB,CAAA,CAC7B;AACD,iBAAiB,cAAc;AAE/B,MAAM,yBAAyBH,MAAM,YAGlC,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,aAAtB;CACO;CACL,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAACI,mBAAAA,YAAD;EAAY,SAAQ;EAAQ,OAAM;EAAmB;CAAY,CAAA;CACzE,GAAI;CAEH;AAC+B,CAAA,CACnC;AACD,uBAAuB,cAAc;;AAGrC,MAAM,oBAAoBH,MAAM,YAO7B,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,QAC7C,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,WAAWG,cAAAA,GAAG,SAAS;CACvB,QAAQD,cAAAA,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc;;AAGhC,MAAM,oBAAoBD,MAAM,YAO7B,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,QAC7C,iBAAA,GAAA,kBAAA,IAAA,CAACD,4BAAAA,YAAqB,OAAtB;CACO;CACL,WAAWG,cAAAA,GACT;;;SAIA,SACF;CACA,QAAQD,cAAAA,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.d.cts","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"mappings":";;;cAQMA,sBAAWC,YAAA;KAEZ,0BAA0B,KAAKA,YAAqB,QAAQ;EAC/D;;EAEA;;cAGI,oBAAkB,MAAA,0BAAA,KAAA,kCAAA,MAAA,cAAA;cASlB,mBAAiB,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cAEjB,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAEiD;
|
|
1
|
+
{"version":3,"file":"AlertDialog.d.cts","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"mappings":";;;cAQMA,sBAAWC,YAAA;KAEZ,0BAA0B,KAAKA,YAAqB,QAAQ;EAC/D;;EAEA;;cAGI,oBAAkB,MAAA,0BAAA,KAAA,kCAAA,MAAA,cAAA;cASlB,mBAAiB,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cAEjB,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAEiD;YAevE,MAAA,cAAA;cAGI,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAE8C;YAoBpE,MAAA,cAAA;cAGI;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAclF;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAclF,kBAAgB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YASpE,MAAA,cAAA;cAGI,wBAAsB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YAS1E,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAWZ,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAiBZ,MAAA,cAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.d.mts","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"mappings":";;;cAQMA,sBAAWC,YAAA;KAEZ,0BAA0B,KAAKA,YAAqB,QAAQ;EAC/D;;EAEA;;cAGI,oBAAkB,MAAA,0BAAA,KAAA,kCAAA,MAAA,cAAA;cASlB,mBAAiB,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cAEjB,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAEiD;
|
|
1
|
+
{"version":3,"file":"AlertDialog.d.mts","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"mappings":";;;cAQMA,sBAAWC,YAAA;KAEZ,0BAA0B,KAAKA,YAAqB,QAAQ;EAC/D;;EAEA;;cAGI,oBAAkB,MAAA,0BAAA,KAAA,kCAAA,MAAA,cAAA;cASlB,mBAAiB,MAAA,0BAAA,8BAAA,iCAAA,MAAA,cAAA;cAEjB,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAEiD;YAevE,MAAA,cAAA;cAGI,oBAAkB,MAAA,0BAAA,KAAA,8BAAA;EAE8C;YAoBpE,MAAA,cAAA;cAGI;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAclF;KAA8C,cAAA,SAAA,MAAM,eAAe,8CAAe,IAAA;;;cAclF,kBAAgB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YASpE,MAAA,cAAA;cAGI,wBAAsB,MAAA,0BAAA,KAAA,8BAAA;EAEgD;YAS1E,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAWZ,MAAA,cAAA;;cAII,mBAAiB,MAAA,0BAAA,KAAA,8BAAA;EAGP;;EAEF;YAiBZ,MAAA,cAAA"}
|
|
@@ -16,23 +16,41 @@ AlertDialogTrigger.displayName = "AlertDialogTrigger";
|
|
|
16
16
|
const AlertDialogPortal = AlertDialog.Portal;
|
|
17
17
|
const AlertDialogOverlay = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialog.Backdrop, {
|
|
18
18
|
ref,
|
|
19
|
-
className: cn(
|
|
19
|
+
className: cn(`
|
|
20
|
+
fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity
|
|
21
|
+
duration-200
|
|
22
|
+
data-ending-style:opacity-0
|
|
23
|
+
data-starting-style:opacity-0
|
|
24
|
+
`, className),
|
|
20
25
|
...props
|
|
21
26
|
}));
|
|
22
27
|
AlertDialogOverlay.displayName = "AlertDialogOverlay";
|
|
23
28
|
const AlertDialogContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(AlertDialog.Popup, {
|
|
24
29
|
ref,
|
|
25
|
-
className: cn(
|
|
30
|
+
className: cn(`
|
|
31
|
+
fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg
|
|
32
|
+
translate-x-[-50%] translate-y-[-50%] gap-4 rounded-berget-sm border
|
|
33
|
+
border-berget-dialog-border bg-berget-dialog-bg p-6 shadow-berget-lg
|
|
34
|
+
transition-[opacity,transform] duration-200
|
|
35
|
+
data-ending-style:scale-95 data-ending-style:opacity-0
|
|
36
|
+
data-starting-style:scale-95 data-starting-style:opacity-0
|
|
37
|
+
`, className),
|
|
26
38
|
...props
|
|
27
39
|
})] }));
|
|
28
40
|
AlertDialogContent.displayName = "AlertDialogContent";
|
|
29
41
|
const AlertDialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
30
|
-
className: cn(
|
|
42
|
+
className: cn(`
|
|
43
|
+
flex flex-col gap-1.5 text-center
|
|
44
|
+
sm:text-left
|
|
45
|
+
`, className),
|
|
31
46
|
...props
|
|
32
47
|
});
|
|
33
48
|
AlertDialogHeader.displayName = "AlertDialogHeader";
|
|
34
49
|
const AlertDialogFooter = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
|
|
35
|
-
className: cn(
|
|
50
|
+
className: cn(`
|
|
51
|
+
flex flex-col-reverse gap-2
|
|
52
|
+
sm:flex-row sm:justify-end
|
|
53
|
+
`, className),
|
|
36
54
|
...props
|
|
37
55
|
});
|
|
38
56
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
@@ -71,7 +89,10 @@ AlertDialogAction.displayName = "AlertDialogAction";
|
|
|
71
89
|
/** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */
|
|
72
90
|
const AlertDialogCancel = React.forwardRef(({ className, asChild, children, ...props }, ref) => /* @__PURE__ */ jsx(AlertDialog.Close, {
|
|
73
91
|
ref,
|
|
74
|
-
className: cn(
|
|
92
|
+
className: cn(`
|
|
93
|
+
mt-2
|
|
94
|
+
sm:mt-0
|
|
95
|
+
`, className),
|
|
75
96
|
render: asChildRender(asChild, children),
|
|
76
97
|
...props,
|
|
77
98
|
children: asChild ? void 0 : children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AlertDialog.mjs","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\ntype AlertDialogTriggerProps = Omit<AlertDialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Trigger>\n ),\n);\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n
|
|
1
|
+
{"version":3,"file":"AlertDialog.mjs","names":["AlertDialog","AlertDialogPrimitive"],"sources":["../../../src/components/alert-dialog/AlertDialog.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { AlertDialog as AlertDialogPrimitive } from '@base-ui/react/alert-dialog';\n\nimport { cn, asChildRender } from '../../lib/utils';\nimport { Typography } from '../typography';\n\nconst AlertDialog = AlertDialogPrimitive.Root;\n\ntype AlertDialogTriggerProps = Omit<AlertDialogPrimitive.Trigger.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n};\n\nconst AlertDialogTrigger = React.forwardRef<HTMLButtonElement, AlertDialogTriggerProps>(\n ({ asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Trigger ref={ref} render={asChildRender(asChild, children)} {...props}>\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Trigger>\n ),\n);\nAlertDialogTrigger.displayName = 'AlertDialogTrigger';\n\nconst AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nconst AlertDialogOverlay = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Backdrop.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPrimitive.Backdrop\n ref={ref}\n className={cn(\n `\n fixed inset-0 z-50 bg-berget-dialog-overlay-bg transition-opacity\n duration-200\n data-ending-style:opacity-0\n data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n));\nAlertDialogOverlay.displayName = 'AlertDialogOverlay';\n\nconst AlertDialogContent = React.forwardRef<\n HTMLDivElement,\n Omit<AlertDialogPrimitive.Popup.Props, 'className'> & { className?: string }\n>(({ className, ...props }, ref) => (\n <AlertDialogPortal>\n <AlertDialogOverlay />\n <AlertDialogPrimitive.Popup\n ref={ref}\n className={cn(\n `\n fixed top-[50%] left-[50%] z-50 grid w-full max-w-lg\n translate-x-[-50%] translate-y-[-50%] gap-4 rounded-berget-sm border\n border-berget-dialog-border bg-berget-dialog-bg p-6 shadow-berget-lg\n transition-[opacity,transform] duration-200\n data-ending-style:scale-95 data-ending-style:opacity-0\n data-starting-style:scale-95 data-starting-style:opacity-0\n `,\n className,\n )}\n {...props}\n />\n </AlertDialogPortal>\n));\nAlertDialogContent.displayName = 'AlertDialogContent';\n\nconst AlertDialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col gap-1.5 text-center\n sm:text-left\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogHeader.displayName = 'AlertDialogHeader';\n\nconst AlertDialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div\n className={cn(\n `\n flex flex-col-reverse gap-2\n sm:flex-row sm:justify-end\n `,\n className,\n )}\n {...props}\n />\n);\nAlertDialogFooter.displayName = 'AlertDialogFooter';\n\nconst AlertDialogTitle = React.forwardRef<\n HTMLHeadingElement,\n Omit<AlertDialogPrimitive.Title.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Title\n ref={ref}\n render={<Typography variant=\"h5\" color=\"default\" as=\"h2\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Title>\n));\nAlertDialogTitle.displayName = 'AlertDialogTitle';\n\nconst AlertDialogDescription = React.forwardRef<\n HTMLParagraphElement,\n Omit<AlertDialogPrimitive.Description.Props, 'className'> & { className?: string }\n>(({ className, children, ...props }, ref) => (\n <AlertDialogPrimitive.Description\n ref={ref}\n render={<Typography variant=\"small\" color=\"muted\" className={className} />}\n {...props}\n >\n {children}\n </AlertDialogPrimitive.Description>\n));\nAlertDialogDescription.displayName = 'AlertDialogDescription';\n\n/** Action button — compose with `<Button>` via `asChild` for consistent styling. */\nconst AlertDialogAction = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(className)}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogAction.displayName = 'AlertDialogAction';\n\n/** Cancel button — composes with `<Button>` via `asChild`. Includes `mt-2 sm:mt-0` for footer spacing. */\nconst AlertDialogCancel = React.forwardRef<\n HTMLButtonElement,\n Omit<AlertDialogPrimitive.Close.Props, 'className' | 'render'> & {\n className?: string;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n }\n>(({ className, asChild, children, ...props }, ref) => (\n <AlertDialogPrimitive.Close\n ref={ref}\n className={cn(\n `\n mt-2\n sm:mt-0\n `,\n className,\n )}\n render={asChildRender(asChild, children)}\n {...props}\n >\n {asChild ? undefined : children}\n </AlertDialogPrimitive.Close>\n));\nAlertDialogCancel.displayName = 'AlertDialogCancel';\n\nexport {\n AlertDialog,\n AlertDialogPortal,\n AlertDialogOverlay,\n AlertDialogTrigger,\n AlertDialogContent,\n AlertDialogHeader,\n AlertDialogFooter,\n AlertDialogTitle,\n AlertDialogDescription,\n AlertDialogAction,\n AlertDialogCancel,\n};\n"],"mappings":";;;;;;;AAQA,MAAMA,gBAAcC,YAAqB;AAQzC,MAAM,qBAAqB,MAAM,YAC9B,EAAE,SAAS,UAAU,GAAG,SAAS,QAChC,oBAACA,YAAqB,SAAtB;CAAmC;CAAK,QAAQ,cAAc,SAAS,QAAQ;CAAG,GAAI;CACnF,UAAA,UAAU,KAAA,IAAY;AACK,CAAA,CAElC;AACA,mBAAmB,cAAc;AAEjC,MAAM,oBAAoBA,YAAqB;AAE/C,MAAM,qBAAqB,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,oBAACA,YAAqB,UAAtB;CACO;CACL,WAAW,GACT;;;;;SAMA,SACF;CACA,GAAI;AACL,CAAA,CACF;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqB,MAAM,YAG9B,EAAE,WAAW,GAAG,SAAS,QAC1B,qBAAC,mBAAD,EAAA,UAAA,CACE,oBAAC,oBAAD,CAAqB,CAAA,GACrB,oBAACA,YAAqB,OAAtB;CACO;CACL,WAAW,GACT;;;;;;;WAQA,SACF;CACA,GAAI;AACL,CAAA,CACgB,EAAA,CAAA,CACpB;AACD,mBAAmB,cAAc;AAEjC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAD;CACE,WAAW,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,MAAM,qBAAqB,EAAE,WAAW,GAAG,YACzC,oBAAC,OAAD;CACE,WAAW,GACT;;;SAIA,SACF;CACA,GAAI;AACL,CAAA;AAEH,kBAAkB,cAAc;AAEhC,MAAM,mBAAmB,MAAM,YAG5B,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAACA,YAAqB,OAAtB;CACO;CACL,QAAQ,oBAAC,YAAD;EAAY,SAAQ;EAAK,OAAM;EAAU,IAAG;EAAgB;CAAY,CAAA;CAChF,GAAI;CAEH;AACyB,CAAA,CAC7B;AACD,iBAAiB,cAAc;AAE/B,MAAM,yBAAyB,MAAM,YAGlC,EAAE,WAAW,UAAU,GAAG,SAAS,QACpC,oBAACA,YAAqB,aAAtB;CACO;CACL,QAAQ,oBAAC,YAAD;EAAY,SAAQ;EAAQ,OAAM;EAAmB;CAAY,CAAA;CACzE,GAAI;CAEH;AAC+B,CAAA,CACnC;AACD,uBAAuB,cAAc;;AAGrC,MAAM,oBAAoB,MAAM,YAO7B,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,QAC7C,oBAACA,YAAqB,OAAtB;CACO;CACL,WAAW,GAAG,SAAS;CACvB,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc;;AAGhC,MAAM,oBAAoB,MAAM,YAO7B,EAAE,WAAW,SAAS,UAAU,GAAG,SAAS,QAC7C,oBAACA,YAAqB,OAAtB;CACO;CACL,WAAW,GACT;;;SAIA,SACF;CACA,QAAQ,cAAc,SAAS,QAAQ;CACvC,GAAI;CAEH,UAAA,UAAU,KAAA,IAAY;AACG,CAAA,CAC7B;AACD,kBAAkB,cAAc"}
|
|
@@ -5,7 +5,12 @@ let react = require("react");
|
|
|
5
5
|
react = require_runtime.__toESM(react, 1);
|
|
6
6
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
7
|
//#region src/components/badge/Badge.tsx
|
|
8
|
-
const badgeVariants = (0, require("class-variance-authority").cva)(
|
|
8
|
+
const badgeVariants = (0, require("class-variance-authority").cva)(`
|
|
9
|
+
inline-flex shrink-0 items-center rounded-[4px] px-2 py-[0.15rem]
|
|
10
|
+
text-[0.65rem] font-semibold tracking-[0.05em] whitespace-nowrap uppercase
|
|
11
|
+
transition-colors
|
|
12
|
+
focus:ring-1 focus:ring-ring focus:ring-offset-2 focus:outline-none
|
|
13
|
+
`, {
|
|
9
14
|
variants: {
|
|
10
15
|
variant: {
|
|
11
16
|
default: "",
|
|
@@ -19,8 +24,12 @@ const badgeVariants = (0, require("class-variance-authority").cva)("inline-flex
|
|
|
19
24
|
success: "bg-berget-badge-success-bg text-berget-badge-success-fg",
|
|
20
25
|
warning: "bg-berget-badge-warning-bg text-berget-badge-warning-fg",
|
|
21
26
|
error: "bg-berget-badge-error-bg text-berget-badge-error-fg",
|
|
22
|
-
tagDefault:
|
|
23
|
-
|
|
27
|
+
tagDefault: `
|
|
28
|
+
bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg
|
|
29
|
+
`,
|
|
30
|
+
tagActive: `
|
|
31
|
+
bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg
|
|
32
|
+
`,
|
|
24
33
|
tagGhost: "bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg"
|
|
25
34
|
},
|
|
26
35
|
size: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.cjs","names":["cva","React","cn"],"sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst badgeVariants = cva(\n // Tinted status style: small uppercase label on a 15% brand tint.\n // `variant`/`size` are kept for API compatibility but no longer change\n // the appearance; `status` alone picks the tint.\n
|
|
1
|
+
{"version":3,"file":"Badge.cjs","names":["cva","React","cn"],"sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst badgeVariants = cva(\n // Tinted status style: small uppercase label on a 15% brand tint.\n // `variant`/`size` are kept for API compatibility but no longer change\n // the appearance; `status` alone picks the tint.\n `\n inline-flex shrink-0 items-center rounded-[4px] px-2 py-[0.15rem]\n text-[0.65rem] font-semibold tracking-[0.05em] whitespace-nowrap uppercase\n transition-colors\n focus:ring-1 focus:ring-ring focus:ring-offset-2 focus:outline-none\n `,\n {\n variants: {\n variant: {\n default: '',\n tag: '',\n semantic: '',\n },\n status: {\n default: 'bg-berget-badge-default-bg text-berget-badge-default-fg',\n active: 'bg-berget-badge-active-bg text-berget-badge-active-fg',\n info: 'bg-berget-badge-info-bg text-berget-badge-info-fg',\n success: 'bg-berget-badge-success-bg text-berget-badge-success-fg',\n warning: 'bg-berget-badge-warning-bg text-berget-badge-warning-fg',\n error: 'bg-berget-badge-error-bg text-berget-badge-error-fg',\n tagDefault: `\n bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg\n `,\n tagActive: `\n bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg\n `,\n tagGhost: 'bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg',\n },\n size: {\n sm: '',\n md: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n status: 'default',\n size: 'md',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {\n icon?: React.ReactNode;\n iconGap?: number;\n}\n\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n ({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {\n return (\n <div className={cn(badgeVariants({ variant, status, size }), className)} ref={ref} {...props}>\n {icon && <div style={{ marginRight: children ? `${iconGap * 0.25}rem` : '0' }}>{icon}</div>}\n {children}\n </div>\n );\n },\n);\nBadge.displayName = 'Badge';\n\nexport { Badge, badgeVariants };\n"],"mappings":";;;;;;;AAMA,MAAM,iBAAA,G,kCAAgBA,CAAAA,CAAAA,IAAAA,CAIpB;;;;;KAMA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,KAAK;GACL,UAAU;EACZ;EACA,QAAQ;GACN,SAAS;GACT,QAAQ;GACR,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACP,YAAY;;;GAGZ,WAAW;;;GAGX,UAAU;EACZ;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,QAAQ;EACR,MAAM;CACR;AACF,CACF;AAQA,MAAM,QAAQC,MAAM,YACjB,EAAE,WAAW,SAAS,QAAQ,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,QAAQ;CACpF,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,OAAD;EAAK,WAAWC,cAAAA,GAAG,cAAc;GAAE;GAAS;GAAQ;EAAK,CAAC,GAAG,SAAS;EAAQ;EAAK,GAAI;EAAvF,UAAA,CACG,QAAQ,iBAAA,GAAA,kBAAA,IAAA,CAAC,OAAD;GAAK,OAAO,EAAE,aAAa,WAAW,GAAG,UAAU,IAAK,OAAO,IAAI;GAAI,UAAA;EAAU,CAAA,GACzF,QACE;;AAET,CACF;AACA,MAAM,cAAc"}
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
//#region src/components/badge/Badge.d.ts
|
|
4
4
|
declare const badgeVariants: (props?: ({
|
|
5
5
|
variant?: "default" | "tag" | "semantic" | null | undefined;
|
|
6
|
-
status?: "error" | "
|
|
6
|
+
status?: "error" | "info" | "default" | "active" | "success" | "warning" | "tagDefault" | "tagActive" | "tagGhost" | null | undefined;
|
|
7
7
|
size?: "sm" | "md" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.cts","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"mappings":";;;cAMM,gBAAa;;;;
|
|
1
|
+
{"version":3,"file":"Badge.d.cts","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"mappings":";;;cAMM,gBAAa;;;;6CA2ClB;iBAEgB,mBACP,MAAM,eAAe,iBAAiB,oBAAoB;EAClE,OAAO,MAAM;EACb;;cAGI,OAAK,MAAA,0BAAA,aAAA,MAAA,cAAA"}
|
|
@@ -3,7 +3,7 @@ import { VariantProps } from "class-variance-authority";
|
|
|
3
3
|
//#region src/components/badge/Badge.d.ts
|
|
4
4
|
declare const badgeVariants: (props?: ({
|
|
5
5
|
variant?: "default" | "tag" | "semantic" | null | undefined;
|
|
6
|
-
status?: "error" | "
|
|
6
|
+
status?: "error" | "info" | "default" | "active" | "success" | "warning" | "tagDefault" | "tagActive" | "tagGhost" | null | undefined;
|
|
7
7
|
size?: "sm" | "md" | null | undefined;
|
|
8
8
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
9
9
|
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.d.mts","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"mappings":";;;cAMM,gBAAa;;;;
|
|
1
|
+
{"version":3,"file":"Badge.d.mts","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"mappings":";;;cAMM,gBAAa;;;;6CA2ClB;iBAEgB,mBACP,MAAM,eAAe,iBAAiB,oBAAoB;EAClE,OAAO,MAAM;EACb;;cAGI,OAAK,MAAA,0BAAA,aAAA,MAAA,cAAA"}
|
|
@@ -4,7 +4,12 @@ import * as React from "react";
|
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { cva } from "class-variance-authority";
|
|
6
6
|
//#region src/components/badge/Badge.tsx
|
|
7
|
-
const badgeVariants = cva(
|
|
7
|
+
const badgeVariants = cva(`
|
|
8
|
+
inline-flex shrink-0 items-center rounded-[4px] px-2 py-[0.15rem]
|
|
9
|
+
text-[0.65rem] font-semibold tracking-[0.05em] whitespace-nowrap uppercase
|
|
10
|
+
transition-colors
|
|
11
|
+
focus:ring-1 focus:ring-ring focus:ring-offset-2 focus:outline-none
|
|
12
|
+
`, {
|
|
8
13
|
variants: {
|
|
9
14
|
variant: {
|
|
10
15
|
default: "",
|
|
@@ -18,8 +23,12 @@ const badgeVariants = cva("inline-flex flex-shrink-0 items-center whitespace-now
|
|
|
18
23
|
success: "bg-berget-badge-success-bg text-berget-badge-success-fg",
|
|
19
24
|
warning: "bg-berget-badge-warning-bg text-berget-badge-warning-fg",
|
|
20
25
|
error: "bg-berget-badge-error-bg text-berget-badge-error-fg",
|
|
21
|
-
tagDefault:
|
|
22
|
-
|
|
26
|
+
tagDefault: `
|
|
27
|
+
bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg
|
|
28
|
+
`,
|
|
29
|
+
tagActive: `
|
|
30
|
+
bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg
|
|
31
|
+
`,
|
|
23
32
|
tagGhost: "bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg"
|
|
24
33
|
},
|
|
25
34
|
size: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.mjs","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst badgeVariants = cva(\n // Tinted status style: small uppercase label on a 15% brand tint.\n // `variant`/`size` are kept for API compatibility but no longer change\n // the appearance; `status` alone picks the tint.\n
|
|
1
|
+
{"version":3,"file":"Badge.mjs","names":[],"sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { cn } from '../../lib/utils';\n\nconst badgeVariants = cva(\n // Tinted status style: small uppercase label on a 15% brand tint.\n // `variant`/`size` are kept for API compatibility but no longer change\n // the appearance; `status` alone picks the tint.\n `\n inline-flex shrink-0 items-center rounded-[4px] px-2 py-[0.15rem]\n text-[0.65rem] font-semibold tracking-[0.05em] whitespace-nowrap uppercase\n transition-colors\n focus:ring-1 focus:ring-ring focus:ring-offset-2 focus:outline-none\n `,\n {\n variants: {\n variant: {\n default: '',\n tag: '',\n semantic: '',\n },\n status: {\n default: 'bg-berget-badge-default-bg text-berget-badge-default-fg',\n active: 'bg-berget-badge-active-bg text-berget-badge-active-fg',\n info: 'bg-berget-badge-info-bg text-berget-badge-info-fg',\n success: 'bg-berget-badge-success-bg text-berget-badge-success-fg',\n warning: 'bg-berget-badge-warning-bg text-berget-badge-warning-fg',\n error: 'bg-berget-badge-error-bg text-berget-badge-error-fg',\n tagDefault: `\n bg-berget-badge-tag-default-bg text-berget-badge-tag-default-fg\n `,\n tagActive: `\n bg-berget-badge-tag-active-bg text-berget-badge-tag-active-fg\n `,\n tagGhost: 'bg-berget-badge-tag-ghost-bg text-berget-badge-tag-ghost-fg',\n },\n size: {\n sm: '',\n md: '',\n },\n },\n defaultVariants: {\n variant: 'default',\n status: 'default',\n size: 'md',\n },\n },\n);\n\nexport interface BadgeProps\n extends React.HTMLAttributes<HTMLDivElement>, VariantProps<typeof badgeVariants> {\n icon?: React.ReactNode;\n iconGap?: number;\n}\n\nconst Badge = React.forwardRef<HTMLDivElement, BadgeProps>(\n ({ className, variant, status, size, icon, iconGap = 2, children, ...props }, ref) => {\n return (\n <div className={cn(badgeVariants({ variant, status, size }), className)} ref={ref} {...props}>\n {icon && <div style={{ marginRight: children ? `${iconGap * 0.25}rem` : '0' }}>{icon}</div>}\n {children}\n </div>\n );\n },\n);\nBadge.displayName = 'Badge';\n\nexport { Badge, badgeVariants };\n"],"mappings":";;;;;;AAMA,MAAM,gBAAgB,IAIpB;;;;;KAMA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,KAAK;GACL,UAAU;EACZ;EACA,QAAQ;GACN,SAAS;GACT,QAAQ;GACR,MAAM;GACN,SAAS;GACT,SAAS;GACT,OAAO;GACP,YAAY;;;GAGZ,WAAW;;;GAGX,UAAU;EACZ;EACA,MAAM;GACJ,IAAI;GACJ,IAAI;EACN;CACF;CACA,iBAAiB;EACf,SAAS;EACT,QAAQ;EACR,MAAM;CACR;AACF,CACF;AAQA,MAAM,QAAQ,MAAM,YACjB,EAAE,WAAW,SAAS,QAAQ,MAAM,MAAM,UAAU,GAAG,UAAU,GAAG,SAAS,QAAQ;CACpF,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,cAAc;GAAE;GAAS;GAAQ;EAAK,CAAC,GAAG,SAAS;EAAQ;EAAK,GAAI;EAAvF,UAAA,CACG,QAAQ,oBAAC,OAAD;GAAK,OAAO,EAAE,aAAa,WAAW,GAAG,UAAU,IAAK,OAAO,IAAI;GAAI,UAAA;EAAU,CAAA,GACzF,QACE;;AAET,CACF;AACA,MAAM,cAAc"}
|
|
@@ -54,7 +54,9 @@ const Box = react.forwardRef(({ className, direction, align, justify, wrap, gap,
|
|
|
54
54
|
align,
|
|
55
55
|
justify,
|
|
56
56
|
wrap
|
|
57
|
-
}), gap !== void 0 && `
|
|
57
|
+
}), gap !== void 0 && `
|
|
58
|
+
gap-${gap}
|
|
59
|
+
`, className),
|
|
58
60
|
children: asChild ? void 0 : children
|
|
59
61
|
}, props)
|
|
60
62
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.cjs","names":["cva","React","useRender","mergeProps","cn"],"sources":["../../../src/components/box/Box.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst boxVariants = cva('flex', {\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n wrap: {\n nowrap: 'flex-nowrap',\n wrap: 'flex-wrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n align: 'start',\n justify: 'start',\n wrap: 'nowrap',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport interface BoxProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {\n children?: React.ReactNode;\n gap?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Box = React.forwardRef<HTMLElement, BoxProps>(\n (\n { className, direction, align, justify, wrap, gap, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n boxVariants({ direction, align, justify, wrap }),\n gap !== undefined
|
|
1
|
+
{"version":3,"file":"Box.cjs","names":["cva","React","useRender","mergeProps","cn"],"sources":["../../../src/components/box/Box.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst boxVariants = cva('flex', {\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n wrap: {\n nowrap: 'flex-nowrap',\n wrap: 'flex-wrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n align: 'start',\n justify: 'start',\n wrap: 'nowrap',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport interface BoxProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {\n children?: React.ReactNode;\n gap?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Box = React.forwardRef<HTMLElement, BoxProps>(\n (\n { className, direction, align, justify, wrap, gap, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n boxVariants({ direction, align, justify, wrap }),\n gap !== undefined &&\n `\n gap-${gap}\n `,\n className,\n ),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nBox.displayName = 'Box';\n\nexport { Box, boxVariants };\n"],"mappings":";;;;;;;;;AAQA,MAAM,eAAA,GAAcA,yBAAAA,IAAAA,CAAI,QAAQ;CAC9B,UAAU;EACR,WAAW;GACT,KAAK;GACL,QAAQ;GACR,eAAe;GACf,kBAAkB;EACpB;EACA,OAAO;GACL,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,UAAU;EACZ;EACA,SAAS;GACP,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,QAAQ;GACR,QAAQ;EACV;EACA,MAAM;GACJ,QAAQ;GACR,MAAM;GACN,gBAAgB;EAClB;CACF;CACA,iBAAiB;EACf,WAAW;EACX,OAAO;EACP,SAAS;EACT,MAAM;CACR;AACF,CAAC;AAiCD,MAAM,MAAMC,MAAM,YAEd,EAAE,WAAW,WAAW,OAAO,SAAS,MAAM,KAAK,UAAU,OAAO,UAAU,GAAG,SACjF,QACG;CACH,QAAA,GAAOC,0BAAAA,UAAAA,CAAU;EACf;EACA,gBAAgB;EAChB,QAAQ,UAAW,WAAkC,KAAA;EACrD,QAAA,GAAOC,2BAAAA,WAAAA,CACL;GACE,WAAWC,cAAAA,GACT,YAAY;IAAE;IAAW;IAAO;IAAS;GAAK,CAAC,GAC/C,QAAQ,KAAA,KACN;sBACQ,IAAI;iBAEd,SACF;GACA,UAAU,UAAU,KAAA,IAAY;EAClC,GACA,KACF;CACF,CAAC;AACH,CACF;AACA,IAAI,cAAc"}
|
|
@@ -4,8 +4,8 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
4
4
|
//#region src/components/box/Box.d.ts
|
|
5
5
|
declare const boxVariants: (props?: ({
|
|
6
6
|
direction?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
|
|
7
|
-
align?: "
|
|
8
|
-
justify?: "
|
|
7
|
+
align?: "center" | "start" | "end" | "stretch" | "baseline" | null | undefined;
|
|
8
|
+
justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | null | undefined;
|
|
9
9
|
wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
export type SpacingScale = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 96;
|
|
@@ -4,8 +4,8 @@ import { useRender } from "@base-ui/react/use-render";
|
|
|
4
4
|
//#region src/components/box/Box.d.ts
|
|
5
5
|
declare const boxVariants: (props?: ({
|
|
6
6
|
direction?: "row" | "column" | "row-reverse" | "column-reverse" | null | undefined;
|
|
7
|
-
align?: "
|
|
8
|
-
justify?: "
|
|
7
|
+
align?: "center" | "start" | "end" | "stretch" | "baseline" | null | undefined;
|
|
8
|
+
justify?: "center" | "start" | "end" | "between" | "around" | "evenly" | null | undefined;
|
|
9
9
|
wrap?: "wrap" | "nowrap" | "wrap-reverse" | null | undefined;
|
|
10
10
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
11
|
export type SpacingScale = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 56 | 64 | 72 | 80 | 96;
|
|
@@ -52,7 +52,9 @@ const Box = React.forwardRef(({ className, direction, align, justify, wrap, gap,
|
|
|
52
52
|
align,
|
|
53
53
|
justify,
|
|
54
54
|
wrap
|
|
55
|
-
}), gap !== void 0 && `
|
|
55
|
+
}), gap !== void 0 && `
|
|
56
|
+
gap-${gap}
|
|
57
|
+
`, className),
|
|
56
58
|
children: asChild ? void 0 : children
|
|
57
59
|
}, props)
|
|
58
60
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Box.mjs","names":[],"sources":["../../../src/components/box/Box.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst boxVariants = cva('flex', {\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n wrap: {\n nowrap: 'flex-nowrap',\n wrap: 'flex-wrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n align: 'start',\n justify: 'start',\n wrap: 'nowrap',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport interface BoxProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {\n children?: React.ReactNode;\n gap?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Box = React.forwardRef<HTMLElement, BoxProps>(\n (\n { className, direction, align, justify, wrap, gap, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n boxVariants({ direction, align, justify, wrap }),\n gap !== undefined
|
|
1
|
+
{"version":3,"file":"Box.mjs","names":[],"sources":["../../../src/components/box/Box.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { useRender } from '@base-ui/react/use-render';\nimport { cn } from '../../lib/utils';\n\nconst boxVariants = cva('flex', {\n variants: {\n direction: {\n row: 'flex-row',\n column: 'flex-col',\n 'row-reverse': 'flex-row-reverse',\n 'column-reverse': 'flex-col-reverse',\n },\n align: {\n start: 'items-start',\n center: 'items-center',\n end: 'items-end',\n stretch: 'items-stretch',\n baseline: 'items-baseline',\n },\n justify: {\n start: 'justify-start',\n center: 'justify-center',\n end: 'justify-end',\n between: 'justify-between',\n around: 'justify-around',\n evenly: 'justify-evenly',\n },\n wrap: {\n nowrap: 'flex-nowrap',\n wrap: 'flex-wrap',\n 'wrap-reverse': 'flex-wrap-reverse',\n },\n },\n defaultVariants: {\n direction: 'column',\n align: 'start',\n justify: 'start',\n wrap: 'nowrap',\n },\n});\n\nexport type SpacingScale =\n | 0\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 8\n | 10\n | 12\n | 16\n | 20\n | 24\n | 32\n | 40\n | 48\n | 56\n | 64\n | 72\n | 80\n | 96;\n\nexport interface BoxProps\n extends useRender.ComponentProps<'div'>, VariantProps<typeof boxVariants> {\n children?: React.ReactNode;\n gap?: SpacingScale;\n /** Render as a different element/component. Replaces the Radix `asChild` prop. */\n asChild?: boolean;\n}\n\nconst Box = React.forwardRef<HTMLElement, BoxProps>(\n (\n { className, direction, align, justify, wrap, gap, asChild = false, children, ...props },\n ref,\n ) => {\n return useRender({\n ref,\n defaultTagName: 'div',\n render: asChild ? (children as React.ReactElement) : undefined,\n props: mergeProps<'div'>(\n {\n className: cn(\n boxVariants({ direction, align, justify, wrap }),\n gap !== undefined &&\n `\n gap-${gap}\n `,\n className,\n ),\n children: asChild ? undefined : children,\n } as React.ComponentProps<'div'>,\n props,\n ),\n });\n },\n);\nBox.displayName = 'Box';\n\nexport { Box, boxVariants };\n"],"mappings":";;;;;;;AAQA,MAAM,cAAc,IAAI,QAAQ;CAC9B,UAAU;EACR,WAAW;GACT,KAAK;GACL,QAAQ;GACR,eAAe;GACf,kBAAkB;EACpB;EACA,OAAO;GACL,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,UAAU;EACZ;EACA,SAAS;GACP,OAAO;GACP,QAAQ;GACR,KAAK;GACL,SAAS;GACT,QAAQ;GACR,QAAQ;EACV;EACA,MAAM;GACJ,QAAQ;GACR,MAAM;GACN,gBAAgB;EAClB;CACF;CACA,iBAAiB;EACf,WAAW;EACX,OAAO;EACP,SAAS;EACT,MAAM;CACR;AACF,CAAC;AAiCD,MAAM,MAAM,MAAM,YAEd,EAAE,WAAW,WAAW,OAAO,SAAS,MAAM,KAAK,UAAU,OAAO,UAAU,GAAG,SACjF,QACG;CACH,OAAO,UAAU;EACf;EACA,gBAAgB;EAChB,QAAQ,UAAW,WAAkC,KAAA;EACrD,OAAO,WACL;GACE,WAAW,GACT,YAAY;IAAE;IAAW;IAAO;IAAS;GAAK,CAAC,GAC/C,QAAQ,KAAA,KACN;sBACQ,IAAI;iBAEd,SACF;GACA,UAAU,UAAU,KAAA,IAAY;EAClC,GACA,KACF;CACF,CAAC;AACH,CACF;AACA,IAAI,cAAc"}
|
|
@@ -24,7 +24,13 @@ let react_jsx_runtime = require("react/jsx-runtime");
|
|
|
24
24
|
* `dark:` is intentionally absent — it tracks `prefers-color-scheme`, not the
|
|
25
25
|
* Berget theme. Theme switching is driven entirely by the semantic tokens.
|
|
26
26
|
*/
|
|
27
|
-
const interactionClasses = require_utils.cn(
|
|
27
|
+
const interactionClasses = require_utils.cn(`
|
|
28
|
+
focus-visible:ring-0 focus-visible:outline-2 focus-visible:outline-offset-2
|
|
29
|
+
focus-visible:outline-berget-button-focus-ring focus-visible:outline-solid
|
|
30
|
+
`, `
|
|
31
|
+
disabled:pointer-events-none disabled:cursor-not-allowed
|
|
32
|
+
disabled:opacity-100
|
|
33
|
+
`, "active:not-aria-[haspopup]:translate-y-0");
|
|
28
34
|
/** Disabled treatment shared by every variant. */
|
|
29
35
|
const disabledClasses = "disabled:text-berget-button-disabled-fg disabled:shadow-none";
|
|
30
36
|
/** Brand-specific classes applied *on top* of the upstream primitive. */
|
|
@@ -32,10 +38,33 @@ function brandVariantClasses(variant) {
|
|
|
32
38
|
switch (variant) {
|
|
33
39
|
case "primary": return require_utils.cn("bg-berget-button-primary-bg text-berget-button-primary-fg", "hover:bg-berget-button-primary-hover", "hover:text-berget-button-primary-fg", "active:bg-berget-button-primary-active", "focus-visible:border-transparent", disabledClasses, "disabled:bg-berget-button-primary-disabled-bg");
|
|
34
40
|
case "destructive": return require_utils.cn("bg-berget-button-destructive-bg text-berget-button-destructive-fg", "hover:bg-berget-button-destructive-hover", "hover:text-berget-button-destructive-hover-fg", "active:bg-berget-button-destructive-active", "focus-visible:border-transparent", disabledClasses, "disabled:bg-berget-button-destructive-disabled-bg");
|
|
35
|
-
case "outline": return require_utils.cn(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
case "outline": return require_utils.cn(`
|
|
42
|
+
border-berget-button-outline-border bg-transparent
|
|
43
|
+
text-berget-button-outline-fg
|
|
44
|
+
`, `
|
|
45
|
+
hover:bg-berget-button-outline-hover
|
|
46
|
+
dark:hover:bg-berget-button-outline-hover
|
|
47
|
+
`, `
|
|
48
|
+
active:bg-transparent
|
|
49
|
+
dark:active:bg-transparent
|
|
50
|
+
`, "focus-visible:border-berget-button-outline-border", disabledClasses, "disabled:border-berget-button-disabled-border disabled:bg-transparent");
|
|
51
|
+
case "ghost": return require_utils.cn("bg-transparent text-berget-button-ghost-fg", "hover:bg-berget-button-ghost-hover hover:text-berget-button-ghost-fg", "dark:hover:bg-berget-button-ghost-hover", `
|
|
52
|
+
active:bg-berget-button-ghost-active
|
|
53
|
+
dark:active:bg-berget-button-ghost-active
|
|
54
|
+
`, "focus-visible:border-transparent", disabledClasses, "disabled:bg-transparent");
|
|
55
|
+
case "link": return require_utils.cn(`
|
|
56
|
+
h-auto bg-transparent p-0 font-medium text-berget-button-link-fg
|
|
57
|
+
underline-offset-4 shadow-none
|
|
58
|
+
`, "hover:bg-transparent hover:text-berget-button-link-hover-fg", "active:text-berget-button-link-fg", "focus:bg-transparent", "focus-visible:border-transparent focus-visible:ring-0", `
|
|
59
|
+
focus-visible:rounded-berget-xs focus-visible:outline-2
|
|
60
|
+
focus-visible:outline-offset-2
|
|
61
|
+
focus-visible:outline-berget-button-focus-ring
|
|
62
|
+
focus-visible:outline-solid
|
|
63
|
+
`, "disabled:text-berget-button-disabled-fg disabled:no-underline", "disabled:cursor-not-allowed disabled:opacity-100");
|
|
64
|
+
default: return require_utils.cn(`
|
|
65
|
+
border-berget-button-default-border bg-berget-button-default-bg
|
|
66
|
+
text-berget-button-default-fg
|
|
67
|
+
`, "hover:bg-berget-button-default-hover", "active:bg-berget-button-default-active", "focus-visible:border-transparent", disabledClasses, "disabled:bg-berget-button-default-disabled-bg");
|
|
39
68
|
}
|
|
40
69
|
}
|
|
41
70
|
/** Map custom variants to the closest upstream primitive variant. */
|
|
@@ -54,7 +83,12 @@ function Button({ className, variant = "default", size, asChild = false, width =
|
|
|
54
83
|
const baseClass = require_utils.cn(!isLink && require_button.buttonVariants({
|
|
55
84
|
variant: primitiveVariant(variant),
|
|
56
85
|
size
|
|
57
|
-
}), !isLink && (width === "full" ? "rounded-berget-xs" : "rounded-full"), !isLink && !isIcon && "
|
|
86
|
+
}), !isLink && (width === "full" ? "rounded-berget-xs" : "rounded-full"), !isLink && !isIcon && "h-auto px-[1.14em] py-[0.57em]", !isLink && !isIcon && (size === "lg" ? "text-lg" : size === "sm" ? "text-sm" : size === "xs" ? "" : `
|
|
87
|
+
text-base
|
|
88
|
+
`), !isLink && "font-normal", brandVariantClasses(variant), interactionClasses, !isLink && width === "full" && "w-full", isIcon && `
|
|
89
|
+
rounded-full
|
|
90
|
+
shadow-[0px_1px_3px_rgba(0,0,0,0.1),0px_1px_2px_-1px_rgba(0,0,0,0.1)]
|
|
91
|
+
`, className);
|
|
58
92
|
const content = /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
59
93
|
className: require_utils.cn("inline-flex items-center", !isIcon && "gap-2"),
|
|
60
94
|
children
|