@vkzstudio/muza-ui 1.0.44 → 1.0.45
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/components/DataTable/DataTable.d.ts +14 -5
- package/dist/components/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/DataTable/DataTable.js +39 -39
- package/dist/components/DataTable/DataTable.stories.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +38 -7
- package/dist/components/DropdownMenu/DropdownMenu.d.ts.map +1 -1
- package/dist/components/DropdownMenu/DropdownMenu.js +165 -163
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts +3 -17
- package/dist/components/DropdownMenu/DropdownMenu.stories.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.d.ts +30 -11
- package/dist/components/ExpandableTable/ExpandableTable.d.ts.map +1 -1
- package/dist/components/ExpandableTable/ExpandableTable.js +100 -111
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts +3 -1
- package/dist/components/ExpandableTable/ExpandableTable.stories.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.d.ts +6 -0
- package/dist/components/FileUpload/FileItem.d.ts.map +1 -1
- package/dist/components/FileUpload/FileItem.js +38 -41
- package/dist/components/FileUpload/FileUpload.d.ts +32 -0
- package/dist/components/FileUpload/FileUpload.d.ts.map +1 -1
- package/dist/components/FileUpload/FileUpload.js +87 -83
- package/dist/components/FileUpload/FileUpload.stories.d.ts +1 -0
- package/dist/components/FileUpload/FileUpload.stories.d.ts.map +1 -1
- package/dist/components/Flex/Flex.d.ts +1 -1
- package/dist/components/Icons/CustomBadges.d.ts +14 -0
- package/dist/components/Icons/CustomBadges.d.ts.map +1 -0
- package/dist/components/Icons/CustomBadges.js +334 -0
- package/dist/components/Icons/CustomIcons.d.ts +24 -0
- package/dist/components/Icons/CustomIcons.d.ts.map +1 -1
- package/dist/components/Icons/CustomIcons.js +88 -42
- package/dist/components/Icons/CustomLogos.d.ts +29 -0
- package/dist/components/Icons/CustomLogos.d.ts.map +1 -0
- package/dist/components/Icons/CustomLogos.js +593 -0
- package/dist/components/Icons/LogosAndBadges.stories.d.ts +7 -0
- package/dist/components/Icons/LogosAndBadges.stories.d.ts.map +1 -0
- package/dist/components/Icons/index.d.ts +2 -0
- package/dist/components/Icons/index.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts +24 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.d.ts.map +1 -1
- package/dist/components/LanguageSwitcher/LanguageSwitcher.js +71 -52
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts +2 -0
- package/dist/components/LanguageSwitcher/LanguageSwitcher.stories.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect/MultiSelect.js +18 -17
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts +266 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.examples.d.ts +39 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.examples.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.js +134 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.stories.d.ts +14 -0
- package/dist/components/ResponsiveLayoutTable/ResponsiveLayoutTable.stories.d.ts.map +1 -0
- package/dist/components/ResponsiveLayoutTable/index.d.ts +2 -0
- package/dist/components/ResponsiveLayoutTable/index.d.ts.map +1 -0
- package/dist/components/Select/Select.d.ts +20 -7
- package/dist/components/Select/Select.d.ts.map +1 -1
- package/dist/components/Select/Select.js +123 -92
- package/dist/components/Select/Select.stories.d.ts +1 -0
- package/dist/components/Select/Select.stories.d.ts.map +1 -1
- package/dist/components/Select/utils.d.ts +1 -0
- package/dist/components/Select/utils.d.ts.map +1 -1
- package/dist/components/Select/utils.js +5 -2
- package/dist/components/Toggle/Toggle.js +1 -1
- package/dist/components/ToggleCheckButton/ToggleCheckButton.d.ts +69 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.d.ts.map +1 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.js +64 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.stories.d.ts +8 -0
- package/dist/components/ToggleCheckButton/ToggleCheckButton.stories.d.ts.map +1 -0
- package/dist/components/ToggleCheckButton/index.d.ts +2 -0
- package/dist/components/ToggleCheckButton/index.d.ts.map +1 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.examples.d.ts +19 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.examples.d.ts.map +1 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.stories.d.ts +8 -0
- package/dist/components/WebCheckoutNav/WebCheckoutNav.stories.d.ts.map +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/hooks/use-is-breakpoint.d.ts +11 -0
- package/dist/hooks/use-is-breakpoint.d.ts.map +1 -1
- package/dist/hooks/use-is-breakpoint.js +24 -13
- package/dist/index.js +236 -215
- package/dist/muza-ui.css +1 -1
- package/dist/styles/token-colors.css +64 -3
- package/dist/styles/token-sizes.css +86 -54
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/cn.js +16 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LanguageSwitcher.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,WAAW,CAAA;AAWpD;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,cAAc;IAC7B,kEAAkE;IAClE,IAAI,EAAE,MAAM,CAAA;IACZ,4DAA4D;IAC5D,KAAK,EAAE,MAAM,CAAA;IACb,+DAA+D;IAC/D,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,SAAS,EAAE,cAAc,EAAE,CAAA;IAC3B,wFAAwF;IACxF,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC,0FAA0F;IAC1F,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,0FAA0F;IAC1F,KAAK,CAAC,EAAE,MAAM,CAAA;IACd;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB;;;;OAIG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;IACvC,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,QAAA,MAAM,gBAAgB,GAAI,yFAQvB,qBAAqB,4CAuEvB,CAAA;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,64 +1,83 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { DropdownMenu as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
1
|
+
import { jsxs as r, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as h, useEffect as v } from "react";
|
|
3
|
+
import { DropdownMenu as w, DropdownMenuTrigger as x, DropdownMenuContent as b, DropdownMenuRadioGroup as D, DropdownMenuRadioItem as y } from "../DropdownMenu/DropdownMenu.js";
|
|
4
|
+
import { Button as z } from "../Button/Button.js";
|
|
5
|
+
import { Typography as M } from "../Typography/Typography.js";
|
|
6
|
+
import { AltArrowDownOutline as N } from "@solar-icons/react-perf";
|
|
7
|
+
import { cn as A } from "../../utils/cn.js";
|
|
8
|
+
const G = ({
|
|
8
9
|
languages: i,
|
|
9
|
-
onValueChange:
|
|
10
|
-
defaultValue:
|
|
11
|
-
value:
|
|
10
|
+
onValueChange: s,
|
|
11
|
+
defaultValue: u,
|
|
12
|
+
value: n,
|
|
13
|
+
isIconButton: f,
|
|
14
|
+
buttonProps: g,
|
|
15
|
+
disabled: a
|
|
12
16
|
}) => {
|
|
13
|
-
var
|
|
14
|
-
const [
|
|
15
|
-
|
|
17
|
+
var p;
|
|
18
|
+
const [c, m] = h(
|
|
19
|
+
u || ((p = i[0]) == null ? void 0 : p.value) || ""
|
|
16
20
|
);
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}, [
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
21
|
+
v(() => {
|
|
22
|
+
n && m(n);
|
|
23
|
+
}, [n]);
|
|
24
|
+
const e = i.find(({ value: o }) => o === c);
|
|
25
|
+
return /* @__PURE__ */ r(w, { children: [
|
|
26
|
+
/* @__PURE__ */ t(x, { asChild: !0, children: f ? /* @__PURE__ */ t(
|
|
27
|
+
z,
|
|
28
|
+
{
|
|
29
|
+
variant: "tertiary",
|
|
30
|
+
size: "sm",
|
|
31
|
+
disabled: a,
|
|
32
|
+
...g,
|
|
33
|
+
icon: e == null ? void 0 : e.icon
|
|
34
|
+
}
|
|
35
|
+
) : /* @__PURE__ */ r(
|
|
36
|
+
"button",
|
|
37
|
+
{
|
|
38
|
+
disabled: a,
|
|
39
|
+
className: "group flex cursor-pointer items-center gap-sm hover:text-comp-language-switcher-hover focus-visible:text-comp-language-switcher-focused focus-visible:focus-default disabled:pointer-events-none disabled:text-comp-language-switcher-disabled",
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ t(
|
|
42
|
+
M,
|
|
43
|
+
{
|
|
44
|
+
component: "span",
|
|
45
|
+
size: "sm",
|
|
46
|
+
weight: "medium",
|
|
47
|
+
variant: "body",
|
|
48
|
+
fixY: !0,
|
|
49
|
+
children: e ? /* @__PURE__ */ r("span", { className: "flex items-center gap-sm [&>svg]:size-icon-small group-disabled:[&>svg]:opacity-50", children: [
|
|
50
|
+
e.icon && e.icon,
|
|
51
|
+
e.name
|
|
52
|
+
] }) : null
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ t(
|
|
56
|
+
N,
|
|
57
|
+
{
|
|
58
|
+
className: A(
|
|
59
|
+
"size-[12px] transition-transform duration-300 group-hover:text-comp-language-switcher-hover group-data-[state=open]:rotate-180"
|
|
60
|
+
)
|
|
61
|
+
}
|
|
43
62
|
)
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
) }),
|
|
66
|
+
/* @__PURE__ */ t(b, { className: "w-50", side: "bottom", align: "end", children: /* @__PURE__ */ t(
|
|
67
|
+
D,
|
|
49
68
|
{
|
|
50
|
-
value:
|
|
51
|
-
onValueChange: (
|
|
52
|
-
|
|
69
|
+
value: c,
|
|
70
|
+
onValueChange: (o) => {
|
|
71
|
+
m(o), s == null || s(o);
|
|
53
72
|
},
|
|
54
|
-
children: i.map(({ name:
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
] }) },
|
|
73
|
+
children: i.map(({ name: o, value: l, icon: d }) => /* @__PURE__ */ t(y, { value: l, children: /* @__PURE__ */ r("span", { className: "flex items-center gap-sm [&>svg]:size-icon-small", children: [
|
|
74
|
+
d && d,
|
|
75
|
+
o
|
|
76
|
+
] }) }, l))
|
|
58
77
|
}
|
|
59
78
|
) })
|
|
60
79
|
] });
|
|
61
80
|
};
|
|
62
81
|
export {
|
|
63
|
-
|
|
82
|
+
G as LanguageSwitcher
|
|
64
83
|
};
|
|
@@ -4,5 +4,7 @@ declare const meta: Meta<typeof LanguageSwitcher>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof LanguageSwitcher>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
+
export declare const IconButton: Story;
|
|
8
|
+
export declare const Disabled: Story;
|
|
7
9
|
export declare const Controlled: Story;
|
|
8
10
|
//# sourceMappingURL=LanguageSwitcher.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LanguageSwitcher.stories.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,
|
|
1
|
+
{"version":3,"file":"LanguageSwitcher.stories.d.ts","sourceRoot":"","sources":["../../../src/components/LanguageSwitcher/LanguageSwitcher.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAA;AAG3D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAErD,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,gBAAgB,CAwCvC,CAAA;AAED,eAAe,IAAI,CAAA;AACnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,gBAAgB,CAAC,CAAA;AAE9C,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAA;AAED,eAAO,MAAM,UAAU,EAAE,KAiBxB,CAAA;AAED,eAAO,MAAM,QAAQ,EAAE,KAgBtB,CAAA;AAED,eAAO,MAAM,UA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,2DAA2D;IAC3D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAAA;IAClC;;;;;;;;;;OAUG;IACH,OAAO,EAAE,kBAAkB,EAAE,CAAA;IAC7B,wEAAwE;IACxE,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,yGAAyG;IACzG,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACpC,kHAAkH;IAClH,UAAU,CAAC,EAAE,SAAS,CAAA;IACtB,uGAAuG;IACvG,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,wHAAwH;IACxH,gBAAgB,CAAC,EAAE,MAAM,CAAA;CAC1B;AAED,eAAO,MAAM,WAAW,6FAqOvB,CAAA"}
|
|
@@ -15,12 +15,12 @@ const ne = L(
|
|
|
15
15
|
label: x,
|
|
16
16
|
hint: b,
|
|
17
17
|
error: w,
|
|
18
|
-
options:
|
|
18
|
+
options: a,
|
|
19
19
|
onChange: s,
|
|
20
20
|
value: r,
|
|
21
|
-
disabled:
|
|
21
|
+
disabled: o,
|
|
22
22
|
prefix: d,
|
|
23
|
-
maxNumberOfVisibleTags:
|
|
23
|
+
maxNumberOfVisibleTags: c = 2,
|
|
24
24
|
size: O,
|
|
25
25
|
placeholder: S,
|
|
26
26
|
emptyMessage: W,
|
|
@@ -29,9 +29,9 @@ const ne = L(
|
|
|
29
29
|
labelExtra: A,
|
|
30
30
|
infoTooltip: C,
|
|
31
31
|
collisionPadding: F
|
|
32
|
-
} = D, y = S ?? g.select.placeholder, q = W ?? g.select.noOptions, N = U(), E = x ? `${N}-label` : void 0, P = b ? `${N}-hint` : void 0, M = k(() => new Map(
|
|
32
|
+
} = D, y = S ?? g.select.placeholder, q = W ?? g.select.noOptions, N = U(), E = x ? `${N}-label` : void 0, P = b ? `${N}-hint` : void 0, M = k(() => new Map(a.map((e) => [e.value, e.label])), [a]), V = k(() => {
|
|
33
33
|
const e = r && r.map((n) => M.get(n));
|
|
34
|
-
return e != null && e.length ? e.length <=
|
|
34
|
+
return e != null && e.length ? e.length <= c ? /* @__PURE__ */ t(
|
|
35
35
|
z,
|
|
36
36
|
{
|
|
37
37
|
gap: "xs",
|
|
@@ -39,7 +39,7 @@ const ne = L(
|
|
|
39
39
|
align: "start",
|
|
40
40
|
flex: 1,
|
|
41
41
|
className: "min-w-0",
|
|
42
|
-
children: e.map((n,
|
|
42
|
+
children: e.map((n, i) => /* @__PURE__ */ t(f, { variant: "info", className: "min-w-[50px] shrink-1", children: n }, i))
|
|
43
43
|
}
|
|
44
44
|
) : /* @__PURE__ */ t(
|
|
45
45
|
z,
|
|
@@ -50,17 +50,17 @@ const ne = L(
|
|
|
50
50
|
flex: 1,
|
|
51
51
|
className: "min-w-0",
|
|
52
52
|
children: [
|
|
53
|
-
...e.slice(0,
|
|
53
|
+
...e.slice(0, c).map((n, i) => /* @__PURE__ */ t(
|
|
54
54
|
f,
|
|
55
55
|
{
|
|
56
56
|
variant: "info",
|
|
57
57
|
className: "min-w-[50px] shrink-1 overflow-hidden",
|
|
58
58
|
children: /* @__PURE__ */ t("span", { className: "truncate", children: n })
|
|
59
59
|
},
|
|
60
|
-
|
|
60
|
+
i
|
|
61
61
|
)),
|
|
62
62
|
/* @__PURE__ */ p(f, { variant: "info", children: [
|
|
63
|
-
e.length -
|
|
63
|
+
e.length - c,
|
|
64
64
|
"+"
|
|
65
65
|
] }, "more")
|
|
66
66
|
]
|
|
@@ -75,7 +75,7 @@ const ne = L(
|
|
|
75
75
|
children: y
|
|
76
76
|
}
|
|
77
77
|
);
|
|
78
|
-
}, [r, y,
|
|
78
|
+
}, [r, y, c, M]), [R, $] = u.useState(!1), [T, _] = u.useState(0), m = u.useRef(!1), B = G(null), l = (typeof h == "function" ? null : h) ?? B;
|
|
79
79
|
return H(() => {
|
|
80
80
|
const e = () => {
|
|
81
81
|
l.current && _(l.current.offsetWidth);
|
|
@@ -104,14 +104,14 @@ const ne = L(
|
|
|
104
104
|
$(e);
|
|
105
105
|
},
|
|
106
106
|
children: [
|
|
107
|
-
/* @__PURE__ */ t(Y, { disabled:
|
|
107
|
+
/* @__PURE__ */ t(Y, { disabled: o, asChild: !0, children: /* @__PURE__ */ t(
|
|
108
108
|
"button",
|
|
109
109
|
{
|
|
110
110
|
ref: l,
|
|
111
111
|
type: "button",
|
|
112
112
|
role: "input",
|
|
113
113
|
tabIndex: 0,
|
|
114
|
-
disabled:
|
|
114
|
+
disabled: o,
|
|
115
115
|
"aria-required": v,
|
|
116
116
|
className: J({
|
|
117
117
|
size: O,
|
|
@@ -123,7 +123,7 @@ const ne = L(
|
|
|
123
123
|
d && /* @__PURE__ */ t(
|
|
124
124
|
"span",
|
|
125
125
|
{
|
|
126
|
-
className:
|
|
126
|
+
className: o ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def",
|
|
127
127
|
children: d
|
|
128
128
|
}
|
|
129
129
|
),
|
|
@@ -133,7 +133,8 @@ const ne = L(
|
|
|
133
133
|
{
|
|
134
134
|
className: re(
|
|
135
135
|
"shrink-0 transition-transform duration-200",
|
|
136
|
-
R ? "rotate-0" : "rotate-180"
|
|
136
|
+
R ? "rotate-0" : "rotate-180",
|
|
137
|
+
o ? "text-comp-select-icon-disabled" : "text-comp-select-icon-brand-def"
|
|
137
138
|
)
|
|
138
139
|
}
|
|
139
140
|
)
|
|
@@ -151,7 +152,7 @@ const ne = L(
|
|
|
151
152
|
m.current || e.preventDefault(), m.current = !1;
|
|
152
153
|
},
|
|
153
154
|
collisionPadding: F,
|
|
154
|
-
children:
|
|
155
|
+
children: a.length === 0 ? /* @__PURE__ */ t("div", { className: "px-lg py-md", role: "presentation", children: /* @__PURE__ */ t(
|
|
155
156
|
I,
|
|
156
157
|
{
|
|
157
158
|
component: "span",
|
|
@@ -160,7 +161,7 @@ const ne = L(
|
|
|
160
161
|
className: "text-comp-select-text-secondary",
|
|
161
162
|
children: q
|
|
162
163
|
}
|
|
163
|
-
) }) :
|
|
164
|
+
) }) : a.map((e) => /* @__PURE__ */ t(
|
|
164
165
|
ee,
|
|
165
166
|
{
|
|
166
167
|
checked: r == null ? void 0 : r.includes(e.value),
|
|
@@ -168,7 +169,7 @@ const ne = L(
|
|
|
168
169
|
icon: e.icon,
|
|
169
170
|
onCheckedChange: (n) => {
|
|
170
171
|
n ? s == null || s([...r || [], e.value]) : s == null || s(
|
|
171
|
-
(r || []).filter((
|
|
172
|
+
(r || []).filter((i) => i !== e.value)
|
|
172
173
|
), m.current = !0;
|
|
173
174
|
},
|
|
174
175
|
children: e.label
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
import { ResponsiveBreakpoint } from '../../hooks/use-is-breakpoint';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* Column definition for a single layout of the ResponsiveLayoutTable.
|
|
5
|
+
*
|
|
6
|
+
* Each column either renders a raw value from the row via `dataKey` (wrapped in
|
|
7
|
+
* a Typography component) or a fully custom cell via `render`. Use `skeleton` to
|
|
8
|
+
* describe the loading placeholder shape.
|
|
9
|
+
*
|
|
10
|
+
* @typeParam T - The type of data objects in each row
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* const columns: ResponsiveLayoutTableColumn<Transaction>[] = [
|
|
15
|
+
* { title: 'Customer', dataKey: 'customer', className: 'w-[240px]' },
|
|
16
|
+
* {
|
|
17
|
+
* title: 'Amount',
|
|
18
|
+
* render: (row) => <AmountCell row={row} />,
|
|
19
|
+
* skeleton: <Skeleton className="h-4 w-20" />,
|
|
20
|
+
* },
|
|
21
|
+
* ]
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export interface ResponsiveLayoutTableColumn<T extends {
|
|
25
|
+
id: string | number;
|
|
26
|
+
}> {
|
|
27
|
+
/** Header label. Accepts ReactNode for multi-line headers (e.g. tablet stacked text). */
|
|
28
|
+
title?: React.ReactNode;
|
|
29
|
+
/**
|
|
30
|
+
* Property key from the data object. Used as default cell content when `render`
|
|
31
|
+
* is omitted — the raw value is rendered inside a Typography component. Ignored
|
|
32
|
+
* when `render` is provided.
|
|
33
|
+
*/
|
|
34
|
+
dataKey?: keyof T;
|
|
35
|
+
/** Additional CSS class applied to both the header and body cells. */
|
|
36
|
+
className?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Truncates default cell text to the specified number of lines. Only applies
|
|
39
|
+
* when `render` is omitted. `true` or `1` clamps to one line, `2` clamps to two.
|
|
40
|
+
* @default false
|
|
41
|
+
*/
|
|
42
|
+
lineClamp?: boolean | 1 | 2;
|
|
43
|
+
/**
|
|
44
|
+
* Custom render function for cell content. Receives the full row data so that
|
|
45
|
+
* compressed layouts can combine data from multiple fields in a single cell.
|
|
46
|
+
* When omitted, the raw `dataKey` value is displayed inside a Typography component.
|
|
47
|
+
*
|
|
48
|
+
* @param rowData - The data object for the current row
|
|
49
|
+
* @param rowIndex - The zero-based index of the row in `data`
|
|
50
|
+
* @param disabled - Whether the table is in the disabled state (forwarded from
|
|
51
|
+
* `ResponsiveLayoutTableProps.disabled` so cells can mute their own styling)
|
|
52
|
+
*/
|
|
53
|
+
render?: (rowData: T, rowIndex: number, disabled?: boolean) => React.ReactNode;
|
|
54
|
+
/**
|
|
55
|
+
* Skeleton placeholder rendered in this cell when the row is in a loading state
|
|
56
|
+
* (see `ResponsiveLayoutTableProps.isRowLoading`). Compose `<Skeleton />` primitives
|
|
57
|
+
* to match the shape of the real cell. Omit to fall back to a generic full-width bar.
|
|
58
|
+
*/
|
|
59
|
+
skeleton?: React.ReactNode;
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Per-layout className overrides for the header and body rows.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```tsx
|
|
66
|
+
* classNames: { row: 'border-dashed', header: 'bg-surface-base-tertiary' }
|
|
67
|
+
* ```
|
|
68
|
+
*/
|
|
69
|
+
export interface ResponsiveLayoutTableLayoutClassNames {
|
|
70
|
+
/** Additional CSS class applied to each body row. */
|
|
71
|
+
row?: string;
|
|
72
|
+
/** Additional CSS class applied to the header row. */
|
|
73
|
+
header?: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* A single layout configuration for the ResponsiveLayoutTable. Each layout
|
|
77
|
+
* describes a distinct set of columns that becomes active when its `responsive`
|
|
78
|
+
* predicate matches. Layouts are evaluated in order and the first match wins;
|
|
79
|
+
* the last entry should omit `responsive` so it matches as a fallback.
|
|
80
|
+
*
|
|
81
|
+
* @typeParam T - The type of data objects in each row
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* ```tsx
|
|
85
|
+
* const layouts: ResponsiveLayoutTableLayout<Transaction>[] = [
|
|
86
|
+
* { responsive: 'lg', columns: desktopColumns },
|
|
87
|
+
* { responsive: 'md', columns: tabletColumns },
|
|
88
|
+
* { showHeader: false, columns: phoneColumns },
|
|
89
|
+
* ]
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
export interface ResponsiveLayoutTableLayout<T extends {
|
|
93
|
+
id: string | number;
|
|
94
|
+
}> {
|
|
95
|
+
/**
|
|
96
|
+
* Controls when this layout is active.
|
|
97
|
+
* - Named breakpoint (`'xs'..'3xl'`): active at and above that breakpoint, resolved internally via hooks.
|
|
98
|
+
* - Boolean: caller supplies the result directly (e.g. from `useMediaQuery('(min-width: 52rem)')`).
|
|
99
|
+
* `true` activates this layout, `false` skips it. Use this for arbitrary thresholds.
|
|
100
|
+
* - Omitted: treated as fallback (always matches).
|
|
101
|
+
*
|
|
102
|
+
* @see {@link ResponsiveBreakpoint}
|
|
103
|
+
*/
|
|
104
|
+
responsive?: ResponsiveBreakpoint | boolean;
|
|
105
|
+
/** Column definitions for this layout. */
|
|
106
|
+
columns: ResponsiveLayoutTableColumn<T>[];
|
|
107
|
+
/**
|
|
108
|
+
* Whether to show the header row.
|
|
109
|
+
* @default true
|
|
110
|
+
*/
|
|
111
|
+
showHeader?: boolean;
|
|
112
|
+
/** Per-layout className overrides for the header and body rows. */
|
|
113
|
+
classNames?: ResponsiveLayoutTableLayoutClassNames;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Top-level className overrides for the ResponsiveLayoutTable.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```tsx
|
|
120
|
+
* classNames={{
|
|
121
|
+
* root: 'rounded-xl',
|
|
122
|
+
* rowBackgroundInset:
|
|
123
|
+
* 'before:-left-comp-webcheckout-table-cells-p-hor before:-right-comp-webcheckout-table-cells-p-hor',
|
|
124
|
+
* }}
|
|
125
|
+
* ```
|
|
126
|
+
*/
|
|
127
|
+
export interface ResponsiveLayoutTableClassNames {
|
|
128
|
+
/** Outer wrapper `<div>`. */
|
|
129
|
+
root?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Classes applied to each row's `::before` pseudo-element when
|
|
132
|
+
* `overflowingRowBackground` is `true`. Default is zero bleed
|
|
133
|
+
* (the background sits flush inside the row). Consumer passes any
|
|
134
|
+
* Tailwind classes with the `before:` prefix and can use `first:` /
|
|
135
|
+
* `last:` variants to extend the tint past the first / last row so it
|
|
136
|
+
* reaches the surrounding card's top / bottom padding.
|
|
137
|
+
*
|
|
138
|
+
* @example
|
|
139
|
+
* ```tsx
|
|
140
|
+
* classNames={{
|
|
141
|
+
* rowBackgroundInset:
|
|
142
|
+
* 'before:-left-comp-webcheckout-table-cells-p-hor ' +
|
|
143
|
+
* 'before:-right-comp-webcheckout-table-cells-p-hor ' +
|
|
144
|
+
* 'first:before:-top-sm last:before:-bottom-sm',
|
|
145
|
+
* }}
|
|
146
|
+
* ```
|
|
147
|
+
*/
|
|
148
|
+
rowBackgroundInset?: string;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Props for the ResponsiveLayoutTable component.
|
|
152
|
+
* @typeParam T - The type of data objects in each row. Must include an
|
|
153
|
+
* `id: string | number` field so each row has a stable React key —
|
|
154
|
+
* keying by index corrupts focus / selection / animation state when
|
|
155
|
+
* rows reorder, filter, or paginate.
|
|
156
|
+
*/
|
|
157
|
+
export interface ResponsiveLayoutTableProps<T extends {
|
|
158
|
+
id: string | number;
|
|
159
|
+
}> extends Omit<React.HTMLAttributes<HTMLDivElement>, 'children' | 'className'> {
|
|
160
|
+
/** Array of data objects where each item represents one table row. */
|
|
161
|
+
data: T[];
|
|
162
|
+
/**
|
|
163
|
+
* Array of layout configurations ordered from largest to smallest breakpoint.
|
|
164
|
+
* The first layout whose `responsive` matches wins. The last layout should
|
|
165
|
+
* omit `responsive` (fallback for smallest viewports).
|
|
166
|
+
*
|
|
167
|
+
* Uses the same pattern as ExpandableTable's column `responsive` prop:
|
|
168
|
+
* - Named breakpoint (`'xs'..'3xl'`): resolved internally via hooks.
|
|
169
|
+
* - Boolean: consumer controls it with their own `useMediaQuery()`.
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```tsx
|
|
173
|
+
* layouts={[
|
|
174
|
+
* { responsive: 'lg', columns: desktopColumns },
|
|
175
|
+
* { responsive: 'md', columns: tabletColumns },
|
|
176
|
+
* { showHeader: false, columns: phoneColumns },
|
|
177
|
+
* ]}
|
|
178
|
+
* ```
|
|
179
|
+
*/
|
|
180
|
+
layouts: ResponsiveLayoutTableLayout<T>[];
|
|
181
|
+
/**
|
|
182
|
+
* Fires when a row is clicked. When provided and not `disabled`, rows become
|
|
183
|
+
* interactive: pointer cursor, keyboard-activatable, and a hover border.
|
|
184
|
+
*/
|
|
185
|
+
onRowClick?: (rowData: T, rowIndex: number) => void;
|
|
186
|
+
/** Prevents interaction and applies muted text colors. @default false */
|
|
187
|
+
disabled?: boolean;
|
|
188
|
+
/**
|
|
189
|
+
* Predicate that marks a row as "new", applying the
|
|
190
|
+
* `bg-comp-responsive-layout-table-bg-success` tint. On interactive rows,
|
|
191
|
+
* hover and focus-visible backgrounds visually override the new-state tint.
|
|
192
|
+
*/
|
|
193
|
+
isRowNew?: (rowData: T, rowIndex: number) => boolean;
|
|
194
|
+
/**
|
|
195
|
+
* Predicate that marks a row as loading. Each cell renders its column
|
|
196
|
+
* `skeleton` (or a default bar) instead of the normal content, and the row
|
|
197
|
+
* becomes non-interactive regardless of `onRowClick`. The `isRowNew` tint is
|
|
198
|
+
* also suppressed for loading rows.
|
|
199
|
+
*
|
|
200
|
+
* Use for initial load (an array of empty objects with the predicate always
|
|
201
|
+
* returning true) and for pagination (append placeholder rows after real
|
|
202
|
+
* data and detect them in the predicate).
|
|
203
|
+
*/
|
|
204
|
+
isRowLoading?: (rowData: T, rowIndex: number) => boolean;
|
|
205
|
+
/**
|
|
206
|
+
* When `true`, row backgrounds (new/hover/focus) render via a `::before`
|
|
207
|
+
* pseudo-element sized to the row (zero bleed by default). The outer
|
|
208
|
+
* wrapper switches to `overflow: visible` in this mode — horizontal
|
|
209
|
+
* scrolling is disabled, so only use when your active layout fits the
|
|
210
|
+
* viewport (typically the phone layout).
|
|
211
|
+
*
|
|
212
|
+
* Pair with `classNames.rowBackgroundInset` to extend the tint past any
|
|
213
|
+
* edge — typically to bleed through the surrounding card's horizontal
|
|
214
|
+
* padding, and (via `first:` / `last:`) its top and bottom padding.
|
|
215
|
+
* @default false
|
|
216
|
+
*/
|
|
217
|
+
overflowingRowBackground?: boolean;
|
|
218
|
+
/** className overrides for sub-elements. */
|
|
219
|
+
classNames?: ResponsiveLayoutTableClassNames;
|
|
220
|
+
/**
|
|
221
|
+
* Controls how column widths are calculated, mirroring the CSS
|
|
222
|
+
* `table-layout` property.
|
|
223
|
+
*
|
|
224
|
+
* - `'auto'` (default): Columns size based on their content. This is more
|
|
225
|
+
* flexible. In case of overflow the content is scrollable.
|
|
226
|
+
* - `'fixed'`: Columns use fixed widths (from column definitions or equal
|
|
227
|
+
* distribution). This is more predictable and performs better for large
|
|
228
|
+
* datasets, but content may truncate.
|
|
229
|
+
*
|
|
230
|
+
* @default 'auto'
|
|
231
|
+
*/
|
|
232
|
+
tableLayout?: 'auto' | 'fixed';
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* A responsive table that switches between completely different column layouts
|
|
236
|
+
* at configurable breakpoints. Each layout defines its own set of columns with
|
|
237
|
+
* independent headers and render functions, enabling compressed tablet views
|
|
238
|
+
* (stacked cells) and phone card layouts (single full-width column) — not just
|
|
239
|
+
* hidden columns.
|
|
240
|
+
*
|
|
241
|
+
* Supports named Tailwind breakpoints and arbitrary boolean values for custom
|
|
242
|
+
* thresholds. Rows become interactive when `onRowClick` is provided (pointer
|
|
243
|
+
* cursor, keyboard-activatable, hover border). Loading rows are driven by the
|
|
244
|
+
* `isRowLoading` predicate and render per-column `skeleton` placeholders.
|
|
245
|
+
*
|
|
246
|
+
* @typeParam T - The type of data objects in each row. Must include an
|
|
247
|
+
* `id: string | number` field so rows receive a stable React key.
|
|
248
|
+
*
|
|
249
|
+
* @example
|
|
250
|
+
* ```tsx
|
|
251
|
+
* <ResponsiveLayoutTable
|
|
252
|
+
* data={transactions}
|
|
253
|
+
* layouts={[
|
|
254
|
+
* { responsive: 'lg', columns: desktopColumns },
|
|
255
|
+
* { responsive: 'md', columns: tabletColumns },
|
|
256
|
+
* { showHeader: false, columns: phoneColumns },
|
|
257
|
+
* ]}
|
|
258
|
+
* onRowClick={(row) => navigate(`/transactions/${row.id}`)}
|
|
259
|
+
* />
|
|
260
|
+
* ```
|
|
261
|
+
*/
|
|
262
|
+
declare const ResponsiveLayoutTable: <T extends {
|
|
263
|
+
id: string | number;
|
|
264
|
+
}>({ data, layouts, onRowClick, disabled, isRowNew, isRowLoading, overflowingRowBackground, classNames, tableLayout, ...props }: ResponsiveLayoutTableProps<T>) => import("react/jsx-runtime").JSX.Element;
|
|
265
|
+
export { ResponsiveLayoutTable };
|
|
266
|
+
//# sourceMappingURL=ResponsiveLayoutTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|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;;;;;;GA2BG;AACH,QAAA,MAAM,qBAAqB,GAAI,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,EAAE,8HAW/D,0BAA0B,CAAC,CAAC,CAAC,4CA2J/B,CAAA;AAED,OAAO,EAAE,qBAAqB,EAAE,CAAA"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ResponsiveLayoutTableColumn, ResponsiveLayoutTableLayout } from './ResponsiveLayoutTable';
|
|
2
|
+
export interface Transaction {
|
|
3
|
+
id: string;
|
|
4
|
+
date: string;
|
|
5
|
+
time: string;
|
|
6
|
+
customer: string;
|
|
7
|
+
transactionCode: string;
|
|
8
|
+
status: 'warning' | 'success' | 'info' | 'error';
|
|
9
|
+
statusLabel: string;
|
|
10
|
+
amount: number;
|
|
11
|
+
originalAmount?: number;
|
|
12
|
+
isNew?: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare const formatKc: (value: number) => string;
|
|
15
|
+
export declare const transactions: Transaction[];
|
|
16
|
+
interface CellProps {
|
|
17
|
+
row: Transaction;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const DateTimeCell: ({ row, disabled }: CellProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const DateTimeCellSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
export declare const CustomerCell: ({ row, disabled }: CellProps) => import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
export declare const CustomerCellSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare const TransactionCodeCell: ({ row, disabled }: CellProps) => import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export declare const TransactionCodeCellSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
26
|
+
export declare const StatusCell: ({ row, disabled }: CellProps) => import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare const StatusCellSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
28
|
+
export declare const AmountCell: ({ row, disabled, hideOriginalAmount, }: CellProps & {
|
|
29
|
+
hideOriginalAmount?: boolean;
|
|
30
|
+
}) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare const AmountCellSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
32
|
+
export declare const ActionArrowCell: ({ row, disabled }: CellProps) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export declare const ActionArrowCellSkeleton: () => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
export declare const desktopColumns: ResponsiveLayoutTableColumn<Transaction>[];
|
|
35
|
+
export declare const tabletColumns: ResponsiveLayoutTableColumn<Transaction>[];
|
|
36
|
+
export declare const phoneColumns: ResponsiveLayoutTableColumn<Transaction>[];
|
|
37
|
+
export declare const layouts: ResponsiveLayoutTableLayout<Transaction>[];
|
|
38
|
+
export {};
|
|
39
|
+
//# sourceMappingURL=ResponsiveLayoutTable.examples.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ResponsiveLayoutTable.examples.d.ts","sourceRoot":"","sources":["../../../src/components/ResponsiveLayoutTable/ResponsiveLayoutTable.examples.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EACV,2BAA2B,EAC3B,2BAA2B,EAC5B,MAAM,yBAAyB,CAAA;AAIhC,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,EAAE,MAAM,CAAA;IACvB,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAA;IAChD,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAID,eAAO,MAAM,QAAQ,GAAI,OAAO,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