kahuna-base-react-components 0.2.5 → 0.2.6

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/dist/types.d.ts CHANGED
@@ -78,6 +78,8 @@ interface KInputProps {
78
78
  gap?: string;
79
79
  border?: string;
80
80
  boxShadow?: string;
81
+ fontSize?: string;
82
+ iconSize?: string;
81
83
  }
82
84
  declare const KInput: React.FC<KInputProps>;
83
85
 
@@ -109,7 +111,7 @@ interface KDropdownProps {
109
111
  menuBackground?: string;
110
112
  padding?: string;
111
113
  gap?: string;
112
- showChosenOptionIcon?: boolean;
114
+ hideChosenOptionIcon?: boolean;
113
115
  }
114
116
  declare const KDropdown: React.FC<KDropdownProps>;
115
117
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kahuna-base-react-components",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Kahuna Base React Components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -34,7 +34,7 @@ export interface KDropdownProps {
34
34
  menuBackground?: string
35
35
  padding?:string
36
36
  gap?: string
37
- showChosenOptionIcon?: boolean
37
+ hideChosenOptionIcon?: boolean
38
38
  }
39
39
 
40
40
  const KDropdown: React.FC<KDropdownProps> = (props) => {
@@ -58,7 +58,7 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
58
58
  const menuBackground = props.menuBackground || "rgb(249, 249, 249)";
59
59
  const padding = props.padding || "8px"
60
60
  const gap = props.gap || "4px"
61
- const showIcon = props.showChosenOptionIcon || true
61
+ const hideIcon = props.hideChosenOptionIcon || false
62
62
 
63
63
  const getOptionLabels = (option: KSelectOption) => {
64
64
  return (
@@ -151,7 +151,7 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
151
151
  DropdownIndicator: () => null,
152
152
  SingleValue: ({ data, ...props }) => (
153
153
  <div className="flex" style={{ position: "absolute" }}>
154
- {data.icon && showIcon && <img src={data.icon} className="mr-2" width={20} alt={"data-icon"} />}
154
+ {data.icon && !hideIcon && <img src={data.icon} className="mr-2" width={20} alt={"data-icon"} />}
155
155
  <KSpan text={data.label} color="#111" />
156
156
  </div>
157
157
  )
@@ -24,6 +24,8 @@ export interface KInputProps {
24
24
  gap?: string
25
25
  border?: string
26
26
  boxShadow?: string
27
+ fontSize?: string
28
+ iconSize?: string
27
29
  }
28
30
 
29
31
  const KInput: React.FC<KInputProps> = (props) => {
@@ -39,7 +41,7 @@ const KInput: React.FC<KInputProps> = (props) => {
39
41
  }, [props.value])
40
42
 
41
43
  const width = props.width || "100%"
42
- const height = props.height || 24
44
+ const height = props.height || 20
43
45
  const borderRadius = props.borderRadius || 10
44
46
  const boxShadow = props.shadowDisabled ? "" : props.boxShadow ? props.boxShadow : "0 0 0 1px rgba(17, 17, 17, 0.04), 0 1px 1px 0 rgba(17, 17, 17, 0.04)"
45
47
  const type = props.type || "text"
@@ -49,6 +51,8 @@ const KInput: React.FC<KInputProps> = (props) => {
49
51
  const padding = props.padding || "8px"
50
52
  const gap = props.gap || "12px"
51
53
  const border = props.border || "none"
54
+ const fontSize = props.fontSize || "14px"
55
+ const iconSize = props.iconSize || "20px"
52
56
 
53
57
  return (
54
58
  <div
@@ -60,6 +64,10 @@ const KInput: React.FC<KInputProps> = (props) => {
60
64
  {props.leftIcon && (
61
65
  <img
62
66
  src={props.leftIcon}
67
+ style={{
68
+ width: iconSize,
69
+ height: iconSize
70
+ }}
63
71
  alt={"l-icon"}
64
72
  className={props.leftIconClick && "cursor-pointer"}
65
73
  onClick={() => {
@@ -71,7 +79,13 @@ const KInput: React.FC<KInputProps> = (props) => {
71
79
  <input
72
80
  type={type}
73
81
  className={"k-input"}
74
- style={{ background: hover ? hoverBackground : background, width, height, accentColor }}
82
+ style={{
83
+ background: hover ? hoverBackground : background,
84
+ width,
85
+ height,
86
+ accentColor,
87
+ fontSize,
88
+ }}
75
89
  value={props.value}
76
90
  placeholder={props.placeholder || ""}
77
91
  disabled={disabled}
@@ -86,6 +100,10 @@ const KInput: React.FC<KInputProps> = (props) => {
86
100
  {props.rightIcon && (
87
101
  <img
88
102
  src={props.rightIcon}
103
+ style={{
104
+ width: iconSize,
105
+ height: iconSize
106
+ }}
89
107
  alt={"r-icon"}
90
108
  className={props.rightIconClick && "cursor-pointer"}
91
109
  onClick={() => {
package/src/main.css CHANGED
@@ -44,7 +44,6 @@
44
44
  font-feature-settings: 'ss11' on, 'cv09' on, 'liga' off, 'calt' off;
45
45
  /* Paragraph/Small */
46
46
  font-family: Inter;
47
- font-size: 14px;
48
47
  font-style: normal;
49
48
  font-weight: 400;
50
49
  line-height: 20px; /* 142.857% */