@1ry/basic-react-primitive-components 0.1.1 → 0.1.3
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/lib/components/Card.js.map +1 -1
- package/lib/components/Card.mjs.map +1 -1
- package/lib/components/ErrorMessage.js.map +1 -1
- package/lib/components/ErrorMessage.mjs.map +1 -1
- package/lib/components/Text.js.map +1 -1
- package/lib/components/Text.mjs.map +1 -1
- package/lib/index.d.ts +107 -9
- package/lib/index.js +8 -0
- package/lib/index.js.map +1 -1
- package/lib/index.mjs +4 -0
- package/lib/index.mjs.map +1 -1
- package/package.json +7 -5
- package/lib/components/Box.d.ts +0 -11
- package/lib/components/Box.d.ts.map +0 -1
- package/lib/components/Button.d.ts +0 -10
- package/lib/components/Button.d.ts.map +0 -1
- package/lib/components/Card.d.ts +0 -8
- package/lib/components/Card.d.ts.map +0 -1
- package/lib/components/ErrorMessage.d.ts +0 -10
- package/lib/components/ErrorMessage.d.ts.map +0 -1
- package/lib/components/IconButton.d.ts +0 -12
- package/lib/components/IconButton.d.ts.map +0 -1
- package/lib/components/Input.d.ts +0 -13
- package/lib/components/Input.d.ts.map +0 -1
- package/lib/components/Modal.d.ts +0 -19
- package/lib/components/Modal.d.ts.map +0 -1
- package/lib/components/Text.d.ts +0 -16
- package/lib/components/Text.d.ts.map +0 -1
- package/lib/index.d.ts.map +0 -1
- package/lib/types/Padding.d.ts +0 -13
- package/lib/types/Padding.d.ts.map +0 -1
- package/lib/types/TextFont.d.ts +0 -13
- package/lib/types/TextFont.d.ts.map +0 -1
- package/lib/types/TextSizing.d.ts +0 -3
- package/lib/types/TextSizing.d.ts.map +0 -1
- package/lib/types/TextVariant.d.ts +0 -3
- package/lib/types/TextVariant.d.ts.map +0 -1
|
@@ -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\
|
|
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\
|
|
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
|
|
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
|
|
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\
|
|
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\
|
|
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,107 @@
|
|
|
1
|
-
|
|
2
|
-
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
import { VariantProps } from 'tailwind-variants';
|
|
2
|
+
export { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import React, { HTMLAttributes, ReactNode, ButtonHTMLAttributes, ComponentPropsWithoutRef, HTMLProps } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const boxStyles: any;
|
|
6
|
+
type BoxProps = HTMLAttributes<HTMLDivElement> & VariantProps<typeof boxStyles> & {
|
|
7
|
+
as?: 'div' | 'nav' | 'footer' | 'main' | 'article' | 'aside' | 'section' | 'header';
|
|
8
|
+
children?: ReactNode;
|
|
9
|
+
gap?: 0 | 1 | 2 | 3 | 4 | 5 | 6 | 8 | 10 | 12 | 16;
|
|
10
|
+
};
|
|
11
|
+
declare function Box({ variant, as, className, orientation, align, justify, children, isolate, id: customId, gap, ...props }: Readonly<BoxProps>): React.JSX.Element;
|
|
12
|
+
|
|
13
|
+
declare const buttonStyles: any;
|
|
14
|
+
type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & VariantProps<typeof buttonStyles> & {
|
|
15
|
+
asSubmit?: boolean;
|
|
16
|
+
};
|
|
17
|
+
declare function Button({ className, children, glowing, noBorder, transparent, asSubmit, title, id: customId, ...props }: Readonly<ButtonProps>): React.JSX.Element;
|
|
18
|
+
|
|
19
|
+
declare const cardStyles: any;
|
|
20
|
+
type CardProps = BoxProps & VariantProps<typeof cardStyles> & {};
|
|
21
|
+
declare const Card: ({ children, className, noBorder, ...props }: CardProps) => React.JSX.Element;
|
|
22
|
+
|
|
23
|
+
declare const errorMessageStyles: any;
|
|
24
|
+
type ErrorMessageProps = BoxProps & VariantProps<typeof errorMessageStyles> & {
|
|
25
|
+
error: Error;
|
|
26
|
+
};
|
|
27
|
+
declare function ErrorMessage({ error, ...props }: ErrorMessageProps): React.JSX.Element;
|
|
28
|
+
|
|
29
|
+
declare const inputButtonStyles: any;
|
|
30
|
+
type IconButtonProps = ButtonProps & VariantProps<typeof inputButtonStyles> & {
|
|
31
|
+
className?: string;
|
|
32
|
+
children?: ReactNode;
|
|
33
|
+
label?: string;
|
|
34
|
+
};
|
|
35
|
+
declare function IconButton({ className, children, label, id: customId, ...props }: Readonly<IconButtonProps>): React.JSX.Element;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Defines the allowed padding sizes for the Text component.
|
|
39
|
+
* @type {PaddingSize}
|
|
40
|
+
* @typedef {'none' | '10' | '20'} PaddingSize
|
|
41
|
+
*/
|
|
42
|
+
type PaddingSize = 'none' | '10' | '20';
|
|
43
|
+
/**
|
|
44
|
+
* Maps padding sizes to their corresponding CSS classes.
|
|
45
|
+
* @type {Record<PaddingSize, string>}
|
|
46
|
+
* @constant
|
|
47
|
+
*/
|
|
48
|
+
declare const PADDING_MAP: Record<PaddingSize, string>;
|
|
49
|
+
|
|
50
|
+
type AllowedElements = 'p' | 'span' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
51
|
+
declare const textStyles: any;
|
|
52
|
+
type TextProps<T extends AllowedElements> = VariantProps<typeof textStyles> & {
|
|
53
|
+
as?: T;
|
|
54
|
+
paddingBefore?: PaddingSize;
|
|
55
|
+
/**
|
|
56
|
+
* if you set it to as=label
|
|
57
|
+
*/
|
|
58
|
+
htmlFor?: string;
|
|
59
|
+
} & Omit<ComponentPropsWithoutRef<T>, 'as' | 'variant' | 'paddingBefore' | 'font' | 'size'>;
|
|
60
|
+
declare function Text<T extends AllowedElements = 'span'>({ variant, as, className, children, paddingBefore, font, size, ...props }: Readonly<TextProps<T>>): React.JSX.Element;
|
|
61
|
+
|
|
62
|
+
declare const InputStyles: any;
|
|
63
|
+
/**
|
|
64
|
+
* Props for the Input component.
|
|
65
|
+
*/
|
|
66
|
+
type InputProps = HTMLProps<HTMLInputElement> & VariantProps<typeof InputStyles> & {
|
|
67
|
+
label?: string;
|
|
68
|
+
glowing?: boolean;
|
|
69
|
+
};
|
|
70
|
+
declare function Input({ label, name: customName, placeholder, width, glowing, type, id: customId, ...props }: Readonly<InputProps>): React.JSX.Element;
|
|
71
|
+
|
|
72
|
+
declare const modalStyles: any;
|
|
73
|
+
type ModalProps = BoxProps & VariantProps<typeof modalStyles> & {
|
|
74
|
+
onClose?: () => void;
|
|
75
|
+
onSubmit?: () => void;
|
|
76
|
+
modalTitle?: ReactNode;
|
|
77
|
+
modalSubTitle?: ReactNode;
|
|
78
|
+
children?: ReactNode;
|
|
79
|
+
closeIcon?: ReactNode;
|
|
80
|
+
closeText?: string;
|
|
81
|
+
showSubmitButton?: boolean;
|
|
82
|
+
submitText?: string;
|
|
83
|
+
submitIcon?: ReactNode;
|
|
84
|
+
};
|
|
85
|
+
declare const Modal: ({ onClose, onSubmit, id: customId, modalTitle, modalSubTitle, children, closeText, closeIcon, showSubmitButton, submitText, submitIcon, ...props }: ModalProps) => React.JSX.Element;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Defines the allowed font weights for the Text component.
|
|
89
|
+
* @type {TextFontWeight}
|
|
90
|
+
* @typedef {'normal' | 'medium' | 'semibold' | 'bold'} TextFontWeight
|
|
91
|
+
*/
|
|
92
|
+
type TextFontWeight = 'normal' | 'medium' | 'semibold' | 'bold';
|
|
93
|
+
/**
|
|
94
|
+
* Maps font weights to their corresponding CSS classes.
|
|
95
|
+
* @type {Record<TextFontWeight, string>}
|
|
96
|
+
* @constant
|
|
97
|
+
*/
|
|
98
|
+
declare const FONT_MAP: Record<TextFontWeight, string>;
|
|
99
|
+
|
|
100
|
+
type TextVariant = 'default' | 'title' | 'wavy';
|
|
101
|
+
declare const VARIANT_MAP: Record<TextVariant, string>;
|
|
102
|
+
|
|
103
|
+
type TextSize = 'xs' | 'small' | 'base' | 'large' | 'xl' | '2xl';
|
|
104
|
+
declare const SIZE_MAP: Record<TextSize, string>;
|
|
105
|
+
|
|
106
|
+
export { Box, Button, Card, ErrorMessage, FONT_MAP, IconButton, Input, Modal, PADDING_MAP, SIZE_MAP, Text, VARIANT_MAP };
|
|
107
|
+
export type { BoxProps, ButtonProps, CardProps, ErrorMessageProps, IconButtonProps, InputProps, ModalProps, PaddingSize, TextFontWeight, TextProps, TextSize, TextVariant };
|
package/lib/index.js
CHANGED
|
@@ -8,6 +8,10 @@ var IconButton = require('./components/IconButton.js');
|
|
|
8
8
|
var Text = require('./components/Text.js');
|
|
9
9
|
var Input = require('./components/Input.js');
|
|
10
10
|
var Modal = require('./components/Modal.js');
|
|
11
|
+
var Padding = require('./types/Padding.js');
|
|
12
|
+
var TextFont = require('./types/TextFont.js');
|
|
13
|
+
var TextVariant = require('./types/TextVariant.js');
|
|
14
|
+
var TextSizing = require('./types/TextSizing.js');
|
|
11
15
|
|
|
12
16
|
|
|
13
17
|
|
|
@@ -19,4 +23,8 @@ exports.IconButton = IconButton.IconButton;
|
|
|
19
23
|
exports.Text = Text.Text;
|
|
20
24
|
exports.Input = Input.Input;
|
|
21
25
|
exports.Modal = Modal.Modal;
|
|
26
|
+
exports.PADDING_MAP = Padding.PADDING_MAP;
|
|
27
|
+
exports.FONT_MAP = TextFont.FONT_MAP;
|
|
28
|
+
exports.VARIANT_MAP = TextVariant.VARIANT_MAP;
|
|
29
|
+
exports.SIZE_MAP = TextSizing.SIZE_MAP;
|
|
22
30
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/lib/index.mjs
CHANGED
|
@@ -6,4 +6,8 @@ export { IconButton } from './components/IconButton.mjs';
|
|
|
6
6
|
export { Text } from './components/Text.mjs';
|
|
7
7
|
export { Input } from './components/Input.mjs';
|
|
8
8
|
export { Modal } from './components/Modal.mjs';
|
|
9
|
+
export { PADDING_MAP } from './types/Padding.mjs';
|
|
10
|
+
export { FONT_MAP } from './types/TextFont.mjs';
|
|
11
|
+
export { VARIANT_MAP } from './types/TextVariant.mjs';
|
|
12
|
+
export { SIZE_MAP } from './types/TextSizing.mjs';
|
|
9
13
|
//# sourceMappingURL=index.mjs.map
|
package/lib/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@1ry/basic-react-primitive-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "some basic react primitive components",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"react",
|
|
7
|
-
"typescript",
|
|
8
|
-
"primitives",
|
|
9
6
|
"components",
|
|
10
|
-
"
|
|
7
|
+
"primitives",
|
|
8
|
+
"react",
|
|
9
|
+
"tailwindcss",
|
|
10
|
+
"typescript"
|
|
11
11
|
],
|
|
12
12
|
"homepage": "https://github.com/dozro/basic-react-primitive-components#readme",
|
|
13
13
|
"bugs": {
|
|
@@ -77,8 +77,10 @@
|
|
|
77
77
|
"postcss": "^8.5.15",
|
|
78
78
|
"prettier": "^2.8.8",
|
|
79
79
|
"rollup": "^4.62.2",
|
|
80
|
+
"rollup-plugin-dts": "^6.4.1",
|
|
80
81
|
"rollup-plugin-postcss": "^4.0.2",
|
|
81
82
|
"rollup-plugin-rename-node-modules": "^1.3.1",
|
|
83
|
+
"rollup-plugin-tsconfig-paths": "^1.5.2",
|
|
82
84
|
"sass": "^1.101.0",
|
|
83
85
|
"semantic-release": "^21.1.2",
|
|
84
86
|
"typed-scss-modules": "^8.1.1"
|
package/lib/components/Box.d.ts
DELETED
|
@@ -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"}
|
package/lib/components/Card.d.ts
DELETED
|
@@ -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"}
|
package/lib/components/Text.d.ts
DELETED
|
@@ -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"}
|
package/lib/index.d.ts.map
DELETED
|
@@ -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"}
|
package/lib/types/Padding.d.ts
DELETED
|
@@ -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"}
|
package/lib/types/TextFont.d.ts
DELETED
|
@@ -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 +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 +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"}
|