@1ry/basic-react-primitive-components 0.1.0 → 0.1.2

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.
@@ -1 +1 @@
1
- {"version":3,"file":"Card.js","sources":["../../src/components/Card.tsx"],"sourcesContent":["import { BoxProps, Box } from '$components/Box'\nimport styles from '$styles/Card.module.scss'\nimport React from 'react'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\nconst cardStyles = tv({\n\tbase: styles.cardBase,\n\tvariants: {\n\t\tnoBorder: {\n\t\t\ttrue: styles.noBorder,\n\t\t},\n\t},\n})\n\ntype CardProps = BoxProps & VariantProps<typeof cardStyles> & {\n}\n\nexport const Card = ({ children, className, noBorder, ...props }: CardProps) => (\n\t<Box\n\t\t{...props}\n\t\tclassName={cardStyles({\n\t\t\tnoBorder,\n\t\t\tclassName,\n\t\t})}\n\t>\n\t\t{children}\n\t</Box>\n)\n"],"names":["tv","styles","React","Box"],"mappings":";;;;;;;;;;;AAMA,MAAM,UAAU,GAAGA,mBAAE,CAAC;IACrB,IAAI,EAAEC,mBAAM,CAAC,QAAQ;AACrB,IAAA,QAAQ,EAAE;AACT,QAAA,QAAQ,EAAE;YACT,IAAI,EAAEA,mBAAM,CAAC,QAAQ;AACrB,SAAA;AACD,KAAA;AACD,CAAA,CAAC;AAKK,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa,MAC1EC,sBAAA,CAAA,aAAA,CAACC,OAAG,EAAA,EAAA,GACC,KAAK,EACT,SAAS,EAAE,UAAU,CAAC;QACrB,QAAQ;QACR,SAAS;AACT,KAAA,CAAC,EAAA,EAED,QAAQ,CACJ;;;;"}
1
+ {"version":3,"file":"Card.js","sources":["../../src/components/Card.tsx"],"sourcesContent":["import { BoxProps, Box } from '$components/Box'\nimport styles from '$styles/Card.module.scss'\nimport React from 'react'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\nconst cardStyles = tv({\n\tbase: styles.cardBase,\n\tvariants: {\n\t\tnoBorder: {\n\t\t\ttrue: styles.noBorder,\n\t\t},\n\t},\n})\n\nexport type CardProps = BoxProps & VariantProps<typeof cardStyles> & {}\n\nexport const Card = ({ children, className, noBorder, ...props }: CardProps) => (\n\t<Box\n\t\t{...props}\n\t\tclassName={cardStyles({\n\t\t\tnoBorder,\n\t\t\tclassName,\n\t\t})}\n\t>\n\t\t{children}\n\t</Box>\n)\n"],"names":["tv","styles","React","Box"],"mappings":";;;;;;;;;;;AAMA,MAAM,UAAU,GAAGA,mBAAE,CAAC;IACrB,IAAI,EAAEC,mBAAM,CAAC,QAAQ;AACrB,IAAA,QAAQ,EAAE;AACT,QAAA,QAAQ,EAAE;YACT,IAAI,EAAEA,mBAAM,CAAC,QAAQ;AACrB,SAAA;AACD,KAAA;AACD,CAAA,CAAC;AAIK,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa,MAC1EC,sBAAA,CAAA,aAAA,CAACC,OAAG,EAAA,EAAA,GACC,KAAK,EACT,SAAS,EAAE,UAAU,CAAC;QACrB,QAAQ;QACR,SAAS;AACT,KAAA,CAAC,EAAA,EAED,QAAQ,CACJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Card.mjs","sources":["../../src/components/Card.tsx"],"sourcesContent":["import { BoxProps, Box } from '$components/Box'\nimport styles from '$styles/Card.module.scss'\nimport React from 'react'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\nconst cardStyles = tv({\n\tbase: styles.cardBase,\n\tvariants: {\n\t\tnoBorder: {\n\t\t\ttrue: styles.noBorder,\n\t\t},\n\t},\n})\n\ntype CardProps = BoxProps & VariantProps<typeof cardStyles> & {\n}\n\nexport const Card = ({ children, className, noBorder, ...props }: CardProps) => (\n\t<Box\n\t\t{...props}\n\t\tclassName={cardStyles({\n\t\t\tnoBorder,\n\t\t\tclassName,\n\t\t})}\n\t>\n\t\t{children}\n\t</Box>\n)\n"],"names":[],"mappings":";;;;;AAMA,MAAM,UAAU,GAAG,EAAE,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC,QAAQ;AACrB,IAAA,QAAQ,EAAE;AACT,QAAA,QAAQ,EAAE;YACT,IAAI,EAAE,MAAM,CAAC,QAAQ;AACrB,SAAA;AACD,KAAA;AACD,CAAA,CAAC;AAKK,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa,MAC1E,KAAA,CAAA,aAAA,CAAC,GAAG,EAAA,EAAA,GACC,KAAK,EACT,SAAS,EAAE,UAAU,CAAC;QACrB,QAAQ;QACR,SAAS;AACT,KAAA,CAAC,EAAA,EAED,QAAQ,CACJ;;;;"}
1
+ {"version":3,"file":"Card.mjs","sources":["../../src/components/Card.tsx"],"sourcesContent":["import { BoxProps, Box } from '$components/Box'\nimport styles from '$styles/Card.module.scss'\nimport React from 'react'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\nconst cardStyles = tv({\n\tbase: styles.cardBase,\n\tvariants: {\n\t\tnoBorder: {\n\t\t\ttrue: styles.noBorder,\n\t\t},\n\t},\n})\n\nexport type CardProps = BoxProps & VariantProps<typeof cardStyles> & {}\n\nexport const Card = ({ children, className, noBorder, ...props }: CardProps) => (\n\t<Box\n\t\t{...props}\n\t\tclassName={cardStyles({\n\t\t\tnoBorder,\n\t\t\tclassName,\n\t\t})}\n\t>\n\t\t{children}\n\t</Box>\n)\n"],"names":[],"mappings":";;;;;AAMA,MAAM,UAAU,GAAG,EAAE,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC,QAAQ;AACrB,IAAA,QAAQ,EAAE;AACT,QAAA,QAAQ,EAAE;YACT,IAAI,EAAE,MAAM,CAAC,QAAQ;AACrB,SAAA;AACD,KAAA;AACD,CAAA,CAAC;AAIK,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa,MAC1E,KAAA,CAAA,aAAA,CAAC,GAAG,EAAA,EAAA,GACC,KAAK,EACT,SAAS,EAAE,UAAU,CAAC;QACrB,QAAQ;QACR,SAAS;AACT,KAAA,CAAC,EAAA,EAED,QAAQ,CACJ;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorMessage.js","sources":["../../src/components/ErrorMessage.tsx"],"sourcesContent":["import { Box, BoxProps } from '$components/Box'\nimport { Text } from '$components/Text'\nimport React from 'react'\nimport styles from '$styles/ErrorMessage.module.scss'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\nconst errorMessageStyles = tv({\n\tbase: styles.errorMessageBase,\n variants: {\n variant: {\n critical: styles.critical,\n warning: styles.warning,\n },\n },\n defaultVariants: {\n variant: 'critical',\n },\n})\n\nexport type ErrorMessageProps = BoxProps & VariantProps<typeof errorMessageStyles> & {\n\terror: Error\n}\n\nexport function ErrorMessage({ error, ...props }: ErrorMessageProps) {\n\treturn (\n\t\t<Box {...props} className={errorMessageStyles()}>\n\t\t\t<Text>{error.message}</Text>\n\t\t</Box>\n\t)\n}\n"],"names":["tv","styles","React","Box","Text"],"mappings":";;;;;;;;;;;;AAOA,MAAM,kBAAkB,GAAGA,mBAAE,CAAC;IAC7B,IAAI,EAAEC,2BAAM,CAAC,gBAAgB;AAC1B,IAAA,QAAQ,EAAE;AACN,QAAA,OAAO,EAAE;YACL,QAAQ,EAAEA,2BAAM,CAAC,QAAQ;YACzB,OAAO,EAAEA,2BAAM,CAAC,OAAO;AAC1B,SAAA;AACJ,KAAA;AACD,IAAA,eAAe,EAAE;AACb,QAAA,OAAO,EAAE,UAAU;AACtB,KAAA;AACJ,CAAA,CAAC;AAMI,SAAU,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAqB,EAAA;IAClE,QACCC,qCAACC,OAAG,EAAA,EAAA,GAAK,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAA;QAC9CD,sBAAA,CAAA,aAAA,CAACE,SAAI,QAAE,KAAK,CAAC,OAAO,CAAQ,CACvB;AAER;;;;"}
1
+ {"version":3,"file":"ErrorMessage.js","sources":["../../src/components/ErrorMessage.tsx"],"sourcesContent":["import { Box, BoxProps } from '$components/Box'\nimport { Text } from '$components/Text'\nimport React from 'react'\nimport styles from '$styles/ErrorMessage.module.scss'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\nconst errorMessageStyles = tv({\n\tbase: styles.errorMessageBase,\n\tvariants: {\n\t\tvariant: {\n\t\t\tcritical: styles.critical,\n\t\t\twarning: styles.warning,\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'critical',\n\t},\n})\n\nexport type ErrorMessageProps = BoxProps &\n\tVariantProps<typeof errorMessageStyles> & {\n\t\terror: Error\n\t}\n\nexport function ErrorMessage({ error, ...props }: ErrorMessageProps) {\n\treturn (\n\t\t<Box {...props} className={errorMessageStyles()}>\n\t\t\t<Text>{error.message}</Text>\n\t\t</Box>\n\t)\n}\n"],"names":["tv","styles","React","Box","Text"],"mappings":";;;;;;;;;;;;AAOA,MAAM,kBAAkB,GAAGA,mBAAE,CAAC;IAC7B,IAAI,EAAEC,2BAAM,CAAC,gBAAgB;AAC7B,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,QAAQ,EAAEA,2BAAM,CAAC,QAAQ;YACzB,OAAO,EAAEA,2BAAM,CAAC,OAAO;AACvB,SAAA;AACD,KAAA;AACD,IAAA,eAAe,EAAE;AAChB,QAAA,OAAO,EAAE,UAAU;AACnB,KAAA;AACD,CAAA,CAAC;AAOI,SAAU,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAqB,EAAA;IAClE,QACCC,qCAACC,OAAG,EAAA,EAAA,GAAK,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAA;QAC9CD,sBAAA,CAAA,aAAA,CAACE,SAAI,QAAE,KAAK,CAAC,OAAO,CAAQ,CACvB;AAER;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorMessage.mjs","sources":["../../src/components/ErrorMessage.tsx"],"sourcesContent":["import { Box, BoxProps } from '$components/Box'\nimport { Text } from '$components/Text'\nimport React from 'react'\nimport styles from '$styles/ErrorMessage.module.scss'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\nconst errorMessageStyles = tv({\n\tbase: styles.errorMessageBase,\n variants: {\n variant: {\n critical: styles.critical,\n warning: styles.warning,\n },\n },\n defaultVariants: {\n variant: 'critical',\n },\n})\n\nexport type ErrorMessageProps = BoxProps & VariantProps<typeof errorMessageStyles> & {\n\terror: Error\n}\n\nexport function ErrorMessage({ error, ...props }: ErrorMessageProps) {\n\treturn (\n\t\t<Box {...props} className={errorMessageStyles()}>\n\t\t\t<Text>{error.message}</Text>\n\t\t</Box>\n\t)\n}\n"],"names":[],"mappings":";;;;;;AAOA,MAAM,kBAAkB,GAAG,EAAE,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC,gBAAgB;AAC1B,IAAA,QAAQ,EAAE;AACN,QAAA,OAAO,EAAE;YACL,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,OAAO,EAAE,MAAM,CAAC,OAAO;AAC1B,SAAA;AACJ,KAAA;AACD,IAAA,eAAe,EAAE;AACb,QAAA,OAAO,EAAE,UAAU;AACtB,KAAA;AACJ,CAAA,CAAC;AAMI,SAAU,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAqB,EAAA;IAClE,QACC,oBAAC,GAAG,EAAA,EAAA,GAAK,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAA;QAC9C,KAAA,CAAA,aAAA,CAAC,IAAI,QAAE,KAAK,CAAC,OAAO,CAAQ,CACvB;AAER;;;;"}
1
+ {"version":3,"file":"ErrorMessage.mjs","sources":["../../src/components/ErrorMessage.tsx"],"sourcesContent":["import { Box, BoxProps } from '$components/Box'\nimport { Text } from '$components/Text'\nimport React from 'react'\nimport styles from '$styles/ErrorMessage.module.scss'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\nconst errorMessageStyles = tv({\n\tbase: styles.errorMessageBase,\n\tvariants: {\n\t\tvariant: {\n\t\t\tcritical: styles.critical,\n\t\t\twarning: styles.warning,\n\t\t},\n\t},\n\tdefaultVariants: {\n\t\tvariant: 'critical',\n\t},\n})\n\nexport type ErrorMessageProps = BoxProps &\n\tVariantProps<typeof errorMessageStyles> & {\n\t\terror: Error\n\t}\n\nexport function ErrorMessage({ error, ...props }: ErrorMessageProps) {\n\treturn (\n\t\t<Box {...props} className={errorMessageStyles()}>\n\t\t\t<Text>{error.message}</Text>\n\t\t</Box>\n\t)\n}\n"],"names":[],"mappings":";;;;;;AAOA,MAAM,kBAAkB,GAAG,EAAE,CAAC;IAC7B,IAAI,EAAE,MAAM,CAAC,gBAAgB;AAC7B,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE;YACR,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,OAAO,EAAE,MAAM,CAAC,OAAO;AACvB,SAAA;AACD,KAAA;AACD,IAAA,eAAe,EAAE;AAChB,QAAA,OAAO,EAAE,UAAU;AACnB,KAAA;AACD,CAAA,CAAC;AAOI,SAAU,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAqB,EAAA;IAClE,QACC,oBAAC,GAAG,EAAA,EAAA,GAAK,KAAK,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAA;QAC9C,KAAA,CAAA,aAAA,CAAC,IAAI,QAAE,KAAK,CAAC,OAAO,CAAQ,CACvB;AAER;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sources":["../../src/components/Text.tsx"],"sourcesContent":["import { FONT_MAP } from '$types/TextFont'\n\nimport styles from '$styles/Text.module.scss'\nimport React, { ComponentPropsWithoutRef, ElementType } from 'react'\nimport { twMerge } from 'tailwind-merge'\nimport { VARIANT_MAP } from '$types/TextVariant'\nimport { PADDING_MAP, PaddingSize } from '$types/Padding'\nimport { SIZE_MAP } from '$types/TextSizing'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\ntype AllowedElements = 'p' | 'span' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n\nconst textStyles = tv({\n\tbase: [styles.TextComponent],\n\tvariants: {\n\t\tvariant: VARIANT_MAP,\n\t\tpaddingBefore: PADDING_MAP,\n\t\tfont: FONT_MAP,\n\t\tsize: SIZE_MAP,\n\t},\n})\n\ntype TextProps<T extends AllowedElements> = VariantProps<typeof textStyles> & {\n\tas?: T\n\tpaddingBefore?: PaddingSize\n\t/**\n\t * if you set it to as=label\n\t */\n\thtmlFor?: string\n} & Omit<ComponentPropsWithoutRef<T>, 'as' | 'variant' | 'paddingBefore' | 'font' | 'size'>\n\nexport function Text<T extends AllowedElements = 'span'>({\n\tvariant = 'default',\n\tas = 'span',\n\tclassName,\n\tchildren,\n\tpaddingBefore = 'none',\n\tfont = 'medium',\n\tsize,\n\t...props\n}: Readonly<TextProps<T>>) {\n\tconst Component = (as || 'span') as ElementType\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={twMerge(\n\t\t\t\ttextStyles({\n\t\t\t\t\tvariant,\n\t\t\t\t\tpaddingBefore,\n\t\t\t\t\tfont,\n\t\t\t\t\tsize,\n\t\t\t\t\tclassName,\n\t\t\t\t}),\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Component>\n\t)\n}\n"],"names":["tv","styles","VARIANT_MAP","PADDING_MAP","FONT_MAP","SIZE_MAP","React","twMerge"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAM,UAAU,GAAGA,mBAAE,CAAC;AACrB,IAAA,IAAI,EAAE,CAACC,mBAAM,CAAC,aAAa,CAAC;AAC5B,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAEC,uBAAW;AACpB,QAAA,aAAa,EAAEC,mBAAW;AAC1B,QAAA,IAAI,EAAEC,iBAAQ;AACd,QAAA,IAAI,EAAEC,mBAAQ;AACd,KAAA;AACD,CAAA,CAAC;AAWI,SAAU,IAAI,CAAqC,EACxD,OAAO,GAAG,SAAS,EACnB,EAAE,GAAG,MAAM,EACX,SAAS,EACT,QAAQ,EACR,aAAa,GAAG,MAAM,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,EACJ,GAAG,KAAK,EACgB,EAAA;AACxB,IAAA,MAAM,SAAS,IAAI,EAAE,IAAI,MAAM,CAAgB;IAE/C,QACCC,qCAAC,SAAS,EAAA,EACT,SAAS,EAAEC,qBAAO,CACjB,UAAU,CAAC;YACV,OAAO;YACP,aAAa;YACb,IAAI;YACJ,IAAI;YACJ,SAAS;AACT,SAAA,CAAC,CACF,EAAA,GACG,KAAK,IAER,QAAQ,CACE;AAEd;;;;"}
1
+ {"version":3,"file":"Text.js","sources":["../../src/components/Text.tsx"],"sourcesContent":["import { FONT_MAP } from '$types/TextFont'\n\nimport styles from '$styles/Text.module.scss'\nimport React, { ComponentPropsWithoutRef, ElementType } from 'react'\nimport { twMerge } from 'tailwind-merge'\nimport { VARIANT_MAP } from '$types/TextVariant'\nimport { PADDING_MAP, PaddingSize } from '$types/Padding'\nimport { SIZE_MAP } from '$types/TextSizing'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\ntype AllowedElements = 'p' | 'span' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n\nconst textStyles = tv({\n\tbase: [styles.TextComponent],\n\tvariants: {\n\t\tvariant: VARIANT_MAP,\n\t\tpaddingBefore: PADDING_MAP,\n\t\tfont: FONT_MAP,\n\t\tsize: SIZE_MAP,\n\t},\n})\n\nexport type TextProps<T extends AllowedElements> = VariantProps<typeof textStyles> & {\n\tas?: T\n\tpaddingBefore?: PaddingSize\n\t/**\n\t * if you set it to as=label\n\t */\n\thtmlFor?: string\n} & Omit<ComponentPropsWithoutRef<T>, 'as' | 'variant' | 'paddingBefore' | 'font' | 'size'>\n\nexport function Text<T extends AllowedElements = 'span'>({\n\tvariant = 'default',\n\tas = 'span',\n\tclassName,\n\tchildren,\n\tpaddingBefore = 'none',\n\tfont = 'medium',\n\tsize,\n\t...props\n}: Readonly<TextProps<T>>) {\n\tconst Component = (as || 'span') as ElementType\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={twMerge(\n\t\t\t\ttextStyles({\n\t\t\t\t\tvariant,\n\t\t\t\t\tpaddingBefore,\n\t\t\t\t\tfont,\n\t\t\t\t\tsize,\n\t\t\t\t\tclassName,\n\t\t\t\t}),\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Component>\n\t)\n}\n"],"names":["tv","styles","VARIANT_MAP","PADDING_MAP","FONT_MAP","SIZE_MAP","React","twMerge"],"mappings":";;;;;;;;;;;;;;;AAaA,MAAM,UAAU,GAAGA,mBAAE,CAAC;AACrB,IAAA,IAAI,EAAE,CAACC,mBAAM,CAAC,aAAa,CAAC;AAC5B,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAEC,uBAAW;AACpB,QAAA,aAAa,EAAEC,mBAAW;AAC1B,QAAA,IAAI,EAAEC,iBAAQ;AACd,QAAA,IAAI,EAAEC,mBAAQ;AACd,KAAA;AACD,CAAA,CAAC;AAWI,SAAU,IAAI,CAAqC,EACxD,OAAO,GAAG,SAAS,EACnB,EAAE,GAAG,MAAM,EACX,SAAS,EACT,QAAQ,EACR,aAAa,GAAG,MAAM,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,EACJ,GAAG,KAAK,EACgB,EAAA;AACxB,IAAA,MAAM,SAAS,IAAI,EAAE,IAAI,MAAM,CAAgB;IAE/C,QACCC,qCAAC,SAAS,EAAA,EACT,SAAS,EAAEC,qBAAO,CACjB,UAAU,CAAC;YACV,OAAO;YACP,aAAa;YACb,IAAI;YACJ,IAAI;YACJ,SAAS;AACT,SAAA,CAAC,CACF,EAAA,GACG,KAAK,IAER,QAAQ,CACE;AAEd;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.mjs","sources":["../../src/components/Text.tsx"],"sourcesContent":["import { FONT_MAP } from '$types/TextFont'\n\nimport styles from '$styles/Text.module.scss'\nimport React, { ComponentPropsWithoutRef, ElementType } from 'react'\nimport { twMerge } from 'tailwind-merge'\nimport { VARIANT_MAP } from '$types/TextVariant'\nimport { PADDING_MAP, PaddingSize } from '$types/Padding'\nimport { SIZE_MAP } from '$types/TextSizing'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\ntype AllowedElements = 'p' | 'span' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n\nconst textStyles = tv({\n\tbase: [styles.TextComponent],\n\tvariants: {\n\t\tvariant: VARIANT_MAP,\n\t\tpaddingBefore: PADDING_MAP,\n\t\tfont: FONT_MAP,\n\t\tsize: SIZE_MAP,\n\t},\n})\n\ntype TextProps<T extends AllowedElements> = VariantProps<typeof textStyles> & {\n\tas?: T\n\tpaddingBefore?: PaddingSize\n\t/**\n\t * if you set it to as=label\n\t */\n\thtmlFor?: string\n} & Omit<ComponentPropsWithoutRef<T>, 'as' | 'variant' | 'paddingBefore' | 'font' | 'size'>\n\nexport function Text<T extends AllowedElements = 'span'>({\n\tvariant = 'default',\n\tas = 'span',\n\tclassName,\n\tchildren,\n\tpaddingBefore = 'none',\n\tfont = 'medium',\n\tsize,\n\t...props\n}: Readonly<TextProps<T>>) {\n\tconst Component = (as || 'span') as ElementType\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={twMerge(\n\t\t\t\ttextStyles({\n\t\t\t\t\tvariant,\n\t\t\t\t\tpaddingBefore,\n\t\t\t\t\tfont,\n\t\t\t\t\tsize,\n\t\t\t\t\tclassName,\n\t\t\t\t}),\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Component>\n\t)\n}\n"],"names":[],"mappings":";;;;;;;;;AAaA,MAAM,UAAU,GAAG,EAAE,CAAC;AACrB,IAAA,IAAI,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC;AAC5B,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE,WAAW;AACpB,QAAA,aAAa,EAAE,WAAW;AAC1B,QAAA,IAAI,EAAE,QAAQ;AACd,QAAA,IAAI,EAAE,QAAQ;AACd,KAAA;AACD,CAAA,CAAC;AAWI,SAAU,IAAI,CAAqC,EACxD,OAAO,GAAG,SAAS,EACnB,EAAE,GAAG,MAAM,EACX,SAAS,EACT,QAAQ,EACR,aAAa,GAAG,MAAM,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,EACJ,GAAG,KAAK,EACgB,EAAA;AACxB,IAAA,MAAM,SAAS,IAAI,EAAE,IAAI,MAAM,CAAgB;IAE/C,QACC,oBAAC,SAAS,EAAA,EACT,SAAS,EAAE,OAAO,CACjB,UAAU,CAAC;YACV,OAAO;YACP,aAAa;YACb,IAAI;YACJ,IAAI;YACJ,SAAS;AACT,SAAA,CAAC,CACF,EAAA,GACG,KAAK,IAER,QAAQ,CACE;AAEd;;;;"}
1
+ {"version":3,"file":"Text.mjs","sources":["../../src/components/Text.tsx"],"sourcesContent":["import { FONT_MAP } from '$types/TextFont'\n\nimport styles from '$styles/Text.module.scss'\nimport React, { ComponentPropsWithoutRef, ElementType } from 'react'\nimport { twMerge } from 'tailwind-merge'\nimport { VARIANT_MAP } from '$types/TextVariant'\nimport { PADDING_MAP, PaddingSize } from '$types/Padding'\nimport { SIZE_MAP } from '$types/TextSizing'\nimport { tv } from 'tailwind-variants'\nimport { VariantProps } from '$utils/tv'\n\ntype AllowedElements = 'p' | 'span' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\n\nconst textStyles = tv({\n\tbase: [styles.TextComponent],\n\tvariants: {\n\t\tvariant: VARIANT_MAP,\n\t\tpaddingBefore: PADDING_MAP,\n\t\tfont: FONT_MAP,\n\t\tsize: SIZE_MAP,\n\t},\n})\n\nexport type TextProps<T extends AllowedElements> = VariantProps<typeof textStyles> & {\n\tas?: T\n\tpaddingBefore?: PaddingSize\n\t/**\n\t * if you set it to as=label\n\t */\n\thtmlFor?: string\n} & Omit<ComponentPropsWithoutRef<T>, 'as' | 'variant' | 'paddingBefore' | 'font' | 'size'>\n\nexport function Text<T extends AllowedElements = 'span'>({\n\tvariant = 'default',\n\tas = 'span',\n\tclassName,\n\tchildren,\n\tpaddingBefore = 'none',\n\tfont = 'medium',\n\tsize,\n\t...props\n}: Readonly<TextProps<T>>) {\n\tconst Component = (as || 'span') as ElementType\n\n\treturn (\n\t\t<Component\n\t\t\tclassName={twMerge(\n\t\t\t\ttextStyles({\n\t\t\t\t\tvariant,\n\t\t\t\t\tpaddingBefore,\n\t\t\t\t\tfont,\n\t\t\t\t\tsize,\n\t\t\t\t\tclassName,\n\t\t\t\t}),\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t</Component>\n\t)\n}\n"],"names":[],"mappings":";;;;;;;;;AAaA,MAAM,UAAU,GAAG,EAAE,CAAC;AACrB,IAAA,IAAI,EAAE,CAAC,MAAM,CAAC,aAAa,CAAC;AAC5B,IAAA,QAAQ,EAAE;AACT,QAAA,OAAO,EAAE,WAAW;AACpB,QAAA,aAAa,EAAE,WAAW;AAC1B,QAAA,IAAI,EAAE,QAAQ;AACd,QAAA,IAAI,EAAE,QAAQ;AACd,KAAA;AACD,CAAA,CAAC;AAWI,SAAU,IAAI,CAAqC,EACxD,OAAO,GAAG,SAAS,EACnB,EAAE,GAAG,MAAM,EACX,SAAS,EACT,QAAQ,EACR,aAAa,GAAG,MAAM,EACtB,IAAI,GAAG,QAAQ,EACf,IAAI,EACJ,GAAG,KAAK,EACgB,EAAA;AACxB,IAAA,MAAM,SAAS,IAAI,EAAE,IAAI,MAAM,CAAgB;IAE/C,QACC,oBAAC,SAAS,EAAA,EACT,SAAS,EAAE,OAAO,CACjB,UAAU,CAAC;YACV,OAAO;YACP,aAAa;YACb,IAAI;YACJ,IAAI;YACJ,SAAS;AACT,SAAA,CAAC,CACF,EAAA,GACG,KAAK,IAER,QAAQ,CACE;AAEd;;;;"}
package/lib/index.d.ts CHANGED
@@ -1,9 +1,81 @@
1
- export { Box } from '$components/Box';
2
- export { Button } from '$components/Button';
3
- export { Card } from '$components/Card';
4
- export { ErrorMessage } from '$components/ErrorMessage';
5
- export { IconButton } from '$components/IconButton';
6
- export { Text } from '$components/Text';
7
- export { Input } from '$components/Input';
8
- export { Modal } from '$components/Modal';
9
- //# sourceMappingURL=index.d.ts.map
1
+ import { VariantProps } from 'tailwind-variants';
2
+ import React, { HTMLAttributes, ReactNode, ButtonHTMLAttributes, ComponentPropsWithoutRef, HTMLProps } from 'react';
3
+
4
+ declare const boxStyles: any;
5
+ type BoxProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof boxStyles> & {
6
+ as?: 'div' | 'nav' | 'footer' | 'main' | 'article' | 'aside' | 'section' | 'header';
7
+ children?: ReactNode;
8
+ gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16;
9
+ };
10
+ declare function Box({ variant, as, className, orientation, align, justify, children, isolate, id: customId, gap, ...props }: Readonly<BoxProps>): React.JSX.Element;
11
+
12
+ declare const buttonStyles: any;
13
+ type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonStyles> & {
14
+ asSubmit?: boolean;
15
+ };
16
+ declare function Button({ className, children, glowing, noBorder, transparent, asSubmit, title, id: customId, ...props }: Readonly<ButtonProps>): React.JSX.Element;
17
+
18
+ declare const cardStyles: any;
19
+ type CardProps = BoxProps & VariantProps<typeof cardStyles> & {};
20
+ declare const Card: ({ children, className, noBorder, ...props }: CardProps) => React.JSX.Element;
21
+
22
+ declare const errorMessageStyles: any;
23
+ type ErrorMessageProps = BoxProps & VariantProps<typeof errorMessageStyles> & {
24
+ error: Error;
25
+ };
26
+ declare function ErrorMessage({ error, ...props }: ErrorMessageProps): React.JSX.Element;
27
+
28
+ declare const inputButtonStyles: any;
29
+ type IconButtonProps = ButtonProps & VariantProps<typeof inputButtonStyles> & {
30
+ className?: string;
31
+ children?: ReactNode;
32
+ label?: string;
33
+ };
34
+ declare function IconButton({ className, children, label, id: customId, ...props }: Readonly<IconButtonProps>): React.JSX.Element;
35
+
36
+ /**
37
+ * Defines the allowed padding sizes for the Text component.
38
+ * @type {PaddingSize}
39
+ * @typedef {'none' | '10' | '20'} PaddingSize
40
+ */
41
+ type PaddingSize = 'none' | '10' | '20';
42
+
43
+ type AllowedElements = 'p' | 'span' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
44
+ declare const textStyles: any;
45
+ type TextProps<T extends AllowedElements> = VariantProps<typeof textStyles> & {
46
+ as?: T;
47
+ paddingBefore?: PaddingSize;
48
+ /**
49
+ * if you set it to as=label
50
+ */
51
+ htmlFor?: string;
52
+ } & Omit<ComponentPropsWithoutRef<T>, 'as' | 'variant' | 'paddingBefore' | 'font' | 'size'>;
53
+ declare function Text<T extends AllowedElements = 'span'>({ variant, as, className, children, paddingBefore, font, size, ...props }: Readonly<TextProps<T>>): React.JSX.Element;
54
+
55
+ declare const InputStyles: any;
56
+ /**
57
+ * Props for the Input component.
58
+ */
59
+ type InputProps = HTMLProps<HTMLInputElement> & VariantProps<typeof InputStyles> & {
60
+ label?: string;
61
+ glowing?: boolean;
62
+ };
63
+ declare function Input({ label, name: customName, placeholder, width, glowing, type, id: customId, ...props }: Readonly<InputProps>): React.JSX.Element;
64
+
65
+ declare const modalStyles: any;
66
+ type ModalProps = BoxProps & VariantProps<typeof modalStyles> & {
67
+ onClose?: () => void;
68
+ onSubmit?: () => void;
69
+ modalTitle?: ReactNode;
70
+ modalSubTitle?: ReactNode;
71
+ children?: ReactNode;
72
+ closeIcon?: ReactNode;
73
+ closeText?: string;
74
+ showSubmitButton?: boolean;
75
+ submitText?: string;
76
+ submitIcon?: ReactNode;
77
+ };
78
+ declare const Modal: ({ onClose, onSubmit, id: customId, modalTitle, modalSubTitle, children, closeText, closeIcon, showSubmitButton, submitText, submitIcon, ...props }: ModalProps) => React.JSX.Element;
79
+
80
+ export { Box, Button, Card, ErrorMessage, IconButton, Input, Modal, Text };
81
+ export type { BoxProps, ButtonProps, CardProps, ErrorMessageProps, IconButtonProps, InputProps, ModalProps, TextProps };
package/package.json CHANGED
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "name": "@1ry/basic-react-primitive-components",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "some basic react primitive components",
5
5
  "keywords": [
6
- "serializable",
7
- "typescript",
8
- "typescript-library"
6
+ "components",
7
+ "primitives",
8
+ "react",
9
+ "tailwindcss",
10
+ "typescript"
9
11
  ],
10
12
  "homepage": "https://github.com/dozro/basic-react-primitive-components#readme",
11
13
  "bugs": {
@@ -75,8 +77,10 @@
75
77
  "postcss": "^8.5.15",
76
78
  "prettier": "^2.8.8",
77
79
  "rollup": "^4.62.2",
80
+ "rollup-plugin-dts": "^6.4.1",
78
81
  "rollup-plugin-postcss": "^4.0.2",
79
82
  "rollup-plugin-rename-node-modules": "^1.3.1",
83
+ "rollup-plugin-tsconfig-paths": "^1.5.2",
80
84
  "sass": "^1.101.0",
81
85
  "semantic-release": "^21.1.2",
82
86
  "typed-scss-modules": "^8.1.1"
@@ -1,11 +0,0 @@
1
- import { VariantProps } from '$utils/tv';
2
- import React, { HTMLAttributes, ReactNode } from 'react';
3
- declare const boxStyles: any;
4
- export type BoxProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof boxStyles> & {
5
- as?: 'div' | 'nav' | 'footer' | 'main' | 'article' | 'aside' | 'section' | 'header';
6
- children?: ReactNode;
7
- gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16;
8
- };
9
- export declare function Box({ variant, as, className, orientation, align, justify, children, isolate, id: customId, gap, ...props }: Readonly<BoxProps>): React.JSX.Element;
10
- export {};
11
- //# sourceMappingURL=Box.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Box.d.ts","sourceRoot":"","sources":["../../src/components/Box.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,KAAK,EAAE,EAAY,cAAc,EAAE,SAAS,EAAW,MAAM,OAAO,CAAA;AAE3E,QAAA,MAAM,SAAS,KAsCb,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,cAAc,CAAC,cAAc,CAAC,GACpD,YAAY,CAAC,OAAO,SAAS,CAAC,GAAG;IAChC,EAAE,CAAC,EAAE,KAAK,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAA;IACnF,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAA;CAClD,CAAA;AAEF,wBAAgB,GAAG,CAAC,EACnB,OAAmB,EACnB,EAAE,EACF,SAAS,EACT,WAAoB,EACpB,KAAc,EACd,OAAgB,EAChB,QAAQ,EACR,OAAe,EACf,EAAE,EAAE,QAAQ,EACZ,GAAO,EACP,GAAG,KAAK,EACR,EAAE,QAAQ,CAAC,QAAQ,CAAC,qBAuBpB"}
@@ -1,10 +0,0 @@
1
- import type { ButtonHTMLAttributes } from 'react';
2
- import React from 'react';
3
- import { VariantProps } from '$utils/tv';
4
- declare const buttonStyles: any;
5
- export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonStyles> & {
6
- asSubmit?: boolean;
7
- };
8
- export declare function Button({ className, children, glowing, noBorder, transparent, asSubmit, title, id: customId, ...props }: Readonly<ButtonProps>): React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=Button.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/components/Button.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAA;AACjD,OAAO,KAAkB,MAAM,OAAO,CAAA;AAEtC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,QAAA,MAAM,YAAY,KAahB,CAAA;AAEF,MAAM,MAAM,WAAW,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,GAChE,YAAY,CAAC,OAAO,YAAY,CAAC,GAAG;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAEF,wBAAgB,MAAM,CAAC,EACtB,SAAS,EACT,QAAQ,EACR,OAAe,EACf,QAAe,EACf,WAAkB,EAClB,QAAgB,EAChB,KAAK,EACL,EAAE,EAAE,QAAQ,EACZ,GAAG,KAAK,EACR,EAAE,QAAQ,CAAC,WAAW,CAAC,qBAuBvB"}
@@ -1,8 +0,0 @@
1
- import { BoxProps } from '$components/Box';
2
- import React from 'react';
3
- import { VariantProps } from '$utils/tv';
4
- declare const cardStyles: any;
5
- type CardProps = BoxProps & VariantProps<typeof cardStyles> & {};
6
- export declare const Card: ({ children, className, noBorder, ...props }: CardProps) => React.JSX.Element;
7
- export {};
8
- //# sourceMappingURL=Card.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Card.d.ts","sourceRoot":"","sources":["../../src/components/Card.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAO,MAAM,iBAAiB,CAAA;AAE/C,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,QAAA,MAAM,UAAU,KAOd,CAAA;AAEF,KAAK,SAAS,GAAG,QAAQ,GAAG,YAAY,CAAC,OAAO,UAAU,CAAC,GAAG,EAC7D,CAAA;AAED,eAAO,MAAM,IAAI,gDAAiD,SAAS,sBAU1E,CAAA"}
@@ -1,10 +0,0 @@
1
- import { BoxProps } from '$components/Box';
2
- import React from 'react';
3
- import { VariantProps } from '$utils/tv';
4
- declare const errorMessageStyles: any;
5
- export type ErrorMessageProps = BoxProps & VariantProps<typeof errorMessageStyles> & {
6
- error: Error;
7
- };
8
- export declare function ErrorMessage({ error, ...props }: ErrorMessageProps): React.JSX.Element;
9
- export {};
10
- //# sourceMappingURL=ErrorMessage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorMessage.d.ts","sourceRoot":"","sources":["../../src/components/ErrorMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAE/C,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,QAAA,MAAM,kBAAkB,KAWtB,CAAA;AAEF,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,GAAG;IACpF,KAAK,EAAE,KAAK,CAAA;CACZ,CAAA;AAED,wBAAgB,YAAY,CAAC,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,qBAMlE"}
@@ -1,12 +0,0 @@
1
- import { ButtonProps } from '$components/Button';
2
- import React, { ReactNode } from 'react';
3
- import { VariantProps } from '$utils/tv';
4
- declare const inputButtonStyles: any;
5
- export type IconButtonProps = ButtonProps & VariantProps<typeof inputButtonStyles> & {
6
- className?: string;
7
- children?: ReactNode;
8
- label?: string;
9
- };
10
- export declare function IconButton({ className, children, label, id: customId, ...props }: Readonly<IconButtonProps>): React.JSX.Element;
11
- export {};
12
- //# sourceMappingURL=IconButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../src/components/IconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAU,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAGxD,OAAO,KAAK,EAAE,EAAE,SAAS,EAAW,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAGxC,QAAA,MAAM,iBAAiB,KAUrB,CAAA;AAEF,MAAM,MAAM,eAAe,GAAG,WAAW,GACxC,YAAY,CAAC,OAAO,iBAAiB,CAAC,GAAG;IACxC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,KAAK,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAEF,wBAAgB,UAAU,CAAC,EAC1B,SAAS,EACT,QAAQ,EACR,KAAK,EACL,EAAE,EAAE,QAAQ,EACZ,GAAG,KAAK,EACR,EAAE,QAAQ,CAAC,eAAe,CAAC,qBAa3B"}
@@ -1,13 +0,0 @@
1
- import React, { HTMLProps } from 'react';
2
- import { VariantProps } from '$utils/tv';
3
- declare const InputStyles: any;
4
- /**
5
- * Props for the Input component.
6
- */
7
- export type InputProps = HTMLProps<HTMLInputElement> & VariantProps<typeof InputStyles> & {
8
- label?: string;
9
- glowing?: boolean;
10
- };
11
- export declare function Input({ label, name: customName, placeholder, width, glowing, type, id: customId, ...props }: Readonly<InputProps>): React.JSX.Element;
12
- export {};
13
- //# sourceMappingURL=Input.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../src/components/Input.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAW,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,QAAA,MAAM,WAAW,KAEf,CAAA;AAEF;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,SAAS,CAAC,gBAAgB,CAAC,GACnD,YAAY,CAAC,OAAO,WAAW,CAAC,GAAG;IAClC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;CACjB,CAAA;AAEF,wBAAgB,KAAK,CAAC,EACrB,KAAK,EACL,IAAI,EAAE,UAAU,EAChB,WAAW,EACX,KAAc,EACd,OAAe,EACf,IAAI,EACJ,EAAE,EAAE,QAAQ,EACZ,GAAG,KAAK,EACR,EAAE,QAAQ,CAAC,UAAU,CAAC,qBA0BtB"}
@@ -1,19 +0,0 @@
1
- import { BoxProps } from '$components/Box';
2
- import React, { ReactNode } from 'react';
3
- import { VariantProps } from '$utils/tv';
4
- declare const modalStyles: any;
5
- export type ModalProps = BoxProps & VariantProps<typeof modalStyles> & {
6
- onClose?: () => void;
7
- onSubmit?: () => void;
8
- modalTitle?: ReactNode;
9
- modalSubTitle?: ReactNode;
10
- children?: ReactNode;
11
- closeIcon?: ReactNode;
12
- closeText?: string;
13
- showSubmitButton?: boolean;
14
- submitText?: string;
15
- submitIcon?: ReactNode;
16
- };
17
- export declare const Modal: ({ onClose, onSubmit, id: customId, modalTitle, modalSubTitle, children, closeText, closeIcon, showSubmitButton, submitText, submitIcon, ...props }: ModalProps) => React.JSX.Element;
18
- export {};
19
- //# sourceMappingURL=Modal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../src/components/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AAI/C,OAAO,KAAK,EAAE,EAAE,SAAS,EAAW,MAAM,OAAO,CAAA;AAEjD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAGxC,QAAA,MAAM,WAAW,KAUf,CAAA;AAEF,MAAM,MAAM,UAAU,GAAG,QAAQ,GAChC,YAAY,CAAC,OAAO,WAAW,CAAC,GAAG;IAClC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAA;IACrB,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,aAAa,CAAC,EAAE,SAAS,CAAA;IACzB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,SAAS,CAAC,EAAE,SAAS,CAAA;IACrB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,SAAS,CAAA;CACtB,CAAA;AACF,eAAO,MAAM,KAAK,uJAiBf,UAAU,sBAuCZ,CAAA"}
@@ -1,16 +0,0 @@
1
- import React, { ComponentPropsWithoutRef } from 'react';
2
- import { PaddingSize } from '$types/Padding';
3
- import { VariantProps } from '$utils/tv';
4
- type AllowedElements = 'p' | 'span' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
5
- declare const textStyles: any;
6
- type TextProps<T extends AllowedElements> = VariantProps<typeof textStyles> & {
7
- as?: T;
8
- paddingBefore?: PaddingSize;
9
- /**
10
- * if you set it to as=label
11
- */
12
- htmlFor?: string;
13
- } & Omit<ComponentPropsWithoutRef<T>, 'as' | 'variant' | 'paddingBefore' | 'font' | 'size'>;
14
- export declare function Text<T extends AllowedElements = 'span'>({ variant, as, className, children, paddingBefore, font, size, ...props }: Readonly<TextProps<T>>): React.JSX.Element;
15
- export {};
16
- //# sourceMappingURL=Text.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../src/components/Text.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,EAAE,wBAAwB,EAAe,MAAM,OAAO,CAAA;AAGpE,OAAO,EAAe,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAGzD,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAExC,KAAK,eAAe,GAAG,GAAG,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAEvF,QAAA,MAAM,UAAU,KAQd,CAAA;AAEF,KAAK,SAAS,CAAC,CAAC,SAAS,eAAe,IAAI,YAAY,CAAC,OAAO,UAAU,CAAC,GAAG;IAC7E,EAAE,CAAC,EAAE,CAAC,CAAA;IACN,aAAa,CAAC,EAAE,WAAW,CAAA;IAC3B;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;CAChB,GAAG,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC,EAAE,IAAI,GAAG,SAAS,GAAG,eAAe,GAAG,MAAM,GAAG,MAAM,CAAC,CAAA;AAE3F,wBAAgB,IAAI,CAAC,CAAC,SAAS,eAAe,GAAG,MAAM,EAAE,EACxD,OAAmB,EACnB,EAAW,EACX,SAAS,EACT,QAAQ,EACR,aAAsB,EACtB,IAAe,EACf,IAAI,EACJ,GAAG,KAAK,EACR,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,qBAmBxB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAA;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAA"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Defines the allowed padding sizes for the Text component.
3
- * @type {PaddingSize}
4
- * @typedef {'none' | '10' | '20'} PaddingSize
5
- */
6
- export type PaddingSize = 'none' | '10' | '20';
7
- /**
8
- * Maps padding sizes to their corresponding CSS classes.
9
- * @type {Record<PaddingSize, string>}
10
- * @constant
11
- */
12
- export declare const PADDING_MAP: Record<PaddingSize, string>;
13
- //# sourceMappingURL=Padding.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Padding.d.ts","sourceRoot":"","sources":["../../src/types/Padding.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,CAAA;AAC9C;;;;GAIG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAInD,CAAA"}
@@ -1,13 +0,0 @@
1
- /**
2
- * Defines the allowed font weights for the Text component.
3
- * @type {TextFontWeight}
4
- * @typedef {'normal' | 'medium' | 'semibold' | 'bold'} TextFontWeight
5
- */
6
- export type TextFontWeight = 'normal' | 'medium' | 'semibold' | 'bold';
7
- /**
8
- * Maps font weights to their corresponding CSS classes.
9
- * @type {Record<TextFontWeight, string>}
10
- * @constant
11
- */
12
- export declare const FONT_MAP: Record<TextFontWeight, string>;
13
- //# sourceMappingURL=TextFont.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextFont.d.ts","sourceRoot":"","sources":["../../src/types/TextFont.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,CAAA;AACtE;;;;GAIG;AACH,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,cAAc,EAAE,MAAM,CAKnD,CAAA"}
@@ -1,3 +0,0 @@
1
- export type TextSize = 'xs' | 'small' | 'base' | 'large' | 'xl' | '2xl';
2
- export declare const SIZE_MAP: Record<TextSize, string>;
3
- //# sourceMappingURL=TextSizing.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextSizing.d.ts","sourceRoot":"","sources":["../../src/types/TextSizing.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,KAAK,CAAA;AACvE,eAAO,MAAM,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAO7C,CAAA"}
@@ -1,3 +0,0 @@
1
- export type TextVariant = 'default' | 'title' | 'wavy';
2
- export declare const VARIANT_MAP: Record<TextVariant, string>;
3
- //# sourceMappingURL=TextVariant.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextVariant.d.ts","sourceRoot":"","sources":["../../src/types/TextVariant.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;AACtD,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAInD,CAAA"}