@lism-css/ui 0.12.0 → 0.13.1
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.d.ts +4 -3
- package/dist/components/Accordion/getProps.js +20 -19
- package/dist/components/Accordion/react/Accordion.js +4 -4
- package/dist/components/Alert/getProps.d.ts +3 -0
- package/dist/components/Alert/getProps.js +9 -6
- package/dist/components/Callout/getProps.d.ts +2 -0
- package/dist/components/Callout/getProps.js +5 -3
- package/dist/components/Chat/getProps.d.ts +3 -0
- package/dist/components/Chat/getProps.js +3 -0
- package/dist/components/Chat/react/Chat.js +15 -15
- package/dist/components/Details/getProps.d.ts +3 -2
- package/dist/components/Details/getProps.js +10 -10
- package/dist/components/Modal/getProps.d.ts +3 -4
- package/dist/components/Modal/getProps.js +19 -19
- package/dist/components/Tabs/getProps.d.ts +1 -1
- package/dist/components/Tabs/getProps.js +8 -8
- package/dist/lism-css/dist/components/atomic/Decorator/index.js +2 -3
- package/dist/lism-css/dist/components/atomic/Icon/getProps.js +33 -34
- package/dist/lism-css/dist/config/default-config.js +6 -6
- package/dist/lism-css/dist/config/defaults/{states.js → traits.js} +4 -3
- package/dist/lism-css/dist/config/index.js +9 -9
- package/dist/lism-css/dist/lib/getAtomicProps.js +32 -0
- package/dist/lism-css/dist/lib/getLayoutProps.js +27 -17
- package/dist/lism-css/dist/lib/getLismProps.js +131 -110
- package/dist/lism-css/dist/lib/helper/mergeSet.js +10 -10
- package/dist/style.css +1 -1
- package/dist/ui.css +1 -1
- package/package.json +2 -2
- package/src/components/Accordion/_style.css +1 -1
- package/src/components/Accordion/getProps.ts +6 -5
- package/src/components/Alert/getProps.ts +4 -1
- package/src/components/Badge/_style.css +1 -1
- package/src/components/Button/_style.css +1 -1
- package/src/components/Callout/getProps.ts +3 -1
- package/src/components/Chat/_style.css +1 -1
- package/src/components/Chat/astro/Chat.astro +2 -2
- package/src/components/Chat/getProps.ts +3 -0
- package/src/components/Chat/react/Chat.tsx +2 -2
- package/src/components/Details/_style.css +1 -1
- package/src/components/Details/getProps.ts +3 -3
- package/src/components/Modal/_style.css +1 -1
- package/src/components/Modal/getProps.ts +6 -7
- package/src/components/NavMenu/_style.css +1 -1
- package/src/components/ShapeDivider/_style.css +1 -1
- package/src/components/Tabs/_style.css +14 -16
- package/src/components/Tabs/getProps.ts +2 -2
- package/dist/lism-css/dist/components/atomic/Decorator/getProps.js +0 -15
|
@@ -26,12 +26,12 @@ export declare function getRootProps({ lismClass, allowMultiple, ...props }: Acc
|
|
|
26
26
|
export declare function getItemProps({ lismClass, ...props }: AccordionItemProps): {
|
|
27
27
|
[key: string]: unknown;
|
|
28
28
|
};
|
|
29
|
-
export declare function getHeadingProps({ as, role, lismClass, set,
|
|
29
|
+
export declare function getHeadingProps({ as, role, lismClass, set, ...props }: AccordionHeadingProps): {
|
|
30
30
|
lismClass: string;
|
|
31
31
|
as: string;
|
|
32
32
|
set: string[];
|
|
33
33
|
};
|
|
34
|
-
export declare function getButtonProps({ set,
|
|
34
|
+
export declare function getButtonProps({ set, ...props }: Record<string, unknown>): {
|
|
35
35
|
lismClass: string;
|
|
36
36
|
as: string;
|
|
37
37
|
layout: string;
|
|
@@ -56,7 +56,8 @@ export declare function getPanelProps({ lismClass, _contextID, accID, isOpen, ..
|
|
|
56
56
|
};
|
|
57
57
|
export declare const defaultProps: {
|
|
58
58
|
readonly icon: {
|
|
59
|
-
readonly lismClass: "c--accordion_icon
|
|
59
|
+
readonly lismClass: "c--accordion_icon";
|
|
60
|
+
readonly atomic: "icon";
|
|
60
61
|
readonly as: "span";
|
|
61
62
|
readonly pi: "center";
|
|
62
63
|
readonly fxsh: "0";
|
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
import e from "../../lism-css/dist/lib/helper/atts.js";
|
|
2
|
-
import
|
|
3
|
-
function u({ lismClass:
|
|
4
|
-
return t.lismClass = e(
|
|
2
|
+
import a from "../../lism-css/dist/lib/helper/mergeSet.js";
|
|
3
|
+
function u({ lismClass: n, allowMultiple: o, ...t }) {
|
|
4
|
+
return t.lismClass = e(n, "c--accordion"), o && (t["data-allow-multiple"] = ""), t;
|
|
5
5
|
}
|
|
6
|
-
function f({ lismClass:
|
|
7
|
-
return
|
|
6
|
+
function f({ lismClass: n, ...o }) {
|
|
7
|
+
return o.lismClass = e(n, "c--accordion_item"), o;
|
|
8
8
|
}
|
|
9
|
-
function m({ as:
|
|
9
|
+
function m({ as: n = "div", role: o, lismClass: t, set: s, ...c }) {
|
|
10
10
|
const i = {
|
|
11
11
|
lismClass: e(t, "c--accordion_heading"),
|
|
12
|
-
as:
|
|
13
|
-
set:
|
|
12
|
+
as: n,
|
|
13
|
+
set: a("plain", s),
|
|
14
14
|
...c
|
|
15
15
|
};
|
|
16
|
-
return i.as === "div" && (i.role =
|
|
16
|
+
return i.as === "div" && (i.role = o ?? "heading"), i;
|
|
17
17
|
}
|
|
18
|
-
function p({ set:
|
|
18
|
+
function p({ set: n, ...o }) {
|
|
19
19
|
return {
|
|
20
20
|
lismClass: "c--accordion_button",
|
|
21
21
|
as: "button",
|
|
22
22
|
layout: "flex",
|
|
23
|
-
set:
|
|
23
|
+
set: a("plain", n),
|
|
24
24
|
g: "10",
|
|
25
25
|
w: "100%",
|
|
26
26
|
ai: "center",
|
|
27
27
|
jc: "between",
|
|
28
|
-
...
|
|
28
|
+
...o
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
function _({ lismClass:
|
|
32
|
-
const
|
|
33
|
-
lismClass: e(
|
|
34
|
-
id:
|
|
31
|
+
function _({ lismClass: n, _contextID: o, accID: t = "__LISM_ACC_ID__", isOpen: s = !1, ...c }) {
|
|
32
|
+
const i = {
|
|
33
|
+
lismClass: e(n, "c--accordion_panel"),
|
|
34
|
+
id: o || t,
|
|
35
35
|
hidden: s ? void 0 : "until-found",
|
|
36
36
|
pos: "relative",
|
|
37
37
|
ov: "hidden"
|
|
38
|
-
},
|
|
39
|
-
return { panelProps:
|
|
38
|
+
}, r = { lismClass: "c--accordion_content", layout: "flow", ...c };
|
|
39
|
+
return { panelProps: i, contentProps: r };
|
|
40
40
|
}
|
|
41
41
|
const P = {
|
|
42
42
|
icon: {
|
|
43
|
-
lismClass: "c--accordion_icon
|
|
43
|
+
lismClass: "c--accordion_icon",
|
|
44
|
+
atomic: "icon",
|
|
44
45
|
as: "span",
|
|
45
46
|
pi: "center",
|
|
46
47
|
fxsh: "0",
|
|
@@ -9,11 +9,11 @@ import { setEvent as A } from "../setAccordion.js";
|
|
|
9
9
|
import h from "./AccIcon.js";
|
|
10
10
|
/* empty css */
|
|
11
11
|
const i = d(null);
|
|
12
|
-
function
|
|
12
|
+
function S({ children: t, ...r }) {
|
|
13
13
|
const o = _(r);
|
|
14
14
|
return /* @__PURE__ */ n(P, { ...o, children: t });
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function Z({ children: t, ...r }) {
|
|
17
17
|
const o = p(null), e = f();
|
|
18
18
|
m(() => {
|
|
19
19
|
if (o.current)
|
|
@@ -38,8 +38,8 @@ function k({ children: t, ...r }) {
|
|
|
38
38
|
return /* @__PURE__ */ n(s, { ...e, children: /* @__PURE__ */ n(s, { ...c, children: t }) });
|
|
39
39
|
}
|
|
40
40
|
export {
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
Z as AccordionItem,
|
|
42
|
+
S as AccordionRoot,
|
|
43
43
|
b as Button,
|
|
44
44
|
$ as Heading,
|
|
45
45
|
k as Panel
|
|
@@ -13,10 +13,13 @@ export default function getAlertProps({ type, keycolor, layout, icon, flow, ...p
|
|
|
13
13
|
layout: "center" | "flex" | "grid" | "flow" | "frame" | "box" | "cluster" | "columns" | "fluidCols" | "stack" | "sideMain" | "switchCols" | "tileGrid";
|
|
14
14
|
flow: string;
|
|
15
15
|
lismClass: string;
|
|
16
|
+
util: string;
|
|
17
|
+
set: string;
|
|
16
18
|
keycolor: string;
|
|
17
19
|
ai: string;
|
|
18
20
|
p: string;
|
|
19
21
|
g: string;
|
|
20
22
|
bd: boolean;
|
|
21
23
|
bdrs: string;
|
|
24
|
+
bxsh: string;
|
|
22
25
|
};
|
|
@@ -1,18 +1,21 @@
|
|
|
1
1
|
import i from "./presets.js";
|
|
2
|
-
function f({ type: o = "alert", keycolor: t, layout:
|
|
3
|
-
const r = o ? i[o] : null,
|
|
2
|
+
function f({ type: o = "alert", keycolor: t, layout: e = "flex", icon: c, flow: l = "s", ...s }) {
|
|
3
|
+
const r = o ? i[o] : null, n = c || r?.icon || "info", a = t || r?.color || "currentColor";
|
|
4
4
|
return {
|
|
5
|
-
icon:
|
|
6
|
-
layout:
|
|
5
|
+
icon: n,
|
|
6
|
+
layout: e,
|
|
7
7
|
flow: l,
|
|
8
|
-
lismClass: "c--alert
|
|
8
|
+
lismClass: "c--alert",
|
|
9
|
+
util: "cbox",
|
|
10
|
+
set: "shadow",
|
|
9
11
|
keycolor: a,
|
|
10
12
|
ai: "center",
|
|
11
13
|
p: "15",
|
|
12
14
|
g: "15",
|
|
13
15
|
bd: !0,
|
|
14
16
|
bdrs: "10",
|
|
15
|
-
|
|
17
|
+
bxsh: "10",
|
|
18
|
+
...s
|
|
16
19
|
};
|
|
17
20
|
}
|
|
18
21
|
export {
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import u from "./presets.js";
|
|
2
|
-
function b({ type: o = "note", keycolor:
|
|
3
|
-
const
|
|
2
|
+
function b({ type: o = "note", keycolor: t, icon: c, title: s, flow: n = "s", ...e }) {
|
|
3
|
+
const l = o ? u[o] : null, r = c || l?.icon || "note", a = t || l?.color || null;
|
|
4
4
|
return {
|
|
5
5
|
icon: r,
|
|
6
6
|
title: s,
|
|
7
7
|
flow: n,
|
|
8
|
-
lismClass: "c--callout
|
|
8
|
+
lismClass: "c--callout",
|
|
9
|
+
util: "cbox",
|
|
10
|
+
set: "shadow",
|
|
9
11
|
keycolor: a,
|
|
10
12
|
p: "20",
|
|
11
13
|
g: "10",
|
|
@@ -25,10 +25,13 @@ export declare const defaultProps: {
|
|
|
25
25
|
};
|
|
26
26
|
readonly deco: {
|
|
27
27
|
readonly lismClass: "c--chat_deco";
|
|
28
|
+
readonly util: "cbox";
|
|
29
|
+
readonly isSkipFlow: true;
|
|
28
30
|
readonly pos: "absolute";
|
|
29
31
|
};
|
|
30
32
|
readonly content: {
|
|
31
33
|
readonly lismClass: "c--chat_content";
|
|
34
|
+
readonly util: "cbox";
|
|
32
35
|
readonly bdrs: "30";
|
|
33
36
|
readonly p: "20";
|
|
34
37
|
readonly lh: "s";
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import h from "../../../lism-css/dist/components/atomic/Decorator/index.js";
|
|
3
|
+
import p from "../../../lism-css/dist/components/layout/Flow/index.js";
|
|
4
|
+
import s from "../../../lism-css/dist/components/layout/Frame/index.js";
|
|
5
5
|
import l from "../../../lism-css/dist/components/layout/Grid/index.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import c from "../../../lism-css/dist/components/Lism/index.js";
|
|
7
|
+
import g, { defaultProps as t } from "../getProps.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
function
|
|
10
|
-
const { "data-chat-dir":
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
i && /* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
/* @__PURE__ */
|
|
16
|
-
/* @__PURE__ */
|
|
9
|
+
function w({ name: o, avatar: i, flow: e = "s", children: a, ...f }) {
|
|
10
|
+
const { "data-chat-dir": d, ...n } = g(f);
|
|
11
|
+
return /* @__PURE__ */ m(l, { "data-chat-dir": d, ...n, children: [
|
|
12
|
+
i && /* @__PURE__ */ r(s, { ...t.avatar, children: /* @__PURE__ */ r("img", { src: i, alt: "", width: "60", height: "60", decoding: "async" }) }),
|
|
13
|
+
o && /* @__PURE__ */ r(c, { ...t.name, children: o }),
|
|
14
|
+
/* @__PURE__ */ m(c, { ...t.body, children: [
|
|
15
|
+
/* @__PURE__ */ r(h, { ...t.deco }),
|
|
16
|
+
/* @__PURE__ */ r(p, { ...t.content, flow: e, jslf: d, children: a })
|
|
17
17
|
] })
|
|
18
18
|
] });
|
|
19
19
|
}
|
|
20
20
|
export {
|
|
21
|
-
|
|
21
|
+
w as default
|
|
22
22
|
};
|
|
@@ -7,7 +7,7 @@ export type DetailsProps = {
|
|
|
7
7
|
* Detailsコンポーネントのルート要素用プロパティを生成
|
|
8
8
|
*/
|
|
9
9
|
export declare function getDetailsProps({ lismClass, ...props }: DetailsProps): LismProps;
|
|
10
|
-
export declare function getTitleProps({ set,
|
|
10
|
+
export declare function getTitleProps({ set, ...props }: Record<string, unknown>): {
|
|
11
11
|
lismClass: string;
|
|
12
12
|
as: string;
|
|
13
13
|
fx: string;
|
|
@@ -24,7 +24,8 @@ export declare const defaultProps: {
|
|
|
24
24
|
readonly ai: "center";
|
|
25
25
|
};
|
|
26
26
|
readonly icon: {
|
|
27
|
-
readonly lismClass: "c--details_icon
|
|
27
|
+
readonly lismClass: "c--details_icon";
|
|
28
|
+
readonly atomic: "icon";
|
|
28
29
|
readonly as: "span";
|
|
29
30
|
readonly 'aria-hidden': "true";
|
|
30
31
|
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
function
|
|
4
|
-
return s.lismClass =
|
|
1
|
+
import l from "../../lism-css/dist/lib/helper/atts.js";
|
|
2
|
+
import a from "../../lism-css/dist/lib/helper/mergeSet.js";
|
|
3
|
+
function o({ lismClass: t, ...s }) {
|
|
4
|
+
return s.lismClass = l(t, "c--details"), s;
|
|
5
5
|
}
|
|
6
|
-
function
|
|
6
|
+
function n({ set: t, ...s }) {
|
|
7
7
|
return {
|
|
8
8
|
lismClass: "c--details_title",
|
|
9
9
|
as: "span",
|
|
10
10
|
fx: "1",
|
|
11
|
-
set:
|
|
12
|
-
...
|
|
11
|
+
set: a("plain", t),
|
|
12
|
+
...s
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
15
|
const c = {
|
|
16
16
|
summary: { lismClass: "c--details_summary", layout: "flex", g: "10", ai: "center" },
|
|
17
|
-
icon: { lismClass: "c--details_icon
|
|
17
|
+
icon: { lismClass: "c--details_icon", atomic: "icon", as: "span", "aria-hidden": "true" },
|
|
18
18
|
body: { lismClass: "c--details_body" },
|
|
19
19
|
content: { lismClass: "c--details_content", layout: "flow", flow: "s" }
|
|
20
20
|
};
|
|
21
21
|
export {
|
|
22
22
|
c as defaultProps,
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
o as getDetailsProps,
|
|
24
|
+
n as getTitleProps
|
|
25
25
|
};
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export type ModalRootProps = {
|
|
2
2
|
lismClass?: string;
|
|
3
3
|
set?: string;
|
|
4
|
-
unset?: string;
|
|
5
4
|
duration?: string;
|
|
6
5
|
style?: Record<string, string>;
|
|
7
6
|
[key: string]: unknown;
|
|
@@ -12,7 +11,7 @@ export type ModalInnerProps = {
|
|
|
12
11
|
style?: Record<string, string>;
|
|
13
12
|
[key: string]: unknown;
|
|
14
13
|
};
|
|
15
|
-
export declare function getProps({ lismClass, set,
|
|
14
|
+
export declare function getProps({ lismClass, set, duration, style, ...props }: ModalRootProps): {
|
|
16
15
|
style: Record<string, string>;
|
|
17
16
|
lismClass: string;
|
|
18
17
|
set: string[];
|
|
@@ -22,13 +21,13 @@ export declare function getInnerProps({ lismClass, offset, style, ...props }: Mo
|
|
|
22
21
|
lismClass: string;
|
|
23
22
|
style: Record<string, string>;
|
|
24
23
|
};
|
|
25
|
-
export declare function getOpenBtnProps({ set,
|
|
24
|
+
export declare function getOpenBtnProps({ set, ...props }: Record<string, unknown>): {
|
|
26
25
|
as: string;
|
|
27
26
|
set: string[];
|
|
28
27
|
hov: string;
|
|
29
28
|
d: string;
|
|
30
29
|
};
|
|
31
|
-
export declare function getCloseBtnProps({ set,
|
|
30
|
+
export declare function getCloseBtnProps({ set, ...props }: Record<string, unknown>): {
|
|
32
31
|
as: string;
|
|
33
32
|
set: string[];
|
|
34
33
|
hov: string;
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "../../lism-css/dist/lib/helper/atts.js";
|
|
2
2
|
import r from "../../lism-css/dist/lib/helper/mergeSet.js";
|
|
3
|
-
function f({ lismClass:
|
|
4
|
-
const
|
|
5
|
-
lismClass:
|
|
6
|
-
set: r("plain",
|
|
3
|
+
function f({ lismClass: n = "", set: o, duration: t, style: s = {}, ...i }) {
|
|
4
|
+
const l = {
|
|
5
|
+
lismClass: e(n, "c--modal"),
|
|
6
|
+
set: r("plain", o)
|
|
7
7
|
};
|
|
8
|
-
return
|
|
8
|
+
return t && (s["--duration"] = t), { as: "dialog", ...l, style: s, ...i };
|
|
9
9
|
}
|
|
10
|
-
function
|
|
11
|
-
return
|
|
12
|
-
lismClass:
|
|
13
|
-
style:
|
|
10
|
+
function u({ lismClass: n = "", offset: o, style: t = {}, ...s }) {
|
|
11
|
+
return o && (t["--offset"] = o), {
|
|
12
|
+
lismClass: e(n, "c--modal_inner"),
|
|
13
|
+
style: t,
|
|
14
14
|
...s
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function m({ set: n, ...o }) {
|
|
18
18
|
return {
|
|
19
19
|
as: "button",
|
|
20
|
-
set: r("plain",
|
|
20
|
+
set: r("plain", n),
|
|
21
21
|
hov: "o",
|
|
22
22
|
d: "inline-flex",
|
|
23
23
|
...o
|
|
24
24
|
};
|
|
25
25
|
}
|
|
26
|
-
function
|
|
26
|
+
function c({ set: n, ...o }) {
|
|
27
27
|
return {
|
|
28
28
|
as: "button",
|
|
29
|
-
set: r("plain",
|
|
29
|
+
set: r("plain", n),
|
|
30
30
|
hov: "o",
|
|
31
31
|
d: "inline-flex",
|
|
32
32
|
...o
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
const
|
|
35
|
+
const d = {
|
|
36
36
|
body: { lismClass: "c--modal_body" }
|
|
37
37
|
};
|
|
38
38
|
export {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
39
|
+
d as defaultProps,
|
|
40
|
+
c as getCloseBtnProps,
|
|
41
|
+
u as getInnerProps,
|
|
42
|
+
m as getOpenBtnProps,
|
|
43
43
|
f as getProps
|
|
44
44
|
};
|
|
@@ -5,7 +5,7 @@ type TabsProps = {
|
|
|
5
5
|
export default function getTabsProps({ lismClass, ...props }: TabsProps): {
|
|
6
6
|
lismClass: string;
|
|
7
7
|
};
|
|
8
|
-
export declare function getTabProps({ set,
|
|
8
|
+
export declare function getTabProps({ set, ...props }: Record<string, unknown>): {
|
|
9
9
|
as: string;
|
|
10
10
|
lismClass: string;
|
|
11
11
|
set: string[];
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
1
|
+
import a from "../../lism-css/dist/lib/helper/atts.js";
|
|
2
2
|
import o from "../../lism-css/dist/lib/helper/mergeSet.js";
|
|
3
|
-
function
|
|
3
|
+
function e({ lismClass: t, ...s }) {
|
|
4
4
|
return {
|
|
5
|
-
lismClass:
|
|
5
|
+
lismClass: a(t, "c--tabs"),
|
|
6
6
|
...s
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function i({ set: t, ...s }) {
|
|
10
10
|
return {
|
|
11
11
|
as: "button",
|
|
12
12
|
lismClass: "c--tabs_tab",
|
|
13
|
-
set: o("plain", t
|
|
14
|
-
...
|
|
13
|
+
set: o("plain", t),
|
|
14
|
+
...s
|
|
15
15
|
};
|
|
16
16
|
}
|
|
17
17
|
export {
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
e as default,
|
|
19
|
+
i as getTabProps
|
|
20
20
|
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import t from "
|
|
3
|
-
import f from "../../Lism/index.js";
|
|
2
|
+
import t from "../../Lism/index.js";
|
|
4
3
|
function e(r) {
|
|
5
|
-
return /* @__PURE__ */ o(
|
|
4
|
+
return /* @__PURE__ */ o(t, { atomic: "decorator", "aria-hidden": "true", ...r });
|
|
6
5
|
}
|
|
7
6
|
export {
|
|
8
7
|
e as default
|
|
@@ -1,56 +1,55 @@
|
|
|
1
1
|
import C from "./presets.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const [, c, e] = s, p = /([\w-]+)=["']([^"']*)["']/g;
|
|
2
|
+
function d(m) {
|
|
3
|
+
const a = {}, l = m.match(/<svg([^>]*?)>([\s\S]*?)<\/svg>/i);
|
|
4
|
+
if (l) {
|
|
5
|
+
const [, c, s] = l, p = /([\w-]+)=["']([^"']*)["']/g;
|
|
7
6
|
let o;
|
|
8
7
|
for (; (o = p.exec(c)) !== null; ) {
|
|
9
|
-
const [,
|
|
10
|
-
if (
|
|
8
|
+
const [, n, f] = o;
|
|
9
|
+
if (n === "style") {
|
|
11
10
|
const g = {};
|
|
12
|
-
f.split(";").forEach((
|
|
13
|
-
const [
|
|
14
|
-
|
|
15
|
-
}), a[
|
|
11
|
+
f.split(";").forEach((e) => {
|
|
12
|
+
const [r, i] = e.split(":").map((t) => t.trim());
|
|
13
|
+
r && i && (g[r] = i);
|
|
14
|
+
}), a[n] = g;
|
|
16
15
|
} else
|
|
17
|
-
a[
|
|
16
|
+
a[n] = f;
|
|
18
17
|
}
|
|
19
|
-
return { svgProps: a, svgContent:
|
|
18
|
+
return { svgProps: a, svgContent: s };
|
|
20
19
|
}
|
|
21
20
|
return {};
|
|
22
21
|
}
|
|
23
|
-
function
|
|
24
|
-
let o = a || "span",
|
|
22
|
+
function P({ lismClass: m, as: a, icon: l, label: c, exProps: s = {}, ...p }) {
|
|
23
|
+
let o = a || "span", n = "";
|
|
25
24
|
const {
|
|
26
25
|
style: f = {},
|
|
27
26
|
className: g = "",
|
|
28
|
-
...
|
|
27
|
+
...e
|
|
29
28
|
} = p;
|
|
30
|
-
let
|
|
31
|
-
if (
|
|
29
|
+
let r = f, i = g;
|
|
30
|
+
if (e.viewBox) {
|
|
32
31
|
o = "svg";
|
|
33
|
-
const t =
|
|
34
|
-
t && delete
|
|
35
|
-
} else if (
|
|
32
|
+
const t = e.size;
|
|
33
|
+
t && delete e.size, e.width || (s.width = t || "1em"), e.height || (s.height = t || "1em");
|
|
34
|
+
} else if (e.src)
|
|
36
35
|
o = "img";
|
|
37
|
-
else if (
|
|
38
|
-
if (typeof
|
|
39
|
-
if (
|
|
36
|
+
else if (l)
|
|
37
|
+
if (typeof l == "string")
|
|
38
|
+
if (l.startsWith("<svg")) {
|
|
40
39
|
o = "_SVG_";
|
|
41
|
-
const { svgProps: t = {}, svgContent:
|
|
42
|
-
|
|
40
|
+
const { svgProps: t = {}, svgContent: h = "" } = d(l), { class: u, style: v, ...y } = t;
|
|
41
|
+
u && (i = i ? `${i} ${u}` : u), r = { ...r, ...v }, s = { ...s, ...y, fill: "currentColor" }, n = h;
|
|
43
42
|
} else {
|
|
44
|
-
const t = C[
|
|
45
|
-
t != null && (o = "_SVG_",
|
|
43
|
+
const t = C[l] || null;
|
|
44
|
+
t != null && (o = "_SVG_", s = { ...s, ...t });
|
|
46
45
|
}
|
|
47
|
-
else if (typeof
|
|
48
|
-
const { as: t, ...
|
|
49
|
-
o = t,
|
|
46
|
+
else if (typeof l == "object" && l.as) {
|
|
47
|
+
const { as: t, ...h } = l;
|
|
48
|
+
o = t, s = { ...s, ...h };
|
|
50
49
|
} else
|
|
51
|
-
o =
|
|
52
|
-
return c ? (
|
|
50
|
+
o = l;
|
|
51
|
+
return c ? (s["aria-label"] = c, s.role = "img") : s["aria-hidden"] = "true", e.lismClass = m, e.atomic = "icon", i && (e.className = i), e.style = { ...r }, { Component: o, lismProps: e, exProps: s, content: n };
|
|
53
52
|
}
|
|
54
53
|
export {
|
|
55
|
-
|
|
54
|
+
P as default
|
|
56
55
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import o from "./defaults/tokens.js";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
const
|
|
2
|
+
import r from "./defaults/props.js";
|
|
3
|
+
import t from "./defaults/traits.js";
|
|
4
|
+
const s = {
|
|
5
5
|
tokens: o,
|
|
6
|
-
props:
|
|
7
|
-
|
|
6
|
+
props: r,
|
|
7
|
+
traits: t
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
s as default
|
|
11
11
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = {
|
|
2
2
|
isContainer: "is--container",
|
|
3
3
|
isWrapper: {
|
|
4
4
|
className: "is--wrapper",
|
|
@@ -8,11 +8,12 @@ const s = {
|
|
|
8
8
|
tokenKey: "sz"
|
|
9
9
|
},
|
|
10
10
|
isLayer: "is--layer",
|
|
11
|
-
|
|
11
|
+
isBoxLink: "is--boxLink",
|
|
12
|
+
isCoverLink: "is--coverLink",
|
|
12
13
|
isSide: "is--side",
|
|
13
14
|
isSkipFlow: "is--skipFlow",
|
|
14
15
|
isVertical: "is--vertical"
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
i as default
|
|
18
19
|
};
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import r from "./default-config.js";
|
|
2
2
|
import a from "lism-css/config.js";
|
|
3
|
-
import { objDeepMerge as
|
|
4
|
-
let
|
|
5
|
-
typeof window < "u" && window._LISM_CSS_CONFIG_ && (
|
|
6
|
-
const S =
|
|
3
|
+
import { objDeepMerge as s, arrayConvertToSet as t } from "./helper.js";
|
|
4
|
+
let e = s(r, a);
|
|
5
|
+
typeof window < "u" && window._LISM_CSS_CONFIG_ && (e = s(e, window._LISM_CSS_CONFIG_));
|
|
6
|
+
const S = e, { tokens: o, props: _, traits: l } = S, p = {
|
|
7
7
|
color: [...o.c.values, ...o.palette.values],
|
|
8
8
|
...o
|
|
9
|
-
},
|
|
9
|
+
}, u = t(structuredClone(p)), I = t(structuredClone(_)), c = l, i = ["sm", "md", "lg", "xl"], O = ["base", ...i];
|
|
10
10
|
export {
|
|
11
|
-
|
|
11
|
+
i as BREAK_POINTS,
|
|
12
12
|
O as BREAK_POINTS_ALL,
|
|
13
13
|
S as CONFIG,
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
c as
|
|
14
|
+
I as PROPS,
|
|
15
|
+
u as TOKENS,
|
|
16
|
+
c as TRAITS
|
|
17
17
|
};
|