@lism-css/ui 0.9.2 → 0.10.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/README.ja.md +137 -0
- package/README.md +93 -5
- 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 +47 -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/DummyImage/astro/index.d.ts +1 -0
- package/dist/components/DummyImage/react/DummyImage.d.ts +2 -0
- package/dist/components/DummyImage/react/DummyImage.js +8 -0
- package/dist/components/DummyImage/react/index.d.ts +1 -0
- package/dist/components/DummyText/astro/index.d.ts +1 -0
- package/dist/components/DummyText/getContent.d.ts +11 -0
- package/dist/components/DummyText/getContent.js +9 -0
- package/dist/components/DummyText/react/DummyText.d.ts +10 -0
- package/dist/components/DummyText/react/DummyText.js +10 -0
- package/dist/components/DummyText/react/index.d.ts +1 -0
- package/dist/components/DummyText/texts.d.ts +22 -0
- package/dist/components/DummyText/texts.js +39 -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 +9 -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 +48 -0
- package/dist/components/Tabs/react/index.js +9 -0
- package/dist/components/Tabs/setTabs.js +10 -11
- package/dist/components/astro.d.ts +2 -0
- package/dist/components/react.d.ts +2 -0
- package/dist/components/react.js +30 -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 +56 -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/config/default-config.js +11 -0
- package/dist/lism-css/dist/config/defaults/props.js +340 -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 +42 -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/style.css +1 -1
- package/dist/ui.css +1 -0
- package/package.json +9 -7
- package/src/components/Accordion/_style.css +69 -69
- package/src/components/Accordion/astro/Button.astro +2 -2
- package/src/components/Accordion/astro/Heading.astro +1 -1
- package/src/components/Accordion/astro/Item.astro +7 -7
- package/src/components/Accordion/astro/Panel.astro +3 -3
- package/src/components/Accordion/astro/Root.astro +3 -3
- package/src/components/Accordion/getProps.js +54 -54
- package/src/components/Accordion/react/AccIcon.jsx +1 -1
- package/src/components/Accordion/react/Accordion.jsx +37 -36
- package/src/components/Accordion/script.js +1 -1
- package/src/components/Accordion/setAccordion.js +93 -93
- package/src/components/Alert/astro/Alert.astro +6 -6
- package/src/components/Alert/getProps.ts +22 -22
- package/src/components/Alert/presets.ts +26 -26
- package/src/components/Alert/react/Alert.tsx +9 -9
- package/src/components/Avatar/astro/Avatar.astro +2 -2
- package/src/components/Avatar/react/Avatar.jsx +5 -5
- package/src/components/Badge/_style.css +14 -14
- package/src/components/Badge/astro/Badge.astro +4 -4
- package/src/components/Badge/react/Badge.jsx +6 -6
- package/src/components/Button/_style.css +29 -29
- package/src/components/Button/astro/Button.astro +4 -4
- package/src/components/Button/react/Button.jsx +6 -6
- package/src/components/Callout/astro/Callout.astro +13 -13
- package/src/components/Callout/getProps.ts +24 -24
- package/src/components/Callout/presets.ts +26 -26
- package/src/components/Callout/react/Callout.tsx +16 -16
- package/src/components/Chat/_style.css +49 -49
- package/src/components/Chat/astro/Chat.astro +27 -27
- package/src/components/Chat/getProps.js +40 -45
- package/src/components/Chat/react/Chat.jsx +17 -17
- package/src/components/Details/_style.css +39 -39
- package/src/components/Details/astro/Content.astro +3 -3
- package/src/components/Details/astro/Details.astro +1 -1
- package/src/components/Details/astro/Icon.astro +1 -1
- package/src/components/Details/astro/Summary.astro +2 -2
- package/src/components/Details/astro/Title.astro +1 -1
- package/src/components/Details/getProps.js +7 -7
- package/src/components/Details/react/Details.jsx +24 -24
- package/src/components/DummyImage/astro/DummyImage.astro +7 -0
- package/src/components/DummyImage/astro/index.ts +1 -0
- package/src/components/DummyImage/react/DummyImage.tsx +5 -0
- package/src/components/DummyImage/react/index.ts +1 -0
- package/src/components/DummyText/astro/DummyText.astro +9 -0
- package/src/components/DummyText/astro/index.ts +1 -0
- package/src/components/DummyText/getContent.ts +39 -0
- package/src/components/DummyText/react/DummyText.tsx +15 -0
- package/src/components/DummyText/react/index.ts +1 -0
- package/src/components/DummyText/texts.ts +39 -0
- package/src/components/Modal/_style.css +34 -34
- package/src/components/Modal/astro/Body.astro +1 -1
- package/src/components/Modal/astro/CloseBtn.astro +10 -10
- package/src/components/Modal/astro/Inner.astro +1 -1
- package/src/components/Modal/astro/Modal.astro +3 -3
- package/src/components/Modal/astro/OpenBtn.astro +1 -1
- package/src/components/Modal/getProps.js +19 -19
- package/src/components/Modal/react/Body.jsx +5 -5
- package/src/components/Modal/react/CloseBtn.jsx +13 -13
- package/src/components/Modal/react/Inner.jsx +1 -1
- package/src/components/Modal/react/Modal.jsx +12 -11
- package/src/components/Modal/react/OpenBtn.jsx +5 -5
- package/src/components/Modal/script.js +1 -1
- package/src/components/Modal/setModal.ts +92 -92
- package/src/components/NavMenu/_style.css +17 -17
- package/src/components/NavMenu/astro/Item.astro +1 -1
- package/src/components/NavMenu/astro/Link.astro +1 -1
- package/src/components/NavMenu/astro/Nest.astro +1 -1
- package/src/components/NavMenu/astro/Root.astro +1 -1
- package/src/components/NavMenu/getProps.js +28 -28
- package/src/components/NavMenu/react/NavMenu.jsx +4 -4
- package/src/components/ShapeDivider/_style.css +51 -51
- package/src/components/ShapeDivider/astro/ShapeDivider.astro +20 -20
- package/src/components/ShapeDivider/getProps.js +23 -23
- package/src/components/ShapeDivider/react/ShapeDivider.jsx +24 -24
- package/src/components/Tabs/_style.css +29 -29
- package/src/components/Tabs/astro/Tab.astro +2 -2
- package/src/components/Tabs/astro/TabItem.astro +1 -1
- package/src/components/Tabs/astro/TabList.astro +2 -2
- package/src/components/Tabs/astro/TabPanel.astro +2 -2
- package/src/components/Tabs/astro/Tabs.astro +20 -20
- package/src/components/Tabs/astro/transformTabitems.js +30 -30
- package/src/components/Tabs/getProps.js +4 -4
- package/src/components/Tabs/react/Tab.jsx +4 -12
- package/src/components/Tabs/react/TabItem.jsx +1 -1
- package/src/components/Tabs/react/TabList.jsx +2 -2
- package/src/components/Tabs/react/TabPanel.jsx +2 -2
- package/src/components/Tabs/react/Tabs.jsx +46 -47
- package/src/components/Tabs/script.js +4 -4
- package/src/components/Tabs/setTabs.js +70 -70
- package/src/components/astro.ts +2 -0
- package/src/components/react.ts +2 -0
- package/src/helper/animation.ts +10 -10
- package/src/helper/uuid.js +3 -3
|
@@ -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 @@
|
|
|
1
|
+
export { default } from './DummyImage.astro';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import i from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
+
function o(m) {
|
|
4
|
+
return /* @__PURE__ */ t(i, { as: "img", src: "https://cdn.lism-css.com/dummy-image.jpg", width: 600, height: 400, alt: "", ...m });
|
|
5
|
+
}
|
|
6
|
+
export {
|
|
7
|
+
o as default
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DummyImage';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DummyText.astro';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as TEXTS } from './texts';
|
|
2
|
+
type Lang = keyof typeof TEXTS;
|
|
3
|
+
type Length = string;
|
|
4
|
+
interface GetContentOptions {
|
|
5
|
+
pre?: string;
|
|
6
|
+
length?: Length;
|
|
7
|
+
lang?: Lang;
|
|
8
|
+
offset?: number;
|
|
9
|
+
}
|
|
10
|
+
export default function getContent({ pre, length, lang, offset }: GetContentOptions): string;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import s from "./texts.js";
|
|
2
|
+
const l = (r) => r.split(/([,.、。])/).filter((e) => e !== "").reduce((e, i, n, o) => (n % 2 === 0 && e.push(i + (o[n + 1] || "")), e), []);
|
|
3
|
+
function c({ pre: r = "", length: e = "m", lang: i = "en", offset: n = 0 }) {
|
|
4
|
+
let t = s[i]?.[e] || "";
|
|
5
|
+
return n && (t = l(t).slice(n).join("").trim(), t = t.charAt(0).toUpperCase() + t.slice(1)), r && (t = r + t), t;
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
c as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
3
|
+
type DummyTextProps<T extends ElementType = 'p'> = LismComponentProps<T> & {
|
|
4
|
+
pre?: string;
|
|
5
|
+
length?: string;
|
|
6
|
+
lang?: 'ja' | 'en' | 'ar';
|
|
7
|
+
offset?: number;
|
|
8
|
+
};
|
|
9
|
+
export default function DummyText<T extends ElementType = 'p'>({ pre, length, lang, offset, ...props }: DummyTextProps<T>): import("react").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import u from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
+
import i from "../getContent.js";
|
|
4
|
+
function c({ pre: t = "", length: n = "m", lang: o = "en", offset: e = 0, ...r }) {
|
|
5
|
+
const m = i({ pre: t, lang: o, length: n, offset: e });
|
|
6
|
+
return /* @__PURE__ */ f(u, { ...r, dangerouslySetInnerHTML: { __html: m } });
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
c as default
|
|
10
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './DummyText';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
ja: {
|
|
3
|
+
xs: string;
|
|
4
|
+
s: string;
|
|
5
|
+
m: string;
|
|
6
|
+
l: string;
|
|
7
|
+
xl: string;
|
|
8
|
+
codes: string;
|
|
9
|
+
};
|
|
10
|
+
en: {
|
|
11
|
+
xs: string;
|
|
12
|
+
s: string;
|
|
13
|
+
m: string;
|
|
14
|
+
l: string;
|
|
15
|
+
xl: string;
|
|
16
|
+
codes: string;
|
|
17
|
+
};
|
|
18
|
+
ar: {
|
|
19
|
+
s: string;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
ja: [
|
|
3
|
+
"ロレム・イプサムの座り雨。",
|
|
4
|
+
"目まぐるしい文章の流れの中で、それは静かに歩く仮の言葉です。",
|
|
5
|
+
"Elitも穏やかに続いていきますが、積み重ねられてきた「LiberroyとFoogの取り組み」は、余白のようなものです。",
|
|
6
|
+
"作業が進むにつれて、工夫や考えとともに関心が折り重なりながらも、必要以上に主張せず彼らの作品は私たちに一定の示唆を与えてくれます。",
|
|
7
|
+
"内容の違いを比べるためのドラーとして、静かにそこにあります。選ばれた事実や、意味を限定しない言葉の並びは、全体の雰囲気を整える役割を果たします。時間の流れの中で、そうした文章は自然に形を変え、使う人の意図に委ねられていきます。"
|
|
8
|
+
],
|
|
9
|
+
en: [
|
|
10
|
+
"Lorem ipsum dolor sit amet.",
|
|
11
|
+
"Consectetur adipiscing elit, sed do eiusmod tempor Incididunt ut.",
|
|
12
|
+
"Labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut.",
|
|
13
|
+
"Aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint.",
|
|
14
|
+
"Occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. Sed ut perspiciatis undeomnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam."
|
|
15
|
+
]
|
|
16
|
+
}, i = {
|
|
17
|
+
ja: {
|
|
18
|
+
xs: e.ja[0],
|
|
19
|
+
s: e.ja[0] + e.ja[1],
|
|
20
|
+
m: e.ja[0] + e.ja[1] + e.ja[2],
|
|
21
|
+
l: e.ja[0] + e.ja[1] + e.ja[2] + e.ja[3],
|
|
22
|
+
xl: e.ja[0] + e.ja[1] + e.ja[2] + e.ja[3] + e.ja[4],
|
|
23
|
+
codes: "ロレム・イプサムの<i>座り雨</i>、それは<a href='###'>静かに歩く仮の言葉</a>です。長いあいだ積み重ねられてきた<code>Liberroy</code>と<code>Foog</code>の取り組み」は、私たちに<b>一定の示唆</b>を与えてくれます。"
|
|
24
|
+
},
|
|
25
|
+
en: {
|
|
26
|
+
xs: e.en[0],
|
|
27
|
+
s: e.en[0] + " " + e.en[1],
|
|
28
|
+
m: e.en[0] + " " + e.en[1] + " " + e.en[2],
|
|
29
|
+
l: e.en[0] + " " + e.en[1] + " " + e.en[2] + " " + e.en[3],
|
|
30
|
+
xl: e.en[0] + " " + e.en[1] + " " + e.en[2] + " " + e.en[3] + " " + e.en[4],
|
|
31
|
+
codes: "Lorem ipsum dolor <i>sit amet</i>. consectetur <a href='###'>adipisicing elit</a>, sed do eiusmod tempor. Non facere <code>Laudantium</code> ex eos <b>doloribus aut dolore</b> nisi provident."
|
|
32
|
+
},
|
|
33
|
+
ar: {
|
|
34
|
+
s: "هذا نص وهمي أنا أكتب جمل ليس لها معنى معين.هذا نص وهمي أنا أكتب جمل ليس لها معنى معين.هذا نص وهمي أنا أكتب جمل ليس لها معنى معين."
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
i as default
|
|
39
|
+
};
|
|
@@ -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
|
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import o from "../../lism-css/dist/lib/getMaybeCssVar.js";
|
|
2
|
+
function l({ hovC: s, hovBgc: n, itemP: t, style: i = {}, ...r }) {
|
|
3
|
+
const e = { ...i };
|
|
4
|
+
return n && (e["--hov-bgc"] = o(n, "color")), s && (e["--hov-c"] = o(s, "color")), t && (e["--_item-p"] = o(t, "space")), {
|
|
5
|
+
lismClass: "c--navMenu",
|
|
6
|
+
as: "ul",
|
|
7
|
+
style: e,
|
|
8
|
+
...r
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
function c(s) {
|
|
12
|
+
return {
|
|
13
|
+
lismClass: "c--navMenu_nest",
|
|
14
|
+
as: "ul",
|
|
15
|
+
"px-s": "20",
|
|
16
|
+
...s
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
function u(s) {
|
|
20
|
+
return {
|
|
21
|
+
lismClass: "c--navMenu_item",
|
|
22
|
+
as: "li",
|
|
23
|
+
...s
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function p({ href: s, as: n = "span", ...t }) {
|
|
27
|
+
return {
|
|
28
|
+
lismClass: "c--navMenu_link",
|
|
29
|
+
as: s ? "a" : n,
|
|
30
|
+
href: s,
|
|
31
|
+
c: "inherit",
|
|
32
|
+
...t
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
u as getItemProps,
|
|
37
|
+
p as getLinkProps,
|
|
38
|
+
c as getNestProps,
|
|
39
|
+
l as getRootProps
|
|
40
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import n from "../../../lism-css/dist/components/Flex/index.js";
|
|
3
|
+
import e from "../../../lism-css/dist/components/Lism/index.js";
|
|
4
|
+
import m from "../../../lism-css/dist/components/Stack/index.js";
|
|
5
|
+
import { getNestProps as i, getLinkProps as f, getItemProps as p, getRootProps as u } from "../getProps.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
function I({ children: t, ...o }) {
|
|
8
|
+
return /* @__PURE__ */ r(m, { ...u(o), children: t });
|
|
9
|
+
}
|
|
10
|
+
function L({ children: t, ...o }) {
|
|
11
|
+
return /* @__PURE__ */ r(m, { ...i(o), children: t });
|
|
12
|
+
}
|
|
13
|
+
function N({ children: t, ...o }) {
|
|
14
|
+
return /* @__PURE__ */ r(e, { ...p(o), children: t });
|
|
15
|
+
}
|
|
16
|
+
function R({ children: t, ...o }) {
|
|
17
|
+
return /* @__PURE__ */ r(n, { ...f(o), children: t });
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
N as Item,
|
|
21
|
+
R as Link,
|
|
22
|
+
L as Nest,
|
|
23
|
+
I as Root
|
|
24
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
function d({ viewBox: a, isAnimation: r, isEmpty: s, level: n = 5, stretch: i, offset: u, flip: l, style: o = {}, ...f }) {
|
|
2
|
+
if (n === 0) return null;
|
|
3
|
+
const t = { ...o };
|
|
4
|
+
t["--level"] = n || null, t["--_inner-offset"] = u || null, t["--_inner-stretch"] = i || null;
|
|
5
|
+
const e = {
|
|
6
|
+
lismClass: "c--shapeDivider",
|
|
7
|
+
"max-sz": "full",
|
|
8
|
+
"aria-hidden": "true"
|
|
9
|
+
};
|
|
10
|
+
return l && (e["data-flip"] = l), r && (e["data-has-animation"] = "true"), {
|
|
11
|
+
...e,
|
|
12
|
+
style: t,
|
|
13
|
+
// SVG用のprops
|
|
14
|
+
viewBox: a,
|
|
15
|
+
isEmpty: s,
|
|
16
|
+
// その他のprops
|
|
17
|
+
...f
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export {
|
|
21
|
+
d as default
|
|
22
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import l from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
+
import p from "../getProps.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
function v({ children: i, ...o }) {
|
|
6
|
+
const r = p(o);
|
|
7
|
+
if (!r) return null;
|
|
8
|
+
const { viewBox: s, isAnimation: m, isEmpty: t, ...n } = r;
|
|
9
|
+
return /* @__PURE__ */ e(l, { ...n, children: t ? null : /* @__PURE__ */ e("div", { className: "c--shapeDivider_inner", children: /* @__PURE__ */ e(
|
|
10
|
+
"svg",
|
|
11
|
+
{
|
|
12
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
13
|
+
className: "c--shapeDivider_svg",
|
|
14
|
+
viewBox: s,
|
|
15
|
+
width: "100%",
|
|
16
|
+
height: "100%",
|
|
17
|
+
fill: "currentColor",
|
|
18
|
+
focusable: "false",
|
|
19
|
+
preserveAspectRatio: "none",
|
|
20
|
+
children: i
|
|
21
|
+
}
|
|
22
|
+
) }) });
|
|
23
|
+
}
|
|
24
|
+
export {
|
|
25
|
+
v as default
|
|
26
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import l from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
+
function i({ tabId: t = "tab", index: a = 0, isActive: r = !1, ...o }) {
|
|
4
|
+
const s = `${t}-${a}`;
|
|
5
|
+
return /* @__PURE__ */ e(l, { as: "button", lismClass: "c--tabs_tab", setPlain: !0, role: "tab", "aria-controls": s, "aria-selected": r ? "true" : "false", ...o });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
i as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import n from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
+
function i({ tabId: a = "tab", isActive: t = !1, index: e = 0, ...r }) {
|
|
4
|
+
const l = `${a}-${e}`;
|
|
5
|
+
return /* @__PURE__ */ o(n, { id: l, role: "tabpanel", "aria-hidden": t ? "false" : "true", lismClass: "c--tabs_panel", ...r });
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
i as default
|
|
9
|
+
};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
1
|
export default function Tabs({ tabId, defaultIndex, listProps, children, ...props }: {
|
|
3
2
|
[x: string]: any;
|
|
4
3
|
tabId?: string | undefined;
|
|
5
4
|
defaultIndex?: number | undefined;
|
|
6
5
|
listProps?: {} | undefined;
|
|
7
6
|
children: any;
|
|
8
|
-
}):
|
|
7
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as m, jsxs as v, Fragment as E } from "react/jsx-runtime";
|
|
3
|
+
import { useState as P, useId as g, Children as c, isValidElement as f, createElement as b } from "react";
|
|
4
|
+
import k from "../../../lism-css/dist/components/Lism/index.js";
|
|
5
|
+
import l from "./Tab.js";
|
|
6
|
+
import A from "./TabItem.js";
|
|
7
|
+
import j from "./TabList.js";
|
|
8
|
+
import x from "./TabPanel.js";
|
|
9
|
+
import F from "../getProps.js";
|
|
10
|
+
/* empty css */
|
|
11
|
+
function H({ tabId: I = "", defaultIndex: u = 1, listProps: T = {}, children: p, ...d }) {
|
|
12
|
+
const [i, y] = P(u), n = I || g(), r = [], a = [];
|
|
13
|
+
return c.forEach(p, (e, h) => {
|
|
14
|
+
const t = h + 1;
|
|
15
|
+
f(e) && e.type === A && c.forEach(e.props.children, (o) => {
|
|
16
|
+
if (f(o)) {
|
|
17
|
+
if (o.type === l) {
|
|
18
|
+
const s = o.props;
|
|
19
|
+
r.push(
|
|
20
|
+
/* @__PURE__ */ b(
|
|
21
|
+
l,
|
|
22
|
+
{
|
|
23
|
+
...s,
|
|
24
|
+
tabId: n,
|
|
25
|
+
index: t,
|
|
26
|
+
key: t,
|
|
27
|
+
isActive: t === i,
|
|
28
|
+
onClick: () => y(t)
|
|
29
|
+
}
|
|
30
|
+
)
|
|
31
|
+
);
|
|
32
|
+
} else if (o.type === x) {
|
|
33
|
+
const s = o.props;
|
|
34
|
+
a.push(/* @__PURE__ */ b(x, { ...s, tabId: n, index: t, key: t, isActive: t === i }));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
}), /* @__PURE__ */ m(k, { ...F(d), children: r.length === 0 ? (
|
|
39
|
+
// TabItemを使わず直接TabListなどを子要素に配置する場合
|
|
40
|
+
p
|
|
41
|
+
) : /* @__PURE__ */ v(E, { children: [
|
|
42
|
+
/* @__PURE__ */ m(j, { ...T, children: r }),
|
|
43
|
+
a
|
|
44
|
+
] }) });
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
H as default
|
|
48
|
+
};
|
|
@@ -1,29 +1,28 @@
|
|
|
1
|
-
function
|
|
1
|
+
function u(t) {
|
|
2
2
|
t.preventDefault();
|
|
3
3
|
const r = t.currentTarget;
|
|
4
|
-
|
|
4
|
+
i(r);
|
|
5
5
|
}
|
|
6
|
-
const
|
|
6
|
+
const i = (t) => {
|
|
7
7
|
if (t.getAttribute("aria-selected") === "true") return;
|
|
8
8
|
const e = t.getAttribute("aria-controls"), n = document.getElementById(e);
|
|
9
9
|
if (n === null) return;
|
|
10
10
|
const s = t.parentNode.parentNode.querySelector('[aria-selected="true"]'), o = s.getAttribute("aria-controls"), a = document.getElementById(o);
|
|
11
11
|
t.setAttribute("aria-selected", "true"), s.setAttribute("aria-selected", "false"), a.setAttribute("aria-hidden", "true"), n.setAttribute("aria-hidden", "false");
|
|
12
12
|
};
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
b(u);
|
|
13
|
+
function b(t) {
|
|
14
|
+
t.querySelectorAll('button[role="tab"]').forEach((l) => {
|
|
15
|
+
l.addEventListener("click", function(d) {
|
|
16
|
+
u(d);
|
|
18
17
|
});
|
|
19
18
|
});
|
|
20
|
-
const e =
|
|
19
|
+
const e = window?.location?.href;
|
|
21
20
|
if (!e || !(e.indexOf("?lism-tab=") !== -1)) return;
|
|
22
21
|
const o = new URL(e).searchParams.get("lism-tab"), a = t.querySelector(`[aria-controls="${o}"]`);
|
|
23
|
-
a && (t.dataset.hasTabLink = "1",
|
|
22
|
+
a && (t.dataset.hasTabLink = "1", i(a), setTimeout(() => {
|
|
24
23
|
delete t.dataset.hasTabLink;
|
|
25
24
|
}, 10));
|
|
26
25
|
}
|
|
27
26
|
export {
|
|
28
|
-
|
|
27
|
+
b as default
|
|
29
28
|
};
|