@situaction/traq-ui-ste 1.1.18 → 1.1.19
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/accordion/Accordion.d.ts +2 -0
- package/dist/components/accordion/Accordion.js +23 -17
- package/dist/components/accordion/item/AccordionItem.d.ts +2 -0
- package/dist/components/accordion/item/AccordionItem.js +36 -27
- package/dist/components/calendar/Calendar.d.ts +4 -0
- package/dist/components/calendar/Calendar.js +435 -435
- package/dist/components/icon/Icon.d.ts +2 -1
- package/dist/components/menu/Menu.js +56 -56
- package/dist/components/panel/side-panel/SidePanel.js +34 -34
- package/dist/components/select/Select.js +36 -36
- package/dist/components/tabs/Tabs.js +51 -46
- package/dist/styles/Menu.css +1 -1
- package/dist/styles/Select.css +1 -1
- package/dist/styles/SidePanel.css +1 -1
- package/dist/styles/Tabs.css +1 -1
- package/package.json +1 -1
|
@@ -17,6 +17,8 @@ export interface AccordionProps {
|
|
|
17
17
|
type?: 'block' | 'tile';
|
|
18
18
|
/** Padding size inside the Accordion: small, medium, large */
|
|
19
19
|
paddingHeader?: Size;
|
|
20
|
+
/** Function to handle click on the header */
|
|
21
|
+
onClickHeader?: (index: number) => void;
|
|
20
22
|
}
|
|
21
23
|
/**
|
|
22
24
|
* Accordion component that displays a list of AccordionItem components.
|
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { AccordionItem as
|
|
3
|
-
import '../../styles/Accordion.css';const
|
|
4
|
-
accordion:
|
|
5
|
-
},
|
|
6
|
-
i
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { AccordionItem as t } from "./item/AccordionItem.js";
|
|
3
|
+
import '../../styles/Accordion.css';const s = "_accordion_hz3a1_6", l = {
|
|
4
|
+
accordion: s
|
|
5
|
+
}, f = ({ items: e, type: a = "block", paddingHeader: d, onClickHeader: c }) => {
|
|
6
|
+
const i = (o) => {
|
|
7
|
+
c && c(o);
|
|
8
|
+
};
|
|
9
|
+
return /* @__PURE__ */ r("div", { className: l.accordion, children: e.map((o, n) => /* @__PURE__ */ r(
|
|
10
|
+
t,
|
|
11
|
+
{
|
|
12
|
+
header: o.header,
|
|
13
|
+
iconPosition: o.iconPosition ?? "right",
|
|
14
|
+
defaultOpen: o.defaultOpen ?? !1,
|
|
15
|
+
type: a ?? "block",
|
|
16
|
+
paddingHeader: d ?? "m",
|
|
17
|
+
onClickHeader: () => i(n),
|
|
18
|
+
children: o.content
|
|
19
|
+
},
|
|
20
|
+
n
|
|
21
|
+
)) });
|
|
22
|
+
};
|
|
17
23
|
export {
|
|
18
|
-
|
|
24
|
+
f as Accordion
|
|
19
25
|
};
|
|
@@ -14,6 +14,8 @@ interface AccordionItemProps {
|
|
|
14
14
|
type?: 'block' | 'tile';
|
|
15
15
|
/** Padding size inside the Accordion: small, medium, large */
|
|
16
16
|
paddingHeader?: Size;
|
|
17
|
+
/** Click handler on the padding header (outside of IconButtons) */
|
|
18
|
+
onClickHeader?: () => void;
|
|
17
19
|
}
|
|
18
20
|
/**
|
|
19
21
|
* AccordionItem component represents an individual item in an accordion.
|
|
@@ -1,52 +1,61 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { IconButton as
|
|
4
|
-
import '../../../styles/AccordionItem.css';const
|
|
5
|
-
accordionHeader:
|
|
1
|
+
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { useState as p, useEffect as m } from "react";
|
|
3
|
+
import { IconButton as c } from "../../icon-button/IconButton.js";
|
|
4
|
+
import '../../../styles/AccordionItem.css';const u = "_accordionHeader_1tsuj_7", f = "_title_1tsuj_31", v = "_fullHeight_1tsuj_36", x = "_block_1tsuj_40", j = "_tile_1tsuj_48", l = {
|
|
5
|
+
accordionHeader: u,
|
|
6
6
|
"padding-s": "_padding-s_1tsuj_15",
|
|
7
7
|
"padding-m": "_padding-m_1tsuj_19",
|
|
8
8
|
"padding-l": "_padding-l_1tsuj_23",
|
|
9
9
|
"padding-xl": "_padding-xl_1tsuj_27",
|
|
10
|
-
title:
|
|
11
|
-
fullHeight:
|
|
12
|
-
block:
|
|
13
|
-
tile:
|
|
14
|
-
},
|
|
15
|
-
header:
|
|
16
|
-
children:
|
|
10
|
+
title: f,
|
|
11
|
+
fullHeight: v,
|
|
12
|
+
block: x,
|
|
13
|
+
tile: j
|
|
14
|
+
}, H = ({
|
|
15
|
+
header: h,
|
|
16
|
+
children: g,
|
|
17
17
|
iconPosition: d = "right",
|
|
18
|
-
defaultOpen:
|
|
19
|
-
type:
|
|
20
|
-
paddingHeader:
|
|
18
|
+
defaultOpen: s = !1,
|
|
19
|
+
type: r = "block",
|
|
20
|
+
paddingHeader: _ = "m",
|
|
21
|
+
onClickHeader: e
|
|
21
22
|
}) => {
|
|
22
|
-
const [i,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}, [
|
|
26
|
-
|
|
23
|
+
const [i, o] = p(!1);
|
|
24
|
+
m(() => {
|
|
25
|
+
s && o(s);
|
|
26
|
+
}, [s]);
|
|
27
|
+
const w = (a) => {
|
|
28
|
+
if (a.target.closest("button")) {
|
|
29
|
+
a.stopPropagation();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
e == null || e();
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ n("div", { className: `${r === "tile" ? l.tile : l.block}`, children: [
|
|
35
|
+
/* @__PURE__ */ n("div", { className: `${l.accordionHeader} ${l[`padding-${_}`]}`, onClick: w, children: [
|
|
27
36
|
d === "left" && /* @__PURE__ */ t(
|
|
28
|
-
|
|
37
|
+
c,
|
|
29
38
|
{
|
|
30
39
|
mode: "ghost",
|
|
31
40
|
size: "s",
|
|
32
|
-
onClick: () =>
|
|
41
|
+
onClick: () => o(!i),
|
|
33
42
|
children: i ? /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "#000000", viewBox: "0 0 256 256", children: /* @__PURE__ */ t("path", { d: "M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z" }) }) : /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "#000000", viewBox: "0 0 256 256", children: /* @__PURE__ */ t("path", { d: "M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z" }) })
|
|
34
43
|
}
|
|
35
44
|
),
|
|
36
|
-
/* @__PURE__ */ t("div", { className: l.title, children:
|
|
45
|
+
/* @__PURE__ */ t("div", { className: l.title, children: h }),
|
|
37
46
|
d === "right" && /* @__PURE__ */ t(
|
|
38
|
-
|
|
47
|
+
c,
|
|
39
48
|
{
|
|
40
49
|
mode: "ghost",
|
|
41
50
|
size: "s",
|
|
42
|
-
onClick: () =>
|
|
51
|
+
onClick: () => o(!i),
|
|
43
52
|
children: i ? /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "#000000", viewBox: "0 0 256 256", children: /* @__PURE__ */ t("path", { d: "M213.66,165.66a8,8,0,0,1-11.32,0L128,91.31,53.66,165.66a8,8,0,0,1-11.32-11.32l80-80a8,8,0,0,1,11.32,0l80,80A8,8,0,0,1,213.66,165.66Z" }) }) : /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", fill: "#000000", viewBox: "0 0 256 256", children: /* @__PURE__ */ t("path", { d: "M213.66,101.66l-80,80a8,8,0,0,1-11.32,0l-80-80A8,8,0,0,1,53.66,90.34L128,164.69l74.34-74.35a8,8,0,0,1,11.32,11.32Z" }) })
|
|
44
53
|
}
|
|
45
54
|
)
|
|
46
55
|
] }),
|
|
47
|
-
i &&
|
|
56
|
+
i && g
|
|
48
57
|
] });
|
|
49
58
|
};
|
|
50
59
|
export {
|
|
51
|
-
|
|
60
|
+
H as AccordionItem
|
|
52
61
|
};
|
|
@@ -13,6 +13,10 @@ export interface CalendarProps {
|
|
|
13
13
|
start: Date;
|
|
14
14
|
end: Date;
|
|
15
15
|
}) => void;
|
|
16
|
+
/** Maximum date allowed by the selection */
|
|
17
|
+
maxDateSelected?: Date;
|
|
18
|
+
/** Minimum date allowed by the selection */
|
|
19
|
+
minDateSelected?: Date;
|
|
16
20
|
}
|
|
17
21
|
/**
|
|
18
22
|
* Calendar component that renders a month view for selecting dates.
|