@temp-spotwork/ui 1.6.0 → 1.6.8
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/atoms/avatar/Avatar.stories.d.ts +2 -0
- package/dist/components/atoms/avatar/Avatar.stories.js +25 -8
- package/dist/components/atoms/avatar/avatar.js +40 -37
- package/dist/components/atoms/badge/badge.stories.js +1 -1
- package/dist/components/atoms/card-content/label-value-pair/label-value-pair.stories.js +1 -1
- package/dist/components/atoms/form/chips/chips.stories.js +1 -1
- package/dist/components/atoms/form/dateselect/helpers.d.ts +1 -1
- package/dist/components/atoms/form/dateselect/helpers.js +39 -39
- package/dist/components/atoms/form/dropdown-search/dropdown-search.stories.js +1 -1
- package/dist/components/atoms/form/stepper/Stepper.stories.js +1 -1
- package/dist/components/atoms/form/time-picker/time-picker.stories.js +1 -1
- package/dist/components/atoms/icons/icons.stories.js +1 -1
- package/dist/components/atoms/message/message.stories.js +1 -1
- package/dist/components/atoms/navigation/navigation-item/navigation-item.js +14 -14
- package/dist/components/atoms/tab/Tab.stories.js +1 -1
- package/dist/components/molecules/button/Button.stories.js +1 -1
- package/dist/components/molecules/collapsible-card/Collapsiblecard.stories.js +1 -1
- package/dist/components/molecules/conversation/message-editor/MessageEditor.stories.js +1 -1
- package/dist/components/molecules/conversation/message-group-composer/MessageGroupComposer.stories.js +1 -1
- package/dist/components/molecules/datatables/cell/Cell.stories.js +1 -1
- package/dist/components/molecules/datatables/row/Row.stories.js +1 -1
- package/dist/components/molecules/datatables/row/row.js +22 -10
- package/dist/components/molecules/datatables/row-header/RowHeader.stories.js +1 -1
- package/dist/components/molecules/dataviz/donut-chart/DonutChart.stories.js +1 -1
- package/dist/components/molecules/dataviz/dot-matrix/DotMatrix.stories.js +1 -1
- package/dist/components/molecules/dataviz/single-stacked-bar/SingleStackedBar.stories.js +1 -1
- package/dist/components/molecules/dialog/dialog.stories.js +1 -1
- package/dist/components/molecules/filter/context-search/context-search.js +24 -23
- package/dist/components/molecules/filter/date-selector/DateSelector.stories.js +1 -1
- package/dist/components/molecules/filter/range-selector/RangeSelector.stories.js +1 -1
- package/dist/components/molecules/form/radiogroup/radiogroup.stories.js +1 -1
- package/dist/components/molecules/link/Link.stories.js +1 -1
- package/dist/components/molecules/navigation/header/Header.stories.js +1 -1
- package/dist/components/molecules/navigation/header/header.d.ts +1 -1
- package/dist/components/molecules/navigation/header/header.js +16 -19
- package/dist/components/molecules/navigation/sidebar/Sidebar.stories.d.ts +2 -0
- package/dist/components/molecules/navigation/sidebar/Sidebar.stories.js +103 -67
- package/dist/components/molecules/navigation/sidebar/sidebar.js +45 -24
- package/dist/components/molecules/notifications/content/Content.stories.js +1 -1
- package/dist/components/molecules/tab-group/tabgroup.stories.js +1 -1
- package/dist/{index-CktvVE7I.js → index-DM2Ov9_y.js} +9 -0
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { f as
|
|
2
|
-
import { Avatar as
|
|
3
|
-
const
|
|
1
|
+
import { f as a } from "../../../index-DM2Ov9_y.js";
|
|
2
|
+
import { Avatar as r } from "./avatar.js";
|
|
3
|
+
const o = {
|
|
4
4
|
title: "@spotwork-ui/Avatar",
|
|
5
|
-
component:
|
|
5
|
+
component: r,
|
|
6
6
|
parameters: {
|
|
7
7
|
layout: "centered"
|
|
8
8
|
},
|
|
@@ -10,13 +10,30 @@ const c = {
|
|
|
10
10
|
argTypes: {
|
|
11
11
|
backgroundColor: { control: "color" }
|
|
12
12
|
},
|
|
13
|
-
args: { onClick:
|
|
14
|
-
},
|
|
13
|
+
args: { onClick: a() }
|
|
14
|
+
}, i = {
|
|
15
15
|
args: {
|
|
16
|
+
id: "circular-avatar",
|
|
16
17
|
variant: "circular"
|
|
17
18
|
}
|
|
19
|
+
}, c = {
|
|
20
|
+
args: {
|
|
21
|
+
id: "full-name-avatar",
|
|
22
|
+
variant: "circular",
|
|
23
|
+
textView: "Steve Bob"
|
|
24
|
+
}
|
|
25
|
+
}, l = {
|
|
26
|
+
args: {
|
|
27
|
+
id: "large-full-name-avatar",
|
|
28
|
+
variant: "circular",
|
|
29
|
+
textView: "Steve Bob",
|
|
30
|
+
size: 9,
|
|
31
|
+
isActive: !0
|
|
32
|
+
}
|
|
18
33
|
};
|
|
19
34
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
35
|
+
i as Circular,
|
|
36
|
+
l as LargeWithFullName,
|
|
37
|
+
c as WithFullName,
|
|
38
|
+
o as default
|
|
22
39
|
};
|
|
@@ -1,76 +1,79 @@
|
|
|
1
|
-
import { jsx as r, Fragment as
|
|
2
|
-
import { Typography as
|
|
3
|
-
import { classesMap as
|
|
4
|
-
import
|
|
5
|
-
import { t as
|
|
6
|
-
function
|
|
7
|
-
id:
|
|
8
|
-
hasBorder:
|
|
9
|
-
variant:
|
|
10
|
-
image:
|
|
11
|
-
textView:
|
|
12
|
-
isActive:
|
|
1
|
+
import { jsx as r, Fragment as E, jsxs as I } from "react/jsx-runtime";
|
|
2
|
+
import { Typography as y } from "../../styles/typography/typography.js";
|
|
3
|
+
import { classesMap as D } from "./styles.js";
|
|
4
|
+
import F from "./statusIndicatorIcon.js";
|
|
5
|
+
import { t as l } from "../../../bundle-mjs-CAy1p0fn.js";
|
|
6
|
+
function w({
|
|
7
|
+
id: g,
|
|
8
|
+
hasBorder: i = !1,
|
|
9
|
+
variant: d,
|
|
10
|
+
image: m,
|
|
11
|
+
textView: u = "NN",
|
|
12
|
+
isActive: n,
|
|
13
13
|
isOnline: v = !1,
|
|
14
|
-
onClick:
|
|
14
|
+
onClick: s,
|
|
15
15
|
size: t
|
|
16
16
|
}) {
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
const S = (() => {
|
|
18
|
+
const o = u.trim().split(/\s+/);
|
|
19
|
+
return o.length > 1 ? (o[0][0] + o[o.length - 1][0]).toUpperCase() : u;
|
|
20
|
+
})(), e = d === "circular", a = e ? 5 : 5.5, c = t ? t / a : 1, p = D[d](i), h = !e && i && n ? "border-bcolor-active" : "border-bcolor-divider", A = t && a > t ? 1 : 7, C = () => {
|
|
21
|
+
s && s(g);
|
|
22
|
+
}, U = m ? /* @__PURE__ */ r(E, { children: /* @__PURE__ */ r(
|
|
20
23
|
"img",
|
|
21
24
|
{
|
|
22
|
-
className:
|
|
23
|
-
src:
|
|
25
|
+
className: l(p.image, h),
|
|
26
|
+
src: m,
|
|
24
27
|
alt: "avatar-image"
|
|
25
28
|
}
|
|
26
|
-
) }) : /* @__PURE__ */ r(
|
|
29
|
+
) }) : /* @__PURE__ */ r(E, { children: /* @__PURE__ */ r(
|
|
27
30
|
"div",
|
|
28
31
|
{
|
|
29
32
|
"data-testid": "avatar-text-box",
|
|
30
|
-
className:
|
|
33
|
+
className: l(p.textBox, h),
|
|
31
34
|
children: /* @__PURE__ */ r(
|
|
32
|
-
|
|
35
|
+
y,
|
|
33
36
|
{
|
|
34
|
-
swStyle:
|
|
35
|
-
children:
|
|
37
|
+
swStyle: A,
|
|
38
|
+
children: S,
|
|
36
39
|
color: "visualPlaceholderDefault"
|
|
37
40
|
}
|
|
38
41
|
)
|
|
39
42
|
}
|
|
40
|
-
) }), f = 0.25,
|
|
43
|
+
) }), f = 0.25, x = e && v && !n && /* @__PURE__ */ r(
|
|
41
44
|
"div",
|
|
42
45
|
{
|
|
43
46
|
className: "absolute",
|
|
44
47
|
style: {
|
|
45
|
-
bottom: `${
|
|
46
|
-
right: `${
|
|
48
|
+
bottom: `${c * f}rem`,
|
|
49
|
+
right: `${c * f}rem`
|
|
47
50
|
},
|
|
48
51
|
"data-testid": "avatar-online-status",
|
|
49
|
-
children: /* @__PURE__ */ r(
|
|
52
|
+
children: /* @__PURE__ */ r(F, { scalingFactor: c })
|
|
50
53
|
}
|
|
51
|
-
),
|
|
52
|
-
return /* @__PURE__ */
|
|
53
|
-
|
|
54
|
+
), b = s ? "button" : "div", _ = () => e && n ? "border-bcolor-active" : "border-[transparent]";
|
|
55
|
+
return /* @__PURE__ */ I(
|
|
56
|
+
b,
|
|
54
57
|
{
|
|
55
58
|
"data-testid": "avatar-container",
|
|
56
|
-
onClick:
|
|
59
|
+
onClick: C,
|
|
57
60
|
style: {
|
|
58
61
|
width: `${t || a}rem`,
|
|
59
62
|
height: `${t || a}rem`
|
|
60
63
|
},
|
|
61
|
-
className:
|
|
64
|
+
className: l(
|
|
62
65
|
"flex items-center justify-center flex-shrink-0 flex-grow-0 relative",
|
|
63
|
-
|
|
66
|
+
_(),
|
|
64
67
|
"aspect-square"
|
|
65
68
|
),
|
|
66
|
-
...
|
|
69
|
+
...b === "button" ? { type: "button" } : {},
|
|
67
70
|
children: [
|
|
68
|
-
|
|
69
|
-
|
|
71
|
+
U,
|
|
72
|
+
x
|
|
70
73
|
]
|
|
71
74
|
}
|
|
72
75
|
);
|
|
73
76
|
}
|
|
74
77
|
export {
|
|
75
|
-
|
|
78
|
+
w as Avatar
|
|
76
79
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as o } from "../../../../index-
|
|
1
|
+
import { f as o } from "../../../../index-DM2Ov9_y.js";
|
|
2
2
|
import { LabelValuePair as r } from "./label-value-pair.js";
|
|
3
3
|
import "../../../styles/colors/colors.js";
|
|
4
4
|
import { glyphColorsKeys as a } from "../../../styles/colors/colormap.js";
|
|
@@ -32,5 +32,5 @@ export declare const eachYearOfInterval: (interval: {
|
|
|
32
32
|
end: Date;
|
|
33
33
|
}) => Date[];
|
|
34
34
|
export declare const isSameMonth: (shortDate: any, currentDay: any) => boolean;
|
|
35
|
-
export declare const isSameWeek: (dateLeft:
|
|
35
|
+
export declare const isSameWeek: (dateLeft: string | Date, dateRight: string | Date, weekStartsOn?: number) => boolean;
|
|
36
36
|
export declare const endOfMonth: (date: Date) => Date;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const m = (n) => {
|
|
2
2
|
const t = {
|
|
3
3
|
Jan: "January",
|
|
4
4
|
Feb: "February",
|
|
@@ -12,11 +12,11 @@ const g = (r) => {
|
|
|
12
12
|
Oct: "October",
|
|
13
13
|
Nov: "November",
|
|
14
14
|
Dec: "December"
|
|
15
|
-
}, [e,
|
|
16
|
-
if (!o || !
|
|
15
|
+
}, [e, r] = n.split("-"), o = t[e];
|
|
16
|
+
if (!o || !r)
|
|
17
17
|
throw new Error("Invalid date format");
|
|
18
|
-
return `${o} ${
|
|
19
|
-
},
|
|
18
|
+
return `${o} ${r}`;
|
|
19
|
+
}, p = (n) => {
|
|
20
20
|
const t = {
|
|
21
21
|
Jan: 0,
|
|
22
22
|
Feb: 1,
|
|
@@ -30,54 +30,54 @@ const g = (r) => {
|
|
|
30
30
|
Oct: 9,
|
|
31
31
|
Nov: 10,
|
|
32
32
|
Dec: 11
|
|
33
|
-
}, [e,
|
|
33
|
+
}, [e, r] = n.split("-"), o = parseInt(r, 10), a = t[e];
|
|
34
34
|
return isNaN(o) || a === void 0 ? /* @__PURE__ */ new Date(NaN) : new Date(o, a);
|
|
35
|
-
},
|
|
36
|
-
const t = { month: "short", year: "numeric" }, [e,
|
|
37
|
-
return `${e}-${
|
|
38
|
-
},
|
|
39
|
-
const { start: t, end: e } =
|
|
35
|
+
}, D = (n) => {
|
|
36
|
+
const t = { month: "short", year: "numeric" }, [e, r] = n.toLocaleDateString("en-US", t).split(" ");
|
|
37
|
+
return `${e}-${r}`;
|
|
38
|
+
}, y = (n) => {
|
|
39
|
+
const { start: t, end: e } = n;
|
|
40
40
|
if (t > e)
|
|
41
41
|
throw new Error("The start of the interval cannot be after the end");
|
|
42
|
-
const
|
|
43
|
-
for (let c =
|
|
44
|
-
const f = c ===
|
|
42
|
+
const r = t.getFullYear(), o = t.getMonth(), a = e.getFullYear(), s = e.getMonth(), h = [];
|
|
43
|
+
for (let c = r; c <= a; c++) {
|
|
44
|
+
const f = c === r ? o : 0, i = c === a ? s : 11;
|
|
45
45
|
for (let u = f; u <= i; u++) {
|
|
46
|
-
const M = String(u + 1).padStart(2, "0"),
|
|
47
|
-
h.push(
|
|
46
|
+
const M = String(u + 1).padStart(2, "0"), g = `${c}-${M}-01`;
|
|
47
|
+
h.push(g);
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
return h;
|
|
51
|
-
},
|
|
52
|
-
const { start: t, end: e } =
|
|
51
|
+
}, d = (n) => {
|
|
52
|
+
const { start: t, end: e } = n;
|
|
53
53
|
if (!(t instanceof Date) || !(e instanceof Date))
|
|
54
54
|
throw new Error("Invalid start or end date");
|
|
55
55
|
if (t > e)
|
|
56
56
|
throw new Error("The start date must be before or equal to the end date");
|
|
57
|
-
const
|
|
57
|
+
const r = [], o = t.getFullYear(), a = e.getFullYear();
|
|
58
58
|
for (let s = o; s <= a; s++)
|
|
59
|
-
|
|
60
|
-
return
|
|
61
|
-
},
|
|
62
|
-
const [e,
|
|
59
|
+
r.push(new Date(s, 0, 1));
|
|
60
|
+
return r;
|
|
61
|
+
}, S = (n, t) => {
|
|
62
|
+
const [e, r] = m(n).split(" "), o = parseInt(r, 10), a = (/* @__PURE__ */ new Date(`${e} 1, ${o}`)).getMonth(), s = t.getMonth(), h = t.getFullYear();
|
|
63
63
|
return s === a && h === o;
|
|
64
|
-
}, l = (
|
|
65
|
-
const e = new Date(
|
|
66
|
-
return e.setDate(e.getDate() -
|
|
67
|
-
},
|
|
68
|
-
const n = l(r, e),
|
|
69
|
-
return
|
|
70
|
-
},
|
|
71
|
-
const t = new Date(
|
|
64
|
+
}, l = (n, t) => {
|
|
65
|
+
const e = new Date(n), r = (e.getDay() - t + 7) % 7;
|
|
66
|
+
return e.setDate(e.getDate() - r), e.setHours(0, 0, 0, 0), e;
|
|
67
|
+
}, w = (n, t, e = 0) => {
|
|
68
|
+
const r = typeof n == "string" ? new Date(n) : n, o = typeof t == "string" ? new Date(t) : t, a = l(r, e), s = l(o, e);
|
|
69
|
+
return a.getTime() === s.getTime();
|
|
70
|
+
}, Y = (n) => {
|
|
71
|
+
const t = new Date(n);
|
|
72
72
|
return t.setMonth(t.getMonth() + 1), t.setDate(0), t.setHours(23, 59, 59, 999), t;
|
|
73
73
|
};
|
|
74
74
|
export {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
75
|
+
y as eachMonthOfInterval,
|
|
76
|
+
d as eachYearOfInterval,
|
|
77
|
+
Y as endOfMonth,
|
|
78
|
+
D as formatDateToMonthYear,
|
|
79
|
+
m as formatShortMonthYear,
|
|
80
|
+
S as isSameMonth,
|
|
81
|
+
w as isSameWeek,
|
|
82
|
+
p as parseShortMonthYear
|
|
83
83
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
2
|
-
import { f as b } from "../../../../index-
|
|
2
|
+
import { f as b } from "../../../../index-DM2Ov9_y.js";
|
|
3
3
|
import { useState as u } from "react";
|
|
4
4
|
import { DropdownSearch as c } from "./dropdown-search.js";
|
|
5
5
|
import { Typography as p } from "../../../styles/typography/typography.js";
|
|
@@ -2,7 +2,7 @@ import { jsx as o, jsxs as l } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState as d } from "react";
|
|
3
3
|
import { TimePicker as m } from "./time-picker.js";
|
|
4
4
|
import { m as t } from "../../../../index-CYyrKZeH.js";
|
|
5
|
-
import { w as i, e as s, u as c } from "../../../../index-
|
|
5
|
+
import { w as i, e as s, u as c } from "../../../../index-DM2Ov9_y.js";
|
|
6
6
|
const n = (e) => {
|
|
7
7
|
const [r, a] = d(e.value || /* @__PURE__ */ new Date());
|
|
8
8
|
return /* @__PURE__ */ l("div", { className: "space-y-4", children: [
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
|
2
|
-
import { f as o } from "../../../index-
|
|
2
|
+
import { f as o } from "../../../index-DM2Ov9_y.js";
|
|
3
3
|
import { Icons as l } from "./icons.js";
|
|
4
4
|
import "./iconsSVGs/Large/Profile.js";
|
|
5
5
|
import "./iconsSVGs/Small/Profile.js";
|
|
@@ -6,10 +6,10 @@ import { Icons as n } from "../../icons/icons.js";
|
|
|
6
6
|
import "../../icons/iconsSVGs/Large/Profile.js";
|
|
7
7
|
import "../../icons/iconsSVGs/Small/Profile.js";
|
|
8
8
|
import { t as u } from "../../../../bundle-mjs-CAy1p0fn.js";
|
|
9
|
-
import { LoadingSpinner as
|
|
10
|
-
function
|
|
11
|
-
label:
|
|
12
|
-
icon:
|
|
9
|
+
import { LoadingSpinner as g } from "../../../molecules/button/loading-spinner.js";
|
|
10
|
+
function $({
|
|
11
|
+
label: r,
|
|
12
|
+
icon: t,
|
|
13
13
|
isActive: o = !1,
|
|
14
14
|
isNavigation: s = !1,
|
|
15
15
|
isLoading: m = !1,
|
|
@@ -23,24 +23,24 @@ function j({
|
|
|
23
23
|
d,
|
|
24
24
|
"flex items-center min-w-[14rem]",
|
|
25
25
|
// horizontal layout
|
|
26
|
-
o ? "bg-surface-active" : "cursor-pointer"
|
|
26
|
+
o ? "bg-surface-active" : "cursor-pointer group-focus:bg-surface-active"
|
|
27
27
|
),
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
onFocus: () => a(!0),
|
|
29
|
+
onBlur: () => a(!1),
|
|
30
30
|
"data-testid": "navigationItem-container",
|
|
31
31
|
children: [
|
|
32
|
-
|
|
32
|
+
t && /* @__PURE__ */ e("span", { className: "mr-2", children: /* @__PURE__ */ e(
|
|
33
33
|
n,
|
|
34
34
|
{
|
|
35
|
-
icon:
|
|
36
|
-
id: `navitem-${
|
|
35
|
+
icon: t,
|
|
36
|
+
id: `navitem-${r}-start-icon`,
|
|
37
37
|
color: o ? "active" : "default"
|
|
38
38
|
}
|
|
39
39
|
) }),
|
|
40
|
-
/* @__PURE__ */ e(p, { swStyle: 3, color: o ? "active" : "default", className: "whitespace-nowrap", children:
|
|
40
|
+
/* @__PURE__ */ e(p, { swStyle: 3, color: o ? "active" : "default", className: "whitespace-nowrap", children: r }),
|
|
41
41
|
/* @__PURE__ */ i("div", { className: "ml-auto flex items-center gap-2", children: [
|
|
42
42
|
m && /* @__PURE__ */ e(
|
|
43
|
-
|
|
43
|
+
g,
|
|
44
44
|
{
|
|
45
45
|
size: c
|
|
46
46
|
}
|
|
@@ -49,7 +49,7 @@ function j({
|
|
|
49
49
|
n,
|
|
50
50
|
{
|
|
51
51
|
icon: "ChevronRight",
|
|
52
|
-
id: `navitem-${
|
|
52
|
+
id: `navitem-${r}-end-icon`,
|
|
53
53
|
color: "default",
|
|
54
54
|
disabled: !0
|
|
55
55
|
}
|
|
@@ -60,5 +60,5 @@ function j({
|
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
$ as NavigationItem
|
|
64
64
|
};
|
|
@@ -1,17 +1,29 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsxs as a, jsx as m } from "react/jsx-runtime";
|
|
2
|
+
import o from "react";
|
|
3
|
+
import { rowContainer as s } from "./styles.js";
|
|
4
|
+
import { t as p } from "../../../../bundle-mjs-CAy1p0fn.js";
|
|
5
|
+
function f(t) {
|
|
6
|
+
return Array.isArray(t) ? t.map((r, e) => {
|
|
7
|
+
if (o.isValidElement(r)) {
|
|
8
|
+
const n = r.props;
|
|
9
|
+
return o.cloneElement(r, {
|
|
10
|
+
key: r.key ?? n.id ?? `cell-${e}`
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
return /* @__PURE__ */ m(o.Fragment, { children: r }, `cell-${e}`);
|
|
14
|
+
}) : t;
|
|
15
|
+
}
|
|
16
|
+
function l({ cells: t, rowHeader: r, minWidth: e, id: n, className: i }) {
|
|
17
|
+
return /* @__PURE__ */ a(
|
|
6
18
|
"tr",
|
|
7
19
|
{
|
|
8
|
-
id:
|
|
9
|
-
className:
|
|
10
|
-
style: { minWidth:
|
|
20
|
+
id: n,
|
|
21
|
+
className: p(s, i),
|
|
22
|
+
style: { minWidth: e ? `${e}rem` : "0" },
|
|
11
23
|
"data-testid": "table-row-container",
|
|
12
24
|
children: [
|
|
13
|
-
|
|
14
|
-
t
|
|
25
|
+
r,
|
|
26
|
+
f(t)
|
|
15
27
|
]
|
|
16
28
|
}
|
|
17
29
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { w as n, e as i } from "../../../index-
|
|
2
|
+
import { w as n, e as i } from "../../../index-DM2Ov9_y.js";
|
|
3
3
|
import { useState as l } from "react";
|
|
4
4
|
import { Dialog as s } from "./dialog.js";
|
|
5
5
|
const a = (t) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as b, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useState as x } from "react";
|
|
3
|
-
import { Icons as
|
|
3
|
+
import { Icons as F } from "../../../atoms/icons/icons.js";
|
|
4
4
|
import "../../../atoms/icons/iconsSVGs/Large/Profile.js";
|
|
5
5
|
import "../../../atoms/icons/iconsSVGs/Small/Profile.js";
|
|
6
6
|
import { t as s } from "../../../../bundle-mjs-CAy1p0fn.js";
|
|
@@ -8,43 +8,44 @@ import { outlinedBorder as l } from "../../../styles/defaults/defaults.js";
|
|
|
8
8
|
import "../../../../purify.es-eYFoHPwR.js";
|
|
9
9
|
import { styleMap as v } from "../../../styles/typography/style.js";
|
|
10
10
|
import "../../../styles/colors/colormap.js";
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
11
|
+
import { textFieldContainer as w } from "../../../atoms/form/textfield/styles.js";
|
|
12
|
+
const k = ({
|
|
13
|
+
value: i,
|
|
14
|
+
onChange: o,
|
|
15
|
+
placeholder: a,
|
|
16
|
+
disabled: e = !1,
|
|
17
|
+
className: m,
|
|
18
|
+
style: c,
|
|
18
19
|
preventBrowserSuggestions: u = !1
|
|
19
20
|
}) => {
|
|
20
|
-
const [f, t] = x(!1),
|
|
21
|
+
const [f, t] = x(!1), d = () => {
|
|
21
22
|
t(!0);
|
|
22
|
-
},
|
|
23
|
+
}, n = () => {
|
|
23
24
|
t(!1);
|
|
24
25
|
};
|
|
25
26
|
return /* @__PURE__ */ b(
|
|
26
27
|
"div",
|
|
27
28
|
{
|
|
28
29
|
className: s(
|
|
29
|
-
|
|
30
|
+
`${w} ${l.base} border-bcolor-default w-full px-md`,
|
|
30
31
|
f && l.active,
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
e && "bg-surface-disabled border-bcolor-disabled",
|
|
33
|
+
m
|
|
33
34
|
),
|
|
34
|
-
style:
|
|
35
|
+
style: c,
|
|
35
36
|
children: [
|
|
36
|
-
/* @__PURE__ */ r(
|
|
37
|
+
/* @__PURE__ */ r(F, { disabled: !0, icon: "MagnifyingGlassSmall", color: e ? "disabled" : "active" }),
|
|
37
38
|
/* @__PURE__ */ r(
|
|
38
39
|
"input",
|
|
39
40
|
{
|
|
40
41
|
type: "text",
|
|
41
|
-
className: s(`focus:outline-none
|
|
42
|
-
placeholder:
|
|
43
|
-
onFocus:
|
|
44
|
-
onBlur:
|
|
45
|
-
onChange: (
|
|
46
|
-
value:
|
|
47
|
-
disabled:
|
|
42
|
+
className: s(`w-full h-[2.5rem] focus:outline-none ${v[5]}`),
|
|
43
|
+
placeholder: a,
|
|
44
|
+
onFocus: d,
|
|
45
|
+
onBlur: n,
|
|
46
|
+
onChange: (p) => o == null ? void 0 : o(p.target.value),
|
|
47
|
+
value: i,
|
|
48
|
+
disabled: e,
|
|
48
49
|
autoComplete: u ? "off" : "on"
|
|
49
50
|
}
|
|
50
51
|
)
|
|
@@ -53,5 +54,5 @@ const $ = ({
|
|
|
53
54
|
);
|
|
54
55
|
};
|
|
55
56
|
export {
|
|
56
|
-
|
|
57
|
+
k as ContextSearch
|
|
57
58
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as c } from "react/jsx-runtime";
|
|
2
|
-
import { w as o, u as r, e as s } from "../../../../index-
|
|
2
|
+
import { w as o, u as r, e as s } from "../../../../index-DM2Ov9_y.js";
|
|
3
3
|
import { useState as i } from "react";
|
|
4
4
|
import { DateSelector as d } from "./date-selector.js";
|
|
5
5
|
const n = (e) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { f as t } from "../../../../index-
|
|
2
|
+
import { f as t } from "../../../../index-DM2Ov9_y.js";
|
|
3
3
|
import { Radiogroup as s } from "./radiogroup.js";
|
|
4
4
|
import { useState as d } from "react";
|
|
5
5
|
import { Icons as r } from "../../../atoms/icons/icons.js";
|
|
@@ -34,4 +34,4 @@ export type HeaderProps = {
|
|
|
34
34
|
*/
|
|
35
35
|
additionalRightBox?: React.ReactNode;
|
|
36
36
|
};
|
|
37
|
-
export declare function Header({ setShowSideBar, companyLogoUrl, account,
|
|
37
|
+
export declare function Header({ setShowSideBar, companyLogoUrl, account, showMenu, additionalRightBox, }: HeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Icons as
|
|
1
|
+
import { jsxs as s, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Icons as n } from "../../../atoms/icons/icons.js";
|
|
3
3
|
import "../../../atoms/icons/iconsSVGs/Large/Profile.js";
|
|
4
4
|
import "../../../atoms/icons/iconsSVGs/Small/Profile.js";
|
|
5
|
-
import { styles as
|
|
6
|
-
function
|
|
5
|
+
import { styles as o } from "./styles.js";
|
|
6
|
+
function N({
|
|
7
7
|
setShowSideBar: i,
|
|
8
|
-
companyLogoUrl:
|
|
9
|
-
account:
|
|
10
|
-
|
|
11
|
-
setShowMessages: d,
|
|
12
|
-
showMenu: n = !0,
|
|
13
|
-
showNotifications: u = !0,
|
|
8
|
+
companyLogoUrl: m,
|
|
9
|
+
account: r,
|
|
10
|
+
showMenu: c = !0,
|
|
14
11
|
additionalRightBox: t
|
|
15
12
|
}) {
|
|
16
|
-
const e =
|
|
17
|
-
return /* @__PURE__ */
|
|
18
|
-
/* @__PURE__ */
|
|
19
|
-
|
|
20
|
-
|
|
13
|
+
const e = o();
|
|
14
|
+
return /* @__PURE__ */ s("div", { className: e.container, "data-testid": "header", children: [
|
|
15
|
+
/* @__PURE__ */ s("div", { className: e.menuBox, children: [
|
|
16
|
+
c && /* @__PURE__ */ a(
|
|
17
|
+
n,
|
|
21
18
|
{
|
|
22
19
|
id: "HamburgerMenu",
|
|
23
20
|
icon: "HamburgerMenu",
|
|
@@ -25,14 +22,14 @@ function v({
|
|
|
25
22
|
button: !0
|
|
26
23
|
}
|
|
27
24
|
),
|
|
28
|
-
/* @__PURE__ */ a("img", { className: "h-[4rem] w-auto", src:
|
|
25
|
+
/* @__PURE__ */ a("img", { className: "h-[4rem] w-auto", src: m, alt: "Spotwork" })
|
|
29
26
|
] }),
|
|
30
|
-
(
|
|
27
|
+
(r || t) && /* @__PURE__ */ s("div", { className: e.accContainer, children: [
|
|
31
28
|
t,
|
|
32
|
-
|
|
29
|
+
r && /* @__PURE__ */ a("div", { className: e.account, children: r })
|
|
33
30
|
] })
|
|
34
31
|
] });
|
|
35
32
|
}
|
|
36
33
|
export {
|
|
37
|
-
|
|
34
|
+
N as Header
|
|
38
35
|
};
|
|
@@ -12,3 +12,5 @@ export declare const TransparentOverlay: Story;
|
|
|
12
12
|
export declare const CustomWidth: Story;
|
|
13
13
|
export declare const SlowTransition: Story;
|
|
14
14
|
export declare const FastTransition: Story;
|
|
15
|
+
export declare const KeyboardNavigation: Story;
|
|
16
|
+
export declare const NewTabNavigation: Story;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { jsx as n, jsxs as k } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p } from "react";
|
|
3
|
+
import { w as b, u as i, e as m, s as w } from "../../../../index-DM2Ov9_y.js";
|
|
4
|
+
import { Sidebar as d } from "./sidebar.js";
|
|
5
|
+
import { Button as C } from "../../button/button.js";
|
|
6
|
+
const I = {
|
|
6
7
|
title: "@spotwork-ui/molecules/Sidebar",
|
|
7
|
-
component:
|
|
8
|
+
component: d,
|
|
8
9
|
parameters: {
|
|
9
10
|
layout: "fullscreen"
|
|
10
11
|
},
|
|
@@ -27,16 +28,16 @@ const f = {
|
|
|
27
28
|
description: "If true, no overlay is rendered. If false, renders the overlay with background."
|
|
28
29
|
}
|
|
29
30
|
}
|
|
30
|
-
},
|
|
31
|
-
const [
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */ n(
|
|
34
|
-
/* @__PURE__ */ n(
|
|
31
|
+
}, u = ({ args: o }) => {
|
|
32
|
+
const [l, a] = p(!1);
|
|
33
|
+
return /* @__PURE__ */ k("div", { className: "p-4", children: [
|
|
34
|
+
/* @__PURE__ */ n(C, { text: "Open Sidebar", onClick: () => a(!0) }),
|
|
35
|
+
/* @__PURE__ */ n(d, { ...o, topItems: [
|
|
35
36
|
{
|
|
36
37
|
icon: "Clock",
|
|
37
38
|
label: "Clock",
|
|
38
|
-
onClick: (
|
|
39
|
-
console.log("Clicked:",
|
|
39
|
+
onClick: (t) => {
|
|
40
|
+
console.log("Clicked:", t);
|
|
40
41
|
},
|
|
41
42
|
link: "/clock"
|
|
42
43
|
},
|
|
@@ -44,26 +45,26 @@ const f = {
|
|
|
44
45
|
icon: "Maximize",
|
|
45
46
|
label: "Maximize",
|
|
46
47
|
isActive: !0,
|
|
47
|
-
onClick: (
|
|
48
|
-
console.log("Clicked:",
|
|
48
|
+
onClick: (t) => {
|
|
49
|
+
console.log("Clicked:", t);
|
|
49
50
|
},
|
|
50
51
|
link: "/maximize"
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
icon: "CalendarSmall",
|
|
54
55
|
label: "Calendar",
|
|
55
|
-
onClick: (
|
|
56
|
-
console.log("Clicked:",
|
|
56
|
+
onClick: (t) => {
|
|
57
|
+
console.log("Clicked:", t);
|
|
57
58
|
},
|
|
58
59
|
link: "/calendar"
|
|
59
60
|
}
|
|
60
|
-
], open:
|
|
61
|
+
], open: l, setOpen: a })
|
|
61
62
|
] });
|
|
62
|
-
},
|
|
63
|
-
const [
|
|
64
|
-
return /* @__PURE__ */
|
|
65
|
-
/* @__PURE__ */ n(
|
|
66
|
-
/* @__PURE__ */ n(
|
|
63
|
+
}, c = ({ args: o }) => {
|
|
64
|
+
const [l, a] = p(!1);
|
|
65
|
+
return /* @__PURE__ */ k("div", { className: "p-4", children: [
|
|
66
|
+
/* @__PURE__ */ n(C, { text: "Open Sidebar with Top & Bottom Items", onClick: () => a(!0) }),
|
|
67
|
+
/* @__PURE__ */ n(d, { ...o, topItems: [
|
|
67
68
|
{
|
|
68
69
|
icon: "Clock",
|
|
69
70
|
label: "Clock",
|
|
@@ -114,44 +115,44 @@ const f = {
|
|
|
114
115
|
},
|
|
115
116
|
link: "/help"
|
|
116
117
|
}
|
|
117
|
-
], open:
|
|
118
|
+
], open: l, setOpen: a })
|
|
118
119
|
] });
|
|
119
|
-
},
|
|
120
|
-
const [
|
|
121
|
-
return /* @__PURE__ */
|
|
122
|
-
/* @__PURE__ */ n(
|
|
123
|
-
/* @__PURE__ */ n(
|
|
120
|
+
}, g = ({ args: o }) => {
|
|
121
|
+
const [l, a] = p(!1);
|
|
122
|
+
return /* @__PURE__ */ k("div", { className: "p-4", children: [
|
|
123
|
+
/* @__PURE__ */ n(C, { text: "Open Sidebar (Top Items Only)", onClick: () => a(!0) }),
|
|
124
|
+
/* @__PURE__ */ n(d, { ...o, topItems: [
|
|
124
125
|
{
|
|
125
126
|
icon: "Clock",
|
|
126
127
|
label: "Clock",
|
|
127
|
-
onClick: (
|
|
128
|
-
console.log("Clicked:",
|
|
128
|
+
onClick: (t) => {
|
|
129
|
+
console.log("Clicked:", t);
|
|
129
130
|
},
|
|
130
131
|
link: "/clock"
|
|
131
132
|
},
|
|
132
133
|
{
|
|
133
134
|
icon: "Maximize",
|
|
134
135
|
label: "Maximize",
|
|
135
|
-
onClick: (
|
|
136
|
-
console.log("Clicked:",
|
|
136
|
+
onClick: (t) => {
|
|
137
|
+
console.log("Clicked:", t);
|
|
137
138
|
},
|
|
138
139
|
link: "/maximize"
|
|
139
140
|
},
|
|
140
141
|
{
|
|
141
142
|
icon: "CalendarSmall",
|
|
142
143
|
label: "Calendar",
|
|
143
|
-
onClick: (
|
|
144
|
-
console.log("Clicked:",
|
|
144
|
+
onClick: (t) => {
|
|
145
|
+
console.log("Clicked:", t);
|
|
145
146
|
},
|
|
146
147
|
link: "/calendar"
|
|
147
148
|
}
|
|
148
|
-
], open:
|
|
149
|
+
], open: l, setOpen: a })
|
|
149
150
|
] });
|
|
150
|
-
},
|
|
151
|
-
const [
|
|
152
|
-
return /* @__PURE__ */
|
|
153
|
-
/* @__PURE__ */ n(
|
|
154
|
-
/* @__PURE__ */ n(
|
|
151
|
+
}, y = ({ args: o }) => {
|
|
152
|
+
const [l, a] = p(!1);
|
|
153
|
+
return /* @__PURE__ */ k("div", { className: "p-4", children: [
|
|
154
|
+
/* @__PURE__ */ n(C, { text: "Open Sidebar with Many Items", onClick: () => a(!0) }),
|
|
155
|
+
/* @__PURE__ */ n(d, { ...o, topItems: [
|
|
155
156
|
{
|
|
156
157
|
icon: "Clock",
|
|
157
158
|
label: "Clock",
|
|
@@ -234,73 +235,108 @@ const f = {
|
|
|
234
235
|
},
|
|
235
236
|
link: "/feedback"
|
|
236
237
|
}
|
|
237
|
-
], open:
|
|
238
|
+
], open: l, setOpen: a })
|
|
238
239
|
] });
|
|
239
|
-
},
|
|
240
|
-
render: (o) => /* @__PURE__ */ n(
|
|
240
|
+
}, T = {
|
|
241
|
+
render: (o) => /* @__PURE__ */ n(u, { args: o }),
|
|
241
242
|
args: {
|
|
242
243
|
width: "22.5rem",
|
|
243
244
|
transitionDuration: 300,
|
|
244
245
|
overlayTransparent: !1
|
|
245
246
|
}
|
|
246
|
-
},
|
|
247
|
-
render: (o) => /* @__PURE__ */ n(
|
|
247
|
+
}, O = {
|
|
248
|
+
render: (o) => /* @__PURE__ */ n(c, { args: o }),
|
|
248
249
|
args: {
|
|
249
250
|
width: "22.5rem",
|
|
250
251
|
transitionDuration: 300,
|
|
251
252
|
overlayTransparent: !1
|
|
252
253
|
}
|
|
253
|
-
},
|
|
254
|
-
render: (o) => /* @__PURE__ */ n(
|
|
254
|
+
}, z = {
|
|
255
|
+
render: (o) => /* @__PURE__ */ n(g, { args: o }),
|
|
255
256
|
args: {
|
|
256
257
|
width: "22.5rem",
|
|
257
258
|
transitionDuration: 300,
|
|
258
259
|
overlayTransparent: !1
|
|
259
260
|
}
|
|
260
|
-
},
|
|
261
|
-
render: (o) => /* @__PURE__ */ n(
|
|
261
|
+
}, D = {
|
|
262
|
+
render: (o) => /* @__PURE__ */ n(y, { args: o }),
|
|
262
263
|
args: {
|
|
263
264
|
width: "22.5rem",
|
|
264
265
|
transitionDuration: 300,
|
|
265
266
|
overlayTransparent: !1
|
|
266
267
|
}
|
|
267
|
-
},
|
|
268
|
-
render: (o) => /* @__PURE__ */ n(
|
|
268
|
+
}, M = {
|
|
269
|
+
render: (o) => /* @__PURE__ */ n(c, { args: o }),
|
|
269
270
|
args: {
|
|
270
271
|
width: "22.5rem",
|
|
271
272
|
transitionDuration: 300,
|
|
272
273
|
overlayTransparent: !0
|
|
273
274
|
}
|
|
274
|
-
},
|
|
275
|
-
render: (o) => /* @__PURE__ */ n(
|
|
275
|
+
}, B = {
|
|
276
|
+
render: (o) => /* @__PURE__ */ n(c, { args: o }),
|
|
276
277
|
args: {
|
|
277
278
|
width: "30rem",
|
|
278
279
|
transitionDuration: 300,
|
|
279
280
|
overlayTransparent: !1
|
|
280
281
|
}
|
|
281
|
-
},
|
|
282
|
-
render: (o) => /* @__PURE__ */ n(
|
|
282
|
+
}, N = {
|
|
283
|
+
render: (o) => /* @__PURE__ */ n(c, { args: o }),
|
|
283
284
|
args: {
|
|
284
285
|
width: "22.5rem",
|
|
285
286
|
transitionDuration: 1e3,
|
|
286
287
|
overlayTransparent: !1
|
|
287
288
|
}
|
|
288
|
-
},
|
|
289
|
-
render: (o) => /* @__PURE__ */ n(
|
|
289
|
+
}, W = {
|
|
290
|
+
render: (o) => /* @__PURE__ */ n(c, { args: o }),
|
|
290
291
|
args: {
|
|
291
292
|
width: "22.5rem",
|
|
292
293
|
transitionDuration: 150,
|
|
293
294
|
overlayTransparent: !1
|
|
294
295
|
}
|
|
296
|
+
}, H = {
|
|
297
|
+
render: (o) => /* @__PURE__ */ n(c, { args: o }),
|
|
298
|
+
args: {
|
|
299
|
+
width: "22.5rem",
|
|
300
|
+
transitionDuration: 300,
|
|
301
|
+
overlayTransparent: !1
|
|
302
|
+
},
|
|
303
|
+
play: async ({ canvasElement: o }) => {
|
|
304
|
+
const a = await b(o).getByRole("button", { name: /Open Sidebar/i });
|
|
305
|
+
await i.click(a), await new Promise((r) => setTimeout(r, 500)), await i.tab();
|
|
306
|
+
const s = o.ownerDocument.activeElement;
|
|
307
|
+
await m(s).toHaveTextContent("Maximize"), await i.tab(), await i.tab();
|
|
308
|
+
const t = o.ownerDocument.activeElement;
|
|
309
|
+
await m(t).toHaveTextContent("Calendar"), await i.tab(), await i.tab(), await i.tab(), await i.tab(), await i.tab(), await i.tab(), await i.tab(), await i.tab();
|
|
310
|
+
const e = o.ownerDocument.activeElement;
|
|
311
|
+
await m(e).toHaveTextContent("Clock");
|
|
312
|
+
}
|
|
313
|
+
}, A = {
|
|
314
|
+
render: (o) => /* @__PURE__ */ n(c, { args: o }),
|
|
315
|
+
args: {
|
|
316
|
+
width: "22.5rem",
|
|
317
|
+
transitionDuration: 300,
|
|
318
|
+
overlayTransparent: !1
|
|
319
|
+
},
|
|
320
|
+
play: async ({ canvasElement: o, step: l }) => {
|
|
321
|
+
const a = b(o), s = b(o.ownerDocument.body), t = await a.getByRole("button", { name: /Open Sidebar/i }), e = w(window, "open").mockImplementation(() => null);
|
|
322
|
+
await l("Open Sidebar", async () => {
|
|
323
|
+
await i.click(t), await new Promise((r) => setTimeout(r, 500));
|
|
324
|
+
}), await l("Command + Click Maximize item", async () => {
|
|
325
|
+
const r = await s.findByRole("link", { name: /Maximize/i });
|
|
326
|
+
await i.keyboard("{Control>}"), await i.click(r), await i.keyboard("{/Control}"), await m(e).toHaveBeenCalledWith("/maximize", "_blank");
|
|
327
|
+
}), e.mockRestore();
|
|
328
|
+
}
|
|
295
329
|
};
|
|
296
330
|
export {
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
331
|
+
T as Basic,
|
|
332
|
+
B as CustomWidth,
|
|
333
|
+
W as FastTransition,
|
|
334
|
+
H as KeyboardNavigation,
|
|
335
|
+
D as ManyItems,
|
|
336
|
+
A as NewTabNavigation,
|
|
337
|
+
N as SlowTransition,
|
|
338
|
+
z as TopItemsOnly,
|
|
339
|
+
M as TransparentOverlay,
|
|
340
|
+
O as WithTopAndBottomItems,
|
|
341
|
+
I as default
|
|
306
342
|
};
|
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { NavigationItem as
|
|
3
|
-
import { u as
|
|
4
|
-
import { R as
|
|
1
|
+
import { jsx as r, jsxs as o, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { NavigationItem as s } from "../../../atoms/navigation/navigation-item/navigation-item.js";
|
|
3
|
+
import { u as v, a as c } from "../../../../react-spring_web.modern-BLL8Qmtg.js";
|
|
4
|
+
import { R as b, P as p, O as x, C as N, T as k, D as y } from "../../../../index-C0ZrzaoZ.js";
|
|
5
5
|
import "../../../styles/colors/colors.js";
|
|
6
6
|
import { surface as C } from "../../../styles/colors/colormap.js";
|
|
7
7
|
function z({
|
|
8
|
-
open:
|
|
9
|
-
setOpen:
|
|
8
|
+
open: i,
|
|
9
|
+
setOpen: t,
|
|
10
10
|
topItems: d,
|
|
11
|
-
bottomItems:
|
|
12
|
-
transitionDuration:
|
|
13
|
-
width:
|
|
14
|
-
overlayTransparent:
|
|
11
|
+
bottomItems: a = [],
|
|
12
|
+
transitionDuration: f = 300,
|
|
13
|
+
width: u = "22.5rem",
|
|
14
|
+
overlayTransparent: n = !1
|
|
15
15
|
}) {
|
|
16
|
-
const
|
|
16
|
+
const m = v(i, {
|
|
17
17
|
from: { opacity: 0, transform: "translateX(-100%)" },
|
|
18
18
|
enter: { opacity: 1, transform: "translateX(0%)" },
|
|
19
19
|
leave: { opacity: 1 },
|
|
20
20
|
config: {
|
|
21
|
-
duration:
|
|
21
|
+
duration: f
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
-
(
|
|
26
|
-
!
|
|
27
|
-
|
|
24
|
+
return /* @__PURE__ */ r(b, { open: i, onOpenChange: t, modal: !n, children: /* @__PURE__ */ r(p, { children: m(
|
|
25
|
+
(l, g) => g ? /* @__PURE__ */ o(h, { children: [
|
|
26
|
+
!n && /* @__PURE__ */ r(c.div, { style: { opacity: l.opacity }, children: /* @__PURE__ */ r(
|
|
27
|
+
x,
|
|
28
28
|
{
|
|
29
29
|
forceMount: !0,
|
|
30
30
|
className: "DialogOverlay fixed inset-0 top-[6rem] z-50",
|
|
@@ -34,17 +34,38 @@ function z({
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
) }),
|
|
37
|
-
/* @__PURE__ */ o(N, { forceMount: !0, "data-state":
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
37
|
+
/* @__PURE__ */ o(N, { forceMount: !0, "data-state": i ? "open" : "close", children: [
|
|
38
|
+
/* @__PURE__ */ r(k, { className: "sr-only", children: "Navigation Sidebar" }),
|
|
39
|
+
/* @__PURE__ */ r(y, { className: "sr-only", children: "Navigation menu with links to different sections" }),
|
|
40
40
|
/* @__PURE__ */ o(
|
|
41
|
-
|
|
41
|
+
c.div,
|
|
42
42
|
{
|
|
43
|
-
style: { transform:
|
|
44
|
-
className: `fixed top-[6rem] left-0 h-screen z-50 bg-surface-default focus:outline-none flex flex-col ${
|
|
43
|
+
style: { transform: l.transform, width: u },
|
|
44
|
+
className: `fixed top-[6rem] left-0 h-screen z-50 bg-surface-default focus:outline-none flex flex-col ${n ? "border-[0.1rem] border-bcolor-divider" : "shadow-[0rem_1rem_1rem_0rem_#B0B0B0] border-t-[0.1rem] border-bcolor-divider"}`,
|
|
45
45
|
children: [
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
|
|
46
|
+
/* @__PURE__ */ r("div", { className: "flex flex-col gap-xs p-md flex-1", children: d.map((e) => /* @__PURE__ */ o(
|
|
47
|
+
"a",
|
|
48
|
+
{
|
|
49
|
+
href: e.link,
|
|
50
|
+
onClick: () => e.onClick(e.link),
|
|
51
|
+
className: "group focus-visible:ring-2 focus-visible:ring-shadow-active focus:outline-none rounded hover:bg-bcolor-divider block no-underline",
|
|
52
|
+
children: [
|
|
53
|
+
" ",
|
|
54
|
+
/* @__PURE__ */ r(s, { ...e, isNavigation: !0 })
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
e.label
|
|
58
|
+
)) }),
|
|
59
|
+
a.length > 0 && /* @__PURE__ */ r("div", { className: "flex flex-col gap-lg p-md", children: a.map((e) => /* @__PURE__ */ r(
|
|
60
|
+
"a",
|
|
61
|
+
{
|
|
62
|
+
href: e.link,
|
|
63
|
+
onClick: () => e.onClick(e.link),
|
|
64
|
+
className: "group focus-visible:ring-2 focus-visible:ring-shadow-active focus:outline-none rounded hover:bg-bcolor-divider block no-underline",
|
|
65
|
+
children: /* @__PURE__ */ r(s, { ...e, isNavigation: !0 })
|
|
66
|
+
},
|
|
67
|
+
e.label
|
|
68
|
+
)) })
|
|
48
69
|
]
|
|
49
70
|
}
|
|
50
71
|
)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t, jsxs as a } from "react/jsx-runtime";
|
|
2
|
-
import { f as c } from "../../../index-
|
|
2
|
+
import { f as c } from "../../../index-DM2Ov9_y.js";
|
|
3
3
|
import { useState as r } from "react";
|
|
4
4
|
import { TabGroup as s } from "./tab-group.js";
|
|
5
5
|
import { Typography as n } from "../../styles/typography/typography.js";
|
|
@@ -20302,6 +20302,10 @@ var mocks = /* @__PURE__ */ new Set();
|
|
|
20302
20302
|
function isMockFunction(ne) {
|
|
20303
20303
|
return typeof ne == "function" && "_isMockFunction" in ne && ne._isMockFunction;
|
|
20304
20304
|
}
|
|
20305
|
+
function spyOn(ne, pt, yt) {
|
|
20306
|
+
let ir = yt ? { [{ get: "getter", set: "setter" }[yt]]: pt } : pt, io = C2(ne, ir);
|
|
20307
|
+
return enhanceSpy(io);
|
|
20308
|
+
}
|
|
20305
20309
|
var callOrder = 0;
|
|
20306
20310
|
function enhanceSpy(ne) {
|
|
20307
20311
|
let pt = ne, yt, ir = [], io = [], uo = [], fo = T(ne), _o = { get calls() {
|
|
@@ -21180,6 +21184,10 @@ var listeners = /* @__PURE__ */ new Set();
|
|
|
21180
21184
|
function onMockCall(ne) {
|
|
21181
21185
|
return listeners.add(ne), () => void listeners.delete(ne);
|
|
21182
21186
|
}
|
|
21187
|
+
var spyOn2 = (...ne) => {
|
|
21188
|
+
let pt = spyOn(...ne);
|
|
21189
|
+
return reactiveMock(pt);
|
|
21190
|
+
};
|
|
21183
21191
|
function fn2(ne) {
|
|
21184
21192
|
let pt = ne ? fn(ne) : fn();
|
|
21185
21193
|
return reactiveMock(pt);
|
|
@@ -24165,6 +24173,7 @@ scope.__STORYBOOK_TEST_ON_MOCK_CALL__ = onMockCall;
|
|
|
24165
24173
|
export {
|
|
24166
24174
|
expect3 as e,
|
|
24167
24175
|
fn2 as f,
|
|
24176
|
+
spyOn2 as s,
|
|
24168
24177
|
userEvent2 as u,
|
|
24169
24178
|
within as w
|
|
24170
24179
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temp-spotwork/ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.8",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/main.js",
|
|
7
7
|
"types": "dist/main.d.ts",
|
|
@@ -90,4 +90,4 @@
|
|
|
90
90
|
"react-spring": "^9.7.3",
|
|
91
91
|
"tailwindcss-animate": "^1.0.7"
|
|
92
92
|
}
|
|
93
|
-
}
|
|
93
|
+
}
|