@divayth/brick-ui 0.9.0 → 0.11.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 (77) 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/Autocomplete/Autocomplete.d.ts +2 -2
  5. package/dist/ui/Autocomplete/Autocomplete.d.ts.map +1 -1
  6. package/dist/ui/Autocomplete/Autocomplete.js +1 -1
  7. package/dist/ui/Autocomplete/index.d.ts +2 -0
  8. package/dist/ui/Autocomplete/index.d.ts.map +1 -0
  9. package/dist/ui/DropdownMenu/DropdownMenu.js +17 -17
  10. package/dist/ui/Grid/Grid.d.ts +1 -1
  11. package/dist/ui/Grid/Grid.module.css.js +4 -4
  12. package/dist/ui/Grid/Grid.types.d.ts +0 -2
  13. package/dist/ui/Grid/Grid.types.d.ts.map +1 -1
  14. package/dist/ui/Grid/GridItem.d.ts +1 -1
  15. package/dist/ui/Grid/GridItem.d.ts.map +1 -1
  16. package/dist/ui/Grid/GridItem.js +25 -33
  17. package/dist/ui/Grid/GridRoot.js +36 -36
  18. package/dist/ui/Grid/index.d.ts +2 -0
  19. package/dist/ui/Grid/index.d.ts.map +1 -0
  20. package/dist/ui/IconButton/IconButton.d.ts +1 -1
  21. package/dist/ui/IconButton/IconButton.d.ts.map +1 -1
  22. package/dist/ui/IconButton/IconButton.module.css.js +30 -28
  23. package/dist/ui/List/List.d.ts.map +1 -1
  24. package/dist/ui/List/List.js +19 -19
  25. package/dist/ui/List/index.d.ts +2 -0
  26. package/dist/ui/List/index.d.ts.map +1 -0
  27. package/dist/ui/Modal/Modal.d.ts.map +1 -1
  28. package/dist/ui/Modal/Modal.js +56 -48
  29. package/dist/ui/ProgressBar/ProgressBar.d.ts.map +1 -1
  30. package/dist/ui/ProgressBar/ProgressBar.js +16 -13
  31. package/dist/ui/ProgressBar/index.d.ts +2 -0
  32. package/dist/ui/ProgressBar/index.d.ts.map +1 -0
  33. package/dist/ui/Select/Select.d.ts.map +1 -1
  34. package/dist/ui/Select/Select.js +1 -1
  35. package/dist/ui/Select/Select.module.css.js +42 -18
  36. package/dist/ui/Select/Select.types.d.ts +1 -2
  37. package/dist/ui/Select/Select.types.d.ts.map +1 -1
  38. package/dist/ui/Select/components/SelectControl.d.ts +3 -0
  39. package/dist/ui/Select/components/SelectControl.d.ts.map +1 -0
  40. package/dist/ui/Select/components/SelectControl.js +154 -0
  41. package/dist/ui/Select/{SelectOption.d.ts → components/SelectOption.d.ts} +1 -1
  42. package/dist/ui/Select/components/SelectOption.d.ts.map +1 -0
  43. package/dist/ui/Select/components/SelectOption.js +30 -0
  44. package/dist/ui/Select/components/SelectOptions.d.ts +3 -0
  45. package/dist/ui/Select/components/SelectOptions.d.ts.map +1 -0
  46. package/dist/ui/Select/components/SelectOptions.js +62 -0
  47. package/dist/ui/Select/{SelectSearch.d.ts → components/SelectSearch.d.ts} +1 -1
  48. package/dist/ui/Select/components/SelectSearch.d.ts.map +1 -0
  49. package/dist/ui/Select/components/SelectSearch.js +44 -0
  50. package/dist/ui/Select/index.d.ts +4 -0
  51. package/dist/ui/Select/index.d.ts.map +1 -0
  52. package/dist/ui/Tabs/Tab.d.ts +1 -1
  53. package/dist/ui/Tabs/Tab.d.ts.map +1 -1
  54. package/dist/ui/Tabs/Tab.js +6 -6
  55. package/dist/ui/Tabs/Tabs.module.css.js +10 -10
  56. package/dist/ui/Tabs/TabsList.d.ts.map +1 -1
  57. package/dist/ui/Tabs/TabsList.js +6 -6
  58. package/dist/ui/Tabs/index.d.ts +2 -0
  59. package/dist/ui/Tabs/index.d.ts.map +1 -0
  60. package/dist/ui/Tooltip/Tooltip.d.ts.map +1 -1
  61. package/dist/ui/Tooltip/Tooltip.js +44 -37
  62. package/dist/ui/index.d.ts +7 -7
  63. package/dist/ui/index.d.ts.map +1 -1
  64. package/package.json +1 -1
  65. package/dist/ui/Select/SelectControl.d.ts +0 -3
  66. package/dist/ui/Select/SelectControl.d.ts.map +0 -1
  67. package/dist/ui/Select/SelectControl.js +0 -152
  68. package/dist/ui/Select/SelectOption.d.ts.map +0 -1
  69. package/dist/ui/Select/SelectOption.js +0 -29
  70. package/dist/ui/Select/SelectOption.module.css.js +0 -9
  71. package/dist/ui/Select/SelectOptions.d.ts +0 -3
  72. package/dist/ui/Select/SelectOptions.d.ts.map +0 -1
  73. package/dist/ui/Select/SelectOptions.js +0 -62
  74. package/dist/ui/Select/SelectOptions.module.css.js +0 -7
  75. package/dist/ui/Select/SelectSearch.d.ts.map +0 -1
  76. package/dist/ui/Select/SelectSearch.js +0 -43
  77. package/dist/ui/Select/SelectSearch.module.css.js +0 -13
@@ -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, m) => {
18
+ const a = b.toArray(t), o = a.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, f = 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, m - f), u = s > 0 ? n / s : 0, r = [], l = a.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, ${u}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
- templateColumns: r.join(" ")
31
+ templateColumns: m === 1 ? "minmax(0, 1fr)" : r.join(" ")
32
32
  };
33
- }, j = ({
33
+ }, U = ({
34
34
  columns: t = 12,
35
- gap: a = "sm",
36
- rowGap: m,
37
- columnGap: n,
35
+ gap: m = "sm",
36
+ rowGap: a,
37
+ columnGap: o,
38
38
  align: x = "stretch",
39
39
  justify: s = "start",
40
- className: u,
41
- style: o,
42
- children: c,
40
+ className: f,
41
+ style: n,
42
+ children: u,
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(u, 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
- a,
52
+ m,
53
53
  (i) => d[i]
54
54
  ),
55
- ...f(
55
+ ...p(
56
56
  "grid-row-gap",
57
- m,
57
+ a,
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, f), 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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U,GAAI,CAAC,SAAS,WAAW,GAAG,QAAQ,EAAE,4LAiB1D,eAAe,CAAC,CAAC,CAAC,gCAmDpB,CAAC"}
@@ -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,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,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 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/Select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGlE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAElE,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,WAAW,EAAE,QAAQ,SAAS,OAAO,GAAG,KAAK,EAC5E,OAAO,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,gCACsB,CAAC"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../../src/ui/Select/Select.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAElE,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAElE,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,WAAW,EAAE,QAAQ,SAAS,OAAO,GAAG,KAAK,EAC5E,OAAO,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,gCACsB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { jsx as o } from "react/jsx-runtime";
3
- import { SelectControl as r } from "./SelectControl.js";
3
+ import { SelectControl as r } from "./components/SelectControl.js";
4
4
  const c = (e) => /* @__PURE__ */ o(r, { ...e, searchable: !1 });
5
5
  export {
6
6
  c as Select
@@ -1,23 +1,47 @@
1
- const e = "_select_1h59j_2", _ = "_disabled_1h59j_14", l = "_error_1h59j_14", r = "_outlined_1h59j_18", o = "_filled_1h59j_22", t = "_trigger_1h59j_31", s = "_value_1h59j_54", c = "_arrow_1h59j_62", d = "_placeholder_1h59j_67", a = {
2
- select: e,
1
+ const o = "_root_1iyl1_3", t = "_select_1iyl1_11", _ = "_disabled_1iyl1_35", e = "_error_1iyl1_35", n = "_outlined_1iyl1_43", l = "_filled_1iyl1_51", i = "_trigger_1iyl1_71", c = "_open_1iyl1_113", r = "_value_1iyl1_131", s = "_arrow_1iyl1_149", a = "_placeholder_1iyl1_159", d = "_option_1iyl1_213", p = "_optionContent_1iyl1_243", y = "_optionIcon_1iyl1_251", u = "_text_1iyl1_261", h = "_active_1iyl1_277", g = "_dropdown_1iyl1_283", v = "_searchRoot_1iyl1_313", w = "_searchInput_1iyl1_325", I = "_hiddenValue_1iyl1_341", V = "_searchValue_1iyl1_353", f = {
2
+ root: o,
3
+ select: t,
3
4
  disabled: _,
4
- error: l,
5
- outlined: r,
6
- filled: o,
7
- trigger: t,
8
- value: s,
9
- arrow: c,
10
- placeholder: d
5
+ error: e,
6
+ outlined: n,
7
+ filled: l,
8
+ trigger: i,
9
+ open: c,
10
+ value: r,
11
+ arrow: s,
12
+ placeholder: a,
13
+ option: d,
14
+ optionContent: p,
15
+ optionIcon: y,
16
+ text: u,
17
+ active: h,
18
+ dropdown: g,
19
+ searchRoot: v,
20
+ searchInput: w,
21
+ hiddenValue: I,
22
+ searchValue: V
11
23
  };
12
24
  export {
13
- c as arrow,
14
- a as default,
25
+ h as active,
26
+ s as arrow,
27
+ f as default,
15
28
  _ as disabled,
16
- l as error,
17
- o as filled,
18
- r as outlined,
19
- d as placeholder,
20
- e as select,
21
- t as trigger,
22
- s as value
29
+ g as dropdown,
30
+ e as error,
31
+ l as filled,
32
+ I as hiddenValue,
33
+ c as open,
34
+ d as option,
35
+ p as optionContent,
36
+ y as optionIcon,
37
+ n as outlined,
38
+ a as placeholder,
39
+ o as root,
40
+ w as searchInput,
41
+ v as searchRoot,
42
+ V as searchValue,
43
+ t as select,
44
+ u as text,
45
+ i as trigger,
46
+ r as value
23
47
  };