@lism-css/ui 0.9.3 → 0.11.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/Callout/getProps.d.ts +0 -1
- package/dist/components/Callout/getProps.js +11 -12
- package/dist/components/Chat/getProps.js +1 -6
- 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/NavMenu/getProps.js +2 -2
- package/dist/components/Tabs/react/Tab.js +1 -12
- package/dist/components/Tabs/react/Tabs.js +1 -3
- package/dist/components/astro.d.ts +2 -0
- package/dist/components/react.d.ts +2 -0
- package/dist/components/react.js +20 -16
- package/dist/lism-css/dist/components/atomic/Decorator/getProps.js +10 -10
- package/dist/lism-css/dist/components/atomic/Icon/getProps.js +28 -27
- package/dist/lism-css/dist/config/defaults/props.js +6 -1
- package/dist/lism-css/dist/config/defaults/states.js +1 -2
- package/dist/lism-css/dist/config/defaults/tokens.js +3 -3
- package/dist/lism-css/dist/lib/getMaybeCssVar.js +26 -21
- package/dist/style.css +1 -1
- package/dist/ui.css +1 -1
- package/package.json +5 -4
- 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 +34 -34
- 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 +23 -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 +10 -10
- 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 +44 -46
- 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
- package/dist/lism-css/dist/components/getFilterProps.js +0 -23
- package/dist/lism-css/dist/components/setMaybeTransformStyles.js +0 -7
package/README.ja.md
ADDED
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# @lism-css/ui
|
|
2
|
+
|
|
3
|
+
[English](./README.md) | [日本語](./README.ja.md)
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@lism-css/ui)
|
|
6
|
+
[](https://github.com/lism-css/lism-css/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
## @lism-css/ui とは?
|
|
9
|
+
|
|
10
|
+
`@lism-css/ui` は、[lism-css](https://www.npmjs.com/package/lism-css) の上に構築されたインタラクティブな UI コンポーネントライブラリです。アコーディオン、モーダル、タブなど、よく使う UI パターンの React / Astro コンポーネントを提供します。
|
|
11
|
+
|
|
12
|
+
すべてのコンポーネントは Lism CSS のレイアウトシステムとデザイントークンを前提としています。
|
|
13
|
+
|
|
14
|
+
## 利用可能なコンポーネント
|
|
15
|
+
|
|
16
|
+
| コンポーネント | 説明 |
|
|
17
|
+
|---------------|------|
|
|
18
|
+
| **Accordion** | ネイティブ `<details>` 要素を使った展開可能なコンテンツセクション |
|
|
19
|
+
| **Alert** | アイコンとカラーバリエーション付きのコンテキストフィードバックメッセージ |
|
|
20
|
+
| **Avatar** | ユーザープロフィール用の円形画像表示 |
|
|
21
|
+
| **Badge** | 小さなステータスラベルやカウンター |
|
|
22
|
+
| **Button** | バリエーションとサイズ付きのスタイル付きボタン |
|
|
23
|
+
| **Callout** | ヒント、警告、注意書き用のハイライトコンテンツブロック |
|
|
24
|
+
| **Chat** | 会話形式のレイアウト用チャットバブル UI |
|
|
25
|
+
| **Details** | スタイル付きネイティブ `<details>` / `<summary>` 要素 |
|
|
26
|
+
| **Modal** | バックドロップ付きダイアログオーバーレイ |
|
|
27
|
+
| **NavMenu** | ネストアイテム対応のナビゲーションメニュー |
|
|
28
|
+
| **ShapeDivider** | SVG シェイプによる装飾的なセクションディバイダー |
|
|
29
|
+
| **Tabs** | タブ付きコンテンツパネル |
|
|
30
|
+
| **DummyText** | プロトタイピング用のプレースホルダーテキスト |
|
|
31
|
+
| **DummyImage** | プロトタイピング用のプレースホルダー画像 |
|
|
32
|
+
|
|
33
|
+
## インストール
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
npm i @lism-css/ui lism-css
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
または
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
pnpm add @lism-css/ui lism-css
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
> `lism-css` は必須のピア依存関係です。
|
|
46
|
+
|
|
47
|
+
## セットアップ
|
|
48
|
+
|
|
49
|
+
グローバルスタイルとして CSS をインポートします:
|
|
50
|
+
|
|
51
|
+
```js
|
|
52
|
+
import 'lism-css/main.css';
|
|
53
|
+
import '@lism-css/ui/style.css';
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Astro** の場合は、`astro.config.js` に以下も追加します:
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
export default defineConfig({
|
|
60
|
+
vite: {
|
|
61
|
+
ssr: {
|
|
62
|
+
noExternal: ['lism-css', '@lism-css/ui'],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## 使い方
|
|
69
|
+
|
|
70
|
+
### React
|
|
71
|
+
|
|
72
|
+
```jsx
|
|
73
|
+
import { Accordion, Modal, Tabs, Button } from '@lism-css/ui/react';
|
|
74
|
+
import { Stack, Text } from 'lism-css/react';
|
|
75
|
+
|
|
76
|
+
<Stack g="20">
|
|
77
|
+
<Accordion>
|
|
78
|
+
<Accordion.Header>FAQ の質問</Accordion.Header>
|
|
79
|
+
<Accordion.Body>
|
|
80
|
+
<Text>回答の内容がここに入ります。</Text>
|
|
81
|
+
</Accordion.Body>
|
|
82
|
+
</Accordion>
|
|
83
|
+
|
|
84
|
+
<Button href="/about" variant="outline">
|
|
85
|
+
詳しく見る
|
|
86
|
+
</Button>
|
|
87
|
+
</Stack>
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Astro
|
|
91
|
+
|
|
92
|
+
```astro
|
|
93
|
+
---
|
|
94
|
+
import { Accordion, Modal, Tabs, Button } from '@lism-css/ui/astro';
|
|
95
|
+
import { Stack, Text } from 'lism-css/astro';
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
<Stack g="20">
|
|
99
|
+
<Accordion>
|
|
100
|
+
<Accordion.Header>FAQ の質問</Accordion.Header>
|
|
101
|
+
<Accordion.Body>
|
|
102
|
+
<Text>回答の内容がここに入ります。</Text>
|
|
103
|
+
</Accordion.Body>
|
|
104
|
+
</Accordion>
|
|
105
|
+
|
|
106
|
+
<Button href="/about" variant="outline">
|
|
107
|
+
詳しく見る
|
|
108
|
+
</Button>
|
|
109
|
+
</Stack>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## lism-css との関係
|
|
113
|
+
|
|
114
|
+
Lism CSS は2つのパッケージで構成されています:
|
|
115
|
+
|
|
116
|
+
- **[lism-css](https://www.npmjs.com/package/lism-css)** — レイアウトコンポーネント(Box、Flex、Stack、Grid など)、デザイントークン、プロップクラス、レスポンシブシステムを提供するコア CSS フレームワーク。
|
|
117
|
+
- **@lism-css/ui**(このパッケージ)— コアのレイアウトシステムを拡張し、すぐに使えるインターフェースパターン(Accordion、Modal、Tabs など)を提供するインタラクティブ UI コンポーネント。
|
|
118
|
+
|
|
119
|
+
`@lism-css/ui` を使用するには `lism-css` のインストールが必要です。
|
|
120
|
+
|
|
121
|
+
## AI ツール連携
|
|
122
|
+
|
|
123
|
+
AI コーディングツールが Lism CSS のドキュメントを参照するための MCP サーバーが利用可能です:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
claude mcp add lism-css -- npx -y @lism-css/mcp
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
その他のセットアップ方法については、[lism-css README](https://www.npmjs.com/package/lism-css#ai-tool-integration) を参照してください。
|
|
130
|
+
|
|
131
|
+
## ドキュメント
|
|
132
|
+
|
|
133
|
+
詳細なドキュメントは [lism-css.com](https://lism-css.com) をご覧ください。
|
|
134
|
+
|
|
135
|
+
## ライセンス
|
|
136
|
+
|
|
137
|
+
MIT
|
package/README.md
CHANGED
|
@@ -1,9 +1,34 @@
|
|
|
1
1
|
# @lism-css/ui
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Provides both **React** and **Astro** components.
|
|
3
|
+
[English](./README.md) | [日本語](./README.ja.md)
|
|
5
4
|
|
|
6
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@lism-css/ui)
|
|
6
|
+
[](https://github.com/lism-css/lism-css/blob/main/LICENSE)
|
|
7
|
+
|
|
8
|
+
## What is @lism-css/ui?
|
|
9
|
+
|
|
10
|
+
`@lism-css/ui` is an interactive UI component library built on top of [lism-css](https://www.npmjs.com/package/lism-css). It provides React and Astro components for frequently used UI patterns such as accordions, modals, and tabs.
|
|
11
|
+
|
|
12
|
+
All components are based on the layout system and design tokens of Lism CSS.
|
|
13
|
+
|
|
14
|
+
## Available Components
|
|
15
|
+
|
|
16
|
+
| Component | Description |
|
|
17
|
+
|-----------|-------------|
|
|
18
|
+
| **Accordion** | Expandable content sections using native `<details>` element |
|
|
19
|
+
| **Alert** | Contextual feedback messages with icon and color variants |
|
|
20
|
+
| **Avatar** | Circular image display for user profiles |
|
|
21
|
+
| **Badge** | Small status labels and counters |
|
|
22
|
+
| **Button** | Styled button with variants and sizes |
|
|
23
|
+
| **Callout** | Highlighted content blocks for tips, warnings, and notes |
|
|
24
|
+
| **Chat** | Chat bubble UI for conversational layouts |
|
|
25
|
+
| **Details** | Styled native `<details>` / `<summary>` element |
|
|
26
|
+
| **Modal** | Dialog overlay with backdrop |
|
|
27
|
+
| **NavMenu** | Navigation menu with nested item support |
|
|
28
|
+
| **ShapeDivider** | Decorative section dividers with SVG shapes |
|
|
29
|
+
| **Tabs** | Tabbed content panels |
|
|
30
|
+
| **DummyText** | Placeholder text for prototyping |
|
|
31
|
+
| **DummyImage** | Placeholder image for prototyping |
|
|
7
32
|
|
|
8
33
|
## Installation
|
|
9
34
|
|
|
@@ -28,22 +53,85 @@ import 'lism-css/main.css';
|
|
|
28
53
|
import '@lism-css/ui/style.css';
|
|
29
54
|
```
|
|
30
55
|
|
|
56
|
+
For **Astro**, also add the following to `astro.config.js`:
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
export default defineConfig({
|
|
60
|
+
vite: {
|
|
61
|
+
ssr: {
|
|
62
|
+
noExternal: ['lism-css', '@lism-css/ui'],
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
});
|
|
66
|
+
```
|
|
67
|
+
|
|
31
68
|
## Usage
|
|
32
69
|
|
|
33
70
|
### React
|
|
34
71
|
|
|
35
72
|
```jsx
|
|
36
|
-
import { Accordion, Modal } from '@lism-css/ui/react';
|
|
73
|
+
import { Accordion, Modal, Tabs, Button } from '@lism-css/ui/react';
|
|
74
|
+
import { Stack, Text } from 'lism-css/react';
|
|
75
|
+
|
|
76
|
+
<Stack g="20">
|
|
77
|
+
<Accordion>
|
|
78
|
+
<Accordion.Header>FAQ Question</Accordion.Header>
|
|
79
|
+
<Accordion.Body>
|
|
80
|
+
<Text>Answer content goes here.</Text>
|
|
81
|
+
</Accordion.Body>
|
|
82
|
+
</Accordion>
|
|
83
|
+
|
|
84
|
+
<Button href="/about" variant="outline">
|
|
85
|
+
Learn More
|
|
86
|
+
</Button>
|
|
87
|
+
</Stack>
|
|
37
88
|
```
|
|
38
89
|
|
|
39
90
|
### Astro
|
|
40
91
|
|
|
41
92
|
```astro
|
|
42
93
|
---
|
|
43
|
-
import { Accordion, Modal } from '@lism-css/ui/astro';
|
|
94
|
+
import { Accordion, Modal, Tabs, Button } from '@lism-css/ui/astro';
|
|
95
|
+
import { Stack, Text } from 'lism-css/astro';
|
|
44
96
|
---
|
|
97
|
+
|
|
98
|
+
<Stack g="20">
|
|
99
|
+
<Accordion>
|
|
100
|
+
<Accordion.Header>FAQ Question</Accordion.Header>
|
|
101
|
+
<Accordion.Body>
|
|
102
|
+
<Text>Answer content goes here.</Text>
|
|
103
|
+
</Accordion.Body>
|
|
104
|
+
</Accordion>
|
|
105
|
+
|
|
106
|
+
<Button href="/about" variant="outline">
|
|
107
|
+
Learn More
|
|
108
|
+
</Button>
|
|
109
|
+
</Stack>
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## Relationship to lism-css
|
|
113
|
+
|
|
114
|
+
Lism CSS is organized into two packages:
|
|
115
|
+
|
|
116
|
+
- **[lism-css](https://www.npmjs.com/package/lism-css)** — Core CSS framework providing layout components (Box, Flex, Stack, Grid, etc.), design tokens, prop classes, and the responsive system.
|
|
117
|
+
- **@lism-css/ui** (this package) — Interactive UI components (Accordion, Modal, Tabs, etc.) that extend the core layout system with ready-to-use interface patterns.
|
|
118
|
+
|
|
119
|
+
You need `lism-css` installed to use `@lism-css/ui`.
|
|
120
|
+
|
|
121
|
+
## AI Tool Integration
|
|
122
|
+
|
|
123
|
+
An MCP server is available for AI coding tools to reference Lism CSS documentation:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
claude mcp add lism-css -- npx -y @lism-css/mcp
|
|
45
127
|
```
|
|
46
128
|
|
|
129
|
+
For more setup options, see the [lism-css README](https://www.npmjs.com/package/lism-css#ai-tool-integration).
|
|
130
|
+
|
|
131
|
+
## Documentation
|
|
132
|
+
|
|
133
|
+
For full documentation, visit [lism-css.com](https://lism-css.com).
|
|
134
|
+
|
|
47
135
|
## License
|
|
48
136
|
|
|
49
137
|
MIT
|
|
@@ -1,22 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
function
|
|
3
|
-
const c = o ?
|
|
1
|
+
import u from "./presets.js";
|
|
2
|
+
function b({ type: o = "note", keycolor: l, icon: t, title: s, flow: n = "s", ...e }) {
|
|
3
|
+
const c = o ? u[o] : null, r = t || c?.icon || "note", a = l || c?.color || null;
|
|
4
4
|
return {
|
|
5
|
-
icon:
|
|
6
|
-
title:
|
|
7
|
-
flow:
|
|
8
|
-
lismClass: "c--callout u--cbox",
|
|
9
|
-
keycolor:
|
|
5
|
+
icon: r,
|
|
6
|
+
title: s,
|
|
7
|
+
flow: n,
|
|
8
|
+
lismClass: "c--callout u--cbox set--shadow",
|
|
9
|
+
keycolor: a,
|
|
10
10
|
p: "20",
|
|
11
11
|
g: "10",
|
|
12
12
|
bdc: "keycolor",
|
|
13
13
|
"bd-x-s": "-",
|
|
14
|
-
bdw: "
|
|
14
|
+
bdw: "3px",
|
|
15
15
|
bxsh: "10",
|
|
16
|
-
|
|
17
|
-
...r
|
|
16
|
+
...e
|
|
18
17
|
};
|
|
19
18
|
}
|
|
20
19
|
export {
|
|
21
|
-
|
|
20
|
+
b as default
|
|
22
21
|
};
|
|
@@ -31,12 +31,7 @@ const l = {
|
|
|
31
31
|
lh: "s"
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
|
-
function e({
|
|
35
|
-
variant: s = "speak",
|
|
36
|
-
direction: a = "start",
|
|
37
|
-
keycolor: t = "gray",
|
|
38
|
-
...c
|
|
39
|
-
}) {
|
|
34
|
+
function e({ variant: s = "speak", direction: a = "start", keycolor: t = "gray", ...c }) {
|
|
40
35
|
return {
|
|
41
36
|
lismClass: "c--chat",
|
|
42
37
|
variant: s,
|
|
@@ -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
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import o from "../../lism-css/dist/lib/getMaybeCssVar.js";
|
|
2
|
-
function
|
|
2
|
+
function l({ hovC: s, hovBgc: n, itemP: t, style: i = {}, ...r }) {
|
|
3
3
|
const e = { ...i };
|
|
4
4
|
return n && (e["--hov-bgc"] = o(n, "color")), s && (e["--hov-c"] = o(s, "color")), t && (e["--_item-p"] = o(t, "space")), {
|
|
5
5
|
lismClass: "c--navMenu",
|
|
@@ -36,5 +36,5 @@ export {
|
|
|
36
36
|
u as getItemProps,
|
|
37
37
|
p as getLinkProps,
|
|
38
38
|
c as getNestProps,
|
|
39
|
-
|
|
39
|
+
l as getRootProps
|
|
40
40
|
};
|
|
@@ -2,18 +2,7 @@ import { jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
import l from "../../../lism-css/dist/components/Lism/index.js";
|
|
3
3
|
function i({ tabId: t = "tab", index: a = 0, isActive: r = !1, ...o }) {
|
|
4
4
|
const s = `${t}-${a}`;
|
|
5
|
-
return /* @__PURE__ */ e(
|
|
6
|
-
l,
|
|
7
|
-
{
|
|
8
|
-
as: "button",
|
|
9
|
-
lismClass: "c--tabs_tab",
|
|
10
|
-
setPlain: !0,
|
|
11
|
-
role: "tab",
|
|
12
|
-
"aria-controls": s,
|
|
13
|
-
"aria-selected": r ? "true" : "false",
|
|
14
|
-
...o
|
|
15
|
-
}
|
|
16
|
-
);
|
|
5
|
+
return /* @__PURE__ */ e(l, { as: "button", lismClass: "c--tabs_tab", setPlain: !0, role: "tab", "aria-controls": s, "aria-selected": r ? "true" : "false", ...o });
|
|
17
6
|
}
|
|
18
7
|
export {
|
|
19
8
|
i as default
|
|
@@ -31,9 +31,7 @@ function H({ tabId: I = "", defaultIndex: u = 1, listProps: T = {}, children: p,
|
|
|
31
31
|
);
|
|
32
32
|
} else if (o.type === x) {
|
|
33
33
|
const s = o.props;
|
|
34
|
-
a.push(
|
|
35
|
-
/* @__PURE__ */ b(x, { ...s, tabId: n, index: t, key: t, isActive: t === i })
|
|
36
|
-
);
|
|
34
|
+
a.push(/* @__PURE__ */ b(x, { ...s, tabId: n, index: t, key: t, isActive: t === i }));
|
|
37
35
|
}
|
|
38
36
|
}
|
|
39
37
|
});
|
|
@@ -10,3 +10,5 @@ export { default as Modal } from './Modal/astro';
|
|
|
10
10
|
export { default as NavMenu } from './NavMenu/astro';
|
|
11
11
|
export { default as ShapeDivider } from './ShapeDivider/astro';
|
|
12
12
|
export { default as Tabs } from './Tabs/astro';
|
|
13
|
+
export { default as DummyText } from './DummyText/astro';
|
|
14
|
+
export { default as DummyImage } from './DummyImage/astro';
|
|
@@ -10,3 +10,5 @@ export { default as Modal } from './Modal/react';
|
|
|
10
10
|
export { default as NavMenu } from './NavMenu/react';
|
|
11
11
|
export { default as ShapeDivider } from './ShapeDivider/react';
|
|
12
12
|
export { default as Tabs } from './Tabs/react';
|
|
13
|
+
export { default as DummyText } from './DummyText/react';
|
|
14
|
+
export { default as DummyImage } from './DummyImage/react';
|
package/dist/components/react.js
CHANGED
|
@@ -1,26 +1,30 @@
|
|
|
1
|
-
import { default as
|
|
1
|
+
import { default as t } from "./Accordion/react/index.js";
|
|
2
2
|
import { default as r } from "./Details/react/index.js";
|
|
3
3
|
import { default as l } from "./Modal/react/index.js";
|
|
4
4
|
import { default as u } from "./NavMenu/react/index.js";
|
|
5
|
-
import { default as
|
|
5
|
+
import { default as s } from "./Tabs/react/index.js";
|
|
6
6
|
import { default as x } from "./Alert/react/Alert.js";
|
|
7
|
-
import { default as
|
|
8
|
-
import { default as
|
|
9
|
-
import { default as
|
|
10
|
-
import { default as
|
|
11
|
-
import { default as
|
|
12
|
-
import { default as
|
|
7
|
+
import { default as D } from "./Avatar/react/Avatar.js";
|
|
8
|
+
import { default as v } from "./Badge/react/Badge.js";
|
|
9
|
+
import { default as c } from "./Button/react/Button.js";
|
|
10
|
+
import { default as h } from "./Callout/react/Callout.js";
|
|
11
|
+
import { default as B } from "./Chat/react/Chat.js";
|
|
12
|
+
import { default as M } from "./DummyImage/react/DummyImage.js";
|
|
13
|
+
import { default as b } from "./DummyText/react/DummyText.js";
|
|
14
|
+
import { default as N } from "./ShapeDivider/react/ShapeDivider.js";
|
|
13
15
|
export {
|
|
14
|
-
|
|
16
|
+
t as Accordion,
|
|
15
17
|
x as Alert,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
D as Avatar,
|
|
19
|
+
v as Badge,
|
|
20
|
+
c as Button,
|
|
21
|
+
h as Callout,
|
|
22
|
+
B as Chat,
|
|
21
23
|
r as Details,
|
|
24
|
+
M as DummyImage,
|
|
25
|
+
b as DummyText,
|
|
22
26
|
l as Modal,
|
|
23
27
|
u as NavMenu,
|
|
24
|
-
|
|
25
|
-
|
|
28
|
+
N as ShapeDivider,
|
|
29
|
+
s as Tabs
|
|
26
30
|
};
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
lismClass:
|
|
1
|
+
import c from "../../../lib/helper/atts.js";
|
|
2
|
+
function d({ lismClass: e, size: s, clipPath: a, boxSizing: r, style: l, ...n }) {
|
|
3
|
+
const i = l ?? {};
|
|
4
|
+
a && (i.clipPath = a), r && (i.boxSizing = r);
|
|
5
|
+
const t = { ...n };
|
|
6
|
+
s && (t.ar = "1/1", t.w = s), t.style = i;
|
|
7
|
+
const o = {
|
|
8
|
+
lismClass: c(e, "a--decorator"),
|
|
9
9
|
"aria-hidden": "true"
|
|
10
10
|
};
|
|
11
|
-
return Object.assign(
|
|
11
|
+
return Object.assign(o, t);
|
|
12
12
|
}
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
d as default
|
|
15
15
|
};
|