mado-ui 0.5.1 → 0.5.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/components/button.d.ts +2 -2
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/details.d.ts +4 -4
- package/dist/components/details.d.ts.map +1 -1
- package/dist/components/drop-down.d.ts +7 -7
- package/dist/components/drop-down.d.ts.map +1 -1
- package/dist/components/form/fieldset.d.ts +2 -1
- package/dist/components/form/fieldset.d.ts.map +1 -1
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/form/index.d.ts.map +1 -1
- package/dist/components/form/input/date/index.d.ts +2 -1
- package/dist/components/form/input/date/index.d.ts.map +1 -1
- package/dist/components/form/input/index.d.ts +2 -2
- package/dist/components/form/input/index.d.ts.map +1 -1
- package/dist/components/form/submit-button.d.ts +2 -2
- package/dist/components/form/submit-button.d.ts.map +1 -1
- package/dist/components/form/textarea.d.ts +2 -2
- package/dist/components/form/textarea.d.ts.map +1 -1
- package/dist/components/ghost.d.ts +3 -4
- package/dist/components/ghost.d.ts.map +1 -1
- package/dist/components/heading.d.ts +2 -2
- package/dist/components/heading.d.ts.map +1 -1
- package/dist/components/iframe.d.ts +2 -2
- package/dist/components/iframe.d.ts.map +1 -1
- package/dist/components/link.d.ts +3 -3
- package/dist/components/link.d.ts.map +1 -1
- package/dist/components/modal.d.ts +6 -6
- package/dist/components/modal.d.ts.map +1 -1
- package/dist/components/time.d.ts +2 -2
- package/dist/components/time.d.ts.map +1 -1
- package/dist/components/tooltip.d.ts +4 -4
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/video.d.ts +2 -2
- package/dist/components/video.d.ts.map +1 -1
- package/dist/components.d.ts +31 -31
- package/dist/components.esm.js.map +1 -1
- package/dist/components.js.map +1 -1
- package/dist/index.d.ts +31 -31
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/components.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { Url, UrlObject } from 'node:url';
|
|
3
|
-
import { ElementType, ComponentPropsWithRef, ReactNode, HTMLInputTypeAttribute, RefObject, FormEvent, FormEventHandler, HTMLAttributes } from 'react';
|
|
3
|
+
import { ElementType, ComponentPropsWithRef, ReactElement, ReactNode, HTMLInputTypeAttribute, RefObject, FormEvent, FormEventHandler, HTMLAttributes } from 'react';
|
|
4
4
|
import { Button as Button$1, DisclosurePanelProps, DisclosureProps, DisclosureButtonProps, MenuButtonProps, MenuItemProps, MenuItemsProps, MenuProps, MenuSectionProps, MenuHeadingProps, MenuSeparatorProps, FieldsetProps as FieldsetProps$1, LegendProps, InputProps as InputProps$1, DescriptionProps, FieldProps, LabelProps, TextareaProps as TextareaProps$1, DialogTitleProps } from '@headlessui/react';
|
|
5
5
|
import { Placement } from '@floating-ui/react-dom';
|
|
6
6
|
|
|
@@ -43,7 +43,7 @@ type OnlyFirst<F, L> = F & {
|
|
|
43
43
|
type AnchorProps<TTag extends ElementType = 'a'> = AnyElementProps<TTag> & {
|
|
44
44
|
disabled?: boolean;
|
|
45
45
|
};
|
|
46
|
-
declare function Anchor<TTag extends ElementType = 'a'>({ as, className, disabled, href, onClick, target, rel, ...props }: AnchorProps<TTag>):
|
|
46
|
+
declare function Anchor<TTag extends ElementType = 'a'>({ as, className, disabled, href, onClick, target, rel, ...props }: AnchorProps<TTag>): ReactElement;
|
|
47
47
|
type ThemeColorOrClasses = OneOf<[
|
|
48
48
|
{
|
|
49
49
|
/**
|
|
@@ -94,7 +94,7 @@ type LinkProps<TTag extends ElementType = typeof Anchor> = AnyElementProps<TTag,
|
|
|
94
94
|
* @example
|
|
95
95
|
* <Link href='/about' type='fill-ltr' theme='red' title='About Us'>Learn more about our company</Link>
|
|
96
96
|
*/
|
|
97
|
-
declare function Link<TTag extends ElementType = typeof Anchor>({ as, className, customTheme, theme, type, ...props }: LinkProps<TTag>):
|
|
97
|
+
declare function Link<TTag extends ElementType = typeof Anchor>({ as, className, customTheme, theme, type, ...props }: LinkProps<TTag>): ReactElement;
|
|
98
98
|
type ExtendedLinkConfig = {
|
|
99
99
|
/** Modifies the default element that is rendered. The `as` prop on the component still overrides the default set here. */
|
|
100
100
|
as?: ElementType;
|
|
@@ -208,7 +208,7 @@ type ExtendedButtonProps<TExtendedConfig extends ExtendedButtonConfig, TTag exte
|
|
|
208
208
|
* # Button
|
|
209
209
|
* - A pre-styled button with utility props for easy customization depending on use case.
|
|
210
210
|
*/
|
|
211
|
-
declare function Button<TTag extends ElementType = typeof Button$1>({ className, customTheme, gradient, padding, rounded, theme, ...props }: ButtonProps<TTag>):
|
|
211
|
+
declare function Button<TTag extends ElementType = typeof Button$1>({ className, customTheme, gradient, padding, rounded, theme, ...props }: ButtonProps<TTag>): ReactElement;
|
|
212
212
|
/**
|
|
213
213
|
* # createButton
|
|
214
214
|
* Creates an extended Button component with additional theme options.
|
|
@@ -248,9 +248,9 @@ type DetailsSummaryProps<TTag extends ElementType = typeof Button<typeof Headles
|
|
|
248
248
|
className?: string;
|
|
249
249
|
};
|
|
250
250
|
|
|
251
|
-
declare function DetailsSummary<TTag extends ElementType = typeof Button>({ arrow, children, className, ...props }: DetailsSummaryProps<TTag>):
|
|
252
|
-
declare function DetailsBody<TTag extends ElementType = 'div'>({ children, className, ...props }: DetailsBodyProps<TTag>):
|
|
253
|
-
declare function Details<TTag extends ElementType = 'div'>({ as, className, ...props }: DetailsProps<TTag>):
|
|
251
|
+
declare function DetailsSummary<TTag extends ElementType = typeof Button>({ arrow, children, className, ...props }: DetailsSummaryProps<TTag>): ReactElement;
|
|
252
|
+
declare function DetailsBody<TTag extends ElementType = 'div'>({ children, className, ...props }: DetailsBodyProps<TTag>): ReactElement;
|
|
253
|
+
declare function Details<TTag extends ElementType = 'div'>({ as, className, ...props }: DetailsProps<TTag>): ReactElement;
|
|
254
254
|
|
|
255
255
|
type DropDownButtonProps<TTag extends ElementType = 'button'> = Omit<MenuButtonProps<TTag>, 'as' | 'className'> & {
|
|
256
256
|
arrow?: boolean | ReactNode;
|
|
@@ -274,12 +274,12 @@ type DropDownSectionProps = MenuSectionProps & {
|
|
|
274
274
|
};
|
|
275
275
|
type DropDownSeparatorProps<TTag extends ElementType = 'div'> = Omit<MenuSeparatorProps<TTag>, 'as'> & AnyElementProps<TTag>;
|
|
276
276
|
|
|
277
|
-
declare function DropDownButton<TTag extends ElementType = 'button'>({ arrow, as, children, className, ...props }: DropDownButtonProps<TTag>):
|
|
278
|
-
declare function DropDownItem<TTag extends ElementType = 'div'>({ as, ...props }: DropDownItemProps<TTag>):
|
|
279
|
-
declare function DropDownItems({ anchor, children, className, containerClassName, style, ...props }: DropDownItemsProps):
|
|
280
|
-
declare function DropDownSection({ children, label, labelProps, separatorAbove, separatorBelow, ...props }: DropDownSectionProps):
|
|
281
|
-
declare function DropDownSeparator<TTag extends ElementType = 'div'>({ as, className, ...props }: DropDownSeparatorProps<TTag>):
|
|
282
|
-
declare function DropDown(props: DropDownProps):
|
|
277
|
+
declare function DropDownButton<TTag extends ElementType = 'button'>({ arrow, as, children, className, ...props }: DropDownButtonProps<TTag>): ReactElement;
|
|
278
|
+
declare function DropDownItem<TTag extends ElementType = 'div'>({ as, ...props }: DropDownItemProps<TTag>): ReactElement;
|
|
279
|
+
declare function DropDownItems({ anchor, children, className, containerClassName, style, ...props }: DropDownItemsProps): ReactElement;
|
|
280
|
+
declare function DropDownSection({ children, label, labelProps, separatorAbove, separatorBelow, ...props }: DropDownSectionProps): ReactElement;
|
|
281
|
+
declare function DropDownSeparator<TTag extends ElementType = 'div'>({ as, className, ...props }: DropDownSeparatorProps<TTag>): ReactElement;
|
|
282
|
+
declare function DropDown(props: DropDownProps): ReactElement;
|
|
283
283
|
|
|
284
284
|
type StringField = {
|
|
285
285
|
type: 'email' | 'file' | 'number' | 'string' | 'tel' | 'textarea' | 'url';
|
|
@@ -338,7 +338,7 @@ type FieldsetProps = Omit<FieldsetProps$1, 'name'> & NameOrLegend & {
|
|
|
338
338
|
join?: string;
|
|
339
339
|
};
|
|
340
340
|
|
|
341
|
-
declare function Fieldset({ children, className, decorative, join, legend, legendProps, name, ...props }: FieldsetProps):
|
|
341
|
+
declare function Fieldset({ children, className, decorative, join, legend, legendProps, name, ...props }: FieldsetProps): ReactElement;
|
|
342
342
|
|
|
343
343
|
type DayNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31;
|
|
344
344
|
type DateTimeObject = {
|
|
@@ -453,7 +453,7 @@ type PhoneOptions = {
|
|
|
453
453
|
format: 'continuous' | 'dot' | 'hyphenated' | 'none' | 'space' | 'standard';
|
|
454
454
|
};
|
|
455
455
|
|
|
456
|
-
declare function Input({ checked, className, defaultValue, description, descriptionProps, disabled, fieldProps, invalid, label, labelProps, max, min, name, onBlur, onChange, options, placeholder, ref, required, type, value, ...props }: InputProps):
|
|
456
|
+
declare function Input({ checked, className, defaultValue, description, descriptionProps, disabled, fieldProps, invalid, label, labelProps, max, min, name, onBlur, onChange, options, placeholder, ref, required, type, value, ...props }: InputProps): ReactElement;
|
|
457
457
|
|
|
458
458
|
type SubmitButtonProps = Omit<ButtonProps, 'as' | 'customTheme' | 'href' | 'theme'> & {
|
|
459
459
|
/** This doesn't do much by default, because we use built-in colors for different form states. You'll have to modify a good bit to make this do anything. */
|
|
@@ -491,7 +491,7 @@ type SubmitButtonProps = Omit<ButtonProps, 'as' | 'customTheme' | 'href' | 'them
|
|
|
491
491
|
theme?: never;
|
|
492
492
|
};
|
|
493
493
|
|
|
494
|
-
declare function SubmitButton({ children, className, customTheme, error, incomplete, loading, success, type, ...props }: SubmitButtonProps):
|
|
494
|
+
declare function SubmitButton({ children, className, customTheme, error, incomplete, loading, success, type, ...props }: SubmitButtonProps): ReactElement;
|
|
495
495
|
|
|
496
496
|
type TextareaProps = Omit<TextareaProps$1, 'name'> & {
|
|
497
497
|
description?: ReactNode;
|
|
@@ -509,7 +509,7 @@ type TextareaProps = Omit<TextareaProps$1, 'name'> & {
|
|
|
509
509
|
ref?: RefObject<HTMLTextAreaElement | null>;
|
|
510
510
|
};
|
|
511
511
|
|
|
512
|
-
declare function Textarea({ className, defaultValue, description, descriptionProps, disabled, fieldProps, invalid, label, labelProps, name, onBlur, onChange, placeholder, ref, required, value, ...props }: TextareaProps):
|
|
512
|
+
declare function Textarea({ className, defaultValue, description, descriptionProps, disabled, fieldProps, invalid, label, labelProps, name, onBlur, onChange, placeholder, ref, required, value, ...props }: TextareaProps): ReactElement;
|
|
513
513
|
|
|
514
514
|
type FormSubmitArgs = {
|
|
515
515
|
event: FormEvent<HTMLFormElement>;
|
|
@@ -538,7 +538,7 @@ type FormProps<T extends ElementType = 'form'> = Omit<AnyElementProps<T, {
|
|
|
538
538
|
declare function Form<T extends ElementType = 'form'>({ controlled, initialStatus, ...props }: FormProps<T>): react_jsx_runtime.JSX.Element;
|
|
539
539
|
|
|
540
540
|
type GhostProps = HTMLAttributes<HTMLDivElement>;
|
|
541
|
-
declare function Ghost({ children, className, ...props }: GhostProps):
|
|
541
|
+
declare function Ghost({ children, className, ...props }: GhostProps): ReactElement;
|
|
542
542
|
|
|
543
543
|
type HeadingProps = HTMLAttributes<HTMLHeadingElement> & {
|
|
544
544
|
as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
@@ -558,7 +558,7 @@ type HeadingProps = HTMLAttributes<HTMLHeadingElement> & {
|
|
|
558
558
|
* A heading component that renders HTML heading elements (h1-h6) with appropriate styling.
|
|
559
559
|
* Automatically generates an ID for the heading based on its content if none is provided.
|
|
560
560
|
*/
|
|
561
|
-
declare function Heading({ as, children, customize, className, id, ref, ...props }: HeadingProps):
|
|
561
|
+
declare function Heading({ as, children, customize, className, id, ref, ...props }: HeadingProps): ReactElement;
|
|
562
562
|
|
|
563
563
|
type IFrameAllowAttribute = 'accelerometer' | 'ambient-light-sensor' | 'attribution-reporting' | 'autoplay' | 'bluetooth' | 'camera' | 'captured-surface-control' | 'compute-pressure' | 'cross-origin-isolated' | 'deferred-fetch' | 'deferred-fetch-minimal' | 'display-capture' | 'encrypted-media' | 'fullscreen' | 'gamepad' | 'geolocation' | 'gyroscope' | 'hid' | 'identity-credentials-get' | 'idle-detection' | 'language-detector' | 'local-fonts' | 'magnetometer' | 'microphone' | 'midi' | 'otp-credentials' | 'payment' | 'picture-in-picture' | 'publickey-credentials-get' | 'screen-wake-lock' | 'serial' | 'speaker-selection' | 'storage-access' | 'translator' | 'summarizer' | 'usb' | 'web-share' | 'window-management' | 'xr-spatial-tracking';
|
|
564
564
|
type IFrameReferrerPolicyAttribute = 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
@@ -573,7 +573,7 @@ type IFrameProps = Omit<ComponentPropsWithRef<'iframe'>, 'allow' | 'children' |
|
|
|
573
573
|
* # iFrame
|
|
574
574
|
* - An `<iframe/>` with preset classes, backup, and required title for SEO.
|
|
575
575
|
*/
|
|
576
|
-
declare function IFrame({ allow, className, referrerPolicy, sandbox, ...props }: IFrameProps):
|
|
576
|
+
declare function IFrame({ allow, className, referrerPolicy, sandbox, ...props }: IFrameProps): ReactElement;
|
|
577
577
|
|
|
578
578
|
type ModalProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
579
579
|
children: ReactNode | (({ openModal, closeModal }: {
|
|
@@ -586,11 +586,11 @@ type ModalProps = Omit<HTMLAttributes<HTMLDivElement>, 'children'> & {
|
|
|
586
586
|
place?: 'center' | 'bottom';
|
|
587
587
|
};
|
|
588
588
|
|
|
589
|
-
declare function ModalTrigger<T extends ElementType = typeof Button$1>({ as, ...props }: AnyElementProps<T>):
|
|
590
|
-
declare function ModalTitle(props: DialogTitleProps):
|
|
591
|
-
declare function ModalDialog(props: HTMLAttributes<HTMLDivElement>):
|
|
592
|
-
declare function ModalClose<T extends ElementType = typeof Button$1>({ as, ...props }: AnyElementProps<T>):
|
|
593
|
-
declare function Modal({ children, className, onClose, onOpen, place }: ModalProps):
|
|
589
|
+
declare function ModalTrigger<T extends ElementType = typeof Button$1>({ as, ...props }: AnyElementProps<T>): ReactElement;
|
|
590
|
+
declare function ModalTitle(props: DialogTitleProps): ReactElement;
|
|
591
|
+
declare function ModalDialog(props: HTMLAttributes<HTMLDivElement>): ReactElement;
|
|
592
|
+
declare function ModalClose<T extends ElementType = typeof Button$1>({ as, ...props }: AnyElementProps<T>): ReactElement;
|
|
593
|
+
declare function Modal({ children, className, onClose, onOpen, place }: ModalProps): ReactElement;
|
|
594
594
|
|
|
595
595
|
type TimeProps = HTMLAttributes<HTMLTimeElement> & Partial<{
|
|
596
596
|
dateObject: Date;
|
|
@@ -606,7 +606,7 @@ type TimeProps = HTMLAttributes<HTMLTimeElement> & Partial<{
|
|
|
606
606
|
ref?: RefObject<HTMLTimeElement | null>;
|
|
607
607
|
};
|
|
608
608
|
|
|
609
|
-
declare function Time({ children, dateObject, dateTime, day, hours, milliseconds, minutes, month, seconds, year, ref, ...props }: TimeProps):
|
|
609
|
+
declare function Time({ children, dateObject, dateTime, day, hours, milliseconds, minutes, month, seconds, year, ref, ...props }: TimeProps): ReactElement;
|
|
610
610
|
|
|
611
611
|
type TooltipProps = {
|
|
612
612
|
anchor?: Placement;
|
|
@@ -628,9 +628,9 @@ type TooltipTriggerProps<T extends ElementType = 'button'> = AnyElementProps<T>
|
|
|
628
628
|
};
|
|
629
629
|
type TooltipPanelProps<T extends ElementType = 'div'> = AnyElementProps<T>;
|
|
630
630
|
|
|
631
|
-
declare function TooltipTrigger<T extends ElementType = typeof Button$1>({ as, asChild, children, ...props }: TooltipTriggerProps<T>):
|
|
632
|
-
declare function TooltipPanel<T extends ElementType = 'div'>({ as, children, className, style, ...props }: TooltipPanelProps<T>):
|
|
633
|
-
declare function Tooltip({ anchor, arrow, arrowClassName, children, delay, offset, onClose, onOpen, portal, }: TooltipProps):
|
|
631
|
+
declare function TooltipTrigger<T extends ElementType = typeof Button$1>({ as, asChild, children, ...props }: TooltipTriggerProps<T>): ReactElement;
|
|
632
|
+
declare function TooltipPanel<T extends ElementType = 'div'>({ as, children, className, style, ...props }: TooltipPanelProps<T>): ReactElement;
|
|
633
|
+
declare function Tooltip({ anchor, arrow, arrowClassName, children, delay, offset, onClose, onOpen, portal, }: TooltipProps): ReactElement;
|
|
634
634
|
|
|
635
635
|
type VideoControl = 'download' | 'fullscreen' | 'playbackrate' | 'pause' | 'remoteplayback' | 'seeking' | 'volume';
|
|
636
636
|
type Source = {
|
|
@@ -659,7 +659,7 @@ type VideoProps = Omit<ComponentPropsWithRef<'video'>, 'controls' | 'controlList
|
|
|
659
659
|
title: string;
|
|
660
660
|
};
|
|
661
661
|
|
|
662
|
-
declare function Video({ autoPlay, className, controls, poster, ref, srcSet, title, ...props }: VideoProps):
|
|
662
|
+
declare function Video({ autoPlay, className, controls, poster, ref, srcSet, title, ...props }: VideoProps): ReactElement;
|
|
663
663
|
|
|
664
664
|
export { Anchor, Button, Details, DetailsBody, DetailsSummary, DropDown, DropDownButton, DropDownItem, DropDownItems, DropDownSection, DropDownSeparator, Fieldset, Form, Ghost, Heading, IFrame, Input, Link, Modal, ModalClose, ModalDialog, ModalTitle, ModalTrigger, SubmitButton, Textarea, Time, Tooltip, TooltipPanel, TooltipTrigger, Video, createButton, createLink };
|
|
665
|
-
export type { AnchorProps, ButtonBorderRadius, ButtonPadding, ButtonProps, DetailsBodyProps, DetailsProps, DetailsSummaryProps, DropDownButtonProps, DropDownItemProps, DropDownItemsProps, DropDownProps, DropDownSectionProps, DropDownSeparatorProps, ExtendedButtonConfig, ExtendedButtonProps, ExtendedLinkConfig, ExtendedLinkProps, FieldsetProps, FormProps, FormSubmitArgs, HeadingProps, IFrameAllowAttribute, IFrameProps, IFrameReferrerPolicyAttribute, IFrameSandboxAttribute, InputProps, LinkProps, ModalProps, SubmitButtonProps, TextareaProps, TooltipPanelProps, TooltipProps, TooltipTriggerProps, VideoControl, VideoProps };
|
|
665
|
+
export type { AnchorProps, ButtonBorderRadius, ButtonPadding, ButtonProps, DetailsBodyProps, DetailsProps, DetailsSummaryProps, DropDownButtonProps, DropDownItemProps, DropDownItemsProps, DropDownProps, DropDownSectionProps, DropDownSeparatorProps, ExtendedButtonConfig, ExtendedButtonProps, ExtendedLinkConfig, ExtendedLinkProps, FieldsetProps, FormProps, FormSubmitArgs, GhostProps, HeadingProps, IFrameAllowAttribute, IFrameProps, IFrameReferrerPolicyAttribute, IFrameSandboxAttribute, InputProps, LinkProps, ModalProps, SubmitButtonProps, TextareaProps, TooltipPanelProps, TooltipProps, TooltipTriggerProps, VideoControl, VideoProps };
|