@andrilla/mado-ui 1.0.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 (89) hide show
  1. package/README.md +196 -0
  2. package/dist/client.cjs +9163 -0
  3. package/dist/client.esm.js +9045 -0
  4. package/dist/components/button.d.ts +83 -0
  5. package/dist/components/checkbox.d.ts +22 -0
  6. package/dist/components/details.d.ts +16 -0
  7. package/dist/components/drop-down.d.ts +32 -0
  8. package/dist/components/fieldset.d.ts +18 -0
  9. package/dist/components/form.d.ts +3 -0
  10. package/dist/components/ghost.d.ts +3 -0
  11. package/dist/components/heading.d.ts +19 -0
  12. package/dist/components/human-verification.d.ts +14 -0
  13. package/dist/components/iframe.d.ts +15 -0
  14. package/dist/components/index.d.ts +18 -0
  15. package/dist/components/input.d.ts +35 -0
  16. package/dist/components/link.d.ts +116 -0
  17. package/dist/components/modal.d.ts +18 -0
  18. package/dist/components/select.d.ts +80 -0
  19. package/dist/components/submit-button.d.ts +49 -0
  20. package/dist/components/textarea.d.ts +37 -0
  21. package/dist/components/time.d.ts +32 -0
  22. package/dist/components/tooltip.d.ts +54 -0
  23. package/dist/components/video.d.ts +30 -0
  24. package/dist/css/index.css +4551 -0
  25. package/dist/graphics/index.d.ts +1 -0
  26. package/dist/graphics/social-media/facebook-logo.d.ts +32 -0
  27. package/dist/graphics/social-media/google-logo.d.ts +12 -0
  28. package/dist/graphics/social-media/index.d.ts +7 -0
  29. package/dist/graphics/social-media/instagram-logo.d.ts +12 -0
  30. package/dist/graphics/social-media/linkedin-logo.d.ts +25 -0
  31. package/dist/graphics/social-media/tiktok-logo.d.ts +25 -0
  32. package/dist/graphics/social-media/x-logo.d.ts +5 -0
  33. package/dist/graphics/social-media/youtube-logo.d.ts +25 -0
  34. package/dist/hooks/create-fast-context.d.ts +10 -0
  35. package/dist/hooks/index.d.ts +3 -0
  36. package/dist/hooks/use-form-status.d.ts +10 -0
  37. package/dist/hooks/use-pointer-movement.d.ts +15 -0
  38. package/dist/icons/rectangle-triangle-up.d.ts +2 -0
  39. package/dist/index.cjs +9162 -0
  40. package/dist/index.d.ts +5 -0
  41. package/dist/mado-ui.esm.js +9044 -0
  42. package/dist/symbols/10.arrow.trianglehead.clockwise.d.ts +3 -0
  43. package/dist/symbols/10.arrow.trianglehead.counterclockwise.d.ts +3 -0
  44. package/dist/symbols/15.arrow.trianglehead.clockwise.d.ts +3 -0
  45. package/dist/symbols/15.arrow.trianglehead.counterclockwise.d.ts +3 -0
  46. package/dist/symbols/30.arrow.trianglehead.clockwise.d.ts +3 -0
  47. package/dist/symbols/30.arrow.trianglehead.counterclockwise.d.ts +3 -0
  48. package/dist/symbols/45.arrow.trianglehead.clockwise.d.ts +3 -0
  49. package/dist/symbols/45.arrow.trianglehead.counterclockwise.d.ts +3 -0
  50. package/dist/symbols/5.arrow.trianglehead.clockwise.d.ts +3 -0
  51. package/dist/symbols/5.arrow.trianglehead.counterclockwise.d.ts +3 -0
  52. package/dist/symbols/60.arrow.trianglehead.clockwise.d.ts +3 -0
  53. package/dist/symbols/60.arrow.trianglehead.counterclockwise.d.ts +3 -0
  54. package/dist/symbols/75.arrow.trianglehead.clockwise.d.ts +3 -0
  55. package/dist/symbols/75.arrow.trianglehead.counterclockwise.d.ts +3 -0
  56. package/dist/symbols/90.arrow.trianglehead.clockwise.d.ts +3 -0
  57. package/dist/symbols/90.arrow.trianglehead.counterclockwise.d.ts +3 -0
  58. package/dist/symbols/arrow.down.backward.and.arrow.up.forward.rectangle.d.ts +3 -0
  59. package/dist/symbols/arrow.down.backward.and.arrow.up.forward.rectangle.fill.d.ts +3 -0
  60. package/dist/symbols/arrow.down.forward.topleading.rectangle.fill.d.ts +3 -0
  61. package/dist/symbols/arrow.up.forward.and.arrow.down.backward.rectangle.d.ts +3 -0
  62. package/dist/symbols/calendar.d.ts +3 -0
  63. package/dist/symbols/checkmark.d.ts +3 -0
  64. package/dist/symbols/chevron.down.d.ts +3 -0
  65. package/dist/symbols/chevron.forward.d.ts +3 -0
  66. package/dist/symbols/chevron.up.chevron.down.d.ts +3 -0
  67. package/dist/symbols/circle.fill.d.ts +3 -0
  68. package/dist/symbols/clock.d.ts +3 -0
  69. package/dist/symbols/exclamationmark.octagon.d.ts +3 -0
  70. package/dist/symbols/gearshape.fill.d.ts +3 -0
  71. package/dist/symbols/pause.fill.d.ts +3 -0
  72. package/dist/symbols/photo.badge.arrow.down.fill.d.ts +3 -0
  73. package/dist/symbols/play.fill.d.ts +3 -0
  74. package/dist/symbols/plus.d.ts +3 -0
  75. package/dist/symbols/rectangle.fill.d.ts +3 -0
  76. package/dist/symbols/speaker.minus.fill.d.ts +3 -0
  77. package/dist/symbols/speaker.plus.fill.d.ts +3 -0
  78. package/dist/symbols/types.d.ts +5 -0
  79. package/dist/symbols/xmark.d.ts +3 -0
  80. package/dist/types/index.d.ts +1 -0
  81. package/dist/types.d.ts +34 -0
  82. package/dist/utils/class-management.d.ts +29 -0
  83. package/dist/utils/custom-tailwind-merge.d.ts +4 -0
  84. package/dist/utils/get-date.d.ts +170 -0
  85. package/dist/utils/index.d.ts +6 -0
  86. package/dist/utils/math.d.ts +1 -0
  87. package/dist/utils/regex.d.ts +12 -0
  88. package/dist/utils/string-manipulation.d.ts +74 -0
  89. package/package.json +66 -0
@@ -0,0 +1,54 @@
1
+ import type { AnyElementProps } from '../types';
2
+ export type TooltipProps = {
3
+ anchor?: Placement;
4
+ arrow?: boolean;
5
+ arrowClassName?: string;
6
+ children: ReactNode | (({ openTooltip, closeTooltip, }: {
7
+ openTooltip: () => void;
8
+ closeTooltip: () => void;
9
+ }) => ReactNode);
10
+ delay?: number;
11
+ offset?: number;
12
+ onClose?: () => void;
13
+ onOpen?: () => void;
14
+ portal?: boolean;
15
+ maxWidth?: number;
16
+ };
17
+ export type TooltipTriggerProps<T extends ElementType = 'button'> = AnyElementProps<T> & {
18
+ asChild?: boolean;
19
+ };
20
+ export type TooltipPanelProps<T extends ElementType = 'div'> = AnyElementProps<T>;
21
+ import { type ElementType, type JSX, type ReactNode } from 'react';
22
+ import { type Placement } from '@floating-ui/react-dom';
23
+ import { Button as HeadlessButton } from '@headlessui/react';
24
+ /**
25
+ * ## Tooltip Trigger
26
+ *
27
+ * Hovering on this with a mouse or tapping this on a touch device displays the tooltip.
28
+ *
29
+ * @prop as - The element type to render as.
30
+ * @prop asChild - Whether to render the children as the trigger element.
31
+ */
32
+ export declare function TooltipTrigger<T extends ElementType = typeof HeadlessButton>({ as, asChild, children, onMouseEnter, onMouseLeave, onFocus, onBlur, onTouchStart, ...props }: TooltipTriggerProps<T>): JSX.Element;
33
+ /**
34
+ * ## Tooltip Panel
35
+ *
36
+ * The content displayed in the tooltip.
37
+ */
38
+ export declare function TooltipPanel<T extends ElementType = 'div'>({ as, children, className, style, onMouseEnter, onMouseLeave, onTouchStart, ...props }: TooltipPanelProps<T>): JSX.Element;
39
+ /**
40
+ * # Tooltip
41
+ *
42
+ * Display a tooltip with a custom content.
43
+ *
44
+ * @prop anchor - The position of the tooltip relative to the trigger element.
45
+ * @prop arrow - Whether to display an arrow pointing to the trigger element.
46
+ * @prop arrowClassName - Custom class name for the arrow element.
47
+ * @prop children - Must include TooltipTrigger and TooltipPanel.
48
+ * @prop delay - The delay in milliseconds before the tooltip is displayed.
49
+ * @prop offset - The offset in pixels between the tooltip and the trigger element.
50
+ * @prop onClose - Callback function when the tooltip is closed.
51
+ * @prop onOpen - Callback function when the tooltip is opened.
52
+ * @prop portal - Whether to use a portal for the tooltip.
53
+ */
54
+ export declare function Tooltip(props: TooltipProps): JSX.Element;
@@ -0,0 +1,30 @@
1
+ import type { 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 { type ComponentPropsWithRef, type ReactElement } from 'react';
29
+ export declare function Video({ autoPlay, className, controls, poster, ref, srcSet, title, ...props }: VideoProps): ReactElement;
30
+ export {};