@douglasneuroinformatics/libui 4.8.2 → 4.9.0
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/{chunk-ZQ2TE7CF.js → chunk-VWNGEXWI.js} +17 -21
- package/dist/chunk-VWNGEXWI.js.map +1 -0
- package/dist/components.d.ts +3 -3
- package/dist/components.js +8 -4
- package/dist/components.js.map +1 -1
- package/dist/providers.js +1 -1
- package/package.json +1 -1
- package/src/components/Dialog/DialogContent.tsx +4 -8
- package/src/components/Dialog/DialogDescription.tsx +4 -7
- package/src/components/Dialog/DialogOverlay.tsx +4 -8
- package/src/components/Dialog/DialogTitle.tsx +4 -8
- package/src/components/Form/BooleanField/BooleanFieldCheckbox.tsx +2 -0
- package/src/components/Form/BooleanField/BooleanFieldRadio.tsx +4 -2
- package/dist/chunk-ZQ2TE7CF.js.map +0 -1
|
@@ -89,41 +89,39 @@ var DialogBody = ({
|
|
|
89
89
|
};
|
|
90
90
|
|
|
91
91
|
// src/components/Dialog/DialogContent.tsx
|
|
92
|
-
import
|
|
92
|
+
import "react";
|
|
93
93
|
import { Close, Content, Portal } from "@radix-ui/react-dialog";
|
|
94
94
|
import { XIcon } from "lucide-react";
|
|
95
95
|
|
|
96
96
|
// src/components/Dialog/DialogOverlay.tsx
|
|
97
|
-
import
|
|
97
|
+
import "react";
|
|
98
98
|
import { Overlay } from "@radix-ui/react-dialog";
|
|
99
99
|
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
100
|
-
var DialogOverlay =
|
|
100
|
+
var DialogOverlay = ({ className, ...props }) => {
|
|
101
101
|
return /* @__PURE__ */ jsx4(
|
|
102
102
|
Overlay,
|
|
103
103
|
{
|
|
104
104
|
className: cn(
|
|
105
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-
|
|
105
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-300",
|
|
106
106
|
className
|
|
107
107
|
),
|
|
108
|
-
ref,
|
|
109
108
|
...props
|
|
110
109
|
}
|
|
111
110
|
);
|
|
112
|
-
}
|
|
111
|
+
};
|
|
113
112
|
|
|
114
113
|
// src/components/Dialog/DialogContent.tsx
|
|
115
114
|
import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
116
|
-
var DialogContent =
|
|
115
|
+
var DialogContent = ({ children, className, ...props }) => {
|
|
117
116
|
return /* @__PURE__ */ jsxs2(Portal, { children: [
|
|
118
117
|
/* @__PURE__ */ jsx5(DialogOverlay, {}),
|
|
119
118
|
/* @__PURE__ */ jsxs2(
|
|
120
119
|
Content,
|
|
121
120
|
{
|
|
122
121
|
className: cn(
|
|
123
|
-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-
|
|
122
|
+
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-md border p-6 shadow-lg duration-300 sm:max-w-lg sm:rounded-lg",
|
|
124
123
|
className
|
|
125
124
|
),
|
|
126
|
-
ref,
|
|
127
125
|
...props,
|
|
128
126
|
children: [
|
|
129
127
|
children,
|
|
@@ -132,15 +130,15 @@ var DialogContent = forwardRef4(function DialogContent2({ children, className, .
|
|
|
132
130
|
}
|
|
133
131
|
)
|
|
134
132
|
] });
|
|
135
|
-
}
|
|
133
|
+
};
|
|
136
134
|
|
|
137
135
|
// src/components/Dialog/DialogDescription.tsx
|
|
138
|
-
import
|
|
136
|
+
import "react";
|
|
139
137
|
import { Description } from "@radix-ui/react-dialog";
|
|
140
138
|
import { jsx as jsx6 } from "react/jsx-runtime";
|
|
141
|
-
var DialogDescription =
|
|
142
|
-
return /* @__PURE__ */ jsx6(Description, { className: cn("text-
|
|
143
|
-
}
|
|
139
|
+
var DialogDescription = ({ className, ...props }) => {
|
|
140
|
+
return /* @__PURE__ */ jsx6(Description, { className: cn("text-muted-foreground text-sm", className), ...props });
|
|
141
|
+
};
|
|
144
142
|
|
|
145
143
|
// src/components/Dialog/DialogFooter.tsx
|
|
146
144
|
import "react";
|
|
@@ -153,14 +151,12 @@ import { jsx as jsx8 } from "react/jsx-runtime";
|
|
|
153
151
|
var DialogHeader = ({ className, ...props }) => /* @__PURE__ */ jsx8("div", { className: cn("flex flex-col space-y-1.5 text-center sm:text-left", className), ...props });
|
|
154
152
|
|
|
155
153
|
// src/components/Dialog/DialogTitle.tsx
|
|
156
|
-
import
|
|
154
|
+
import "react";
|
|
157
155
|
import { Title } from "@radix-ui/react-dialog";
|
|
158
156
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
159
|
-
var DialogTitle =
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}
|
|
163
|
-
);
|
|
157
|
+
var DialogTitle = ({ className, ...props }) => {
|
|
158
|
+
return /* @__PURE__ */ jsx9(Title, { className: cn("text-lg leading-none font-semibold tracking-tight", className), ...props });
|
|
159
|
+
};
|
|
164
160
|
|
|
165
161
|
// src/components/Dialog/Dialog.tsx
|
|
166
162
|
var Dialog = Object.assign(Root.bind(null), {
|
|
@@ -322,4 +318,4 @@ export {
|
|
|
322
318
|
Dialog,
|
|
323
319
|
NotificationHub
|
|
324
320
|
};
|
|
325
|
-
//# sourceMappingURL=chunk-
|
|
321
|
+
//# sourceMappingURL=chunk-VWNGEXWI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/Button/Button.tsx","../src/components/Card/Card.tsx","../src/components/Dialog/Dialog.tsx","../src/components/Dialog/DialogBody.tsx","../src/components/Dialog/DialogContent.tsx","../src/components/Dialog/DialogOverlay.tsx","../src/components/Dialog/DialogDescription.tsx","../src/components/Dialog/DialogFooter.tsx","../src/components/Dialog/DialogHeader.tsx","../src/components/Dialog/DialogTitle.tsx","../src/providers/CoreProvider/NotificationHub.tsx","../src/providers/CoreProvider/NotificationIcon.tsx"],"sourcesContent":["import * as React from 'react';\n\nimport { Slot, Slottable } from '@radix-ui/react-slot';\nimport { cva } from 'class-variance-authority';\nimport type { VariantProps } from 'class-variance-authority';\nimport type { Simplify } from 'type-fest';\n\nimport { cn } from '@/utils';\n\nexport const BUTTON_ICON_SIZE = {\n lg: 18,\n md: 16,\n sm: 14\n};\n\nexport const buttonVariants = cva(\n 'flex items-center justify-center whitespace-nowrap cursor-pointer rounded-md text-sm font-medium transition-colors focus-visible:outline-hidden focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50',\n {\n defaultVariants: {\n size: 'md',\n variant: 'primary'\n },\n variants: {\n size: {\n icon: 'p-1.5 aspect-square',\n lg: 'h-10 rounded-md px-8 text-base',\n md: 'h-9 px-4 py-2',\n sm: 'h-8 rounded-md px-3 text-xs'\n },\n variant: {\n danger: 'bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/70',\n ghost: 'hover:bg-accent hover:text-accent-foreground',\n link: 'text-primary underline-offset-4 hover:underline',\n outline: 'border border-input bg-inherit shadow-xs',\n primary: 'bg-primary text-primary-foreground shadow-sm hover:bg-primary/90',\n secondary: 'bg-secondary border text-secondary-foreground shadow-xs hover:bg-secondary/10'\n }\n }\n }\n);\n\nexport type ButtonProps = Simplify<\n React.ButtonHTMLAttributes<HTMLButtonElement> &\n VariantProps<typeof buttonVariants> & {\n asChild?: boolean;\n /** @deprecated - use children */\n label?: string;\n }\n>;\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function Button(\n { asChild, children, className, label, size = 'md', variant = 'primary', ...props },\n ref\n) {\n const Comp = asChild ? Slot : 'button';\n return (\n <Comp className={cn(buttonVariants({ className, size, variant }))} ref={ref} {...props}>\n {label}\n <Slottable>{children}</Slottable>\n </Comp>\n );\n});\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nconst CardRoot = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(function CardRoot(\n { className, ...props },\n ref\n) {\n return (\n <div\n className={cn('bg-card text-card-foreground rounded-xl border shadow-sm', className)}\n data-testid=\"card\"\n ref={ref}\n {...props}\n />\n );\n});\n\nexport const Card = Object.assign(CardRoot, {\n Content: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('p-6 pt-0', className)} {...props} />\n ),\n Description: ({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>) => (\n <p className={cn('text-muted-foreground text-sm', className)} {...props} />\n ),\n Footer: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => {\n return <div className={cn('flex items-center p-6 pt-0', className)} {...props} />;\n },\n Header: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 p-6', className)} {...props} />\n ),\n Title: ({ children, className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) => (\n <h3 className={cn('leading-none font-semibold tracking-tight', className)} {...props}>\n {children}\n </h3>\n )\n});\n","import { Root, Trigger } from '@radix-ui/react-dialog';\n\nimport { DialogBody } from './DialogBody';\nimport { DialogContent } from './DialogContent';\nimport { DialogDescription } from './DialogDescription';\nimport { DialogFooter } from './DialogFooter';\nimport { DialogHeader } from './DialogHeader';\nimport { DialogTitle } from './DialogTitle';\n\nexport const Dialog = Object.assign(Root.bind(null), {\n Body: DialogBody,\n Content: DialogContent,\n Description: DialogDescription,\n Footer: DialogFooter,\n Header: DialogHeader,\n Title: DialogTitle,\n Trigger\n});\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nexport const DialogBody = ({\n children,\n className,\n ...props\n}: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => {\n return (\n <div className={cn('py-4', className)} {...props}>\n {children}\n </div>\n );\n};\n","import {} from 'react';\n\nimport { Close, Content, Portal } from '@radix-ui/react-dialog';\nimport { XIcon } from 'lucide-react';\n\nimport { cn } from '@/utils';\n\nimport { DialogOverlay } from './DialogOverlay';\n\nexport const DialogContent = ({ children, className, ...props }: React.ComponentProps<typeof Content>) => {\n return (\n <Portal>\n <DialogOverlay />\n <Content\n className={cn(\n 'bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-md border p-6 shadow-lg duration-300 sm:max-w-lg sm:rounded-lg',\n className\n )}\n {...props}\n >\n {children}\n <Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"h-4 w-4\" />\n </Close>\n </Content>\n </Portal>\n );\n};\n","import {} from 'react';\n\nimport { Overlay } from '@radix-ui/react-dialog';\n\nimport { cn } from '@/utils';\n\nexport const DialogOverlay = ({ className, ...props }: React.ComponentProps<typeof Overlay>) => {\n return (\n <Overlay\n className={cn(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80 duration-300',\n className\n )}\n {...props}\n />\n );\n};\n","import {} from 'react';\n\nimport { Description } from '@radix-ui/react-dialog';\n\nimport { cn } from '@/utils';\n\nexport const DialogDescription = ({ className, ...props }: React.ComponentProps<typeof Description>) => {\n return <Description className={cn('text-muted-foreground text-sm', className)} {...props} />;\n};\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nexport const DialogFooter = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col gap-x-2 gap-y-0.5 sm:flex-row', className)} {...props} />\n);\n","import * as React from 'react';\n\nimport { cn } from '@/utils';\n\nexport const DialogHeader = ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => (\n <div className={cn('flex flex-col space-y-1.5 text-center sm:text-left', className)} {...props} />\n);\n","import {} from 'react';\n\nimport { Title } from '@radix-ui/react-dialog';\n\nimport { cn } from '@/utils';\n\nexport const DialogTitle = ({ className, ...props }: React.ComponentProps<typeof Title>) => {\n return <Title className={cn('text-lg leading-none font-semibold tracking-tight', className)} {...props} />;\n};\n","import { XIcon } from 'lucide-react';\nimport { AnimatePresence, motion } from 'motion/react';\n\nimport { Card } from '@/components/Card';\nimport { useTranslation } from '@/hooks';\nimport { useNotificationsStore } from '@/hooks/useNotificationsStore';\n\nimport { NotificationIcon } from './NotificationIcon';\n\ntype NotificationHubProps = {\n /** The number of milliseconds before the notification is automatically cleared */\n timeout?: number;\n};\n\nconst NotificationHub = ({ timeout = 5000 }: NotificationHubProps) => {\n const { t } = useTranslation('libui');\n const { dismissNotification, notifications } = useNotificationsStore();\n\n return (\n <div className=\"fixed bottom-0 z-50 w-full print:hidden\">\n <AnimatePresence>\n {notifications.map((item) => (\n <motion.div\n animate={{ height: 'auto', opacity: 1 }}\n className=\"relative max-w-sm\"\n exit={{ height: 0, opacity: 0 }}\n initial={{ height: 0, opacity: 0 }}\n key={item.id}\n transition={{ bounce: 0.1, type: 'spring' }}\n >\n <div className=\"w-full p-2\">\n <Card className=\"w-full rounded-lg p-0\">\n <div className=\"p-4\">\n <div className=\"mb-2 flex items-center\">\n <NotificationIcon type={item.type} />\n <h5 className=\"ml-3 grow font-medium text-slate-900 dark:text-slate-100\">\n {item.title ?? t(`notifications.types.${item.type}`)}\n </h5>\n <button\n className=\"inline-flex rounded-md text-slate-400 hover:text-slate-500 focus:ring-1 focus:ring-sky-500 focus:outline-hidden dark:focus:ring-sky-600\"\n type=\"button\"\n onClick={() => {\n dismissNotification(item.id);\n }}\n >\n <XIcon aria-hidden=\"true\" className=\"h-5 w-5\" />\n </button>\n </div>\n <p className=\"text-muted-foreground my-2\">{item.message}</p>\n </div>\n <motion.div\n animate={{ width: '100%' }}\n className=\"h-1 bg-slate-500\"\n initial={{ width: '0%' }}\n transition={{ duration: timeout / 1000, ease: 'linear' }}\n onAnimationComplete={() => {\n dismissNotification(item.id);\n }}\n />\n </Card>\n </div>\n </motion.div>\n ))}\n </AnimatePresence>\n </div>\n );\n};\n\nexport { NotificationHub, type NotificationHubProps };\n","import type { NotificationInterface } from '@/hooks/useNotificationsStore';\n\nexport type NotificationIconProps = {\n type: NotificationInterface['type'];\n};\n\nexport const NotificationIcon = ({ type }: NotificationIconProps) => {\n switch (type) {\n case 'error':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-red-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z\"\n fillRule=\"evenodd\"\n ></path>\n </svg>\n );\n case 'info':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-blue-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm8.706-1.442c1.146-.573 2.437.463 2.126 1.706l-.709 2.836.042-.02a.75.75 0 0 1 .67 1.34l-.04.022c-1.147.573-2.438-.463-2.127-1.706l.71-2.836-.042.02a.75.75 0 1 1-.671-1.34l.041-.022ZM12 9a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z\"\n fillRule=\"evenodd\"\n ></path>\n </svg>\n );\n case 'success':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-green-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12Zm13.36-1.814a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z\"\n fillRule=\"evenodd\"\n />\n </svg>\n );\n case 'warning':\n return (\n <svg\n aria-hidden=\"true\"\n className=\"h-6 w-6 text-yellow-500\"\n data-slot=\"icon\"\n fill=\"currentColor\"\n viewBox=\"0 0 24 24\"\n xmlns=\"http://www.w3.org/2000/svg\"\n >\n <path\n clipRule=\"evenodd\"\n d=\"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12ZM12 8.25a.75.75 0 0 1 .75.75v3.75a.75.75 0 0 1-1.5 0V9a.75.75 0 0 1 .75-.75Zm0 8.25a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Z\"\n fillRule=\"evenodd\"\n ></path>\n </svg>\n );\n }\n};\n"],"mappings":";;;;;;;;;;AAAA,YAAY,WAAW;AAEvB,SAAS,MAA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YAAY,EAAE,UAAU,UAAU,KAAM,MAAM,SAAS;AAAA,YACvD,qBAAqB,MAAM;AACzB,kCAAoB,KAAK,EAAE;AAAA,YAC7B;AAAA;AAAA,QACF;AAAA,SACF,GACF;AAAA;AAAA,IAjCK,KAAK;AAAA,EAkCZ,CACD,GACH,GACF;AAEJ;","names":["Button","React","jsx","CardRoot","jsx","jsx","jsx","jsxs","jsx","jsx","jsx","jsx","XIcon","jsx","jsx","jsxs","XIcon"]}
|
package/dist/components.d.ts
CHANGED
|
@@ -1247,11 +1247,11 @@ declare const DatePicker: React$1.ForwardRefExoticComponent<DatePickerProps & Re
|
|
|
1247
1247
|
|
|
1248
1248
|
declare const Dialog: React$1.FC<_radix_ui_react_dialog.DialogProps> & {
|
|
1249
1249
|
Body: ({ children, className, ...props }: React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>) => react_jsx_runtime.JSX.Element;
|
|
1250
|
-
Content: React$1.ForwardRefExoticComponent<
|
|
1251
|
-
Description: React$1.ForwardRefExoticComponent<
|
|
1250
|
+
Content: ({ children, className, ...props }: React.ComponentProps<React$1.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogContentProps & React$1.RefAttributes<HTMLDivElement>>>) => react_jsx_runtime.JSX.Element;
|
|
1251
|
+
Description: ({ className, ...props }: React.ComponentProps<React$1.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogDescriptionProps & React$1.RefAttributes<HTMLParagraphElement>>>) => react_jsx_runtime.JSX.Element;
|
|
1252
1252
|
Footer: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
|
|
1253
1253
|
Header: ({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) => react_jsx_runtime.JSX.Element;
|
|
1254
|
-
Title: React$1.ForwardRefExoticComponent<
|
|
1254
|
+
Title: ({ className, ...props }: React.ComponentProps<React$1.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogTitleProps & React$1.RefAttributes<HTMLHeadingElement>>>) => react_jsx_runtime.JSX.Element;
|
|
1255
1255
|
Trigger: React$1.ForwardRefExoticComponent<_radix_ui_react_dialog.DialogTriggerProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
1256
1256
|
};
|
|
1257
1257
|
|
package/dist/components.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
Dialog,
|
|
7
7
|
NotificationHub,
|
|
8
8
|
buttonVariants
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-VWNGEXWI.js";
|
|
10
10
|
import {
|
|
11
11
|
ChartContext,
|
|
12
12
|
useChart,
|
|
@@ -2917,6 +2917,7 @@ import { match as match4 } from "ts-pattern";
|
|
|
2917
2917
|
// src/components/Form/BooleanField/BooleanFieldCheckbox.tsx
|
|
2918
2918
|
import { jsx as jsx113, jsxs as jsxs38 } from "react/jsx-runtime";
|
|
2919
2919
|
var BooleanFieldCheckbox = ({
|
|
2920
|
+
description,
|
|
2920
2921
|
disabled,
|
|
2921
2922
|
error,
|
|
2922
2923
|
label,
|
|
@@ -2941,7 +2942,8 @@ var BooleanFieldCheckbox = ({
|
|
|
2941
2942
|
}
|
|
2942
2943
|
}
|
|
2943
2944
|
),
|
|
2944
|
-
/* @__PURE__ */ jsx113(Label3, { htmlFor: name, children: label })
|
|
2945
|
+
/* @__PURE__ */ jsx113(Label3, { htmlFor: name, children: label }),
|
|
2946
|
+
/* @__PURE__ */ jsx113(FieldGroup.Description, { description })
|
|
2945
2947
|
] }),
|
|
2946
2948
|
/* @__PURE__ */ jsx113(FieldGroup.Error, { error })
|
|
2947
2949
|
] });
|
|
@@ -2953,6 +2955,7 @@ import { match as match3 } from "ts-pattern";
|
|
|
2953
2955
|
import { jsx as jsx114, jsxs as jsxs39 } from "react/jsx-runtime";
|
|
2954
2956
|
var stringifyBoolean = (value) => match3(value).with(void 0, () => "").with(true, () => "true").with(false, () => "false").exhaustive();
|
|
2955
2957
|
var BooleanFieldRadio = ({
|
|
2958
|
+
description,
|
|
2956
2959
|
disabled,
|
|
2957
2960
|
error,
|
|
2958
2961
|
label,
|
|
@@ -2979,13 +2982,14 @@ var BooleanFieldRadio = ({
|
|
|
2979
2982
|
value: stringifyBoolean(value),
|
|
2980
2983
|
onValueChange: handleValueChange,
|
|
2981
2984
|
children: [
|
|
2985
|
+
/* @__PURE__ */ jsx114(FieldGroup.Description, { description }),
|
|
2982
2986
|
/* @__PURE__ */ jsxs39(FieldGroup.Row, { children: [
|
|
2983
2987
|
/* @__PURE__ */ jsx114(RadioGroup4.Item, { id: `${name}-true`, value: "true" }),
|
|
2984
2988
|
/* @__PURE__ */ jsx114(
|
|
2985
2989
|
Label3,
|
|
2986
2990
|
{
|
|
2987
2991
|
"aria-disabled": disabled || readOnly,
|
|
2988
|
-
className: "
|
|
2992
|
+
className: "text-muted-foreground font-normal",
|
|
2989
2993
|
htmlFor: `${name}-true`,
|
|
2990
2994
|
children: options?.true ?? t("form.radioLabels.true")
|
|
2991
2995
|
}
|
|
@@ -2997,7 +3001,7 @@ var BooleanFieldRadio = ({
|
|
|
2997
3001
|
Label3,
|
|
2998
3002
|
{
|
|
2999
3003
|
"aria-disabled": disabled || readOnly,
|
|
3000
|
-
className: "
|
|
3004
|
+
className: "text-muted-foreground font-normal",
|
|
3001
3005
|
htmlFor: `${name}-false`,
|
|
3002
3006
|
children: options?.false ?? t("form.radioLabels.false")
|
|
3003
3007
|
}
|