@ensi-platform/admin-ui 0.6.0 → 0.8.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.
- package/dist/{Component-B2_pbcdj.js → Component-BnSNDZFt.js} +3 -3
- package/dist/{Component-B2_pbcdj.js.map → Component-BnSNDZFt.js.map} +1 -1
- package/dist/{Component-BiiaP51W.js → Component-C6mp0LOp.js} +2 -2
- package/dist/{Component-BiiaP51W.js.map → Component-C6mp0LOp.js.map} +1 -1
- package/dist/{Component-7vxv_s32.js → Component-CDgOJr89.js} +2 -2
- package/dist/{Component-7vxv_s32.js.map → Component-CDgOJr89.js.map} +1 -1
- package/dist/{Component-CRVPfwqm.js → Component-CIxKpL6s.js} +3 -3
- package/dist/{Component-CRVPfwqm.js.map → Component-CIxKpL6s.js.map} +1 -1
- package/dist/{Component-KNlwEG00.js → Component-D25FKJAT.js} +2 -2
- package/dist/{Component-KNlwEG00.js.map → Component-D25FKJAT.js.map} +1 -1
- package/dist/{Component-DFwWbzFS.js → Component-D310jlAj.js} +2 -2
- package/dist/{Component-DFwWbzFS.js.map → Component-D310jlAj.js.map} +1 -1
- package/dist/{Component-CwYbdJhI.js → Component-XnDMb714.js} +3 -3
- package/dist/{Component-CwYbdJhI.js.map → Component-XnDMb714.js.map} +1 -1
- package/dist/{Component-Dkvzqo0L.js → Component-ZIAMtMpP.js} +2 -2
- package/dist/{Component-Dkvzqo0L.js.map → Component-ZIAMtMpP.js.map} +1 -1
- package/dist/{Component-DhhrZEMr.js → Component-qJGssCB4.js} +3 -3
- package/dist/{Component-DhhrZEMr.js.map → Component-qJGssCB4.js.map} +1 -1
- package/dist/Copy-DBU7bgFo.js +28 -0
- package/dist/Copy-DBU7bgFo.js.map +1 -0
- package/dist/action-popup/index.js +2 -2
- package/dist/active-filters/index.js +2 -2
- package/dist/arrangement-settings/index.js +3 -3
- package/dist/assets/index.css +1 -1
- package/dist/assets/index10.css +1 -1
- package/dist/assets/index11.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index13.css +1 -1
- package/dist/assets/index14.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index19.css +1 -1
- package/dist/assets/index2.css +1 -1
- package/dist/assets/index20.css +1 -1
- package/dist/assets/index21.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index23.css +1 -1
- package/dist/assets/index24.css +1 -1
- package/dist/assets/index25.css +1 -1
- package/dist/assets/index26.css +1 -1
- package/dist/assets/index27.css +1 -1
- package/dist/assets/index28.css +1 -0
- package/dist/assets/index29.css +1 -0
- package/dist/assets/index3.css +1 -1
- package/dist/assets/index30.css +1 -0
- package/dist/assets/index31.css +1 -0
- package/dist/assets/index4.css +1 -1
- package/dist/assets/index5.css +1 -1
- package/dist/assets/index6.css +1 -1
- package/dist/assets/index7.css +1 -1
- package/dist/assets/index8.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/autocomplete/index.js +1 -1
- package/dist/autocomplete-async/index.js +1 -1
- package/dist/avatar/index.js +1 -1
- package/dist/badge/index.js +1 -1
- package/dist/bottom-sheet/index.js +2 -2
- package/dist/cascade-menu/index.js +3 -3
- package/dist/checkbox-group/index.js +1 -1
- package/dist/combobox/index.js +4 -4
- package/dist/copy-button/Component.d.ts +5 -0
- package/dist/copy-button/Component.d.ts.map +1 -0
- package/dist/copy-button/index.d.ts +3 -0
- package/dist/copy-button/index.d.ts.map +1 -0
- package/dist/copy-button/index.js +97 -0
- package/dist/copy-button/index.js.map +1 -0
- package/dist/copy-button/types.d.ts +14 -0
- package/dist/copy-button/types.d.ts.map +1 -0
- package/dist/data-table/index.js +3 -3
- package/dist/date-picker/index.js +3 -3
- package/dist/date-range-picker/index.js +3 -3
- package/dist/drawer/index.js +1 -1
- package/dist/filters/index.js +1 -1
- package/dist/flex-layout/Component.d.ts +9 -0
- package/dist/flex-layout/Component.d.ts.map +1 -0
- package/dist/flex-layout/components/Item/index.d.ts +5 -0
- package/dist/flex-layout/components/Item/index.d.ts.map +1 -0
- package/dist/flex-layout/index.d.ts +3 -0
- package/dist/flex-layout/index.d.ts.map +1 -0
- package/dist/flex-layout/index.js +93 -0
- package/dist/flex-layout/index.js.map +1 -0
- package/dist/flex-layout/types.d.ts +41 -0
- package/dist/flex-layout/types.d.ts.map +1 -0
- package/dist/grid/Component.d.ts +9 -0
- package/dist/grid/Component.d.ts.map +1 -0
- package/dist/grid/components/Item/index.d.ts +5 -0
- package/dist/grid/components/Item/index.d.ts.map +1 -0
- package/dist/grid/index.d.ts +3 -0
- package/dist/grid/index.d.ts.map +1 -0
- package/dist/grid/index.js +85 -0
- package/dist/grid/index.js.map +1 -0
- package/dist/grid/types.d.ts +44 -0
- package/dist/grid/types.d.ts.map +1 -0
- package/dist/grid/utils.d.ts +6 -0
- package/dist/grid/utils.d.ts.map +1 -0
- package/dist/{hooks-BAkrGC45.js → hooks-BlX5Y4Zt.js} +9 -6
- package/dist/hooks-BlX5Y4Zt.js.map +1 -0
- package/dist/icons/index.js +80 -100
- package/dist/icons/index.js.map +1 -1
- package/dist/{index-B-dHfeT9.js → index-BXlN61PG.js} +2 -2
- package/dist/{index-B-dHfeT9.js.map → index-BXlN61PG.js.map} +1 -1
- package/dist/{index-bdpk2nvt.js → index-CDCqZ3um.js} +3 -3
- package/dist/{index-bdpk2nvt.js.map → index-CDCqZ3um.js.map} +1 -1
- package/dist/{index-CVEaKh8K.js → index-tPhlowOw.js} +4 -4
- package/dist/{index-CVEaKh8K.js.map → index-tPhlowOw.js.map} +1 -1
- package/dist/input/index.js +1 -1
- package/dist/loader/index.js +2 -2
- package/dist/menu-list/index.js +1 -1
- package/dist/{metrics-C8FBvbwl.js → metrics-B5YsELiI.js} +2 -2
- package/dist/{metrics-C8FBvbwl.js.map → metrics-B5YsELiI.js.map} +1 -1
- package/dist/modal/index.js +1 -1
- package/dist/multi-autocomplete/index.js +1 -1
- package/dist/multi-autocomplete-async/index.js +1 -1
- package/dist/multi-select/index.js +3 -3
- package/dist/number-input/index.js +1 -1
- package/dist/number-range/index.js +2 -2
- package/dist/provider/context.d.ts.map +1 -1
- package/dist/provider/index.js +3 -3
- package/dist/provider/types.d.ts +6 -0
- package/dist/provider/types.d.ts.map +1 -1
- package/dist/select/index.js +1 -1
- package/dist/slider/index.js +1 -1
- package/dist/suggest-checklist/index.js +4 -4
- package/dist/switch/index.js +1 -1
- package/dist/table/index.js +1 -1
- package/dist/tabs/index.js +1 -1
- package/dist/tag/index.js +1 -1
- package/dist/textarea/index.js +2 -2
- package/dist/time-field/index.js +2 -2
- package/dist/toast/index.js +2 -2
- package/dist/typography/index.js +1 -1
- package/dist/{utils-DUOIRqE-.js → utils-Dj_u-w0s.js} +3 -3
- package/dist/{utils-DUOIRqE-.js.map → utils-Dj_u-w0s.js.map} +1 -1
- package/dist/vertical-tabs/Component.d.ts +18 -0
- package/dist/vertical-tabs/Component.d.ts.map +1 -0
- package/dist/vertical-tabs/components/Indicator/index.d.ts +6 -0
- package/dist/vertical-tabs/components/Indicator/index.d.ts.map +1 -0
- package/dist/vertical-tabs/components/Item/index.d.ts +5 -0
- package/dist/vertical-tabs/components/Item/index.d.ts.map +1 -0
- package/dist/vertical-tabs/components/Item/theme.d.ts +5 -0
- package/dist/vertical-tabs/components/Item/theme.d.ts.map +1 -0
- package/dist/vertical-tabs/components/List/index.d.ts +5 -0
- package/dist/vertical-tabs/components/List/index.d.ts.map +1 -0
- package/dist/vertical-tabs/components/List/theme.d.ts +5 -0
- package/dist/vertical-tabs/components/List/theme.d.ts.map +1 -0
- package/dist/vertical-tabs/components/Panel/index.d.ts +5 -0
- package/dist/vertical-tabs/components/Panel/index.d.ts.map +1 -0
- package/dist/vertical-tabs/components/Panels/index.d.ts +5 -0
- package/dist/vertical-tabs/components/Panels/index.d.ts.map +1 -0
- package/dist/vertical-tabs/context.d.ts +4 -0
- package/dist/vertical-tabs/context.d.ts.map +1 -0
- package/dist/vertical-tabs/index.d.ts +4 -0
- package/dist/vertical-tabs/index.d.ts.map +1 -0
- package/dist/vertical-tabs/index.js +193 -0
- package/dist/vertical-tabs/index.js.map +1 -0
- package/dist/vertical-tabs/theme.d.ts +5 -0
- package/dist/vertical-tabs/theme.d.ts.map +1 -0
- package/dist/vertical-tabs/types.d.ts +84 -0
- package/dist/vertical-tabs/types.d.ts.map +1 -0
- package/docs/design-language.md +5 -4
- package/docs/skills/SKILL.md +5 -1
- package/package.json +17 -1
- package/src/copy-button/docs/Description.md +23 -0
- package/src/copy-button/docs/Example.md +5 -0
- package/src/copy-button/docs/cssVariables.ts +12 -0
- package/src/copy-button/types.ts +16 -0
- package/src/flex-layout/docs/Description.md +27 -0
- package/src/flex-layout/docs/Example.md +11 -0
- package/src/flex-layout/docs/cssVariables.ts +13 -0
- package/src/flex-layout/types.ts +49 -0
- package/src/grid/docs/Description.md +26 -0
- package/src/grid/docs/Example.md +16 -0
- package/src/grid/docs/cssVariables.ts +13 -0
- package/src/grid/types.ts +53 -0
- package/src/provider/types.ts +6 -0
- package/src/vertical-tabs/docs/Description.md +32 -0
- package/src/vertical-tabs/docs/Example.md +19 -0
- package/src/vertical-tabs/docs/cssVariables.ts +25 -0
- package/src/vertical-tabs/types.ts +110 -0
- package/dist/hooks-BAkrGC45.js.map +0 -1
|
@@ -4,15 +4,15 @@ import { CalendarDate as q } from "@internationalized/date";
|
|
|
4
4
|
import L from "classnames";
|
|
5
5
|
import { DateRangePickerStateContext as ne, useSlottedContext as oe, RangeCalendarContext as te, DateRangePicker as re, Group as se, DateInput as j, DateSegment as K, Button as X, Popover as le, Dialog as ce } from "react-aria-components";
|
|
6
6
|
import { s as J } from "../index-h8z54aFR.js";
|
|
7
|
-
import { u as ie, t as V, a as ue, M as de, b as me, D as pe, c as ge } from "../index-
|
|
7
|
+
import { u as ie, t as V, a as ue, M as de, b as me, D as pe, c as ge } from "../index-BXlN61PG.js";
|
|
8
8
|
import { C as be } from "../Calendar-CMg4K4oF.js";
|
|
9
9
|
import { C as _e } from "../Clear-DcxADxz6.js";
|
|
10
|
-
import { u as he } from "../hooks-
|
|
10
|
+
import { u as he } from "../hooks-BlX5Y4Zt.js";
|
|
11
11
|
import { cva as ye } from "class-variance-authority";
|
|
12
12
|
import { typographyStyles as Y } from "../typography/index.js";
|
|
13
13
|
import { F as M, u as fe } from "../Component-BPN5FgKq.js";
|
|
14
14
|
import { u as De, g as Ce } from "../useFieldHook-Bt9nST7g.js";
|
|
15
|
-
import '../assets/
|
|
15
|
+
import '../assets/index16.css';const Q = ({ scrollToDate: e, className: l, autoFocusDay: c = !1 }) => {
|
|
16
16
|
const { months: g, viewportRef: u, setMonthEl: p, scrollToMonth: b } = ie(e), d = ee(ne), t = oe(te), [r, f] = U(null), [R, D] = U(null), C = d?.value ?? t?.value ?? null, _ = V(C?.start ?? null), v = V(C?.end ?? null), h = V(t?.minValue ?? null), F = V(t?.maxValue ?? null), x = !!t?.isDisabled, N = t?.isDateUnavailable ? (a) => !!t.isDateUnavailable?.(a) : void 0, P = (a) => {
|
|
17
17
|
if (!r) {
|
|
18
18
|
f(a);
|
package/dist/drawer/index.js
CHANGED
package/dist/filters/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { jsx as n } from "react/jsx-runtime";
|
|
|
2
2
|
import c from "classnames";
|
|
3
3
|
import { s as d } from "../index-h8z54aFR.js";
|
|
4
4
|
import { useContext as v, createContext as N, useMemo as C } from "react";
|
|
5
|
-
import '../assets/
|
|
5
|
+
import '../assets/index24.css';const p = N({
|
|
6
6
|
columns: 4,
|
|
7
7
|
span: {}
|
|
8
8
|
}), h = p.Provider, x = () => v(p), M = (t, r, e) => {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IFlexLayoutProps } from './types';
|
|
2
|
+
export declare const FlexLayout: (({ ref, children, direction, gap, align, justify, wrap, hidden, className, dataTestId, ...props }: IFlexLayoutProps) => import("react").JSX.Element) & {
|
|
3
|
+
displayName?: string;
|
|
4
|
+
} & {
|
|
5
|
+
Item: (({ ref, children, grow, className, dataTestId, ...props }: import('./types').IFlexLayoutItemProps) => import("react").JSX.Element) & {
|
|
6
|
+
displayName?: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=Component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/flex-layout/Component.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,gBAAgB,EAAuE,MAAM,SAAS,CAAC;AAoErH,eAAO,MAAM,UAAU,sGAvBhB,gBAAgB;;;;;;CAuB0D,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { IFlexLayoutItemProps } from '../../types';
|
|
2
|
+
export declare const FlexLayoutItem: (({ ref, children, grow, className, dataTestId, ...props }: IFlexLayoutItemProps) => import("react").JSX.Element) & {
|
|
3
|
+
displayName?: string;
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/flex-layout/components/Item/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAIxD,eAAO,MAAM,cAAc,8DAC4C,oBAAoB;;CAK1F,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/flex-layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import p from "classnames";
|
|
3
|
+
import { s as c } from "../index-h8z54aFR.js";
|
|
4
|
+
import '../assets/index11.css';const i = "aub_styles-module_root_6fb94", j = "aub_styles-module_grow_f3b2d", _ = {
|
|
5
|
+
root: i,
|
|
6
|
+
grow: j
|
|
7
|
+
}, g = c(
|
|
8
|
+
({ ref: s, children: a, grow: e = !1, className: o, dataTestId: l, ...u }) => /* @__PURE__ */ n("div", { ...u, ref: s, className: p(_.root, e && _.grow, o), "data-test-id": l, children: a })
|
|
9
|
+
);
|
|
10
|
+
g.displayName = "FlexLayout.Item";
|
|
11
|
+
const w = "aub_styles-module_root_208b0", x = "aub_styles-module_column_7b48c", C = "aub_styles-module_wrap_3e487", F = "aub_styles-module_gap0_511ba", L = "aub_styles-module_gap4_a11b2", N = "aub_styles-module_gap8_0001f", E = "aub_styles-module_gap12_2faaf", I = "aub_styles-module_gap16_1a9d4", S = "aub_styles-module_gap20_ca7b9", h = "aub_styles-module_gap24_20da2", v = "aub_styles-module_gap32_0aae1", R = "aub_styles-module_gap40_0b0a3", $ = "aub_styles-module_gap48_28ea1", O = "aub_styles-module_gap64_e05eb", k = "aub_styles-module_start_59232", q = "aub_styles-module_center_a8723", z = "aub_styles-module_end_40e0b", A = "aub_styles-module_justify-start_94083", B = "aub_styles-module_justify-center_eadc0", D = "aub_styles-module_justify-end_b6925", G = "aub_styles-module_between_6ce09", t = {
|
|
12
|
+
root: w,
|
|
13
|
+
column: x,
|
|
14
|
+
wrap: C,
|
|
15
|
+
gap0: F,
|
|
16
|
+
gap4: L,
|
|
17
|
+
gap8: N,
|
|
18
|
+
gap12: E,
|
|
19
|
+
gap16: I,
|
|
20
|
+
gap20: S,
|
|
21
|
+
gap24: h,
|
|
22
|
+
gap32: v,
|
|
23
|
+
gap40: R,
|
|
24
|
+
gap48: $,
|
|
25
|
+
gap64: O,
|
|
26
|
+
start: k,
|
|
27
|
+
center: q,
|
|
28
|
+
end: z,
|
|
29
|
+
justifyStart: A,
|
|
30
|
+
justifyCenter: B,
|
|
31
|
+
justifyEnd: D,
|
|
32
|
+
between: G
|
|
33
|
+
}, H = {
|
|
34
|
+
0: t.gap0,
|
|
35
|
+
4: t.gap4,
|
|
36
|
+
8: t.gap8,
|
|
37
|
+
12: t.gap12,
|
|
38
|
+
16: t.gap16,
|
|
39
|
+
20: t.gap20,
|
|
40
|
+
24: t.gap24,
|
|
41
|
+
32: t.gap32,
|
|
42
|
+
40: t.gap40,
|
|
43
|
+
48: t.gap48,
|
|
44
|
+
64: t.gap64
|
|
45
|
+
}, J = {
|
|
46
|
+
start: t.start,
|
|
47
|
+
center: t.center,
|
|
48
|
+
end: t.end,
|
|
49
|
+
stretch: null
|
|
50
|
+
}, K = {
|
|
51
|
+
start: t.justifyStart,
|
|
52
|
+
center: t.justifyCenter,
|
|
53
|
+
end: t.justifyEnd,
|
|
54
|
+
between: t.between
|
|
55
|
+
}, r = c(
|
|
56
|
+
({
|
|
57
|
+
ref: s,
|
|
58
|
+
children: a,
|
|
59
|
+
direction: e = "row",
|
|
60
|
+
gap: o = 16,
|
|
61
|
+
align: l = "stretch",
|
|
62
|
+
justify: u = "start",
|
|
63
|
+
wrap: d = !1,
|
|
64
|
+
hidden: y = !1,
|
|
65
|
+
className: m,
|
|
66
|
+
dataTestId: b,
|
|
67
|
+
...f
|
|
68
|
+
}) => /* @__PURE__ */ n(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
...f,
|
|
72
|
+
ref: s,
|
|
73
|
+
hidden: y,
|
|
74
|
+
className: p(
|
|
75
|
+
t.root,
|
|
76
|
+
e === "column" && t.column,
|
|
77
|
+
d && t.wrap,
|
|
78
|
+
H[o],
|
|
79
|
+
J[l],
|
|
80
|
+
K[u],
|
|
81
|
+
m
|
|
82
|
+
),
|
|
83
|
+
"data-test-id": b,
|
|
84
|
+
children: a
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
);
|
|
88
|
+
r.displayName = "FlexLayout";
|
|
89
|
+
const T = Object.assign(r, { Item: g });
|
|
90
|
+
export {
|
|
91
|
+
T as FlexLayout
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/flex-layout/components/Item/index.tsx","../../src/flex-layout/Component.tsx"],"sourcesContent":["import cn from 'classnames';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { type IFlexLayoutItemProps } from '../../types';\n\nimport styles from './styles.module.css';\n\nexport const FlexLayoutItem = supportRef(\n ({ ref, children, grow = false, className, dataTestId, ...props }: IFlexLayoutItemProps) => (\n <div {...props} ref={ref} className={cn(styles.root, grow && styles.grow, className)} data-test-id={dataTestId}>\n {children}\n </div>\n )\n);\n\nFlexLayoutItem.displayName = 'FlexLayout.Item';\n","import cn from 'classnames';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { FlexLayoutItem } from './components/Item';\nimport { type IFlexLayoutProps, type TFlexLayoutAlign, type TFlexLayoutGap, type TFlexLayoutJustify } from './types';\n\nimport styles from './styles.module.css';\n\nconst gapClass: Record<TFlexLayoutGap, string> = {\n 0: styles.gap0,\n 4: styles.gap4,\n 8: styles.gap8,\n 12: styles.gap12,\n 16: styles.gap16,\n 20: styles.gap20,\n 24: styles.gap24,\n 32: styles.gap32,\n 40: styles.gap40,\n 48: styles.gap48,\n 64: styles.gap64,\n};\n\nconst alignClass: Record<TFlexLayoutAlign, string | null> = {\n start: styles.start,\n center: styles.center,\n end: styles.end,\n stretch: null,\n};\n\nconst justifyClass: Record<TFlexLayoutJustify, string> = {\n start: styles.justifyStart,\n center: styles.justifyCenter,\n end: styles.justifyEnd,\n between: styles.between,\n};\n\nconst FlexLayoutRoot = supportRef(\n ({\n ref,\n children,\n direction = 'row',\n gap = 16,\n align = 'stretch',\n justify = 'start',\n wrap = false,\n hidden = false,\n className,\n dataTestId,\n ...props\n }: IFlexLayoutProps) => (\n <div\n {...props}\n ref={ref}\n hidden={hidden}\n className={cn(\n styles.root,\n direction === 'column' && styles.column,\n wrap && styles.wrap,\n gapClass[gap],\n alignClass[align],\n justifyClass[justify],\n className\n )}\n data-test-id={dataTestId}\n >\n {children}\n </div>\n )\n);\n\nFlexLayoutRoot.displayName = 'FlexLayout';\n\nexport const FlexLayout = Object.assign(FlexLayoutRoot, { Item: FlexLayoutItem });\n"],"names":["FlexLayoutItem","supportRef","ref","children","grow","className","dataTestId","props","jsx","cn","styles","gapClass","alignClass","justifyClass","FlexLayoutRoot","direction","gap","align","justify","wrap","hidden","FlexLayout"],"mappings":";;;;;;GAQaA,IAAiBC;AAAA,EAC1B,CAAC,EAAE,KAAAC,GAAK,UAAAC,GAAU,MAAAC,IAAO,IAAO,WAAAC,GAAW,YAAAC,GAAY,GAAGC,EAAA,MACtD,gBAAAC,EAAC,OAAA,EAAK,GAAGD,GAAO,KAAAL,GAAU,WAAWO,EAAGC,EAAO,MAAMN,KAAQM,EAAO,MAAML,CAAS,GAAG,gBAAcC,GAC/F,UAAAH,EAAA,CACL;AAER;AAEAH,EAAe,cAAc;;;;;;;;;;;;;;;;;;;;;;;GCPvBW,IAA2C;AAAA,EAC7C,GAAGD,EAAO;AAAA,EACV,GAAGA,EAAO;AAAA,EACV,GAAGA,EAAO;AAAA,EACV,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AACf,GAEME,IAAsD;AAAA,EACxD,OAAOF,EAAO;AAAA,EACd,QAAQA,EAAO;AAAA,EACf,KAAKA,EAAO;AAAA,EACZ,SAAS;AACb,GAEMG,IAAmD;AAAA,EACrD,OAAOH,EAAO;AAAA,EACd,QAAQA,EAAO;AAAA,EACf,KAAKA,EAAO;AAAA,EACZ,SAASA,EAAO;AACpB,GAEMI,IAAiBb;AAAA,EACnB,CAAC;AAAA,IACG,KAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAY,IAAY;AAAA,IACZ,KAAAC,IAAM;AAAA,IACN,OAAAC,IAAQ;AAAA,IACR,SAAAC,IAAU;AAAA,IACV,MAAAC,IAAO;AAAA,IACP,QAAAC,IAAS;AAAA,IACT,WAAAf;AAAA,IACA,YAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,MAEH,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACI,GAAGD;AAAA,MACJ,KAAAL;AAAA,MACA,QAAAkB;AAAA,MACA,WAAWX;AAAA,QACPC,EAAO;AAAA,QACPK,MAAc,YAAYL,EAAO;AAAA,QACjCS,KAAQT,EAAO;AAAA,QACfC,EAASK,CAAG;AAAA,QACZJ,EAAWK,CAAK;AAAA,QAChBJ,EAAaK,CAAO;AAAA,QACpBb;AAAA,MAAA;AAAA,MAEJ,gBAAcC;AAAA,MAEb,UAAAH;AAAA,IAAA;AAAA,EAAA;AAGb;AAEAW,EAAe,cAAc;AAEtB,MAAMO,IAAa,OAAO,OAAOP,GAAgB,EAAE,MAAMd,GAAgB;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ComponentPropsWithRef, ReactNode, Ref } from 'react';
|
|
2
|
+
import { IDataTestIdProps } from '../ds/common/index.js';
|
|
3
|
+
/** Gap step. Matches the spacing scale. */
|
|
4
|
+
export type TFlexLayoutGap = 0 | 4 | 8 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 64;
|
|
5
|
+
/** Main axis. */
|
|
6
|
+
export type TFlexLayoutDirection = 'row' | 'column';
|
|
7
|
+
/** Cross-axis alignment. */
|
|
8
|
+
export type TFlexLayoutAlign = 'start' | 'center' | 'end' | 'stretch';
|
|
9
|
+
/** Main-axis distribution. */
|
|
10
|
+
export type TFlexLayoutJustify = 'start' | 'center' | 'end' | 'between';
|
|
11
|
+
/** Own props for FlexLayout. */
|
|
12
|
+
export interface IFlexLayoutOwnProps extends IDataTestIdProps {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** Row or column. */
|
|
15
|
+
direction?: TFlexLayoutDirection;
|
|
16
|
+
/** Gap between items. */
|
|
17
|
+
gap?: TFlexLayoutGap;
|
|
18
|
+
/** Cross-axis alignment. */
|
|
19
|
+
align?: TFlexLayoutAlign;
|
|
20
|
+
/** Main-axis distribution. */
|
|
21
|
+
justify?: TFlexLayoutJustify;
|
|
22
|
+
/** Wrap items onto the next line. */
|
|
23
|
+
wrap?: boolean;
|
|
24
|
+
/** Removes the layout from the page. */
|
|
25
|
+
hidden?: boolean;
|
|
26
|
+
/** Ref to the layout (React 19 prop). */
|
|
27
|
+
ref?: Ref<HTMLDivElement>;
|
|
28
|
+
}
|
|
29
|
+
export interface IFlexLayoutProps extends Omit<ComponentPropsWithRef<'div'>, keyof IFlexLayoutOwnProps | 'children'>, IFlexLayoutOwnProps {
|
|
30
|
+
}
|
|
31
|
+
/** Own props for FlexLayout.Item. */
|
|
32
|
+
export interface IFlexLayoutItemOwnProps extends IDataTestIdProps {
|
|
33
|
+
children: ReactNode;
|
|
34
|
+
/** Take the free space on the main axis. */
|
|
35
|
+
grow?: boolean;
|
|
36
|
+
/** Ref to the item (React 19 prop). */
|
|
37
|
+
ref?: Ref<HTMLDivElement>;
|
|
38
|
+
}
|
|
39
|
+
export interface IFlexLayoutItemProps extends Omit<ComponentPropsWithRef<'div'>, keyof IFlexLayoutItemOwnProps | 'children'>, IFlexLayoutItemOwnProps {
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/flex-layout/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAE7E,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,2CAA2C;AAC3C,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAE/E,iBAAiB;AACjB,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEpD,4BAA4B;AAC5B,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAEtE,8BAA8B;AAC9B,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAExE,gCAAgC;AAChC,MAAM,WAAW,mBAAoB,SAAQ,gBAAgB;IACzD,QAAQ,EAAE,SAAS,CAAC;IACpB,qBAAqB;IACrB,SAAS,CAAC,EAAE,oBAAoB,CAAC;IACjC,yBAAyB;IACzB,GAAG,CAAC,EAAE,cAAc,CAAC;IACrB,4BAA4B;IAC5B,KAAK,CAAC,EAAE,gBAAgB,CAAC;IACzB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,kBAAkB,CAAC;IAC7B,qCAAqC;IACrC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,yCAAyC;IACzC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,gBACb,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,MAAM,mBAAmB,GAAG,UAAU,CAAC,EAAE,mBAAmB;CAAG;AAE9G,qCAAqC;AACrC,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC7D,QAAQ,EAAE,SAAS,CAAC;IACpB,4CAA4C;IAC5C,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,uCAAuC;IACvC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,oBACb,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,MAAM,uBAAuB,GAAG,UAAU,CAAC,EAAE,uBAAuB;CAAG"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IGridProps } from './types';
|
|
2
|
+
export declare const Grid: (({ ref, children, cols, gap, col, align, hidden, className, dataTestId, style, ...props }: IGridProps) => import("react").JSX.Element) & {
|
|
3
|
+
displayName?: string;
|
|
4
|
+
} & {
|
|
5
|
+
Item: (({ ref, children, col, className, dataTestId, style, ...props }: import('./types').IGridItemProps) => import("react").JSX.Element) & {
|
|
6
|
+
displayName?: string;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=Component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/grid/Component.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,UAAU,EAAkC,MAAM,SAAS,CAAC;AA+D1E,eAAO,MAAM,IAAI,8FAxBV,UAAU;;;;;;CAwB8C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/grid/components/Item/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,aAAa,CAAC;AAKnE,eAAO,MAAM,QAAQ,oEAA+E,cAAc;;CAWhH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/grid/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import u from "classnames";
|
|
3
|
+
import { s as _ } from "../index-h8z54aFR.js";
|
|
4
|
+
import '../assets/index17.css';const G = (a) => typeof a == "number" ? `repeat(${a}, minmax(0, 1fr))` : a.map((e) => typeof e == "number" ? `${e}fr` : e).join(" "), d = (a) => a === "full" ? "1 / -1" : typeof a == "number" ? `span ${a}` : "auto", $ = "aub_styles-module_root_8c3c3", N = {
|
|
5
|
+
root: $
|
|
6
|
+
}, c = _(({ ref: a, children: e, col: s, className: o, dataTestId: p, style: r, ...n }) => {
|
|
7
|
+
const g = {
|
|
8
|
+
...r,
|
|
9
|
+
"--aui-grid-col": d(s)
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ l("div", { ...n, ref: a, className: u(N.root, o), style: g, "data-test-id": p, children: e });
|
|
12
|
+
});
|
|
13
|
+
c.displayName = "Grid.Item";
|
|
14
|
+
const j = "aub_styles-module_root_4fb06", x = "aub_styles-module_gap0_88b20", C = "aub_styles-module_gap4_42cf0", I = "aub_styles-module_gap8_4d5fd", h = "aub_styles-module_gap12_c7a16", v = "aub_styles-module_gap16_06417", R = "aub_styles-module_gap20_06651", S = "aub_styles-module_gap24_51b8f", O = "aub_styles-module_gap32_a9345", T = "aub_styles-module_gap40_5a33c", q = "aub_styles-module_gap48_e3bac", w = "aub_styles-module_gap64_831e6", z = "aub_styles-module_start_4afcd", A = "aub_styles-module_center_5c5fd", B = "aub_styles-module_end_b41e4", t = {
|
|
15
|
+
root: j,
|
|
16
|
+
gap0: x,
|
|
17
|
+
gap4: C,
|
|
18
|
+
gap8: I,
|
|
19
|
+
gap12: h,
|
|
20
|
+
gap16: v,
|
|
21
|
+
gap20: R,
|
|
22
|
+
gap24: S,
|
|
23
|
+
gap32: O,
|
|
24
|
+
gap40: T,
|
|
25
|
+
gap48: q,
|
|
26
|
+
gap64: w,
|
|
27
|
+
start: z,
|
|
28
|
+
center: A,
|
|
29
|
+
end: B
|
|
30
|
+
}, D = {
|
|
31
|
+
0: t.gap0,
|
|
32
|
+
4: t.gap4,
|
|
33
|
+
8: t.gap8,
|
|
34
|
+
12: t.gap12,
|
|
35
|
+
16: t.gap16,
|
|
36
|
+
20: t.gap20,
|
|
37
|
+
24: t.gap24,
|
|
38
|
+
32: t.gap32,
|
|
39
|
+
40: t.gap40,
|
|
40
|
+
48: t.gap48,
|
|
41
|
+
64: t.gap64
|
|
42
|
+
}, E = {
|
|
43
|
+
start: t.start,
|
|
44
|
+
center: t.center,
|
|
45
|
+
end: t.end,
|
|
46
|
+
stretch: null
|
|
47
|
+
}, m = _(
|
|
48
|
+
({
|
|
49
|
+
ref: a,
|
|
50
|
+
children: e,
|
|
51
|
+
cols: s,
|
|
52
|
+
gap: o = 16,
|
|
53
|
+
col: p,
|
|
54
|
+
align: r = "stretch",
|
|
55
|
+
hidden: n = !1,
|
|
56
|
+
className: g,
|
|
57
|
+
dataTestId: i,
|
|
58
|
+
style: y,
|
|
59
|
+
...b
|
|
60
|
+
}) => {
|
|
61
|
+
const f = {
|
|
62
|
+
...y,
|
|
63
|
+
"--aui-grid-template": G(s),
|
|
64
|
+
"--aui-grid-col": d(p)
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ l(
|
|
67
|
+
"div",
|
|
68
|
+
{
|
|
69
|
+
...b,
|
|
70
|
+
ref: a,
|
|
71
|
+
hidden: n,
|
|
72
|
+
className: u(t.root, D[o], E[r], g),
|
|
73
|
+
style: f,
|
|
74
|
+
"data-test-id": i,
|
|
75
|
+
children: e
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
m.displayName = "Grid";
|
|
81
|
+
const K = Object.assign(m, { Item: c });
|
|
82
|
+
export {
|
|
83
|
+
K as Grid
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/grid/utils.ts","../../src/grid/components/Item/index.tsx","../../src/grid/Component.tsx"],"sourcesContent":["import { type TGridCol, type TGridTrack } from './types';\n\n/** Equal tracks, or an explicit list (`2` → two `1fr`, `2` inside a list → `2fr`). */\nexport const toGridTemplate = (cols: number | TGridTrack[]): string => {\n if (typeof cols === 'number') {\n return `repeat(${cols}, minmax(0, 1fr))`;\n }\n\n return cols.map(track => (typeof track === 'number' ? `${track}fr` : track)).join(' ');\n};\n\n/** Item span. `full` crosses every column. */\nexport const toGridColumn = (col?: TGridCol): string => {\n if (col === 'full') {\n return '1 / -1';\n }\n\n if (typeof col === 'number') {\n return `span ${col}`;\n }\n\n return 'auto';\n};\n","import cn from 'classnames';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { type IGridItemProps, type IGridStyle } from '../../types';\nimport { toGridColumn } from '../../utils';\n\nimport styles from './styles.module.css';\n\nexport const GridItem = supportRef(({ ref, children, col, className, dataTestId, style, ...props }: IGridItemProps) => {\n const itemStyle: IGridStyle = {\n ...style,\n '--aui-grid-col': toGridColumn(col),\n };\n\n return (\n <div {...props} ref={ref} className={cn(styles.root, className)} style={itemStyle} data-test-id={dataTestId}>\n {children}\n </div>\n );\n});\n\nGridItem.displayName = 'Grid.Item';\n","import cn from 'classnames';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { GridItem } from './components/Item';\nimport { type IGridProps, type IGridStyle, type TGridGap } from './types';\nimport { toGridColumn, toGridTemplate } from './utils';\n\nimport styles from './styles.module.css';\n\nconst gapClass: Record<TGridGap, string> = {\n 0: styles.gap0,\n 4: styles.gap4,\n 8: styles.gap8,\n 12: styles.gap12,\n 16: styles.gap16,\n 20: styles.gap20,\n 24: styles.gap24,\n 32: styles.gap32,\n 40: styles.gap40,\n 48: styles.gap48,\n 64: styles.gap64,\n};\n\nconst alignClass = {\n start: styles.start,\n center: styles.center,\n end: styles.end,\n stretch: null,\n} as const;\n\nconst GridRoot = supportRef(\n ({\n ref,\n children,\n cols,\n gap = 16,\n col,\n align = 'stretch',\n hidden = false,\n className,\n dataTestId,\n style,\n ...props\n }: IGridProps) => {\n const gridStyle: IGridStyle = {\n ...style,\n '--aui-grid-template': toGridTemplate(cols),\n '--aui-grid-col': toGridColumn(col),\n };\n\n return (\n <div\n {...props}\n ref={ref}\n hidden={hidden}\n className={cn(styles.root, gapClass[gap], alignClass[align], className)}\n style={gridStyle}\n data-test-id={dataTestId}\n >\n {children}\n </div>\n );\n }\n);\n\nGridRoot.displayName = 'Grid';\n\nexport const Grid = Object.assign(GridRoot, { Item: GridItem });\n"],"names":["toGridTemplate","cols","track","toGridColumn","col","GridItem","supportRef","ref","children","className","dataTestId","style","props","itemStyle","jsx","cn","styles","gapClass","alignClass","GridRoot","gap","align","hidden","gridStyle","Grid"],"mappings":";;;AAGO,MAAMA,IAAiB,CAACC,MACvB,OAAOA,KAAS,WACT,UAAUA,CAAI,sBAGlBA,EAAK,IAAI,CAAAC,MAAU,OAAOA,KAAU,WAAW,GAAGA,CAAK,OAAOA,CAAM,EAAE,KAAK,GAAG,GAI5EC,IAAe,CAACC,MACrBA,MAAQ,SACD,WAGP,OAAOA,KAAQ,WACR,QAAQA,CAAG,KAGf;;GCZEC,IAAWC,EAAW,CAAC,EAAE,KAAAC,GAAK,UAAAC,GAAU,KAAAJ,GAAK,WAAAK,GAAW,YAAAC,GAAY,OAAAC,GAAO,GAAGC,EAAA,MAA4B;AACnH,QAAMC,IAAwB;AAAA,IAC1B,GAAGF;AAAA,IACH,kBAAkBR,EAAaC,CAAG;AAAA,EAAA;AAGtC,SACI,gBAAAU,EAAC,OAAA,EAAK,GAAGF,GAAO,KAAAL,GAAU,WAAWQ,EAAGC,EAAO,MAAMP,CAAS,GAAG,OAAOI,GAAW,gBAAcH,GAC5F,UAAAF,GACL;AAER,CAAC;AAEDH,EAAS,cAAc;;;;;;;;;;;;;;;;;GCZjBY,IAAqC;AAAA,EACvC,GAAGD,EAAO;AAAA,EACV,GAAGA,EAAO;AAAA,EACV,GAAGA,EAAO;AAAA,EACV,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AAAA,EACX,IAAIA,EAAO;AACf,GAEME,IAAa;AAAA,EACf,OAAOF,EAAO;AAAA,EACd,QAAQA,EAAO;AAAA,EACf,KAAKA,EAAO;AAAA,EACZ,SAAS;AACb,GAEMG,IAAWb;AAAA,EACb,CAAC;AAAA,IACG,KAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAP;AAAA,IACA,KAAAmB,IAAM;AAAA,IACN,KAAAhB;AAAA,IACA,OAAAiB,IAAQ;AAAA,IACR,QAAAC,IAAS;AAAA,IACT,WAAAb;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,MACW;AACd,UAAMW,IAAwB;AAAA,MAC1B,GAAGZ;AAAA,MACH,uBAAuBX,EAAeC,CAAI;AAAA,MAC1C,kBAAkBE,EAAaC,CAAG;AAAA,IAAA;AAGtC,WACI,gBAAAU;AAAA,MAAC;AAAA,MAAA;AAAA,QACI,GAAGF;AAAA,QACJ,KAAAL;AAAA,QACA,QAAAe;AAAA,QACA,WAAWP,EAAGC,EAAO,MAAMC,EAASG,CAAG,GAAGF,EAAWG,CAAK,GAAGZ,CAAS;AAAA,QACtE,OAAOc;AAAA,QACP,gBAAcb;AAAA,QAEb,UAAAF;AAAA,MAAA;AAAA,IAAA;AAAA,EAGb;AACJ;AAEAW,EAAS,cAAc;AAEhB,MAAMK,IAAO,OAAO,OAAOL,GAAU,EAAE,MAAMd,GAAU;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode, Ref } from 'react';
|
|
2
|
+
import { IDataTestIdProps } from '../ds/common/index.js';
|
|
3
|
+
/** Gap step. Matches the spacing scale. */
|
|
4
|
+
export type TGridGap = 0 | 4 | 8 | 12 | 16 | 20 | 24 | 32 | 40 | 48 | 64;
|
|
5
|
+
/** One track: a number is `Nfr`, a string is used as written. */
|
|
6
|
+
export type TGridTrack = number | string;
|
|
7
|
+
/** How many columns an item spans. */
|
|
8
|
+
export type TGridCol = number | 'full';
|
|
9
|
+
/** Cross-axis alignment of items. */
|
|
10
|
+
export type TGridAlign = 'start' | 'center' | 'end' | 'stretch';
|
|
11
|
+
/** Own props for Grid. */
|
|
12
|
+
export interface IGridOwnProps extends IDataTestIdProps {
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** Equal columns, or an explicit track list. */
|
|
15
|
+
cols: number | TGridTrack[];
|
|
16
|
+
/** Gap between items. */
|
|
17
|
+
gap?: TGridGap;
|
|
18
|
+
/** Span when this grid sits inside another grid. */
|
|
19
|
+
col?: TGridCol;
|
|
20
|
+
/** Cross-axis alignment. */
|
|
21
|
+
align?: TGridAlign;
|
|
22
|
+
/** Removes the grid from the layout. */
|
|
23
|
+
hidden?: boolean;
|
|
24
|
+
/** Ref to the grid (React 19 prop). */
|
|
25
|
+
ref?: Ref<HTMLDivElement>;
|
|
26
|
+
}
|
|
27
|
+
export interface IGridProps extends Omit<ComponentPropsWithRef<'div'>, keyof IGridOwnProps | 'children'>, IGridOwnProps {
|
|
28
|
+
}
|
|
29
|
+
/** Own props for Grid.Item. */
|
|
30
|
+
export interface IGridItemOwnProps extends IDataTestIdProps {
|
|
31
|
+
children: ReactNode;
|
|
32
|
+
/** Column span. `full` crosses the whole grid. */
|
|
33
|
+
col?: TGridCol;
|
|
34
|
+
/** Ref to the item (React 19 prop). */
|
|
35
|
+
ref?: Ref<HTMLDivElement>;
|
|
36
|
+
}
|
|
37
|
+
export interface IGridItemProps extends Omit<ComponentPropsWithRef<'div'>, keyof IGridItemOwnProps | 'children'>, IGridItemOwnProps {
|
|
38
|
+
}
|
|
39
|
+
/** Inline template written by Grid. */
|
|
40
|
+
export interface IGridStyle extends CSSProperties {
|
|
41
|
+
'--aui-grid-template'?: string;
|
|
42
|
+
'--aui-grid-col'?: string;
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/grid/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,qBAAqB,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjG,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAEnD,2CAA2C;AAC3C,MAAM,MAAM,QAAQ,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEzE,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,CAAC;AAEzC,sCAAsC;AACtC,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvC,qCAAqC;AACrC,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,KAAK,GAAG,SAAS,CAAC;AAEhE,0BAA0B;AAC1B,MAAM,WAAW,aAAc,SAAQ,gBAAgB;IACnD,QAAQ,EAAE,SAAS,CAAC;IACpB,gDAAgD;IAChD,IAAI,EAAE,MAAM,GAAG,UAAU,EAAE,CAAC;IAC5B,yBAAyB;IACzB,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,oDAAoD;IACpD,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,4BAA4B;IAC5B,KAAK,CAAC,EAAE,UAAU,CAAC;IACnB,wCAAwC;IACxC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,uCAAuC;IACvC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,UACb,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,MAAM,aAAa,GAAG,UAAU,CAAC,EAAE,aAAa;CAAG;AAElG,+BAA+B;AAC/B,MAAM,WAAW,iBAAkB,SAAQ,gBAAgB;IACvD,QAAQ,EAAE,SAAS,CAAC;IACpB,kDAAkD;IAClD,GAAG,CAAC,EAAE,QAAQ,CAAC;IACf,uCAAuC;IACvC,GAAG,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CAC7B;AAED,MAAM,WAAW,cACb,SAAQ,IAAI,CAAC,qBAAqB,CAAC,KAAK,CAAC,EAAE,MAAM,iBAAiB,GAAG,UAAU,CAAC,EAAE,iBAAiB;CAAG;AAE1G,uCAAuC;AACvC,MAAM,WAAW,UAAW,SAAQ,aAAa;IAC7C,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC7B"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { TGridCol, TGridTrack } from './types';
|
|
2
|
+
/** Equal tracks, or an explicit list (`2` → two `1fr`, `2` inside a list → `2fr`). */
|
|
3
|
+
export declare const toGridTemplate: (cols: number | TGridTrack[]) => string;
|
|
4
|
+
/** Item span. `full` crosses every column. */
|
|
5
|
+
export declare const toGridColumn: (col?: TGridCol) => string;
|
|
6
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/grid/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC;AAEzD,sFAAsF;AACtF,eAAO,MAAM,cAAc,GAAI,MAAM,MAAM,GAAG,UAAU,EAAE,KAAG,MAM5D,CAAC;AAEF,8CAA8C;AAC9C,eAAO,MAAM,YAAY,GAAI,MAAM,QAAQ,KAAG,MAU7C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContext as
|
|
1
|
+
import { createContext as i, useContext as o } from "react";
|
|
2
2
|
const s = {
|
|
3
3
|
close: "Закрыть",
|
|
4
4
|
clear: "Очистить",
|
|
@@ -32,19 +32,22 @@ const s = {
|
|
|
32
32
|
moreActions: "Ещё действия",
|
|
33
33
|
save: "Сохранить",
|
|
34
34
|
arrangementList: "Элементы",
|
|
35
|
-
clearFilters: "Очистить"
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
clearFilters: "Очистить",
|
|
36
|
+
copy: "Копировать",
|
|
37
|
+
copied: "Скопировано: {value}",
|
|
38
|
+
copyFailed: "Не удалось скопировать"
|
|
39
|
+
}, t = i(null), e = () => {
|
|
40
|
+
const n = o(t);
|
|
38
41
|
if (!n)
|
|
39
42
|
throw new Error("AdminUiProvider is required. Wrap the app with <AdminUiProvider>.");
|
|
40
43
|
return n;
|
|
41
44
|
}, r = () => e().labels, c = () => e().locale, l = () => e().direction, u = () => e().linkComponent ?? "a";
|
|
42
45
|
export {
|
|
43
|
-
|
|
46
|
+
t as A,
|
|
44
47
|
l as a,
|
|
45
48
|
u as b,
|
|
46
49
|
c,
|
|
47
50
|
s as d,
|
|
48
51
|
r as u
|
|
49
52
|
};
|
|
50
|
-
//# sourceMappingURL=hooks-
|
|
53
|
+
//# sourceMappingURL=hooks-BlX5Y4Zt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks-BlX5Y4Zt.js","sources":["../src/provider/context.ts","../src/provider/hooks.ts"],"sourcesContent":["import { createContext } from 'react';\n\nimport { type IAuiContextValue, type IAuiLabels } from './types';\n\nexport const defaultLabels: IAuiLabels = {\n close: 'Закрыть',\n clear: 'Очистить',\n confirm: 'Подтвердить',\n cancel: 'Отмена',\n delete: 'Удалить',\n notDelete: 'Не удалять',\n loading: 'Загрузка',\n loadingSuggestions: 'Загрузка подсказок',\n noSuggestions: 'Ничего не найдено',\n suggestionsError: 'Не удалось загрузить подсказки',\n moreSelected: 'ещё выбрано',\n openCalendar: 'Открыть календарь',\n pageSize: 'Строк на странице',\n paginationPrev: 'Назад',\n paginationNext: 'Далее',\n paginationPage: 'Страница {page}',\n paginationRange: '{from}–{to} из {total}',\n collapseSidebar: 'Свернуть меню',\n expandSidebar: 'Развернуть меню',\n resizeSidebar: 'Изменить ширину меню',\n pinMenuItem: 'Закрепить',\n unpinMenuItem: 'Открепить',\n pinnedSection: 'Закреплённые',\n pinnedSectionHint: 'ПКМ по пункту меню, чтобы закрепить',\n searchMenu: 'Поиск по меню',\n searchMenuEmpty: 'Ничего не найдено',\n openInNewTab: 'Открыть в новой вкладке',\n sortAscending: 'По возрастанию',\n sortDescending: 'По убыванию',\n moreActions: 'Ещё действия',\n save: 'Сохранить',\n arrangementList: 'Элементы',\n clearFilters: 'Очистить',\n copy: 'Копировать',\n copied: 'Скопировано: {value}',\n copyFailed: 'Не удалось скопировать',\n};\n\nexport const AuiContext = createContext<IAuiContextValue | null>(null);\n","import { useContext } from 'react';\n\nimport { AuiContext } from './context';\nimport { type IAuiContextValue, type IAuiLabels, type TAuiLinkComponent, type TTextDirection } from './types';\n\nconst useAuiContext = (): IAuiContextValue => {\n const context = useContext(AuiContext);\n\n if (!context) {\n throw new Error('AdminUiProvider is required. Wrap the app with <AdminUiProvider>.');\n }\n\n return context;\n};\n\nexport const useAuiLabels = (): IAuiLabels => useAuiContext().labels;\n\nexport const useAuiLocale = (): string => useAuiContext().locale;\n\nexport const useAuiDirection = (): TTextDirection => useAuiContext().direction;\n\n/** Host router link from AdminUiProvider. Defaults to `a`. */\nexport const useAuiLink = (): TAuiLinkComponent => useAuiContext().linkComponent ?? 'a';\n"],"names":["defaultLabels","AuiContext","createContext","useAuiContext","context","useContext","useAuiLabels","useAuiLocale","useAuiDirection","useAuiLink"],"mappings":";AAIO,MAAMA,IAA4B;AAAA,EACrC,OAAO;AAAA,EACP,OAAO;AAAA,EACP,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,QAAQ;AAAA,EACR,WAAW;AAAA,EACX,SAAS;AAAA,EACT,oBAAoB;AAAA,EACpB,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,cAAc;AAAA,EACd,cAAc;AAAA,EACd,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,eAAe;AAAA,EACf,aAAa;AAAA,EACb,eAAe;AAAA,EACf,eAAe;AAAA,EACf,mBAAmB;AAAA,EACnB,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,aAAa;AAAA,EACb,MAAM;AAAA,EACN,iBAAiB;AAAA,EACjB,cAAc;AAAA,EACd,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,YAAY;AAChB,GAEaC,IAAaC,EAAuC,IAAI,GCtC/DC,IAAgB,MAAwB;AAC1C,QAAMC,IAAUC,EAAWJ,CAAU;AAErC,MAAI,CAACG;AACD,UAAM,IAAI,MAAM,mEAAmE;AAGvF,SAAOA;AACX,GAEaE,IAAe,MAAkBH,IAAgB,QAEjDI,IAAe,MAAcJ,IAAgB,QAE7CK,IAAkB,MAAsBL,IAAgB,WAGxDM,IAAa,MAAyBN,EAAA,EAAgB,iBAAiB;"}
|