@bouko/react 2.5.9 → 2.6.0

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.
@@ -29,7 +29,7 @@ export default function Input({ variant, style, value, update, onEnter, disabled
29
29
  return (_jsx(Field, { ...props, children: _jsx("input", { className: cn(styles({ variant }), style), placeholder: placeholder, value: value, onChange: ({ target: { value } }) => update?.(value), onKeyUp: ({ key }) => key === "Enter" && value ? onEnter?.(value) : null, disabled: disabled }) }));
30
30
  }
31
31
  const styles = tv({
32
- base: "px-3 py-2 duration-200 rounded text-sm placeholder:text-primary-darker text-primary disabled:brightness-90 disabled:cursor-not-allowed",
32
+ base: "px-3 py-2 duration-200 rounded text-xs sm:text-sm placeholder:text-primary-darker text-primary disabled:brightness-90 disabled:cursor-not-allowed",
33
33
  defaultVariants: { variant: "normal" },
34
34
  variants: {
35
35
  variant: {
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useState } from "react";
4
- import { RowBox } from "./layout/flex";
5
- import { FadeBox } from "./layout/fade";
6
- import { Button } from "./button/normal";
7
4
  import Input from "./input";
5
+ import FadeBox from "./layout/fade";
6
+ import { RowBox } from "./layout/flex";
7
+ import Button from "./button/normal";
8
8
  import { mergeStyles } from "@bouko/style";
9
9
  export function SearchBar({ style = {}, placeholder, trigger, submit }) {
10
10
  const [query, setQuery] = useState("");
@@ -17,6 +17,6 @@ export function SearchBar({ style = {}, placeholder, trigger, submit }) {
17
17
  return (_jsxs(RowBox, { style: styles.container, children: [_jsx(FadeBox, { style: "grow", gradient: "from-slate-950", children: _jsx(Input, { variant: "ghost", style: styles.input, placeholder: placeholder, value: query, update: setQuery, onEnter: search }) }), trigger && (_jsx(Button, { variant: "ghost", style: style?.trigger, action: search, children: trigger }))] }));
18
18
  }
19
19
  const base = {
20
- container: "items-center gap-5 w-xl max-w-full pl-5 pr-4 py-3 bg-slate-950 border border-border rounded-md",
21
- input: "text-lg tracking-wide"
20
+ container: "items-center gap-3 sm:gap-5 w-xl max-w-full pl-4 sm:pl-5 pr-2 sm:pr-4 py-2 sm:py-3 bg-slate-950 border border-border rounded-md",
21
+ input: "text-base sm:text-lg tracking-wide"
22
22
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
 
3
3
  "name": "@bouko/react",
4
- "version": "2.5.9",
4
+ "version": "2.6.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "license": "MIT",