@divayth/brick-ui 0.8.0 → 0.10.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 (53) hide show
  1. package/dist/app/Provider.js +7 -7
  2. package/dist/app/ThemeProvider.js +6 -6
  3. package/dist/styles.css +1 -1
  4. package/dist/ui/DropdownMenu/DropdownMenu.js +17 -17
  5. package/dist/ui/FeedList/FeedList.d.ts +3 -1
  6. package/dist/ui/FeedList/FeedList.d.ts.map +1 -1
  7. package/dist/ui/FeedList/FeedList.js +32 -28
  8. package/dist/ui/Grid/Grid.d.ts +1 -1
  9. package/dist/ui/Grid/Grid.module.css.js +4 -4
  10. package/dist/ui/Grid/Grid.types.d.ts +0 -2
  11. package/dist/ui/Grid/Grid.types.d.ts.map +1 -1
  12. package/dist/ui/Grid/GridItem.d.ts +1 -1
  13. package/dist/ui/Grid/GridItem.d.ts.map +1 -1
  14. package/dist/ui/Grid/GridItem.js +25 -33
  15. package/dist/ui/Grid/GridRoot.js +30 -30
  16. package/dist/ui/Grid/index.d.ts +2 -0
  17. package/dist/ui/Grid/index.d.ts.map +1 -0
  18. package/dist/ui/IconButton/IconButton.d.ts +1 -1
  19. package/dist/ui/IconButton/IconButton.d.ts.map +1 -1
  20. package/dist/ui/IconButton/IconButton.js +1 -1
  21. package/dist/ui/IconButton/IconButton.module.css.js +30 -28
  22. package/dist/ui/List/List.d.ts.map +1 -1
  23. package/dist/ui/List/List.js +19 -19
  24. package/dist/ui/List/index.d.ts +2 -0
  25. package/dist/ui/List/index.d.ts.map +1 -0
  26. package/dist/ui/Modal/Modal.d.ts.map +1 -1
  27. package/dist/ui/Modal/Modal.js +56 -48
  28. package/dist/ui/ProgressBar/ProgressBar.d.ts.map +1 -1
  29. package/dist/ui/ProgressBar/ProgressBar.js +16 -13
  30. package/dist/ui/ProgressBar/index.d.ts +2 -0
  31. package/dist/ui/ProgressBar/index.d.ts.map +1 -0
  32. package/dist/ui/Tabs/Tab.d.ts +1 -1
  33. package/dist/ui/Tabs/Tab.d.ts.map +1 -1
  34. package/dist/ui/Tabs/Tab.js +6 -6
  35. package/dist/ui/Tabs/Tabs.module.css.js +10 -10
  36. package/dist/ui/Tabs/TabsList.d.ts.map +1 -1
  37. package/dist/ui/Tabs/TabsList.js +6 -6
  38. package/dist/ui/Tabs/index.d.ts +2 -0
  39. package/dist/ui/Tabs/index.d.ts.map +1 -0
  40. package/dist/ui/Text/Text.js +7 -7
  41. package/dist/ui/Text/index.d.ts +2 -0
  42. package/dist/ui/Text/index.d.ts.map +1 -0
  43. package/dist/ui/Textarea/Textarea.d.ts +1 -1
  44. package/dist/ui/Textarea/Textarea.d.ts.map +1 -1
  45. package/dist/ui/Textarea/Textarea.js +54 -50
  46. package/dist/ui/Textarea/index.d.ts +2 -0
  47. package/dist/ui/Textarea/index.d.ts.map +1 -0
  48. package/dist/ui/Tooltip/Tooltip.d.ts +7 -4
  49. package/dist/ui/Tooltip/Tooltip.d.ts.map +1 -1
  50. package/dist/ui/Tooltip/Tooltip.js +67 -39
  51. package/dist/ui/index.d.ts +6 -6
  52. package/dist/ui/index.d.ts.map +1 -1
  53. package/package.json +7 -7
@@ -1,10 +1,10 @@
1
- import { jsx as h } from "react/jsx-runtime";
2
- import { Children as w, isValidElement as C, cloneElement as S } from "react";
3
- import b from "clsx";
4
- import { GridItem as z } from "./GridItem.js";
5
- import { getResponsiveCssVariables as f, GRID_GAP_VALUES as d } from "./utils.js";
6
- import I from "./Grid.module.css.js";
7
- const v = {
1
+ import { jsx as v } from "react/jsx-runtime";
2
+ import { Children as b, isValidElement as z, cloneElement as h } from "react";
3
+ import { cn as w } from "../../lib/cn.js";
4
+ import { GridItem as C } from "./GridItem.js";
5
+ import { getResponsiveCssVariables as p, GRID_GAP_VALUES as d } from "./utils.js";
6
+ import S from "./Grid.module.css.js";
7
+ const I = {
8
8
  stretch: "stretch",
9
9
  center: "center",
10
10
  start: "flex-start",
@@ -14,58 +14,58 @@ const v = {
14
14
  center: "center",
15
15
  end: "flex-end",
16
16
  between: "space-between"
17
- }, g = (t) => t === "grow" || t === "fit" ? 0 : typeof t == "number" ? t : t?.desktop ?? 1, G = (t, a) => {
18
- const m = w.toArray(t), n = m.filter(
19
- (e) => C(e) && e.type === z
17
+ }, g = (t) => t === void 0 || t === "grow" || t === "fit" ? 0 : typeof t == "number" ? t : t.desktop, G = (t, a) => {
18
+ const m = b.toArray(t), o = m.filter(
19
+ (e) => z(e) && e.type === C
20
20
  );
21
- if (!n.some(({ props: e }) => e.size === "fit" || e.size === "grow" ? !0 : !Number.isInteger(g(e.size))))
21
+ if (!o.some(({ props: e }) => e.size === void 0 || e.size === "fit" || e.size === "grow" ? !0 : !Number.isInteger(g(e.size))))
22
22
  return { children: t, templateColumns: void 0 };
23
- const s = n.filter(
24
- ({ props: e }) => e.size === "grow"
25
- ).length, u = n.reduce(
26
- (e, { props: p }) => e + g(p.size),
23
+ const s = o.filter(
24
+ ({ props: e }) => e.size === void 0 || e.size === "grow"
25
+ ).length, u = o.reduce(
26
+ (e, { props: c }) => e + g(c.size),
27
27
  0
28
- ), o = Math.max(s, a - u), c = s > 0 ? o / s : 0, r = [], l = m.map((e) => !C(e) || e.type !== z ? e : (e.props.size === "fit" ? r.push("max-content") : e.props.size === "grow" ? r.push(`minmax(0, ${c}fr)`) : r.push(`minmax(0, ${g(e.props.size)}fr)`), S(e, { size: 1 })));
29
- return s === 0 && o > 0 && r.push(`minmax(0, ${o}fr)`), {
28
+ ), n = Math.max(s, a - u), f = s > 0 ? n / s : 0, r = [], l = m.map((e) => !z(e) || e.type !== C ? e : (e.props.size === "fit" ? r.push("max-content") : e.props.size === void 0 || e.props.size === "grow" ? r.push(`minmax(0, ${f}fr)`) : r.push(`minmax(0, ${g(e.props.size)}fr)`), h(e, { size: 1 })));
29
+ return s === 0 && n > 0 && r.push(`minmax(0, ${n}fr)`), {
30
30
  children: l,
31
31
  templateColumns: r.join(" ")
32
32
  };
33
- }, j = ({
33
+ }, U = ({
34
34
  columns: t = 12,
35
35
  gap: a = "sm",
36
36
  rowGap: m,
37
- columnGap: n,
37
+ columnGap: o,
38
38
  align: x = "stretch",
39
39
  justify: s = "start",
40
40
  className: u,
41
- style: o,
42
- children: c,
41
+ style: n,
42
+ children: f,
43
43
  ...r
44
44
  }) => {
45
- const l = Math.max(1, t), e = G(c, l), p = {
45
+ const l = Number.isFinite(t) ? Math.max(1, Math.floor(t)) : 12, e = G(f, l), c = {
46
46
  "--grid-columns": l,
47
- "--grid-align": v[x],
47
+ "--grid-align": I[x],
48
48
  "--grid-justify": y[s],
49
49
  gridTemplateColumns: e.templateColumns,
50
- ...f(
50
+ ...p(
51
51
  "grid-gap",
52
52
  a,
53
53
  (i) => d[i]
54
54
  ),
55
- ...f(
55
+ ...p(
56
56
  "grid-row-gap",
57
57
  m,
58
58
  (i) => d[i]
59
59
  ),
60
- ...f(
60
+ ...p(
61
61
  "grid-column-gap",
62
- n,
62
+ o,
63
63
  (i) => d[i]
64
64
  ),
65
- ...o
65
+ ...n
66
66
  };
67
- return /* @__PURE__ */ h("div", { ...r, className: b(I.root, u), style: p, children: e.children });
67
+ return /* @__PURE__ */ v("div", { ...r, className: w(S.root, u), style: c, children: e.children });
68
68
  };
69
69
  export {
70
- j as GridRoot
70
+ U as GridRoot
71
71
  };
@@ -0,0 +1,2 @@
1
+ export { Grid, type GridGap, type GridItemProps, type GridItemSize, type GridRootProps, type ResponsiveValue } from './Grid.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Grid/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,aAAa,EAAE,KAAK,eAAe,EAAE,MAAM,WAAW,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { AriaAttributes, ComponentPropsWithRef, ElementType, ReactNode } from 'react';
2
2
  import type { Size } from '../../lib/sizes.js';
3
- export type IconButtonColor = 'primary' | 'secondary' | 'danger';
3
+ export type IconButtonColor = 'primary' | 'secondary' | 'danger' | 'inherit';
4
4
  export type IconButtonVariant = 'transparent' | 'filled' | 'outlined';
5
5
  type IconButtonOwnProps<T extends ElementType> = {
6
6
  color?: IconButtonColor;
@@ -1 +1 @@
1
- {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/ui/IconButton/IconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,WAAW,EAGX,SAAS,EACV,MAAM,OAAO,CAAC;AAIf,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;AAWtE,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,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,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
+ {"version":3,"file":"IconButton.d.ts","sourceRoot":"","sources":["../../../src/ui/IconButton/IconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,cAAc,EACd,qBAAqB,EACrB,WAAW,EAGX,SAAS,EACV,MAAM,OAAO,CAAC;AAIf,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAI1C,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;AAC7E,MAAM,MAAM,iBAAiB,GAAG,aAAa,GAAG,QAAQ,GAAG,UAAU,CAAC;AAWtE,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,OAAO,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,OAAO,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"}
@@ -51,7 +51,7 @@ const v = {
51
51
  t[c],
52
52
  t[a],
53
53
  v[m],
54
- { [t.disabled]: r },
54
+ r && t.disabled,
55
55
  y
56
56
  ),
57
57
  onClick: s ? N : D,
@@ -1,33 +1,35 @@
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
- xs: _,
4
- sm: o,
1
+ const l = "_root_1llta_2", t = "_xs_1llta_24", _ = "_sm_1llta_29", n = "_md_1llta_34", o = "_lg_1llta_39", a = "_xl_1llta_44", s = "_primary_1llta_49", d = "_secondary_1llta_57", c = "_inherit_1llta_61", e = "_danger_1llta_75", i = "_outlined_1llta_84", r = "_filled_1llta_88", g = "_disabled_1llta_133", m = "_content_1llta_147", x = "_loading_1llta_155", y = {
2
+ root: l,
3
+ xs: t,
4
+ sm: _,
5
5
  md: n,
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
6
+ lg: o,
7
+ xl: a,
8
+ primary: s,
9
+ secondary: d,
10
+ inherit: c,
11
+ danger: e,
12
+ outlined: i,
13
+ filled: r,
14
+ disabled: g,
15
+ content: m,
16
+ loading: x
16
17
  };
17
18
  export {
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,
19
+ m as content,
20
+ e as danger,
21
+ y as default,
22
+ g as disabled,
23
+ r as filled,
24
+ c as inherit,
25
+ o as lg,
26
+ x as loading,
25
27
  n as md,
26
- e as outlined,
27
- l as primary,
28
- t as root,
29
- c as secondary,
30
- o as sm,
31
- d as xl,
32
- _ as xs
28
+ i as outlined,
29
+ s as primary,
30
+ l as root,
31
+ d as secondary,
32
+ _ as sm,
33
+ a as xl,
34
+ t as xs
33
35
  };
@@ -1 +1 @@
1
- {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/ui/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAIf,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAI7D,QAAA,MAAM,UAAU;;;;;CAKN,CAAC;AAEX,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,KAAK,CAAC;IACtD,OAAO,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IAClC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAChD,eAAe,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACxD;AA4CD,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC5E,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACjD;AAsCD,eAAO,MAAM,IAAI,uFA3Ed,SAAS;mEA8CT,aAAa;CA6B+C,CAAC"}
1
+ {"version":3,"file":"List.d.ts","sourceRoot":"","sources":["../../../src/ui/List/List.tsx"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,cAAc,EACnB,KAAK,aAAa,EAElB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAI7D,QAAA,MAAM,UAAU;;;;;CAKN,CAAC;AAEX,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,KAAK,CAAC;IACtD,OAAO,CAAC,EAAE,MAAM,OAAO,UAAU,CAAC;IAClC,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,QAAQ,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;IAChD,eAAe,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACxD;AA4CD,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC;IAC5E,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,SAAS,CAAC;IACjB,QAAQ,CAAC,EAAE,aAAa,CAAC,qBAAqB,CAAC,CAAC;CACjD;AAsCD,eAAO,MAAM,IAAI,uFA3Ed,SAAS;mEA8CT,aAAa;CA6B+C,CAAC"}
@@ -1,9 +1,9 @@
1
- import { jsx as o, jsxs as l } from "react/jsx-runtime";
1
+ import { jsx as o, jsxs as d } from "react/jsx-runtime";
2
2
  import { Children as x, isValidElement as u, cloneElement as C } from "react";
3
- import a from "clsx";
4
- import { GAP_SX as N } from "../Flex/constants.js";
5
- import { Flex as j } from "../Flex/Flex.js";
6
- import { Text as d } from "../Text/Text.js";
3
+ import { Flex as N } from "../Flex/Flex.js";
4
+ import { GAP_SX as j } from "../Flex/constants.js";
5
+ import { Text as l } from "../Text/Text.js";
6
+ import { cn as a } from "../../lib/cn.js";
7
7
  const y = {
8
8
  1: "grid-cols-1",
9
9
  2: "grid-cols-2",
@@ -12,10 +12,10 @@ const y = {
12
12
  }, L = ({
13
13
  children: t,
14
14
  columns: s = 1,
15
- gap: m = "sm",
15
+ gap: n = "sm",
16
16
  template: e,
17
17
  columnsTemplate: r,
18
- className: n,
18
+ className: m,
19
19
  style: c,
20
20
  ...p
21
21
  }) => {
@@ -28,8 +28,8 @@ const y = {
28
28
  className: a(
29
29
  "grid w-full",
30
30
  !r && y[s],
31
- N[m],
32
- n
31
+ j[n],
32
+ m
33
33
  ),
34
34
  style: r ? { ...c, gridTemplateColumns: r } : c,
35
35
  ...p,
@@ -39,32 +39,32 @@ const y = {
39
39
  }, g = ({
40
40
  label: t,
41
41
  value: s,
42
- template: m,
42
+ template: n,
43
43
  className: e,
44
44
  style: r,
45
- ...n
46
- }) => m ? /* @__PURE__ */ l(
45
+ ...m
46
+ }) => n ? /* @__PURE__ */ d(
47
47
  "div",
48
48
  {
49
49
  className: a("grid items-center gap-4", e),
50
- style: { ...r, gridTemplateColumns: m },
51
- ...n,
50
+ style: { ...r, gridTemplateColumns: n },
51
+ ...m,
52
52
  children: [
53
- /* @__PURE__ */ o(d, { className: "text-gray-1", children: t }),
53
+ /* @__PURE__ */ o(l, { className: "text-gray-1", children: t }),
54
54
  /* @__PURE__ */ o("div", { className: "min-w-0", children: s })
55
55
  ]
56
56
  }
57
- ) : /* @__PURE__ */ l(
58
- j,
57
+ ) : /* @__PURE__ */ d(
58
+ N,
59
59
  {
60
60
  alignItems: "center",
61
61
  gap: "md",
62
62
  justifyContent: "between",
63
63
  className: e,
64
64
  style: r,
65
- ...n,
65
+ ...m,
66
66
  children: [
67
- /* @__PURE__ */ o(d, { className: "text-gray-1", children: t }),
67
+ /* @__PURE__ */ o(l, { className: "text-gray-1", children: t }),
68
68
  s
69
69
  ]
70
70
  }
@@ -0,0 +1,2 @@
1
+ export { List, type ListItemProps, type ListProps } from './List.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/List/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC"}
@@ -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,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAWrE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,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
+ {"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,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAWrE,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,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;AAmED,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;uGAtIf,cAAc;mFAuEd,WAAW;uCA0B4B,SAAS;qBAI3B,SAAS;wDAI0B,WAAW;4CAoBZ,WAAW;CASG,CAAC"}
@@ -1,51 +1,51 @@
1
1
  "use client";
2
- import { jsx as o, jsxs as x } from "react/jsx-runtime";
3
- import { useContext as M, useRef as h, useCallback as E, useMemo as N, createContext as P } from "react";
2
+ import { jsx as o, jsxs as y } from "react/jsx-runtime";
3
+ import { useContext as b, useRef as A, useCallback as E, useMemo as N, createContext as P } from "react";
4
4
  import { X as R } from "lucide-react";
5
- import { Dialog as u } from "radix-ui";
6
- import { useProvider as v } from "../../app/Provider.js";
5
+ import { Dialog as d } from "radix-ui";
6
+ import { useProvider as C } from "../../app/Provider.js";
7
7
  import { Button as g } from "../Button/Button.js";
8
8
  import { Flex as f } from "../Flex/Flex.js";
9
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 = {
10
+ import { Text as D } from "../Text/Text.js";
11
+ import { cn as M } from "../../lib/cn.js";
12
+ import { useModal as F } from "./ModalContext.js";
13
+ import i from "./Modal.module.css.js";
14
+ const I = {
15
15
  xs: "xs",
16
16
  sm: "sm",
17
17
  md: "md",
18
18
  lg: "lg",
19
19
  xl: "xl"
20
- }, C = P(
20
+ }, x = P(
21
21
  {}
22
- ), I = ({
22
+ ), k = ({
23
23
  children: e,
24
- size: n = F.md,
24
+ size: r = I.md,
25
25
  className: s,
26
26
  closeDisabled: t = !1,
27
27
  open: m = !0,
28
- onOpenChange: r,
29
- "aria-label": i
28
+ onOpenChange: n,
29
+ "aria-label": a
30
30
  }) => {
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
- u.Root,
31
+ const { closeModal: l } = F(), u = A(null), p = E(() => {
32
+ n ? n(!1) : l();
33
+ }, [n, l]), h = N(() => ({ closeDisabled: t, closeModal: p }), [t, p]);
34
+ return /* @__PURE__ */ o(x.Provider, { value: h, children: /* @__PURE__ */ o(
35
+ d.Root,
36
36
  {
37
37
  open: m,
38
38
  onOpenChange: (c) => {
39
39
  !c && !t && p();
40
40
  },
41
- children: /* @__PURE__ */ x(u.Portal, { children: [
42
- /* @__PURE__ */ o(u.Overlay, { className: a.overlay }),
41
+ children: /* @__PURE__ */ y(d.Portal, { children: [
42
+ /* @__PURE__ */ o(d.Overlay, { className: i.overlay }),
43
43
  /* @__PURE__ */ o(
44
- u.Content,
44
+ d.Content,
45
45
  {
46
- className: y(a.root, a[n], s),
46
+ className: M(i.root, i[r], s),
47
47
  "aria-describedby": void 0,
48
- "aria-label": i,
48
+ "aria-label": a,
49
49
  onEscapeKeyDown: (c) => {
50
50
  t && c.preventDefault();
51
51
  },
@@ -53,62 +53,70 @@ const F = {
53
53
  t && c.preventDefault();
54
54
  },
55
55
  onOpenAutoFocus: () => {
56
- d.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
56
+ u.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
57
57
  },
58
58
  onCloseAutoFocus: (c) => {
59
- d.current?.isConnected && (c.preventDefault(), d.current.focus());
59
+ if (!u.current?.isConnected) return;
60
+ c.preventDefault();
61
+ const v = u.current;
62
+ v.setAttribute("data-tooltip-restore-focus", "");
63
+ try {
64
+ v.focus();
65
+ } finally {
66
+ v.removeAttribute("data-tooltip-restore-focus");
67
+ }
60
68
  },
61
- ...i ? { "aria-labelledby": void 0 } : {},
62
- children: /* @__PURE__ */ o(f, { direction: "col", gap: "md", className: a.layout, children: e })
69
+ ...a ? { "aria-labelledby": void 0 } : {},
70
+ children: /* @__PURE__ */ o(f, { direction: "col", gap: "md", className: i.layout, children: e })
63
71
  }
64
72
  )
65
73
  ] })
66
74
  }
67
75
  ) });
68
- }, k = ({
76
+ }, w = ({
69
77
  text: e,
70
- children: n,
78
+ children: r,
71
79
  startIcon: s,
72
80
  withCloseButton: t = !0,
73
81
  closeLabel: m,
74
- ...r
82
+ ...n
75
83
  }) => {
76
- const { messages: i } = v(), { closeDisabled: l, closeModal: d } = M(C);
77
- return /* @__PURE__ */ x(f, { justifyContent: "between", alignItems: "start", ...r, children: [
84
+ const { messages: a } = C(), { closeDisabled: l, closeModal: u } = b(x);
85
+ return /* @__PURE__ */ y(f, { justifyContent: "between", alignItems: "start", ...n, children: [
78
86
  s,
79
- /* @__PURE__ */ o(u.Title, { asChild: !0, children: typeof e == "string" ? /* @__PURE__ */ o(A, { size: "xl", weight: "medium", children: e }) : e }),
80
- n,
87
+ /* @__PURE__ */ o(d.Title, { asChild: !0, children: typeof e == "string" ? /* @__PURE__ */ o(D, { size: "xl", weight: "medium", children: e }) : e }),
88
+ r,
81
89
  t && /* @__PURE__ */ o(
82
90
  j,
83
91
  {
84
- className: a.close,
92
+ className: i.close,
85
93
  color: "secondary",
86
- "aria-label": m ?? i.close,
94
+ "aria-label": m ?? a.close,
87
95
  disabled: l,
88
- onClick: d,
96
+ onClick: u,
89
97
  children: /* @__PURE__ */ o(R, {})
90
98
  }
91
99
  )
92
100
  ] });
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);
101
+ }, O = ({ className: e, ...r }) => /* @__PURE__ */ o(f, { className: M(i.content, e), ...r }), T = (e) => /* @__PURE__ */ o(f, { justifyContent: "end", gap: "sm", ...e }), B = ({ children: e, onClick: r, disabled: s, ...t }) => {
102
+ const { messages: m } = C(), { closeDisabled: n, closeModal: a } = b(x);
95
103
  return /* @__PURE__ */ o(
96
104
  g,
97
105
  {
98
106
  variant: "outlined",
99
- disabled: s || r,
107
+ disabled: s || n,
100
108
  onClick: (l) => {
101
- r || (n?.(l), l.defaultPrevented || i());
109
+ n || (r?.(l), l.defaultPrevented || a());
102
110
  },
103
111
  ...t,
104
112
  children: e === void 0 ? m.cancel : e
105
113
  }
106
114
  );
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 };
115
+ }, H = ({ children: e, type: r = "submit", ...s }) => {
116
+ const { messages: t } = C();
117
+ return /* @__PURE__ */ o(g, { type: r, ...s, children: e === void 0 ? t.confirm : e });
118
+ }, U = { Root: k, Header: w, Content: O, Actions: T, Cancel: B, Confirm: H };
111
119
  export {
112
- F as MODAL_SIZE,
113
- Q as Modal
120
+ I as MODAL_SIZE,
121
+ U as Modal
114
122
  };
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAKA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,GAAG,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACxC;AAED,eAAO,MAAM,WAAW,GAAI,kBAAkB,gBAAgB,gCAwC7D,CAAC"}
1
+ {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAC3C,GAAG,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACxC;AAED,eAAO,MAAM,WAAW,GAAI,kBAAkB,gBAAgB,gCAqC7D,CAAC"}
@@ -1,29 +1,32 @@
1
- import { jsxs as s, jsx as a } from "react/jsx-runtime";
2
- import t from "clsx";
1
+ import { jsxs as o, jsx as a } from "react/jsx-runtime";
3
2
  import { Flex as r } from "../Flex/Flex.js";
4
- import { Text as o } from "../Text/Text.js";
5
- const b = ({ current: e, max: l }) => {
6
- const i = Number.isFinite(e.value) && Number.isFinite(l.value) && l.value > 0 ? Math.min(100, Math.max(0, e.value * 100 / l.value)) : 0;
7
- return /* @__PURE__ */ s(r, { direction: "col", className: "w-full", gap: "xs", children: [
8
- /* @__PURE__ */ s(r, { justifyContent: "between", children: [
9
- e.label && /* @__PURE__ */ a(o, { size: "sm", className: "text-gray-1", children: e.label }),
10
- l.label && /* @__PURE__ */ a(o, { size: "sm", className: "text-gray-1", children: l.label })
3
+ import { Text as t } from "../Text/Text.js";
4
+ import { cn as d } from "../../lib/cn.js";
5
+ const g = ({ current: e, max: l }) => {
6
+ let i = 0;
7
+ const s = Number.isFinite(e.value) && Number.isFinite(l.value) && l.value > 0;
8
+ s && (i = Math.min(100, Math.max(0, e.value / l.value * 100)));
9
+ const n = s && e.value > l.value;
10
+ return /* @__PURE__ */ o(r, { direction: "col", className: "w-full", gap: "xs", children: [
11
+ /* @__PURE__ */ o(r, { justifyContent: "between", children: [
12
+ e.label && /* @__PURE__ */ a(t, { size: "sm", className: "text-gray-1", children: e.label }),
13
+ l.label && /* @__PURE__ */ a(t, { size: "sm", className: "text-gray-1", children: l.label })
11
14
  ] }),
12
15
  /* @__PURE__ */ a(
13
16
  r,
14
17
  {
15
18
  className: "gap-0 bg-gray-2 rounded-full overflow-hidden",
16
19
  role: "progressbar",
17
- "aria-label": e.label,
20
+ "aria-label": e.label ?? "Progress",
18
21
  "aria-valuemin": 0,
19
22
  "aria-valuemax": 100,
20
23
  "aria-valuenow": Math.round(i),
21
24
  children: /* @__PURE__ */ a(
22
25
  r,
23
26
  {
24
- className: t(
27
+ className: d(
25
28
  "gap-0 h-1.5 rounded-full",
26
- e.value > l.value ? "bg-error-1" : "bg-primary-1"
29
+ n ? "bg-error-1" : "bg-primary-1"
27
30
  ),
28
31
  style: { width: `${i}%` }
29
32
  }
@@ -33,5 +36,5 @@ const b = ({ current: e, max: l }) => {
33
36
  ] });
34
37
  };
35
38
  export {
36
- b as ProgressBar
39
+ g as ProgressBar
37
40
  };
@@ -0,0 +1,2 @@
1
+ export { ProgressBar, type ProgressBarProps } from './ProgressBar.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/ProgressBar/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import type { ComponentProps } from 'react';
2
2
  export interface TabProps extends Omit<ComponentProps<'button'>, 'value'> {
3
3
  value: string;
4
- color?: 'primary' | 'secondary';
4
+ color?: 'inherit' | 'secondary';
5
5
  }
6
6
  export declare const Tab: ({ value, color, children, className, onClick, ...props }: TabProps) => import("react").JSX.Element;
7
7
  //# sourceMappingURL=Tab.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/Tab.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAO5C,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACjC;AAED,eAAO,MAAM,GAAG,GAAI,0DAOjB,QAAQ,gCAyBV,CAAC"}
1
+ {"version":3,"file":"Tab.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/Tab.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAQ5C,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACvE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC;CACjC;AAED,eAAO,MAAM,GAAG,GAAI,0DAOjB,QAAQ,gCAyBV,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as d } from "react/jsx-runtime";
3
- import { twMerge as f } from "tailwind-merge";
3
+ import { cn as f } from "../../lib/cn.js";
4
4
  import { useTabs as l } from "./context.js";
5
5
  import e from "./Tabs.module.css.js";
6
6
  const y = ({
@@ -8,10 +8,10 @@ const y = ({
8
8
  color: a = "secondary",
9
9
  children: s,
10
10
  className: c,
11
- onClick: b,
12
- ...m
11
+ onClick: n,
12
+ ...b
13
13
  }) => {
14
- const { tab: n, setTab: i } = l(), t = n === o;
14
+ const { tab: m, setTab: i } = l(), t = m === o;
15
15
  return /* @__PURE__ */ d(
16
16
  "button",
17
17
  {
@@ -26,9 +26,9 @@ const y = ({
26
26
  c
27
27
  ),
28
28
  onClick: (r) => {
29
- b?.(r), r.defaultPrevented || i(o);
29
+ n?.(r), r.defaultPrevented || i(o);
30
30
  },
31
- ...m,
31
+ ...b,
32
32
  children: s
33
33
  }
34
34
  );
@@ -1,13 +1,13 @@
1
- const c = "_tab_bwxcm_2", a = "_primary_bwxcm_16", t = "_secondary_bwxcm_17", _ = "_active_bwxcm_18", r = {
2
- tab: c,
3
- primary: a,
4
- secondary: t,
5
- active: _
1
+ const t = "_tab_19vai_3", a = "_inherit_19vai_31", i = "_secondary_19vai_33", c = "_active_19vai_35", _ = {
2
+ tab: t,
3
+ inherit: a,
4
+ secondary: i,
5
+ active: c
6
6
  };
7
7
  export {
8
- _ as active,
9
- r as default,
10
- a as primary,
11
- t as secondary,
12
- c as tab
8
+ c as active,
9
+ _ as default,
10
+ a as inherit,
11
+ i as secondary,
12
+ t as tab
13
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TabsList.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/TabsList.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAEhD,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;AAEtC,eAAO,MAAM,QAAQ,GAAI,8CAKtB,aAAa,gCAef,CAAC"}
1
+ {"version":3,"file":"TabsList.d.ts","sourceRoot":"","sources":["../../../src/ui/Tabs/TabsList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,UAAU,CAAC;AAGhD,MAAM,MAAM,aAAa,GAAG,SAAS,CAAC;AAEtC,eAAO,MAAM,QAAQ,GAAI,8CAKtB,aAAa,gCAef,CAAC"}