kahuna-base-react-components 1.2.7 → 1.2.8
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/components/KDropdown/KDropdown.d.ts +1 -0
- package/dist/index.esm.js +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/assets/search.svg +3 -0
- package/src/components/KDropdown/KDropdown.tsx +4 -1
- package/src/main.css +1 -1
package/dist/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
2
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.5 3C5.46243 3 3 5.46243 3 8.5C3 11.5376 5.46243 14 8.5 14C9.65751 14 10.7315 13.6424 11.6176 13.0317L15.2929 16.7071C15.6834 17.0976 16.3166 17.0976 16.7071 16.7071C17.0976 16.3165 17.0976 15.6834 16.7071 15.2928L13.0318 11.6175C13.6424 10.7315 14 9.65749 14 8.5C14 5.46243 11.5376 3 8.5 3ZM5 8.5C5 6.567 6.567 5 8.5 5C10.433 5 12 6.567 12 8.5C12 10.433 10.433 12 8.5 12C6.567 12 5 10.433 5 8.5Z" fill="black"/>
|
|
3
|
+
</svg>
|
|
@@ -52,6 +52,7 @@ export interface KDropdownProps {
|
|
|
52
52
|
allowContainerShrink?: boolean // allows container to shrink if label is smaller than width, width should be fixed value
|
|
53
53
|
border?: string
|
|
54
54
|
activeBorder?: string
|
|
55
|
+
onInputChange?: (text: string) => void
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
const KDropdown: React.FC<KDropdownProps> = (props) => {
|
|
@@ -72,7 +73,6 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
|
|
|
72
73
|
|
|
73
74
|
setBackground(background)
|
|
74
75
|
setBorder(border)
|
|
75
|
-
|
|
76
76
|
}, [props.selected])
|
|
77
77
|
|
|
78
78
|
const width = props.width || "100%"
|
|
@@ -234,6 +234,9 @@ const KDropdown: React.FC<KDropdownProps> = (props) => {
|
|
|
234
234
|
placeholder={props.placeholder || ""}
|
|
235
235
|
options={props.options}
|
|
236
236
|
className={"k-dropdown"}
|
|
237
|
+
onInputChange={(text) => {
|
|
238
|
+
if (props.onInputChange) props.onInputChange(text)
|
|
239
|
+
}}
|
|
237
240
|
onBlur={() => {
|
|
238
241
|
if (props.onBlur) props.onBlur(selectedOption)
|
|
239
242
|
}}
|
package/src/main.css
CHANGED