@bouko/react 2.3.7 → 2.3.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.
Files changed (75) hide show
  1. package/dist/components/animate/configs.d.ts +136 -136
  2. package/dist/components/animate/configs.js +62 -62
  3. package/dist/components/animate/index.d.ts +12 -12
  4. package/dist/components/animate/index.js +7 -7
  5. package/dist/components/attachment.d.ts +2 -2
  6. package/dist/components/attachment.js +18 -18
  7. package/dist/components/button/load.d.ts +10 -10
  8. package/dist/components/button/load.js +35 -35
  9. package/dist/components/button.d.ts +10 -10
  10. package/dist/components/button.js +22 -22
  11. package/dist/components/carousel/index.d.ts +7 -7
  12. package/dist/components/carousel/index.js +15 -15
  13. package/dist/components/checkbox.d.ts +8 -8
  14. package/dist/components/checkbox.js +13 -13
  15. package/dist/components/dropdown/normal.d.ts +10 -10
  16. package/dist/components/dropdown/normal.js +19 -19
  17. package/dist/components/fade-carousel.d.ts +4 -4
  18. package/dist/components/fade-carousel.js +14 -14
  19. package/dist/components/field.d.ts +10 -10
  20. package/dist/components/field.js +10 -10
  21. package/dist/components/form/types.d.ts +38 -38
  22. package/dist/components/form/types.js +1 -1
  23. package/dist/components/heading/normal.d.ts +29 -29
  24. package/dist/components/heading/normal.js +22 -22
  25. package/dist/components/heading/page.d.ts +1 -1
  26. package/dist/components/heading/page.js +5 -5
  27. package/dist/components/index.d.ts +11 -12
  28. package/dist/components/index.js +11 -12
  29. package/dist/components/input.d.ts +11 -11
  30. package/dist/components/input.js +6 -6
  31. package/dist/components/layout/fade.d.ts +6 -6
  32. package/dist/components/layout/fade.js +14 -14
  33. package/dist/components/layout/flex.d.ts +16 -16
  34. package/dist/components/layout/flex.js +42 -40
  35. package/dist/components/layout/separator.d.ts +3 -3
  36. package/dist/components/layout/separator.js +5 -5
  37. package/dist/components/list/index.d.ts +2 -2
  38. package/dist/components/list/index.js +2 -2
  39. package/dist/components/list/item.d.ts +9 -9
  40. package/dist/components/list/item.js +7 -7
  41. package/dist/components/list/variants/bullet.d.ts +9 -9
  42. package/dist/components/list/variants/bullet.js +16 -16
  43. package/dist/components/list/variants/number.d.ts +10 -10
  44. package/dist/components/list/variants/number.js +18 -18
  45. package/dist/components/multiple-choice.d.ts +2 -2
  46. package/dist/components/multiple-choice.js +12 -13
  47. package/dist/components/search-bar.d.ts +12 -12
  48. package/dist/components/search-bar.js +14 -14
  49. package/dist/components/select.d.ts +6 -6
  50. package/dist/components/select.js +24 -25
  51. package/dist/components/text/badge.d.ts +11 -11
  52. package/dist/components/text/badge.js +18 -17
  53. package/dist/components/textarea.d.ts +7 -7
  54. package/dist/components/textarea.js +11 -11
  55. package/dist/components/upload/file.d.ts +8 -8
  56. package/dist/components/upload/file.js +15 -15
  57. package/dist/core/format.d.ts +3 -3
  58. package/dist/core/format.js +34 -34
  59. package/dist/core/functions.d.ts +13 -13
  60. package/dist/core/functions.js +79 -79
  61. package/dist/core/types.d.ts +11 -11
  62. package/dist/core/types.js +2 -2
  63. package/dist/hooks/audio/sound.d.ts +1 -0
  64. package/dist/hooks/audio/sound.js +6 -0
  65. package/dist/hooks/clock/interval.d.ts +1 -1
  66. package/dist/hooks/clock/interval.js +20 -20
  67. package/dist/hooks/element/container.d.ts +5 -4
  68. package/dist/hooks/element/container.js +7 -7
  69. package/dist/hooks/element/resize.d.ts +1 -1
  70. package/dist/hooks/element/resize.js +12 -12
  71. package/dist/hooks/index.d.ts +4 -3
  72. package/dist/hooks/index.js +4 -3
  73. package/dist/index.d.ts +14 -14
  74. package/dist/index.js +14 -14
  75. package/package.json +4 -2
@@ -1,7 +1,7 @@
1
- import { ReactNode } from "react";
2
- export type CarouselProps<T = ReactNode> = {
3
- container?: string;
4
- items: T[];
5
- style?: string;
6
- };
7
- export declare function Carousel({ container, items, style }: CarouselProps): import("react/jsx-runtime").JSX.Element;
1
+ import { ReactNode } from "react";
2
+ export declare type CarouselProps<T = ReactNode> = {
3
+ container?: string;
4
+ items: T[];
5
+ style?: string;
6
+ };
7
+ export declare function Carousel({ container, items, style }: CarouselProps): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,15 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useState, useEffect } from "react";
4
- import { AnimatePresence, motion } from "framer-motion";
5
- import { cn } from "@bouko/style";
6
- export function Carousel({ container, items, style }) {
7
- const [index, setIndex] = useState(0);
8
- useEffect(() => {
9
- const interval = setInterval(() => {
10
- setIndex((prev) => (prev + 1) % items.length);
11
- }, 3000);
12
- return () => clearInterval(interval);
13
- }, []);
14
- return (_jsx("div", { className: cn("flex items-center", container), children: _jsx(AnimatePresence, { mode: "wait", children: _jsx(motion.div, { transition: { duration: 0.5 }, initial: { opacity: 0, y: 5 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -5 }, layout: true, children: _jsx("div", { className: cn("w-full h-full", style), children: items[index] }) }, index) }) }));
15
- }
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useState, useEffect } from "react";
4
+ import { AnimatePresence, motion } from "framer-motion";
5
+ import { cn } from "@bouko/style";
6
+ export function Carousel({ container, items, style }) {
7
+ const [index, setIndex] = useState(0);
8
+ useEffect(() => {
9
+ const interval = setInterval(() => {
10
+ setIndex((prev) => (prev + 1) % items.length);
11
+ }, 3000);
12
+ return () => clearInterval(interval);
13
+ }, []);
14
+ return (_jsx("div", { className: cn("flex items-center", container), children: _jsx(AnimatePresence, { mode: "wait", children: _jsx(motion.div, { transition: { duration: 0.5 }, initial: { opacity: 0, y: 5 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -5 }, layout: true, children: _jsx("div", { className: cn("w-full h-full", style), children: items[index] }, void 0) }, index) }, void 0) }, void 0));
15
+ }
@@ -1,8 +1,8 @@
1
- type Props = {
2
- style?: string;
3
- label: string;
4
- value: boolean;
5
- update: (x: boolean) => void;
6
- };
7
- export default function Checkbox({ style, label, value, update }: Props): import("react/jsx-runtime").JSX.Element;
8
- export {};
1
+ declare type Props = {
2
+ style?: string;
3
+ label: string;
4
+ value: boolean;
5
+ update: (x: boolean) => void;
6
+ };
7
+ export default function Checkbox({ style, label, value, update }: Props): import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -1,13 +1,13 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import Check from "../assets/icons/check.svg";
3
- import { cn } from "@bouko/style";
4
- export default function Checkbox({ style, label, value, update }) {
5
- const isChecked = !!value;
6
- return (_jsxs("div", { className: cn(styles.container, style), children: [_jsx("div", { className: cn(styles.box, isChecked && "bg-accent"), onClick: () => update(!isChecked), children: isChecked && _jsx(Check, { className: styles.check }) }), _jsx("span", { className: styles.label, children: label })] }));
7
- }
8
- const styles = {
9
- container: "flex gap-3 items-center",
10
- box: "flex justify-center items-center size-4 min-w-4 hover:bg-accent border rounded border-border-light duration-200 cursor-pointer",
11
- check: "size-2 text-background",
12
- label: "text-xs text-primary-dark"
13
- };
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import Check from "../assets/icons/check.svg";
3
+ import { cn } from "@bouko/style";
4
+ export default function Checkbox({ style, label, value, update }) {
5
+ const isChecked = !!value;
6
+ return (_jsxs("div", { className: cn(styles.container, style), children: [_jsx("div", { className: cn(styles.box, isChecked && "bg-accent"), onClick: () => update(!isChecked), children: isChecked && _jsx(Check, { className: styles.check }, void 0) }, void 0), _jsx("span", { className: styles.label, children: label }, void 0)] }, void 0));
7
+ }
8
+ const styles = {
9
+ container: "flex gap-3 items-center",
10
+ box: "flex justify-center items-center size-4 min-w-4 hover:bg-accent border rounded border-border-light duration-200 cursor-pointer",
11
+ check: "size-2 text-background",
12
+ label: "text-xs text-primary-dark"
13
+ };
@@ -1,10 +1,10 @@
1
- import { ReactNode } from "react";
2
- type Option = {
3
- label: ReactNode;
4
- action: () => void;
5
- };
6
- export default function Dropdown({ options, children }: {
7
- options: Option[];
8
- children: ReactNode;
9
- }): import("react/jsx-runtime").JSX.Element;
10
- export {};
1
+ import { ReactNode } from "react";
2
+ declare type Option = {
3
+ label: ReactNode;
4
+ action: () => void;
5
+ };
6
+ export default function Dropdown({ options, children }: {
7
+ options: Option[];
8
+ children: ReactNode;
9
+ }): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,19 +1,19 @@
1
- "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useState } from "react";
4
- import { AnimatePresence, motion } from "framer-motion";
5
- export default function Dropdown({ options, children }) {
6
- const [isOpen, setOpen] = useState(false);
7
- const boom = (action) => {
8
- action();
9
- setOpen(false);
10
- };
11
- return (_jsxs("div", { className: styles.container, children: [_jsx("div", { onClick: () => setOpen(true), children: children }), _jsx(AnimatePresence, { children: isOpen && (_jsx(motion.div, { className: styles.dropdown, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, children: options.map(({ label, action }, i) => (_jsx("div", { className: "cursor-pointer duration-200 hover:brightness-115", onClick: () => boom(action), children: label }, i))) }, "dropdown")) })] }));
12
- }
13
- const styles = {
14
- container: "relative shrink-0",
15
- subcontainer: "flex flex-col gap-1 w-full",
16
- label: "text-xs text-slate-600",
17
- trigger: "flex justify-between items-center px-3 py-2 bg-slate-200/50 hover:bg-slate-200/80 border border-slate-300 outline-blue-500 rounded text-sm duration-200 cursor-pointer",
18
- dropdown: "absolute mt-2 z-50 flex flex-col items-end justify-end gap-1 w-full bg-slate-950 rounded border border-border-dark p-3 pr-4 text-sm max-h-46 overflow-y-auto"
19
- };
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useState } from "react";
4
+ import { AnimatePresence, motion } from "framer-motion";
5
+ export default function Dropdown({ options, children }) {
6
+ const [isOpen, setOpen] = useState(false);
7
+ const boom = (action) => {
8
+ action();
9
+ setOpen(false);
10
+ };
11
+ return (_jsxs("div", { className: styles.container, children: [_jsx("div", { onClick: () => setOpen(true), children: children }, void 0), _jsx(AnimatePresence, { children: isOpen && (_jsx(motion.div, { className: styles.dropdown, initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, children: options.map(({ label, action }, i) => (_jsx("div", { className: "cursor-pointer duration-200 hover:brightness-115", onClick: () => boom(action), children: label }, i))) }, "dropdown")) }, void 0)] }, void 0));
12
+ }
13
+ const styles = {
14
+ container: "relative shrink-0",
15
+ subcontainer: "flex flex-col gap-1 w-full",
16
+ label: "text-xs text-slate-600",
17
+ trigger: "flex justify-between items-center px-3 py-2 bg-slate-200/50 hover:bg-slate-200/80 border border-slate-300 outline-blue-500 rounded text-sm duration-200 cursor-pointer",
18
+ dropdown: "absolute mt-2 z-50 flex flex-col items-end justify-end gap-1 w-full bg-slate-950 rounded border border-border-dark p-3 pr-4 text-sm max-h-46 overflow-y-auto"
19
+ };
@@ -1,4 +1,4 @@
1
- import { type ReactNode } from "react";
2
- export default function FadeCarousel({ items }: {
3
- items: ReactNode[];
4
- }): import("react/jsx-runtime").JSX.Element;
1
+ import { type ReactNode } from "react";
2
+ export default function FadeCarousel({ items }: {
3
+ items: ReactNode[];
4
+ }): import("react/jsx-runtime").JSX.Element;
@@ -1,14 +1,14 @@
1
- "use client";
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import { useState, useEffect } from "react";
4
- import { AnimatePresence, motion } from "framer-motion";
5
- export default function FadeCarousel({ items }) {
6
- const [index, setIndex] = useState(0);
7
- useEffect(() => {
8
- const interval = setInterval(() => {
9
- setIndex((prev) => (prev + 1) % items.length);
10
- }, 2000);
11
- return () => clearInterval(interval);
12
- }, []);
13
- return (_jsx(AnimatePresence, { mode: "wait", children: _jsx(motion.div, { className: "absolute", transition: { duration: 0.5 }, initial: { opacity: 0, y: 5 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -5 }, children: items[index] }, index) }));
14
- }
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useState, useEffect } from "react";
4
+ import { AnimatePresence, motion } from "framer-motion";
5
+ export default function FadeCarousel({ items }) {
6
+ const [index, setIndex] = useState(0);
7
+ useEffect(() => {
8
+ const interval = setInterval(() => {
9
+ setIndex((prev) => (prev + 1) % items.length);
10
+ }, 2000);
11
+ return () => clearInterval(interval);
12
+ }, []);
13
+ return (_jsx(AnimatePresence, { mode: "wait", children: _jsx(motion.div, { className: "absolute", transition: { duration: 0.5 }, initial: { opacity: 0, y: 5 }, animate: { opacity: 1, y: 0 }, exit: { opacity: 0, y: -5 }, children: items[index] }, index) }, void 0));
14
+ }
@@ -1,10 +1,10 @@
1
- import type { InputHTMLAttributes, ReactNode } from "react";
2
- type Props = InputHTMLAttributes<HTMLInputElement> & {
3
- label?: string;
4
- style?: string;
5
- required?: boolean;
6
- note?: ReactNode;
7
- children: ReactNode;
8
- };
9
- export default function Field({ style, label, required, note, children }: Props): import("react/jsx-runtime").JSX.Element;
10
- export {};
1
+ import type { InputHTMLAttributes, ReactNode } from "react";
2
+ declare type Props = InputHTMLAttributes<HTMLInputElement> & {
3
+ label?: string;
4
+ style?: string;
5
+ required?: boolean;
6
+ note?: ReactNode;
7
+ children: ReactNode;
8
+ };
9
+ export default function Field({ style, label, required, note, children }: Props): import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -1,10 +1,10 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from "@bouko/style";
3
- export default function Field({ style, label, required = true, note, children }) {
4
- return (_jsxs("div", { className: cn(styles.container, style), children: [label && _jsxs("span", { className: styles.label, children: [label, " ", !required ? _jsx("span", { className: "italic text-slate-400", children: "(optional)" }) : ""] }), children, note && _jsx("span", { className: styles.note, children: note })] }));
5
- }
6
- const styles = {
7
- container: "flex flex-col shrink-0 gap-1 w-full overflow-hidden",
8
- label: "text-xs text-primary-dark",
9
- note: "mt-1 text-xs text-slate-500 whitespace-pre-line"
10
- };
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn } from "@bouko/style";
3
+ export default function Field({ style, label, required = true, note, children }) {
4
+ return (_jsxs("div", { className: cn(styles.container, style), children: [label && _jsxs("span", { className: styles.label, children: [label, " ", !required ? _jsx("span", { className: "italic text-slate-400", children: "(optional)" }, void 0) : ""] }, void 0), children, note && _jsx("span", { className: styles.note, children: note }, void 0)] }, void 0));
5
+ }
6
+ const styles = {
7
+ container: "flex flex-col shrink-0 gap-1 w-full overflow-hidden",
8
+ label: "text-xs text-primary-dark",
9
+ note: "mt-1 text-xs text-slate-500 whitespace-pre-line"
10
+ };
@@ -1,38 +1,38 @@
1
- import type { ReactNode, Dispatch, SetStateAction } from "react";
2
- export type SetState<T> = Dispatch<SetStateAction<T>>;
3
- export type FormSection<T> = {
4
- data: T;
5
- update: SetState<T>;
6
- setField: (x: string, value: unknown) => void;
7
- clear: () => void;
8
- };
9
- export type FormBuilderField<T = unknown> = (Omit<Field<T>, "value" | "update"> & {
10
- id: string;
11
- element: string;
12
- rows?: number;
13
- placeholder?: string;
14
- options?: Option[];
15
- })[][];
16
- export type Field<T, K = string> = {
17
- id?: string;
18
- label?: string;
19
- style?: string;
20
- value?: K;
21
- update: SetState<T>;
22
- required?: boolean;
23
- disabled?: boolean;
24
- note?: ReactNode;
25
- };
26
- export type Option = {
27
- id: string;
28
- label?: string;
29
- active?: boolean;
30
- select?: () => void;
31
- };
32
- export type OptionField<T> = Field<T> & {
33
- options: Option[];
34
- };
35
- export type Form<T> = {
36
- data: T;
37
- };
38
- export type FormSubmit<T> = (data: T, clear?: () => void) => Promise<void>;
1
+ import type { ReactNode, Dispatch, SetStateAction } from "react";
2
+ export declare type SetState<T> = Dispatch<SetStateAction<T>>;
3
+ export declare type FormSection<T> = {
4
+ data: T;
5
+ update: SetState<T>;
6
+ setField: (x: string, value: unknown) => void;
7
+ clear: () => void;
8
+ };
9
+ export declare type FormBuilderField<T = unknown> = (Omit<Field<T>, "value" | "update"> & {
10
+ id: string;
11
+ element: string;
12
+ rows?: number;
13
+ placeholder?: string;
14
+ options?: Option[];
15
+ })[][];
16
+ export declare type Field<T, K = string> = {
17
+ id?: string;
18
+ label?: string;
19
+ style?: string;
20
+ value?: K;
21
+ update: SetState<T>;
22
+ required?: boolean;
23
+ disabled?: boolean;
24
+ note?: ReactNode;
25
+ };
26
+ export declare type Option = {
27
+ id: string;
28
+ label?: string;
29
+ active?: boolean;
30
+ select?: () => void;
31
+ };
32
+ export declare type OptionField<T> = Field<T> & {
33
+ options: Option[];
34
+ };
35
+ export declare type Form<T> = {
36
+ data: T;
37
+ };
38
+ export declare type FormSubmit<T> = (data: T, clear?: () => void) => Promise<void>;
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,29 +1,29 @@
1
- import { ReactNode } from "react";
2
- type Props = {
3
- badge?: string;
4
- title: ReactNode;
5
- subtitle?: ReactNode;
6
- style?: Styles;
7
- };
8
- type Styles = {
9
- container?: string;
10
- badge?: string;
11
- title?: string;
12
- subtitle?: string;
13
- };
14
- /**
15
- * Text heading with badge, title, subtitle.
16
- *
17
- * @param {string} badge - Little note above the title (optional).
18
- * @param {ReactNode} title - Main title content.
19
- * @param {ReactNode} subtitle - Subtitle content (optional).
20
- * @param {Styles} style - Additional styles (optional).
21
- **/
22
- export default function Heading({ badge, title, subtitle, style }: Props): import("react/jsx-runtime").JSX.Element;
23
- export {};
24
- /**
25
- * Problems
26
- *
27
- * - Perfect `Badge`
28
- * - Long `subtitle` style
29
- **/
1
+ import { ReactNode } from "react";
2
+ declare type Props = {
3
+ badge?: string;
4
+ title: ReactNode;
5
+ subtitle?: ReactNode;
6
+ style?: Styles;
7
+ };
8
+ declare type Styles = {
9
+ container?: string;
10
+ badge?: string;
11
+ title?: string;
12
+ subtitle?: string;
13
+ };
14
+ /**
15
+ * Text heading with badge, title, subtitle.
16
+ *
17
+ * @param {string} badge - Little note above the title (optional).
18
+ * @param {ReactNode} title - Main title content.
19
+ * @param {ReactNode} subtitle - Subtitle content (optional).
20
+ * @param {Styles} style - Additional styles (optional).
21
+ **/
22
+ export default function Heading({ badge, title, subtitle, style }: Props): import("react/jsx-runtime").JSX.Element;
23
+ export {};
24
+ /**
25
+ * Problems
26
+ *
27
+ * - Perfect `Badge`
28
+ * - Long `subtitle` style
29
+ **/
@@ -1,22 +1,22 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { mergeStyles } from "@bouko/style";
3
- import { RowBox, ColumnBox } from "../layout/flex";
4
- import { Badge } from "../text/badge";
5
- /**
6
- * Text heading with badge, title, subtitle.
7
- *
8
- * @param {string} badge - Little note above the title (optional).
9
- * @param {ReactNode} title - Main title content.
10
- * @param {ReactNode} subtitle - Subtitle content (optional).
11
- * @param {Styles} style - Additional styles (optional).
12
- **/
13
- export default function Heading({ badge, title, subtitle, style = {} }) {
14
- const styles = mergeStyles(base, style);
15
- return (_jsxs(ColumnBox, { style: styles.container, children: [_jsx(Badge, { style: styles.badge, children: badge }), _jsx(RowBox, { style: styles.title, children: title }), _jsx(RowBox, { style: styles.subtitle, children: subtitle })] }));
16
- }
17
- const base = {
18
- container: "items-center",
19
- badge: "mb-2",
20
- title: "items-center gap-2 text-xl sm:text-2xl 2xl:text-3xl font-bold text-primary",
21
- subtitle: "items-center gap-2 max-sm:text-sm 2xl:text-lg text-center text-primary-light dark:text-primary-dark"
22
- };
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { mergeStyles } from "@bouko/style";
3
+ import { RowBox, ColumnBox } from "../layout/flex";
4
+ import { Badge } from "../text/badge";
5
+ /**
6
+ * Text heading with badge, title, subtitle.
7
+ *
8
+ * @param {string} badge - Little note above the title (optional).
9
+ * @param {ReactNode} title - Main title content.
10
+ * @param {ReactNode} subtitle - Subtitle content (optional).
11
+ * @param {Styles} style - Additional styles (optional).
12
+ **/
13
+ export default function Heading({ badge, title, subtitle, style = {} }) {
14
+ const styles = mergeStyles(base, style);
15
+ return (_jsxs(ColumnBox, { style: styles.container, children: [_jsx(Badge, { style: styles.badge, children: badge }, void 0), _jsx(RowBox, { style: styles.title, children: title }, void 0), _jsx(RowBox, { style: styles.subtitle, children: subtitle }, void 0)] }, void 0));
16
+ }
17
+ const base = {
18
+ container: "items-center",
19
+ badge: "mb-2",
20
+ title: "items-center gap-2 text-xl sm:text-2xl 2xl:text-3xl font-bold text-primary",
21
+ subtitle: "items-center gap-2 max-sm:text-sm 2xl:text-lg text-center text-primary-light dark:text-primary-dark"
22
+ };
@@ -1 +1 @@
1
- export default function PageHeading(): import("react/jsx-runtime").JSX.Element;
1
+ export default function PageHeading(): import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
- // bring from unvault
3
- export default function PageHeading() {
4
- return (_jsx(_Fragment, {}));
5
- }
1
+ import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
+ // bring from unvault
3
+ export default function PageHeading() {
4
+ return (_jsx(_Fragment, {}, void 0));
5
+ }
@@ -1,12 +1,11 @@
1
- export { default as Separator } from "./layout/separator";
2
- export { default as FadeBox } from "./layout/fade";
3
- export { default as Heading } from "./heading/normal";
4
- export { default as PageHeading } from "./heading/page";
5
- export * from "./layout/flex";
6
- export { default as LoadButton } from "./button/load";
7
- export { default as Badge } from "./text/badge";
8
- export { default as Dropdown } from "./dropdown/normal";
9
- export { default as FileUploader } from "./upload/file";
10
- export * from "./list";
11
- export * from "./form";
12
- export * from "./carousel";
1
+ export { default as Separator } from "./layout/separator";
2
+ export { default as FadeBox } from "./layout/fade";
3
+ export { default as Heading } from "./heading/normal";
4
+ export { default as PageHeading } from "./heading/page";
5
+ export * from "./layout/flex";
6
+ export { default as LoadButton } from "./button/load";
7
+ export { default as Badge } from "./text/badge";
8
+ export { default as Dropdown } from "./dropdown/normal";
9
+ export { default as FileUploader } from "./upload/file";
10
+ export * from "./list";
11
+ export * from "./carousel";
@@ -1,12 +1,11 @@
1
- export { default as Separator } from "./layout/separator";
2
- export { default as FadeBox } from "./layout/fade";
3
- export { default as Heading } from "./heading/normal";
4
- export { default as PageHeading } from "./heading/page";
5
- export * from "./layout/flex";
6
- export { default as LoadButton } from "./button/load";
7
- export { default as Badge } from "./text/badge";
8
- export { default as Dropdown } from "./dropdown/normal";
9
- export { default as FileUploader } from "./upload/file";
10
- export * from "./list";
11
- export * from "./form";
12
- export * from "./carousel";
1
+ export { default as Separator } from "./layout/separator";
2
+ export { default as FadeBox } from "./layout/fade";
3
+ export { default as Heading } from "./heading/normal";
4
+ export { default as PageHeading } from "./heading/page";
5
+ export * from "./layout/flex";
6
+ export { default as LoadButton } from "./button/load";
7
+ export { default as Badge } from "./text/badge";
8
+ export { default as Dropdown } from "./dropdown/normal";
9
+ export { default as FileUploader } from "./upload/file";
10
+ export * from "./list";
11
+ export * from "./carousel";
@@ -1,11 +1,11 @@
1
- import type { Field as FieldProps } from "./form/types";
2
- type Props<T> = FieldProps<T> & {
3
- placeholder?: string;
4
- styles?: {
5
- container?: string;
6
- input?: string;
7
- };
8
- disabled?: boolean;
9
- };
10
- export default function Input({ id, styles, label, required, note, style, value, update, ...props }: Props<string>): import("react/jsx-runtime").JSX.Element;
11
- export {};
1
+ import type { Field as FieldProps } from "./form/types";
2
+ declare type Props<T> = FieldProps<T> & {
3
+ placeholder?: string;
4
+ styles?: {
5
+ container?: string;
6
+ input?: string;
7
+ };
8
+ disabled?: boolean;
9
+ };
10
+ export default function Input({ id, styles, label, required, note, style, value, update, ...props }: Props<string>): import("react/jsx-runtime").JSX.Element;
11
+ export {};
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import Field from "./field";
3
- import { cn } from "@bouko/style";
4
- export default function Input({ id, styles, label, required = true, note, style, value, update, ...props }) {
5
- return (_jsx(Field, { style: styles?.container, label: label, required: required, note: note, children: _jsx("input", { className: cn("px-3 py-2 bg-input border border-outline duration-200 focus:border-outline-light outline-none rounded text-sm disabled:brightness-90 disabled:cursor-not-allowed", styles?.input), onChange: ({ target: { value } }) => update(value), value: value ?? "", ...props }) }));
6
- }
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Field from "./field";
3
+ import { cn } from "@bouko/style";
4
+ export default function Input({ id, styles, label, required = true, note, style, value, update, ...props }) {
5
+ return (_jsx(Field, { style: styles?.container, label: label, required: required, note: note, children: _jsx("input", { className: cn("px-3 py-2 bg-input border border-outline duration-200 focus:border-outline-light outline-none rounded text-sm disabled:brightness-90 disabled:cursor-not-allowed", styles?.input), onChange: ({ target: { value } }) => update(value), value: value ?? "", ...props }, void 0) }, void 0));
6
+ }
@@ -1,6 +1,6 @@
1
- import { Component } from "../../core/types";
2
- type Props = Component & {
3
- gradient?: string;
4
- };
5
- export default function FadeBox({ style, gradient, children }: Props): import("react/jsx-runtime").JSX.Element;
6
- export {};
1
+ import { Component } from "../../core/types";
2
+ declare type Props = Component & {
3
+ gradient?: string;
4
+ };
5
+ export default function FadeBox({ style, gradient, children }: Props): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1,14 +1,14 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn, tv } from "@bouko/style";
3
- export default function FadeBox({ style, gradient, children }) {
4
- const direction = "left";
5
- return (_jsxs("div", { className: cn("relative", style), children: [children, _jsx("div", { className: cn(styles({ direction }), gradient) })] }));
6
- }
7
- const styles = tv({
8
- base: "absolute from-background",
9
- variants: {
10
- direction: {
11
- left: "top-0 right-0 w-12 h-full bg-gradient-to-l"
12
- }
13
- }
14
- });
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cn, tv } from "@bouko/style";
3
+ export default function FadeBox({ style, gradient, children }) {
4
+ const direction = "left";
5
+ return (_jsxs("div", { className: cn("relative", style), children: [children, _jsx("div", { className: cn(styles({ direction }), gradient) }, void 0)] }, void 0));
6
+ }
7
+ const styles = tv({
8
+ base: "absolute from-background",
9
+ variants: {
10
+ direction: {
11
+ left: "top-0 right-0 w-12 h-full bg-gradient-to-l"
12
+ }
13
+ }
14
+ });
@@ -1,16 +1,16 @@
1
- import { Component } from "../../core/types";
2
- type Props = Component & {
3
- center?: boolean;
4
- centerX?: boolean;
5
- centerY?: boolean;
6
- };
7
- /**
8
- * Flex containers with configurable alignment and styling.
9
- *
10
- * @param {string} style - Additional styles for container.
11
- * @param {ReactNode} children - Child elements to render inside the row.
12
- * @param {Props} opts - Variant options for styling.
13
- **/
14
- export declare const RowBox: ({ style, children, ...opts }: Props) => import("react/jsx-runtime").JSX.Element | undefined;
15
- export declare const ColumnBox: ({ style, children, ...opts }: Props) => import("react/jsx-runtime").JSX.Element | undefined;
16
- export {};
1
+ import { Component } from "../../core/types";
2
+ declare type Props = Component & {
3
+ center?: boolean;
4
+ centerX?: boolean;
5
+ centerY?: boolean;
6
+ };
7
+ /**
8
+ * Flex containers with configurable alignment and styling.
9
+ *
10
+ * @param {string} style - Additional styles for container.
11
+ * @param {ReactNode} children - Child elements to render inside the row.
12
+ * @param {Props} opts - Variant options for styling.
13
+ **/
14
+ export declare const RowBox: ({ style, children, ...opts }: Props) => import("react/jsx-runtime").JSX.Element | null;
15
+ export declare const ColumnBox: ({ style, children, ...opts }: Props) => import("react/jsx-runtime").JSX.Element | null;
16
+ export {};