@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.
- package/README.md +196 -0
- package/dist/client.cjs +9163 -0
- package/dist/client.esm.js +9045 -0
- package/dist/components/button.d.ts +83 -0
- package/dist/components/checkbox.d.ts +22 -0
- package/dist/components/details.d.ts +16 -0
- package/dist/components/drop-down.d.ts +32 -0
- package/dist/components/fieldset.d.ts +18 -0
- package/dist/components/form.d.ts +3 -0
- package/dist/components/ghost.d.ts +3 -0
- package/dist/components/heading.d.ts +19 -0
- package/dist/components/human-verification.d.ts +14 -0
- package/dist/components/iframe.d.ts +15 -0
- package/dist/components/index.d.ts +18 -0
- package/dist/components/input.d.ts +35 -0
- package/dist/components/link.d.ts +116 -0
- package/dist/components/modal.d.ts +18 -0
- package/dist/components/select.d.ts +80 -0
- package/dist/components/submit-button.d.ts +49 -0
- package/dist/components/textarea.d.ts +37 -0
- package/dist/components/time.d.ts +32 -0
- package/dist/components/tooltip.d.ts +54 -0
- package/dist/components/video.d.ts +30 -0
- package/dist/css/index.css +4551 -0
- package/dist/graphics/index.d.ts +1 -0
- package/dist/graphics/social-media/facebook-logo.d.ts +32 -0
- package/dist/graphics/social-media/google-logo.d.ts +12 -0
- package/dist/graphics/social-media/index.d.ts +7 -0
- package/dist/graphics/social-media/instagram-logo.d.ts +12 -0
- package/dist/graphics/social-media/linkedin-logo.d.ts +25 -0
- package/dist/graphics/social-media/tiktok-logo.d.ts +25 -0
- package/dist/graphics/social-media/x-logo.d.ts +5 -0
- package/dist/graphics/social-media/youtube-logo.d.ts +25 -0
- package/dist/hooks/create-fast-context.d.ts +10 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/use-form-status.d.ts +10 -0
- package/dist/hooks/use-pointer-movement.d.ts +15 -0
- package/dist/icons/rectangle-triangle-up.d.ts +2 -0
- package/dist/index.cjs +9162 -0
- package/dist/index.d.ts +5 -0
- package/dist/mado-ui.esm.js +9044 -0
- package/dist/symbols/10.arrow.trianglehead.clockwise.d.ts +3 -0
- package/dist/symbols/10.arrow.trianglehead.counterclockwise.d.ts +3 -0
- package/dist/symbols/15.arrow.trianglehead.clockwise.d.ts +3 -0
- package/dist/symbols/15.arrow.trianglehead.counterclockwise.d.ts +3 -0
- package/dist/symbols/30.arrow.trianglehead.clockwise.d.ts +3 -0
- package/dist/symbols/30.arrow.trianglehead.counterclockwise.d.ts +3 -0
- package/dist/symbols/45.arrow.trianglehead.clockwise.d.ts +3 -0
- package/dist/symbols/45.arrow.trianglehead.counterclockwise.d.ts +3 -0
- package/dist/symbols/5.arrow.trianglehead.clockwise.d.ts +3 -0
- package/dist/symbols/5.arrow.trianglehead.counterclockwise.d.ts +3 -0
- package/dist/symbols/60.arrow.trianglehead.clockwise.d.ts +3 -0
- package/dist/symbols/60.arrow.trianglehead.counterclockwise.d.ts +3 -0
- package/dist/symbols/75.arrow.trianglehead.clockwise.d.ts +3 -0
- package/dist/symbols/75.arrow.trianglehead.counterclockwise.d.ts +3 -0
- package/dist/symbols/90.arrow.trianglehead.clockwise.d.ts +3 -0
- package/dist/symbols/90.arrow.trianglehead.counterclockwise.d.ts +3 -0
- package/dist/symbols/arrow.down.backward.and.arrow.up.forward.rectangle.d.ts +3 -0
- package/dist/symbols/arrow.down.backward.and.arrow.up.forward.rectangle.fill.d.ts +3 -0
- package/dist/symbols/arrow.down.forward.topleading.rectangle.fill.d.ts +3 -0
- package/dist/symbols/arrow.up.forward.and.arrow.down.backward.rectangle.d.ts +3 -0
- package/dist/symbols/calendar.d.ts +3 -0
- package/dist/symbols/checkmark.d.ts +3 -0
- package/dist/symbols/chevron.down.d.ts +3 -0
- package/dist/symbols/chevron.forward.d.ts +3 -0
- package/dist/symbols/chevron.up.chevron.down.d.ts +3 -0
- package/dist/symbols/circle.fill.d.ts +3 -0
- package/dist/symbols/clock.d.ts +3 -0
- package/dist/symbols/exclamationmark.octagon.d.ts +3 -0
- package/dist/symbols/gearshape.fill.d.ts +3 -0
- package/dist/symbols/pause.fill.d.ts +3 -0
- package/dist/symbols/photo.badge.arrow.down.fill.d.ts +3 -0
- package/dist/symbols/play.fill.d.ts +3 -0
- package/dist/symbols/plus.d.ts +3 -0
- package/dist/symbols/rectangle.fill.d.ts +3 -0
- package/dist/symbols/speaker.minus.fill.d.ts +3 -0
- package/dist/symbols/speaker.plus.fill.d.ts +3 -0
- package/dist/symbols/types.d.ts +5 -0
- package/dist/symbols/xmark.d.ts +3 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types.d.ts +34 -0
- package/dist/utils/class-management.d.ts +29 -0
- package/dist/utils/custom-tailwind-merge.d.ts +4 -0
- package/dist/utils/get-date.d.ts +170 -0
- package/dist/utils/index.d.ts +6 -0
- package/dist/utils/math.d.ts +1 -0
- package/dist/utils/regex.d.ts +12 -0
- package/dist/utils/string-manipulation.d.ts +74 -0
- 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,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,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,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
|
+
};
|