@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 @@
1
+ export * from './social-media/index';
@@ -0,0 +1,32 @@
1
+ import type { ComponentPropsWithoutRef, ComponentPropsWithRef, JSX } from 'react';
2
+ export type FacebookLogoProps = Omit<ComponentPropsWithRef<'svg'>, 'viewBox'> & (({
3
+ variant?: 'circle';
4
+ } & ({
5
+ cutout: true;
6
+ targets?: Partial<{
7
+ background: Omit<ComponentPropsWithoutRef<'path'>, 'data-name'>;
8
+ }>;
9
+ } | {
10
+ cutout?: false;
11
+ targets?: Partial<{
12
+ background: Omit<ComponentPropsWithoutRef<'circle'>, 'data-name'>;
13
+ f: Omit<ComponentPropsWithoutRef<'path'>, 'data-name'>;
14
+ }>;
15
+ })) | {
16
+ variant: 'f';
17
+ cutout?: never;
18
+ targets?: never;
19
+ });
20
+ /**
21
+ * # Facebook Logo
22
+ *
23
+ * ```ts
24
+ * cutout: boolean = false
25
+ * targets: {
26
+ * background: [data-name="background"],
27
+ * f: [data-name="f"]
28
+ * }
29
+ * variant: 'circle' | 'f' = 'circle'
30
+ * ```
31
+ */
32
+ export declare function FacebookLogo({ className, cutout, targets, variant, ...props }: FacebookLogoProps): JSX.Element;
@@ -0,0 +1,12 @@
1
+ import type { ComponentPropsWithRef, JSX } from "react";
2
+ export type GoogleLogoProps = Omit<ComponentPropsWithRef<"svg">, "viewBox"> & {
3
+ gradient?: boolean;
4
+ };
5
+ /**
6
+ * # Google Logo
7
+ *
8
+ * ```ts
9
+ * gradient: boolean = true
10
+ * ```
11
+ */
12
+ export declare function GoogleLogo({ gradient, ...props }: GoogleLogoProps): JSX.Element;
@@ -0,0 +1,7 @@
1
+ export * from './facebook-logo';
2
+ export * from './google-logo';
3
+ export * from './instagram-logo';
4
+ export * from './linkedin-logo';
5
+ export * from './tiktok-logo';
6
+ export * from './x-logo';
7
+ export * from './youtube-logo';
@@ -0,0 +1,12 @@
1
+ import type { ComponentPropsWithRef, JSX } from "react";
2
+ export type InstagramLogoProps = Omit<ComponentPropsWithRef<"svg">, "viewBox"> & {
3
+ gradient?: boolean;
4
+ };
5
+ /**
6
+ * # Instagram Logo
7
+ *
8
+ * ```ts
9
+ * gradient: boolean = true
10
+ * ```
11
+ */
12
+ export declare function InstagramLogo({ gradient, ...props }: InstagramLogoProps): JSX.Element;
@@ -0,0 +1,25 @@
1
+ import type { ComponentPropsWithoutRef, ComponentPropsWithRef, JSX } from 'react';
2
+ export type LinkedInLogoProps = Omit<ComponentPropsWithRef<'svg'>, 'viewBox'> & ({
3
+ cutout: true;
4
+ targets?: Partial<{
5
+ background: ComponentPropsWithoutRef<'path'>;
6
+ }>;
7
+ } | {
8
+ cutout?: false;
9
+ targets?: Partial<{
10
+ background: Omit<ComponentPropsWithoutRef<'path'>, 'data-name' | 'd'>;
11
+ in: Omit<ComponentPropsWithoutRef<'rect'>, 'data-name' | 'height' | 'width' | 'x' | 'y'>;
12
+ }>;
13
+ });
14
+ /**
15
+ * # LinkedIn Logo
16
+ *
17
+ * ```ts
18
+ * cutout: boolean
19
+ * targets: {
20
+ * in: [data-name="in"]
21
+ * background: [data-name="background"]
22
+ * }
23
+ * ```
24
+ */
25
+ export declare function LinkedInLogo({ className, cutout, targets, ...props }: LinkedInLogoProps): JSX.Element;
@@ -0,0 +1,25 @@
1
+ import type { ComponentPropsWithoutRef, ComponentPropsWithRef, JSX } from 'react';
2
+ export type TikTokProps = Omit<ComponentPropsWithRef<'svg'>, 'viewBox'> & ({
3
+ targets?: Partial<{
4
+ bottom: Omit<ComponentPropsWithoutRef<'path'>, 'd' | 'data-name'>;
5
+ middle: Omit<ComponentPropsWithoutRef<'path'>, 'd' | 'data-name'>;
6
+ top: Omit<ComponentPropsWithoutRef<'path'>, 'd' | 'data-name'>;
7
+ }>;
8
+ variant?: 'multicolor';
9
+ } | {
10
+ targets?: never;
11
+ variant: 'solid';
12
+ });
13
+ /**
14
+ * # TikTok Logo
15
+ *
16
+ * ```ts
17
+ * variant: 'multicolor' | 'solid' = 'multicolor'
18
+ * targets: {
19
+ * bottom: [data-name="bottom"]
20
+ * middle: [data-name="middle"]
21
+ * top: [data-name="top"]
22
+ * }
23
+ * ```
24
+ */
25
+ export declare function TikTokLogo({ className, targets, variant, ...props }: TikTokProps): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { ComponentPropsWithRef, JSX } from "react";
2
+ /**
3
+ * # 𝕏 Logo
4
+ */
5
+ export declare function XLogo(props: Omit<ComponentPropsWithRef<"svg">, "viewBox">): JSX.Element;
@@ -0,0 +1,25 @@
1
+ import type { ComponentPropsWithoutRef, ComponentPropsWithRef, JSX } from 'react';
2
+ export type YouTubeLogoProps = Omit<ComponentPropsWithRef<'svg'>, 'viewBox'> & ({
3
+ cutout?: false;
4
+ targets?: Partial<{
5
+ background: ComponentPropsWithoutRef<'path'>;
6
+ play: ComponentPropsWithoutRef<'path'>;
7
+ }>;
8
+ } | {
9
+ cutout: true;
10
+ targets?: Partial<{
11
+ background: ComponentPropsWithoutRef<'path'>;
12
+ }>;
13
+ });
14
+ /**
15
+ * # YouTube Logo
16
+ *
17
+ * ```ts
18
+ * cutout: boolean = false
19
+ * targets: {
20
+ * background: [data-name="background"],
21
+ * play: [data-name="play"]
22
+ * }
23
+ * ```
24
+ */
25
+ export declare function YouTubeLogo({ className, cutout, targets, ...props }: YouTubeLogoProps): JSX.Element;
@@ -0,0 +1,10 @@
1
+ import { type HTMLAttributes, type JSX } from 'react';
2
+ export declare function createFastContext<Store>(defaultInitialState: Store): {
3
+ Provider: ({ initialValue, ...props }: Pick<HTMLAttributes<HTMLElement>, 'children'> & {
4
+ initialValue?: Store;
5
+ }) => JSX.Element;
6
+ useStore: <SelectorOutput>(selector: (store: Store) => SelectorOutput, initialValue?: Store) => [
7
+ SelectorOutput | undefined,
8
+ ((value: Store | ((prevState: Store) => Store)) => void) | undefined
9
+ ];
10
+ };
@@ -0,0 +1,3 @@
1
+ export * from './create-fast-context';
2
+ export * from './use-form-status';
3
+ export * from './use-pointer-movement';
@@ -0,0 +1,10 @@
1
+ import { type JSX, type ReactNode } from 'react';
2
+ export type FormStatus = 'error' | 'incomplete' | 'loading' | 'ready' | 'success' | 'readonly';
3
+ export declare function FormStatusProvider({ children, initialStatus, }: {
4
+ children?: ReactNode;
5
+ initialStatus?: FormStatus;
6
+ }): JSX.Element;
7
+ export declare function useFormStatus(): [
8
+ FormStatus | undefined,
9
+ (((value: FormStatus | ((prevState: FormStatus) => FormStatus)) => void) | undefined)
10
+ ];
@@ -0,0 +1,15 @@
1
+ export type Coords = {
2
+ x: number;
3
+ y: number;
4
+ };
5
+ export type Cursor = "alias" | "all-scroll" | "auto" | "cell" | "col-resize" | "context-menu" | "copy" | "crosshair" | "default" | "e-resize" | "ew-resize" | "grab" | "grabbing" | "help" | "move" | "no-drop" | "not-allowed" | "n-resize" | "ne-resize" | "nw-resize" | "ns-resize" | "nesw-resize" | "nwse-resize" | "pointer" | "progress" | "row-resize" | "s-resize" | "se-resize" | "sw-resize" | "text" | "vertical-text" | "w-resize" | "wait" | "zoom-in" | "zoom-out";
6
+ export type UsePointerMovementProps = {
7
+ activeCursor?: Cursor;
8
+ onChange?: (delta: Coords) => void;
9
+ onEnd?: (delta: Coords) => void;
10
+ };
11
+ export declare function usePointerMovement(props?: UsePointerMovementProps): {
12
+ delta: Coords;
13
+ stopTracking: () => void;
14
+ trackPointerMovement: (e: React.MouseEvent<HTMLElement> | React.PointerEvent<HTMLElement> | React.TouchEvent<HTMLElement>) => void;
15
+ };
@@ -0,0 +1,2 @@
1
+ import type { ComponentPropsWithRef, JSX } from "react";
2
+ export declare function RectangleTriangleUp(props: Omit<ComponentPropsWithRef<"svg">, "viewBox">): JSX.Element;