@holmdigital/components 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button/Button.d.mts +10 -0
- package/dist/Button/Button.d.ts +10 -0
- package/dist/Checkbox/Checkbox.d.mts +9 -0
- package/dist/Checkbox/Checkbox.d.ts +9 -0
- package/dist/Dialog/Dialog.d.mts +13 -0
- package/dist/Dialog/Dialog.d.ts +13 -0
- package/dist/FormField/FormField.d.mts +11 -0
- package/dist/FormField/FormField.d.ts +11 -0
- package/dist/Heading/Heading.d.mts +8 -0
- package/dist/Heading/Heading.d.ts +8 -0
- package/dist/Heading/Heading.js +1 -2
- package/dist/Heading/Heading.mjs +1 -1
- package/dist/Modal/Modal.d.mts +8 -0
- package/dist/Modal/Modal.d.ts +8 -0
- package/dist/NavigationMenu/NavigationMenu.d.mts +15 -0
- package/dist/NavigationMenu/NavigationMenu.d.ts +15 -0
- package/dist/RadioGroup/RadioGroup.d.mts +19 -0
- package/dist/RadioGroup/RadioGroup.d.ts +19 -0
- package/dist/Select/Select.d.mts +23 -0
- package/dist/Select/Select.d.ts +23 -0
- package/dist/SkipLink/SkipLink.d.mts +8 -0
- package/dist/SkipLink/SkipLink.d.ts +8 -0
- package/dist/Switch/Switch.d.mts +12 -0
- package/dist/Switch/Switch.d.ts +12 -0
- package/dist/Toast/Toast.d.mts +26 -0
- package/dist/Toast/Toast.d.ts +26 -0
- package/dist/Tooltip/Tooltip.d.mts +19 -0
- package/dist/Tooltip/Tooltip.d.ts +19 -0
- package/dist/{chunk-W4ZHBRFT.mjs → chunk-2RP6SWY7.mjs} +1 -2
- package/dist/index.d.mts +84 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.js +1 -2
- package/dist/index.mjs +11 -11
- package/package.json +29 -29
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
|
|
10
|
+
export { Button, type ButtonProps };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface ButtonProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
4
|
+
variant?: 'primary' | 'secondary' | 'danger' | 'ghost';
|
|
5
|
+
size?: 'small' | 'medium' | 'large';
|
|
6
|
+
isLoading?: boolean;
|
|
7
|
+
}
|
|
8
|
+
declare const Button: React__default.ForwardRefExoticComponent<ButtonProps & React__default.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
|
|
10
|
+
export { Button, type ButtonProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface CheckboxProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
label: string;
|
|
5
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
8
|
+
|
|
9
|
+
export { Checkbox, type CheckboxProps };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface CheckboxProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
label: string;
|
|
5
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
6
|
+
}
|
|
7
|
+
declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
8
|
+
|
|
9
|
+
export { Checkbox, type CheckboxProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface DialogProps extends React__default.DialogHTMLAttributes<HTMLDialogElement> {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title: string;
|
|
7
|
+
children: React__default.ReactNode;
|
|
8
|
+
variant?: 'default' | 'alert';
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Dialog: React__default.ForwardRefExoticComponent<DialogProps & React__default.RefAttributes<HTMLDialogElement>>;
|
|
12
|
+
|
|
13
|
+
export { Dialog, type DialogProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface DialogProps extends React__default.DialogHTMLAttributes<HTMLDialogElement> {
|
|
4
|
+
isOpen: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
title: string;
|
|
7
|
+
children: React__default.ReactNode;
|
|
8
|
+
variant?: 'default' | 'alert';
|
|
9
|
+
description?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Dialog: React__default.ForwardRefExoticComponent<DialogProps & React__default.RefAttributes<HTMLDialogElement>>;
|
|
12
|
+
|
|
13
|
+
export { Dialog, type DialogProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface FormFieldProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
label: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
helpText?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const FormField: React__default.ForwardRefExoticComponent<FormFieldProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
10
|
+
|
|
11
|
+
export { FormField, type FormFieldProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface FormFieldProps extends React__default.InputHTMLAttributes<HTMLInputElement> {
|
|
4
|
+
label: string;
|
|
5
|
+
error?: string;
|
|
6
|
+
helpText?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
}
|
|
9
|
+
declare const FormField: React__default.ForwardRefExoticComponent<FormFieldProps & React__default.RefAttributes<HTMLInputElement>>;
|
|
10
|
+
|
|
11
|
+
export { FormField, type FormFieldProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface HeadingProps extends React__default.HTMLAttributes<HTMLHeadingElement> {
|
|
4
|
+
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
}
|
|
6
|
+
declare const Heading: React__default.ForwardRefExoticComponent<HeadingProps & React__default.RefAttributes<HTMLHeadingElement>>;
|
|
7
|
+
|
|
8
|
+
export { Heading, type HeadingProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface HeadingProps extends React__default.HTMLAttributes<HTMLHeadingElement> {
|
|
4
|
+
level: 1 | 2 | 3 | 4 | 5 | 6;
|
|
5
|
+
}
|
|
6
|
+
declare const Heading: React__default.ForwardRefExoticComponent<HeadingProps & React__default.RefAttributes<HTMLHeadingElement>>;
|
|
7
|
+
|
|
8
|
+
export { Heading, type HeadingProps };
|
package/dist/Heading/Heading.js
CHANGED
|
@@ -34,11 +34,10 @@ __export(Heading_exports, {
|
|
|
34
34
|
});
|
|
35
35
|
module.exports = __toCommonJS(Heading_exports);
|
|
36
36
|
var import_react = __toESM(require("react"));
|
|
37
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
38
37
|
var Heading = import_react.default.forwardRef(
|
|
39
38
|
({ level, children, className, ...props }, ref) => {
|
|
40
39
|
const Tag = `h${level}`;
|
|
41
|
-
return
|
|
40
|
+
return import_react.default.createElement(Tag, { ref, className, ...props }, children);
|
|
42
41
|
}
|
|
43
42
|
);
|
|
44
43
|
Heading.displayName = "Heading";
|
package/dist/Heading/Heading.mjs
CHANGED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DialogProps } from '../Dialog/Dialog.mjs';
|
|
3
|
+
|
|
4
|
+
interface ModalProps extends Omit<DialogProps, 'variant'> {
|
|
5
|
+
}
|
|
6
|
+
declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDialogElement>>;
|
|
7
|
+
|
|
8
|
+
export { Modal, type ModalProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { DialogProps } from '../Dialog/Dialog.js';
|
|
3
|
+
|
|
4
|
+
interface ModalProps extends Omit<DialogProps, 'variant'> {
|
|
5
|
+
}
|
|
6
|
+
declare const Modal: React.ForwardRefExoticComponent<ModalProps & React.RefAttributes<HTMLDialogElement>>;
|
|
7
|
+
|
|
8
|
+
export { Modal, type ModalProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface NavItem {
|
|
4
|
+
label: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
children?: NavItem[];
|
|
7
|
+
}
|
|
8
|
+
interface NavigationMenuProps {
|
|
9
|
+
items: NavItem[];
|
|
10
|
+
className?: string;
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const NavigationMenu: React__default.ForwardRefExoticComponent<NavigationMenuProps & React__default.RefAttributes<HTMLElement>>;
|
|
14
|
+
|
|
15
|
+
export { type NavItem, NavigationMenu, type NavigationMenuProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface NavItem {
|
|
4
|
+
label: string;
|
|
5
|
+
href?: string;
|
|
6
|
+
children?: NavItem[];
|
|
7
|
+
}
|
|
8
|
+
interface NavigationMenuProps {
|
|
9
|
+
items: NavItem[];
|
|
10
|
+
className?: string;
|
|
11
|
+
'aria-label'?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const NavigationMenu: React__default.ForwardRefExoticComponent<NavigationMenuProps & React__default.RefAttributes<HTMLElement>>;
|
|
14
|
+
|
|
15
|
+
export { type NavItem, NavigationMenu, type NavigationMenuProps };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface RadioOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface RadioGroupProps {
|
|
9
|
+
name: string;
|
|
10
|
+
options: RadioOption[];
|
|
11
|
+
value?: string;
|
|
12
|
+
onChange?: (value: string) => void;
|
|
13
|
+
orientation?: 'horizontal' | 'vertical';
|
|
14
|
+
className?: string;
|
|
15
|
+
label?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
|
|
19
|
+
export { RadioGroup, type RadioGroupProps, type RadioOption };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
|
|
3
|
+
interface RadioOption {
|
|
4
|
+
label: string;
|
|
5
|
+
value: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface RadioGroupProps {
|
|
9
|
+
name: string;
|
|
10
|
+
options: RadioOption[];
|
|
11
|
+
value?: string;
|
|
12
|
+
onChange?: (value: string) => void;
|
|
13
|
+
orientation?: 'horizontal' | 'vertical';
|
|
14
|
+
className?: string;
|
|
15
|
+
label?: string;
|
|
16
|
+
}
|
|
17
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
|
|
19
|
+
export { RadioGroup, type RadioGroupProps, type RadioOption };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
interface SelectProps {
|
|
5
|
+
value: string;
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
children: React__default.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const Select: ({ value, onChange, children }: SelectProps) => react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare const SelectTrigger: ({ children, className, placeholder }: {
|
|
11
|
+
children?: React__default.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare const SelectContent: ({ children }: {
|
|
16
|
+
children: React__default.ReactNode;
|
|
17
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
18
|
+
declare const SelectItem: ({ value, children }: {
|
|
19
|
+
value: string;
|
|
20
|
+
children: React__default.ReactNode;
|
|
21
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
22
|
+
|
|
23
|
+
export { Select, SelectContent, SelectItem, SelectTrigger };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
interface SelectProps {
|
|
5
|
+
value: string;
|
|
6
|
+
onChange: (value: string) => void;
|
|
7
|
+
children: React__default.ReactNode;
|
|
8
|
+
}
|
|
9
|
+
declare const Select: ({ value, onChange, children }: SelectProps) => react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare const SelectTrigger: ({ children, className, placeholder }: {
|
|
11
|
+
children?: React__default.ReactNode;
|
|
12
|
+
className?: string;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
15
|
+
declare const SelectContent: ({ children }: {
|
|
16
|
+
children: React__default.ReactNode;
|
|
17
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
18
|
+
declare const SelectItem: ({ value, children }: {
|
|
19
|
+
value: string;
|
|
20
|
+
children: React__default.ReactNode;
|
|
21
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
22
|
+
|
|
23
|
+
export { Select, SelectContent, SelectItem, SelectTrigger };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface SkipLinkProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
4
|
+
targetId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SkipLink: React__default.ForwardRefExoticComponent<SkipLinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
7
|
+
|
|
8
|
+
export { SkipLink, type SkipLinkProps };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React__default from 'react';
|
|
2
|
+
|
|
3
|
+
interface SkipLinkProps extends React__default.AnchorHTMLAttributes<HTMLAnchorElement> {
|
|
4
|
+
targetId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SkipLink: React__default.ForwardRefExoticComponent<SkipLinkProps & React__default.RefAttributes<HTMLAnchorElement>>;
|
|
7
|
+
|
|
8
|
+
export { SkipLink, type SkipLinkProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface SwitchProps {
|
|
4
|
+
checked: boolean;
|
|
5
|
+
onCheckedChange: (checked: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Switch: ({ checked, onCheckedChange, disabled, label, id }: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { Switch };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
|
|
3
|
+
interface SwitchProps {
|
|
4
|
+
checked: boolean;
|
|
5
|
+
onCheckedChange: (checked: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
label?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const Switch: ({ checked, onCheckedChange, disabled, label, id }: SwitchProps) => react_jsx_runtime.JSX.Element;
|
|
11
|
+
|
|
12
|
+
export { Switch };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
type ToastType = 'info' | 'success' | 'warning' | 'error';
|
|
5
|
+
interface Toast {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
type?: ToastType;
|
|
10
|
+
duration?: number;
|
|
11
|
+
action?: {
|
|
12
|
+
label: string;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
interface ToastContextType {
|
|
17
|
+
toasts: Toast[];
|
|
18
|
+
addToast: (toast: Omit<Toast, 'id'>) => void;
|
|
19
|
+
removeToast: (id: string) => void;
|
|
20
|
+
}
|
|
21
|
+
declare const ToastProvider: ({ children }: {
|
|
22
|
+
children: React__default.ReactNode;
|
|
23
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare const useToast: () => ToastContextType;
|
|
25
|
+
|
|
26
|
+
export { type Toast, ToastProvider, type ToastType, useToast };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
type ToastType = 'info' | 'success' | 'warning' | 'error';
|
|
5
|
+
interface Toast {
|
|
6
|
+
id: string;
|
|
7
|
+
title: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
type?: ToastType;
|
|
10
|
+
duration?: number;
|
|
11
|
+
action?: {
|
|
12
|
+
label: string;
|
|
13
|
+
onClick: () => void;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
interface ToastContextType {
|
|
17
|
+
toasts: Toast[];
|
|
18
|
+
addToast: (toast: Omit<Toast, 'id'>) => void;
|
|
19
|
+
removeToast: (id: string) => void;
|
|
20
|
+
}
|
|
21
|
+
declare const ToastProvider: ({ children }: {
|
|
22
|
+
children: React__default.ReactNode;
|
|
23
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare const useToast: () => ToastContextType;
|
|
25
|
+
|
|
26
|
+
export { type Toast, ToastProvider, type ToastType, useToast };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
declare const TooltipProvider: ({ children }: {
|
|
5
|
+
children: React__default.ReactNode;
|
|
6
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
7
|
+
interface TooltipProps {
|
|
8
|
+
children: React__default.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const Tooltip: ({ children }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare const TooltipTrigger: ({ children, asChild, ...props }: React__default.HTMLAttributes<HTMLElement> & {
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare const TooltipContent: ({ children, className }: {
|
|
15
|
+
children: React__default.ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
18
|
+
|
|
19
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import React__default from 'react';
|
|
3
|
+
|
|
4
|
+
declare const TooltipProvider: ({ children }: {
|
|
5
|
+
children: React__default.ReactNode;
|
|
6
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
7
|
+
interface TooltipProps {
|
|
8
|
+
children: React__default.ReactNode;
|
|
9
|
+
}
|
|
10
|
+
declare const Tooltip: ({ children }: TooltipProps) => react_jsx_runtime.JSX.Element;
|
|
11
|
+
declare const TooltipTrigger: ({ children, asChild, ...props }: React__default.HTMLAttributes<HTMLElement> & {
|
|
12
|
+
asChild?: boolean;
|
|
13
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
14
|
+
declare const TooltipContent: ({ children, className }: {
|
|
15
|
+
children: React__default.ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}) => react_jsx_runtime.JSX.Element | null;
|
|
18
|
+
|
|
19
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
// src/Heading/Heading.tsx
|
|
2
2
|
import React from "react";
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
3
|
var Heading = React.forwardRef(
|
|
5
4
|
({ level, children, className, ...props }, ref) => {
|
|
6
5
|
const Tag = `h${level}`;
|
|
7
|
-
return
|
|
6
|
+
return React.createElement(Tag, { ref, className, ...props }, children);
|
|
8
7
|
}
|
|
9
8
|
);
|
|
10
9
|
Heading.displayName = "Heading";
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export { Button, ButtonProps } from './Button/Button.mjs';
|
|
2
|
+
export { FormField, FormFieldProps } from './FormField/FormField.mjs';
|
|
3
|
+
export { Dialog, DialogProps } from './Dialog/Dialog.mjs';
|
|
4
|
+
export { Modal, ModalProps } from './Modal/Modal.mjs';
|
|
5
|
+
export { SkipLink, SkipLinkProps } from './SkipLink/SkipLink.mjs';
|
|
6
|
+
export { NavItem, NavigationMenu, NavigationMenuProps } from './NavigationMenu/NavigationMenu.mjs';
|
|
7
|
+
export { Checkbox, CheckboxProps } from './Checkbox/Checkbox.mjs';
|
|
8
|
+
export { RadioGroup, RadioGroupProps, RadioOption } from './RadioGroup/RadioGroup.mjs';
|
|
9
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
|
+
import React__default, { ReactNode } from 'react';
|
|
11
|
+
export { Select, SelectContent, SelectItem, SelectTrigger } from './Select/Select.mjs';
|
|
12
|
+
export { Switch } from './Switch/Switch.mjs';
|
|
13
|
+
export { Toast, ToastProvider, ToastType, useToast } from './Toast/Toast.mjs';
|
|
14
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './Tooltip/Tooltip.mjs';
|
|
15
|
+
export { Heading, HeadingProps } from './Heading/Heading.mjs';
|
|
16
|
+
|
|
17
|
+
interface BreadcrumbsProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
18
|
+
separator?: ReactNode;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
interface BreadcrumbItemProps extends React__default.LiHTMLAttributes<HTMLLIElement> {
|
|
22
|
+
href?: string;
|
|
23
|
+
isCurrent?: boolean;
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
declare const BreadcrumbItem: ({ href, isCurrent, children, className, ...props }: BreadcrumbItemProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare const Breadcrumbs: ({ separator, children, className, ...props }: BreadcrumbsProps) => react_jsx_runtime.JSX.Element;
|
|
28
|
+
|
|
29
|
+
interface AccordionProps {
|
|
30
|
+
type?: 'single' | 'multiple';
|
|
31
|
+
defaultValue?: string | string[];
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
declare const Accordion: ({ type, defaultValue, children, className }: AccordionProps) => react_jsx_runtime.JSX.Element;
|
|
36
|
+
interface AccordionItemProps {
|
|
37
|
+
value: string;
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
declare const AccordionItem: ({ value, children, className }: AccordionItemProps) => react_jsx_runtime.JSX.Element;
|
|
42
|
+
interface AccordionTriggerProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
value?: string;
|
|
45
|
+
isOpen?: boolean;
|
|
46
|
+
}
|
|
47
|
+
declare const AccordionTrigger: ({ children, className, value, isOpen, ...props }: AccordionTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
48
|
+
interface AccordionContentProps {
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
className?: string;
|
|
51
|
+
value?: string;
|
|
52
|
+
isOpen?: boolean;
|
|
53
|
+
}
|
|
54
|
+
declare const AccordionContent: ({ children, className, value, isOpen }: AccordionContentProps) => react_jsx_runtime.JSX.Element;
|
|
55
|
+
|
|
56
|
+
interface TabsProps {
|
|
57
|
+
defaultValue?: string;
|
|
58
|
+
value?: string;
|
|
59
|
+
onValueChange?: (value: string) => void;
|
|
60
|
+
orientation?: 'horizontal' | 'vertical';
|
|
61
|
+
activationMode?: 'automatic' | 'manual';
|
|
62
|
+
children: ReactNode;
|
|
63
|
+
className?: string;
|
|
64
|
+
}
|
|
65
|
+
declare const Tabs: ({ defaultValue, value, onValueChange, orientation, activationMode, children, className }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
66
|
+
interface TabsListProps {
|
|
67
|
+
children: ReactNode;
|
|
68
|
+
className?: string;
|
|
69
|
+
ariaLabel?: string;
|
|
70
|
+
}
|
|
71
|
+
declare const TabsList: ({ children, className, ariaLabel }: TabsListProps) => react_jsx_runtime.JSX.Element;
|
|
72
|
+
interface TabTriggerProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
73
|
+
value: string;
|
|
74
|
+
children: ReactNode;
|
|
75
|
+
}
|
|
76
|
+
declare const TabTrigger: ({ value, children, className, ...props }: TabTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
77
|
+
interface TabsContentProps {
|
|
78
|
+
value: string;
|
|
79
|
+
children: ReactNode;
|
|
80
|
+
className?: string;
|
|
81
|
+
}
|
|
82
|
+
declare const TabsContent: ({ value, children, className }: TabsContentProps) => react_jsx_runtime.JSX.Element | null;
|
|
83
|
+
|
|
84
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, BreadcrumbItem, type BreadcrumbItemProps, Breadcrumbs, type BreadcrumbsProps, TabTrigger, type TabTriggerProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
export { Button, ButtonProps } from './Button/Button.js';
|
|
2
|
+
export { FormField, FormFieldProps } from './FormField/FormField.js';
|
|
3
|
+
export { Dialog, DialogProps } from './Dialog/Dialog.js';
|
|
4
|
+
export { Modal, ModalProps } from './Modal/Modal.js';
|
|
5
|
+
export { SkipLink, SkipLinkProps } from './SkipLink/SkipLink.js';
|
|
6
|
+
export { NavItem, NavigationMenu, NavigationMenuProps } from './NavigationMenu/NavigationMenu.js';
|
|
7
|
+
export { Checkbox, CheckboxProps } from './Checkbox/Checkbox.js';
|
|
8
|
+
export { RadioGroup, RadioGroupProps, RadioOption } from './RadioGroup/RadioGroup.js';
|
|
9
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
10
|
+
import React__default, { ReactNode } from 'react';
|
|
11
|
+
export { Select, SelectContent, SelectItem, SelectTrigger } from './Select/Select.js';
|
|
12
|
+
export { Switch } from './Switch/Switch.js';
|
|
13
|
+
export { Toast, ToastProvider, ToastType, useToast } from './Toast/Toast.js';
|
|
14
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from './Tooltip/Tooltip.js';
|
|
15
|
+
export { Heading, HeadingProps } from './Heading/Heading.js';
|
|
16
|
+
|
|
17
|
+
interface BreadcrumbsProps extends React__default.HTMLAttributes<HTMLElement> {
|
|
18
|
+
separator?: ReactNode;
|
|
19
|
+
children: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
interface BreadcrumbItemProps extends React__default.LiHTMLAttributes<HTMLLIElement> {
|
|
22
|
+
href?: string;
|
|
23
|
+
isCurrent?: boolean;
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
declare const BreadcrumbItem: ({ href, isCurrent, children, className, ...props }: BreadcrumbItemProps) => react_jsx_runtime.JSX.Element;
|
|
27
|
+
declare const Breadcrumbs: ({ separator, children, className, ...props }: BreadcrumbsProps) => react_jsx_runtime.JSX.Element;
|
|
28
|
+
|
|
29
|
+
interface AccordionProps {
|
|
30
|
+
type?: 'single' | 'multiple';
|
|
31
|
+
defaultValue?: string | string[];
|
|
32
|
+
children: ReactNode;
|
|
33
|
+
className?: string;
|
|
34
|
+
}
|
|
35
|
+
declare const Accordion: ({ type, defaultValue, children, className }: AccordionProps) => react_jsx_runtime.JSX.Element;
|
|
36
|
+
interface AccordionItemProps {
|
|
37
|
+
value: string;
|
|
38
|
+
children: ReactNode;
|
|
39
|
+
className?: string;
|
|
40
|
+
}
|
|
41
|
+
declare const AccordionItem: ({ value, children, className }: AccordionItemProps) => react_jsx_runtime.JSX.Element;
|
|
42
|
+
interface AccordionTriggerProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
43
|
+
children: ReactNode;
|
|
44
|
+
value?: string;
|
|
45
|
+
isOpen?: boolean;
|
|
46
|
+
}
|
|
47
|
+
declare const AccordionTrigger: ({ children, className, value, isOpen, ...props }: AccordionTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
48
|
+
interface AccordionContentProps {
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
className?: string;
|
|
51
|
+
value?: string;
|
|
52
|
+
isOpen?: boolean;
|
|
53
|
+
}
|
|
54
|
+
declare const AccordionContent: ({ children, className, value, isOpen }: AccordionContentProps) => react_jsx_runtime.JSX.Element;
|
|
55
|
+
|
|
56
|
+
interface TabsProps {
|
|
57
|
+
defaultValue?: string;
|
|
58
|
+
value?: string;
|
|
59
|
+
onValueChange?: (value: string) => void;
|
|
60
|
+
orientation?: 'horizontal' | 'vertical';
|
|
61
|
+
activationMode?: 'automatic' | 'manual';
|
|
62
|
+
children: ReactNode;
|
|
63
|
+
className?: string;
|
|
64
|
+
}
|
|
65
|
+
declare const Tabs: ({ defaultValue, value, onValueChange, orientation, activationMode, children, className }: TabsProps) => react_jsx_runtime.JSX.Element;
|
|
66
|
+
interface TabsListProps {
|
|
67
|
+
children: ReactNode;
|
|
68
|
+
className?: string;
|
|
69
|
+
ariaLabel?: string;
|
|
70
|
+
}
|
|
71
|
+
declare const TabsList: ({ children, className, ariaLabel }: TabsListProps) => react_jsx_runtime.JSX.Element;
|
|
72
|
+
interface TabTriggerProps extends React__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
73
|
+
value: string;
|
|
74
|
+
children: ReactNode;
|
|
75
|
+
}
|
|
76
|
+
declare const TabTrigger: ({ value, children, className, ...props }: TabTriggerProps) => react_jsx_runtime.JSX.Element;
|
|
77
|
+
interface TabsContentProps {
|
|
78
|
+
value: string;
|
|
79
|
+
children: ReactNode;
|
|
80
|
+
className?: string;
|
|
81
|
+
}
|
|
82
|
+
declare const TabsContent: ({ value, children, className }: TabsContentProps) => react_jsx_runtime.JSX.Element | null;
|
|
83
|
+
|
|
84
|
+
export { Accordion, AccordionContent, type AccordionContentProps, AccordionItem, type AccordionItemProps, type AccordionProps, AccordionTrigger, type AccordionTriggerProps, BreadcrumbItem, type BreadcrumbItemProps, Breadcrumbs, type BreadcrumbsProps, TabTrigger, type TabTriggerProps, Tabs, TabsContent, type TabsContentProps, TabsList, type TabsListProps, type TabsProps };
|
package/dist/index.js
CHANGED
|
@@ -1213,11 +1213,10 @@ var TooltipContent = ({ children, className = "" }) => {
|
|
|
1213
1213
|
|
|
1214
1214
|
// src/Heading/Heading.tsx
|
|
1215
1215
|
var import_react15 = __toESM(require("react"));
|
|
1216
|
-
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
1217
1216
|
var Heading = import_react15.default.forwardRef(
|
|
1218
1217
|
({ level, children, className, ...props }, ref) => {
|
|
1219
1218
|
const Tag = `h${level}`;
|
|
1220
|
-
return
|
|
1219
|
+
return import_react15.default.createElement(Tag, { ref, className, ...props }, children);
|
|
1221
1220
|
}
|
|
1222
1221
|
);
|
|
1223
1222
|
Heading.displayName = "Heading";
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
|
|
3
|
-
} from "./chunk-
|
|
2
|
+
RadioGroup
|
|
3
|
+
} from "./chunk-YMSNGQN6.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Select,
|
|
6
6
|
SelectContent,
|
|
@@ -13,28 +13,28 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
Switch
|
|
15
15
|
} from "./chunk-5RKBS475.mjs";
|
|
16
|
-
import {
|
|
17
|
-
ToastProvider,
|
|
18
|
-
useToast
|
|
19
|
-
} from "./chunk-2MJRKHPL.mjs";
|
|
20
16
|
import {
|
|
21
17
|
Tooltip,
|
|
22
18
|
TooltipContent,
|
|
23
19
|
TooltipProvider,
|
|
24
20
|
TooltipTrigger
|
|
25
21
|
} from "./chunk-C5M6C7KT.mjs";
|
|
22
|
+
import {
|
|
23
|
+
ToastProvider,
|
|
24
|
+
useToast
|
|
25
|
+
} from "./chunk-2MJRKHPL.mjs";
|
|
26
26
|
import {
|
|
27
27
|
Button
|
|
28
28
|
} from "./chunk-NDYRGXQ6.mjs";
|
|
29
29
|
import {
|
|
30
30
|
Checkbox
|
|
31
31
|
} from "./chunk-NOE5QKC2.mjs";
|
|
32
|
-
import {
|
|
33
|
-
Heading
|
|
34
|
-
} from "./chunk-W4ZHBRFT.mjs";
|
|
35
32
|
import {
|
|
36
33
|
FormField
|
|
37
34
|
} from "./chunk-PLT5CAFO.mjs";
|
|
35
|
+
import {
|
|
36
|
+
Heading
|
|
37
|
+
} from "./chunk-2RP6SWY7.mjs";
|
|
38
38
|
import {
|
|
39
39
|
Modal
|
|
40
40
|
} from "./chunk-HALLFO25.mjs";
|
|
@@ -42,8 +42,8 @@ import {
|
|
|
42
42
|
Dialog
|
|
43
43
|
} from "./chunk-LZ42XDDI.mjs";
|
|
44
44
|
import {
|
|
45
|
-
|
|
46
|
-
} from "./chunk-
|
|
45
|
+
NavigationMenu
|
|
46
|
+
} from "./chunk-GK4BYT56.mjs";
|
|
47
47
|
|
|
48
48
|
// src/Breadcrumbs/Breadcrumbs.tsx
|
|
49
49
|
import React, { Children, isValidElement, cloneElement } from "react";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holmdigital/components",
|
|
3
3
|
"author": "Holm Digital AB",
|
|
4
|
-
"version": "1.2.
|
|
4
|
+
"version": "1.2.2",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public",
|
|
@@ -18,61 +18,61 @@
|
|
|
18
18
|
"types": "./dist/index.d.ts",
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
21
22
|
"import": "./dist/index.mjs",
|
|
22
|
-
"require": "./dist/index.js"
|
|
23
|
-
"types": "./dist/index.d.ts"
|
|
23
|
+
"require": "./dist/index.js"
|
|
24
24
|
},
|
|
25
25
|
"./Button": {
|
|
26
|
-
"
|
|
27
|
-
"
|
|
26
|
+
"types": "./dist/Button/Button.d.ts",
|
|
27
|
+
"import": "./dist/Button/Button.mjs"
|
|
28
28
|
},
|
|
29
29
|
"./FormField": {
|
|
30
|
-
"
|
|
31
|
-
"
|
|
30
|
+
"types": "./dist/FormField/FormField.d.ts",
|
|
31
|
+
"import": "./dist/FormField/FormField.mjs"
|
|
32
32
|
},
|
|
33
33
|
"./Dialog": {
|
|
34
|
-
"
|
|
35
|
-
"
|
|
34
|
+
"types": "./dist/Dialog/Dialog.d.ts",
|
|
35
|
+
"import": "./dist/Dialog/Dialog.mjs"
|
|
36
36
|
},
|
|
37
37
|
"./Modal": {
|
|
38
|
-
"
|
|
39
|
-
"
|
|
38
|
+
"types": "./dist/Modal/Modal.d.ts",
|
|
39
|
+
"import": "./dist/Modal/Modal.mjs"
|
|
40
40
|
},
|
|
41
41
|
"./SkipLink": {
|
|
42
|
-
"
|
|
43
|
-
"
|
|
42
|
+
"types": "./dist/SkipLink/SkipLink.d.ts",
|
|
43
|
+
"import": "./dist/SkipLink/SkipLink.mjs"
|
|
44
44
|
},
|
|
45
45
|
"./NavigationMenu": {
|
|
46
|
-
"
|
|
47
|
-
"
|
|
46
|
+
"types": "./dist/NavigationMenu/NavigationMenu.d.ts",
|
|
47
|
+
"import": "./dist/NavigationMenu/NavigationMenu.mjs"
|
|
48
48
|
},
|
|
49
49
|
"./Checkbox": {
|
|
50
|
-
"
|
|
51
|
-
"
|
|
50
|
+
"types": "./dist/Checkbox/Checkbox.d.ts",
|
|
51
|
+
"import": "./dist/Checkbox/Checkbox.mjs"
|
|
52
52
|
},
|
|
53
53
|
"./RadioGroup": {
|
|
54
|
-
"
|
|
55
|
-
"
|
|
54
|
+
"types": "./dist/RadioGroup/RadioGroup.d.ts",
|
|
55
|
+
"import": "./dist/RadioGroup/RadioGroup.mjs"
|
|
56
56
|
},
|
|
57
57
|
"./Select": {
|
|
58
|
-
"
|
|
59
|
-
"
|
|
58
|
+
"types": "./dist/Select/Select.d.ts",
|
|
59
|
+
"import": "./dist/Select/Select.mjs"
|
|
60
60
|
},
|
|
61
61
|
"./Switch": {
|
|
62
|
-
"
|
|
63
|
-
"
|
|
62
|
+
"types": "./dist/Switch/Switch.d.ts",
|
|
63
|
+
"import": "./dist/Switch/Switch.mjs"
|
|
64
64
|
},
|
|
65
65
|
"./Toast": {
|
|
66
|
-
"
|
|
67
|
-
"
|
|
66
|
+
"types": "./dist/Toast/Toast.d.ts",
|
|
67
|
+
"import": "./dist/Toast/Toast.mjs"
|
|
68
68
|
},
|
|
69
69
|
"./Tooltip": {
|
|
70
|
-
"
|
|
71
|
-
"
|
|
70
|
+
"types": "./dist/Tooltip/Tooltip.d.ts",
|
|
71
|
+
"import": "./dist/Tooltip/Tooltip.mjs"
|
|
72
72
|
},
|
|
73
73
|
"./Heading": {
|
|
74
|
-
"
|
|
75
|
-
"
|
|
74
|
+
"types": "./dist/Heading/Heading.d.ts",
|
|
75
|
+
"import": "./dist/Heading/Heading.mjs"
|
|
76
76
|
}
|
|
77
77
|
},
|
|
78
78
|
"files": [
|