@divayth/brick-ui 0.6.1 → 0.7.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 (58) hide show
  1. package/dist/app/ModalProvider.d.ts.map +1 -0
  2. package/dist/{ui/Modal → app}/ModalProvider.js +1 -1
  3. package/dist/app/Provider.d.ts +7 -8
  4. package/dist/app/Provider.d.ts.map +1 -1
  5. package/dist/app/Provider.js +16 -57
  6. package/dist/app/ThemeProvider.d.ts +14 -0
  7. package/dist/app/ThemeProvider.d.ts.map +1 -0
  8. package/dist/app/ThemeProvider.js +43 -0
  9. package/dist/app/index.d.ts +1 -1
  10. package/dist/app/index.d.ts.map +1 -1
  11. package/dist/index.js +44 -42
  12. package/dist/styles.css +1 -1
  13. package/dist/ui/Date/DateInput.d.ts +1 -1
  14. package/dist/ui/Date/DateInput.d.ts.map +1 -1
  15. package/dist/ui/Date/DateInput.js +14 -14
  16. package/dist/ui/Field/Field.d.ts +1 -1
  17. package/dist/ui/Field/Field.d.ts.map +1 -1
  18. package/dist/ui/Flex/Flex.d.ts +3 -3
  19. package/dist/ui/Flex/Flex.d.ts.map +1 -1
  20. package/dist/ui/Flex/Flex.js +12 -14
  21. package/dist/ui/Flex/constants.d.ts +1 -1
  22. package/dist/ui/Flex/constants.d.ts.map +1 -1
  23. package/dist/ui/Flex/index.d.ts +2 -0
  24. package/dist/ui/Flex/index.d.ts.map +1 -0
  25. package/dist/ui/Grid/Grid.types.d.ts +2 -2
  26. package/dist/ui/Grid/Grid.types.d.ts.map +1 -1
  27. package/dist/ui/Input/Input.d.ts +1 -1
  28. package/dist/ui/Input/Input.d.ts.map +1 -1
  29. package/dist/ui/Input/Input.js +31 -27
  30. package/dist/ui/Input/index.d.ts +2 -0
  31. package/dist/ui/Input/index.d.ts.map +1 -0
  32. package/dist/ui/Modal/Modal.d.ts +8 -6
  33. package/dist/ui/Modal/Modal.d.ts.map +1 -1
  34. package/dist/ui/Modal/Modal.js +87 -103
  35. package/dist/ui/Modal/Modal.module.css.js +17 -17
  36. package/dist/ui/Modal/ModalContext.js +2 -2
  37. package/dist/ui/Modal/index.d.ts +4 -0
  38. package/dist/ui/Modal/index.d.ts.map +1 -0
  39. package/dist/ui/MultipleChip/MultipleChip.d.ts +1 -1
  40. package/dist/ui/MultipleChip/MultipleChip.d.ts.map +1 -1
  41. package/dist/ui/NoData/NoData.d.ts +1 -1
  42. package/dist/ui/NoData/NoData.d.ts.map +1 -1
  43. package/dist/ui/Select/Select.types.d.ts +1 -1
  44. package/dist/ui/Select/Select.types.d.ts.map +1 -1
  45. package/dist/ui/Select/SelectOptions.js +1 -1
  46. package/dist/ui/Sticky/Sticky.d.ts +1 -1
  47. package/dist/ui/Sticky/Sticky.d.ts.map +1 -1
  48. package/dist/ui/Tabs/TabsList.d.ts +1 -1
  49. package/dist/ui/Tabs/TabsList.d.ts.map +1 -1
  50. package/dist/ui/Textarea/Textarea.d.ts +1 -1
  51. package/dist/ui/Textarea/Textarea.d.ts.map +1 -1
  52. package/dist/ui/Tooltip/Tooltip.js +15 -15
  53. package/dist/ui/index.d.ts +3 -5
  54. package/dist/ui/index.d.ts.map +1 -1
  55. package/package.json +1 -1
  56. package/dist/ui/Modal/ModalProvider.d.ts.map +0 -1
  57. /package/dist/{ui/Modal → app}/ModalProvider.d.ts +0 -0
  58. /package/dist/app/{Provider.module.css.js → ThemeProvider.module.css.js} +0 -0
@@ -2,7 +2,7 @@
2
2
  import { jsx as e, jsxs as I } from "react/jsx-runtime";
3
3
  import { useState as O, useRef as S } from "react";
4
4
  import { useComposedRefs as j } from "@radix-ui/react-compose-refs";
5
- import p from "clsx";
5
+ import l from "clsx";
6
6
  import { CalendarDays as F } from "lucide-react";
7
7
  import { DayPicker as k } from "react-day-picker";
8
8
  import { ru as w, enUS as M } from "react-day-picker/locale";
@@ -12,12 +12,12 @@ import { Input as W } from "../Input/Input.js";
12
12
  import { Popover as a } from "../Popover/Popover.js";
13
13
  import { formatDate as q } from "../../lib/dates.js";
14
14
  /* empty css */
15
- import l from "./DateInput.module.css.js";
15
+ import p from "./DateInput.module.css.js";
16
16
  const _ = ({
17
- value: o,
17
+ value: r,
18
18
  onChange: f,
19
19
  calendarProps: u,
20
- disabled: r,
20
+ disabled: o,
21
21
  className: d,
22
22
  endIcon: g,
23
23
  label: n,
@@ -28,43 +28,43 @@ const _ = ({
28
28
  className: D,
29
29
  autoFocus: y = !0,
30
30
  animate: P = !0,
31
- defaultMonth: R = o ?? void 0,
31
+ defaultMonth: R = r ?? void 0,
32
32
  ...v
33
33
  } = u ?? {};
34
- return /* @__PURE__ */ e(a.Root, { open: m && !r, onOpenChange: i, children: /* @__PURE__ */ I(U, { direction: "col", gap: "none", className: "relative", children: [
34
+ return /* @__PURE__ */ e(a.Root, { open: m && !o, onOpenChange: i, children: /* @__PURE__ */ I(U, { direction: "col", gap: "none", className: "relative", children: [
35
35
  /* @__PURE__ */ e(a.Trigger, { children: /* @__PURE__ */ e(
36
36
  W,
37
37
  {
38
38
  ref: N,
39
- value: q(o, s),
39
+ value: q(r, s),
40
40
  type: "text",
41
41
  readOnly: !0,
42
- disabled: r,
42
+ disabled: o,
43
43
  label: n,
44
44
  endIcon: g ?? F,
45
45
  "aria-haspopup": "dialog",
46
- "aria-expanded": m && !r,
47
- className: p({ "cursor-pointer": !r }, d),
46
+ "aria-expanded": m && !o,
47
+ className: l({ "cursor-pointer": !o }, d),
48
48
  ...x
49
49
  }
50
50
  ) }),
51
51
  /* @__PURE__ */ e(
52
52
  a.Content,
53
53
  {
54
- container: t.current?.closest("dialog"),
54
+ container: t.current?.closest('dialog, [role="dialog"]'),
55
55
  align: "start",
56
56
  "aria-label": n ?? C.chooseDate,
57
- className: l.dropdown,
57
+ className: p.dropdown,
58
58
  children: /* @__PURE__ */ e(
59
59
  k,
60
60
  {
61
- className: p(l.calendar, D),
61
+ className: l(p.calendar, D),
62
62
  autoFocus: y,
63
63
  animate: P,
64
64
  mode: "single",
65
65
  locale: s.startsWith("ru") ? w : M,
66
66
  defaultMonth: R,
67
- selected: o ?? void 0,
67
+ selected: r ?? void 0,
68
68
  onSelect: (c) => {
69
69
  c && (f?.(c), i(!1), t.current?.focus());
70
70
  },
@@ -1,6 +1,6 @@
1
1
  import type { LucideIcon } from 'lucide-react';
2
2
  import type { ComponentProps } from 'react';
3
- import { type FlexProps } from '../Flex/Flex.js';
3
+ import { type FlexProps } from '../Flex/index.js';
4
4
  import type { Size } from '../../lib/sizes.js';
5
5
  export type ControlSize = Exclude<Size, 'xs' | 'xl'>;
6
6
  export interface FieldControlProps extends ComponentProps<'div'> {
@@ -1 +1 @@
1
- {"version":3,"file":"Field.d.ts","sourceRoot":"","sources":["../../../src/ui/Field/Field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAExD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAI1C,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC,CAAC;AAErD,MAAM,WAAW,iBAAkB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC9D,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,IAAI,GAAI,wBAAwB,SAAS,gCAIrD,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,OAAO,CAAC;IAC9D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,KAAK,GAAI,gCAAgC,eAAe,gCAMpE,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,0CAKrB,iBAAiB,gCASnB,CAAC;AAEF,MAAM,WAAW,cAAe,SAAQ,cAAc,CAAC,MAAM,C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,cAAc,CAAC,MAAM,CAAC;IAC5D,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,CAAC;CAC5B;AAED,eAAO,MAAM,IAAI,GAAI,wDAKlB,cAAc,gCAQhB,CAAC;AAEF,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,MAAM,CAAC;IAC7D,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,KAAK,GAAI,gCAAgC,eAAe,gCAIpE,CAAC;AAEF,eAAO,MAAM,KAAK;mCAhE2B,SAAS;4CAUA,eAAe;wDAalE,iBAAiB;mEAqBjB,cAAc;4CAcqC,eAAe;CAMX,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import type { ComponentProps } from 'react';
2
- import { type AlignItemsType, type DirectionType, type GapType, type JustifayContentType } from './constants.js';
2
+ import { type AlignItemsType, type DirectionType, type GapType, type JustifyContentType } from './constants.js';
3
3
  export interface FlexProps extends ComponentProps<'div'> {
4
4
  direction?: DirectionType;
5
5
  alignItems?: AlignItemsType;
6
- justifyContent?: JustifayContentType;
6
+ justifyContent?: JustifyContentType;
7
7
  gap?: GapType;
8
8
  }
9
- export declare const Flex: ({ children, direction, gap, justifyContent, alignItems, className, ...props }: FlexProps) => import("react").JSX.Element;
9
+ export declare const Flex: ({ direction, gap, justifyContent, alignItems, className, ...props }: FlexProps) => import("react").JSX.Element;
10
10
  //# sourceMappingURL=Flex.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../src/ui/Flex/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAG5C,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAElB,KAAK,OAAO,EACZ,KAAK,mBAAmB,EAEzB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,KAAK,CAAC;IACtD,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,cAAc,CAAC,EAAE,mBAAmB,CAAC;IACrC,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,IAAI,GAAI,+EAQlB,SAAS,gCAgBX,CAAC"}
1
+ {"version":3,"file":"Flex.d.ts","sourceRoot":"","sources":["../../../src/ui/Flex/Flex.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,OAAO,EAEL,KAAK,cAAc,EAEnB,KAAK,aAAa,EAElB,KAAK,OAAO,EAEZ,KAAK,kBAAkB,EACxB,MAAM,gBAAgB,CAAC;AAExB,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,KAAK,CAAC;IACtD,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC,GAAG,CAAC,EAAE,OAAO,CAAC;CACf;AAED,eAAO,MAAM,IAAI,GAAI,qEAOlB,SAAS,gCAYX,CAAC"}
@@ -1,29 +1,27 @@
1
1
  import { jsx as _ } from "react/jsx-runtime";
2
- import { twMerge as I } from "tailwind-merge";
3
- import { GAP_SX as N, DIRECTION_SX as T, ALIGN_ITEMS_SX as f, JUSTIFY_CONTENT_SX as i } from "./constants.js";
4
- const a = ({
5
- children: r,
6
- direction: t = "row",
2
+ import { cn as e } from "../../lib/cn.js";
3
+ import { JUSTIFY_CONTENT_SX as I, ALIGN_ITEMS_SX as N, DIRECTION_SX as T, GAP_SX as c } from "./constants.js";
4
+ const x = ({
5
+ direction: r = "row",
7
6
  gap: o = "md",
8
- justifyContent: e = "start",
7
+ justifyContent: t = "start",
9
8
  alignItems: m = "stretch",
10
9
  className: s,
11
10
  ...S
12
11
  }) => /* @__PURE__ */ _(
13
12
  "div",
14
13
  {
15
- className: I(
14
+ className: e(
16
15
  "flex",
17
- N[o],
18
- T[t],
19
- f[m],
20
- i[e],
16
+ c[o],
17
+ T[r],
18
+ N[m],
19
+ I[t],
21
20
  s
22
21
  ),
23
- ...S,
24
- children: r
22
+ ...S
25
23
  }
26
24
  );
27
25
  export {
28
- a as Flex
26
+ x as Flex
29
27
  };
@@ -24,7 +24,7 @@ export declare const GAP_SX: {
24
24
  readonly xl: "gap-8";
25
25
  };
26
26
  export type AlignItemsType = keyof typeof ALIGN_ITEMS_SX;
27
- export type JustifayContentType = keyof typeof JUSTIFY_CONTENT_SX;
27
+ export type JustifyContentType = keyof typeof JUSTIFY_CONTENT_SX;
28
28
  export type DirectionType = keyof typeof DIRECTION_SX;
29
29
  export type GapType = Size | 'none';
30
30
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/ui/Flex/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;CAKrB,CAAC;AAEX,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,eAAO,MAAM,MAAM;;;;;;;CAOT,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,cAAc,CAAC;AAEzD,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAElE,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,YAAY,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/ui/Flex/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,eAAO,MAAM,cAAc;;;;;CAKjB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;CAKrB,CAAC;AAEX,eAAO,MAAM,YAAY;;;CAGf,CAAC;AAEX,eAAO,MAAM,MAAM;;;;;;;CAOT,CAAC;AAEX,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,cAAc,CAAC;AAEzD,MAAM,MAAM,kBAAkB,GAAG,MAAM,OAAO,kBAAkB,CAAC;AAEjE,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,YAAY,CAAC;AAEtD,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC"}
@@ -0,0 +1,2 @@
1
+ export { Flex, type FlexProps } from './Flex.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Flex/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,WAAW,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { ComponentProps } from 'react';
2
- import type { AlignItemsType, JustifayContentType } from '../Flex/constants.js';
2
+ import type { AlignItemsType, JustifyContentType } from '../Flex/constants.js';
3
3
  import type { ResponsiveSize } from '../../lib/getResponsiveSize.js';
4
4
  import type { Size } from '../../lib/sizes.js';
5
5
  export type GridGap = Size | 'none';
@@ -11,7 +11,7 @@ export interface GridRootProps extends ComponentProps<'div'> {
11
11
  rowGap?: ResponsiveValue<GridGap>;
12
12
  columnGap?: ResponsiveValue<GridGap>;
13
13
  align?: AlignItemsType;
14
- justify?: JustifayContentType;
14
+ justify?: JustifyContentType;
15
15
  }
16
16
  export interface GridItemProps extends ComponentProps<'div'> {
17
17
  size?: GridItemSize;
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.types.d.ts","sourceRoot":"","sources":["../../../src/ui/Grid/Grid.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,KAAK,EAAE,cAAc,EAAE,mBAA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O,KAAK,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAE1C,MAAM,MAAM,OAAO,GAAG,IAAI,GAAG,MAAM,CAAC;AAEpC,MAAM,MAAM,eAAe,CAAC,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAE9D,MAAM,MAAM,YAAY,GAAG,cAAc,CAAC,MAAM,CAAC,GAAG,KAAK,GAAG,MAAM,CAAC;AAEnE,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IAClC,SAAS,CAAC,EAAE,eAAe,CAAC,OAAO,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,cAAc,CAAC;IACvB,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED,MAAM,WAAW,aAAc,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC1D,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,MAAM,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IACjC,KAAK,CAAC,EAAE,eAAe,CAAC,MAAM,CAAC,CAAC;IAChC,KAAK,CAAC,EAAE,eAAe,CAAC,cAAc,GAAG,MAAM,CAAC,CAAC;CAClD"}
@@ -10,5 +10,5 @@ export interface InputControlProps {
10
10
  fullWidth?: boolean;
11
11
  }
12
12
  export type InputProps = InputControlProps & Omit<ComponentProps<'input'>, 'size'>;
13
- export declare const Input: ({ id: idProps, label, error, size, fullWidth, className, startIcon, endIcon, ...inputProps }: InputProps) => import("react").JSX.Element;
13
+ export declare const Input: ({ id: idProps, label, error, size, fullWidth, className, startIcon, endIcon, "aria-describedby": describedBy, "aria-invalid": ariaInvalid, ...inputProps }: InputProps) => import("react").JSX.Element;
14
14
  //# sourceMappingURL=Input.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/ui/Input/Input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAS,MAAM,OAAO,CAAC;AAGnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,WAAW,EAAS,MAAM,oBAAoB,CAAC;AAI7D,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,UAAU,GAAG,iBAAiB,GACtC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAE1C,eAAO,MAAM,KAAK,GAAI,8FAUnB,UAAU,gCAyBZ,CAAC"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../../../src/ui/Input/Input.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAS,MAAM,OAAO,CAAC;AAEnD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,KAAK,WAAW,EAAS,MAAM,oBAAoB,CAAC;AAK7D,MAAM,WAAW,iBAAiB;IAChC,SAAS,CAAC,EAAE,UAAU,CAAC;IACvB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,UAAU,GAAG,iBAAiB,GACtC,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,CAAC;AAE1C,eAAO,MAAM,KAAK,GAAI,4JAYnB,UAAU,gCA6BZ,CAAC"}
@@ -1,44 +1,48 @@
1
1
  "use client";
2
- import { jsxs as e, jsx as r } from "react/jsx-runtime";
3
- import { useId as h } from "react";
4
- import w from "clsx";
5
- import { Field as o } from "../Field/Field.js";
6
- import i from "./Input.module.css.js";
7
- const N = ({
2
+ import { jsxs as c, jsx as r } from "react/jsx-runtime";
3
+ import { useId as I } from "react";
4
+ import { Field as i } from "../Field/Field.js";
5
+ import { cn as j } from "../../lib/cn.js";
6
+ import t from "./Input.module.css.js";
7
+ const g = ({
8
8
  id: l,
9
- label: c,
10
- error: t,
11
- size: d = "md",
9
+ label: a,
10
+ error: o,
11
+ size: m = "md",
12
12
  fullWidth: p = !1,
13
13
  className: f,
14
- startIcon: m,
15
- endIcon: n,
16
- ...u
14
+ startIcon: n,
15
+ endIcon: d,
16
+ "aria-describedby": u,
17
+ "aria-invalid": h,
18
+ ...b
17
19
  }) => {
18
- const a = h(), s = l ?? a;
19
- return /* @__PURE__ */ e(o.Root, { className: p ? "w-full" : "w-auto", children: [
20
- c && /* @__PURE__ */ r(o.Label, { htmlFor: s, label: c }),
21
- /* @__PURE__ */ e(o.Control, { size: d, children: [
22
- m && /* @__PURE__ */ r(o.Icon, { icon: m }),
20
+ const v = I(), e = l ?? v, s = o ? `${e}-error` : void 0, w = [u, s].filter(Boolean).join(" ") || void 0;
21
+ return /* @__PURE__ */ c(i.Root, { className: p ? "w-full" : "w-auto", children: [
22
+ a && /* @__PURE__ */ r(i.Label, { htmlFor: e, label: a }),
23
+ /* @__PURE__ */ c(i.Control, { size: m, children: [
24
+ n && /* @__PURE__ */ r(i.Icon, { icon: n }),
23
25
  /* @__PURE__ */ r(
24
26
  "input",
25
27
  {
26
- id: s,
27
- className: w(
28
- i.input,
29
- t && i.error,
30
- m && i.withStartIcon,
31
- n && i.withEndIcon,
28
+ id: e,
29
+ "aria-invalid": o ? !0 : h,
30
+ "aria-describedby": w,
31
+ className: j(
32
+ t.input,
33
+ o && t.error,
34
+ n && t.withStartIcon,
35
+ d && t.withEndIcon,
32
36
  f
33
37
  ),
34
- ...u
38
+ ...b
35
39
  }
36
40
  ),
37
- n && /* @__PURE__ */ r(o.Icon, { icon: n, position: "end" })
41
+ d && /* @__PURE__ */ r(i.Icon, { icon: d, position: "end" })
38
42
  ] }),
39
- t && /* @__PURE__ */ r(o.Error, { id: `${s}-error`, error: t })
43
+ o && /* @__PURE__ */ r(i.Error, { id: s, error: o })
40
44
  ] });
41
45
  };
42
46
  export {
43
- N as Input
47
+ g as Input
44
48
  };
@@ -0,0 +1,2 @@
1
+ export { Input, type InputControlProps, type InputProps } from './Input.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Input/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC"}
@@ -1,6 +1,6 @@
1
- import { type ReactNode } from 'react';
1
+ import { type ReactElement, type ReactNode } from 'react';
2
2
  import { type ButtonProps } from '../Button/index.js';
3
- import { type FlexProps } from '../Flex/Flex.js';
3
+ import { type FlexProps } from '../Flex/index.js';
4
4
  export declare const MODAL_SIZE: {
5
5
  readonly xs: "xs";
6
6
  readonly sm: "sm";
@@ -14,18 +14,20 @@ export interface ModalRootProps {
14
14
  size?: ModalSize;
15
15
  className?: string;
16
16
  closeDisabled?: boolean;
17
+ open?: boolean;
18
+ onOpenChange?: (open: boolean) => void;
17
19
  'aria-label'?: string;
18
20
  }
19
21
  interface HeaderProps extends FlexProps {
22
+ text: string | ReactElement;
20
23
  closeLabel?: string;
21
24
  startIcon?: ReactNode;
22
25
  withCloseButton?: boolean;
23
26
  }
24
27
  export declare const Modal: {
25
- Root: ({ children, size, className, closeDisabled, "aria-label": ariaLabel, }: ModalRootProps) => import("react").JSX.Element;
26
- Header: ({ children, startIcon, withCloseButton, closeLabel, ...props }: HeaderProps) => import("react").JSX.Element;
27
- Content: ({ children, className, ref, ...props }: FlexProps) => import("react").JSX.Element;
28
- Footer: ({ children, justifyContent, ...props }: FlexProps) => import("react").JSX.Element;
28
+ Root: ({ children, size, className, closeDisabled, open, onOpenChange, "aria-label": ariaLabel, }: ModalRootProps) => import("react").JSX.Element;
29
+ Header: ({ text, children, startIcon, withCloseButton, closeLabel, ...props }: HeaderProps) => import("react").JSX.Element;
30
+ Content: ({ className, ...props }: FlexProps) => import("react").JSX.Element;
29
31
  Cancel: ({ children, onClick, disabled, ...props }: ButtonProps) => import("react").JSX.Element;
30
32
  Confirm: ({ children, type, ...props }: ButtonProps) => import("react").JSX.Element;
31
33
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/ui/Modal/Modal.tsx"],"names":[],"mappings":"AAEA,OAAO,EAGL,KAAK,SAAS,EASf,MAAM,OAAO,CAAC;AAMf,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAAQ,KAAK,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAQxD,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,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAqGD,UAAU,WAAY,SAAQ,SAAS;IACrC,UAA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,CAAC"}
@@ -1,130 +1,114 @@
1
1
  "use client";
2
- import { jsx as s, jsxs as R } from "react/jsx-runtime";
3
- import { createContext as H, useContext as M, useRef as b, useState as N, useImperativeHandle as P, useLayoutEffect as j, useId as B, useMemo as T, useEffect as X } from "react";
4
- import E from "clsx";
5
- import { X as z } from "lucide-react";
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";
4
+ import { X as R } from "lucide-react";
5
+ import { Dialog as u } from "radix-ui";
6
6
  import { useProvider as p } from "../../app/Provider.js";
7
- import { Button as S } from "../Button/Button.js";
7
+ import { Button as b } from "../Button/Button.js";
8
8
  import { Flex as v } from "../Flex/Flex.js";
9
- import { IconButton as A } from "../IconButton/IconButton.js";
10
- import { Text as D } from "../Text/Text.js";
11
- import { useModal as h } from "./ModalContext.js";
12
- import m from "./Modal.module.css.js";
13
- const F = {
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 = {
14
15
  xs: "xs",
15
16
  sm: "sm",
16
17
  md: "md",
17
18
  lg: "lg",
18
19
  xl: "xl"
19
- }, x = H(
20
+ }, C = P(
20
21
  {}
21
- );
22
- let g = 0, w = "", C = "";
23
- const L = () => (g === 0 && (w = document.body.style.overflow, C = document.documentElement.style.overflow, document.body.style.overflow = "hidden", document.documentElement.style.overflow = "hidden"), g += 1, () => {
24
- g -= 1, g === 0 && (document.body.style.overflow = w, document.documentElement.style.overflow = C);
25
- }), Y = ({
26
- children: o,
27
- size: n = F.md,
28
- className: l,
29
- closeDisabled: r = !1,
30
- "aria-label": c
22
+ ), k = ({
23
+ children: e,
24
+ size: r = j.md,
25
+ className: s,
26
+ closeDisabled: t = !1,
27
+ open: m = !0,
28
+ onOpenChange: n,
29
+ "aria-label": a
31
30
  }) => {
32
- const { closeModal: a } = h(), i = b(null), t = b(!1), d = B(), u = T(
33
- () => ({ titleId: d, closeDisabled: r }),
34
- [d, r]
35
- );
36
- X(() => {
37
- const e = i.current;
38
- if (!e) return;
39
- e.showModal();
40
- const y = L();
41
- return () => {
42
- e.close(), y();
43
- };
44
- }, []);
45
- const f = (e) => {
46
- if (e.target !== e.currentTarget) return !1;
47
- const { left: y, right: k, top: I, bottom: O } = e.currentTarget.getBoundingClientRect();
48
- return e.clientX < y || e.clientX > k || e.clientY < I || e.clientY > O;
49
- };
50
- return /* @__PURE__ */ s(x.Provider, { value: u, children: /* @__PURE__ */ s(
51
- "dialog",
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(
35
+ u.Root,
52
36
  {
53
- ref: i,
54
- className: E(m.root, m[n], l),
55
- "aria-modal": "true",
56
- "aria-labelledby": c ? void 0 : d,
57
- "aria-label": c,
58
- onCancel: (e) => {
59
- e.preventDefault(), r || a();
60
- },
61
- onPointerDown: (e) => {
62
- t.current = f(e);
63
- },
64
- onClick: (e) => {
65
- !r && t.current && f(e) && a(), t.current = !1;
37
+ open: m,
38
+ onOpenChange: (c) => {
39
+ !c && !t && f();
66
40
  },
67
- children: /* @__PURE__ */ s(v, { direction: "col", gap: "md", className: m.layout, children: o })
41
+ children: /* @__PURE__ */ x(u.Portal, { children: [
42
+ /* @__PURE__ */ o(u.Overlay, { className: i.overlay }),
43
+ /* @__PURE__ */ o(
44
+ u.Content,
45
+ {
46
+ className: g(i.root, i[r], s),
47
+ "aria-describedby": void 0,
48
+ "aria-label": a,
49
+ onEscapeKeyDown: (c) => {
50
+ t && c.preventDefault();
51
+ },
52
+ onInteractOutside: (c) => {
53
+ t && c.preventDefault();
54
+ },
55
+ onOpenAutoFocus: () => {
56
+ d.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
57
+ },
58
+ onCloseAutoFocus: (c) => {
59
+ d.current?.isConnected && (c.preventDefault(), d.current.focus());
60
+ },
61
+ ...a ? { "aria-labelledby": void 0 } : {},
62
+ children: /* @__PURE__ */ o(v, { direction: "col", gap: "md", className: i.layout, children: e })
63
+ }
64
+ )
65
+ ] })
68
66
  }
69
67
  ) });
70
- }, V = ({
71
- children: o,
72
- startIcon: n,
73
- withCloseButton: l = !0,
74
- closeLabel: r,
75
- ...c
68
+ }, w = ({
69
+ text: e,
70
+ children: r,
71
+ startIcon: s,
72
+ withCloseButton: t = !0,
73
+ closeLabel: m,
74
+ ...n
76
75
  }) => {
77
- const { messages: a } = p(), { closeModal: i } = h(), { titleId: t, closeDisabled: d } = M(x);
78
- return /* @__PURE__ */ R(v, { justifyContent: "between", alignItems: "center", ...c, children: [
79
- n,
80
- /* @__PURE__ */ s(D, { id: t, size: "xl", weight: "medium", children: o }),
81
- l && /* @__PURE__ */ s(
82
- A,
76
+ const { messages: a } = p(), { closeDisabled: l, closeModal: d } = M(C);
77
+ return /* @__PURE__ */ x(v, { justifyContent: "between", alignItems: "start", ...n, children: [
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,
81
+ t && /* @__PURE__ */ o(
82
+ D,
83
83
  {
84
- className: m.close,
84
+ className: i.close,
85
85
  color: "secondary",
86
- "aria-label": r ?? a.close,
87
- disabled: d,
88
- onClick: i,
89
- children: /* @__PURE__ */ s(z, {})
86
+ "aria-label": m ?? a.close,
87
+ disabled: l,
88
+ onClick: d,
89
+ children: /* @__PURE__ */ o(R, {})
90
90
  }
91
91
  )
92
92
  ] });
93
- }, Z = ({ children: o, className: n, ref: l, ...r }) => {
94
- const c = b(null), [a, i] = N(!1);
95
- return P(l, () => c.current, []), j(() => {
96
- const t = c.current;
97
- if (!t) return;
98
- const d = () => i(t.scrollHeight > t.clientHeight), u = new ResizeObserver(d);
99
- return u.observe(t), Array.from(t.children).forEach((f) => u.observe(f)), d(), () => u.disconnect();
100
- }, [o]), /* @__PURE__ */ s(
101
- v,
102
- {
103
- ref: c,
104
- className: E(m.content, { [m.scrollable]: a }, n),
105
- ...r,
106
- children: o
107
- }
108
- );
109
- }, _ = ({ children: o, justifyContent: n = "end", ...l }) => /* @__PURE__ */ s(v, { direction: "row", justifyContent: n, ...l, children: o }), q = ({ children: o, onClick: n, disabled: l, ...r }) => {
110
- const { messages: c } = p(), { closeModal: a } = h(), { closeDisabled: i } = M(x);
111
- return /* @__PURE__ */ s(
112
- S,
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);
95
+ return /* @__PURE__ */ o(
96
+ b,
113
97
  {
114
98
  variant: "outlined",
115
- disabled: l || i,
116
- onClick: (t) => {
117
- i || (n?.(t), t.defaultPrevented || a());
99
+ disabled: s || n,
100
+ onClick: (l) => {
101
+ n || (r?.(l), l.defaultPrevented || a());
118
102
  },
119
- ...r,
120
- children: o === void 0 ? c.cancel : o
103
+ ...t,
104
+ children: e === void 0 ? m.cancel : e
121
105
  }
122
106
  );
123
- }, G = ({ children: o, type: n = "submit", ...l }) => {
124
- const { messages: r } = p();
125
- return /* @__PURE__ */ s(S, { type: n, ...l, children: o === void 0 ? r.confirm : o });
126
- }, le = { Root: Y, Header: V, Content: Z, Footer: _, Cancel: q, Confirm: G };
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 };
127
111
  export {
128
- F as MODAL_SIZE,
129
- le as Modal
112
+ j as MODAL_SIZE,
113
+ J as Modal
130
114
  };
@@ -1,25 +1,25 @@
1
- const o = "_root_12ndw_2", _ = "_layout_12ndw_24", n = "_content_12ndw_28", s = "_scrollable_12ndw_36", t = "_xs_12ndw_40", l = "_sm_12ndw_41", c = "_md_12ndw_42", d = "_lg_12ndw_43", e = "_xl_12ndw_44", w = "_close_12ndw_46", a = {
1
+ const o = "_root_1oqf7_2", _ = "_overlay_1oqf7_21", t = "_layout_1oqf7_28", s = "_content_1oqf7_32", c = "_xs_1oqf7_40", l = "_sm_1oqf7_41", n = "_md_1oqf7_42", e = "_lg_1oqf7_43", f = "_xl_1oqf7_44", q = "_close_1oqf7_46", a = {
2
2
  root: o,
3
- layout: _,
4
- content: n,
5
- scrollable: s,
6
- xs: t,
3
+ overlay: _,
4
+ layout: t,
5
+ content: s,
6
+ xs: c,
7
7
  sm: l,
8
- md: c,
9
- lg: d,
10
- xl: e,
11
- close: w
8
+ md: n,
9
+ lg: e,
10
+ xl: f,
11
+ close: q
12
12
  };
13
13
  export {
14
- w as close,
15
- n as content,
14
+ q as close,
15
+ s as content,
16
16
  a as default,
17
- _ as layout,
18
- d as lg,
19
- c as md,
17
+ t as layout,
18
+ e as lg,
19
+ n as md,
20
+ _ as overlay,
20
21
  o as root,
21
- s as scrollable,
22
22
  l as sm,
23
- e as xl,
24
- t as xs
23
+ f as xl,
24
+ c as xs
25
25
  };
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { createContext as t, useContext as o } from "react";
3
- const e = t({}), r = () => o(e);
2
+ import { useContext as t, createContext as o } from "react";
3
+ const e = o({}), r = () => t(e);
4
4
  export {
5
5
  e as ModalContext,
6
6
  r as useModal
@@ -0,0 +1,4 @@
1
+ export { Modal, MODAL_SIZE, type ModalRootProps, type ModalSize } from './Modal.js';
2
+ export { type ModalActions, useModal } from './ModalContext.js';
3
+ export { ModalProvider } from '../../app/Provider.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ui/Modal/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,YAAY,CAAC;AACpF,OAAO,EAAE,KAAK,YAAY,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC"}