@divayth/brick-ui 0.7.0 → 0.9.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.
Files changed (39) hide show
  1. package/dist/app/Provider.d.ts +2 -0
  2. package/dist/app/Provider.d.ts.map +1 -1
  3. package/dist/index.js +74 -72
  4. package/dist/lib/locale.d.ts +2 -0
  5. package/dist/lib/locale.d.ts.map +1 -1
  6. package/dist/lib/locale.js +2 -0
  7. package/dist/styles.css +1 -1
  8. package/dist/ui/DropdownMenu/DropdownMenu.d.ts +17 -0
  9. package/dist/ui/DropdownMenu/DropdownMenu.d.ts.map +1 -0
  10. package/dist/ui/DropdownMenu/DropdownMenu.js +34 -0
  11. package/dist/ui/DropdownMenu/DropdownMenu.module.css.js +11 -0
  12. package/dist/ui/DropdownMenu/index.d.ts +2 -0
  13. package/dist/ui/DropdownMenu/index.d.ts.map +1 -0
  14. package/dist/ui/FeedList/FeedList.d.ts +3 -1
  15. package/dist/ui/FeedList/FeedList.d.ts.map +1 -1
  16. package/dist/ui/FeedList/FeedList.js +32 -28
  17. package/dist/ui/IconButton/IconButton.d.ts +2 -1
  18. package/dist/ui/IconButton/IconButton.d.ts.map +1 -1
  19. package/dist/ui/IconButton/IconButton.js +61 -56
  20. package/dist/ui/IconButton/IconButton.module.css.js +24 -24
  21. package/dist/ui/IconButton/index.d.ts +2 -0
  22. package/dist/ui/IconButton/index.d.ts.map +1 -0
  23. package/dist/ui/Modal/Modal.d.ts +1 -0
  24. package/dist/ui/Modal/Modal.d.ts.map +1 -1
  25. package/dist/ui/Modal/Modal.js +45 -45
  26. package/dist/ui/Text/Text.js +7 -7
  27. package/dist/ui/Text/index.d.ts +2 -0
  28. package/dist/ui/Text/index.d.ts.map +1 -0
  29. package/dist/ui/Textarea/Textarea.d.ts +1 -1
  30. package/dist/ui/Textarea/Textarea.d.ts.map +1 -1
  31. package/dist/ui/Textarea/Textarea.js +54 -50
  32. package/dist/ui/Textarea/index.d.ts +2 -0
  33. package/dist/ui/Textarea/index.d.ts.map +1 -0
  34. package/dist/ui/Tooltip/Tooltip.d.ts +7 -4
  35. package/dist/ui/Tooltip/Tooltip.d.ts.map +1 -1
  36. package/dist/ui/Tooltip/Tooltip.js +59 -38
  37. package/dist/ui/index.d.ts +4 -3
  38. package/dist/ui/index.d.ts.map +1 -1
  39. package/package.json +7 -7
@@ -1,44 +1,48 @@
1
1
  "use client";
2
- import { jsx as e, jsxs as N } from "react/jsx-runtime";
3
- import { createElement as h } from "react";
4
- import { CircularLoading as m } from "../CircularLoading/CircularLoading.js";
5
- import { Flex as o } from "../Flex/Flex.js";
6
- import { NoData as x } from "../NoData/NoData.js";
7
- import { NoDataIcon as y } from "../NoData/NoDataIcon.js";
8
- import { useIntersectionObserver as C } from "../../lib/useIntersectionObserver.js";
9
- const S = ({
10
- component: s,
11
- componentProps: r,
2
+ import { jsx as r, jsxs as h } from "react/jsx-runtime";
3
+ import { createElement as x } from "react";
4
+ import { CircularLoading as n } from "../CircularLoading/CircularLoading.js";
5
+ import { Flex as s } from "../Flex/Flex.js";
6
+ import { GAP_SX as y } from "../Flex/constants.js";
7
+ import { NoData as C } from "../NoData/NoData.js";
8
+ import { NoDataIcon as j } from "../NoData/NoDataIcon.js";
9
+ import { cn as v } from "../../lib/cn.js";
10
+ import { useIntersectionObserver as S } from "../../lib/useIntersectionObserver.js";
11
+ const L = ({
12
+ component: f,
13
+ componentProps: e,
12
14
  isLoading: c,
13
- isFetchingNextPage: a,
14
- data: l,
15
- keyExtractor: t,
16
- cols: f = 3,
17
- onLoadMore: n,
15
+ isFetchingNextPage: m,
16
+ data: t,
17
+ keyExtractor: l,
18
+ cols: a = 3,
19
+ gap: p = "md",
20
+ onLoadMore: o,
18
21
  onClickCard: u,
19
- emptyConfig: p
22
+ emptyConfig: d
20
23
  }) => {
21
- const d = C(n);
22
- return c ? /* @__PURE__ */ e(m, { fullScreen: !0, size: "lg" }) : l.length ? /* @__PURE__ */ N(o, { direction: "col", className: "w-full", children: [
23
- /* @__PURE__ */ e(
24
+ const N = S(o);
25
+ return c ? /* @__PURE__ */ r(n, { fullScreen: !0, size: "lg" }) : t.length ? /* @__PURE__ */ h(s, { direction: "col", className: "w-full", children: [
26
+ /* @__PURE__ */ r(
24
27
  "div",
25
28
  {
26
- className: "w-full grid gap-4",
27
- style: { gridTemplateColumns: `repeat(${f}, minmax(0, 1fr))` },
28
- children: l.map((i, g) => /* @__PURE__ */ h(
29
- s,
29
+ className: v("w-full grid", y[p]),
30
+ style: { gridTemplateColumns: `repeat(${a}, minmax(0, 1fr))` },
31
+ children: t.map((i, g) => /* @__PURE__ */ x(
32
+ f,
30
33
  {
31
- ...typeof r == "function" ? r(i) : r ?? {},
32
- key: t ? String(i[t]) : g,
34
+ ...typeof e == "function" ? e(i) : e,
35
+ key: l ? String(i[l]) : g,
33
36
  item: i,
34
37
  onClick: u
35
38
  }
36
39
  ))
37
40
  }
38
41
  ),
39
- a ? /* @__PURE__ */ e(o, { justifyContent: "center", className: "py-4", children: /* @__PURE__ */ e(m, { size: "lg" }) }) : n ? /* @__PURE__ */ e("div", { ref: d, className: "h-1" }) : null
40
- ] }) : /* @__PURE__ */ e(x, { className: "flex-1", icon: /* @__PURE__ */ e(y, {}), ...p });
42
+ m && /* @__PURE__ */ r(s, { justifyContent: "center", className: "py-4", children: /* @__PURE__ */ r(n, { size: "lg" }) }),
43
+ !m && o && /* @__PURE__ */ r("div", { ref: N, className: "h-1" })
44
+ ] }) : /* @__PURE__ */ r(C, { className: "flex-1", icon: /* @__PURE__ */ r(j, {}), ...d });
41
45
  };
42
46
  export {
43
- S as FeedList
47
+ L as FeedList
44
48
  };
@@ -6,6 +6,7 @@ type IconButtonOwnProps<T extends ElementType> = {
6
6
  color?: IconButtonColor;
7
7
  variant?: IconButtonVariant;
8
8
  size?: Size;
9
+ rounded?: Size | 'full';
9
10
  isLoading?: boolean;
10
11
  disabled?: boolean;
11
12
  type?: 'button' | 'submit' | 'reset';
@@ -16,6 +17,6 @@ type IconButtonOwnProps<T extends ElementType> = {
16
17
  'aria-busy'?: AriaAttributes['aria-busy'];
17
18
  };
18
19
  export type IconButtonProps<T extends ElementType = 'button'> = IconButtonOwnProps<T> & Omit<ComponentPropsWithRef<T>, keyof IconButtonOwnProps<T>>;
19
- export declare const IconButton: <T extends ElementType = "button">({ color, variant, size, disabled, isLoading, component, children, className, type, onClick, onKeyDown, tabIndex, "aria-disabled": ariaDisabled, "aria-busy": ariaBusy, ...props }: IconButtonProps<T>) => import("react").JSX.Element;
20
+ export declare const IconButton: <T extends ElementType = "button">({ color, variant, size, rounded, disabled, isLoading, component, children, className, type, onClick, onKeyDown, tabIndex, "aria-disabled": ariaDisabled, "aria-busy": ariaBusy, ...props }: IconButtonProps<T>) => import("react").JSX.Element;
20
21
  export {};
21
22
  //# sourceMappingURL=IconButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/ui/IconButton/IconButton.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,WAAW,EAGX,SAAS,EACV,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAI1C,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;AACjE,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEtE,KAAK,kBAAkB,CAAC,CAAC,SAAS,WAAW,IAAI;IAC/C,KAAK,CAAC,EAAE,eAAe,CAAC;IACxB,OAAO,CAAC,EAAE,iBAAiB,CAAC;IAC5B,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;IACrC,SAAS,CA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CAAC;IACrC,SAAS,CAAC,EAAE,CAAC,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,cAAc,CAAC,eAAe,CAAC,CAAC;IAClD,WAAW,CAAC,EAAE,cAAc,CAAC,WAAW,CAAC,CAAC;CAC3C,CAAC;AACF,MAAM,MAAM,eAAe,CAAC,CAAC,SAAS,WAAW,GAAG,QAAQ,IACxD,kBAAkB,CAAC,CAAC,CAAC,GACnB,IAAI,CAAC,qBAAqB,CAAC,CAAC,CAAC,EAAE,MAAM,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;AAElE,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,WAAW,GAAG,QAAQ,EAAE,4LAiB1D,eAAe,CAAC,CAAC,CAAC,gCAmDpB,CAAC"}
@@ -1,65 +1,70 @@
1
1
  "use client";
2
- import { jsxs as k, jsx as l } from "react/jsx-runtime";
3
- import N from "clsx";
4
- import { CircularLoading as j } from "../CircularLoading/CircularLoading.js";
5
- import o from "./IconButton.module.css.js";
6
- const E = ({
7
- color: p = "primary",
8
- variant: m = "transparent",
9
- size: i = "md",
10
- disabled: c = !1,
11
- isLoading: r = !1,
12
- component: d,
13
- children: u,
14
- className: b,
15
- type: f = "button",
16
- onClick: y,
17
- onKeyDown: h,
18
- tabIndex: x,
19
- "aria-disabled": C,
20
- "aria-busy": D,
21
- ...g
2
+ import { jsxs as S, jsx as i } from "react/jsx-runtime";
3
+ import { CircularLoading as g } from "../CircularLoading/CircularLoading.js";
4
+ import { cn as j } from "../../lib/cn.js";
5
+ import t from "./IconButton.module.css.js";
6
+ const v = {
7
+ xs: "rounded-xs",
8
+ sm: "rounded-sm",
9
+ md: "rounded-md",
10
+ lg: "rounded-lg",
11
+ xl: "rounded-xl",
12
+ full: "rounded-full"
13
+ }, O = ({
14
+ color: u = "primary",
15
+ variant: c = "transparent",
16
+ size: a = "md",
17
+ rounded: m = "full",
18
+ disabled: p = !1,
19
+ isLoading: n = !1,
20
+ component: b,
21
+ children: f,
22
+ className: y,
23
+ type: x = "button",
24
+ onClick: D,
25
+ onKeyDown: l,
26
+ tabIndex: h,
27
+ "aria-disabled": k,
28
+ "aria-busy": C,
29
+ ...B
22
30
  }) => {
23
- const s = d ?? "button", a = c || r, n = s === "button", e = typeof s != "string";
24
- return /* @__PURE__ */ k(
25
- s,
31
+ const d = b ?? "button", r = p || n, e = d === "button", s = !e && r, N = (o) => {
32
+ o.preventDefault();
33
+ }, E = (o) => {
34
+ if (o.key === "Enter" || o.key === " ") {
35
+ o.preventDefault();
36
+ return;
37
+ }
38
+ l?.(o);
39
+ };
40
+ return /* @__PURE__ */ S(
41
+ d,
26
42
  {
27
- ...g,
28
- type: n || e ? f : void 0,
29
- disabled: n || e ? a : void 0,
30
- "aria-disabled": a || C,
31
- "aria-busy": r || D,
32
- tabIndex: !n && a ? -1 : x,
33
- className: N(
34
- o.root,
35
- o[p],
36
- o[m],
37
- o[i],
38
- { [o.disabled]: a },
39
- b
43
+ type: e ? x : void 0,
44
+ disabled: e ? r : void 0,
45
+ "aria-disabled": r || k,
46
+ "aria-busy": n || C,
47
+ tabIndex: s ? -1 : h,
48
+ className: j(
49
+ t.root,
50
+ t[u],
51
+ t[c],
52
+ t[a],
53
+ v[m],
54
+ r && t.disabled,
55
+ y
40
56
  ),
41
- onClick: (t) => {
42
- if (a) {
43
- t.preventDefault(), t.stopPropagation();
44
- return;
45
- }
46
- y?.(t);
47
- },
48
- onKeyDown: (t) => {
49
- if (a && (t.key === "Enter" || t.key === " ")) {
50
- t.preventDefault(), t.stopPropagation();
51
- return;
52
- }
53
- h?.(t);
54
- },
57
+ onClick: s ? N : D,
58
+ onKeyDown: s ? E : l,
59
+ ...B,
55
60
  children: [
56
- /* @__PURE__ */ l("span", { className: o.content, style: { opacity: r ? 0 : 1 }, children: u }),
57
- r && /* @__PURE__ */ l(
58
- j,
61
+ /* @__PURE__ */ i("span", { className: t.content, style: { opacity: n ? 0 : 1 }, children: f }),
62
+ n && /* @__PURE__ */ i(
63
+ g,
59
64
  {
60
- size: i,
65
+ size: a,
61
66
  style: { width: "1em", height: "1em" },
62
- className: o.loading,
67
+ className: t.loading,
63
68
  "aria-hidden": "true"
64
69
  }
65
70
  )
@@ -68,5 +73,5 @@ const E = ({
68
73
  );
69
74
  };
70
75
  export {
71
- E as IconButton
76
+ O as IconButton
72
77
  };
@@ -1,33 +1,33 @@
1
- const i = "_root_ivirq_2", _ = "_xs_ivirq_24", o = "_sm_ivirq_29", n = "_md_ivirq_34", r = "_lg_ivirq_39", s = "_xl_ivirq_44", t = "_primary_ivirq_49", d = "_secondary_ivirq_57", l = "_danger_ivirq_66", c = "_outlined_ivirq_75", e = "_filled_ivirq_79", a = "_disabled_ivirq_109", q = "_content_ivirq_122", v = "_loading_ivirq_130", g = {
2
- root: i,
1
+ const t = "_root_1tkxq_2", _ = "_xs_1tkxq_24", o = "_sm_1tkxq_29", n = "_md_1tkxq_34", s = "_lg_1tkxq_39", d = "_xl_1tkxq_44", l = "_primary_1tkxq_49", c = "_secondary_1tkxq_57", x = "_danger_1tkxq_66", e = "_outlined_1tkxq_75", a = "_filled_1tkxq_79", r = "_disabled_1tkxq_109", i = "_content_1tkxq_122", k = "_loading_1tkxq_130", q = {
2
+ root: t,
3
3
  xs: _,
4
4
  sm: o,
5
5
  md: n,
6
- lg: r,
7
- xl: s,
8
- primary: t,
9
- secondary: d,
10
- danger: l,
11
- outlined: c,
12
- filled: e,
13
- disabled: a,
14
- content: q,
15
- loading: v
6
+ lg: s,
7
+ xl: d,
8
+ primary: l,
9
+ secondary: c,
10
+ danger: x,
11
+ outlined: e,
12
+ filled: a,
13
+ disabled: r,
14
+ content: i,
15
+ loading: k
16
16
  };
17
17
  export {
18
- q as content,
19
- l as danger,
20
- g as default,
21
- a as disabled,
22
- e as filled,
23
- r as lg,
24
- v as loading,
18
+ i as content,
19
+ x as danger,
20
+ q as default,
21
+ r as disabled,
22
+ a as filled,
23
+ s as lg,
24
+ k as loading,
25
25
  n as md,
26
- c as outlined,
27
- t as primary,
28
- i as root,
29
- d as secondary,
26
+ e as outlined,
27
+ l as primary,
28
+ t as root,
29
+ c as secondary,
30
30
  o as sm,
31
- s as xl,
31
+ d as xl,
32
32
  _ as xs
33
33
  };
@@ -0,0 +1,2 @@
1
+ export { IconButton, type IconButtonColor, type IconButtonProps, type IconButtonVariant, } from './IconButton.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/IconButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,iBAAiB,GACvB,MAAM,iBAAiB,CAAC"}
@@ -28,6 +28,7 @@ export declare const Modal: {
28
28
  Root: ({ children, size, className, closeDisabled, open, onOpenChange, "aria-label": ariaLabel, }: ModalRootProps) => import("react").JSX.Element;
29
29
  Header: ({ text, children, startIcon, withCloseButton, closeLabel, ...props }: HeaderProps) => import("react").JSX.Element;
30
30
  Content: ({ className, ...props }: FlexProps) => import("react").JSX.Element;
31
+ Actions: (props: FlexProps) => import("react").JSX.Element;
31
32
  Cancel: ({ children, onClick, disabled, ...props }: ButtonProps) => import("react").JSX.Element;
32
33
  Confirm: ({ children, type, ...props }: ButtonProps) => import("react").JSX.Element;
33
34
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/ui/Modal/Modal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,YAAY,EACjB,KAAK,SAAS,EAKf,MAAM,OAAO,CAAC;AAMf,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAShD,eAAO,MAAM,UAAU;;;;;;CAMb,CAAC;AACX,MAAM,MAAM,S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,OAAO,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AA6DD,UAAU,WAAY,SAAQ,SAAS;IACrC,IAAI,EAAE,MAAM,GAAG,YAAY,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAwED,eAAO,MAAM,KAAK;uGAhIf,cAAc;mFAiEd,WAAW;uCA0B4B,SAAS;qBAI3B,SAAS;wDAI0B,WAAW;4CAoBZ,WAAW;CASG,CAAC"}
@@ -1,17 +1,17 @@
1
1
  "use client";
2
2
  import { jsx as o, jsxs as x } from "react/jsx-runtime";
3
- import { useContext as M, useRef as y, useCallback as E, useMemo as N, createContext as P } from "react";
3
+ import { useContext as M, useRef as h, useCallback as E, useMemo as N, createContext as P } from "react";
4
4
  import { X as R } from "lucide-react";
5
5
  import { Dialog as u } from "radix-ui";
6
- import { useProvider as p } from "../../app/Provider.js";
7
- import { Button as b } from "../Button/Button.js";
8
- import { Flex as v } from "../Flex/Flex.js";
9
- import { IconButton as D } from "../IconButton/IconButton.js";
10
- import { Text as F } from "../Text/Text.js";
11
- import { cn as g } from "../../lib/cn.js";
12
- import { useModal as I } from "./ModalContext.js";
13
- import i from "./Modal.module.css.js";
14
- const j = {
6
+ import { useProvider as v } from "../../app/Provider.js";
7
+ import { Button as g } from "../Button/Button.js";
8
+ import { Flex as f } from "../Flex/Flex.js";
9
+ import { IconButton as j } from "../IconButton/IconButton.js";
10
+ import { Text as A } from "../Text/Text.js";
11
+ import { cn as y } from "../../lib/cn.js";
12
+ import { useModal as D } from "./ModalContext.js";
13
+ import a from "./Modal.module.css.js";
14
+ const F = {
15
15
  xs: "xs",
16
16
  sm: "sm",
17
17
  md: "md",
@@ -19,33 +19,33 @@ const j = {
19
19
  xl: "xl"
20
20
  }, C = P(
21
21
  {}
22
- ), k = ({
22
+ ), I = ({
23
23
  children: e,
24
- size: r = j.md,
24
+ size: n = F.md,
25
25
  className: s,
26
26
  closeDisabled: t = !1,
27
27
  open: m = !0,
28
- onOpenChange: n,
29
- "aria-label": a
28
+ onOpenChange: r,
29
+ "aria-label": i
30
30
  }) => {
31
- const { closeModal: l } = I(), d = y(null), f = E(() => {
32
- n ? n(!1) : l();
33
- }, [n, l]), h = N(() => ({ closeDisabled: t, closeModal: f }), [t, f]);
34
- return /* @__PURE__ */ o(C.Provider, { value: h, children: /* @__PURE__ */ o(
31
+ const { closeModal: l } = D(), d = h(null), p = E(() => {
32
+ r ? r(!1) : l();
33
+ }, [r, l]), b = N(() => ({ closeDisabled: t, closeModal: p }), [t, p]);
34
+ return /* @__PURE__ */ o(C.Provider, { value: b, children: /* @__PURE__ */ o(
35
35
  u.Root,
36
36
  {
37
37
  open: m,
38
38
  onOpenChange: (c) => {
39
- !c && !t && f();
39
+ !c && !t && p();
40
40
  },
41
41
  children: /* @__PURE__ */ x(u.Portal, { children: [
42
- /* @__PURE__ */ o(u.Overlay, { className: i.overlay }),
42
+ /* @__PURE__ */ o(u.Overlay, { className: a.overlay }),
43
43
  /* @__PURE__ */ o(
44
44
  u.Content,
45
45
  {
46
- className: g(i.root, i[r], s),
46
+ className: y(a.root, a[n], s),
47
47
  "aria-describedby": void 0,
48
- "aria-label": a,
48
+ "aria-label": i,
49
49
  onEscapeKeyDown: (c) => {
50
50
  t && c.preventDefault();
51
51
  },
@@ -58,57 +58,57 @@ const j = {
58
58
  onCloseAutoFocus: (c) => {
59
59
  d.current?.isConnected && (c.preventDefault(), d.current.focus());
60
60
  },
61
- ...a ? { "aria-labelledby": void 0 } : {},
62
- children: /* @__PURE__ */ o(v, { direction: "col", gap: "md", className: i.layout, children: e })
61
+ ...i ? { "aria-labelledby": void 0 } : {},
62
+ children: /* @__PURE__ */ o(f, { direction: "col", gap: "md", className: a.layout, children: e })
63
63
  }
64
64
  )
65
65
  ] })
66
66
  }
67
67
  ) });
68
- }, w = ({
68
+ }, k = ({
69
69
  text: e,
70
- children: r,
70
+ children: n,
71
71
  startIcon: s,
72
72
  withCloseButton: t = !0,
73
73
  closeLabel: m,
74
- ...n
74
+ ...r
75
75
  }) => {
76
- const { messages: a } = p(), { closeDisabled: l, closeModal: d } = M(C);
77
- return /* @__PURE__ */ x(v, { justifyContent: "between", alignItems: "start", ...n, children: [
76
+ const { messages: i } = v(), { closeDisabled: l, closeModal: d } = M(C);
77
+ return /* @__PURE__ */ x(f, { justifyContent: "between", alignItems: "start", ...r, children: [
78
78
  s,
79
- /* @__PURE__ */ o(u.Title, { asChild: !0, children: typeof e == "string" ? /* @__PURE__ */ o(F, { size: "xl", weight: "medium", children: e }) : e }),
80
- r,
79
+ /* @__PURE__ */ o(u.Title, { asChild: !0, children: typeof e == "string" ? /* @__PURE__ */ o(A, { size: "xl", weight: "medium", children: e }) : e }),
80
+ n,
81
81
  t && /* @__PURE__ */ o(
82
- D,
82
+ j,
83
83
  {
84
- className: i.close,
84
+ className: a.close,
85
85
  color: "secondary",
86
- "aria-label": m ?? a.close,
86
+ "aria-label": m ?? i.close,
87
87
  disabled: l,
88
88
  onClick: d,
89
89
  children: /* @__PURE__ */ o(R, {})
90
90
  }
91
91
  )
92
92
  ] });
93
- }, A = ({ className: e, ...r }) => /* @__PURE__ */ o(v, { className: g(i.content, e), ...r }), O = ({ children: e, onClick: r, disabled: s, ...t }) => {
94
- const { messages: m } = p(), { closeDisabled: n, closeModal: a } = M(C);
93
+ }, w = ({ className: e, ...n }) => /* @__PURE__ */ o(f, { className: y(a.content, e), ...n }), O = (e) => /* @__PURE__ */ o(f, { justifyContent: "end", gap: "sm", ...e }), T = ({ children: e, onClick: n, disabled: s, ...t }) => {
94
+ const { messages: m } = v(), { closeDisabled: r, closeModal: i } = M(C);
95
95
  return /* @__PURE__ */ o(
96
- b,
96
+ g,
97
97
  {
98
98
  variant: "outlined",
99
- disabled: s || n,
99
+ disabled: s || r,
100
100
  onClick: (l) => {
101
- n || (r?.(l), l.defaultPrevented || a());
101
+ r || (n?.(l), l.defaultPrevented || i());
102
102
  },
103
103
  ...t,
104
104
  children: e === void 0 ? m.cancel : e
105
105
  }
106
106
  );
107
- }, T = ({ children: e, type: r = "submit", ...s }) => {
108
- const { messages: t } = p();
109
- return /* @__PURE__ */ o(b, { type: r, ...s, children: e === void 0 ? t.confirm : e });
110
- }, J = { Root: k, Header: w, Content: A, Cancel: O, Confirm: T };
107
+ }, B = ({ children: e, type: n = "submit", ...s }) => {
108
+ const { messages: t } = v();
109
+ return /* @__PURE__ */ o(g, { type: n, ...s, children: e === void 0 ? t.confirm : e });
110
+ }, Q = { Root: I, Header: k, Content: w, Actions: O, Cancel: T, Confirm: B };
111
111
  export {
112
- j as MODAL_SIZE,
113
- J as Modal
112
+ F as MODAL_SIZE,
113
+ Q as Modal
114
114
  };
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { jsx as i } from "react/jsx-runtime";
3
- import { twMerge as m } from "tailwind-merge";
4
- import { useProvider as s } from "../../app/Provider.js";
2
+ import { jsx as m } from "react/jsx-runtime";
3
+ import { useProvider as r } from "../../app/Provider.js";
4
+ import { cn as s } from "../../lib/cn.js";
5
5
  import { getResponsiveSize as a } from "../../lib/getResponsiveSize.js";
6
6
  const f = {
7
7
  thin: "font-thin",
@@ -30,12 +30,12 @@ const f = {
30
30
  className: l,
31
31
  ...x
32
32
  }) => {
33
- const { isMobile: n } = s(), r = a(e, n);
34
- return /* @__PURE__ */ i(
33
+ const { isMobile: n } = r(), i = a(e, n);
34
+ return /* @__PURE__ */ m(
35
35
  "span",
36
36
  {
37
- className: m(
38
- d[r],
37
+ className: s(
38
+ d[i],
39
39
  f[o],
40
40
  l
41
41
  ),
@@ -0,0 +1,2 @@
1
+ export { Text, type TextProps } from './Text.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Text/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC"}
@@ -4,5 +4,5 @@ export type TextareaProps = InputControlProps & Omit<ComponentProps<'textarea'>,
4
4
  minRows?: number;
5
5
  maxRows?: number;
6
6
  };
7
- export declare const Textarea: ({ id: idProps, label, error, size, fullWidth, className, startIcon, endIcon, rows, minRows, maxRows, value, defaultValue, onInput, ref: forwardedRef, ...props }: TextareaProps) => import("react").JSX.Element;
7
+ export declare const Textarea: ({ id: idProps, label, error, size, fullWidth, className, startIcon, endIcon, rows, minRows, maxRows, value, defaultValue, onInput, ref: forwardedRef, "aria-describedby": describedBy, "aria-invalid": ariaInvalid, ...props }: TextareaProps) => import("react").JSX.Element;
8
8
  //# sourceMappingURL=Textarea.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/ui/Textarea/Textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAkC,MAAM,OAAO,CAAC;AAM5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAInD,MAAM,MAAM,aAAa,GAAG,iBAAiB,GACzC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,GAAG;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAqBJ,eAAO,MAAM,QAAQ,GAAI,kKAiBtB,aAAa,gCAqDf,CAAC"}
1
+ {"version":3,"file":"Textarea.d.ts","sourceRoot":"","sources":["../../../src/ui/Textarea/Textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAkC,MAAM,OAAO,CAAC;AAK5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAKnD,MAAM,MAAM,aAAa,GAAG,iBAAiB,GACzC,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC,GAAG;IAC3C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAqBJ,eAAO,MAAM,QAAQ,GAAI,gOAmBtB,aAAa,gCAyDf,CAAC"}