@lism-css/ui 0.11.0 → 0.13.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 -2
- 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 +17 -7
- 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 +35 -36
- package/dist/components/Modal/getProps.js +34 -15
- 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 +15 -5
- 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/default-config.js +6 -6
- package/dist/lism-css/dist/config/defaults/props.js +16 -26
- package/dist/lism-css/dist/config/defaults/traits.js +19 -0
- package/dist/lism-css/dist/config/index.js +9 -9
- package/dist/lism-css/dist/lib/getLayoutProps.js +6 -9
- package/dist/lism-css/dist/lib/getLismProps.js +116 -104
- 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/_style.css +1 -1
- 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/_style.css +1 -1
- 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/_style.css +1 -1
- 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 +3 -2
- package/src/components/Callout/react/Callout.tsx +3 -3
- package/src/components/Chat/Chat.stories.tsx +58 -0
- package/src/components/Chat/_style.css +6 -6
- 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/_style.css +1 -1
- 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/_style.css +1 -1
- package/src/components/Modal/astro/CloseBtn.astro +2 -2
- package/src/components/Modal/astro/OpenBtn.astro +2 -3
- package/src/components/Modal/getProps.ts +64 -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/_style.css +1 -1
- 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/_style.css +1 -1
- 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/_style.css +1 -1
- 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/defaults/states.js +0 -38
- 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,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
2
3
|
import { CalloutProps } from '../getProps';
|
|
3
|
-
export default function Callout({ children, ...inputProps }: CalloutProps &
|
|
4
|
-
children?: ReactNode;
|
|
5
|
-
}): import("react").JSX.Element;
|
|
4
|
+
export default function Callout<T extends ElementType = 'div'>({ children, ...inputProps }: CalloutProps & LismComponentProps<T>): import("react").JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
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";
|
|
2
|
+
import i from "../../../lism-css/dist/components/layout/Center/index.js";
|
|
3
|
+
import s from "../../../lism-css/dist/components/layout/Flex/index.js";
|
|
4
|
+
import f from "../../../lism-css/dist/components/layout/Flow/index.js";
|
|
5
5
|
import n from "../../../lism-css/dist/components/atomic/Icon/index.js";
|
|
6
|
-
import p from "../../../lism-css/dist/components/Stack/index.js";
|
|
6
|
+
import p from "../../../lism-css/dist/components/layout/Stack/index.js";
|
|
7
7
|
import u from "../getProps.js";
|
|
8
8
|
function j({ children: t, ...c }) {
|
|
9
9
|
const { icon: a, title: l, flow: m, ...e } = u(c);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as Chat } from './react/Chat';
|
|
3
|
+
declare const meta: Meta<typeof Chat>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Chat>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const End: Story;
|
|
8
|
+
export declare const NoAvatar: Story;
|
|
9
|
+
export declare const Think: Story;
|
|
@@ -1,53 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat コンポーネントの共通プロパティ処理
|
|
3
|
+
*/
|
|
4
|
+
export declare const defaultProps: {
|
|
5
|
+
readonly avatar: {
|
|
6
|
+
readonly lismClass: "c--chat_avatar";
|
|
7
|
+
readonly bgc: "base";
|
|
8
|
+
readonly ar: "1/1";
|
|
9
|
+
readonly bdrs: "99";
|
|
10
|
+
readonly 'aria-hidden': "true";
|
|
11
|
+
};
|
|
12
|
+
readonly name: {
|
|
13
|
+
readonly lismClass: "c--chat_name";
|
|
14
|
+
readonly c: "text-2";
|
|
15
|
+
readonly fs: "italic";
|
|
16
|
+
readonly fz: "2xs";
|
|
17
|
+
readonly lh: "1";
|
|
18
|
+
readonly py: "5";
|
|
19
|
+
readonly px: "10";
|
|
20
|
+
readonly aslf: "end";
|
|
21
|
+
};
|
|
22
|
+
readonly body: {
|
|
23
|
+
readonly lismClass: "c--chat_body";
|
|
24
|
+
readonly pos: "relative";
|
|
25
|
+
};
|
|
26
|
+
readonly deco: {
|
|
27
|
+
readonly lismClass: "c--chat_deco";
|
|
28
|
+
readonly pos: "absolute";
|
|
29
|
+
};
|
|
30
|
+
readonly content: {
|
|
31
|
+
readonly lismClass: "c--chat_content";
|
|
32
|
+
readonly bdrs: "30";
|
|
33
|
+
readonly p: "20";
|
|
34
|
+
readonly lh: "s";
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
export type ChatProps = {
|
|
38
|
+
variant?: string;
|
|
39
|
+
direction?: string;
|
|
40
|
+
keycolor?: string;
|
|
41
|
+
[key: string]: unknown;
|
|
42
|
+
};
|
|
1
43
|
/**
|
|
2
44
|
* Chat コンポーネントのルートプロパティを生成
|
|
3
45
|
*/
|
|
4
|
-
export default function getChatProps({ variant, direction, keycolor, ...props }: {
|
|
5
|
-
[x: string]: any;
|
|
6
|
-
variant?: string | undefined;
|
|
7
|
-
direction?: string | undefined;
|
|
8
|
-
keycolor?: string | undefined;
|
|
9
|
-
}): {
|
|
46
|
+
export default function getChatProps({ variant, direction, keycolor, ...props }: ChatProps): {
|
|
10
47
|
lismClass: string;
|
|
11
48
|
variant: string;
|
|
12
49
|
keycolor: string;
|
|
13
50
|
'data-chat-dir': string;
|
|
14
51
|
ji: string;
|
|
15
52
|
};
|
|
16
|
-
export namespace defaultProps {
|
|
17
|
-
let avatar: {
|
|
18
|
-
lismClass: string;
|
|
19
|
-
bgc: string;
|
|
20
|
-
ar: string;
|
|
21
|
-
bdrs: string;
|
|
22
|
-
'aria-hidden': string;
|
|
23
|
-
};
|
|
24
|
-
namespace name {
|
|
25
|
-
let lismClass: string;
|
|
26
|
-
let c: string;
|
|
27
|
-
let fs: string;
|
|
28
|
-
let fz: string;
|
|
29
|
-
let lh: string;
|
|
30
|
-
let py: string;
|
|
31
|
-
let px: string;
|
|
32
|
-
let aslf: string;
|
|
33
|
-
}
|
|
34
|
-
namespace body {
|
|
35
|
-
let lismClass_1: string;
|
|
36
|
-
export { lismClass_1 as lismClass };
|
|
37
|
-
export let pos: string;
|
|
38
|
-
}
|
|
39
|
-
namespace deco {
|
|
40
|
-
let lismClass_2: string;
|
|
41
|
-
export { lismClass_2 as lismClass };
|
|
42
|
-
let pos_1: string;
|
|
43
|
-
export { pos_1 as pos };
|
|
44
|
-
}
|
|
45
|
-
namespace content {
|
|
46
|
-
let lismClass_3: string;
|
|
47
|
-
export { lismClass_3 as lismClass };
|
|
48
|
-
export let bdrs: string;
|
|
49
|
-
export let p: string;
|
|
50
|
-
let lh_1: string;
|
|
51
|
-
export { lh_1 as lh };
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { LayoutComponentProps } from 'lism-css/react';
|
|
3
|
+
import { GridLayoutProps } from 'lism-css/lib/types/LayoutProps';
|
|
4
|
+
import { ChatProps } from '../getProps';
|
|
5
|
+
type Props<T extends ElementType = 'div'> = ChatProps & LayoutComponentProps<T, GridLayoutProps> & {
|
|
6
|
+
name?: string;
|
|
7
|
+
avatar?: string;
|
|
8
|
+
flow?: string;
|
|
9
|
+
};
|
|
10
|
+
export default function Chat<T extends ElementType = 'div'>({ name, avatar, flow, children, ...props }: Props<T>): import("react").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as a, jsx as o } from "react/jsx-runtime";
|
|
2
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";
|
|
3
|
+
import n from "../../../lism-css/dist/components/layout/Flow/index.js";
|
|
4
|
+
import h from "../../../lism-css/dist/components/layout/Frame/index.js";
|
|
5
|
+
import l from "../../../lism-css/dist/components/layout/Grid/index.js";
|
|
6
6
|
import m from "../../../lism-css/dist/components/Lism/index.js";
|
|
7
7
|
import u, { defaultProps as r } from "../getProps.js";
|
|
8
8
|
/* empty css */
|
|
9
|
-
function N({ name:
|
|
9
|
+
function N({ name: t, avatar: i, flow: s = "s", children: e, ...d }) {
|
|
10
10
|
const { "data-chat-dir": c, ...p } = u(d);
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
/* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ a(l, { "data-chat-dir": c, ...p, children: [
|
|
12
|
+
i && /* @__PURE__ */ o(h, { ...r.avatar, children: /* @__PURE__ */ o("img", { src: i, alt: "", width: "60", height: "60", decoding: "async" }) }),
|
|
13
|
+
t && /* @__PURE__ */ o(m, { ...r.name, children: t }),
|
|
14
|
+
/* @__PURE__ */ a(m, { ...r.body, children: [
|
|
15
15
|
/* @__PURE__ */ o(f, { ...r.deco, className: "u--cbox is--skipFlow" }),
|
|
16
|
-
/* @__PURE__ */ o(n, { ...r.content, className: "u--cbox", flow:
|
|
16
|
+
/* @__PURE__ */ o(n, { ...r.content, className: "u--cbox", flow: s, jslf: c, children: e })
|
|
17
17
|
] })
|
|
18
18
|
] });
|
|
19
19
|
}
|
|
@@ -1,40 +1,39 @@
|
|
|
1
|
+
import { LismProps } from 'lism-css/lib/getLismProps';
|
|
2
|
+
export type DetailsProps = {
|
|
3
|
+
lismClass?: string;
|
|
4
|
+
[key: string]: unknown;
|
|
5
|
+
};
|
|
1
6
|
/**
|
|
2
7
|
* Detailsコンポーネントのルート要素用プロパティを生成
|
|
3
|
-
* @param {Object} props - コンポーネントのプロパティ
|
|
4
|
-
* @param {string} props.lismClass - 追加のLismクラス
|
|
5
|
-
* @returns {Object} 処理済みプロパティ
|
|
6
8
|
*/
|
|
7
|
-
export function getDetailsProps({ lismClass, ...props }:
|
|
9
|
+
export declare function getDetailsProps({ lismClass, ...props }: DetailsProps): LismProps;
|
|
10
|
+
export declare function getTitleProps({ set, ...props }: Record<string, unknown>): {
|
|
8
11
|
lismClass: string;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
12
|
+
as: string;
|
|
13
|
+
fx: string;
|
|
14
|
+
set: string[];
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* 各サブコンポーネント用のデフォルトプロパティ
|
|
18
|
+
*/
|
|
19
|
+
export declare const defaultProps: {
|
|
20
|
+
readonly summary: {
|
|
21
|
+
readonly lismClass: "c--details_summary";
|
|
22
|
+
readonly layout: "flex";
|
|
23
|
+
readonly g: "10";
|
|
24
|
+
readonly ai: "center";
|
|
25
|
+
};
|
|
26
|
+
readonly icon: {
|
|
27
|
+
readonly lismClass: "c--details_icon a--icon";
|
|
28
|
+
readonly as: "span";
|
|
29
|
+
readonly 'aria-hidden': "true";
|
|
30
|
+
};
|
|
31
|
+
readonly body: {
|
|
32
|
+
readonly lismClass: "c--details_body";
|
|
33
|
+
};
|
|
34
|
+
readonly content: {
|
|
35
|
+
readonly lismClass: "c--details_content";
|
|
36
|
+
readonly layout: "flow";
|
|
37
|
+
readonly flow: "s";
|
|
28
38
|
};
|
|
29
|
-
|
|
30
|
-
let lismClass_2: string;
|
|
31
|
-
export { lismClass_2 as lismClass };
|
|
32
|
-
}
|
|
33
|
-
namespace content {
|
|
34
|
-
let lismClass_3: string;
|
|
35
|
-
export { lismClass_3 as lismClass };
|
|
36
|
-
let layout_1: string;
|
|
37
|
-
export { layout_1 as layout };
|
|
38
|
-
export let flow: string;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
39
|
+
};
|
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
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;
|
|
4
5
|
}
|
|
5
|
-
|
|
6
|
+
function n({ set: t, ...s }) {
|
|
7
|
+
return {
|
|
8
|
+
lismClass: "c--details_title",
|
|
9
|
+
as: "span",
|
|
10
|
+
fx: "1",
|
|
11
|
+
set: a("plain", t),
|
|
12
|
+
...s
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
const r = {
|
|
6
16
|
summary: { lismClass: "c--details_summary", layout: "flex", g: "10", ai: "center" },
|
|
7
|
-
title: { lismClass: "c--details_title", as: "span", fx: "1", setPlain: 1 },
|
|
8
17
|
icon: { lismClass: "c--details_icon a--icon", as: "span", "aria-hidden": "true" },
|
|
9
18
|
body: { lismClass: "c--details_body" },
|
|
10
19
|
content: { lismClass: "c--details_content", layout: "flow", flow: "s" }
|
|
11
20
|
};
|
|
12
21
|
export {
|
|
13
|
-
|
|
14
|
-
|
|
22
|
+
r as defaultProps,
|
|
23
|
+
o as getDetailsProps,
|
|
24
|
+
n as getTitleProps
|
|
15
25
|
};
|
|
@@ -1,37 +1,28 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { LismComponentProps } from 'lism-css/react';
|
|
3
|
+
type DetailsRootProps = LismComponentProps<'details'> & {
|
|
4
|
+
open?: boolean;
|
|
5
|
+
};
|
|
1
6
|
/**
|
|
2
7
|
* Details - ルートコンポーネント
|
|
3
8
|
* details要素をレンダリング
|
|
4
9
|
*/
|
|
5
|
-
export function Details({ children, ...props }:
|
|
6
|
-
[x: string]: any;
|
|
7
|
-
children: any;
|
|
8
|
-
}): import("react").JSX.Element;
|
|
10
|
+
export declare function Details({ children, open, ...props }: DetailsRootProps): import("react").JSX.Element;
|
|
9
11
|
/**
|
|
10
12
|
* Summary - サマリーコンポーネント
|
|
11
13
|
* details要素のsummary部分
|
|
12
14
|
*/
|
|
13
|
-
export function Summary({ children, ...props }:
|
|
14
|
-
[x: string]: any;
|
|
15
|
-
children: any;
|
|
16
|
-
}): import("react").JSX.Element;
|
|
15
|
+
export declare function Summary<T extends ElementType = 'summary'>({ children, ...props }: LismComponentProps<T>): import("react").JSX.Element;
|
|
17
16
|
/**
|
|
18
17
|
* Title - タイトルコンポーネント
|
|
19
18
|
*/
|
|
20
|
-
export function Title({ children, ...props }:
|
|
21
|
-
[x: string]: any;
|
|
22
|
-
children: any;
|
|
23
|
-
}): import("react").JSX.Element;
|
|
19
|
+
export declare function Title<T extends ElementType = 'span'>({ children, ...props }: LismComponentProps<T>): import("react").JSX.Element;
|
|
24
20
|
/**
|
|
25
21
|
* Icon - アイコンコンポーネント
|
|
26
22
|
*/
|
|
27
|
-
export function Icon({ children, ...props }:
|
|
28
|
-
[x: string]: any;
|
|
29
|
-
children: any;
|
|
30
|
-
}): import("react").JSX.Element;
|
|
23
|
+
export declare function Icon<T extends ElementType = 'span'>({ children, ...props }: LismComponentProps<T>): import("react").JSX.Element;
|
|
31
24
|
/**
|
|
32
25
|
* Content - コンテンツコンポーネント
|
|
33
26
|
*/
|
|
34
|
-
export function Content({ children, ...props }:
|
|
35
|
-
|
|
36
|
-
children: any;
|
|
37
|
-
}): import("react").JSX.Element;
|
|
27
|
+
export declare function Content<T extends ElementType = 'div'>({ children, ...props }: LismComponentProps<T>): import("react").JSX.Element;
|
|
28
|
+
export {};
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import u from "../../../lism-css/dist/lib/getLismProps.js";
|
|
3
3
|
import n from "../../../lism-css/dist/components/Lism/index.js";
|
|
4
|
-
import { defaultProps as i, getDetailsProps as
|
|
4
|
+
import { defaultProps as i, getTitleProps as s, getDetailsProps as f } from "../getProps.js";
|
|
5
5
|
/* empty css */
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
return /* @__PURE__ */ o("details", { ...
|
|
6
|
+
function y({ children: t, open: r, ...e }) {
|
|
7
|
+
const m = u(f(e));
|
|
8
|
+
return /* @__PURE__ */ o("details", { open: r, ...m, children: t });
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function P({ children: t, ...r }) {
|
|
11
11
|
return /* @__PURE__ */ o(n, { as: "summary", ...i.summary, ...r, children: t });
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
return /* @__PURE__ */ o(n, { ...
|
|
13
|
+
function g({ children: t, ...r }) {
|
|
14
|
+
return /* @__PURE__ */ o(n, { ...s(r), children: t });
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function x({ children: t, ...r }) {
|
|
17
17
|
return /* @__PURE__ */ o(n, { ...i.icon, ...r, children: t });
|
|
18
18
|
}
|
|
19
|
-
function
|
|
19
|
+
function D({ children: t, ...r }) {
|
|
20
20
|
return /* @__PURE__ */ o(n, { ...i.body, children: /* @__PURE__ */ o(n, { ...i.content, ...r, children: t }) });
|
|
21
21
|
}
|
|
22
22
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
23
|
+
D as Content,
|
|
24
|
+
y as Details,
|
|
25
|
+
x as Icon,
|
|
26
|
+
P as Summary,
|
|
27
|
+
g as Title
|
|
28
28
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { Details as Root, Summary, Title, Icon, Content } from './Details';
|
|
2
|
-
declare
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
2
|
+
declare const _default: {
|
|
3
|
+
Root: typeof Root;
|
|
4
|
+
Summary: typeof Summary;
|
|
5
|
+
Title: typeof Title;
|
|
6
|
+
Icon: typeof Icon;
|
|
7
|
+
Content: typeof Content;
|
|
8
|
+
};
|
|
9
9
|
export default _default;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as DummyImage } from './react/DummyImage';
|
|
3
|
+
declare const meta: Meta<typeof DummyImage>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof DummyImage>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const WithSize: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { default as DummyText } from './react/DummyText';
|
|
3
|
+
declare const meta: Meta<typeof DummyText>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof DummyText>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Japanese: Story;
|
|
8
|
+
export declare const Short: Story;
|
|
9
|
+
export declare const Long: Story;
|
|
@@ -1,41 +1,40 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
duration
|
|
5
|
-
style?:
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
export type ModalRootProps = {
|
|
2
|
+
lismClass?: string;
|
|
3
|
+
set?: string;
|
|
4
|
+
duration?: string;
|
|
5
|
+
style?: Record<string, string>;
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
export type ModalInnerProps = {
|
|
9
|
+
lismClass?: string;
|
|
10
|
+
offset?: string;
|
|
11
|
+
style?: Record<string, string>;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
};
|
|
14
|
+
export declare function getProps({ lismClass, set, duration, style, ...props }: ModalRootProps): {
|
|
15
|
+
style: Record<string, string>;
|
|
8
16
|
lismClass: string;
|
|
9
|
-
|
|
17
|
+
set: string[];
|
|
10
18
|
as: string;
|
|
11
19
|
};
|
|
12
|
-
export function getInnerProps({ lismClass, offset, style, ...props }: {
|
|
13
|
-
[x: string]: any;
|
|
14
|
-
lismClass?: string | undefined;
|
|
15
|
-
offset: any;
|
|
16
|
-
style?: {} | undefined;
|
|
17
|
-
}): {
|
|
20
|
+
export declare function getInnerProps({ lismClass, offset, style, ...props }: ModalInnerProps): {
|
|
18
21
|
lismClass: string;
|
|
19
|
-
style:
|
|
22
|
+
style: Record<string, string>;
|
|
23
|
+
};
|
|
24
|
+
export declare function getOpenBtnProps({ set, ...props }: Record<string, unknown>): {
|
|
25
|
+
as: string;
|
|
26
|
+
set: string[];
|
|
27
|
+
hov: string;
|
|
28
|
+
d: string;
|
|
29
|
+
};
|
|
30
|
+
export declare function getCloseBtnProps({ set, ...props }: Record<string, unknown>): {
|
|
31
|
+
as: string;
|
|
32
|
+
set: string[];
|
|
33
|
+
hov: string;
|
|
34
|
+
d: string;
|
|
35
|
+
};
|
|
36
|
+
export declare const defaultProps: {
|
|
37
|
+
body: {
|
|
38
|
+
lismClass: string;
|
|
39
|
+
};
|
|
20
40
|
};
|
|
21
|
-
export namespace defaultProps {
|
|
22
|
-
namespace body {
|
|
23
|
-
let lismClass: string;
|
|
24
|
-
}
|
|
25
|
-
namespace closeBtn {
|
|
26
|
-
let as: string;
|
|
27
|
-
let setPlain: boolean;
|
|
28
|
-
let hov: string;
|
|
29
|
-
let d: string;
|
|
30
|
-
}
|
|
31
|
-
namespace openBtn {
|
|
32
|
-
let as_1: string;
|
|
33
|
-
export { as_1 as as };
|
|
34
|
-
let setPlain_1: boolean;
|
|
35
|
-
export { setPlain_1 as setPlain };
|
|
36
|
-
let hov_1: string;
|
|
37
|
-
export { hov_1 as hov };
|
|
38
|
-
let d_1: string;
|
|
39
|
-
export { d_1 as d };
|
|
40
|
-
}
|
|
41
|
-
}
|
|
@@ -1,25 +1,44 @@
|
|
|
1
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: n = "", set: o, duration: t, style: s = {}, ...i }) {
|
|
3
4
|
const l = {
|
|
4
|
-
lismClass: e(
|
|
5
|
-
|
|
5
|
+
lismClass: e(n, "c--modal"),
|
|
6
|
+
set: r("plain", o)
|
|
6
7
|
};
|
|
7
|
-
return
|
|
8
|
+
return t && (s["--duration"] = t), { as: "dialog", ...l, style: s, ...i };
|
|
8
9
|
}
|
|
9
|
-
function
|
|
10
|
-
return o && (
|
|
11
|
-
lismClass: e(
|
|
12
|
-
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,
|
|
13
14
|
...s
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
function m({ set: n, ...o }) {
|
|
18
|
+
return {
|
|
19
|
+
as: "button",
|
|
20
|
+
set: r("plain", n),
|
|
21
|
+
hov: "o",
|
|
22
|
+
d: "inline-flex",
|
|
23
|
+
...o
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function c({ set: n, ...o }) {
|
|
27
|
+
return {
|
|
28
|
+
as: "button",
|
|
29
|
+
set: r("plain", n),
|
|
30
|
+
hov: "o",
|
|
31
|
+
d: "inline-flex",
|
|
32
|
+
...o
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
const d = {
|
|
36
|
+
body: { lismClass: "c--modal_body" }
|
|
20
37
|
};
|
|
21
38
|
export {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
39
|
+
d as defaultProps,
|
|
40
|
+
c as getCloseBtnProps,
|
|
41
|
+
u as getInnerProps,
|
|
42
|
+
m as getOpenBtnProps,
|
|
43
|
+
f as getProps
|
|
25
44
|
};
|
|
@@ -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;
|