@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,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadClockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadCounterclockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadClockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadCounterclockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadClockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadCounterclockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadClockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadCounterclockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadClockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadCounterclockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadClockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadCounterclockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadClockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadCounterclockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadClockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowTriangleheadCounterclockwise({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowDownBackwardAndArrowUpForwardRectangle({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowDownBackwardAndArrowUpForwardRectangleFill({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowDownForwardTopleadingRectangleFill({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ArrowUpForwardAndArrowDownBackwardRectangle({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function Calendar({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function Checkmark({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ChevronDown({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ChevronForward({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ChevronUpChevronDown({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function CircleFill({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function Clock({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function ExclamationmarkOctagon({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function GearshapeFill({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function PauseFill({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function PhotoBadgeArrowDownFill({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function PlayFill({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function Plus({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function RectangleFill({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function SpeakerMinusFill({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function SpeakerPlusFill({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1,5 @@
1
+ import type { ComponentPropsWithRef } from "react";
2
+ export type SymbolWeight = "ultralight" | "thin" | "light" | "regular" | "medium" | "semibold" | "bold" | "heavy" | "black";
3
+ export type SymbolProps = Omit<ComponentPropsWithRef<"svg">, "viewBox"> & {
4
+ weight?: SymbolWeight;
5
+ };
@@ -0,0 +1,3 @@
1
+ import type { SymbolProps } from './types';
2
+ import type { JSX } from 'react';
3
+ export default function Xmark({ weight, ...props }: SymbolProps): JSX.Element;
@@ -0,0 +1 @@
1
+ export * from '../types';
@@ -0,0 +1,34 @@
1
+ import type { ComponentPropsWithRef, ElementType } from "react";
2
+ export type AnyElementProps<TTag extends ElementType, Props extends Record<PropertyKey, any> = Record<PropertyKey, any>> = AsElement<TTag> & Omit<ComponentPropsWithRef<TTag>, keyof AsElement> & Props;
3
+ export type AsElement<TTag extends ElementType = "div"> = {
4
+ /** Specify what element should be rendered */
5
+ as?: TTag;
6
+ };
7
+ export type ColorTheme = OneOf<[
8
+ {
9
+ /** Color theme. */
10
+ theme?: "amber" | "blue" | "cyan" | "emerald" | "fuchsia" | "gray" | "green" | "indigo" | "lime" | "mauve" | "mist" | "neutral" | "olive" | "orange" | "pink" | "purple" | "red" | "rose" | "sky" | "slate" | "stone" | "taupe" | "teal" | "violet" | "yellow" | "zinc";
11
+ },
12
+ {
13
+ /** Color theme. */
14
+ theme?: "custom";
15
+ customTheme: OneOf<[
16
+ {
17
+ /** Example: `'[--theme-color:var(--color-blue-500)]'` */
18
+ themeColor: string;
19
+ },
20
+ {
21
+ /** This doesn't use any preset color theme classes. */
22
+ classes: string;
23
+ }
24
+ ]>;
25
+ }
26
+ ]>;
27
+ export type MergeTypes<TypesArray extends unknown[], Result = object> = TypesArray extends [
28
+ infer Head,
29
+ ...infer Remaining
30
+ ] ? MergeTypes<Remaining, Result & Head> : Result;
31
+ export type OneOf<TypesArray extends unknown[], Result = never, AllProps = MergeTypes<TypesArray>> = TypesArray extends [infer Head, ...infer Remaining] ? OneOf<Remaining, Result | OnlyFirst<Head, AllProps>, AllProps> : Result;
32
+ export type OnlyFirst<F, L> = F & {
33
+ [Key in keyof Omit<L, keyof F>]?: never;
34
+ };
@@ -0,0 +1,29 @@
1
+ /**
2
+ * ### Has Class
3
+ * - Returns a boolean based on whether the specified element has the specified class
4
+ * @param {HTMLElement} element Any HTML Element
5
+ * @param {string} className A string of any class to check for
6
+ * @returns {boolean} true if the specified element has the specified class, else false
7
+ */
8
+ export declare function hasClass(element: HTMLElement, className: string): boolean;
9
+ /**
10
+ * ### Add Class
11
+ * - Adds the specified classes to the specified elements
12
+ * @param {Element|HTMLElement|HTMLElement[]|NodeList|string|undefined} elements An HTML Element, an array of HTML Elements, a Node List, a string (as a selector for a querySelector)
13
+ * @param {string|string[]} classList A string or an array of classes to add to each element
14
+ */
15
+ export declare function addClass(elements: Element | HTMLElement | HTMLElement[] | NodeList | string, classList: string | string[]): void;
16
+ /**
17
+ * ### Remove Class
18
+ * - Removes the specified classes from the specified elements
19
+ * @param {HTMLElement|HTMLElement[]|NodeList|string|undefined} elements An HTML Element, an array of HTML Elements, a Node List, a string (as a selector for a querySelector)
20
+ * @param {string|string[]} classList A string or an array of classes to remove from each element
21
+ */
22
+ export declare function removeClass(elements: HTMLElement | HTMLElement[] | NodeList | string, classList: string | string[]): void;
23
+ /**
24
+ * ### Toggle Class
25
+ * - Toggles the specified classes on the specified elements
26
+ * @param {HTMLElement|HTMLElement[]|NodeList|string|undefined} elements An HTML Element, an array of HTML Elements, a Node List, a string (as a selector for a querySelector)
27
+ * @param {string|string[]} classList A string or an array of classes to toggle on each element
28
+ */
29
+ export declare function toggleClass(elements: HTMLElement | HTMLElement[] | NodeList | string, classList: string | string[]): void;
@@ -0,0 +1,4 @@
1
+ import { type ClassNameValue, type ConfigExtension, type DefaultClassGroupIds, type DefaultThemeGroupIds } from "tailwind-merge";
2
+ export type AdditionalmadoClassGroupIds = "animation-direction" | "animation-fill" | "animation-iteration" | "animation-state";
3
+ export declare const twMerge: (...classLists: ClassNameValue[]) => string;
4
+ export declare function extendMadoTailwindMerge<AdditionalClassGroupIds extends string = AdditionalmadoClassGroupIds, AdditionalThemeGroupIds extends string = never>(configExtension: ConfigExtension<DefaultClassGroupIds | AdditionalClassGroupIds, DefaultThemeGroupIds | AdditionalThemeGroupIds>): (...classLists: ClassNameValue[]) => string;
@@ -0,0 +1,170 @@
1
+ export type DayNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31;
2
+ export type DateTimeObject = {
3
+ day: DayNumber;
4
+ hour: HourNumber;
5
+ minute: MinuteNumber;
6
+ month: MonthNumber | MonthName;
7
+ second: SecondNumber;
8
+ year: number;
9
+ };
10
+ export type HourNumber = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23;
11
+ export type MinuteNumber = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59;
12
+ export type MonthName = "January" | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December";
13
+ export type MonthNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
14
+ export type SecondNumber = MinuteNumber;
15
+ export type WeekdayName = "Sunday" | "Monday" | "Tuesday" | "Wednesday" | "Thursday" | "Friday" | "Saturday";
16
+ export type WeekdayNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7;
17
+ export type WeekNumber = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53;
18
+ /** An array of the names of month in order */
19
+ export declare const monthNamesList: MonthName[];
20
+ /** An array of the names of the days of the week in order */
21
+ export declare const weekdayNamesList: WeekdayName[];
22
+ /** The name of the current month */
23
+ export declare const currentMonthName: MonthName;
24
+ /** The name of the current day of the week */
25
+ export declare const currentWeekdayName: WeekdayName;
26
+ /**
27
+ * ### Days In Month
28
+ * - Returns the number of days in the specified month.
29
+ * @param {Date} date A Date object representing the month to get the number of days for. (Preset to the current date)
30
+ * @returns {number} The number of days in the specified month.
31
+ */
32
+ export declare function daysInMonth(date?: Date): number;
33
+ /**
34
+ * ### First of Month
35
+ * - Returns the first day of the specified month.
36
+ * @param {Date} date A Date object representing the month to get the first day for. (Preset to current date)
37
+ * @returns {Date} A Date object of the given month, with the first day.
38
+ */
39
+ export declare function firstOfMonth(date?: Date): Date;
40
+ /**
41
+ * ### Get Date
42
+ * - Returns the date with two digits
43
+ * @param {number|Date} date The date to get date
44
+ * @returns {string} The date with two digits
45
+ */
46
+ export declare function getDate(date?: number | Date): string;
47
+ /**
48
+ * ### Get Hours
49
+ * - Returns the hours with two digits
50
+ * @param {number|Date} hours The date to get hours
51
+ * @returns {string} The hours with two digits
52
+ */
53
+ export declare function getHours(hours?: number | Date): string;
54
+ /**
55
+ * ### Get Hours in 12
56
+ * - Returns the hour based on the specified 24 hour value in a 12 hour format
57
+ * @param {number|Date} hour The hour to be converted to 12 hour format
58
+ * @returns {number} The hour in a 12 hour format
59
+ */
60
+ export declare function getHoursIn12(hour?: number | Date): number;
61
+ /**
62
+ * ### Get Meridian from Hour
63
+ * - Returns either 'pm' or 'am' based on the specified 24 hour value
64
+ * @param {number|Date} hour The hour to get the meridian from
65
+ * @returns {'am'|'pm'} The meridian for the given hour
66
+ */
67
+ export declare function getMeridianFromHour(hour?: number | Date): "am" | "pm";
68
+ /**
69
+ * ### Get Milliseconds
70
+ * - Returns the milliseconds with two digits
71
+ * @param {number|Date} milliseconds The date to get milliseconds
72
+ * @returns {string} The milliseconds with two digits
73
+ */
74
+ export declare function getMilliseconds(milliseconds?: number | Date): string;
75
+ /**
76
+ * ### Get Minutes
77
+ * - Returns the minutes with two digits
78
+ * @param {number|Date} minutes The date to get minutes
79
+ * @returns {string} The minutes with two digits
80
+ */
81
+ export declare function getMinutes(minutes?: number | Date): string;
82
+ /**
83
+ * ### Get Month
84
+ * - Returns the month with two digits
85
+ * @param {number|Date} month The date to get month
86
+ * @returns {string} The month with two digits
87
+ */
88
+ export declare function getMonth(month?: number | Date): string;
89
+ export declare function getMonthIndexFromName(name: MonthName): number;
90
+ /**
91
+ * ### Get Month Name
92
+ * - Returns the name of the specified month
93
+ * @param {Date} date A Date object representing the month to get the name of the month from. (Preset to the current date)
94
+ * @returns {MonthName} The name of the specified month
95
+ */
96
+ export declare function getMonthName(date?: number | Date): MonthName;
97
+ /**
98
+ * ### Get Next Month
99
+ * - Returns the number of the following month from the specified month
100
+ * @param {Date} date The Date object representing the month to get the following month from (Preset to current date)
101
+ * @returns {number} The indexed month of the following month
102
+ */
103
+ export declare function getNextMonth(date?: Date): number;
104
+ /**
105
+ * ### Get Previous Month
106
+ * - Returns the number of the previous month from the specified month
107
+ * @param {Date} date The Date object representing the month to get the previous month from (Preset to current date)
108
+ * @returns {number} The indexed month of the previous month
109
+ */
110
+ export declare function getPreviousMonth(date?: Date): number;
111
+ /**
112
+ * ### Get Seconds
113
+ * - Returns the seconds with two digits
114
+ * @param {number|Date} seconds The date to get seconds
115
+ * @returns {string} The seconds with two digits
116
+ */
117
+ export declare function getSeconds(seconds?: number | Date): string;
118
+ /**
119
+ * ### Get User Readable Date
120
+ * - Returns a string of the current date in a user-friendly way
121
+ * - Includes `'Yesterday'`, '`Today'`, and `'Tomorrow'`
122
+ * @param date (default: `new Date()`)
123
+ * @returns {'Today'|'Tomorrow'|'Yesterday'|string} `'weekday, month day, year'` | `'Yesterday'` | `'Today'` | `'Tomorrow'`
124
+ */
125
+ export declare function getUserReadableDate(date?: Date): "Today" | "Tomorrow" | "Yesterday" | string;
126
+ /**
127
+ * ### Get Weekday Name
128
+ * - Returns the weekday name of the specified day
129
+ * @param {number | Date} weekday A Date object or number representing the day to get the weekday name from. (Preset to the current date)
130
+ * @returns {WeekdayName} The name of the specified weekday
131
+ */
132
+ export declare function getWeekdayName(weekday?: number | Date): WeekdayName;
133
+ /**
134
+ * ### Get Years in Range
135
+ * - Returns an array of years in between the specified minimum and maximum years
136
+ * @param {number} minYear The minimum year
137
+ * @param {number} maxYear The maximum year
138
+ * @returns {number[]} Array of years
139
+ */
140
+ export declare function getYearsInRange(minYear?: number, maxYear?: number): number[];
141
+ /** Change how to display the weekday, month name, day of the month, and year. */
142
+ type ToFullDateStringOptionsProps = Partial<{
143
+ /** Inclusion of the day of the month. (default: `true`) */
144
+ day: boolean;
145
+ /** Inclusion of the month name. (default: `true`/`'full'`) */
146
+ month: boolean | "full" | "code";
147
+ /** Inclusion of the day of the week. (default: `true`/`'full'`) */
148
+ weekday: boolean | "full" | "code";
149
+ /** Inclusion of the year. (default: `true`) */
150
+ year: boolean | "full" | "code";
151
+ }>;
152
+ /**
153
+ * ### To Full Date String
154
+ * - Returns a formatted string to display the date
155
+ * @param {Date} date (default: `new Date()`)
156
+ * @param {ToFullDateStringOptionsProps} options Change how to display the weekday, month name, day of the month, and year.
157
+ * @returns {string} '`weekday`, `month` `day`, `year`'
158
+ */
159
+ export declare function toFullDateString(date?: Date, options?: ToFullDateStringOptionsProps): string;
160
+ /**
161
+ * ### Get User Readable Date From Timestampz
162
+ * - Returns a string of the current date in a user-friendly way
163
+ * - Includes `'Yesterday'`, '`Today'`, and `'Tomorrow'`
164
+ * @param string
165
+ * @returns {'Today'|'Tomorrow'|'Yesterday'|string} `'weekday, month day, year'` | `'Yesterday'` | `'Today'` | `'Tomorrow'`
166
+ */
167
+ export declare function getUserReadableDateFromTimestampz(timestampz: string): "Today" | "Tomorrow" | "Yesterday" | string;
168
+ export declare function getLocalTime(time: string | [number, number]): string;
169
+ export declare function getTimezone(): string;
170
+ export {};
@@ -0,0 +1,6 @@
1
+ export * from './class-management';
2
+ export * from './custom-tailwind-merge';
3
+ export * from './get-date';
4
+ export * from './math';
5
+ export * from './regex';
6
+ export * from './string-manipulation';
@@ -0,0 +1 @@
1
+ export declare function easeOutExpo(time: number, start: number, end: number, duration: number): number;
@@ -0,0 +1,12 @@
1
+ export declare const emailRegex: RegExp;
2
+ /**
3
+ * # Is Email
4
+ * Checks whether the specified string is in email format
5
+ */
6
+ export declare function isEmail(email: string): boolean;
7
+ export declare const telRegex: RegExp;
8
+ /**
9
+ * # Is Phone Number
10
+ * Checks whether the specified string is in phone number format
11
+ */
12
+ export declare function isPhoneNumber(tel: string): boolean;
@@ -0,0 +1,74 @@
1
+ /**
2
+ * # Format Phone Number
3
+ * Converts any string containing at least 10 numbers to a formatted phone number
4
+ * @param {string} phoneNumber
5
+ * @param options
6
+ * @property {string} `countryCode`
7
+ * @property {'continuous' | 'dot' | 'hyphenated' | 'none' | 'space' | 'standard'} `format`
8
+ *
9
+ * Input: a555b555c5555d
10
+ *
11
+ * @example
12
+ * format: 'continuous'
13
+ * countryCode: '1'
14
+ * returns: +1 5555555555
15
+ *
16
+ * @example
17
+ * format: 'dot'
18
+ * returns: 555.555.5555
19
+ *
20
+ * @example
21
+ * format: 'hyphenated'
22
+ * returns: 555-555-5555
23
+ *
24
+ * @example
25
+ * format: 'none'
26
+ * countryCode: '1'
27
+ * returns: +1 a555b555c5555d
28
+ *
29
+ * @example
30
+ * format: 'space'
31
+ * returns: 555 555 5555
32
+ *
33
+ * @example
34
+ * format: 'standard' (default)
35
+ * returns: (555) 555-5555
36
+ *
37
+ * @returns {string} string formatted
38
+ */
39
+ export declare function formatPhoneNumber(phoneNumber: string, options?: Partial<{
40
+ countryCode: string;
41
+ format: "continuous" | "dot" | "hyphenated" | "none" | "space" | "standard";
42
+ }>): string;
43
+ /**
44
+ * ### Split Camel Case
45
+ * - Separates a camel case string with a joiner (default: ' ')
46
+ * @param {string} string
47
+ * @returns {string} string
48
+ */
49
+ export declare function splitCamelCase(string: string, joiner?: string): string;
50
+ /**
51
+ * ### To Camel Case
52
+ * - Converts any string to camel case based on spaces
53
+ * - Eliminates no letter-number characters
54
+ * @param {string} string
55
+ * @returns {string} string
56
+ */
57
+ export declare function toCamelCase(string: string, delimiter?: string): string;
58
+ /**
59
+ * # To Lower Case
60
+ * Converts a string to lowercase, and offers easy string replacements for creating snake case, kebab case, or your own.
61
+ * @param str - The string to convert to lowercase.
62
+ * @param options - Configuration options.
63
+ * @param options[0] - The delimiter to split the string. Defaults to space.
64
+ * @param options[1] - The string to join the parts back together. Defaults to space.
65
+ * @returns The lowercase version of the input string, with the replacements, if provided.
66
+ */
67
+ export declare function toLowerCase(str: string, [delimiter, joiner]: [string | undefined, string | undefined]): string;
68
+ /**
69
+ * ### To Title Case
70
+ * - Converts any string to title case based on spaces
71
+ * @param {string} string
72
+ * @returns {string} string
73
+ */
74
+ export declare function toTitleCase(string: string, delimiter?: string): string;
package/package.json ADDED
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "@andrilla/mado-ui",
3
+ "version": "1.0.0",
4
+ "description": "窓 UI is a collection of opinionated React 19 components built on Tailwind CSS 4.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.cjs",
8
+ "module": "./dist/mado-ui.esm.js",
9
+ "typings": "./dist/index.d.ts",
10
+ "files": [
11
+ "README.md",
12
+ "dist"
13
+ ],
14
+ "exports": {
15
+ ".": {
16
+ "import": "./dist/mado-ui.esm.js",
17
+ "require": "./dist/index.cjs",
18
+ "types": "./dist/index.d.ts"
19
+ },
20
+ "./client": {
21
+ "import": "./dist/client.esm.js",
22
+ "require": "./dist/client.cjs",
23
+ "types": "./dist/index.d.ts"
24
+ },
25
+ "./css": "./dist/css/index.css"
26
+ },
27
+ "engines": {
28
+ "node": ">=22"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://gitlab.com/andrilla-llc/mado-ui.git",
33
+ "directory": ""
34
+ },
35
+ "scripts": {
36
+ "bundle": "./scripts/bundle.sh",
37
+ "bundle:css": "postcss src/css/index.css -o dist/css/index.css",
38
+ "bundle:rm": "rm -rf dist",
39
+ "bundle:rolldown": "rolldown -c",
40
+ "bundle:tsc": "tsc --emitDeclarationOnly",
41
+ "publish": "./scripts/publish.sh"
42
+ },
43
+ "dependencies": {
44
+ "@floating-ui/react-dom": "^2.1.7",
45
+ "animejs": "^4.3.6"
46
+ },
47
+ "devDependencies": {
48
+ "@tailwindcss/postcss": "^4.2.0",
49
+ "@types/react": "^19.2.14",
50
+ "@types/react-dom": "^19.2.3",
51
+ "postcss": "^8.5.6",
52
+ "postcss-cli": "^11.0.1",
53
+ "rolldown": "^1.0.0-rc.5",
54
+ "typescript": "^5.9.3"
55
+ },
56
+ "peerDependencies": {
57
+ "@headlessui/react": "^2",
58
+ "react": "^19 || ^19.0.0-rc",
59
+ "react-dom": "^19 || ^19.0.0-rc",
60
+ "tailwind-merge": "^3",
61
+ "tailwindcss": "^4"
62
+ },
63
+ "publishConfig": {
64
+ "access": "public"
65
+ }
66
+ }