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.
Files changed (166) hide show
  1. package/css/index.css +563 -0
  2. package/dist/components/drop-down.d.ts +5 -4
  3. package/dist/components/iframe.d.ts +5 -5
  4. package/dist/components/index.d.ts +2 -0
  5. package/dist/components/video.d.ts +30 -0
  6. package/dist/components.esm.js +426 -8
  7. package/dist/components.esm.js.map +1 -1
  8. package/dist/components.js +427 -7
  9. package/dist/components.js.map +1 -1
  10. package/dist/hooks/create-fast-context.d.ts +1 -1
  11. package/dist/hooks/index.d.ts +1 -2
  12. package/dist/hooks.esm.js.map +1 -1
  13. package/dist/hooks.js.map +1 -1
  14. package/dist/icons/10-arrow-trianglehead-clockwise.d.ts +2 -0
  15. package/dist/icons/10-arrow-trianglehead-counterclockwise.d.ts +2 -0
  16. package/dist/icons/15-arrow-trianglehead-clockwise.d.ts +2 -0
  17. package/dist/icons/15-arrow-trianglehead-counterclockwise.d.ts +2 -0
  18. package/dist/icons/3-people.d.ts +1 -1
  19. package/dist/icons/3-rectangles-desktop-fill.d.ts +1 -1
  20. package/dist/icons/3-rectangles-desktop.d.ts +1 -1
  21. package/dist/icons/30-arrow-trianglehead-clockwise.d.ts +2 -0
  22. package/dist/icons/30-arrow-trianglehead-counterclockwise.d.ts +2 -0
  23. package/dist/icons/45-arrow-trianglehead-clockwise.d.ts +2 -0
  24. package/dist/icons/45-arrow-trianglehead-counterclockwise.d.ts +2 -0
  25. package/dist/icons/5-arrow-trianglehead-clockwise.d.ts +2 -0
  26. package/dist/icons/5-arrow-trianglehead-counterclockwise.d.ts +2 -0
  27. package/dist/icons/60-arrow-trianglehead-clockwise.d.ts +2 -0
  28. package/dist/icons/60-arrow-trianglehead-counterclockwise.d.ts +2 -0
  29. package/dist/icons/75-arrow-trianglehead-clockwise.d.ts +2 -0
  30. package/dist/icons/75-arrow-trianglehead-counterclockwise.d.ts +2 -0
  31. package/dist/icons/90-arrow-trianglehead-clockwise.d.ts +2 -0
  32. package/dist/icons/90-arrow-trianglehead-counterclockwise.d.ts +2 -0
  33. package/dist/icons/airplane.d.ts +1 -1
  34. package/dist/icons/arrow-down-backward-and-arrow-up-forward-rectangle.d.ts +2 -0
  35. package/dist/icons/arrow-triangle-2-circlepath-circle-fill.d.ts +1 -1
  36. package/dist/icons/arrow-triangle-2-circlepath-circle.d.ts +1 -1
  37. package/dist/icons/arrow-up-forward-and-arrow-down-backward-rectangle.d.ts +2 -0
  38. package/dist/icons/bag-fill.d.ts +1 -1
  39. package/dist/icons/banknote.d.ts +1 -1
  40. package/dist/icons/bell-fill.d.ts +1 -1
  41. package/dist/icons/bolt-car.d.ts +1 -1
  42. package/dist/icons/bolt-fill.d.ts +1 -1
  43. package/dist/icons/bolt-ring-closed.d.ts +1 -1
  44. package/dist/icons/bolt-trianglebadge-exclamationmark.d.ts +1 -1
  45. package/dist/icons/book-fill.d.ts +1 -1
  46. package/dist/icons/bookmark-fill.d.ts +1 -1
  47. package/dist/icons/briefcase-fill.d.ts +1 -1
  48. package/dist/icons/bubble-left-fill.d.ts +1 -1
  49. package/dist/icons/building-2-fill.d.ts +1 -1
  50. package/dist/icons/calendar.d.ts +1 -1
  51. package/dist/icons/camera-fill.d.ts +1 -1
  52. package/dist/icons/car-fill.d.ts +1 -1
  53. package/dist/icons/cart-fill.d.ts +1 -1
  54. package/dist/icons/chart-bar-doc-horizontal.d.ts +1 -1
  55. package/dist/icons/checkmark-seal.d.ts +1 -1
  56. package/dist/icons/checkmark.d.ts +1 -1
  57. package/dist/icons/chevron-compact-down.d.ts +1 -1
  58. package/dist/icons/chevron-down.d.ts +1 -1
  59. package/dist/icons/chevron-left-forwardslash-chevron-right.d.ts +1 -1
  60. package/dist/icons/chevron-left.d.ts +1 -1
  61. package/dist/icons/chevron-right.d.ts +1 -1
  62. package/dist/icons/chevron-up-chevron-down.d.ts +1 -1
  63. package/dist/icons/circle-fill.d.ts +1 -1
  64. package/dist/icons/clock-badge-checkmark.d.ts +1 -1
  65. package/dist/icons/clock-fill.d.ts +1 -1
  66. package/dist/icons/cloud-fill.d.ts +1 -1
  67. package/dist/icons/cube-fill.d.ts +1 -1
  68. package/dist/icons/curve-point-left.d.ts +1 -1
  69. package/dist/icons/dial-high.d.ts +1 -1
  70. package/dist/icons/doc-fill.d.ts +1 -1
  71. package/dist/icons/doc-on-clipboard.d.ts +1 -1
  72. package/dist/icons/doc-on-doc-fill.d.ts +1 -1
  73. package/dist/icons/doc-on-doc.d.ts +1 -1
  74. package/dist/icons/doc-text-magnifyingglass.d.ts +1 -1
  75. package/dist/icons/dollar-sign.d.ts +1 -1
  76. package/dist/icons/ellipsis-circle-fill.d.ts +1 -1
  77. package/dist/icons/ellipsis-circle.d.ts +1 -1
  78. package/dist/icons/envelope-fill.d.ts +1 -1
  79. package/dist/icons/envelope.d.ts +1 -1
  80. package/dist/icons/exclamationmark-octagon.d.ts +1 -1
  81. package/dist/icons/eye.d.ts +1 -1
  82. package/dist/icons/figure-water-fitness.d.ts +1 -1
  83. package/dist/icons/flag-fill.d.ts +1 -1
  84. package/dist/icons/flame-fill.d.ts +1 -1
  85. package/dist/icons/folder-fill.d.ts +1 -1
  86. package/dist/icons/folder.d.ts +1 -1
  87. package/dist/icons/gearshape-fill.d.ts +1 -1
  88. package/dist/icons/gearshape.d.ts +1 -1
  89. package/dist/icons/gift-fill.d.ts +1 -1
  90. package/dist/icons/globe-americas-fill.d.ts +1 -1
  91. package/dist/icons/hare-fill.d.ts +1 -1
  92. package/dist/icons/house-deskclock.d.ts +1 -1
  93. package/dist/icons/house-fill.d.ts +1 -1
  94. package/dist/icons/house.d.ts +1 -1
  95. package/dist/icons/index.d.ts +143 -104
  96. package/dist/icons/iphone-house.d.ts +1 -1
  97. package/dist/icons/light-ribbon.d.ts +1 -1
  98. package/dist/icons/lightbulb-fill.d.ts +1 -1
  99. package/dist/icons/lightbulb-led.d.ts +1 -1
  100. package/dist/icons/list-bullet-clipboard-fill.d.ts +1 -1
  101. package/dist/icons/magnifyingglass.d.ts +1 -1
  102. package/dist/icons/map-pin-ellipse.d.ts +1 -1
  103. package/dist/icons/minus-plus-batterblock.d.ts +1 -1
  104. package/dist/icons/network-shield.d.ts +1 -1
  105. package/dist/icons/network.d.ts +1 -1
  106. package/dist/icons/newspaper-fill.d.ts +1 -1
  107. package/dist/icons/number.d.ts +1 -1
  108. package/dist/icons/paperplane-fill.d.ts +1 -1
  109. package/dist/icons/pause-fill.d.ts +2 -0
  110. package/dist/icons/person-crop-square.d.ts +1 -1
  111. package/dist/icons/person-fill-questionmark.d.ts +1 -1
  112. package/dist/icons/person-fill.d.ts +1 -1
  113. package/dist/icons/person.d.ts +1 -1
  114. package/dist/icons/phone-arrow-up-right.d.ts +1 -1
  115. package/dist/icons/phone-fill.d.ts +1 -1
  116. package/dist/icons/phone.d.ts +1 -1
  117. package/dist/icons/photo-badge-arrow-down-fill.d.ts +2 -0
  118. package/dist/icons/photo-badge-arrow-down.d.ts +2 -0
  119. package/dist/icons/play-fill.d.ts +2 -0
  120. package/dist/icons/play-rectangle-fill.d.ts +1 -1
  121. package/dist/icons/plus.d.ts +1 -1
  122. package/dist/icons/qrcode.d.ts +1 -1
  123. package/dist/icons/rectangle-fill-on-arrow-down-forward-topleading-rectangle.d.ts +2 -0
  124. package/dist/icons/rectangle-fill.d.ts +2 -0
  125. package/dist/icons/rectangle-portrait-and-arrow-left-fill.d.ts +1 -1
  126. package/dist/icons/rectangle-portrait-and-arrow-left.d.ts +1 -1
  127. package/dist/icons/rectangle-triangle-up.d.ts +2 -0
  128. package/dist/icons/rectangle.d.ts +2 -0
  129. package/dist/icons/sensor.d.ts +1 -1
  130. package/dist/icons/signature.d.ts +1 -1
  131. package/dist/icons/solar-panel.d.ts +1 -1
  132. package/dist/icons/speaker-fill.d.ts +2 -0
  133. package/dist/icons/speaker-minus-fill.d.ts +2 -0
  134. package/dist/icons/speaker-minus.d.ts +2 -0
  135. package/dist/icons/speaker-plus-fill.d.ts +2 -0
  136. package/dist/icons/speaker-plus.d.ts +2 -0
  137. package/dist/icons/speaker-slash-fill.d.ts +2 -0
  138. package/dist/icons/speaker-slash.d.ts +2 -0
  139. package/dist/icons/speaker-wave-1-fill.d.ts +2 -0
  140. package/dist/icons/speaker-wave-1.d.ts +2 -0
  141. package/dist/icons/speaker-wave-2-fill.d.ts +2 -0
  142. package/dist/icons/speaker-wave-2.d.ts +2 -0
  143. package/dist/icons/speaker-wave-3-fill.d.ts +2 -0
  144. package/dist/icons/speaker-wave-3.d.ts +2 -0
  145. package/dist/icons/speaker.d.ts +2 -0
  146. package/dist/icons/square-and-arrow-down-fill.d.ts +1 -1
  147. package/dist/icons/square-and-arrow-down.d.ts +1 -1
  148. package/dist/icons/square-and-arrow-up-fill.d.ts +1 -1
  149. package/dist/icons/square-and-arrow-up.d.ts +1 -1
  150. package/dist/icons/square-and-pencil-fill.d.ts +1 -1
  151. package/dist/icons/square-and-pencil.d.ts +1 -1
  152. package/dist/icons/text-bubble.d.ts +1 -1
  153. package/dist/icons/trash-fill.d.ts +1 -1
  154. package/dist/icons/trash.d.ts +1 -1
  155. package/dist/icons/tree.d.ts +1 -1
  156. package/dist/icons/umbrella-fill.d.ts +1 -1
  157. package/dist/icons/xmark.d.ts +1 -1
  158. package/dist/icons.esm.js +162 -2
  159. package/dist/icons.esm.js.map +1 -1
  160. package/dist/icons.js +203 -3
  161. package/dist/icons.js.map +1 -1
  162. package/dist/index.esm.js +426 -8
  163. package/dist/index.esm.js.map +1 -1
  164. package/dist/index.js +427 -7
  165. package/dist/index.js.map +1 -1
  166. 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
- export type IFrameAllowAttribute = 'accelerometer' | 'autoplay' | 'camera' | 'encrypted-media' | 'fullscreen' | 'gyroscope' | 'magnetometer' | 'microphone' | 'payment' | 'picture-in-picture' | 'publickey-credentials-get' | 'usb';
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 | IFrameSandboxAttribute[] | 'allow-all';
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 {};