lism-css 0.14.0 → 0.15.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 +2 -2
- package/README.md +4 -3
- package/bin/build-config.js +1 -4
- package/bin/cli.mjs +13 -3
- package/config/defaults/props.ts +11 -14
- package/config/defaults/tokens.ts +1 -1
- package/config/defaults/traits.ts +4 -0
- package/dist/components/Lism/Lism.d.ts +2 -1
- package/dist/config/default-config.d.ts +5 -12
- package/dist/config/defaults/props.d.ts +5 -14
- package/dist/config/defaults/props.js +7 -12
- package/dist/config/defaults/tokens.d.ts +1 -1
- package/dist/config/defaults/tokens.js +1 -1
- package/dist/config/defaults/traits.d.ts +4 -0
- package/dist/config/defaults/traits.js +5 -1
- package/dist/config/index.d.ts +10 -24
- package/dist/css/base/set.css +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/main.css +1 -1
- package/dist/css/main_no_layer.css +1 -1
- package/dist/css/props.css +1 -1
- package/dist/css/trait.css +1 -0
- package/dist/css/utility.css +1 -1
- package/dist/lib/getLismProps.d.ts +5 -5
- package/dist/lib/getLismProps.js +101 -102
- package/dist/lib/types/TraitProps.d.ts +2 -2
- package/package.json +1 -1
- package/packages/astro/index.ts +3 -0
- package/packages/astro/layout/Flex/Flex.astro +3 -2
- package/packages/astro/layout/Flow/Flow.astro +2 -2
- package/packages/astro/types.ts +3 -0
- package/src/scss/_auto_output.scss +12 -11
- package/src/scss/_prop-config.scss +1 -11
- package/src/scss/_with_layer.scss +8 -4
- package/src/scss/base/_html.scss +3 -3
- package/src/scss/base/set/{_innerRs.scss → _bdrsInner.scss} +1 -1
- package/src/scss/base/set/_hov.scss +4 -4
- package/src/scss/base/set/_revert.scss +6 -0
- package/src/scss/base/set/index.scss +2 -4
- package/src/scss/base/tokens/_shadow.scss +18 -12
- package/src/scss/base/tokens/_tokens.scss +1 -12
- package/src/scss/main_no_layer.scss +4 -1
- package/src/scss/props/_hover.scss +27 -16
- package/src/scss/props/_size.scss +1 -1
- package/src/scss/{primitives/trait → trait}/_boxLink.scss +1 -1
- package/src/scss/{primitives/trait → trait}/_container.scss +2 -2
- package/src/scss/{base/set/_gutter.scss → trait/_hasGutter.scss} +1 -1
- package/src/scss/trait/_hasMask.scss +6 -0
- package/src/scss/trait/_hasSnap.scss +11 -0
- package/src/scss/trait/_hasTransition.scss +8 -0
- package/src/scss/{primitives/trait → trait}/index.scss +7 -1
- package/src/scss/utility/index.scss +0 -1
- package/dist/css/primitives/trait.css +0 -1
- package/src/scss/base/set/_mask.scss +0 -6
- package/src/scss/base/set/_transition.scss +0 -11
- package/src/scss/utility/_snap.scss +0 -8
- /package/src/scss/{primitives/trait → trait}/_coverLink.scss +0 -0
- /package/src/scss/{primitives/trait → trait}/_layer.scss +0 -0
- /package/src/scss/{primitives/trait → trait}/_wrapper.scss +0 -0
package/README.ja.md
CHANGED
|
@@ -19,7 +19,7 @@ React / Astro 向けのコンポーネントも提供しており、propsを通
|
|
|
19
19
|
- **軽量** - CSS バンドル全体で約 30 KB(gzip 圧縮時 約 8 KB)と、軽量です。
|
|
20
20
|
- **ゼロビルドフレームワーク** — CSS ファイルを読み込むだけで、プレーン HTML でも動作します。ビルドツール、プリプロセッサ、設定は不要。CDN または npm で利用可能。
|
|
21
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-
|
|
22
|
+
- **CSS レイヤー構造** — `@layer`(lism-base → lism-trait → lism-primitive → lism-component → lism-custom → lism-utility)を使用した明確な詳細度管理。`lism-trait` は `is--` / `has--` の Trait クラス用レイヤー、`lism-primitive` の内部は `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`)にデフォルトでコンテナクエリを採用し、親要素ベースのレスポンシブデザインを実現。メディアクエリへの切り替えも可能。
|
|
@@ -183,7 +183,7 @@ Lism CSS は一貫したデザインのための CSS カスタムプロパティ
|
|
|
183
183
|
- **スペーシング:** `--s5`, `--s10`, `--s15`, `--s20`, `--s30`, `--s40` … `--s80`(rem 値にマッピング)
|
|
184
184
|
- **フォントサイズ:** `--fz--2xs` 〜 `--fz--5xl`
|
|
185
185
|
- **ボーダー半径:** `--bdrs--10`(0.25rem)〜 `--bdrs--99`(99rem)
|
|
186
|
-
- **シャドウ:** `--bxsh--10` 〜 `--bxsh--
|
|
186
|
+
- **シャドウ:** `--bxsh--10` 〜 `--bxsh--50`(シャドウカラー設定可能)
|
|
187
187
|
- **コンテナサイズ:** `--sz--xs`(32rem)〜 `--sz--xl`(1600px)
|
|
188
188
|
|
|
189
189
|
## UI コンポーネント
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ No build step or configuration is required. Simply load the CSS file via CDN or
|
|
|
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
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-
|
|
21
|
+
- **CSS Layer Structure** — Uses `@layer` (lism-base → lism-trait → lism-primitive → lism-component → lism-custom → lism-utility) for clear specificity management. `lism-trait` is the layer for `is--` / `has--` trait classes. `lism-primitive` contains `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.
|
|
@@ -147,7 +147,8 @@ Lism CSS uses a structured naming convention for CSS classes:
|
|
|
147
147
|
| Type | Pattern | Examples |
|
|
148
148
|
|------|---------|----------|
|
|
149
149
|
| Layout Primitive | `l--{name}` | `l--flex`, `l--grid`, `l--stack`, `l--center`, `l--columns`, `l--sideMain` |
|
|
150
|
-
| Trait
|
|
150
|
+
| Trait Class (role) | `is--{name}` | `is--wrapper`, `is--container`, `is--layer`, `is--boxLink` |
|
|
151
|
+
| Trait Class (feature) | `has--{name}` | `has--transition`, `has--gutter`, `has--snap` |
|
|
151
152
|
| Property Class | `-{prop}:{value}` | `-p:20`, `-m:auto`, `-bgc:base-2`, `-fz:l`, `-ta:center` |
|
|
152
153
|
| Breakpoint | `-{prop}_{bp}` | `-p_sm`, `-g_md`, `-fz_lg` |
|
|
153
154
|
| Utility Class | `u--{name}` | `u--cbox` |
|
|
@@ -182,7 +183,7 @@ Lism CSS provides CSS custom properties for consistent design:
|
|
|
182
183
|
- **Spacing:** `--s5`, `--s10`, `--s15`, `--s20`, `--s30`, `--s40` … `--s80` (mapped to rem values)
|
|
183
184
|
- **Font Sizes:** `--fz--2xs` through `--fz--5xl`
|
|
184
185
|
- **Border Radius:** `--bdrs--10` (0.25rem) through `--bdrs--99` (99rem)
|
|
185
|
-
- **Shadows:** `--bxsh--10` through `--bxsh--
|
|
186
|
+
- **Shadows:** `--bxsh--10` through `--bxsh--50` with configurable shadow colors
|
|
186
187
|
- **Container Sizes:** `--sz--xs` (32rem) through `--sz--xl` (1600px)
|
|
187
188
|
|
|
188
189
|
## UI Components
|
package/bin/build-config.js
CHANGED
|
@@ -51,7 +51,7 @@ function generateUtilities(propConfig, TOKENS) {
|
|
|
51
51
|
* @returns {string} SCSS形式の文字列
|
|
52
52
|
*/
|
|
53
53
|
function generatePropScss(propKey, propConfig, TOKENS) {
|
|
54
|
-
const { prop = '', bp, isVar, alwaysVar,
|
|
54
|
+
const { prop = '', bp, isVar, alwaysVar, important } = propConfig;
|
|
55
55
|
|
|
56
56
|
// styleが定義されている場合はそれを使用、なければpropKeyをそのまま使用
|
|
57
57
|
const utilities = generateUtilities(propConfig, TOKENS);
|
|
@@ -114,9 +114,6 @@ function generatePropScss(propKey, propConfig, TOKENS) {
|
|
|
114
114
|
if (alwaysVar !== undefined) {
|
|
115
115
|
scss += ` alwaysVar: ${alwaysVar},\n`;
|
|
116
116
|
}
|
|
117
|
-
if (overwriteBaseVar !== undefined) {
|
|
118
|
-
scss += ` overwriteBaseVar: ${overwriteBaseVar},\n`;
|
|
119
|
-
}
|
|
120
117
|
if (important !== undefined) {
|
|
121
118
|
scss += ` important: ${important},\n`;
|
|
122
119
|
}
|
package/bin/cli.mjs
CHANGED
|
@@ -17,7 +17,17 @@ console.log('🤖 projectRoot:', projectRoot);
|
|
|
17
17
|
|
|
18
18
|
// 設定ファイルのパス
|
|
19
19
|
const defaultConfigPath = path.resolve(__dirname, '../config/default-config.js');
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
// ユーザー設定ファイルを検索(優先順: .js → .mjs)
|
|
22
|
+
const CONFIG_SEARCH = ['lism.config.js', 'lism.config.mjs'];
|
|
23
|
+
function findUserConfigPath() {
|
|
24
|
+
for (const name of CONFIG_SEARCH) {
|
|
25
|
+
const abs = path.resolve(projectRoot, name);
|
|
26
|
+
if (fs.existsSync(abs)) return abs;
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
const userConfigPath = findUserConfigPath();
|
|
21
31
|
|
|
22
32
|
// コマンドライン引数の先頭をサブコマンドとして解釈(デフォルトは build-config)
|
|
23
33
|
const args = process.argv.slice(2);
|
|
@@ -30,9 +40,9 @@ async function main() {
|
|
|
30
40
|
const defaultConfigModule = await import(pathToFileURL(defaultConfigPath).href);
|
|
31
41
|
const defaultConfig = defaultConfigModule?.default || {};
|
|
32
42
|
|
|
33
|
-
// user の lism.config.js は存在する時のみ読み込む
|
|
43
|
+
// user の lism.config.{js,mjs} は存在する時のみ読み込む
|
|
34
44
|
let userConfig = {};
|
|
35
|
-
if (
|
|
45
|
+
if (userConfigPath) {
|
|
36
46
|
const userConfigModule = await import(pathToFileURL(userConfigPath).href);
|
|
37
47
|
userConfig = userConfigModule?.default || {};
|
|
38
48
|
|
package/config/defaults/props.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* isVar: 1 → クラス出力はせずstyle属性での変数出力のみ (--bdw, --keycolor など)
|
|
3
3
|
* bp: 0 → Prop-valユーティリティクラス化されなければ、style属性で出力するだけ。
|
|
4
4
|
* bp: 1 → .-prop と --prop の セットがベースにあり、.-prop_bp と .--prop_bp で ブレイクポイント指定できる。
|
|
5
|
-
* .-prop{
|
|
5
|
+
* .-prop{property:var(--prop)} が基本で、ユーティリティクラスは .-prop:val{property:value} となる。
|
|
6
6
|
*
|
|
7
7
|
* ↓コンポーネント処理で使用される
|
|
8
8
|
* tokenClass: 1 → 対応するトークン値がそのまま全てユーティリティクラス化されるもの。
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
* shorthands: → コンポーネント側で短く書くための設定
|
|
11
11
|
*
|
|
12
12
|
* ↓SCSS出力で使用される
|
|
13
|
-
* alwaysVar: 1 → .-prop,[class*=-prop:] {
|
|
14
|
-
*
|
|
13
|
+
* alwaysVar: 1 → state変数扱い。 .-prop,[class*=-prop:] {property:var(--prop)} の base 出力となり、
|
|
14
|
+
* ユーティリティクラスは --prop をセットする形になる。
|
|
15
|
+
* 加えて BPクラスも .-prop_$bp { property: var(--prop); --prop: var(--prop_$bp) !important; } を出力し、
|
|
16
|
+
* 常に --prop が当該要素の現在値になるよう上書きされる(consumer が --prop を参照できる)。
|
|
15
17
|
* important: 1 → !important を付けて最終的に出力する
|
|
16
18
|
*/
|
|
17
19
|
|
|
@@ -21,7 +23,7 @@ const PLACE_SHORTHANDS = { s: 'start', e: 'end', c: 'center', fs: 'flex-start',
|
|
|
21
23
|
|
|
22
24
|
export default {
|
|
23
25
|
f: { prop: 'font', presets: ['inherit'] },
|
|
24
|
-
fz: { prop: 'fontSize', token: 'fz', tokenClass: 1, bp: 1
|
|
26
|
+
fz: { prop: 'fontSize', token: 'fz', tokenClass: 1, bp: 1 },
|
|
25
27
|
fw: {
|
|
26
28
|
prop: 'fontWeight',
|
|
27
29
|
token: 'fw',
|
|
@@ -153,7 +155,6 @@ export default {
|
|
|
153
155
|
tokenClass: 1,
|
|
154
156
|
bp: 1,
|
|
155
157
|
alwaysVar: 1,
|
|
156
|
-
overwriteBaseVar: 1,
|
|
157
158
|
},
|
|
158
159
|
'bdrs-tl': { prop: 'borderTopLeftRadius', token: 'bdrs' },
|
|
159
160
|
'bdrs-tr': { prop: 'borderTopRightRadius', token: 'bdrs' },
|
|
@@ -164,7 +165,7 @@ export default {
|
|
|
164
165
|
'bdrs-es': { prop: 'borderEndStartRadius', token: 'bdrs' },
|
|
165
166
|
'bdrs-ee': { prop: 'borderEndEndRadius', token: 'bdrs' },
|
|
166
167
|
|
|
167
|
-
bxsh: { prop: 'boxShadow', utils: { 0: 'none' }, token: 'bxsh', tokenClass: 1, bp: 1
|
|
168
|
+
bxsh: { prop: 'boxShadow', utils: { 0: 'none' }, token: 'bxsh', tokenClass: 1, bp: 1 },
|
|
168
169
|
|
|
169
170
|
// position
|
|
170
171
|
pos: {
|
|
@@ -191,11 +192,10 @@ export default {
|
|
|
191
192
|
token: 'space',
|
|
192
193
|
tokenClass: 1,
|
|
193
194
|
alwaysVar: 1,
|
|
194
|
-
overwriteBaseVar: 1,
|
|
195
195
|
bp: 1,
|
|
196
196
|
},
|
|
197
|
-
px: { prop: 'paddingInline', presets: ['0'], token: 'space', tokenClass: 1,
|
|
198
|
-
py: { prop: 'paddingBlock', presets: ['0'], token: 'space', tokenClass: 1,
|
|
197
|
+
px: { prop: 'paddingInline', presets: ['0'], token: 'space', tokenClass: 1, bp: 1 },
|
|
198
|
+
py: { prop: 'paddingBlock', presets: ['0'], token: 'space', tokenClass: 1, bp: 1 },
|
|
199
199
|
'px-s': { prop: 'paddingInlineStart', token: 'space', bp: 1 },
|
|
200
200
|
'px-e': { prop: 'paddingInlineEnd', token: 'space', bp: 1 },
|
|
201
201
|
'py-s': { prop: 'paddingBlockStart', token: 'space', bp: 1 },
|
|
@@ -210,11 +210,10 @@ export default {
|
|
|
210
210
|
token: 'space',
|
|
211
211
|
tokenClass: 1,
|
|
212
212
|
alwaysVar: 1,
|
|
213
|
-
overwriteBaseVar: 1,
|
|
214
213
|
bp: 1,
|
|
215
214
|
},
|
|
216
|
-
mx: { prop: 'marginInline', presets: ['auto', '0'], token: 'space', tokenClass: 1,
|
|
217
|
-
my: { prop: 'marginBlock', presets: ['auto', '0'], token: 'space', tokenClass: 1,
|
|
215
|
+
mx: { prop: 'marginInline', presets: ['auto', '0'], token: 'space', tokenClass: 1, bp: 1 },
|
|
216
|
+
my: { prop: 'marginBlock', presets: ['auto', '0'], token: 'space', tokenClass: 1, bp: 1 },
|
|
218
217
|
'mx-s': { prop: 'marginInlineStart', presets: ['auto'], token: 'space', bp: 1 },
|
|
219
218
|
'mx-e': { prop: 'marginInlineEnd', presets: ['auto'], token: 'space', bp: 1 },
|
|
220
219
|
'my-s': { prop: 'marginBlockStart', token: 'space', bp: 1, presets: ['auto', '0'], tokenClass: 1 },
|
|
@@ -230,8 +229,6 @@ export default {
|
|
|
230
229
|
exUtility: { inherit: { gap: 'inherit' } },
|
|
231
230
|
token: 'space',
|
|
232
231
|
tokenClass: 1,
|
|
233
|
-
alwaysVar: 1,
|
|
234
|
-
overwriteBaseVar: 1,
|
|
235
232
|
bp: 1,
|
|
236
233
|
},
|
|
237
234
|
cg: { prop: 'columnGap', token: 'space', bp: 1 },
|
|
@@ -7,7 +7,7 @@ export default {
|
|
|
7
7
|
fw: ['light', 'normal', 'bold'],
|
|
8
8
|
o: ['-10', '-20', '-30'],
|
|
9
9
|
bdrs: ['10', '20', '30', '40', '99', 'inner'],
|
|
10
|
-
bxsh: ['10', '20', '30', '40'],
|
|
10
|
+
bxsh: ['10', '20', '30', '40', '50'],
|
|
11
11
|
sz: ['xs', 's', 'm', 'l', 'xl', 'container'],
|
|
12
12
|
ar: ['og'],
|
|
13
13
|
space: {
|
|
@@ -3,9 +3,10 @@ import { LismProps } from '../../lib/getLismProps';
|
|
|
3
3
|
import { LayoutSpecificProps } from '../../lib/types/LayoutProps';
|
|
4
4
|
type ReactStyleWithCustomProps = CSSProperties & Record<`--${string}`, string | number | undefined>;
|
|
5
5
|
/** 要素固有の HTML Props + 共通オプション */
|
|
6
|
-
type LismElementProps<T extends ElementType> = Omit<ComponentPropsWithoutRef<T>, 'style'> & {
|
|
6
|
+
type LismElementProps<T extends ElementType> = Omit<ComponentPropsWithoutRef<T>, 'style' | 'className'> & {
|
|
7
7
|
as?: T;
|
|
8
8
|
children?: ReactNode;
|
|
9
|
+
className?: string;
|
|
9
10
|
exProps?: Record<string, unknown>;
|
|
10
11
|
/** React では camelCase のみ有効(kebab-case は実行時に無視される) */
|
|
11
12
|
style?: ReactStyleWithCustomProps;
|
|
@@ -8,7 +8,7 @@ declare const _default: {
|
|
|
8
8
|
readonly fw: readonly ["light", "normal", "bold"];
|
|
9
9
|
readonly o: readonly ["-10", "-20", "-30"];
|
|
10
10
|
readonly bdrs: readonly ["10", "20", "30", "40", "99", "inner"];
|
|
11
|
-
readonly bxsh: readonly ["10", "20", "30", "40"];
|
|
11
|
+
readonly bxsh: readonly ["10", "20", "30", "40", "50"];
|
|
12
12
|
readonly sz: readonly ["xs", "s", "m", "l", "xl", "container"];
|
|
13
13
|
readonly ar: readonly ["og"];
|
|
14
14
|
readonly space: {
|
|
@@ -36,7 +36,6 @@ declare const _default: {
|
|
|
36
36
|
readonly token: "fz";
|
|
37
37
|
readonly tokenClass: 1;
|
|
38
38
|
readonly bp: 1;
|
|
39
|
-
readonly alwaysVar: 1;
|
|
40
39
|
};
|
|
41
40
|
readonly fw: {
|
|
42
41
|
readonly prop: "fontWeight";
|
|
@@ -301,7 +300,6 @@ declare const _default: {
|
|
|
301
300
|
readonly tokenClass: 1;
|
|
302
301
|
readonly bp: 1;
|
|
303
302
|
readonly alwaysVar: 1;
|
|
304
|
-
readonly overwriteBaseVar: 1;
|
|
305
303
|
};
|
|
306
304
|
readonly 'bdrs-tl': {
|
|
307
305
|
readonly prop: "borderTopLeftRadius";
|
|
@@ -343,7 +341,6 @@ declare const _default: {
|
|
|
343
341
|
readonly token: "bxsh";
|
|
344
342
|
readonly tokenClass: 1;
|
|
345
343
|
readonly bp: 1;
|
|
346
|
-
readonly alwaysVar: 1;
|
|
347
344
|
};
|
|
348
345
|
readonly pos: {
|
|
349
346
|
readonly prop: "position";
|
|
@@ -422,7 +419,6 @@ declare const _default: {
|
|
|
422
419
|
readonly token: "space";
|
|
423
420
|
readonly tokenClass: 1;
|
|
424
421
|
readonly alwaysVar: 1;
|
|
425
|
-
readonly overwriteBaseVar: 1;
|
|
426
422
|
readonly bp: 1;
|
|
427
423
|
};
|
|
428
424
|
readonly px: {
|
|
@@ -430,7 +426,6 @@ declare const _default: {
|
|
|
430
426
|
readonly presets: readonly ["0"];
|
|
431
427
|
readonly token: "space";
|
|
432
428
|
readonly tokenClass: 1;
|
|
433
|
-
readonly alwaysVar: 1;
|
|
434
429
|
readonly bp: 1;
|
|
435
430
|
};
|
|
436
431
|
readonly py: {
|
|
@@ -438,7 +433,6 @@ declare const _default: {
|
|
|
438
433
|
readonly presets: readonly ["0"];
|
|
439
434
|
readonly token: "space";
|
|
440
435
|
readonly tokenClass: 1;
|
|
441
|
-
readonly alwaysVar: 1;
|
|
442
436
|
readonly bp: 1;
|
|
443
437
|
};
|
|
444
438
|
readonly 'px-s': {
|
|
@@ -487,7 +481,6 @@ declare const _default: {
|
|
|
487
481
|
readonly token: "space";
|
|
488
482
|
readonly tokenClass: 1;
|
|
489
483
|
readonly alwaysVar: 1;
|
|
490
|
-
readonly overwriteBaseVar: 1;
|
|
491
484
|
readonly bp: 1;
|
|
492
485
|
};
|
|
493
486
|
readonly mx: {
|
|
@@ -495,7 +488,6 @@ declare const _default: {
|
|
|
495
488
|
readonly presets: readonly ["auto", "0"];
|
|
496
489
|
readonly token: "space";
|
|
497
490
|
readonly tokenClass: 1;
|
|
498
|
-
readonly alwaysVar: 1;
|
|
499
491
|
readonly bp: 1;
|
|
500
492
|
};
|
|
501
493
|
readonly my: {
|
|
@@ -503,7 +495,6 @@ declare const _default: {
|
|
|
503
495
|
readonly presets: readonly ["auto", "0"];
|
|
504
496
|
readonly token: "space";
|
|
505
497
|
readonly tokenClass: 1;
|
|
506
|
-
readonly alwaysVar: 1;
|
|
507
498
|
readonly bp: 1;
|
|
508
499
|
};
|
|
509
500
|
readonly 'mx-s': {
|
|
@@ -561,8 +552,6 @@ declare const _default: {
|
|
|
561
552
|
};
|
|
562
553
|
readonly token: "space";
|
|
563
554
|
readonly tokenClass: 1;
|
|
564
|
-
readonly alwaysVar: 1;
|
|
565
|
-
readonly overwriteBaseVar: 1;
|
|
566
555
|
readonly bp: 1;
|
|
567
556
|
};
|
|
568
557
|
readonly cg: {
|
|
@@ -807,6 +796,10 @@ declare const _default: {
|
|
|
807
796
|
readonly isCoverLink: "is--coverLink";
|
|
808
797
|
readonly isSide: "is--side";
|
|
809
798
|
readonly isSkipFlow: "is--skipFlow";
|
|
799
|
+
readonly hasTransition: "has--transition";
|
|
800
|
+
readonly hasGutter: "has--gutter";
|
|
801
|
+
readonly hasSnap: "has--snap";
|
|
802
|
+
readonly hasMask: "has--mask";
|
|
810
803
|
};
|
|
811
804
|
};
|
|
812
805
|
export default _default;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* isVar: 1 → クラス出力はせずstyle属性での変数出力のみ (--bdw, --keycolor など)
|
|
3
3
|
* bp: 0 → Prop-valユーティリティクラス化されなければ、style属性で出力するだけ。
|
|
4
4
|
* bp: 1 → .-prop と --prop の セットがベースにあり、.-prop_bp と .--prop_bp で ブレイクポイント指定できる。
|
|
5
|
-
* .-prop{
|
|
5
|
+
* .-prop{property:var(--prop)} が基本で、ユーティリティクラスは .-prop:val{property:value} となる。
|
|
6
6
|
*
|
|
7
7
|
* ↓コンポーネント処理で使用される
|
|
8
8
|
* tokenClass: 1 → 対応するトークン値がそのまま全てユーティリティクラス化されるもの。
|
|
@@ -10,8 +10,10 @@
|
|
|
10
10
|
* shorthands: → コンポーネント側で短く書くための設定
|
|
11
11
|
*
|
|
12
12
|
* ↓SCSS出力で使用される
|
|
13
|
-
* alwaysVar: 1 → .-prop,[class*=-prop:] {
|
|
14
|
-
*
|
|
13
|
+
* alwaysVar: 1 → state変数扱い。 .-prop,[class*=-prop:] {property:var(--prop)} の base 出力となり、
|
|
14
|
+
* ユーティリティクラスは --prop をセットする形になる。
|
|
15
|
+
* 加えて BPクラスも .-prop_$bp { property: var(--prop); --prop: var(--prop_$bp) !important; } を出力し、
|
|
16
|
+
* 常に --prop が当該要素の現在値になるよう上書きされる(consumer が --prop を参照できる)。
|
|
15
17
|
* important: 1 → !important を付けて最終的に出力する
|
|
16
18
|
*/
|
|
17
19
|
declare const _default: {
|
|
@@ -24,7 +26,6 @@ declare const _default: {
|
|
|
24
26
|
readonly token: "fz";
|
|
25
27
|
readonly tokenClass: 1;
|
|
26
28
|
readonly bp: 1;
|
|
27
|
-
readonly alwaysVar: 1;
|
|
28
29
|
};
|
|
29
30
|
readonly fw: {
|
|
30
31
|
readonly prop: "fontWeight";
|
|
@@ -289,7 +290,6 @@ declare const _default: {
|
|
|
289
290
|
readonly tokenClass: 1;
|
|
290
291
|
readonly bp: 1;
|
|
291
292
|
readonly alwaysVar: 1;
|
|
292
|
-
readonly overwriteBaseVar: 1;
|
|
293
293
|
};
|
|
294
294
|
readonly 'bdrs-tl': {
|
|
295
295
|
readonly prop: "borderTopLeftRadius";
|
|
@@ -331,7 +331,6 @@ declare const _default: {
|
|
|
331
331
|
readonly token: "bxsh";
|
|
332
332
|
readonly tokenClass: 1;
|
|
333
333
|
readonly bp: 1;
|
|
334
|
-
readonly alwaysVar: 1;
|
|
335
334
|
};
|
|
336
335
|
readonly pos: {
|
|
337
336
|
readonly prop: "position";
|
|
@@ -410,7 +409,6 @@ declare const _default: {
|
|
|
410
409
|
readonly token: "space";
|
|
411
410
|
readonly tokenClass: 1;
|
|
412
411
|
readonly alwaysVar: 1;
|
|
413
|
-
readonly overwriteBaseVar: 1;
|
|
414
412
|
readonly bp: 1;
|
|
415
413
|
};
|
|
416
414
|
readonly px: {
|
|
@@ -418,7 +416,6 @@ declare const _default: {
|
|
|
418
416
|
readonly presets: readonly ["0"];
|
|
419
417
|
readonly token: "space";
|
|
420
418
|
readonly tokenClass: 1;
|
|
421
|
-
readonly alwaysVar: 1;
|
|
422
419
|
readonly bp: 1;
|
|
423
420
|
};
|
|
424
421
|
readonly py: {
|
|
@@ -426,7 +423,6 @@ declare const _default: {
|
|
|
426
423
|
readonly presets: readonly ["0"];
|
|
427
424
|
readonly token: "space";
|
|
428
425
|
readonly tokenClass: 1;
|
|
429
|
-
readonly alwaysVar: 1;
|
|
430
426
|
readonly bp: 1;
|
|
431
427
|
};
|
|
432
428
|
readonly 'px-s': {
|
|
@@ -475,7 +471,6 @@ declare const _default: {
|
|
|
475
471
|
readonly token: "space";
|
|
476
472
|
readonly tokenClass: 1;
|
|
477
473
|
readonly alwaysVar: 1;
|
|
478
|
-
readonly overwriteBaseVar: 1;
|
|
479
474
|
readonly bp: 1;
|
|
480
475
|
};
|
|
481
476
|
readonly mx: {
|
|
@@ -483,7 +478,6 @@ declare const _default: {
|
|
|
483
478
|
readonly presets: readonly ["auto", "0"];
|
|
484
479
|
readonly token: "space";
|
|
485
480
|
readonly tokenClass: 1;
|
|
486
|
-
readonly alwaysVar: 1;
|
|
487
481
|
readonly bp: 1;
|
|
488
482
|
};
|
|
489
483
|
readonly my: {
|
|
@@ -491,7 +485,6 @@ declare const _default: {
|
|
|
491
485
|
readonly presets: readonly ["auto", "0"];
|
|
492
486
|
readonly token: "space";
|
|
493
487
|
readonly tokenClass: 1;
|
|
494
|
-
readonly alwaysVar: 1;
|
|
495
488
|
readonly bp: 1;
|
|
496
489
|
};
|
|
497
490
|
readonly 'mx-s': {
|
|
@@ -549,8 +542,6 @@ declare const _default: {
|
|
|
549
542
|
};
|
|
550
543
|
readonly token: "space";
|
|
551
544
|
readonly tokenClass: 1;
|
|
552
|
-
readonly alwaysVar: 1;
|
|
553
|
-
readonly overwriteBaseVar: 1;
|
|
554
545
|
readonly bp: 1;
|
|
555
546
|
};
|
|
556
547
|
readonly cg: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "start", e: "end", c: "center", fs: "flex-start", fe: "flex-end" }, t = {
|
|
2
2
|
f: { prop: "font", presets: ["inherit"] },
|
|
3
|
-
fz: { prop: "fontSize", token: "fz", tokenClass: 1, bp: 1
|
|
3
|
+
fz: { prop: "fontSize", token: "fz", tokenClass: 1, bp: 1 },
|
|
4
4
|
fw: {
|
|
5
5
|
prop: "fontWeight",
|
|
6
6
|
token: "fw",
|
|
@@ -128,8 +128,7 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
128
128
|
token: "bdrs",
|
|
129
129
|
tokenClass: 1,
|
|
130
130
|
bp: 1,
|
|
131
|
-
alwaysVar: 1
|
|
132
|
-
overwriteBaseVar: 1
|
|
131
|
+
alwaysVar: 1
|
|
133
132
|
},
|
|
134
133
|
"bdrs-tl": { prop: "borderTopLeftRadius", token: "bdrs" },
|
|
135
134
|
"bdrs-tr": { prop: "borderTopRightRadius", token: "bdrs" },
|
|
@@ -139,7 +138,7 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
139
138
|
"bdrs-se": { prop: "borderStartEndRadius", token: "bdrs" },
|
|
140
139
|
"bdrs-es": { prop: "borderEndStartRadius", token: "bdrs" },
|
|
141
140
|
"bdrs-ee": { prop: "borderEndEndRadius", token: "bdrs" },
|
|
142
|
-
bxsh: { prop: "boxShadow", utils: { 0: "none" }, token: "bxsh", tokenClass: 1, bp: 1
|
|
141
|
+
bxsh: { prop: "boxShadow", utils: { 0: "none" }, token: "bxsh", tokenClass: 1, bp: 1 },
|
|
143
142
|
// position
|
|
144
143
|
pos: {
|
|
145
144
|
prop: "position",
|
|
@@ -164,11 +163,10 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
164
163
|
token: "space",
|
|
165
164
|
tokenClass: 1,
|
|
166
165
|
alwaysVar: 1,
|
|
167
|
-
overwriteBaseVar: 1,
|
|
168
166
|
bp: 1
|
|
169
167
|
},
|
|
170
|
-
px: { prop: "paddingInline", presets: ["0"], token: "space", tokenClass: 1,
|
|
171
|
-
py: { prop: "paddingBlock", presets: ["0"], token: "space", tokenClass: 1,
|
|
168
|
+
px: { prop: "paddingInline", presets: ["0"], token: "space", tokenClass: 1, bp: 1 },
|
|
169
|
+
py: { prop: "paddingBlock", presets: ["0"], token: "space", tokenClass: 1, bp: 1 },
|
|
172
170
|
"px-s": { prop: "paddingInlineStart", token: "space", bp: 1 },
|
|
173
171
|
"px-e": { prop: "paddingInlineEnd", token: "space", bp: 1 },
|
|
174
172
|
"py-s": { prop: "paddingBlockStart", token: "space", bp: 1 },
|
|
@@ -183,11 +181,10 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
183
181
|
token: "space",
|
|
184
182
|
tokenClass: 1,
|
|
185
183
|
alwaysVar: 1,
|
|
186
|
-
overwriteBaseVar: 1,
|
|
187
184
|
bp: 1
|
|
188
185
|
},
|
|
189
|
-
mx: { prop: "marginInline", presets: ["auto", "0"], token: "space", tokenClass: 1,
|
|
190
|
-
my: { prop: "marginBlock", presets: ["auto", "0"], token: "space", tokenClass: 1,
|
|
186
|
+
mx: { prop: "marginInline", presets: ["auto", "0"], token: "space", tokenClass: 1, bp: 1 },
|
|
187
|
+
my: { prop: "marginBlock", presets: ["auto", "0"], token: "space", tokenClass: 1, bp: 1 },
|
|
191
188
|
"mx-s": { prop: "marginInlineStart", presets: ["auto"], token: "space", bp: 1 },
|
|
192
189
|
"mx-e": { prop: "marginInlineEnd", presets: ["auto"], token: "space", bp: 1 },
|
|
193
190
|
"my-s": { prop: "marginBlockStart", token: "space", bp: 1, presets: ["auto", "0"], tokenClass: 1 },
|
|
@@ -202,8 +199,6 @@ const e = ["start", "center", "end"], r = ["flex-start", "flex-end"], p = { s: "
|
|
|
202
199
|
exUtility: { inherit: { gap: "inherit" } },
|
|
203
200
|
token: "space",
|
|
204
201
|
tokenClass: 1,
|
|
205
|
-
alwaysVar: 1,
|
|
206
|
-
overwriteBaseVar: 1,
|
|
207
202
|
bp: 1
|
|
208
203
|
},
|
|
209
204
|
cg: { prop: "columnGap", token: "space", bp: 1 },
|
|
@@ -7,7 +7,7 @@ declare const _default: {
|
|
|
7
7
|
readonly fw: readonly ["light", "normal", "bold"];
|
|
8
8
|
readonly o: readonly ["-10", "-20", "-30"];
|
|
9
9
|
readonly bdrs: readonly ["10", "20", "30", "40", "99", "inner"];
|
|
10
|
-
readonly bxsh: readonly ["10", "20", "30", "40"];
|
|
10
|
+
readonly bxsh: readonly ["10", "20", "30", "40", "50"];
|
|
11
11
|
readonly sz: readonly ["xs", "s", "m", "l", "xl", "container"];
|
|
12
12
|
readonly ar: readonly ["og"];
|
|
13
13
|
readonly space: {
|
|
@@ -7,7 +7,7 @@ const e = {
|
|
|
7
7
|
fw: ["light", "normal", "bold"],
|
|
8
8
|
o: ["-10", "-20", "-30"],
|
|
9
9
|
bdrs: ["10", "20", "30", "40", "99", "inner"],
|
|
10
|
-
bxsh: ["10", "20", "30", "40"],
|
|
10
|
+
bxsh: ["10", "20", "30", "40", "50"],
|
|
11
11
|
sz: ["xs", "s", "m", "l", "xl", "container"],
|
|
12
12
|
ar: ["og"],
|
|
13
13
|
space: {
|
|
@@ -12,5 +12,9 @@ declare const _default: {
|
|
|
12
12
|
readonly isCoverLink: "is--coverLink";
|
|
13
13
|
readonly isSide: "is--side";
|
|
14
14
|
readonly isSkipFlow: "is--skipFlow";
|
|
15
|
+
readonly hasTransition: "has--transition";
|
|
16
|
+
readonly hasGutter: "has--gutter";
|
|
17
|
+
readonly hasSnap: "has--snap";
|
|
18
|
+
readonly hasMask: "has--mask";
|
|
15
19
|
};
|
|
16
20
|
export default _default;
|
|
@@ -11,7 +11,11 @@ const s = {
|
|
|
11
11
|
isBoxLink: "is--boxLink",
|
|
12
12
|
isCoverLink: "is--coverLink",
|
|
13
13
|
isSide: "is--side",
|
|
14
|
-
isSkipFlow: "is--skipFlow"
|
|
14
|
+
isSkipFlow: "is--skipFlow",
|
|
15
|
+
hasTransition: "has--transition",
|
|
16
|
+
hasGutter: "has--gutter",
|
|
17
|
+
hasSnap: "has--snap",
|
|
18
|
+
hasMask: "has--mask"
|
|
15
19
|
};
|
|
16
20
|
export {
|
|
17
21
|
s as default
|