@bouko/react 1.9.5 → 1.9.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/components/badge.d.ts +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/layout/heading.d.ts +3 -16
- package/dist/components/layout/heading.js +6 -37
- package/dist/core/format.d.ts +0 -2
- package/dist/core/format.js +0 -2
- package/dist/next/src/components/layouts/locked.d.ts +12 -0
- package/dist/next/src/components/layouts/locked.js +15 -0
- package/dist/react/src/components/animate/configs.d.ts +136 -0
- package/dist/react/src/components/animate/configs.js +62 -0
- package/dist/react/src/components/animate/index.d.ts +12 -0
- package/dist/react/src/components/animate/index.js +7 -0
- package/dist/react/src/components/attachment.d.ts +2 -0
- package/dist/react/src/components/attachment.js +19 -0
- package/dist/react/src/components/button.d.ts +10 -0
- package/dist/react/src/components/button.js +22 -0
- package/dist/react/src/components/checkbox.d.ts +8 -0
- package/dist/react/src/components/checkbox.js +13 -0
- package/dist/react/src/components/dropdown/normal.d.ts +10 -0
- package/dist/react/src/components/dropdown/normal.js +19 -0
- package/dist/react/src/components/fade-carousel.d.ts +4 -0
- package/dist/react/src/components/fade-carousel.js +14 -0
- package/dist/react/src/components/field.d.ts +10 -0
- package/dist/react/src/components/field.js +10 -0
- package/dist/react/src/components/form/footer.d.ts +9 -0
- package/dist/react/src/components/form/footer.js +17 -0
- package/dist/react/src/components/form/functions.d.ts +8 -0
- package/dist/react/src/components/form/functions.js +27 -0
- package/dist/react/src/components/form/index.d.ts +26 -0
- package/dist/react/src/components/form/index.js +37 -0
- package/dist/react/src/components/form/types.d.ts +29 -0
- package/dist/react/src/components/form/types.js +1 -0
- package/dist/react/src/components/index.d.ts +8 -0
- package/dist/react/src/components/index.js +8 -0
- package/dist/react/src/components/input.d.ts +11 -0
- package/dist/react/src/components/input.js +7 -0
- package/dist/react/src/components/layout/flex.d.ts +23 -0
- package/dist/react/src/components/layout/flex.js +34 -0
- package/dist/react/src/components/layout/heading.d.ts +24 -0
- package/dist/react/src/components/layout/heading.js +45 -0
- package/dist/react/src/components/layout/separator.d.ts +3 -0
- package/dist/react/src/components/layout/separator.js +5 -0
- package/dist/react/src/components/list/index.d.ts +2 -0
- package/dist/react/src/components/list/index.js +2 -0
- package/dist/react/src/components/list/item.d.ts +9 -0
- package/dist/react/src/components/list/item.js +7 -0
- package/dist/react/src/components/list/variants/bullet.d.ts +9 -0
- package/dist/react/src/components/list/variants/bullet.js +16 -0
- package/dist/react/src/components/list/variants/number.d.ts +10 -0
- package/dist/react/src/components/list/variants/number.js +18 -0
- package/dist/react/src/components/multiple-choice.d.ts +2 -0
- package/dist/react/src/components/multiple-choice.js +13 -0
- package/dist/react/src/components/search-bar.d.ts +9 -0
- package/dist/react/src/components/search-bar.js +14 -0
- package/dist/react/src/components/select.d.ts +6 -0
- package/dist/react/src/components/select.js +24 -0
- package/dist/react/src/components/text/badge.d.ts +9 -0
- package/dist/react/src/components/text/badge.js +16 -0
- package/dist/react/src/components/textarea.d.ts +7 -0
- package/dist/react/src/components/textarea.js +12 -0
- package/dist/react/src/components/upload/file.d.ts +8 -0
- package/dist/react/src/components/upload/file.js +15 -0
- package/dist/react/src/core/format.d.ts +3 -0
- package/dist/react/src/core/format.js +34 -0
- package/dist/react/src/core/functions.d.ts +3 -0
- package/dist/react/src/core/functions.js +41 -0
- package/dist/react/src/core/types.d.ts +10 -0
- package/dist/react/src/core/types.js +1 -0
- package/dist/react/src/hooks/element/container.d.ts +4 -0
- package/dist/react/src/hooks/element/container.js +7 -0
- package/dist/react/src/hooks/element/resize.d.ts +1 -0
- package/dist/react/src/hooks/element/resize.js +12 -0
- package/dist/react/src/hooks/index.d.ts +2 -0
- package/dist/react/src/hooks/index.js +2 -0
- package/dist/react/src/index.d.ts +14 -0
- package/dist/react/src/index.js +14 -0
- package/package.json +1 -1
- package/dist/components/search/index.d.ts +0 -6
- package/dist/components/search/index.js +0 -12
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect } from "react";
|
|
3
|
+
export default function useResizeObserver(element, action) {
|
|
4
|
+
useEffect(() => {
|
|
5
|
+
if (!element)
|
|
6
|
+
return;
|
|
7
|
+
const observer = new ResizeObserver(action);
|
|
8
|
+
observer.observe(element);
|
|
9
|
+
action();
|
|
10
|
+
return () => observer.disconnect();
|
|
11
|
+
}, [element, action]);
|
|
12
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { default as Input } from "./components/input";
|
|
2
|
+
export { default as TextArea } from "./components/textarea";
|
|
3
|
+
export { default as Select } from "./components/select";
|
|
4
|
+
export { default as MultipleChoice } from "./components/multiple-choice";
|
|
5
|
+
export { default as Attachment } from "./components/attachment";
|
|
6
|
+
export { default as CheckBox } from "./components/checkbox";
|
|
7
|
+
export { default as FadeCarousel } from "./components/fade-carousel";
|
|
8
|
+
export * from "./components";
|
|
9
|
+
export * from "./components/button";
|
|
10
|
+
export * from "./components/search-bar";
|
|
11
|
+
export * from "./core/types";
|
|
12
|
+
export * from "./core/functions";
|
|
13
|
+
export * from "./core/format";
|
|
14
|
+
export * from "./hooks";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { default as Input } from "./components/input";
|
|
2
|
+
export { default as TextArea } from "./components/textarea";
|
|
3
|
+
export { default as Select } from "./components/select";
|
|
4
|
+
export { default as MultipleChoice } from "./components/multiple-choice";
|
|
5
|
+
export { default as Attachment } from "./components/attachment";
|
|
6
|
+
export { default as CheckBox } from "./components/checkbox";
|
|
7
|
+
export { default as FadeCarousel } from "./components/fade-carousel";
|
|
8
|
+
export * from "./components";
|
|
9
|
+
export * from "./components/button";
|
|
10
|
+
export * from "./components/search-bar";
|
|
11
|
+
export * from "./core/types";
|
|
12
|
+
export * from "./core/functions";
|
|
13
|
+
export * from "./core/format";
|
|
14
|
+
export * from "./hooks";
|
package/package.json
CHANGED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useState } from "react";
|
|
4
|
-
import { RowBox } from "../flex";
|
|
5
|
-
import { Button } from "../button";
|
|
6
|
-
export default function SearchBar({ placeholder, action }) {
|
|
7
|
-
const [query, search] = useState("");
|
|
8
|
-
return (_jsxs(RowBox, { style: styles.container, children: [_jsxs("div", { className: "relative grow", children: [_jsx("input", { className: "w-full outline-none lowercase text-lg placeholder-slate-500 tracking-wide", placeholder: placeholder, value: query, onChange: (e) => search(e.target.value), onKeyUp: (e) => e.key === "Enter" ? action(query) : null }), _jsx("div", { className: "absolute top-0 right-0 w-12 h-full bg-gradient-to-l from-slate-950" })] }), _jsx(Button, { size: "sm", style: "gap-[0.4rem] font-extrabold py-1 px-3 font-mono", onClick: () => action(query), children: "GO" })] }));
|
|
9
|
-
}
|
|
10
|
-
const styles = {
|
|
11
|
-
container: "items-center gap-6 w-xl pl-5 pr-4 py-3 bg-slate-950 border border-border rounded-md"
|
|
12
|
-
};
|