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.
- package/dist/alif-ui.css +1 -1
- package/dist/components/Accordion/AccordionContent/AccordionContent.js +6 -6
- package/dist/components/Accordion/AccordionTrigger/AccordionTrigger.js +9 -9
- package/dist/components/Alert/Alert.js +21 -21
- package/dist/components/Dates/InputDatePicker/InputDatePicker.js +4 -4
- package/dist/components/Dates/InputMonthPicker/InputMonthPicker.js +4 -4
- package/dist/components/Dates/InputMonthYearPicker/InputMonthYearPicker.js +4 -4
- package/dist/components/Dates/InputTimePicker/InputTimePicker.js +4 -4
- package/dist/components/Dates/InputYearPicker/InputYearPicker.js +4 -4
- package/dist/components/Drawer/Drawer.js +6 -6
- package/dist/components/Field/InputBaseWrapper/InputBaseWrapper.js +17 -17
- package/dist/components/FileUploader/FileUploader.js +4 -4
- package/dist/components/List/ListGroup/ListGroup.js +28 -21
- package/dist/components/Modal/Modal.js +4 -4
- package/dist/components/NativeAccordion/NativeAccordion.context.js +5 -0
- package/dist/components/NativeAccordion/NativeAccordion.js +37 -0
- package/dist/components/NativeAccordion/NativeAccordion.types.js +0 -0
- package/dist/components/NativeAccordion/NativeAccordion.utils.js +9 -0
- package/dist/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.js +25 -0
- package/dist/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.types.js +0 -0
- package/dist/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.js +32 -0
- package/dist/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.types.js +0 -0
- package/dist/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.js +27 -0
- package/dist/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.types.js +0 -0
- package/dist/components/Pagination/Pagination.js +10 -10
- package/dist/components/Select/SelectMultiple/SelectMultiple.js +6 -6
- package/dist/components/Sidebar/Sidebar.js +31 -30
- package/dist/components/Sidebar/SidebarCollapse/SidebarCollapse.js +30 -21
- package/dist/components/Sidebar/SidebarItem/SidebarItem.js +24 -46
- package/dist/components/Sidebar/SidebarItem/SidebarItemContent.js +39 -0
- package/dist/components/Snackbar/SnackbarCard/SnackbarCard.js +18 -18
- package/dist/components/Table/Table.js +27 -43
- package/dist/components/Table/TableCollapseRow/TableCollapseRow.js +42 -0
- package/dist/components/Textarea/Textarea.js +9 -9
- package/dist/icons/components/SolidSystemBookOpen.js +14 -11
- package/dist/lib/components/Badge/Badge.module.js +3 -3
- package/dist/lib/components/List/ListGroup/ListGroup.module.js +5 -5
- package/dist/lib/components/NativeAccordion/NativeAccordion.module.js +13 -0
- package/dist/lib/components/Sidebar/SidebarCollapse/SidebarCollapse.module.js +5 -3
- package/dist/lib/components/Table/Table.module.js +21 -19
- package/dist/main.js +308 -308
- package/dist/src/lib/components/List/List.d.ts +1 -1
- package/dist/src/lib/components/List/ListGroup/ListGroup.d.ts +1 -1
- package/dist/src/lib/components/List/ListGroup/ListGroup.d.ts.map +1 -1
- package/dist/src/lib/components/List/ListGroup/ListGroup.types.d.ts +4 -3
- package/dist/src/lib/components/List/ListGroup/ListGroup.types.d.ts.map +1 -1
- package/dist/src/lib/components/NativeAccordion/NativeAccordion.context.d.ts +22 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordion.context.d.ts.map +1 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordion.d.ts +8 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordion.d.ts.map +1 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordion.types.d.ts +78 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordion.types.d.ts.map +1 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordion.utils.d.ts +6 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordion.utils.d.ts.map +1 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.d.ts +3 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.d.ts.map +1 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.types.d.ts +20 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionContent/NativeAccordionContent.types.d.ts.map +1 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.d.ts +3 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.d.ts.map +1 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.types.d.ts +28 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionItem/NativeAccordionItem.types.d.ts.map +1 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.d.ts +3 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.d.ts.map +1 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.types.d.ts +24 -0
- package/dist/src/lib/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.types.d.ts.map +1 -0
- package/dist/src/lib/components/NativeAccordion/index.d.ts +6 -0
- package/dist/src/lib/components/NativeAccordion/index.d.ts.map +1 -0
- package/dist/src/lib/components/Sidebar/Sidebar.context.d.ts +1 -0
- package/dist/src/lib/components/Sidebar/Sidebar.context.d.ts.map +1 -1
- package/dist/src/lib/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/src/lib/components/Sidebar/SidebarCollapse/SidebarCollapse.d.ts.map +1 -1
- package/dist/src/lib/components/Sidebar/SidebarCollapse/SidebarCollapse.types.d.ts +2 -1
- package/dist/src/lib/components/Sidebar/SidebarCollapse/SidebarCollapse.types.d.ts.map +1 -1
- package/dist/src/lib/components/Sidebar/SidebarItem/SidebarItem.d.ts.map +1 -1
- package/dist/src/lib/components/Sidebar/SidebarItem/SidebarItemContent.d.ts +5 -0
- package/dist/src/lib/components/Sidebar/SidebarItem/SidebarItemContent.d.ts.map +1 -0
- package/dist/src/lib/components/Table/Table.d.ts +2 -3
- package/dist/src/lib/components/Table/Table.d.ts.map +1 -1
- package/dist/src/lib/components/Table/Table.types.d.ts +5 -0
- package/dist/src/lib/components/Table/Table.types.d.ts.map +1 -1
- package/dist/src/lib/components/Table/TableCollapseRow/TableCollapseRow.d.ts +3 -0
- package/dist/src/lib/components/Table/TableCollapseRow/TableCollapseRow.d.ts.map +1 -0
- package/dist/src/lib/components/index.d.ts +1 -1
- package/dist/src/lib/components/index.d.ts.map +1 -1
- package/dist/src/lib/utils/get-default-z-index.d.ts +1 -1
- package/package.json +4 -2
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { classNames as e } from "../../../utils/class-names.js";
|
|
3
|
+
import { OutlineNavigationChevronDown as t } from "../../../icons/components/OutlineNavigationChevronDown.js";
|
|
4
|
+
import { useNativeAccordionItemContext as n } from "../NativeAccordion.context.js";
|
|
5
|
+
import r from "../../../lib/components/NativeAccordion/NativeAccordion.module.js";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
//#region src/lib/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.tsx
|
|
8
|
+
var o = ({ chevron: o, children: s, className: c, style: l, ref: u }) => {
|
|
9
|
+
let { disabled: d, isOpen: f, toggle: p } = n();
|
|
10
|
+
return /* @__PURE__ */ a("summary", {
|
|
11
|
+
ref: u,
|
|
12
|
+
style: l,
|
|
13
|
+
onClick: (e) => {
|
|
14
|
+
e.preventDefault(), d || p();
|
|
15
|
+
},
|
|
16
|
+
"aria-disabled": d || void 0,
|
|
17
|
+
tabIndex: d ? -1 : void 0,
|
|
18
|
+
className: e(r.trigger, d && r.disabled, c),
|
|
19
|
+
children: [/* @__PURE__ */ i("div", { children: s }), /* @__PURE__ */ i("span", {
|
|
20
|
+
className: r.triggerIcon,
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
children: typeof o == "function" ? o(f) : o ?? /* @__PURE__ */ i(t, { className: r.chevron })
|
|
23
|
+
})]
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { o as NativeAccordionTrigger };
|
package/dist/components/NativeAccordion/NativeAccordionTrigger/NativeAccordionTrigger.types.js
ADDED
|
File without changes
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { classNames as e } from "../../utils/class-names.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
3
|
+
import { useLocale as t } from "../../providers/hooks/useLocale/useLocale.js";
|
|
4
|
+
import { OutlineNavigationChevronLeft as n } from "../../icons/components/OutlineNavigationChevronLeft.js";
|
|
5
|
+
import { OutlineNavigationChevronRight as r } from "../../icons/components/OutlineNavigationChevronRight.js";
|
|
6
|
+
import { OutlineNavigationDoubleLeft as i } from "../../icons/components/OutlineNavigationDoubleLeft.js";
|
|
7
|
+
import { OutlineNavigationDoubleRight as a } from "../../icons/components/OutlineNavigationDoubleRight.js";
|
|
8
8
|
import { Button as o } from "../Button/Button.js";
|
|
9
9
|
import { Divider as s } from "../Divider/Divider.js";
|
|
10
10
|
import { Select as c } from "../Select/Select.js";
|
|
@@ -15,7 +15,7 @@ import f from "../../lib/components/Pagination/Pagination.module.js";
|
|
|
15
15
|
import { Fragment as p, jsx as m, jsxs as h } from "react/jsx-runtime";
|
|
16
16
|
//#region src/lib/components/Pagination/Pagination.tsx
|
|
17
17
|
var g = ({ page: g, totalPages: _, itemsPerPage: v = 10, itemsPerPageOptions: y, onPageChange: b, onItemsPerPageChange: x, size: S = "m", className: C, style: w, showFirstLastButtons: T = !1, showPageNumbers: E = !0, siblingCount: D = 1, disableFirstButton: O = !1, disableLastButton: k = !1, disablePreviousButton: A = !1, disableNextButton: j = !1 }) => {
|
|
18
|
-
let { locale: M } =
|
|
18
|
+
let { locale: M } = t(), N = l[M], P = d({
|
|
19
19
|
currentPage: g,
|
|
20
20
|
totalPages: _,
|
|
21
21
|
siblingCount: D
|
|
@@ -35,7 +35,7 @@ var g = ({ page: g, totalPages: _, itemsPerPage: v = 10, itemsPerPageOptions: y,
|
|
|
35
35
|
disabled: g === 1 || O,
|
|
36
36
|
onClick: () => b(1),
|
|
37
37
|
"aria-label": N.firstPage,
|
|
38
|
-
children: /* @__PURE__ */ m(
|
|
38
|
+
children: /* @__PURE__ */ m(i, {})
|
|
39
39
|
}),
|
|
40
40
|
/* @__PURE__ */ m(o, {
|
|
41
41
|
size: S,
|
|
@@ -44,7 +44,7 @@ var g = ({ page: g, totalPages: _, itemsPerPage: v = 10, itemsPerPageOptions: y,
|
|
|
44
44
|
disabled: g === 1 || A,
|
|
45
45
|
onClick: () => b(g - 1),
|
|
46
46
|
"aria-label": N.previousPage,
|
|
47
|
-
children: /* @__PURE__ */ m(
|
|
47
|
+
children: /* @__PURE__ */ m(n, {})
|
|
48
48
|
}),
|
|
49
49
|
E && P.map((e, t) => e === "..." ? /* @__PURE__ */ m(o, {
|
|
50
50
|
size: S,
|
|
@@ -69,7 +69,7 @@ var g = ({ page: g, totalPages: _, itemsPerPage: v = 10, itemsPerPageOptions: y,
|
|
|
69
69
|
disabled: g === F || j,
|
|
70
70
|
onClick: () => b(g + 1),
|
|
71
71
|
"aria-label": N.nextPage,
|
|
72
|
-
children: /* @__PURE__ */ m(
|
|
72
|
+
children: /* @__PURE__ */ m(r, {})
|
|
73
73
|
}),
|
|
74
74
|
T && /* @__PURE__ */ m(o, {
|
|
75
75
|
size: S,
|
|
@@ -78,7 +78,7 @@ var g = ({ page: g, totalPages: _, itemsPerPage: v = 10, itemsPerPageOptions: y,
|
|
|
78
78
|
disabled: g === F || k,
|
|
79
79
|
onClick: () => b(F),
|
|
80
80
|
"aria-label": N.lastPage,
|
|
81
|
-
children: /* @__PURE__ */ m(
|
|
81
|
+
children: /* @__PURE__ */ m(a, {})
|
|
82
82
|
})
|
|
83
83
|
]
|
|
84
84
|
}), y && /* @__PURE__ */ h(p, { children: [/* @__PURE__ */ m(s, {
|
|
@@ -1,9 +1,9 @@
|
|
|
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 {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { Badge as ee } from "../../Badge/Badge.js";
|
|
5
|
+
import { OutlineNavigationChevronDown as n } from "../../../icons/components/OutlineNavigationChevronDown.js";
|
|
6
|
+
import { OutlineSystemClose as r } from "../../../icons/components/OutlineSystemClose.js";
|
|
7
7
|
import { useComponentId as te } from "../../../hooks/useComponentId/useComponentId.js";
|
|
8
8
|
import { PopoverWithFallback as i } from "../../NativePopover/PopoverWithFallback.js";
|
|
9
9
|
import { InputBaseWrapper as ne } from "../../Field/InputBaseWrapper/InputBaseWrapper.js";
|
|
@@ -74,11 +74,11 @@ var g = ({ id: g, name: ae, ref: oe, values: _, options: v, label: y, placeholde
|
|
|
74
74
|
inputRef: U,
|
|
75
75
|
hintLeftSection: L,
|
|
76
76
|
hintRightSection: R,
|
|
77
|
-
rightIcon: /* @__PURE__ */ m(
|
|
77
|
+
rightIcon: /* @__PURE__ */ m(n, { className: e(l.chevron, G && l.chevronActive) }),
|
|
78
78
|
children: /* @__PURE__ */ h("div", {
|
|
79
79
|
ref: H,
|
|
80
80
|
className: l.tags,
|
|
81
|
-
children: [fe.map((e, t) => /* @__PURE__ */ h(
|
|
81
|
+
children: [fe.map((e, t) => /* @__PURE__ */ h(ee, {
|
|
82
82
|
variant: "light",
|
|
83
83
|
color: "neutral",
|
|
84
84
|
size: b === "l" ? "s" : "xs",
|
|
@@ -87,7 +87,7 @@ var g = ({ id: g, name: ae, ref: oe, values: _, options: v, label: y, placeholde
|
|
|
87
87
|
e.leftSection,
|
|
88
88
|
e.label,
|
|
89
89
|
e.rightSection,
|
|
90
|
-
/* @__PURE__ */ m(
|
|
90
|
+
/* @__PURE__ */ m(r, {
|
|
91
91
|
className: l.tagCloseIcon,
|
|
92
92
|
onClick: (t) => {
|
|
93
93
|
t.stopPropagation(), me(e.value);
|
|
@@ -11,47 +11,48 @@ import { SidebarCollapse as l } from "./SidebarCollapse/SidebarCollapse.js";
|
|
|
11
11
|
import { SidebarFooter as u } from "./SidebarFooter/SidebarFooter.js";
|
|
12
12
|
import { SidebarElement as d } from "./SidebarElement/SidebarElement.js";
|
|
13
13
|
import { SidebarProfile as f } from "./SidebarProfile/SidebarProfile.js";
|
|
14
|
-
import { Children as p,
|
|
15
|
-
import { jsx as
|
|
14
|
+
import { Children as p, useId as m, useState as h } from "react";
|
|
15
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
16
16
|
//#region src/lib/components/Sidebar/Sidebar.tsx
|
|
17
|
-
var
|
|
18
|
-
let
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
return /* @__PURE__ */
|
|
17
|
+
var v = ({ ref: o, children: c, size: l = "large", color: d = "default", variant: f = "default", withControlButton: v = !0, hideScrollbar: y = !0, className: b, style: x }) => {
|
|
18
|
+
let S = m(), [C, w] = h(null), [T, E] = h(l), [D, O] = h(T === "compact"), k = T === "compact", A = f === "default", j = p.toArray(c), M = r(j, a), N = r(j, s), P = r(j, u), F = () => {
|
|
19
|
+
E(D ? "large" : "compact"), O((e) => !e);
|
|
20
|
+
}, I = () => {
|
|
21
|
+
D && E("large");
|
|
22
|
+
}, L = () => {
|
|
23
|
+
D && (E("compact"), w(null));
|
|
24
|
+
}, R = e(t.sidebar, y && "hideScrollbar", t.absoluteContent, D && !k && t.shadow, b);
|
|
25
|
+
return /* @__PURE__ */ g(n, {
|
|
26
26
|
value: {
|
|
27
27
|
color: d,
|
|
28
|
-
isCompactSize:
|
|
29
|
-
isDefaultVariant:
|
|
30
|
-
hoverEnabled:
|
|
31
|
-
withControlButton:
|
|
32
|
-
openCollapseId:
|
|
33
|
-
setOpenCollapseId:
|
|
34
|
-
|
|
28
|
+
isCompactSize: k,
|
|
29
|
+
isDefaultVariant: A,
|
|
30
|
+
hoverEnabled: D,
|
|
31
|
+
withControlButton: v,
|
|
32
|
+
openCollapseId: C,
|
|
33
|
+
setOpenCollapseId: w,
|
|
34
|
+
collapseGroupName: S,
|
|
35
|
+
handleToggleHover: F
|
|
35
36
|
},
|
|
36
|
-
children: /* @__PURE__ */
|
|
37
|
+
children: /* @__PURE__ */ _("div", {
|
|
37
38
|
className: t.root,
|
|
38
39
|
ref: o,
|
|
39
|
-
children: [/* @__PURE__ */
|
|
40
|
-
className:
|
|
41
|
-
onMouseEnter:
|
|
42
|
-
onMouseLeave:
|
|
43
|
-
style: i(
|
|
44
|
-
children: [/* @__PURE__ */
|
|
40
|
+
children: [/* @__PURE__ */ g("div", { className: e(t.placeholder, D ? t.compactWidth : t.largeWidth) }), /* @__PURE__ */ _("aside", {
|
|
41
|
+
className: R,
|
|
42
|
+
onMouseEnter: I,
|
|
43
|
+
onMouseLeave: L,
|
|
44
|
+
style: i(T, d, f, x),
|
|
45
|
+
children: [/* @__PURE__ */ _("div", {
|
|
45
46
|
className: t.mainSection,
|
|
46
|
-
children: [
|
|
47
|
+
children: [v && (!A || !M) && /* @__PURE__ */ g(a, {}), /* @__PURE__ */ _("nav", {
|
|
47
48
|
className: t.mainSectionWrapper,
|
|
48
|
-
children: [
|
|
49
|
+
children: [A && M, N]
|
|
49
50
|
})]
|
|
50
|
-
}),
|
|
51
|
+
}), P]
|
|
51
52
|
})]
|
|
52
53
|
})
|
|
53
54
|
});
|
|
54
55
|
};
|
|
55
|
-
|
|
56
|
+
v.Header = a, v.Items = s, v.Item = c, v.Group = o, v.Collapse = l, v.Footer = u, v.Element = d, v.Profile = f;
|
|
56
57
|
//#endregion
|
|
57
|
-
export {
|
|
58
|
+
export { v as Sidebar };
|
|
@@ -2,39 +2,48 @@
|
|
|
2
2
|
import { classNames as e } from "../../../utils/class-names.js";
|
|
3
3
|
import { SolidNavigationChevronUp as t } from "../../../icons/components/SolidNavigationChevronUp.js";
|
|
4
4
|
import { SolidNavigationChevronDown as n } from "../../../icons/components/SolidNavigationChevronDown.js";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
5
|
+
import { useSidebarContext as r } from "../Sidebar.context.js";
|
|
6
|
+
import i from "../../../lib/components/Sidebar/SidebarItem/SidebarItem.module.js";
|
|
7
|
+
import { SidebarItemContent as a } from "../SidebarItem/SidebarItemContent.js";
|
|
8
8
|
import o from "../../../lib/components/Sidebar/SidebarCollapse/SidebarCollapse.module.js";
|
|
9
9
|
import { Children as s, isValidElement as c, useEffect as l, useId as u } from "react";
|
|
10
10
|
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
11
11
|
//#region src/lib/components/Sidebar/SidebarCollapse/SidebarCollapse.tsx
|
|
12
12
|
var p = ({ children: p, icon: m, label: h, counter: g, className: _, style: v }) => {
|
|
13
|
-
let y = u(), { isCompactSize: b, openCollapseId: x, setOpenCollapseId: S } =
|
|
13
|
+
let y = u(), { isCompactSize: b, openCollapseId: x, setOpenCollapseId: S, collapseGroupName: C } = r(), w = y === x, T = s.toArray(p).map((e) => c(e) ? e.props.active : !1).find(Boolean);
|
|
14
14
|
return l(() => {
|
|
15
|
-
|
|
15
|
+
T && S(y);
|
|
16
16
|
}, [
|
|
17
|
-
|
|
17
|
+
T,
|
|
18
18
|
y,
|
|
19
19
|
S
|
|
20
|
-
]), /* @__PURE__ */ f("
|
|
20
|
+
]), /* @__PURE__ */ f("details", {
|
|
21
|
+
open: w,
|
|
22
|
+
name: C,
|
|
21
23
|
style: v,
|
|
24
|
+
onToggle: (e) => {
|
|
25
|
+
let { open: t } = e.currentTarget;
|
|
26
|
+
e.target !== e.currentTarget || t === w || S(t ? y : null);
|
|
27
|
+
},
|
|
22
28
|
className: e(o.sidebarCollapse, _),
|
|
23
|
-
children: [/* @__PURE__ */ d(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
onClick: () => {
|
|
28
|
-
b || S(y === x ? null : y);
|
|
29
|
+
children: [/* @__PURE__ */ d("summary", {
|
|
30
|
+
"aria-label": h,
|
|
31
|
+
onClick: (e) => {
|
|
32
|
+
e.preventDefault(), !b && S(w ? null : y);
|
|
29
33
|
},
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
className: e(i.sidebarItem, b && i.sidebarItemCompact, T && (b || !w) && i.itemActive, o.summary),
|
|
35
|
+
children: /* @__PURE__ */ d(a, {
|
|
36
|
+
icon: m,
|
|
37
|
+
counter: g,
|
|
38
|
+
rightSection: /* @__PURE__ */ d("span", {
|
|
39
|
+
className: o.collapseIcon,
|
|
40
|
+
"aria-hidden": "true",
|
|
41
|
+
children: d(w ? t : n, {})
|
|
42
|
+
}),
|
|
43
|
+
children: h
|
|
44
|
+
})
|
|
45
|
+
}), !b && /* @__PURE__ */ d("div", {
|
|
46
|
+
className: o.clip,
|
|
38
47
|
children: /* @__PURE__ */ d("div", {
|
|
39
48
|
id: y,
|
|
40
49
|
role: "group",
|
|
@@ -1,54 +1,32 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { classNames as e } from "../../../utils/class-names.js";
|
|
3
3
|
import { UnstyledButton as t } from "../../UnstyledButton/UnstyledButton.js";
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import i from "
|
|
7
|
-
import {
|
|
4
|
+
import { useSidebarContext as n } from "../Sidebar.context.js";
|
|
5
|
+
import r from "../../../lib/components/Sidebar/SidebarItem/SidebarItem.module.js";
|
|
6
|
+
import { SidebarItemContent as i } from "./SidebarItemContent.js";
|
|
7
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
8
8
|
//#region src/lib/components/Sidebar/SidebarItem/SidebarItem.tsx
|
|
9
|
-
var
|
|
10
|
-
let { isCompactSize:
|
|
11
|
-
style:
|
|
12
|
-
className: e(
|
|
13
|
-
onClick: () =>
|
|
14
|
-
"aria-label":
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}),
|
|
27
|
-
!l && y && u ? /* @__PURE__ */ o(n, {
|
|
28
|
-
size: "s",
|
|
29
|
-
color: "danger",
|
|
30
|
-
label: u,
|
|
31
|
-
children: /* @__PURE__ */ o("span", { children: c.slice(0, 2).toLocaleUpperCase() })
|
|
32
|
-
}) : !l && y && /* @__PURE__ */ o("span", { children: c.slice(0, 2).toLocaleUpperCase() }),
|
|
33
|
-
!y && c
|
|
34
|
-
]
|
|
35
|
-
}), !y && (d || u) && /* @__PURE__ */ s("div", {
|
|
36
|
-
className: i.rightSection,
|
|
37
|
-
children: [!!u && /* @__PURE__ */ o(n, {
|
|
38
|
-
size: "s",
|
|
39
|
-
color: "danger",
|
|
40
|
-
label: u
|
|
41
|
-
}), d]
|
|
42
|
-
})] });
|
|
43
|
-
return _ ? /* @__PURE__ */ o(_, {
|
|
44
|
-
...b,
|
|
45
|
-
...v ? v(f) : {},
|
|
46
|
-
children: x
|
|
47
|
-
}) : /* @__PURE__ */ o(t, {
|
|
9
|
+
var o = ({ children: o, icon: s, counter: c, rightSection: l, path: u = "", active: d, onClick: f, className: p, style: m, linkComponent: h, linkProps: g }) => {
|
|
10
|
+
let { isCompactSize: _ } = n(), v = {
|
|
11
|
+
style: m,
|
|
12
|
+
className: e(r.sidebarItem, _ && r.sidebarItemCompact, d && r.itemActive, p),
|
|
13
|
+
onClick: () => f?.(u),
|
|
14
|
+
"aria-label": o
|
|
15
|
+
}, y = /* @__PURE__ */ a(i, {
|
|
16
|
+
icon: s,
|
|
17
|
+
counter: c,
|
|
18
|
+
rightSection: l,
|
|
19
|
+
children: o
|
|
20
|
+
});
|
|
21
|
+
return h ? /* @__PURE__ */ a(h, {
|
|
22
|
+
...v,
|
|
23
|
+
...g ? g(u) : {},
|
|
24
|
+
children: y
|
|
25
|
+
}) : /* @__PURE__ */ a(t, {
|
|
48
26
|
type: "button",
|
|
49
|
-
...
|
|
50
|
-
children:
|
|
27
|
+
...v,
|
|
28
|
+
children: y
|
|
51
29
|
});
|
|
52
30
|
};
|
|
53
31
|
//#endregion
|
|
54
|
-
export {
|
|
32
|
+
export { o as SidebarItem };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { Indicator as e } from "../../Indicator/Indicator.js";
|
|
3
|
+
import { useSidebarContext as t } from "../Sidebar.context.js";
|
|
4
|
+
import n from "../../../lib/components/Sidebar/SidebarItem/SidebarItem.module.js";
|
|
5
|
+
import { Fragment as r, jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
//#region src/lib/components/Sidebar/SidebarItem/SidebarItemContent.tsx
|
|
7
|
+
var o = ({ children: o, icon: s, counter: c, rightSection: l }) => {
|
|
8
|
+
let { isCompactSize: u } = t();
|
|
9
|
+
return /* @__PURE__ */ a(r, { children: [/* @__PURE__ */ a("div", {
|
|
10
|
+
className: n.itemContent,
|
|
11
|
+
children: [
|
|
12
|
+
s && /* @__PURE__ */ i("span", {
|
|
13
|
+
className: n.itemIcon,
|
|
14
|
+
children: u && c ? /* @__PURE__ */ i(e, {
|
|
15
|
+
size: "s",
|
|
16
|
+
color: "danger",
|
|
17
|
+
label: c,
|
|
18
|
+
children: s
|
|
19
|
+
}) : s
|
|
20
|
+
}),
|
|
21
|
+
!s && u && c ? /* @__PURE__ */ i(e, {
|
|
22
|
+
size: "s",
|
|
23
|
+
color: "danger",
|
|
24
|
+
label: c,
|
|
25
|
+
children: /* @__PURE__ */ i("span", { children: o.slice(0, 2).toLocaleUpperCase() })
|
|
26
|
+
}) : !s && u && /* @__PURE__ */ i("span", { children: o.slice(0, 2).toLocaleUpperCase() }),
|
|
27
|
+
!u && o
|
|
28
|
+
]
|
|
29
|
+
}), !u && (l || c) && /* @__PURE__ */ a("div", {
|
|
30
|
+
className: n.rightSection,
|
|
31
|
+
children: [!!c && /* @__PURE__ */ i(e, {
|
|
32
|
+
size: "s",
|
|
33
|
+
color: "danger",
|
|
34
|
+
label: c
|
|
35
|
+
}), l]
|
|
36
|
+
})] });
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { o as SidebarItemContent };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { resolveTypography as e } from "../../../utils/typography.js";
|
|
3
3
|
import { classNames as t } from "../../../utils/class-names.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
4
|
+
import { useLocale as n } from "../../../providers/hooks/useLocale/useLocale.js";
|
|
5
|
+
import { OutlineSystemClose as r } from "../../../icons/components/OutlineSystemClose.js";
|
|
6
|
+
import { SolidSystemCheckCircle as i } from "../../../icons/components/SolidSystemCheckCircle.js";
|
|
7
|
+
import { SolidSystemInfo as a } from "../../../icons/components/SolidSystemInfo.js";
|
|
8
|
+
import { SolidSystemRemoveCircle as o } from "../../../icons/components/SolidSystemRemoveCircle.js";
|
|
9
|
+
import { SolidSystemAlertCircle as s } from "../../../icons/components/SolidSystemAlertCircle.js";
|
|
10
10
|
import { Loader as c } from "../../Loader/Loader.js";
|
|
11
11
|
import { Button as l } from "../../Button/Button.js";
|
|
12
12
|
import u from "../../../lib/components/Snackbar/Snackbar.module.js";
|
|
@@ -14,18 +14,18 @@ import { SnackbarTimer as d } from "../SnackbarTimer/SnackbarTimer.js";
|
|
|
14
14
|
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
15
15
|
//#region src/lib/components/Snackbar/SnackbarCard/SnackbarCard.tsx
|
|
16
16
|
var m = {
|
|
17
|
-
success: /* @__PURE__ */ f(
|
|
18
|
-
error: /* @__PURE__ */ f(
|
|
19
|
-
warning: /* @__PURE__ */ f(
|
|
20
|
-
info: /* @__PURE__ */ f(
|
|
17
|
+
success: /* @__PURE__ */ f(i, {}),
|
|
18
|
+
error: /* @__PURE__ */ f(o, {}),
|
|
19
|
+
warning: /* @__PURE__ */ f(s, {}),
|
|
20
|
+
info: /* @__PURE__ */ f(a, {})
|
|
21
21
|
}, h = {
|
|
22
22
|
en: "Close notification",
|
|
23
23
|
ru: "Закрыть уведомление",
|
|
24
24
|
tj: "Пӯшидани огоҳӣ"
|
|
25
|
-
}, g = ({ item:
|
|
26
|
-
let { locale:
|
|
25
|
+
}, g = ({ item: i, onDismiss: a }) => {
|
|
26
|
+
let { locale: o } = n(), { id: s, message: g, type: _, leftSlot: v, description: y, rightSlot: b, actionSlot: x, withCloseButton: S = !0, loading: C, custom: w, render: T, mounted: E } = i;
|
|
27
27
|
if (w) {
|
|
28
|
-
let e = T ? T(
|
|
28
|
+
let e = T ? T(s) : g;
|
|
29
29
|
return /* @__PURE__ */ f("div", {
|
|
30
30
|
role: "status",
|
|
31
31
|
className: t(u.scaleIn, !E && u.scaleOut),
|
|
@@ -39,13 +39,13 @@ var m = {
|
|
|
39
39
|
"aria-hidden": "true",
|
|
40
40
|
className: t(u.typeIcon, u[_]),
|
|
41
41
|
children: m[_]
|
|
42
|
-
}) :
|
|
42
|
+
}) : i.withTimer && i.duration > 0 ? /* @__PURE__ */ f(d, { duration: i.duration }) : null : /* @__PURE__ */ f("div", {
|
|
43
43
|
className: u.leftSlot,
|
|
44
44
|
children: v
|
|
45
45
|
});
|
|
46
46
|
return /* @__PURE__ */ p("div", {
|
|
47
47
|
role: "status",
|
|
48
|
-
style:
|
|
48
|
+
style: i.style,
|
|
49
49
|
className: t(u.root, u.scaleIn, !E && u.scaleOut),
|
|
50
50
|
children: [
|
|
51
51
|
D,
|
|
@@ -69,9 +69,9 @@ var m = {
|
|
|
69
69
|
S && /* @__PURE__ */ f(l, {
|
|
70
70
|
variant: "function",
|
|
71
71
|
color: "tertiary",
|
|
72
|
-
onClick: () =>
|
|
73
|
-
"aria-label": h[
|
|
74
|
-
children: /* @__PURE__ */ f(
|
|
72
|
+
onClick: () => a(s),
|
|
73
|
+
"aria-label": h[o],
|
|
74
|
+
children: /* @__PURE__ */ f(r, {})
|
|
75
75
|
})
|
|
76
76
|
]
|
|
77
77
|
});
|
|
@@ -1,48 +1,32 @@
|
|
|
1
1
|
import { classNames as e } from "../../utils/class-names.js";
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import r from "
|
|
5
|
-
import {
|
|
6
|
-
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
2
|
+
import t from "../../lib/components/Table/Table.module.js";
|
|
3
|
+
import { getTableStyles as n } from "./Table.utils.js";
|
|
4
|
+
import { TableCollapseRow as r } from "./TableCollapseRow/TableCollapseRow.js";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
6
|
//#region src/lib/components/Table/Table.tsx
|
|
8
|
-
var
|
|
9
|
-
className: e(
|
|
10
|
-
...
|
|
11
|
-
}),
|
|
12
|
-
className: e(
|
|
13
|
-
...
|
|
14
|
-
}),
|
|
15
|
-
className: e(
|
|
16
|
-
...
|
|
17
|
-
}),
|
|
18
|
-
className: e(
|
|
19
|
-
...
|
|
20
|
-
}),
|
|
21
|
-
className: e(
|
|
22
|
-
...
|
|
23
|
-
}),
|
|
24
|
-
className: e(
|
|
25
|
-
...
|
|
26
|
-
}),
|
|
27
|
-
|
|
28
|
-
className: e(
|
|
29
|
-
children: /* @__PURE__ */ a(s, {
|
|
30
|
-
colSpan: c,
|
|
31
|
-
className: e(r.collapseCell, i && r.collapseCellOpen),
|
|
32
|
-
children: /* @__PURE__ */ o(t, {
|
|
33
|
-
isOpen: i,
|
|
34
|
-
className: r.collapseContent,
|
|
35
|
-
children: [/* @__PURE__ */ a(n, {
|
|
36
|
-
className: r.collapseDivider,
|
|
37
|
-
color: "secondary"
|
|
38
|
-
}), u]
|
|
39
|
-
})
|
|
40
|
-
})
|
|
41
|
-
}), m = ({ variant: t = "default", headerColor: n = "primary", verticalSpacing: o = "m", rowGap: s, withRowBorders: c = !0, withColumnBorders: l = !1, highlightOnHover: u = !1, stickyHeader: d = !1, stickyFooter: f = !1, className: p, style: m, ...h }) => /* @__PURE__ */ a("table", {
|
|
42
|
-
style: i(t, n, o, s, c, m),
|
|
43
|
-
className: e(r.table, c && r.withRowBorders, l && r.withColumnBorders, u && r.highlightOnHover, d && r.stickyHeader, f && r.stickyFooter, s && r.withRowGap, p),
|
|
7
|
+
var a = ({ className: n, ...r }) => /* @__PURE__ */ i("td", {
|
|
8
|
+
className: e(t.td, "uiFont", n),
|
|
9
|
+
...r
|
|
10
|
+
}), o = ({ className: n, ...r }) => /* @__PURE__ */ i("th", {
|
|
11
|
+
className: e(t.th, "uiFont", n),
|
|
12
|
+
...r
|
|
13
|
+
}), s = ({ className: n, ...r }) => /* @__PURE__ */ i("tr", {
|
|
14
|
+
className: e(t.tr, n),
|
|
15
|
+
...r
|
|
16
|
+
}), c = ({ className: n, ...r }) => /* @__PURE__ */ i("thead", {
|
|
17
|
+
className: e(t.thead, n),
|
|
18
|
+
...r
|
|
19
|
+
}), l = ({ className: n, ...r }) => /* @__PURE__ */ i("tbody", {
|
|
20
|
+
className: e(t.tbody, n),
|
|
21
|
+
...r
|
|
22
|
+
}), u = ({ className: n, ...r }) => /* @__PURE__ */ i("tfoot", {
|
|
23
|
+
className: e(t.tfoot, n),
|
|
24
|
+
...r
|
|
25
|
+
}), d = ({ variant: r = "default", headerColor: a = "primary", verticalSpacing: o = "m", rowGap: s, withRowBorders: c = !0, withColumnBorders: l = !1, highlightOnHover: u = !1, stickyHeader: d = !1, stickyFooter: f = !1, className: p, style: m, ...h }) => /* @__PURE__ */ i("table", {
|
|
26
|
+
style: n(r, a, o, s, c, m),
|
|
27
|
+
className: e(t.table, c && t.withRowBorders, l && t.withColumnBorders, u && t.highlightOnHover, d && t.stickyHeader, f && t.stickyFooter, s && t.withRowGap, p),
|
|
44
28
|
...h
|
|
45
29
|
});
|
|
46
|
-
|
|
30
|
+
d.Td = a, d.Th = o, d.Tr = s, d.CollapseRow = r, d.Thead = c, d.Tbody = l, d.Tfoot = u;
|
|
47
31
|
//#endregion
|
|
48
|
-
export {
|
|
32
|
+
export { d as Table };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { classNames as e } from "../../../utils/class-names.js";
|
|
3
|
+
import { Divider as t } from "../../Divider/Divider.js";
|
|
4
|
+
import { useDelayedUnmount as n } from "../../../hooks/useDelayedUnmount/useDelayedUnmount.js";
|
|
5
|
+
import r from "../../../lib/components/Table/Table.module.js";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
//#region src/lib/components/Table/TableCollapseRow/TableCollapseRow.tsx
|
|
8
|
+
var o = ({ isOpen: o, colSpan: s, keepMounted: c = !1, children: l, className: u, ...d }) => {
|
|
9
|
+
let f = n({
|
|
10
|
+
keepMounted: c,
|
|
11
|
+
isOpen: o,
|
|
12
|
+
exitDuration: 300
|
|
13
|
+
}), p = (e) => {
|
|
14
|
+
let t = e.currentTarget;
|
|
15
|
+
e.target !== t || t.open === o || (t.open = o);
|
|
16
|
+
};
|
|
17
|
+
return /* @__PURE__ */ i("tr", {
|
|
18
|
+
...d,
|
|
19
|
+
className: e(r.tr, r.collapseRow, o && r.collapseRowOpen, u),
|
|
20
|
+
children: /* @__PURE__ */ i("td", {
|
|
21
|
+
colSpan: s,
|
|
22
|
+
className: e(r.td, "uiFont", r.collapseCell, o && r.collapseCellOpen),
|
|
23
|
+
children: /* @__PURE__ */ a("details", {
|
|
24
|
+
open: o,
|
|
25
|
+
onToggle: p,
|
|
26
|
+
className: r.collapse,
|
|
27
|
+
children: [/* @__PURE__ */ i("summary", { hidden: !0 }), f && /* @__PURE__ */ i("div", {
|
|
28
|
+
className: r.clip,
|
|
29
|
+
children: /* @__PURE__ */ a("div", {
|
|
30
|
+
className: r.collapseContent,
|
|
31
|
+
children: [/* @__PURE__ */ i(t, {
|
|
32
|
+
className: r.collapseDivider,
|
|
33
|
+
color: "secondary"
|
|
34
|
+
}), l]
|
|
35
|
+
})
|
|
36
|
+
})]
|
|
37
|
+
})
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { o as TableCollapseRow };
|