mado-ui 0.4.0 → 0.5.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/css/index.css +563 -0
- package/dist/components/drop-down.d.ts +5 -4
- package/dist/components/iframe.d.ts +5 -5
- package/dist/components/index.d.ts +2 -0
- package/dist/components/video.d.ts +30 -0
- package/dist/components.esm.js +426 -8
- package/dist/components.esm.js.map +1 -1
- package/dist/components.js +427 -7
- package/dist/components.js.map +1 -1
- package/dist/hooks/create-fast-context.d.ts +1 -1
- package/dist/hooks/index.d.ts +1 -2
- package/dist/hooks.esm.js.map +1 -1
- package/dist/hooks.js.map +1 -1
- package/dist/icons/10-arrow-trianglehead-clockwise.d.ts +2 -0
- package/dist/icons/10-arrow-trianglehead-counterclockwise.d.ts +2 -0
- package/dist/icons/15-arrow-trianglehead-clockwise.d.ts +2 -0
- package/dist/icons/15-arrow-trianglehead-counterclockwise.d.ts +2 -0
- package/dist/icons/3-people.d.ts +1 -1
- package/dist/icons/3-rectangles-desktop-fill.d.ts +1 -1
- package/dist/icons/3-rectangles-desktop.d.ts +1 -1
- package/dist/icons/30-arrow-trianglehead-clockwise.d.ts +2 -0
- package/dist/icons/30-arrow-trianglehead-counterclockwise.d.ts +2 -0
- package/dist/icons/45-arrow-trianglehead-clockwise.d.ts +2 -0
- package/dist/icons/45-arrow-trianglehead-counterclockwise.d.ts +2 -0
- package/dist/icons/5-arrow-trianglehead-clockwise.d.ts +2 -0
- package/dist/icons/5-arrow-trianglehead-counterclockwise.d.ts +2 -0
- package/dist/icons/60-arrow-trianglehead-clockwise.d.ts +2 -0
- package/dist/icons/60-arrow-trianglehead-counterclockwise.d.ts +2 -0
- package/dist/icons/75-arrow-trianglehead-clockwise.d.ts +2 -0
- package/dist/icons/75-arrow-trianglehead-counterclockwise.d.ts +2 -0
- package/dist/icons/90-arrow-trianglehead-clockwise.d.ts +2 -0
- package/dist/icons/90-arrow-trianglehead-counterclockwise.d.ts +2 -0
- package/dist/icons/airplane.d.ts +1 -1
- package/dist/icons/arrow-down-backward-and-arrow-up-forward-rectangle.d.ts +2 -0
- package/dist/icons/arrow-triangle-2-circlepath-circle-fill.d.ts +1 -1
- package/dist/icons/arrow-triangle-2-circlepath-circle.d.ts +1 -1
- package/dist/icons/arrow-up-forward-and-arrow-down-backward-rectangle.d.ts +2 -0
- package/dist/icons/bag-fill.d.ts +1 -1
- package/dist/icons/banknote.d.ts +1 -1
- package/dist/icons/bell-fill.d.ts +1 -1
- package/dist/icons/bolt-car.d.ts +1 -1
- package/dist/icons/bolt-fill.d.ts +1 -1
- package/dist/icons/bolt-ring-closed.d.ts +1 -1
- package/dist/icons/bolt-trianglebadge-exclamationmark.d.ts +1 -1
- package/dist/icons/book-fill.d.ts +1 -1
- package/dist/icons/bookmark-fill.d.ts +1 -1
- package/dist/icons/briefcase-fill.d.ts +1 -1
- package/dist/icons/bubble-left-fill.d.ts +1 -1
- package/dist/icons/building-2-fill.d.ts +1 -1
- package/dist/icons/calendar.d.ts +1 -1
- package/dist/icons/camera-fill.d.ts +1 -1
- package/dist/icons/car-fill.d.ts +1 -1
- package/dist/icons/cart-fill.d.ts +1 -1
- package/dist/icons/chart-bar-doc-horizontal.d.ts +1 -1
- package/dist/icons/checkmark-seal.d.ts +1 -1
- package/dist/icons/checkmark.d.ts +1 -1
- package/dist/icons/chevron-compact-down.d.ts +1 -1
- package/dist/icons/chevron-down.d.ts +1 -1
- package/dist/icons/chevron-left-forwardslash-chevron-right.d.ts +1 -1
- package/dist/icons/chevron-left.d.ts +1 -1
- package/dist/icons/chevron-right.d.ts +1 -1
- package/dist/icons/chevron-up-chevron-down.d.ts +1 -1
- package/dist/icons/circle-fill.d.ts +1 -1
- package/dist/icons/clock-badge-checkmark.d.ts +1 -1
- package/dist/icons/clock-fill.d.ts +1 -1
- package/dist/icons/cloud-fill.d.ts +1 -1
- package/dist/icons/cube-fill.d.ts +1 -1
- package/dist/icons/curve-point-left.d.ts +1 -1
- package/dist/icons/dial-high.d.ts +1 -1
- package/dist/icons/doc-fill.d.ts +1 -1
- package/dist/icons/doc-on-clipboard.d.ts +1 -1
- package/dist/icons/doc-on-doc-fill.d.ts +1 -1
- package/dist/icons/doc-on-doc.d.ts +1 -1
- package/dist/icons/doc-text-magnifyingglass.d.ts +1 -1
- package/dist/icons/dollar-sign.d.ts +1 -1
- package/dist/icons/ellipsis-circle-fill.d.ts +1 -1
- package/dist/icons/ellipsis-circle.d.ts +1 -1
- package/dist/icons/envelope-fill.d.ts +1 -1
- package/dist/icons/envelope.d.ts +1 -1
- package/dist/icons/exclamationmark-octagon.d.ts +1 -1
- package/dist/icons/eye.d.ts +1 -1
- package/dist/icons/figure-water-fitness.d.ts +1 -1
- package/dist/icons/flag-fill.d.ts +1 -1
- package/dist/icons/flame-fill.d.ts +1 -1
- package/dist/icons/folder-fill.d.ts +1 -1
- package/dist/icons/folder.d.ts +1 -1
- package/dist/icons/gearshape-fill.d.ts +1 -1
- package/dist/icons/gearshape.d.ts +1 -1
- package/dist/icons/gift-fill.d.ts +1 -1
- package/dist/icons/globe-americas-fill.d.ts +1 -1
- package/dist/icons/hare-fill.d.ts +1 -1
- package/dist/icons/house-deskclock.d.ts +1 -1
- package/dist/icons/house-fill.d.ts +1 -1
- package/dist/icons/house.d.ts +1 -1
- package/dist/icons/index.d.ts +143 -104
- package/dist/icons/iphone-house.d.ts +1 -1
- package/dist/icons/light-ribbon.d.ts +1 -1
- package/dist/icons/lightbulb-fill.d.ts +1 -1
- package/dist/icons/lightbulb-led.d.ts +1 -1
- package/dist/icons/list-bullet-clipboard-fill.d.ts +1 -1
- package/dist/icons/magnifyingglass.d.ts +1 -1
- package/dist/icons/map-pin-ellipse.d.ts +1 -1
- package/dist/icons/minus-plus-batterblock.d.ts +1 -1
- package/dist/icons/network-shield.d.ts +1 -1
- package/dist/icons/network.d.ts +1 -1
- package/dist/icons/newspaper-fill.d.ts +1 -1
- package/dist/icons/number.d.ts +1 -1
- package/dist/icons/paperplane-fill.d.ts +1 -1
- package/dist/icons/pause-fill.d.ts +2 -0
- package/dist/icons/person-crop-square.d.ts +1 -1
- package/dist/icons/person-fill-questionmark.d.ts +1 -1
- package/dist/icons/person-fill.d.ts +1 -1
- package/dist/icons/person.d.ts +1 -1
- package/dist/icons/phone-arrow-up-right.d.ts +1 -1
- package/dist/icons/phone-fill.d.ts +1 -1
- package/dist/icons/phone.d.ts +1 -1
- package/dist/icons/photo-badge-arrow-down-fill.d.ts +2 -0
- package/dist/icons/photo-badge-arrow-down.d.ts +2 -0
- package/dist/icons/play-fill.d.ts +2 -0
- package/dist/icons/play-rectangle-fill.d.ts +1 -1
- package/dist/icons/plus.d.ts +1 -1
- package/dist/icons/qrcode.d.ts +1 -1
- package/dist/icons/rectangle-fill-on-arrow-down-forward-topleading-rectangle.d.ts +2 -0
- package/dist/icons/rectangle-fill.d.ts +2 -0
- package/dist/icons/rectangle-portrait-and-arrow-left-fill.d.ts +1 -1
- package/dist/icons/rectangle-portrait-and-arrow-left.d.ts +1 -1
- package/dist/icons/rectangle-triangle-up.d.ts +2 -0
- package/dist/icons/rectangle.d.ts +2 -0
- package/dist/icons/sensor.d.ts +1 -1
- package/dist/icons/signature.d.ts +1 -1
- package/dist/icons/solar-panel.d.ts +1 -1
- package/dist/icons/speaker-fill.d.ts +2 -0
- package/dist/icons/speaker-minus-fill.d.ts +2 -0
- package/dist/icons/speaker-minus.d.ts +2 -0
- package/dist/icons/speaker-plus-fill.d.ts +2 -0
- package/dist/icons/speaker-plus.d.ts +2 -0
- package/dist/icons/speaker-slash-fill.d.ts +2 -0
- package/dist/icons/speaker-slash.d.ts +2 -0
- package/dist/icons/speaker-wave-1-fill.d.ts +2 -0
- package/dist/icons/speaker-wave-1.d.ts +2 -0
- package/dist/icons/speaker-wave-2-fill.d.ts +2 -0
- package/dist/icons/speaker-wave-2.d.ts +2 -0
- package/dist/icons/speaker-wave-3-fill.d.ts +2 -0
- package/dist/icons/speaker-wave-3.d.ts +2 -0
- package/dist/icons/speaker.d.ts +2 -0
- package/dist/icons/square-and-arrow-down-fill.d.ts +1 -1
- package/dist/icons/square-and-arrow-down.d.ts +1 -1
- package/dist/icons/square-and-arrow-up-fill.d.ts +1 -1
- package/dist/icons/square-and-arrow-up.d.ts +1 -1
- package/dist/icons/square-and-pencil-fill.d.ts +1 -1
- package/dist/icons/square-and-pencil.d.ts +1 -1
- package/dist/icons/text-bubble.d.ts +1 -1
- package/dist/icons/trash-fill.d.ts +1 -1
- package/dist/icons/trash.d.ts +1 -1
- package/dist/icons/tree.d.ts +1 -1
- package/dist/icons/umbrella-fill.d.ts +1 -1
- package/dist/icons/xmark.d.ts +1 -1
- package/dist/icons.esm.js +162 -2
- package/dist/icons.esm.js.map +1 -1
- package/dist/icons.js +203 -3
- package/dist/icons.js.map +1 -1
- package/dist/index.esm.js +426 -8
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +427 -7
- package/dist/index.js.map +1 -1
- package/package.json +95 -94
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { AnyElementProps } from '../types';
|
|
1
2
|
import { ElementType, ReactNode } from 'react';
|
|
2
3
|
export type DropDownButtonProps<TTag extends ElementType = 'button'> = Omit<MenuButtonProps<TTag>, 'as' | 'className'> & {
|
|
3
4
|
arrow?: boolean | ReactNode;
|
|
4
5
|
as?: TTag | ElementType;
|
|
5
6
|
className?: string;
|
|
6
7
|
};
|
|
7
|
-
export type DropDownItemProps = MenuItemProps
|
|
8
|
+
export type DropDownItemProps<TTag extends ElementType = 'div'> = Omit<MenuItemProps<TTag>, 'as'> & AnyElementProps<TTag>;
|
|
8
9
|
export type DropDownItemsProps = Omit<MenuItemsProps, 'className' | 'transition'> & {
|
|
9
10
|
className?: string;
|
|
10
11
|
containerClassName?: string;
|
|
@@ -19,11 +20,11 @@ export type DropDownSectionProps = MenuSectionProps & {
|
|
|
19
20
|
separatorAbove?: boolean;
|
|
20
21
|
separatorBelow?: boolean;
|
|
21
22
|
};
|
|
22
|
-
export type DropDownSeparatorProps = MenuSeparatorProps
|
|
23
|
+
export type DropDownSeparatorProps<TTag extends ElementType = 'div'> = Omit<MenuSeparatorProps<TTag>, 'as'> & AnyElementProps<TTag>;
|
|
23
24
|
import { MenuButtonProps, MenuHeadingProps, MenuItemProps, MenuItemsProps, MenuProps, MenuSectionProps, MenuSeparatorProps } from '@headlessui/react';
|
|
24
25
|
export declare function DropDownButton<TTag extends ElementType = 'button'>({ arrow, as, children, className, ...props }: DropDownButtonProps<TTag>): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export declare function DropDownItem({ as, ...props }: DropDownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare function DropDownItem<TTag extends ElementType = 'div'>({ as, ...props }: DropDownItemProps<TTag>): import("react/jsx-runtime").JSX.Element;
|
|
26
27
|
export declare function DropDownItems({ anchor, children, className, containerClassName, style, ...props }: DropDownItemsProps): import("react/jsx-runtime").JSX.Element;
|
|
27
28
|
export declare function DropDownSection({ children, label, labelProps, separatorAbove, separatorBelow, ...props }: DropDownSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export declare function DropDownSeparator({ className, ...props }: DropDownSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare function DropDownSeparator<TTag extends ElementType = 'div'>({ as, className, ...props }: DropDownSeparatorProps<TTag>): import("react/jsx-runtime").JSX.Element;
|
|
29
30
|
export declare function DropDown(props: DropDownProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { ComponentPropsWithRef } from 'react';
|
|
2
|
+
export 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';
|
|
2
3
|
export type IFrameReferrerPolicyAttribute = 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url';
|
|
3
|
-
export type IFrameSandboxAttribute = 'allow-downloads' | 'allow-forms' | 'allow-modals' | 'allow-orientation-lock' | 'allow-pointer-lock' | 'allow-popups' | 'allow-popups-to-escape-sandbox' | 'allow-presentation' | 'allow-same-origin' | 'allow-scripts' | 'allow-top-navigation' | 'allow-top-navigation-by-user-activation' | 'allow-top-navigation-to-custom-protocols';
|
|
4
|
+
export type IFrameSandboxAttribute = 'allow-downloads' | 'allow-forms' | 'allow-modals' | 'allow-orientation-lock' | 'allow-pointer-lock' | 'allow-popups' | 'allow-popups-to-escape-sandbox' | 'allow-presentation' | 'allow-same-origin' | 'allow-scripts' | 'allow-storage-access-by-user-activation' | 'allow-top-navigation' | 'allow-top-navigation-by-user-activation' | 'allow-top-navigation-to-custom-protocols';
|
|
4
5
|
export type IFrameProps = Omit<ComponentPropsWithRef<'iframe'>, 'allow' | 'children' | 'referrerPolicy' | 'sandbox' | 'title'> & {
|
|
5
|
-
allow?: IFrameAllowAttribute | IFrameAllowAttribute[] | 'allow-all';
|
|
6
|
+
allow?: (IFrameAllowAttribute | Record<IFrameAllowAttribute, string[] | boolean>)[] | 'allow-all';
|
|
6
7
|
referrerPolicy?: IFrameReferrerPolicyAttribute;
|
|
7
|
-
sandbox?: IFrameSandboxAttribute
|
|
8
|
+
sandbox?: IFrameSandboxAttribute[];
|
|
8
9
|
title: string;
|
|
9
10
|
};
|
|
10
|
-
import { ComponentPropsWithRef } from 'react';
|
|
11
11
|
/**
|
|
12
12
|
* # iFrame
|
|
13
13
|
* - An `<iframe/>` with preset classes, backup, and required title for SEO.
|
|
@@ -4,7 +4,9 @@ export * from './drop-down';
|
|
|
4
4
|
export * from './form';
|
|
5
5
|
export * from './ghost';
|
|
6
6
|
export * from './heading';
|
|
7
|
+
export * from './iframe';
|
|
7
8
|
export * from './link';
|
|
8
9
|
export * from './modal';
|
|
9
10
|
export * from './time';
|
|
10
11
|
export * from './tooltip';
|
|
12
|
+
export * from './video';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { OneOf } from '../types';
|
|
2
|
+
export type VideoControl = 'download' | 'fullscreen' | 'playbackrate' | 'pause' | 'remoteplayback' | 'seeking' | 'volume';
|
|
3
|
+
type Source = {
|
|
4
|
+
src: string;
|
|
5
|
+
type: 'video/avi' | 'video/flv' | 'video/mkv' | 'video/mov' | 'video/mp4' | 'video/ogg' | 'video/webm';
|
|
6
|
+
};
|
|
7
|
+
type SourceOrSourceGroup = OneOf<[
|
|
8
|
+
Source,
|
|
9
|
+
{
|
|
10
|
+
srcGroup: Source[];
|
|
11
|
+
}
|
|
12
|
+
]>;
|
|
13
|
+
export type VideoProps = Omit<ComponentPropsWithRef<'video'>, 'controls' | 'controlList' | 'poster' | 'src' | 'title'> & {
|
|
14
|
+
controls?: boolean | VideoControl | VideoControl[];
|
|
15
|
+
poster?: {
|
|
16
|
+
primary?: boolean;
|
|
17
|
+
src: string;
|
|
18
|
+
type: 'image/apng' | 'image/avif' | 'image/gif' | 'image/jpeg' | 'image/png' | 'image/svg+xml' | 'image/webp';
|
|
19
|
+
width: number;
|
|
20
|
+
}[];
|
|
21
|
+
/** @deprecated Even if you only have on source file, please use srcSet. */
|
|
22
|
+
src?: never;
|
|
23
|
+
srcSet: (SourceOrSourceGroup & {
|
|
24
|
+
width: number;
|
|
25
|
+
})[];
|
|
26
|
+
title: string;
|
|
27
|
+
};
|
|
28
|
+
import { ComponentPropsWithRef } from 'react';
|
|
29
|
+
export declare function Video({ autoPlay, className, controls, poster, ref, srcSet, title, ...props }: VideoProps): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export {};
|