lism-css 0.12.0 → 0.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.ja.md +5 -5
- package/README.md +6 -6
- package/config/default-config.ts +2 -2
- package/config/defaults/{states.ts → traits.ts} +2 -1
- package/config/index.ts +3 -3
- package/dist/components/atomic/Decorator/Decorator.d.ts +8 -1
- package/dist/components/atomic/Decorator/index.js +4 -5
- package/dist/components/atomic/Divider/index.js +4 -5
- package/dist/components/atomic/Icon/getProps.js +38 -39
- package/dist/components/atomic/Spacer/index.js +5 -6
- package/dist/components/index.d.ts +1 -1
- package/dist/components/index.js +38 -38
- package/dist/components/state/BoxLink/BoxLink.d.ts +5 -0
- package/dist/components/state/{LinkBox/LinkBox.stories.d.ts → BoxLink/BoxLink.stories.d.ts} +3 -3
- package/dist/components/state/BoxLink/index.d.ts +1 -0
- package/dist/components/state/{LinkBox → BoxLink}/index.js +1 -1
- package/dist/components/state/BoxLink/script.d.ts +4 -0
- package/dist/components/state/Container/Container.d.ts +1 -5
- package/dist/components/state/Container/Container.stories.d.ts +2 -2
- package/dist/components/state/Container/index.js +4 -4
- package/dist/config/default-config.d.ts +3 -2
- package/dist/config/default-config.js +4 -4
- package/dist/config/defaults/{states.d.ts → traits.d.ts} +2 -1
- package/dist/config/defaults/{states.js → traits.js} +4 -3
- package/dist/config/index.d.ts +6 -4
- package/dist/config/index.js +8 -8
- package/dist/css/main.css +1 -1
- package/dist/css/main_no_layer.css +1 -1
- package/dist/css/primitives/trait.css +1 -0
- package/dist/css/utility.css +1 -1
- package/dist/lib/getAtomicProps.d.ts +27 -0
- package/dist/lib/getAtomicProps.js +32 -0
- package/dist/lib/getLayoutProps.d.ts +1 -0
- package/dist/lib/getLayoutProps.js +28 -18
- package/dist/lib/getLismProps.d.ts +17 -9
- package/dist/lib/getLismProps.js +123 -102
- package/dist/lib/helper/mergeSet.d.ts +8 -3
- package/dist/lib/helper/mergeSet.js +10 -10
- package/dist/lib/types/AtomicProps.d.ts +24 -0
- package/dist/lib/types/TraitProps.d.ts +47 -0
- package/package.json +1 -1
- package/packages/astro/atomic/Decorator/Decorator.astro +4 -7
- package/packages/astro/atomic/Divider/Divider.astro +1 -2
- package/packages/astro/atomic/Spacer/Spacer.astro +1 -2
- package/packages/astro/index.ts +1 -1
- package/packages/astro/state/{LinkBox/LinkBox.astro → BoxLink/BoxLink.astro} +2 -2
- package/packages/astro/state/BoxLink/index.ts +1 -0
- package/packages/astro/state/Container/Container.astro +3 -6
- package/src/scss/_with_layer.scss +12 -5
- package/src/scss/base/tokens/_tokens.scss +1 -1
- package/src/scss/main_no_layer.scss +4 -4
- package/src/scss/{modules → primitives}/atomic/_icon.scss +2 -2
- package/src/scss/{modules → primitives}/layout/index.scss +1 -1
- package/src/scss/{modules/state/_linkbox.scss → primitives/trait/_boxLink.scss} +4 -4
- package/src/scss/{utility/_linkExpand.scss → primitives/trait/_coverLink.scss} +1 -1
- package/src/scss/primitives/trait/index.scss +7 -0
- package/src/scss/utility/index.scss +0 -1
- package/dist/components/atomic/Decorator/getProps.d.ts +0 -8
- package/dist/components/atomic/Decorator/getProps.js +0 -15
- package/dist/components/atomic/Divider/getProps.d.ts +0 -2
- package/dist/components/atomic/Divider/getProps.js +0 -11
- package/dist/components/atomic/Spacer/getProps.d.ts +0 -2
- package/dist/components/atomic/Spacer/getProps.js +0 -27
- package/dist/components/state/LinkBox/LinkBox.d.ts +0 -5
- package/dist/components/state/LinkBox/index.d.ts +0 -1
- package/dist/components/state/LinkBox/script.d.ts +0 -4
- package/dist/css/modules/state.css +0 -1
- package/dist/lib/types/StateProps.d.ts +0 -29
- package/packages/astro/state/LinkBox/index.ts +0 -1
- package/src/scss/modules/state/index.scss +0 -6
- /package/dist/css/{modules → primitives}/atomic.css +0 -0
- /package/dist/css/{modules → primitives}/layout.css +0 -0
- /package/dist/lib/types/{StateProps.spec-d.d.ts → TraitProps.spec-d.d.ts} +0 -0
- /package/src/scss/{modules → primitives}/atomic/_divider.scss +0 -0
- /package/src/scss/{modules → primitives}/atomic/_spacer.scss +0 -0
- /package/src/scss/{modules → primitives}/atomic/index.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_center.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_cluster.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_columns.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_flex.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_flow.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_fluidCols.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_frame.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_grid.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_sideMain.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_stack.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_switchCols.scss +0 -0
- /package/src/scss/{modules → primitives}/layout/_tileGrid.scss +0 -0
- /package/src/scss/{modules/state → primitives/trait}/_container.scss +0 -0
- /package/src/scss/{modules/state → primitives/trait}/_layer.scss +0 -0
- /package/src/scss/{modules/state → primitives/trait}/_vertical.scss +0 -0
- /package/src/scss/{modules/state → primitives/trait}/_wrapper.scss +0 -0
package/README.ja.md
CHANGED
|
@@ -18,8 +18,8 @@ React / Astro 向けのコンポーネントも提供しており、propsを通
|
|
|
18
18
|
|
|
19
19
|
- **軽量** - CSS バンドル全体で約 30 KB(gzip 圧縮時 約 8 KB)と、軽量です。
|
|
20
20
|
- **ゼロビルドフレームワーク** — CSS ファイルを読み込むだけで、プレーン HTML でも動作します。ビルドツール、プリプロセッサ、設定は不要。CDN または npm で利用可能。
|
|
21
|
-
-
|
|
22
|
-
- **CSS レイヤー構造** — `@layer`(lism-
|
|
21
|
+
- **レイアウト優先のプリミティブアーキテクチャ** — レイアウトプリミティブ(`l--flex`、`l--stack`、`l--grid`、`l--columns`、`l--center`、`l--sideMain` など)で、カスタム CSS を書かずに一般的なレイアウトパターンを組み立てられます。
|
|
22
|
+
- **CSS レイヤー構造** — `@layer`(lism-base → lism-primitive → lism-component → lism-custom → lism-utility)を使用した明確な詳細度管理。`lism-primitive` の内部は `trait` / `layout` / `atomic` のサブレイヤーに分かれています。`lism-component` は BEM 構造の `c--` コンポーネント用レイヤー、`lism-custom` はユーザー独自プレフィックスのクラス用レイヤーです。詳細度の衝突を最小限に抑えます。
|
|
23
23
|
- **デザイントークン** — カラー、スペーシング、フォントサイズ、シャドウ、ボーダー半径を CSS カスタムプロパティで管理。変数を上書きするだけで簡単にカスタマイズできます。
|
|
24
24
|
- **柔軟なプロップクラス** — `-{prop}:{value}` の命名規則(例: `-p:20`、`-bgc:base-2`、`-fz:l`)で CSS プロパティをユーティリティクラスにマッピングし、素早く読みやすいスタイリングを実現します。
|
|
25
25
|
- **レスポンシブシステム** — ブレークポイント固有のクラスと CSS 変数(例: `-p_sm`、`-p_md`)にデフォルトでコンテナクエリを採用し、親要素ベースのレスポンシブデザインを実現。メディアクエリへの切り替えも可能。
|
|
@@ -131,7 +131,7 @@ Lism CSS は以下の React / Astro コンポーネントを提供します:
|
|
|
131
131
|
Lism, Box, Flow, Flex, Cluster, Stack, Grid, FluidCols, SwitchCols, SideMain, Center, Columns, Frame
|
|
132
132
|
|
|
133
133
|
**構造コンポーネント:**
|
|
134
|
-
Container, Wrapper, Layer,
|
|
134
|
+
Container, Wrapper, Layer, BoxLink
|
|
135
135
|
|
|
136
136
|
**コンテンツコンポーネント:**
|
|
137
137
|
Text, Heading, Inline, Link, Group, List
|
|
@@ -147,8 +147,8 @@ Lism CSS は構造化された命名規則を CSS クラスに使用していま
|
|
|
147
147
|
|
|
148
148
|
| タイプ | パターン | 例 |
|
|
149
149
|
|--------|---------|-----|
|
|
150
|
-
|
|
|
151
|
-
|
|
|
150
|
+
| レイアウトプリミティブ | `l--{name}` | `l--flex`, `l--grid`, `l--stack`, `l--center`, `l--columns`, `l--sideMain` |
|
|
151
|
+
| トレイトプリミティブ | `is--{name}` | `is--wrapper`, `is--container`, `is--layer` |
|
|
152
152
|
| プロップクラス | `-{prop}:{value}` | `-p:20`, `-m:auto`, `-bgc:base-2`, `-fz:l`, `-ta:center` |
|
|
153
153
|
| ブレークポイント | `-{prop}_{bp}` | `-p_sm`, `-g_md`, `-fz_lg` |
|
|
154
154
|
| ユーティリティクラス | `u--{name}` | `u--cbox` |
|
package/README.md
CHANGED
|
@@ -17,8 +17,8 @@ No build step or configuration is required. Simply load the CSS file via CDN or
|
|
|
17
17
|
|
|
18
18
|
- **Lightweight** — The entire CSS bundle is approximately 30 KB (~8 KB gzipped).
|
|
19
19
|
- **Zero-Build Framework** — Works with plain HTML by simply loading a CSS file. No build tool, preprocessor, or configuration needed. Available via CDN or npm.
|
|
20
|
-
- **Layout-First
|
|
21
|
-
- **CSS Layer Structure** — Uses `@layer` (lism-
|
|
20
|
+
- **Layout-First Primitive Architecture** — Pre-built layout primitives (`l--flex`, `l--stack`, `l--grid`, `l--columns`, `l--center`, `l--sideMain`, etc.) let you compose common layout patterns without writing custom CSS.
|
|
21
|
+
- **CSS Layer Structure** — Uses `@layer` (lism-base → lism-primitive → lism-component → lism-custom → lism-utility) for clear specificity management. `lism-primitive` contains `trait` / `layout` / `atomic` sub-layers. `lism-component` is the layer for BEM-structured `c--` components. `lism-custom` is the layer for user-defined classes with custom prefixes. Minimizes specificity conflicts.
|
|
22
22
|
- **Design Tokens** — Colors, spacing, font sizes, shadows, and border radii are managed as CSS custom properties. Easy to customize by overriding variables.
|
|
23
23
|
- **Flexible Property Classes** — A `-{prop}:{value}` naming convention (e.g., `-p:20`, `-bgc:base-2`, `-fz:l`) maps CSS properties to utility classes for quick, readable styling.
|
|
24
24
|
- **Responsive System** — Breakpoint-specific classes and CSS variables (e.g., `-p_sm`, `-p_md`) use container queries by default for parent-based responsive design. Switchable to media queries.
|
|
@@ -130,7 +130,7 @@ Lism CSS provides the following React and Astro components:
|
|
|
130
130
|
Lism, Box, Flow, Flex, Cluster, Stack, Grid, FluidCols, SwitchCols, SideMain, Center, Columns, Frame
|
|
131
131
|
|
|
132
132
|
**Structure Components:**
|
|
133
|
-
Container, Wrapper, Layer,
|
|
133
|
+
Container, Wrapper, Layer, BoxLink
|
|
134
134
|
|
|
135
135
|
**Content Components:**
|
|
136
136
|
Text, Heading, Inline, Link, Group, List
|
|
@@ -146,8 +146,8 @@ Lism CSS uses a structured naming convention for CSS classes:
|
|
|
146
146
|
|
|
147
147
|
| Type | Pattern | Examples |
|
|
148
148
|
|------|---------|----------|
|
|
149
|
-
| Layout
|
|
150
|
-
|
|
|
149
|
+
| Layout Primitive | `l--{name}` | `l--flex`, `l--grid`, `l--stack`, `l--center`, `l--columns`, `l--sideMain` |
|
|
150
|
+
| Trait Primitive | `is--{name}` | `is--wrapper`, `is--container`, `is--layer` |
|
|
151
151
|
| Property Class | `-{prop}:{value}` | `-p:20`, `-m:auto`, `-bgc:base-2`, `-fz:l`, `-ta:center` |
|
|
152
152
|
| Breakpoint | `-{prop}_{bp}` | `-p_sm`, `-g_md`, `-fz_lg` |
|
|
153
153
|
| Utility Class | `u--{name}` | `u--cbox` |
|
|
@@ -244,7 +244,7 @@ claude mcp add lism-css -- npx -y @lism-css/mcp
|
|
|
244
244
|
|
|
245
245
|
## Documentation
|
|
246
246
|
|
|
247
|
-
For full documentation, visit [lism-css.com](https://lism-css.com).
|
|
247
|
+
For full documentation, visit [lism-css.com/en](https://lism-css.com/en/).
|
|
248
248
|
|
|
249
249
|
## Community
|
|
250
250
|
|
package/config/default-config.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import TOKENS from './defaults/tokens';
|
|
2
2
|
import PROPS from './defaults/props';
|
|
3
|
-
import
|
|
3
|
+
import TRAITS from './defaults/traits';
|
|
4
4
|
|
|
5
5
|
export default {
|
|
6
6
|
tokens: TOKENS,
|
|
7
7
|
props: PROPS,
|
|
8
|
-
|
|
8
|
+
traits: TRAITS,
|
|
9
9
|
} as const;
|
package/config/index.ts
CHANGED
|
@@ -17,7 +17,7 @@ if (typeof window !== 'undefined' && window._LISM_CSS_CONFIG_) {
|
|
|
17
17
|
|
|
18
18
|
export const CONFIG = mergedConfig;
|
|
19
19
|
|
|
20
|
-
const { tokens, props,
|
|
20
|
+
const { tokens, props, traits } = CONFIG;
|
|
21
21
|
|
|
22
22
|
const tokensWithColor = {
|
|
23
23
|
color: [...tokens.c.values, ...tokens.palette.values],
|
|
@@ -28,8 +28,8 @@ const tokensWithColor = {
|
|
|
28
28
|
export const TOKENS = arrayConvertToSet(structuredClone(tokensWithColor));
|
|
29
29
|
export const PROPS = arrayConvertToSet(structuredClone(props));
|
|
30
30
|
|
|
31
|
-
//
|
|
32
|
-
export const
|
|
31
|
+
// TRAITS は objDeepMerge の型推論により literal types が保持される
|
|
32
|
+
export const TRAITS = traits;
|
|
33
33
|
|
|
34
34
|
// ブレイクポイント
|
|
35
35
|
export const BREAK_POINTS = ['sm', 'md', 'lg', 'xl'] as const;
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { LismComponentProps } from '../../Lism/Lism';
|
|
2
|
+
import { CssValue } from '../../../lib/types/LayoutProps';
|
|
3
|
+
export interface DecoratorOwnProps {
|
|
4
|
+
size?: CssValue;
|
|
5
|
+
clipPath?: string;
|
|
6
|
+
boxSizing?: string;
|
|
7
|
+
}
|
|
8
|
+
export type DecoratorProps = LismComponentProps & DecoratorOwnProps;
|
|
2
9
|
export default function Decorator(props: DecoratorProps): import("react").JSX.Element;
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import t from "
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return /* @__PURE__ */ o(m, { ...t(r) });
|
|
2
|
+
import t from "../../Lism/index.js";
|
|
3
|
+
function i(r) {
|
|
4
|
+
return /* @__PURE__ */ o(t, { atomic: "decorator", "aria-hidden": "true", ...r });
|
|
6
5
|
}
|
|
7
6
|
export {
|
|
8
|
-
|
|
7
|
+
i as default
|
|
9
8
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { getDividerProps as o } from "./getProps.js";
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
3
2
|
import t from "../../Lism/index.js";
|
|
4
|
-
function
|
|
5
|
-
return /* @__PURE__ */
|
|
3
|
+
function d(i) {
|
|
4
|
+
return /* @__PURE__ */ r(t, { atomic: "divider", "aria-hidden": "true", ...i });
|
|
6
5
|
}
|
|
7
6
|
export {
|
|
8
|
-
|
|
7
|
+
d as default
|
|
9
8
|
};
|
|
@@ -1,56 +1,55 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const [, c, t] = s, u = /([\w-]+)=["']([^"']*)["']/g;
|
|
1
|
+
import p from "./presets.js";
|
|
2
|
+
function S(m) {
|
|
3
|
+
const c = {}, e = m.match(/<svg([^>]*?)>([\s\S]*?)<\/svg>/i);
|
|
4
|
+
if (e) {
|
|
5
|
+
const [, f, t] = e, u = /([\w-]+)=["']([^"']*)["']/g;
|
|
7
6
|
let a;
|
|
8
|
-
for (; (a = u.exec(
|
|
9
|
-
const [,
|
|
10
|
-
if (
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
const [
|
|
14
|
-
|
|
15
|
-
}),
|
|
7
|
+
for (; (a = u.exec(f)) !== null; ) {
|
|
8
|
+
const [, n, g] = a;
|
|
9
|
+
if (n === "style") {
|
|
10
|
+
const o = {};
|
|
11
|
+
g.split(";").forEach((s) => {
|
|
12
|
+
const [r, i] = s.split(":").map((l) => l.trim());
|
|
13
|
+
r && i && (o[r] = i);
|
|
14
|
+
}), c[n] = o;
|
|
16
15
|
} else
|
|
17
|
-
|
|
16
|
+
c[n] = g;
|
|
18
17
|
}
|
|
19
|
-
return { svgProps:
|
|
18
|
+
return { svgProps: c, svgContent: t };
|
|
20
19
|
}
|
|
21
20
|
return {};
|
|
22
21
|
}
|
|
23
|
-
function
|
|
24
|
-
let a =
|
|
22
|
+
function C({ lismClass: m, as: c, icon: e, label: f, exProps: t = {}, ...u }) {
|
|
23
|
+
let a = c || "span", n = "";
|
|
25
24
|
const {
|
|
26
|
-
style:
|
|
27
|
-
className:
|
|
28
|
-
...
|
|
25
|
+
style: g = {},
|
|
26
|
+
className: o = "",
|
|
27
|
+
...s
|
|
29
28
|
} = u;
|
|
30
|
-
let
|
|
31
|
-
if (
|
|
29
|
+
let r = g, i = o;
|
|
30
|
+
if (s.viewBox) {
|
|
32
31
|
a = "svg";
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
} else if (
|
|
32
|
+
const l = s.size;
|
|
33
|
+
l && delete s.size, s.width || (t.width = l || "1em"), s.height || (t.height = l || "1em");
|
|
34
|
+
} else if (s.src)
|
|
36
35
|
a = "img";
|
|
37
|
-
else if (
|
|
38
|
-
if (typeof
|
|
39
|
-
if (
|
|
36
|
+
else if (e)
|
|
37
|
+
if (typeof e == "string")
|
|
38
|
+
if (e.startsWith("<svg")) {
|
|
40
39
|
a = "_SVG_";
|
|
41
|
-
const { svgProps:
|
|
42
|
-
|
|
40
|
+
const { svgProps: l = {}, svgContent: v = "" } = S(e), { class: h, style: y, ..._ } = l;
|
|
41
|
+
h && (i = i ? `${i} ${h}` : h), r = { ...r, ...y }, t = { ...t, ..._, fill: "currentColor" }, n = v;
|
|
43
42
|
} else {
|
|
44
|
-
const
|
|
45
|
-
|
|
43
|
+
const l = p[e] || null;
|
|
44
|
+
l != null && (a = "_SVG_", t = { ...t, ...l });
|
|
46
45
|
}
|
|
47
|
-
else if (typeof
|
|
48
|
-
const { as:
|
|
49
|
-
a =
|
|
46
|
+
else if (typeof e == "object" && e.as) {
|
|
47
|
+
const { as: l, ...v } = e;
|
|
48
|
+
a = l, t = { ...t, ...v };
|
|
50
49
|
} else
|
|
51
|
-
a =
|
|
52
|
-
return
|
|
50
|
+
a = e;
|
|
51
|
+
return f ? (t["aria-label"] = f, t.role = "img") : t["aria-hidden"] = "true", s.lismClass = m, s.atomic = "icon", i && (s.className = i), s.style = { ...r }, { Component: a, lismProps: s, exProps: t, content: n };
|
|
53
52
|
}
|
|
54
53
|
export {
|
|
55
|
-
|
|
54
|
+
C as default
|
|
56
55
|
};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return /* @__PURE__ */ o(m, { ...t(r) });
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import a from "../../Lism/index.js";
|
|
3
|
+
function o(r) {
|
|
4
|
+
return /* @__PURE__ */ t(a, { atomic: "spacer", "aria-hidden": "true", ...r });
|
|
6
5
|
}
|
|
7
6
|
export {
|
|
8
|
-
|
|
7
|
+
o as default
|
|
9
8
|
};
|
|
@@ -23,7 +23,7 @@ export * from './layout/SwitchCols';
|
|
|
23
23
|
export * from './layout/TileGrid';
|
|
24
24
|
export * from './state/Container';
|
|
25
25
|
export * from './state/Layer';
|
|
26
|
-
export * from './state/
|
|
26
|
+
export * from './state/BoxLink';
|
|
27
27
|
export * from './state/Wrapper';
|
|
28
28
|
export * from './atomic/Decorator';
|
|
29
29
|
export * from './atomic/Divider';
|
package/dist/components/index.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { default as o } from "./layout/Box/index.js";
|
|
2
|
-
import { default as t } from "./
|
|
3
|
-
import { default as l } from "./layout/
|
|
4
|
-
import { default as s } from "./layout/
|
|
5
|
-
import { default as u } from "./
|
|
6
|
-
import { default as x } from "./
|
|
7
|
-
import { default as n } from "./atomic/
|
|
8
|
-
import { default as L } from "./
|
|
9
|
-
import { default as F } from "./
|
|
10
|
-
import { default as k } from "./layout/
|
|
11
|
-
import { default as G } from "./layout/
|
|
12
|
-
import { default as w } from "./layout/
|
|
13
|
-
import { default as B } from "./layout/
|
|
14
|
-
import { default as T } from "./
|
|
15
|
-
import { default as h } from "./
|
|
16
|
-
import { default as H } from "./
|
|
17
|
-
import { default as b } from "./
|
|
18
|
-
import { default as q } from "./
|
|
19
|
-
import { default as A } from "./
|
|
20
|
-
import { default as J } from "./
|
|
2
|
+
import { default as t } from "./state/BoxLink/index.js";
|
|
3
|
+
import { default as l } from "./layout/Center/index.js";
|
|
4
|
+
import { default as s } from "./layout/Cluster/index.js";
|
|
5
|
+
import { default as u } from "./layout/Columns/index.js";
|
|
6
|
+
import { default as x } from "./state/Container/index.js";
|
|
7
|
+
import { default as n } from "./atomic/Decorator/index.js";
|
|
8
|
+
import { default as L } from "./atomic/Divider/index.js";
|
|
9
|
+
import { default as F } from "./Dummy/index.js";
|
|
10
|
+
import { default as k } from "./layout/Flex/index.js";
|
|
11
|
+
import { default as G } from "./layout/Flow/index.js";
|
|
12
|
+
import { default as w } from "./layout/FluidCols/index.js";
|
|
13
|
+
import { default as B } from "./layout/Frame/index.js";
|
|
14
|
+
import { default as T } from "./layout/Grid/index.js";
|
|
15
|
+
import { default as h } from "./Group/index.js";
|
|
16
|
+
import { default as H } from "./Heading/index.js";
|
|
17
|
+
import { default as b } from "./atomic/Icon/index.js";
|
|
18
|
+
import { default as q } from "./Inline/index.js";
|
|
19
|
+
import { default as A } from "./state/Layer/index.js";
|
|
20
|
+
import { default as J } from "./Link/index.js";
|
|
21
21
|
import { default as N } from "./Lism/index.js";
|
|
22
22
|
import { default as P } from "./List/index.js";
|
|
23
23
|
import { default as R } from "./List/ListItem.js";
|
|
@@ -31,25 +31,25 @@ import { default as le } from "./layout/TileGrid/index.js";
|
|
|
31
31
|
import { default as se } from "./state/Wrapper/index.js";
|
|
32
32
|
export {
|
|
33
33
|
o as Box,
|
|
34
|
-
t as
|
|
35
|
-
l as
|
|
36
|
-
s as
|
|
37
|
-
u as
|
|
38
|
-
x as
|
|
39
|
-
n as
|
|
40
|
-
L as
|
|
41
|
-
F as
|
|
42
|
-
k as
|
|
43
|
-
G as
|
|
44
|
-
w as
|
|
45
|
-
B as
|
|
46
|
-
T as
|
|
47
|
-
h as
|
|
48
|
-
H as
|
|
49
|
-
b as
|
|
50
|
-
q as
|
|
51
|
-
A as
|
|
52
|
-
J as
|
|
34
|
+
t as BoxLink,
|
|
35
|
+
l as Center,
|
|
36
|
+
s as Cluster,
|
|
37
|
+
u as Columns,
|
|
38
|
+
x as Container,
|
|
39
|
+
n as Decorator,
|
|
40
|
+
L as Divider,
|
|
41
|
+
F as Dummy,
|
|
42
|
+
k as Flex,
|
|
43
|
+
G as Flow,
|
|
44
|
+
w as FluidCols,
|
|
45
|
+
B as Frame,
|
|
46
|
+
T as Grid,
|
|
47
|
+
h as Group,
|
|
48
|
+
H as Heading,
|
|
49
|
+
b as Icon,
|
|
50
|
+
q as Inline,
|
|
51
|
+
A as Layer,
|
|
52
|
+
J as Link,
|
|
53
53
|
N as Lism,
|
|
54
54
|
P as List,
|
|
55
55
|
R as ListItem,
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ElementType } from 'react';
|
|
2
|
+
import { LismComponentProps } from '../../Lism';
|
|
3
|
+
type BoxLinkProps<T extends ElementType = 'a'> = LismComponentProps<T>;
|
|
4
|
+
export default function BoxLink<T extends ElementType = 'a'>({ as, children, ...props }: BoxLinkProps<T>): import("react").JSX.Element;
|
|
5
|
+
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import {
|
|
3
|
-
declare const meta: Meta<typeof
|
|
2
|
+
import { BoxLink } from './index';
|
|
3
|
+
declare const meta: Meta<typeof BoxLink>;
|
|
4
4
|
export default meta;
|
|
5
|
-
type Story = StoryObj<typeof
|
|
5
|
+
type Story = StoryObj<typeof BoxLink>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
7
|
export declare const WithoutHref: Story;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BoxLink } from './BoxLink';
|
|
@@ -2,7 +2,7 @@ import { jsx as i } from "react/jsx-runtime";
|
|
|
2
2
|
import e from "../../Lism/index.js";
|
|
3
3
|
function m({ as: r, children: o, ...t }) {
|
|
4
4
|
const a = !!!t.href && (r ?? "a") === "a" ? "div" : r ?? "a";
|
|
5
|
-
return /* @__PURE__ */ i(e, {
|
|
5
|
+
return /* @__PURE__ */ i(e, { isBoxLink: !0, as: a, ...t, children: o });
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
8
|
m as default
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
import { LismComponentProps } from '../../Lism';
|
|
2
|
-
|
|
3
|
-
size?: LismComponentProps['isWrapper'];
|
|
4
|
-
};
|
|
5
|
-
export default function Container({ size, ...props }: ContainerProps): import("react").JSX.Element;
|
|
6
|
-
export {};
|
|
2
|
+
export default function Container(props: LismComponentProps): import("react").JSX.Element;
|
|
@@ -4,5 +4,5 @@ declare const meta: Meta<typeof Container>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof Container>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
-
export declare const
|
|
8
|
-
export declare const
|
|
7
|
+
export declare const WrapperS: Story;
|
|
8
|
+
export declare const WrapperL: Story;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import o from "../../Lism/index.js";
|
|
3
|
-
function
|
|
4
|
-
return /* @__PURE__ */
|
|
3
|
+
function e(r) {
|
|
4
|
+
return /* @__PURE__ */ t(o, { isContainer: !0, ...r });
|
|
5
5
|
}
|
|
6
6
|
export {
|
|
7
|
-
|
|
7
|
+
e as default
|
|
8
8
|
};
|
|
@@ -788,7 +788,7 @@ declare const _default: {
|
|
|
788
788
|
readonly presets: readonly ["isolate"];
|
|
789
789
|
};
|
|
790
790
|
};
|
|
791
|
-
readonly
|
|
791
|
+
readonly traits: {
|
|
792
792
|
readonly isContainer: "is--container";
|
|
793
793
|
readonly isWrapper: {
|
|
794
794
|
readonly className: "is--wrapper";
|
|
@@ -798,7 +798,8 @@ declare const _default: {
|
|
|
798
798
|
readonly tokenKey: "sz";
|
|
799
799
|
};
|
|
800
800
|
readonly isLayer: "is--layer";
|
|
801
|
-
readonly
|
|
801
|
+
readonly isBoxLink: "is--boxLink";
|
|
802
|
+
readonly isCoverLink: "is--coverLink";
|
|
802
803
|
readonly isSide: "is--side";
|
|
803
804
|
readonly isSkipFlow: "is--skipFlow";
|
|
804
805
|
readonly isVertical: "is--vertical";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import o from "./defaults/tokens.js";
|
|
2
2
|
import t from "./defaults/props.js";
|
|
3
|
-
import r from "./defaults/
|
|
4
|
-
const
|
|
3
|
+
import r from "./defaults/traits.js";
|
|
4
|
+
const i = {
|
|
5
5
|
tokens: o,
|
|
6
6
|
props: t,
|
|
7
|
-
|
|
7
|
+
traits: r
|
|
8
8
|
};
|
|
9
9
|
export {
|
|
10
|
-
|
|
10
|
+
i as default
|
|
11
11
|
};
|
|
@@ -8,7 +8,8 @@ declare const _default: {
|
|
|
8
8
|
readonly tokenKey: "sz";
|
|
9
9
|
};
|
|
10
10
|
readonly isLayer: "is--layer";
|
|
11
|
-
readonly
|
|
11
|
+
readonly isBoxLink: "is--boxLink";
|
|
12
|
+
readonly isCoverLink: "is--coverLink";
|
|
12
13
|
readonly isSide: "is--side";
|
|
13
14
|
readonly isSkipFlow: "is--skipFlow";
|
|
14
15
|
readonly isVertical: "is--vertical";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const
|
|
1
|
+
const i = {
|
|
2
2
|
isContainer: "is--container",
|
|
3
3
|
isWrapper: {
|
|
4
4
|
className: "is--wrapper",
|
|
@@ -8,11 +8,12 @@ const s = {
|
|
|
8
8
|
tokenKey: "sz"
|
|
9
9
|
},
|
|
10
10
|
isLayer: "is--layer",
|
|
11
|
-
|
|
11
|
+
isBoxLink: "is--boxLink",
|
|
12
|
+
isCoverLink: "is--coverLink",
|
|
12
13
|
isSide: "is--side",
|
|
13
14
|
isSkipFlow: "is--skipFlow",
|
|
14
15
|
isVertical: "is--vertical"
|
|
15
16
|
};
|
|
16
17
|
export {
|
|
17
|
-
|
|
18
|
+
i as default
|
|
18
19
|
};
|
package/dist/config/index.d.ts
CHANGED
|
@@ -788,7 +788,7 @@ export declare const CONFIG: {
|
|
|
788
788
|
readonly presets: readonly ["isolate"];
|
|
789
789
|
};
|
|
790
790
|
};
|
|
791
|
-
|
|
791
|
+
traits: {
|
|
792
792
|
readonly isContainer: "is--container";
|
|
793
793
|
readonly isWrapper: {
|
|
794
794
|
readonly className: "is--wrapper";
|
|
@@ -798,7 +798,8 @@ export declare const CONFIG: {
|
|
|
798
798
|
readonly tokenKey: "sz";
|
|
799
799
|
};
|
|
800
800
|
readonly isLayer: "is--layer";
|
|
801
|
-
readonly
|
|
801
|
+
readonly isBoxLink: "is--boxLink";
|
|
802
|
+
readonly isCoverLink: "is--coverLink";
|
|
802
803
|
readonly isSide: "is--side";
|
|
803
804
|
readonly isSkipFlow: "is--skipFlow";
|
|
804
805
|
readonly isVertical: "is--vertical";
|
|
@@ -1594,7 +1595,7 @@ export declare const PROPS: {
|
|
|
1594
1595
|
readonly presets: readonly ["isolate"];
|
|
1595
1596
|
};
|
|
1596
1597
|
};
|
|
1597
|
-
export declare const
|
|
1598
|
+
export declare const TRAITS: {
|
|
1598
1599
|
readonly isContainer: "is--container";
|
|
1599
1600
|
readonly isWrapper: {
|
|
1600
1601
|
readonly className: "is--wrapper";
|
|
@@ -1604,7 +1605,8 @@ export declare const STATES: {
|
|
|
1604
1605
|
readonly tokenKey: "sz";
|
|
1605
1606
|
};
|
|
1606
1607
|
readonly isLayer: "is--layer";
|
|
1607
|
-
readonly
|
|
1608
|
+
readonly isBoxLink: "is--boxLink";
|
|
1609
|
+
readonly isCoverLink: "is--coverLink";
|
|
1608
1610
|
readonly isSide: "is--side";
|
|
1609
1611
|
readonly isSkipFlow: "is--skipFlow";
|
|
1610
1612
|
readonly isVertical: "is--vertical";
|
package/dist/config/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import r from "./default-config.js";
|
|
2
2
|
import s from "lism-css/config.js";
|
|
3
|
-
import {
|
|
4
|
-
let t =
|
|
5
|
-
typeof window < "u" && window._LISM_CSS_CONFIG_ && (t =
|
|
6
|
-
const
|
|
3
|
+
import { arrayConvertToSet as e, objDeepMerge as n } from "./helper.js";
|
|
4
|
+
let t = n(r, s);
|
|
5
|
+
typeof window < "u" && window._LISM_CSS_CONFIG_ && (t = n(t, window._LISM_CSS_CONFIG_));
|
|
6
|
+
const i = t, { tokens: o, props: c, traits: C } = i, S = {
|
|
7
7
|
color: [...o.c.values, ...o.palette.values],
|
|
8
8
|
...o
|
|
9
|
-
}, m =
|
|
9
|
+
}, m = e(structuredClone(S)), p = e(structuredClone(c)), u = C, l = ["sm", "md", "lg", "xl"], a = ["base", ...l];
|
|
10
10
|
export {
|
|
11
11
|
l as BREAK_POINTS,
|
|
12
12
|
a as BREAK_POINTS_ALL,
|
|
13
|
-
|
|
13
|
+
i as CONFIG,
|
|
14
14
|
p as PROPS,
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
m as TOKENS,
|
|
16
|
+
u as TRAITS
|
|
17
17
|
};
|