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

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/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { VariantProps } from 'tailwind-variants';
2
+ export { VariantProps } from 'tailwind-variants';
2
3
  import React, { HTMLAttributes, ReactNode, ButtonHTMLAttributes, ComponentPropsWithoutRef, HTMLProps } from 'react';
3
4
 
4
5
  declare const boxStyles: any;
@@ -39,6 +40,12 @@ declare function IconButton({ className, children, label, id: customId, ...props
39
40
  * @typedef {'none' | '10' | '20'} PaddingSize
40
41
  */
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>;
42
49
 
43
50
  type AllowedElements = 'p' | 'span' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
44
51
  declare const textStyles: any;
@@ -77,5 +84,24 @@ type ModalProps = BoxProps & VariantProps<typeof modalStyles> & {
77
84
  };
78
85
  declare const Modal: ({ onClose, onSubmit, id: customId, modalTitle, modalSubTitle, children, closeText, closeIcon, showSubmitButton, submitText, submitIcon, ...props }: ModalProps) => React.JSX.Element;
79
86
 
80
- export { Box, Button, Card, ErrorMessage, IconButton, Input, Modal, Text };
81
- export type { BoxProps, ButtonProps, CardProps, ErrorMessageProps, IconButtonProps, InputProps, ModalProps, TextProps };
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@1ry/basic-react-primitive-components",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "some basic react primitive components",
5
5
  "keywords": [
6
6
  "components",