alif-ui 2.0.0-alpha.21 → 2.0.0-alpha.22

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 (87) hide show
  1. package/dist/alif-ui.css +1 -1
  2. package/dist/components/Accordion/AccordionContent/AccordionContent.js +6 -6
  3. package/dist/components/Accordion/AccordionTrigger/AccordionTrigger.js +9 -9
  4. package/dist/components/Alert/Alert.js +21 -21
  5. package/dist/components/Dates/InputDatePicker/InputDatePicker.js +4 -4
  6. package/dist/components/Dates/InputMonthPicker/InputMonthPicker.js +4 -4
  7. package/dist/components/Dates/InputMonthYearPicker/InputMonthYearPicker.js +4 -4
  8. package/dist/components/Dates/InputTimePicker/InputTimePicker.js +4 -4
  9. package/dist/components/Dates/InputYearPicker/InputYearPicker.js +4 -4
  10. package/dist/components/Drawer/Drawer.js +6 -6
  11. package/dist/components/Field/InputBaseWrapper/InputBaseWrapper.js +17 -17
  12. package/dist/components/FileUploader/FileUploader.js +4 -4
  13. package/dist/components/List/ListGroup/ListGroup.js +28 -21
  14. package/dist/components/Modal/Modal.js +4 -4
  15. package/dist/components/NativeAccordion/NativeAccordion.context.js +5 -0
  16. package/dist/components/NativeAccordion/NativeAccordion.js +37 -0
  17. package/dist/components/NativeAccordion/NativeAccordion.types.js +0 -0
  18. package/dist/components/NativeAccordion/NativeAccordion.utils.js +9 -0
  19. package/dist/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.js +25 -0
  20. package/dist/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.types.js +0 -0
  21. package/dist/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.js +32 -0
  22. package/dist/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.types.js +0 -0
  23. package/dist/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.js +27 -0
  24. package/dist/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.types.js +0 -0
  25. package/dist/components/Pagination/Pagination.js +10 -10
  26. package/dist/components/Select/SelectMultiple/SelectMultiple.js +6 -6
  27. package/dist/components/Sidebar/Sidebar.js +31 -30
  28. package/dist/components/Sidebar/SidebarCollapse/SidebarCollapse.js +30 -21
  29. package/dist/components/Sidebar/SidebarItem/SidebarItem.js +24 -46
  30. package/dist/components/Sidebar/SidebarItem/SidebarItemContent.js +39 -0
  31. package/dist/components/Snackbar/SnackbarCard/SnackbarCard.js +18 -18
  32. package/dist/components/Table/Table.js +27 -43
  33. package/dist/components/Table/TableCollapseRow/TableCollapseRow.js +42 -0
  34. package/dist/components/Textarea/Textarea.js +9 -9
  35. package/dist/icons/components/SolidSystemBookOpen.js +14 -11
  36. package/dist/lib/components/Badge/Badge.module.js +3 -3
  37. package/dist/lib/components/List/ListGroup/ListGroup.module.js +5 -5
  38. package/dist/lib/components/NativeAccordion/NativeAccordion.module.js +13 -0
  39. package/dist/lib/components/Sidebar/SidebarCollapse/SidebarCollapse.module.js +5 -3
  40. package/dist/lib/components/Table/Table.module.js +21 -19
  41. package/dist/main.js +308 -308
  42. package/dist/src/lib/components/List/List.d.ts +1 -1
  43. package/dist/src/lib/components/List/ListGroup/ListGroup.d.ts +1 -1
  44. package/dist/src/lib/components/List/ListGroup/ListGroup.d.ts.map +1 -1
  45. package/dist/src/lib/components/List/ListGroup/ListGroup.types.d.ts +4 -3
  46. package/dist/src/lib/components/List/ListGroup/ListGroup.types.d.ts.map +1 -1
  47. package/dist/src/lib/components/NativeAccordion/NativeAccordion.context.d.ts +22 -0
  48. package/dist/src/lib/components/NativeAccordion/NativeAccordion.context.d.ts.map +1 -0
  49. package/dist/src/lib/components/NativeAccordion/NativeAccordion.d.ts +8 -0
  50. package/dist/src/lib/components/NativeAccordion/NativeAccordion.d.ts.map +1 -0
  51. package/dist/src/lib/components/NativeAccordion/NativeAccordion.types.d.ts +78 -0
  52. package/dist/src/lib/components/NativeAccordion/NativeAccordion.types.d.ts.map +1 -0
  53. package/dist/src/lib/components/NativeAccordion/NativeAccordion.utils.d.ts +6 -0
  54. package/dist/src/lib/components/NativeAccordion/NativeAccordion.utils.d.ts.map +1 -0
  55. package/dist/src/lib/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.d.ts +3 -0
  56. package/dist/src/lib/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.d.ts.map +1 -0
  57. package/dist/src/lib/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.types.d.ts +20 -0
  58. package/dist/src/lib/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.types.d.ts.map +1 -0
  59. package/dist/src/lib/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.d.ts +3 -0
  60. package/dist/src/lib/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.d.ts.map +1 -0
  61. package/dist/src/lib/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.types.d.ts +28 -0
  62. package/dist/src/lib/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.types.d.ts.map +1 -0
  63. package/dist/src/lib/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.d.ts +3 -0
  64. package/dist/src/lib/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.d.ts.map +1 -0
  65. package/dist/src/lib/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.types.d.ts +24 -0
  66. package/dist/src/lib/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.types.d.ts.map +1 -0
  67. package/dist/src/lib/components/NativeAccordion/index.d.ts +6 -0
  68. package/dist/src/lib/components/NativeAccordion/index.d.ts.map +1 -0
  69. package/dist/src/lib/components/Sidebar/Sidebar.context.d.ts +1 -0
  70. package/dist/src/lib/components/Sidebar/Sidebar.context.d.ts.map +1 -1
  71. package/dist/src/lib/components/Sidebar/Sidebar.d.ts.map +1 -1
  72. package/dist/src/lib/components/Sidebar/SidebarCollapse/SidebarCollapse.d.ts.map +1 -1
  73. package/dist/src/lib/components/Sidebar/SidebarCollapse/SidebarCollapse.types.d.ts +2 -1
  74. package/dist/src/lib/components/Sidebar/SidebarCollapse/SidebarCollapse.types.d.ts.map +1 -1
  75. package/dist/src/lib/components/Sidebar/SidebarItem/SidebarItem.d.ts.map +1 -1
  76. package/dist/src/lib/components/Sidebar/SidebarItem/SidebarItemContent.d.ts +5 -0
  77. package/dist/src/lib/components/Sidebar/SidebarItem/SidebarItemContent.d.ts.map +1 -0
  78. package/dist/src/lib/components/Table/Table.d.ts +2 -3
  79. package/dist/src/lib/components/Table/Table.d.ts.map +1 -1
  80. package/dist/src/lib/components/Table/Table.types.d.ts +5 -0
  81. package/dist/src/lib/components/Table/Table.types.d.ts.map +1 -1
  82. package/dist/src/lib/components/Table/TableCollapseRow/TableCollapseRow.d.ts +3 -0
  83. package/dist/src/lib/components/Table/TableCollapseRow/TableCollapseRow.d.ts.map +1 -0
  84. package/dist/src/lib/components/index.d.ts +1 -1
  85. package/dist/src/lib/components/index.d.ts.map +1 -1
  86. package/dist/src/lib/utils/get-default-z-index.d.ts +1 -1
  87. package/package.json +4 -2
@@ -1,13 +1,13 @@
1
1
  "use client";
2
2
  import { classNames as e } from "../../../utils/class-names.js";
3
- import { useAccordionItemContext as t } from "../Accordion.context.js";
4
- import n from "../../../lib/components/Accordion/Accordion.module.js";
5
- import { Collapse as r } from "../../Collapse/Collapse.js";
3
+ import { Collapse as t } from "../../Collapse/Collapse.js";
4
+ import { useAccordionItemContext as n } from "../Accordion.context.js";
5
+ import r from "../../../lib/components/Accordion/Accordion.module.js";
6
6
  import { jsx as i } from "react/jsx-runtime";
7
7
  //#region src/lib/components/Accordion/AccordionContent/AccordionContent.tsx
8
8
  var a = ({ children: a, className: o, style: s, ref: c }) => {
9
- let { isOpen: l, duration: u, contentId: d, triggerId: f } = t();
10
- return /* @__PURE__ */ i(r, {
9
+ let { isOpen: l, duration: u, contentId: d, triggerId: f } = n();
10
+ return /* @__PURE__ */ i(t, {
11
11
  isOpen: l,
12
12
  duration: u,
13
13
  children: /* @__PURE__ */ i("div", {
@@ -16,7 +16,7 @@ var a = ({ children: a, className: o, style: s, ref: c }) => {
16
16
  style: s,
17
17
  role: "region",
18
18
  "aria-labelledby": f,
19
- className: e(n.content, o),
19
+ className: e(r.content, o),
20
20
  children: a
21
21
  })
22
22
  });
@@ -1,27 +1,27 @@
1
1
  "use client";
2
2
  import { classNames as e } from "../../../utils/class-names.js";
3
- import { useAccordionContext as t, useAccordionItemContext as n } from "../Accordion.context.js";
4
- import r from "../../../lib/components/Accordion/Accordion.module.js";
5
- import { OutlineNavigationChevronDown as i } from "../../../icons/components/OutlineNavigationChevronDown.js";
6
- import { UnstyledButton as a } from "../../UnstyledButton/UnstyledButton.js";
3
+ import { OutlineNavigationChevronDown as t } from "../../../icons/components/OutlineNavigationChevronDown.js";
4
+ import { UnstyledButton as n } from "../../UnstyledButton/UnstyledButton.js";
5
+ import { useAccordionContext as r, useAccordionItemContext as i } from "../Accordion.context.js";
6
+ import a from "../../../lib/components/Accordion/Accordion.module.js";
7
7
  import { jsx as o, jsxs as s } from "react/jsx-runtime";
8
8
  //#region src/lib/components/Accordion/AccordionTrigger/AccordionTrigger.tsx
9
9
  var c = ({ chevron: c, children: l, className: u, style: d, ref: f }) => {
10
- let { toggle: p } = t(), { value: m, disabled: h, isOpen: g, triggerId: _, contentId: v } = n();
11
- return /* @__PURE__ */ s(a, {
10
+ let { toggle: p } = r(), { value: m, disabled: h, isOpen: g, triggerId: _, contentId: v } = i();
11
+ return /* @__PURE__ */ s(n, {
12
12
  id: _,
13
13
  type: "button",
14
14
  "aria-expanded": g,
15
15
  "aria-controls": v,
16
16
  disabled: h,
17
17
  onClick: () => p(m),
18
- className: e(r.trigger, u),
18
+ className: e(a.trigger, u),
19
19
  style: d,
20
20
  ref: f,
21
21
  children: [/* @__PURE__ */ o("div", { children: l }), /* @__PURE__ */ o("span", {
22
- className: r.triggerIcon,
22
+ className: a.triggerIcon,
23
23
  "aria-hidden": "true",
24
- children: typeof c == "function" ? c(g) : c ?? /* @__PURE__ */ o(i, { className: e(r.chevron, g && r.chevronOpen) })
24
+ children: typeof c == "function" ? c(g) : c ?? /* @__PURE__ */ o(t, { className: e(a.chevron, g && a.chevronOpen) })
25
25
  })]
26
26
  });
27
27
  };
@@ -1,28 +1,28 @@
1
1
  "use client";
2
2
  import { classNames as e } from "../../utils/class-names.js";
3
- import { OutlineSystemCheckCircle as t } from "../../icons/components/OutlineSystemCheckCircle.js";
4
- import { OutlineSystemClose as n } from "../../icons/components/OutlineSystemClose.js";
5
- import { OutlineSystemInfo as r } from "../../icons/components/OutlineSystemInfo.js";
6
- import { UnstyledButton as i } from "../UnstyledButton/UnstyledButton.js";
7
- import { useLocale as a } from "../../providers/hooks/useLocale/useLocale.js";
8
- import { useComponentId as o } from "../../hooks/useComponentId/useComponentId.js";
9
- import { Typography as s } from "../Typography/Typography.js";
3
+ import { useLocale as t } from "../../providers/hooks/useLocale/useLocale.js";
4
+ import { OutlineSystemCheckCircle as n } from "../../icons/components/OutlineSystemCheckCircle.js";
5
+ import { OutlineSystemClose as r } from "../../icons/components/OutlineSystemClose.js";
6
+ import { OutlineSystemInfo as i } from "../../icons/components/OutlineSystemInfo.js";
7
+ import { useComponentId as a } from "../../hooks/useComponentId/useComponentId.js";
8
+ import { Typography as o } from "../Typography/Typography.js";
9
+ import { UnstyledButton as s } from "../UnstyledButton/UnstyledButton.js";
10
10
  import c from "../../lib/components/Alert/Alert.module.js";
11
11
  import { ARIA_CLOSE_LABEL as l, getAlertStyles as u } from "./Alert.utils.js";
12
12
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
13
13
  //#region src/lib/components/Alert/Alert.tsx
14
14
  var p = {
15
- success: /* @__PURE__ */ d(t, {}),
16
- error: /* @__PURE__ */ d(r, {}),
17
- warning: /* @__PURE__ */ d(r, {}),
18
- info: /* @__PURE__ */ d(r, {})
19
- }, m = ({ title: t, description: r, variant: m = "light", color: h = "info", icon: g, onClose: _, className: v, style: y, id: b }) => {
20
- let { locale: x } = a(), S = o(b), C = t ? `${S}-title` : void 0, w = r ? `${S}-description` : void 0, T = g === !1 ? null : g ?? p[h];
15
+ success: /* @__PURE__ */ d(n, {}),
16
+ error: /* @__PURE__ */ d(i, {}),
17
+ warning: /* @__PURE__ */ d(i, {}),
18
+ info: /* @__PURE__ */ d(i, {})
19
+ }, m = ({ title: n, description: i, variant: m = "light", color: h = "info", icon: g, onClose: _, className: v, style: y, id: b }) => {
20
+ let { locale: x } = t(), S = a(b), C = n ? `${S}-title` : void 0, w = i ? `${S}-description` : void 0, T = g === !1 ? null : g ?? p[h];
21
21
  return /* @__PURE__ */ f("div", {
22
22
  role: "alert",
23
23
  id: S,
24
- "aria-labelledby": t ? C : void 0,
25
- "aria-describedby": r ? w : void 0,
24
+ "aria-labelledby": n ? C : void 0,
25
+ "aria-describedby": i ? w : void 0,
26
26
  style: {
27
27
  ...u(m, h),
28
28
  ...y
@@ -32,28 +32,28 @@ var p = {
32
32
  T,
33
33
  /* @__PURE__ */ f("div", {
34
34
  className: c.container,
35
- children: [t && /* @__PURE__ */ d(s, {
35
+ children: [n && /* @__PURE__ */ d(o, {
36
36
  id: C,
37
37
  element: "div",
38
38
  variant: "body",
39
39
  size: "m",
40
40
  weight: "medium",
41
- children: t
42
- }), r && /* @__PURE__ */ d(s, {
41
+ children: n
42
+ }), i && /* @__PURE__ */ d(o, {
43
43
  id: w,
44
44
  element: "div",
45
45
  variant: "body",
46
46
  size: "xs",
47
47
  weight: "extra-light",
48
- children: r
48
+ children: i
49
49
  })]
50
50
  }),
51
- _ && /* @__PURE__ */ d(i, {
51
+ _ && /* @__PURE__ */ d(s, {
52
52
  type: "button",
53
53
  className: c.clearButton,
54
54
  onClick: _,
55
55
  "aria-label": l[x],
56
- children: /* @__PURE__ */ d(n, {})
56
+ children: /* @__PURE__ */ d(r, {})
57
57
  })
58
58
  ]
59
59
  });
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { OutlineSystemCalendar as e } from "../../../icons/components/OutlineSystemCalendar.js";
3
- import { useLocale as t } from "../../../providers/hooks/useLocale/useLocale.js";
2
+ import { useLocale as e } from "../../../providers/hooks/useLocale/useLocale.js";
3
+ import { OutlineSystemCalendar as t } from "../../../icons/components/OutlineSystemCalendar.js";
4
4
  import { PopoverWithFallback as n } from "../../NativePopover/PopoverWithFallback.js";
5
5
  import { dateMatcher as r } from "./DatePicker/DatePicker.utils.js";
6
6
  import { formatInputValue as i, getPopoverWidth as a } from "../Dates.utils.js";
@@ -10,8 +10,8 @@ import { defineMask as c, formatDate as l, normalizeTime as u, parseDate as d }
10
10
  import { useCallback as f, useLayoutEffect as p, useState as m } from "react";
11
11
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
12
12
  //#region src/lib/components/Dates/InputDatePicker/InputDatePicker.tsx
13
- var _ = ({ value: _, isRange: v, withTime: y, onChange: b, onBlur: x, onClear: S, minDate: C = new Date(1900, 0, 1, 0, 0, 0, 0), maxDate: w = new Date(2100, 11, 31, 23, 59, 59, 999), disabledDates: T, minTime: E, maxTime: D, hoursStep: O, minutesStep: k, options: A, pickerWidth: j, className: M, style: N, rightIcon: P = /* @__PURE__ */ h(e, {}), ...F }) => {
14
- let { locale: I } = t(), [L, R] = m(!1), [z, B] = m(""), V = c(v, y, I), H = f((e) => {
13
+ var _ = ({ value: _, isRange: v, withTime: y, onChange: b, onBlur: x, onClear: S, minDate: C = new Date(1900, 0, 1, 0, 0, 0, 0), maxDate: w = new Date(2100, 11, 31, 23, 59, 59, 999), disabledDates: T, minTime: E, maxTime: D, hoursStep: O, minutesStep: k, options: A, pickerWidth: j, className: M, style: N, rightIcon: P = /* @__PURE__ */ h(t, {}), ...F }) => {
14
+ let { locale: I } = e(), [L, R] = m(!1), [z, B] = m(""), V = c(v, y, I), H = f((e) => {
15
15
  e ? l(e, v, y, B) : B("");
16
16
  }, [v, y]), U = (e) => {
17
17
  B(i(e.target.value, V));
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { OutlineSystemCalendar as e } from "../../../icons/components/OutlineSystemCalendar.js";
3
- import { useLocale as t } from "../../../providers/hooks/useLocale/useLocale.js";
2
+ import { useLocale as e } from "../../../providers/hooks/useLocale/useLocale.js";
3
+ import { OutlineSystemCalendar as t } from "../../../icons/components/OutlineSystemCalendar.js";
4
4
  import { PopoverWithFallback as n } from "../../NativePopover/PopoverWithFallback.js";
5
5
  import { formatInputValue as r, getPopoverWidth as i } from "../Dates.utils.js";
6
6
  import { PickerInput as a } from "../PickerInput/PickerInput.js";
@@ -10,8 +10,8 @@ import { defineMask as c, parseMonthRange as l, parseMonthToken as u, sanitizeIn
10
10
  import { useCallback as f, useEffect as p, useState as m } from "react";
11
11
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
12
12
  //#region src/lib/components/Dates/InputMonthPicker/InputMonthPicker.tsx
13
- var _ = ({ value: _, isRange: v = !1, disabledMonths: y, onClear: b, onChange: x, onBlur: S, options: C, style: w, className: T, pickerWidth: E, rightIcon: D = /* @__PURE__ */ h(e, {}), ...O }) => {
14
- let { locale: k } = t(), [A, j] = m(!1), [M, N] = m(""), P = o[k], F = c(v), I = f((e) => {
13
+ var _ = ({ value: _, isRange: v = !1, disabledMonths: y, onClear: b, onChange: x, onBlur: S, options: C, style: w, className: T, pickerWidth: E, rightIcon: D = /* @__PURE__ */ h(t, {}), ...O }) => {
14
+ let { locale: k } = e(), [A, j] = m(!1), [M, N] = m(""), P = o[k], F = c(v), I = f((e) => {
15
15
  if (!e) return "";
16
16
  if (v && Array.isArray(e)) {
17
17
  let [t, n] = e;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { OutlineSystemCalendar as e } from "../../../icons/components/OutlineSystemCalendar.js";
3
- import { useLocale as t } from "../../../providers/hooks/useLocale/useLocale.js";
2
+ import { useLocale as e } from "../../../providers/hooks/useLocale/useLocale.js";
3
+ import { OutlineSystemCalendar as t } from "../../../icons/components/OutlineSystemCalendar.js";
4
4
  import { PopoverWithFallback as n } from "../../NativePopover/PopoverWithFallback.js";
5
5
  import { formatInputValue as r, getPopoverWidth as i } from "../Dates.utils.js";
6
6
  import { PickerInput as a } from "../PickerInput/PickerInput.js";
@@ -9,8 +9,8 @@ import { defineMask as s, formatMonthYear as c, formatRangeValue as l, normalize
9
9
  import { useEffect as p, useState as m } from "react";
10
10
  import { jsx as h, jsxs as g } from "react/jsx-runtime";
11
11
  //#region src/lib/components/Dates/InputMonthYearPicker/InputMonthYearPicker.tsx
12
- var _ = ({ value: _, className: v, style: y, minDate: b = "01-1900", maxDate: x = "12-2100", disabledDates: S, options: C, isRange: w, onChange: T, onClear: E, onBlur: D, pickerWidth: O, rightIcon: k = /* @__PURE__ */ h(e, {}), ...A }) => {
13
- let { locale: j } = t(), [M, N] = m(!1), [P, F] = m(""), I = s(w, j), L = isNaN(Number(P.split(" ")[0])) ? void 0 : I, R = (e) => {
12
+ var _ = ({ value: _, className: v, style: y, minDate: b = "01-1900", maxDate: x = "12-2100", disabledDates: S, options: C, isRange: w, onChange: T, onClear: E, onBlur: D, pickerWidth: O, rightIcon: k = /* @__PURE__ */ h(t, {}), ...A }) => {
13
+ let { locale: j } = e(), [M, N] = m(!1), [P, F] = m(""), I = s(w, j), L = isNaN(Number(P.split(" ")[0])) ? void 0 : I, R = (e) => {
14
14
  F(r(u(e.target.value, j), I));
15
15
  }, z = (e) => S?.includes(e) ?? !1, B = () => {
16
16
  E?.(), F(""), T?.(null);
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { OutlineSystemClock as e } from "../../../icons/components/OutlineSystemClock.js";
3
- import { useLocale as t } from "../../../providers/hooks/useLocale/useLocale.js";
2
+ import { useLocale as e } from "../../../providers/hooks/useLocale/useLocale.js";
3
+ import { OutlineSystemClock as t } from "../../../icons/components/OutlineSystemClock.js";
4
4
  import { PopoverWithFallback as n } from "../../NativePopover/PopoverWithFallback.js";
5
5
  import { formatInputValue as r } from "../Dates.utils.js";
6
6
  import { PickerInput as i } from "../PickerInput/PickerInput.js";
@@ -9,8 +9,8 @@ import { MASK_VALUES as o, clampTimeToRange as s } from "./InputTimePicker.utils
9
9
  import { useEffect as c, useState as l } from "react";
10
10
  import { jsx as u, jsxs as d } from "react/jsx-runtime";
11
11
  //#region src/lib/components/Dates/InputTimePicker/InputTimePicker.tsx
12
- var f = ({ onChange: f, onClear: p, onBlur: m, onScroll: h, value: g, minTime: _, maxTime: v, hoursStep: y, minutesStep: b, withHeader: x, withConfirmationButton: S, rightIcon: C = /* @__PURE__ */ u(e, {}), className: w, style: T, ...E }) => {
13
- let { locale: D } = t(), [O, k] = l(!1), [A, j] = l(""), M = o[D], N = (e) => {
12
+ var f = ({ onChange: f, onClear: p, onBlur: m, onScroll: h, value: g, minTime: _, maxTime: v, hoursStep: y, minutesStep: b, withHeader: x, withConfirmationButton: S, rightIcon: C = /* @__PURE__ */ u(t, {}), className: w, style: T, ...E }) => {
13
+ let { locale: D } = e(), [O, k] = l(!1), [A, j] = l(""), M = o[D], N = (e) => {
14
14
  m?.(e);
15
15
  let t = s(e.target.value, _, v, y, b);
16
16
  t ? (j(t), f?.(t)) : j("");
@@ -1,6 +1,6 @@
1
1
  "use client";
2
- import { OutlineSystemCalendar as e } from "../../../icons/components/OutlineSystemCalendar.js";
3
- import { useLocale as t } from "../../../providers/hooks/useLocale/useLocale.js";
2
+ import { useLocale as e } from "../../../providers/hooks/useLocale/useLocale.js";
3
+ import { OutlineSystemCalendar as t } from "../../../icons/components/OutlineSystemCalendar.js";
4
4
  import { PopoverWithFallback as n } from "../../NativePopover/PopoverWithFallback.js";
5
5
  import { formatInputValue as r, getPopoverWidth as i } from "../Dates.utils.js";
6
6
  import { YearPicker as a } from "./YearPicker/YearPicker.js";
@@ -9,8 +9,8 @@ import { PickerInput as u } from "../PickerInput/PickerInput.js";
9
9
  import { useEffect as d, useState as f } from "react";
10
10
  import { jsx as p, jsxs as m } from "react/jsx-runtime";
11
11
  //#region src/lib/components/Dates/InputYearPicker/InputYearPicker.tsx
12
- var h = ({ value: h, isRange: g, maxYear: _ = 2100, minYear: v = 1900, disabledYears: y, onClear: b, onChange: x, onBlur: S, options: C, className: w, style: T, pickerWidth: E, rightIcon: D = /* @__PURE__ */ p(e, {}), ...O }) => {
13
- let { locale: k } = t(), [A, j] = f(!1), [M, N] = f(""), P = o(g, k), F = (e) => {
12
+ var h = ({ value: h, isRange: g, maxYear: _ = 2100, minYear: v = 1900, disabledYears: y, onClear: b, onChange: x, onBlur: S, options: C, className: w, style: T, pickerWidth: E, rightIcon: D = /* @__PURE__ */ p(t, {}), ...O }) => {
13
+ let { locale: k } = e(), [A, j] = f(!1), [M, N] = f(""), P = o(g, k), F = (e) => {
14
14
  N(r(e.target.value, P));
15
15
  }, I = () => {
16
16
  b?.(), N(""), x?.(null);
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { classNames as e } from "../../utils/class-names.js";
3
- import { OutlineSystemClose as t } from "../../icons/components/OutlineSystemClose.js";
4
- import { Backdrop as n } from "../Backdrop/Backdrop.js";
5
- import { useLocale as r } from "../../providers/hooks/useLocale/useLocale.js";
3
+ import { Backdrop as t } from "../Backdrop/Backdrop.js";
4
+ import { useLocale as n } from "../../providers/hooks/useLocale/useLocale.js";
5
+ import { OutlineSystemClose as r } from "../../icons/components/OutlineSystemClose.js";
6
6
  import { Button as i } from "../Button/Button.js";
7
7
  import a from "../../lib/components/Drawer/Drawer.module.js";
8
8
  import { DrawerHeader as o } from "./DrawerHeader/DrawerHeader.js";
@@ -13,8 +13,8 @@ import { useFocusTrapAndRestore as f } from "../../hooks/useFocusTrapAndRestore/
13
13
  import { jsx as p, jsxs as m } from "react/jsx-runtime";
14
14
  //#region src/lib/components/Drawer/Drawer.tsx
15
15
  var h = ({ isOpen: o, onClose: s, children: c, withCloseButton: h = !0, closeOnClickOutside: g = !0, scrollable: _ = !0, width: v, height: y, maxWidth: b, maxHeight: x, variant: S = "default", position: C = "right", zIndex: w, className: T, style: E, ref: D, ...O }) => {
16
- let { locale: k } = r(), A = f(o), j = e(a.root, S === "floating" && a.rounded, a[C]), M = e(a.drawer, (_ || C === "bottom" || C === "top") && a.scrollable, T);
17
- return /* @__PURE__ */ p(n, {
16
+ let { locale: k } = n(), A = f(o), j = e(a.root, S === "floating" && a.rounded, a[C]), M = e(a.drawer, (_ || C === "bottom" || C === "top") && a.scrollable, T);
17
+ return /* @__PURE__ */ p(t, {
18
18
  ref: D,
19
19
  isOpen: o,
20
20
  onClose: s,
@@ -38,7 +38,7 @@ var h = ({ isOpen: o, onClose: s, children: c, withCloseButton: h = !0, closeOnC
38
38
  color: "tertiary",
39
39
  "aria-label": l[k],
40
40
  onClick: s,
41
- children: /* @__PURE__ */ p(t, {})
41
+ children: /* @__PURE__ */ p(r, {})
42
42
  })]
43
43
  })
44
44
  });
@@ -1,29 +1,29 @@
1
1
  "use client";
2
2
  import { classNames as e } from "../../../utils/class-names.js";
3
- import { OutlineSystemClose as t } from "../../../icons/components/OutlineSystemClose.js";
4
- import { UnstyledButton as n } from "../../UnstyledButton/UnstyledButton.js";
5
- import { useLocale as r } from "../../../providers/hooks/useLocale/useLocale.js";
6
- import i from "../../../lib/components/Field/InputBaseWrapper/InputBaseWrapper.module.js";
7
- import { sizeVarsResolver as a } from "./InputBaseWrapper.utils.js";
8
- import { INPUT_BASE_WRAPPER_LOCALES as o } from "./InputBaseWrapper.constants.js";
9
- import { Hinter as s } from "../../Hinter/Hinter.js";
3
+ import { useLocale as t } from "../../../providers/hooks/useLocale/useLocale.js";
4
+ import { OutlineSystemClose as n } from "../../../icons/components/OutlineSystemClose.js";
5
+ import r from "../../../lib/components/Field/InputBaseWrapper/InputBaseWrapper.module.js";
6
+ import { sizeVarsResolver as i } from "./InputBaseWrapper.utils.js";
7
+ import { INPUT_BASE_WRAPPER_LOCALES as a } from "./InputBaseWrapper.constants.js";
8
+ import { Hinter as o } from "../../Hinter/Hinter.js";
9
+ import { UnstyledButton as s } from "../../UnstyledButton/UnstyledButton.js";
10
10
  import { jsx as c, jsxs as l } from "react/jsx-runtime";
11
11
  //#region src/lib/components/Field/InputBaseWrapper/InputBaseWrapper.tsx
12
12
  var u = ({ id: u, value: d, label: f, onClear: p, leftSection: m, leftIcon: h, rightIcon: g, children: _, inputRef: v, hasError: y, disabled: b, onClick: x, className: S, style: C, fullWidth: w, bordered: T, keepLabel: E, keepLabelFixed: D, hintLeftSection: O, hintRightSection: k, size: A = "m" }) => {
13
- let { locale: j } = r(), M = d != null && d !== "", N = A === "s" || !E, P = e(i.root, !T && i.rootBorderless, y && i.rootError, b && i.rootDisabled, w && i.rootFullWidth, S), F = e(i.label, "uiFont", (M || D) && i.labelFloated, N && i.labelHidden, N && M && i.labelHiddenWithValue), I = e(i.content, (N || !f) && i.contentCentered), L = e(i.clearButton, !M && i.clearButtonHidden), R = () => {
13
+ let { locale: j } = t(), M = d != null && d !== "", N = A === "s" || !E, P = e(r.root, !T && r.rootBorderless, y && r.rootError, b && r.rootDisabled, w && r.rootFullWidth, S), F = e(r.label, "uiFont", (M || D) && r.labelFloated, N && r.labelHidden, N && M && r.labelHiddenWithValue), I = e(r.content, (N || !f) && r.contentCentered), L = e(r.clearButton, !M && r.clearButtonHidden), R = () => {
14
14
  v?.current?.focus();
15
15
  };
16
16
  return /* @__PURE__ */ l("div", { children: [/* @__PURE__ */ l("div", {
17
17
  onClick: x,
18
18
  className: P,
19
- style: a(A, C),
19
+ style: i(A, C),
20
20
  children: [m, /* @__PURE__ */ l("div", {
21
- className: i.wrapper,
21
+ className: r.wrapper,
22
22
  onClick: R,
23
23
  children: [
24
24
  h,
25
25
  /* @__PURE__ */ l("div", {
26
- className: i.inputContainer,
26
+ className: r.inputContainer,
27
27
  onMouseDown: (e) => {
28
28
  e.target === e.currentTarget && e.preventDefault();
29
29
  },
@@ -36,7 +36,7 @@ var u = ({ id: u, value: d, label: f, onClear: p, leftSection: m, leftIcon: h, r
36
36
  children: _
37
37
  })]
38
38
  }),
39
- p && /* @__PURE__ */ c(n, {
39
+ p && /* @__PURE__ */ c(s, {
40
40
  type: "button",
41
41
  disabled: b,
42
42
  onMouseDown: (e) => e.preventDefault(),
@@ -44,17 +44,17 @@ var u = ({ id: u, value: d, label: f, onClear: p, leftSection: m, leftIcon: h, r
44
44
  onClick: () => {
45
45
  R(), p?.();
46
46
  },
47
- "aria-label": o[j].clearText,
48
- children: /* @__PURE__ */ c(t, {})
47
+ "aria-label": a[j].clearText,
48
+ children: /* @__PURE__ */ c(n, {})
49
49
  }),
50
50
  g
51
51
  ]
52
52
  })]
53
- }), /* @__PURE__ */ l(s, {
54
- className: i.hinter,
53
+ }), /* @__PURE__ */ l(o, {
54
+ className: r.hinter,
55
55
  hasError: y,
56
56
  children: [O && /* @__PURE__ */ c("div", { children: O }), k && /* @__PURE__ */ c("div", {
57
- className: i.hintRight,
57
+ className: r.hintRight,
58
58
  children: k
59
59
  })]
60
60
  })] });
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
  import { classNames as e } from "../../utils/class-names.js";
3
3
  import { syncRefs as t } from "../../utils/sync-refs.js";
4
- import { OutlineSystemUploadCloud as n } from "../../icons/components/OutlineSystemUploadCloud.js";
5
- import { useLocale as r } from "../../providers/hooks/useLocale/useLocale.js";
4
+ import { useLocale as n } from "../../providers/hooks/useLocale/useLocale.js";
5
+ import { OutlineSystemUploadCloud as r } from "../../icons/components/OutlineSystemUploadCloud.js";
6
6
  import { Loader as i } from "../Loader/Loader.js";
7
7
  import { Button as a } from "../Button/Button.js";
8
8
  import { Typography as o } from "../Typography/Typography.js";
@@ -12,7 +12,7 @@ import { useRef as m, useState as h } from "react";
12
12
  import { jsx as g, jsxs as _ } from "react/jsx-runtime";
13
13
  //#region src/lib/components/FileUploader/FileUploader.tsx
14
14
  var v = ({ value: v, onChange: y, title: b, description: x, buttonText: S, multiple: C, allowedExtensions: w = [], allowedMimeTypes: T = [], maxFileSize: E = 20, maxCount: D = 5, hasError: O, errorText: k, disabled: A = !1, loading: j = !1, className: M, style: N, ref: P }) => {
15
- let F = m(null), [I, L] = h(!1), [R, z] = h(""), { locale: B } = r(), V = k || R || x, H = S ?? c[B], U = A || j, W = e(s.root, I && !U && s.dragOver, (O || R) && s.error, U && s.disabled, M), G = (e) => {
15
+ let F = m(null), [I, L] = h(!1), [R, z] = h(""), { locale: B } = n(), V = k || R || x, H = S ?? c[B], U = A || j, W = e(s.root, I && !U && s.dragOver, (O || R) && s.error, U && s.disabled, M), G = (e) => {
16
16
  let t = Array.from(e);
17
17
  y(C ? [...v, ...t] : t), z("");
18
18
  }, K = (e) => {
@@ -66,7 +66,7 @@ var v = ({ value: v, onChange: y, title: b, description: x, buttonText: S, multi
66
66
  className: s.loader,
67
67
  children: /* @__PURE__ */ g(i, {})
68
68
  }),
69
- /* @__PURE__ */ g(n, {}),
69
+ /* @__PURE__ */ g(r, {}),
70
70
  /* @__PURE__ */ g(o, {
71
71
  size: "l",
72
72
  weight: "medium",
@@ -1,30 +1,37 @@
1
- "use client";
2
1
  import { resolveTypography as e } from "../../../utils/typography.js";
3
2
  import { classNames as t } from "../../../utils/class-names.js";
4
3
  import { SolidNavigationChevronDown as n } from "../../../icons/components/SolidNavigationChevronDown.js";
5
- import { Collapse as r } from "../../Collapse/Collapse.js";
6
- import i from "../../../lib/components/List/ListGroup/ListGroup.module.js";
7
- import { useState as a } from "react";
8
- import { jsx as o, jsxs as s } from "react/jsx-runtime";
4
+ import r from "../../../lib/components/List/ListGroup/ListGroup.module.js";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
9
6
  //#region src/lib/components/List/ListGroup/ListGroup.tsx
10
- var c = ({ className: c, children: l, title: u, collapsible: d = !1, defaultOpen: f = !0, ...p }) => {
11
- let [m, h] = a(f);
12
- return /* @__PURE__ */ s("div", {
13
- className: t(i.group, c),
14
- ...p,
15
- children: [/* @__PURE__ */ s("div", {
16
- style: e("body", "s"),
17
- onClick: () => d && h(!m),
18
- className: t(i.groupTitle, d && i.collapsible, "uiFont"),
19
- children: [u, d && /* @__PURE__ */ o(n, {
7
+ var o = ({ className: o, children: s, title: c, collapsible: l = !1, defaultOpen: u = !0, ref: d, ...f }) => {
8
+ let p = e("body", "s");
9
+ return l ? /* @__PURE__ */ a("details", {
10
+ ref: d,
11
+ open: u,
12
+ className: t(r.group, o),
13
+ ...f,
14
+ children: [/* @__PURE__ */ a("summary", {
15
+ style: p,
16
+ className: t(r.groupTitle, r.collapsible, "uiFont"),
17
+ children: [c, /* @__PURE__ */ i(n, {
20
18
  "aria-hidden": "true",
21
- className: t(i.chevron, m && i.chevronOpen)
19
+ className: r.chevron
22
20
  })]
23
- }), d ? /* @__PURE__ */ o(r, {
24
- isOpen: m,
25
- children: l
26
- }) : l]
21
+ }), /* @__PURE__ */ i("div", {
22
+ className: r.clip,
23
+ children: s
24
+ })]
25
+ }) : /* @__PURE__ */ a("div", {
26
+ ref: d,
27
+ className: t(r.group, o),
28
+ ...f,
29
+ children: [/* @__PURE__ */ i("div", {
30
+ style: p,
31
+ className: t(r.groupTitle, "uiFont"),
32
+ children: c
33
+ }), s]
27
34
  });
28
35
  };
29
36
  //#endregion
30
- export { c as ListGroup };
37
+ export { o as ListGroup };
@@ -1,6 +1,6 @@
1
1
  import { classNames as e } from "../../utils/class-names.js";
2
- import { OutlineSystemClose as t } from "../../icons/components/OutlineSystemClose.js";
3
- import { Backdrop as n } from "../Backdrop/Backdrop.js";
2
+ import { Backdrop as t } from "../Backdrop/Backdrop.js";
3
+ import { OutlineSystemClose as n } from "../../icons/components/OutlineSystemClose.js";
4
4
  import { Button as r } from "../Button/Button.js";
5
5
  import { useFocusTrapAndRestore as i } from "../../hooks/useFocusTrapAndRestore/useFocusTrapAndRestore.js";
6
6
  import a from "../../lib/components/Modal/Modal.module.js";
@@ -12,7 +12,7 @@ import { jsx as u, jsxs as d } from "react/jsx-runtime";
12
12
  //#region src/lib/components/Modal/Modal.tsx
13
13
  var f = ({ children: o, device: s = "desktop", centered: c = !0, withCloseButton: f = !0, scrollable: p = !1, className: m, style: h, ...g }) => {
14
14
  let _ = i(g.isOpen);
15
- return /* @__PURE__ */ u(n, {
15
+ return /* @__PURE__ */ u(t, {
16
16
  className: e(!c && a.start),
17
17
  ...g,
18
18
  children: /* @__PURE__ */ d("div", {
@@ -27,7 +27,7 @@ var f = ({ children: o, device: s = "desktop", centered: c = !0, withCloseButton
27
27
  color: "tertiary",
28
28
  className: a.closeButton,
29
29
  onClick: g.onClose,
30
- children: /* @__PURE__ */ u(t, {})
30
+ children: /* @__PURE__ */ u(n, {})
31
31
  })]
32
32
  })
33
33
  });
@@ -0,0 +1,5 @@
1
+ import { createSafeContext as e } from "../../utils/create-safe-context/create-safe-context.js";
2
+ //#region src/lib/components/NativeAccordion/NativeAccordion.context.ts
3
+ var [t, n] = e("NativeAccordion component was not found in the tree"), [r, i] = e("NativeAccordion.Item component was not found in the tree");
4
+ //#endregion
5
+ export { t as NativeAccordionContextProvider, r as NativeAccordionItemContextProvider, n as useNativeAccordionContext, i as useNativeAccordionItemContext };
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { classNames as e } from "../../utils/class-names.js";
3
+ import { NativeAccordionContextProvider as t } from "./NativeAccordion.context.js";
4
+ import n from "../../lib/components/NativeAccordion/NativeAccordion.module.js";
5
+ import { NativeAccordionItem as r } from "./NativeAccordionItem/NativeAccordionItem.js";
6
+ import { NativeAccordionTrigger as i } from "./NativeAccordionTrigger/NativeAccordionTrigger.js";
7
+ import { NativeAccordionContent as a } from "./NativeAccordionContent/NativeAccordionContent.js";
8
+ import { getAccordionStyles as o, getNextValues as s, toArray as c } from "./NativeAccordion.utils.js";
9
+ import { useId as l, useState as u } from "react";
10
+ import { jsx as d } from "react/jsx-runtime";
11
+ //#region src/lib/components/NativeAccordion/NativeAccordion.tsx
12
+ var f = ({ value: r, defaultValue: i, onChange: a, children: f, type: p = "single", size: m = "m", withDivider: h = !1, duration: g = 300, keepMounted: _ = !0, className: v, style: y, ref: b }) => {
13
+ let x = l(), S = r !== void 0, [C, w] = u(() => c(i)), T = S ? c(r) : C, E = (e) => T.includes(e);
14
+ return /* @__PURE__ */ d(t, {
15
+ value: {
16
+ open: E,
17
+ setOpen: (e, t) => {
18
+ if (t === E(e)) return;
19
+ let n = s(p, T, e);
20
+ S || w(n), p === "single" ? a?.(n[0] ?? "") : a?.(n);
21
+ },
22
+ groupName: p === "single" ? x : void 0,
23
+ withDivider: h,
24
+ keepMounted: _,
25
+ duration: g
26
+ },
27
+ children: /* @__PURE__ */ d("div", {
28
+ ref: b,
29
+ style: o(m, g, y),
30
+ className: e(n.root, v),
31
+ children: f
32
+ })
33
+ });
34
+ };
35
+ f.Item = r, f.Trigger = i, f.Content = a;
36
+ //#endregion
37
+ export { f as NativeAccordion };
@@ -0,0 +1,9 @@
1
+ import { getSize as e } from "../../utils/get-size.js";
2
+ //#region src/lib/components/NativeAccordion/NativeAccordion.utils.ts
3
+ var t = (t, n, r) => ({
4
+ "--accordion-spacing-vertical": e(t, "accordion-spacing-vertical"),
5
+ "--accordion-duration": `${n}ms`,
6
+ ...r
7
+ }), n = (e, t = []) => e === void 0 ? t : Array.isArray(e) ? e : e ? [e] : [], r = (e, t, n) => t.includes(n) ? t.filter((e) => e !== n) : e === "single" ? [n] : [...t, n];
8
+ //#endregion
9
+ export { t as getAccordionStyles, r as getNextValues, n as toArray };
@@ -0,0 +1,25 @@
1
+ "use client";
2
+ import { classNames as e } from "../../../utils/class-names.js";
3
+ import { useDelayedUnmount as t } from "../../../hooks/useDelayedUnmount/useDelayedUnmount.js";
4
+ import { useNativeAccordionContext as n, useNativeAccordionItemContext as r } from "../NativeAccordion.context.js";
5
+ import i from "../../../lib/components/NativeAccordion/NativeAccordion.module.js";
6
+ import { jsx as a } from "react/jsx-runtime";
7
+ //#region src/lib/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.tsx
8
+ var o = ({ children: o, className: s, style: c, ref: l }) => {
9
+ let { keepMounted: u, duration: d } = n(), { isOpen: f } = r();
10
+ return t({
11
+ keepMounted: u,
12
+ isOpen: f,
13
+ exitDuration: d
14
+ }) ? /* @__PURE__ */ a("div", {
15
+ className: i.clip,
16
+ children: /* @__PURE__ */ a("div", {
17
+ ref: l,
18
+ style: c,
19
+ className: e(i.content, s),
20
+ children: o
21
+ })
22
+ }) : null;
23
+ };
24
+ //#endregion
25
+ export { o as NativeAccordionContent };
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { classNames as e } from "../../../utils/class-names.js";
3
+ import { NativeAccordionItemContextProvider as t, useNativeAccordionContext as n } from "../NativeAccordion.context.js";
4
+ import r from "../../../lib/components/NativeAccordion/NativeAccordion.module.js";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ //#region src/lib/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.tsx
7
+ var a = ({ value: a, disabled: o = !1, children: s, className: c, style: l, ref: u }) => {
8
+ let { open: d, setOpen: f, groupName: p, withDivider: m } = n(), h = d(a);
9
+ return /* @__PURE__ */ i(t, {
10
+ value: {
11
+ disabled: o,
12
+ isOpen: h,
13
+ toggle: () => f(a, !h)
14
+ },
15
+ children: /* @__PURE__ */ i("details", {
16
+ ref: u,
17
+ open: h,
18
+ name: o ? void 0 : p,
19
+ style: l,
20
+ onToggle: (e) => {
21
+ let t = e.currentTarget;
22
+ if (e.target !== t || t.open === h) return;
23
+ let n = t.open;
24
+ t.open = h, o || f(a, n);
25
+ },
26
+ className: e(r.item, m && r.withDivider, c),
27
+ children: s
28
+ })
29
+ });
30
+ };
31
+ //#endregion
32
+ export { a as NativeAccordionItem };