kahuna-base-react-components 0.2.21 → 0.3.1

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
@@ -96,6 +96,36 @@ interface KInputProps {
96
96
  }
97
97
  declare const KInput$1: React.FC<KInputProps>;
98
98
 
99
+ interface KTextAreaProps {
100
+ value: string;
101
+ onChange: (value: string) => void;
102
+ rows?: number;
103
+ onBlur?: (value: string) => void;
104
+ onKeyDown?: (event: KeyboardEvent) => void;
105
+ width?: number;
106
+ height?: number;
107
+ leftIcon?: string;
108
+ rightIcon?: string;
109
+ background?: string;
110
+ activeBackground?: string;
111
+ borderRadius?: number;
112
+ disabled?: boolean;
113
+ placeholder?: string;
114
+ shadowDisabled?: boolean;
115
+ leftIconClick?: () => void;
116
+ rightIconClick?: () => void;
117
+ accentColor?: string;
118
+ hoverBackground?: string;
119
+ padding?: string;
120
+ gap?: string;
121
+ border?: string;
122
+ boxShadow?: string;
123
+ fontSize?: string;
124
+ iconSize?: string;
125
+ checked?: boolean;
126
+ }
127
+ declare const KTextArea: React.FC<KTextAreaProps>;
128
+
99
129
  interface KSelectOption {
100
130
  label: string;
101
131
  value: number;
@@ -218,4 +248,4 @@ interface KCodeInputProps {
218
248
  }
219
249
  declare const KInput: React.FC<KCodeInputProps>;
220
250
 
221
- export { KButton, KInput as KCodeInput, KDropdown, KInput$1 as KInput, KLogo, KSelectDate, KSlider, KSliderLabel, KSpan, KTitleSpan, KTooltip };
251
+ export { KButton, KInput as KCodeInput, KDropdown, KInput$1 as KInput, KLogo, KSelectDate, KSlider, KSliderLabel, KSpan, KTextArea, KTitleSpan, KTooltip };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kahuna-base-react-components",
3
- "version": "0.2.21",
3
+ "version": "0.3.1",
4
4
  "description": "Kahuna Base React Components",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "homepage": "https://github.com/Kahuna-Music/kahuna-base-react-components#readme",
26
26
  "peerDependencies": {
27
- "react": "^18.2.0",
28
- "react-dom": "^18.2.0"
27
+ "react": "^17.0.2",
28
+ "react-dom": "^17.0.2"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@babel/core": "^7.24.0",
@@ -45,7 +45,7 @@
45
45
  "@storybook/react": "^7.6.17",
46
46
  "@storybook/react-vite": "^7.6.17",
47
47
  "@storybook/test": "^7.6.17",
48
- "@testing-library/react": "^14.2.1",
48
+ "@testing-library/react": "^12.1.5",
49
49
  "@types/jest": "^29.5.12",
50
50
  "@types/react": "^18.2.64",
51
51
  "autoprefixer": "^10.4.18",
@@ -66,6 +66,6 @@
66
66
  },
67
67
  "dependencies": {
68
68
  "react-date-picker": "^11.0.0",
69
- "react-select": "^5.8.0"
69
+ "react-select": "^4.3.1"
70
70
  }
71
71
  }
@@ -1,9 +1,11 @@
1
1
  import React, { useEffect, useState } from "react"
2
2
  import "../../main.css"
3
+ // @ts-ignore
3
4
  import Select, { MultiValue } from "react-select"
4
5
  // @ts-ignore
5
6
  import CheckIcon from "../../assets/check.svg"
6
7
  import KSpan from "../KSpan"
8
+ // @ts-ignore
7
9
  import { FilterOptionOption } from "react-select/dist/declarations/src/filters"
8
10
 
9
11
  export interface KSelectOption {
@@ -108,7 +110,7 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
108
110
  filterOption={customFilterOption}
109
111
  isClearable={isClearable}
110
112
  styles={{
111
- control: (baseStyles, state) => ({
113
+ control: (baseStyles: any, state: any) => ({
112
114
  ...baseStyles,
113
115
  background: "transparent !important",
114
116
  padding: "0px !important",
@@ -119,7 +121,7 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
119
121
  minHeight: "20px",
120
122
  border: "none"
121
123
  }),
122
- menu: (base) => ({
124
+ menu: (base: any) => ({
123
125
  ...base,
124
126
  borderRadius: 10,
125
127
  background: menuBackground,
@@ -129,16 +131,16 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
129
131
  paddingRight: 3,
130
132
  paddingLeft: 3
131
133
  }),
132
- menuList: (base) => ({
134
+ menuList: (base: any) => ({
133
135
  ...base,
134
136
  paddingTop: 0,
135
137
  paddingBottom: 0
136
138
  }),
137
- singleValue: (provided) => ({
139
+ singleValue: (provided: any) => ({
138
140
  ...provided,
139
141
  color: textColor
140
142
  }),
141
- option: (provided, state) => ({
143
+ option: (provided: any, state: any) => ({
142
144
  ...provided,
143
145
  display: "flex",
144
146
  alignItems: "center",
@@ -148,22 +150,22 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
148
150
  borderRadius: 10,
149
151
  color: "#111"
150
152
  }),
151
- valueContainer: (base) => ({
153
+ valueContainer: (base: any) => ({
152
154
  ...base,
153
155
  padding: 0
154
156
  }),
155
157
 
156
- input: (base) => ({
158
+ input: (base: any) => ({
157
159
  ...base,
158
160
  padding: 0,
159
161
  margin: 0,
160
162
  height: "20px"
161
163
  }),
162
- placeholder: (base) => ({
164
+ placeholder: (base: any) => ({
163
165
  ...base,
164
166
  margin: 0
165
167
  }),
166
- clearIndicator: (base) => ({
168
+ clearIndicator: (base: any) => ({
167
169
  ...base,
168
170
  padding: 0
169
171
  })
@@ -171,6 +173,7 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
171
173
  components={{
172
174
  IndicatorSeparator: () => null,
173
175
  DropdownIndicator: () => null,
176
+ //@ts-ignore
174
177
  SingleValue: ({ data, ...props }) => (
175
178
  <div className={`flex ${isEllipsis ? "w-full" : ""}`} style={{ position: "absolute" }}>
176
179
  {data.icon && !hideIcon && <img src={data.icon} className="mr-2" width={20} alt={"data-icon"} />}
@@ -178,7 +181,7 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
178
181
  </div>
179
182
  )
180
183
  }}
181
- onChange={(event) => {
184
+ onChange={(event: any) => {
182
185
  if (!event) {
183
186
  if (props.isClearable) {
184
187
  setSelectedOption(undefined)
package/src/index.ts CHANGED
@@ -3,6 +3,7 @@ import KSpan from "./components/KSpan"
3
3
  import KTitleSpan from "./components/KTitleSpan"
4
4
  import KLogo from "./components/KLogo"
5
5
  import KInput from "./components/KInput"
6
+ import KTextArea from "./components/KTextArea"
6
7
  import KDropdown from "./components/KDropdown"
7
8
  import KSlider from "./components/KSlider"
8
9
  import KSelectDate from "./components/KSelectDate"
@@ -12,5 +13,5 @@ import KCodeInput from "./components/KCodeInput"
12
13
 
13
14
 
14
15
  export {
15
- KButton, KSpan, KLogo, KTitleSpan, KInput, KDropdown, KSlider, KSelectDate, KTooltip, KSliderLabel, KCodeInput
16
+ KButton, KSpan, KLogo, KTitleSpan, KInput, KTextArea, KDropdown, KSlider, KSelectDate, KTooltip, KSliderLabel, KCodeInput
16
17
  }