@jigowatts/jigowatts-ui 1.0.1 → 1.1.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/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/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/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/components/CustomLink/index.js +16 -1661
- package/dist/components/DataTable/index.js +2 -2
- package/dist/components/DataTable/index.test.js +19 -2976
- package/dist/components/DatePickerController/index.js +1 -1
- package/dist/components/ErrorMessage/index.js +1 -1
- package/dist/components/EvseStateLabel/index.js +1 -1
- package/dist/components/FlexButtons/index.js +1 -1
- package/dist/components/Form/index.js +1 -1
- package/dist/components/FormItem/index.js +1 -1
- package/dist/components/FormTitle/index.js +1 -1
- package/dist/components/Input/index.js +1 -1
- package/dist/components/InputGroup/index.js +1 -1
- package/dist/components/Label/index.js +1 -1
- package/dist/components/LabeledContent/index.js +4 -4
- package/dist/components/LoadingOverlay/index.js +1 -1
- package/dist/components/Map/index.js +1 -1
- package/dist/components/MaxWidthContainer/index.js +1 -1
- package/dist/components/OfflineLabel/index.js +4 -4
- package/dist/components/PageSizeSelector/index.js +2 -2
- package/dist/components/Pagination/index.js +1 -1
- package/dist/components/Pagination/index.test.js +1 -1
- package/dist/components/RadioButton/index.js +1 -1
- package/dist/components/RadioButton/index.test.js +1 -1
- package/dist/components/RangeDatePicker/index.js +1 -1
- package/dist/components/RangeDatePickerController/index.js +1 -1
- package/dist/components/ReportChart/index.js +1 -1
- package/dist/components/SearchForm/index.js +1 -1
- package/dist/components/SelectBox/index.js +1 -1
- package/dist/components/SelectBox/index.test.js +1 -1
- package/dist/components/SideMenu/index.d.ts +19 -0
- package/dist/components/SideMenu/index.js +102 -0
- package/dist/components/SideMenu/index.test.d.ts +1 -0
- package/dist/components/SideMenu/index.test.js +44 -0
- package/dist/{index-BOjtnFU5.js → index-0O6z6pEj.js} +2 -2
- package/dist/index-BqWHRIKL.js +2963 -0
- package/dist/{index-CQDJfJT1.js → index-BzzM70NU.js} +7 -7
- package/dist/{index-C_i0-R5C.js → index-Ng1Gk0N9.js} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +78 -73
- package/dist/link-DKxv6PwW.js +1646 -0
- package/dist/navigation-lUua5mCE.js +2205 -0
- package/package.json +7 -1
|
@@ -2,7 +2,7 @@ import { jsx as a } from "react/jsx-runtime";
|
|
|
2
2
|
import { L as h, A as g, j as y, p as x } from "../../index-CICI7n5Y.js";
|
|
3
3
|
import { C as D } from "../../index.esm-ChwJSgnF.js";
|
|
4
4
|
import { j as C, D as P } from "../../DateTimePicker-DJSOr5wM.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index20.css';const T = "_rangeContainer_17n2w_1", j = {
|
|
6
6
|
rangeContainer: T
|
|
7
7
|
}, L = {
|
|
8
8
|
".MuiButtonBase-root": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as l } from "react/jsx-runtime";
|
|
2
2
|
import { c as o } from "../../index-DWRHnq8_.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index8.css';const c = "_evseStateLabel_10v1n_1", r = {
|
|
4
4
|
evseStateLabel: c
|
|
5
5
|
}, v = (s) => {
|
|
6
6
|
const { evseState: t } = s;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
2
|
import { c as i } from "../../index-DWRHnq8_.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index11.css';const e = "_formItem_oyo9s_1", c = "_gridFirst_oyo9s_25", s = {
|
|
4
4
|
formItem: e,
|
|
5
5
|
gridFirst: c
|
|
6
6
|
}, d = (o) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { c as m } from "../../index-DWRHnq8_.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index13.css';const _ = "_inputContainer_1gij2_1", g = "_input_1gij2_1", d = "_error_1gij2_22", j = "_errorMessage_1gij2_26", r = {
|
|
4
4
|
inputContainer: _,
|
|
5
5
|
input: g,
|
|
6
6
|
error: d,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as t, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/
|
|
2
|
+
import '../../assets/index15.css';const a = "_required_1f4sr_1", d = {
|
|
3
3
|
required: a
|
|
4
4
|
}, o = (e) => {
|
|
5
5
|
const { label: r, isRequired: s, htmlFor: l } = e;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import { c as r } from "../../index-DWRHnq8_.js";
|
|
3
|
-
import '../../assets/
|
|
3
|
+
import '../../assets/index16.css';const o = "_container_1gimn_1", d = "_label_1gimn_7", m = "_required_1gimn_12", _ = "_content_1gimn_16", e = {
|
|
4
4
|
container: o,
|
|
5
5
|
label: d,
|
|
6
6
|
required: m,
|
|
7
7
|
content: _
|
|
8
|
-
},
|
|
8
|
+
}, q = (s) => {
|
|
9
9
|
const { label: a, content: c, className: l, isRequired: i } = s;
|
|
10
10
|
return /* @__PURE__ */ n(
|
|
11
11
|
"div",
|
|
@@ -23,6 +23,6 @@ import '../../assets/index15.css';const o = "_container_1gimn_1", d = "_label_1g
|
|
|
23
23
|
);
|
|
24
24
|
};
|
|
25
25
|
export {
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
q as LabeledContent,
|
|
27
|
+
q as default
|
|
28
28
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as b } from "react/jsx-runtime";
|
|
2
2
|
import { c as o } from "../../_commonjsHelpers-CT_km90n.js";
|
|
3
3
|
import A from "react";
|
|
4
|
-
import '../../assets/
|
|
4
|
+
import '../../assets/index26.css';var O = {}, i = {};
|
|
5
5
|
Object.defineProperty(i, "__esModule", { value: !0 });
|
|
6
6
|
i.cssValue = i.parseLengthAndUnit = void 0;
|
|
7
7
|
var R = {
|
|
@@ -2,7 +2,7 @@ import { jsxs as us, jsx as ri } from "react/jsx-runtime";
|
|
|
2
2
|
import { c as ls, g as cs } from "../../_commonjsHelpers-CT_km90n.js";
|
|
3
3
|
import ai, { useRef as Xt, useEffect as Mt, createContext as fs, useContext as ds, forwardRef as xe, useImperativeHandle as Le, useState as hi, useCallback as _s } from "react";
|
|
4
4
|
import { createPortal as ms } from "react-dom";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index27.css';function kn(m, c) {
|
|
6
6
|
const a = Xt(c);
|
|
7
7
|
Mt(function() {
|
|
8
8
|
c !== a.current && m.attributionControl != null && (a.current != null && m.attributionControl.removeAttribution(a.current), c != null && m.attributionControl.addAttribution(c)), a.current = c;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import '../../assets/
|
|
2
|
+
import '../../assets/index17.css';const i = "_maxWidthContainer_1pmeg_1", s = "_content_1pmeg_5", n = {
|
|
3
3
|
maxWidthContainer: i,
|
|
4
4
|
content: s
|
|
5
5
|
}, c = (e) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import l, { jsxs as
|
|
1
|
+
import l, { jsxs as n, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { i as s } from "../../styled-CWju4EfZ.js";
|
|
3
3
|
import { r as f } from "../../createSvgIcon-Dj8zNxRS.js";
|
|
4
4
|
import { c as u } from "../../index-DWRHnq8_.js";
|
|
5
|
-
import '../../assets/
|
|
5
|
+
import '../../assets/index24.css';var e = {}, c = s;
|
|
6
6
|
Object.defineProperty(e, "__esModule", {
|
|
7
7
|
value: !0
|
|
8
8
|
});
|
|
@@ -16,13 +16,13 @@ const m = "_offlineLabel_2osy9_1", v = {
|
|
|
16
16
|
offlineLabel: m
|
|
17
17
|
}, h = (r) => {
|
|
18
18
|
const { fontSize: o = "xx-small" } = r;
|
|
19
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ n(
|
|
20
20
|
"div",
|
|
21
21
|
{
|
|
22
22
|
className: u(v.offlineLabel),
|
|
23
23
|
style: { fontSize: o },
|
|
24
24
|
children: [
|
|
25
|
-
/* @__PURE__ */
|
|
25
|
+
/* @__PURE__ */ i(a, { fontSize: "small" }),
|
|
26
26
|
"オフライン"
|
|
27
27
|
]
|
|
28
28
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a, jsxs as r } from "react/jsx-runtime";
|
|
2
|
-
import { S as g } from "../../index-
|
|
3
|
-
import '../../assets/
|
|
2
|
+
import { S as g } from "../../index-BzzM70NU.js";
|
|
3
|
+
import '../../assets/index18.css';const S = "_pageSelectorWrapper_1rspl_1", f = "_pageSelectorContainer_1rspl_5", t = {
|
|
4
4
|
pageSelectorWrapper: S,
|
|
5
5
|
pageSelectorContainer: f
|
|
6
6
|
}, C = (o) => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { a as n, s as a } from "../../react.esm-C8amP77L.js";
|
|
3
|
-
import { P as s } from "../../index-
|
|
3
|
+
import { P as s } from "../../index-Ng1Gk0N9.js";
|
|
4
4
|
describe("Pagination component", () => {
|
|
5
5
|
const e = jest.fn();
|
|
6
6
|
window.scrollTo = jest.fn(), it("renders the pagination with the correct number of pages (pageCount <= 4)", () => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { a as s, s as n } from "../../react.esm-C8amP77L.js";
|
|
3
3
|
import { j as c } from "../../index-Di2gTfPF.js";
|
|
4
|
-
import { s as l, R as a } from "../../index-
|
|
4
|
+
import { s as l, R as a } from "../../index-0O6z6pEj.js";
|
|
5
5
|
describe("RadioButton component", () => {
|
|
6
6
|
const o = [
|
|
7
7
|
{ label: "Option 1", value: "option1" },
|
|
@@ -8,7 +8,7 @@ import { a as ge } from "../../index-kvi6aotO.js";
|
|
|
8
8
|
import { u as Oe } from "../../useSlotProps-Bh7akxXV.js";
|
|
9
9
|
import { r as R } from "../../ButtonBase-pxtIu13Q.js";
|
|
10
10
|
import { r as L } from "../../mergeSlotProps-J197zKan.js";
|
|
11
|
-
import '../../assets/
|
|
11
|
+
import '../../assets/index20.css';const xe = (n) => {
|
|
12
12
|
var t, l, a;
|
|
13
13
|
const r = O(), i = N();
|
|
14
14
|
return s({}, n, {
|
|
@@ -3,7 +3,7 @@ import { r as x, _ as D, t as M, s as C, a as l, L as T, A as j, j as P, p as V
|
|
|
3
3
|
import { C as h } from "../../index.esm-ChwJSgnF.js";
|
|
4
4
|
import { DATETIME_FORMAT as A } from "../../constants/datetime.js";
|
|
5
5
|
import { j as B, D as g } from "../../DateTimePicker-DJSOr5wM.js";
|
|
6
|
-
import '../../assets/
|
|
6
|
+
import '../../assets/index20.css';function F(c, t) {
|
|
7
7
|
if (x(2, arguments), D(t) !== "object" || t === null)
|
|
8
8
|
throw new RangeError("values parameter must be an object");
|
|
9
9
|
var r = M(c);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import '../../assets/
|
|
1
|
+
import '../../assets/index28.css';var Bb = Object.defineProperty;
|
|
2
2
|
var Rb = (e, t, n) => t in e ? Bb(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
3
3
|
var V = (e, t, n) => (Rb(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
4
4
|
import { jsxs as Qr, jsx as lt, Fragment as Fb } from "react/jsx-runtime";
|
|
@@ -4,7 +4,7 @@ import { i as B } from "../../styled-CWju4EfZ.js";
|
|
|
4
4
|
import { r as S } from "../../createSvgIcon-Dj8zNxRS.js";
|
|
5
5
|
import { Button as a } from "@mui/material";
|
|
6
6
|
import { FlexButtons as C } from "../FlexButtons/index.js";
|
|
7
|
-
import '../../assets/
|
|
7
|
+
import '../../assets/index23.css';var o = {}, I = B;
|
|
8
8
|
Object.defineProperty(o, "__esModule", {
|
|
9
9
|
value: !0
|
|
10
10
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { a as n, s as t } from "../../react.esm-C8amP77L.js";
|
|
3
|
-
import { s as p, S as c } from "../../index-
|
|
3
|
+
import { s as p, S as c } from "../../index-BzzM70NU.js";
|
|
4
4
|
describe("SelectBox component", () => {
|
|
5
5
|
const o = [
|
|
6
6
|
{ label: "Option 1", value: "option1" },
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
|
|
3
|
+
export type Menu = {
|
|
4
|
+
label: string;
|
|
5
|
+
icon?: React.ReactNode;
|
|
6
|
+
href?: string;
|
|
7
|
+
isTitle?: boolean;
|
|
8
|
+
};
|
|
9
|
+
type Props = {
|
|
10
|
+
isOpen: boolean;
|
|
11
|
+
isMobile: boolean;
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
menus: Menu[];
|
|
14
|
+
logoSrc: string;
|
|
15
|
+
topPageUrl?: string;
|
|
16
|
+
isStorybook?: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare const SideMenu: (props: Props) => import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export default SideMenu;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { jsx as t, jsxs as d } from "react/jsx-runtime";
|
|
2
|
+
import { useState as b } from "react";
|
|
3
|
+
import { g as y } from "../../_commonjsHelpers-CT_km90n.js";
|
|
4
|
+
import { i as D, n as k } from "../../navigation-lUua5mCE.js";
|
|
5
|
+
import { L as f } from "../../link-DKxv6PwW.js";
|
|
6
|
+
import { Drawer as w } from "@mui/material";
|
|
7
|
+
import { c as I } from "../../index-DWRHnq8_.js";
|
|
8
|
+
import '../../assets/index22.css';var M = D;
|
|
9
|
+
const S = /* @__PURE__ */ y(M);
|
|
10
|
+
var T = k;
|
|
11
|
+
const C = "_sideMenu_1f66p_1", E = "_logo_1f66p_7", N = "_menus_1f66p_12", j = "_menuTitle_1f66p_19", H = "_menuItem_1f66p_27", L = "_selected_1f66p_41", i = {
|
|
12
|
+
sideMenu: C,
|
|
13
|
+
logo: E,
|
|
14
|
+
menus: N,
|
|
15
|
+
menuTitle: j,
|
|
16
|
+
menuItem: H,
|
|
17
|
+
selected: L
|
|
18
|
+
}, p = 235, K = (h) => {
|
|
19
|
+
var m;
|
|
20
|
+
const {
|
|
21
|
+
isOpen: u,
|
|
22
|
+
isMobile: r,
|
|
23
|
+
onClose: s,
|
|
24
|
+
menus: _,
|
|
25
|
+
logoSrc: g,
|
|
26
|
+
topPageUrl: l = "/",
|
|
27
|
+
isStorybook: v = !1
|
|
28
|
+
} = h, a = ((m = T.usePathname()) == null ? void 0 : m.split("/")[1]) ?? null, [c, x] = b(
|
|
29
|
+
a === "" ? "/" : "/" + a
|
|
30
|
+
), n = (e, o) => {
|
|
31
|
+
r && s(), v && o.preventDefault(), x(e);
|
|
32
|
+
};
|
|
33
|
+
return /* @__PURE__ */ t(
|
|
34
|
+
w,
|
|
35
|
+
{
|
|
36
|
+
variant: r ? "temporary" : "permanent",
|
|
37
|
+
open: u,
|
|
38
|
+
onClose: s,
|
|
39
|
+
sx: {
|
|
40
|
+
width: p,
|
|
41
|
+
flexShrink: 0,
|
|
42
|
+
"& .MuiDrawer-paper": {
|
|
43
|
+
width: p,
|
|
44
|
+
boxSizing: "border-box"
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
children: /* @__PURE__ */ d("div", { className: i.sideMenu, children: [
|
|
48
|
+
/* @__PURE__ */ t("div", { className: i.logo, children: /* @__PURE__ */ t(
|
|
49
|
+
f,
|
|
50
|
+
{
|
|
51
|
+
href: l,
|
|
52
|
+
style: { textDecoration: "none" },
|
|
53
|
+
onClick: (e) => n(l, e),
|
|
54
|
+
children: /* @__PURE__ */ t(
|
|
55
|
+
S,
|
|
56
|
+
{
|
|
57
|
+
src: g,
|
|
58
|
+
alt: "logo",
|
|
59
|
+
width: 204,
|
|
60
|
+
height: 49,
|
|
61
|
+
style: { width: "auto", height: "auto" },
|
|
62
|
+
priority: !0
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
) }),
|
|
67
|
+
/* @__PURE__ */ t("div", { className: i.menus, children: _.map(
|
|
68
|
+
(e) => e.isTitle ? /* @__PURE__ */ t("div", { className: i.menuTitle, children: e.label }, e.label) : /* @__PURE__ */ t(
|
|
69
|
+
f,
|
|
70
|
+
{
|
|
71
|
+
href: e.href ?? "",
|
|
72
|
+
style: { textDecoration: "none" },
|
|
73
|
+
role: "menuitem",
|
|
74
|
+
"aria-current": c === e.href ? "page" : void 0,
|
|
75
|
+
children: /* @__PURE__ */ d(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
onClick: (o) => n(e.href, o),
|
|
79
|
+
className: I(i.menuItem, {
|
|
80
|
+
[i.selected]: c === e.href
|
|
81
|
+
}),
|
|
82
|
+
tabIndex: 0,
|
|
83
|
+
onKeyDown: (o) => {
|
|
84
|
+
(o.key === "Enter" || o.key === " ") && n(e.href, o);
|
|
85
|
+
},
|
|
86
|
+
children: [
|
|
87
|
+
e.icon,
|
|
88
|
+
/* @__PURE__ */ t("div", { children: e.label })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
},
|
|
93
|
+
e.label
|
|
94
|
+
)
|
|
95
|
+
) })
|
|
96
|
+
] })
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
};
|
|
100
|
+
export {
|
|
101
|
+
K as default
|
|
102
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import { a as o, s as e } from "../../react.esm-C8amP77L.js";
|
|
3
|
+
import { u as c } from "../../index-BqWHRIKL.js";
|
|
4
|
+
import "../../index-VF82hRp0.js";
|
|
5
|
+
import s from "./index.js";
|
|
6
|
+
jest.mock("next/navigation", () => ({
|
|
7
|
+
usePathname: jest.fn(() => "/")
|
|
8
|
+
}));
|
|
9
|
+
const l = [
|
|
10
|
+
{ label: "Dashboard", href: "/", isTitle: !1 },
|
|
11
|
+
{ label: "管理メニュー", isTitle: !0 },
|
|
12
|
+
{ label: "制御グループ一覧", href: "/management-groups", isTitle: !1 }
|
|
13
|
+
], i = {
|
|
14
|
+
isOpen: !0,
|
|
15
|
+
isMobile: !1,
|
|
16
|
+
onClose: jest.fn(),
|
|
17
|
+
menus: l,
|
|
18
|
+
logoSrc: "/leaflet/images/logo.png"
|
|
19
|
+
};
|
|
20
|
+
describe("Given SideMenu", () => {
|
|
21
|
+
it("Then renders the side menu with correct menu items", () => {
|
|
22
|
+
o(/* @__PURE__ */ n(s, { ...i })), l.forEach((t) => {
|
|
23
|
+
const r = e.getByText(t.label);
|
|
24
|
+
expect(r).toBeInTheDocument();
|
|
25
|
+
});
|
|
26
|
+
}), it("Then renders menu titles correctly", () => {
|
|
27
|
+
o(/* @__PURE__ */ n(s, { ...i }));
|
|
28
|
+
const t = e.getByText("管理メニュー");
|
|
29
|
+
expect(t).toBeInTheDocument(), expect(t.tagName).toBe("DIV");
|
|
30
|
+
}), it("When isMobile is true and isOpen is true, Then renders correctly", () => {
|
|
31
|
+
o(/* @__PURE__ */ n(s, { ...i, isMobile: !0, isOpen: !0 })), expect(e.getByRole("presentation")).toBeInTheDocument();
|
|
32
|
+
}), it("When isMobile is true and isOpen is false, Then does not render", () => {
|
|
33
|
+
o(/* @__PURE__ */ n(s, { ...i, isMobile: !0, isOpen: !1 })), expect(e.queryByRole("presentation")).not.toBeInTheDocument();
|
|
34
|
+
}), it("When a menu item is clicked in mobile mode, Then triggers onClose", async () => {
|
|
35
|
+
const t = c.setup(), r = jest.fn(), a = {
|
|
36
|
+
...i,
|
|
37
|
+
isMobile: !0,
|
|
38
|
+
onClose: r
|
|
39
|
+
};
|
|
40
|
+
o(/* @__PURE__ */ n(s, { ...a })), await t.click(e.getByText("Dashboard")), expect(r).toHaveBeenCalled();
|
|
41
|
+
}), it("When menus are empty, Then renders nothing", () => {
|
|
42
|
+
o(/* @__PURE__ */ n(s, { ...i, menus: [] })), expect(e.getByAltText("logo")).toBeInTheDocument(), expect(e.queryByText("Dashboard")).not.toBeInTheDocument(), expect(e.queryByText("管理メニュー")).not.toBeInTheDocument();
|
|
43
|
+
});
|
|
44
|
+
});
|
|
@@ -7,7 +7,7 @@ import './assets/index4.css';const c = "_inputContainer_18h3l_1", d = "_radioGro
|
|
|
7
7
|
input: _,
|
|
8
8
|
error: u,
|
|
9
9
|
errorMessage: m
|
|
10
|
-
},
|
|
10
|
+
}, v = (i) => {
|
|
11
11
|
const { values: n, register: t, errorMessage: o } = i;
|
|
12
12
|
return /* @__PURE__ */ a("div", { className: r.inputContainer, children: [
|
|
13
13
|
/* @__PURE__ */ s("div", { className: r.radioGroup, children: n.map((e) => /* @__PURE__ */ a("div", { className: r.radio, children: [
|
|
@@ -29,6 +29,6 @@ import './assets/index4.css';const c = "_inputContainer_18h3l_1", d = "_radioGro
|
|
|
29
29
|
] });
|
|
30
30
|
};
|
|
31
31
|
export {
|
|
32
|
-
|
|
32
|
+
v as R,
|
|
33
33
|
r as s
|
|
34
34
|
};
|