@lism-css/ui 0.9.2 → 0.9.3
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/getProps.js +53 -0
- package/dist/components/Accordion/react/AccIcon.js +9 -0
- package/dist/components/Accordion/react/Accordion.d.ts +5 -6
- package/dist/components/Accordion/react/Accordion.js +45 -0
- package/dist/components/Accordion/react/index.js +6 -0
- package/dist/components/Alert/getProps.js +20 -0
- package/dist/components/Alert/presets.js +29 -0
- package/dist/components/Alert/react/Alert.js +16 -0
- package/dist/components/Avatar/react/Avatar.js +8 -0
- package/dist/components/Badge/react/Badge.js +12 -0
- package/dist/components/Button/react/Button.js +12 -0
- package/dist/components/Callout/getProps.js +22 -0
- package/dist/components/Callout/presets.js +29 -0
- package/dist/components/Callout/react/Callout.js +20 -0
- package/dist/components/Chat/getProps.js +52 -0
- package/dist/components/Chat/react/Chat.js +22 -0
- package/dist/components/Details/getProps.js +15 -0
- package/dist/components/Details/react/Details.js +28 -0
- package/dist/components/Details/react/index.js +5 -0
- package/dist/components/Modal/getProps.js +25 -0
- package/dist/components/Modal/react/Body.js +9 -0
- package/dist/components/Modal/react/CloseBtn.js +13 -0
- package/dist/components/Modal/react/Inner.js +9 -0
- package/dist/components/Modal/react/Modal.d.ts +1 -2
- package/dist/components/Modal/react/Modal.js +17 -0
- package/dist/components/Modal/react/OpenBtn.js +9 -0
- package/dist/components/Modal/react/index.js +9 -0
- package/dist/components/Modal/setModal.js +16 -17
- package/dist/components/NavMenu/getProps.js +40 -0
- package/dist/components/NavMenu/react/NavMenu.js +24 -0
- package/dist/components/NavMenu/react/index.js +5 -0
- package/dist/components/ShapeDivider/getProps.js +22 -0
- package/dist/components/ShapeDivider/react/ShapeDivider.js +26 -0
- package/dist/components/Tabs/getProps.js +10 -0
- package/dist/components/Tabs/react/Tab.js +20 -0
- package/dist/components/Tabs/react/TabItem.js +7 -0
- package/dist/components/Tabs/react/TabList.js +8 -0
- package/dist/components/Tabs/react/TabPanel.js +9 -0
- package/dist/components/Tabs/react/Tabs.d.ts +1 -2
- package/dist/components/Tabs/react/Tabs.js +50 -0
- package/dist/components/Tabs/react/index.js +9 -0
- package/dist/components/Tabs/setTabs.js +10 -11
- package/dist/components/react.js +26 -0
- package/dist/lism-css/dist/components/Center/index.js +8 -0
- package/dist/lism-css/dist/components/Flex/index.js +8 -0
- package/dist/lism-css/dist/components/Flow/index.js +8 -0
- package/dist/lism-css/dist/components/Frame/index.js +8 -0
- package/dist/lism-css/dist/components/Grid/index.js +8 -0
- package/dist/lism-css/dist/components/Lism/index.js +8 -0
- package/dist/lism-css/dist/components/Stack/index.js +8 -0
- package/dist/lism-css/dist/components/atomic/Decorator/getProps.js +15 -0
- package/dist/lism-css/dist/components/atomic/Decorator/index.js +9 -0
- package/dist/lism-css/dist/components/atomic/Icon/SVG.js +22 -0
- package/dist/lism-css/dist/components/atomic/Icon/getProps.js +55 -0
- package/dist/lism-css/dist/components/atomic/Icon/index.js +12 -0
- package/dist/lism-css/dist/components/atomic/Icon/presets.js +276 -0
- package/dist/lism-css/dist/components/getFilterProps.js +23 -0
- package/dist/lism-css/dist/components/setMaybeTransformStyles.js +7 -0
- package/dist/lism-css/dist/config/default-config.js +11 -0
- package/dist/lism-css/dist/config/defaults/props.js +335 -0
- package/dist/lism-css/dist/config/defaults/states.js +39 -0
- package/dist/lism-css/dist/config/defaults/tokens.js +30 -0
- package/dist/lism-css/dist/config/helper/getSvgUrl.js +4 -0
- package/dist/lism-css/dist/config/helper.js +27 -0
- package/dist/lism-css/dist/config/index.js +17 -0
- package/dist/lism-css/dist/lib/getBpData.js +19 -0
- package/dist/lism-css/dist/lib/getLayoutProps.js +30 -0
- package/dist/lism-css/dist/lib/getLismProps.js +188 -0
- package/dist/lism-css/dist/lib/getMaybeCssVar.js +37 -0
- package/dist/lism-css/dist/lib/getMaybeTokenValue.js +26 -0
- package/dist/lism-css/dist/lib/getUtilKey.js +13 -0
- package/dist/lism-css/dist/lib/helper/atts.js +11 -0
- package/dist/lism-css/dist/lib/helper/filterEmptyObj.js +10 -0
- package/dist/lism-css/dist/lib/helper/hasSomeKeys.js +6 -0
- package/dist/lism-css/dist/lib/helper/isEmptyObj.js +6 -0
- package/dist/lism-css/dist/lib/helper/isNumStr.js +6 -0
- package/dist/lism-css/dist/lib/helper/splitWithComma.js +6 -0
- package/dist/lism-css/dist/lib/isPresetValue.js +13 -0
- package/dist/lism-css/dist/lib/isTokenValue.js +27 -0
- package/dist/ui.css +1 -0
- package/package.json +6 -5
- package/src/components/Accordion/react/Accordion.jsx +8 -7
- package/src/components/Modal/react/Modal.jsx +4 -3
- package/src/components/Tabs/react/Tabs.jsx +9 -8
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import e from "../../lism-css/dist/lib/helper/atts.js";
|
|
2
|
+
function r({ lismClass: o, allowMultiple: t, ...n }) {
|
|
3
|
+
return n.lismClass = e(o, "c--accordion"), t && (n["data-allow-multiple"] = ""), n;
|
|
4
|
+
}
|
|
5
|
+
function d({ lismClass: o, ...t }) {
|
|
6
|
+
return t.lismClass = e(o, "c--accordion_item"), t;
|
|
7
|
+
}
|
|
8
|
+
function u(o) {
|
|
9
|
+
const n = { ...{
|
|
10
|
+
lismClass: "c--accordion_heading",
|
|
11
|
+
as: "div",
|
|
12
|
+
setPlain: 1
|
|
13
|
+
}, ...o };
|
|
14
|
+
return n.as === "div" && (n.role = "heading"), n;
|
|
15
|
+
}
|
|
16
|
+
function f({ lismClass: o, _contextID: t, accID: n = "__LISM_ACC_ID__", isOpen: i = !1, ...s }) {
|
|
17
|
+
const a = {
|
|
18
|
+
lismClass: e(o, "c--accordion_panel"),
|
|
19
|
+
id: t || n,
|
|
20
|
+
hidden: i ? void 0 : "until-found",
|
|
21
|
+
pos: "relative",
|
|
22
|
+
ov: "hidden"
|
|
23
|
+
}, c = { lismClass: "c--accordion_content", layout: "flow", ...s };
|
|
24
|
+
return { panelProps: a, contentProps: c };
|
|
25
|
+
}
|
|
26
|
+
const P = {
|
|
27
|
+
// header: { lismClass: 'c--accordion_header' },
|
|
28
|
+
button: {
|
|
29
|
+
lismClass: "c--accordion_button",
|
|
30
|
+
as: "button",
|
|
31
|
+
layout: "flex",
|
|
32
|
+
setPlain: 1,
|
|
33
|
+
g: "10",
|
|
34
|
+
w: "100%",
|
|
35
|
+
ai: "center",
|
|
36
|
+
jc: "between"
|
|
37
|
+
},
|
|
38
|
+
icon: {
|
|
39
|
+
lismClass: "c--accordion_icon a--icon",
|
|
40
|
+
as: "span",
|
|
41
|
+
// d: 'grid',
|
|
42
|
+
pi: "center",
|
|
43
|
+
fxsh: "0",
|
|
44
|
+
"aria-hidden": "true"
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
P as defaultProps,
|
|
49
|
+
u as getHeadingProps,
|
|
50
|
+
d as getItemProps,
|
|
51
|
+
f as getPanelProps,
|
|
52
|
+
r as getRootProps
|
|
53
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import t from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
+
import { defaultProps as f } from "../getProps.js";
|
|
4
|
+
function n(o) {
|
|
5
|
+
return /* @__PURE__ */ r(t, { ...f.icon, ...o });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
n as default
|
|
9
|
+
};
|
|
@@ -1,18 +1,17 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
/**
|
|
3
2
|
* 複数の AccordionItem をラップするルート要素
|
|
4
3
|
*/
|
|
5
4
|
export function AccordionRoot({ children, ...props }: {
|
|
6
5
|
[x: string]: any;
|
|
7
6
|
children: any;
|
|
8
|
-
}):
|
|
7
|
+
}): import("react").JSX.Element;
|
|
9
8
|
/**
|
|
10
9
|
* 個別のアコーディオンアイテム(<div> ベース、setEvent で開閉イベントを登録)
|
|
11
10
|
*/
|
|
12
11
|
export function AccordionItem({ children, ...props }: {
|
|
13
12
|
[x: string]: any;
|
|
14
13
|
children: any;
|
|
15
|
-
}):
|
|
14
|
+
}): import("react").JSX.Element;
|
|
16
15
|
/**
|
|
17
16
|
* 見出しエリアのラッパー(デフォルトは <div role="heading">)
|
|
18
17
|
* as に h2〜h6 を指定すると role は付与されない
|
|
@@ -20,7 +19,7 @@ export function AccordionItem({ children, ...props }: {
|
|
|
20
19
|
export function Heading({ children, ...props }: {
|
|
21
20
|
[x: string]: any;
|
|
22
21
|
children: any;
|
|
23
|
-
}):
|
|
22
|
+
}): import("react").JSX.Element;
|
|
24
23
|
/**
|
|
25
24
|
* 開閉トリガーボタン
|
|
26
25
|
* accID: Context から取得できればそれを優先、なければ props / プレースホルダー
|
|
@@ -29,11 +28,11 @@ export function Button({ children, accID: _accID, ...props }: {
|
|
|
29
28
|
[x: string]: any;
|
|
30
29
|
children: any;
|
|
31
30
|
accID?: string | undefined;
|
|
32
|
-
}):
|
|
31
|
+
}): import("react").JSX.Element;
|
|
33
32
|
/**
|
|
34
33
|
* パネル
|
|
35
34
|
*/
|
|
36
35
|
export function Panel({ children, ...props }: {
|
|
37
36
|
[x: string]: any;
|
|
38
37
|
children: any;
|
|
39
|
-
}):
|
|
38
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as f, jsx as n } from "react/jsx-runtime";
|
|
3
|
+
import { useContext as u, useRef as p, useId as m, useEffect as a, createContext as l } from "react";
|
|
4
|
+
import d from "../../../lism-css/dist/lib/getLismProps.js";
|
|
5
|
+
import s from "../../../lism-css/dist/components/Lism/index.js";
|
|
6
|
+
import I from "../../../lism-css/dist/components/Stack/index.js";
|
|
7
|
+
import { defaultProps as P, getPanelProps as x, getHeadingProps as D, getItemProps as _, getRootProps as g } from "../getProps.js";
|
|
8
|
+
import { setEvent as A } from "../setAccordion.js";
|
|
9
|
+
import C from "./AccIcon.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
const i = l(null);
|
|
12
|
+
function L({ children: t, ...o }) {
|
|
13
|
+
const r = g(o);
|
|
14
|
+
return /* @__PURE__ */ n(I, { ...r, children: t });
|
|
15
|
+
}
|
|
16
|
+
function M({ children: t, ...o }) {
|
|
17
|
+
const r = p(null), e = m();
|
|
18
|
+
a(() => {
|
|
19
|
+
if (r.current)
|
|
20
|
+
return A(r.current);
|
|
21
|
+
}, []);
|
|
22
|
+
const c = d(_(o));
|
|
23
|
+
return /* @__PURE__ */ n(i.Provider, { value: { accID: e }, children: /* @__PURE__ */ n("div", { ref: r, ...c, children: t }) });
|
|
24
|
+
}
|
|
25
|
+
function S({ children: t, ...o }) {
|
|
26
|
+
return /* @__PURE__ */ n(s, { ...D(o), children: t });
|
|
27
|
+
}
|
|
28
|
+
function $({ children: t, accID: o = "__LISM_ACC_ID__", ...r }) {
|
|
29
|
+
const c = u(i)?.accID || o;
|
|
30
|
+
return /* @__PURE__ */ f(s, { ...P.button, ...r, "aria-controls": c, "aria-expanded": "false", children: [
|
|
31
|
+
t,
|
|
32
|
+
/* @__PURE__ */ n(C, {})
|
|
33
|
+
] });
|
|
34
|
+
}
|
|
35
|
+
function k({ children: t, ...o }) {
|
|
36
|
+
const r = u(i), { panelProps: e, contentProps: c } = x({ _contextID: r?.accID, ...o });
|
|
37
|
+
return /* @__PURE__ */ n(s, { ...e, children: /* @__PURE__ */ n(s, { ...c, children: t }) });
|
|
38
|
+
}
|
|
39
|
+
export {
|
|
40
|
+
M as AccordionItem,
|
|
41
|
+
L as AccordionRoot,
|
|
42
|
+
$ as Button,
|
|
43
|
+
S as Heading,
|
|
44
|
+
k as Panel
|
|
45
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import i from "./presets.js";
|
|
2
|
+
function f({ type: o = "alert", keycolor: t, layout: c = "flex", icon: e, flow: l = "s", ...n }) {
|
|
3
|
+
const r = o ? i[o] : null, s = e || r?.icon || "info", a = t || r?.color || "currentColor";
|
|
4
|
+
return {
|
|
5
|
+
icon: s,
|
|
6
|
+
layout: c,
|
|
7
|
+
flow: l,
|
|
8
|
+
lismClass: "c--alert u--cbox",
|
|
9
|
+
keycolor: a,
|
|
10
|
+
ai: "center",
|
|
11
|
+
p: "15",
|
|
12
|
+
g: "15",
|
|
13
|
+
bd: !0,
|
|
14
|
+
bdrs: "10",
|
|
15
|
+
...n
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
f as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
alert: {
|
|
3
|
+
icon: "alert",
|
|
4
|
+
color: "red"
|
|
5
|
+
},
|
|
6
|
+
point: {
|
|
7
|
+
icon: "lightbulb",
|
|
8
|
+
color: "orange"
|
|
9
|
+
},
|
|
10
|
+
warning: {
|
|
11
|
+
icon: "warning",
|
|
12
|
+
color: "yellow"
|
|
13
|
+
},
|
|
14
|
+
check: {
|
|
15
|
+
icon: "check-circle",
|
|
16
|
+
color: "green"
|
|
17
|
+
},
|
|
18
|
+
help: {
|
|
19
|
+
icon: "question",
|
|
20
|
+
color: "purple"
|
|
21
|
+
},
|
|
22
|
+
info: {
|
|
23
|
+
icon: "info",
|
|
24
|
+
color: "blue"
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
o as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import s from "../../../lism-css/dist/components/Center/index.js";
|
|
3
|
+
import n from "../../../lism-css/dist/components/Flow/index.js";
|
|
4
|
+
import p from "../../../lism-css/dist/components/atomic/Icon/index.js";
|
|
5
|
+
import c from "../../../lism-css/dist/components/Lism/index.js";
|
|
6
|
+
import x from "../getProps.js";
|
|
7
|
+
function A({ children: t, ...i }) {
|
|
8
|
+
const { icon: e, layout: o, flow: f, ...m } = x(i);
|
|
9
|
+
return /* @__PURE__ */ l(c, { layout: o, ...m, children: [
|
|
10
|
+
/* @__PURE__ */ r(s, { isSide: o === "sideMain", c: "keycolor", fz: "xl", fxsh: "0", children: /* @__PURE__ */ r(p, { icon: e }) }),
|
|
11
|
+
/* @__PURE__ */ r(n, { flow: f, children: t })
|
|
12
|
+
] });
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
A as default
|
|
16
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import m from "../../../lism-css/dist/components/Frame/index.js";
|
|
3
|
+
function d({ size: a = "1.5em", src: t = "", alt: i = "", ...e }) {
|
|
4
|
+
return /* @__PURE__ */ r(m, { lismClass: "c--avatar", ar: "1/1", w: a, bdrs: "99", ...e, children: /* @__PURE__ */ r("img", { src: t, alt: i, width: "100%", height: "100%", decoding: "async" }) });
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
d as default
|
|
8
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import o from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
function n(r) {
|
|
5
|
+
return /* @__PURE__ */ s(o, { lismClass: "c--badge", as: "span", d: "inline-flex", fz: "xs", lh: "xs", py: "5", px: "10", bdrs: "10", _propConfig: {
|
|
6
|
+
c: { isVar: 1 },
|
|
7
|
+
bgc: { isVar: 1 }
|
|
8
|
+
}, ...r });
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
n as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import t from "../../../lism-css/dist/components/Flex/index.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
function a(o) {
|
|
5
|
+
return /* @__PURE__ */ r(t, { lismClass: "c--button", as: "a", lh: "s", py: "10", px: "20", hov: "o", _propConfig: {
|
|
6
|
+
c: { isVar: 1 },
|
|
7
|
+
bgc: { isVar: 1 }
|
|
8
|
+
}, ...o });
|
|
9
|
+
}
|
|
10
|
+
export {
|
|
11
|
+
a as default
|
|
12
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import a from "./presets.js";
|
|
2
|
+
function i({ type: o = "note", keycolor: l, icon: t, title: n, flow: s = "s", ...r }) {
|
|
3
|
+
const c = o ? a[o] : null, e = t || c?.icon || "note", u = l || c?.color || null;
|
|
4
|
+
return {
|
|
5
|
+
icon: e,
|
|
6
|
+
title: n,
|
|
7
|
+
flow: s,
|
|
8
|
+
lismClass: "c--callout u--cbox",
|
|
9
|
+
keycolor: u,
|
|
10
|
+
p: "20",
|
|
11
|
+
g: "10",
|
|
12
|
+
bdc: "keycolor",
|
|
13
|
+
"bd-x-s": "-",
|
|
14
|
+
bdw: "4px",
|
|
15
|
+
bxsh: "10",
|
|
16
|
+
bdrs: "5",
|
|
17
|
+
...r
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
i as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
alert: {
|
|
3
|
+
icon: "alert",
|
|
4
|
+
color: "red"
|
|
5
|
+
},
|
|
6
|
+
point: {
|
|
7
|
+
icon: "lightbulb",
|
|
8
|
+
color: "orange"
|
|
9
|
+
},
|
|
10
|
+
warning: {
|
|
11
|
+
icon: "warning",
|
|
12
|
+
color: "yellow"
|
|
13
|
+
},
|
|
14
|
+
check: {
|
|
15
|
+
icon: "check-circle",
|
|
16
|
+
color: "green"
|
|
17
|
+
},
|
|
18
|
+
help: {
|
|
19
|
+
icon: "question",
|
|
20
|
+
color: "purple"
|
|
21
|
+
},
|
|
22
|
+
note: {
|
|
23
|
+
icon: "note",
|
|
24
|
+
color: "blue"
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
export {
|
|
28
|
+
o as default
|
|
29
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsxs as r, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import i from "../../../lism-css/dist/components/Center/index.js";
|
|
3
|
+
import s from "../../../lism-css/dist/components/Flex/index.js";
|
|
4
|
+
import f from "../../../lism-css/dist/components/Flow/index.js";
|
|
5
|
+
import n from "../../../lism-css/dist/components/atomic/Icon/index.js";
|
|
6
|
+
import p from "../../../lism-css/dist/components/Stack/index.js";
|
|
7
|
+
import u from "../getProps.js";
|
|
8
|
+
function j({ children: t, ...c }) {
|
|
9
|
+
const { icon: a, title: l, flow: m, ...e } = u(c);
|
|
10
|
+
return /* @__PURE__ */ r(p, { ...e, children: [
|
|
11
|
+
l && /* @__PURE__ */ r(s, { className: "c--callout_head", c: "keycolor", fw: "bold", ai: "center", g: "10", children: [
|
|
12
|
+
/* @__PURE__ */ o(i, { className: "c--callout_icon", fz: "xl", children: /* @__PURE__ */ o(n, { icon: a }) }),
|
|
13
|
+
/* @__PURE__ */ o("span", { className: "c--callout_title", children: l })
|
|
14
|
+
] }),
|
|
15
|
+
/* @__PURE__ */ o(f, { className: "c--callout_body", flow: m, children: t })
|
|
16
|
+
] });
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
j as default
|
|
20
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const l = {
|
|
2
|
+
avatar: {
|
|
3
|
+
lismClass: "c--chat_avatar",
|
|
4
|
+
bgc: "base",
|
|
5
|
+
ar: "1/1",
|
|
6
|
+
bdrs: "99",
|
|
7
|
+
"aria-hidden": "true"
|
|
8
|
+
},
|
|
9
|
+
name: {
|
|
10
|
+
lismClass: "c--chat_name",
|
|
11
|
+
c: "text-2",
|
|
12
|
+
fs: "italic",
|
|
13
|
+
fz: "2xs",
|
|
14
|
+
lh: "1",
|
|
15
|
+
py: "5",
|
|
16
|
+
px: "10",
|
|
17
|
+
aslf: "end"
|
|
18
|
+
},
|
|
19
|
+
body: {
|
|
20
|
+
lismClass: "c--chat_body",
|
|
21
|
+
pos: "rel"
|
|
22
|
+
},
|
|
23
|
+
deco: {
|
|
24
|
+
lismClass: "c--chat_deco",
|
|
25
|
+
pos: "abs"
|
|
26
|
+
},
|
|
27
|
+
content: {
|
|
28
|
+
lismClass: "c--chat_content",
|
|
29
|
+
bdrs: "30",
|
|
30
|
+
p: "20",
|
|
31
|
+
lh: "s"
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
function e({
|
|
35
|
+
variant: s = "speak",
|
|
36
|
+
direction: a = "start",
|
|
37
|
+
keycolor: t = "gray",
|
|
38
|
+
...c
|
|
39
|
+
}) {
|
|
40
|
+
return {
|
|
41
|
+
lismClass: "c--chat",
|
|
42
|
+
variant: s,
|
|
43
|
+
keycolor: t,
|
|
44
|
+
"data-chat-dir": a,
|
|
45
|
+
ji: a,
|
|
46
|
+
...c
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
e as default,
|
|
51
|
+
l as defaultProps
|
|
52
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import f from "../../../lism-css/dist/components/atomic/Decorator/index.js";
|
|
3
|
+
import n from "../../../lism-css/dist/components/Flow/index.js";
|
|
4
|
+
import h from "../../../lism-css/dist/components/Frame/index.js";
|
|
5
|
+
import l from "../../../lism-css/dist/components/Grid/index.js";
|
|
6
|
+
import m from "../../../lism-css/dist/components/Lism/index.js";
|
|
7
|
+
import u, { defaultProps as r } from "../getProps.js";
|
|
8
|
+
/* empty css */
|
|
9
|
+
function N({ name: i, avatar: t, flow: e = "s", children: a, ...d }) {
|
|
10
|
+
const { "data-chat-dir": c, ...p } = u(d);
|
|
11
|
+
return /* @__PURE__ */ s(l, { "data-chat-dir": c, ...p, children: [
|
|
12
|
+
t && /* @__PURE__ */ o(h, { ...r.avatar, src: t, alt: "", children: /* @__PURE__ */ o("img", { src: t, alt: "", width: "60", height: "60", decoding: "async" }) }),
|
|
13
|
+
i && /* @__PURE__ */ o(m, { ...r.name, children: i }),
|
|
14
|
+
/* @__PURE__ */ s(m, { ...r.body, children: [
|
|
15
|
+
/* @__PURE__ */ o(f, { ...r.deco, className: "u--cbox is--skipFlow" }),
|
|
16
|
+
/* @__PURE__ */ o(n, { ...r.content, className: "u--cbox", flow: e, jslf: c, children: a })
|
|
17
|
+
] })
|
|
18
|
+
] });
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
N as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import a from "../../lism-css/dist/lib/helper/atts.js";
|
|
2
|
+
function i({ lismClass: l, ...s }) {
|
|
3
|
+
return s.lismClass = a(l, "c--details"), s;
|
|
4
|
+
}
|
|
5
|
+
const e = {
|
|
6
|
+
summary: { lismClass: "c--details_summary", layout: "flex", g: "10", ai: "center" },
|
|
7
|
+
title: { lismClass: "c--details_title", as: "span", fx: "1", setPlain: 1 },
|
|
8
|
+
icon: { lismClass: "c--details_icon a--icon", as: "span", "aria-hidden": "true" },
|
|
9
|
+
body: { lismClass: "c--details_body" },
|
|
10
|
+
content: { lismClass: "c--details_content", layout: "flow", flow: "s" }
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
e as defaultProps,
|
|
14
|
+
i as getDetailsProps
|
|
15
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import m from "../../../lism-css/dist/lib/getLismProps.js";
|
|
3
|
+
import n from "../../../lism-css/dist/components/Lism/index.js";
|
|
4
|
+
import { defaultProps as i, getDetailsProps as u } from "../getProps.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
function l({ children: t, ...r }) {
|
|
7
|
+
const e = m(u(r));
|
|
8
|
+
return /* @__PURE__ */ o("details", { ...e, children: t });
|
|
9
|
+
}
|
|
10
|
+
function d({ children: t, ...r }) {
|
|
11
|
+
return /* @__PURE__ */ o(n, { as: "summary", ...i.summary, ...r, children: t });
|
|
12
|
+
}
|
|
13
|
+
function y({ children: t, ...r }) {
|
|
14
|
+
return /* @__PURE__ */ o(n, { ...i.title, ...r, children: t });
|
|
15
|
+
}
|
|
16
|
+
function P({ children: t, ...r }) {
|
|
17
|
+
return /* @__PURE__ */ o(n, { ...i.icon, ...r, children: t });
|
|
18
|
+
}
|
|
19
|
+
function x({ children: t, ...r }) {
|
|
20
|
+
return /* @__PURE__ */ o(n, { ...i.body, children: /* @__PURE__ */ o(n, { ...i.content, ...r, children: t }) });
|
|
21
|
+
}
|
|
22
|
+
export {
|
|
23
|
+
x as Content,
|
|
24
|
+
l as Details,
|
|
25
|
+
P as Icon,
|
|
26
|
+
d as Summary,
|
|
27
|
+
y as Title
|
|
28
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import e from "../../lism-css/dist/lib/helper/atts.js";
|
|
2
|
+
function i({ lismClass: t = "", duration: o, style: n = {}, ...s }) {
|
|
3
|
+
const l = {
|
|
4
|
+
lismClass: e(t, "c--modal"),
|
|
5
|
+
setPlain: !0
|
|
6
|
+
};
|
|
7
|
+
return o && (n["--duration"] = o), { as: "dialog", ...l, style: n, ...s };
|
|
8
|
+
}
|
|
9
|
+
function a({ lismClass: t = "", offset: o, style: n = {}, ...s }) {
|
|
10
|
+
return o && (n["--offset"] = o), {
|
|
11
|
+
lismClass: e(t, "c--modal_inner"),
|
|
12
|
+
style: n,
|
|
13
|
+
...s
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
const u = {
|
|
17
|
+
body: { lismClass: "c--modal_body" },
|
|
18
|
+
closeBtn: { as: "button", setPlain: !0, hov: "o", d: "in-flex" },
|
|
19
|
+
openBtn: { as: "button", setPlain: !0, hov: "o", d: "in-flex" }
|
|
20
|
+
};
|
|
21
|
+
export {
|
|
22
|
+
u as defaultProps,
|
|
23
|
+
a as getInnerProps,
|
|
24
|
+
i as getProps
|
|
25
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import f from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
+
import { defaultProps as m } from "../getProps.js";
|
|
4
|
+
function e({ children: o, ...r }) {
|
|
5
|
+
return /* @__PURE__ */ t(f, { ...m.body, ...r, children: o });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
e as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as o, jsxs as m, Fragment as n } from "react/jsx-runtime";
|
|
2
|
+
import a from "../../../lism-css/dist/components/atomic/Icon/index.js";
|
|
3
|
+
import f from "../../../lism-css/dist/components/Lism/index.js";
|
|
4
|
+
import { defaultProps as i } from "../getProps.js";
|
|
5
|
+
function x({ children: r, modalId: s = "", icon: e, srText: t = "Close", ...l }) {
|
|
6
|
+
return /* @__PURE__ */ o(f, { "data-modal-close": s, ...i.closeBtn, ...l, children: r || /* @__PURE__ */ m(n, { children: [
|
|
7
|
+
/* @__PURE__ */ o(a, { icon: e || "x" }),
|
|
8
|
+
/* @__PURE__ */ o("span", { className: "u--srOnly", children: t || "Close" })
|
|
9
|
+
] }) });
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
x as default
|
|
13
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import n from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
+
import { getInnerProps as e } from "../getProps.js";
|
|
4
|
+
function i({ children: r, ...o }) {
|
|
5
|
+
return /* @__PURE__ */ t(n, { ...e(o), children: r });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
i as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as f, useEffect as m } from "react";
|
|
4
|
+
import n from "../../../lism-css/dist/components/Lism/index.js";
|
|
5
|
+
import { setEvent as u } from "../setModal.js";
|
|
6
|
+
import { getProps as p } from "../getProps.js";
|
|
7
|
+
/* empty css */
|
|
8
|
+
const x = ({ children: t, ...e }) => {
|
|
9
|
+
const r = f(null);
|
|
10
|
+
return m(() => {
|
|
11
|
+
if (r?.current)
|
|
12
|
+
return u(r?.current);
|
|
13
|
+
}, [r]), /* @__PURE__ */ o(n, { forwardedRef: r, ...p(e), children: t });
|
|
14
|
+
};
|
|
15
|
+
export {
|
|
16
|
+
x as default
|
|
17
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import p from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
+
import { defaultProps as e } from "../getProps.js";
|
|
4
|
+
function d({ children: o, modalId: t = "", ...r }) {
|
|
5
|
+
return /* @__PURE__ */ n(p, { "data-modal-open": t, ...e.openBtn, ...r, children: o });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
d as default
|
|
9
|
+
};
|
|
@@ -1,37 +1,36 @@
|
|
|
1
1
|
import { waitAnimation as o } from "../../helper/animation.js";
|
|
2
|
-
function
|
|
2
|
+
function c(e) {
|
|
3
3
|
if (!e || !e.id) return;
|
|
4
4
|
let n = null;
|
|
5
|
-
const
|
|
5
|
+
const r = document.querySelectorAll(`[data-modal-open="${e.id}"]`), s = e.querySelectorAll(`[data-modal-close="${e.id}"]`), a = () => {
|
|
6
6
|
e.open && e.hasAttribute("data-is-open") || (e.showModal(), requestAnimationFrame(() => {
|
|
7
7
|
e.dataset.isOpen = "1";
|
|
8
8
|
}));
|
|
9
|
-
},
|
|
9
|
+
}, i = async () => {
|
|
10
10
|
e.hasAttribute("data-is-open") && (e.removeAttribute("data-is-open"), await o(e), e.close());
|
|
11
11
|
};
|
|
12
|
-
|
|
13
|
-
t
|
|
14
|
-
t.dataset.targetOpened = "1", n = t,
|
|
12
|
+
r.forEach((t) => {
|
|
13
|
+
t?.addEventListener("click", () => {
|
|
14
|
+
t.dataset.targetOpened = "1", n = t, a();
|
|
15
15
|
});
|
|
16
|
-
}),
|
|
17
|
-
t
|
|
18
|
-
|
|
16
|
+
}), s.forEach((t) => {
|
|
17
|
+
t?.addEventListener("click", () => {
|
|
18
|
+
i();
|
|
19
19
|
});
|
|
20
20
|
}), e.addEventListener("click", (t) => {
|
|
21
|
-
t.target === e &&
|
|
21
|
+
t.target === e && i();
|
|
22
22
|
}), e.addEventListener("close", () => {
|
|
23
23
|
n && (n.removeAttribute("data-target-opened"), n = null);
|
|
24
24
|
}), e.addEventListener("cancel", (t) => {
|
|
25
|
-
t.preventDefault(),
|
|
25
|
+
t.preventDefault(), i();
|
|
26
26
|
});
|
|
27
27
|
}
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
r(n);
|
|
28
|
+
const l = () => {
|
|
29
|
+
document.querySelectorAll(".c--modal")?.forEach((n) => {
|
|
30
|
+
c(n);
|
|
32
31
|
});
|
|
33
32
|
};
|
|
34
33
|
export {
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
l as default,
|
|
35
|
+
c as setEvent
|
|
37
36
|
};
|