@lism-css/ui 0.10.0 → 0.12.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.md +1 -1
- package/dist/components/Accordion/Accordion.stories.d.ts +7 -0
- package/dist/components/Accordion/getProps.d.ts +55 -42
- package/dist/components/Accordion/getProps.js +36 -32
- package/dist/components/Accordion/react/AccIcon.d.ts +2 -1
- package/dist/components/Accordion/react/Accordion.d.ts +12 -21
- package/dist/components/Accordion/react/Accordion.js +30 -29
- package/dist/components/Accordion/react/index.d.ts +10 -11
- package/dist/components/Accordion/setAccordion.d.ts +6 -3
- package/dist/components/Accordion/setAccordion.js +12 -10
- package/dist/components/Alert/Alert.stories.d.ts +13 -0
- package/dist/components/Alert/getProps.d.ts +6 -4
- package/dist/components/Alert/react/Alert.d.ts +3 -4
- package/dist/components/Alert/react/Alert.js +2 -2
- package/dist/components/Avatar/Avatar.stories.d.ts +8 -0
- package/dist/components/Avatar/react/Avatar.d.ts +10 -6
- package/dist/components/Avatar/react/Avatar.js +1 -1
- package/dist/components/Badge/Badge.stories.d.ts +8 -0
- package/dist/components/Badge/react/Badge.d.ts +3 -1
- package/dist/components/Badge/react/Badge.js +5 -8
- package/dist/components/Button/Button.stories.d.ts +8 -0
- package/dist/components/Button/react/Button.d.ts +3 -1
- package/dist/components/Button/react/Button.js +3 -6
- package/dist/components/Callout/Callout.stories.d.ts +12 -0
- package/dist/components/Callout/getProps.d.ts +3 -3
- package/dist/components/Callout/getProps.js +11 -12
- package/dist/components/Callout/react/Callout.d.ts +3 -4
- package/dist/components/Callout/react/Callout.js +4 -4
- package/dist/components/Chat/Chat.stories.d.ts +9 -0
- package/dist/components/Chat/getProps.d.ts +43 -44
- package/dist/components/Chat/getProps.js +2 -2
- package/dist/components/Chat/react/Chat.d.ts +11 -7
- package/dist/components/Chat/react/Chat.js +10 -10
- package/dist/components/Details/Details.stories.d.ts +6 -0
- package/dist/components/Details/getProps.d.ts +34 -35
- package/dist/components/Details/getProps.js +16 -6
- package/dist/components/Details/react/Details.d.ts +11 -20
- package/dist/components/Details/react/Details.js +15 -15
- package/dist/components/Details/react/index.d.ts +7 -7
- package/dist/components/DummyImage/DummyImage.stories.d.ts +7 -0
- package/dist/components/DummyText/DummyText.stories.d.ts +9 -0
- package/dist/components/Modal/Modal.stories.d.ts +6 -0
- package/dist/components/Modal/getProps.d.ts +36 -36
- package/dist/components/Modal/getProps.js +36 -17
- package/dist/components/Modal/react/Body.d.ts +2 -4
- package/dist/components/Modal/react/CloseBtn.d.ts +9 -7
- package/dist/components/Modal/react/CloseBtn.js +5 -5
- package/dist/components/Modal/react/Inner.d.ts +3 -4
- package/dist/components/Modal/react/Modal.d.ts +4 -4
- package/dist/components/Modal/react/Modal.js +11 -9
- package/dist/components/Modal/react/OpenBtn.d.ts +7 -5
- package/dist/components/Modal/react/OpenBtn.js +4 -4
- package/dist/components/Modal/react/index.d.ts +7 -8
- package/dist/components/NavMenu/NavMenu.stories.d.ts +7 -0
- package/dist/components/NavMenu/getProps.d.ts +31 -29
- package/dist/components/NavMenu/react/NavMenu.d.ts +6 -16
- package/dist/components/NavMenu/react/NavMenu.js +21 -17
- package/dist/components/NavMenu/react/index.d.ts +6 -6
- package/dist/components/ShapeDivider/ShapeDivider.stories.d.ts +10 -0
- package/dist/components/ShapeDivider/getProps.d.ts +16 -11
- package/dist/components/ShapeDivider/getProps.js +10 -12
- package/dist/components/ShapeDivider/react/ShapeDivider.d.ts +3 -4
- package/dist/components/ShapeDivider/react/ShapeDivider.js +3 -3
- package/dist/components/Tabs/Tabs.stories.d.ts +6 -0
- package/dist/components/Tabs/getProps.d.ts +11 -4
- package/dist/components/Tabs/getProps.js +14 -4
- package/dist/components/Tabs/react/Tab.d.ts +8 -6
- package/dist/components/Tabs/react/Tab.js +15 -6
- package/dist/components/Tabs/react/TabItem.d.ts +7 -4
- package/dist/components/Tabs/react/TabList.d.ts +2 -1
- package/dist/components/Tabs/react/TabPanel.d.ts +8 -6
- package/dist/components/Tabs/react/Tabs.d.ts +9 -7
- package/dist/components/Tabs/react/Tabs.js +50 -36
- package/dist/components/Tabs/react/index.d.ts +8 -8
- package/dist/components/Tabs/setTabs.d.ts +1 -1
- package/dist/components/Tabs/setTabs.js +25 -15
- package/dist/lism-css/dist/components/{Center → layout/Center}/index.js +1 -1
- package/dist/lism-css/dist/components/{Flex → layout/Flex}/index.js +1 -1
- package/dist/lism-css/dist/components/{Flow → layout/Flow}/index.js +1 -1
- package/dist/lism-css/dist/components/{Frame → layout/Frame}/index.js +1 -1
- package/dist/lism-css/dist/components/{Grid → layout/Grid}/index.js +1 -1
- package/dist/lism-css/dist/components/{Stack → layout/Stack}/index.js +1 -1
- package/dist/lism-css/dist/config/defaults/props.js +16 -26
- package/dist/lism-css/dist/config/defaults/states.js +3 -24
- package/dist/lism-css/dist/config/defaults/tokens.js +2 -2
- package/dist/lism-css/dist/lib/getLayoutProps.js +6 -9
- package/dist/lism-css/dist/lib/getLismProps.js +94 -92
- package/dist/lism-css/dist/lib/helper/mergeSet.js +14 -0
- package/dist/style.css +1 -1
- package/dist/ui.css +1 -1
- package/package.json +14 -7
- package/src/components/Accordion/Accordion.stories.tsx +105 -0
- package/src/components/Accordion/astro/Button.astro +2 -2
- package/src/components/Accordion/getProps.ts +91 -0
- package/src/components/Accordion/react/{AccIcon.jsx → AccIcon.tsx} +2 -2
- package/src/components/Accordion/react/{Accordion.jsx → Accordion.tsx} +33 -11
- package/src/components/Accordion/setAccordion.ts +120 -0
- package/src/components/Alert/Alert.stories.tsx +64 -0
- package/src/components/Alert/getProps.ts +5 -3
- package/src/components/Alert/react/Alert.tsx +3 -3
- package/src/components/Avatar/Avatar.stories.tsx +42 -0
- package/src/components/Avatar/react/Avatar.tsx +17 -0
- package/src/components/Badge/Badge.stories.tsx +40 -0
- package/src/components/Badge/astro/Badge.astro +1 -7
- package/src/components/Badge/react/Badge.tsx +7 -0
- package/src/components/Button/Button.stories.tsx +44 -0
- package/src/components/Button/astro/Button.astro +1 -7
- package/src/components/Button/react/Button.tsx +7 -0
- package/src/components/Callout/Callout.stories.tsx +55 -0
- package/src/components/Callout/getProps.ts +5 -5
- package/src/components/Callout/react/Callout.tsx +3 -3
- package/src/components/Chat/Chat.stories.tsx +58 -0
- package/src/components/Chat/_style.css +5 -5
- package/src/components/Chat/{getProps.js → getProps.ts} +10 -4
- package/src/components/Chat/react/{Chat.jsx → Chat.tsx} +13 -3
- package/src/components/Details/Details.stories.tsx +61 -0
- package/src/components/Details/astro/Title.astro +2 -2
- package/src/components/Details/{getProps.js → getProps.ts} +19 -6
- package/src/components/Details/react/Details.tsx +69 -0
- package/src/components/DummyImage/DummyImage.stories.tsx +23 -0
- package/src/components/DummyText/DummyText.stories.tsx +48 -0
- package/src/components/Modal/Modal.stories.tsx +67 -0
- package/src/components/Modal/astro/CloseBtn.astro +2 -2
- package/src/components/Modal/astro/OpenBtn.astro +2 -3
- package/src/components/Modal/getProps.ts +65 -0
- package/src/components/Modal/react/Body.tsx +10 -0
- package/src/components/Modal/react/CloseBtn.tsx +24 -0
- package/src/components/Modal/react/Inner.tsx +6 -0
- package/src/components/Modal/react/Modal.tsx +24 -0
- package/src/components/Modal/react/OpenBtn.tsx +15 -0
- package/src/components/Modal/{script.js → script.ts} +1 -1
- package/src/components/NavMenu/NavMenu.stories.tsx +68 -0
- package/src/components/NavMenu/getProps.ts +60 -0
- package/src/components/NavMenu/react/NavMenu.tsx +40 -0
- package/src/components/ShapeDivider/ShapeDivider.stories.tsx +87 -0
- package/src/components/ShapeDivider/getProps.ts +36 -0
- package/src/components/ShapeDivider/react/{ShapeDivider.jsx → ShapeDivider.tsx} +4 -4
- package/src/components/Tabs/Tabs.stories.tsx +79 -0
- package/src/components/Tabs/astro/Tab.astro +2 -1
- package/src/components/Tabs/astro/{transformTabitems.js → transformTabitems.ts} +9 -9
- package/src/components/Tabs/getProps.ts +23 -0
- package/src/components/Tabs/react/Tab.tsx +21 -0
- package/src/components/Tabs/react/TabItem.tsx +13 -0
- package/src/components/Tabs/react/TabList.tsx +5 -0
- package/src/components/Tabs/react/{TabPanel.jsx → TabPanel.tsx} +8 -3
- package/src/components/Tabs/react/{Tabs.jsx → Tabs.tsx} +27 -12
- package/src/components/Tabs/{script.js → script.ts} +2 -2
- package/src/components/Tabs/setTabs.ts +65 -0
- package/src/helper/{uuid.js → uuid.ts} +2 -2
- package/src/vite-env.d.ts +1 -0
- package/dist/components/Accordion/astro/__setEvent.d.ts +0 -1
- package/dist/components/Accordion/astro/index.d.ts +0 -15
- package/dist/components/Alert/astro/index.d.ts +0 -1
- package/dist/components/Callout/astro/index.d.ts +0 -1
- package/dist/components/Details/astro/index.d.ts +0 -13
- package/dist/components/DummyImage/astro/index.d.ts +0 -1
- package/dist/components/DummyText/astro/index.d.ts +0 -1
- package/dist/components/Modal/astro/index.d.ts +0 -13
- package/dist/components/NavMenu/astro/index.d.ts +0 -11
- package/dist/components/Tabs/astro/index.d.ts +0 -13
- package/dist/components/Tabs/astro/transformTabitems.d.ts +0 -4
- package/dist/components/astro.d.ts +0 -14
- package/dist/lism-css/dist/config/helper/getSvgUrl.js +0 -4
- package/src/components/Accordion/getProps.js +0 -77
- package/src/components/Accordion/setAccordion.js +0 -146
- package/src/components/Avatar/astro/index.js +0 -1
- package/src/components/Avatar/react/Avatar.jsx +0 -9
- package/src/components/Badge/astro/index.js +0 -1
- package/src/components/Badge/react/Badge.jsx +0 -12
- package/src/components/Button/astro/index.js +0 -1
- package/src/components/Button/react/Button.jsx +0 -12
- package/src/components/Chat/astro/index.js +0 -1
- package/src/components/Details/react/Details.jsx +0 -66
- package/src/components/Modal/getProps.js +0 -30
- package/src/components/Modal/react/Body.jsx +0 -10
- package/src/components/Modal/react/CloseBtn.jsx +0 -20
- package/src/components/Modal/react/Inner.jsx +0 -6
- package/src/components/Modal/react/Modal.jsx +0 -23
- package/src/components/Modal/react/OpenBtn.jsx +0 -11
- package/src/components/NavMenu/getProps.js +0 -65
- package/src/components/NavMenu/react/NavMenu.jsx +0 -19
- package/src/components/ShapeDivider/astro/index.js +0 -1
- package/src/components/ShapeDivider/getProps.js +0 -40
- package/src/components/Tabs/getProps.js +0 -8
- package/src/components/Tabs/react/Tab.jsx +0 -10
- package/src/components/Tabs/react/TabItem.jsx +0 -5
- package/src/components/Tabs/react/TabList.jsx +0 -6
- package/src/components/Tabs/setTabs.js +0 -87
- /package/src/components/Accordion/astro/{index.js → index.ts} +0 -0
- /package/src/components/Accordion/react/{index.js → index.ts} +0 -0
- /package/src/components/Accordion/{script.js → script.ts} +0 -0
- /package/{dist/components/Avatar/astro/index.d.ts → src/components/Avatar/astro/index.ts} +0 -0
- /package/src/components/Avatar/react/{index.js → index.ts} +0 -0
- /package/{dist/components/Badge/astro/index.d.ts → src/components/Badge/astro/index.ts} +0 -0
- /package/src/components/Badge/react/{index.js → index.ts} +0 -0
- /package/{dist/components/Button/astro/index.d.ts → src/components/Button/astro/index.ts} +0 -0
- /package/src/components/Button/react/{index.js → index.ts} +0 -0
- /package/{dist/components/Chat/astro/index.d.ts → src/components/Chat/astro/index.ts} +0 -0
- /package/src/components/Chat/react/{index.js → index.ts} +0 -0
- /package/src/components/Details/astro/{index.js → index.ts} +0 -0
- /package/src/components/Details/react/{index.js → index.ts} +0 -0
- /package/src/components/Modal/astro/{index.js → index.ts} +0 -0
- /package/src/components/Modal/react/{index.js → index.ts} +0 -0
- /package/src/components/NavMenu/astro/{index.js → index.ts} +0 -0
- /package/src/components/NavMenu/react/{index.js → index.ts} +0 -0
- /package/{dist/components/ShapeDivider/astro/index.d.ts → src/components/ShapeDivider/astro/index.ts} +0 -0
- /package/src/components/ShapeDivider/react/{index.js → index.ts} +0 -0
- /package/src/components/Tabs/astro/{index.js → index.ts} +0 -0
- /package/src/components/Tabs/react/{index.js → index.ts} +0 -0
|
@@ -1,4 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
children: any;
|
|
4
|
-
}): import("react").JSX.Element;
|
|
1
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
2
|
+
export default function ModalBody({ children, ...props }: LismComponentProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
modalId?: string
|
|
5
|
-
icon
|
|
6
|
-
srText?: string
|
|
7
|
-
}
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { LismComponentProps, IconProps } from 'lism-css/react';
|
|
3
|
+
type CloseBtnProps<T extends ElementType = 'button'> = LismComponentProps<T> & {
|
|
4
|
+
modalId?: string;
|
|
5
|
+
icon?: IconProps['icon'];
|
|
6
|
+
srText?: string;
|
|
7
|
+
};
|
|
8
|
+
export default function CloseBtn<T extends ElementType = 'button'>({ children, modalId, icon, srText, ...props }: CloseBtnProps<T>): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx as o, jsxs as m, Fragment as n } from "react/jsx-runtime";
|
|
2
2
|
import a from "../../../lism-css/dist/components/atomic/Icon/index.js";
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
function
|
|
6
|
-
return /* @__PURE__ */ o(
|
|
3
|
+
import i from "../../../lism-css/dist/components/Lism/index.js";
|
|
4
|
+
import { getCloseBtnProps as f } from "../getProps.js";
|
|
5
|
+
function u({ children: r, modalId: s = "", icon: e, srText: t = "Close", ...l }) {
|
|
6
|
+
return /* @__PURE__ */ o(i, { "data-modal-close": s, ...f(l), children: r || /* @__PURE__ */ m(n, { children: [
|
|
7
7
|
/* @__PURE__ */ o(a, { icon: e || "x" }),
|
|
8
8
|
/* @__PURE__ */ o("span", { className: "u--srOnly", children: t || "Close" })
|
|
9
9
|
] }) });
|
|
10
10
|
}
|
|
11
11
|
export {
|
|
12
|
-
|
|
12
|
+
u as default
|
|
13
13
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}): import("react").JSX.Element;
|
|
1
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
2
|
+
import { ModalInnerProps } from '../getProps';
|
|
3
|
+
export default function ModalInner({ children, ...props }: ModalInnerProps & LismComponentProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
3
|
+
import { ModalRootProps } from '../getProps';
|
|
4
|
+
declare const Modal: <T extends ElementType = "dialog">({ children, ...props }: ModalRootProps & LismComponentProps<T>) => import("react").JSX.Element;
|
|
1
5
|
export default Modal;
|
|
2
|
-
declare function Modal({ children, ...props }: {
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
children: any;
|
|
5
|
-
}): import("react").JSX.Element;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useRef as
|
|
4
|
-
import
|
|
2
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
3
|
+
import { useRef as s, useEffect as n } from "react";
|
|
4
|
+
import p from "../../../lism-css/dist/components/Lism/index.js";
|
|
5
5
|
import { setEvent as u } from "../setModal.js";
|
|
6
|
-
import { getProps as
|
|
6
|
+
import { getProps as a } from "../getProps.js";
|
|
7
7
|
/* empty css */
|
|
8
|
-
const
|
|
9
|
-
const r =
|
|
10
|
-
|
|
8
|
+
const P = ({ children: o, ...t }) => {
|
|
9
|
+
const r = s(null);
|
|
10
|
+
n(() => {
|
|
11
11
|
if (r?.current)
|
|
12
12
|
return u(r?.current);
|
|
13
|
-
}, [r])
|
|
13
|
+
}, [r]);
|
|
14
|
+
const { as: e, ...f } = a(t);
|
|
15
|
+
return /* @__PURE__ */ m(p, { as: e, forwardedRef: r, ...f, children: o });
|
|
14
16
|
};
|
|
15
17
|
export {
|
|
16
|
-
|
|
18
|
+
P as default
|
|
17
19
|
};
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
modalId?: string
|
|
5
|
-
}
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
3
|
+
type OpenBtnProps<T extends ElementType = 'button'> = LismComponentProps<T> & {
|
|
4
|
+
modalId?: string;
|
|
5
|
+
};
|
|
6
|
+
export default function OpenBtn<T extends ElementType = 'button'>({ children, modalId, ...props }: OpenBtnProps<T>): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as n } from "react/jsx-runtime";
|
|
2
2
|
import p from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
-
import {
|
|
4
|
-
function
|
|
5
|
-
return /* @__PURE__ */ n(p, { "data-modal-open": t, ...e
|
|
3
|
+
import { getOpenBtnProps as e } from "../getProps.js";
|
|
4
|
+
function i({ children: o, modalId: t = "", ...r }) {
|
|
5
|
+
return /* @__PURE__ */ n(p, { "data-modal-open": t, ...e(r), children: o });
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
i as default
|
|
9
9
|
};
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { default as Root } from './Modal';
|
|
2
1
|
import { default as Inner } from './Inner';
|
|
3
2
|
import { default as Body } from './Body';
|
|
4
3
|
import { default as CloseBtn } from './CloseBtn';
|
|
5
4
|
import { default as OpenBtn } from './OpenBtn';
|
|
6
|
-
declare
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
5
|
+
declare const _default: {
|
|
6
|
+
Root: <T extends import('react').ElementType = "dialog">({ children, ...props }: import('../getProps').ModalRootProps & import('lism-css/react').LismComponentProps<T>) => import("react").JSX.Element;
|
|
7
|
+
Inner: typeof Inner;
|
|
8
|
+
Body: typeof Body;
|
|
9
|
+
CloseBtn: typeof CloseBtn;
|
|
10
|
+
OpenBtn: typeof OpenBtn;
|
|
11
|
+
};
|
|
13
12
|
export default _default;
|
|
@@ -1,32 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
export type NavMenuRootProps = {
|
|
2
|
+
hovC?: string;
|
|
3
|
+
hovBgc?: string;
|
|
4
|
+
itemP?: string;
|
|
5
|
+
style?: Record<string, string>;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
export type NavMenuLinkProps = {
|
|
9
|
+
href?: string;
|
|
10
|
+
as?: string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
export declare function getRootProps({ hovC, hovBgc, itemP, style, ...props }: NavMenuRootProps): {
|
|
14
|
+
lismClass: string;
|
|
15
|
+
as: string;
|
|
16
|
+
style: {
|
|
17
|
+
[x: string]: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
export declare function getNestProps(props: Record<string, unknown>): {
|
|
21
|
+
lismClass: string;
|
|
22
|
+
as: string;
|
|
23
|
+
'px-s': string;
|
|
24
|
+
};
|
|
25
|
+
export declare function getItemProps(props: Record<string, unknown>): {
|
|
26
|
+
lismClass: string;
|
|
27
|
+
as: string;
|
|
28
|
+
};
|
|
29
|
+
export declare function getLinkProps({ href, as, ...props }: NavMenuLinkProps): {
|
|
15
30
|
lismClass: string;
|
|
16
31
|
as: string;
|
|
17
|
-
|
|
32
|
+
href: string | undefined;
|
|
33
|
+
c: string;
|
|
18
34
|
};
|
|
19
|
-
/**
|
|
20
|
-
* NavMenu.Nest のプロパティを処理
|
|
21
|
-
*/
|
|
22
|
-
export function getNestProps(props: any): any;
|
|
23
|
-
/**
|
|
24
|
-
* NavMenu.Item のプロパティを処理
|
|
25
|
-
*/
|
|
26
|
-
export function getItemProps(props: any): any;
|
|
27
|
-
/**
|
|
28
|
-
* NavMenu.Link のプロパティを処理
|
|
29
|
-
* @param {string} [props.href] - リンク先URL。指定時は a タグになる
|
|
30
|
-
* @param {string} [props.as='span'] - HTML タグ
|
|
31
|
-
*/
|
|
32
|
-
export function getLinkProps({ href, as, ...props }?: string): any;
|
|
@@ -1,16 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}): import("react").JSX.Element;
|
|
5
|
-
export function
|
|
6
|
-
|
|
7
|
-
children: any;
|
|
8
|
-
}): import("react").JSX.Element;
|
|
9
|
-
export function Item({ children, ...props }: {
|
|
10
|
-
[x: string]: any;
|
|
11
|
-
children: any;
|
|
12
|
-
}): import("react").JSX.Element;
|
|
13
|
-
export function Link({ children, ...props }: {
|
|
14
|
-
[x: string]: any;
|
|
15
|
-
children: any;
|
|
16
|
-
}): import("react").JSX.Element;
|
|
1
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
2
|
+
import { NavMenuRootProps, NavMenuLinkProps } from '../getProps';
|
|
3
|
+
export declare function Root({ children, ...props }: NavMenuRootProps & LismComponentProps): import("react").JSX.Element;
|
|
4
|
+
export declare function Nest({ children, ...props }: LismComponentProps): import("react").JSX.Element;
|
|
5
|
+
export declare function Item({ children, ...props }: LismComponentProps): import("react").JSX.Element;
|
|
6
|
+
export declare function Link({ children, ...props }: NavMenuLinkProps & LismComponentProps): import("react").JSX.Element;
|
|
@@ -1,24 +1,28 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import { getNestProps as
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import i from "../../../lism-css/dist/components/layout/Flex/index.js";
|
|
3
|
+
import m from "../../../lism-css/dist/components/Lism/index.js";
|
|
4
|
+
import e from "../../../lism-css/dist/components/layout/Stack/index.js";
|
|
5
|
+
import { getNestProps as p, getLinkProps as f, getItemProps as a, getRootProps as c } from "../getProps.js";
|
|
6
6
|
/* empty css */
|
|
7
|
-
function
|
|
8
|
-
|
|
7
|
+
function x({ children: o, ...t }) {
|
|
8
|
+
const { as: r, ...s } = c(t);
|
|
9
|
+
return /* @__PURE__ */ n(e, { as: r, ...s, children: o });
|
|
9
10
|
}
|
|
10
|
-
function
|
|
11
|
-
|
|
11
|
+
function I({ children: o, ...t }) {
|
|
12
|
+
const { as: r, ...s } = p(t);
|
|
13
|
+
return /* @__PURE__ */ n(e, { as: r, ...s, children: o });
|
|
12
14
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
+
function L({ children: o, ...t }) {
|
|
16
|
+
const { as: r, ...s } = a(t);
|
|
17
|
+
return /* @__PURE__ */ n(m, { as: r, ...s, children: o });
|
|
15
18
|
}
|
|
16
|
-
function
|
|
17
|
-
|
|
19
|
+
function N({ children: o, ...t }) {
|
|
20
|
+
const { as: r, ...s } = f(t);
|
|
21
|
+
return /* @__PURE__ */ n(i, { as: r, ...s, children: o });
|
|
18
22
|
}
|
|
19
23
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
+
L as Item,
|
|
25
|
+
N as Link,
|
|
26
|
+
I as Nest,
|
|
27
|
+
x as Root
|
|
24
28
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Root, Item, Link, Nest } from './NavMenu';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
2
|
+
declare const _default: {
|
|
3
|
+
Root: typeof Root;
|
|
4
|
+
Item: typeof Item;
|
|
5
|
+
Link: typeof Link;
|
|
6
|
+
Nest: typeof Nest;
|
|
7
|
+
};
|
|
8
8
|
export default _default;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as ShapeDivider } from './react/ShapeDivider';
|
|
3
|
+
declare const meta: Meta<typeof ShapeDivider>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof ShapeDivider>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const FlipX: Story;
|
|
8
|
+
export declare const FlipY: Story;
|
|
9
|
+
export declare const HighLevel: Story;
|
|
10
|
+
export declare const Animation: Story;
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
export type ShapeDividerProps = {
|
|
2
|
+
viewBox?: string;
|
|
3
|
+
isAnimation?: boolean;
|
|
4
|
+
isEmpty?: boolean;
|
|
5
|
+
level?: number;
|
|
6
|
+
stretch?: string;
|
|
7
|
+
offset?: string;
|
|
8
|
+
flip?: string;
|
|
9
|
+
style?: Record<string, string>;
|
|
10
|
+
[key: string]: unknown;
|
|
11
|
+
};
|
|
12
|
+
export default function getProps({ viewBox, isAnimation, isEmpty, level, stretch, offset, flip, style, ...restProps }: ShapeDividerProps): {
|
|
13
|
+
style: Record<string, string | undefined>;
|
|
14
|
+
viewBox: string | undefined;
|
|
15
|
+
isEmpty: boolean | undefined;
|
|
16
|
+
} | null;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
|
-
function
|
|
2
|
-
if (
|
|
3
|
-
const t = { ...
|
|
4
|
-
t["--level"] =
|
|
5
|
-
const
|
|
1
|
+
function f({ viewBox: r, isAnimation: a, isEmpty: s, level: i = 5, stretch: o, offset: d, flip: e, style: u = {}, ...l }) {
|
|
2
|
+
if (i === 0) return null;
|
|
3
|
+
const t = { ...u };
|
|
4
|
+
t["--level"] = i != null ? String(i) : void 0, t["--_inner-offset"] = d ?? void 0, t["--_inner-stretch"] = o ?? void 0;
|
|
5
|
+
const n = {
|
|
6
6
|
lismClass: "c--shapeDivider",
|
|
7
7
|
"max-sz": "full",
|
|
8
8
|
"aria-hidden": "true"
|
|
9
9
|
};
|
|
10
|
-
return
|
|
11
|
-
...
|
|
10
|
+
return e && (n["data-flip"] = e), a && (n["data-has-animation"] = "true"), {
|
|
11
|
+
...n,
|
|
12
12
|
style: t,
|
|
13
|
-
|
|
14
|
-
viewBox: a,
|
|
13
|
+
viewBox: r,
|
|
15
14
|
isEmpty: s,
|
|
16
|
-
|
|
17
|
-
...f
|
|
15
|
+
...l
|
|
18
16
|
};
|
|
19
17
|
}
|
|
20
18
|
export {
|
|
21
|
-
|
|
19
|
+
f as default
|
|
22
20
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}): import("react").JSX.Element | null;
|
|
1
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
2
|
+
import { ShapeDividerProps } from '../getProps';
|
|
3
|
+
export default function ShapeDivider({ children, ...props }: ShapeDividerProps & LismComponentProps): import("react").JSX.Element | null;
|
|
@@ -2,10 +2,10 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import l from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
3
|
import p from "../getProps.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
function
|
|
5
|
+
function h({ children: i, ...o }) {
|
|
6
6
|
const r = p(o);
|
|
7
7
|
if (!r) return null;
|
|
8
|
-
const { viewBox: s,
|
|
8
|
+
const { viewBox: s, isEmpty: t, ...n } = r;
|
|
9
9
|
return /* @__PURE__ */ e(l, { ...n, children: t ? null : /* @__PURE__ */ e("div", { className: "c--shapeDivider_inner", children: /* @__PURE__ */ e(
|
|
10
10
|
"svg",
|
|
11
11
|
{
|
|
@@ -22,5 +22,5 @@ function v({ children: i, ...o }) {
|
|
|
22
22
|
) }) });
|
|
23
23
|
}
|
|
24
24
|
export {
|
|
25
|
-
|
|
25
|
+
h as default
|
|
26
26
|
};
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
}
|
|
1
|
+
type TabsProps = {
|
|
2
|
+
lismClass?: string;
|
|
3
|
+
[key: string]: unknown;
|
|
4
|
+
};
|
|
5
|
+
export default function getTabsProps({ lismClass, ...props }: TabsProps): {
|
|
6
|
+
lismClass: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function getTabProps({ set, unset, ...props }: Record<string, unknown>): {
|
|
9
|
+
as: string;
|
|
5
10
|
lismClass: string;
|
|
11
|
+
set: string[];
|
|
6
12
|
};
|
|
13
|
+
export {};
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import r from "../../lism-css/dist/lib/helper/atts.js";
|
|
2
|
-
|
|
2
|
+
import o from "../../lism-css/dist/lib/helper/mergeSet.js";
|
|
3
|
+
function i({ lismClass: t, ...s }) {
|
|
3
4
|
return {
|
|
4
|
-
lismClass: r(
|
|
5
|
-
...
|
|
5
|
+
lismClass: r(t, "c--tabs"),
|
|
6
|
+
...s
|
|
7
|
+
};
|
|
8
|
+
}
|
|
9
|
+
function l({ set: t, unset: s, ...a }) {
|
|
10
|
+
return {
|
|
11
|
+
as: "button",
|
|
12
|
+
lismClass: "c--tabs_tab",
|
|
13
|
+
set: o("plain", t, s),
|
|
14
|
+
...a
|
|
6
15
|
};
|
|
7
16
|
}
|
|
8
17
|
export {
|
|
9
|
-
|
|
18
|
+
i as default,
|
|
19
|
+
l as getTabProps
|
|
10
20
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
tabId?: string
|
|
4
|
-
index?: number
|
|
5
|
-
isActive?: boolean
|
|
6
|
-
}
|
|
1
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
2
|
+
type TabProps = LismComponentProps & {
|
|
3
|
+
tabId?: string;
|
|
4
|
+
index?: number;
|
|
5
|
+
isActive?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export default function Tab({ tabId, index, isActive, ...props }: TabProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import s from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
|
+
import { getTabProps as l } from "../getProps.js";
|
|
4
|
+
function c({ tabId: r = "tab", index: o = 0, isActive: t = !1, ...a }) {
|
|
5
|
+
const e = `${r}-${o}`;
|
|
6
|
+
return /* @__PURE__ */ f(
|
|
7
|
+
s,
|
|
8
|
+
{
|
|
9
|
+
...l(a),
|
|
10
|
+
role: "tab",
|
|
11
|
+
"aria-controls": e,
|
|
12
|
+
"aria-selected": t ? "true" : "false"
|
|
13
|
+
}
|
|
14
|
+
);
|
|
6
15
|
}
|
|
7
16
|
export {
|
|
8
|
-
|
|
17
|
+
c as default
|
|
9
18
|
};
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
type TabItemProps = {
|
|
3
|
+
isTabItem?: boolean;
|
|
4
|
+
children?: ReactNode;
|
|
5
|
+
};
|
|
6
|
+
export default function TabItem({ isTabItem, children }: TabItemProps): import("react").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
2
|
+
export default function TabList(props: LismComponentProps): import("react").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
tabId?: string
|
|
4
|
-
isActive?: boolean
|
|
5
|
-
index?: number
|
|
6
|
-
}
|
|
1
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
2
|
+
type TabPanelProps = LismComponentProps & {
|
|
3
|
+
tabId?: string;
|
|
4
|
+
isActive?: boolean;
|
|
5
|
+
index?: number;
|
|
6
|
+
};
|
|
7
|
+
export default function TabPanel({ tabId, isActive, index, ...props }: TabPanelProps): import("react").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
3
|
+
type TabsProps<T extends ElementType = 'div'> = LismComponentProps<T> & {
|
|
4
|
+
tabId?: string;
|
|
5
|
+
defaultIndex?: number;
|
|
6
|
+
listProps?: LismComponentProps;
|
|
7
|
+
};
|
|
8
|
+
export default function Tabs<T extends ElementType = 'div'>({ tabId, defaultIndex, listProps, children, ...props }: TabsProps<T>): import("react").JSX.Element;
|
|
9
|
+
export {};
|